:root {
  color-scheme: light;
  --page: #edf3f4;
  --page-accent: #dfeaec;
  --surface: #ffffff;
  --surface-soft: #f6f9f9;
  --surface-tint: #edf7f6;
  --ink: #172d38;
  --ink-strong: #0a202b;
  --muted: #60727b;
  --muted-dark: #465b65;
  --border: #d7e1e4;
  --border-strong: #bbcbd0;
  --navy: #0d2b38;
  --navy-deep: #071e29;
  --teal: #006b73;
  --teal-dark: #00545b;
  --teal-soft: #dcefee;
  --gold: #f0b94c;
  --focus: #f2b53b;
  --danger: #a23c36;
  --source-brd: #e8f0ff;
  --source-brd-ink: #274b83;
  --source-sdd: #e5f5ee;
  --source-sdd-ink: #27654c;
  --source-irar: #f5eafa;
  --source-irar-ink: #75478a;
  --shadow-sm: 0 1px 2px rgb(7 30 41 / 6%), 0 6px 20px rgb(7 30 41 / 4%);
  --shadow-lg: 0 18px 50px rgb(7 30 41 / 9%);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --sidebar-width: 284px;
  font-family: Inter, Aptos, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 78% 2%, rgb(141 196 194 / 18%), transparent 26rem),
    var(--page);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
}

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

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

a {
  color: var(--teal-dark);
}

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

h1,
h2,
h3,
h4 {
  color: var(--ink-strong);
  line-height: 1.18;
  letter-spacing: -0.025em;
}

h1 {
  max-width: 760px;
  margin-bottom: 16px;
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 720;
}

h2 {
  margin-bottom: 8px;
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  font-weight: 720;
}

h3 {
  margin-bottom: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

h4 {
  margin-bottom: 12px;
  font-size: 0.95rem;
  font-weight: 700;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  color: var(--ink-strong);
  font-weight: 700;
  transform: translateY(-160%);
}

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

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
  padding: 28px 22px 24px;
  background:
    linear-gradient(160deg, rgb(255 255 255 / 4%), transparent 42%),
    var(--navy);
  color: #e9f2f4;
  scrollbar-width: thin;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 13px;
  background: rgb(255 255 255 / 9%);
  color: var(--gold);
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.brand strong,
.brand-kicker {
  display: block;
}

.brand strong {
  color: #ffffff;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.brand-kicker {
  margin-bottom: 1px;
  color: #9fb5bd;
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.record-card {
  display: grid;
  gap: 3px;
  margin-bottom: 22px;
  padding: 15px 16px;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: var(--radius-md);
  background: rgb(255 255 255 / 6%);
}

.record-label,
.record-meta {
  color: #a9bdc4;
  font-size: 0.75rem;
}

.record-card strong {
  overflow: hidden;
  color: #ffffff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.step-nav {
  position: relative;
  display: grid;
  gap: 3px;
}

.step-nav::before {
  position: absolute;
  top: 22px;
  bottom: 22px;
  left: 20px;
  width: 1px;
  background: rgb(255 255 255 / 12%);
  content: "";
}

.step-nav a {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 55px;
  padding: 8px 8px;
  border-radius: 10px;
  color: #dce8eb;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease;
}

.step-nav a:hover,
.step-nav a:focus-visible {
  background: rgb(255 255 255 / 8%);
  color: #ffffff;
}

.step-number {
  position: relative;
  z-index: 1;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: 50%;
  background: var(--navy);
  color: #9eb5bd;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.step-nav strong,
.step-nav small {
  display: block;
}

.step-nav strong {
  color: inherit;
  font-size: 0.83rem;
  line-height: 1.25;
}

.step-nav small {
  margin-top: 2px;
  color: #91aab3;
  font-size: 0.7rem;
  line-height: 1.2;
}

.source-legend {
  display: grid;
  gap: 8px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgb(255 255 255 / 10%);
  color: #94abb3;
  font-size: 0.71rem;
}

.source-legend-title {
  font-weight: 700;
}

.source-filter-group {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.source-filter {
  min-height: 30px;
  padding: 4px 6px;
  border: 1px solid rgb(255 255 255 / 13%);
  border-radius: 5px;
  background: rgb(255 255 255 / 4%);
  color: #dce8eb;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.source-filter:hover {
  border-color: rgb(255 255 255 / 28%);
  background: rgb(255 255 255 / 10%);
  color: #ffffff;
}

.source-filter[aria-pressed="true"],
.source-filter[aria-pressed="true"]:hover {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--navy-deep);
}

.source-filter-status {
  color: #91aab3;
  font-size: 0.67rem;
}

body[data-source-filter="brd"] .source-chips span:not(.source-brd),
body[data-source-filter="sdd"] .source-chips span:not(.source-sdd),
body[data-source-filter="irar"] .source-chips span:not(.source-irar) {
  opacity: 0.28;
}

.workspace {
  min-width: 0;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px clamp(22px, 4vw, 52px);
  border-bottom: 1px solid rgb(187 203 208 / 75%);
  background: rgb(247 250 250 / 90%);
  backdrop-filter: blur(14px);
}

.breadcrumb,
.prototype-note {
  display: block;
}

.breadcrumb {
  color: var(--ink-strong);
  font-size: 0.84rem;
  font-weight: 700;
}

.prototype-note {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.73rem;
}

.topbar-actions,
.screen-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

main {
  width: min(1180px, calc(100% - 44px));
  margin: 0 auto;
  padding: clamp(36px, 6vw, 72px) 0 90px;
}

.page-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  align-items: end;
  gap: clamp(28px, 5vw, 72px);
  margin: 0 auto clamp(38px, 6vw, 64px);
}

.page-intro p {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted-dark);
  font-size: 1.03rem;
}

.eyebrow,
.section-index,
.panel-kicker {
  display: block;
  color: var(--teal);
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow {
  margin-bottom: 12px;
}

.document-set {
  display: grid;
  gap: 8px;
  padding: 17px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgb(255 255 255 / 58%);
  box-shadow: var(--shadow-sm);
  color: var(--muted-dark);
  font-size: 0.79rem;
}

.document-set span {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  align-items: center;
}

.document-set b {
  color: var(--ink-strong);
  font-size: 0.71rem;
  letter-spacing: 0.06em;
}

.build-note {
  margin: -30px 0 32px;
  padding: 11px 14px;
  border: 1px solid #c8dddc;
  border-radius: 9px;
  background: rgb(237 247 246 / 72%);
  color: var(--muted-dark);
  font-size: 0.78rem;
}

.build-note strong {
  color: var(--teal-dark);
}

.readiness-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 310px);
  align-items: center;
  gap: 30px;
  margin-bottom: 32px;
  padding: 22px 24px;
  border-radius: var(--radius-md);
  background: var(--navy);
  box-shadow: var(--shadow-sm);
  color: #c8d8dd;
}

.readiness-overview .eyebrow {
  margin-bottom: 5px;
  color: var(--gold);
}

.readiness-overview h2 {
  margin-bottom: 5px;
  color: #ffffff;
  font-size: 1.35rem;
}

.readiness-overview p {
  max-width: 720px;
  margin-bottom: 0;
  font-size: 0.8rem;
}

.readiness-progress {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 7px 10px;
}

.readiness-progress > span {
  color: #ffffff;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  text-align: right;
}

.readiness-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(255 255 255 / 13%);
}

.readiness-track > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--gold);
  transition: width 220ms ease;
}

.readiness-progress small {
  grid-column: 1 / -1;
  color: #9eb4bc;
  font-size: 0.68rem;
  text-align: right;
}

.readiness-details {
  grid-column: 1 / -1;
  padding-top: 13px;
  border-top: 1px solid rgb(255 255 255 / 14%);
}

.readiness-details summary {
  width: fit-content;
  color: #ffffff;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 750;
}

.readiness-details summary:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.readiness-details summary:focus-visible {
  border-radius: 3px;
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

.readiness-details ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 13px 0 0;
  padding: 0;
  list-style: none;
}

.readiness-details li {
  padding: 11px 12px;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 8px;
  background: rgb(255 255 255 / 6%);
}

.readiness-details a {
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 750;
}

.readiness-details li > span {
  display: block;
  margin-top: 3px;
  color: #b8cbd1;
  font-size: 0.7rem;
  line-height: 1.45;
}

.readiness-details .readiness-complete-message {
  grid-column: 1 / -1;
  color: #d8f4e7;
  font-size: 0.76rem;
}

body.is-review-ready .readiness-overview {
  background: #174b3b;
}

body.is-review-ready .readiness-track > span {
  background: #8dd9b8;
}

.record-form {
  display: grid;
  gap: 40px;
}

.screen {
  scroll-margin-top: 96px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgb(215 225 228 / 90%);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.screen:target {
  box-shadow: 0 0 0 3px rgb(0 107 115 / 13%), var(--shadow-lg);
}

.screen-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.screen-heading > div:first-child {
  flex: 1 1 520px;
}

.screen-heading p {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
}

.section-index {
  margin-bottom: 8px;
}

.source-chips {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.source-chips span {
  padding: 4px 7px;
  border-radius: 6px;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.area-status {
  display: inline-flex;
  min-height: 27px;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted-dark);
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.area-status::before,
.step-state::before {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #91a2a9;
  content: "";
}

.area-status[data-state="in-progress"] {
  background: #fff5db;
  color: #795600;
}

.area-status[data-state="in-progress"]::before,
.step-state[data-state="in-progress"]::before {
  background: #d49a1a;
}

.area-status[data-state="complete"] {
  background: #e5f5ec;
  color: #246344;
}

.area-status[data-state="complete"]::before,
.step-state[data-state="complete"]::before {
  background: #3a9a69;
}

.step-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 5px;
  color: #9eb3ba;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.2;
}

.step-state[data-state="in-progress"] {
  color: #edc36e;
}

.step-state[data-state="complete"] {
  color: #93d5b6;
}

.source-brd {
  background: var(--source-brd);
  color: var(--source-brd-ink);
}

.source-sdd {
  background: var(--source-sdd);
  color: var(--source-sdd-ink);
}

.source-irar {
  background: var(--source-irar);
  color: var(--source-irar-ink);
}

.callout {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 22px;
  padding: 16px 18px;
  border-left: 4px solid var(--teal);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--surface-tint);
}

.callout strong {
  color: var(--teal-dark);
}

.callout p {
  margin: 0;
  color: var(--muted-dark);
}

.panel {
  margin-bottom: 18px;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.panel:last-of-type {
  margin-bottom: 0;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.panel-kicker {
  margin-bottom: 5px;
  font-size: 0.61rem;
}

.completion-label {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.panel-intro {
  max-width: 800px;
  margin: -8px 0 20px;
  color: var(--muted);
  font-size: 0.86rem;
}

.field-grid,
.nfr-grid,
.register-grid,
.split-tables,
.impact-grid {
  display: grid;
  gap: 20px;
}

.columns-2,
.nfr-grid,
.register-grid,
.split-tables {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.span-2 {
  grid-column: span 2;
}

.span-3 {
  grid-column: span 3;
}

.field,
.prompt-field {
  min-width: 0;
}

.field label,
.prompt-field label,
.choice-field legend,
.coverage-fieldset legend,
.decision-options legend {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-strong);
  font-size: 0.8rem;
  font-weight: 700;
}

.required {
  margin-left: 4px;
  color: var(--danger);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="number"],
input[type="file"],
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink-strong);
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="number"],
select {
  padding: 9px 11px;
}

textarea {
  min-height: 92px;
  padding: 10px 11px;
  line-height: 1.45;
  resize: vertical;
}

input[type="file"] {
  padding: 7px;
  color: var(--muted-dark);
  font-size: 0.8rem;
}

input[type="file"]::file-selector-button {
  margin-right: 10px;
  padding: 7px 10px;
  border: 0;
  border-radius: 6px;
  background: var(--surface-tint);
  color: var(--teal-dark);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

input::placeholder,
textarea::placeholder {
  color: #83939a;
  opacity: 1;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #92a9b0;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgb(0 107 115 / 10%);
}

.hint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.choice-field,
.coverage-fieldset,
.decision-options {
  margin: 0;
  padding: 0;
  border: 0;
}

.inline-choices {
  display: flex;
  min-height: 44px;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 8px 11px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.inline-choices label,
.check-grid label,
.readiness-list label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted-dark);
  font-size: 0.79rem;
  cursor: pointer;
}

input[type="checkbox"],
input[type="radio"] {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin: 2px 0 0;
  accent-color: var(--teal);
}

.subsection + .subsection {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.panel-fields {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.nfr-grid {
  gap: 14px;
}

.prompt-field {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-soft);
}

.prompt-field textarea {
  background: var(--surface);
}

.register-grid {
  align-items: start;
}

.compact-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 8px;
}

.compact-row + .compact-row {
  margin-top: 8px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  border-spacing: 0;
}

.table-wide table {
  min-width: 900px;
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--surface-soft);
  color: var(--muted-dark);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

td {
  min-width: 120px;
}

th:first-child,
td:first-child {
  padding-left: 14px;
}

th:last-child,
td:last-child {
  padding-right: 14px;
}

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

.table-actions {
  width: 92px;
  min-width: 92px;
  text-align: right;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
}

.requirements-count {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.button-remove {
  min-height: 36px;
  padding: 7px 10px;
  border-color: #dab9b6;
  background: #fffafa;
  color: var(--danger);
  font-size: 0.72rem;
}

.button-remove:hover {
  border-color: var(--danger);
  background: #fff2f1;
}

td input[type="text"],
td input[type="date"],
td select,
td textarea {
  min-height: 38px;
  padding: 7px 8px;
  border-color: #c7d4d8;
  border-radius: 6px;
  font-size: 0.78rem;
}

td textarea {
  min-height: 54px;
}

.coverage-fieldset {
  margin-bottom: 20px;
  padding: 15px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
}

.coverage-fieldset legend {
  float: left;
  width: 100%;
  margin-bottom: 12px;
}

.coverage-fieldset::after {
  display: block;
  clear: both;
  content: "";
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 16px;
  clear: both;
}

.check-grid-wide {
  grid-template-columns: repeat(4, minmax(130px, 1fr));
}

.impact-grid {
  align-items: stretch;
}

.impact-card {
  position: relative;
  min-width: 0;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
}

.impact-letter {
  position: absolute;
  top: -20px;
  right: 8px;
  color: rgb(0 107 115 / 7%);
  font-size: 6rem;
  font-weight: 850;
  line-height: 1;
}

.impact-card .field {
  position: relative;
}

.impact-card .field + .field {
  margin-top: 14px;
}

.decision-panel,
.review-panel {
  border-color: #a9cecb;
  background: linear-gradient(180deg, var(--surface-tint), var(--surface));
}

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

.decision-options legend {
  grid-column: 1 / -1;
}

.decision-options > label {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 10px;
  padding: 15px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}

.decision-options span,
.decision-options strong,
.decision-options small {
  display: block;
}

.decision-options strong {
  color: var(--ink-strong);
  font-size: 0.82rem;
}

.decision-options small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.readiness-list {
  display: grid;
  gap: 10px;
}

.readiness-list label {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
}

.reference-link {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.79rem;
}

.reference-link a,
.text-link {
  color: var(--teal-dark);
  font-weight: 700;
  text-underline-offset: 3px;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 0.79rem;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, transform 140ms ease;
}

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

.button-primary {
  border-color: var(--teal);
  background: var(--teal);
  color: #ffffff;
}

.button-primary:hover {
  border-color: var(--teal-dark);
  background: var(--teal-dark);
}

.button-secondary {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--ink-strong);
}

.button-secondary:hover {
  border-color: #91a7ad;
  background: var(--surface-soft);
}

.button:disabled,
.button:disabled:hover {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
}

.screen-actions {
  justify-content: space-between;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.completion-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 22px;
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--navy);
  color: #c7d8dd;
}

.completion-banner .eyebrow {
  margin-bottom: 6px;
  color: var(--gold);
}

.completion-banner h3 {
  margin-bottom: 5px;
  color: #ffffff;
  font-size: 1.2rem;
}

.completion-banner p {
  max-width: 680px;
  margin-bottom: 0;
  font-size: 0.82rem;
}

.completion-banner .button {
  flex: 0 0 auto;
  border-color: var(--gold);
  background: var(--gold);
  color: var(--navy-deep);
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    z-index: 1;
    height: auto;
    padding: 18px 22px 16px;
  }

  .brand {
    margin-bottom: 14px;
  }

  .record-card {
    display: none;
  }

  .source-legend {
    grid-template-columns: auto minmax(210px, 280px) minmax(140px, 1fr);
    align-items: center;
    margin-top: 13px;
    padding-top: 13px;
  }

  .step-nav {
    display: flex;
    gap: 7px;
    padding-bottom: 3px;
    overflow-x: auto;
  }

  .step-nav::before,
  .step-nav small {
    display: none;
  }

  .step-nav a {
    grid-template-columns: 28px auto;
    min-width: max-content;
    min-height: 42px;
    padding: 5px 10px 5px 6px;
    border: 1px solid rgb(255 255 255 / 10%);
  }

  .step-number {
    width: 27px;
    height: 27px;
  }

  .topbar {
    top: 0;
  }
}

@media (max-width: 820px) {
  .page-intro,
  .readiness-overview,
  .columns-3,
  .impact-grid,
  .decision-options {
    grid-template-columns: 1fr;
  }

  .page-intro {
    align-items: start;
  }

  .document-set {
    max-width: 420px;
  }

  .readiness-progress {
    max-width: 420px;
  }

  .readiness-progress small {
    text-align: left;
  }

  .span-3 {
    grid-column: auto;
  }

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

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

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

  .sidebar {
    padding-inline: 16px;
  }

  .source-legend {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .topbar {
    position: relative;
    align-items: flex-start;
    padding: 12px 16px;
  }

  .topbar-actions .button-secondary {
    display: none;
  }

  main {
    width: calc(100% - 24px);
    padding-top: 32px;
  }

  .screen {
    padding: 20px 16px;
    border-radius: 16px;
  }

  .screen-heading,
  .panel-heading,
  .completion-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .screen-heading .source-chips,
  .panel-heading .source-chips {
    justify-content: flex-start;
  }

  .panel {
    padding: 18px 14px;
  }

  .columns-2,
  .nfr-grid,
  .register-grid,
  .split-tables {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

  .callout {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .screen-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .table-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .table-toolbar .button {
    width: 100%;
  }

  .screen-actions .button {
    width: 100%;
  }

  .completion-banner .button {
    width: 100%;
  }
}

@media (max-width: 440px) {
  .topbar-actions .button {
    min-height: 38px;
    padding-inline: 10px;
  }

  .prototype-note {
    display: none;
  }

  .check-grid,
  .check-grid-wide {
    grid-template-columns: 1fr;
  }

  .compact-row {
    grid-template-columns: 80px minmax(0, 1fr);
  }
}

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

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

@media print {
  body {
    background: #ffffff;
  }

  .app-shell {
    display: block;
  }

  .sidebar,
  .topbar,
  .screen-actions,
  .topbar-actions,
  .completion-banner .button {
    display: none !important;
  }

  main {
    width: 100%;
    padding: 0;
  }

  .page-intro {
    margin-bottom: 24px;
  }

  .record-form {
    gap: 20px;
  }

  .screen {
    break-before: page;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .screen:first-child {
    break-before: auto;
  }

  .panel {
    break-inside: avoid;
    box-shadow: none;
  }
}
