/* Accent colours follow the METRICS e-book (deep blue #004AAD, bright blue #1F80FF, text #545454);
   surfaces, lines and fills are warm neutral greys so the page reads white / off-white, not blue.
   Poppins headings, Inter body (system fallbacks when not installed). */
:root {
  --page: #ffffff;
  --bg: #ffffff;
  --field: #ffffff;
  --soft: #f7f7f7;
  --sel: #f3f3f3;
  --text: #111111;
  --muted: #545454;
  --note: #767676;
  --line: #ececec;
  --line-strong: #dedede;
  --control: #c4c4c4;
  --ink: #004aad;
  --accent: #1f80ff;
  --logo-line: #004aad;
  --ink-text: #ffffff;
  --ok: #1e7a3c;
  --warn: #a35a00;
  --bad: #c00000;
  --head: "Poppins", "Segoe UI Semibold", "Segoe UI", system-ui, sans-serif;
  --serif: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #141413; --bg: #1c1c1a; --field: #222220; --soft: #242422; --sel: #2b2a27; --text: #ecebe6; --muted: #aaa79f; --note: #8f8c85;
    --line: #2f2e2b; --line-strong: #3d3c38; --control: #5a5852; --ink: #6aa6ff; --accent: #1f80ff; --logo-line: #6aa6ff; --ink-text: #ffffff;
    --ok: #6fd391; --warn: #f2b45c; --bad: #ff7a7a; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
/* always reserve the scrollbar's space, so centred content doesn't jump sideways between short and long screens */
html { scrollbar-gutter: stable; }
body { font: 16px/1.5 var(--serif); background: var(--page); color: var(--text); }
button, input, select { font-family: var(--serif); }
h1, h2, h3, legend, .btn, .stepname { font-family: var(--head); }

/* progress + frame */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 6px; background: var(--line-strong); z-index: 30; }
.progress span { display: block; height: 100%; width: 0; background: var(--ink); transition: width .35s ease; }
.frame { min-height: 100vh; padding: 16px 12px 12px; }
.screen { display: none; background: var(--bg); border: 1px solid var(--line-strong); border-radius: 14px; min-height: calc(100vh - 28px); padding: 34px 6vw 40px; animation: fade .25s ease; }
.screen.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* split screens (welcome + questions) */
.screen.split.active { display: grid; grid-template-columns: 1fr 1.05fr; align-items: center; gap: 4vw; padding: 30px 6vw; }
.art { color: var(--text); display: flex; justify-content: center; }
.art svg { width: 100%; max-width: 440px; height: auto; }
/* welcome: the logo's gator (body only); its tail lifts and settles, and the chart on its back keeps tracing */
.welcome-art { flex-direction: column; align-items: center; }
.hero-wrap { width: 100%; max-width: 560px; }
.welcome-art .hero-gator { display: block; max-width: none; }
.hero-gator .hg-line { stroke: var(--logo-line); }
.hero-gator .hg-fill { fill: #8fc1ff; }
/* the chart part of the back: a bright-blue line traces along the peaks and troughs, holds, then runs off */
.hero-trace { stroke: var(--accent); stroke-dasharray: 100 100; animation: hero-trace 3.4s ease-in-out infinite; }
@keyframes hero-trace { 0% { stroke-dashoffset: 100; } 55%, 80% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -100; } }
@media (prefers-reduced-motion: reduce) { .hero-trace { animation: none; stroke-dashoffset: 0; } }
.content { max-width: 560px; }
/* fixed-width picture column so the illustration stays the same size on every question screen */
/* question and thank-you screens: single centred column (the drawing is only on the welcome screen) */
/* every step screen (questions, figures, results, dashboard) uses the same top padding and content width,
   so the back arrow / step name / brand line sits in exactly the same place on each one */
.screen:not(.split).active { padding-top: 26px; padding-bottom: 26px; }
#profileForm .qblock:last-child { margin-bottom: 6px; }
.qcontent, .formwrap { max-width: 1200px; margin: 0 auto; }
.thanks-content { max-width: 640px; margin: 0 auto; } /* starts at the same height as the home screen */
.thanks-content .brandmark.big { margin-bottom: 34px; } /* same gap from logo to heading as the home screen */
.track-card { margin: 22px 0 18px; padding: 20px 22px; border-radius: 12px; background: var(--sel); }
.track-card b { font-family: var(--head); font-size: 18px; }
.track-card p { margin: 6px 0 16px; color: var(--muted); }
.qcontent h2, .formwrap h2 { margin-top: 6px; }
.qcontent .lead.slim { margin-bottom: 14px; }
/* the same 26px between the last question and the Next button on every screen (matches step 2 and the results) */
#profileForm > :last-child { margin-bottom: 0; }
.qcontent .footer-row, #screen-profile.dense1 .footer-row { margin-top: 26px; }
h1 { font-size: clamp(30px, 3.4vw, 44px); font-weight: 600; line-height: 1.2; margin: 0 0 16px; color: var(--text); letter-spacing: -.01em; }
h2 { font-size: clamp(24px, 2.4vw, 30px); font-weight: 600; margin: 10px 0 4px; color: var(--text); }
.lead { font-size: 17.5px; color: var(--text); margin: 0 0 18px; }
.lead.slim { font-size: 16px; color: var(--muted); max-width: 820px; margin-bottom: 22px; }
.how { padding-left: 22px; margin: 0 0 18px; }
.how li { margin: 8px 0; padding-left: 4px; }
.how li::marker { color: var(--accent); font-weight: 700; }
.small { font-size: 14px; }
.muted { color: var(--muted); }
.actions { display: flex; gap: 14px; align-items: center; margin-top: 22px; flex-wrap: wrap; }

/* buttons */
.btn { font-size: 16px; font-weight: 500; padding: 11px 26px; border-radius: 10px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; }
.btn.primary { background: var(--ink); color: var(--ink-text); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); }
.btn.plain { border-color: transparent; text-decoration: underline; text-underline-offset: 3px; padding-left: 4px; padding-right: 4px; }
.btn.plain:hover { color: var(--accent); }
.btn.add { font-size: 15.5px; margin-top: 8px; }
.linkish { border: 0; background: none; padding: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 15px; }
.linkish:hover { color: var(--accent); }
.topline { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.back { border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: var(--text); padding: 0 4px 2px 0; }
.stepname { color: var(--muted); font-size: 14.5px; }
.toplinks { margin-left: auto; color: var(--muted); font-size: 15px; }
/* Metrigator wordmark */
.brandmark { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-family: var(--head); font-weight: 700; font-size: 15px; letter-spacing: .01em; color: var(--text); }
.brandmark.home { cursor: pointer; border-radius: 8px; }
.brandmark.home:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.brandmark .logo { width: 26px; height: 26px; flex: none; overflow: visible; }
.brandmark.big { display: flex; margin: 0 0 16px; font-size: 20px; gap: 10px; }
.brandmark.big .logo { width: 40px; height: 40px; } /* same size on the home and thank-you screens */
/* logo colours: deep-blue outline (lighter in dark mode), light-blue fill set slightly off the line like a marker sketch */
.logo .lg-line { stroke: var(--logo-line); }
.logo .lg-fill { fill: #8fc1ff; }
.logo .lg-dot { fill: var(--logo-line); }
.wordmark .wm1 { color: var(--logo-line); }
.wordmark .wm2 { color: var(--accent); }
/* animated teeth: each bar grows and shrinks from the jaw at its own pace, like live figures */
.logo .bar { transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes bar1 { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.6); } }
@keyframes bar2 { 0%, 100% { transform: scaleY(.75); } 45% { transform: scaleY(1.12); } }
@keyframes bar3 { 0%, 100% { transform: scaleY(1); } 55% { transform: scaleY(.7); } }
@keyframes bar4 { 0%, 100% { transform: scaleY(.85); } 50% { transform: scaleY(1.12); } }
.brandmark.live .b1, .brandmark:hover .b1 { animation: bar1 2.6s ease-in-out infinite; }
.brandmark.live .b2, .brandmark:hover .b2 { animation: bar2 3.1s ease-in-out infinite; }
.brandmark.live .b3, .brandmark:hover .b3 { animation: bar3 2.2s ease-in-out infinite; }
.brandmark.live .b4, .brandmark:hover .b4 { animation: bar4 2.9s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .logo .bar { animation: none !important; } }
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 26px; flex-wrap: wrap; }
.dots { display: flex; gap: 6px; margin-left: 4px; }
.dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.dots span.done { background: var(--control); }
.dots span.on { background: var(--ink); width: 22px; border-radius: 4px; }

/* inputs */
input, select {
  font-size: 15.5px; color: var(--text); background: var(--field); border: 1.5px solid var(--line-strong); border-radius: 10px;
  padding: 9px 12px; width: 100%; min-width: 0; height: 46px;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
input:disabled, select:disabled { opacity: .55; }
input::placeholder { color: var(--muted); opacity: .75; }

/* question blocks with option cards */
.qblock { border: 0; padding: 0; margin: 0 0 34px; min-width: 0; }
.qsep { border: 0; border-top: 1px solid var(--line-strong); margin: 0 0 32px; }
.qblock legend { font-size: 17px; font-weight: 600; padding: 0; margin-bottom: 8px; color: var(--text); }
.qblock legend .hint { display: block; font-family: var(--serif); font-size: 13.5px; font-weight: 400; color: var(--muted); margin-top: 1px; }
/* required answers: shown only after Next is clicked with this question unanswered */
.qerr { margin: -2px 0 8px; font-size: 13.5px; font-weight: 500; color: var(--bad); }
.qblock.missing .opt, .qblock.missing .text-answer { border-color: var(--bad); }
.qblock.missing legend { color: var(--bad); }
.options { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.options.many { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.options.short { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.options.long { grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); }
.opt { position: relative; display: flex; gap: 9px; align-items: flex-start; padding: 7px 11px; border: 1.5px solid var(--line-strong); border-radius: 10px;
  background: var(--field); cursor: pointer; transition: border-color .12s, background .12s; font-size: 14px; line-height: 1.35; }
.opt:hover { border-color: var(--accent); }
.opt.on { border-color: var(--ink); background: var(--sel); }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.opt:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.mark { flex: none; width: 18px; height: 18px; margin-top: 0; border: 2px solid var(--control); border-radius: 50%; background: var(--field); position: relative; }
.mark.sq { border-radius: 6px; }
.opt.on .mark { border-color: var(--ink); background: var(--ink); }
.opt.on .mark:not(.sq)::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--ink-text); }
.opt.on .mark.sq::after { content: ""; position: absolute; left: 4.5px; top: 0.5px; width: 4.5px; height: 9px; border: solid var(--ink-text); border-width: 0 2.3px 2.3px 0; transform: rotate(45deg); }
.opt .txt { min-width: 0; }
.opt .sub { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
/* question screens with many answers: tighter spacing first, then more columns (set by fitProfile in app.js) */
#screen-profile.dense1 .lead.slim { margin-bottom: 10px; }
#screen-profile.dense1 .qblock { margin-bottom: 24px; } /* keep clear space between questions even when compacted */
#screen-profile.dense1 .qsep { margin-bottom: 24px; }
#screen-profile.dense1 .qblock legend { margin-bottom: 6px; }
#screen-profile.dense1 .options { gap: 6px; }
#screen-profile.dense1 .opt { padding: 6px 10px; border-radius: 10px; }
#screen-profile.dense1 .opt .sub { font-size: 12px; line-height: 1.3; margin-top: 1px; }
#screen-profile.dense2 .opt .eg { display: none; }
.text-answer { max-width: 380px; }

/* figures */
.period-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 6px 0 14px; }
.period-row input[type=date] { width: 165px; }
.period-row .grow { flex: 1; min-width: 240px; }
.period-row select { width: 240px; }
.period-label { font-weight: 600; }
label.inline { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.band { background: var(--sel); color: var(--ink); font-family: var(--head); font-weight: 600; font-size: 16px; padding: 11px 18px; border-radius: 10px; margin: 26px 0 14px; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 28px; }
.fgrid.three { grid-template-columns: 1fr 1fr 150px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fgrid > .field > label { flex: 1; display: flex; align-items: flex-end; flex-wrap: wrap; gap: 0 4px; }
.field > label { font-size: 15px; color: var(--text); line-height: 1.3; }
.info { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid var(--control); color: var(--ink);
  font-size: 11px; font-weight: 700; font-style: italic; font-family: Georgia, serif; cursor: help; vertical-align: 1px; margin-left: 3px; }
.info:hover, .info:focus { background: var(--sel); border-color: var(--ink); outline: none; }
.inwrap { display: flex; align-items: center; gap: 8px; height: 48px; border: 1.5px solid var(--line-strong); border-radius: 10px; background: var(--field); padding: 0 8px; }
.inwrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31, 128, 255, .15); }
.inwrap input { border: 0; height: 100%; padding: 0 4px; background: transparent; outline: none; box-shadow: none; flex: 1; }
.inwrap input:focus { outline: none; }
.pre, .suf { flex: none; font-size: 13.5px; font-weight: 600; color: var(--ink); background: var(--sel); border: 1px solid var(--line-strong); border-radius: 6px; padding: 3px 8px; }
.suf { background: none; border: 0; color: var(--muted); font-weight: 500; }
.rm { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 15px; padding: 4px; }
.rm:hover { color: var(--bad); }
.field.ok .inwrap { border-color: #9cc9a9; }
.field.warn .inwrap { border-color: var(--warn); }
.field.bad .inwrap { border-color: var(--bad); }
.field .fmsg { font-size: 13px; min-height: 0; }
.field.warn .fmsg { color: var(--warn); }
.field.bad .fmsg { color: var(--bad); }
.field.flash .inwrap { animation: flash 1.6s ease; }
@keyframes flash { 0%, 60% { box-shadow: 0 0 0 4px rgba(31, 128, 255, .35); } 100% { box-shadow: none; } }
.fmsg { font-size: 13.5px; color: var(--muted); margin: 6px 0 0; }
.fmsg.warnmsg { color: var(--warn); }
/* figures: sections you open (area -> topic -> boxes) */
#screen-figures .formwrap { max-width: 1200px; }
/* Excel-style rows inside an open business area */
.xrow { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(180px, 1.7fr) 150px 142px 142px 120px 92px 24px; gap: 8px; align-items: center; }
.xrow-head { font-size: 13px; color: var(--muted); padding: 4px 0 6px; }
.xrow select, .xrow input { height: 44px; font-size: 14.5px; }
.xrow select { padding-right: 26px; text-overflow: ellipsis; }
.xrow-wrap { padding: 6px 0 8px; border-bottom: 1px solid var(--line); }
.xrow-note { font-size: 13px; color: var(--muted); margin-top: 5px; }
.xrow-note.ok { color: var(--ok); }
.xrow-note.warn { color: var(--warn); }
.xrow-note.bad { color: var(--bad); }
.xrow-wrap.ok [data-x=value] { border-color: #9cc9a9; }
.xrow-wrap.warn [data-x=value], .xrow-wrap.warn [data-x=timing] { border-color: var(--warn); }
.xrow-wrap.bad [data-x=value] { border-color: var(--bad); }
.xrow-wrap.flash [data-x=value] { animation: flash 1.6s ease; }
.acc-body .add { margin-top: 8px; }
#calcBtn { margin-left: auto; }
.acc-title { font-family: var(--head); font-size: 18px; font-weight: 600; margin: 30px 0 2px; color: var(--text); }
/* headline figures: plain numbers (revenue, costs, profit, cash…) shown as small cards above the metrics */
.hl-wrap { margin: 6px 0 22px; }
.hl-title { margin: 8px 0 10px; }
.hl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.hl-card { display: flex; flex-direction: column; gap: 2px; padding: 11px 14px; border: 1.5px solid var(--line-strong); border-radius: 12px; background: var(--field); min-height: 74px; }
.hl-card.empty { border-style: dashed; }
.hl-label { font-size: 13px; color: var(--muted); }
.hl-value { font-family: var(--head); font-size: 20px; font-weight: 600; color: var(--text); line-height: 1.2; }
.hl-note { font-size: 12px; color: var(--muted); }
.hl-add { align-self: flex-start; margin-top: 4px; font-size: 14px; }
.acc-lead { margin: 0 0 14px; }
.acc-area { margin-bottom: 10px; }
.acc-head, .sub-head { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; cursor: pointer; text-align: left; font-family: var(--head); }
.acc-head { background: var(--sel); color: var(--text); font-size: 16px; font-weight: 600; padding: 14px 18px; border-radius: 10px; }
.acc-head:hover { background: #ebebeb; }
.acc-name { flex: 1; }
.acc-count { font-family: var(--serif); font-size: 13px; font-weight: 500; color: var(--muted); }
.acc-count:not(:empty) { background: var(--bg); border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px 10px; }
.chev { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; flex: none; margin: 0 2px; }
.open > .acc-head > .chev, .open > .sub-head > .chev { transform: rotate(45deg); }
.acc-body { padding: 4px 4px 6px 22px; }
.sub-head { background: none; color: var(--text); font-size: 15.5px; font-weight: 500; padding: 13px 8px; border-bottom: 1px solid var(--line); }
.sub-head:hover { color: var(--ink); }
.acc-sub.open > .sub-head { color: var(--text); border-bottom-color: transparent; }
.sub-body { padding: 6px 8px 22px; border-bottom: 1px solid var(--line); }
.acc-head:focus-visible, .sub-head:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fig-row { display: grid; grid-template-columns: minmax(200px, 1fr) 110px 80px 150px 140px 140px 26px; gap: 8px; align-items: start; }
.fig { padding: 6px 0 8px; border-bottom: 1px dashed var(--line); }
.fig-status { font-size: 14px; color: var(--muted); margin-top: 4px; }
.fig-status.ok { color: var(--ok); }
.fig-status.warn { color: var(--warn); }
.fig-status.bad { color: var(--bad); }
.del { border: 0; background: none; color: var(--muted); font-size: 17px; cursor: pointer; padding: 10px 2px; }
.del:hover { color: var(--bad); }
details.more { margin-top: 22px; }
details.more summary { cursor: pointer; font-size: 16px; text-decoration: underline; text-underline-offset: 3px; }
.more-body { padding-top: 10px; }

/* results */
.res-section { margin-top: 30px; }
.res-section h3 { font-size: 21px; font-weight: 600; margin: 0 0 4px; }
.fixlist { margin: 8px 0 0; padding-left: 20px; }
.fixlist li { margin: 4px 0; }
.notice { background: #fff7ea; border: 1px solid #f3d9ad; padding: 12px 16px; border-radius: 10px; margin: 6px 0 18px; font-size: 15px; }
.notice .fixlist { margin-bottom: 0; }
/* results: same section bars and row lines as the figures screen */
#screen-results .formwrap { max-width: 1200px; }
.res-body { padding-top: 2px; }
.rrow { display: grid; grid-template-columns: minmax(0, 1fr) 200px 210px; gap: 12px; align-items: center; padding: 12px 10px; border-bottom: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.rrow:hover { background: var(--soft); }
.rrow:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.rrow.rhead { font-size: 13px; color: var(--muted); padding: 4px 10px 6px; border-bottom: 0; cursor: default; }
.rrow.rhead:hover { background: none; }
.rname { font-size: 15px; font-weight: 500; line-height: 1.35; }
.rarea { display: block; font-size: 13px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.rval { text-align: right; font-size: 16px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rval.dash { color: var(--control); font-weight: 400; }
.rhead .rval { font-size: 13px; font-weight: 400; color: var(--muted); }
.rstat { font-size: 14px; color: var(--muted); padding-left: 18px; }
.rhead > :last-child { padding-left: 18px; }
.rstat.ok { color: var(--ok); }
.rstat.warn { color: var(--warn); }
.rstat.bad { color: var(--bad); }
.footlinks { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
/* opt-in sharing, feedback, dashboard call-to-action */
.consent { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; border: 1px solid var(--line-strong); border-radius: 12px; padding: 16px 20px; margin: 4px 0 20px; }
.consent p { margin: 4px 0 0; color: var(--muted); font-size: 14.5px; max-width: 640px; }
.consent-actions { display: flex; gap: 10px; }
.feedback { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 18px 0 0; padding: 14px 0; border-top: 1px solid var(--line); }
.feedback .btn { padding: 7px 16px; font-size: 14.5px; }
.feedback label { width: 100%; }
.feedback textarea { width: 100%; font: inherit; font-size: 14.5px; border: 1.5px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; resize: vertical; background: var(--field); color: var(--text); }
.feedback textarea:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
/* dashboard picker */
.pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px; padding-top: 10px; padding-bottom: 14px; }
.pick { display: flex; gap: 12px; align-items: flex-start; padding: 11px 14px; border: 1.5px solid var(--line-strong); border-radius: 12px; cursor: pointer; position: relative; }
.pick:hover { border-color: var(--accent); }
.pick.on { border-color: var(--ink); }
.pick input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.pick:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.pick.on .mark { border-color: var(--ink); background: var(--ink); }
.pick.on .mark.sq::after { content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid var(--ink-text); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.pname { font-size: 15px; font-weight: 500; line-height: 1.35; }
#dashFreq { max-width: 520px; margin-bottom: 6px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
table.list { width: 100%; border-collapse: collapse; margin-top: 8px; }
.list th { text-align: left; font-size: 14px; font-weight: 400; color: var(--muted); padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line-strong); }
.list td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.list tr.clickable { cursor: pointer; }
.list tr.clickable:hover td { background: rgba(0, 0, 0, .03); }
.list .num-cell { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 18px; }
.list .group td { padding-top: 22px; font-size: 17px; font-weight: 600; border-bottom: 1px solid var(--line-strong); }
.list .sub, .sub { color: var(--muted); font-size: 14px; }
.mname { font-size: 16.5px; }
.status { white-space: nowrap; font-size: 15px; }
.status.ok { color: var(--ok); }
.status.warn { color: var(--warn); }
.status.bad { color: var(--bad); }
.status.muted { color: var(--muted); }
.needs { margin: 0; padding: 0; list-style: none; font-size: 15px; }
.needs li { margin: 2px 0 6px; }
.needs .where { color: var(--muted); font-size: 13.5px; }
.tag { font-size: 12.5px; border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 6px; margin-left: 8px; white-space: nowrap; color: var(--muted); }
.tag.key { border-color: var(--ink); color: var(--ink); }

/* detail panel */
.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .28); z-index: 40; }
.panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--bg); z-index: 41; overflow-y: auto; padding: 30px 30px 40px; transform: translateX(100%); transition: transform .2s ease; }
.panel.open { transform: none; }
.panel-close { position: absolute; top: 16px; right: 18px; border: 0; background: none; color: var(--text); font-size: 20px; cursor: pointer; }
.panel h2 { padding-right: 30px; }
.panel h3 { font-size: 17px; margin: 22px 0 6px; }
.big { font-size: 32px; margin: 8px 0; font-variant-numeric: tabular-nums; }
.formula { background: var(--field); border-radius: 6px; padding: 10px 12px; font-size: 15px; }
.facts { display: grid; grid-template-columns: 140px 1fr; gap: 4px 14px; margin: 0; font-size: 15px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

/* search dropdown */
.ac { position: absolute; z-index: 50; background: var(--field); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.18); max-height: 300px; overflow-y: auto; }
.ac-item { padding: 8px 12px; cursor: pointer; }
.ac-item + .ac-item { border-top: 1px solid var(--line); }
.ac-item.sel, .ac-item:hover { background: var(--bg); }
.ac-item .sub { font-size: 13px; }
.ac-none { padding: 10px 12px; color: var(--muted); }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--ink-text); padding: 9px 18px; border-radius: 7px; z-index: 60; font-size: 15px; max-width: min(560px, 90vw); text-align: center; }
/* "Your progress is saved" message */

@media (max-width: 900px) {
  .screen.split.active { grid-template-columns: 1fr; }
  .art svg { max-width: 260px; }
  /* on narrow screens read the welcome text first, then the chart and the buttons */
  #screen-welcome .welcome-art { order: 2; }
  .hero-wrap { max-width: 360px; }
  .fgrid, .fgrid.three { grid-template-columns: 1fr; }
  .acc-body { padding-left: 8px; }
  .xrow-head { display: none; }
  .rrow { grid-template-columns: minmax(0, 1fr) auto; }
  .rrow .rstat { grid-column: 1 / -1; padding-left: 0; }
  .rrow.rhead { display: none; }
  .xrow { grid-template-columns: 1fr 1fr; }
  .xrow > :nth-child(2) { grid-column: 1 / -1; }
  .fig-row { grid-template-columns: 1fr 1fr; }
  .fig-row > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .options, .options.many { grid-template-columns: 1fr; }
  .screen { padding: 24px 18px 30px; }
  .toplinks { margin-left: 0; }
}

/* contact button + form */
.contact-fab { position: fixed; left: 18px; bottom: 18px; z-index: 40; border: 1.5px solid var(--line-strong); background: var(--bg); color: var(--text); border-radius: 999px; padding: 8px 16px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.contact-fab:hover, .contact-fab:focus-visible { border-color: var(--accent); color: var(--accent); outline: none; }
dialog.contact { width: min(620px, calc(100vw - 32px)); font-size: 14.5px; max-height: calc(100vh - 32px); border: 1px solid var(--line-strong); border-radius: 14px; padding: 26px 26px 20px; background: var(--bg); color: var(--text); box-shadow: 0 18px 50px rgba(0,0,0,.25); }
dialog.contact::backdrop { background: rgba(0,0,0,.35); }
dialog.contact h2 { margin: 0 0 6px; }
dialog.contact form { position: relative; }
dialog.contact .panel-close { top: -10px; right: -8px; }
dialog.contact .field { margin-top: 14px; }
dialog.contact .field label { display: block; font-weight: 600; font-size: 14.5px; margin-bottom: 6px; }
dialog.contact select, dialog.contact input[type=email] { width: 100%; }
dialog.contact textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 15px; border: 1.5px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; resize: vertical; background: var(--field, var(--bg)); color: var(--text); }
dialog.contact textarea:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
dialog.contact .footer-row { margin-top: 14px; }
dialog.contact .fmsg.ok { color: var(--ok); }
dialog.contact .fmsg.bad { color: var(--bad); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 640px) { .contact-fab { left: 12px; bottom: 12px; padding: 7px 13px; font-size: 13px; } }
@media print { .sitefoot, .contact-fab { display: none; } }
dialog.contact .contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
dialog.contact .contact-grid .field { margin-top: 14px; }
dialog.contact input[type=text] { width: 100%; }
dialog.contact .invalid { border-color: var(--bad) !important; }
/* slightly smaller text so the form feels less crowded */
dialog.contact h2 { font-size: 25px; }
dialog.contact .small { font-size: 13.5px; }
dialog.contact h2 + p { margin: 2px 0 0; }
dialog.contact .contact-grid .field { margin-top: 18px; }
dialog.contact .field label { font-size: 13.5px; }
dialog.contact input, dialog.contact select, dialog.contact textarea { font-size: 14px; }
dialog.contact .btn { font-size: 15px; padding: 9px 22px; }
@media (max-width: 520px) { dialog.contact .contact-grid { grid-template-columns: 1fr; } }
/* business-signal reasons in the metric panel */
.why-list { margin: 6px 0 10px; padding-left: 20px; }
.why-list li { margin: 4px 0; line-height: 1.45; }
/* anonymous-saving notice with its opt-out link */
/* site footer: follows straight after each screen's content, with the same gap on every screen, and closes the card.
   The screen card loses its bottom edge and the footer supplies it. Text is centred and clears the floating Contact us button. */
.frame { min-height: 0; }
/* every screen fills at least the window, so the footer is never visible until you scroll (the card starts 16px down) */
.screen { min-height: calc(100vh - 15px); }
.screen.active { border-bottom: 0; border-radius: 14px 14px 0 0; }
.sitefoot { display: flex; align-items: center; padding: 16px 124px 18px; /* narrow enough for the notice to sit on one line (from about 1280px wide), wide enough to clear the floating Contact us button */ text-align: center; background: var(--soft); border: 1px solid var(--line-strong); border-top: 1px solid var(--line); border-radius: 0 0 14px 14px; }
.foot-text { flex: 1; min-width: 0; }
/* content always starts at the top of the screen (the welcome screen does not centre vertically) */
.screen.split.active { align-items: start; align-content: start; padding-top: 26px; }
.screen.split.active > .welcome-art { align-self: center; } /* the gator sits level with the middle of the text */
/* home screen header: logo on the left, Free guide button on the right, both 40px tall */
/* the home screen uses the same 1200px-wide column as every other screen, so the header lines up with their top bars */
.screen.split.active { row-gap: 34px; padding-left: calc(6vw + max(0px, (100vw - 26px - 12vw - 1200px) / 2)); padding-right: calc(6vw + max(0px, (100vw - 26px - 12vw - 1200px) / 2)); }
.welcome-top { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.welcome-top .brandmark.big { margin: 0; font-size: 20px; gap: 10px; }
.welcome-top .brandmark.big .logo { width: 40px; height: 40px; }
.guide-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px 0 15px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--bg); color: var(--ink); font-family: var(--head); font-size: 15px; font-weight: 600; cursor: pointer; transition: background .15s ease, color .15s ease; }
.guide-btn:hover, .guide-btn:focus-visible { background: var(--ink); color: var(--ink-text); outline: none; }
.guide-btn svg { flex: none; }
.welcome-nav { display: flex; align-items: center; gap: 8px; }
.nav-link { display: inline-flex; align-items: center; height: 40px; padding: 0 14px; border-radius: 999px; font-family: var(--head); font-size: 15px; font-weight: 600; color: var(--text); text-decoration: none; transition: background .15s ease, color .15s ease; }
.nav-link:hover, .nav-link:focus-visible { background: var(--sel); color: var(--ink); outline: none; }
@media (max-width: 900px) { .screen.split.active { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) {
  .welcome-top { gap: 8px; }
  .welcome-top .brandmark.big { font-size: 17px; gap: 8px; }
  .welcome-top .brandmark.big .logo { width: 32px; height: 32px; }
  .welcome-nav { gap: 4px; }
  .nav-link { height: 36px; padding: 0 10px; font-size: 14px; }
  .guide-btn { height: 36px; padding: 0 13px 0 11px; font-size: 14px; gap: 6px; }
  .guide-btn svg { width: 16px; height: 16px; }
}
/* blog page (placeholder until the first articles are published) */
.blog-empty { max-width: 640px; }
.privacy-note { margin: 0; font-size: 11.5px; line-height: 1.5; color: var(--note); }
.foot-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 8px; margin-top: 6px; font-size: 11.5px; color: var(--note); }
.foot-meta a, .foot-meta .linkish { color: var(--note); font-size: inherit; text-decoration: none; }
.foot-meta a:hover, .foot-meta .linkish:hover { color: var(--ink); text-decoration: underline; }
.privacy-note .nowrap { white-space: nowrap; } /* the two links wrap together, never "Privacy" alone */
.privacy-note .linkish { font-size: inherit; }
.privacy-note a, .contact-privacy a { color: var(--ink); text-underline-offset: 3px; }
/* the same gap between the last thing on every screen (usually the Next button) and the footer */
.screen.active, .screen.split.active, .screen:not(.split).active, #screen-profile.dense1.active { padding-bottom: 88px; }
@media (max-width: 640px) {
  .sitefoot { padding: 14px 18px 62px; } /* phones: the floating Contact us button sits under the text */
}

/* free guide screen */
.guide { display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: 48px; align-items: start; margin-top: 18px; }
.guide-cover { width: 100%; height: auto; border: 1px solid var(--line-strong); border-radius: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.10); background: #fff; }
.guide-body { max-width: 640px; }
.guide-body h2 { margin: 0; }
.guide-tag { font-family: var(--head); font-weight: 600; color: var(--ink); font-size: 18px; margin: 4px 0 14px; }
.guide-points { margin: 0 0 12px; padding-left: 20px; }
.guide-points li { margin: 5px 0; }
.guide-meta { font-size: 13.5px; color: var(--muted); margin: 0 0 22px; }
.guide-label { display: block; font-weight: 600; font-size: 14.5px; margin-bottom: 6px; }
.guide-row { display: flex; gap: 10px; flex-wrap: wrap; }
.guide-row input { flex: 1 1 240px; min-width: 0; font: inherit; font-size: 15px; padding: 10px 12px; border: 1.5px solid var(--line-strong); border-radius: 10px; background: var(--field); color: var(--text); }
.guide-row input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.guide-row input.invalid { border-color: var(--bad); }
.guide-opt { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; font-size: 14px; color: var(--text); cursor: pointer; }
.guide-opt input[type=checkbox] { flex: 0 0 auto; width: 16px; height: 16px; min-width: 0; padding: 0; margin: 3px 0 0; border: 0; accent-color: var(--ink); }
.guide-opt span { flex: 1; }
.guide-fine { font-size: 12.5px; color: var(--note); margin: 10px 0 0; }
.guide-fine a { color: var(--ink); }
.guide-done { border: 1px solid var(--line-strong); border-left: 4px solid var(--ok); border-radius: 10px; padding: 14px 18px; background: var(--soft); }
.guide-done p { margin: 4px 0; }
.guide-done-title { font-family: var(--head); font-weight: 600; font-size: 17px; color: var(--ok); }
/* a small "free guide" card on the results and thank-you screens, and a one-line link on the welcome screen */
/* compact: a slim strip, smaller than the page's main buttons */
.guide-promo { display: flex; align-items: center; gap: 12px; margin-top: 26px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); font-size: 13px; }
.guide-promo img { width: 30px; height: auto; border: 1px solid var(--line-strong); border-radius: 2px; background: #fff; flex-shrink: 0; }
.guide-promo > div { flex: 1; min-width: 0; line-height: 1.4; }
.guide-promo b { font-size: 13.5px; }
.guide-promo p { margin: 1px 0 0; font-size: 12.5px; color: var(--muted); }
.guide-promo .btn { flex-shrink: 0; font-size: 13px; padding: 5px 13px; }
#screen-results .guide-promo { margin-top: 34px; }
.thanks-content .guide-promo { margin-top: 34px; }
.guide-teaser { margin: 18px 0 0; font-size: 14px; color: var(--muted); }
.guide-teaser .linkish { font-size: inherit; }
.guide-new { display: inline-block; font-size: 11.5px; font-weight: 600; color: var(--ink); border: 1px solid var(--ink); border-radius: 999px; padding: 0 8px; margin-right: 6px; }
@media (max-width: 720px) {
  .guide { grid-template-columns: 1fr; gap: 22px; }
  .guide-cover { max-width: 180px; }
  .guide-promo { flex-wrap: wrap; }
}

/* privacy page (no site footer, so its card keeps all four edges) */
.screen.active.policy { border-bottom: 1px solid var(--line-strong); border-radius: 14px; min-height: 0; }
.policy { max-width: 900px; margin: 0 auto; }
.policy a.back, .policy a.brandmark { text-decoration: none; }
.policy h1 { margin: 26px 0 10px; }
.policy h2 { font-size: 19px; margin: 30px 0 8px; }
.policy p, .policy li { max-width: 720px; color: var(--text); }
.policy ul { padding-left: 22px; }
.policy li { margin: 4px 0; }
.policy a { color: var(--ink); text-underline-offset: 3px; }
.policy a.btn { text-decoration: none; display: inline-block; }
.policy-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 22px 0 8px; }
.policy-summary > div { background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.policy-summary h2 { margin: 0 0 6px; font-size: 16px; color: var(--ink); }
.policy-summary p { margin: 0; font-size: 15px; }
@media (max-width: 720px) { .policy-summary { grid-template-columns: 1fr; } }
