:root {
  color-scheme: dark;
  --bg: #061018;
  --bg-deep: #030a10;
  --surface: #0b1822;
  --surface-raised: #102331;
  --surface-muted: #0d1d28;
  --line: #274251;
  --line-strong: #3d6070;
  --text: #edf7fb;
  --text-soft: #b8ccd5;
  --text-muted: #849ca8;
  --accent: #42bfe8;
  --accent-strong: #74d9f5;
  --accent-ink: #05202b;
  --warning: #f3b562;
  --danger: #ff8b7b;
  --success: #7ed7ad;
  --info: #8dbdf7;
  --panel-radius: 16px;
  --control-radius: 10px;
  --pill-radius: 999px;
  --shadow: 0 28px 80px rgb(0 4 8 / 0.38);
  --font-sans: "Avenir Next", Avenir, "Segoe UI Variable", "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", "Cascadia Code", "Roboto Mono", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 18% -14%, rgb(44 170 211 / 0.16), transparent 33rem),
    linear-gradient(180deg, var(--bg-deep) 0, var(--bg) 30rem, #07121a 100%);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
}

button,
textarea,
input {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: var(--accent-strong);
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 20;
  transform: translateY(-160%);
  border-radius: var(--control-radius);
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 14px;
  font-weight: 800;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(350px, 1fr);
  min-height: 68px;
  align-items: center;
  gap: 22px;
  border-bottom: 1px solid rgb(94 145 166 / 0.28);
  background: rgb(3 10 16 / 0.9);
  padding: 10px clamp(16px, 3vw, 48px);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand-lockup {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgb(116 217 245 / 0.62);
  border-radius: var(--control-radius);
  background: rgb(66 191 232 / 0.12);
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-lockup strong,
.brand-lockup small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-lockup strong {
  font-size: 14px;
  letter-spacing: -0.01em;
}

.brand-lockup small {
  margin-top: 1px;
  color: var(--text-muted);
  font-size: 11px;
}

.header-deadline {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: 9px;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  padding: 0 20px;
  white-space: nowrap;
}

.header-deadline span {
  color: var(--text-muted);
  font-size: 11px;
}

.header-deadline strong {
  color: var(--warning);
  font-family: var(--font-mono);
  font-size: 12px;
}

.header-boundary {
  display: flex;
  min-width: 0;
  justify-content: flex-end;
  gap: 16px;
  color: var(--text-soft);
  font-size: 11px;
  white-space: nowrap;
}

main {
  width: min(1640px, 100%);
  margin: 0 auto;
  padding: clamp(14px, 2.4vw, 36px);
}

.planner-workspace {
  display: grid;
  min-height: calc(100dvh - 110px);
  grid-template-columns: minmax(0, 1.46fr) minmax(330px, 0.72fr);
  align-items: stretch;
  gap: 14px;
}

.evidence-panel,
.scope-panel,
.results-section {
  border: 1px solid var(--line);
  border-radius: var(--panel-radius);
  background: linear-gradient(160deg, rgb(15 35 48 / 0.98), rgb(8 21 30 / 0.98));
  box-shadow: var(--shadow);
}

.evidence-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: clamp(18px, 2.3vw, 32px);
}

.scope-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border-color: rgb(66 191 232 / 0.36);
  background:
    linear-gradient(145deg, rgb(66 191 232 / 0.08), transparent 42%),
    linear-gradient(160deg, rgb(12 29 40 / 0.98), rgb(7 18 26 / 0.98));
  padding: clamp(18px, 2vw, 28px);
}

.panel-heading {
  display: grid;
  gap: 5px;
}

.section-label {
  margin: 0;
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.035em;
}

h1 {
  max-width: 760px;
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1.02;
}

h2 {
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1.08;
}

h3 {
  font-size: 16px;
  line-height: 1.25;
}

.lede {
  max-width: 62ch;
  margin: 3px 0 0;
  color: var(--text-soft);
  font-size: 14px;
}

.mode-fieldset {
  min-width: 0;
  margin: 18px 0 0;
  border: 0;
  padding: 0;
}

.mode-fieldset legend {
  margin-bottom: 8px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: rgb(3 12 18 / 0.52);
  padding: 4px;
}

.segmented-control label {
  min-width: 0;
  cursor: pointer;
}

.segmented-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.segmented-control span {
  display: grid;
  min-height: 34px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.segmented-control input:checked + span {
  border-color: rgb(66 191 232 / 0.5);
  background: rgb(66 191 232 / 0.14);
  color: var(--text);
}

.segmented-control input:focus-visible + span {
  outline: 3px solid rgb(66 191 232 / 0.28);
  outline-offset: 2px;
}

.input-block {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  margin-top: 16px;
}

.label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.label-row label {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.label-row span {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
}

.helper-text {
  margin: 5px 0 8px;
  color: var(--text-muted);
  font-size: 12px;
}

textarea {
  width: 100%;
  min-height: 220px;
  flex: 1;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: var(--control-radius);
  outline: none;
  background:
    linear-gradient(rgb(66 191 232 / 0.025) 1px, transparent 1px),
    rgb(3 11 17 / 0.82);
  background-size: 100% 26px;
  color: var(--text);
  caret-color: var(--accent);
  padding: 13px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.62;
  tab-size: 2;
}

textarea::placeholder {
  color: #718b98;
  opacity: 1;
}

textarea:hover {
  border-color: #4a7182;
}

textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(66 191 232 / 0.16);
}

.input-actions {
  display: grid;
  grid-template-columns: auto minmax(250px, 0.8fr);
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.secondary-actions {
  display: flex;
  gap: 8px;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--control-radius);
  padding: 9px 15px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(1px);
}

.button:focus-visible,
.result-tabs button:focus-visible,
.copy-button:focus-visible {
  outline: 3px solid rgb(66 191 232 / 0.28);
  outline-offset: 2px;
}

.button-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 12px 28px rgb(16 141 183 / 0.2);
}

.button-primary:hover {
  background: var(--accent-strong);
}

.button-secondary {
  border-color: #567282;
  background: #17303e;
  color: var(--text);
}

.button-secondary:hover {
  border-color: var(--accent);
  background: #1a3949;
}

.button-quiet {
  border-color: var(--line);
  background: transparent;
  color: var(--text-soft);
}

.button-quiet:hover {
  border-color: var(--line-strong);
  background: rgb(255 255 255 / 0.035);
  color: var(--text);
}

.button-small {
  min-height: 34px;
  padding: 7px 11px;
  font-size: 11px;
}

.sensitive-reminder {
  margin: 11px 0 0;
  color: var(--text-muted);
  font-size: 11px;
}

.scope-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.scope-heading > div {
  display: grid;
  gap: 5px;
}

.scope-heading h2 {
  font-size: clamp(22px, 2.2vw, 31px);
}

.status-badge,
.badge,
.warning-tag {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  border: 1px solid currentColor;
  border-radius: var(--pill-radius);
  padding: 5px 9px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.2;
}

.status-neutral,
.badge-neutral {
  color: var(--text-soft);
}

.status-warning,
.badge-warning {
  color: var(--warning);
}

.status-danger,
.badge-danger {
  color: var(--danger);
}

.status-success,
.badge-success {
  color: var(--success);
}

.status-info,
.badge-info {
  color: var(--info);
}

.scope-state {
  margin-top: 22px;
  border-left: 3px solid var(--accent);
  background: rgb(66 191 232 / 0.055);
  padding: 13px 14px;
}

.scope-state strong {
  display: block;
  font-size: 13px;
}

.scope-state p {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 12px;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 20px 0 0;
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  overflow: hidden;
  background: var(--line);
}

.metric-strip > div {
  min-height: 74px;
  background: rgb(5 16 23 / 0.88);
  padding: 12px;
}

.metric-strip > div:first-child {
  grid-row: span 2;
  min-height: 149px;
  background: rgb(66 191 232 / 0.08);
}

.metric-strip dt {
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.3;
}

.metric-strip dd {
  margin: 6px 0 0;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.metric-strip > div:first-child dd {
  margin-top: 22px;
  color: var(--accent-strong);
  font-size: 48px;
}

.deadline-ledger {
  display: grid;
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

.deadline-ledger > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.deadline-ledger span {
  color: var(--text-muted);
  font-size: 11px;
}

.deadline-ledger strong {
  text-align: right;
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 10px;
}

.next-action-block {
  margin-top: auto;
  border: 1px solid rgb(66 191 232 / 0.34);
  border-radius: var(--control-radius);
  background: rgb(66 191 232 / 0.075);
  padding: 13px;
}

.next-action-block span {
  display: block;
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 750;
}

.next-action-block strong {
  display: block;
  margin-top: 5px;
  font-size: 13px;
  line-height: 1.42;
}

.source-note {
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 10px;
}

.privacy-rail {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 26px;
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: rgb(6 17 25 / 0.82);
  padding: 12px 15px;
}

.privacy-rail p {
  margin: 0;
  color: var(--text-soft);
  font-size: 11px;
}

.privacy-rail strong {
  color: var(--text);
}

.results-section {
  min-height: 530px;
  scroll-margin-top: 82px;
  padding: clamp(18px, 2.4vw, 34px);
}

.results-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
}

.results-heading > div {
  display: grid;
  gap: 5px;
}

.results-heading > p {
  max-width: 62ch;
  margin: 0;
  color: var(--text-soft);
  font-size: 12px;
  text-align: right;
}

.bounded-state {
  display: grid;
  min-height: 330px;
  place-content: center;
  margin-top: 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--control-radius);
  background:
    linear-gradient(135deg, transparent 0 48%, rgb(66 191 232 / 0.025) 48% 52%, transparent 52% 100%),
    rgb(4 14 21 / 0.6);
  background-size: 18px 18px;
  padding: 30px;
  text-align: center;
}

.bounded-state strong {
  font-size: 17px;
}

.bounded-state p {
  max-width: 58ch;
  margin: 7px auto 0;
  color: var(--text-soft);
}

.bounded-state.state-warning {
  border-color: rgb(243 181 98 / 0.55);
  background: rgb(243 181 98 / 0.05);
}

.bounded-state.state-danger {
  border-color: rgb(255 139 123 / 0.58);
  background: rgb(255 139 123 / 0.05);
}

.sensitive-warning {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
  border-left: 3px solid var(--danger);
  background: rgb(255 139 123 / 0.065);
  padding: 13px 15px;
}

.sensitive-warning p {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 12px;
}

.warning-tags {
  display: flex;
  flex: 0 1 46%;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.warning-tag {
  color: var(--danger);
}

.result-tabs {
  display: flex;
  gap: 3px;
  margin-top: 18px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
}

.result-tabs button {
  min-height: 42px;
  flex: 0 0 auto;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  padding: 8px 13px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.result-tabs button:hover {
  color: var(--text);
}

.result-tabs button[aria-selected="true"] {
  border-bottom-color: var(--accent);
  color: var(--accent-strong);
}

.tab-panel {
  padding-top: 18px;
}

.tab-panel[hidden],
[hidden] {
  display: none !important;
}

.table-toolbar,
.artifact-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
}

.table-toolbar p,
.artifact-toolbar p {
  margin: 0;
  color: var(--text-muted);
  font-size: 11px;
}

.artifact-toolbar > div {
  display: grid;
  gap: 5px;
}

.table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: rgb(3 12 18 / 0.6);
  scrollbar-color: var(--line-strong) transparent;
}

.table-wrap:focus-visible {
  outline: 3px solid rgb(66 191 232 / 0.2);
  outline-offset: 2px;
}

table {
  width: 100%;
  min-width: 1560px;
  border-collapse: collapse;
  table-layout: fixed;
  text-align: left;
}

th,
td {
  vertical-align: top;
  border-bottom: 1px solid rgb(39 66 81 / 0.72);
  padding: 11px 10px;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #0e202c;
  color: var(--text-soft);
  font-size: 10px;
  line-height: 1.35;
}

td {
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.48;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover td {
  background: rgb(66 191 232 / 0.035);
}

th:nth-child(1),
td:nth-child(1) {
  width: 150px;
}

th:nth-child(2),
td:nth-child(2),
th:nth-child(3),
td:nth-child(3),
th:nth-child(4),
td:nth-child(4) {
  width: 132px;
}

th:nth-child(5),
td:nth-child(5),
th:nth-child(6),
td:nth-child(6),
th:nth-child(7),
td:nth-child(7),
th:nth-child(8),
td:nth-child(8),
th:nth-child(9),
td:nth-child(9),
th:nth-child(10),
td:nth-child(10) {
  width: 138px;
}

th:nth-child(11),
td:nth-child(11) {
  width: 235px;
}

.cell-title {
  display: block;
  color: var(--text);
  font-weight: 800;
}

.cell-subtle {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 10px;
}

.badge-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.badge {
  padding: 4px 7px;
  white-space: normal;
}

.cost-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 16px;
}

.cost-layout > div,
.reviewed-command-block,
.owner-summary {
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: rgb(4 14 21 / 0.62);
  padding: 16px;
}

.cost-layout p,
.reviewed-command-block p,
.owner-summary p {
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: 11px;
}

.evidence-checklist,
.decision-prompts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.evidence-item,
.decision-item {
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--surface-muted);
  padding: 10px;
}

.evidence-item strong,
.decision-item strong {
  display: block;
  font-size: 12px;
}

.evidence-item span,
.decision-item span {
  display: block;
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 10px;
}

.evidence-item.is-found {
  border-color: rgb(126 215 173 / 0.42);
}

.evidence-item.is-missing {
  border-color: rgb(243 181 98 / 0.45);
}

.reviewed-command-block {
  margin-top: 16px;
}

.reviewed-command-block ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 13px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: commands;
}

.reviewed-command-block li {
  min-height: 100px;
  counter-increment: commands;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--surface-muted);
  padding: 11px;
  color: var(--text-soft);
  font-size: 11px;
}

.reviewed-command-block li::before {
  content: counter(commands, decimal-leading-zero);
  display: block;
  margin-bottom: 7px;
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
}

.owner-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.owner-summary strong {
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-size: 22px;
}

.owner-queue {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.owner-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: rgb(4 14 21 / 0.62);
  padding: 13px;
}

.owner-item .wave {
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
}

.owner-item h3 {
  font-size: 13px;
}

.owner-item p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 11px;
}

.artifact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.artifact {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: rgb(4 14 21 / 0.62);
}

.artifact-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
}

.artifact-head h3 {
  font-size: 13px;
}

.copy-button {
  min-height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: transparent;
  padding: 5px 9px;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.copy-button:hover {
  border-color: var(--accent);
  color: var(--text);
}

.artifact pre {
  min-height: 180px;
  max-height: 320px;
  margin: 0;
  overflow: auto;
  padding: 12px;
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.deadline-notes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--line);
}

.deadline-notes article {
  min-height: 210px;
  background: rgb(4 14 21 / 0.92);
  padding: 16px;
}

.deadline-notes span {
  color: var(--warning);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
}

.deadline-notes h3 {
  margin-top: 20px;
  font-size: 15px;
}

.deadline-notes p {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 11px;
}

.evidence-boundary-copy {
  margin: 14px 0 0;
  border-left: 3px solid var(--warning);
  background: rgb(243 181 98 / 0.05);
  padding: 12px 14px;
  color: var(--text-soft);
  font-size: 12px;
}

.capability-boundary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--line);
}

.capability-boundary > div {
  background: rgb(4 14 21 / 0.82);
  padding: 14px;
}

.capability-boundary strong {
  font-size: 12px;
}

.capability-boundary p {
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: 11px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  max-width: min(380px, calc(100vw - 36px));
  border: 1px solid var(--accent);
  border-radius: var(--control-radius);
  background: #0b2531;
  box-shadow: var(--shadow);
  padding: 11px 14px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

@media (prefers-reduced-motion: no-preference) {
  .evidence-panel,
  .scope-panel {
    animation: panel-entry 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .scope-panel {
    animation-delay: 70ms;
  }

  @keyframes panel-entry {
    from {
      opacity: 0;
      transform: translateY(12px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

@media (max-width: 1180px) {
  .app-header {
    grid-template-columns: 1fr auto;
  }

  .header-boundary {
    display: none;
  }

  .planner-workspace {
    grid-template-columns: minmax(0, 1.25fr) minmax(310px, 0.75fr);
  }

  .deadline-notes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reviewed-command-block ol {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 880px) {
  .planner-workspace {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .scope-panel {
    min-height: 520px;
  }

  .metric-strip {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .metric-strip > div,
  .metric-strip > div:first-child {
    grid-row: auto;
    min-height: 82px;
  }

  .metric-strip > div:first-child dd {
    margin-top: 8px;
    font-size: 30px;
  }

  .next-action-block {
    margin-top: 18px;
  }

  .cost-layout {
    grid-template-columns: 1fr;
  }

  .owner-queue,
  .artifact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  body {
    font-size: 14px;
  }

  .app-header {
    position: relative;
    min-height: 54px;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 8px 12px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand-lockup strong {
    font-size: 12px;
  }

  .brand-lockup small {
    display: none;
  }

  .header-deadline {
    grid-template-columns: 1fr;
    gap: 0;
    border: 0;
    padding: 0;
    text-align: right;
  }

  .header-deadline span {
    font-size: 9px;
  }

  .header-deadline strong {
    font-size: 9px;
  }

  main {
    width: 100%;
    padding: 10px;
  }

  .evidence-panel,
  .scope-panel,
  .results-section {
    border-radius: 13px;
    box-shadow: 0 16px 42px rgb(0 4 8 / 0.28);
  }

  .evidence-panel,
  .scope-panel,
  .results-section {
    padding: 15px;
  }

  h1 {
    font-size: clamp(27px, 9vw, 38px);
  }

  h2 {
    font-size: 24px;
  }

  .lede {
    font-size: 12px;
  }

  .mode-fieldset {
    margin-top: 13px;
  }

  .segmented-control {
    grid-template-columns: repeat(2, 1fr);
  }

  .segmented-control span {
    min-height: 32px;
  }

  .input-block {
    margin-top: 12px;
  }

  .helper-text {
    font-size: 10px;
  }

  textarea {
    min-height: 175px;
    max-height: 260px;
    flex: none;
    font-size: 11px;
  }

  .input-actions {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 10px;
  }

  .input-actions .button-primary {
    grid-row: 1;
    width: 100%;
  }

  .secondary-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .button {
    min-height: 40px;
  }

  .sensitive-reminder {
    margin-top: 8px;
    font-size: 9px;
  }

  .scope-panel {
    min-height: auto;
  }

  .scope-heading {
    align-items: center;
  }

  .metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-strip > div:first-child {
    grid-column: span 2;
  }

  .deadline-ledger > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .deadline-ledger strong {
    text-align: left;
  }

  .privacy-rail {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 10px 12px;
  }

  .results-heading {
    display: grid;
    gap: 8px;
  }

  .results-heading > p {
    text-align: left;
  }

  .bounded-state {
    min-height: 250px;
  }

  .sensitive-warning {
    display: grid;
  }

  .warning-tags {
    justify-content: flex-start;
  }

  .result-tabs {
    margin-right: -15px;
    margin-left: -15px;
    padding: 0 15px;
  }

  .table-toolbar,
  .artifact-toolbar {
    align-items: flex-start;
  }

  .table-toolbar {
    display: grid;
  }

  .table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
    width: 100% !important;
    min-width: 0;
  }

  thead {
    position: absolute;
    width: 1px !important;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  tbody {
    display: grid;
    gap: 10px;
  }

  tbody tr {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--control-radius);
    background: rgb(4 14 21 / 0.78);
  }

  tbody tr:hover td {
    background: transparent;
  }

  td {
    display: grid;
    grid-template-columns: minmax(108px, 0.42fr) minmax(0, 1fr);
    gap: 10px;
    border-bottom: 1px solid rgb(39 66 81 / 0.62);
    padding: 9px 10px;
    font-size: 11px;
  }

  td::before {
    content: attr(data-label);
    color: var(--text-muted);
    font-size: 9px;
    font-weight: 800;
    line-height: 1.4;
  }

  td:last-child {
    border-bottom: 0;
  }

  .evidence-checklist,
  .decision-prompts,
  .deadline-notes,
  .capability-boundary {
    grid-template-columns: 1fr;
  }

  .owner-summary {
    align-items: flex-start;
  }

  .owner-item {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .artifact-toolbar {
    display: grid;
  }

  .artifact-toolbar .button {
    width: fit-content;
  }

  .deadline-notes article {
    min-height: 150px;
  }

  .deadline-notes h3 {
    margin-top: 12px;
  }
}

@media (max-width: 430px) {
  .brand-lockup strong {
    max-width: 155px;
  }

  .section-label {
    font-size: 9px;
  }

  .scope-heading {
    display: grid;
  }

  .status-badge {
    justify-self: start;
  }

  .owner-summary {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
