/* Phone first: designed at 390px, widened further down.
   Fonts are self-hosted in /fonts (no CDN) so the site works offline and under its content security policy. */
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/poppins-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/poppins-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/poppins-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/poppins-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/source-sans-3-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/source-sans-3-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/source-sans-3-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/source-sans-3-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/source-sans-3-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/source-sans-3-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

/* Themes: Light and Dark. Light follows the Minitech brand guide:
   Minitech Blue #0050A3 (headings, buttons, links, the band on Home), Mango #F9A149 (the main button, with Minitech Blue text),
   Minitech Orange #F26B28 (small accents), Light Grey #EFEEED, Grey for body text. The brand's Dark Blue is not used.
   Minitech Blue on Mango is 3.8:1, so that one label is kept large and bold (see .btn-cta).
   Rule: nothing below this block names a colour. --accent is for fills, --accent-text for text.
   --edge is the outline of anything you can type in or tap; it is at least 3:1 against the page and the cards.
   The dark override is screen-only, so printing always uses the light values. */
:root { --nav-bg:#FFFFFF; --nav-text:#0050A3; --rail-line:#DCDFE5;
  --page:#F6F6F5; --card:#FFFFFF; --line:#DAD9D7; --edge:#8A8D93; --strong:#0050A3; --body:#30343A; --muted:#5E6266;
  --primary:#0050A3; --on-primary:#FFFFFF; --link:#0050A3;
  --accent:#F26B28; --accent-text:#B34715; --on-accent:#4A1A00; --cta:#F9A149; --on-cta:#0050A3;
  --hero:#0050A3; --hero-text:#FFFFFF; --hero-soft:#D5E1F3; --hero-hl:#F9A149;
  --soft:#FAFAF9; --r-card:12px; --r-ctl:10px;
  --brand-bg:#E6EEF7; --brand-fg:#0050A3; --ok-bg:#DAF1E0; --ok-fg:#0E5A26; --warn-bg:#FFE3B3; --warn-fg:#6B3D00; --bad-bg:#FADADF; --bad-fg:#9B0A22; --neutral-bg:#EFEEED;
  --display:"Poppins","Segoe UI Semibold","Segoe UI",system-ui,-apple-system,sans-serif;
  --text:"Source Sans 3","Source Sans Pro","Segoe UI",system-ui,-apple-system,Roboto,sans-serif;
  --mono:ui-monospace,"Cascadia Mono","SF Mono",Consolas,"Liberation Mono",Menlo,monospace;
  --r: var(--r-card); --tabs: 64px; color-scheme:light; }
@media screen {
  html[data-theme="dark"] { --nav-bg:#181818; --nav-text:#F3F3F3; --rail-line:#3D3D3D;
    --page:#1F1F1F; --card:#292929; --line:#3D3D3D; --edge:#8A8A8A; --strong:#F3F3F3; --body:#E0E0E0; --muted:#ADADAD;
    --primary:#6C9BF2; --on-primary:#141414; --link:#8DB4FF;
    --accent:#F26B28; --accent-text:#FF9A66; --cta:#F9A149; --on-cta:#0050A3;
    --hero:#0050A3; --hero-text:#FFFFFF; --hero-soft:#C9D6EC; --hero-hl:#F9A149; --soft:#242424;
    --brand-bg:#123E6C; --brand-fg:#CBD8FF; --ok-bg:#17361F; --ok-fg:#8EE0A8; --warn-bg:#4A3A12; --warn-fg:#FFD98A; --bad-bg:#4A1C24; --bad-fg:#FFA3B1; --neutral-bg:#383838; color-scheme:dark; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--page); }
body { margin: 0; background: var(--page); color: var(--body); font: 17px/1.5 var(--text); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; color: var(--strong); line-height: 1.25; margin: 0 0 8px; }
h1 { font-size: 26px; } h2 { font-size: 20px; } h3, .h3 { font-size: 17px; margin-top: 22px; }
p { margin: 0 0 12px; }
a { color: var(--link); }
.muted { color: var(--muted); } .small { font-size: 14px; } .center { text-align: center; }
.ic { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Headings and panels that take the keyboard focus after a repaint are not controls, so they show no ring. */
#main:focus, [data-focus]:focus { outline: none; }

/* shell: the header scrolls away with the page; the tabs stay put */
.top { display: flex; align-items: center; gap: 10px; padding: 10px 16px; min-height: 60px; background: var(--nav-bg); border-bottom: 1px solid var(--rail-line); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; min-width: 0; }
.brand-logo { display: block; height: 38px; width: auto; flex: none; }
.logo-dark { display: none; }
html[data-theme="dark"] .logo-light { display: none; } html[data-theme="dark"] .logo-dark { display: block; }
.brand-name { font: 600 15px/28px var(--display); color: var(--nav-text); padding-left: 12px; border-left: 1px solid var(--rail-line); white-space: nowrap; }
.badge { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; text-decoration: none; white-space: nowrap; }
.badge-amber { background: var(--warn-bg); color: var(--warn-fg); } .badge-navy { background: var(--primary); color: var(--on-primary); }
.view { padding: 18px 16px calc(var(--tabs) + 28px); max-width: 720px; margin: 0 auto; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; background: var(--card); border-top: 1px solid var(--line);
  height: calc(var(--tabs) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px); }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px;
  color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 600; }
.tab.on { color: var(--strong); } .tab.on .ic { stroke: var(--accent); }
.back { display: inline-flex; align-items: center; padding: 8px 0; margin-bottom: 4px; text-decoration: none; font-weight: 600; min-height: 44px; color: var(--link); }
.back-btn { background: none; border: 0; font: 600 17px var(--text); cursor: pointer; }

/* buttons and inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 18px; border: 1.5px solid transparent;
  border-radius: var(--r-ctl); font: 600 16px var(--display); cursor: pointer; text-decoration: none; background: var(--brand-bg); color: var(--brand-fg); }
.btn .ic { width: 20px; height: 20px; }
.btn-primary { background: var(--primary); color: var(--on-primary); } .btn-primary:active { filter: brightness(1.2); }
/* Minitech Blue on Mango is 3.8:1. That passes only for large bold text (14pt bold, 18.66px), so this label stays at least that big and bold. */
.btn-cta { background: var(--cta); color: var(--on-cta); font-size: 18.7px; font-weight: 700; } .btn-cta:active { filter: brightness(1.08); }
.btn-ghost { background: transparent; border-color: var(--edge); color: var(--strong); }
.btn-danger { background: var(--bad-fg); color: var(--bad-bg); } .danger-text { color: var(--bad-fg); }
.btn-block { display: flex; width: 100%; margin-top: 12px; }
.btn-small { min-height: 44px; padding: 8px 14px; font-size: 14px; background: var(--primary); color: var(--on-primary); }
.row { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; } .row .btn { flex: 1 1 140px; }
.file-btn { position: relative; overflow: hidden; } .file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.lbl { display: block; font-weight: 600; font-size: 14px; color: var(--muted); margin: 14px 0 6px; }
.input { width: 100%; padding: 12px; border: 1.5px solid var(--edge); border-radius: var(--r-ctl); font: inherit; color: inherit; background: var(--card); }
.input::placeholder { color: var(--muted); opacity: 1; }
.input:focus, .btn:focus-visible, .opt:focus-visible, summary:focus-visible, a:focus-visible, .theme-opt:focus-visible, .step3:focus-visible, .case-card:focus-visible, .back-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
textarea.input { resize: vertical; }
.stackform { display: flex; flex-direction: column; gap: 10px; }
.err { color: var(--bad-fg); font-weight: 600; }

/* links that leave the site */
.ext { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.ext .ic { width: 16px; height: 16px; }
.more { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; margin: 4px 0 12px; }

/* home */
.hero { background: var(--hero); color: var(--hero-text); border-radius: var(--r); padding: 22px 18px 16px; margin-bottom: 14px; }
.hero h1 { color: var(--hero-text); font-size: 28px; line-height: 1.15; margin-bottom: 10px; } .hero .hl { color: var(--hero-hl); }
.hero p { color: var(--hero-soft); margin-bottom: 4px; }
.hero .btn-cta { margin-top: 14px; padding: 12px; } .hero .btn-cta .ic { display: none; } .hero-note { font-size: 14px; text-align: center; margin: 8px 0 0; }
.sec-h { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-text); margin: 24px 0 8px; }
.sec-sub { margin: -4px 0 10px; font-size: 15px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.card-link { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; min-height: 72px; }
.card-ic { width: 44px; height: 44px; border-radius: 50%; background: var(--brand-bg); color: var(--brand-fg); display: grid; place-items: center; flex: none; }
.card-main { display: flex; flex-direction: column; flex: 1; min-width: 0; } .card-main strong { font-family: var(--display); color: var(--strong); }
.card-main > span { color: var(--muted); font-size: 15px; line-height: 1.35; }
.meta { font-style: normal; font-size: 13px; font-weight: 600; color: var(--accent-text); margin-top: 4px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.card-alt { background: var(--soft); }
.chev-r { width: 10px; height: 10px; border-right: 2.5px solid var(--muted); border-top: 2.5px solid var(--muted); transform: rotate(45deg); flex: none; margin-right: 4px; }

/* collapsible sections */
.fold { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 10px; }
.fold summary { display: flex; align-items: center; gap: 10px; padding: 14px; min-height: 56px; cursor: pointer; list-style: none; font-weight: 600; }
.fold summary::-webkit-details-marker { display: none; }
.fold-title { flex: 1; display: flex; align-items: center; gap: 10px; }
.chev { width: 11px; height: 11px; border-right: 2.5px solid var(--strong); border-bottom: 2.5px solid var(--strong); transform: rotate(45deg); transition: transform .15s; flex: none; margin: 0 6px 4px; }
.fold[open] > summary .chev { transform: rotate(-135deg); margin-bottom: -4px; }
.fold-body { padding: 0 14px 14px; }
.fold-small { border: 0; background: transparent; margin: 0; } .fold-small summary { min-height: 44px; padding: 6px 0; font-size: 14px; color: var(--muted); }
.fold-small .fold-body { padding: 0 0 8px; display: flex; flex-direction: column; gap: 8px; }
.num { width: 28px; height: 28px; border-radius: 50%; background: var(--brand-bg); color: var(--brand-fg); display: grid; place-items: center; font: 600 14px var(--text); flex: none; }
.suggest { background: var(--brand-bg); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; margin-bottom: 10px; font-size: 15px; }
.tick { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 8px 0; cursor: pointer; }
.tick input { width: 24px; height: 24px; flex: none; margin: 1px 0 0; accent-color: var(--primary); }
.tick.big span { font-weight: 600; }
.pill { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pill-ok, .pill-safe { background: var(--ok-bg); color: var(--ok-fg); } .pill-taken, .pill-now { background: var(--bad-bg); color: var(--bad-fg); }
.pill-risk, .pill-soon { background: var(--warn-bg); color: var(--warn-fg); } .pill-later { background: var(--neutral-bg); color: var(--body); }
.done-note { background: var(--ok-bg); color: var(--ok-fg); padding: 12px; border-radius: var(--r); font-weight: 600; margin-top: 12px; }
.done-note a { color: inherit; }

/* topics: every step is on the page */
.steps { list-style: none; padding: 0; margin: 14px 0 4px; }
.step-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin-bottom: 10px; }
.step-card h2 { display: flex; align-items: center; gap: 10px; font-size: 18px; margin-bottom: 8px; }
.step-card > :last-child { margin-bottom: 0; }

/* wizards */
.dots { display: flex; gap: 6px; margin: 4px 0 16px; } .dots span { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.dots .done { background: var(--primary); } .dots .on { background: var(--accent); }
.bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; margin-bottom: 18px; } .bar span { display: block; height: 100%; background: var(--accent); }
.q { font-size: 22px; margin-top: 6px; }
.hint { background: var(--neutral-bg); border-left: 6px solid var(--accent); padding: 10px 12px; border-radius: 6px; font-size: 15px; overflow-wrap: anywhere; margin-bottom: 12px; }
.hint > :last-child { margin-bottom: 0; }
.addr { font-family: var(--mono); font-size: .92em; font-weight: 600; color: var(--strong); background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; overflow-wrap: anywhere; }
.links { list-style: none; padding: 0; margin: 8px 0; } .links li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.flag { font-size: 12.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.flag-bad { background: var(--bad-bg); color: var(--bad-fg); } .flag-warn { background: var(--warn-bg); color: var(--warn-fg); } .flag-ok { background: var(--ok-bg); color: var(--ok-fg); }
.options { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.opt { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 14px 16px; text-align: left; background: var(--card); border: 1.5px solid var(--edge); border-radius: var(--r); font: 600 16px var(--text); color: var(--body); cursor: pointer; }
.opt.picked { border-color: var(--primary); background: var(--brand-bg); color: var(--brand-fg); }
.opt.right { border-color: var(--ok-fg); background: var(--ok-bg); color: var(--ok-fg); } .opt.wrong { border-color: var(--bad-fg); background: var(--bad-bg); color: var(--bad-fg); }
.opt.dim { opacity: .55; } .opt:disabled { cursor: default; }
.opt .mark { display: inline-flex; flex: none; } .opt .mark .ic { width: 20px; height: 20px; stroke-width: 2.6; }
.opt-ic .ic { color: var(--primary); }
.explain { padding: 12px; border-radius: var(--r); margin-bottom: 4px; } .explain.ok { background: var(--ok-bg); color: var(--ok-fg); } .explain.no { background: var(--warn-bg); color: var(--warn-fg); }
.verdict, .grade { border-radius: var(--r); padding: 18px; margin: 8px 0 16px; text-align: center; }
.verdict h2, .verdict p { color: inherit; margin: 0; }
.verdict-high { background: var(--bad-bg); color: var(--bad-fg); } .verdict-medium { background: var(--warn-bg); color: var(--warn-fg); } .verdict-low { background: var(--neutral-bg); color: var(--body); }
.todo { padding-left: 22px; } .todo li { margin-bottom: 8px; }
.plain { padding-left: 20px; } .plain li { margin-bottom: 6px; }
.report { list-style: none; padding: 0; margin: 0 0 14px; } .report li { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; margin-bottom: 8px; }
.grade-label { display: block; font: 700 30px var(--display); } .grade-sub { display: block; font: 600 16px var(--display); } .grade p { margin: 10px 0 0; }
.grade-good { background: var(--ok-bg); color: var(--ok-fg); } .grade-gaps { background: var(--warn-bg); color: var(--warn-fg); } .grade-start { background: var(--bad-bg); color: var(--bad-fg); }
.gaps { list-style: none; padding: 0; margin: 0 0 4px; } .gaps li { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cta-box { background: var(--card); border: 1px solid var(--line); border-left: 6px solid var(--accent); border-radius: 6px; padding: 14px; margin: 18px 0 12px; }
.cta-box strong { font-family: var(--display); color: var(--strong); } .cta-box p { margin: 4px 0 10px; }

/* action list */
.group h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; margin: 22px 0 8px; }
.group-now h2 { color: var(--bad-fg); } .group-soon h2 { color: var(--warn-fg); } .group-later h2 { color: var(--muted); }
.action { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 14px; margin-bottom: 8px; }
.action.is-done .tick span { text-decoration: line-through; color: var(--muted); }
.empty { text-align: center; padding: 32px 12px; background: var(--card); border: 1px dashed var(--edge); border-radius: var(--r); margin-top: 16px; }
.print-head, .print-note { display: none; }

/* follow the breach */
.steps3 { display: flex; gap: 6px; margin: 4px 0 16px; }
.step3 { flex: 1; min-height: 60px; padding: 8px 6px; background: var(--card); border: 1.5px solid var(--edge); border-radius: var(--r); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px; font: 600 12px/1.2 var(--text); color: var(--muted); }
.step3 b { width: 22px; height: 22px; border-radius: 50%; background: var(--line); color: var(--strong); display: grid; place-items: center; font-size: 12px; }
.step3.on { border-color: var(--primary); border-width: 2px; color: var(--strong); } .step3.on b { background: var(--accent); color: var(--on-accent); }
/* the choice of story comes first */
.cases { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 14px; }
.case-blurb { display: none; }
.case-card { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 72px; padding: 9px 14px; text-align: left; background: var(--card); border: 1.5px solid var(--edge); border-radius: var(--r); font: inherit; color: inherit; cursor: pointer; }
.case-head { margin: 0 0 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .case-head h1 { font-size: 18px; margin: 0; }
/* one step: the picture, the words, and a bar of buttons that stays in reach above the tabs */
.story-step { margin-bottom: 4px; }
.stepbar { position: sticky; bottom: calc(var(--tabs) + env(safe-area-inset-bottom, 0px)); z-index: 3; display: flex; gap: 8px; margin: 8px -16px 0; padding: 10px 16px; background: var(--page); border-top: 1px solid var(--line); }
.stepbar .btn { padding: 12px 14px; min-width: 48px; } .stepbar .grow { flex: 1; }
.wide-only { display: none; }
/* scenes: one small animation per step. The drawn state is the last frame; keyframes only say where each piece starts. */
.scene { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin: 4px 0 14px; }
.scene-svg { display: block; width: 100%; height: auto; font-family: var(--text); }
.s-card { fill: var(--page); stroke: var(--line); } .s-field { fill: var(--card); stroke: var(--line); } .s-cover { fill: var(--card); }
.s-cap { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; fill: var(--muted); }
.s-t { font-size: 12px; font-weight: 600; fill: var(--body); } .s-sm { font-size: 11px; } .s-big { font-size: 16px; font-weight: 700; fill: var(--strong); }
.s-muted { fill: var(--muted); } .s-bad { fill: var(--bad-fg); } .s-ok { fill: var(--ok-fg); } .s-mid { text-anchor: middle; }
.s-bar { fill: var(--line); } .s-dot { fill: var(--brand-bg); } .s-hl, .s-pill-bad { fill: var(--bad-bg); } .s-pill-ok { fill: var(--ok-bg); }
.s-btn { fill: var(--primary); } .s-btn-t { fill: var(--on-primary); font-size: 12px; font-weight: 700; text-anchor: middle; }
.s-strike { fill: var(--bad-fg); } .s-badline { fill: none; stroke: var(--bad-fg); stroke-width: 2; }
.s-badfill { fill: var(--bad-fg); } .s-okfill { fill: var(--ok-fg); } .s-okmark { fill: none; stroke: var(--card); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.s-ic { fill: var(--brand-bg); } .s-icmark { fill: none; stroke: var(--brand-fg); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.s-line { fill: none; stroke: var(--muted); stroke-width: 1.5; } .s-dash { stroke-dasharray: 4 4; } .s-badstroke { stroke: var(--bad-fg); stroke-width: 2; }
.s-env { fill: var(--bad-bg); stroke: var(--bad-fg); stroke-width: 1.5; } .s-envflap { fill: none; stroke: var(--bad-fg); stroke-width: 1.5; }
.s-person { fill: none; stroke: var(--body); stroke-width: 1.8; stroke-linecap: round; }
.s-ring-bad { fill: none; stroke: var(--bad-fg); stroke-width: 2.5; } .s-ring-ok { fill: none; stroke: var(--ok-fg); stroke-width: 2.5; }
.a-in, .a-out, .a-wipe, .a-strike, .a-fly, .a-pulse { animation-delay: var(--d, 0s); animation-fill-mode: backwards; animation-timing-function: ease-out; }
.a-in { animation-name: sc-in; animation-duration: .45s; }
.a-out { opacity: 0; animation-name: sc-out; animation-duration: .35s; }
.a-wipe { transform: scaleX(0); transform-origin: right; transform-box: fill-box; animation-name: sc-wipe; animation-duration: .8s; animation-timing-function: steps(9); }
.a-strike { transform-origin: left; transform-box: fill-box; animation-name: sc-strike; animation-duration: .35s; }
.a-fly { animation-name: sc-fly; animation-duration: 1.3s; animation-timing-function: ease-in-out; }
.a-grow { transform-origin: bottom; transform-box: fill-box; animation-name: sc-grow; animation-duration: .5s; animation-delay: var(--d, 0s); animation-fill-mode: backwards; animation-timing-function: ease-out; }
@keyframes sc-grow { from { transform: scaleY(0); } }
.a-pulse { transform-origin: center; transform-box: fill-box; animation-name: sc-pulse; animation-duration: .5s; }
@keyframes sc-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes sc-out { from { opacity: 1; } }
@keyframes sc-wipe { from { transform: scaleX(1); } }
@keyframes sc-strike { from { transform: scaleX(0); } }
@keyframes sc-fly { from { opacity: 0; transform: translate(var(--dx, 0), var(--dy, 0)); } 15% { opacity: 1; } }
@keyframes sc-pulse { 50% { transform: scale(.93); opacity: .65; } }
.callout { font: 600 17px var(--display); color: var(--strong); margin: 14px 0 4px; }
.timeline { list-style: none; padding: 0 0 0 18px; margin: 8px 0 12px; border-left: 3px solid var(--accent); }
.timeline li { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin-bottom: 12px; animation: rise .25s ease-out; }
.timeline li::before { content: ""; position: absolute; left: -28px; top: 18px; width: 14px; height: 14px; border-radius: 50%; background: var(--card); border: 3px solid var(--accent); }
.timeline .h3 { margin: 6px 0 4px; }
.when { display: inline-block; font: 700 11px var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--on-primary); background: var(--primary); border-radius: 999px; padding: 4px 10px; }
.notice { font-size: 15px; border-top: 1px solid var(--line); padding-top: 8px; margin: 8px 0 0; }
/* part 3: the result stays on screen while the switches under it are flipped */
.chain-result { position: sticky; top: 0; z-index: 3; background: var(--page); padding: 8px 0 10px; margin-bottom: 4px; }
.tally { text-align: center; padding: 8px 10px; border-radius: var(--r); font-size: 16px; }
.tally strong { font: 700 20px var(--display); }
.tally-taken { background: var(--bad-fg); color: var(--bad-bg); } .tally-risk { background: var(--warn-bg); color: var(--warn-fg); } .tally-safe { background: var(--ok-fg); color: var(--ok-bg); }
.tiles { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 2px 6px; border: 2px solid var(--line); border-radius: 10px; background: var(--card); text-align: center; min-width: 0; }
.tile > .ic { width: 20px; height: 20px; }
.tile-name { font-size: 12.5px; font-weight: 700; line-height: 1.2; color: var(--strong); }
.tile-state { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 700; }
.tile-state .ic { width: 12px; height: 12px; stroke-width: 3; }
.tile-taken { border-color: var(--bad-fg); background: var(--bad-bg); color: var(--bad-fg); }
.tile-risk { border-color: var(--warn-fg); background: var(--warn-bg); color: var(--warn-fg); }
.tile-safe { border-color: var(--ok-fg); background: var(--ok-bg); color: var(--ok-fg); }
.tile-taken .tile-name, .tile-risk .tile-name, .tile-safe .tile-name { color: inherit; }
.chain-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 2px 10px; margin: 2px 0 6px; } .chain-head .h3 { margin: 0; }
.btn-mini { min-height: 44px; padding: 6px 12px; font-size: 14px; }
.switches { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.switch { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.track { width: 46px; height: 28px; border-radius: 14px; background: var(--edge); position: relative; flex: none; transition: background .15s; }
.track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--card); transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.switch input:checked + .track { background: var(--ok-fg); } .switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 3px solid var(--accent); outline-offset: 2px; }
.switch-label { font-weight: 600; font-size: 15px; line-height: 1.3; }
.chain { list-style: none; padding: 0; margin: 0 0 14px; }
.node { position: relative; display: flex; gap: 12px; padding: 12px; background: var(--card); border: 2px solid var(--line); border-radius: var(--r); margin-bottom: 18px; }
.node:not(:last-child)::after { content: ""; position: absolute; left: 32px; bottom: -20px; width: 3px; height: 18px; background: var(--line); }
.node > div { flex: 1; min-width: 0; } .node p { margin: 4px 0 0; font-size: 15px; line-height: 1.4; }
.node-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.node-ic { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--brand-bg); color: var(--brand-fg); }
.node-taken { border-color: var(--bad-fg); } .node-taken .node-ic { background: var(--bad-fg); color: var(--bad-bg); } .node-taken:not(:last-child)::after { background: var(--bad-fg); }
.node-risk { border-color: var(--warn-fg); } .node-risk .node-ic { background: var(--warn-fg); color: var(--warn-bg); }
.node-safe .node-ic { background: var(--ok-bg); color: var(--ok-fg); } .node-safe p { color: var(--muted); }
.edit { border-top: 1px solid var(--line); padding: 6px 0 10px; }

/* something's gone wrong: the numbers come first */
.who { background: var(--card); border: 1px solid var(--line); border-left: 6px solid var(--bad-fg); border-radius: 6px; padding: 14px; margin: 6px 0 4px; }
.who h2 { margin-bottom: 0; } .who .lbl { margin-top: 10px; }
.who-tip { background: var(--neutral-bg); border-left: 6px solid var(--accent); border-radius: 6px; padding: 8px 10px; margin: 8px 0 2px; font-size: 15px; font-weight: 600; color: var(--body); }
.who-org { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); } .who-org h3 { margin: 0 0 2px; } .who-org p { margin: 0 0 6px; }
.who-phone { font: 600 24px var(--display); color: var(--link); }
.report-form { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); } .report-form h3 { margin: 0; } .report-form textarea { resize: vertical; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; } #report-sent h3 { color: var(--ok-fg); display: flex; gap: 6px; align-items: center; }
.urgent { display: flex; gap: 10px; align-items: flex-start; min-height: 44px; margin: 12px 0 2px; padding: 10px; border: 2px solid var(--bad-fg); border-radius: var(--r-ctl); background: var(--bad-bg); color: var(--bad-fg); cursor: pointer; }
.urgent input { width: 22px; height: 22px; flex: none; margin-top: 2px; accent-color: var(--bad-fg); } .urgent .muted { color: inherit; }
.contact { display: flex; gap: 8px; align-items: center; } .contact .input { flex: 1; min-width: 0; }
.sos { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 14px; margin-bottom: 4px; border: 2px solid var(--bad-fg); border-radius: var(--r);
  background: var(--bad-bg); color: var(--bad-fg); text-decoration: none; }
.sos strong { font-family: var(--display); flex: 1; } .sos-sub { font-size: 13px; } .sos .chev-r { border-color: var(--bad-fg); }
.overall { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 12px; }
.overall .bar { flex: 1; margin: 0; }
.fold-title .ic { color: var(--primary); }

/* footer: who runs the site, the privacy line, theme and clearing your answers */
.site-foot { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.site-foot p { margin: 0 0 8px; } .site-foot strong { color: var(--strong); }
.foot-contact { line-height: 2; } .foot-contact a { font-weight: 600; white-space: nowrap; }
.foot-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.foot-label { font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.theme-opt { min-height: 44px; padding: 8px 12px; background: transparent; border: 1.5px solid var(--edge); border-radius: var(--r-ctl); font: 600 15px var(--text); color: var(--body); cursor: pointer; }
.theme-opt[aria-pressed="true"] { background: var(--brand-bg); color: var(--brand-fg); border-color: var(--primary); border-width: 2px; }
.foot-admin { margin-left: auto; color: var(--muted); padding: 12px 4px; }

/* the toast drops in at the top, clear of the buttons at the bottom of the screen */
#toast { position: fixed; left: 50%; top: calc(12px + env(safe-area-inset-top, 0px)); transform: translate(-50%, -20px); background: var(--strong); color: var(--page); padding: 10px 18px; border-radius: 999px;
  font-weight: 600; font-size: 15px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 10; max-width: 90vw; text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* small phones: the product name gives way to the practice badge */
@media (max-width: 440px) { .is-guest .brand-name { display: none; } }
@media (max-width: 359px) { .brand-name { display: none; } .brand-logo { height: 32px; } }
/* Short phone screens: the pinned result in the breach guide drops its pictures to leave room for the switches. */
@media (max-height: 620px) and (max-width: 719px) {
  .tile > .ic { display: none; } .tile { padding: 6px 2px 5px; }
  .steps3 { margin-bottom: 10px; } .step3 { min-height: 52px; padding: 5px 6px; }
  .cases { gap: 6px; } .case-card { min-height: 54px; padding: 4px 12px; } .case-card .card-ic { width: 36px; height: 36px; }
  /* and a story step keeps its picture and its heading clear of the pinned buttons */
  .top { min-height: 48px; padding: 6px 16px; } .brand-logo { height: 32px; }
  .case-intro { display: none; } .stepbar { padding: 6px 16px; }
  .story-step .scene { max-width: 300px; margin-left: auto; margin-right: auto; }
}

/* wider screens: the tab bar moves up under the header and the breach guide uses two columns */
@media (min-width: 720px) {
  body { font-size: 18px; } h1 { font-size: 32px; }
  #app { display: flex; flex-direction: column; min-height: 100vh; }
  .top { order: 0; } .tabs { order: 1; z-index: 4; } .view { order: 2; width: 100%; padding-top: 28px; padding-bottom: 48px; }
  .brand-logo { height: 44px; } .brand-name { font-size: 17px; }
  .view-home .stack, .cases { display: grid; grid-template-columns: 1fr 1fr; }
  .cases { gap: 10px; } .case-card { min-height: 88px; padding: 14px; } .case-blurb { display: block; }
  .hero { padding: 32px 28px 24px; } .hero h1 { font-size: 38px; } .hero .btn-cta { width: auto; display: inline-flex; padding: 14px 26px; } .hero .btn-cta .ic { display: block; } .hero-note { text-align: left; }
  .tabs { position: sticky; top: 0; bottom: auto; height: 56px; border-top: 0; border-bottom: 1px solid var(--line); justify-content: center; }
  .tab { flex: 0 0 120px; flex-direction: row; gap: 8px; font-size: 14px; }
  #toast { top: 68px; }
  .top { padding: 12px max(16px, calc((100% - 980px) / 2 + 16px)); }
  .wide-only { display: inline; }
  .view-story:has(.story-step), .view-story:has(.chain-grid) { max-width: 980px; }
  .story-step { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
  .story-step .scene { margin: 0; position: sticky; top: 72px; }
  .stepbar { position: static; margin: 18px 0 0; padding: 0; border: 0; background: none; justify-content: flex-end; } .stepbar .grow { flex: 0 0 auto; }
  .chain-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
  .chain-controls { order: 1; } .chain-result { order: 2; top: 68px; padding-top: 0; }
  .tile { padding: 10px 4px 8px; } .tile-name { font-size: 14px; } .tile-state { font-size: 13px; }
}

/* printing: always the light values, on white */
/* Big monitors: use the room. Laptops (under 1500px) keep the layout above. */
@media screen and (min-width: 1500px) {
  .top { padding: 12px calc((100% - 1400px) / 2 + 16px); }
  .view, .view-story:has(.story-step), .view-story:has(.chain-grid) { max-width: 1400px; }
  .view-try, .view-check, .view-quiz, .view-admin, .view-words, .view-actions { max-width: 900px; }
  h1 { font-size: 36px; } .hero { padding: 44px 40px 32px; } .hero h1 { font-size: 48px; }
  .view-home .stack, .view-topics .stack { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .steps { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .steps .step-card { margin: 0; }
  .story-step, .chain-grid { gap: 40px; }
  .chain { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
  .report { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .report li { margin: 0; }
  /* Help: the numbers stay beside the steps. */
  .view-help { display: grid; grid-template-columns: 400px minmax(0, 1fr); column-gap: 40px; align-content: start; }
  .view-help > * { grid-column: 2; } .view-help > h1, .view-help > h1 + p, .view-help > .site-foot { grid-column: 1 / -1; }
  .view-help > .who { grid-column: 1; grid-row: 3 / span 30; align-self: start; position: sticky; top: 76px; margin-top: 0; }
  .view-help > .who:has(form) { position: static; }
  .view-help > .who + * { margin-top: 0; }
}

@media print {
  .top, .tabs, .no-print, #toast, .site-foot, .stepbar { display: none !important; }
  html, body { background: #fff; } body { font-size: 12pt; } .view { padding: 0; max-width: none; }
  #app { display: block; }
  .view-actions h1 { display: none; }
  .print-head { display: flex; justify-content: space-between; gap: 12px; border-bottom: 2px solid #000; padding-bottom: 6px; margin-bottom: 10px; font-size: 13pt; }
  .print-note { display: block; font-size: 10.5pt; margin: 0 0 6px 36px; color: #333; }
  .action { border: 0; border-bottom: 1px solid #bbb; border-radius: 0; padding: 2px 0; break-inside: avoid; }
  .group h2 { color: #000 !important; margin-top: 14px; }
  .fold { border: 0; border-bottom: 1px solid #bbb; border-radius: 0; break-inside: avoid; } .chev { display: none; }
  .input { border: 0; border-bottom: 1px solid #000; border-radius: 0; padding: 4px 0; min-height: 26pt; } .input::placeholder { color: transparent; }
  .input:focus { outline: 0; box-shadow: none; }
  .hint { background: none; border: 0; padding: 0; }
  .who { border: 2px solid #000; border-radius: 0; break-inside: avoid; } .report li { border: 0; padding: 2px 0; }
  /* The help page is the one to pin by the phone: keep it to one sheet of paper, both sides. */
  .view-help { font-size: 11pt; } .view-help h1 { margin-top: 0; }
  .view-help .fold { margin-bottom: 2px; } .view-help .fold summary { min-height: 0; padding: 6px 0 0; } .view-help .fold-body { padding: 0 0 2px; }
  .view-help .todo { margin: 4px 0 6px; } .view-help .todo li { margin-bottom: 2px; }
  .view-help .sec-h { margin: 12px 0 2px; } .view-help .who { padding: 8px 12px; } .view-help .who .lbl { margin-top: 4px; }
  .view-help .report { margin-bottom: 6px; } .view-help .report li { margin-bottom: 0; }
  .ext .ic { display: none; }
}
