/* =====================================================================
   IGSLIA Persistency Rating — brand system
   Navy + white foundation; blue and red carry state; gold is a thin accent.
   One light theme on purpose: the official logo's navy and black lettering
   is drawn for white grounds, so the whole artifact lives in that world.
   ===================================================================== */

:root {
  color-scheme: light;

  /* Brand */
  --navy: #0F2D52;
  --navy-deep: #0A1F3B;
  --navy-soft: #1C3F6B;
  --blue: #0067B9;
  --blue-hover: #00589E;
  --blue-soft: #E8F1FA;
  --red: #D9272E;
  --red-soft: #FCEBEC;
  --gold: #C9A227;
  --gold-soft: #F7F1DE;
  --cream: #FBF7EE;

  /* Neutrals — cool, with a navy bias */
  --paper: #F6F8FB;
  --surface: #FFFFFF;
  --surface-sunk: #F1F4F8;
  --ink: #0F2D52;
  --text: #1E2A3B;
  --ink-soft: #3E4F66;
  --muted: #637389;
  --line: #E3E9F0;
  --line-strong: #C8D2DE;

  /* State (separate from the accent roles) */
  --good: #16794C;
  --good-soft: #E6F4EC;
  --watch: #B45309;
  --watch-soft: #FDF1E3;
  --risk: #D9272E;
  --risk-soft: #FCEBEC;

  /* Compatibility aliases used by the components */
  --accent: var(--blue);
  --accent-soft: var(--blue-soft);
  --brass: var(--gold);
  --brass-soft: var(--gold-soft);
  --focus: var(--blue);

  --display: "Montserrat", "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --heading: "Manrope", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: var(--sans);
  --serif: var(--heading);

  --step-0: .8125rem;
  --step-1: .9375rem;
  --step-2: 1.0625rem;
  --step-3: 1.375rem;
  --step-4: 1.875rem;
  --step-5: 2.5rem;

  --radius: 8px;
  --radius-lg: 14px;
  --shadow: 0 1px 2px rgba(15, 45, 82, .05), 0 10px 30px -18px rgba(15, 45, 82, .28);
  --shadow-lift: 0 2px 4px rgba(15, 45, 82, .06), 0 18px 40px -22px rgba(15, 45, 82, .40);
}

/* ------------------------------------------------------------------ base */
* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--step-1);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}

h1, h2, h3 { margin: 0; color: var(--ink); text-wrap: balance; }
p { margin: 0; }
strong { font-weight: 600; color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

.num { font-family: var(--sans); font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

.eyebrow {
  font-family: var(--sans);
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blue);
}

.hint { font-size: var(--step-0); color: var(--muted); }

.shell { max-width: 1160px; margin: 0 auto; padding: 0 28px 96px; }

[hidden] { display: none !important; }

/* ---------------------------------------------------------------- appbar */
.appbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: inset 0 -2px 0 var(--gold);
}

.appbar__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 12px 28px 14px;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-right: auto;
  text-decoration: none;
  color: var(--ink);
}

.brand-logo { display: block; height: 40px; width: auto; }

.wordmark__name {
  font-family: var(--heading);
  font-weight: 700;
  font-size: var(--step-1);
  color: var(--navy);
  padding-left: 14px;
  border-left: 1px solid var(--line-strong);
}

.field { display: flex; align-items: center; gap: 8px; }
.field__label { font-size: var(--step-0); font-weight: 500; color: var(--muted); white-space: nowrap; }

.control {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 7px 11px;
  font-size: var(--step-0);
  font-variant-numeric: tabular-nums;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.control:hover { border-color: #9FB0C4; }
.control:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 103, 185, .15); }

body[data-page="start"] .appbar .field { display: none; }

/* ----------------------------------------------------------------- panel */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-top: 24px;
  overflow: hidden;
}

.panel__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  padding: 22px 26px 0;
}

.panel__title { font-family: var(--heading); font-weight: 700; font-size: var(--step-2); letter-spacing: -.005em; }
.panel__body { padding: 18px 26px 26px; display: grid; gap: 16px; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin: 52px 0 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.section-head::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 44px; height: 2px;
  background: var(--gold);
}
.section-head h2 { font-family: var(--heading); font-weight: 800; font-size: var(--step-3); letter-spacing: -.01em; }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--navy);
  border-radius: var(--radius);
  padding: 9px 16px;
  font-size: var(--step-0);
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn:hover { border-color: var(--navy); }

.btn--primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--blue); border-color: var(--blue); color: #fff; }

.btn--large { padding: 13px 24px; font-size: var(--step-1); border-radius: 10px; }
.btn--small { padding: 5px 11px; }
.btn--ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn--ghost:hover { color: var(--red); border-color: var(--line); background: var(--surface); }
.btn:disabled, .btn:disabled:hover { background: #AAB6C5; border-color: #AAB6C5; color: #fff; cursor: not-allowed; }

.linkbtn {
  border: 0;
  background: none;
  padding: 0;
  color: var(--blue);
  font-weight: 600;
  font-size: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer;
}
.linkbtn:hover { color: var(--navy); }
.linkbtn--inline { font-weight: 600; }

/* ================================================================ PAGE 1 */
.hero {
  position: relative;
  overflow: hidden;
  margin-top: 28px;
  padding: 44px 44px 40px;
  border-radius: 18px;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(0, 103, 185, .55) 0%, rgba(0, 103, 185, 0) 55%),
    linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff;
  box-shadow: var(--shadow-lift);
}

/* Circular arcs taken from the logo's ring: blue and red, low contrast. */
.hero__arcs { position: absolute; right: -60px; top: -80px; width: 420px; height: 420px; pointer-events: none; }
.hero__arcs circle { fill: none; stroke-linecap: round; }

.hero__content { position: relative; display: grid; gap: 14px; max-width: 640px; }
.hero .eyebrow { color: #9CC8F0; }
.hero__title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2rem, 4.4vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -.02em;
  color: #fff;
}
.hero__lede { font-size: var(--step-2); color: rgba(255, 255, 255, .82); max-width: 58ch; }
.hero__rule { width: 56px; height: 2px; background: var(--gold); border: 0; margin: 4px 0 0; }

.steps { display: grid; gap: 16px; margin-top: 24px; }

.step-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 22px 26px 24px;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 4px 18px;
}
.step-card--cream { background: var(--cream); border-color: #EFE6D2; }

.step-card__num {
  grid-row: span 3;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: var(--step-1);
  color: #fff;
  background: var(--navy);
  box-shadow: 0 0 0 4px var(--blue-soft);
}
.step-card--cream .step-card__num { box-shadow: 0 0 0 4px #F1E6C8; }

.step-card__title { font-family: var(--heading); font-weight: 800; font-size: var(--step-2); color: var(--ink); }
.step-card__body { display: grid; gap: 12px; padding-top: 6px; }

.field--large .control { font-size: var(--step-2); font-weight: 600; padding: 10px 14px; color: var(--navy); }

.howto { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.howto li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; color: var(--ink-soft); }
.howto li::before {
  content: "";
  width: 8px; height: 8px;
  margin: 8px 0 0 6px;
  border-radius: 50%;
  background: var(--blue);
}
.howto strong { color: var(--ink); }

.confirm {
  margin-top: 24px;
  display: grid;
  gap: 18px;
  padding: 24px 26px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--navy);
  box-shadow: var(--shadow-lift);
}
.confirm__check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: var(--step-1); color: var(--ink-soft); }
.confirm__check strong { color: var(--ink); }
.confirm__check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--navy); flex: none; }
.confirm__actions { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }

/* --------------------------------------------------------- download guide */
.guide__cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }

.guide__card {
  display: grid;
  gap: 6px;
  align-content: start;
  justify-items: start;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
}
.step-card--cream .guide__card { border-color: #EADFC6; border-left-color: var(--gold); }

.guide__name { font-size: .6875rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.guide__range { font-family: var(--heading); font-weight: 800; font-size: var(--step-2); color: var(--navy); letter-spacing: -.01em; }
.guide__to { font-family: var(--sans); font-weight: 500; font-size: var(--step-0); color: var(--muted); margin: 0 3px; }
.guide__why { max-width: 92ch; color: var(--ink-soft); }

.guide--compact .panel__head { padding-top: 16px; }
.guide--compact .panel__body { padding-top: 12px; padding-bottom: 18px; }
.guide--compact .guide__card { padding: 11px 14px; }
.guide--compact .guide__range { font-size: var(--step-1); }

/* ================================================================ PAGE 2 */
.dropzone {
  border: 1.5px dashed #A9BACD;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #FAFCFE 0%, var(--blue-soft) 100%);
  padding: 30px 24px;
  text-align: center;
  display: grid;
  gap: 8px;
  justify-items: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--blue); background: var(--blue-soft); }
.dropzone__title { font-family: var(--heading); font-weight: 800; color: var(--navy); font-size: var(--step-2); }

.sources { display: grid; gap: 10px; }
.source { border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 16px; display: grid; gap: 10px; background: var(--surface); }
.source--empty { background: var(--surface-sunk); border-style: dashed; display: flex; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.source__head { display: flex; gap: 10px 14px; flex-wrap: wrap; align-items: baseline; }
.source__title { font-weight: 700; font-size: var(--step-0); color: var(--navy); }
.source__file { font-size: var(--step-0); color: var(--ink-soft); font-weight: 500; }
.source__actions { margin-left: auto; }

.mapping-details summary { cursor: pointer; font-size: var(--step-0); font-weight: 600; color: var(--ink-soft); }
.mapping-details[open] summary { margin-bottom: 10px; }
.mapping-details .hint { margin-bottom: 10px; }
.mapping { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 18px; }
.mapping__item { display: grid; gap: 5px; }
.mapping__label { font-size: var(--step-0); font-weight: 600; display: flex; gap: 6px; align-items: center; color: var(--ink-soft); }
.mapping__item select { width: 100%; }

.tag { font-size: .625rem; padding: 2px 6px; border-radius: 4px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--surface-sunk); color: var(--muted); }
.tag--required { background: var(--gold-soft); color: #7A6212; }

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.check { font-size: var(--step-0); padding: 10px 14px 10px 34px; border-radius: var(--radius); position: relative; line-height: 1.5; color: var(--text); }
.check::before { content: ""; position: absolute; left: 14px; top: 16px; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.check--good { background: var(--good-soft); }
.check--good::before { color: var(--good); }
.check--watch { background: var(--watch-soft); }
.check--watch::before { color: var(--watch); }
.check--risk { background: var(--risk-soft); }
.check--risk::before { color: var(--red); }
.check--quiet { background: var(--surface-sunk); color: var(--ink-soft); }
.check--quiet::before { color: var(--line-strong); }

.lede { max-width: 80ch; font-size: var(--step-1); color: var(--ink-soft); }
.lede strong { color: var(--ink); }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.control--search { flex: 1 1 220px; max-width: 340px; }

/* ----------------------------------------------------------------- chips */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: var(--step-0);
  font-weight: 600;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.chip:hover { border-color: var(--navy); color: var(--navy); }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip .num { opacity: .75; margin-left: 2px; }

/* ---------------------------------------------------------------- tables */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: var(--step-0); }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
thead th {
  background: #F4F7FA;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #F7FAFD; }
td.right, th.right { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { max-height: 440px; overflow-y: auto; }
.table-scroll--tall { max-height: 580px; }
.th-sub { font-weight: 500; letter-spacing: .02em; text-transform: none; color: var(--muted); margin-left: 3px; }

/* Status table: a fixed layout keeps one edit from re-measuring every row. */
.status-table { table-layout: fixed; min-width: 960px; }
.status-table .c-policy { width: 22%; }
.status-table .c-issued { width: 15%; }
.status-table .c-api    { width: 9%; }
.status-table .c-status { width: 17%; }
.status-table .c-paidto { width: 17%; }
.status-table .c-event  { width: 13%; }
.status-table .c-action { width: 7%; }
.status-table td { vertical-align: middle; overflow: hidden; text-overflow: ellipsis; }
.status-table tr.is-tagged td { background: #FFFBF4; }
.status-table tr.has-problem td { background: #FFF6F6; }
.status-table tr.is-tagged td:first-child { box-shadow: inset 3px 0 0 var(--watch); }
.status-table tr.has-problem td:first-child { box-shadow: inset 3px 0 0 var(--red); }

td .sub, .status-table .sub {
  display: block;
  font-size: .75rem;
  color: var(--muted);
  max-width: 28ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.control--status { font-size: var(--step-0); font-weight: 600; padding: 6px 8px; width: 100%; min-width: 0; color: var(--navy); }
.status--grace, .status--lapsed { border-color: #E3B77A; background: #FFFBF4; }
.status--surrendered { border-color: #EBA3A6; background: #FFF7F7; }
.status--death { border-color: var(--line-strong); }
.control--date { font-size: var(--step-0); padding: 6px 8px; width: 100%; max-width: 16ch; }
.control--cell { width: 100%; min-width: 7ch; padding: 5px 8px; font-size: var(--step-0); }
.control--sub { margin-top: 4px; }
.control.is-bad { border-color: var(--red); background: var(--red-soft); }
.paidto .control--date { display: block; }

.flag { color: var(--red); font-size: .75rem; font-weight: 600; display: block; margin-top: 3px; }
.dim { color: var(--line-strong); }
.nowrap { white-space: nowrap; }
.rowaction { width: 1%; }
.empty-row { text-align: center; color: var(--muted); padding: 24px; }
.more-row td { text-align: center; color: var(--muted); padding: 14px; background: var(--surface-sunk); }

.sub--warn { color: var(--watch) !important; }
.source--report { color: var(--blue) !important; }
.source--entered, .source--override { color: var(--watch) !important; }

.badge {
  display: inline-block;
  font-size: .5625rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--red-soft);
  color: var(--red);
  vertical-align: 1px;
}

/* ----------------------------------------------------------------- pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill--good { background: var(--good-soft); color: var(--good); }
.pill--watch { background: var(--watch-soft); color: var(--watch); }
.pill--risk { background: var(--risk-soft); color: var(--red); }
.pill--neutral { background: var(--surface-sunk); color: var(--muted); }

/* --------------------------------------------------------------- notices */
.notice {
  border-left: 3px solid var(--watch);
  background: var(--watch-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 12px 16px;
  font-size: var(--step-0);
  color: var(--text);
}
.notice > * + * { margin-top: 6px; }
.notice--risk { border-left-color: var(--red); background: var(--risk-soft); }
.notice--quiet { border-left-color: var(--blue); background: var(--blue-soft); }
.notice ul { margin: 0; padding-left: 18px; }

/* ============================================================= RESULTS */
.headline { display: grid; grid-template-columns: minmax(250px, 310px) 1fr; }
@media (max-width: 780px) { .headline { grid-template-columns: 1fr; } }

.headline__figure {
  padding: 28px 28px 26px;
  display: grid;
  align-content: center;
  gap: 10px;
  color: #fff;
  background:
    radial-gradient(140% 120% at 0% 100%, rgba(0, 103, 185, .45) 0%, rgba(0, 103, 185, 0) 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  position: relative;
}
.headline__figure .eyebrow { color: #9CC8F0; }
.headline__value {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3.25rem, 9vw, 4.5rem);
  line-height: .95;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
  color: #fff;
}
.headline__meta { font-size: var(--step-0); color: rgba(255, 255, 255, .78); }
.headline__figure .pill--good { background: rgba(22, 121, 76, .22); color: #8FE0B6; }
.headline__figure .pill--watch { background: rgba(180, 83, 9, .25); color: #FFC98A; }
.headline__figure .pill--risk { background: rgba(217, 39, 46, .26); color: #FFB1B4; }

.rail { padding: 22px 28px 22px; display: grid; gap: 14px; }
.rail__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.rail svg { display: block; width: 100%; height: auto; overflow: visible; }
.rail .c-grid { stroke: var(--line); stroke-width: 1; }
.rail .c-axis { fill: var(--muted); font-family: var(--sans); font-size: 10px; }
.rail .c-bar { fill: var(--blue); }
.rail .c-bar--below { fill: var(--red); }
.rail .c-bar--now { fill: var(--navy); }
.rail .c-bar--now.c-bar--below { fill: #A91E24; }
.rail .c-value { fill: var(--ink-soft); font-family: var(--sans); font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
.rail .c-value--now { fill: var(--navy); font-weight: 800; }
.rail .c-month { fill: var(--muted); font-family: var(--sans); font-size: 11px; font-weight: 500; }
.rail .c-month--now { fill: var(--navy); font-weight: 700; }
.rail .c-year { fill: var(--muted); font-family: var(--sans); font-size: 9px; }
.rail .c-target { stroke: var(--gold); stroke-width: 1.5; stroke-dasharray: 5 4; }
.rail .c-target-label { fill: #8C7214; font-family: var(--sans); font-size: 10px; font-weight: 700; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px; background: var(--line); }
.tile { background: var(--surface); padding: 18px 22px; display: grid; gap: 4px; }
.tile__value { font-family: var(--display); font-weight: 800; font-size: var(--step-4); line-height: 1.1; color: var(--navy); font-variant-numeric: tabular-nums; }
.tile__label { font-size: var(--step-0); font-weight: 700; color: var(--ink); }
.tile__note { font-size: var(--step-0); color: var(--muted); }
.bar { height: 4px; border-radius: 2px; background: var(--surface-sunk); overflow: hidden; margin-top: 8px; }
.bar__fill { height: 100%; border-radius: 2px; background: var(--blue); }
.bar__fill--risk { background: var(--red); }
.bar__fill--watch { background: var(--watch); }

.planner { display: grid; grid-template-columns: 1.1fr 1fr; }
@media (max-width: 880px) { .planner { grid-template-columns: 1fr; } }
.planner__left { padding: 22px 26px; border-right: 1px solid var(--line); display: grid; gap: 14px; align-content: start; }
.planner__right { padding: 22px 26px; display: grid; gap: 14px; align-content: start; background: #FAFBFD; }
@media (max-width: 880px) { .planner__left { border-right: 0; border-bottom: 1px solid var(--line); } }

.sim {
  display: grid;
  gap: 4px;
  padding: 18px 20px;
  border-radius: var(--radius);
  color: #fff;
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-soft) 100%);
}
.sim .eyebrow { color: #9CC8F0; }
.sim__value { font-family: var(--display); font-weight: 800; font-size: var(--step-5); line-height: 1.05; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sim .hint { color: rgba(255, 255, 255, .78); }

.inputrow { display: grid; gap: 6px; }
.inputrow label { font-size: var(--step-0); font-weight: 600; color: var(--ink-soft); }
.inputrow input { width: 100%; font-size: var(--step-1); }

.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

details.method { margin-top: 36px; border-top: 1px solid var(--line); padding-top: 16px; }
details.method summary { cursor: pointer; font-size: var(--step-0); color: var(--blue); font-weight: 600; }
details.method > div { padding-top: 12px; display: grid; gap: 10px; font-size: var(--step-0); color: var(--ink-soft); max-width: 72ch; }
details.method code { font-size: .8125rem; background: var(--surface-sunk); padding: 1px 5px; border-radius: 4px; color: var(--navy); }

.footer { margin-top: 36px; font-size: var(--step-0); color: var(--muted); max-width: 72ch; }

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

@media (max-width: 640px) {
  .shell { padding: 0 16px 72px; }
  .appbar__inner { padding: 10px 16px 12px; }
  .brand-logo { height: 32px; }
  .hero { padding: 32px 24px 28px; }
  .hero__arcs { width: 300px; height: 300px; right: -90px; top: -90px; }
  .step-card { grid-template-columns: 1fr; padding: 20px; }
  .step-card__num { grid-row: auto; }
  .panel__head, .panel__body { padding-left: 18px; padding-right: 18px; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

@media print {
  .appbar, .dropzone, .btn, .confirm, .hero__arcs { display: none !important; }
  .panel, .step-card { box-shadow: none; break-inside: avoid; }
}

/* Captions under a row's inputs wrap instead of clipping; long headers wrap too. */
.status-table .paidto .sub, .status-table td:nth-child(4) .sub { white-space: normal; max-width: none; }
.status-table thead th { white-space: normal; line-height: 1.3; }
.status-table .c-policy { width: 20%; }
.status-table .c-event  { width: 15%; }
