/* Site pages (spec v2 section 9): small pieces site.css does not have. */
.step-icon { display: block; width: 40px; height: 40px; margin-bottom: 14px; }
.box-pair, .dots4 { display: flex; gap: 6px; align-items: center; }
.box-pair span { width: 17px; height: 17px; border: 2px solid var(--ink); border-radius: 3px; }
.box-pair span.on { background: var(--signal); border-color: var(--signal); }
.dots4 span { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.dots4 span.on { background: var(--signal); }
.counter-line { margin-top: 20px; font-weight: 600; }
.langs-strip { color: var(--muted); }
.test-card .illo { display: flex; gap: 10px; align-items: center; height: 56px; }
.mini-box { width: 44px; height: 44px; border: 3px solid var(--ink); border-radius: 5px; }
.mini-box.on { background: var(--signal); border-color: var(--signal); }
.illo-rot { width: 96px; height: 48px; }
.gng-mini { width: 32px; height: 32px; display: inline-block; }
.gng-mini.teal-square { background: #1F7A8C; }
.gng-mini.navy-circle { background: #14213D; border-radius: 50%; }
.gng-mini.teal-circle { background: #1F7A8C; border-radius: 50%; }
.status-bars { display: grid; gap: 14px; margin-block: 12px 8px; }
.sbar span { display: block; font-size: 15px; margin-bottom: 6px; }
.sbar .track { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.sbar .fill { height: 100%; width: 0; background: var(--signal); }
.report-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.notes-list .badge { margin-inline-start: 8px; }

/* ================================================================ G (Best hits) page layout, Nov 2026 */
:root { --hair: #DCE1E8; --grey: #AEB6C2; }
.kicker { font-size: 14px; font-weight: 600; color: var(--signal); margin-bottom: 16px; }
.meta { font-size: 14px; color: var(--muted); }
.aside { font-size: 14px; color: var(--muted); margin-top: 24px; }
.more { margin-top: 20px; font-weight: 600; }
.more a { text-underline-offset: 4px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 28px; }

/* Hero (home): navy, the live block test on a phone */
.hero { background: var(--ink); color: #fff; padding-block: 56px; overflow: hidden; }
.hero-in { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero-text { padding-bottom: 0; }
.hero h1 { font-size: clamp(32px, 4.4vw, 46px); font-weight: 700; max-width: 22ch; }
.hero .lead { color: var(--grey); max-width: 44ch; }
.hero .kicker { color: var(--signal-light); }
.hero .meta { color: var(--grey); }
.hstats { display: flex; flex-wrap: wrap; margin-top: 40px; border-top: 1px solid rgba(255,255,255,.18); }
.hstat { padding-block-start: 16px; padding-inline-end: 28px; }
.hstat + .hstat { padding-inline-start: 28px; border-inline-start: 1px solid rgba(255,255,255,.18); }
.hstat b { display: block; font-size: 44px; line-height: 1; letter-spacing: -.03em; color: var(--signal-light); font-weight: 700; }
.hstat span { font-size: 14px; color: var(--grey); font-weight: 600; }
.phone-fig { margin: 0; justify-self: center; width: 100%; max-width: 330px; }
.phone { background: #fff; color: var(--ink); border: 1px solid var(--hair); border-radius: 30px; padding: 10px; }
.ph-bar { background: var(--bg); border-radius: 20px 20px 0 0; padding: 14px 16px 12px; text-align: center; border-bottom: 1px solid var(--hair); }
.ph-bar p { font-size: 12.5px; font-weight: 600; line-height: 1.35; max-width: none; margin: 0; }
.pdots { display: flex; gap: 6px; justify-content: center; margin-bottom: 8px; }
.pdots i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.ph-body { background: var(--bg); border-radius: 0 0 20px 20px; padding: 26px 18px 30px; }
@media (max-width: 860px) {
  .hero-in { grid-template-columns: 1fr; gap: 24px; }
  .hero-in { gap: 32px; }
  .phone-fig { max-width: 300px; }
  .hstat b { font-size: 36px; }
  .hstat { padding-inline-end: 18px; } .hstat + .hstat { padding-inline-start: 18px; }
}

/* Page title band (every other page) */
.page-band { background: var(--ink); color: #fff; }
.page-band .page-head { padding-block: 56px; }
.page-band h1 { font-weight: 700; max-width: 24ch; }
.page-band .lead { color: var(--grey); }

/* Sections: label column on the left, content on the right */
.gsec { padding-block: 64px; border-top: 1px solid var(--hair); }
.gsec.band { background: var(--bg); border-top: 0; }
.gsec.band + .gsec, .page-band + .gsec { border-top: 0; }
.ggrid { display: grid; grid-template-columns: 240px 1fr; gap: 40px; }
.gsh { font-size: 22px; letter-spacing: -.015em; font-weight: 700; margin: 0; }
html[lang="ar"] .gsh { letter-spacing: 0; }
.gbody { min-width: 0; }
.gbody .prose { max-width: 64ch; }
.gbody .prose h2:first-child, .gbody .prose h3:first-child { margin-top: 0; }
.lead-prose p:first-child { font-size: 20px; line-height: 1.5; }
@media (max-width: 860px) { .ggrid { grid-template-columns: 1fr; gap: 20px; } .gsec { padding-block: 48px; } }

/* How it works: three big numbered columns */
.sw-steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.swn { font-size: 40px; font-weight: 700; letter-spacing: -.03em; line-height: 1; margin-bottom: 14px; }
.sw-steps .swn { color: var(--signal); }
.sw-steps h3 { font-size: 18px; }
.sw-steps p:not(.swn), .sw-cols p:not(.swn) { color: var(--muted); }
@media (max-width: 860px) { .sw-steps { grid-template-columns: 1fr; gap: 22px; } }

/* The four tests: numbered columns, each with its live demo */
.sw-cols { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px; }
.sw-cols li { position: relative; }
.sw-cols li + li::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: -20px; border-inline-start: 1px solid var(--hair); }
.sw-cols h3 { font-size: 17px; margin: 14px 0 4px; }
.sw-cols p:not(.swn) { font-size: 14.5px; }
.sw-cols .ttime { font-size: 13px; margin-top: 8px; }
@media (max-width: 980px) { .sw-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 32px; } .sw-cols li:nth-child(3)::before { display: none; } .sw-cols li + li::before { inset-inline-start: -16px; } }
@media (max-width: 460px) { .sw-cols { gap: 24px; } .sw-cols li + li::before { inset-inline-start: -12px; } .sw-cols p:not(.swn):not(.ttime) { display: none; } .swn { font-size: 30px; } }

/* Tests page rows and Method rows */
.tlist { list-style: none; }
.trow { display: grid; grid-template-columns: 150px 1fr auto; gap: 28px; align-items: center; padding-block: 22px; border-bottom: 1px solid var(--hair); }
.trow h2 { font-size: 20px; margin: 0 0 4px; }
.trow p { color: var(--muted); }
.ttime { font-size: 14px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .trow { grid-template-columns: 110px 1fr; gap: 18px; } .trow .ttime { grid-column: 2; margin-top: -12px; } }
.mrow { display: grid; grid-template-columns: 220px 1fr; gap: 40px; padding-block: 36px; border-bottom: 1px solid var(--hair); }
.mrow:first-child { padding-top: 0; }
.mrow h2 { font-size: 22px; margin: 0 0 10px; }
.mrow p { color: var(--muted); }
@media (max-width: 700px) { .mrow { grid-template-columns: 1fr; gap: 18px; } .mrow .dm-wrap { max-width: 220px; } }

/* Live demos: the tests' real colours and geometry */
.dm-wrap { background: var(--bg); padding: 14px; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; }
.band .dm-wrap { background: #fff; }
.dm { width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.dm-note { font-size: 12px; font-weight: 600; color: var(--signal); min-height: 1.4em; font-variant-numeric: tabular-nums; margin: 0; max-width: none; }
.dm-note.wait { color: var(--muted); font-weight: 500; }
.dm-rt .rt-box { position: relative; width: 58%; aspect-ratio: 1; border: 3px solid var(--ink); border-radius: 4px; background: #fff; }
.dm-rt .rt-box.go { background: var(--signal); border-color: var(--signal); }
.dm-gng .gslot { width: 62%; aspect-ratio: 1; position: relative; display: flex; align-items: center; justify-content: center; }
.gshape { width: 56%; aspect-ratio: 1; display: block; visibility: hidden; }
.gshape.on { visibility: visible; }
.gshape.teal { background: var(--signal); } .gshape.navy { background: var(--ink); } .gshape.ci { border-radius: 50%; }
.gfix { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--grey); }
.gshape.on ~ .gfix { display: none; }
.dm-rot { flex-direction: row; gap: 8%; }
.rcell { width: 44%; aspect-ratio: 1; background: #fff; border: 1px solid var(--hair); border-radius: 10px; padding: 8%; }
.fshape { width: 100%; height: 100%; fill: var(--ink); stroke: #fff; stroke-width: .6; }
.rr { transform-origin: 50% 50%; }
.dm-corsi .cue { font-size: 12px; font-weight: 600; min-height: 1.4em; margin: 0; max-width: none; }
.ph-body .cue { font-size: 13px; }
.cb { position: relative; width: 100%; aspect-ratio: 1; background: #fff; border: 1px solid var(--hair); border-radius: 10px; }
.cb i { position: absolute; width: 16%; height: 16%; border-radius: 12%; background: var(--ink); }
.cb i.lit { background: var(--signal); }
.tap { position: absolute; width: 20%; height: 20%; margin: -10% 0 0 -10%; border-radius: 50%; border: 2px solid var(--signal); pointer-events: none; animation: cq-tap .5s ease-out forwards; }
.rt-box .tap { width: 60%; height: 60%; margin: -30% 0 0 -30%; border-color: #fff; }
@keyframes cq-tap { from { opacity: .9; transform: scale(.5); } to { opacity: 0; transform: scale(1.15); } }

/* Facts table and FAQ */
.facts { border-top: 2px solid var(--ink); margin: 0; }
.facts > div { display: grid; grid-template-columns: 160px 1fr; gap: 16px; padding-block: 16px; border-bottom: 1px solid var(--hair); }
.facts dt { font-size: 14px; font-weight: 600; color: var(--muted); padding-top: 2px; }
.facts dd { margin: 0; }
@media (max-width: 600px) { .facts > div { grid-template-columns: 1fr; gap: 4px; } }
.faq { border-top: 2px solid var(--ink); }
.faq-item { border-bottom: 1px solid var(--hair); }
.faq-item summary { cursor: pointer; list-style: none; padding: 18px 32px 18px 0; font-weight: 700; position: relative; }
html[dir="rtl"] .faq-item summary { padding: 18px 0 18px 32px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; inset-inline-end: 4px; top: 14px; font-size: 22px; font-weight: 500; color: var(--signal); }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { color: var(--muted); padding-bottom: 18px; margin: 0; }

/* Closing band */
.closer { background: var(--bg); text-align: center; border-top: 0; }
.closer .wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.closer-h { font-size: clamp(22px, 3vw, 28px); font-weight: 700; letter-spacing: -.015em; max-width: none; }

/* Fade in once while scrolling (only when demos.js runs) */
@media (prefers-reduced-motion: no-preference) {
  html.rv-on .rv { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
  html.rv-on .rv.seen { opacity: 1; transform: none; }
}
.post, .notfound { padding-block: 48px 80px; }
/* Numbered rows (Research questions): thin lines, not the old cards */
.gbody .steps { display: block; margin-top: 0; list-style: none; }
.gbody .steps li { display: grid; grid-template-columns: 48px 1fr; gap: 8px; padding: 20px 0; border: 0; border-bottom: 1px solid var(--hair); border-radius: 0; background: none; }
.gbody .steps li:first-child { padding-top: 0; }
.gbody .steps .n { font-size: 26px; line-height: 1.1; color: var(--signal); }
.gbody .steps h3 { font-size: 18px; margin-bottom: 2px; }
.gbody .steps p { color: var(--muted); }

/* Arabic on site pages: Arabic letterforms read smaller than Latin at the same size, so labels and
   small text go up a step. consent-info keeps its sizes (consent text is not changed). */
html[lang="ar"] body:not([data-page="consent-info"]) main { font-size: 17px; }
html[lang="ar"] .kicker, html[lang="ar"] .facts dt, html[lang="ar"] .meta, html[lang="ar"] .aside,
html[lang="ar"] .ttime, html[lang="ar"] .sw-cols .ttime, html[lang="ar"] .sw-cols p:not(.swn), html[lang="ar"] .hstat span { font-size: 15px; }

/* ================================================================ Design pass 2 (17 Nov 2026): layout and styling only */
/* 1. Every demo preview is the same square: block memory's "Watch" line and board fit inside it
   (the board stays square, just smaller), so the four test titles line up. */
.dm-wrap > .dm { height: 100%; }
.dm-wrap .dm-corsi .cb { width: auto; height: calc(100% - 1.4em - 8px); aspect-ratio: 1; }
/* 2. Tests page: the duration sits under the description at every width, not 200px away at the far edge. */
.trow { grid-template-columns: 150px 1fr; grid-template-rows: auto auto; row-gap: 0; align-items: start; }
.trow .dm-wrap { grid-row: 1 / span 2; }
.trow .tbody { align-self: end; }
.trow .ttime { grid-column: 2; margin-top: 8px; }
@media (max-width: 640px) { .trow { grid-template-columns: 110px 1fr; } .trow .ttime { margin-top: 6px; } }
/* 3. One number style on every page (How it works, the four tests, Research questions): navy, bold, one size,
   no leading zero. Teal is kept for the button and links. */
.swn, .sw-steps .swn, .gbody .steps .n { font-size: 32px; font-weight: 700; letter-spacing: -.03em; line-height: 1; color: var(--ink); }
.gbody .steps li { grid-template-columns: 52px 1fr; }
@media (max-width: 460px) { .swn { font-size: 28px; } }
/* 4. One body text colour: descriptions, Method's test text, Research questions and FAQ answers in navy ink like
   every other section. Grey stays for captions only (durations, meta lines, asides). */
.sw-steps p:not(.swn):not(.ttime), .sw-cols p:not(.swn):not(.ttime), .trow .tbody p, .mrow p, .gbody .steps p, .faq-item p { color: var(--ink); }
/* 5. Section rhythm: one grey block per page (white elsewhere, set in scripts/pages3.py), and a section that is a
   single short paragraph gets less padding instead of a 200px band. */
.gsec:has(.gbody > .prose > p:only-child) { padding-block: 40px; }
@media (max-width: 860px) { .gsec:has(.gbody > .prose > p:only-child) { padding-block: 32px; } }
/* 6. Lab Notes and Lab reports: the list (or "No notes yet.") gets normal section padding instead of touching the title band. */
.list-sec { padding-block: 56px 80px; }
@media (max-width: 860px) { .list-sec { padding-block: 40px 64px; } }
/* 7. Language picker on site pages: plain words, the current one white and underlined, no boxes or teal fill, so
   the navigation stays the loudest thing in the header. (pages.css isn't loaded on /test, which keeps its picker.) */
body:not([data-strict]) .site-header .lang-picker { border: 0; border-radius: 0; gap: 2px; overflow: visible; }
body:not([data-strict]) .site-header .lang-opt { border: 0; padding: 6px 8px; line-height: 1.4; font-size: 14px; color: #AEB6C2; background: none; text-decoration: none; text-underline-offset: 6px; text-decoration-thickness: 2px; }
body:not([data-strict]) .site-header .lang-opt + .lang-opt { border-inline-start: 0; }
body:not([data-strict]) .site-header .lang-opt[aria-current="true"] { background: none; color: #fff; text-decoration: underline; }
body:not([data-strict]) .site-header .lang-opt:hover:not([aria-current="true"]) { color: #fff; }
html[lang="ar"] body:not([data-strict]) .site-header .lang-opt { font-size: 15px; }
/* Click-to-copy email (About, For researchers): ordinary selectable text with a dotted underline, "Copied" beside it. */
.copy-email { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 4px; user-select: text; -webkit-user-select: text; }
.copy-email:hover { text-decoration-style: solid; }
.copy-note { margin-inline-start: 8px; font-size: 14px; font-weight: 600; color: var(--signal); }
.copy-note:empty { margin: 0; }

/* Method: facts table per test, exclusion lists, references */
.mfacts { margin-top: 18px; }
.mfacts > div { grid-template-columns: 140px 1fr; padding-block: 10px; }
.mfacts dd { color: var(--ink); }
@media (max-width: 600px) { .mfacts > div { grid-template-columns: 1fr; } }
.mexh { font-size: 16px; margin: 22px 0 8px; }
.mrefs { list-style: none; padding-inline-start: 0; }
.mrefs li { padding-inline-start: 2em; text-indent: -2em; }

/* ================================================================ Design polish (18 Nov 2026): layout and styling only */
/* 1. Keyboard focus on the navy header, hero, title band and footer: the light teal ring, because the dark teal
   ring used elsewhere only just clears 3:1 on navy and is hard to spot. */
.site-header :focus-visible, .hero :focus-visible, .page-band :focus-visible, .site-footer :focus-visible { outline-color: var(--signal-light); }
/* 2. Footer links are at least 24px tall to tap (WCAG 2.2 target size), with the same overall spacing as before. */
.site-footer nav { row-gap: 4px; }
.site-footer nav a { display: inline-block; padding-block: 2px; }
/* 3. Home, the four tests: durations line up along one baseline across the columns, whatever the description length. */
.sw-cols li { display: flex; flex-direction: column; }
.sw-cols .ttime { margin-top: auto; padding-top: 8px; }
/* 4. Hover states: text links in page content get a thicker underline, and FAQ questions turn teal, so everything
   clickable answers the pointer the way buttons and the menu already do. */
main a:not(.btn):hover { text-decoration-thickness: 2px; }
.faq-item summary { transition: color .15s; }
.faq-item summary:hover { color: var(--signal); }
/* 5. Home: one heading style for every section. "How it works" and "The four tests" use the same large section
   heading as the rest (no small label over a rule), set above their full-width columns. */
.gsh-above { margin-bottom: 32px; }
@media (max-width: 860px) { .gsh-above { margin-bottom: 24px; } }
/* 6. Every link in body text is teal, on every page (the home "How each test works" and the links in the facts
   tables were navy). Links on the navy hero and title bands, if any are added, keep the band's own colour. */
main :is(p, li, dd, td) a:not(.btn) { color: var(--signal); }
main :is(.hero, .page-band) :is(p, li, dd, td) a:not(.btn) { color: inherit; }
