/* Civic Mosaic reading pages (US, UK, method, FAQ, support, privacy): the home page's identity in a reading layout, a
   masthead on the world (navy, or light in the light theme) and then a reading sheet in the same theme. Shared rules are in base.css; colours
   and fonts come from tokens.css. Body text 18px at 1.6, lines of about 65 characters. */

/* ---------- Masthead: on the world, lit as the home's hero is ---------- */
.page main { position: relative; }
.page main::before {
  content: ''; position: absolute; inset: 0 0 auto; height: min(760px, 100%); pointer-events: none;
  background:
    radial-gradient(48% 62% at 80% 22%, rgb(79 70 229 / calc(0.3 * var(--glow-a))), rgb(79 70 229 / 0) 72%),
    linear-gradient(var(--world-far), var(--world) 72%);
}
.masthead {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 32px 64px;
  max-width: 1200px; margin-inline: auto; padding: 136px var(--margin) clamp(40px, 6vw, 72px);
}
.mast-copy { display: grid; gap: 20px; max-width: 44rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; list-style: none; padding: 0; font-size: 0.9375rem; color: var(--on-world-muted); }
.crumbs li + li::before { content: '/'; margin-right: 8px; }
.crumbs a { color: var(--on-world); }
.masthead h1 { font-size: clamp(2.25rem, 1.4rem + 2.8vw, 3.75rem); line-height: 1.04; letter-spacing: -0.03em; }
.lede { font-size: clamp(1.125rem, 1rem + 0.4vw, 1.3125rem); color: var(--on-world-muted); max-width: 40rem; }

/* The bank as the app's map shows it: one tile per question, in its topic's colour, on navy in both themes. */
.bank-map { display: grid; gap: 10px; justify-items: start; }
.bank-tiles { display: grid; grid-template-columns: repeat(16, 15px); gap: 4px; padding: 16px; border-radius: 20px; background: var(--map-tiles); }
.bank-tiles i { aspect-ratio: 1; border-radius: 3px; background: var(--c); }
.bank-caption { font-size: 0.9375rem; color: var(--on-world-muted); }

/* ---------- The reading sheet ---------- */
.sheet-page { position: relative; z-index: 1; padding-inline: var(--margin); margin-bottom: clamp(64px, 10vw, 128px); }
.sheet-body {
  max-width: 1200px; margin-inline: auto; padding: clamp(28px, 5.5vw, 80px);
  border-radius: 28px; background: var(--surface); color: var(--ink);
  box-shadow: 0 50px 90px -50px var(--drop-sheet);
}
.sheet-body ::selection { background: var(--selected); color: var(--ink); }
.sheet-body :focus-visible { outline-color: var(--indigo); }
.sheet-body a:not(.btn) { color: var(--indigo); } /* A link styled as a button keeps its own label colour. */
.sheet-body a[href^="mailto:"] { overflow-wrap: anywhere; }
.sheet-body p, .sheet-body ul:not([class]), .sheet-body ol:not([class]), .qa, .toc, .notice { max-width: 68ch; }
.sheet-body p + p, .sheet-body p + ul, .sheet-body ul + p { margin-top: 16px; }
.sheet-body ul:not([class]), .sheet-body ol:not([class]) { display: grid; gap: 8px; padding-left: 1.4em; }
.small { font-size: 0.9375rem; color: var(--muted); }
.notice { margin-top: 28px; padding: 14px 18px; border-radius: 14px; background: var(--ground); font-size: 1rem; }

.toc { padding: 18px 22px; border-radius: 18px; border: 1.5px solid var(--line); }
.toc h2 { font-size: 1rem; }
.sheet-body .toc ol { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 6px; padding: 0; list-style: none; }
.toc a { display: inline-block; padding-block: 4px; font-weight: 700; }

.prose-section { margin-top: clamp(48px, 6vw, 80px); scroll-margin-top: 24px; }
.prose-section h2, .sources-box h2 { margin-bottom: 18px; font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem); line-height: 1.08; letter-spacing: -0.02em; }
.prose-section h3 { margin: 32px 0 10px; font-size: 1.3125rem; line-height: 1.25; }

/* Topics: the same rows as the home's coverage cards. */
.topics { display: grid; gap: 14px; max-width: 40rem; margin-top: 20px; padding: 0; list-style: none; }
.topics li { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: baseline; }
.tp-name { display: inline-flex; align-items: baseline; gap: 10px; font-weight: 700; }
.tp-name .sw { transform: translateY(1px); }
.tp-count { font-weight: 800; font-variant-numeric: tabular-nums; }
.strip { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 3px; }
.strip i { width: 10px; height: 10px; border-radius: 2.5px; background: var(--c); }

/* Sample questions, answerable on the page (practice.js) or revealed without JavaScript. */
.practice-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 20px; margin-top: 24px; }
.practice { display: grid; gap: 14px; align-content: start; padding: 20px; border-radius: 20px; background: var(--ground); scroll-margin-top: 24px; }
.practice .chip { justify-self: start; }
.practice .q-text { font-size: 1.1875rem; }
.practice .quiz-actions .btn--primary { width: auto; }
.practice .reveal summary { justify-content: flex-start; min-height: 44px; }
.practice .reveal-body { font-size: 1rem; }
.practice .quiz-after { justify-content: flex-start; }
html:not(.js) .practice .quiz-actions { display: none; }

.sources-box { display: grid; gap: 16px; margin-top: clamp(48px, 6vw, 80px); padding: clamp(20px, 3vw, 32px); border-radius: 22px; background: var(--ground); }
.sources-box h2 { margin-bottom: 0; }
.sources-box dl { display: grid; gap: 14px; }
.sources-box dt { font-size: 0.9375rem; font-weight: 800; }

.table-wrap { max-width: 100%; overflow-x: auto; }
.sheet-body table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 1rem; }
.sheet-body caption { margin-bottom: 10px; text-align: left; font-size: 0.9375rem; color: var(--muted); }
.sheet-body th, .sheet-body td { padding: 10px 16px 10px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.sheet-body thead th { font-size: 0.875rem; color: var(--muted); }
.sheet-body tbody th { font-weight: 700; }

.qa { padding-block: 20px; border-top: 1px solid var(--line); scroll-margin-top: 24px; }
.qa h3 { margin: 0 0 8px; font-size: 1.1875rem; }

.contact { margin-top: 20px; }
.btn--inline { width: auto; }

.page-end { display: grid; gap: 12px; margin-top: clamp(48px, 6vw, 80px); padding-top: 28px; border-top: 1px solid var(--line); }
.page-end .status { color: var(--indigo); }
.page-end .status-dot { background: var(--indigo); }

/* The privacy policy, rendered from its Markdown source. */
.md h2 { margin: 36px 0 10px; font-size: 1.5rem; line-height: 1.2; }
.md h2:first-child { margin-top: 0; }
.md-note { color: var(--muted); font-size: 1rem; }
/* The policy names the support address and the site's domain in plain text: at large text sizes they may wrap rather than
   widen the page. */
.md { overflow-wrap: anywhere; }

/* ---------- Phone and tablet ---------- */
@media (max-width: 1023px) {
  .masthead { grid-template-columns: minmax(0, 1fr); padding-top: 128px; }
  .bank-map { justify-items: stretch; max-width: 420px; }
  .bank-tiles { grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 3px; padding: 12px; }
}
@media (max-width: 600px) {
  .sheet-body { padding: 24px 18px; border-radius: 22px; }
  .practice { padding: 16px 14px; }
}
