:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #667085;
  --line: #d8dee8;
  --surface: #ffffff;
  --wash: #f4f6f9;
  --brand: #3157d5;
  --brand-dark: #2443a6;
  --good: #147a52;
  --good-bg: #e8f7f0;
  --bad: #a92f37;
  --bad-bg: #fff0f1;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--wash); line-height: 1.55; }
a { color: var(--brand-dark); }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
code { overflow-wrap: anywhere; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .82rem; background: #111827; color: #e5e7eb; padding: 1rem; border-radius: .6rem; }
.test-banner { padding: .55rem 1rem; text-align: center; background: #fff1b8; color: #604b00; font-weight: 750; font-size: .78rem; letter-spacing: .03em; }
.account-note { padding: .38rem 1rem; text-align: center; background: #fff8df; color: #604b00; border-bottom: 1px solid #eadca4; font-size: .78rem; }
.site-header { min-height: 4.3rem; padding: .8rem max(1rem, calc((100vw - 980px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { color: var(--ink); text-decoration: none; font-size: 1.12rem; font-weight: 800; }
.identity { display: flex; flex-direction: column; align-items: flex-end; font-size: .78rem; line-height: 1.35; min-width: 0; }
.identity strong { max-width: 56vw; overflow: hidden; text-overflow: ellipsis; }
.identity span, .muted { color: var(--muted); }
main { width: min(980px, calc(100% - 2rem)); margin: 0 auto; padding: 2rem 0 4rem; }
.narrow { max-width: 620px; margin-inline: auto; }
.hero { margin-bottom: 1.35rem; }
.hero h1 { margin: .15rem 0 .4rem; font-size: clamp(2rem, 7vw, 3.2rem); line-height: 1.06; letter-spacing: -.04em; }
.hero p { max-width: 720px; }
.eyebrow { margin: 0; color: var(--brand-dark); font-size: .76rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.card, .case-card, .progress-card, .binding-card { margin: 1rem 0; padding: clamp(1rem, 4vw, 1.5rem); background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; box-shadow: 0 8px 28px rgba(20, 30, 55, .04); }
.card h2, .binding-card h2, .progress-card h2 { margin-top: 0; }
.progress-heading { display: flex; align-items: baseline; gap: .5rem; }
.progress-heading strong { font-size: 1.65rem; }
progress { width: 100%; height: .85rem; accent-color: var(--brand); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin: .6rem 0 1.2rem; color: var(--muted); font-size: .85rem; }
.stats span { display: flex; flex-direction: column; }
.stats strong { color: var(--ink); font-size: 1.1rem; }
.button, button { display: inline-flex; justify-content: center; align-items: center; border: 1px solid var(--line); border-radius: .65rem; padding: .72rem 1rem; background: #fff; color: var(--ink); font: inherit; font-weight: 750; text-decoration: none; cursor: pointer; }
.button:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #7190ee; outline-offset: 3px; }
.primary { color: #fff; background: var(--brand); border-color: var(--brand); }
.primary:hover { background: var(--brand-dark); }
.danger { color: #fff; background: var(--bad); border-color: var(--bad); }
.binding-card { border-color: #aabaf0; background: #f8faff; }
dl { display: grid; grid-template-columns: minmax(9rem, .35fr) 1fr; gap: .35rem 1rem; }
dt { color: var(--muted); font-size: .85rem; }
dd { margin: 0; }
.link-list { display: flex; flex-direction: column; }
.link-list a { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-top: 1px solid var(--line); text-decoration: none; font-weight: 700; }
.link-list a span { color: var(--muted); font-size: .82rem; font-weight: 500; }
.link-list .locked-step { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-top: 1px solid var(--line); color: var(--muted); font-weight: 700; }
.link-list .locked-step span { font-size: .82rem; font-weight: 500; text-align: right; }
.history-details { margin: 1rem 0; padding: .2rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: .8rem; }
.history-details summary { display: flex; align-items: center; min-height: 44px; font-weight: 750; cursor: pointer; }
.case-help { color: var(--muted); }
.case-help summary { min-height: 44px; display: flex; align-items: center; color: var(--brand-dark); font-weight: 750; cursor: pointer; }
.review-facts { margin: 1rem 0; padding: .35rem 1rem; background: #eef2ff; border: 1px solid #cfd8fb; border-radius: .8rem; }
.review-facts summary { display: flex; align-items: center; min-height: 44px; color: var(--brand-dark); font-weight: 800; cursor: pointer; }
.review-facts li { margin: .55rem 0; }
.notice { display: flex; gap: .75rem; padding: .8rem 1rem; border-radius: .65rem; }
.notice.final { background: var(--good-bg); color: var(--good); }
.warning { padding: 1rem; background: #fff7df; border-left: .3rem solid #d89800; }
.case-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin: .5rem 0; }
.case-nav a { display: flex; align-items: center; min-height: 44px; }
.case-nav a:last-child { justify-content: flex-end; text-align: right; }
.case-nav span { color: var(--muted); font-size: .85rem; }
.case-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.case-title h1 { margin: .1rem 0; font-size: 2.2rem; }
.case-card > section, .case-card > details { padding: 1rem 0; border-top: 1px solid var(--line); }
.case-card h2 { font-size: 1.05rem; }
.user-text { padding: 1rem; border-radius: .65rem; background: #eef2ff; font-size: 1.08rem; }
.pill { padding: .28rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 850; }
.pill.good { color: var(--good); background: var(--good-bg); }
.pill.bad { color: var(--bad); background: var(--bad-bg); }
.pill.muted { color: var(--muted); background: var(--wash); }
.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.fixtures { padding-left: 1.2rem; }
.fixtures li { margin: .65rem 0; }
.supporting-preview { overflow-wrap: anywhere; }
.supporting-data { grid-template-columns: minmax(8rem, .3fr) 1fr; padding: .55rem 0; border-top: 1px solid var(--line); }
.supporting-data:first-child { border-top: 0; }
.supporting-data .supporting-data { margin-top: .45rem; }
.supporting-list { margin: 0; padding-left: 1.2rem; }
.supporting-list li { margin: .3rem 0; }
.supporting-value, .supporting-text { white-space: pre-wrap; }
.supporting-image { display: block; max-width: 100%; max-height: 72vh; margin: 0 auto; border-radius: .65rem; }
.supporting-audio { display: block; width: 100%; }
.never-allow { background: var(--bad-bg); border-radius: .65rem; padding-inline: 1rem !important; }
.never-allow h2 { color: var(--bad); }
.stack { display: flex; flex-direction: column; gap: 1rem; }
label { font-weight: 700; }
input[type="text"], input[type="email"], input[type="password"], select, textarea { display: block; width: 100%; margin-top: .35rem; padding: .75rem; border: 1px solid #aeb7c5; border-radius: .6rem; background: #fff; color: var(--ink); font: inherit; }
textarea { resize: vertical; }
.actions, .footer-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.history li { padding: .5rem 0; }
.history span { margin-left: .5rem; color: var(--muted); font-size: .78rem; }
.history p { margin: .2rem 0; white-space: pre-wrap; }
.checklist { display: flex; flex-direction: column; gap: .7rem; padding: 0; list-style: none; }
.check-item { padding: 1rem; background: #fff; border: 1px solid var(--line); border-radius: .8rem; }
.check-item.checked { border-color: #84cbae; background: var(--good-bg); }
.check-choice { display: flex; align-items: flex-start; gap: .8rem; cursor: pointer; }
.check-choice input { flex: 0 0 auto; width: 1.35rem; height: 1.35rem; margin: .15rem 0 0; accent-color: var(--good); }
.check-choice span { display: flex; flex-direction: column; gap: .2rem; font-weight: 600; }
.check-choice strong { color: var(--good); }
.check-help { margin: .7rem 0 0 2.15rem; color: var(--muted); font-size: .9rem; }
.check-help summary { min-height: 44px; display: flex; align-items: center; color: var(--brand-dark); font-weight: 700; cursor: pointer; }
.check-help p { margin: 0 0 .25rem; }
.choice, .binding-confirm { display: flex; align-items: flex-start; gap: .7rem; padding: .8rem; border: 1px solid var(--line); border-radius: .65rem; }
.choice input, .binding-confirm input { margin-top: .25rem; }
.choice span { display: flex; flex-direction: column; }
.choice small { color: var(--muted); font-weight: 500; }
fieldset { display: flex; flex-direction: column; gap: .7rem; border: 0; padding: 0; }
legend { margin-bottom: .5rem; font-weight: 800; }
.final-record h2 { font-size: 2rem; }
.final-record.decision-approve h2 { color: var(--good); }
.final-record.decision-reject h2 { color: var(--bad); }
@media (max-width: 640px) {
  main { width: min(100% - 1rem, 980px); padding-top: 1rem; }
  .site-header { padding-inline: .75rem; }
  .columns { grid-template-columns: 1fr; gap: 0; }
  .case-title { flex-wrap: wrap; }
  .supporting-data { grid-template-columns: 1fr; }
  dl { grid-template-columns: 1fr; }
  dd { margin-bottom: .6rem; }
  .actions { flex-direction: column; }
  .actions button { width: 100%; }
}
