body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.appbar { position: sticky; top: 0; z-index: 5; background: var(--surface); border-bottom: 1px solid var(--border); padding: 8px 16px; padding-top: calc(8px + env(safe-area-inset-top)); }
.appbar .logo { font-size: 1.1rem; }
#view { outline: none; }
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 5; display: flex; background: var(--surface); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 6px; min-height: 58px; color: var(--muted); text-decoration: none; font-size: .78rem; font-weight: 600; }
.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.on { color: var(--brand); }
.hero h1 { font-size: 1.6rem; }
.big { font-size: 2.6rem; font-weight: 800; line-height: 1.1; }
.center { text-align: center; }
.meter { height: 12px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin-top: 10px; }
.meter.thin { height: 6px; margin: 0 0 12px; }
.meter span { display: block; height: 100%; background: var(--brand); border-radius: inherit; transition: width .3s; }
.tiles { grid-template-columns: repeat(2, 1fr); margin-bottom: 14px; }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 16px; min-height: 104px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); text-decoration: none; box-shadow: var(--shadow); }
.tile b { font-size: 1.05rem; } .tile span { color: var(--muted); font-size: .88rem; }
.tile:hover { border-color: var(--brand); }
.rowlink { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 2px; min-height: 52px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; }
.rowlink:last-child { border-bottom: 0; }
.chev { color: var(--muted); font-size: 1.4rem; }
.quiz-head { margin-bottom: 10px; }
.stem { font-size: 1.12rem; font-weight: 600; margin: 8px 0 14px; }
.choices { display: grid; gap: 10px; }
.choice { display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%; min-height: 56px; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--border); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.choice:hover:not([disabled]) { border-color: var(--brand); }
.choice .key { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-weight: 700; font-size: .9rem; }
.choice.picked { border-color: var(--brand); background: var(--brand-soft); }
.choice.right { border-color: var(--good); background: var(--good-soft); }
.choice.right .key { background: var(--good); color: #fff; }
.choice.wrong { border-color: var(--bad); background: var(--bad-soft); }
.choice.wrong .key { background: var(--bad); color: #fff; }
.choice[disabled] { cursor: default; }
.feedback { margin: 14px 0; padding: 12px 14px; border-radius: 12px; }
.feedback p { margin: 6px 0 0; }
.feedback.good { background: var(--good-soft); } .feedback.good b { color: var(--good); }
.feedback.bad { background: var(--bad-soft); } .feedback.bad b { color: var(--bad); }
.flag { min-width: 48px; font-size: 1.3rem; padding: 6px 10px; }
.flag.on { color: var(--warn); }
.timer { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 1.2rem; }
.timer.low { color: var(--bad); }
.qgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 6px; }
.qgrid button { min-height: 44px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.qgrid button.done { background: var(--brand-soft); border-color: var(--brand); }
.qgrid button.marked { outline: 3px solid var(--warn); outline-offset: -3px; }
.review-row { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: .92rem; }
.review-row.ok span:first-child { color: var(--good); } .review-row.no span:first-child { color: var(--bad); }
details.review { border-bottom: 1px solid var(--border); padding: 8px 0; }
details.review summary { cursor: pointer; font-size: .95rem; }
details.review.ok summary span { color: var(--good); } details.review.no summary span { color: var(--bad); }
.steps { padding-left: 1.4em; } .steps li { margin: 2px 0; } .steps .check { margin: 0; }
/* Checkbox rows: the whole label is the tap target, at least 44px tall (padding instead of base.css's margin). */
.check { min-height: 44px; padding: 10px 0; margin: 0; }
/* Small inline links (job sign-up form): vertical padding on an inline box grows the tap area to 44px+ without moving the text. */
a.tap { padding: 12px 0; }
#pickerr:empty { min-height: 0; margin: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
fieldset.plain { border: 0; padding: 0; margin: 12px 0 0; } fieldset.plain legend { font-weight: 600; padding: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.error { color: var(--bad); font-weight: 600; min-height: 1.5em; margin: 8px 0; }
.offer .msg { white-space: pre-wrap; background: var(--surface-2); padding: 10px; border-radius: 10px; }
.jobs-cta { border-color: var(--brand); }
@media (max-width: 340px) { .row2 { grid-template-columns: 1fr; } .tiles { grid-template-columns: 1fr; } }
@media (min-width: 900px) { .tabbar { max-width: 760px; margin: 0 auto; border: 1px solid var(--border); border-bottom: 0; border-radius: 14px 14px 0 0; } }
/* Skills: critical steps (an optional `critical: true` on a step), the "need to practice" toggle, the timed skills test */
.pill.crit { background: transparent; color: var(--bad); border: 1.5px solid var(--bad); font-weight: 700; }
.drillbar { position: sticky; top: calc(61px + env(safe-area-inset-top)); z-index: 3; }
.drillbar .timer { font-size: 1.6rem; }
.timer.small { font-size: .95rem; }
.dskill { scroll-margin-top: 180px; }
.dskill.on { border-color: var(--brand); border-width: 2px; }
.drow { padding: 10px 0; border-bottom: 1px solid var(--border); }
.drow:last-of-type { border-bottom: 0; }
ul.plan { padding-left: 1.2em; margin: 0; } ul.plan li { margin: 6px 0; }
/* Fields base.css does not style */
input[type=date], input[type=search] { width: 100%; min-height: 48px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--field-border); background: var(--surface); color: var(--text); font: inherit; }
/* Practice length: three radio buttons that look like one segmented control */
.segs { display: flex; gap: 8px; margin-top: 6px; }
.segbtn { position: relative; flex: 1; margin: 0; font-weight: 600; }
.segbtn input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segbtn span { display: flex; align-items: center; justify-content: center; min-height: 44px; border: 2px solid var(--border); border-radius: 10px; cursor: pointer; }
.segbtn input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-text); }
.segbtn input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
/* Read aloud */
.speak { min-width: 44px; min-height: 44px; padding: 6px 10px; }
.speak svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.speak[aria-pressed=true] { border-color: var(--brand); color: var(--brand-text); background: var(--brand-soft); }
.speak[aria-pressed=true] svg path:first-child { fill: currentColor; }
/* Glossary words in question text, and their definition box */
.gl { display: inline; padding: 0; margin: 0; border: 0; background: none; color: inherit; font: inherit; text-align: inherit; cursor: pointer;
  text-decoration: underline dotted var(--brand); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.gl[aria-expanded=true] { background: var(--brand-soft); border-radius: 4px; }
.gl-sample { text-decoration: underline dotted var(--brand); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.glhost { position: relative; }
.glpop { position: absolute; left: 8px; right: 8px; z-index: 4; background: var(--surface); border: 2px solid var(--brand); border-radius: 12px; padding: 12px 14px; box-shadow: 0 6px 24px rgba(0, 0, 0, .18); font-size: 1rem; font-weight: 400; }
.glpop p { margin: 0 0 8px; }
.az { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 12px; }
.azl { min-width: 40px; min-height: 44px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.azl[disabled] { opacity: .35; cursor: default; }
.gterm { padding: 10px 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.gterm:last-child { border-bottom: 0; }
.gsec h2 { margin-bottom: 0; scroll-margin-top: 70px; }
/* Flashcards */
.boxes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 4px 0 12px; }
.box { display: flex; flex-direction: column; align-items: center; padding: 8px 0; border-radius: 10px; background: var(--surface-2); }
.fterm { font-size: 1.8rem; font-weight: 800; margin: 18px 0 10px; overflow-wrap: anywhere; }
.flash { min-height: 180px; }
