/* Learner-app styles. Anything reusable belongs in /kit, not here.
 * Drawn on the Claude Design canvas "Open Road Ready App" (approved 2026-10-22):
 * signs only where the learner decides, the calm open road everywhere else. Home is
 * a windshield onto the learner's own state; the menu is blue services signs; each
 * answer lights a traffic lamp; Progress is a dashboard; Family is a carpool lane. */

/* ---- the shell ------------------------------------------------------------ */
#shell { max-width: 1280px; }
.who-row { display: flex; align-items: center; gap: 12px; flex: none; }
.acct-btn {
  width: auto; min-height: 40px; margin: 0; padding: 2px 4px 2px 2px;
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--ink); font: 600 15px/1 var(--sign-face); border-radius: 999px;
}
.acct-btn svg { width: 32px; height: 32px; padding: 7px; flex: none; border-radius: 50%; background: var(--zone); }
.acct-btn:hover span, .acct-btn:focus-visible span { text-decoration: underline; text-underline-offset: 3px; }
/* The language control lives beside Account: present, never prominent. */
.lang-toggle {
  appearance: none; -webkit-appearance: none; width: auto; min-height: 36px;
  border: 0; box-shadow: none; background: transparent; color: var(--muted);
  font: 600 14px/1 var(--sign-face); padding: 4px 6px; cursor: pointer;
}
.lang-toggle:hover, .lang-toggle:focus-visible { color: var(--ink); }
/* Where else to find us: small grey marks beside Account, dark on hover. */
.socials { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.socials a { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--muted); }
.socials a:hover, .socials a:focus-visible { color: var(--ink); background: var(--zone); }
.socials svg { width: 16px; height: 16px; }
@media (max-width: 679px) {
  #state-plate > span { display: none; }       /* the shield says it; the name is on Account */
  .acct-btn span { display: none; }
  .bar .mark { font-size: 14px; padding: 0 10px; }
  .socials a { width: 36px; height: 36px; }
}
/* no room beside the brand below a laptop: the marks take a thin row of their own */
@media (max-width: 959px) {
  header.bar { flex-wrap: wrap; row-gap: 6px; }
  .socials { order: 3; width: 100%; justify-content: center; margin-left: 0; }
}
html.exam #nav, html.exam .socials { display: none !important; }

/* ---- the menu: blue services signs, the place you are in lit up ----------- */
#nav button {
  --c: transparent;
  width: auto; margin: 0; min-height: 0; padding: 6px 4px;
  display: inline-flex; align-items: center; gap: 5px;
  background: none; box-shadow: none; color: var(--muted);
  font: 600 11px/1.1 var(--sign-face); letter-spacing: .01em; border-radius: 12px;
}
#nav .svc {
  position: relative; display: grid; place-items: center; flex: none;
  width: 30px; height: 30px; border-radius: 7px;
  background: var(--info-soft); color: var(--info);
}
#nav .svc svg { width: 18px; height: 18px; }
#nav button[aria-current="page"] { color: var(--ink); font-weight: 700; }
#nav button[aria-current="page"] .svc {
  background: var(--info); color: #fff;
  box-shadow: inset 0 0 0 2.5px var(--info), inset 0 0 0 3.8px #fff, var(--glow) var(--info);
}
@media (hover: hover) {
  #nav button:hover:not([aria-current]) { color: var(--ink); transform: none; }
  #nav button:hover:not([aria-current]) .svc { background: color-mix(in srgb, var(--info) 22%, var(--info-soft)); }
}
/* phone: under the thumb */
@media (max-width: 679px) {
  body { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  #nav.nav:not(.hide) {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; margin: 0;
    display: flex; flex-wrap: nowrap; gap: 0;
    background: var(--bg); border-top: 1px solid var(--line);
    padding: 6px 2px calc(6px + env(safe-area-inset-bottom));
  }
  #nav button { flex: 1 1 0; min-width: 0; flex-direction: column; text-align: center; padding: 6px 0; letter-spacing: 0; font-size: clamp(10px, 2.9vw, 11px); }
  #nav button > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
/* tablet: a row of signs under the bar */
@media (min-width: 680px) and (max-width: 1023px) {
  #nav.nav:not(.hide) {
    display: flex; flex-wrap: wrap; gap: 2px; margin: 2px 0 var(--space-3);
    padding: 0 0 12px; border-bottom: 1px solid var(--line);
  }
  #nav button { padding: 6px 8px 6px 6px; gap: 7px; font-size: 13.5px; }
  #nav .svc { width: 26px; height: 26px; border-radius: 6px; }
  #nav .svc svg { width: 15px; height: 15px; }
  #nav button[aria-current="page"] { background: var(--zone); }
}
/* laptop: the route down the left */
@media (min-width: 1024px) {
  #shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); column-gap: 48px; align-items: start; }
  #shell > header.bar { grid-column: 1 / -1; grid-row: 1; padding: 16px 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
  #shell > section { grid-column: 2; grid-row: 2; min-width: 0; }
  #shell:has(> #nav.hide) > section { grid-column: 1 / -1; }
  #nav.nav:not(.hide) {
    grid-column: 1; grid-row: 2; position: sticky; top: 16px;
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
  }
  #nav button { justify-content: flex-start; gap: 12px; padding: 8px 10px; font-size: 15.5px; }
  #nav button[aria-current="page"] { background: var(--zone); }
}

/* ---- the road kit pieces this app draws ---------------------------------- */
.kicker { font: 700 11.5px/1 var(--sign-face); letter-spacing: .13em; text-transform: uppercase; }
/* traffic lamps: right, wrong, the one you are on, still to come */
.signal {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px;
  background: var(--housing); border-radius: 999px;
}
.signal i { width: 11px; height: 11px; flex: none; border-radius: 50%; background: var(--lamp-off); }
.signal i.g { background: var(--lamp-green); box-shadow: 0 0 7px 1px rgb(25 201 123 / .65); }
.signal i.r { background: var(--lamp-red); box-shadow: 0 0 7px 1px rgb(255 68 88 / .6); }
.signal i.a { background: var(--lamp-amber); box-shadow: 0 0 9px 2px rgb(255 194 26 / .7); }
.signal:empty { display: none; }
/* a sign button's arrow, drawn after its words */
button.go::after, #buy-family::after {
  content: ""; width: 20px; height: 18px; flex: none; background: currentColor;
  clip-path: polygon(0 38%, 58% 38%, 58% 6%, 100% 50%, 58% 94%, 58% 62%, 0 62%);
}
/* the white button that sits on a green sign */
button.ongreen { --c: #fff; --edge: var(--guide); color: var(--guide); }
html.exam button.go::after { display: none; }
/* small moves are words, not signs (:is() lends them its id weight, so a sign class on the button cannot win) */
:is(button.link, #route-skip, #flag, .review-item .report, .stop-skipped button,
    #progress-to-family, .family-leave, .family-revoke) {
  --c: transparent; width: auto; min-height: 44px; margin: 0; padding: 0;
  background: none; box-shadow: none; color: var(--ink);
  font: 600 15.5px/1.2 var(--read-face); text-decoration: underline;
  text-decoration-thickness: 1.5px; text-underline-offset: 4px;
}
@media (hover: hover) {
  :is(button.link, #route-skip, #flag, .review-item .report, .stop-skipped button,
      #progress-to-family, .family-leave, .family-revoke):hover { color: var(--guide-ink); transform: none; }
}

/* ---- sign in: welcomed by your state ------------------------------------ */
#v-signin .mast { display: flex; flex-direction: column; gap: 0; margin: 0; }
#v-signin .mast > div { order: 2; }
#v-signin figure.welcome {
  order: 1; position: relative; max-width: none; height: 270px; margin: 4px 0 var(--space-3);
  border-radius: var(--radius-lg); overflow: hidden; border-top: 5px solid var(--state-accent);
}
#v-signin figure.welcome img { height: 100%; max-height: none; object-position: 50% 70%; transform: scale(1.17); }   /* past the picture's own pale frame */
.welcome-sign {
  position: absolute; left: 16px; right: 16px; top: 18px; z-index: 1;
  display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  background: var(--guide); color: #fff; border-radius: 13px;
  box-shadow: inset 0 0 0 4.5px var(--guide), inset 0 0 0 7px #fff, var(--glow) var(--guide);
}
.welcome-sign:has(#welcome-code:empty) { display: none; }
.welcome-sign b {
  flex: none; display: grid; place-items: center; width: 46px; height: 51px; padding-bottom: 11px;
  background: var(--state-accent); color: var(--state-accent-ink);
  font: 800 16px/1 var(--sign-face); letter-spacing: .02em;
  clip-path: path("M0 0H46V27.5C46 40.4 35.4 47.2 23 51 10.6 47.2 0 40.4 0 27.5Z");
}
.welcome-sign > span { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.welcome-sign .kicker { color: rgb(255 255 255 / .85); }
.welcome-sign strong { font: 700 27px/1 var(--sign-face); letter-spacing: -.01em; }
.welcome-sign em { font: 600 14.5px/1.25 var(--sign-face); font-style: normal; color: rgb(255 255 255 / .88); }
.signin-fields { max-width: 36rem; }
.signin-fields .date-field { margin-top: 0; }
.signin-fields .legal { margin-top: var(--space-4); }
@media (min-width: 1024px) {
  #v-signin { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); column-gap: 64px; align-items: start; }
  #v-signin .mast { display: contents; }
  #v-signin .mast > div { grid-column: 1; grid-row: 1; padding-top: 24px; }
  #v-signin .signin-fields { grid-column: 1; grid-row: 2; }
  #v-signin figure.welcome { grid-column: 2; grid-row: 1 / span 3; height: 640px; margin: 0; position: sticky; top: 24px; }
  .welcome-sign { left: 40px; right: auto; top: 56px; padding: 22px 28px; gap: 18px; }
  .welcome-sign b { width: 58px; height: 64px; padding-bottom: 14px; font-size: 20px;
    clip-path: path("M0 0H58V34.6C58 50.9 44.6 59.5 29 64 13.4 59.5 0 50.9 0 34.6Z"); }
  .welcome-sign strong { font-size: 38px; }
}

/* ---- home ------------------------------------------------------------------ */
.home-head h1 { margin-top: var(--space-2); }
.home-head .lede { margin-bottom: var(--space-3); }
.home-pick { margin: 0; }
.home-pick select:not(.hide) {
  display: inline-block; height: 32px; min-height: 0; padding: 0 30px 0 12px; margin: 0;
  border-radius: 999px; background: var(--zone) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%234b5661' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 11px center / 11px no-repeat;
  color: var(--ink); font: 700 13.5px/1 var(--sign-face);
}
/* today's free test, as an amber plate */
.budget {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; margin: 0 0 var(--space-3);
  padding: 0 11px; border-radius: 8px; background: var(--warn); color: #14191e;
  font: 700 13.5px/1 var(--sign-face);
}
.budget::before { content: ""; width: 10px; height: 10px; border: 2.4px solid currentColor; border-radius: 2px; transform: rotate(45deg); }

/* the windshield: your own state's road, the next step hung over it */
.route { margin: var(--space-2) 0 var(--space-4); }
.windshield {
  position: relative; height: 300px; margin: 0 -20px; overflow: hidden; background: var(--zone);
}
.windshield .ws-art { width: 100%; height: 100%; object-fit: cover; object-position: 50% 68%; display: block; }
.gantry {
  position: absolute; left: -10px; right: -10px; top: 18px; height: 13px;
  background:
    linear-gradient(#8e99a3, #8e99a3) 0 0 / 100% 2px no-repeat,
    linear-gradient(#8e99a3, #8e99a3) 0 100% / 100% 2px no-repeat,
    repeating-linear-gradient(60deg, transparent 0 7px, #8e99a3 7px 8.6px, transparent 8.6px 14px);
}
.gantry::before, .gantry::after {
  content: ""; position: absolute; top: 13px; width: 4px; height: 26px; background: #8e99a3; border-radius: 1px;
}
.gantry::before { left: 22%; } .gantry::after { left: 54%; }
.overhead {
  position: absolute; z-index: 1; left: 24px; right: 24px; top: 56px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 18px 20px 18px 22px; border-radius: 14px;
  background: var(--guide); color: #fff;
  box-shadow: inset 0 0 0 5px var(--guide), inset 0 0 0 8px #fff, var(--glow) var(--guide);
}
.overhead .tab {
  position: absolute; right: 22px; bottom: calc(100% - 3px); height: 31px; padding: 0 12px;
  display: inline-flex; align-items: center; border-radius: 9px;
  background: var(--guide); color: #fff; font: 800 12.5px/1 var(--sign-face); letter-spacing: .1em; text-transform: uppercase;
  box-shadow: inset 0 0 0 4px var(--guide), inset 0 0 0 6.5px #fff;
}
.overhead .kicker { color: rgb(255 255 255 / .82); }
.overhead .legend { font: 700 27px/1.02 var(--sign-face); letter-spacing: -.01em; padding-right: 54px; }
.overhead .sub { font: 600 14px/1 var(--sign-face); color: rgb(255 255 255 / .85); }
.overhead::after {   /* the exit arrow */
  content: ""; position: absolute; right: 20px; top: 26px; width: 40px; height: 40px; background: #fff;
  clip-path: polygon(0 38%, 58% 38%, 58% 6%, 100% 50%, 58% 94%, 58% 62%, 0 62%);
  transform: rotate(-45deg);
}
.overhead #route-go { margin-top: 8px; min-height: 46px; min-width: 0; padding: 8px 16px; font-size: 16px; }
.stop-now { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin: var(--space-3) 0 0; }
.stop-now p { margin: 0; color: var(--muted); }

/* your road: the stops as route shields on a road drawn through them */
.road { position: relative; margin-top: var(--space-4); }
.route-head { margin: 0 0 var(--space-2); font: 700 var(--step-2)/1.15 var(--sign-face); letter-spacing: -.015em; }
.road-line { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.road-line path { fill: none; }
.road-line .asphalt { stroke: var(--road); stroke-width: 30; stroke-linecap: round; }
.road-line .travelled { stroke: var(--guide); stroke-opacity: .2; stroke-width: 30; stroke-linecap: round; }
.road-line .centre { stroke: var(--road-line); stroke-width: 2.4; stroke-dasharray: 7 8; }
.route-stops { list-style: none; margin: 0; padding: 0; position: relative; z-index: 1; }
.stop { position: relative; }
.stop-row {
  --c: transparent;
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center;
  gap: var(--space-3); width: 100%; min-height: 64px; margin: 0; padding: 6px 0;
  background: none; color: var(--ink); text-align: left;
  font: 600 16.5px/1.25 var(--sign-face); letter-spacing: -.005em;
}
.stop-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.stop .here { font: 700 11.5px/1 var(--sign-face); letter-spacing: .13em; text-transform: uppercase; color: var(--state-accent); }
.stop-mark {
  position: relative; isolation: isolate; justify-self: center;
  display: grid; place-items: center; width: 30px; height: 33px; padding-bottom: 6px;
  font: 800 12px/1 var(--sign-face); color: var(--muted);
  background: var(--line-2);
  clip-path: path("M0 0H30V17.5C30 25.9 23 30.5 15 33 7 30.5 0 25.9 0 17.5Z");
}
.stop-mark::before {
  content: ""; position: absolute; inset: 2px; z-index: -1; background: var(--bg);
  clip-path: path("M0 0H26V15.4C26 22.6 20 26.6 13 28.8 6 26.6 0 22.6 0 15.4Z");
}
.stop:nth-child(even) .stop-mark { transform: translateX(12px); }
.stop.done .stop-mark { background: var(--guide); color: #fff; }
.stop.done .stop-mark::before { inset: 2.5px; background: #fff; }
.stop.done .stop-mark::after {
  content: ""; position: absolute; inset: 4px; z-index: -1; background: var(--guide);
  clip-path: path("M0 0H22V13C22 19.2 17 22.6 11 24.4 5 22.6 0 19.2 0 13Z");
}
.stop.now .stop-mark {
  width: 40px; height: 44px; padding-bottom: 8px; font-size: 16px; color: var(--state-accent-ink);
  background: var(--state-accent);
  clip-path: path("M0 0H40V23.4C40 34.5 30.6 40.6 20 44 9.4 40.6 0 34.5 0 23.4Z");
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--state-accent) 16%, transparent);
}
.stop.now .stop-mark::before {
  inset: 3px; background: var(--state-accent-ink);
  clip-path: path("M0 0H34V20C34 29.4 26 34.6 17 37.4 8 34.6 0 29.4 0 20Z");
}
.stop.now .stop-mark::after {
  content: ""; position: absolute; inset: 5px; z-index: -1; background: var(--state-accent);
  clip-path: path("M0 0H30V17.6C30 25.9 23 30.5 15 33 7 30.5 0 25.9 0 17.6Z");
}
.stop.now .stop-title { font-weight: 700; font-size: 18px; }
.stop.done .stop-title, .stop.skipped .stop-title { color: var(--faint); }
.stop-count { color: var(--faint); font: 700 14px/1 var(--sign-face); }
.stop:last-child .stop-mark { background: var(--ink); color: var(--bg); }
.stop:last-child .stop-mark::before { display: none; }
.stop-skipped { margin: -6px 0 6px 68px; }
@media (min-width: 680px) {
  .windshield { margin: 0; border-radius: 22px; }
}
@media (min-width: 1024px) {
  #home-route:not(.hide) {
    display: grid; grid-template-columns: minmax(300px, .9fr) minmax(0, 1.25fr);
    column-gap: 48px; align-items: start;
  }
  #home-route .ahead { grid-column: 2; grid-row: 1; }
  #home-route .windshield { height: 340px; margin: 0; border-radius: 24px; }
  #home-route .road { grid-column: 1; grid-row: 1; margin-top: 0; }
  .overhead { left: 40px; right: auto; width: min(460px, calc(100% - 80px)); top: 64px; }
  .overhead .legend { font-size: 32px; }
}

/* the ways to practise: a window onto your state, a little sign for what it is */
.chooser {
  display: grid; grid-template-columns: 1fr 1fr; gap: 22px 14px;
  margin: 0 0 var(--space-4);
}
.chooser .featured { grid-column: 1 / -1; }
.chooser.drills { margin-top: var(--space-2); }
button.scene {
  --c: transparent;
  position: relative; display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 10px;
  width: 100%; min-height: 0; margin: 0; padding: 0; overflow: visible;
  text-align: left; color: var(--ink); background: none;
  font: 400 15px/1.35 var(--read-face);
}
.scene-art {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover;
  border-radius: 16px; background: var(--zone);
}
.scene.featured .scene-art { aspect-ratio: 16 / 9; object-position: center 38%; }
.scene[data-kind="ultimate"] .scene-art { object-position: center 72%; }
.scene[data-kind="quick"] .scene-art { object-position: center 82%; }
.scene[data-kind="signs"] .scene-art { object-position: center 40%; }
.scene[data-kind="numbers"] .scene-art { object-position: center 58%; }
.scene[data-kind="weak"] .scene-art { object-position: center 78%; }
.scene[data-kind="misses"] .scene-art { object-position: center 62%; }
.tile-sign { position: absolute; left: 12px; top: 12px; width: 44px; height: 44px; filter: drop-shadow(0 3px 7px rgb(0 0 0 / .2)); }
.scene-copy { display: flex; flex-direction: column; gap: 3px; }
.scene-copy strong { font: 700 17px/1.2 var(--sign-face); letter-spacing: -.01em; }
.scene.featured .scene-copy strong { font-size: 20px; }
.scene-copy .sub, .scene-copy .fact { font-size: 14.5px; line-height: 1.4; color: var(--muted); }
.scene-copy .fact { color: var(--faint); }
.drill-head { margin: var(--space-2) 0 var(--space-3); font: 700 11.5px/1 var(--sign-face); letter-spacing: .13em; text-transform: uppercase; }
@media (max-width: 679px) {
  .scene:not(.featured):not(.exam) .fact, .scene:not(.featured):not(.exam) .sub { display: none; }
}
@media (hover: hover) {
  button.scene:hover { transform: none; }
  button.scene:hover .scene-art { outline: 3px solid var(--state-accent); outline-offset: 3px; }
}
button.scene.exam {
  display: grid; grid-template-columns: 1fr; gap: 0; overflow: hidden; margin: 0 0 var(--space-4);
  background: #10161c; color: #fff; border-radius: 22px;
}
button.scene.exam .scene-art { border-radius: 0; aspect-ratio: 16 / 9; }
button.scene.exam .scene-copy { padding: 18px 64px 20px 20px; }
button.scene.exam .scene-copy strong { font-size: 20px; }
button.scene.exam .scene-copy .sub { color: #dfe6eb; }
button.scene.exam .scene-copy .fact { color: #9aa7b2; }
button.scene.exam .go-arrow { position: absolute; right: 20px; bottom: 26px; width: 28px; height: 28px; color: #fff; }
#real-head { margin-top: var(--space-5); }
#real-head + .lede { margin-bottom: var(--space-3); }
@media (min-width: 680px) {
  .chooser { grid-template-columns: repeat(3, 1fr); gap: 26px 18px; }
  .chooser .featured { grid-column: 1 / -1; }
  .chooser.drills { grid-template-columns: repeat(5, 1fr); }
  button.scene.exam { grid-template-columns: 1.15fr 1fr; align-items: center; }
  button.scene.exam .scene-art { height: 100%; aspect-ratio: auto; min-height: 230px; }
}
@media (min-width: 1024px) {
  .chooser { grid-template-columns: 1.5fr 1fr 1fr; }
  .chooser .featured { grid-column: auto; grid-row: span 1; }
  .chooser.drills { grid-template-columns: repeat(5, 1fr); }
}

/* the sample tests: numbered like exits; green is a pass */
#tests-head { margin-top: var(--space-5); }
.papers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: var(--space-3); }
@media (min-width: 680px) { .papers { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .papers { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.paper {
  --c: transparent;
  position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 8px;
  width: 100%; margin: 0; padding: 12px 12px 12px; cursor: pointer; text-align: left;
  background: var(--card); color: var(--ink); border-radius: 12px;
  box-shadow: inset 0 0 0 1.5px var(--line-2);
  font: 400 13px/1.3 var(--read-face);
}
.paper.new { box-shadow: none; background-image: none;
  outline: 1.5px dashed var(--line-2); outline-offset: -1.5px; }
.paper.pass {
  background: var(--guide); color: #fff;
  box-shadow: inset 0 0 0 3px var(--guide), inset 0 0 0 4.5px #fff, var(--glow) var(--guide);
}
.paper.open { box-shadow: inset 0 0 0 2px var(--warn); }
.paper-head { display: flex; flex-direction: column; gap: 4px; }
.paper-n { font: 800 18px/1 var(--sign-face); letter-spacing: -.01em; }
.paper-tag { font: 700 11px/1 var(--sign-face); letter-spacing: .08em; color: var(--faint); }
.paper.pass .paper-tag { color: rgb(255 255 255 / .85); }
.paper.fail .paper-tag { color: var(--wrong); }
.paper.open .paper-tag { color: var(--pending); }
.paper-foot { color: var(--faint); font-size: 12px; }
.paper.pass .paper-foot, .paper.pass .tally .t { color: rgb(255 255 255 / .85); }
.ring { position: relative; width: 62px; height: 62px; margin: 0; }
.ring svg { width: 62px; height: 62px; transform: rotate(-90deg); }
.ring .seg { fill: none; stroke-width: 3.6; }
.ring .track { stroke: var(--road); }
.ring .seg.right { stroke: var(--guide); stroke-linecap: butt; }
.ring .seg.wrong { stroke: var(--stop); stroke-linecap: butt; }
.paper.pass .ring .track { stroke: rgb(255 255 255 / .22); }
.paper.pass .ring .seg.right { stroke: #fff; }
.paper.pass .ring .seg.wrong { stroke: #ffb3bd; }
.ring-mid { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; line-height: 1.05; }
.ring-mid b { font: 800 15px/1 var(--sign-face); }
.ring-mid i { font-style: normal; font-size: 9.5px; color: var(--faint); }
.paper.pass .ring-mid i { color: rgb(255 255 255 / .8); }
.paper.new .ring-mid b { color: var(--faint); }
.tally { display: flex; flex-wrap: wrap; gap: 2px 8px; font-size: 11.5px; }
.tally .t { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.tally .t::before { content: ""; width: 7px; height: 7px; border-radius: 99px; background: currentColor; }
.tally .t.right { color: var(--right); }
.tally .t.wrong { color: var(--wrong); }
.paper.pass .tally .t::before { background: #fff; }
#tests-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: var(--space-3); }
#tests-stats orr-stat { padding: 12px 12px 11px; border-radius: 14px; }
#tests-stats .stat-value { font-size: 21px; }
#tests-stats .stat-label { font-size: 12px; margin-top: 5px; }
.tests-foot { margin-top: var(--space-3); flex-wrap: wrap; gap: var(--space-2); justify-content: flex-start; }
#signout { margin-top: var(--space-5); }
@media (min-width: 680px) {
  #tests-stats { gap: var(--space-3); }
  #tests-stats .stat-value { font-size: 27px; }
  #tests-stats .stat-label { font-size: 14px; }
}

/* ---- a question --------------------------------------------------------- */
#v-quiz { max-width: 760px; width: 100%; margin: 0 auto; }
.quiz-top { display: flex; align-items: center; gap: 12px; margin: var(--space-2) 0 var(--space-3); }
.quiz-top .lamps { flex: 1 1 auto; justify-content: space-between; max-width: 100%; overflow: hidden; }
.quiz-top .lamps:empty { flex: 1 1 auto; visibility: hidden; display: inline-flex; }
#progress-count { margin-left: auto; font: 800 16px/1 var(--sign-face); color: var(--ink); white-space: nowrap; }
.q { margin: var(--space-3) 0 var(--space-4); font: 600 20px/1.42 var(--read-face); letter-spacing: -.005em; }
/* the sign stands at the roadside, on its post */
#device-wrap.device {
  position: relative; display: flex; justify-content: center; height: 250px; margin: 0;
  padding-top: 26px; overflow: hidden; border-radius: 22px; background: var(--zone);
}
#device-wrap.device::after {
  content: ""; position: absolute; left: 50%; top: 110px; bottom: 0; width: 9px; margin-left: -4.5px;
  background: linear-gradient(90deg, #8e99a3, #b9c2c9 45%, #8e99a3); border-radius: 2px;
}
#device-wrap.device img {
  position: relative; z-index: 1; width: 160px; max-width: 70%; height: 160px; object-fit: contain;
  filter: drop-shadow(0 6px 10px rgb(20 25 30 / .12));
}
html.exam #device-wrap.device { background: none; height: auto; padding-top: 0; }
html.exam #device-wrap.device::after { display: none; }
html.exam #device-wrap.device img { filter: none; }
.miss-note {
  margin: var(--space-3) 0 0; padding: 12px 14px; border-radius: 12px; font-size: 15px;
  background: var(--zone); color: var(--muted);
}
.quiz-stage.has-figure .figure { margin: 0 0 var(--space-3); max-width: none; }
@media (min-width: 1024px) {
  #v-quiz:has(.quiz-stage.has-figure) { max-width: 1120px; }
  .quiz-stage.has-figure { display: grid; grid-template-columns: minmax(240px, 42%) 1fr; gap: var(--space-4); align-items: start; }
  .quiz-stage.has-figure .figure { margin: 0; position: sticky; top: var(--space-3); }
}
#quiz-foot { margin-top: var(--space-4); gap: var(--space-2); }
#quiz-foot #next, #quiz-foot #submit { margin-left: auto; min-width: 128px; min-height: 52px; padding: 10px 22px; font-size: 17px; }
#flag { color: var(--muted); font-size: 15px; gap: 7px; }
#flag::before {
  content: ""; width: 15px; height: 16px; background: currentColor; flex: none;
  clip-path: polygon(0 0, 14% 0, 14% 6%, 100% 6%, 80% 32%, 100% 58%, 14% 58%, 14% 100%, 0 100%);
}
/* the exam: stark, as the booth is */
.exam-bar { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 var(--space-2); font: 700 15px/1.3 var(--sign-face); color: var(--ink); }
.exam-bar #exam-part:not(:empty)::after { content: " ·"; color: var(--faint); }
.exam-bar #time-left { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.exam-bar .track { flex: 1 0 100%; height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; }
.exam-bar #track-fill { height: 100%; width: 0%; background: var(--ink); }
.exam-bar.spent #track-fill { background: var(--wrong); }
html.exam .quiz-top .chip { background: none; color: var(--muted); padding: 0; }
html.exam .opt.chosen { box-shadow: inset 0 0 0 2.5px var(--ink); }
html.exam #submit { --c: var(--ink); --edge: var(--ink); color: var(--bg); background: var(--ink); box-shadow: none; border-radius: 12px; }
/* keep going: an odometer of the run, and a stop sign to end it */
.ult-bar { display: flex; align-items: center; gap: var(--space-3); margin: 0 0 var(--space-3); padding: 12px 14px; border-radius: 16px; background: var(--zone); }
.ult-bar.hide { display: none; }
.ult-bar .ring, .ult-bar .ring svg { width: 60px; height: 60px; }
.ult-bar .ring-mid b { font-size: 14px; }
.ult-mid { display: flex; flex-direction: column; gap: 4px; }
#ult-done { font: 800 19px/1.1 var(--sign-face); }
#ult-stop { margin-left: auto; gap: 8px; }
#ult-stop::before { content: ""; width: 15px; height: 15px; flex: none; background: var(--stop);
  clip-path: polygon(29% 0, 71% 0, 100% 29%, 100% 71%, 71% 100%, 29% 100%, 0 71%, 0 29%); }

/* ---- the result: one sign, by how it went ------------------------------- */
.result-top { display: grid; gap: var(--space-3); margin: var(--space-2) 0 var(--space-3); }
.result-sign {
  position: relative; display: flex; flex-direction: column; gap: 6px;
  padding: 22px 22px 20px; border-radius: 16px; background: var(--zone);
}
.result-sign h1 { margin: 0; font-size: 24px; }
.result-sign orr-stat { background: none; padding: 0; }
.result-sign .stat-value { font-size: 64px; }
.result-sign .stat-label { font-size: 15px; }
.result-icon { display: none; }
#v-result[data-outcome="pass"] .result-sign, #v-result[data-outcome="clean"] .result-sign {
  background: var(--guide); color: #fff; padding-right: 76px;
  box-shadow: inset 0 0 0 5px var(--guide), inset 0 0 0 8px #fff, var(--glow) var(--guide);
}
#v-result:is([data-outcome="pass"], [data-outcome="clean"]) .stat-label { color: rgb(255 255 255 / .85); }
#v-result:is([data-outcome="pass"], [data-outcome="clean"]) .result-icon {
  display: block; position: absolute; right: 22px; top: 26px; width: 44px; height: 44px; background: #fff;
  clip-path: polygon(0 38%, 58% 38%, 58% 6%, 100% 50%, 58% 94%, 58% 62%, 0 62%); transform: rotate(-45deg);
}
#v-result:is([data-outcome="short"], [data-outcome="stopped"]) .result-sign { padding-left: 108px; min-height: 124px; justify-content: center; }
#v-result:is([data-outcome="short"], [data-outcome="stopped"]) .result-icon {
  display: block; position: absolute; left: 22px; top: 50%; width: 68px; height: 68px; margin-top: -34px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80'%3E%3Cpath d='M40 3 77 40 40 77 3 40z' fill='%23ffc21a' stroke='%23ffc21a' stroke-width='5' stroke-linejoin='round'/%3E%3Cpath d='M40 10.5 69.5 40 40 69.5 10.5 40z' fill='none' stroke='%2314191e' stroke-width='3' stroke-linejoin='round'/%3E%3Cpath d='M40 26v18' stroke='%2314191e' stroke-width='6' stroke-linecap='round'/%3E%3Ccircle cx='40' cy='54' r='3.6' fill='%2314191e'/%3E%3C/svg%3E") center / contain no-repeat;
}
#v-result[data-outcome="stopped"] .result-icon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80'%3E%3Cpath d='M23.4 2h33.2L78 23.4v33.2L56.6 78H23.4L2 56.6V23.4z' fill='%23c8102e'/%3E%3Cpath d='M25.5 7.5h29L72.5 25.5v29l-18 18h-29l-18-18v-29z' fill='none' stroke='%23fff' stroke-width='2.6'/%3E%3Cpath d='M27 40h26' stroke='%23fff' stroke-width='7' stroke-linecap='round'/%3E%3C/svg%3E"); }
figure#result-frame { max-width: none; margin: 0; border-radius: 16px; aspect-ratio: 16 / 9; }
figure#result-frame img { height: 100%; max-height: none; }
@media (min-width: 680px) {
  .result-top { grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); align-items: stretch; }
  figure#result-frame { aspect-ratio: auto; min-height: 200px; }
}
#v-result .menu { margin-top: var(--space-3); }
#v-result .menu button { margin-top: var(--space-2); }

/* every question, explained: a lamp down the side says how it went */
#review-list { display: flex; flex-direction: column; gap: var(--space-3); margin-top: var(--space-3); }
.review-item {
  --lamp: var(--lamp-off);
  position: relative; padding: 16px 16px 16px 46px; border-radius: 16px;
  background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line);
}
.review-item::before {
  content: ""; position: absolute; left: 14px; top: 16px; width: 18px; height: 46px; border-radius: 7px;
  background:
    radial-gradient(circle at 50% 9px, var(--top, var(--lamp-off)) 0 4.4px, transparent 4.8px),
    radial-gradient(circle at 50% 23px, var(--mid, var(--lamp-off)) 0 4.4px, transparent 4.8px),
    radial-gradient(circle at 50% 37px, var(--low, var(--lamp-off)) 0 4.4px, transparent 4.8px),
    var(--housing);
}
.review-item.right { --low: var(--lamp-green); }
.review-item.wrong { --top: var(--lamp-red); }
.review-item.skip { --mid: var(--lamp-amber); }
.review-item .review-tags { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.review-item .review-mark { color: #fff; }
.review-item.right .review-mark { background: var(--guide); }
.review-item.wrong .review-mark { background: var(--stop); }
.review-item.skip .review-mark { background: var(--warn); color: #14191e; }
.review-item .q { margin: var(--space-2) 0; font-size: 17.5px; }
.review-item figure.device { margin: var(--space-2) 0; text-align: left; }
.review-item figure.device img { width: 96px; }
.review-item .figure-thumb { margin: var(--space-2) 0; }
.review-opts { list-style: none; margin: 0; padding: 0; }
.review-opts li { margin-top: 6px; padding: 9px 12px; border-radius: 10px; box-shadow: inset 0 0 0 1.5px var(--line); }
.review-opts li.key { box-shadow: none; background: var(--guide); color: #fff; font-weight: 600; }
.review-opts li.picked:not(.key) { box-shadow: inset 0 0 0 2px var(--wrong); color: var(--wrong); }
#review .review-item .report { margin-top: var(--space-2); font-size: 14.5px; color: var(--muted); }

/* ---- the study book --------------------------------------------------- */
.study-stage { display: grid; gap: var(--space-4); }
.study-topics { display: flex; flex-direction: column; gap: var(--space-2); }
.study-index { padding: 0; }
.study-jump { display: block; margin: 0 0 var(--space-2); }
.study-jump select { margin-top: 6px; }
.study-toc { display: none; counter-reset: ch; }
.study-toc, .study-toc ul { list-style: none; margin: 0; padding: 0; }
.study-toc > li { counter-increment: ch; margin: 0 0 var(--space-3); }
.toc-ch { display: flex; align-items: center; gap: 10px; font: 700 15px/1.25 var(--sign-face); }
.toc-ch::before {   /* each chapter a mile marker */
  content: counter(ch); flex: none; display: grid; place-items: center; width: 30px; height: 38px;
  border-radius: 5px; background: var(--guide); color: #fff; font: 800 15px/1 var(--sign-face);
  box-shadow: inset 0 0 0 2.5px var(--guide), inset 0 0 0 4px #fff;
}
.toc-ch:not(.done)::before { background: var(--zone); color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.toc-sec {
  --c: transparent;
  display: flex; align-items: center; gap: 8px; width: 100%; margin: 2px 0 0; min-height: 36px;
  padding: 6px 10px 6px 40px; text-align: left; background: transparent; color: var(--ink);
  font: 500 14.5px/1.3 var(--read-face); border-radius: 9px;
}
.toc-sec.done { color: var(--faint); }
.toc-sec.here { background: var(--zone); color: var(--ink); font-weight: 700; }
.toc-check { order: 2; margin-left: auto; flex: 0 0 18px; width: 18px; text-align: center; color: var(--guide-ink); font-weight: 800; line-height: 1; }
.study-page { padding: 0; }
.study-page h1 { margin-top: var(--space-2); font-size: clamp(30px, 5vw, 44px); }
.study-page > p:not(.chip) { max-width: var(--reading); font-size: 18px; line-height: 1.68; }
.study-page .row { justify-content: flex-start; flex-wrap: wrap; }
.study-page #study-next { min-width: 140px; }
@media (min-width: 1024px) {
  .study-stage { grid-template-columns: 280px 1fr; align-items: start; gap: 48px; }
  .study-topics { position: sticky; top: var(--space-3); max-height: calc(100vh - var(--space-3) - 80px); }
  .study-index { overflow: auto; flex: 1 1 auto; min-height: 0; padding-bottom: 76px; }
  .study-jump { display: none; }
  .study-toc { display: block; }
  #v-study #study-meter.float-meter { position: fixed; transform: none; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
}

/* the meters: how far along, as a short stretch of road */
.float-meter {
  position: fixed; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%); z-index: 5;
  width: min(calc(100% - 32px), 720px);
  background: var(--card); border-radius: 14px; padding: 10px 14px 12px;
  box-shadow: inset 0 0 0 1.5px var(--line), 0 12px 30px -16px rgb(20 25 30 / .3);
}
@media (min-width: 680px) { .float-meter { bottom: calc(14px + env(safe-area-inset-bottom, 0px)); } }
.meter-row { display: flex; justify-content: space-between; font: 700 13.5px/1 var(--sign-face); color: var(--muted); }
.bar-track { position: relative; height: 12px; margin-top: 8px; border-radius: 6px; background: var(--road); overflow: hidden; }
.bar-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: var(--guide); }
.bar-track::after {
  content: ""; position: absolute; left: 6px; right: 6px; top: 5px; height: 2px;
  background: repeating-linear-gradient(90deg, rgb(255 255 255 / .9) 0 8px, transparent 8px 16px);
}
#v-study:not(.hide), #v-signs:not(.hide), #v-numbers:not(.hide), #v-markings:not(.hide) { padding-bottom: 110px; }
@media (min-width: 1024px) { #v-study:not(.hide) { padding-bottom: 0; } }

/* ---- road markings: a drawing, its name, and whether you may cross it ---- */
.mark-key {
  position: relative; margin: var(--space-3) 0; padding: 20px 22px 18px;
  background: var(--plate); color: var(--plate-ink); border-radius: 12px;
  box-shadow: inset 0 0 0 4px var(--plate), inset 0 0 0 6.5px var(--plate-ink), 0 0 0 1px var(--line-2);
}
.mark-key:empty { display: none; }
.mark-key h2 { margin: 0 0 var(--space-2); font: 700 12px/1 var(--sign-face); letter-spacing: .13em; text-transform: uppercase; }
.mark-key ul { margin: 0; padding-left: 1.1em; }
.mark-key li { margin: 5px 0; }
.mark-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: var(--space-3);
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.mark-card {
  --c: transparent;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 8px;
  width: 100%; height: 100%; margin: 0; padding: 0 0 12px; overflow: hidden;
  background: var(--card); color: inherit; text-align: left; cursor: pointer;
  border-radius: 16px; box-shadow: inset 0 0 0 1.5px var(--line);
  font: 400 14px/1.3 var(--read-face);
}
.mark-card.seen { box-shadow: inset 0 0 0 2px var(--guide); }
.mark-card img { display: block; width: 100%; height: auto; }
.mark-hero { display: block; width: 100%; max-width: 420px; height: auto; margin: 0 auto var(--space-3); border-radius: 14px; }
.mark-name { font: 700 14.5px/1.3 var(--sign-face); padding: 0 12px; }
.mark-cross { display: inline-flex; align-items: center; height: 26px; margin: 0 12px; padding: 0 9px;
  border-radius: 7px; font: 700 12.5px/1 var(--sign-face); background: var(--zone); color: var(--ink); }
.mark-cross.yes { background: var(--guide); color: #fff; }
.mark-cross.no { background: var(--stop); color: #fff; }
.mark-cross.turn { background: var(--warn); color: #14191e; }
#marking-dialog-body .mark-cross { margin: 0 0 var(--space-2); font-size: 13px; }

/* ---- numbers: each one on its own plaque -------------------------------- */
.num-fam { margin-top: var(--space-4); }
.num-fam h2 { margin: 0 0 var(--space-1); }
.num-fam .lede { margin: 0 0 var(--space-3); }
.num-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.num-card {
  --c: var(--plate);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  width: 100%; height: 100%; min-height: 168px; margin: 0; padding: 18px 12px 16px;
  text-align: center; cursor: pointer; color: var(--plate-ink);
  background: var(--plate); border-radius: 12px;
  box-shadow: inset 0 0 0 4px var(--plate), inset 0 0 0 6.5px var(--plate-ink), 0 0 0 1px var(--line-2);
  font: 400 13px/1.3 var(--read-face);
}
.num-card.seen { box-shadow: inset 0 0 0 4px var(--plate), inset 0 0 0 6.5px var(--plate-ink), 0 0 0 3px var(--guide); }
.num-value { order: 1; font: 800 46px/1 var(--sign-face); letter-spacing: -.03em; color: var(--plate-ink); }
.num-unit { order: 2; font: 700 11px/1 var(--sign-face); letter-spacing: .12em; text-transform: uppercase; color: #4b5661; }
.num-prompt { order: 0; color: #4b5661; font: 700 11px/1.3 var(--sign-face); letter-spacing: .06em; margin-bottom: 4px; }
.num-hero {
  display: flex; flex-direction: column; align-items: center; width: fit-content; min-width: 180px; margin: 0 auto var(--space-3);
  padding: 20px 26px 18px; background: var(--plate); color: var(--plate-ink); border-radius: 14px;
  box-shadow: inset 0 0 0 5px var(--plate), inset 0 0 0 8px var(--plate-ink), 0 0 0 1px var(--line-2);
  font: 800 clamp(48px, 9vw, 72px)/1 var(--sign-face); letter-spacing: -.03em;
}
.num-hero span { display: block; margin-top: 6px; font: 700 13px/1 var(--sign-face); letter-spacing: .12em; text-transform: uppercase; color: #4b5661; }
.num-mix { color: var(--muted); }
.num-mix b { color: var(--ink); font-weight: 700; }

/* ---- signs: the shapes and colours, then every face ---------------------- */
.sign-system { margin: var(--space-4) 0; }
.sign-system h2 { margin-bottom: var(--space-2); }
.sign-system h3 { margin: var(--space-4) 0 var(--space-2); font-size: var(--step-1); }
.shape-grid, .type-row { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 680px) {
  .shape-grid { grid-template-columns: 1fr 1fr; }
  .type-row { grid-template-columns: 1fr 1fr 1fr; }
}
.shape-card, .type-chip {
  --c: transparent;
  display: flex; gap: 14px; align-items: flex-start; justify-content: flex-start;
  width: 100%; margin: 0; min-height: 0; padding: 14px;
  background: var(--zone); border-radius: 14px; color: inherit;
  text-align: left; cursor: pointer; font: 400 15px/1.35 var(--read-face);
}
.shape-card.seen, .type-chip.seen { box-shadow: inset 0 0 0 2px var(--guide); }
.shape-card p, .type-chip p { margin: 3px 0 0; font-size: 14px; color: var(--muted); }
.shape-card strong, .type-chip strong { font: 700 15px/1.2 var(--sign-face); }
.arming {
  --ring: 0%;
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    conic-gradient(from -90deg, var(--guide) var(--ring), var(--line-2) 0) border-box !important;
  border: 3px solid transparent !important;
  box-shadow: none !important;
  color: var(--guide-ink) !important;
}
button.arming, button.arming:disabled { opacity: 1; }
.color-word { font-weight: 700; }
.color-red { color: #c8102e; }
.color-white { color: var(--ink); }
.color-yellow { color: #d99a00; }
.color-fyg { color: #8ba313; }
.color-orange { color: #e06a12; }
.color-pink { color: #d4789a; }
.color-green { color: var(--guide-ink); }
.color-blue { color: var(--info-ink); }
.color-brown { color: #8a5a32; }
.sil { flex: 0 0 38px; width: 38px; height: 38px; margin-top: 1px; background: var(--state-accent); border: 2px solid var(--ink); }
.sil-octagon { clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); background: #c8102e; border: 0; }
.sil-triangle { clip-path: polygon(50% 100%, 0 0, 100% 0); background: #c8102e; border: 0; }
.sil-circle { border-radius: 99px; background: #ffc21a; border: 0; }
.sil-pennant { clip-path: polygon(0 20%, 100% 50%, 0 80%); background: #ffc21a; border: 0; }
.sil-pentagon { clip-path: polygon(50% 0, 100% 38%, 100% 100%, 0 100%, 0 38%); background: #c9e31e; border: 0; }
.sil-diamond { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); background: #ffc21a; border: 0; }
.sil-rectangle { border-radius: 4px; background: #fff; }
.sil-crossbuck { background: transparent; border: 0; position: relative; }
.sil-crossbuck::before, .sil-crossbuck::after {
  content: ""; position: absolute; left: 3px; right: 3px; top: 16px; height: 6px;
  background: #fff; box-shadow: 0 0 0 1.5px var(--ink); border-radius: 1px;
}
.sil-crossbuck::before { transform: rotate(35deg); }
.sil-crossbuck::after { transform: rotate(-35deg); }
.sil-shield { clip-path: path("M0 0H38V21.5C38 31.8 29.5 37.4 19 38 8.5 37.4 0 31.8 0 21.5Z"); background: #1356a8; border: 0; }
.swatch { flex: 0 0 20px; width: 20px; height: 20px; margin-top: 2px; border-radius: 5px; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .15); }
.swatch-red { background: #c8102e; }
.swatch-white { background: #fff; }
.swatch-yellow { background: #ffc21a; }
.swatch-fyg { background: #c9e31e; }
.swatch-orange { background: #f07d1a; }
.swatch-pink { background: #f09ab9; }
.swatch-green { background: #00704a; }
.swatch-blue { background: #1356a8; }
.swatch-brown { background: #6b4226; }
.variant-row { display: grid; gap: var(--space-2); margin-top: var(--space-2); grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.sign-tile.here { box-shadow: inset 0 0 0 2px var(--guide); }
.sign-fam { margin-top: var(--space-4); }
.sign-fam h2 { margin-bottom: var(--space-2); }
.sign-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
.sign-tile {
  --c: transparent;
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px;
  margin: 0; min-height: 0; padding: 14px 8px 10px;
  background: var(--zone); color: var(--ink); border-radius: 16px;
  font: 600 12.5px/1.3 var(--sign-face); text-align: center;
}
.sign-tile img { width: 74px; height: 74px; object-fit: contain; }
.sign-tile.seen::after {
  content: ""; position: absolute; right: 7px; top: 7px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--guide) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
}
.sign-official { text-align: center; margin: 0 0 var(--space-3); padding: 18px; border-radius: 18px; background: var(--zone); }
.sign-official img { width: min(200px, 70%); height: auto; }
.sign-dialog { max-width: 560px; max-height: calc(100dvh - 32px); overflow: auto; padding: var(--space-4) var(--space-4) var(--space-3); }
.sign-dialog .x {
  position: absolute; top: 10px; right: 10px;
  width: 40px; min-width: 40px; height: 40px; min-height: 40px;
  margin: 0; padding: 0; line-height: 1; font: 400 24px/1 var(--read-face);
  background: var(--zone); color: var(--muted); border-radius: 50%;
}
.sign-dialog #sign-count { margin: 0 48px 0 0; }
.sign-dialog-nav { margin-top: var(--space-3); justify-content: space-between; }
.sign-dialog-nav button { width: auto; min-width: 116px; }
.sign-context { position: relative; margin: 0 0 var(--space-3); }
.sign-context .place { display: block; width: 100%; height: 130px; object-fit: cover; border-radius: 14px; }
@media (min-width: 680px) { .sign-context .place { height: 170px; } }
.sign-context .glyph { position: absolute; left: 12px; bottom: 36px; width: 74px; height: 74px; background: #fff; border-radius: 10px; padding: 5px; }
.sign-context figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }
.sign-detail h3 { font-size: 15.5px; margin: var(--space-3) 0 var(--space-1); }
.sign-detail ul { margin: 0; padding-left: 1.2em; }

/* ---- badges: route shields collected along the way ------------------------ */
.badge-row { display: flex; flex-wrap: wrap; gap: 10px; margin: var(--space-3) 0; }
.badge { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.badge b {
  display: inline-grid; place-items: center; flex: none; width: 36px; height: 40px; padding-bottom: 8px;
  background: var(--guide); color: #fff; font: 800 13px/1 var(--sign-face);
  clip-path: path("M0 0H36V21.6C36 31.4 28 36.6 18 40 8 36.6 0 31.4 0 21.6Z");
}
.badge.earned { color: var(--ink); align-items: center; max-width: 100%; padding: 6px 12px 6px 6px; border-radius: 14px; background: var(--zone); }
.badge-copy { display: flex; flex-direction: column; gap: 2px; line-height: 1.3; }
.badge-copy strong { font: 700 14.5px/1.2 var(--sign-face); }
.badge-copy em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.badge-next { margin: 6px 0 0; }
.badge-row.tight { margin: 4px 0 0; gap: 6px; }
.badge-row.tight .badge { padding: 0; background: none; font-size: 12px; gap: 6px; }
.badge-row.tight .badge b { width: 28px; height: 31px; padding-bottom: 6px; font-size: 11px;
  clip-path: path("M0 0H28V16.8C28 24.4 21.8 28.5 14 31 6.2 28.5 0 24.4 0 16.8Z"); }

.toast {
  position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 30; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
  max-width: min(520px, calc(100vw - 32px));
  padding: 10px 14px; border-radius: 14px; background: var(--warn); color: #14191e;
  box-shadow: 0 16px 34px -18px rgb(20 25 30 / .45);
}
.toast .badge.earned { background: none; padding: 0; color: #14191e; }
@media (min-width: 680px) { .toast { bottom: 24px; } }
.toast.hide { display: none; }

/* ---- progress: your dashboard ------------------------------------------- */
#readiness.cluster {
  display: grid; gap: 18px 28px; padding: 24px 22px; margin: var(--space-3) 0;
  border-radius: 26px; background: #0f151b; color: #e9eef2;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .04);
}
@media (prefers-color-scheme: dark) { #readiness.cluster { background: #05080b; box-shadow: inset 0 0 0 1px var(--line); } }
.gauge { display: block; width: 100%; max-width: 380px; height: auto; margin: 0 auto; }
.gauge path { fill: none; }
.gauge .g-track { stroke: #252e37; stroke-width: 16; stroke-linecap: round; }
.gauge .g-fill { stroke: #dfe6eb; stroke-opacity: .9; stroke-width: 16; stroke-linecap: round; }
.gauge .g-pass { stroke: var(--lamp-green); stroke-width: 16; stroke-linecap: round; filter: drop-shadow(0 0 6px rgb(25 201 123 / .7)); }
.gauge .g-ticks { stroke: #7d8a95; stroke-width: 2; stroke-linecap: round; }
.gauge .g-labels text { font: 700 13px var(--sign-face); fill: #8a96a1; text-anchor: middle; }
.gauge .g-labels text.pass { fill: var(--lamp-green); }
.gauge .needle line { stroke: #ff8a1f; stroke-width: 4.5; stroke-linecap: round; filter: drop-shadow(0 0 5px rgb(255 138 31 / .7)); }
.gauge .g-hub { fill: #1c242c; stroke: #ff8a1f; stroke-width: 3; }
.gauge .g-value { font: 800 52px var(--sign-face); fill: #f1f4f6; text-anchor: middle; }
.gauge .g-of { font-size: 22px; font-weight: 700; fill: #8a96a1; }
.gauge .g-label { font: 700 11px var(--sign-face); letter-spacing: 1.6px; fill: #8a96a1; text-anchor: middle; text-transform: uppercase; }
.cluster-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cluster .verdict-line { margin: 0; font: 700 22px/1.2 var(--sign-face); color: #fff; }
.cluster .why { margin: 0; color: #aab5bf; }
.cluster .rule, .cluster .count { margin: 0; color: #aab5bf; font-size: 14.5px; }
.cluster .five { display: flex; align-items: center; gap: 10px; color: #aab5bf; font: 700 13px/1 var(--sign-face); }
.cluster .five .signal { background: #1c242c; }
.cluster .exam-list li { border-top-color: rgb(255 255 255 / .08); color: #aab5bf; }
.cluster .exam-list li b { color: #fff; }
.cluster .exam-list li.ok b { color: #3fd39a; }
.cluster .spark rect { fill: #3b444d; }
.cluster .spark rect.ok { fill: #19c97b; }
.cluster .spark line.rule { stroke: #dfe6eb; stroke-dasharray: 3 3; stroke-width: 1; }
.odo { display: inline-flex; gap: 4px; }
.odo i {
  display: grid; place-items: center; width: 26px; height: 36px; border-radius: 5px;
  background: #1c242c; color: #f1f4f6; font: 800 21px/1 var(--sign-face); font-style: normal;
  box-shadow: inset 0 8px 10px -7px rgb(0 0 0 / .8), inset 0 -8px 10px -7px rgb(0 0 0 / .8);
}
.odo i:last-child { background: #f1f4f6; color: #0f151b; }
.odo-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.odo-row span { font: 700 11.5px/1.2 var(--sign-face); letter-spacing: .12em; text-transform: uppercase; color: #8a96a1; }
.tell { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: rgb(255 255 255 / .05); }
.tell i { flex: none; width: 26px; height: 26px; background: var(--orr-amber); transform: rotate(45deg) scale(.82); border-radius: 4px;
  box-shadow: 0 0 12px rgb(255 194 26 / .55); }
.tell b { display: block; font: 700 15px/1.2 var(--sign-face); color: #fff; }
.tell span { color: #aab5bf; font-size: 13.5px; }
@media (min-width: 900px) {
  #readiness.cluster { grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); align-items: center; padding: 30px 34px; }
}
.ready-head { display: flex; gap: var(--space-3); align-items: center; }
.recent { display: flex; gap: var(--space-1); margin-top: var(--space-3); flex-wrap: wrap; }
.recent span { font: 700 12.5px/1 var(--sign-face); padding: 5px 8px; border-radius: 7px; background: var(--zone); color: var(--muted); }
.recent span.ok { background: var(--guide); color: #fff; }
.exam-list { list-style: none; margin: 0; padding: 0; }
.exam-list li { display: flex; align-items: baseline; gap: var(--space-2); padding: 7px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 14.5px; }
.exam-list li span:first-child { min-width: 5.5em; }
.exam-list li b { margin-left: auto; color: var(--ink); font-family: var(--sign-face); }
.exam-list li.ok b { color: var(--right); }
.spark { display: block; width: min(260px, 100%); height: 56px; margin: 0; }
.spark rect { fill: var(--line-2); }
.spark rect.ok { fill: var(--guide); }
.spark line.rule { stroke: var(--ink); stroke-dasharray: 3 3; stroke-width: 1; }
#progress-stats h2 { margin: var(--space-4) 0 var(--space-1); }
#progress-stats > .count { margin: 0 0 var(--space-3); }
#progress-stats .grid-3 { display: grid; gap: 10px; }
@media (min-width: 680px) { #progress-stats .grid-3 { grid-template-columns: repeat(3, 1fr); gap: var(--space-3); } }
.exam-map { margin-top: var(--space-4); }
.exam-map h2 { margin-top: 0; }
.map-list { list-style: none; padding: 0; margin: var(--space-2) 0 0; }
.map-row {
  display: grid; grid-template-columns: minmax(7.5em, 1fr) minmax(4rem, 1.4fr) auto auto;
  gap: var(--space-3); align-items: center; padding: 11px 0; border-top: 1px solid var(--line); font-size: 15px;
}
.map-name { font: 700 15px/1.25 var(--sign-face); }
.map-worth, .map-result { color: var(--muted); font-size: 14px; }
.map-row.weak .map-result { color: var(--pending); font-weight: 600; }
.map-row.ok .map-result { color: var(--right); font-weight: 600; }
.map-bar { position: relative; display: block; height: 12px; min-width: 4rem; border-radius: 6px; background: var(--road); overflow: hidden; }
.map-bar i { display: block; height: 100%; border-radius: 6px; background: var(--info); }
.map-row.cold .map-bar i { background: var(--line-2); }
.map-row.weak .map-bar i { background: var(--warn); }
.map-row.ok .map-bar i { background: var(--guide); }
@media (max-width: 560px) {
  .map-row { grid-template-columns: 1fr auto; row-gap: 6px; }
  .map-bar { grid-column: 1 / -1; }
  .map-result { grid-column: 1 / -1; }
}
.dash-mid { margin-top: var(--space-4); }
@media (min-width: 1024px) {
  .dash-mid { display: grid; grid-template-columns: 1.4fr minmax(240px, .8fr); gap: var(--space-5); align-items: start; }
  .dash-mid .exam-map { margin-top: 0; }
}
.next-band h2, .guess h2 { margin-top: 0; }
.next-band, .guess { background: var(--zone); box-shadow: none; }
.guess { margin-top: var(--space-4); color: var(--muted); }
.today-why { margin-top: var(--space-2); }
.cover-row { display: grid; gap: var(--space-3); margin-top: var(--space-4); }
@media (min-width: 680px) { .cover-row { grid-template-columns: repeat(3, 1fr); } }
.work-band { display: grid; gap: var(--space-4); margin-top: var(--space-5); }
@media (min-width: 1024px) { .work-band { grid-template-columns: 1fr 1fr; column-gap: var(--space-5); } }
.cover-detail h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 var(--space-1); }
.cover h3 { margin: 0; font-size: var(--step-0); }
.cover .track, .member .meter .track { position: relative; height: 10px; margin-top: 8px; border-radius: 5px; background: var(--road); overflow: hidden; }
.cover .track i, .member .meter .track i { display: block; height: 100%; border-radius: 5px; background: var(--guide); }
.date-card { margin: var(--space-3) 0; }
.date-card.is-done { padding: 0; overflow: hidden; }
.progress-pass {
  position: relative; min-height: 210px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 28px 16px 22px;
}
.progress-pass img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 78%; }
.progress-pass .member-pass-say { margin: 0; }
.progress-pass .pass-undo { top: 12px; right: 12px; }

/* ---- family: the carpool lane ------------------------------------------- */
#members { display: grid; gap: var(--space-3); grid-template-columns: 1fr; align-items: stretch; }
.lanes, .family-glance, #invite-card, #family-pitch, #pending-card { grid-column: 1 / -1; }
.lanes { position: relative; margin: 0; padding: 6px 0; border-radius: 22px; background: var(--asphalt); overflow: hidden; }
@media (prefers-color-scheme: dark) { .lanes { box-shadow: inset 0 0 0 1px var(--line); } }
.ln { position: relative; display: flex; align-items: center; gap: 10px; height: 58px; padding-left: 16px; }
.ln + .ln { background: linear-gradient(90deg, rgb(255 255 255 / .55) 50%, transparent 0) 0 0 / 26px 2px repeat-x; }
.ln .hov { width: 12px; height: 18px; flex: none; background: rgb(255 255 255 / .75);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%, 18% 50%, 50% 86%, 82% 50%, 50% 14%, 18% 50%, 0 50%); }
.ln .nm { display: flex; flex-direction: column; gap: 3px; color: #fff; min-width: 0; max-width: 46%; }
.ln .nm b { font: 700 15px/1 var(--sign-face); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ln .nm span { font: 600 12px/1 var(--sign-face); color: rgb(255 255 255 / .62); }
.ln .car { position: absolute; top: 14px; width: 60px; height: 30px; margin-left: -30px; filter: drop-shadow(0 4px 6px rgb(0 0 0 / .35)); }
.lanes .passline { position: absolute; top: 0; bottom: 0; width: 7px; margin-left: -3.5px; background: #fff; }
.lanes .paint { position: absolute; top: 50%; transform: translate(-50%, -50%) rotate(-90deg);
  font: 900 20px/1 var(--sign-face); letter-spacing: .38em; color: rgb(255 255 255 / .82); white-space: nowrap; pointer-events: none; }
.lanes-note { grid-column: 1 / -1; margin: -6px 0 0; }
.family-glance { padding: 14px 16px; background: var(--zone); box-shadow: none; }
.family-glance p { margin: 0; }
.family-glance .count { margin-top: var(--space-1); }
#pending-card { margin: 0; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
#pending-card h3 { margin: 0; font-size: 15px; }
.pending-list { display: flex; flex-direction: column; gap: 10px; }
.pending-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.pending-row .count { margin: 0; }
.watch-toggle { display: inline-flex; align-items: center; gap: var(--space-2); margin-top: var(--space-2); font: 600 14px/1.2 var(--sign-face); cursor: pointer; }
.watch-toggle input { width: 20px; height: 20px; accent-color: var(--guide); box-shadow: none; }
.member { margin: 0; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.member-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.member h3 { margin: 0; font: 700 20px/1.2 var(--sign-face); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member .you { display: block; margin-top: 3px; color: var(--muted); font: 600 12.5px/1.2 var(--sign-face); }
.member-top .chip { margin-top: 6px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.member.ready .member-top .chip { background: var(--guide); color: #fff; }
.member.needs-look .member-top .chip { background: var(--warn); color: #14191e; }
.member .body { display: grid; gap: 12px; }
.member .score { display: flex; align-items: center; gap: 10px; }
.member .score em { font-style: normal; font: 700 12.5px/1 var(--sign-face); color: var(--muted); }
.member .ready-meter { display: none; }
.run { display: flex; gap: 5px; padding: 5px 7px; border-radius: 999px; background: var(--housing); }
.run i { width: 9px; height: 9px; border-radius: 99px; background: var(--lamp-off); }
.run i.ok { background: var(--lamp-green); box-shadow: 0 0 6px rgb(25 201 123 / .6); }
.run i.miss { background: var(--lamp-red); box-shadow: 0 0 6px rgb(255 68 88 / .55); }
.member .meters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.member .meter { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: baseline; }
.member .meter .lbl { font: 700 10.5px/1 var(--sign-face); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.member .meter .frac { font: 800 13px/1 var(--sign-face); color: var(--ink); }
.member .meter .track { grid-column: 1 / -1; height: 8px; margin-top: 4px; }
.member .count.hole { margin: 0; font-size: 13.5px; line-height: 1.35; }
.member button.date-trigger { --date-pad-y: 8px; --date-pad-x: 10px; min-height: 40px; font-size: 14px; margin-top: 0; }
.member .pass-row { margin: 0; }
.member .family-passed { min-height: 44px; padding: 8px 14px; font-size: 15px; margin-top: 0; width: auto; }
/* Pass is the point of the board. Once it is marked, the lower half of the card is
   the celebration — the meters stay, but quieter, so the household reads
   Congratulations first. Undo is a recycle in the corner. */
.member.passed { position: relative; overflow: hidden; min-height: 260px; }
.member.passed .body, .member.passed .count.hole, .member.passed .badge-row { opacity: .42; }
.member-pass {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; height: 54%;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding: 0 10px 12px; pointer-events: none;
}
.member-pass img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 82%;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 36%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 36%);
}
.member-pass-say {
  position: relative; z-index: 1; margin: 0 8px 2px; color: #fff; text-align: center;
  font: 800 clamp(18px, 4.2vw, 26px)/1.1 var(--sign-face); letter-spacing: -.01em;
  text-shadow: 0 1px 2px rgb(10 16 22 / .45);
}
.pass-undo {
  pointer-events: auto; position: absolute; right: 8px; top: 22%; z-index: 1;
  width: 44px; min-height: 44px; margin: 0; padding: 0; border-radius: 99px;
  background: color-mix(in srgb, var(--card) 70%, transparent); font-size: 20px; line-height: 1;
}
.pass-undo:hover, .pass-undo:focus-visible { background: color-mix(in srgb, var(--card) 92%, transparent); }
.icon-btn {
  flex: 0 0 40px; width: 40px; height: 40px; min-height: 40px; margin: 0; padding: 0;
  background: transparent; color: var(--ink); display: inline-flex; align-items: center; justify-content: center;
  font-size: 19px; line-height: 1; border-radius: 10px;
}
.icon-btn:hover, .icon-btn:focus-visible { background: color-mix(in srgb, var(--wrong) 14%, transparent); transform: none; }
.member-actions { margin-top: 0; }
#family-pitch { display: grid; gap: var(--space-3); }
#family-pitch .pitch-plate, #family-pitch button { justify-self: start; }
#family-pitch .pitch-plate { min-width: 220px; }
#family-pitch .pitch-plate {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
  padding: 20px 16px 18px; border-radius: 13px; background: var(--school); color: #14191e;
  box-shadow: inset 0 0 0 4.5px var(--school), inset 0 0 0 7px #14191e;
}
#family-pitch .pitch-plate .kicker { color: #14191e; }
#family-pitch .pitch-plate b { font: 800 60px/1 var(--sign-face); letter-spacing: -.03em; }
@media (min-width: 680px) {
  #members { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
}

/* ---- account: your plan, the plans as plaques, the rest stop ------------- */
#v-plans { max-width: 680px; }
#acct-who { overflow-wrap: anywhere; }
.rest-stop { display: none; }
#v-plans[data-reason="capped"] .rest-stop {
  position: relative; display: block; height: 250px; margin: var(--space-2) 0 0;
  border-radius: 22px; overflow: hidden; background: var(--zone);
}
.rest-art { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 40% 60%; }
.rest-stop::after {   /* the sign's post */
  content: ""; position: absolute; left: 44px; top: 120px; bottom: 0; width: 7px; background: #8e99a3; border-radius: 2px;
}
.rest-sign {
  position: absolute; z-index: 1; left: 16px; top: 18px; display: flex; flex-direction: column; gap: 6px;
  padding: 16px 18px 16px 18px; max-width: min(300px, calc(100% - 32px));
  background: var(--info); color: #fff; border-radius: 13px;
  box-shadow: inset 0 0 0 4.5px var(--info), inset 0 0 0 7px #fff, var(--glow) var(--info);
}
.rest-kicker { display: flex; align-items: center; gap: 9px; font: 800 20px/1 var(--sign-face); letter-spacing: .05em; text-transform: uppercase; }
.rest-kicker::before {
  content: ""; width: 26px; height: 26px; flex: none; border-radius: 5px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Cpath d='M7 11.5h11v5a4.5 4.5 0 0 1-4.5 4.5h-2A4.5 4.5 0 0 1 7 16.5z' fill='%231356a8'/%3E%3Cpath d='M18 13h1.6a2.2 2.2 0 0 1 0 4.4H18' fill='none' stroke='%231356a8' stroke-width='1.8'/%3E%3Cpath d='M10.5 9.2c0-1.2 1-1.4 1-2.6M13.6 9.2c0-1.2 1-1.4 1-2.6' stroke='%231356a8' stroke-width='1.5' stroke-linecap='round' fill='none'/%3E%3C/svg%3E") center / 26px no-repeat;
}
.rest-sign b { font: 600 15px/1.3 var(--sign-face); }
.note-cap { margin: var(--space-3) 0 0; padding: 14px 16px; border-radius: 14px; background: var(--zone); font-weight: 600; }
#v-plans[data-reason="bought"] .note-cap { background: var(--guide); color: #fff;
  box-shadow: inset 0 0 0 4px var(--guide), inset 0 0 0 6.5px #fff; }
.acct-block { margin-top: var(--space-5); padding-top: 0; }
.acct-block h2 { margin: 0 0 var(--space-3); font: 700 12px/1 var(--sign-face); letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }
.acct-block .row input { flex: 1; min-width: 0; }
.acct-block .row button { flex: none; }
/* the plan you are on, as a plate */
.plan-now { padding: 18px 20px; border-radius: 14px; background: var(--zone); }
.plan-name { margin: 0; font: 800 26px/1.1 var(--sign-face); letter-spacing: -.015em; }
.plan-line { color: var(--muted); margin: 6px 0 0; }
.plan-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.plan-actions button { margin-top: 0; width: auto; min-width: 0; min-height: 46px; padding: 8px 16px; font-size: 15.5px; }
.plan-actions:not(:has(button:not(.hide))) { display: none; }
.plan-pick { margin-top: var(--space-4); }
.plan-pick-h { margin: 0 0 var(--space-3); font: 700 22px/1.15 var(--sign-face); letter-spacing: -.015em; }
.plan-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: end; }
.plan-opt { display: flex; flex-direction: column; gap: 12px; }
.plan-opt > div {   /* a speed-limit plaque with a price on it */
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px;
  padding: 18px 12px 16px; border-radius: 12px; background: var(--plate); color: var(--plate-ink);
  box-shadow: inset 0 0 0 4px var(--plate), inset 0 0 0 6.5px var(--plate-ink), 0 0 0 1px var(--line-2);
}
.plan-opt.family > div { background: var(--school); box-shadow: inset 0 0 0 4px var(--school), inset 0 0 0 6.5px #14191e; }
.plan-opt b { font: 700 12px/1 var(--sign-face); letter-spacing: .13em; text-transform: uppercase; }
.plan-opt .price { font: 800 54px/1 var(--sign-face); letter-spacing: -.03em; margin: 6px 0 0; }
.plan-opt .per { font: 700 11px/1 var(--sign-face); letter-spacing: .1em; text-transform: uppercase; color: #4b5661; }
.plan-opt.family .per { color: #14191e; }
.plan-opt p { margin: 8px 0 0; font-size: 13.5px; line-height: 1.35; color: #4b5661; }
.plan-opt.family p { color: #14191e; }
.plan-opt button { width: 100%; min-width: 0; margin-top: 0; min-height: 50px; font-size: 16px; padding: 8px 12px; }
@media (max-width: 380px) { .plan-opts { grid-template-columns: 1fr; } }
label.check { display: flex; gap: var(--space-2); align-items: flex-start; color: var(--ink); font: 400 16px/1.4 var(--read-face); }
label.check input { width: 22px; height: 22px; flex: none; margin-top: 2px; box-shadow: none; accent-color: var(--guide); }
#acct-done { color: var(--guide-ink); font-weight: 600; }

.empty { text-align: center; padding: var(--space-4) var(--space-3); }
.empty img { width: min(280px, 70%); height: auto; margin: 0 auto var(--space-3); display: block; }

/* What a state adds to a screen (web/app/slots.js). */
.pack-card { margin: var(--space-3) 0; padding: 18px 18px 18px 20px; background: var(--zone); box-shadow: inset 4px 0 0 var(--state-accent); }
.pack-card h3 { margin: 0 0 var(--space-1); }
.pack-card ul { margin: var(--space-1) 0 0; padding-left: 1.2em; }

/* ---- dialogs ------------------------------------------------------------ */
dialog {
  border: 0; border-radius: 22px; background: var(--card); color: var(--ink);
  max-width: 460px; width: calc(100vw - 2 * var(--space-4)); padding: var(--space-4);
  box-shadow: 0 30px 80px -30px rgb(10 16 22 / .55);
}
dialog::backdrop { background: rgb(10 16 22 / .55); }
dialog .pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); align-items: stretch; }
dialog .pair button { margin-top: 0; width: 100%; }
/* the report dialog: the reasons are answer buttons with a radio inside */
.flag-why { border: 0; padding: 0; margin: var(--space-3) 0; }
.flag-why label.opt { display: flex; align-items: center; gap: 12px; margin-top: var(--space-1); color: var(--ink); font: 500 16px/1.3 var(--read-face); }
.flag-why label.opt input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--guide); box-shadow: none; }
.flag-why label.opt:has(input:checked) { box-shadow: inset 0 0 0 2px var(--ink); font-weight: 600; }
.flag-why label.opt.hide { display: none; }

/* ---- motion: a sign settles on its post; the road draws in --------------- */
@media (prefers-reduced-motion: no-preference) {
  .overhead { animation: settle .9s var(--spring) both .1s; transform-origin: 50% -40px; }
  @keyframes settle { from { opacity: 0; transform: rotate(-2.5deg) translateY(-8px); } to { opacity: 1; transform: none; } }
  .road-line .travelled { stroke-dasharray: var(--len, 0) 9999; animation: draw-road 1.2s ease-out both .2s; }
  @keyframes draw-road { from { stroke-dasharray: 0 9999; } }
  .signal i.a { animation: blink 1.6s ease-in-out infinite; }
  @keyframes blink { 50% { opacity: .55; } }
  .gauge .needle { transform-origin: 180px 176px; animation: needle 1.3s var(--spring) both .15s; }
  @keyframes needle { from { transform: rotate(var(--from, -170deg)); } }
}
html.exam .signal i.a { animation: none; }

/* ---- night: the road goes dark, the signs keep their colour, and the pictures of
   your state stay close to daylight, with only a touch of dusk ------------------- */
@media (prefers-color-scheme: dark) {
  .ws-art, .scene-art, .rest-art, figure.frame img, #pass-art, .progress-pass img, .member-pass img {
    filter: brightness(.9) saturate(.95);
  }
  button.scene.exam { background: #131c26; }
}

/* the free plan's locked part of each learning tool (web/app/lock.js), as an amber plate */
.lock-tag {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px;
  border-radius: 7px; background: var(--warn); color: #14191e; font: 700 12.5px/1 var(--sign-face);
}
.lock-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); color: var(--muted); }
.lock-panel { display: grid; justify-items: start; gap: var(--space-3); margin: var(--space-4) 0; }
.num-card.locked, .mark-card.locked, .sign-tile.locked { opacity: .78; }
.num-card.locked .num-prompt, .mark-card.locked .mark-name { margin-bottom: var(--space-2); }
.sign-tile.locked .lock-sign {
  display: block; width: 64px; height: 64px; margin: 0 auto var(--space-2);
  border-radius: 10px; background: var(--zone); box-shadow: inset 0 0 0 2px var(--line-2);
}
.lock-more {
  display: inline-block; margin-left: var(--space-2); padding: 3px 8px; border-radius: 6px;
  background: var(--warn); color: #14191e; font: 700 12px/1.2 var(--sign-face); vertical-align: middle;
}
.lock-line p { margin: 0; }
