/* Rate Case Gap Check. Brand tokens come from tokens.css (copied from /brand).
 * Status colors below are the only additions: red, amber, green chips need
 * AA contrast and the brand kit has no semantic status palette. */
@font-face { font-family: "Figtree"; font-weight: 400; font-display: swap; src: url("/assets/fonts/Figtree-400.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 500; font-display: swap; src: url("/assets/fonts/Figtree-500.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 600; font-display: swap; src: url("/assets/fonts/Figtree-600.woff2") format("woff2"); }
@font-face { font-family: "Raleway"; font-weight: 700; font-display: swap; src: url("/assets/fonts/Raleway-700.woff2") format("woff2"); }
@font-face { font-family: "Raleway"; font-weight: 800; font-display: swap; src: url("/assets/fonts/Raleway-800.woff2") format("woff2"); }

:root {
  --font-body: "Figtree", var(--bp-font-sans);
  --font-head: "Raleway", "Figtree", var(--bp-font-sans);
  --ink: var(--bp-text);
  --ink-2: var(--bp-text-muted);
  --blue-ink: #0369a1;
  --line: var(--bp-border);
  --gap-bg: #fee2e2; --gap-fg: #991b1b; --gap-bar: #dc2626;
  --partial-bg: #fef3c7; --partial-fg: #92400e; --partial-bar: #d97706;
  --ready-bg: #dcfce7; --ready-fg: #166534; --ready-bar: #16a34a;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 12px 32px rgba(10, 54, 85, .08);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: #f4f8fd; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: transparent;
}
/* Full-bleed gradient layer: always covers the whole viewport, any width. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 60% at 0% 0%, rgba(50, 177, 230, .17), transparent 70%),
    radial-gradient(ellipse 60% 55% at 100% 0%, rgba(249, 210, 48, .17), transparent 70%),
    linear-gradient(#f4f8fd, #fff 75%);
}
img { max-width: 100%; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 3px solid var(--bp-sky); outline-offset: 2px; border-radius: 4px; }
[tabindex="-1"]:focus { outline: none; }

body { --w: 980px; }
body[data-screen="quiz"], body[data-screen="gate"] { --w: 672px; }
body[data-screen="result"] { --w: 1040px; }
.page { flex: 1; display: flex; flex-direction: column; width: 100%; max-width: calc(var(--w) + 48px); margin: 0 auto; padding: 28px 24px 0; }
main { flex: 1; }

/* header */
/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 54px; min-height: 45px; }
.lockup { display: flex; align-items: center; gap: 10px; }
.lockup-bp { width: 104px; height: auto; display: block; }
.lockup-x { color: var(--ink-2); font-size: 12px; line-height: 1; }
.lockup-ss { height: 28px; width: auto; display: block; }
.pill { display: inline-block; font-family: var(--font-body); font-weight: 700; font-size: 11px; line-height: 1.5; letter-spacing: .08em; padding: 9px 16px; border-radius: 999px; }
.pill-tool { background: #fff; color: var(--bp-navy); border: 1px solid #cfdceb; }
.pill-ready { background: var(--bp-navy); color: #fff; margin-bottom: 16px; }

/* cards + type */
.card { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 48px 44px; }
.h-display { font-family: var(--font-head); font-weight: 800; color: var(--bp-navy); font-size: 42px; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 20px; text-wrap: balance; }
.h-display.sm { font-size: 32px; font-weight: 700; line-height: 1.2; margin-bottom: 8px; }
.hl { color: var(--blue-ink); }
.h-q { font-family: var(--font-head); font-weight: 600; color: var(--bp-navy); font-size: 24px; line-height: 1.32; letter-spacing: -.005em; margin: 0 0 29px; text-wrap: balance; }
.h-sec { font-family: var(--font-head); font-weight: 700; color: var(--bp-navy); font-size: 1.15rem; margin: 32px 0 12px; }
/* intro paragraph */
.lede { font-size: 18px; line-height: 1.6; color: #334155; max-width: 38rem; margin: 0 0 28px; }
.lede.sm { font-size: 16px; margin: 16px 0 24px; }
.eyebrow { margin: 0; font-weight: 600; font-size: 13px; line-height: 1.4; color: var(--ink-2); }

.meta { list-style: none; margin: 0 0 36px; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem 0; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.meta li + li::before { content: "\00B7"; margin: 0 .6rem; color: #94a3b8; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 14px 28px; border-radius: 10px; border: 0; font: 600 15px/1.2 var(--font-body); cursor: pointer; text-decoration: none; transition: background-color .15s, border-color .15s; }
.btn-primary { background: var(--blue-ink); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--bp-navy); }
.btn-primary:disabled { background: #cbd5e1; color: #475569; cursor: not-allowed; }
.btn-secondary { background: #fff; color: var(--bp-navy); border: 1px solid #7c8ea3; padding: 13px 27px; }
.btn-sm { min-height: 2.25rem; padding: .3rem .9rem; font-size: .9rem; }
.btn-secondary:hover { border-color: var(--bp-navy); }
.btn-ghost { background: transparent; color: var(--ink-2); padding: 12px 6px; min-height: 0; }
.btn-ghost:hover { color: var(--bp-navy); background: #eef3f9; }

/* intro */
.intro { display: grid; grid-template-columns: minmax(0, 600fr) minmax(0, 340fr); gap: 40px; align-items: stretch; }
.intro-card { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.sample { border: 1px solid var(--line); border-radius: 1rem; background: rgba(255, 255, 255, .7); box-shadow: var(--shadow); padding: 1.5rem; display: flex; flex-direction: column; gap: 1.1rem; }
.sample-map { flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: .85rem; filter: blur(3px) grayscale(.5); opacity: .8; user-select: none; pointer-events: none; }
.sample-col { background: #fff; border: 1px solid var(--line); border-top: 5px solid #94a3b8; border-radius: .75rem; padding: 1rem; display: flex; flex-direction: column; gap: .65rem; align-items: flex-start; }
.sample-col:nth-child(1) { border-top-color: var(--partial-bar); }
.sample-col:nth-child(3) { border-top-color: var(--ready-bar); }
.sample-col:nth-child(2), .sample-col:nth-child(4) { border-top-color: var(--gap-bar); }
.sample-area { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; line-height: 1.2; color: var(--bp-navy); }
.sample-line { display: block; height: .6rem; width: 100%; background: #e2e8f0; border-radius: 4px; }
.sample-line.short { width: 60%; }
.sample-lock { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; font-weight: 600; font-size: 13px; white-space: nowrap; color: var(--bp-navy); }

/* quiz */
.quiz-wrap, .gate-card { width: 100%; }
.progress-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.area-tag { margin: 0; font-weight: 600; font-size: 13px; line-height: 1.4; color: var(--blue-ink); }
.bar { height: 6px; margin: 10px 0 34px; background: #e6eef6; border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; width: 0; background: var(--bp-logo-blue); border-radius: 999px; transition: width .3s ease; }
.options { display: grid; gap: 10px; }
.opt { display: flex; align-items: center; gap: 14px; text-align: left; width: 100%; padding: 16px 18px; background: #fff; border: 1.5px solid #7c8ea3; border-radius: 12px; font: 500 15px/1.4 var(--font-body); color: var(--ink); cursor: pointer; transition: border-color .15s, background-color .15s, box-shadow .15s; }
.opt:hover { border-color: var(--bp-sky); background: #f7fbfe; }
.opt-key { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: #eef3f9; color: var(--bp-navy); font-weight: 700; font-size: 12px; }
.opt-text { padding-top: 0; }
.opt[aria-checked="true"] { border-color: var(--blue-ink); background: #eaf5fc; box-shadow: 0 0 0 1px var(--blue-ink); }
.opt[aria-checked="true"] .opt-key { background: var(--blue-ink); color: #fff; }
.why { margin: 20px 0 0; padding: .85rem 1rem; background: #fffbea; border-left: 3px solid var(--bp-logo-yellow); border-radius: 0 .5rem .5rem 0; font-size: .9375rem; color: #334155; }
.why span:first-child { font-weight: 700; color: var(--bp-navy); margin-right: .25rem; }
.nav { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 36px; }
.hint { margin: 16px 0 0; font-size: 12px; color: var(--ink-2); }

/* gate */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 13px; line-height: 1.4; margin-bottom: 6px; color: var(--bp-navy); }
.field input { width: 100%; height: 44px; padding: 0 14px; border: 1.5px solid #7c8ea3; border-radius: 10px; font: 400 15px var(--font-body); color: var(--ink); background: #fff; }
.field input:focus-visible { outline: 3px solid rgba(2, 132, 199, .35); outline-offset: 0; border-color: var(--bp-sky); }
.field input[aria-invalid="true"] { border-color: var(--gap-fg); }
.err { margin: .3rem 0 0; font-size: .875rem; color: var(--gap-fg); }
.err:empty { display: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.save-note { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.25rem; padding: .75rem 1rem; background: var(--partial-bg); color: var(--partial-fg); border-radius: .6rem; font-weight: 600; font-size: .9375rem; }
.save-note.ok { background: var(--ready-bg); color: var(--ready-fg); }
.disclaimer { margin: 1.25rem 0 0; font-size: .8125rem; color: var(--ink-2); }

/* chips + tags */
.chip { display: inline-block; font-weight: 700; font-size: .8125rem; letter-spacing: .02em; padding: .25rem .65rem; border-radius: 999px; }
.chip-gap { background: var(--gap-bg); color: var(--gap-fg); }
.chip-partial { background: var(--partial-bg); color: var(--partial-fg); }
.chip-ready { background: var(--ready-bg); color: var(--ready-fg); }

/* result */
.res-sub { margin: 0 0 32px; font-size: 1.125rem; color: #334155; font-weight: 500; }
.map { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem; }
.map-col { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: .65rem; padding: 1rem; background: #fff; border: 1px solid var(--line); border-top: 5px solid #94a3b8; border-radius: .75rem; }
.map-col.status-gap { border-top-color: var(--gap-bar); }
.map-col.status-partial { border-top-color: var(--partial-bar); }
.map-col.status-ready { border-top-color: var(--ready-bar); }
.map-col.is-fix { box-shadow: 0 0 0 2px var(--bp-navy); border-color: var(--bp-navy); }
.map-top { display: flex; flex-direction: column; gap: .4rem; align-items: flex-start; }
.map-area { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; color: var(--bp-navy); line-height: 1.2; }
.fix-mark { background: var(--bp-navy); color: #fff; font-size: .6875rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .2rem .5rem; border-radius: .3rem; }
.map-q { margin: 0; font-size: .9375rem; color: #334155; }

.actions { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.action { padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: .75rem; background: #fff; }
.action-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .4rem; }
.action-area { font-weight: 700; color: var(--bp-navy); }
.action-text { margin: 0; font-size: .9375rem; color: #334155; }
.tag { font-size: .6875rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .2rem .55rem; border-radius: .3rem; }
.tag-critical { background: var(--gap-fg); color: #fff; }
.tag-high { background: var(--partial-bg); color: var(--partial-fg); }
.tag-watch { background: #e2e8f0; color: #1e293b; }
.strong-line { margin: 0; padding: 1rem 1.1rem; background: var(--ready-bg); color: var(--ready-fg); border-radius: .75rem; font-weight: 600; }

.clock { margin-top: 32px; padding: 1rem 1.1rem; background: #eaf5fc; border-left: 4px solid var(--bp-logo-blue); border-radius: 0 .75rem .75rem 0; }
.clock p { margin: 0; font-size: .9375rem; color: #1e293b; }
.clock .clock-label { font-weight: 700; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--blue-ink); margin-bottom: .25rem; }
.res-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: 32px; }
.copied { font-size: .9rem; font-weight: 600; color: var(--ready-fg); word-break: break-all; }

.cta { margin-top: 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; padding: 1.75rem 2.25rem; background: var(--bp-navy); color: #fff; border-radius: 1rem; }
.cta h3 { font-family: var(--font-head); font-weight: 700; font-size: 1.35rem; line-height: 1.2; margin: 0 0 .4rem; }
.cta p { margin: 0; max-width: 34rem; color: #dbe7f1; }
.btn-cta { background: var(--bp-logo-yellow); color: var(--bp-navy); }
.btn-cta:hover { background: #ffe066; }
.btn-cta:focus-visible { outline-color: #fff; }

.foot { text-align: center; margin: 24px 0; font-size: 12px; color: var(--ink-2); }

/* motion */
@media (prefers-reduced-motion: no-preference) {
  .screen.enter { animation: rise .35s ease both; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* responsive */
@media (max-width: 900px) {
  .map { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .intro { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .page { padding: 20px 16px 0; }
  .top { margin-bottom: 28px; }
  .card { padding: 28px 20px; border-radius: 16px; }
  .h-display { font-size: 32px; }
  .h-display.sm { font-size: 28px; }
  .h-q { font-size: 21px; }
  .bar { margin-bottom: 20px; }
  .meta { flex-direction: column; }
  .meta li + li::before { display: none; }
  .sample { padding: 1rem; }
  .sample-lock { white-space: normal; text-align: center; }
  .grid2 { grid-template-columns: 1fr; }
  .map { grid-template-columns: 1fr; }
  .nav { flex-wrap: wrap; }
  .cta { padding: 1.35rem 1.1rem; }
  .btn-cta, .res-buttons .btn { width: 100%; }
}

/* print: one Letter page with the gap map, actions, and clock */
@page { size: letter; margin: .45in; }
@media print {
  .screen, .screen.enter { animation: none !important; opacity: 1 !important; transform: none !important; }
  body { background: #fff !important; font-size: 10pt; line-height: 1.35; }
  .page { max-width: none; padding: 0; display: block; }
  .no-print, .foot { display: none !important; }
  body::before { display: none; }
  body { display: block; }
  .top { margin: 0 0 .15in; }
  .card { box-shadow: none; border: 0; padding: 0; border-radius: 0; }
  .h-display.sm { font-size: 22pt; margin-bottom: 2pt; }
  .res-sub { font-size: 11pt; margin-bottom: .12in; }
  .map { gap: 8pt; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .map-col { padding: 8pt; gap: 5pt; break-inside: avoid; }
  .map-area { font-size: 10.5pt; }
  .map-q { font-size: 9pt; }
  .h-sec { font-size: 12pt; margin: .14in 0 6pt; }
  .actions { gap: 6pt; }
  .action { padding: 7pt 9pt; break-inside: avoid; }
  .action-text { font-size: 9pt; }
  .clock { margin-top: .12in; padding: 7pt 9pt; break-inside: avoid; }
  .clock p { font-size: 9pt; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
