/* Boot Camp Ready — design system
   Tokens on :root; dark mode redefines them. Breakpoints: phone <768 · tablet rail 768–959 · sidebar ≥960 · wide ≥1200 */

/* Fonts come from our own site (fonts/, license in fonts/OFL.txt), so no visitor's IP address goes to a font service.
   Only the weights the CSS uses. Headings with no weight of their own ask for 400 and get the Condensed 500 file, and weight 800
   rules get the 700 file, the same as with the Google link. */
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/barlow-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/barlow-condensed-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }

:root {
  --bg: #f3f0e7;
  --surface: #ffffff;
  --surface-2: #ece7d9;
  --text: #1e2119;
  --muted: #5f6455;
  --border: #dcd5c2;
  --border-strong: #c9c1aa;
  --track: #e6e0cf;
  --primary: #4b5320;
  --primary-ink: #ffffff;
  --primary-soft: #e4e6d0;
  --accent: #81610a;
  --accent-bright: #d4a72c;
  --accent-soft: #f7edcb;
  --danger: #a3362a;
  --danger-soft: #f7e1dd;
  --ok: #387335;
  --ok-soft: #dfeed9;
  --info: #2c5d78;
  --info-soft: #dcebf3;
  --bar-bg: #4b5320;
  --bar-ink: #ffffff;
  --hero-from: #4b5320;
  --hero-to: #353b16;
  --shadow: 0 1px 2px rgba(30, 33, 25, .05), 0 6px 18px rgba(30, 33, 25, .06);
  --radius: 14px;
  --radius-sm: 10px;
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Barlow Condensed", "Barlow", system-ui, sans-serif;
  --nav-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12140e; --surface: #1b1e16; --surface-2: #252920; --text: #ebeadf; --muted: #a9ad9b;
    --border: #444b38; --border-strong: #59614a; --track: #33382b;
    --primary: #a9b565; --primary-ink: #12140e; --primary-soft: #353c22;
    --accent: #e2bc4a; --accent-bright: #e2bc4a; --accent-soft: #3a3119;
    --danger: #ee9284; --danger-soft: #3b201b; --ok: #8ccb84; --ok-soft: #1e3320; --info: #8cc3e0; --info-soft: #18303c;
    --bar-bg: #1d2114; --bar-ink: #ebeadf; --hero-from: #2f3620; --hero-to: #1c2013;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12140e; --surface: #1b1e16; --surface-2: #252920; --text: #ebeadf; --muted: #a9ad9b;
  --border: #444b38; --border-strong: #59614a; --track: #33382b;
  --primary: #a9b565; --primary-ink: #12140e; --primary-soft: #353c22;
  --accent: #e2bc4a; --accent-bright: #e2bc4a; --accent-soft: #3a3119;
  --danger: #ee9284; --danger-soft: #3b201b; --ok: #8ccb84; --ok-soft: #1e3320; --info: #8cc3e0; --info-soft: #18303c;
  --bar-bg: #1d2114; --bar-ink: #ebeadf; --hero-from: #2f3620; --hero-to: #1c2013;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
a { color: var(--info); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .4em; letter-spacing: .01em; }
h1 { font-size: 2rem; font-weight: 700; text-wrap: balance; }
h2 { font-size: 1.5rem; font-weight: 700; margin-top: 1.4em; }
h3 { font-size: 1.2rem; font-weight: 600; margin-top: 1.1em; }
p { margin: 0 0 .8em; }
ul, ol { margin: 0 0 .9em; padding-left: 1.25em; }
li { margin: .25em 0; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.5em 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent-bright); outline-offset: 2px; border-radius: 6px; }
#view:focus, [tabindex="-1"][data-focus]:focus { outline: none; } /* focus lands here from code so reading starts in the right place; they aren't controls */
input[type="date"]:focus-within, input[type="time"]:focus-within { outline: 3px solid var(--accent-bright); outline-offset: 2px; } /* focus sits on a part inside the field, so :focus-visible can miss it */
.subtabs a:focus-visible, .seg button:focus-visible, .day-strip a:focus-visible { outline-offset: -3px; } /* rows that scroll sideways would cut off a ring drawn outside */
html { scroll-padding-bottom: calc(var(--nav-h) + 64px + env(safe-area-inset-bottom)); } /* Tab keeps the focused control clear of the bottom bar and the Top button */
html:has(.topbar) { scroll-padding-top: calc(120px + var(--demo-x, 0px)); } /* and of the sticky top bar and tabs; this also sets where a heading lands when you jump to it */
kbd { font: 600 .7rem/1 var(--font); padding: 3px 5px; border-radius: 5px; border: 1px solid currentColor; opacity: .55; margin-left: 6px; display: none; }
@media (hover: hover) and (min-width: 960px) { kbd { display: inline-block; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nw { white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.plain-link { color: var(--text); font-weight: 600; text-decoration: none; }
.tel { position: relative; white-space: nowrap; font-weight: 700; text-decoration: none; color: inherit; border-bottom: 2px solid var(--accent-bright); }
.tel::after { content: ''; position: absolute; inset: -12px -4px; } /* a 44px tap area; the look doesn't change */

/* ---------- Layout ---------- */
.app { min-height: 100vh; display: flex; }
.sidebar { display: none; }
.main { flex: 1; min-width: 0; }
.topbar {
  position: sticky; top: var(--demo-x, 0px); z-index: 20; display: flex; align-items: center; gap: 10px;
  padding: calc(env(safe-area-inset-top) + 9px) 16px 9px;
  background: var(--bar-bg); color: var(--bar-ink); border-bottom: 1px solid rgba(0,0,0,.08);
}
.topbar .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; min-width: 0; }
.topbar .brand img { width: 30px; height: 30px; border-radius: 7px; flex: none; }
.topbar .brand span { font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .chip-count { margin-left: auto; flex: none; display: inline-flex; align-items: center; min-height: 40px; font-family: var(--font-head); font-weight: 600; font-size: .92rem; letter-spacing: .03em; background: rgba(255,255,255,.14); color: inherit; border-radius: 999px; padding: 5px 12px; text-decoration: none; }
.topbar .top-search { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: inherit; background: rgba(255,255,255,.14); }
.topbar .top-search svg { width: 20px; height: 20px; }
:root[data-theme="dark"] .topbar .chip-count, :root[data-theme="dark"] .topbar .top-search { background: rgba(255,255,255,.08); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .topbar .chip-count, :root:not([data-theme="light"]) .topbar .top-search { background: rgba(255,255,255,.08); } }

.view { max-width: 860px; margin: 0 auto; padding: 16px 16px calc(var(--nav-h) + 40px + env(safe-area-inset-bottom)); }

/* bottom nav (phone) */
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--surface); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); }
.bottomnav a, .bottomnav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: var(--nav-h); border: 0; background: none; cursor: pointer; color: var(--muted); text-decoration: none; font-size: .72rem; font-weight: 600; letter-spacing: .02em; min-width: 0; }
.bottomnav svg { width: 24px; height: 24px; flex: none; }
.bottomnav span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* very large text: the bar stays on the screen */
.bottomnav .active { color: var(--primary); }
:root[data-theme="dark"] .bottomnav .active { color: var(--accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bottomnav .active { color: var(--accent); } }
body.test-clock :is(.bottomnav, .sidebar) { display: none; } /* a stray tap can't leave a running test section; .test-leave is the way out */
body.test-clock .view { margin-left: auto; } /* the sidebar is gone, so center the card like the phone layout */

/* menu sheet (phone "More") */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .2s; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; background: var(--surface); border-radius: 18px 18px 0 0; padding: 10px 12px calc(16px + env(safe-area-inset-bottom)); transform: translateY(105%); transition: transform .25s ease, visibility 0s .25s; max-height: 85vh; overflow: auto; visibility: hidden; }
.sheet { max-height: 85dvh; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-top: 0; }
.sheet-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 4px 10px; background: var(--surface); }
.sheet-head b { font-family: var(--font-head); font-size: 1.15rem; letter-spacing: .02em; }
.sheet-head .icon-btn svg { width: 20px; height: 20px; }
.menu-open .sheet-backdrop { opacity: 1; pointer-events: auto; }
.menu-open .sheet { transform: none; visibility: visible; transition: transform .25s ease; }
.navlist { list-style: none; margin: 0; padding: 0; }
.navlist li { margin: 0; }
.navlist a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 600; }
.navlist a svg { width: 22px; height: 22px; color: var(--muted); flex: none; }
.navlist a:hover { background: var(--surface-2); }
.navlist a.active { background: var(--primary-soft); }
.navlist a.active svg { color: var(--primary); }
.navlist .sub { display: block; font-weight: 400; font-size: .82rem; color: var(--muted); line-height: 1.3; }
.navlist .nav-group { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .12em; font-size: .74rem; font-weight: 700; color: var(--accent); padding: 14px 12px 4px; }
.navlist .nav-group:first-child { padding-top: 2px; }

/* tablet: icon rail */
@media (min-width: 768px) and (max-width: 959px) {
  .sidebar { display: block; position: sticky; top: var(--demo-x, 0px); height: calc(100vh - var(--demo-x, 0px)); overflow-y: auto; width: 84px; flex: none; padding: 10px 6px; background: var(--surface); border-right: 1px solid var(--border); scrollbar-width: none; }
  .sidebar::-webkit-scrollbar { display: none; }
  .sidebar .brand { display: flex; justify-content: center; padding: 4px 0 10px; }
  .sidebar .brand img { width: 40px; height: 40px; border-radius: 10px; }
  .sidebar .brand span, .sidebar .navlist .sub, .sidebar .navlist .nav-group { display: none; }
  .sidebar .navlist a { flex-direction: column; gap: 4px; font-size: .68rem; line-height: 1.15; padding: 9px 2px; text-align: center; }
  .bottomnav, .sheet, .sheet-backdrop { display: none; }
  .view { padding: 22px 28px 48px; }
}
/* laptop: full sidebar */
@media (min-width: 960px) {
  .sidebar { display: block; width: 270px; flex: none; position: sticky; top: var(--demo-x, 0px); height: calc(100vh - var(--demo-x, 0px)); overflow-y: auto; background: var(--surface); border-right: 1px solid var(--border); padding: 18px 12px; scrollbar-width: thin; }
  .sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 16px; text-decoration: none; color: var(--text); }
  .sidebar .brand img { width: 38px; height: 38px; border-radius: 9px; }
  .sidebar .brand b { font-family: var(--font-head); font-size: 1.35rem; letter-spacing: .04em; text-transform: uppercase; display: block; line-height: 1.1; }
  .sidebar .brand small { color: var(--muted); font-size: .8rem; }
  .bottomnav, .sheet, .sheet-backdrop { display: none; }
  .view { padding: 26px 32px 60px; }
  .view.wide { max-width: 1120px; }
  .view:not(.wide) { margin-left: max(0px, calc((100% - 1120px) / 2)); margin-right: auto; }
}
@media (min-width: 960px) and (max-height: 940px) {
  .sidebar .navlist a { padding: 7px 10px; }
  .sidebar .navlist .sub { display: none; }
  .sidebar .navlist a.active .sub { display: block; }
  .sidebar .navlist .nav-group { padding-top: 10px; }
}
/* tablet/laptop top bar: quiet */
@media (min-width: 768px) {
  .topbar { background: color-mix(in srgb, var(--bg) 88%, transparent); color: var(--text); border-bottom: 1px solid var(--border); padding: 9px 28px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
  .topbar .brand { visibility: hidden; }
  .topbar .chip-count, .topbar .top-search { background: var(--surface) !important; border: 1px solid var(--border); color: var(--text); }
  .toast { bottom: 24px !important; }
  .tiles { display: none !important; }
}

/* ---------- Page header & sub-tabs ---------- */
.page-head { margin: 2px 0 14px; }
.page-head .eyebrow, .eyebrow { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .12em; font-size: .85rem; font-weight: 700; color: var(--accent); }
.page-head p { color: var(--muted); max-width: 66ch; }
.subtabs {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -16px 16px; padding: 2px 16px 8px; scroll-padding-inline: 16px;
  position: sticky; top: calc(env(safe-area-inset-top) + 58px + var(--demo-x, 0px)); z-index: 10; background: var(--bg);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 14px), transparent);
  mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 14px), transparent);
}
.subtabs::-webkit-scrollbar { display: none; }
/* A timed test in progress (#/asvab/test/run): the test card and its timer only, so a stray tap can't leave the test. */
.view.test-run :is(.page-head, .subtabs, .prevnext, .notes-card) { display: none; }
.subtabs a { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 16px; border-radius: 999px; text-decoration: none; background: var(--surface); border: 1px solid var(--border-strong); color: var(--text); font-weight: 600; font-size: .92rem; white-space: nowrap; }
.subtabs a.active { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.tab-count { font-size: .72rem; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.subtabs a.active .tab-count { background: rgba(255,255,255,.22); color: inherit; }
.tab-count.full { background: var(--ok-soft); color: var(--ok); }
@media (min-width: 768px) {
  .subtabs { flex-wrap: wrap; margin: 0 0 16px; padding: 2px 0 8px; -webkit-mask-image: none; mask-image: none; position: static; }
  .subtabs a { padding: 7px 12px; min-height: 38px; font-size: .88rem; }
}
.jump { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 14px; }
.jump button { border: 1px dashed var(--border-strong); background: none; border-radius: 999px; padding: 5px 12px; font-size: .82rem; font-weight: 600; color: var(--muted); cursor: pointer; }
.jump button:hover { color: var(--text); border-style: solid; }
.prevnext { margin: 18px 0 14px; }
.prevnext > a:last-child:not(:first-child) { margin-left: auto; }
.prevnext .btn { max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; line-height: 24px; }

/* ---------- Cards & blocks ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin: 0 0 14px; box-shadow: var(--shadow); }
.card > :last-child { margin-bottom: 0; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.card-title { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.card-title > :first-child { flex: 1 1 min-content; min-width: 0; } /* the title gives way first; only very large text drops the tag or link to its own line */
.card-title h2, .card-title h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.card-title .meta { color: var(--muted); font-size: .88rem; display: inline-flex; align-items: center; gap: 4px; }
.card-title .meta svg { width: 14px; height: 14px; }
.job-card .card-title, .notes-card .card-title { min-width: 0; }
.job-card .card-title > :first-child, .notes-card .card-title > :first-child { flex: 0 1 auto; }
.job-card .card-title h2, .notes-card .card-title h3 { min-width: 0; overflow-wrap: anywhere; }
.notes-card .card-title .meta { white-space: normal; flex-wrap: wrap; min-width: 0; }
.card-title h2 svg, .card-title h3 svg { width: 20px; height: 20px; flex: none; }
a.meta { color: var(--info); text-decoration: none; font-weight: 600; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); margin-bottom: 14px; }
@media (min-width: 600px) { .grid[data-n="2"], .grid[data-n="4"], .grid[data-n="8"] { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .view.wide .grid[data-n="4"] { grid-template-columns: repeat(4, 1fr); } .grid[data-n="3"], .grid[data-n="6"] { grid-template-columns: repeat(3, 1fr); } }
.grid .card { margin: 0; }
.card .ico { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.card .ico svg { width: 20px; height: 20px; }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); vertical-align: 2px; text-decoration: none; white-space: nowrap; }
.tag.red { background: var(--danger-soft); color: var(--danger); }
.tag.white { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.tag.blue { background: var(--info-soft); color: var(--info); }
.tag.gold { background: var(--accent-soft); color: var(--accent); }
.tag.green { background: var(--ok-soft); color: var(--ok); }
.step-num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: var(--primary-ink); font-weight: 700; font-size: .85rem; vertical-align: middle; margin-right: 4px; }

.callout { border-radius: var(--radius-sm); padding: 12px 14px; margin: 0 0 14px; background: var(--info-soft); border-left: 4px solid var(--info); }
.callout > :last-child { margin-bottom: 0; }
.callout .callout-title { font-weight: 700; display: block; margin-bottom: 2px; }
.callout.tip { background: var(--ok-soft); border-color: var(--ok); }
.callout.warn { background: var(--danger-soft); border-color: var(--danger); }
.callout.gold, .callout.verify { background: var(--accent-soft); border-color: var(--accent-bright); }
.callout a.more { font-weight: 700; }

.table-wrap {
  overflow-x: auto; margin: 0 0 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background:
    linear-gradient(90deg, var(--surface) 30%, transparent) left / 40px 100% no-repeat local,
    linear-gradient(270deg, var(--surface) 30%, transparent) right / 40px 100% no-repeat local,
    linear-gradient(90deg, rgba(0,0,0,.12), transparent) left / 14px 100% no-repeat scroll,
    linear-gradient(270deg, rgba(0,0,0,.12), transparent) right / 14px 100% no-repeat scroll,
    var(--surface);
}
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; hyphens: none; }
th { background: var(--surface-2); font-family: var(--font-head); font-weight: 600; letter-spacing: .03em; font-size: 1rem; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.hl, th.hl { background: var(--accent-soft); font-weight: 700; }
.you { font: 700 .72rem/1 var(--font); letter-spacing: .06em; background: var(--accent); color: var(--surface); border-radius: 4px; padding: 2px 4px; vertical-align: 2px; }
.table-caption { font-size: .85rem; color: var(--muted); margin: -6px 0 14px; }
@media (max-width: 480px) { table { font-size: .86rem; } th, td { padding: 8px 7px; } th { font-size: .9rem; } .compact { font-size: .82rem; } .compact th, .compact td { padding: 8px 5px; } .compact th { font-size: .85rem; } }

details.acc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); margin: 0 0 10px; }
details.acc > summary { cursor: pointer; list-style: none; padding: 12px 40px 12px 14px; font-weight: 700; position: relative; }
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary::after { content: ""; position: absolute; right: 16px; top: 50%; width: 9px; height: 9px; margin-top: -7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; }
details.acc[open] > summary::after { transform: rotate(-135deg); margin-top: -2px; }
details.acc > summary .sum-sub { display: block; font-weight: 400; color: var(--muted); font-size: .9rem; }
details.acc > summary svg { width: 18px; height: 18px; vertical-align: -3px; margin-right: 6px; color: var(--danger); }
details.acc > .acc-body { padding: 0 14px 12px; }
details.acc > .acc-body > :last-child { margin-bottom: 0; }
details.acc.crit { border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }

.kv { display: grid; grid-template-columns: minmax(110px, max-content) 1fr; gap: 6px 14px; margin: 0 0 14px; }
.kv dt { font-weight: 700; }
.kv dd { margin: 0; }
@media (max-width: 480px) { .kv { grid-template-columns: 1fr; gap: 0; } .kv dd { margin-bottom: 8px; } }
.kv.mn { grid-template-columns: 2.6em 1fr !important; gap: 6px 12px; align-items: center; }
.kv.mn dt { background: var(--accent-soft); color: var(--accent); border-radius: 8px; text-align: center; font-family: var(--font-head); font-size: 1.3rem; padding: 2px 0; }
.kv.mn dd { margin: 0 !important; }

blockquote.creed { margin: 0 0 14px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface-2); border-left: 4px solid var(--accent-bright); white-space: pre-line; font-weight: 500; }
blockquote.creed cite { display: block; margin-top: 8px; font-style: normal; font-size: .85rem; color: var(--muted); }
.why-quote { font-size: 1.1rem; }

.timeline { list-style: none; margin: 0 0 14px; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.timeline li { position: relative; padding: 0 0 16px 32px; margin: 0; }
.timeline li::before { content: ""; position: absolute; left: 3px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--primary); }
.timeline li[data-phase="yellow"]::before { border-color: #d4a72c; }
.timeline li[data-phase="red"]::before { border-color: #a3362a; }
.timeline li[data-phase="white"]::before { border-color: var(--muted); background: #fff; }
.timeline li[data-phase="blue"]::before { border-color: #2c5d78; }
.timeline li.done::before { background: var(--primary); }
.timeline li.now::before { background: var(--accent-bright); border-color: var(--accent-bright); box-shadow: 0 0 0 4px var(--accent-soft); }
.timeline li.done .what, .timeline li.done .desc { color: var(--muted); }
.timeline .when { font-size: .85rem; color: var(--muted); font-weight: 600; }
.timeline .what { font-weight: 700; }
.timeline .desc { color: color-mix(in srgb, var(--text) 80%, transparent); font-size: .94rem; }
.timeline-more { margin-top: 4px; }

details.sources { margin: 14px 0; font-size: .88rem; color: var(--muted); }
details.sources summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
details.sources ul { padding-left: 1.1em; margin-top: 4px; }
details.sources li a { display: inline-block; padding: 4px 0; }

/* ---------- Checklists ---------- */
.checklist { list-style: none; margin: 0 0 6px; padding: 0; }
.checklist li { margin: 0; border-bottom: 1px solid var(--border); }
.checklist li:last-child { border-bottom: 0; }
.checklist li.has-link { display: flex; align-items: center; gap: 8px; }
.checklist li.has-link .check { flex: 1; min-width: 0; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 11px 2px; cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check .box { flex: none; width: 24px; height: 24px; margin-top: 1px; border-radius: 7px; border: 2px solid var(--muted); background: var(--surface); display: grid; place-items: center; transition: all .15s; }
.check .box svg { width: 15px; height: 15px; color: var(--primary-ink); opacity: 0; transform: scale(.6); transition: all .15s; }
.check input:checked + .box { background: var(--primary); border-color: var(--primary); }
.check input:checked + .box svg { opacity: 1; transform: none; }
.check input:focus-visible + .box { outline: 3px solid var(--accent-bright); outline-offset: 2px; }
.check .label { flex: 1; min-width: 0; }
.check .label .detail { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: .9rem; line-height: 1.4; margin-top: 2px; }
.check .label .detail.open { -webkit-line-clamp: unset; display: block; }
.more-link { background: none; border: 0; color: var(--accent); font-weight: 700; cursor: pointer; font-size: .85rem; display: inline-flex; align-items: center; min-height: 36px; padding: 6px 12px 6px 0; }
.check input:checked ~ .label > .text { text-decoration: line-through; text-decoration-color: var(--muted); color: var(--muted); }
.item-link { flex: none; display: inline-flex; align-items: center; gap: 2px; min-height: 40px; max-width: 42%; padding: 7px 8px 7px 12px; border-radius: 999px; background: var(--primary-soft); border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent); color: var(--text); text-decoration: none; font-weight: 700; font-size: .8rem; }
.item-link .il-text { overflow: hidden; line-height: 1.15; overflow-wrap: anywhere; }
.item-link svg { width: 16px; height: 16px; flex: none; color: var(--primary); }
.item-link:hover { background: var(--primary); color: var(--primary-ink); }
.item-link:hover svg { color: inherit; }
.count-tag { font-size: .78rem; }
.clamp-2 p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 4px; }
.clamp-2 p.open { -webkit-line-clamp: unset; display: block; }

.progress { height: 10px; border-radius: 999px; background: var(--track); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--primary); border-radius: inherit; transition: width .3s; }
.progress.gold > span { background: var(--accent-bright); }
.progress-row { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.progress-row .progress { flex: 1; }
.progress-row .pct { font-variant-numeric: tabular-nums; font-weight: 700; font-size: .9rem; min-width: 3.2em; text-align: right; }
.mini-ring { --p: 0; --s: 36px; flex: none; position: relative; width: var(--s); height: var(--s); border-radius: 50%; background: conic-gradient(var(--primary) calc(var(--p) * 1%), var(--track) 0); display: inline-grid; place-items: center; }
.mini-ring > span { width: calc(var(--s) - 8px); height: calc(var(--s) - 8px); border-radius: 50%; background: var(--surface); display: grid; place-items: center; font: 700 .68rem/1 var(--font); color: var(--muted); }
.mini-ring.ico-ring { background: var(--accent-soft); color: var(--accent); width: 40px; height: 40px; }
.mini-ring.ico-ring svg { width: 20px; height: 20px; }

/* ---------- Home ---------- */
.hero { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--hero-from), var(--hero-to)); color: #f4f2e8; border-radius: var(--radius); padding: 20px; margin-bottom: 14px; box-shadow: var(--shadow); }
.hero::before { content: ""; position: absolute; inset: 0; opacity: .07; pointer-events: none; background-image: radial-gradient(circle at 1px 1px, #fff 1px, transparent 0); background-size: 14px 14px; }
.hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 200px; height: 200px; background: radial-gradient(circle, rgba(255,255,255,.14), transparent 65%); pointer-events: none; }
.hero .hello { font-family: var(--font-head); font-size: 1.1rem; letter-spacing: .06em; text-transform: uppercase; opacity: .92; display: flex; align-items: center; gap: 8px; }
.hello-badge { display: inline-flex; align-items: center; gap: 4px; background: var(--accent-bright); color: #1e2119; border-radius: 999px; padding: 2px 10px 2px 6px; font-size: .9rem; }
.hello-badge svg { width: 16px; height: 16px; }
.hero .big { font-family: var(--font-head); font-size: 4.2rem; font-weight: 700; line-height: 1; margin: 4px 0; }
.hero .big small { font-size: 1.4rem; font-weight: 600; letter-spacing: .03em; }
.hero .line { opacity: .92; }
.hero .line a { color: inherit; text-decoration: underline; }
.hero .stats { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; font-size: .85rem; line-height: 1.25; }
.hero .stats > * { color: inherit; text-decoration: none; white-space: nowrap; opacity: .95; }
.hero .stats b { display: block; font-family: var(--font-head); font-size: 1.45rem; }
.hero .stats a.act { align-self: flex-end; display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.12); font-weight: 700; }
.welcome { position: relative; border: 2px solid var(--accent-bright); background: linear-gradient(180deg, var(--accent-soft), var(--surface) 75%); }
.welcome-row { display: flex; gap: 12px; align-items: flex-start; padding-right: 30px; }
.welcome h2 { margin: 0 0 2px; }
.welcome-badge { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--primary); color: var(--accent-bright); display: grid; place-items: center; }
.welcome-badge svg { width: 26px; height: 26px; }
.welcome .how { margin: 10px 0; }
.welcome .how summary { cursor: pointer; font-weight: 700; color: var(--accent); }
.welcome-list { padding-left: 1.1em; margin-top: 8px; }
.welcome .row { margin-top: 6px; }
.install-help { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.icon-btn { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; text-decoration: none; }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.icon-btn.ghost { visibility: hidden; }
.icon-btn.danger { width: 32px; height: 32px; color: var(--danger); }
.icon-btn.close { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; }
.tip-card .card-title { margin: 0; }
.tip-card .icon-btn { width: 40px; height: 40px; margin: -4px; background: transparent; border-color: color-mix(in srgb, var(--accent) 40%, transparent); color: var(--accent); }
.mission .eyebrow { font-size: .8rem; }
.mission-title { margin: 2px 0 10px; font-size: 1.55rem; }
.plan-section-title { font-family: var(--font-head); font-size: .95rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin: 12px 0 0; font-weight: 700; }
.cl-rows { display: grid; }
.cl-row { display: grid; grid-template-columns: 1fr auto 18px; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; }
.cl-row:last-child { border-bottom: 0; }
.cl-row .cl-t b { display: block; margin-bottom: 5px; font-weight: 600; }
.cl-row .progress { height: 5px; }
.cl-row .cl-n { font-weight: 700; font-size: .85rem; font-variant-numeric: tabular-nums; color: var(--muted); }
.cl-row .cl-n.start { color: var(--accent); }
.cl-row .cl-n.ok { color: var(--ok); }
.cl-row svg { width: 18px; height: 18px; color: var(--muted); }
.home-grid { display: block; }
@media (min-width: 768px) { .col-side { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; } .col-side > .card { margin: 0 0 14px; } }
@media (min-width: 1200px) { .home-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 16px; align-items: start; } .col-side { display: block; } }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.tile { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); color: var(--text); text-decoration: none; min-height: 96px; }
.tile svg { width: 26px; height: 26px; color: var(--primary); }
.tile b { font-family: var(--font-head); font-size: 1.12rem; line-height: 1.1; }
.tile span { font-size: .82rem; color: var(--muted); line-height: 1.3; }
.nudge { background: var(--accent-soft); }
.nudge svg { color: var(--accent); }

/* stat tiles */
.study-card h2 { display: flex; align-items: center; gap: 8px; }
.study-card h2 svg { width: 22px; height: 22px; color: var(--accent); }
.study-card.ready { border: 2px solid var(--primary); }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 8px; }
.stat-row > * { background: var(--surface-2); border-radius: 12px; padding: 10px 6px; text-align: center; color: var(--text); text-decoration: none; }
.stat-row > a.stat-cta { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent-bright); }
.stat-row b { display: flex; align-items: center; justify-content: center; gap: 4px; font-family: var(--font-head); font-size: 1.7rem; line-height: 1.1; }
.stat-row b i { display: inline-flex; color: #e8590c; }
.stat-row b i.off { opacity: .35; filter: grayscale(1); }
.stat-row b svg { width: 20px; height: 20px; }
.stat-row span { font-size: .7rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
@media (max-width: 420px) { .stat-row > * { padding-left: 3px; padding-right: 3px; } .stat-row span { font-size: .66rem; letter-spacing: 0; } }
.kv-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-bottom: 12px; }
.kv-stats > div { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.kv-stats b { display: block; font-family: var(--font-head); font-size: 1.6rem; line-height: 1.15; }
.kv-stats span { font-size: .76rem; color: var(--muted); font-weight: 600; }
@media (max-width: 480px) { .kv-stats[data-n="4"], .kv-stats[data-n="2"] { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 480px) { .kv-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; } .kv-stats > div { padding: 8px; } .kv-stats b { font-size: 1.35rem; } .kv-stats span { font-size: .7rem; } }
.chip-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-link { padding: 7px 12px; border-radius: 999px; background: var(--surface); color: var(--text); text-decoration: none; font-weight: 600; font-size: .9rem; border: 1px solid var(--border-strong); cursor: pointer; }
.chip-link:hover { border-color: var(--primary); }
.chip-grid-key { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 6px; margin-bottom: 14px; }
.kchip { display: flex; align-items: baseline; gap: 6px; padding: 8px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); white-space: nowrap; font-weight: 500; }
.kchip b { color: var(--accent); font-family: var(--font-head); font-size: 1.15rem; min-width: 1em; }

/* ---------- Plan ---------- */
.day-strip { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 10px; margin-bottom: 8px; scrollbar-width: none; }
.day-strip::-webkit-scrollbar { display: none; }
.day-strip a { flex: none; width: 56px; padding: 6px 0; text-align: center; border-radius: 10px; text-decoration: none; background: var(--surface); border: 1px solid var(--border); color: var(--text); position: relative; }
.day-strip a .d { display: block; font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; line-height: 1.1; }
.day-strip a .w { display: block; font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.day-strip a .d svg { width: 20px; height: 20px; vertical-align: -3px; }
.day-strip a.today { border: 2px solid var(--accent-bright); }
.day-strip a.today::after { content: ""; position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-bright); }
.day-strip a.sel { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.day-strip a.sel .w { color: inherit; opacity: .85; }
.day-strip a.full { box-shadow: inset 0 -3px 0 var(--ok); }
.day-strip a.ship { background: var(--accent-soft); border-color: var(--accent-bright); }
.day-strip a.ship.sel { background: var(--accent-bright); color: #1e2119; }
@media (min-width: 768px) { .day-strip { display: grid; grid-template-columns: repeat(7, 1fr); overflow: visible; } .day-strip a { width: auto; } }
.ship-card { border: 2px solid var(--accent-bright); padding-top: 0; overflow: hidden; }
.ship-banner { margin: 0 -16px 14px; padding: 16px; background: linear-gradient(135deg, var(--hero-from), var(--hero-to)); color: #f4f2e8; display: flex; flex-direction: column; }
.ship-banner span { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .12em; font-size: .85rem; color: var(--accent-bright); font-weight: 700; }
.ship-banner b { font-family: var(--font-head); font-size: 1.7rem; }

/* ---------- Forms ---------- */
label.field, .field { display: block; margin: 0 0 12px; }
label.field > span, .field > .flabel { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 4px; }
input[type="text"], input[type="date"], input[type="number"], input[type="search"], select, textarea { width: 100%; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); }
input[type="date"] { min-height: 46px; -webkit-appearance: none; appearance: none; }
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border-radius: var(--radius-sm); border: 1px solid var(--primary); background: var(--primary); color: var(--primary-ink); font-weight: 700; cursor: pointer; text-decoration: none; line-height: 1.2; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn.danger { background: var(--surface); color: var(--danger); border-color: var(--danger); }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: .9rem; }
.btn:disabled { opacity: .45; cursor: default; }
.big-btn { width: 100%; min-height: 52px; padding: 13px; font-size: 1.05rem; border-radius: 999px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1 1 140px; }
.row > .btn { flex: 0 1 auto; }
.row.fields { align-items: start; }
.settings-grid { display: grid; gap: 0 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .settings-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .row .field { flex: 1 1 100%; } .row > .btn { flex: 1 1 auto; } }
.search-wrap { position: relative; margin-bottom: 12px; }
.search-wrap svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search-input { padding-left: 42px !important; margin: 0; }
.search-wrap.big svg { width: 22px; height: 22px; left: 16px; }
.search-input.big { padding: 14px 16px 14px 48px !important; font-size: 1.08rem; border-width: 2px; }
.search-input.big:focus { border-color: var(--primary); outline: none; }

/* notes */
.notes-card { border-style: dashed; }
.notes-card .card-title h3 svg { width: 20px; height: 20px; color: var(--accent); }
.saved { color: var(--ok); opacity: 0; transition: opacity .3s; }
.saved.show { opacity: 1; }
.empty-state { text-align: center; padding: 28px 18px; }
.empty-state .es-ico { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); margin-bottom: 8px; }
.empty-state .es-ico svg { width: 28px; height: 28px; }

/* ---------- Practice ---------- */
.deck-list { display: grid; gap: 8px; margin-bottom: 14px; }
@media (min-width: 900px) { .deck-list { grid-template-columns: 1fr 1fr; } }
.deck-row { display: flex; align-items: center; gap: 6px; padding: 8px 10px 8px 8px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.deck-row:hover { border-color: var(--border-strong); }
.deck-list > .deck-row { min-width: 0; } /* grid items: let long titles wrap instead of pushing the page wider than a phone */
.deck-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; padding: 4px; }
.deck-main .dm-t { flex: 1; min-width: 0; }
.deck-main b { display: block; font-size: 1.02rem; line-height: 1.25; }
.deck-main .muted { display: block; }
.deck-main > svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.practice-cta { border-left: 4px solid var(--accent-bright); }
.pc-head { display: flex; gap: 12px; align-items: center; }
.pc-head b { display: block; }
.mode-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.practice-link { display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin: 0 0 12px; border-radius: var(--radius-sm); background: var(--primary-soft); color: var(--text); text-decoration: none; font-weight: 700; min-height: 48px; }
.practice-link svg { width: 22px; height: 22px; color: var(--primary); flex: none; }
.practice-link .go { margin-left: auto; color: var(--primary); }
/* "Opens in a new tab" arrow after outside links (ICON.ext): sized to the text around it. */
svg.ico-ext { width: .8em; height: .8em; margin-left: .2em; vertical-align: -.06em; flex: none; }
.btn svg.ico-ext { width: 14px; height: 14px; margin-left: 0; }
.practice-link .go svg.ico-ext { width: 18px; height: 18px; margin-left: 0; vertical-align: -3px; color: var(--primary); }
.back-link { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; margin: 0 0 4px; color: var(--muted); text-decoration: none; font-weight: 700; font-size: .95rem; }
.session-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .88rem; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.session-top + .progress, .session-top + .qdots { margin-bottom: 14px; }
.learn-card, .flash-wrap, .quiz-card, .action-dock { max-width: 640px; margin-left: auto; margin-right: auto; }
.learn-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 20px; margin-bottom: 14px; min-height: 240px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.lc-front { font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; line-height: 1.25; }
.lc-back { margin-top: 16px; padding-top: 14px; border-top: 2px dashed var(--border); font-size: 1.1rem; width: 100%; }
.action-dock { margin-bottom: 14px; }
.view.session .session-top, .view.session .session-top + .progress, .view.session .qdots { max-width: 640px; margin-left: auto; margin-right: auto; }
@media (max-width: 767px) { .action-dock { position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 10px); z-index: 5; } }
.grade-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.grade-row.two { grid-template-columns: 1fr 1fr; }
.grade-row .btn { min-height: 54px; }
.grade { flex-direction: column; gap: 0; padding: 8px 6px; line-height: 1.2; }
.grade small { font-weight: 500; font-size: .74rem; opacity: .9; }
.grade.again { background: var(--danger); border-color: var(--danger); color: #fff; }
.grade.easy { background: var(--info); border-color: var(--info); color: #fff; }
:root[data-theme="dark"] .grade.easy, :root[data-theme="dark"] .grade.again { color: #12140e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .grade.easy, :root:not([data-theme="light"]) .grade.again { color: #12140e; } }
.done-card { text-align: center; padding: 26px 18px; }
.done-badge { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 10px; background: var(--ok); color: var(--surface); display: grid; place-items: center; }
.done-badge svg { width: 34px; height: 34px; }
.done-card .row { justify-content: center; }
.done-card .row > * { flex: 0 0 auto; }
.score-ring { --p: 0; width: 110px; height: 110px; border-radius: 50%; margin: 0 auto 10px; display: grid; place-items: center; background: conic-gradient(var(--primary) calc(var(--p) * 1%), var(--track) 0); }
.score-ring span { width: 84px; height: 84px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-family: var(--font-head); font-size: 1.8rem; font-weight: 700; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; min-height: 40px; }
.switch input { position: absolute; opacity: 0; }
.switch .sw { width: 40px; height: 24px; border-radius: 999px; background: var(--track); position: relative; transition: background .2s; }
.switch .sw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform .2s; }
.switch input:checked + .sw { background: var(--primary); }
.switch input:checked + .sw::after { transform: translateX(16px); }
.switch input:focus-visible + .sw { outline: 3px solid var(--accent-bright); outline-offset: 2px; }

/* flashcards */
.flash-wrap { perspective: 1000px; margin-bottom: 14px; }
.flash { position: relative; min-height: 260px; cursor: pointer; transform-style: preserve-3d; transition: transform .45s; }
.flash.flipped { transform: rotateY(180deg); }
.flash .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); }
.flash .face.back { transform: rotateY(180deg); background: var(--primary-soft); }
.flash .face .q { font-family: var(--font-head); font-size: clamp(1.6rem, 6vw, 2.4rem); font-weight: 700; line-height: 1.2; }
.flash .face .q.short { font-size: 5rem; }
.flash .face .a { font-size: 1.15rem; }
.flash .face .hint { position: absolute; bottom: 10px; font-size: .82rem; color: var(--muted); }

/* quiz */
.qdots { display: flex; gap: 4px; }
.qdots span { flex: 1; height: 6px; border-radius: 999px; background: var(--track); }
.qdots span.cur { background: var(--accent-bright); }
.qdots span.ok { background: var(--ok); }
.qdots span.bad { background: var(--danger); }
.quiz-card > .tag { margin-bottom: 6px; }
.quiz-q { font-size: 1.2rem; font-weight: 600; line-height: 1.4; }
@media (min-width: 768px) { .quiz-q { font-size: 1.32rem; } }
.choices { display: grid; gap: 8px; }
.choice { display: flex; gap: 12px; align-items: center; text-align: left; width: 100%; min-height: 56px; padding: 10px 12px; cursor: pointer; border-radius: var(--radius-sm); border: 2px solid var(--border-strong); background: var(--surface); font-size: 1rem; line-height: 1.4; }
.choice:hover:not(:disabled) { border-color: var(--primary); }
.choice .letter { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.choice.selected { border-color: var(--primary); background: var(--primary-soft); }
.choice.selected .letter { background: var(--primary); color: var(--primary-ink); }
.choice.right { border-color: var(--ok); background: var(--ok-soft); }
.choice.right .letter { background: var(--ok); color: var(--surface); }
.choice.wrong { border-color: var(--danger); background: var(--danger-soft); }
.choice.wrong .letter { background: var(--danger); color: var(--surface); }
.choice.dim { opacity: .55; }
/* Right and wrong aren't green and red alone: a check or an X ends the row. verdictWords() in js/app.js says it for screen readers. */
.choice.right::after, .test-choice.right::after { content: "✓"; content: "✓" / ""; color: var(--ok); }
.choice.wrong::after, .test-choice.wrong::after { content: "✕"; content: "✕" / ""; color: var(--danger); }
.choice.right::after, .choice.wrong::after, .test-choice.right::after, .test-choice.wrong::after { flex: none; margin-left: auto; align-self: center; font-weight: 800; font-size: 1.15rem; line-height: 1; }
.choice:disabled { cursor: default; color: var(--text); }
.order-built { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 8px; }
.order-built:empty { display: none; }
.order-built li { margin: 0; }
.order-pool .choice { border-style: dashed; }

/* segmented control */
.seg { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 12px; overflow-x: auto; margin-bottom: 14px; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: 1 0 auto; min-height: 38px; padding: 8px 12px; border: 0; border-radius: 9px; background: none; font-weight: 700; font-size: .88rem; cursor: pointer; color: var(--muted); white-space: nowrap; }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.small-seg button { font-size: .8rem; padding: 6px 8px; }
@media (max-width: 480px) { .seg button { flex: 1 1 0; padding: 8px 4px; font-size: .82rem; } }

/* memorize */
.mem-text { font-size: 1.08rem; line-height: 1.5; white-space: normal; }
.mem-text .line { display: block; margin-bottom: 10px; padding-left: 1em; text-indent: -1em; }
.mem-text .line:last-child { margin-bottom: 0; }
.mem-text .ghost { opacity: .3; letter-spacing: .05em; }
.mem-text .revealed { color: var(--primary); font-weight: 700; }
.blank { display: inline-block; height: 1.25em; vertical-align: -0.2em; border: 0; border-bottom: 2px solid var(--accent); background: var(--accent-soft); border-radius: 4px; cursor: pointer; padding: 0; text-indent: 0; }
.ghost-line { color: var(--muted); font-style: italic; }
.mem-diff { line-height: 1.9; }
.ok-word { color: var(--ok); font-weight: 600; }
.miss-word { color: var(--danger); font-weight: 600; text-decoration: underline wavy; text-decoration-thickness: 1px; }

/* skills & scenarios */
.skill-steps { list-style: none; padding: 0; margin: 0; }
.skill-steps li { margin: 0; border-bottom: 1px solid var(--border); }
.skill-steps li:last-child { border-bottom: 0; }
.skill-steps button { display: flex; gap: 12px; align-items: flex-start; width: 100%; min-height: 48px; text-align: left; padding: 11px 2px; background: none; border: 0; cursor: pointer; font-size: 1rem; line-height: 1.45; color: var(--text); }
.skill-steps .num, .scn-q .num { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border-strong); display: grid; place-items: center; font-weight: 700; font-size: .82rem; }
.skill-steps li.done .num { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.skill-steps li.done span:last-child { color: var(--muted); text-decoration: line-through; }
.timer-row { display: flex; gap: 8px; align-items: center; margin: 10px 0; }
.timer { font-family: var(--font-head); font-size: 1.4rem; font-weight: 700; min-width: 3em; }
.timer:empty { display: none; }
.scn-setup { border-left: 4px solid var(--info); }
.scn-setup .tag { margin-bottom: 6px; }
.scn-q { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.scn-q .num { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.scn-a { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--ok-soft); }
.scn-a > :last-child { margin-bottom: 0; }

/* song */
.song-card { border-left: 4px solid var(--accent-bright); }
.song-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 8px; }
.song-head h3 { margin: 0 0 2px; }
.song-icon { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--primary); color: var(--accent-bright); display: grid; place-items: center; }
.song-icon svg { width: 24px; height: 24px; }
.tracks { display: grid; gap: 8px; }
.track { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); }
.track.playing { background: var(--primary-soft); }
.play-btn { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--primary); color: var(--primary-ink); display: grid; place-items: center; cursor: pointer; }
.play-btn svg { width: 20px; height: 20px; }
.t-main { flex: 1; min-width: 0; }
.t-main b { display: block; line-height: 1.2; }
.t-main span { font-size: .82rem; color: var(--muted); }
.t-prog { height: 4px; margin-top: 6px; }
.t-time { font-variant-numeric: tabular-nums; font-size: .82rem; color: var(--muted); min-width: 2.6em; text-align: right; }

/* contacts, help, no-list */
.contacts { padding: 4px 16px; }
.contact { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.contact:last-child { border-bottom: 0; }
.c-main { flex: 1; min-width: 0; }
.c-main > b { display: block; }
.c-main .muted { display: block; }
.c-num { display: block; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--muted); }
.round-btn { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.round-btn.call { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.round-btn svg { width: 20px; height: 20px; }
.helpnow { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
.helpnow h2 svg { width: 22px; height: 22px; color: var(--danger); }
.help-btns { display: grid; gap: 8px; }
.btn.help { justify-content: flex-start; min-height: 50px; background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); font-size: 1rem; }
.btn.help svg { color: var(--danger); }
@media (min-width: 768px) { .help-btns { grid-template-columns: 1fr 1fr; } .help-btns .ghost { grid-column: span 2; } }
.nolist-card { border-left: 4px solid var(--danger); }
.no-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px 16px; }
.no-list li { margin: 0; display: flex; gap: 8px; align-items: baseline; }
.no-list li::before { content: "✕"; color: var(--danger); font-weight: 700; flex: none; }
.share-btn { margin: 0 0 14px; }

/* phase bar */
.phasebar { position: relative; height: 34px; margin: 18px 0 8px; }
.pb-seg { position: absolute; top: 6px; height: 22px; display: grid; place-items: center; border-radius: 6px; font: 700 .7rem/1 var(--font); letter-spacing: .04em; text-transform: uppercase; overflow: hidden; }
.pb-seg i { font-style: normal; }
.pb-yellow { background: #f2d77d; color: #4a3a05; }
.pb-red { background: #b8523f; color: #fff; }
.pb-white { background: #f4f2ea; color: #3b3f33; border: 1px solid var(--border-strong); place-items: center start; padding-left: 10px; }
.pb-blue { background: #3f7195; color: #fff; }
.pb-hbl { position: absolute; top: 2px; height: 30px; border-radius: 6px; background: repeating-linear-gradient(45deg, rgba(0,0,0,.25) 0 4px, transparent 4px 8px); border: 2px solid var(--text); opacity: .55; }
.pb-you { position: absolute; top: -8px; width: 2px; height: 50px; background: var(--text); }
.pb-you b { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); font: 700 .7rem/1 var(--font); background: var(--text); color: var(--bg); padding: 2px 6px; border-radius: 999px; }
.pb-legend { display: flex; justify-content: space-between; gap: 8px; font-size: .78rem; color: var(--muted); font-weight: 600; flex-wrap: wrap; }
.pb-dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; background: repeating-linear-gradient(45deg, rgba(0,0,0,.35) 0 2px, transparent 2px 4px); border: 1px solid var(--text); }

/* address builder */
.addr-card h3 svg { width: 20px; height: 20px; color: var(--accent); }
.addr { background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 14px; font: 600 1rem/1.5 var(--font); white-space: pre-wrap; margin: 4px 0 10px; }

/* body tracker */
.body-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.metric { background: var(--surface-2); border-radius: 12px; padding: 12px; }
.metric-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 700; font-size: .92rem; }
.metric-big { font-family: var(--font-head); font-size: 2.6rem; font-weight: 700; line-height: 1.05; margin: 4px 0 2px; }
.scale { margin-top: 12px; }
.scale-marks { position: relative; height: 16px; font-size: .72rem; color: var(--muted); font-weight: 600; }
.scale-marks span { position: absolute; transform: translateX(-50%); }
.scale-bar { position: relative; display: flex; height: 8px; border-radius: 999px; }
.scale-bar > span:first-child { border-radius: 999px 0 0 999px; }
.scale-bar > span:last-of-type { border-radius: 0 999px 999px 0; }
.scale-bar i { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--surface); border: 3px solid var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.scale-labels { display: flex; justify-content: space-between; font-size: .7rem; color: var(--muted); margin-top: 6px; }
.trend-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-top: 10px; }
.trend-row svg.spark { width: 100%; height: 36px; color: var(--primary); }
.scan-card { border-left: 4px solid var(--info); }
.scan-cols { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.scan-label { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .1em; font-weight: 700; font-size: .85rem; margin: 0 0 4px; }
.scan-label.good { color: var(--ok); }
.scan-label.focus { color: var(--accent); }
.scan-list { list-style: none; padding: 0; margin: 0; }
.scan-list li { padding: 6px 0; border-bottom: 1px solid var(--border); margin: 0; }
.scan-list li:last-child { border-bottom: 0; }

/* pt log */
.pt-events { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-bottom: 14px; }
.pt-event { padding: 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); }
.pt-event h4 { font-family: var(--font-head); font-size: 1.15rem; margin: 0 0 6px; }
.pt-event .nums { display: flex; gap: 14px; font-size: .85rem; color: var(--muted); flex-wrap: wrap; }
.pt-event .nums b { display: block; color: var(--text); font-size: 1.15rem; font-family: var(--font-head); }
.pt-event svg.spark { width: 100%; height: 36px; margin-top: 8px; color: var(--primary); }
.status-ok { color: var(--ok); font-weight: 700; }
.status-bad { color: var(--danger); font-weight: 700; }

/* weather */
.wx { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.wx > div { text-align: center; padding: 8px 4px; border-radius: 10px; background: var(--surface-2); font-size: .85rem; }
.wx > div > span { display: block; }
.wx .wd { font-weight: 700; color: var(--muted); }
.wx .ic { margin: 4px 0; color: var(--accent); }
.wx .ic svg { width: 24px; height: 24px; }
.wx b { display: block; font-family: var(--font-head); font-size: 1.1rem; }
.wx .pp { color: var(--info); font-size: .78rem; font-weight: 600; }
@media (max-width: 767px) {
  .wx { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 74px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
  .wx::-webkit-scrollbar { display: none; }
  .wx > div { scroll-snap-align: start; }
}

.wx-credit { font-size: .8rem; color: var(--muted); margin: 8px 0 0; }

/* weather during your training (NOAA climate normals) */
.wxt-lead { margin: 0 0 10px; }
.wxt-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; margin: 0 0 12px; }
.wxt-sum > div { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; }
.wxt-sum span { display: block; font-size: .78rem; font-weight: 600; color: var(--muted); }
.wxt-sum b { display: block; font-family: var(--font-head); font-size: 1.3rem; line-height: 1.2; }
.wxt-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 62px; gap: 6px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.wxt-strip > div { text-align: center; padding: 7px 2px; border-radius: 10px; background: var(--surface-2); font-size: .78rem; scroll-snap-align: start; }
.wxt-strip > div.leave { background: none; box-shadow: inset 0 0 0 1px var(--border); }
.wxt-strip > div.leave :is(b, .hi) { color: var(--muted); }
.wxt-strip span, .wxt-strip b { display: block; }
.wxt-strip .wk { font-weight: 700; color: var(--muted); }
.wxt-strip .dt { color: var(--muted); font-size: .72rem; }
.wxt-strip b { font-family: var(--font-head); font-size: 1.2rem; margin-top: 2px; }
.wxt-strip .hi { font-weight: 600; }
.wxt-key { margin: 6px 0 8px; }
.wxt-key .hi { font-weight: 600; }
.wxt-tips { margin: 0 0 8px; }
.wxt-from { margin: 0 0 8px; }
.wxt td .sub { display: block; font-size: .8rem; color: var(--muted); margin-top: 2px; }
.wxt td .sub .tag { font-size: .62rem; padding: 1px 6px; }
.wxt-src { font-size: .8rem; color: var(--muted); margin: 8px 0 0; }
.t-frz { color: var(--info); font-weight: 700; }
.t-cold { color: var(--info); }
.t-warm { color: var(--accent); }
.t-hot { color: var(--danger); font-weight: 700; }

/* chain of command */
.coc { list-style: none; margin: 0 0 6px; padding: 0; counter-reset: coc; }
.coc li { display: grid; grid-template-columns: 34px 1fr; gap: 4px 12px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--border); margin: 0; }
.coc li:last-child { border-bottom: 0; }
.coc li::before { counter-increment: coc; content: counter(coc); grid-row: span 3; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--text); font-weight: 700; font-size: .85rem; }
.coc .pos { font-weight: 700; font-size: .95rem; }
.coc .pos small { font-weight: 400; color: var(--muted); }
.coc input { padding: 8px 10px; max-width: 460px; text-overflow: ellipsis; }
.coc .src { grid-column: 2; font-size: .8rem; color: var(--muted); }
.coc .coc-note { display: block; margin-top: 2px; }

/* videos */
.video-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); margin-bottom: 14px; }
.video { margin: 0 0 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.video-grid .video { margin: 0; }
.video-thumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; cursor: pointer; background: var(--surface-2); }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-thumb .play { position: absolute; left: 50%; top: 50%; width: 60px; height: 42px; margin: -21px 0 0 -30px; border-radius: 12px; background: rgba(200, 30, 30, .92); color: #fff; display: grid; place-items: center; box-shadow: 0 2px 10px rgba(0,0,0,.3); }
.video-thumb .play svg { width: 22px; height: 22px; }
.video-thumb:hover .play { background: #e62117; }
.video-frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video figcaption { padding: 10px 12px; }
.video figcaption b { display: block; }
.video figcaption span { display: block; font-size: .85rem; color: var(--muted); }

/* search */
.result { display: block; padding: 12px 14px; margin-bottom: 8px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; }
.result:hover { border-color: var(--primary); }
.result b { display: block; margin-bottom: 2px; }
.result .snip { display: block; font-size: .88rem; color: var(--muted); }
.res-group { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin: 16px 0 8px; }
.res-group svg { width: 18px; height: 18px; color: var(--accent); }
mark { background: var(--accent-soft); color: inherit; border-radius: 3px; padding: 0 2px; }

/* back to top */
.to-top { position: fixed; right: 16px; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); z-index: 25; display: inline-flex; align-items: center; gap: 4px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-weight: 700; font-size: .85rem; box-shadow: var(--shadow); cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(10px); pointer-events: none; transition: all .2s; }
.to-top svg { width: 16px; height: 16px; }
.to-top.show { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
@media (min-width: 768px) { .to-top { bottom: 24px; right: 24px; } }

.empty { text-align: center; color: var(--muted); padding: 18px; }
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 20px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: .92rem; opacity: 0; pointer-events: none; transition: all .25s; z-index: 60; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* phone sizing */
@media (max-width: 480px) {
  h1 { font-size: 1.75rem; line-height: 1.1; }
  .page-head { margin: 0 0 10px; }
  .page-head p { font-size: .95rem; }
  .view { padding-top: 14px; }
  .topbar { gap: 8px; }
  .topbar .brand span { font-size: 1.02rem; letter-spacing: .03em; }
  .topbar .chip-count { font-size: .84rem; padding: 4px 10px; }
  .hero .big { font-size: 3.6rem; }
  .item-link { max-width: 38%; }
}


/* round-two polish */
.tip-card a.more { white-space: nowrap; }
.settings-grid input, .settings-grid select { min-height: 48px; }
label.field > span > .saved { float: right; font-weight: 600; }
.subtabs + h2, .subtabs + h3, .page-intro + h2 { margin-top: 0; }
.page-intro { color: var(--muted); max-width: 66ch; margin: -4px 0 14px; }
@media (max-width: 719px) { .glance { display: none; } }
@media (max-width: 767px) {
  .day-strip { margin: 0 -16px 8px; padding: 2px 16px 10px; scroll-padding-inline: 16px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 28px), transparent); }
  .day-strip::after { content: ""; flex: 0 0 14px; }
}
@media (max-width: 560px) {
  .row.prevnext { flex-wrap: nowrap; align-items: stretch; }
  .row.prevnext > .btn { flex: 1 1 0; min-width: 0; max-width: none; display: inline-flex; white-space: normal; text-align: center; overflow: visible; text-overflow: clip; line-height: 1.25; overflow-wrap: anywhere; }
  .row.prevnext > a:last-child:not(:first-child) { margin-left: 0; }
}
@media (max-width: 480px) { .acc-body .practice-cta .mode-row { gap: 5px; } .acc-body .practice-cta .btn.small { padding: 6px 9px; font-size: .85rem; } }

/* ---------- Print: the rules are at the end of this file, so they win over everything above ---------- */
.print-only { display: none; }

/* =====================================================================
   Popup cards (What's new)
   ===================================================================== */
.love-modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; overflow-y: auto; overscroll-behavior: contain; background: rgba(20, 16, 18, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .25s; }
.love-modal.show { opacity: 1; }
.love-card { position: relative; overflow: hidden; width: min(420px, 100%); margin: auto; padding: 28px 22px 18px; border-radius: 24px; text-align: center; color: #3a1d27;
  background: linear-gradient(160deg, #fff6f3 0%, #ffe3e8 55%, #fbe7c6 100%); box-shadow: 0 20px 60px rgba(60, 10, 30, .35); transform: translateY(16px) scale(.96); transition: transform .3s cubic-bezier(.2, .9, .3, 1.3); }
.love-modal.show .love-card { transform: none; }
.love-hearts { position: absolute; inset: 0; pointer-events: none; }
.love-hearts span { position: absolute; bottom: -24px; color: #e2577a; opacity: 0; animation: love-rise 4.5s ease-in infinite; }
@keyframes love-rise { 0% { transform: translateY(0) rotate(-10deg); opacity: 0; } 15% { opacity: .55; } 100% { transform: translateY(-460px) rotate(14deg); opacity: 0; } }
.love-badge { position: relative; width: 62px; height: 62px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #e2577a, #c2185b); color: #fff; box-shadow: 0 6px 18px rgba(194, 24, 91, .35); animation: love-beat 1.6s ease-in-out infinite; }
.love-badge svg { width: 32px; height: 32px; }
.love-badge svg path { fill: currentColor; }
@keyframes love-beat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.12); } 24% { transform: scale(1); } 36% { transform: scale(1.08); } }
.love-from { position: relative; font-family: var(--font-head); text-transform: uppercase; letter-spacing: .14em; font-weight: 700; font-size: .82rem; color: #b0325a; margin-bottom: 8px; }
.love-text { position: relative; font-size: 1.22rem; line-height: 1.45; font-weight: 600; margin: 0 0 18px; transition: opacity .18s, transform .18s; }
.love-text.swap { opacity: 0; transform: translateY(6px); }
.love-btn { position: relative; width: 100%; min-height: 50px; border-radius: 999px; background: linear-gradient(135deg, #e2577a, #c2185b); border: 0; color: #fff; font-size: 1.02rem; box-shadow: 0 6px 16px rgba(194, 24, 91, .3); }
.love-more { position: relative; margin-top: 8px; background: none; border: 0; color: #9c3557; font-weight: 700; font-size: .9rem; cursor: pointer; padding: 8px; min-height: 40px; }
.love-archive summary svg { width: 18px; height: 18px; color: #c2185b; vertical-align: -3px; margin-right: 6px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--info); font-weight: 700; cursor: pointer; text-decoration: underline; font-size: inherit; }
/* Small links people tap often: padding with a matching negative margin, so the tap area grows and nothing moves. */
[data-action="asvab-test-quit"] { padding: 10px 8px; margin: -10px -8px; }
p.muted.small > a[href="#/mindset/hard"], p.small.no-print > a[href^="#/plan/d"] { padding: 12px 4px; margin: -12px -4px; }
a[href="/terms"], a[href="/privacy"], a[href="/refund"] { padding: 12px 0; margin: -12px 0; }

/* Countdown-badge prompt */
.badge-prompt { display: flex; gap: 14px; align-items: flex-start; border: 2px dashed var(--border-strong); }
.bp-icon { position: relative; flex: none; width: 56px; height: 56px; }
.bp-icon img { width: 56px; height: 56px; border-radius: 13px; }
.bp-icon span { position: absolute; top: -7px; right: -9px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; background: #ff3b30; color: #fff; font: 700 .8rem/24px var(--font); text-align: center; box-shadow: 0 0 0 2px var(--surface); }
.bp-text b { display: block; margin-bottom: 2px; }
.bp-text .muted { display: block; }

/* =====================================================================
   Meeka, the helper German Shepherd (original art, classic XP-helper style)
   ===================================================================== */
.scout { position: fixed; left: 10px; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 6px); z-index: 35; transition: transform .35s ease, opacity .35s;
  --door-x: 53px; --door-y: -3px; } /* doorway offset from Meeka's resting spot (house left 52 + 45 − dog centre 44) */
.scout.away { transform: translateY(150%); opacity: 0; pointer-events: none; }
.scout.away .scout-dog { opacity: 0; }
.scout.aside { opacity: 0; pointer-events: none; } /* stepped aside during a study session */
.scout.enter, .scout.leave { transition: none; }
.scout.duck { transform: translateY(72%); opacity: .5; }
@media screen { .has-scout .view:not(.session) { padding-bottom: calc(var(--nav-h) + 126px + env(safe-area-inset-bottom)); } }
@media screen and (min-width: 768px) { .has-scout .view:not(.session) { padding-bottom: 154px; } }
.love-open .scout, .menu-open .scout { opacity: 0; pointer-events: none; }
@media (min-width: 768px) and (max-width: 959px) { .scout { left: 96px; bottom: 14px; } }
@media (min-width: 960px) { .scout { left: 286px; bottom: 16px; } }
@media (min-width: 768px) { .scout { --door-x: 69px; } } /* house left 66 + 57 − dog centre 54 */
.meeka-pos { position: relative; z-index: 1; }
.scout.walking .meeka-pos { transition: transform var(--walk, .6s) ease-in-out; }
.scout-bubble { z-index: 2; }
.scout-dog { touch-action: none; cursor: grab; }
.scout-dog { position: relative; z-index: 1; transform-origin: 50% 95%; display: block; width: 88px; height: 97px; padding: 0; border: 0; background: none; cursor: pointer; filter: drop-shadow(0 3px 6px rgba(0,0,0,.18)); -webkit-tap-highlight-color: transparent; }
@media (min-width: 768px) { .scout-dog { width: 108px; height: 120px; } }
.pup { width: 100%; height: 100%; overflow: visible; animation: pup-bob 3.2s ease-in-out infinite; }
.pup .tail { transform-box: fill-box; transform-origin: 0% 100%; animation: pup-wag .5s ease-in-out infinite; }
.pup .eyes { transform-box: fill-box; transform-origin: center; animation: pup-blink 4.6s infinite; }
.pup .ear-l { transform-box: fill-box; transform-origin: 68% 90%; animation: pup-ear 3.2s ease-in-out infinite; }
.pup .ear-r { transform-box: fill-box; transform-origin: 32% 90%; animation: pup-ear 3.2s ease-in-out infinite reverse; }
.pup .tongue { transform-box: fill-box; transform-origin: 50% 0%; transform: scaleY(0); transition: transform .2s; }
.scout-dog:hover .tongue, .scout-dog.hop .tongue { transform: scaleY(1); }
.scout-dog:hover .tail, .scout-dog.hop .tail { animation-duration: .22s; }
.scout-dog.hop .pup { animation: pup-hop .55s ease; }
@keyframes pup-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes pup-wag { 0%, 100% { transform: rotate(-14deg); } 50% { transform: rotate(20deg); } }
@keyframes pup-blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.08); } }
@keyframes pup-ear { 0%, 70%, 100% { transform: rotate(0deg); } 78% { transform: rotate(-7deg); } 86% { transform: rotate(3deg); } }
@keyframes pup-hop { 0% { transform: translateY(0); } 35% { transform: translateY(-16px) rotate(-4deg); } 65% { transform: translateY(0) rotate(2deg); } 80% { transform: translateY(-4px); } 100% { transform: translateY(0); } }
.scout-bubble {
  position: absolute; left: 6px; bottom: calc(100% + 12px); width: min(290px, calc(100vw - 32px)); padding: 12px 14px 10px;
  background: #ffffe1; color: #1b1b1b; border: 1px solid #1b1b1b; border-radius: 10px; box-shadow: 3px 4px 0 rgba(0,0,0,.18);
  font-family: Tahoma, Verdana, "Segoe UI", sans-serif; font-size: .9rem; line-height: 1.4;
  opacity: 0; transform: translateY(6px) scale(.97); transform-origin: 20% 100%; transition: opacity .2s, transform .2s;
}
.scout-bubble.show { opacity: 1; transform: none; }
.scout-bubble::after { content: ""; position: absolute; left: var(--tail-x, 26px); bottom: -11px; width: 18px; height: 18px; background: #ffffe1; border-right: 1px solid #1b1b1b; border-bottom: 1px solid #1b1b1b; transform: skewX(-25deg) rotate(45deg); }
.scout-bubble.sb-below { bottom: auto; top: calc(100% + 12px); transform-origin: 20% 0; }
.scout-bubble.sb-below::after { bottom: auto; top: -11px; border: 0; border-left: 1px solid #1b1b1b; border-top: 1px solid #1b1b1b; transform: skewX(25deg) rotate(45deg); }
.sb-title { font-weight: 700; margin: 0 22px 4px 0; color: #0b3c8c; }
.sb-title svg { width: 16px; height: 16px; margin-right: 5px; vertical-align: -3px; }
.sb-text b { color: #000; }
.sb-x { position: absolute; top: 4px; right: 6px; width: 28px; height: 28px; border: 0; background: none; font-size: 1.2rem; line-height: 1; cursor: pointer; color: #444; }
.sb-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.sb-btn { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 12px; border-radius: 4px; border: 1px solid #003c74; background: linear-gradient(#fdfdfd, #e3e3db); color: #000; font: 700 .82rem Tahoma, Verdana, sans-serif; text-decoration: none; cursor: pointer; box-shadow: inset 0 0 0 1px #fff; }
.sb-btn:hover { border-color: #e59700; box-shadow: inset 0 0 0 2px #f8b636; }
.sb-link { background: none; border: 0; color: #0b3c8c; font: 700 .82rem Tahoma, Verdana, sans-serif; cursor: pointer; padding: 12px 4px; margin: -6px 0 -6px auto; }
.sb-hide { background: none; border: 0; color: #666; font: .74rem Tahoma, Verdana, sans-serif; cursor: pointer; padding: 6px 0 0; text-decoration: underline; }
/* The doghouse: behind Meeka to her right. On phones it pops up for the walk-out and tucks away after. */
.meeka-house { position: absolute; left: 52px; bottom: 2px; width: 90px; height: 81px; z-index: 0; cursor: pointer;
  transform-origin: 50% 100%; opacity: 0; transform: translateY(55%) scale(.9); pointer-events: none; transition: transform .45s ease .1s, opacity .4s ease .1s; }
.meeka-house svg { width: 100%; height: 100%; display: block; overflow: visible; }
@media (max-width: 767px) { .meeka-house { transition: none; } } /* phones: the house only moves via its dock flight, so no fade (no ghost house after a rotation) */
.scout.enter .meeka-house, .scout.leave .meeka-house, .scout.house-on .meeka-house { opacity: 1; transform: none; transition-delay: 0s; }
/* Picked up: lifted, tilted, tongue out, tail going. Trotting: a quick bouncy gait. */
.scout.dragging .scout-dog { cursor: grabbing; }
.scout.dragging .pup { animation: none; transform: translateY(-7px) rotate(-7deg) scale(1.06); filter: drop-shadow(0 12px 10px rgba(0,0,0,.25)); transition: transform .12s; }
.scout.dragging .pup .tongue { transform: scaleY(1); }
.scout.dragging .pup .tail, .scout.walking .pup .tail { animation-duration: .2s; }
.scout.walking .pup { animation: pup-trot .3s ease-in-out infinite; }
@keyframes pup-trot { 0%, 100% { transform: translateY(0) rotate(-2.5deg); } 50% { transform: translateY(-5px) rotate(2.5deg); } }
.scout.enter .meeka-house { animation: house-up .5s cubic-bezier(.3, 1.35, .5, 1) both; }
/* Phones: the house grows out of the dock's Home icon (--hx/--hy/--hs set by JS), and later flies back into it. */
@media (max-width: 767px) {
  .scout.enter .meeka-house, .scout.house-on .meeka-house { animation: house-from-dock .62s ease-in-out both; }
}
@media (max-width: 767px) { .scout.docking .meeka-house { opacity: 1; animation: house-to-dock .5s ease-in-out forwards; } }
/* Lift off the dock (icon-sized), grow with a little overshoot, settle. The return trip mirrors it and lands exactly on the icon. */
@keyframes house-from-dock {
  0% { transform: translate(var(--hx, 0px), var(--hy, 40px)) scale(var(--hs, .3)); opacity: 1; }
  18% { transform: translate(calc(var(--hx, 0px) * .9), calc(var(--hy, 40px) - 14px)) scale(calc(var(--hs, .3) * 1.15)); }
  76% { transform: translate(0, -6px) scale(1.04, .97); }
  100% { transform: none; opacity: 1; }
}
@keyframes house-to-dock {
  0% { transform: none; opacity: 1; }
  24% { transform: translateY(-6px) scale(1.03, .98); }
  82% { transform: translate(calc(var(--hx, 0px) * .9), calc(var(--hy, 40px) - 14px)) scale(calc(var(--hs, .3) * 1.15)); }
  100% { transform: translate(var(--hx, 0px), var(--hy, 40px)) scale(var(--hs, .3)); opacity: 1; }
}
#bottomnav a[href="#/home"] svg { transition: opacity .15s, transform .2s; transform-origin: 50% 100%; }
.house-out #bottomnav a[href="#/home"] svg { opacity: 0; transform: scale(.5); transition: none; }
.house-out.meeka-aside #bottomnav a[href="#/home"] svg { opacity: 1; transform: none; } /* she stepped aside for a study session: keep the Home icon */
#bottomnav svg.dock-bounce { animation: dock-bounce .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes dock-bounce { 0% { transform: scale(.94); opacity: 1; } 45% { transform: scale(1.16); opacity: 1; } 100% { transform: scale(1); opacity: 1; } } /* the house lands at full icon size, so the bounce starts there */
@media (min-width: 768px) {
  .meeka-house { left: 66px; width: 114px; height: 102.6px; opacity: 1; transform: none; pointer-events: auto; }
}
.scout.enter .scout-dog { animation: meeka-out 1.3s cubic-bezier(.3, .7, .4, 1) .38s both; }
.scout.leave .scout-dog { animation: meeka-in .9s ease-in .3s both; }
@keyframes house-up { 0% { transform: translateY(100%) scale(.85); opacity: 0; } 60% { transform: translateY(-4%) scale(1.03, .97); opacity: 1; } 100% { transform: none; opacity: 1; } }
/* Out of the doorway toward the viewer: tiny and in shadow, a peek, then she grows, steps out and hops.
   Only transform/opacity animate (GPU-composited); the "in shadow" look is a dark silhouette copy fading out. */
@keyframes meeka-out {
  0% { transform: translate(var(--door-x), var(--door-y)) scale(.27); opacity: 0; }
  12% { opacity: 1; }
  30% { transform: translate(var(--door-x), var(--door-y)) scale(.3); }
  40% { transform: translate(calc(var(--door-x) * .95), calc(var(--door-y) - 1px)) scale(.33) rotate(-5deg); }
  64% { transform: translate(calc(var(--door-x) * .45), 2px) scale(.7); }
  82% { transform: translate(0, -9px) scale(1.04); }
  92% { transform: translate(0, 0) scale(1.02, .97); }
  100% { transform: none; opacity: 1; }
}
@keyframes meeka-shade-out { 0% { opacity: .92; } 30% { opacity: .82; } 40% { opacity: .66; } 64% { opacity: .16; } 80%, 100% { opacity: 0; } }
/* Back into the doghouse, walking away from the viewer (she has already turned around). */
@keyframes meeka-in {
  0% { transform: none; opacity: 1; }
  55% { transform: translate(calc(var(--door-x) * .55), -1px) scale(.62); }
  86% { transform: translate(var(--door-x), var(--door-y)) scale(.3); opacity: 1; }
  100% { transform: translate(var(--door-x), var(--door-y)) scale(.25); opacity: 0; }
}
@keyframes meeka-shade-in { 0%, 25% { opacity: 0; } 60% { opacity: .35; } 86% { opacity: .8; } 100% { opacity: .92; } }
/* Front/back views + their dark silhouette copies, stacked. */
.pup-turn { position: relative; display: block; width: 100%; height: 100%; transform-origin: 50% 95%; }
.pup-turn .pup { position: absolute; left: 0; top: 0; }
.pup.pb { display: none; }
.scout-dog.back .pup.pf { display: none; }
.scout-dog.back .pup.pb { display: block; }
.pup.shade { opacity: 0; pointer-events: none; visibility: hidden; }
.scout.enter .pup.shade, .scout.leave .pup.shade { visibility: visible; }
.pup.shade * { fill: #120c08 !important; stroke: #120c08 !important; }
.pup.shade .gs, .pup.shade .tongue { display: none; }
.scout.enter .pup.shade { animation: meeka-shade-out 1.3s linear .38s both; }
@media (max-width: 767px) { .scout.enter .scout-dog, .scout.enter .pup.shade { animation-delay: .66s; } } /* phones: wait for the house to land first */
.scout.leave .pup.shade { animation: meeka-shade-in .9s linear .3s both; }
/* While she moves in/out: GPU layers, no drop-shadow filter, and her little idle animations rest so nothing repaints. */
.scout.enter .scout-dog, .scout.leave .scout-dog, .scout.walking .meeka-pos { will-change: transform, opacity; }
.scout.enter .meeka-house, .scout.house-on .meeka-house, .scout.docking .meeka-house { will-change: transform, opacity; }
.scout.enter .scout-dog, .scout.leave .scout-dog { filter: none; }
.scout.enter .pup:not(.shade), .scout.leave .pup:not(.shade) { animation: none; }
.scout.enter .pup *, .scout.leave .pup * { animation-play-state: paused !important; }
/* Turning around: squash edge-on, swap views, unsquash. */
.scout-dog.turning .pup-turn { animation: pup-turn .34s ease-in-out; }
/* Poses: walking (side view, mirrored when heading left), lying down, napping. */
.pup.pw, .pup.pl { display: none; }
.scout-dog.side .pup.pf, .scout-dog.lie .pup.pf { display: none; }
.scout-dog.side .pup.pw { display: block; }
.scout-dog.lie .pup.pl { display: block; }
.scout-dog.face-left .pup.pw { scale: -1 1; }
.scout-dog.lowering .pup-turn { animation: pup-lower .48s ease-in-out; }
@keyframes pup-lower { 0%, 100% { transform: none; } 48% { transform: translateY(5px) scale(1.06, .8); } }
/* Walk cycle: diagonal leg pairs swing together; a gentle body bob. Strolling is slower than hurrying home. */
.pw .leg-nf, .pw .leg-ff, .pw .leg-nb, .pw .leg-fb { transform-box: fill-box; transform-origin: 50% 8%; }
.scout.walking .pw .leg-nf, .scout.walking .pw .leg-fb { animation: leg-a .32s linear infinite; }
.scout.walking .pw .leg-ff, .scout.walking .pw .leg-nb { animation: leg-b .32s linear infinite; }
.scout.walking.stroll .pw .leg-nf, .scout.walking.stroll .pw .leg-fb, .scout.walking.stroll .pw .leg-ff, .scout.walking.stroll .pw .leg-nb { animation-duration: .56s; }
@keyframes leg-a { 0%, 100% { transform: rotate(20deg); } 50% { transform: rotate(-20deg); } }
@keyframes leg-b { 0%, 100% { transform: rotate(-20deg); } 50% { transform: rotate(20deg); } }
.scout.walking .pup.pw { animation: pw-bob .16s ease-in-out infinite alternate; }
.scout.walking.stroll .pup.pw { animation-duration: .28s; }
@keyframes pw-bob { from { transform: translateY(0); } to { transform: translateY(-2px); } }
.scout.walking.stroll .meeka-pos { transition-timing-function: linear; }
/* Napping: eyes closed, slow breathing, floating z's. */
.pup.pl .eyes-closed { display: none; }
.scout-dog.sleep .pup.pl .eyes { display: none; }
.scout-dog.sleep .pup.pl .eyes-closed { display: inline; }
.scout-dog.sleep .pup.pl { animation: pl-breathe 3.2s ease-in-out infinite; transform-origin: 50% 100%; }
.scout-dog.sleep .pup.pl .tail { animation: none; }
.pup.pl .tail { transform-box: view-box; transform-origin: 100px 107px; animation: pl-wag 1.4s ease-in-out infinite; } /* lazy wag on the ground */
@keyframes pl-wag { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
@keyframes pl-breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.015, 1.035); } }
.zzz { position: absolute; right: 2px; top: 6px; display: none; pointer-events: none; font: 700 13px/1 var(--font-head); color: #6f6a8a; }
.scout-dog.sleep .zzz { display: block; }
.zzz i { position: absolute; right: 0; top: 0; font-style: normal; opacity: 0; animation: zzz 3s ease-out infinite; }
.zzz i:nth-child(2) { animation-delay: 1s; font-size: 15px; }
.zzz i:nth-child(3) { animation-delay: 2s; font-size: 18px; }
@keyframes zzz { 0% { transform: translate(0, 10px); opacity: 0; } 20% { opacity: .9; } 100% { transform: translate(12px, -26px); opacity: 0; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .zzz { color: #c9c3ea; } }
:root[data-theme="dark"] .zzz { color: #c9c3ea; }
@keyframes pup-turn { 0%, 100% { transform: scaleX(1); } 50% { transform: translateY(-4px) scaleX(.06); } }
@keyframes pup-wag-b { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
.pup .tail-b { transform-box: view-box; transform-origin: 62px 102.5px; animation: pup-wag-b .55s ease-in-out infinite; } /* pivot where the tail meets her body */
@media (prefers-reduced-motion: reduce) {
  .scout, .meeka-house { transition: none !important; }
  .scout.enter .scout-dog, .scout.leave .scout-dog, .scout.enter .meeka-house, .scout.walking .pup, .scout.enter .pup.shade, .scout.leave .pup.shade, .scout-dog.turning .pup-turn,
  .scout-dog.lowering .pup-turn, .scout.docking .meeka-house, #bottomnav svg.dock-bounce, .scout.walking .pw .leg-nf, .scout.walking .pw .leg-ff, .scout.walking .pw .leg-nb, .scout.walking .pw .leg-fb, .scout-dog.sleep .pup.pl, .zzz i { animation: none !important; }
  .zzz i { opacity: .8; }
  .pup, .pup .tail, .pup .eyes, .pup .ear-l, .pup .ear-r, .love-hearts span, .love-badge { animation: none !important; }
}
@media print { .scout, .love-modal { display: none !important; } }

/* ===== App color themes =====
   Settings → App color sets <html data-accent="navy|army|maroon|teal|plum|rose|slate|custom">; no attribute = olive (the tokens at the top).
   Each preset defines its light tokens plus --dk-* twins once; the two dark rules below (specificity 0,3,0, so they beat both the
   presets and the base dark tokens) swap the --dk-* values in for "Match device" dark and for forced dark. Dark presets also re-tint
   the six dark neutrals, which are olive-tinted at the top. A custom color is derived in app.js (applyAccent) and injected as
   <style id="accent-custom"> with the same shape. The gold accent, ok/danger/info and the love-note/Meeka colors are left alone. */
:root[data-accent="navy"] {
  --primary: #1f3b63; --primary-ink: #ffffff; --primary-soft: #dfe6f0; --bar-bg: #1f3b63; --bar-ink: #ffffff; --hero-from: #24446f; --hero-to: #152a47; --brand-mark: #1f3b63;
  --dk-primary: #93b5e3; --dk-primary-ink: #0d1420; --dk-primary-soft: #1e2b40; --dk-bar-bg: #121926; --dk-bar-ink: #e8ebf0; --dk-hero-from: #22334d; --dk-hero-to: #131c2b;
  --dk-bg: #0e1118; --dk-surface: #161a22; --dk-surface-2: #1f242e; --dk-border: #3a4253; --dk-border-strong: #4d5769; --dk-track: #2a303c;
}
:root[data-accent="army"] {
  --primary: #1f1d1a; --primary-ink: #f5c84c; --primary-soft: #f3ead2; --bar-bg: #1a1917; --bar-ink: #f5c84c; --hero-from: #2b2824; --hero-to: #121110; --brand-mark: #1f1d1a;
  --dk-primary: #e8c35a; --dk-primary-ink: #15130f; --dk-primary-soft: #332c1a; --dk-bar-bg: #0e0e0d; --dk-bar-ink: #f0cd6a; --dk-hero-from: #2b2720; --dk-hero-to: #121110;
  --dk-bg: #111110; --dk-surface: #1a1a18; --dk-surface-2: #242422; --dk-border: #42413c; --dk-border-strong: #57554f; --dk-track: #2f2e2b;
}
:root[data-accent="maroon"] {
  --primary: #7a1f30; --primary-ink: #ffffff; --primary-soft: #f3e1e4; --bar-bg: #7a1f30; --bar-ink: #ffffff; --hero-from: #822434; --hero-to: #541421; --brand-mark: #7a1f30;
  --dk-primary: #e79aa6; --dk-primary-ink: #1c0d10; --dk-primary-soft: #3d2027; --dk-bar-bg: #1f1215; --dk-bar-ink: #efe6e8; --dk-hero-from: #47202a; --dk-hero-to: #271116;
  --dk-bg: #141011; --dk-surface: #1d1719; --dk-surface-2: #272022; --dk-border: #4a3d41; --dk-border-strong: #605055; --dk-track: #352c2f;
}
:root[data-accent="teal"] {
  --primary: #0d5c5c; --primary-ink: #ffffff; --primary-soft: #d9ecea; --bar-bg: #0d5c5c; --bar-ink: #ffffff; --hero-from: #0b5050; --hero-to: #063434; --brand-mark: #0d5c5c;
  --dk-primary: #72cfc5; --dk-primary-ink: #08201e; --dk-primary-soft: #163330; --dk-bar-bg: #0e1a1a; --dk-bar-ink: #e4eceb; --dk-hero-from: #173b39; --dk-hero-to: #0d2120;
  --dk-bg: #0d1313; --dk-surface: #151c1c; --dk-surface-2: #1e2626; --dk-border: #374545; --dk-border-strong: #4a5a5a; --dk-track: #283232;
}
:root[data-accent="plum"] {
  --primary: #5a2b6e; --primary-ink: #ffffff; --primary-soft: #ece1f0; --bar-bg: #5a2b6e; --bar-ink: #ffffff; --hero-from: #633179; --hero-to: #3d1a4c; --brand-mark: #5a2b6e;
  --dk-primary: #cba3de; --dk-primary-ink: #170f1b; --dk-primary-soft: #33223c; --dk-bar-bg: #18121c; --dk-bar-ink: #ece6ef; --dk-hero-from: #3b2447; --dk-hero-to: #21152a;
  --dk-bg: #121014; --dk-surface: #1a171d; --dk-surface-2: #242027; --dk-border: #443c4a; --dk-border-strong: #59505f; --dk-track: #302a34;
}
:root[data-accent="rose"] {
  --primary: #963a5a; --primary-ink: #ffffff; --primary-soft: #f6e2e9; --bar-bg: #963a5a; --bar-ink: #ffffff; --hero-from: #843050; --hero-to: #5a1d36; --brand-mark: #963a5a;
  --dk-primary: #f0a6bf; --dk-primary-ink: #1e0f15; --dk-primary-soft: #40222f; --dk-bar-bg: #1d1216; --dk-bar-ink: #f0e6ea; --dk-hero-from: #4a2233; --dk-hero-to: #29131c;
  --dk-bg: #141012; --dk-surface: #1d171a; --dk-surface-2: #272024; --dk-border: #4a3d43; --dk-border-strong: #604f57; --dk-track: #352c30;
}
:root[data-accent="slate"] {
  --primary: #3b4858; --primary-ink: #ffffff; --primary-soft: #e2e6eb; --bar-bg: #3b4858; --bar-ink: #ffffff; --hero-from: #384556; --hero-to: #232b36; --brand-mark: #3b4858;
  --dk-primary: #aab9cc; --dk-primary-ink: #11151a; --dk-primary-soft: #262e37; --dk-bar-bg: #141920; --dk-bar-ink: #e8ebee; --dk-hero-from: #2b3541; --dk-hero-to: #171d24;
  --dk-bg: #101317; --dk-surface: #171b20; --dk-surface-2: #20252b; --dk-border: #3c444e; --dk-border-strong: #505a66; --dk-track: #2b3138;
}
/* Dark mode for any accent (fallbacks = the olive dark tokens, in case a value is ever missing) */
@media (prefers-color-scheme: dark) {
  :root[data-accent]:not([data-theme="light"]) {
    --primary: var(--dk-primary, #a9b565); --primary-ink: var(--dk-primary-ink, #12140e); --primary-soft: var(--dk-primary-soft, #353c22);
    --bar-bg: var(--dk-bar-bg, #1d2114); --bar-ink: var(--dk-bar-ink, #ebeadf); --hero-from: var(--dk-hero-from, #2f3620); --hero-to: var(--dk-hero-to, #1c2013);
    --bg: var(--dk-bg, #12140e); --surface: var(--dk-surface, #1b1e16); --surface-2: var(--dk-surface-2, #252920);
    --border: var(--dk-border, #444b38); --border-strong: var(--dk-border-strong, #59614a); --track: var(--dk-track, #33382b);
  }
}
:root[data-accent][data-theme="dark"] {
  --primary: var(--dk-primary, #a9b565); --primary-ink: var(--dk-primary-ink, #12140e); --primary-soft: var(--dk-primary-soft, #353c22);
  --bar-bg: var(--dk-bar-bg, #1d2114); --bar-ink: var(--dk-bar-ink, #ebeadf); --hero-from: var(--dk-hero-from, #2f3620); --hero-to: var(--dk-hero-to, #1c2013);
  --bg: var(--dk-bg, #12140e); --surface: var(--dk-surface, #1b1e16); --surface-2: var(--dk-surface-2, #252920);
  --border: var(--dk-border, #444b38); --border-strong: var(--dk-border-strong, #59614a); --track: var(--dk-track, #33382b);
}
/* Dark mode: the primary is a light tint (gold for Black & Gold), so the gold icons that sit on it would vanish; use the dark ink. */
@media (prefers-color-scheme: dark) { :root[data-accent]:not([data-theme="light"]) :is(.welcome-badge, .song-icon) { color: var(--primary-ink); } }
:root[data-accent][data-theme="dark"] :is(.welcome-badge, .song-icon) { color: var(--primary-ink); }

/* Brand mark (inline SVG in index.html): its square follows the app color. */
.brand .brand-mark { display: block; flex: none; width: 30px; height: 30px; }
.brand-mark .bm-bg { fill: var(--brand-mark, #4b5320); }
@media (min-width: 768px) and (max-width: 959px) { .sidebar .brand .brand-mark { width: 40px; height: 40px; } }
@media (min-width: 960px) { .sidebar .brand .brand-mark { width: 38px; height: 38px; } }

/* Settings → App color swatches */
.accent-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 12px 4px; margin: 10px 0 2px; }
@media (min-width: 768px) { .accent-swatches { grid-template-columns: repeat(auto-fill, 66px); } }
.swatch { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; min-height: 44px; padding: 4px 0 2px; border: 0; border-radius: 12px; background: none; color: var(--muted); font-size: .76rem; font-weight: 600; line-height: 1.15; text-align: center; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.swatch .dot { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14), inset 0 12px 18px rgba(255, 255, 255, .1); transition: transform .15s ease, box-shadow .15s ease; }
.swatch .dot svg { width: 20px; height: 20px; color: var(--sw-ink, #fff); opacity: 0; transform: scale(.5); transition: opacity .15s, transform .15s; }
@media (hover: hover) { .swatch:hover .dot { transform: scale(1.06); } }
.swatch.on { color: var(--text); }
.swatch.on .dot { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--text); }
.swatch.on .dot svg { opacity: 1; transform: none; }
.swatch.sw-army .dot { background: linear-gradient(135deg, var(--sw) 0 58%, #e2b13c 58%); }
.swatch.custom .dot { background: conic-gradient(#e5484d, #f5a524, #e9cf2d, #46a758, #12a594, #0090ff, #8e4ec6, #d6409f, #e5484d); }
.swatch.custom.has .dot { background: radial-gradient(circle, var(--sw) 0 13px, transparent 14px), conic-gradient(#e5484d, #f5a524, #e9cf2d, #46a758, #12a594, #0090ff, #8e4ec6, #d6409f, #e5484d); }
.swatch.custom:not(.has) .dot svg { display: none; }
.swatch.custom input[type="color"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.swatch.custom:focus-within .dot { outline: 3px solid var(--accent-bright); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .swatch .dot, .swatch .dot svg { transition: none; } }

/* =====================================================================
   Training: workouts, logging, progress, gear
   ===================================================================== */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.chip-btn { min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: 600 .9rem var(--font); cursor: pointer; }
.chip-btn.active { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.check-row { display: flex; gap: 10px; align-items: center; margin: 10px 0; font-size: .95rem; cursor: pointer; }
.check-row input { width: 20px; height: 20px; accent-color: var(--primary); flex: none; }
/* "Pick a workout": photo cards (photo on top, icon badge over its bottom-left edge, a plain line, a Start row). */
.wo-pick { margin: 6px 0 18px; }
.wo-pick > .card-title { margin-bottom: 10px; }
.wo-cards { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) { .wo-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.wo-more-h { margin: 22px 0 10px; font-size: 1.05rem; }
.wo-card { display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease; }
.wo-card-media { position: relative; display: block; aspect-ratio: 21 / 9; background: var(--surface-2); }
@media (min-width: 640px) { .wo-card-media { aspect-ratio: 4 / 3; } }
.wo-card-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.wo-badge { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 14px; background: var(--primary); color: var(--primary-ink); box-shadow: 0 0 0 4px var(--surface), 0 6px 14px -6px rgba(0, 0, 0, .45); }
.wo-badge svg { width: 24px; height: 24px; }
.wo-card-media .wo-badge { position: absolute; left: 14px; bottom: -22px; z-index: 1; }
.wo-card-body { display: flex; flex-direction: column; flex: 1; padding: 30px 16px 4px; }
/* Workouts without a photo: badge beside the title, Start row across the bottom. */
.wo-card.no-photo .wo-card-body { display: grid; grid-template-columns: 46px minmax(0, 1fr); grid-template-rows: auto auto auto 1fr; column-gap: 12px; padding-top: 14px; }
.wo-card.no-photo .wo-badge { grid-column: 1; grid-row: 1 / span 2; box-shadow: none; }
.wo-card.no-photo .wo-card-body > :not(.wo-badge) { grid-column: 2; }
.wo-card.no-photo h3 { margin-top: 2px; }
.wo-card.no-photo .wo-card-body > .wo-card-go, .wo-card.no-photo .wo-card-body > .wo-card-need { grid-column: 1 / -1; grid-row: 4; align-self: end; }
.wo-card h3 { margin: 0 0 4px; font-family: var(--font-head); font-size: 1.32rem; font-weight: 700; letter-spacing: .01em; line-height: 1.15; }
.wo-card-line { margin: 0 0 6px; color: var(--muted); font-size: .95rem; line-height: 1.45; }
.wo-card-meta { margin: 0 0 8px; font-size: .8rem; font-weight: 700; color: var(--accent); }
.wo-card-go { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; margin-top: auto; border-top: 1px solid var(--border); font-weight: 700; color: var(--text); text-decoration: none; }
.wo-card-go svg { width: 20px; height: 20px; flex: none; color: var(--primary); transition: transform .16s ease; }
.wo-card-go:hover { color: var(--primary); }
.wo-card-go:hover svg { transform: translateX(4px); }
.wo-card-alt { align-self: flex-start; margin: -6px 0 6px; padding: 6px 0; font-size: .86rem; font-weight: 700; color: var(--info); }
.wo-card-need { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: auto 0 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent-bright) 55%, transparent); }
.wo-card-need p { margin: 0; display: flex; flex-direction: column; min-width: 0; flex: 1 1 150px; }
.wo-card-need .btn { flex: none; }
@media (hover: hover) {
  .wo-card:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(30, 33, 25, .06), 0 14px 30px rgba(30, 33, 25, .12); }
  .wo-card:hover .wo-card-img { transform: scale(1.04); }
}
@media (prefers-reduced-motion: reduce) { .wo-card, .wo-card-img, .wo-card-go svg { transition: none; } .wo-card:hover, .wo-card:hover .wo-card-img { transform: none; } }
.wo-hero { position: relative; margin: -16px -16px 14px; aspect-ratio: 21 / 9; max-height: 260px; width: calc(100% + 32px); overflow: hidden; background: var(--surface-2); border-radius: var(--radius) var(--radius) 0 0; }
.wo-hero-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wo-rot { margin: 0 0 12px; font-size: .95rem; }
.wo-resume { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; border: 2px solid var(--primary); }
.wo-resume > div:first-child { display: flex; flex-direction: column; }
.wo-today { list-style: none; padding: 0; margin: 0; }
.wo-today li { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); }
.wo-today li:last-child { border-bottom: 0; }
.wo-today li.done span { color: var(--muted); }
.wo-today .btn { flex: none; }
.wo-head .wo-title { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; }
.wo-head .wo-title .wo-badge { box-shadow: none; }
.wo-head h2 { margin: 0; }
.wo-head p { margin: 2px 0 0; }
.wo-prev { padding-left: 1.2em; margin: 8px 0 14px; }
.wo-prev li { margin: 8px 0; }
.wo-note { display: block; margin: 6px 0; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--primary-soft); font-size: .9rem; }
.wo-prev .wo-note { margin-top: 4px; }
.wo-last { margin: 6px 0 0; font-size: .85rem; color: var(--muted); }
.wo-bar { position: sticky; top: calc(66px + var(--demo-x, 0px)); z-index: 5; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; padding: 10px 14px; }
.wo-bar > div:first-child { display: flex; flex-direction: column; }
.rest-btns { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rest-btns .chip-btn { min-height: 36px; padding: 4px 10px; }
.wo-ex-head { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; }
.wo-ex-name h3 { margin: 0 0 2px; }
.wo-target { display: block; font-weight: 700; color: var(--accent); font-size: .9rem; }
.wo-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.tag.gold { background: var(--accent-soft); color: var(--accent); }
.wo-swap { display: flex; gap: 8px; align-items: center; margin: 8px 0 0; }
.wo-swap select { flex: 1; min-width: 0; min-height: 40px; }
.sets { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.set-row { display: flex; gap: 8px; align-items: center; padding: 6px; border-radius: var(--radius-sm); background: var(--surface-2); transition: background .15s; }
.set-row.done { background: var(--ok-soft); }
.set-n { flex: none; width: 22px; text-align: center; font-weight: 800; color: var(--muted); }
.set-fields { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.fld { display: flex; flex-direction: column; flex: 1 1 64px; min-width: 64px; max-width: 120px; }
.fld.wide { flex-basis: 124px; max-width: 170px; }
.fld select { text-align-last: center; }
.fld-time { display: flex; align-items: center; gap: 2px; }
.fld-time select { flex: 1 1 0; min-width: 0; padding: 6px 2px; font-weight: 600; text-align: center; text-align-last: center; }
.fld-time b { color: var(--muted); }
/* Tap, don't type: a dropdown with a minus and a plus beside it */
.pick { display: flex; gap: 6px; align-items: stretch; }
.pick select { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 6px 4px; font-weight: 600; text-align: center; text-align-last: center; }
.pick-b { flex: none; width: 44px; min-height: 44px; padding: 0; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: 700 1.3rem var(--font); cursor: pointer; touch-action: manipulation; }
.pick-b:active { background: var(--surface-2); }
.wo-fin-row .pick { min-width: 190px; }
.fld input, .fld select { width: 100%; min-height: 44px; padding: 6px 8px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); font: 600 1rem var(--font); text-align: center; }
.fld span { font-size: .7rem; color: var(--muted); text-align: center; margin-top: 2px; text-transform: uppercase; letter-spacing: .04em; }
.set-done { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--border-strong); background: var(--surface); color: var(--muted); font-size: 1.2rem; font-weight: 800; cursor: pointer; }
.set-row.done .set-done, .set-done[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.set-del { flex: none; width: 32px; height: 32px; border: 0; background: none; color: var(--muted); cursor: pointer; padding: 6px; }
.set-del svg { width: 16px; height: 16px; }
.wo-ex-actions { margin-top: 8px; gap: 16px; }
.wo-how { margin-top: 10px; }
.wo-how summary { cursor: pointer; font-weight: 700; color: var(--info); min-height: 36px; display: flex; align-items: center; }
.wo-how ol { margin: 6px 0; padding-left: 1.2em; }
.wo-add { gap: 8px; }
.wo-add select { flex: 1; min-width: 0; min-height: 44px; }
.rpe { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.rpe button { min-height: 40px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-weight: 700; cursor: pointer; }
.rpe button.active { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.wo-fin-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.wo-fin-row .field { flex: 1 1 140px; }
.wo-finish textarea, .wo-finish input:not([type]), .gear-det input:not([type="checkbox"]), .gear-det select { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); font: 1rem var(--font); }
.rest-chip { position: fixed; left: 50%; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 14px); transform: translateX(-50%); z-index: 60; display: flex; gap: 14px; align-items: center; padding: 10px 12px 10px 18px; border-radius: 999px; background: var(--text); color: var(--bg); box-shadow: 0 8px 24px rgba(0,0,0,.25); font-size: 1.05rem; }
.rest-chip b { font-variant-numeric: tabular-nums; font-size: 1.25rem; }
.rest-chip button { min-height: 36px; padding: 4px 14px; border-radius: 999px; border: 0; background: var(--bg); color: var(--text); font-weight: 700; cursor: pointer; }
@media (min-width: 768px) { .rest-chip { bottom: 24px; } }
.best-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.best-grid > div { display: flex; flex-direction: column; padding: 12px; border-radius: var(--radius-sm); background: var(--surface-2); }
.best-grid span { font-size: .8rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.best-grid b { font-family: var(--font-head); font-size: 1.3rem; }
.trend-list { display: flex; flex-direction: column; }
.trend { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); }
.trend:last-child { border-bottom: 0; }
.trend > div { display: flex; flex-direction: column; min-width: 0; }
.spark { width: 96px; height: 26px; flex: none; color: var(--primary); }
.wo-session ul { padding-left: 1.1em; margin: 4px 0 10px; }
.gear-list { display: flex; flex-direction: column; }
.gear-row { padding: 10px 0; border-bottom: 1px solid var(--border); }
.gear-row:last-child { border-bottom: 0; }
.gear-main { display: flex; gap: 12px; align-items: center; min-height: 44px; cursor: pointer; font-weight: 600; }
.gear-main input { width: 22px; height: 22px; accent-color: var(--primary); flex: none; }
.gear-ico { display: grid; place-items: center; width: 28px; height: 28px; flex: none; color: var(--primary); }
.gear-ico svg { width: 22px; height: 22px; }
.gear-row:not(.on) .gear-ico { color: var(--muted); }
.gear-row:not(.on) .gear-main span:last-child { color: var(--muted); }
.gear-det { margin: 6px 0 4px 62px; }
.gear-det .field { margin: 6px 0; }
.chip-check { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border-strong); min-height: 40px; cursor: pointer; }
.chip-check input { accent-color: var(--primary); }
.gear-chips .chip-row { gap: 6px; }
.gear-chip { min-width: 52px; min-height: 40px; padding: 6px 10px; font-variant-numeric: tabular-nums; }
.gear-chip.extra { border-style: dashed; }
.gear-det .check-row { margin-top: 6px; }
.credit-list { list-style: none; padding: 0; margin: 0; }
.credit-list li { display: flex; flex-direction: column; gap: 1px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .92rem; }
.credit-list li:last-child { border-bottom: 0; }
.credit-list a { align-self: flex-start; padding: 4px 0; }
@media (max-width: 420px) { .gear-det { margin-left: 0; } .rpe { grid-template-columns: repeat(5, 1fr); } }
@media print { .rest-chip, .wo-bar .rest-btns, .set-done, .set-del { display: none !important; } }

/* "What's new" popup (shares the love-note overlay; app-themed card) */
.wn-card { position: relative; width: min(460px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; margin: auto; padding: 22px 20px 16px; border-radius: 22px; background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.35); transform: translateY(16px) scale(.97); transition: transform .3s cubic-bezier(.2, .9, .3, 1.2); }
.love-modal.show .wn-card { transform: none; }
.wn-top { display: flex; gap: 12px; align-items: center; margin-bottom: 6px; }
.wn-badge { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.wn-badge svg { width: 26px; height: 26px; }
.wn-eyebrow { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .12em; font-weight: 700; font-size: .8rem; color: var(--accent); }
.wn-top h2 { margin: 2px 0 0; font-size: 1.3rem; }
.wn-rel h3 { margin: 14px 0 6px; font-size: 1.05rem; }
.wn-rel ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.wn-rel li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.45; }
.wn-ico { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--primary); }
.wn-ico svg { width: 18px; height: 18px; }
.wn-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.wn-actions .btn { flex: 1 1 140px; min-height: 48px; }

/* Popups always fit the screen (any device, notch and home bar included): body scrolls inside, buttons stay pinned. */
.love-modal { padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); }
.wn-card { display: flex; flex-direction: column; padding: 0; overflow: hidden;
  max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
.wn-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 22px 20px 10px; }
.wn-actions { flex: none; margin: 0; padding: 12px 20px 14px; border-top: 1px solid var(--border); background: var(--surface); align-items: center; }
.wn-actions .link-btn { flex: 0 0 auto; padding: 10px 6px; }
.love-card { max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; }
body.scroll-locked { position: fixed; left: 0; right: 0; overflow: hidden; }
.mv-steps { padding-left: 1.2em; margin: 8px 0 10px; }
.mv-steps li { margin: 8px 0; line-height: 1.45; }
.wn-actions .btn svg { width: 18px; height: 18px; margin-right: 6px; vertical-align: -3px; }

/* Body check (waist-to-height) + Fuel */
.bc-summary { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--text); border-left: 5px solid var(--accent-bright); }
.bc-summary.pass { border-left-color: var(--ok); }
.bc-summary.over { border-left-color: var(--accent-bright); }
.bc-summary > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.bc-summary b { font-size: 1.05rem; }
.bc-sum-ico { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--surface-2); color: var(--accent); }
.bc-sum-ico svg { width: 26px; height: 26px; }
.bc-sum-go { font-size: 1.8rem; color: var(--muted); }
.bc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; margin: 8px 0 12px; }
@media (max-width: 640px) { .bc-grid { grid-template-columns: 1fr; } }
.bc-diagram { background: var(--surface-2); border-radius: var(--radius-sm); padding: 8px; }
.tape-diagram { width: 100%; height: auto; display: block; max-height: 320px; }
.tape-diagram .sil { fill: var(--border-strong); }
.tape-diagram .tape { fill: none; stroke: var(--accent-bright); stroke-width: 7; stroke-linecap: round; }
.tape-diagram .tape-back { fill: none; stroke: var(--accent-bright); stroke-width: 4; stroke-dasharray: 5 6; opacity: .7; }
.tape-diagram .navel { fill: var(--text); }
.tape-diagram .lead { fill: none; stroke: var(--muted); stroke-width: 1.5; }
.tape-diagram text { fill: var(--text); font: 600 14px var(--font); }
.tape-diagram text .b { font-weight: 800; fill: var(--accent); }
.bc-form .field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.bc-form select { min-height: 46px; font-weight: 600; }
.bc-verdict { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: var(--radius-sm); margin: 6px 0 10px; }
.bc-verdict b { font-family: var(--font-head); font-size: 1.35rem; letter-spacing: .01em; }
.bc-verdict.pass { background: var(--ok-soft); color: var(--text); border-left: 4px solid var(--ok); }
.bc-verdict.over { background: var(--accent-soft); color: var(--text); border-left: 4px solid var(--accent-bright); }
.bc-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.bc-nums > div { display: flex; flex-direction: column; padding: 10px; border-radius: 10px; background: var(--surface-2); text-align: center; }
.bc-nums span { font-size: .72rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.bc-nums b { font-family: var(--font-head); font-size: 1.15rem; }
.bc-progress { margin: 4px 0 10px; }
.bc-bar { height: 12px; border-radius: 999px; background: var(--track); overflow: hidden; margin-bottom: 4px; }
.bc-bar span { display: block; height: 100%; border-radius: 999px; background: var(--ok); }
.fuel-grid { margin: 8px 0 14px; }
.fuel-grid > div span.muted { text-transform: none; letter-spacing: 0; font-weight: 500; }
.fuel-list { padding-left: 1.1em; }
.fuel-list li { margin: 6px 0; line-height: 1.5; }
.card select[data-fuel] { min-height: 44px; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); font: 1rem var(--font); width: 100%; }
.card input[data-fuel] { min-height: 44px; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); font: 600 1rem var(--font); width: 100%; }

/* Ideas & requests */
#reqText { width: 100%; min-height: 110px; margin: 8px 0 10px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--text); font: 1rem/1.45 var(--font); resize: vertical; }
.req-list { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 10px; }
.req-list li { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); }
.req-list li > div { display: flex; flex-wrap: wrap; gap: 4px 10px; justify-content: space-between; align-items: baseline; }
.req-list p { margin: 6px 0 0; white-space: pre-wrap; }

/* ---------- Uniform & Look: tap-the-Soldier + cap game ---------- */
.uni-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin: 0 0 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.uni-seg button { min-height: 38px; padding: 6px 14px; border: 0; border-radius: 999px; background: transparent; color: var(--text); font: 600 .9rem var(--font); cursor: pointer; }
.uni-seg button.on { background: var(--primary); color: var(--primary-ink); }
.uni-grid { display: grid; grid-template-columns: minmax(130px, 44%) 1fr; gap: 12px; align-items: start; }
@media (min-width: 700px) { .uni-grid { grid-template-columns: 250px 1fr; gap: 22px; } }
.uni-fig { position: sticky; top: calc(env(safe-area-inset-top) + 118px + var(--demo-x, 0px)); min-width: 0; }
/* Tap-to-learn photo: numbered buttons placed by percent (js/content-uniform.js photos[].dots). Fixed-size dots with a
   44px tap area; olive with a white edge reads on the black PT shirt, the camouflage and the white studio background. */
.uni-photo { position: relative; width: 100%; margin: 0 auto; border-radius: var(--radius-sm); background: var(--surface-2); -webkit-tap-highlight-color: transparent; }
.uni-crop { position: absolute; inset: 0; overflow: hidden; border-radius: var(--radius-sm); }
.uni-crop img { position: absolute; display: block; max-width: none; height: auto; }
.uni-dot { position: absolute; width: 28px; height: 28px; margin: -14px 0 0 -14px; padding: 0; border-radius: 50%; border: 2px solid #fff; background: #4b5320; color: #fff; font: 800 13px/1 var(--font); display: grid; place-items: center; cursor: pointer; box-shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 2px 8px rgba(0, 0, 0, .35); z-index: 1; }
.uni-dot::before { content: ""; position: absolute; inset: -9px; border-radius: 50%; }
.uni-dot::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid #d4a72c; opacity: 0; pointer-events: none; }
.uni-dot.on { background: #d4a72c; color: #1e2119; z-index: 2; }
.uni-card:not(.picked) .uni-dot::after, .uni-dot.on::after { animation: uniPulse 1.8s ease-out infinite; }
@keyframes uniPulse { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(1.9); } }
@media (prefers-reduced-motion: reduce) { .uni-dot::after { animation: none !important; } }
.uni-dot:focus-visible { outline: 3px solid #d4a72c; outline-offset: 2px; }
.uni-sex { display: flex; gap: 4px; margin: 8px auto 0; padding: 3px; max-width: 220px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.uni-sex button { flex: 1 1 0; min-width: 0; min-height: 36px; padding: 4px 6px; border: 0; border-radius: 999px; background: transparent; color: var(--text); font: 600 .84rem var(--font); cursor: pointer; }
.uni-sex button.on { background: var(--primary); color: var(--primary-ink); }
.uni-note { margin: 6px 2px 0; font-size: .8rem; line-height: 1.35; color: var(--muted); text-align: center; }
:root[data-theme="dark"] .uni-crop img { filter: brightness(.9); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .uni-crop img { filter: brightness(.9); } }
.uni-detail { min-width: 0; font-size: .95rem; }
.uni-detail h3 { margin: 2px 0 6px; font-size: 1.06rem; }
.uni-detail h3 svg { width: 20px; height: 20px; margin-right: 6px; vertical-align: -4px; color: var(--primary); }
.uni-detail p { margin: 0 0 8px; }
.uni-do, .uni-dont { list-style: none; padding: 0; margin: 8px 0; }
.uni-do li, .uni-dont li { position: relative; padding-left: 22px; margin: 5px 0; }
.uni-do li::before, .uni-dont li::before { position: absolute; left: 0; top: 0; font-weight: 800; }
.uni-do li::before { content: '✓'; color: var(--ok); }
.uni-dont li::before { content: '✗'; color: var(--danger); }
.uni-empty { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1.5px dashed var(--border-strong); border-radius: var(--radius-sm); }
.uni-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.uni-chips .chip-link.on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.uni-chips .chip-link svg { width: 16px; height: 16px; margin-right: 5px; vertical-align: -3px; }
@media (max-width: 359px) { .uni-grid { grid-template-columns: 1fr; } .uni-fig { position: static; max-width: 220px; margin: 0 auto; } }
.cap-top { display: flex; justify-content: space-between; gap: 8px; }
.cap-scene { text-align: center; padding: 14px 6px 4px; }
.cap-scene h2 { margin: 6px 0; }
.cap-ico { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; background: var(--surface-2); color: var(--primary); }
.cap-ico svg { width: 34px; height: 34px; }
.cap-scene p { margin: 10px 0 0; font-size: 1.1rem; font-weight: 600; }
.cap-scene p.muted { font-size: .95rem; font-weight: 400; }
.cap-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.cap-btns.one { grid-template-columns: 1fr; }
.cap-btns .btn { min-height: 54px; font-size: 1.04rem; }
.cap-result { margin: 16px 0 0; padding: 12px 14px; border-radius: var(--radius-sm); border-left: 4px solid var(--ok); background: var(--ok-soft); }
.cap-result.no { border-left-color: var(--danger); background: var(--danger-soft); }
.cap-result p { margin: 6px 0 0; }

/* ---------- Checklists: quantities and "Not needed" ---------- */
.check .qty { display: inline-block; min-width: 1.9em; margin-right: 2px; padding: 0 6px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: .85em; text-align: center; text-decoration: none; }
.checklist li.has-na { display: flex; align-items: center; gap: 8px; }
.checklist li.has-na .check { flex: 1; min-width: 0; }
.na-btn { flex: none; min-height: 36px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--border-strong); background: transparent; color: var(--muted); font: 600 .82rem var(--font); cursor: pointer; white-space: nowrap; }
.na-tag { display: none; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .78rem; font-weight: 700; text-decoration: none; vertical-align: 1px; }
.checklist li.na .na-tag { display: inline-block; }
.checklist li.na .label > .text { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--muted); }
.checklist li.na .label > .text .na-tag { text-decoration: none; }
.checklist li.na .box { border-style: dashed; }
.checklist li.na .na-btn { color: var(--text); }

/* ASVAB page (js/content-asvab.js + CUSTOM.asvab* in js/app.js) */
.asvab-req { list-style: none; padding: 0; margin: 4px 0 10px; }
.asvab-req li { padding: 8px 0; border-top: 1px solid var(--border); line-height: 1.7; }
.asvab-req li:first-child { border-top: 0; padding-top: 0; }
.asvab-focus { margin: 6px 0 10px; padding-left: 1.3em; }
.asvab-focus li { margin: 8px 0; }
.asvab-focus li .muted { display: block; }
.asvab-lines { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 12px; }
.asvab-lines .field input { max-width: 120px; }
.asvab-jobs { margin: 6px 0 12px; padding-left: 1.1em; }
.asvab-jobs li { margin: 6px 0; }
/* ASVAB practice tests (CUSTOM.asvabTest in js/app.js) */
.test-card .eyebrow { display: block; margin-bottom: 4px; }
.test-timer { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; font-variant-numeric: tabular-nums; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); }
.test-timer.low { background: var(--danger-soft); color: var(--danger); }
.test-q { font-size: 1.08rem; line-height: 1.55; margin: 6px 0 14px; white-space: normal; }
.test-choices { display: grid; gap: 10px; }
.test-choice { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; font: inherit; font-size: 1rem; line-height: 1.4; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); cursor: pointer; }
.test-choice b { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-size: .9rem; }
.test-choice:hover, .test-choice:focus-visible { border-color: var(--primary); }
.test-choice:active { background: var(--primary-soft); }
.test-review { padding: 10px 0; border-top: 1px solid var(--border); }
.test-review:first-child { border-top: 0; padding-top: 0; }
.test-choice.on { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 1px var(--primary) inset; }
.test-choice.on b { background: var(--primary); color: var(--primary-ink); }
.test-next { margin-top: 14px; }
.test-leave { margin: 8px 0 0; }
.test-leave a { display: inline-block; padding: 9px 0; }

/* ---------- Recruiter connection (js/recruit-link.js; spots are <div data-rl> in js/app.js) ---------- */
.rl-who { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.rl-who > div { display: flex; flex-direction: column; min-width: 0; }
.rl-who b { font-family: var(--font-head); font-size: 1.3rem; line-height: 1.15; }
.rl-who .meta { white-space: nowrap; font-weight: 700; text-decoration: none; }
.rl-who-card .rl-who { justify-content: flex-start; }
.rl-wholine { margin: 0 0 6px; font-size: 1.05rem; overflow-wrap: anywhere; }
.rl-wholine b { font-family: var(--font-head); font-size: 1.3rem; }
/* "Report this recruiter" (js/recruit-link.js reportHTML) */
.rl-report-link { margin: 8px 0 0; }
.rl-report-link .link-btn { color: var(--muted); font-weight: 600; font-size: .85rem; min-height: 32px; }
.rl-report { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.rl-report.callout { padding-top: 12px; border-top: 0; }
.rl-report h3 { margin: 0 0 6px; }
.rl-reasons { margin: 0 0 10px; padding: 0; border: 0; min-width: 0; }
.rl-reasons legend { padding: 0; margin: 0 0 4px; font-weight: 600; }
.rl-reason { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px; margin: 0 0 6px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
.rl-reason input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--primary); }
.rl-reason:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.rl-report textarea { min-height: 80px; }
.rl-rcount { display: block; text-align: right; margin-top: 2px; }
.rl-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.rl-private { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.rl-private-card .rl-private { margin-top: 0; padding-top: 0; border-top: 0; }
.rl-private .btn { margin-bottom: 6px; }
.rl-list { list-style: none; padding: 0; margin: 0 0 12px; }
.rl-list li { position: relative; padding-left: 28px; margin: 8px 0; }
.rl-list li::before { position: absolute; left: 0; top: 1px; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: .75rem; font-weight: 800; line-height: 1; }
.rl-list.yes li::before { content: "✓"; background: var(--ok-soft); color: var(--ok); }
.rl-list.no li::before { content: "✕"; background: var(--surface-2); color: var(--muted); }
.rl-share { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border-radius: var(--radius-sm); background: var(--surface-2); margin: 4px 0 0; }
.rl-share .sw { flex: none; margin-top: 2px; }
.rl-share > span:last-child { display: flex; flex-direction: column; font-weight: 600; }
.rl-share > span:last-child .muted { font-weight: 400; }
.rl-go { margin: 14px 0; }
.rl-go .big-btn { flex: 1 1 260px; }
.rl-state .row { margin-top: 12px; }
.rl-banner .callout-title { display: flex; align-items: center; gap: 6px; }
.rl-banner .callout-title svg { width: 18px; height: 18px; flex: none; }
.rl-banner p { margin: 4px 0 10px; }
.rl-banner, .rl-card, .rl-private { overflow-wrap: anywhere; } /* a long unbroken name or station */
.rl-appts .card-title .meta { flex-shrink: 0; max-width: 50%; white-space: normal; overflow-wrap: anywhere; }
.rl-body { white-space: normal; overflow-wrap: anywhere; }
.rl-banner-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rl-more { margin: -6px 0 14px; }
.rl-appt { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.rl-appts .rl-appt:first-of-type, .rl-card h3 + .rl-appt { border-top: 0; padding-top: 4px; }
.rl-appt-when { flex: none; width: 92px; display: flex; flex-direction: column; line-height: 1.25; }
.rl-appt-when b { font-family: var(--font-head); font-size: 1.1rem; }
.rl-appt-when span { color: var(--muted); font-size: .85rem; }
.rl-appt-what { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.rl-appt-what p { margin: 4px 0 0; }
.rl-cal { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.rl-msgs { list-style: none; padding: 0; margin: 0 0 8px; }
.rl-msgs li { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); margin: 0 0 8px; overflow-wrap: anywhere; }
.rl-msgs li.unread { background: var(--info-soft); }
.rl-msgs li.mine { background: transparent; border: 1px dashed var(--border-strong); }
.rl-msgs li p { margin: 2px 0 0; }
.rl-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.rl-foot .btn { flex: none; }
@media (max-width: 420px) { .rl-appt { flex-direction: column; gap: 4px; } .rl-appt-when { width: auto; flex-direction: row; gap: 8px; align-items: baseline; } }
/* AIT / unit info card (unitCard() in js/app.js) */
.unit-card .settings-grid { margin-bottom: 4px; }
.unit-acc { margin-bottom: 0; }
/* ---------- The demo (js/demo.js, docs/DEMO-SPEC.md) ----------
   A fixed bar at the top of every screen: "Demo · 9:41 left", switch sides, End demo. html.demo-on (set before first
   paint) pushes the page down by --demo-x, and every sticky header above adds it to its top. */
:root { --demo-x: 0px; }
html.demo-on { --demo-x: 44px; }
html.demo-on body { padding-top: var(--demo-x); }
.dm-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 45; height: calc(var(--demo-x) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  background: var(--accent-soft); color: var(--text); border-bottom: 1px solid var(--accent-bright); font-size: .92rem; }
.dm-in { display: flex; align-items: center; gap: 8px; height: 100%; max-width: 1100px; margin: 0 auto; }
.dm-left { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; }
.dm-left b { font-family: var(--font-head); font-size: 1.05rem; letter-spacing: .06em; text-transform: uppercase; }
.dm-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--accent-bright); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-bright) 30%, transparent); }
.dm-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.dm-low .dm-time { color: var(--danger); }
.dm-low .dm-dot { background: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 30%, transparent); }
.dm-btn { flex: none; min-height: 40px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: 600 .85rem/1.2 var(--font); white-space: nowrap; cursor: pointer; }
.dm-btn:hover { border-color: var(--primary); }
.dm-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.dm-switch { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.dm-long { display: none; }
@media (min-width: 520px) { .dm-long { display: inline; } .dm-short { display: none; } }
.dm-hl { outline: 3px solid var(--accent-bright); outline-offset: 3px; border-radius: var(--radius-sm); }
/* "What you're looking at" notes on the main screens (note() in js/demo.js) */
.dm-note { position: relative; }
.dm-note p { margin: 2px 0 0; }
.dm-note-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.dm-eyebrow { font-family: var(--font-head); font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.dm-x { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; margin: -10px -10px -10px 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.dm-x svg { width: 18px; height: 18px; }
.dm-x:hover { color: var(--text); background: color-mix(in srgb, var(--text) 8%, transparent); }
.dm-x:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
/* The tour: a small card at the bottom, above the bottom bar on phones (tourShow() in js/demo.js) */
.dm-tour { position: fixed; z-index: 40; left: 12px; right: 12px; bottom: calc(var(--nav-h) + 10px + env(safe-area-inset-bottom)); max-width: 400px; margin: 0 auto; padding: 12px 14px 14px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-top: 4px solid var(--accent-bright); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0, 0, 0, .28); }
.dm-tour h2 { margin: 0 0 4px; font-size: 1.15rem; }
.dm-tour p { margin: 0 0 10px; font-size: .95rem; line-height: 1.45; }
.dm-tour-btns { display: flex; justify-content: space-between; gap: 8px; }
.dm-tour-rc { bottom: calc(14px + env(safe-area-inset-bottom)); }
html.dm-touring body { padding-bottom: 190px; }
/* Phones: with the bottom bar under it, the tallest tour card needs more room than the padding above leaves. */
@media screen and (max-width: 767px) { html.dm-touring .view { padding-bottom: calc(var(--nav-h) + 130px + env(safe-area-inset-bottom)); } }
.dm-tour-open { display: none; }
.dm-tour.dm-min { left: auto; width: auto; padding: 6px 8px 6px 12px; }
.dm-tour.dm-min h2, .dm-tour.dm-min p, .dm-tour.dm-min .dm-tour-btns { display: none; }
.dm-tour.dm-min .dm-note-top { margin: 0; }
.dm-tour.dm-min .dm-tour-open { display: inline-flex; margin-left: auto; }
@media (min-width: 768px) { .dm-tour { left: auto; right: 24px; bottom: 24px; width: 360px; margin: 0; } }
@media print { .dm-bar, .dm-tour { display: none !important; } html.demo-on body, html.dm-touring body { padding-top: 0; padding-bottom: 0; } }
/* Landing: the line under "Try the demo" (js/auth.js) */
.bca-demo-note { margin-top: 4px; }
/* "Find the best job for you" (#/jobs/match in js/app.js; docs/JOB-FINDER.md) */
.jm-cta-row { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.jm-cta-row .ico { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.jm-cta-row .ico svg { width: 22px; height: 22px; }
.jm-cta-row h2 { margin: 2px 0 2px; font-size: 1.3rem; }
.jm-cta-row p { margin: 0; }
.jm-backs { display: flex; flex-wrap: wrap; gap: 0 18px; }
.jm-step { margin: 0 0 6px; font-weight: 600; }
.jm-bar { height: 8px; margin: 0 0 10px; }
.jm-head h1:focus { outline: none; }
.jm-head p { margin-top: 4px; }
.jm-opts { display: grid; gap: 10px; margin: 0 0 16px; }
.jm-opt { color: var(--text); }
.jm-opt-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.jm-opt-t b { font-weight: 700; font-size: 1.04rem; line-height: 1.25; }
.jm-opt-t span { color: var(--muted); font-size: .9rem; line-height: 1.35; }
.jm-opt > svg { flex: none; width: 18px; height: 18px; color: var(--muted); }
.jm-opt.selected > svg { color: var(--primary); }
.jm-chips { margin: 0 0 8px; }
.jm-chips .chip-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 14px; font-size: .95rem; text-align: left; line-height: 1.25; }
.jm-chips .chip-link svg { display: none; width: 16px; height: 16px; flex: none; }
.jm-chips .chip-link.on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.jm-chips .chip-link.on svg { display: block; }
.jm-nav { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 16px; }
.jm-nav .btn:last-child:not(:first-child) { margin-left: auto; }
.jm-result-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 6px; }
.jm-rank { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font: 700 1.1rem/1 var(--font-head); }
.jm-result h2 { margin: 0; font-size: 1.25rem; }
.jm-result h2 a { color: inherit; text-decoration: none; }
.jm-result h2 a:hover { text-decoration: underline; }
.jm-why { margin: 0 0 10px; }
.jm-facts { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; font-size: .95rem; }
.jm-facts li { display: flex; gap: 8px; align-items: flex-start; }
.jm-facts li > svg { flex: none; width: 18px; height: 18px; margin-top: 3px; color: var(--muted); }
.jm-facts li > span { min-width: 0; overflow-wrap: anywhere; }
.jm-fit { display: flex; align-items: center; gap: 4px; margin-top: 2px; font-weight: 700; color: var(--muted); }
.jm-fit svg { width: 16px; height: 16px; flex: none; }
.jm-fit.ok { color: var(--ok); }
.jm-fit.short { color: var(--danger); }
.jm-result .row .btn, .jm-close .row .btn { flex: 1 1 auto; }
.jm-answers ol { margin: 0; padding-left: 1.3em; }
.jm-answers li { margin: 0 0 8px; }
.ob-match { margin: 12px 0 6px; display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
.ob-match .ob-link { padding-left: 0; padding-right: 0; min-height: 40px; }

/* ---------- ASVAB picture questions and score report (js/app.js: stemHTML, reportPage) ---------- */
.ao-fig, .ao-grid { max-width: 420px; margin-left: auto; margin-right: auto; }
.ao-fig { margin-bottom: 12px; color: var(--text); }
.ao-fig svg, .ao-pic svg { display: block; width: 100%; height: auto; }
.ao-pic { display: block; color: var(--text); }
/* Same scale as the choices, so a piece shows at the same size in both. A choice is half of (100% - 8px gap), less 6px padding and 1px border on each side, and the drawings are 300 and 150 wide. */
.ao-fig svg { width: calc(100% - 36px); margin-left: auto; margin-right: auto; }
.test-choices.ao-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
/* The letter sits above the drawing, so it never covers a shape that reaches the corner. */
.ao-grid .test-choice { display: block; padding: 6px; position: relative; }
.ao-grid .test-choice::after { position: absolute; top: 9px; right: 9px; }
.ao-grid .test-choice b { display: grid; width: 24px; height: 24px; }
.test-review .ao-pic { max-width: 150px; margin: 4px 0 8px; }
.test-review .ao-fig svg { width: 300px; max-width: 100%; }
.guide-card svg { max-width: 100%; height: auto; color: var(--text); }
/* The guides say "left picture" and "right picture", so the pair stays side by side on narrow phones. */
.guide-card svg[width="150"] { max-width: 49.5%; }
.rpt-head .card-title { align-items: flex-start; }
.rpt-head h2 { margin: 0; }
.rpt-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin: 10px 0 0; }
.rpt-meta dt { font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.rpt-meta dd { margin: 0; font-weight: 600; line-height: 1.3; }
.rpt-big { margin: 0 0 10px; font-family: var(--font-head); font-size: 2.1rem; font-weight: 700; line-height: 1.1; }
.rpt-lead { margin: 0 0 10px; font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; line-height: 1.15; }
.rpt-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; margin: 0 0 12px; border-radius: var(--radius-sm); overflow: hidden; }
.rpt-bar .rpt-seg { padding: 7px 2px; text-align: center; font-size: .85rem; line-height: 1.2; background: var(--surface-2); color: var(--muted); }
.rpt-bar .rpt-seg b { display: block; white-space: nowrap; }
.rpt-bar .rpt-seg small { font-size: .7rem; }
.rpt-bar .rpt-seg.in { background: var(--primary-soft); color: var(--text); }
.rpt-bar .rpt-seg.mid { background: var(--primary); color: var(--primary-ink); }
.rpt-note { margin: 8px 0 0; }
.rpt-job { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin: 0 0 8px; font-weight: 700; line-height: 1.25; }
.rpt-job > :first-child { flex: 1 1 min-content; min-width: 0; }
.rpt-job .tag, .rpt-table .tag { flex: none; white-space: nowrap; letter-spacing: .02em; }
.rpt-table th, .rpt-table td { padding: 7px 6px; font-size: .92rem; }
.rpt-table th { font-size: .95rem; }
.rpt-sub { display: block; line-height: 1.3; }
.rpt-weak { margin: 0; padding-left: 1.3em; }
.rpt-weak li { margin: 8px 0; }
details.rpt-more { margin: 10px 0 0; }
.rpt-foot { margin: 14px 0 0; }
/* ---------- ASVAB study plan (js/app.js: planPage, planRunner, planHomeCard) ---------- */
.rpt-weak-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.rpt-weak-row > :first-child { flex: 1 1 min-content; min-width: 0; }
.rpt-weak-act { flex: none; display: flex; align-items: center; gap: 6px; }
.plan-big { margin: 2px 0 4px; font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; line-height: 1.15; }
.plan-meter .progress { margin: 0 0 4px; }
.plan-home .plan-meter { margin-top: 12px; }
.plan-tasks { list-style: none; margin: 0; padding: 0; }
.plan-task { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--border); }
.plan-task:first-child { border-top: 0; }
.plan-tick { position: relative; flex: none; display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 2px solid var(--muted); background: var(--surface); color: transparent; }
.plan-tick::after { content: ''; position: absolute; inset: -9px; } /* a 44px target for a thumb */
.plan-tick svg { width: 15px; height: 15px; }
.plan-tick.on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
button.plan-tick { cursor: pointer; }
button.plan-tick:focus-visible { outline: 3px solid var(--accent-bright); outline-offset: 2px; }
.plan-go { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 52px; padding: 7px 0; color: inherit; text-decoration: none; }
.plan-go svg { flex: none; width: 18px; height: 18px; color: var(--muted); }
.plan-text { min-width: 0; line-height: 1.3; }
.plan-text b { display: block; }
.plan-task.done .plan-text b { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--muted); }
.plan-steps { margin: 0 0 14px; padding-left: 1.3em; }
.plan-steps li { margin: 6px 0; }
.plan-skills, .plan-hours, .plan-coming { list-style: none; margin: 0; padding: 0; }
.plan-skills > li { padding: 9px 0; border-top: 1px solid var(--border); }
.plan-skills > li:first-child { padding-top: 0; border-top: 0; }
.plan-skill-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.plan-skill-top .tag { flex: none; letter-spacing: .02em; }
.plan-bar { height: 6px; margin: 6px 0 0; }
.plan-bar.ok > span { background: var(--ok); }
.plan-hours li { margin: 0 0 10px; }
.plan-hours li:last-child { margin-bottom: 0; }
.plan-hours-row { display: flex; justify-content: space-between; gap: 10px; line-height: 1.3; }
.plan-hours-row b { flex: none; }
.plan-coming li { margin: 0 0 8px; }
.test-choice.right { border-color: var(--ok); background: var(--ok-soft); }
.test-choice.right b { background: var(--ok); color: var(--surface); }
.test-choice.wrong { border-color: var(--danger); background: var(--danger-soft); }
.test-choice.wrong b { background: var(--danger); color: var(--surface); }
.test-choice:disabled { cursor: default; color: inherit; opacity: 1; }
.test-card > .progress { margin: 0 0 12px; }
.test-choices + .callout { margin: 12px 0 0; }
/* Tap areas: at least 44px, and nothing on screen moves. The same see-through trick as .tel. Each stays the size it looks.
   summary uses ::before because .acc's chevron is its ::after. */
.topbar .brand, .topbar .chip-count, .topbar .top-search, .icon-btn, .btn.small, .subtabs a, .chip-link, .chip-btn, .seg button, .item-link, .more-link, .na-btn, .back-link, a.meta, .hero .stats a.act, .wo-card-alt, .page-brand, a.link, .link-btn, .jump button, .dm-btn, .dm-x, .test-leave a, .switch, .ob-link, li > a:only-child, details.sources summary { position: relative; }
.icon-btn.close { position: absolute; }
.topbar .brand::after, .topbar .chip-count::after, .topbar .top-search::after, .icon-btn::after, .btn.small::after, .subtabs a::after, .chip-link::after, .chip-btn::after, .seg button::after, .item-link::after, .more-link::after, .na-btn::after, .back-link::after, a.meta::after, .hero .stats a.act::after, .wo-card-alt::after, .page-brand::after, a.link::after, .link-btn::after, .jump button::after, .dm-btn::after, .dm-x::after, .test-leave a::after, .ob-link::after, li > a:only-child::after, .to-top::after, .switch::before, details.sources summary::before {
  content: ''; position: absolute; left: 50%; top: 50%; width: max(100%, 44px); height: max(100%, 44px); transform: translate(-50%, -50%);
}
@media (min-width: 768px) { .subtabs { padding-top: 3px; margin-top: -1px; } } /* room for the tap area inside the scroller */

/* Reduced motion: everything lands at once. Spinners keep turning (auth.css slows them), since a still one looks stuck. */
@media (prefers-reduced-motion: reduce) {
  *:not(.bca-spin), *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
}

/* ---------- Print ----------
   Checked in Chrome's print to PDF at Letter size: background graphics off (the default), and on with the app in dark mode.
   Browsers leave backgrounds out unless told, so anything that only shows as a fill (bars, ticks, tags) needs print-color-adjust.
   Cards may split across pages: "avoid" on a card taller than the space left pushes it to a new page, and on one taller than a
   page it leaves that page blank. Rows, list items and callouts stay whole, and headings stay with what follows them. */
@media print {
  /* Print on white whatever the theme. */
  :root:not([data-print]), :root[data-theme="dark"], :root[data-accent]:not([data-print]), :root[data-accent][data-theme="dark"] {
    --bg: #fff; --surface: #fff; --surface-2: #eee; --text: #000; --muted: #444; --border: #999; --border-strong: #777; --track: #ddd;
    --primary: #333; --primary-ink: #fff; --primary-soft: #d8d8d8; --accent: #000; --accent-bright: #555; --accent-soft: #eee; --danger: #000; --danger-soft: #eee; --ok: #000; --ok-soft: #eee; --info: #000; --info-soft: #eee;
    --bar-bg: #fff; --bar-ink: #000; --hero-from: #fff; --hero-to: #fff; --shadow: none;
    color-scheme: light;
  }
  html { font-size: 14px; }
  html, body { background: #fff; }
  body { color: #000; font-size: 10.5pt; line-height: 1.38; }
  a { color: #000; text-decoration: none; }
  .print-only { display: block; }

  /* Nothing to tap on paper. */
  .sidebar, .topbar, .bottomnav, .sheet, .sheet-backdrop, .subtabs, .no-print, .notes-card, .toast, .to-top, .prevnext, .jump,
  .btn, .icon-btn, .round-btn, .item-link, .seg, .more-link { display: none !important; }
  .view { padding: 0; max-width: none; }
  .page-head { margin: 0 0 8px; }

  /* Page breaks */
  .card { padding: 10px 12px; margin-bottom: 8px; border-color: #999; box-shadow: none; }
  h1, h2, h3, h4, .card-title, .eyebrow, .callout-title, summary, dt { break-after: avoid; }
  tr, li, dd, .callout, blockquote.creed, .stat-row, .progress-row, .rpt-bar { break-inside: avoid; }

  /* Tables: every column on the page, and the header again on the next one. */
  .table-wrap { overflow: visible; margin-bottom: 8px; border: 0; border-radius: 0; background: none; }
  thead { display: table-header-group; }
  th, td { padding: 3px 6px; }
  th { background: none; border-bottom-color: #777; }

  /* These only show as fills. */
  .rpt-bar .rpt-seg, .tag, .progress, .progress > span, .check .box, .plan-tick { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  .callout { border-radius: 0; background: none; padding: 4px 0 4px 10px; margin-bottom: 8px; }
  blockquote.creed { border-radius: 0; background: none; padding: 2px 0 2px 10px; margin-bottom: 8px; }
  details.acc { border: 0; background: none; margin-bottom: 6px; }
  details.acc > summary { padding: 4px 0; }
  details.acc > summary::after { display: none; }
  details.acc > .acc-body { padding: 0; }
  details.sources { margin: 8px 0; }
  details.sources li a { display: inline; padding: 0; }
  details.sources a::after { content: " " attr(href); word-break: break-all; position: static; width: auto; height: auto; transform: none; }

  /* Tick lists: the whole detail line, and room to tick with a pen. */
  .check { padding: 5px 2px; }
  .check .box { width: 18px; height: 18px; border-radius: 5px; }
  .check .label .detail, .clamp-2 p { display: block; overflow: visible; -webkit-line-clamp: unset; }

  /* The score report: every card is shorter than a page, so each stays whole. */
  .rpt-head, .view:has(.rpt-head) .card { break-inside: avoid; }
  .rpt-meta { grid-template-columns: repeat(3, 1fr); margin-top: 4px; }
  .rpt-big { margin-bottom: 6px; font-size: 1.7rem; }
  .rpt-bar .rpt-seg { padding: 4px 2px; }
  .rpt-table th, .rpt-table td { padding: 2px 6px; }
  .rpt-table .rpt-sub, .rpt-weak .rpt-sub { display: inline; margin-left: 6px; }
  .rpt-weak li { margin: 3px 0; }
  .rpt-foot { break-before: avoid; margin-top: 6px; }
  details.rpt-more > .acc-body { padding: 0; }

  /* The study plan */
  .plan-sum, .plan-today, .card:has(.plan-hours) { break-inside: avoid; }
  .plan-go { min-height: 0; padding: 3px 0; }
  .plan-go svg { display: none; }
  .print-open .asvab-jobs { columns: 2; column-gap: 24px; }

  /* The one-page study sheet has its own printed title. */
  .view:has(.print-only h1) .page-head { display: none; }

  /* Every printed app page says it isn't the Army's. The score report's own footer already does. */
  .app-print-foot { margin: 10px 0 0; break-before: avoid; }
  .view:has(.rpt-foot) + .app-print-foot { display: none; }
}
