:root {
  --canvas: #0d100f;
  --canvas-raised: #131715;
  --panel: #171c19;
  --panel-strong: #1d231f;
  --panel-soft: #111512;
  --line: #303831;
  --line-strong: #465047;
  --text: #f1f3ed;
  --muted: #a8b1a8;
  --quiet: #7d887f;
  --accent: #e5a243;
  --accent-strong: #ffc56d;
  --accent-ink: #251803;
  --danger: #ef7f72;
  --danger-soft: #3b211e;
  --warning: #f0b35d;
  --warning-soft: #3b2c16;
  --info: #93b8d7;
  --info-soft: #1d2d38;
  --success: #8fc59c;
  --success-soft: #1d3023;
  --radius: 14px;
  --radius-small: 10px;
  --shadow: 0 24px 70px rgb(2 7 4 / 0.28);
  font-family: "Avenir Next", "IBM Plex Sans", "Segoe UI Variable", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--canvas);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--canvas);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(90deg, rgb(255 255 255 / 0.018) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(rgb(255 255 255 / 0.014) 1px, transparent 1px) 0 0 / 64px 64px,
    radial-gradient(circle at 70% -10%, rgb(229 162 67 / 0.09), transparent 34rem),
    var(--canvas);
  line-height: 1.5;
}

button,
textarea,
select,
input {
  font: inherit;
}

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

code,
textarea,
.metric-strip dd,
.deadline-list dd strong,
.state-badge,
.priority-badge,
.result-state,
.input-meta,
.control-label,
.eyebrow {
  font-family: "SFMono-Regular", "Roboto Mono", "Cascadia Code", Consolas, monospace;
}

code {
  color: var(--accent-strong);
  font-size: 0.93em;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: var(--radius-small);
  color: var(--accent-ink);
  background: var(--accent-strong);
  transform: translateY(-150%);
  transition: transform 150ms ease;
}

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

.app-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px clamp(16px, 3vw, 48px);
  border-bottom: 1px solid rgb(70 80 71 / 0.75);
  background: rgb(13 16 15 / 0.92);
  backdrop-filter: blur(18px);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--accent);
  border-radius: var(--radius-small);
  color: var(--accent-strong);
  background: rgb(229 162 67 / 0.08);
  font: 750 11px/1 "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.08em;
}

.brand-lockup strong,
.brand-lockup small {
  display: block;
}

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

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

.app-bar nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  white-space: nowrap;
}

.app-bar nav a {
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}

.app-bar nav a:hover,
.app-bar nav a:focus-visible {
  color: var(--accent-strong);
}

main,
footer {
  width: min(1540px, 100%);
  margin-inline: auto;
}

.deadline-rail {
  display: grid;
  grid-template-columns: minmax(210px, 0.75fr) minmax(520px, 2fr) minmax(240px, 0.8fr);
  align-items: center;
  gap: 24px;
  padding: 16px clamp(16px, 3vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgb(17 21 18 / 0.78);
}

.deadline-intro span,
.control-label {
  display: block;
  color: var(--accent-strong);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.deadline-intro strong {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.25;
}

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

.deadline-list div {
  min-width: 0;
  padding: 9px 12px;
  background: var(--panel-soft);
}

.deadline-list dt {
  overflow: hidden;
  color: var(--quiet);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deadline-list dd {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 2px 0 0;
}

.deadline-list dd strong {
  color: var(--accent-strong);
  font-size: 15px;
}

.deadline-list dd span {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deadline-rail > p {
  margin: 0;
  color: var(--quiet);
  font-size: 11px;
  line-height: 1.45;
}

.workbench {
  padding: clamp(22px, 3vw, 42px) clamp(16px, 3vw, 48px) 30px;
}

.workbench-heading,
.output-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-strong);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 6px;
  font-size: clamp(30px, 4vw, 54px);
  font-weight: 720;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.workbench-heading > div > p:last-child,
.output-heading > div > p:last-child {
  max-width: 780px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.local-boundary {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: 1fr 1fr;
  min-width: 280px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--panel-soft);
}

.local-boundary strong,
.local-boundary span {
  padding: 8px 11px;
  font-size: 10px;
}

.local-boundary strong {
  grid-column: 1 / -1;
  color: var(--accent-strong);
  border-bottom: 1px solid var(--line);
}

.local-boundary span + span {
  border-left: 1px solid var(--line);
}

.local-boundary span {
  color: var(--muted);
}

.readiness-form {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(310px, 0.72fr);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.evidence-panel,
.control-panel {
  min-width: 0;
  padding: 20px;
}

.control-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-left: 1px solid var(--line);
  background:
    linear-gradient(150deg, rgb(229 162 67 / 0.06), transparent 42%),
    var(--panel-soft);
}

.field-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 10px;
}

.field-heading label {
  display: block;
  margin-bottom: 3px;
  font-size: 14px;
  font-weight: 700;
}

.field-heading p,
.control-panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 11px;
}

.field-tools {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

textarea {
  display: block;
  width: 100%;
  min-height: 250px;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  outline: none;
  color: #dfe6dc;
  background: #0f1311;
  caret-color: var(--accent-strong);
  padding: 14px;
  font-size: 12px;
  line-height: 1.55;
  tab-size: 2;
}

textarea::placeholder {
  color: #778279;
}

textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(229 162 67 / 0.14);
}

.input-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-top: 9px;
  color: var(--quiet);
  font-size: 9px;
}

.input-meta span:last-child {
  max-width: 690px;
  text-align: right;
}

.input-meta.is-warning span:last-child {
  color: var(--warning);
}

.input-meta.is-danger span:last-child {
  color: var(--danger);
}

.control-panel h2 {
  margin: 3px 0 0;
  font-size: 17px;
  line-height: 1.25;
}

.segmented-control {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  margin: 0;
  padding: 0;
  border: 0;
}

.segmented-control legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.segmented-control label {
  position: relative;
  display: block;
}

.segmented-control input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.segmented-control span {
  display: block;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  color: var(--muted);
  background: rgb(255 255 255 / 0.018);
  font-size: 11px;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.segmented-control input:checked + span {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: rgb(229 162 67 / 0.09);
}

.segmented-control input:focus-visible + span {
  outline: 3px solid rgb(229 162 67 / 0.22);
  outline-offset: 2px;
}

.control-note {
  padding: 11px 12px;
  border-left: 2px solid var(--accent);
  background: rgb(229 162 67 / 0.055);
}

.control-note strong {
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
}

.primary-button,
.secondary-button,
.quiet-button,
.copy-button,
.tab-button {
  border: 1px solid transparent;
  border-radius: var(--radius-small);
  font-weight: 700;
  white-space: nowrap;
  transition: transform 100ms ease, border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.primary-button:active,
.secondary-button:active,
.quiet-button:active,
.copy-button:active,
.tab-button:active {
  transform: translateY(1px);
}

.primary-button {
  width: 100%;
  min-height: 46px;
  margin-top: auto;
  padding: 11px 15px;
  color: var(--accent-ink);
  background: var(--accent-strong);
  box-shadow: 0 12px 28px rgb(229 162 67 / 0.16);
}

.primary-button:hover,
.primary-button:focus-visible {
  background: #ffd18c;
}

.secondary-button,
.quiet-button,
.copy-button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 10px;
}

.secondary-button {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: rgb(229 162 67 / 0.07);
}

.quiet-button,
.copy-button {
  border-color: var(--line);
  color: var(--muted);
  background: var(--panel-soft);
}

.secondary-button:hover,
.secondary-button:focus-visible,
.quiet-button:hover,
.quiet-button:focus-visible,
.copy-button:hover,
.copy-button:focus-visible {
  border-color: var(--accent);
  color: var(--accent-strong);
}

button:focus-visible,
a:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgb(229 162 67 / 0.25);
  outline-offset: 2px;
}

.form-message {
  min-height: 32px;
  margin: -4px 0 0;
  color: var(--quiet);
  font-size: 10px;
  line-height: 1.4;
}

.form-message.is-success {
  color: var(--success);
}

.form-message.is-warning {
  color: var(--warning);
}

.form-message.is-danger {
  color: var(--danger);
}

.privacy-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0 clamp(16px, 3vw, 48px) 30px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--line);
}

.privacy-strip span {
  padding: 10px 12px;
  color: var(--muted);
  background: var(--panel-soft);
  font-size: 10px;
  text-align: center;
}

.output-shell {
  margin: 0 clamp(16px, 3vw, 48px) 34px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.output-heading {
  align-items: flex-start;
  margin: 0;
  padding: 22px;
  border-bottom: 1px solid var(--line);
}

.output-heading h2 {
  margin-bottom: 5px;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.03em;
}

.result-state {
  min-width: 210px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--panel-soft);
  font-size: 10px;
  text-align: right;
}

.result-state span,
.result-state strong {
  display: block;
}

.result-state span {
  color: var(--quiet);
}

.result-state strong {
  margin-top: 3px;
  color: var(--accent-strong);
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.metric-strip div {
  padding: 12px 15px;
  border-right: 1px solid var(--line);
}

.metric-strip div:last-child {
  border-right: 0;
}

.metric-strip dt {
  color: var(--quiet);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metric-strip dd {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 22px;
  font-weight: 760;
}

.tab-list {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
}

.tab-button {
  flex: 0 0 auto;
  padding: 8px 11px;
  color: var(--quiet);
  background: transparent;
  font-size: 10px;
}

.tab-button:hover,
.tab-button:focus-visible {
  color: var(--text);
  background: rgb(255 255 255 / 0.04);
}

.tab-button.is-active {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: rgb(229 162 67 / 0.07);
}

.tab-panel {
  min-height: 250px;
  padding: 20px;
}

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

#panel-matrix {
  padding: 0;
}

.table-scroll {
  max-width: 100%;
  overflow-x: auto;
}

.readiness-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
}

.readiness-table th,
.readiness-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
  overflow-wrap: anywhere;
}

.readiness-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--quiet);
  background: #111512;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.readiness-table td {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.readiness-table tbody tr:hover td {
  background: rgb(255 255 255 / 0.014);
}

.readiness-table th:nth-child(1) { width: 4.2%; }
.readiness-table th:nth-child(2) { width: 10%; }
.readiness-table th:nth-child(3) { width: 6.4%; }
.readiness-table th:nth-child(4) { width: 8.4%; }
.readiness-table th:nth-child(5) { width: 8.8%; }
.readiness-table th:nth-child(6) { width: 9.3%; }
.readiness-table th:nth-child(7) { width: 9.1%; }
.readiness-table th:nth-child(8) { width: 8.2%; }
.readiness-table th:nth-child(9) { width: 8.4%; }
.readiness-table th:nth-child(10) { width: 8.4%; }
.readiness-table th:nth-child(11) { width: 18.8%; }

.table-primary {
  display: block;
  color: var(--text);
  font-weight: 700;
}

.table-secondary,
.evidence-boundary {
  display: block;
  margin-top: 4px;
  color: var(--quiet);
  font-size: 9px;
}

.evidence-boundary {
  padding-top: 5px;
  border-top: 1px solid var(--line);
}

.state-badge,
.priority-badge {
  display: inline-block;
  max-width: 100%;
  padding: 3px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  font-size: 9px;
  font-weight: 760;
  line-height: 1.25;
}

.priority-p0,
.state-danger {
  border-color: rgb(239 127 114 / 0.6);
  color: #ffaaa0;
  background: var(--danger-soft);
}

.priority-p1,
.state-warning {
  border-color: rgb(240 179 93 / 0.55);
  color: #ffd08a;
  background: var(--warning-soft);
}

.priority-p2,
.state-info {
  border-color: rgb(147 184 215 / 0.5);
  color: #b8d4eb;
  background: var(--info-soft);
}

.priority-p3,
.state-success {
  border-color: rgb(143 197 156 / 0.48);
  color: #b3ddb9;
  background: var(--success-soft);
}

.state-unknown {
  color: var(--muted);
  background: var(--panel-soft);
}

.empty-row td,
.empty-copy {
  color: var(--quiet);
  text-align: center;
}

.empty-row td {
  padding: 38px 20px;
}

.panel-heading {
  margin-bottom: 18px;
}

.panel-heading h3,
.handoff-toolbar h3,
.test-layout h3 {
  margin-bottom: 4px;
  font-size: 19px;
}

.panel-heading p,
.handoff-toolbar p,
.test-layout > section > p {
  max-width: 780px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 11px;
}

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

.finding-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--panel-soft);
}

.finding-card header,
.owner-row header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.finding-card h4,
.owner-row h4 {
  margin: 0;
  color: var(--text);
  font-size: 12px;
}

.finding-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 14px;
  margin: 0;
}

.finding-card dt {
  color: var(--quiet);
  font-size: 9px;
}

.finding-card dd {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.finding-card footer {
  width: auto;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--accent-strong);
  font-size: 10px;
}

.coverage-layout,
.test-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.coverage-layout h4 {
  margin-bottom: 10px;
  color: var(--text);
  font-size: 13px;
}

.finding-stack,
.owner-list,
.command-list {
  display: grid;
  gap: 8px;
}

.stack-row,
.owner-row,
.command-list > div {
  padding: 11px 12px;
  border-left: 2px solid var(--line-strong);
  background: var(--panel-soft);
}

.stack-row strong,
.stack-row span,
.command-list strong,
.command-list span {
  display: block;
}

.stack-row strong,
.command-list strong {
  color: var(--text);
  font-size: 11px;
}

.stack-row span,
.command-list span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.owner-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.55fr) repeat(3, minmax(130px, 0.75fr)) minmax(240px, 1.2fr);
  gap: 14px;
  align-items: start;
}

.owner-row header {
  display: block;
  margin: 0;
}

.owner-row div span {
  display: block;
  color: var(--quiet);
  font-size: 9px;
}

.owner-row div strong {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.test-layout > section {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--panel-soft);
}

.checklist {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  counter-reset: readiness;
  list-style: none;
}

.checklist li {
  position: relative;
  min-height: 28px;
  padding-left: 38px;
  color: var(--muted);
  font-size: 10px;
}

.checklist li::before {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid var(--accent);
  border-radius: 7px;
  color: var(--accent-strong);
  counter-increment: readiness;
  content: counter(readiness);
  font: 700 9px/1 "SFMono-Regular", Consolas, monospace;
}

.command-list {
  margin-top: 14px;
}

.handoff-toolbar,
.artifact-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.handoff-toolbar {
  margin-bottom: 16px;
}

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

.artifact-panel {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--panel-soft);
}

.artifact-wide {
  grid-column: 1 / -1;
}

.artifact-heading {
  margin-bottom: 9px;
}

.artifact-heading h4 {
  margin: 0;
  font-size: 12px;
}

.artifact-panel textarea {
  min-height: 185px;
  resize: vertical;
  background: #0d100f;
}

.artifact-wide textarea {
  min-height: 145px;
}

.copy-feedback {
  min-height: 18px;
  margin: 12px 0 0;
  color: var(--success);
  font-size: 10px;
}

.caveat-band {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) minmax(0, 1.6fr);
  gap: 36px;
  margin: 0 clamp(16px, 3vw, 48px) 36px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.caveat-band h2 {
  margin-bottom: 5px;
  font-size: 22px;
}

.caveat-band p,
.caveat-band li {
  color: var(--muted);
  font-size: 11px;
}

.caveat-band p {
  margin-bottom: 0;
}

.caveat-band ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
  margin: 0;
  padding-left: 18px;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px clamp(16px, 3vw, 48px) 34px;
  border-top: 1px solid var(--line);
  color: var(--quiet);
  font-size: 10px;
}

footer p {
  margin: 0;
}

footer a {
  color: var(--accent-strong);
  text-decoration: none;
}

@media (max-width: 1120px) {
  .deadline-rail {
    grid-template-columns: 1fr 2.2fr;
  }

  .deadline-rail > p {
    display: none;
  }

  .workbench-heading {
    align-items: flex-start;
  }

  .readiness-form {
    grid-template-columns: minmax(0, 1.55fr) minmax(290px, 0.75fr);
  }

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

  .owner-row > div:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 840px) {
  .app-bar nav a:first-child,
  .app-bar nav a:nth-child(2) {
    display: none;
  }

  .deadline-rail {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .deadline-intro {
    display: none;
  }

  .workbench-heading,
  .output-heading {
    align-items: flex-start;
  }

  .local-boundary {
    min-width: 230px;
  }

  .readiness-form {
    grid-template-columns: 1fr;
  }

  .control-panel {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

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

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

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

  .metric-strip div:nth-child(2),
  .metric-strip div:nth-child(4) {
    border-right: 0;
  }

  .metric-strip div:nth-child(-n + 4) {
    border-bottom: 1px solid var(--line);
  }

  .finding-grid,
  .coverage-layout,
  .test-layout,
  .artifact-grid,
  .caveat-band {
    grid-template-columns: 1fr;
  }

  .artifact-wide {
    grid-column: auto;
  }

  .caveat-band ul {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  html {
    scroll-padding-top: 58px;
  }

  .app-bar {
    min-height: 54px;
    padding: 7px 12px;
  }

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

  .brand-lockup small {
    display: none;
  }

  .app-bar nav a {
    font-size: 10px;
  }

  .deadline-rail {
    padding: 8px 12px;
  }

  .deadline-list div {
    padding: 7px 8px;
  }

  .deadline-list dt {
    font-size: 8px;
  }

  .deadline-list dd {
    display: block;
  }

  .deadline-list dd strong,
  .deadline-list dd span {
    display: block;
    text-align: left;
  }

  .deadline-list dd strong {
    font-size: 13px;
  }

  .deadline-list dd span {
    margin-top: 1px;
    font-size: 8px;
  }

  .workbench {
    padding: 15px 12px 12px;
  }

  .workbench-heading {
    display: block;
    margin-bottom: 10px;
  }

  .eyebrow {
    margin-bottom: 3px;
    font-size: 8px;
  }

  h1 {
    margin-bottom: 4px;
    font-size: 29px;
  }

  .workbench-heading > div > p:last-child {
    font-size: 10px;
    line-height: 1.35;
  }

  .local-boundary {
    display: none;
  }

  .evidence-panel,
  .control-panel {
    padding: 11px;
  }

  .field-heading {
    align-items: center;
    margin-bottom: 7px;
  }

  .field-heading label {
    margin-bottom: 0;
    font-size: 11px;
  }

  .field-heading p {
    display: none;
  }

  .field-tools {
    gap: 5px;
  }

  .secondary-button,
  .quiet-button,
  .copy-button {
    min-height: 30px;
    padding: 5px 8px;
    font-size: 9px;
  }

  textarea {
    min-height: 132px;
    padding: 10px;
    font-size: 10px;
    line-height: 1.35;
  }

  .input-meta {
    display: block;
    min-height: 28px;
    padding-top: 5px;
    font-size: 8px;
  }

  .input-meta span {
    display: block;
  }

  .input-meta span:last-child {
    margin-top: 2px;
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .control-panel {
    gap: 8px;
  }

  .control-panel > div:first-child {
    display: none;
  }

  .segmented-control {
    gap: 5px;
  }

  .segmented-control span {
    display: grid;
    min-height: 39px;
    place-items: center;
    padding: 5px;
    font-size: 8px;
    line-height: 1.2;
    text-align: center;
  }

  .control-note {
    padding: 7px 9px;
  }

  .control-note strong {
    margin: 0;
    font-size: 9px;
  }

  .control-note p {
    display: none;
  }

  .primary-button {
    min-height: 42px;
    padding: 9px 12px;
    font-size: 12px;
  }

  .form-message {
    min-height: 22px;
    font-size: 8px;
  }

  .privacy-strip {
    margin: 0 12px 18px;
  }

  .privacy-strip span {
    padding: 7px;
    font-size: 8px;
  }

  .output-shell,
  .caveat-band {
    margin-right: 12px;
    margin-left: 12px;
  }

  .output-heading {
    display: block;
    padding: 14px;
  }

  .output-heading h2 {
    font-size: 25px;
  }

  .output-heading > div > p:last-child {
    font-size: 10px;
  }

  .result-state {
    min-width: 0;
    margin-top: 10px;
    text-align: left;
  }

  .metric-strip div {
    padding: 9px 12px;
  }

  .metric-strip dd {
    font-size: 18px;
  }

  .tab-list {
    padding: 7px;
  }

  .tab-button {
    padding: 7px 9px;
    font-size: 9px;
  }

  .tab-panel {
    padding: 13px;
  }

  #panel-matrix {
    padding: 0;
  }

  .table-scroll {
    overflow: visible;
  }

  .readiness-table,
  .readiness-table tbody,
  .readiness-table tr,
  .readiness-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .readiness-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .readiness-table tbody {
    padding: 8px;
  }

  .readiness-table tbody tr {
    margin-bottom: 8px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    background: var(--panel-soft);
  }

  .readiness-table tbody tr:last-child {
    margin-bottom: 0;
  }

  .readiness-table td {
    display: grid;
    grid-template-columns: 105px minmax(0, 1fr);
    gap: 10px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
    font-size: 9px;
  }

  .readiness-table td:last-child {
    border-bottom: 0;
  }

  .readiness-table td::before {
    color: var(--quiet);
    content: attr(data-label);
    font: 700 8px/1.35 "SFMono-Regular", Consolas, monospace;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .readiness-table .empty-row td {
    display: block;
    padding: 26px 14px;
  }

  .readiness-table .empty-row td::before {
    content: none;
  }

  .finding-grid,
  .coverage-layout,
  .test-layout,
  .artifact-grid {
    gap: 8px;
  }

  .finding-card dl {
    grid-template-columns: 1fr;
  }

  .owner-row {
    grid-template-columns: 1fr;
  }

  .owner-row > div:last-child {
    grid-column: auto;
  }

  .handoff-toolbar {
    display: block;
  }

  .handoff-toolbar button {
    margin-top: 9px;
  }

  .artifact-panel textarea {
    min-height: 160px;
  }

  .caveat-band {
    gap: 16px;
    padding: 16px;
  }

  .caveat-band h2 {
    font-size: 19px;
  }

  footer {
    display: block;
    padding: 18px 12px 28px;
  }

  footer a {
    display: inline-block;
    margin-top: 8px;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
