:root {
  color-scheme: light;
  --ink: #101820;
  --ink-2: #1b2833;
  --ink-3: #33424d;
  --paper: #f3f0e8;
  --paper-bright: #fbfaf6;
  --paper-deep: #e7e1d5;
  --rule: #c9c0b0;
  --muted: #736e65;
  --red: #a83c35;
  --red-soft: #f0d8d4;
  --gold: #c5a35d;
  --gold-soft: #ecdfbf;
  --blue: #315d72;
  --blue-soft: #dbe8ec;
  --green: #416c5a;
  --amber: #9a6a27;
  --shadow: 0 24px 70px rgb(8 17 24 / 13%);
  --serif: "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", STSong, Georgia, serif;
  --sans: "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--ink);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 22% 0%, rgb(197 163 93 / 10%), transparent 31rem),
    var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
}

button,
textarea {
  font: inherit;
}

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

button:focus-visible,
a:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgb(197 163 93 / 58%);
  outline-offset: 3px;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.83' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
}

.topbar {
  position: relative;
  z-index: 4;
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 32px;
  color: var(--paper-bright);
  border-bottom: 1px solid rgb(255 255 255 / 13%);
  background: rgb(16 24 32 / 94%);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  color: var(--ink);
  border-radius: 50%;
  background: var(--gold);
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  box-shadow: inset 0 0 0 5px rgb(16 24 32 / 14%);
}

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

.brand strong {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.12em;
}

.brand small {
  margin-top: -4px;
  color: rgb(255 255 255 / 50%);
  font-family: Georgia, serif;
  font-size: 10px;
  letter-spacing: 0.2em;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.scope-chip,
.demo-chip {
  padding: 7px 12px;
  border: 1px solid rgb(255 255 255 / 14%);
}

.scope-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgb(255 255 255 / 76%);
}

.scope-chip i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #72b08e;
  box-shadow: 0 0 0 4px rgb(114 176 142 / 12%);
}

.demo-chip {
  color: var(--gold-soft);
  border-color: rgb(197 163 93 / 40%);
  font-weight: 700;
}

.workspace {
  display: grid;
  min-height: calc(100vh - 78px);
  grid-template-columns: 220px minmax(520px, 1fr) 326px;
  align-items: stretch;
}

.step-rail {
  position: relative;
  padding: 36px 26px 28px;
  color: var(--paper);
  border-right: 1px solid rgb(255 255 255 / 10%);
  background: linear-gradient(180deg, #15222c 0%, #101820 100%);
}

.rail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 17px;
  color: rgb(255 255 255 / 46%);
  border-bottom: 1px solid rgb(255 255 255 / 10%);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.rail-heading strong {
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 12px;
}

.step-rail ol {
  position: relative;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.step-rail ol::before {
  position: absolute;
  top: 24px;
  bottom: 38px;
  left: 17px;
  width: 1px;
  content: "";
  background: rgb(255 255 255 / 13%);
}

.rail-step {
  position: relative;
  display: grid;
  min-height: 75px;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  color: rgb(255 255 255 / 38%);
  transition: color 220ms ease, transform 220ms ease;
}

.rail-step.is-active,
.rail-step.is-complete {
  color: var(--paper-bright);
}

.rail-step.is-active {
  transform: translateX(4px);
}

.step-number {
  position: relative;
  z-index: 1;
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 50%;
  background: var(--ink-2);
  font-family: Georgia, serif;
  font-size: 11px;
}

.rail-step.is-active .step-number {
  color: var(--ink);
  border-color: var(--gold);
  background: var(--gold);
}

.rail-step.is-complete .step-number {
  color: var(--gold);
  border-color: var(--gold);
}

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

.rail-step strong {
  margin-top: 2px;
  font-family: var(--serif);
  font-size: 15px;
}

.rail-step small {
  margin-top: -2px;
  color: inherit;
  font-size: 11px;
}

.rail-principle {
  position: absolute;
  right: 26px;
  bottom: 28px;
  left: 26px;
  padding-top: 17px;
  border-top: 1px solid rgb(255 255 255 / 10%);
}

.eyebrow {
  color: var(--red);
  font-family: Georgia, serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.rail-principle .eyebrow {
  color: var(--gold);
}

.rail-principle p {
  margin: 7px 0 0;
  color: rgb(255 255 255 / 57%);
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.75;
}

.case-surface {
  min-width: 0;
  padding: 34px clamp(28px, 4vw, 68px) 56px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgb(16 24 32 / 3%) 1px, transparent 1px),
    var(--paper);
  background-size: 28px 100%;
}

.surface-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.screen {
  display: none;
  animation: reveal 420ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.screen.is-active {
  display: block;
}

.screen-header {
  display: grid;
  margin: 42px 0 34px;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 260px);
  gap: 36px;
  align-items: end;
}

.screen-header.compact {
  margin-bottom: 25px;
}

.screen-header h1 {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-size: clamp(31px, 4.2vw, 55px);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1.08;
}

.header-note {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  border-left: 2px solid var(--gold);
  font-family: var(--serif);
  font-size: 14px;
}

.intake-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 245px;
  gap: 24px;
}

.statement-block {
  padding: 24px;
  border: 1px solid var(--rule);
  background: var(--paper-bright);
  box-shadow: var(--shadow);
}

.statement-block label {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.statement-block textarea {
  display: block;
  width: 100%;
  min-height: 245px;
  padding: 18px 19px;
  resize: vertical;
  color: var(--ink);
  border: 0;
  border-left: 3px solid var(--ink);
  border-radius: 0;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 33px,
      rgb(16 24 32 / 8%) 34px
    );
  font-family: var(--serif);
  font-size: 17px;
  line-height: 2;
}

.statement-block textarea:focus {
  border-left-color: var(--red);
}

.case-card.neutral {
  border-top: 4px solid var(--gold);
}

.field-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 13px;
  color: var(--muted);
  font-size: 12px;
}

.text-button {
  padding: 0;
  color: var(--ink);
  border: 0;
  border-bottom: 1px solid currentColor;
  background: none;
  cursor: pointer;
  font-size: 12px;
}

.intake-brief {
  position: relative;
  padding: 24px 22px;
  color: var(--paper-bright);
  background: var(--ink-2);
  overflow: hidden;
}

.intake-brief::after {
  position: absolute;
  right: -25px;
  bottom: -35px;
  width: 115px;
  height: 115px;
  content: "";
  border: 1px solid rgb(197 163 93 / 36%);
  border-radius: 50%;
  box-shadow: inset 0 0 0 18px rgb(197 163 93 / 5%);
}

.brief-index {
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 12px;
}

.intake-brief h2 {
  margin: 22px 0 10px;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.35;
}

.intake-brief > p {
  margin: 0 0 22px;
  color: rgb(255 255 255 / 64%);
  font-size: 13px;
}

.intake-brief dl {
  position: relative;
  z-index: 1;
  margin: 0;
}

.intake-brief dl div {
  padding: 11px 0;
  border-top: 1px solid rgb(255 255 255 / 11%);
}

.intake-brief dt {
  color: rgb(255 255 255 / 40%);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.intake-brief dd {
  margin: 2px 0 0;
  font-family: var(--serif);
  font-size: 13px;
}

.scope-alert {
  display: flex;
  margin-top: 18px;
  padding: 14px 16px;
  gap: 10px 18px;
  align-items: baseline;
  color: #752820;
  border: 1px solid #d1a29c;
  background: var(--red-soft);
  font-size: 13px;
}

.scope-alert[hidden] {
  display: none;
}

.screen-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
}

.privacy-note {
  color: var(--muted);
  font-size: 12px;
}

.primary-button,
.secondary-button,
.icon-button,
.counterfactual-button {
  border: 0;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-button {
  display: inline-flex;
  min-height: 50px;
  padding: 0 20px;
  align-items: center;
  justify-content: center;
  gap: 36px;
  color: #fff;
  background: var(--red);
  box-shadow: 5px 5px 0 var(--ink);
  font-weight: 700;
}

.primary-button:hover:not(:disabled) {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--ink);
}

.primary-button:disabled {
  color: rgb(255 255 255 / 55%);
  background: #928d84;
  box-shadow: none;
  cursor: not-allowed;
}

.secondary-button {
  min-height: 46px;
  padding: 0 16px;
  color: var(--ink);
  border: 1px solid var(--rule);
  background: transparent;
  font-weight: 700;
}

.secondary-button:hover,
.icon-button:hover,
.counterfactual-button:hover {
  background: var(--paper-deep);
}

.question-list {
  display: grid;
  gap: 13px;
}

.question-card {
  display: grid;
  padding: 20px 22px;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 17px;
  align-items: center;
  border: 1px solid var(--rule);
  background: var(--paper-bright);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.question-card:focus-within,
.question-card.has-answer {
  border-color: var(--ink-3);
  box-shadow: 4px 4px 0 rgb(16 24 32 / 9%);
}

.question-index {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--red);
  border: 1px solid var(--rule);
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 13px;
}

.question-copy h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
}

.question-copy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.choice-button {
  min-width: 65px;
  padding: 8px 11px;
  color: var(--ink-3);
  border: 1px solid var(--rule);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.choice-button:hover {
  border-color: var(--ink-3);
}

.choice-button.is-selected {
  color: #fff;
  border-color: var(--ink);
  background: var(--ink);
}

.report-heading {
  grid-template-columns: 1fr auto;
}

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

.icon-button,
.counterfactual-button {
  padding: 9px 12px;
  color: var(--ink);
  border: 1px solid var(--rule);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.decision-panel {
  position: relative;
  display: grid;
  padding: 28px;
  grid-template-columns: minmax(160px, 0.42fr) minmax(0, 1fr);
  gap: 28px;
  color: var(--paper-bright);
  background: var(--ink-2);
  overflow: hidden;
}

.decision-panel::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 5px;
  content: "";
  background: var(--decision-color, var(--amber));
}

.decision-code {
  padding-right: 24px;
  border-right: 1px solid rgb(255 255 255 / 13%);
}

.decision-code span {
  display: block;
  color: rgb(255 255 255 / 44%);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.decision-code strong {
  display: block;
  margin-top: 10px;
  color: var(--decision-color, var(--gold));
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 600;
  line-height: 1.35;
}

.decision-copy p {
  margin: 0;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.9;
}

.decision-copy small {
  display: block;
  margin-top: 12px;
  color: rgb(255 255 255 / 45%);
  font-size: 11px;
}

.report-section {
  margin-top: 38px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}

.section-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 17px;
}

.section-title-row h2 {
  margin: 5px 0 0;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.verified-label {
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.evidence-map {
  display: grid;
  border: 1px solid var(--rule);
  background: var(--paper-bright);
}

.evidence-row {
  display: grid;
  padding: 16px 18px;
  grid-template-columns: minmax(190px, 0.9fr) minmax(0, 1.25fr) 110px;
  gap: 18px;
  align-items: center;
  border-bottom: 1px solid var(--rule);
}

.evidence-row:last-child {
  border-bottom: 0;
}

.evidence-label strong,
.evidence-label small {
  display: block;
}

.evidence-label strong {
  font-family: var(--serif);
  font-size: 15px;
}

.evidence-label small {
  color: var(--muted);
  font-size: 11px;
}

.evidence-impact {
  color: var(--muted);
  font-size: 12px;
}

.evidence-state {
  justify-self: end;
  padding: 5px 9px;
  border: 1px solid currentColor;
  font-size: 11px;
  font-weight: 700;
}

.evidence-state.yes {
  color: var(--green);
}

.evidence-state.no {
  color: var(--red);
}

.evidence-state.unknown {
  color: var(--amber);
}

.case-comparison {
  display: grid;
  grid-template-columns: 1fr 56px 1fr;
  align-items: stretch;
}

.case-card {
  position: relative;
  padding: 22px;
  border: 1px solid var(--rule);
  background: var(--paper-bright);
}

.case-card.support {
  border-top: 4px solid var(--blue);
}

.case-card.opposition {
  border-top: 4px solid var(--red);
}

.case-role {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.case-card h3 {
  min-height: 52px;
  margin: 14px 0 8px;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.45;
}

.case-card > p {
  min-height: 72px;
  margin: 0;
  color: var(--ink-3);
  font-size: 13px;
}

.case-difference {
  margin-top: 16px;
  padding: 12px 13px;
  color: var(--ink-3);
  border-left: 3px solid var(--gold);
  background: var(--paper);
  font-size: 12px;
}

.source-link {
  display: inline-flex;
  margin-top: 16px;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.versus {
  display: grid;
  place-items: center;
  color: var(--red);
  font-family: Georgia, serif;
  font-size: 12px;
  font-style: italic;
}

.claim-list {
  display: grid;
  gap: 9px;
}

.claim-item {
  display: grid;
  padding: 15px 17px;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  border: 1px solid var(--rule);
  background: rgb(251 250 246 / 75%);
}

.claim-mark {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: var(--green);
  font-size: 12px;
}

.claim-mark.pending {
  background: var(--amber);
}

.claim-copy strong,
.claim-copy small {
  display: block;
}

.claim-copy strong {
  font-family: var(--serif);
  font-size: 14px;
}

.claim-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.claim-source {
  color: var(--green);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.evidence-ledger {
  padding: 36px 28px 30px;
  border-left: 1px solid var(--rule);
  background: #e8e3d9;
}

.evidence-ledger header {
  padding-bottom: 17px;
  border-bottom: 2px solid var(--ink);
}

.evidence-ledger h2 {
  margin: 4px 0 0;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
}

.ledger-status {
  display: flex;
  padding: 18px 0;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--rule);
}

.status-light {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #8d897f;
  box-shadow: 0 0 0 5px rgb(141 137 127 / 12%);
}

.status-light.red {
  background: var(--red);
  box-shadow: 0 0 0 5px rgb(168 60 53 / 12%);
}

.status-light.blue {
  background: var(--blue);
  box-shadow: 0 0 0 5px rgb(49 93 114 / 12%);
}

.status-light.amber {
  background: var(--amber);
  box-shadow: 0 0 0 5px rgb(154 106 39 / 12%);
}

.ledger-status small,
.ledger-status strong {
  display: block;
}

.ledger-status small {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.ledger-status strong {
  font-family: var(--serif);
  font-size: 14px;
}

.ledger-group {
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
}

.ledger-group h3 {
  margin: 0 0 11px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.ledger-group ul,
.authority-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ledger-group ul {
  display: grid;
  gap: 8px;
}

.ledger-group ul li {
  position: relative;
  padding-left: 14px;
  font-family: var(--serif);
  font-size: 13px;
}

.ledger-group ul li::before {
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 5px;
  height: 5px;
  content: "";
  border-radius: 50%;
  background: var(--red);
}

.ledger-group ul li.is-empty {
  color: var(--muted);
  font-family: var(--sans);
}

.ledger-group ul li.is-empty::before {
  background: var(--rule);
}

.authority-list {
  display: grid;
  gap: 8px;
  counter-reset: item;
}

.authority-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-3);
  font-size: 12px;
}

.authority-list span {
  color: var(--red);
  font-family: Georgia, serif;
  font-size: 10px;
}

.ledger-metric {
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
}

.ledger-metric span,
.ledger-metric strong,
.ledger-metric small {
  display: block;
}

.ledger-metric span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.ledger-metric strong {
  margin: 5px 0;
  color: var(--green);
  font-family: var(--serif);
  font-size: 24px;
}

.ledger-metric small {
  color: var(--muted);
  font-size: 10px;
}

.legal-note {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  max-width: 330px;
  padding: 12px 15px;
  color: #fff;
  background: var(--ink);
  box-shadow: 0 12px 40px rgb(0 0 0 / 22%);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  font-size: 12px;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .evidence-ledger {
    grid-column: 1 / -1;
    display: grid;
    padding: 24px 28px;
    grid-template-columns: 180px 1fr 1fr 1fr;
    gap: 26px;
    border-top: 1px solid var(--rule);
    border-left: 0;
  }

  .legal-note {
    grid-column: 1 / -1;
    margin: 0;
  }
}

@media (max-width: 860px) {
  .topbar {
    padding: 12px 18px;
  }

  .scope-chip {
    display: none;
  }

  .workspace {
    display: block;
  }

  .step-rail {
    padding: 14px 18px;
  }

  .rail-heading,
  .rail-principle,
  .rail-step small {
    display: none;
  }

  .step-rail ol {
    display: grid;
    margin: 0;
    grid-template-columns: repeat(4, 1fr);
  }

  .step-rail ol::before {
    top: 17px;
    right: 12%;
    bottom: auto;
    left: 12%;
    width: auto;
    height: 1px;
  }

  .rail-step {
    min-height: auto;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 5px;
    text-align: center;
  }

  .rail-step.is-active {
    transform: none;
  }

  .rail-step strong {
    font-size: 12px;
  }

  .case-surface {
    padding: 25px 18px 42px;
  }

  .screen-header,
  .screen-header.report-heading {
    grid-template-columns: 1fr;
    gap: 15px;
    margin: 30px 0 24px;
  }

  .header-note {
    max-width: 420px;
  }

  .intake-grid {
    grid-template-columns: 1fr;
  }

  .intake-brief {
    min-height: 250px;
  }

  .question-card {
    grid-template-columns: 42px 1fr;
  }

  .choice-group {
    grid-column: 1 / -1;
    padding-left: 59px;
  }

  .decision-panel {
    grid-template-columns: 1fr;
  }

  .decision-code {
    padding: 0 0 18px;
    border-right: 0;
    border-bottom: 1px solid rgb(255 255 255 / 13%);
  }

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

  .evidence-impact {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .case-comparison {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .versus {
    height: 34px;
  }

  .case-card h3,
  .case-card > p {
    min-height: auto;
  }

  .evidence-ledger {
    display: block;
    padding: 26px 22px;
  }

  .legal-note {
    margin-top: 20px;
  }
}

@media (max-width: 540px) {
  .brand small,
  .demo-chip,
  .privacy-note {
    display: none;
  }

  .brand strong {
    font-size: 17px;
  }

  .screen-header h1 {
    font-size: 32px;
  }

  .statement-block {
    padding: 17px;
  }

  .statement-block textarea {
    min-height: 230px;
    padding: 13px 14px;
    font-size: 16px;
  }

  .screen-actions,
  .section-title-row {
    align-items: stretch;
    flex-direction: column;
  }

  .screen-actions .primary-button,
  .screen-actions .secondary-button,
  .counterfactual-button {
    width: 100%;
  }

  .question-card {
    padding: 16px;
  }

  .choice-group {
    padding-left: 0;
  }

  .choice-button {
    flex: 1;
  }

  .report-actions {
    width: 100%;
  }

  .report-actions .icon-button {
    flex: 1;
  }

  .decision-panel {
    padding: 23px;
  }

  .evidence-row {
    padding: 14px;
  }

  .claim-item {
    grid-template-columns: 24px 1fr;
  }

  .claim-source {
    grid-column: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

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

  .grain,
  .topbar,
  .step-rail,
  .evidence-ledger,
  .surface-kicker,
  .report-actions,
  .counterfactual-button,
  .toast {
    display: none !important;
  }

  .workspace {
    display: block;
  }

  .case-surface {
    padding: 0;
    background: #fff;
  }

  .screen:not(#screenReport),
  #screenReport[hidden] {
    display: none !important;
  }

  #screenReport {
    display: block !important;
  }

  .decision-panel {
    color: #000;
    border: 2px solid #000;
    background: #fff;
  }

  .decision-code {
    border-color: #888;
  }

  .decision-code span,
  .decision-copy small {
    color: #555;
  }

  .case-card,
  .evidence-map,
  .claim-item {
    break-inside: avoid;
  }
}
