/* Fonts (B1, B2): self-hosted, OFL. Source Sans 3 is one variable file (weights 200 to 900); Bebas Neue for page titles only. */
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 200 900; font-display: swap; src: url("/fonts/source-sans-3/SourceSans3-variable.woff2") format("woff2"); }
@font-face { font-family: "Bebas Neue"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/bebas-neue/BebasNeue-400.woff2") format("woff2"); }
/* SSN controls: the one stylesheet for buttons, fields, segmented controls, chips, tags, pills, lists and readouts.
   Source of truth: docs/mockups/brand-controls.html (approved 2026-10-28) and Section 0 of the working notes (B9, F2, F22, F27, F28, C11).
   Every page links this file. No page defines its own .btn, .seg, .ctl, .chip, .tile or .list. */
:root {
  --navy: #03202F; --navy-h: #0a3042; --red: #BD202E; --red-h: #a51b28;
  --ink: #1b2a33; --muted: #5f6d75; --line: #e2e7ea; --grey: #F5F5F5; --fill: #EFEFEF;
  --r: 6px; --r-pill: 999px;
  --bd: rgba(3,32,47,.30); --bd-h: rgba(3,32,47,.50);
  --ring: 0 0 0 3px rgba(3,32,47,.18);
  --lift: 0 4px 10px -4px rgba(3,32,47,.25);
  --spring: cubic-bezier(.2,1.4,.5,1); --t: .2s;
  --h-sm: 32px; --h-md: 40px; --h-lg: 48px;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }

/* buttons: four roles, three heights */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--h-md); padding: 0 16px; border-radius: var(--r); border: 1px solid var(--navy); background: var(--navy); color: #fff; font-weight: 600; white-space: nowrap; transition: transform var(--t) var(--spring), box-shadow var(--t), background var(--t), border-color var(--t), color var(--t); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn:active { transform: scale(.97); box-shadow: none; }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn.sm { height: var(--h-sm); padding: 0 12px; font-size: 15px; } .btn.lg { height: var(--h-lg); padding: 0 22px; font-size: 18px; } .btn.wide { width: 100%; }
.btn:hover, .btn.primary:hover { background: var(--navy-h); transform: translateY(-1px); box-shadow: var(--lift); }
.btn.secondary, .btn.sec { background: #fff; color: var(--navy); border-color: var(--bd); }
.btn.secondary:hover, .btn.sec:hover { background: var(--grey); border-color: var(--bd-h); transform: translateY(-1px); box-shadow: var(--lift); }
.btn.quiet, .quiet { border: 0; background: none; height: auto; color: var(--navy); padding: 0; height: auto; text-decoration: underline; text-underline-offset: 3px; font-weight: 600; font-size: 14px; }
.btn.action { background: var(--red); color: #fff; border-color: var(--red); }
.btn.action:hover { background: var(--red-h); transform: translateY(-1px); box-shadow: var(--lift); }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* fields */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } @media (max-width: 480px) { .two { grid-template-columns: 1fr; } }
.ctl { border: 1px solid var(--bd); background: #fff; border-radius: var(--r); transition: border-color var(--t), box-shadow var(--t); }
.ctl:hover { border-color: var(--bd-h); } .ctl:focus-within { border-color: var(--navy); box-shadow: var(--ring); }
.ctl.bad { border-color: var(--red); }
.f { display: block; margin: 0 0 14px; } .f > span, .f > .l { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.help { display: block; font-size: 13px; color: var(--muted); margin-top: 6px; } .help.err { color: var(--red); }
.in { width: 100%; height: var(--h-md); border: 1px solid var(--bd); border-radius: var(--r); background: #fff; padding: 0 12px; outline: none; }
.in:focus { border-color: var(--navy); box-shadow: var(--ring); }
.ctl > .in { border: 0; border-radius: 0; background: transparent; box-shadow: none; }  /* inside a .ctl wrapper the wrapper draws the border */
textarea.in { height: auto; min-height: 110px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.sel { position: relative; } .sel select { appearance: none; -webkit-appearance: none; width: 100%; height: var(--h-md); border: 0; background: transparent; padding: 0 36px 0 12px; font-weight: 600; color: var(--navy); cursor: pointer; outline: none; }
.sel::after { content: ""; position: absolute; right: 13px; top: 50%; width: 8px; height: 8px; border: solid var(--muted); border-width: 0 2px 2px 0; transform: translateY(-70%) rotate(45deg); pointer-events: none; }

/* stepper: the one 48 px control */
.step { display: inline-flex; align-items: stretch; height: var(--h-lg); overflow: hidden; }
.step button { border: 0; background: transparent; width: 46px; font-size: 22px; color: var(--navy); transition: background .12s, transform var(--t) var(--spring); }
.step button:hover { background: var(--grey); } .step button:active { background: var(--fill); transform: scale(.9); }
.step input { border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); width: 92px; text-align: center; font-weight: 600; font-size: 18px; color: var(--navy); outline: none; font-variant-numeric: tabular-nums; }
.step .u { display: flex; align-items: center; padding: 0 10px; color: var(--muted); font-size: 14px; }
.step.tick input { animation: ssn-tick .3s var(--spring); } @keyframes ssn-tick { 30% { transform: scale(1.12); color: var(--red); } }

/* segmented control: two to four choices, sliding thumb */
.seg { position: relative; display: inline-flex; padding: 3px; gap: 2px; height: var(--h-md); }
.seg button { position: relative; z-index: 1; border: 0; background: none; padding: 0 16px; border-radius: 4px; color: var(--muted); font-weight: 600; transition: color var(--t); min-width: 64px; }
.seg button.on { color: #fff; }
.seg .thumb { position: absolute; top: 3px; left: 3px; height: calc(100% - 6px); border-radius: 4px; background: var(--navy); transition: left .3s var(--spring), width .3s var(--spring); }

/* chips (tap) and tags (read) */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; height: var(--h-sm); padding: 0 12px; border: 1px solid var(--bd); background: #fff; border-radius: var(--r-pill); font-size: 14px; cursor: pointer; transition: transform var(--t) var(--spring), background var(--t), border-color var(--t); }
.chip:hover { background: var(--grey); border-color: var(--bd-h); } .chip:active { transform: scale(.94); }
.chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.chip.tag, .tag { display: inline-flex; align-items: center; height: var(--h-sm); padding: 0 12px; border-radius: var(--r-pill); font-size: 14px; background: var(--fill); border: 1px solid transparent; color: var(--muted); cursor: default; }
.pill { display: inline-block; height: 24px; line-height: 24px; padding: 0 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 700; }
.pill.red { background: var(--red); color: #fff; } .pill.grey { background: var(--fill); color: var(--muted); } .pill.navy { background: var(--navy); color: #fff; }
.toggle { position: relative; width: 44px; height: 26px; border-radius: 13px; background: #c9d1d6; border: 0; transition: background var(--t); }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(3,32,47,.3); transition: left .25s var(--spring); }
.toggle.on { background: var(--navy); } .toggle.on::after { left: 21px; }

/* choice buttons inside lessons */
.choice { display: block; width: 100%; text-align: left; border: 1px solid var(--bd); background: #fff; border-radius: var(--r); padding: 11px 14px; margin-top: 8px; transition: transform var(--t) var(--spring), background var(--t), border-color var(--t); }
.choice:hover { background: var(--grey); border-color: var(--bd-h); } .choice:active { transform: scale(.985); }
.choice.picked { border-color: var(--navy); background: var(--fill); }

/* value tiles: numbers in a row share one line (B9) */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin: 10px 0 0; align-items: stretch; }
.tile { display: flex; flex-direction: column; justify-content: flex-end; border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; background: #fff; }
.tile small { display: block; color: var(--muted); font-size: 13px; line-height: 1.3; min-height: calc(13px * 1.3 * 2); margin-bottom: 4px; }
.tile strong { display: block; color: var(--navy); font-size: 22px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.tile strong em { font-style: normal; font-size: 13px; font-weight: 400; color: var(--muted); }
@media (max-width: 480px) { .tiles { grid-template-columns: 1fr 1fr; } }

/* answer box and readout */
.answer { background: var(--fill); border-left: 4px solid var(--navy); border-radius: 0 var(--r) var(--r) 0; padding: 12px 16px; }
.answer small { display: block; font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.answer .v { font-size: 34px; font-weight: 700; color: var(--navy); line-height: 1.1; } .answer .v em { font-style: normal; font-size: 16px; color: var(--muted); font-weight: 400; margin-left: 8px; }
.answer p { margin: 4px 0 0; } .answer b { color: var(--navy); }
.answer.flash, .ro.flash { animation: ssn-flash .5s; } @keyframes ssn-flash { from { background: #e0e4e7; } }
.ro { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin: 10px 0 0; padding: 10px 12px; background: var(--fill); border-left: 4px solid var(--navy); border-radius: 0 var(--r) var(--r) 0; font-size: 15px; }
.ro strong { color: var(--navy); } .ro b { color: var(--navy); font-variant-numeric: tabular-nums; } .ro.out { border-left-color: var(--red); }
.ro.hint { color: var(--muted); border-left-color: #c9d1d6; font-size: 14px; }

/* people lists: one grid for every row, numbers right-aligned on one line (B9) */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: grid; grid-template-columns: 28px 40px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); border-radius: var(--r); }
.list li:first-child { border-top: 0; } .list li[data-i]:hover, .list li[data-ath]:hover { background: var(--grey); cursor: pointer; }
.list li.sel { background: var(--fill); box-shadow: inset 3px 0 0 var(--red); }
.list .rk { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; font-size: 14px; }
.av { width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; letter-spacing: .02em; overflow: hidden; flex: 0 0 40px; }
.av.b { background: #8a9ba6; } .av.ph { background: var(--fill); } .av img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.list .who strong { display: block; color: var(--navy); line-height: 1.2; } .list .who span { display: block; font-size: 13px; color: var(--muted); }
.list .who .st { font-size: 12px; } .list .who .st.act { color: var(--navy); font-weight: 600; }
.list .val { text-align: right; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; font-size: 18px; white-space: nowrap; }
.list .val small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }

/* measure rows: one grid, every row the same, taken or not */
.mrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; border-top: 1px solid var(--line); padding: 6px 0; min-height: 44px; }
.mrow:first-of-type { border-top: 0; }
.mrow svg { display: block; max-width: 100%; } .mrow svg text { font-size: 12px; fill: var(--muted); }
.mrow .pc { font-size: 13px; color: var(--muted); white-space: nowrap; width: 200px; text-align: right; } .mrow .pc b { color: var(--navy); }
@media (max-width: 560px) { .mrow { grid-template-columns: 1fr; gap: 2px; } .mrow .pc { width: auto; text-align: left; padding-left: 110px; } }
.gh { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 12px 0 2px; }

@media (prefers-reduced-motion: reduce) { .btn, .chip, .seg .thumb, .toggle::after, .step input, .answer, .ro { transition: none !important; animation: none !important; } }

/* B14 clickable rows (a lesson, a case, a tool, a search hit) look clickable at rest: grey fill, rounded, hover darker, press 98%. A row the reader can tap never sits on plain white. */
.rowlink { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 1px solid transparent; background: var(--grey); border-radius: var(--r); padding: 10px 12px; font: inherit; color: inherit; cursor: pointer; transition: background .12s, transform .08s, border-color .12s; }
.rowlink:hover { background: var(--fill); border-color: var(--bd-h); } .rowlink:active { transform: scale(.98); } .rowlink:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.rowlink + .rowlink { margin-top: 6px; }

/* A9 breadcrumbs: every screen below the front door shows the trail back, one link per level, current screen last and plain. */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 14px; color: var(--muted); margin: 0 0 10px; }
.crumbs a, .crumbs button { border: 0; background: none; padding: 0; font: inherit; color: var(--navy); cursor: pointer; text-decoration: none; } .crumbs a:hover, .crumbs button:hover { text-decoration: underline; }
.crumbs i { font-style: normal; color: var(--muted); } .crumbs span { color: var(--muted); }
/* Icon tiles on the front door: light grey tile, navy line icon, 48 px so the icon sits inside with room (Adam, 2026-10-28: "make the boxes bigger"). */
.icot { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 12px; background: var(--fill); box-shadow: inset 0 0 0 1px var(--line); display: grid; place-items: center; } .icot svg { width: 24px; height: 24px; stroke: var(--navy); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
