/* Journeyman Electrician Exam: one family (Archivo), width axis does the work.
   Paper and ink, one bright red for display, the app's charcoal and amber for app-like panels. */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #f3f2ef;
  --paper-2: #e8e6e1;
  --card: #fbfaf8;
  --ink: #17171a;
  --ink-2: #4a4a4f;
  --ink-3: #6b6a68;
  --line: #d6d3cd;
  --red: #ff2a1a;
  --red-text: #c41d12;
  --charcoal: #1e1f24;
  --charcoal-2: #2a2b31;
  --on-charcoal: #f2f0ea;
  --on-charcoal-2: #a3a5ac;
  --amber: #f7b32b;
  --green: #2f9e6a;
  --shadow: 0 1px 2px rgba(40, 30, 20, .06), 0 12px 32px rgba(40, 30, 20, .10);
  --radius: 14px;
  --radius-lg: 22px;
  --wrap: 1180px;
  --measure: 68ch;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; color-scheme: light; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--red-text); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 50; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; }

h1, h2, h3 { line-height: 1.12; margin: 0 0 .5em; font-weight: 760; font-stretch: 112%; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; font-stretch: 105%; }
p { margin: 0 0 1em; }
.muted { color: var(--ink-2); }

/* Header: brand, links and one action on desktop; brand and a menu on phones */
header.site { position: sticky; top: 0; z-index: 30; background: var(--paper); border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); flex: none; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.brand span { font-weight: 820; font-stretch: 116%; font-size: .9rem; line-height: 1.05; letter-spacing: -.005em; text-transform: none; }
nav.main { display: flex; align-items: center; gap: 26px; margin-left: auto; }
nav.main a { text-decoration: none; font-size: .95rem; font-weight: 580; color: var(--ink-2); white-space: nowrap; }
nav.main a:hover, nav.main a[aria-current="page"] { color: var(--ink); }
nav.main a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.menu-cta { display: none; }
.hcta { flex: none; text-decoration: none; background: var(--ink); color: var(--paper); font-weight: 650; font-size: .92rem; padding: 10px 18px; border-radius: 999px; white-space: nowrap; }
.hcta:hover { color: var(--paper); background: #000; }
.menu-btn { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); cursor: pointer; place-items: center; }
.menu-btn svg { width: 24px; height: 24px; fill: currentColor; }
.menu-btn svg + svg, .menu-btn[aria-expanded="true"] svg:first-child { display: none; }
.menu-btn[aria-expanded="true"] svg + svg { display: block; }

@media (max-width: 860px) {
  header.site .wrap { height: 60px; gap: 12px; }
  .brand img { width: 32px; height: 32px; border-radius: 8px; }
  .brand span { font-size: .84rem; }
  .hcta { display: none; }
  .menu-btn { display: grid; }
  nav.main {
    display: none; position: absolute; left: 0; right: 0; top: 60px; margin: 0;
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 22px;
    background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px rgba(40, 30, 20, .12);
  }
  nav.main.open { display: flex; }
  nav.main a { font-size: 1.15rem; font-weight: 700; font-stretch: 108%; color: var(--ink); padding: 15px 2px; border-bottom: 1px solid var(--line); }
  nav.main a[aria-current="page"] { text-decoration: none; color: var(--red-text); }
  .menu-cta { display: block; padding-top: 18px; }
  .menu-cta .store { width: 100%; justify-content: center; padding: 13px 20px; }
}

/* App Store button: black pill, real link once the app is live, a quiet label before then */
.store {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; white-space: nowrap;
  background: var(--ink); color: var(--paper); border-radius: 999px; padding: 10px 20px 10px 16px;
  font-weight: 650; font-size: .95rem; line-height: 1.1; transition: transform .12s ease;
}
.store svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.store small { display: block; font-weight: 450; font-size: .72rem; opacity: .75; }
.store:hover { color: var(--paper); transform: translateY(-1px); }
.store:active { transform: translateY(0) scale(.98); }
.store.soon { cursor: default; }
.store.soon:hover { transform: none; }
.store.lg { padding: 14px 26px 14px 20px; font-size: 1.05rem; }
.store.lg svg { width: 22px; height: 22px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; white-space: nowrap;
  border: 2px solid var(--ink); color: var(--ink); border-radius: 999px; padding: 12px 22px; font-weight: 650; font-size: 1rem;
  transition: background .12s ease, color .12s ease;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn:active { transform: scale(.98); }

/* Hero */
.hero { padding: 56px 0 40px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.25fr .75fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 4.6vw, 3.9rem); overflow-wrap: break-word; font-stretch: 118%; font-weight: 820; letter-spacing: -.02em; line-height: 1.02; margin-bottom: 20px; }
.hero .lede { font-size: 1.2rem; color: var(--ink-2); max-width: 40ch; margin-bottom: 28px; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.stage { position: relative; height: 640px; }
.phone {
  position: absolute; left: 50%; top: 10px; width: 280px; transform: translateX(-50%) rotate(2deg);
  border-radius: 46px; padding: 10px; background: linear-gradient(160deg, #4a4b50, #1c1c1f 30%, #0b0b0c 70%, #3a3b40);
  box-shadow: 0 50px 90px rgba(40, 30, 20, .28), inset 0 0 0 2px rgba(255, 255, 255, .08);
}
.phone img { border-radius: 37px; width: 100%; }
.float { position: absolute; }
.stage .f1 { width: 150px; left: 0; top: 40px; transform: rotate(-12deg); }
.stage .f2 { width: 150px; right: 0; top: 10px; transform: rotate(10deg); }
.stage .f3 { width: 180px; left: 10px; bottom: 30px; transform: rotate(-6deg); }
.stage .f4 { width: 190px; right: -6px; bottom: 60px; transform: rotate(12deg); }
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .stage { height: 520px; }
  .phone { width: 240px; }
}

/* The big band: same message as the App Store art */
.band { padding: 72px 0 80px; text-align: center; position: relative; overflow: hidden; }
.band .big { font-weight: 900; font-stretch: 125%; text-transform: uppercase; line-height: .9; letter-spacing: -.02em; margin: 0; }
.band .big .n { display: block; color: var(--red); font-size: clamp(5rem, 17vw, 13rem); }
.band .big .w { display: block; font-size: clamp(2.6rem, 9vw, 7.4rem); }
.band .also { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; margin: 34px 0 22px; font-weight: 820; font-stretch: 122%; font-size: clamp(1.1rem, 2.3vw, 1.7rem); text-transform: uppercase; }
.band .also span { display: inline-flex; align-items: center; gap: 12px; }
.band .also svg { width: 1.2em; height: 1.2em; fill: var(--ink); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 760px; margin: 0 auto; padding: 0; list-style: none; }
.chips li { background: var(--charcoal); color: var(--amber); border-radius: 999px; padding: 8px 18px; font-size: .95rem; font-weight: 600; }
.chips a { color: inherit; text-decoration: none; }
.chips a:hover { text-decoration: underline; }
.band .float { width: 150px; opacity: .95; }
.band .b1 { left: 4%; top: 60px; transform: rotate(-10deg); }
.band .b2 { right: 4%; top: 90px; transform: rotate(9deg); }
.band .b3 { left: 9%; bottom: 40px; width: 120px; transform: rotate(8deg); }
.band .b4 { right: 8%; bottom: 30px; width: 170px; transform: rotate(-8deg); }
@media (max-width: 1000px) { .band .float { display: none; } }

/* Sample question: an app-like panel that works on the page */
.sample { padding: 72px 0; }
.sample .wrap { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.sample .intro { position: sticky; top: 100px; }
@media (max-width: 900px) { .sample .wrap { grid-template-columns: 1fr; } .sample .intro { position: static; } }

.q {
  background: var(--charcoal); color: var(--on-charcoal); border-radius: var(--radius-lg); padding: 26px; margin: 0 0 18px;
  border: 0; min-width: 0; box-shadow: var(--shadow);
}
.q legend { float: left; width: 100%; padding: 0; margin: 0 0 16px; font-size: 1.12rem; font-weight: 600; line-height: 1.45; }
.q .topic { display: block; color: var(--amber); font-size: .85rem; font-weight: 600; margin-bottom: 8px; }
.q .choices { clear: both; display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.q button.choice {
  width: 100%; text-align: left; display: flex; gap: 14px; align-items: center; cursor: pointer;
  background: var(--charcoal-2); color: var(--on-charcoal); border: 1.5px solid rgba(255, 255, 255, .08); border-radius: 12px;
  padding: 13px 16px; font: inherit; font-size: 1rem; transition: border-color .12s ease, background .12s ease;
}
.q button.choice:hover { border-color: rgba(255, 255, 255, .28); }
.q button.choice .k { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .08); font-size: .8rem; font-weight: 700; }
.q.done button.choice { cursor: default; }
.q.done button.choice:not(.right):not(.wrong) { opacity: .55; }
.q button.choice.right { border-color: var(--green); background: rgba(47, 158, 106, .16); }
.q button.choice.right .k { background: var(--green); color: #fff; }
.q button.choice.wrong { border-color: #f2704a; background: rgba(242, 112, 74, .14); }
.q button.choice.wrong .k { background: #f2704a; color: #fff; }
.q details { margin-top: 16px; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 14px; }
.q summary { cursor: pointer; color: var(--amber); font-weight: 600; }
.q .why { margin-top: 10px; color: #d9d7d1; font-size: 1rem; }
.q .why strong { color: var(--on-charcoal); }
.q .why .ref { color: var(--amber); font-weight: 600; }
.q .steps { margin: 12px 0 0; padding: 12px 16px; background: #15161a; border-radius: 10px; list-style: none; font-variant-numeric: tabular-nums; }
.q .steps li:last-child { color: var(--amber); font-weight: 650; }

/* App screens strip */
.screens { padding: 64px 0 72px; background: var(--paper-2); }
.screens h2 { max-width: 20ch; }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: 250px; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 12px 24px 24px; margin: 24px -24px 0; scrollbar-width: thin; }
.strip figure { margin: 0; scroll-snap-align: start; }
.strip img { border-radius: 30px; border: 7px solid #111215; box-shadow: var(--shadow); }
.strip figcaption { margin-top: 14px; font-weight: 650; font-size: 1rem; line-height: 1.35; }
.strip figcaption span { display: block; font-weight: 400; color: var(--ink-2); font-size: .92rem; margin-top: 4px; }

/* Panel schedule: the guides index, set like the circuit directory on a panel door */
.schedule-sec { padding: 80px 0; }
.schedule-sec .wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .schedule-sec .wrap { grid-template-columns: 1fr; } }
.panel-door { background: var(--charcoal); border-radius: 18px; padding: 22px; box-shadow: var(--shadow); }
.directory { background: #f7f5f0; color: #1c1c1f; border-radius: 6px; padding: 18px 20px 14px; }
.directory .head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid #1c1c1f; padding-bottom: 8px; margin-bottom: 4px; font-weight: 800; font-stretch: 118%; }
.directory .head small { font-weight: 500; font-stretch: 100%; color: #5a5955; font-size: .82rem; }
.directory ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 26px; }
.directory li { display: grid; grid-template-columns: 26px 1fr; gap: 8px; align-items: baseline; border-bottom: 1px solid #d9d5cc; padding: 10px 0; font-size: .98rem; line-height: 1.3; }
.directory li .no { font-variant-numeric: tabular-nums; font-weight: 700; color: #8a8780; font-size: .85rem; }
.directory li a { color: #1c1c1f; text-decoration: none; font-weight: 600; }
.directory li a:hover { color: #c41d12; text-decoration: underline; }
.directory li.spare span:last-child { color: #9b978e; }
@media (max-width: 640px) { .directory ol { grid-template-columns: 1fr; } }

/* Tools grid */
.tools { padding: 72px 0; border-top: 1px solid var(--line); }
.toolgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 40px; margin-top: 28px; padding: 0; list-style: none; }
.toolgrid li { display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.toolgrid .tile { width: 52px; height: 52px; border-radius: 14px; background: var(--charcoal); display: grid; place-items: center; }
.toolgrid .tile svg { width: 26px; height: 26px; fill: var(--amber); }
.toolgrid h3 { margin: 0 0 2px; font-size: 1.1rem; }
.toolgrid p { margin: 0; color: var(--ink-2); font-size: .98rem; }
.toolgrid .free { font-size: .8rem; font-weight: 700; color: var(--green); margin-left: 6px; }
@media (max-width: 760px) { .toolgrid { grid-template-columns: 1fr; } }

/* FAQ */
.faq { padding: 72px 0; }
.faq .wrap { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-stretch: 106%; font-size: 1.15rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 1.6rem; line-height: 1; color: var(--red-text); transition: transform .15s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { margin-top: 10px; color: var(--ink-2); }

/* Closing CTA */
.closing { padding: 88px 0 96px; text-align: center; background: var(--charcoal); color: var(--on-charcoal); }
.closing h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-stretch: 120%; font-weight: 820; max-width: 18ch; margin: 0 auto 18px; }
.closing p { color: var(--on-charcoal-2); max-width: 46ch; margin: 0 auto 28px; }
.closing .store { background: var(--on-charcoal); color: var(--charcoal); }
.closing .btn { border-color: var(--on-charcoal); color: var(--on-charcoal); }
.closing .btn:hover { background: var(--on-charcoal); color: var(--charcoal); }
.closing .ctas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* Articles */
.article { padding: 40px 0 72px; }
.article .wrap { display: grid; grid-template-columns: minmax(0, var(--measure)) 260px; gap: 64px; justify-content: center; }
@media (max-width: 1000px) { .article .wrap { grid-template-columns: minmax(0, 1fr); } .article aside.side { display: none; } }
.crumbs { font-size: .9rem; color: var(--ink-3); margin-bottom: 18px; }
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.article h1 { font-stretch: 116%; font-weight: 800; letter-spacing: -.02em; }
.byline { color: var(--ink-3); font-size: .92rem; margin-bottom: 28px; }
.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li { margin: .3em 0; }
.prose li::marker { color: var(--red-text); }
.answer { border-left: 5px solid var(--red); background: var(--card); padding: 18px 22px; border-radius: 0 var(--radius) var(--radius) 0; margin: 0 0 28px; box-shadow: var(--shadow); }
.answer p:last-child { margin-bottom: 0; }
.answer .label { display: block; font-weight: 800; font-stretch: 112%; margin-bottom: 6px; }
.prose table { width: 100%; border-collapse: collapse; margin: 6px 0 22px; font-size: .96rem; font-variant-numeric: tabular-nums; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 700; border-bottom: 2px solid var(--ink); white-space: nowrap; }
.prose code, .formula { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .92em; }
.formula { display: block; background: var(--charcoal); color: var(--amber); padding: 14px 18px; border-radius: 12px; margin: 4px 0 18px; overflow-x: auto; }
.prose .source { font-size: .9rem; color: var(--ink-3); }
.appcard { display: grid; grid-template-columns: 64px 1fr; gap: 18px; align-items: center; background: var(--charcoal); color: var(--on-charcoal); border-radius: var(--radius-lg); padding: 22px; margin: 32px 0; }
.appcard img { width: 64px; height: 64px; border-radius: 15px; }
.appcard p { margin: 0 0 12px; color: var(--on-charcoal-2); font-size: .98rem; }
.appcard strong { color: var(--on-charcoal); display: block; font-size: 1.08rem; margin-bottom: 4px; }
.appcard .store { background: var(--on-charcoal); color: var(--charcoal); }
.appcard .row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.appcard .row a.link { color: var(--amber); font-weight: 600; text-decoration-color: var(--amber); }
.prose details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.prose details summary { cursor: pointer; font-weight: 700; font-size: 1.08rem; }
.prose details > div { margin-top: 8px; color: var(--ink-2); }
aside.side { position: sticky; top: 100px; align-self: start; font-size: .95rem; }
aside.side p.title { font-weight: 800; font-stretch: 112%; margin-bottom: 8px; }
aside.side ol { list-style: none; padding: 0; margin: 0 0 28px; border-left: 2px solid var(--line); }
aside.side ol a { display: block; padding: 5px 0 5px 14px; color: var(--ink-2); text-decoration: none; line-height: 1.35; }
aside.side ol a:hover { color: var(--ink); }
.related { border-top: 1px solid var(--line); margin-top: 48px; padding-top: 28px; }
.related ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.related a { font-weight: 650; }

/* Calculators */
.calc { background: var(--charcoal); color: var(--on-charcoal); border-radius: var(--radius-lg); padding: 26px; margin: 8px 0 32px; box-shadow: var(--shadow); }
.calc .seg { display: inline-flex; background: #15161a; border-radius: 999px; padding: 4px; margin: 0 8px 16px 0; }
.calc .seg label { position: relative; }
.calc .seg input { position: absolute; opacity: 0; }
.calc .seg span { display: block; padding: 7px 16px; border-radius: 999px; cursor: pointer; font-size: .92rem; font-weight: 600; color: var(--on-charcoal-2); }
.calc .seg input:checked + span { background: var(--charcoal-2); color: var(--on-charcoal); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.calc .seg input:focus-visible + span { outline: 3px solid var(--amber); }
.calc .fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 560px) { .calc .fields { grid-template-columns: 1fr; } }
.calc .field { display: grid; gap: 6px; }
.calc .field label { font-size: .88rem; font-weight: 600; color: var(--on-charcoal-2); }
.calc input[type="number"], .calc select {
  width: 100%; background: var(--charcoal-2); color: var(--on-charcoal); border: 1.5px solid rgba(255, 255, 255, .12); border-radius: 12px;
  padding: 12px 14px; font: inherit; font-size: 1.15rem; font-weight: 650; font-variant-numeric: tabular-nums;
}
.calc input::placeholder { color: #85878e; font-weight: 400; }
.calc input:focus, .calc select:focus { outline: none; border-color: var(--amber); }
.calc .out { display: block; margin-top: 18px; border: 1.5px solid rgba(247, 179, 43, .45); border-radius: 16px; padding: 18px 20px; min-height: 96px; }
.calc .out .lbl { color: var(--on-charcoal-2); font-size: .9rem; font-weight: 600; }
.calc .out .val { font-weight: 850; font-stretch: 75%; font-size: 3rem; line-height: 1.05; font-variant-numeric: tabular-nums; }
.calc .out .pct { color: #f2704a; font-size: 1.6rem; margin-left: 10px; font-stretch: 85%; }
.calc .out .pct.ok { color: #4cc38a; }
.calc .out .note { margin: 8px 0 0; color: #d9d7d1; font-size: .98rem; }
.calc .out .grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 560px) { .calc .out .grid4 { grid-template-columns: repeat(2, 1fr); } }
.calc .out .grid4 .val { font-size: 1.9rem; }
.calc .hint { margin: 14px 0 0; color: var(--on-charcoal-2); font-size: .9rem; }

/* Practice test */
.testbar { position: sticky; top: 68px; z-index: 5; background: var(--paper); border-bottom: 1px solid var(--line); padding: 12px 0; margin-bottom: 22px; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-weight: 650; }
.testbar .meter { flex: 1; height: 8px; background: var(--paper-2); border-radius: 99px; overflow: hidden; max-width: 280px; }
.testbar .meter i { display: block; height: 100%; width: 0; background: var(--red); transition: width .25s ease; }
.result { display: none; background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius-lg); padding: 26px; margin: 26px 0; }
.result.show { display: block; }
.result .score { font-weight: 900; font-stretch: 120%; font-size: 3.2rem; line-height: 1; color: var(--red); }

/* Footer */
footer.site { border-top: 1px solid var(--line); padding: 48px 0 40px; font-size: .95rem; color: var(--ink-2); }
footer.site .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 800px) { footer.site .cols { grid-template-columns: 1fr 1fr; } }
footer.site p.h { font-weight: 800; color: var(--ink); margin-bottom: 10px; font-stretch: 110%; }
footer.site ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
footer.site a { color: var(--ink-2); text-decoration: none; }
footer.site a:hover { color: var(--ink); text-decoration: underline; }
footer.site .legal { margin-top: 36px; font-size: .85rem; color: var(--ink-3); max-width: 90ch; }

/* Plain document pages (support, legal) */
.doc { padding: 48px 0 80px; }
.doc .wrap { max-width: 780px; }
.doc .meta { color: var(--ink-3); font-size: .92rem; }
.toc { background: var(--card); border-radius: var(--radius); padding: 18px 22px; margin: 0 0 28px; border: 1px solid var(--line); }
.toc-title { font-weight: 800; margin-bottom: 6px; }
.toc ol { margin: 0; padding-left: 1.2em; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  header.site, footer.site, .closing, .appcard, .testbar, aside.side { display: none !important; }
  .q { background: #fff; color: #000; box-shadow: none; border: 1px solid #999; break-inside: avoid; }
  .q details { display: block; }
}

/* Phones: most visitors. One column, thumb-sized buttons, shorter visuals. */
@media (max-width: 640px) {
  body { font-size: 17px; }
  .wrap { padding: 0 20px; }
  .hero { padding: 30px 0 0; }
  .hero h1 { font-size: 2.4rem; font-stretch: 104%; line-height: 1.04; margin-bottom: 14px; }
  .hero .lede { font-size: 1.06rem; margin-bottom: 22px; }
  .hero .ctas { flex-direction: column; align-items: stretch; gap: 10px; }
  .hero .ctas .btn { order: -1; justify-content: center; background: var(--ink); color: var(--paper); padding: 15px 20px; }
  .hero .ctas .store { justify-content: center; padding: 12px 20px; background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
  .stage { height: 380px; margin-top: 22px; }
  .phone { box-shadow: 0 30px 60px rgba(40, 30, 20, .22), inset 0 0 0 2px rgba(255, 255, 255, .08); }
  .phone { width: 220px; border-radius: 36px; padding: 8px; }
  .phone img { border-radius: 29px; }
  .stage .f1 { width: 104px; left: -6px; top: 50px; }
  .stage .f2 { width: 96px; right: -4px; top: 30px; }
  .stage .f3, .stage .f4 { display: none; }
  .band { padding: 52px 0 56px; }
  .band .also { flex-direction: column; align-items: center; gap: 10px; margin: 26px 0 20px; }
  .chips li { font-size: .88rem; padding: 7px 14px; }
  .sample, .tools, .faq, .schedule-sec { padding: 52px 0; }
  .sample .wrap { gap: 18px; }
  .q { padding: 20px 16px; border-radius: 18px; }
  .q legend { font-size: 1.05rem; }
  .screens { padding: 52px 0; }
  .strip { grid-auto-columns: 56%; padding: 8px 20px 20px; margin: 18px -20px 0; scroll-padding: 0 20px; }
  .strip img { border-radius: 26px; border-width: 6px; }
  .panel-door { padding: 12px; border-radius: 14px; }
  .directory { padding: 14px 14px 10px; }
  .directory .head small { display: none; }
  .closing { padding: 60px 0 64px; }
  .closing .ctas { flex-direction: column; align-items: stretch; }
  .closing .ctas > * { justify-content: center; }
  .faq summary { font-size: 1.04rem; }
  .article { padding: 24px 0 52px; }
  .article h1 { font-size: 2rem; }
  .answer { padding: 16px 18px; }
  .appcard { grid-template-columns: 1fr; padding: 20px; }
  .appcard img { width: 52px; height: 52px; }
  .calc { padding: 18px 16px; }
  .calc .out .val { font-size: 2.4rem; }
  .testbar { top: 60px; font-size: .92rem; }
  footer.site .cols { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  footer.site .cols > div:first-child { grid-column: 1 / -1; }
}

.statelist { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.statelist a { display: block; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 12px; text-decoration: none; font-weight: 650; background: var(--card); }
.statelist a:hover { border-color: var(--ink); color: var(--ink); }
@media (max-width: 640px) { .statelist { grid-template-columns: 1fr 1fr; } }
@media (min-width: 861px) and (max-width: 1100px) { nav.main { gap: 16px; } nav.main a { font-size: .9rem; } header.site .wrap { gap: 18px; } }
@media (min-width: 861px) { nav.main a[href="/practice-test"] { display: none; } }

.cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 8px 0 28px; }
.cards a { display: grid; gap: 4px; height: 100%; padding: 16px 18px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); text-decoration: none; }
.cards a:hover { border-color: var(--ink); color: var(--ink); }
.cards strong { font-weight: 750; font-stretch: 108%; font-size: 1.05rem; }
.cards span { color: var(--ink-2); font-size: .94rem; line-height: 1.45; }
.qset { margin: 6px 0 10px; }
@media (max-width: 640px) { .cards { grid-template-columns: 1fr; } }
.prose ul.cards, .prose ul.statelist { padding-left: 0; }
.prose ul.cards li, .prose ul.statelist li { margin: 0; }
/* Contrast: small text on paper needs 4.5:1 */
.directory li .no { color: #6b6862; }
.toolgrid .free { color: #1f7a50; }
