.insurance-evidence-page #main .production-shell h1 {
  max-width: none;
  font-size: clamp(1.65rem, 1.4rem + 1vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -.035em;
}

.insurance-evidence-page #main .production-shell h2 {
  font-size: clamp(1.15rem, 1.06rem + .35vw, 1.4rem);
  letter-spacing: -.02em;
  margin: 0 0 .6rem;
}

.insurance-evidence-page #main .production-shell h3 {
  margin: 1.35rem 0 .5rem;
  font-size: .92rem;
}

.production-shell {
  color: #18202b;
}

html[data-theme="dark"] .production-shell {
  color: #eaf2ff;
}

.production-shell p {
  max-width: 72ch;
}

.app-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0 0 1.5rem;
  border-bottom: 1px solid #bbc5ce;
}

html[data-theme="dark"] .app-header {
  border-color: #465363;
}

.kicker {
  margin: 0 0 .55rem;
  color: #1f68d8;
  font: 700 .75rem/1.4 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: .11em;
  text-transform: uppercase;
}

html[data-theme="dark"] .kicker {
  color: #7bb2ff;
}

.subhead,
.section-head p,
.work-card > p,
.boundary-card > p,
.auth-card p {
  color: #536273;
}

html[data-theme="dark"] .subhead,
html[data-theme="dark"] .section-head p,
html[data-theme="dark"] .work-card > p,
html[data-theme="dark"] .boundary-card > p,
html[data-theme="dark"] .auth-card p {
  color: #a9b7c8;
}

.role-block {
  display: grid;
  grid-template-columns: .65rem minmax(7.5rem, 1fr) auto;
  align-items: center;
  gap: .7rem;
  min-width: 15rem;
  padding: .8rem .9rem;
  border: 1px solid #bbc5ce;
  background: #f7f9fa;
}

html[data-theme="dark"] .role-block {
  border-color: #465363;
  background: #242c36;
}

.role-block small,
.role-block strong {
  display: block;
}

.role-block small {
  color: #536273;
  font-size: .75rem;
}

html[data-theme="dark"] .role-block small {
  color: #a9b7c8;
}

.status-dot {
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: #167047;
}

.app-layout {
  display: grid;
  grid-template-columns: minmax(12.5rem, .25fr) minmax(0, 1fr);
  gap: 1.5rem;
  padding-top: 1.5rem;
}

.app-sidebar {
  min-width: 0;
}

.app-sidebar nav {
  display: grid;
  border: 1px solid #bbc5ce;
  background: #f7f9fa;
}

html[data-theme="dark"] .app-sidebar nav {
  border-color: #465363;
  background: #242c36;
}

.app-sidebar nav button {
  min-height: 46px;
  padding: .7rem .85rem;
  border: 0;
  border-bottom: 1px solid #d7dde3;
  background: transparent;
  text-align: left;
  font-size: .88rem;
  font-weight: 650;
}

html[data-theme="dark"] .app-sidebar nav button {
  border-color: #3a4654;
}

.app-sidebar nav button:last-child {
  border-bottom: 0;
}

.app-sidebar nav button.active {
  background: #e6effc;
  box-shadow: inset 3px 0 #1f68d8;
  color: #123f82;
}

html[data-theme="dark"] .app-sidebar nav button.active {
  background: #18324f;
  color: #dceaff;
}

.custody-card {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid #bbc5ce;
  background: #fff;
}

html[data-theme="dark"] .custody-card {
  border-color: #465363;
  background: #202832;
}

.custody-card h2 {
  font-size: .9rem !important;
}

.custody-card dl,
.detail-list {
  margin: 0;
}

.custody-card dl div,
.detail-list div {
  padding: .65rem 0;
  border-top: 1px solid #d7dde3;
}

html[data-theme="dark"] .custody-card dl div,
html[data-theme="dark"] .detail-list div {
  border-color: #3a4654;
}

.custody-card dt,
.detail-list dt {
  color: #536273;
  font-size: .74rem;
}

html[data-theme="dark"] .custody-card dt,
html[data-theme="dark"] .detail-list dt {
  color: #a9b7c8;
}

.custody-card dd,
.detail-list dd {
  margin: .15rem 0 0;
  overflow-wrap: anywhere;
  font-size: .8rem;
  font-weight: 650;
}

.app-content {
  min-width: 0;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.section-head.compact {
  margin-bottom: .5rem;
}

.section-head p {
  margin: .35rem 0 0;
}

.work-card,
.boundary-card,
.result-card,
.empty-card,
.auth-card {
  border: 1px solid #bbc5ce;
  background: #f7f9fa;
  padding: 1.25rem;
}

html[data-theme="dark"] .work-card,
html[data-theme="dark"] .boundary-card,
html[data-theme="dark"] .result-card,
html[data-theme="dark"] .empty-card,
html[data-theme="dark"] .auth-card {
  border-color: #465363;
  background: #242c36;
}

.work-card + .work-card,
.work-card + .boundary-card,
.result-card + .work-card,
.result-card + .two-column,
.two-column + .work-card,
.portfolio-metrics + .work-card,
.portfolio-metrics + .two-column,
.two-column + .boundary-card {
  margin-top: 1rem;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(18rem, .75fr);
  gap: 1rem;
}

.two-column > * {
  min-width: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem;
}

.production-shell label {
  display: grid;
  gap: .35rem;
  color: #354252;
  font-size: .82rem;
  font-weight: 700;
}

.auth-card label {
  display: grid;
  gap: .35rem;
  color: #354252;
  font-size: .82rem;
  font-weight: 700;
}

html[data-theme="dark"] .auth-card label {
  color: #d7e0ea;
}

.auth-card input,
.auth-card select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid #9ca9b6;
  border-radius: 2px;
  background: #fff;
  padding: .62rem .7rem;
}

html[data-theme="dark"] .auth-card input,
html[data-theme="dark"] .auth-card select {
  border-color: #66778a;
  background: #151c24;
  color: #eaf2ff;
}

html[data-theme="dark"] .production-shell label {
  color: #d7e0ea;
}

.production-shell input,
.production-shell select,
.production-shell textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid #9ca9b6;
  border-radius: 2px;
  background: #fff;
  padding: .62rem .7rem;
}

html[data-theme="dark"] .production-shell input,
html[data-theme="dark"] .production-shell select,
html[data-theme="dark"] .production-shell textarea {
  border-color: #66778a;
  background: #151c24;
  color: #eaf2ff;
}

.production-shell textarea {
  min-height: 7rem;
  resize: vertical;
}

.production-shell input:disabled,
.production-shell select:disabled {
  opacity: .65;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  align-items: center;
  margin-top: .4rem;
}

.production-shell .primary,
.production-shell .quiet,
.production-shell .danger {
  min-height: 44px;
  padding: .65rem .9rem;
  border: 1px solid transparent;
  border-radius: 2px;
  font-weight: 700;
}

.production-shell .primary {
  color: #fff;
  background: #1f68d8;
}

.production-shell .quiet {
  color: #18202b;
  border-color: #9ca9b6;
  background: #fff;
}

html[data-theme="dark"] .production-shell .quiet {
  color: #eaf2ff;
  border-color: #66778a;
  background: #202832;
}

.production-shell .danger {
  color: #fff;
  background: #a63832;
}

.production-shell button:disabled {
  opacity: .45;
}

.source-profile pre,
.work-card pre {
  max-height: 24rem;
  overflow: auto;
  padding: .85rem;
  background: #18202b;
  color: #f7f9fa;
  font: .75rem/1.55 "JetBrains Mono", ui-monospace, monospace;
  white-space: pre-wrap;
}

html[data-theme="dark"] .source-profile pre,
html[data-theme="dark"] .work-card pre {
  background: #10161d;
}

.source-profile ul,
.work-card ul {
  padding-left: 1.1rem;
}

.history-card ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.history-card li {
  display: grid;
  grid-template-columns: minmax(11rem, .35fr) 1fr;
  gap: 1rem;
  padding: .7rem 0;
  border-top: 1px solid #d7dde3;
  font-size: .82rem;
}

html[data-theme="dark"] .history-card li {
  border-color: #3a4654;
}

.history-card time,
code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  overflow-wrap: anywhere;
}

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .6rem;
}

.scenario-grid button {
  min-height: 88px;
  padding: .75rem;
  border: 1px solid #9ca9b6;
  background: #fff;
  text-align: left;
}

html[data-theme="dark"] .scenario-grid button {
  border-color: #66778a;
  background: #202832;
}

.scenario-grid button.selected {
  border-color: #1f68d8;
  background: #e6effc;
  box-shadow: inset 3px 0 #1f68d8;
}

html[data-theme="dark"] .scenario-grid button.selected {
  background: #18324f;
}

.scenario-grid strong,
.scenario-grid span {
  display: block;
}

.scenario-grid span {
  margin-top: .3rem;
  color: #536273;
  font-size: .76rem;
}

html[data-theme="dark"] .scenario-grid span {
  color: #a9b7c8;
}

.result-card {
  display: grid;
  grid-template-columns: minmax(14rem, .7fr) minmax(0, 1.3fr);
  gap: 1.25rem;
  background: #fff;
}

html[data-theme="dark"] .result-card {
  background: #202832;
}

.big-state {
  display: block;
  margin: .25rem 0 .65rem;
  font-size: clamp(1.35rem, 1.1rem + .8vw, 1.85rem);
  line-height: 1.2;
  text-transform: capitalize;
}

.big-state.satisfied,
.state.satisfied {
  color: #167047;
}

html[data-theme="dark"] .big-state.satisfied,
html[data-theme="dark"] .state.satisfied {
  color: #65dfad;
}

.big-state.not_satisfied,
.state.not_satisfied,
.big-state.indeterminate,
.state.indeterminate {
  color: #ad2921;
}

html[data-theme="dark"] .big-state.not_satisfied,
html[data-theme="dark"] .state.not_satisfied,
html[data-theme="dark"] .big-state.indeterminate,
html[data-theme="dark"] .state.indeterminate {
  color: #ffaaa5;
}

.state {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: .25rem .55rem;
  border: 1px solid currentColor;
  font: 700 .72rem/1.2 "JetBrains Mono", ui-monospace, monospace;
  text-transform: uppercase;
}

.state.missing {
  color: #854515;
}

html[data-theme="dark"] .state.missing {
  color: #ffc28c;
}

.metric-grid,
.portfolio-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid #bbc5ce;
}

html[data-theme="dark"] .metric-grid,
html[data-theme="dark"] .portfolio-metrics {
  border-color: #465363;
}

.metric-grid div,
.portfolio-metrics div {
  min-width: 0;
  padding: .8rem;
  border-right: 1px solid #d7dde3;
  border-bottom: 1px solid #d7dde3;
}

html[data-theme="dark"] .metric-grid div,
html[data-theme="dark"] .portfolio-metrics div {
  border-color: #3a4654;
}

.metric-grid div:nth-child(4n),
.portfolio-metrics div:last-child {
  border-right: 0;
}

.metric-grid span,
.portfolio-metrics span {
  display: block;
  color: #536273;
  font-size: .72rem;
}

html[data-theme="dark"] .metric-grid span,
html[data-theme="dark"] .portfolio-metrics span {
  color: #a9b7c8;
}

.metric-grid strong,
.portfolio-metrics strong {
  display: block;
  margin-top: .15rem;
  font-size: 1.15rem;
}

.separation-note {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: .8rem;
  border-top: 1px solid #d7dde3;
  color: #536273;
  font-size: .8rem;
}

html[data-theme="dark"] .separation-note {
  border-color: #3a4654;
  color: #a9b7c8;
}

.empty-card {
  text-align: left;
  padding: 2rem;
}

.inline-form {
  display: flex;
  align-items: end;
  gap: .75rem;
}

.inline-form label {
  flex: 1;
}

.auth-form {
  display: grid;
  align-items: stretch;
  gap: .75rem;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  margin-top: 1rem;
}

.production-shell table {
  min-width: 42rem;
}

.production-shell th,
.production-shell td {
  padding: .7rem .65rem;
  border-bottom: 1px solid #d7dde3;
  text-align: left;
  vertical-align: top;
  font-size: .8rem;
}

html[data-theme="dark"] .production-shell th,
html[data-theme="dark"] .production-shell td {
  border-color: #3a4654;
}

.production-shell th {
  color: #536273;
}

html[data-theme="dark"] .production-shell th {
  color: #a9b7c8;
}

.table-link {
  min-height: 36px !important;
  padding: 0;
  color: #1f68d8 !important;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
}

html[data-theme="dark"] .table-link {
  color: #7bb2ff !important;
}

.tag {
  margin-left: .5rem;
  color: #536273;
  font: 700 .68rem/1 "JetBrains Mono", ui-monospace, monospace;
  text-transform: uppercase;
}

.boundary-card {
  margin-top: 1rem;
  background: #fff;
}

html[data-theme="dark"] .boundary-card {
  background: #202832;
}

.path-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 1rem 0;
  border: 1px solid #bbc5ce;
  background: #bbc5ce;
}

html[data-theme="dark"] .path-list {
  border-color: #465363;
  background: #465363;
}

.path-list a {
  display: grid;
  min-height: 76px;
  align-content: center;
  padding: .8rem;
  background: #f7f9fa;
  text-decoration: none;
}

html[data-theme="dark"] .path-list a {
  background: #242c36;
}

.path-list span {
  color: #536273;
  font-size: .78rem;
}

html[data-theme="dark"] .path-list span {
  color: #a9b7c8;
}

.auth-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(18rem, .8fr);
  gap: 2rem;
  width: min(100%, 960px);
  margin: 4rem auto;
  padding: 1.75rem;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.sample-actions {
  margin-block: 1.25rem;
}

.sample-inputs,
.sample-preview .two-column + .work-card,
.sample-preview .work-card + .result-card,
.optional-generation {
  margin-top: 1rem;
}

.sample-preview details,
.optional-generation summary {
  margin-top: .75rem;
}

.sample-preview summary,
.optional-generation summary {
  min-height: 44px;
  padding-block: .65rem;
  font-weight: 700;
  cursor: pointer;
}

.optional-generation summary {
  margin-top: 0;
}

.sample-preview pre {
  overflow-wrap: anywhere;
}

.sample-preview .big-state.satisfied {
  color: #1f68d8;
}

html[data-theme="dark"] .sample-preview .big-state.satisfied {
  color: #7bb2ff;
}

.app-feedback {
  margin: 0 0 1rem;
  padding: .75rem .9rem;
  border: 1px solid currentColor;
  background: #fff;
  font-weight: 650;
}

html[data-theme="dark"] .app-feedback {
  background: #202832;
}

.app-feedback.good,
.check-result.good {
  color: #167047;
}

.app-feedback.bad,
.check-result.bad {
  color: #ad2921;
}

html[data-theme="dark"] .app-feedback.good,
html[data-theme="dark"] .check-result.good {
  color: #65dfad;
}

html[data-theme="dark"] .app-feedback.bad,
html[data-theme="dark"] .check-result.bad {
  color: #ffaaa5;
}

.check-result {
  margin-top: .8rem;
  font-weight: 700;
}

.file-label input {
  padding: .45rem;
}

.split-fields {
  display: grid;
  grid-template-columns: 1fr 8rem;
  gap: .7rem;
  margin-top: .7rem;
}

#challenge-form,
#correction-form,
#loss-form {
  display: grid;
  gap: .7rem;
  margin-top: .8rem;
}

.supporting-loss-panel {
  margin-top: 1rem;
}

.supporting-loss-record {
  padding: 1rem;
  border: 1px solid #d7dde3;
  background: #f7f9fb;
}

.supporting-loss-record + .supporting-loss-record {
  margin-top: .85rem;
}

.supporting-loss-record h3,
.supporting-loss-record h4 {
  margin: .2rem 0 .7rem;
}

.review-boundary-list {
  margin-top: .6rem;
}

html[data-theme="dark"] .supporting-loss-record {
  border-color: #3a4654;
  background: #18202a;
}

#correction-form {
  padding-top: 1rem;
  border-top: 1px solid #d7dde3;
}

html[data-theme="dark"] #correction-form {
  border-color: #3a4654;
}

.portfolio-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  background: #f7f9fa;
}

html[data-theme="dark"] .portfolio-metrics {
  background: #242c36;
}

@media (max-width: 920px) {
  .app-layout,
  .two-column,
  .auth-card {
    grid-template-columns: 1fr;
  }

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

  .app-sidebar nav button {
    border-right: 1px solid #d7dde3;
  }

  .custody-card {
    display: none;
  }

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

@media (max-width: 620px) {
  .app-header,
  .section-head,
  .inline-form {
    align-items: stretch;
    flex-direction: column;
  }

  .role-block {
    min-width: 0;
  }

  .app-sidebar nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid,
  .scenario-grid,
  .result-card,
  .path-list {
    grid-template-columns: 1fr;
  }

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

  .metric-grid div:nth-child(2n) {
    border-right: 0;
  }

  .history-card li {
    grid-template-columns: 1fr;
    gap: .25rem;
  }

  .production-shell .primary,
  .production-shell .quiet,
  .production-shell .danger,
  .auth-card .primary,
  .auth-card .quiet {
    width: 100%;
  }

  .auth-form label {
    width: 100%;
  }
}
.production-shell :is(button, a, input, select, textarea, summary):focus-visible,
.auth-card :is(button, a, input, select, textarea):focus-visible {
  outline: 3px solid #0b57b7;
  outline-offset: 3px;
}

html[data-theme="dark"] .production-shell :is(button, a, input, select, textarea, summary):focus-visible,
html[data-theme="dark"] .auth-card :is(button, a, input, select, textarea):focus-visible {
  outline-color: #9bc5ff;
}

/* Guided review in the sitewide evidence schema */
.guided-studio {
  color: #18202b;
}

.review-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid #bbc5ce;
}

.review-header h1 {
  max-width: 720px !important;
  font-size: clamp(2.15rem, 1.75rem + 1.5vw, 3.25rem) !important;
}

.review-header .subhead {
  max-width: 700px;
  margin-top: 12px;
  color: #536273;
}

.review-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.guided-review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: clamp(28px, 5vw, 58px);
  margin-top: 34px;
}

.review-sequence {
  min-width: 0;
}

.review-step {
  margin-bottom: 24px;
  padding: clamp(24px, 4vw, 38px);
  background: #ffffff;
  border: 1px solid #bbc5ce;
  scroll-margin-top: 116px;
}

.review-step h2 {
  max-width: 720px;
  font-size: clamp(1.65rem, 1.35rem + .85vw, 2.25rem) !important;
}

.step-count,
.review-question,
.review-label,
.rail-title,
.package-header,
.result-decision > p {
  color: #1f68d8;
  font: 700 .7rem/1.5 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.review-question {
  margin: 8px 0 6px !important;
  color: #536273;
}

.term-board {
  margin-top: 22px;
  background: #f7f9fa;
  border: 1px solid #bbc5ce;
}

.term-board dl,
.evidence-package dl,
.correction-flow dl,
.technical-facts {
  margin: 0;
}

.term-board dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.term-board dl div {
  min-height: 96px;
  padding: 18px;
  border-right: 1px solid #bbc5ce;
  border-bottom: 1px solid #bbc5ce;
}

.term-board dl div:nth-child(2n) {
  border-right: 0;
}

.term-board dl div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.term-board dt,
.evidence-package dt,
.correction-flow dt,
.technical-facts dt {
  color: #536273;
  font-size: .78rem;
}

.term-board dd {
  margin: 8px 0 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
}

.why-panel,
.source-explainer,
.important-boundary {
  display: grid;
  grid-template-columns: 122px minmax(0, 1fr);
  gap: 6px 22px;
  margin-top: 18px;
  padding: 18px;
  background: #f7f9fa;
  border: 1px solid #bbc5ce;
  border-left: 3px solid #2f80ff;
}

.why-panel p,
.important-boundary p {
  grid-row: 1 / span 2;
  color: #18202b;
  font-weight: 700;
}

.why-panel span,
.important-boundary span,
.source-explainer span {
  color: #536273;
}

.technical-disclosure {
  margin-top: 16px;
  border-top: 1px solid #bbc5ce;
  color: #536273;
}

.technical-disclosure summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  color: #18202b;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
}

.technical-disclosure summary::after {
  content: "+";
  margin-left: auto;
  color: #1f68d8;
  font: 400 1.2rem/1 "JetBrains Mono", ui-monospace, monospace;
}

.technical-disclosure[open] summary::after {
  content: "−";
}

.technical-disclosure pre {
  max-height: 380px;
  overflow: auto;
  padding: 16px;
  background: #111820;
  color: #e9eef2;
  border: 1px solid #2b3946;
}

.step-next {
  margin-top: 22px;
}

.headline-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 22px;
  border: 1px solid #bbc5ce;
  background: #f7f9fa;
}

.headline-metrics div {
  min-height: 130px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  border-right: 1px solid #bbc5ce;
}

.headline-metrics div:last-child {
  border-right: 0;
}

.headline-metrics strong {
  color: #18202b;
  font-size: clamp(1.9rem, 1.5rem + 1.5vw, 3rem);
  font-weight: 500;
  letter-spacing: -.04em;
}

.headline-metrics span {
  color: #536273;
  font-size: .8rem;
}

.source-explainer {
  grid-template-columns: 122px minmax(0, 1fr);
}

.source-explainer .review-label {
  grid-row: 1 / span 2;
}

.source-explainer strong {
  color: #18202b;
}

.result-decision {
  margin-top: 22px;
  padding: clamp(22px, 4vw, 34px);
  background: #f7f9fa;
  border: 1px solid #bbc5ce;
  border-top: 3px solid #34d399;
}

.result-decision > strong {
  display: block;
  margin: 8px 0 24px;
  color: #167047;
  font-size: clamp(1.85rem, 1.45rem + 1.7vw, 3.2rem);
  line-height: 1;
  letter-spacing: -.04em;
}

.result-comparison {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid #bbc5ce;
}

.result-comparison span {
  padding: 18px 18px 0 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.result-comparison small {
  display: block;
  color: #536273;
  font-size: .72rem;
  font-weight: 500;
}

.result-copy {
  margin-top: 16px !important;
  color: #536273;
}

.correction-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1fr);
  align-items: stretch;
  margin-top: 22px;
}

.correction-flow article {
  padding: 20px;
  background: #f7f9fa;
  border: 1px solid #bbc5ce;
}

.correction-flow dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-top: 1px solid #bbc5ce;
}

.correction-flow dd {
  margin: 0;
  text-align: right;
  font-weight: 700;
}

.correction-event {
  display: grid;
  place-items: center;
  align-content: center;
  padding: 18px;
  text-align: center;
  background: #e6effc;
  border-top: 1px solid #2f80ff;
  border-bottom: 1px solid #2f80ff;
}

.correction-event strong {
  color: #1f68d8;
}

.correction-event p {
  color: #536273;
  font-size: .8rem;
}

.preserved-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
  border: 1px solid #bbc5ce;
}

.preserved-list span {
  padding: 14px;
  border-right: 1px solid #bbc5ce;
  color: #536273;
  font-size: .8rem;
}

.preserved-list span:last-child {
  border-right: 0;
}

.evidence-package {
  margin-top: 22px;
  padding: clamp(22px, 4vw, 32px);
  background: #ffffff;
  border: 1px solid #bbc5ce;
  border-top: 3px solid #2f80ff;
}

.package-header {
  padding-bottom: 16px;
  border-bottom: 1px solid #bbc5ce;
}

.evidence-package dl div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid #bbc5ce;
}

.evidence-package dd {
  margin: 0;
  font-weight: 700;
}

.evidence-package .verified {
  color: #167047;
}

.signature-meaning {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
  border: 1px solid #bbc5ce;
}

.signature-meaning article {
  padding: 18px;
}

.signature-meaning article + article {
  border-left: 1px solid #bbc5ce;
}

.signature-meaning p,
.signature-meaning li {
  color: #536273;
}

.evidence-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.review-rail {
  position: sticky;
  top: 104px;
  align-self: start;
  padding: 20px;
  background: #ffffff;
  border: 1px solid #bbc5ce;
}

.rail-progress {
  display: grid;
  gap: 2px;
  margin-top: 14px;
}

.rail-progress a {
  display: block;
  padding: 8px 10px;
  color: #536273;
  border-left: 2px solid #bbc5ce;
  text-decoration: none;
  font-size: .82rem;
}

.rail-progress a.active {
  color: #18202b;
  border-left-color: #2f80ff;
  background: #e6effc;
  font-weight: 700;
}

.rail-card {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #bbc5ce;
}

.rail-card h3 {
  font-size: .84rem !important;
}

.rail-card ul {
  margin: 8px 0 0;
  padding-left: 16px;
  color: #536273;
  font-size: .76rem;
}

.mobile-review-progress {
  display: none;
}

.care-section,
.architecture-section,
.pilot-section,
.boundary-section {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid #bbc5ce;
}

.care-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid #bbc5ce;
  margin-top: 20px;
}

.care-grid article {
  padding: 22px;
  background: #ffffff;
  border-right: 1px solid #bbc5ce;
}

.care-grid article:last-child {
  border-right: 0;
}

.care-grid p,
.architecture-section > p,
.pilot-section > p,
.boundary-section > p {
  color: #536273;
}

.architecture-flow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 20px;
  border: 1px solid #bbc5ce;
}

.architecture-flow div {
  min-height: 104px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  padding: 14px;
  text-align: center;
  background: #ffffff;
  border-right: 1px solid #bbc5ce;
}

.architecture-flow div:last-child {
  border-right: 0;
}

.architecture-flow span {
  color: #1f68d8;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .72rem;
}

.pilot-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
  margin-bottom: 30px;
  padding: 28px;
  background: #ffffff;
  border: 1px solid #bbc5ce;
  border-top: 3px solid #2f80ff;
}

.pilot-section ul {
  columns: 2;
  margin: 16px 0 0;
  padding-left: 18px;
  color: #536273;
}

html[data-theme="dark"] .guided-studio {
  color: #f3f7f8;
}

html[data-theme="dark"] .review-header,
html[data-theme="dark"] .technical-disclosure,
html[data-theme="dark"] .care-section,
html[data-theme="dark"] .architecture-section,
html[data-theme="dark"] .pilot-section,
html[data-theme="dark"] .boundary-section {
  border-color: rgba(220, 227, 234, .22);
}

html[data-theme="dark"] .review-step,
html[data-theme="dark"] .review-rail,
html[data-theme="dark"] .evidence-package,
html[data-theme="dark"] .care-grid article,
html[data-theme="dark"] .architecture-flow div,
html[data-theme="dark"] .pilot-section {
  background: #111820;
  border-color: rgba(220, 227, 234, .22);
}

html[data-theme="dark"] .term-board,
html[data-theme="dark"] .headline-metrics,
html[data-theme="dark"] .result-decision,
html[data-theme="dark"] .correction-flow article,
html[data-theme="dark"] .why-panel,
html[data-theme="dark"] .source-explainer,
html[data-theme="dark"] .important-boundary {
  background: #151f29;
  border-color: rgba(220, 227, 234, .22);
}

html[data-theme="dark"] .review-header .subhead,
html[data-theme="dark"] .review-question,
html[data-theme="dark"] .term-board dt,
html[data-theme="dark"] .evidence-package dt,
html[data-theme="dark"] .correction-flow dt,
html[data-theme="dark"] .headline-metrics span,
html[data-theme="dark"] .result-copy,
html[data-theme="dark"] .why-panel span,
html[data-theme="dark"] .important-boundary span,
html[data-theme="dark"] .source-explainer span,
html[data-theme="dark"] .signature-meaning p,
html[data-theme="dark"] .signature-meaning li,
html[data-theme="dark"] .rail-progress a,
html[data-theme="dark"] .rail-card ul,
html[data-theme="dark"] .care-grid p,
html[data-theme="dark"] .architecture-section > p,
html[data-theme="dark"] .pilot-section > p,
html[data-theme="dark"] .boundary-section > p {
  color: #a9b7c5;
}

html[data-theme="dark"] .term-board dd,
html[data-theme="dark"] .headline-metrics strong,
html[data-theme="dark"] .source-explainer strong,
html[data-theme="dark"] .why-panel p,
html[data-theme="dark"] .important-boundary p,
html[data-theme="dark"] .technical-disclosure summary,
html[data-theme="dark"] .rail-progress a.active {
  color: #f3f7f8;
}

@media(max-width:920px) {
  .guided-review-layout {
    grid-template-columns: 1fr;
  }

  .review-rail {
    display: none;
  }

  .mobile-review-progress {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px 16px;
    align-items: center;
    margin: 16px -20px 0;
    padding: 10px 20px;
    background: rgba(238, 241, 244, .96);
    border-bottom: 1px solid #bbc5ce;
  }

  html[data-theme="dark"] .mobile-review-progress {
    background: rgba(7, 11, 14, .96);
    border-color: rgba(220, 227, 234, .22);
  }

  .mobile-review-progress span {
    color: #536273;
    font: 700 .7rem/1.4 "JetBrains Mono", ui-monospace, monospace;
  }

  .mobile-progress-track {
    grid-column: 1 / -1;
    height: 3px;
    background: #bbc5ce;
  }

  .mobile-progress-fill {
    width: 20%;
    height: 100%;
    background: #2f80ff;
  }

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

  .architecture-flow div:nth-child(3) {
    border-right: 0;
  }

  .architecture-flow div:nth-child(-n + 3) {
    border-bottom: 1px solid #bbc5ce;
  }
}

@media(max-width:650px) {
  .review-header {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .review-header-actions {
    justify-content: flex-start;
  }

  .review-step {
    padding: 20px;
  }

  .term-board dl,
  .headline-metrics,
  .result-comparison,
  .correction-flow,
  .signature-meaning,
  .care-grid,
  .architecture-flow,
  .pilot-section {
    grid-template-columns: 1fr;
  }

  .term-board dl div,
  .headline-metrics div,
  .care-grid article,
  .architecture-flow div,
  .signature-meaning article + article {
    border-right: 0;
    border-left: 0;
    border-bottom: 1px solid #bbc5ce;
  }

  .term-board dl div:last-child,
  .headline-metrics div:last-child,
  .care-grid article:last-child,
  .architecture-flow div:last-child {
    border-bottom: 0;
  }

  .why-panel,
  .source-explainer,
  .important-boundary {
    grid-template-columns: 1fr;
  }

  .why-panel p,
  .important-boundary p,
  .source-explainer .review-label {
    grid-row: auto;
  }

  .correction-event {
    min-height: 110px;
    border: 0;
    border-left: 1px solid #2f80ff;
    border-right: 1px solid #2f80ff;
  }

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

  .preserved-list span:nth-child(2) {
    border-right: 0;
  }

  .preserved-list span:nth-child(-n + 2) {
    border-bottom: 1px solid #bbc5ce;
  }

  .pilot-section ul {
    columns: 1;
  }
}

/* Guided executive review */
.guided-studio {
  color-scheme: light;
}

html[data-theme="dark"] .guided-studio {
  color-scheme: dark;
}

.guided-studio .production-shell {
  color: light-dark(#18202b, #f3f7f8);
}

.review-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 32px;
  padding-bottom: 34px;
  border-bottom: 1px solid light-dark(#bbc5ce, rgba(148, 174, 187, .22));
}

.review-header h1 {
  max-width: 760px !important;
  font-size: clamp(2.25rem, 1.65rem + 2.2vw, 4.3rem) !important;
}

.review-header .subhead {
  max-width: 720px;
  margin-top: 18px;
  font-size: 1.05rem;
}

.review-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.guided-review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: clamp(34px, 6vw, 76px);
  margin-top: 48px;
}

.review-sequence {
  min-width: 0;
}

.review-step {
  min-height: 76vh;
  padding: clamp(38px, 6vw, 70px) 0;
  border-bottom: 1px solid light-dark(#bbc5ce, rgba(148, 174, 187, .22));
  scroll-margin-top: 120px;
}

.review-step:first-child {
  padding-top: 12px;
}

.review-step h2 {
  max-width: 760px;
  font-size: clamp(1.9rem, 1.55rem + 1.25vw, 3rem) !important;
}

.step-count,
.review-question,
.review-label,
.rail-title,
.package-header,
.result-decision > p {
  color: light-dark(#18202b, #f3f7f8);
  font: 700 .72rem/1.5 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.review-question {
  margin: 10px 0 8px !important;
  color: light-dark(#536273, #93a6b0);
  font-size: .8rem;
}

.term-board {
  margin-top: 30px;
  background: light-dark(#f7f9fa, #10181d);
  border: 1px solid light-dark(#bbc5ce, rgba(148, 174, 187, .22));
}

.term-board dl,
.evidence-package dl,
.correction-flow dl,
.technical-facts {
  margin: 0;
}

.term-board dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.term-board dl div {
  min-height: 112px;
  padding: 22px;
  border-right: 1px solid light-dark(#bbc5ce, rgba(148, 174, 187, .22));
  border-bottom: 1px solid light-dark(#bbc5ce, rgba(148, 174, 187, .22));
}

.term-board dl div:nth-child(2n) {
  border-right: 0;
}

.term-board dl div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.term-board dt,
.evidence-package dt,
.correction-flow dt,
.technical-facts dt {
  color: light-dark(#536273, #93a6b0);
  font-size: .78rem;
}

.term-board dd {
  margin: 10px 0 0;
  font-size: clamp(1.05rem, .95rem + .4vw, 1.35rem);
  font-weight: 750;
  line-height: 1.35;
}

.why-panel,
.source-explainer,
.important-boundary {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 8px 26px;
  margin-top: 22px;
  padding: 22px;
  background: color-mix(in srgb, #43c7cf 7%, light-dark(#f7f9fa, #10181d));
  border: 1px solid light-dark(#bbc5ce, rgba(148, 174, 187, .22));
}

.why-panel p,
.important-boundary p {
  grid-row: 1 / span 2;
  color: light-dark(#18202b, #f3f7f8);
  font-weight: 800;
}

.why-panel span,
.important-boundary span {
  color: light-dark(#536273, #93a6b0);
}

.technical-disclosure {
  margin-top: 20px;
  border-top: 1px solid light-dark(#bbc5ce, rgba(148, 174, 187, .22));
  color: light-dark(#536273, #93a6b0);
}

.technical-disclosure summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  color: light-dark(#18202b, #f3f7f8);
  font-size: .88rem;
  font-weight: 750;
  cursor: pointer;
}

.technical-disclosure summary::after {
  content: "+";
  margin-left: auto;
  color: light-dark(#18202b, #f3f7f8);
  font: 400 1.25rem/1 "JetBrains Mono", ui-monospace, monospace;
}

.technical-disclosure[open] summary::after {
  content: "−";
}

.technical-disclosure pre {
  max-height: 380px;
  overflow: auto;
  padding: 18px;
  background: #071013;
  color: #d5e5e6;
  border: 1px solid light-dark(#bbc5ce, rgba(148, 174, 187, .22));
}

.step-next {
  margin-top: 28px;
}

.headline-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 30px;
  border: 1px solid light-dark(#bbc5ce, rgba(148, 174, 187, .22));
  background: light-dark(#f7f9fa, #10181d);
}

.headline-metrics div {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  border-right: 1px solid light-dark(#bbc5ce, rgba(148, 174, 187, .22));
}

.headline-metrics div:last-child {
  border-right: 0;
}

.headline-metrics strong {
  color: light-dark(#18202b, #f3f7f8);
  font-size: clamp(2.25rem, 1.65rem + 2vw, 4rem);
  font-weight: 550;
  letter-spacing: -.05em;
}

.headline-metrics span {
  color: light-dark(#536273, #93a6b0);
  font-size: .84rem;
}

.source-explainer {
  grid-template-columns: 130px minmax(0, 1fr);
}

.source-explainer .review-label {
  grid-row: 1 / span 2;
}

.source-explainer strong {
  color: light-dark(#18202b, #f3f7f8);
}

.result-decision {
  margin-top: 26px;
  padding: clamp(28px, 5vw, 50px);
  background: light-dark(#f7f9fa, #10181d);
  border: 1px solid light-dark(#bbc5ce, rgba(148, 174, 187, .22));
}

.result-decision > strong {
  display: block;
  margin: 12px 0 34px;
  color: #34d399;
  font-size: clamp(2.25rem, 1.6rem + 2.5vw, 4.5rem);
  line-height: 1;
  letter-spacing: -.05em;
}

.result-comparison {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid light-dark(#bbc5ce, rgba(148, 174, 187, .22));
}

.result-comparison span {
  padding: 22px 22px 0 0;
  font-size: clamp(1.25rem, 1rem + .8vw, 1.9rem);
  font-weight: 700;
}

.result-comparison small {
  display: block;
  color: light-dark(#536273, #93a6b0);
  font-size: .72rem;
  font-weight: 500;
}

.result-copy {
  margin-top: 20px !important;
  color: light-dark(#536273, #93a6b0);
}

.correction-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px minmax(0, 1fr);
  align-items: stretch;
  margin-top: 30px;
}

.correction-flow article {
  padding: 24px;
  background: light-dark(#f7f9fa, #10181d);
  border: 1px solid light-dark(#bbc5ce, rgba(148, 174, 187, .22));
}

.correction-flow article > p {
  color: light-dark(#536273, #93a6b0);
  font-weight: 750;
}

.correction-flow dl div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 0;
  border-top: 1px solid light-dark(#bbc5ce, rgba(148, 174, 187, .22));
}

.correction-flow dd {
  margin: 0;
  font-weight: 800;
}

.revised-record > strong {
  display: inline-block;
  margin-top: 16px;
  color: #ffad9f;
}

.flow-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: light-dark(#18202b, #f3f7f8);
  text-align: center;
  font: 700 .7rem/1.45 "JetBrains Mono", ui-monospace, monospace;
  text-transform: uppercase;
}

.flow-connector::before,
.flow-connector::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 28%;
  height: 1px;
  background: #43c7cf;
}

.flow-connector::before {
  left: 0;
}

.flow-connector::after {
  right: 0;
}

.flow-connector span {
  max-width: 90px;
}

.preserved-list {
  display: grid;
  grid-template-columns: minmax(180px, .7fr) minmax(0, 1.3fr);
  gap: 28px;
  margin-top: 26px;
}

.preserved-list p {
  font-weight: 750;
}

.preserved-list ul,
.establishes-section ul,
.rail-boundary ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.preserved-list li,
.establishes-section li {
  padding: 10px 0;
  border-top: 1px solid light-dark(#bbc5ce, rgba(148, 174, 187, .22));
  color: light-dark(#536273, #93a6b0);
}

.preserved-list li::before {
  content: "Included";
  display: inline-block;
  width: 92px;
  color: light-dark(#18202b, #f3f7f8);
  font: 700 .68rem/1.5 "JetBrains Mono", ui-monospace, monospace;
  text-transform: uppercase;
}

.evidence-package {
  margin-top: 30px;
  background: light-dark(#f7f9fa, #10181d);
  border: 1px solid light-dark(#bbc5ce, rgba(148, 174, 187, .22));
}

.package-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border-bottom: 1px solid light-dark(#bbc5ce, rgba(148, 174, 187, .22));
}

.evidence-package dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.evidence-package dl div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 22px;
  border-right: 1px solid light-dark(#bbc5ce, rgba(148, 174, 187, .22));
  border-bottom: 1px solid light-dark(#bbc5ce, rgba(148, 174, 187, .22));
}

.evidence-package dl div:nth-child(2n) {
  border-right: 0;
}

.evidence-package dd {
  margin: 0;
  font-weight: 800;
}

.evidence-package dd.verified {
  color: #34d399;
}

.evidence-package dd.failed {
  color: #ffad9f;
}

.verification-message {
  padding: 18px 22px;
  color: light-dark(#536273, #93a6b0);
  font-size: .84rem;
}

.verification-message.verified {
  color: #34d399;
}

.verification-message.failed {
  color: #ffad9f;
}

.signature-meaning {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 22px;
  background: light-dark(#bbc5ce, rgba(148, 174, 187, .22));
  border: 1px solid light-dark(#bbc5ce, rgba(148, 174, 187, .22));
}

.signature-meaning article {
  padding: 24px;
  background: light-dark(#eef1f4, #070b0e);
}

.signature-meaning p {
  color: light-dark(#536273, #93a6b0);
}

.evidence-actions,
.technical-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.human-review-state {
  margin-top: 22px;
  padding: 24px;
  border: 1px solid light-dark(#9faeba, #647483);
  background: light-dark(#f4f7f8, #17222d);
}

.human-review-state-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}

.human-review-state-head h3 {
  margin-top: 6px;
  font-size: 1.35rem !important;
}

.human-review-state-head > span {
  padding: 7px 9px;
  border: 1px solid light-dark(#bbc5ce, #647483);
  background: light-dark(#fff, #111a23);
  color: light-dark(#536273, #a6b5be);
  font-size: .76rem;
  font-weight: 700;
}

.human-review-state ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 20px;
  margin: 20px 0;
  padding: 0;
  list-style: none;
}

.human-review-state li {
  position: relative;
  padding-left: 24px;
  color: light-dark(#536273, #a6b5be);
  font-size: .88rem;
}

.human-review-state li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .28em;
  width: 12px;
  height: 12px;
  border: 1px solid #8797a4;
  background: light-dark(#fff, #111a23);
}

.human-review-state li.checked::before {
  border-color: #167047;
  background: #167047;
  box-shadow: inset 0 0 0 3px light-dark(#edf7f1, #12271d);
}

.human-review-state .review-ready {
  margin: 18px 0 0;
  color: light-dark(#167047, #34d399);
  font-size: 1.05rem;
  font-weight: 800;
}

.human-review-state small {
  display: block;
  max-width: 70ch;
  margin-top: 12px;
  color: light-dark(#536273, #a6b5be);
}

.human-review-state.complete {
  border-color: #5b9779;
  background: light-dark(#edf7f1, #12271d);
}

.human-review-state button:disabled {
  cursor: default;
  opacity: .72;
}

.production-shell a.primary {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: .72rem 1rem;
  background: #1f68d8;
  color: #fff;
  text-decoration: none;
  font-weight: 750;
}

.technical-facts div {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  padding: 12px 0;
  border-top: 1px solid light-dark(#bbc5ce, rgba(148, 174, 187, .22));
}

.technical-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.legacy-explainer {
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid light-dark(#bbc5ce, rgba(148, 174, 187, .22));
}

.legacy-explainer > p {
  color: light-dark(#536273, #93a6b0);
}

.legacy-explainer .table-wrap {
  margin-top: 20px;
}

.establishes-section,
.pilot-section {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(34px, 7vw, 82px);
  padding: clamp(58px, 9vw, 110px) 0;
  border-bottom: 1px solid light-dark(#bbc5ce, rgba(148, 174, 187, .22));
}

.establishes-section p,
.pilot-section p {
  color: light-dark(#536273, #93a6b0);
}

.establishes-section h3 {
  margin-top: 0 !important;
}

.care-section,
.architecture-section {
  padding: clamp(58px, 9vw, 110px) 0;
  border-bottom: 1px solid light-dark(#bbc5ce, rgba(148, 174, 187, .22));
}

.care-section .section-intro,
.architecture-section .section-intro {
  padding: 0;
}

.care-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  gap: 1px;
  margin-top: 30px;
  background: light-dark(#bbc5ce, rgba(148, 174, 187, .22));
  border: 1px solid light-dark(#bbc5ce, rgba(148, 174, 187, .22));
}

.care-layout article {
  padding: 28px;
  background: light-dark(#f7f9fa, #10181d);
}

.care-layout > div {
  display: grid;
  gap: 1px;
  background: light-dark(#bbc5ce, rgba(148, 174, 187, .22));
}

.care-layout span {
  color: light-dark(#18202b, #f3f7f8);
  font-weight: 800;
}

.care-layout p {
  margin-top: 12px !important;
  color: light-dark(#536273, #93a6b0);
}

.care-primary {
  min-height: 330px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.care-primary p {
  max-width: 42ch !important;
  font-size: 1.15rem;
}

.architecture-flow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 32px;
  border: 1px solid light-dark(#bbc5ce, rgba(148, 174, 187, .22));
}

.architecture-flow > div {
  min-height: 172px;
  display: flex;
  flex-direction: column;
  padding: 18px;
  border-right: 1px solid light-dark(#bbc5ce, rgba(148, 174, 187, .22));
}

.architecture-flow > div:last-child {
  border-right: 0;
}

.architecture-flow span {
  color: light-dark(#536273, #93a6b0);
  font: 600 .7rem/1.4 "JetBrains Mono", ui-monospace, monospace;
}

.architecture-flow strong {
  margin-top: auto;
  font-size: .9rem;
}

.architecture-flow small {
  margin-top: 10px;
  color: light-dark(#536273, #93a6b0);
  font-size: .7rem;
}

.architecture-flow .hive-node {
  background: color-mix(in srgb, #43c7cf 9%, light-dark(#f7f9fa, #10181d));
}

.pilot-section {
  align-items: end;
}

.pilot-section > div p {
  margin-top: 14px !important;
}

.pilot-section > .primary {
  justify-self: end;
}

.review-rail {
  position: sticky;
  top: 100px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow: auto;
  padding-left: 24px;
  border-left: 1px solid light-dark(#bbc5ce, rgba(148, 174, 187, .22));
}

.review-rail nav {
  display: grid;
  margin: 16px 0 28px;
}

.review-progress-item {
  min-height: 46px;
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: light-dark(#536273, #93a6b0);
  text-align: left;
  font-size: .82rem;
}

.review-progress-item span {
  font: 600 .68rem/1 "JetBrains Mono", ui-monospace, monospace;
}

.review-progress-item.active {
  color: light-dark(#18202b, #f3f7f8);
  font-weight: 800;
}

.rail-boundary {
  padding: 18px 0;
  border-top: 1px solid light-dark(#bbc5ce, rgba(148, 174, 187, .22));
}

.rail-boundary p {
  color: light-dark(#18202b, #f3f7f8);
  font-size: .78rem;
  font-weight: 800;
}

.rail-boundary li {
  color: light-dark(#536273, #93a6b0);
  font-size: .75rem;
  line-height: 1.7;
}

.mobile-review-progress {
  display: none;
}

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

@media (max-width: 980px) {
  .guided-review-layout {
    grid-template-columns: 1fr;
  }

  .review-rail {
    display: none;
  }

  .mobile-review-progress {
    position: sticky;
    top: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 16px;
    margin: 0 -14px;
    padding: 12px 14px;
    background: color-mix(in srgb, light-dark(#eef1f4, #070b0e) 94%, transparent);
    border-bottom: 1px solid light-dark(#bbc5ce, rgba(148, 174, 187, .22));
    backdrop-filter: blur(14px);
  }

  .mobile-review-progress span {
    color: light-dark(#536273, #93a6b0);
    font-size: .72rem;
  }

  .mobile-review-progress strong {
    text-align: right;
    font-size: .78rem;
  }

  .mobile-progress-track {
    grid-column: 1 / -1;
    height: 2px;
    background: light-dark(#bbc5ce, rgba(148, 174, 187, .22));
  }

  .mobile-progress-track span {
    display: block;
    width: 20%;
    height: 100%;
    background: #43c7cf;
    transition: width 180ms ease;
  }

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

  .architecture-flow > div:nth-child(3) {
    border-right: 0;
  }

  .architecture-flow > div:nth-child(-n + 3) {
    border-bottom: 1px solid light-dark(#bbc5ce, rgba(148, 174, 187, .22));
  }
}

@media (max-width: 700px) {
  .review-header {
    grid-template-columns: 1fr;
  }

  .review-header-actions {
    justify-content: flex-start;
  }

  .review-step {
    min-height: 0;
    padding-block: 54px;
  }

  .term-board dl,
  .headline-metrics,
  .result-comparison,
  .evidence-package dl,
  .signature-meaning,
  .establishes-section,
  .care-layout,
  .pilot-section {
    grid-template-columns: 1fr;
  }

  .human-review-state-head,
  .human-review-state ul {
    grid-template-columns: 1fr;
  }

  .human-review-state-head {
    display: grid;
  }

  .term-board dl div,
  .term-board dl div:nth-child(2n),
  .term-board dl div:nth-last-child(-n + 2) {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid light-dark(#bbc5ce, rgba(148, 174, 187, .22));
  }

  .term-board dl div:last-child {
    border-bottom: 0;
  }

  .why-panel,
  .source-explainer,
  .important-boundary,
  .preserved-list {
    grid-template-columns: 1fr;
  }

  .why-panel p,
  .source-explainer .review-label,
  .important-boundary p {
    grid-row: auto;
  }

  .headline-metrics div {
    min-height: 128px;
    border-right: 0;
    border-bottom: 1px solid light-dark(#bbc5ce, rgba(148, 174, 187, .22));
  }

  .headline-metrics div:last-child {
    border-bottom: 0;
  }

  .result-comparison span {
    border-top: 1px solid light-dark(#bbc5ce, rgba(148, 174, 187, .22));
  }

  .correction-flow {
    grid-template-columns: 1fr;
  }

  .flow-connector {
    min-height: 92px;
  }

  .flow-connector::before,
  .flow-connector::after {
    left: 50%;
    width: 1px;
    height: 24%;
  }

  .flow-connector::before {
    top: 0;
  }

  .flow-connector::after {
    top: auto;
    right: auto;
    bottom: 0;
  }

  .package-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .evidence-package dl div,
  .evidence-package dl div:nth-child(2n) {
    border-right: 0;
  }

  .technical-facts div {
    grid-template-columns: 1fr;
  }

  .architecture-flow {
    grid-template-columns: 1fr 1fr;
  }

  .architecture-flow > div,
  .architecture-flow > div:nth-child(3) {
    min-height: 140px;
    border-right: 1px solid light-dark(#bbc5ce, rgba(148, 174, 187, .22));
    border-bottom: 1px solid light-dark(#bbc5ce, rgba(148, 174, 187, .22));
  }

  .architecture-flow > div:nth-child(2n) {
    border-right: 0;
  }

  .architecture-flow > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .pilot-section > .primary {
    justify-self: start;
  }
}

/* Final review rhythm. Keep one spacing and type scale after legacy layers. */
.guided-studio .review-header h1 {
  max-width: 720px !important;
  font-size: clamp(2.35rem, 1.9rem + 1.7vw, 3.4rem) !important;
  line-height: 1.02;
  letter-spacing: -.045em;
}

.guided-studio .review-header .subhead {
  margin-top: 14px;
  max-width: 680px;
  font-size: 1rem;
  line-height: 1.55;
}

.guided-studio .guided-review-layout {
  gap: clamp(28px, 4vw, 48px);
  margin-top: 36px;
}

.guided-studio .review-step,
.guided-studio .review-step:first-child {
  min-height: 0;
  margin-bottom: 28px;
  padding: 32px;
  background: light-dark(#ffffff, #0d1418);
  border: 1px solid light-dark(#bbc5ce, rgba(148, 174, 187, .22));
}

.guided-studio .review-step h2 {
  margin: 8px 0 0;
  max-width: 680px;
  font-size: clamp(1.8rem, 1.55rem + .75vw, 2.25rem) !important;
  line-height: 1.08;
  letter-spacing: -.035em;
}

.guided-studio .step-count,
.guided-studio .review-question,
.guided-studio .review-label,
.guided-studio .rail-title,
.guided-studio .package-header,
.guided-studio .result-decision > p {
  font-size: .72rem;
  line-height: 1.45;
}

.guided-studio .review-question {
  margin: 10px 0 0 !important;
}

.guided-studio .term-board {
  margin-top: 24px;
}

/* Light surfaces use ink-first contrast. Cyan is reserved for dark mode. */
html[data-theme="light"] .guided-studio .step-count,
html[data-theme="light"] .guided-studio .review-label,
html[data-theme="light"] .guided-studio .rail-title,
html[data-theme="light"] .guided-studio .package-header,
html[data-theme="light"] .guided-studio .result-decision > p {
  color: #31516a;
}

html[data-theme="light"] .guided-studio .why-panel,
html[data-theme="light"] .guided-studio .source-explainer,
html[data-theme="light"] .guided-studio .important-boundary {
  background: #f7f9fa;
}

html[data-theme="light"] .guided-studio .why-panel p,
html[data-theme="light"] .guided-studio .important-boundary p,
html[data-theme="light"] .guided-studio .source-explainer strong {
  color: #18202b;
}

html[data-theme="light"] .guided-studio .technical-disclosure summary::after,
html[data-theme="light"] .guided-studio .review-progress-item.active,
html[data-theme="light"] .guided-studio .care-layout span {
  color: #18202b;
}

html[data-theme="light"] .guided-studio .flow-connector,
html[data-theme="light"] .guided-studio .evidence-package dd::before {
  color: #31516a;
}

@media (max-width: 700px) {
  .guided-studio .review-header h1 {
    font-size: clamp(2.1rem, 10vw, 3rem) !important;
  }

  .guided-studio .review-step,
  .guided-studio .review-step:first-child {
    padding: 24px 20px;
  }

  .guided-studio .review-step h2 {
    font-size: clamp(1.65rem, 8vw, 2rem) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-progress-track span {
    transition: none;
  }
}
