/* HVPD Ethics & Leadership Simulator. Brand: Harbinger Veridian badge (navy, chrome, electric blue).
   One dark theme on screen; the certificate and print output are always light paper. */
:root {
  --page: #050d1c;
  --page-2: #0a1834;
  --surface: rgba(16, 32, 64, 0.72);
  --surface-solid: #10203f;
  --surface-2: rgba(24, 48, 92, 0.55);
  --ink: #eef3fb;
  --ink-2: #b9c6dc;
  --muted: #a3b0c8;
  --hairline: rgba(150, 180, 230, 0.16);
  --border: rgba(150, 185, 240, 0.22);
  --brand: #3d8bff;          /* electric blue */
  --brand-2: #66c2ff;
  --brand-ink: #ffffff;
  --brand-soft: rgba(61, 139, 255, 0.16);
  --chrome: linear-gradient(180deg, #f4f7fb 0%, #b9c4d6 48%, #e9eef6 52%, #8f9bb0 100%);
  --accent: #5aa5ff;
  --accent-track: rgba(90, 165, 255, 0.16);
  --focus: #ffd166;
  --navy: #071226;
  --navy-2: #0f2a57;
  --good: #2fbf71;      --good-track: rgba(47, 191, 113, 0.18);  --good-text: #5fe39a;
  --warn: #f5b335;      --warn-track: rgba(245, 179, 53, 0.18);  --warn-text: #ffcf6e;
  --crit: #ef5a5a;      --crit-track: rgba(239, 90, 90, 0.18);   --crit-text: #ff8d8d;
  --radius: 14px;
  --glow: 0 0 0 1px rgba(110, 170, 255, 0.10), 0 10px 30px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
  font-size: 100%;
}

* { box-sizing: border-box; }
html { font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; line-height: 1.6; color: var(--ink); background: var(--page); }
body { margin: 0; min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(61, 139, 255, 0.22), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(102, 194, 255, 0.10), transparent 60%),
    linear-gradient(180deg, var(--page-2), var(--page) 40%);
  background-attachment: fixed; }
.wrap { max-width: 76rem; margin: 0 auto; padding: 0 1.25rem; }
h1, h2, h3 { line-height: 1.22; letter-spacing: -0.01em; }
h1 { font-size: 2.1rem; margin: 0.25rem 0 0.75rem; font-weight: 750; }
h2 { font-size: 1.35rem; margin: 0 0 0.75rem; font-weight: 700; }
h3 { font-size: 1.08rem; margin: 1.1rem 0 0.5rem; }
p { margin: 0 0 0.9rem; }
a { color: var(--brand-2); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
main:focus, h1:focus, h2:focus { outline: none; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface-solid); padding: 0.5rem 1rem; z-index: 10; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { width: 1.1em; height: 1.1em; fill: currentColor; vertical-align: -0.18em; flex: none; }
.small { font-size: 0.85rem; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(5, 13, 28, 0.86); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(61, 139, 255, 0.35); box-shadow: 0 1px 0 rgba(102, 194, 255, 0.25), 0 8px 24px rgba(0, 0, 0, 0.35); }
.site-header .emblem { height: 3rem; width: auto; display: block; filter: drop-shadow(0 0 8px rgba(61, 139, 255, 0.55)); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 0.6rem; padding-bottom: 0.6rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand-city { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brand-2); font-weight: 650; }
.brand-title { font-size: 1.15rem; font-weight: 750; background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-hero { background: radial-gradient(ellipse at 50% 40%, #16336a 0%, var(--navy) 70%); border-radius: var(--radius); padding: 1rem; text-align: center; margin-bottom: 1.25rem; }
.brand-hero img { width: min(100%, 15rem); height: auto; }
.progress { display: flex; align-items: center; gap: 0.7rem; font-size: 0.9rem; font-weight: 650; }
.progress .wk small { color: var(--muted); font-weight: 500; }
.progress .steps { display: flex; gap: 3px; }
.progress .step { width: 0.95rem; height: 0.45rem; border-radius: 999px; background: rgba(255, 255, 255, 0.14); }
.progress .step.done { background: var(--brand); }
.progress .step.now { background: var(--brand-2); box-shadow: 0 0 10px var(--brand-2); }
.site-footer { color: var(--muted); font-size: 0.82rem; padding: 2.5rem 0; border-top: 1px solid var(--hairline); margin-top: 2rem; }

#app { padding-top: 1.75rem; padding-bottom: 1rem; min-height: 70vh; }

/* Surfaces and buttons */
.card, .glass { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--glow); backdrop-filter: blur(6px); }
.card { padding: 1.5rem; margin-bottom: 1.25rem; }
.lede { font-size: 1.12rem; color: var(--ink-2); max-width: 50rem; }
.kicker { font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brand-2); font-weight: 700; margin: 0 0 0.3rem; display: block; }
.btn { display: inline-flex; align-items: center; gap: 0.45rem; font: inherit; font-weight: 650; border-radius: 10px; padding: 0.7rem 1.3rem; border: 1px solid rgba(140, 190, 255, 0.55); background: linear-gradient(180deg, #2a6ee0, #1a52bf); color: #fff; cursor: pointer; text-decoration: none; box-shadow: 0 6px 18px rgba(31, 99, 214, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25); transition: transform 0.12s, filter 0.12s; }
.btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn.big { padding: 0.9rem 1.7rem; font-size: 1.05rem; }
.btn.secondary { background: rgba(61, 139, 255, 0.12); color: var(--ink); box-shadow: none; }
.btn.ghost { background: transparent; color: var(--ink-2); border-color: var(--border); box-shadow: none; }
.btn-row { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1rem; }
.btn-row.center { justify-content: center; }
label.field, p.field { display: block; font-weight: 650; margin: 0 0 0.4rem; }
input[type=text], input[type=email], input[type=password], input[type=number] { font: inherit; padding: 0.7rem 0.85rem; border: 1px solid var(--border); border-radius: 10px; width: min(100%, 26rem); background: rgba(5, 13, 28, 0.6); color: var(--ink); margin-bottom: 1rem; }
.notice { background: var(--brand-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 1.25rem; }
.two-col { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr)); }
.two-col > .card { margin-bottom: 0; }
.two-col + .card, .two-col + .two-col { margin-top: 1.25rem; }
.hero-sub { color: var(--ink-2); }

/* Welcome */
.hero-splash { display: grid; grid-template-columns: minmax(14rem, 22rem) 1fr; gap: 2rem; align-items: center; margin: 0.5rem 0 2rem; }
@media (max-width: 50rem) { .hero-splash { grid-template-columns: 1fr; text-align: center; } .stat-row { justify-content: center; } }
.splash-logo { position: relative; }
.splash-logo::before { content: ""; position: absolute; inset: 8%; border-radius: 50%; background: radial-gradient(circle, rgba(61, 139, 255, 0.55), transparent 65%); filter: blur(18px); animation: breathe 5s ease-in-out infinite; }
.splash-logo img { position: relative; width: 100%; height: auto; display: block; filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.6)); }
@keyframes breathe { 0%, 100% { opacity: 0.65; transform: scale(0.96); } 50% { opacity: 1; transform: scale(1.04); } }
.splash-text h1 { font-size: clamp(2rem, 4vw, 3rem); background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-row { list-style: none; padding: 0; margin: 1.25rem 0 0; display: flex; gap: 0.75rem; flex-wrap: wrap; }
.stat-row li { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 0.55rem 1rem; text-align: center; min-width: 6.5rem; }
.stat-row strong { display: block; font-size: 1.6rem; color: var(--brand-2); line-height: 1.1; }
.stat-row span { font-size: 0.8rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.08em; }
.how { padding-left: 1.3rem; margin: 0 0 1rem; }
.how li { margin-bottom: 0.5rem; }
.looks { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-bottom: 0.5rem; }
.look { padding: 3px; border-radius: 50%; border: 2px solid transparent; background: none; cursor: pointer; }
.look.on { border-color: var(--brand-2); box-shadow: 0 0 14px rgba(102, 194, 255, 0.7); }
.look:hover { border-color: var(--border); }
.frame-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); }
.frame-grid h3 { margin-top: 0; color: var(--brand-2); }
.frame-grid p { color: var(--ink-2); margin: 0; }

/* Setup */
.stepper { list-style: none; display: flex; gap: 0.4rem; padding: 0; margin: 0 0 1.25rem; flex-wrap: wrap; }
.stepper li { display: flex; align-items: center; gap: 0.45rem; font-size: 0.85rem; color: var(--muted); padding: 0.3rem 0.8rem 0.3rem 0.35rem; border-radius: 999px; border: 1px solid var(--hairline); }
.stepper li span { width: 1.5rem; height: 1.5rem; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.08); font-weight: 700; font-size: 0.8rem; }
.stepper li.done { color: var(--ink-2); } .stepper li.done span { background: #1f5fcf; color: #fff; }
.stepper li.now { color: var(--ink); border-color: var(--brand); } .stepper li.now span { background: var(--brand-2); color: #04122a; }
.map-wrap { padding: 0.5rem; margin-bottom: 0.5rem; overflow: hidden; }
.citymap { width: 100%; height: auto; display: block; border-radius: 10px; }
.citymap { background: #1a2d50; }
.citymap .art-case { fill: none; stroke: #0b1a33; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.citymap .art { fill: none; stroke: #33568c; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; }
.citymap .dlabel { fill: rgba(200, 220, 255, 0.5); font-size: 15px; font-weight: 800; letter-spacing: 0.3em; paint-order: stroke; stroke: #0b1a33; stroke-width: 4px; }
.citymap .slabel { fill: #8fb0dd; font-size: 8.5px; font-weight: 700; letter-spacing: 0.12em; paint-order: stroke; stroke: #0b1a33; stroke-width: 3px; }
.citymap .plabel { fill: #6fcfb0; font-size: 9px; font-weight: 600; font-style: italic; paint-order: stroke; stroke: #0b1a33; stroke-width: 3px; }
.citymap .plabel.port { fill: #9fb3d4; }
.citymap .wlabel { fill: #6ea6ee; font-size: 11px; font-style: italic; letter-spacing: 0.15em; }
.citymap .wlabel.big { font-size: 15px; letter-spacing: 0.3em; }
.citymap .shield { fill: #fff; font-size: 8px; font-weight: 800; }
.citymap .compass text, .citymap .scalebar text { fill: #cfe0ff; font-size: 10px; font-weight: 700; }
.citymap .pin { cursor: pointer; }
.citymap .pin .disc { fill: #0d2a5c; stroke: #8fc6ff; stroke-width: 2.5; }
.citymap .pin svg { fill: #e8f1ff; }
.citymap .pin .pulse { fill: rgba(61, 139, 255, 0.25); animation: pulse 2.6s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.citymap .pin text { fill: #eaf2ff; font-size: 17px; font-weight: 700; paint-order: stroke; stroke: #050d1c; stroke-width: 4px; }
.citymap .pin:hover .disc, .citymap .pin.on .disc { fill: #1f63d6; stroke: #fff; }
@keyframes pulse { 0% { transform: scale(0.6); opacity: 0.9; } 100% { transform: scale(1.5); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .btn:hover, .pick:hover, .choice:hover { transform: none; }
}

.grid { display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fill, minmax(min(17rem, 100%), 1fr)); margin: 1rem 0; }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr)); }
.pick { text-align: left; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; cursor: pointer; display: flex; gap: 0.9rem; align-items: flex-start; box-shadow: var(--glow); transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s; }
.pick:hover:not([disabled]), .pick.on { border-color: var(--brand-2); transform: translateY(-2px); box-shadow: 0 0 0 1px var(--brand-2), 0 12px 28px rgba(31, 99, 214, 0.3); }
.pick[disabled] { cursor: not-allowed; opacity: 0.45; }
.pick .name { font-weight: 700; font-size: 1.05rem; display: block; }
.pick .sub { color: var(--ink-2); font-size: 0.9rem; display: block; margin-top: 0.3rem; }
.pick .story { display: block; color: var(--brand-2); font-style: italic; font-size: 0.92rem; }
.pick .tag, .tag { display: inline-block; font-size: 0.72rem; font-weight: 700; margin: 0.5rem 0.35rem 0 0; padding: 0.12rem 0.55rem; border-radius: 999px; background: var(--brand-soft); color: var(--ink); letter-spacing: 0.03em; }
.tag.dim { background: rgba(255, 255, 255, 0.07); color: var(--muted); }
.pick-ico { width: 2.6rem; height: 2.6rem; flex: none; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(160deg, #1f63d6, #0d2a5c); border: 1px solid rgba(143, 198, 255, 0.5); }
.pick-ico .ico { width: 1.4rem; height: 1.4rem; }
.pick-text { display: block; min-width: 0; }
.role-pick .avatar { flex: none; }
.dil-n { flex: none; font-size: 1.5rem; font-weight: 800; color: var(--brand-2); width: 2.4rem; }
details.more { margin-top: 1rem; }
details.more summary { cursor: pointer; color: var(--ink-2); }

/* Layout with status panel */
.layout { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr) 21rem; align-items: start; }
@media (max-width: 56rem) { .layout { grid-template-columns: minmax(0, 1fr); } .panel { position: static !important; } }
.panel { position: sticky; top: 5.2rem; padding: 1.1rem 1.1rem 0.6rem; }
.panel-h { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-2); margin: 0.9rem 0 0.25rem; }
.you-card { display: flex; gap: 0.8rem; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; }
.chip { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.78rem; padding: 0.2rem 0.6rem; border-radius: 999px; background: var(--brand-soft); border: 1px solid var(--border); }

/* Meters */
.meters { list-style: none; margin: 0; padding: 0; }
.meters.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr)); gap: 0 1.25rem; }
.meter { padding: 0.45rem 0; border-top: 1px solid var(--hairline); }
.meter:first-child { border-top: 0; }
.meter.changed { animation: flash 1.2s ease-out; }
@keyframes flash { 0% { background: rgba(102, 194, 255, 0.18); } 100% { background: transparent; } }
.meter-head { display: flex; align-items: center; gap: 0.45rem; }
.meter-ico { color: var(--brand-2); }
.meter-name { font-weight: 650; font-size: 0.9rem; flex: 1; }
.meter-name .info { font: inherit; font-size: 0.7rem; font-weight: 700; width: 1.5rem; height: 1.5rem; line-height: 1; border-radius: 50%; border: 1px solid var(--ink-2); background: none; color: var(--ink-2); cursor: help; padding: 0; vertical-align: 0.1em; }
.meter-fig { font-variant-numeric: tabular-nums; font-weight: 750; }
.bar { height: 7px; border-radius: 999px; margin: 0.3rem 0 0.2rem; overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; transition: width 0.6s cubic-bezier(.2, .8, .2, 1); }
.lvl-good .bar { background: var(--good-track); } .lvl-good .bar > span { background: var(--good); box-shadow: 0 0 8px var(--good); }
.lvl-warn .bar { background: var(--warn-track); } .lvl-warn .bar > span { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.lvl-crit .bar { background: var(--crit-track); } .lvl-crit .bar > span { background: var(--crit); box-shadow: 0 0 8px var(--crit); }
.meter-foot { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--ink-2); }
.meter-foot .lower { color: var(--muted); }
.status-label::before { font-weight: 800; margin-right: 0.25rem; }
.lvl-good .status-label::before { content: "✓"; color: var(--good-text); }
.lvl-warn .status-label::before { content: "!"; color: var(--warn-text); }
.lvl-crit .status-label::before { content: "▲"; color: var(--crit-text); }
.meter-help { font-size: 0.8rem; color: var(--ink-2); margin: 0.25rem 0 0; }
.delta { font-weight: 700; font-variant-numeric: tabular-nums; }
.delta.better { color: var(--good-text); }
.delta.worse { color: var(--crit-text); }

/* Scene */
.week-label { display: flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--brand-2); font-weight: 750; margin-bottom: 0.2rem; }
.scene-card { padding: 1.6rem 1.7rem; }
.speaker-row { display: flex; align-items: center; gap: 0.95rem; margin-bottom: 1rem; padding-bottom: 0.9rem; border-bottom: 1px solid var(--hairline); }
.speaker-row .avatar { box-shadow: 0 0 0 2px var(--brand-2), 0 0 18px rgba(102, 194, 255, 0.45); }
.present { display: flex; align-items: center; gap: 0.3rem; margin: -0.3rem 0 1rem; }
.present-one .avatar { box-shadow: 0 0 0 2px var(--surface-solid); }
.present-one + .present-one { margin-left: -0.55rem; }
.present-label { font-size: 0.78rem; color: var(--muted); margin-left: 0.6rem; text-transform: uppercase; letter-spacing: 0.08em; }
.scene-text p { font-size: 1.04rem; }
.developments { border-left: 4px solid var(--warn); background: var(--warn-track); padding: 0.8rem 1rem; border-radius: 0 10px 10px 0; margin-bottom: 1rem; }
.developments strong { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.3rem; color: var(--warn-text); }
.developments p:last-child { margin-bottom: 0; }
.prompt { font-weight: 750; margin-top: 1.3rem; font-size: 1.05rem; color: var(--brand-2); }
.choices { list-style: none; padding: 0; margin: 0.8rem 0 0; display: grid; gap: 0.6rem; }
.choice { width: 100%; text-align: left; font: inherit; color: var(--ink); background: rgba(8, 20, 44, 0.65); border: 1px solid var(--border); border-radius: 12px; padding: 0.85rem 1rem; cursor: pointer; display: flex; gap: 0.8rem; align-items: flex-start; transition: border-color 0.12s, background 0.12s, transform 0.12s; }
.choice:hover { border-color: var(--brand-2); background: rgba(31, 99, 214, 0.22); transform: translateX(3px); }
.choice .key { flex: none; width: 1.8rem; height: 1.8rem; border-radius: 8px; background: linear-gradient(160deg, #1f63d6, #0d2a5c); border: 1px solid rgba(143, 198, 255, 0.5); display: grid; place-items: center; font-weight: 800; font-size: 0.85rem; }

/* Result */
.you-chose { font-size: 1.02rem; border-left: 3px solid var(--brand); padding-left: 0.9rem; }
.consequence p { font-size: 1.04rem; }
.changes { list-style: none; padding: 0; margin: 0.4rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.changes li { display: inline-flex; align-items: center; gap: 0.4rem; border: 1px solid var(--border); border-radius: 999px; padding: 0.25rem 0.75rem; font-size: 0.88rem; background: var(--surface-2); }
.changes .ico { color: var(--brand-2); }
.lens-tag { margin-top: 1.1rem; padding: 0.7rem 0.9rem; border-radius: 10px; background: var(--brand-soft); font-size: 0.95rem; }
.law-cards { display: grid; gap: 0.5rem; }
.law-card { border: 1px solid var(--border); border-radius: 10px; background: rgba(8, 20, 44, 0.55); }
.law-card summary { cursor: pointer; display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.7rem 0.9rem; list-style: none; }
.law-card summary::-webkit-details-marker { display: none; }
.law-card summary .ico { color: var(--warn-text); margin-top: 0.2rem; }
.law-card summary .cite { display: block; font-size: 0.8rem; color: var(--muted); }
.law-card p { padding: 0 0.9rem 0.8rem 2.6rem; margin: 0; color: var(--ink-2); font-size: 0.94rem; }

/* Briefing */
.you-brief { display: flex; gap: 1.2rem; align-items: center; }
.you-name { font-size: 1.5rem; font-weight: 750; margin: 0; }
.cast-list { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(17rem, 100%), 1fr)); gap: 0.75rem; }
.person { display: flex; align-items: center; gap: 0.75rem; }
.person-name { display: block; font-weight: 700; }
.person-title { display: block; font-size: 0.85rem; color: var(--ink-2); }

/* Ending */
.grade { display: inline-grid; place-items: center; width: 4rem; height: 4rem; border-radius: 16px; font-size: 2rem; font-weight: 850; color: #04150b; margin-right: 1rem; flex: none; box-shadow: 0 0 24px rgba(0, 0, 0, 0.4); }
.grade.good { background: linear-gradient(160deg, #2fbf71, #137a43); } .grade.mixed { background: linear-gradient(160deg, #f5b335, #9a6a07); } .grade.bad { background: linear-gradient(160deg, #ef5a5a, #9b2424); color: #fff; }
.ending-head { display: flex; align-items: center; margin-bottom: 1rem; }
.impact-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); margin-bottom: 1.25rem; }
.impact { padding: 1.1rem 1.2rem; }
.impact > .ico { width: 1.8rem; height: 1.8rem; color: var(--brand-2); }
.impact h3 { margin: 0.4rem 0; }
.impact p { color: var(--ink-2); margin: 0; }
.epilogue { margin: 0; display: grid; gap: 0.2rem 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(22rem, 100%), 1fr)); }
.epi-row { display: flex; gap: 0.9rem; align-items: flex-start; margin-top: 0.9rem; }
.epi-row dt { font-weight: 700; }
.epi-row dd { margin: 0.15rem 0 0; color: var(--ink-2); }

/* Debrief */
.hero { display: flex; gap: 2rem; flex-wrap: wrap; align-items: center; }
.ring { --p: 0; width: 9.5rem; height: 9.5rem; border-radius: 50%; display: grid; place-items: center; align-content: center; text-align: center;
  background: radial-gradient(closest-side, var(--surface-solid) 78%, transparent 79%), conic-gradient(var(--brand-2) calc(var(--p) * 1%), rgba(255, 255, 255, 0.08) 0); box-shadow: 0 0 30px rgba(61, 139, 255, 0.35); }
.ring span { font-size: 2.8rem; font-weight: 800; line-height: 1; }
.ring small { color: var(--ink-2); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; }
.band { font-size: 1.4rem; font-weight: 750; margin-bottom: 0.5rem; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 1rem; }
.kv > span:nth-child(odd) { color: var(--muted); }
.hbar { display: block; height: 10px; border-radius: 999px; background: var(--accent-track); overflow: hidden; }
.hbar > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.lens-list { list-style: none; padding: 0; margin: 0; }
.lens-row { display: grid; grid-template-columns: 11rem 1fr 3.5rem; gap: 0.75rem; align-items: center; padding: 0.35rem 0; }
.fig { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
@media (max-width: 36rem) { .lens-row { grid-template-columns: 1fr 3rem; } .lens-row .hbar { grid-column: 1 / -1; grid-row: 2; } }
.lens-card { background: var(--brand-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; margin-top: 1rem; }
.model-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr)); }
.model { padding: 1rem 1.1rem; }
.model-head { display: flex; justify-content: space-between; align-items: baseline; }
.model-head h3 { margin: 0; }
.model-pct { font-size: 1.5rem; font-weight: 800; color: var(--brand-2); }
.steps-list { list-style: none; padding: 0; margin: 0.5rem 0 0; }
.steps-list li { display: grid; grid-template-columns: 9.5rem 1fr 2.8rem; gap: 0.6rem; align-items: center; padding: 0.25rem 0; font-size: 0.88rem; }
.step-name { cursor: help; }
.insights { list-style: none; padding: 0; margin: 0; }
.insights li { padding: 0.7rem 0.9rem; border-radius: 10px; margin-bottom: 0.6rem; border-left: 3px solid; background: rgba(8, 20, 44, 0.5); }
.insights.good li { border-color: var(--good); } .insights.grow li { border-color: var(--warn); }
.insights p { margin: 0.3rem 0 0; color: var(--ink-2); font-size: 0.94rem; }
.pulls { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr)); }
.pulls li { padding: 0.7rem 0.9rem; border-radius: 10px; background: var(--warn-track); }
.pulls .count { font-weight: 800; color: var(--warn-text); }
.spark-grid { display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr)); }
.spark-cell { padding: 0.7rem 0.8rem; border-radius: 10px; background: rgba(8, 20, 44, 0.55); border: 1px solid var(--hairline); }
.spark-head { display: flex; gap: 0.4rem; align-items: center; font-weight: 650; font-size: 0.9rem; }
.spark-head .ico { color: var(--brand-2); }
.spark { width: 100%; height: auto; display: block; margin: 0.3rem 0; }
.spark .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark .mid { stroke: var(--hairline); stroke-dasharray: 3 3; }
.spark .end { fill: var(--accent); stroke: var(--surface-solid); stroke-width: 2; }
.spark .hit { fill: transparent; }
.spark .hit:hover { fill: rgba(102, 194, 255, 0.5); }
.spark-foot { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.8rem; color: var(--ink-2); }
table { border-collapse: collapse; width: 100%; font-size: 0.93rem; }
th, td { text-align: left; vertical-align: top; padding: 0.6rem 0.5rem; border-top: 1px solid var(--hairline); }
thead th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-2); border-top: 0; }
.q { white-space: nowrap; font-weight: 700; font-size: 0.85rem; }
.q::before { margin-right: 0.3rem; }
.q-strong { color: var(--good-text); } .q-strong::before { content: "✓"; }
.q-mixed { color: var(--warn-text); } .q-mixed::before { content: "≈"; }
.q-weak { color: var(--crit-text); } .q-weak::before { content: "✗"; }
.alt { margin-top: 0.4rem; font-size: 0.88rem; color: var(--ink-2); }
.recs { padding-left: 1.2rem; }
.recs li { margin-bottom: 0.9rem; }
.law { font-size: 0.86rem; color: var(--ink-2); display: block; margin-top: 0.2rem; }
.law::before { content: "Law & policy: "; font-weight: 700; }
.table-scroll { overflow-x: auto; }

/* Avatars */
.avatar { flex: none; border-radius: 50%; display: block; box-shadow: 0 0 0 2px rgba(143, 198, 255, 0.45); }

/* Certificate: paper, fixed light colors */
.record h2 { margin-bottom: 0.5rem; }
.cert-preview { max-width: 42rem; margin: 1.25rem auto; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.55); }
#print-doc { display: none; }
.cert { background: #fff; color: #14171f; border: 2px solid #0b4fb3; outline: 1px solid #0b4fb3; outline-offset: -8px; text-align: center; font-size: 0.95rem; }
.cert-band { background: radial-gradient(ellipse at 50% 45%, #16336a 0%, #071226 72%); padding: 1rem 1rem 0.8rem; border-bottom: 3px solid #1f7aff; }
.cert-band img { width: 11rem; max-width: 55%; height: auto; display: block; margin: 0 auto; }
.cert-body { padding: 1.4rem 2rem 1.2rem; }
.cert p { margin: 0 0 0.35rem; }
.cert-kicker { font-size: 1.45rem; font-weight: 750; letter-spacing: 0.16em; text-transform: uppercase; color: #0b4fb3; margin-bottom: 0.8rem !important; }
.cert-small { color: #4a4f5c; font-size: 0.92rem; }
.cert-name { font-family: Georgia, "Times New Roman", serif; font-size: 2.1rem; font-weight: 700; display: inline-block; min-width: 60%; border-bottom: 1px solid #9aa6bd; padding: 0 1rem 0.2rem; margin: 0.25rem 0 0.6rem !important; color: #14171f; }
.cert-course { font-size: 1.2rem; font-weight: 700; color: #14171f; }
.cert-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem 1rem; margin: 1.1rem 0 1.2rem; padding: 0.9rem 0.5rem; border-top: 1px solid #d5dbe6; border-bottom: 1px solid #d5dbe6; }
.cert-grid dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: #5a6070; }
.cert-grid dd { margin: 0.1rem 0 0; font-weight: 650; font-size: 0.9rem; color: #14171f; }
.cert-foot { display: flex; justify-content: space-around; gap: 1.5rem; margin: 1.6rem 0 0.9rem; flex-wrap: wrap; }
.cert-line { display: block; min-width: 13rem; border-bottom: 1px solid #14171f; padding-bottom: 0.2rem; font-weight: 650; color: #14171f; }
.cert-cap { display: block; font-size: 0.75rem; color: #5a6070; margin-top: 0.2rem; }
.cert-id { font-size: 0.8rem; color: #5a6070; letter-spacing: 0.04em; }
.cert-note { font-size: 0.7rem; color: #6b7080; max-width: 32rem; margin: 0.4rem auto 0 !important; }
@media (max-width: 36rem) { .cert-grid { grid-template-columns: repeat(2, 1fr); } .cert-body { padding: 1rem; } .cert-name { font-size: 1.6rem; } }
.print-head { display: flex; align-items: center; gap: 0.8rem; background: #071226; color: #fff; padding: 0.6rem 0.9rem; border-radius: 6px; margin-bottom: 1rem; font-size: 0.9rem; }
.print-head img { height: 2.6rem; width: auto; }

@media print {
  @page { size: letter; margin: 0.5in; }
  :root {
    --page: #fff; --page-2: #fff; --surface: #fff; --surface-solid: #fff; --surface-2: #f3f6fb; --ink: #000; --ink-2: #333; --muted: #555; --hairline: #ccc; --border: #ccc;
    --brand: #0b4fb3; --brand-2: #0b4fb3; --brand-ink: #fff; --brand-soft: #eef3fb; --accent: #1f66d1; --accent-track: #dbe6f8;
    --good: #0ca30c; --good-track: #d8f1d8; --good-text: #006300; --warn: #c98a00; --warn-track: #fdeec8; --warn-text: #7a5200; --crit: #c03030; --crit-track: #f6dada; --crit-text: #a32020;
    --glow: none;
  }
  html, body { background: #fff !important; color: #000; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .skip { display: none; }
  body.review-screen .site-header, body.review-screen .site-footer, body.review-screen #app > *:not(#print-doc) { display: none !important; }
  body.review-screen #app { padding: 0; min-height: 0; }
  body.review-screen .wrap { max-width: none; padding: 0; }
  body.review-screen #print-doc { display: block; }
  #print-doc .cert { height: 9.7in; overflow: hidden; display: flex; flex-direction: column; break-after: page; font-size: 11pt; }
  #print-doc .cert-body { flex: 1; display: flex; flex-direction: column; justify-content: space-evenly; padding: 0.2in 0.6in 0.15in; }
  #print-doc .cert-band img { width: 2.3in; }
  #print-doc .cert-name { font-size: 30pt; }
  .print-results { font-size: 10pt; color: #000; }
  .print-results .card, .print-results .glass { border: 0; padding: 0; margin: 0 0 0.25in; background: none; box-shadow: none; backdrop-filter: none; }
  .print-results .model, .print-results .spark-cell, .print-results .insights li, .print-results .law-card { border: 1px solid #ccc; background: #fff; }
  .print-results .law-card p { display: block; }
  .print-results h2 { font-size: 14pt; border-bottom: 2px solid #0b4fb3; padding-bottom: 0.05in; break-after: avoid; }
  .print-results tr, .print-results li, .lens-card, .model, .spark-cell { break-inside: avoid; }
  .print-results .ring { box-shadow: none; background: radial-gradient(closest-side, #fff 78%, transparent 79%), conic-gradient(#0b4fb3 calc(var(--p) * 1%), #dde4ef 0); }
}

/* License pages and status (hosted version only; js/license.js) */
.license-status { font-size: 0.8rem; line-height: 1.35; text-align: right; opacity: 0.95; }
.license-status.soon { color: #ffd479; }
.wrap.narrow { max-width: 42rem; }
.notice.warn { background: var(--warn-track); }
.notice ul { margin: 0.4rem 0 0; padding-left: 1.2rem; }
.form-error { color: var(--crit-text); font-weight: 650; margin-top: 1rem; }
.key-card { text-align: center; }
.license-key { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 1.6rem; font-weight: 700; letter-spacing: 0.06em; background: var(--brand-soft); border-radius: 8px; padding: 0.75rem; user-select: all; word-break: break-all; }
.license-key.small { font-size: 1rem; padding: 0.3rem 0.6rem; display: inline-block; letter-spacing: 0.04em; }
.key-list { columns: 2 16rem; column-gap: 1.5rem; padding-left: 2.2rem; margin: 1rem 0; }
.key-list li { margin-bottom: 0.4rem; break-inside: avoid; }
.terms-box { border: 1px solid var(--warn); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1rem 0; background: var(--warn-track); }
.terms-box p { margin-bottom: 0.6rem; }
label.check { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 650; cursor: pointer; }
label.check input { width: 1.5rem; height: 1.5rem; margin-top: 0.05rem; flex: none; accent-color: var(--brand); }

/* Career thread */
.career-note { border-left: 4px solid var(--brand-2); }
.career-note h2 { display: flex; align-items: center; gap: 0.45rem; font-size: 1.05rem; }
.career-note p:last-child { margin-bottom: 0; }
.career-record .table-wrap { overflow-x: auto; }
.career-record td, .career-record th { text-align: left; padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--hairline); }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--brand-2); text-decoration: underline; cursor: pointer; }
.linkish:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Accessibility: section headings inside cards on the result screen (h2 for order, sized like h3) */
.sub-h { font-size: 1.05rem; margin: 1rem 0 0.4rem; }

/* Accessibility: reflow at 320px (400% zoom) and comfortable targets */
h1, h2, h3, p, li, dd, dt, td, th, summary { overflow-wrap: break-word; }
.epi-row > div, .person > div, .speaker-row > div { min-width: 0; }
input[type=checkbox], input[type=radio] { width: 1.5rem; height: 1.5rem; accent-color: var(--brand); vertical-align: middle; }
@media (max-width: 30rem) {
  .wrap { padding: 0 0.75rem; }
  .card { padding: 1rem; }
  .progress .steps { display: none; }
  .steps-list li { grid-template-columns: 1fr 2.8rem; }
  .steps-list li > :nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
}
