/* ==========================================================================
   Countly — shared web stylesheet ("precision instrument" identity).
   Ported from the owner-approved Passport Power design (passport-power.css):
   warm paper, ink, one cobalt accent, hairlines over white surfaces. Shared by
   every page that uses the Journal chrome — the Journal (index + article), the
   day Calculator, the Rules explainers, and the Answers Q&A.
   Fonts: General Sans everywhere (Fontshare), IBM Plex Mono only inside chip /
   stamp / plaque artifact accents. Loaded per page in <head>.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --paper: #F6F4EF; --surface: #FFFFFF;
  --ink: #171612; --ink-2: #595550; --ink-3: #7C7564;
  --hairline: #E7E3DA; --hairline-2: #D9D4C7;
  --cobalt: #2741E6; --wash: rgba(39, 65, 230, 0.08);
  --pos: #1E7A46; --warn: #B45309; --danger: #C9302B;

  --maxw: 1280px;
  --measure: 70ch;
  --toolbar-h: 64px;
  --radius: 16px;
  --radius-sm: 12px;
  --radius-xs: 10px;

  --sans: 'General Sans', 'Helvetica Neue', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 1px 2px rgba(23,22,18,0.05), 0 18px 44px -24px rgba(23,22,18,0.22);
}

html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: 'tnum';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
::selection { background: var(--wash); }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--cobalt); outline-offset: 3px; border-radius: 4px;
}

/* Visually-hidden helper for SEO H1s that live in art */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip-link { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 0 0 8px 0; font-size: 13px; }
.skip-link:focus { left: 0; }

.shell { max-width: var(--maxw); margin: 0 auto; padding: 0 48px; }
@media (max-width: 760px) { .shell { padding: 0 20px; } }

/* The functional label voice: sentence case, small sans, ink-3. The shouty
   letterspaced-caps voice is retired site-wide; caps + mono survive only inside
   the chip / stamp artifact families (.tag, .stamp, mono plaques). */
.eyebrow { font-size: 12.5px; font-weight: 500; letter-spacing: 0.01em; color: var(--ink-3); text-transform: none; }
.eyebrow--light { color: var(--ink-3); }

/* .display doubles as hero H1 and section H2 across every page. General Sans
   600, tight tracking, ink; <em> becomes a non-italic cobalt accent. */
.display { font-family: var(--sans); font-weight: 600; line-height: 1.05; letter-spacing: -0.025em; text-wrap: balance; margin: 0; color: var(--ink); }
.display em, .display i { font-style: normal; color: var(--cobalt); }

.lede { font-family: var(--sans); font-weight: 400; font-size: 17px; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.lede b { font-weight: 600; color: var(--ink); }

/* .band is now a neutral positioning context. The old dusk gradient / grain /
   drift are gone; heroes sit on paper, CTA bands paint their own ink fill. */
.band { position: relative; }

/* ==========================================================================
   Toolbar (pp-parity: paper, sticky, hairline, mark + wordmark + seg nav)
   ========================================================================== */
.toolbar { position: sticky; top: 0; z-index: 40; background: var(--paper); border-bottom: 1px solid var(--hairline-2); height: var(--toolbar-h); }
.toolbar .shell { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); flex: none; }
/* Countly app mark — near-black ink, transparent interior; reads on paper + white alike. */
.clogo { flex: none; display: block; width: 30px; height: 30px; }
.clogo.dsm { width: 22px; height: 22px; }
.brand .brandtext { display: flex; flex-direction: column; min-width: 0; }
.brand .word { font-weight: 600; font-size: 17px; letter-spacing: -0.02em; line-height: 1.1; }
.brand .by { font-size: 11.5px; font-weight: 500; color: var(--ink-3); margin-top: 1px; }

.seg { display: flex; align-items: center; gap: 2px; margin-left: auto; border: 1px solid var(--hairline-2); border-radius: 12px; padding: 3px; background: var(--surface); }
.seg a { padding: 7px 14px 6px; border-radius: 9px; font-size: 13px; font-weight: 500; letter-spacing: 0.01em; color: var(--ink-2); white-space: nowrap; transition: color 0.18s var(--ease), background 0.18s var(--ease); }
.seg a:hover { color: var(--ink); }
.seg a.on { background: var(--wash); color: var(--cobalt); }

/* language dropdown (quiet details, pp langwrap) — used by the blog index strip */
.langbar { background: var(--paper); border-bottom: 1px solid var(--hairline); }
.langbar__row { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 10px 0; }
.langbar__label { font-size: 12.5px; font-weight: 500; letter-spacing: 0.01em; color: var(--ink-3); }
.langwrap { position: relative; }
.langwrap > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; letter-spacing: 0.01em; color: var(--ink); border: 1px solid var(--hairline-2); background: var(--surface); border-radius: 10px; padding: 7px 12px; }
.langwrap > summary::-webkit-details-marker { display: none; }
.langwrap[open] > summary { border-color: var(--cobalt); color: var(--cobalt); }
.langmenu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--hairline-2); border-radius: 12px; padding: 6px; z-index: 30; min-width: 168px; max-height: 60vh; overflow: auto; box-shadow: 0 12px 34px rgba(23,22,18,0.12); }
.langmenu a { display: block; padding: 8px 12px; border-radius: 8px; font-size: 13px; font-weight: 500; letter-spacing: 0.01em; color: var(--ink-2); }
.langmenu a:hover, .langmenu a.is-active, .langmenu a[aria-current="page"] { background: var(--wash); color: var(--cobalt); }

@media (max-width: 760px) {
  :root { --toolbar-h: 56px; }
  .toolbar .shell { gap: 10px; }
  .brand .brandtext { display: none; }
  .brand .clogo { width: 28px; height: 28px; }
  /* seg becomes a horizontally scrollable strip so all five sections stay reachable;
     left-aligned so the active section tab is always visible (Passport Power scrolls in). */
  .seg { margin-left: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; border: 0; background: transparent; padding: 0; gap: 2px; justify-content: flex-start; }
  .seg::-webkit-scrollbar { display: none; }
  .seg a { flex: none; padding: 7px 10px; font-size: 12.5px; }
}

/* ==========================================================================
   Index hero (paper, ink, cobalt accent, faint instrument dot-field)
   ========================================================================== */
.hero { padding: 64px 0 44px; position: relative; isolation: isolate; overflow: clip; }
.hero__inner { max-width: 60ch; position: relative; z-index: 1; }
.hero::after {
  content: ""; position: absolute; right: -30px; top: 30px; width: 440px; height: 240px; z-index: -1; pointer-events: none;
  background-image: radial-gradient(var(--ink-3) 1.5px, transparent 1.5px);
  background-size: 11px 11px; opacity: 0.22;
  -webkit-mask-image: radial-gradient(ellipse 65% 85% at 68% 45%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 65% 85% at 68% 45%, #000 30%, transparent 75%);
}
.hero .display { margin-top: 16px; font-size: clamp(38px, 5.4vw, 62px); }
.hero .lede { margin-top: 20px; max-width: 54ch; font-size: clamp(16px, 2vw, 19px); }
@media (max-width: 760px) { .hero { padding: 36px 0 26px; } .hero::after { display: none; } }

/* ==========================================================================
   Category filter row (pp filter chips)
   ========================================================================== */
.filters { position: sticky; top: var(--toolbar-h); z-index: 30; background: var(--paper); border-bottom: 1px solid var(--hairline); }
.filters__row { display: flex; gap: 9px; overflow-x: auto; padding: 14px 0; scrollbar-width: none; }
.filters__row::-webkit-scrollbar { display: none; }
.pill { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 500; letter-spacing: 0.01em; white-space: nowrap; padding: 8px 15px; border-radius: 999px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--hairline-2); transition: border-color 0.18s var(--ease), color 0.18s var(--ease), background 0.18s var(--ease); }
.pill:hover { border-color: var(--ink-3); color: var(--ink); }
.pill[aria-current="page"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pill__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cat, var(--cobalt)); }
.pill[aria-current="page"] .pill__dot { background: currentColor; }

/* ==========================================================================
   Article grid + cards (white surface, hairline, hover cobalt)
   ========================================================================== */
.grid { display: grid; gap: 22px; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 40px 0 26px; }
@media (max-width: 980px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }
@media (max-width: 640px)  { .grid { grid-template-columns: 1fr; gap: 18px; padding-top: 30px; } }

.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden; color: inherit; transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), border-color 0.28s var(--ease); }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--cobalt); }
.card--featured { grid-column: span 2; }
@media (max-width: 640px) { .card--featured { grid-column: span 1; } }

.card__media { position: relative; aspect-ratio: 1200 / 630; overflow: hidden; border-bottom: 1px solid var(--hairline); background: var(--paper); }
.card__media > svg, .card__media > img, .card__media .ph, .card__media > .hero-svg { width: 100%; height: 100%; display: block; object-fit: cover; }
.card--featured .card__media { aspect-ratio: 16 / 7; }
.hero-svg { display: block; }
.hero-svg > svg { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Coloured placeholder hero (when no svg/image is supplied) */
.ph { position: relative; display: flex; align-items: center; justify-content: center; padding: 8% 9%; text-align: center; isolation: isolate; background: linear-gradient(150deg, color-mix(in oklab, var(--cat, var(--cobalt)) 16%, var(--paper)) 0%, var(--surface) 100%); }
.ph__title { font-family: var(--sans); font-weight: 600; letter-spacing: -0.02em; color: var(--ink); line-height: 1.16; font-size: clamp(19px, 2.2vw, 27px); text-wrap: balance; }
.card--featured .ph__title { font-size: clamp(24px, 3vw, 36px); }

.card__body { display: flex; flex-direction: column; gap: 10px; padding: 20px 20px 22px; flex: 1; }
.card--featured .card__body { padding: 26px 28px 28px; }
.card__title { font-family: var(--sans); font-weight: 600; font-size: 18.5px; line-height: 1.24; letter-spacing: -0.01em; margin: 0; color: var(--ink); transition: color 0.2s var(--ease); }
.card--featured .card__title { font-size: clamp(22px, 2.4vw, 29px); }
.card:hover .card__title { color: var(--cobalt); }
.card__excerpt { font-size: 14px; line-height: 1.5; color: var(--ink-3); margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card__foot { margin-top: auto; padding-top: 4px; display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--ink-3); }

/* Category chip — a quiet mono stamp with a category-colour dot */
.tag { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 8px; border-radius: 6px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--hairline-2); }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cat, var(--cobalt)); flex: none; }
.dot-sep { color: var(--hairline-2); }
.lang-chip { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.02em; color: var(--ink-3); }

/* ==========================================================================
   Pagination + buttons
   ========================================================================== */
.pager { display: flex; align-items: center; justify-content: center; gap: 20px; padding: 16px 0 80px; }
.pager__count { font-size: 13px; color: var(--ink-3); letter-spacing: 0.01em; }
.btn-ghost { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; letter-spacing: 0.01em; color: var(--ink); padding: 11px 20px; border-radius: var(--radius-xs); border: 1px solid var(--hairline-2); background: var(--surface); transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease); }
.btn-ghost:hover { border-color: var(--cobalt); color: var(--cobalt); transform: translateY(-1px); }

.btn-primary { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; letter-spacing: 0.01em; color: #fff; padding: 12px 22px; border-radius: var(--radius-xs); background: var(--cobalt); border: 1px solid var(--cobalt); transition: filter 0.2s var(--ease), transform 0.2s var(--ease); }
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }

/* ==========================================================================
   Closing CTA band — dark ink plate (pp appband feel), used by calc/rules/answers
   ========================================================================== */
.calc-cta { position: relative; isolation: isolate; overflow: clip; background: var(--ink); color: #F1EEE6; border-radius: 0; padding: clamp(48px, 7vw, 80px) 0; margin-top: 8px; }
.calc-cta::after {
  content: ""; position: absolute; right: -60px; top: 50%; transform: translateY(-50%); width: 320px; height: 320px; z-index: -1; pointer-events: none; border-radius: 50%;
  background-image: radial-gradient(rgba(241,238,230,0.5) 1.6px, transparent 1.6px);
  background-size: 13px 13px; opacity: 0.5;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 0 62%, transparent 100%);
  mask-image: radial-gradient(circle at 50% 50%, #000 0 62%, transparent 100%);
}
.calc-cta__inner { max-width: 660px; margin: 0 auto; text-align: center; position: relative; z-index: 1; }
.calc-cta .display { color: #F1EEE6; font-size: clamp(26px, 3.4vw, 38px); }
.calc-cta .display em { color: #8E9BFF; }
.calc-cta .lede { color: #A7A296; margin-top: 12px; }
.calc-cta__row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.calc-cta .btn-ghost { background: rgba(255,255,255,0.06); border-color: rgba(241,238,230,0.34); color: #F1EEE6; }
.calc-cta .btn-ghost:hover { background: rgba(255,255,255,0.14); border-color: rgba(241,238,230,0.6); color: #fff; }
@media (max-width: 480px) { .calc-cta::after { opacity: 0.35; right: -110px; } }

/* ==========================================================================
   Empty state
   ========================================================================== */
.empty { margin: 40px 0 88px; padding: 64px 30px; text-align: center; border: 1px solid var(--hairline); border-radius: var(--radius); background: var(--surface); color: var(--ink-3); }
.empty .display { color: var(--ink); font-size: 28px; margin-bottom: 10px; }

/* ==========================================================================
   Article page
   ========================================================================== */
.article-hero { padding: 52px 0 40px; position: relative; }
.article-hero__inner { max-width: 60ch; }
.article-hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-3); margin-bottom: 20px; }
.article-author { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--hairline-2); text-underline-offset: 3px; }
.article-author:hover { color: var(--cobalt); text-decoration-color: var(--cobalt); }
.article-hero .tag { color: var(--ink-2); }
.article-hero__title { font-family: var(--sans); font-weight: 600; font-size: clamp(32px, 4.6vw, 52px); line-height: 1.05; letter-spacing: -0.025em; text-wrap: balance; margin: 0; color: var(--ink); }
.article-hero__sub { font-family: var(--sans); font-weight: 400; font-size: clamp(17px, 2.1vw, 21px); line-height: 1.5; margin-top: 18px; max-width: 56ch; color: var(--ink-2); }

/* "Read in" language switcher (on the light article hero) */
.langsw { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 24px; }
.langsw__label { font-size: 12px; font-weight: 500; letter-spacing: 0.01em; color: var(--ink-3); margin-right: 4px; }
.langsw__item { color: var(--ink-2); font-size: 13px; font-weight: 500; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--hairline-2); background: var(--surface); transition: border-color 0.18s var(--ease), color 0.18s var(--ease); }
.langsw__item:hover { border-color: var(--cobalt); color: var(--cobalt); }
.langsw__item--cur { background: var(--wash); color: var(--cobalt); border-color: transparent; }

.article-figure { background: var(--paper); border-bottom: 1px solid var(--hairline); }
.article-figure__inner { max-width: var(--maxw); margin: 0 auto; }
.article-figure__inner > img,
.article-figure__inner > .hero-svg,
.article-figure__inner > .hero-svg > svg { display: block; width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; }

.article-layout { display: grid; gap: 52px; grid-template-columns: minmax(0, 1fr) 300px; padding: 48px 0 40px; }
@media (max-width: 940px) { .article-layout { grid-template-columns: 1fr; gap: 44px; padding-top: 38px; } }
.article-body { min-width: 0; }
.source-note { font-size: 13.5px; color: var(--ink-3); margin: 0 0 6px; }
.source-note a { color: var(--cobalt); text-underline-offset: 2px; }

/* Platform-owned legal notice. It is rendered before every Countly article in
   the article locale and excluded from snippets with data-nosnippet. */
.article-disclaimer { max-width: var(--measure); margin: 0 0 28px; padding: 18px 20px; border: 1px solid var(--hairline-2); border-left: 3px solid var(--cobalt); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink-2); font-size: 13.5px; line-height: 1.55; }
.article-disclaimer strong { display: block; margin-bottom: 5px; color: var(--ink); font-size: 13px; font-weight: 600; }
.article-disclaimer p { margin: 0; }

/* ==========================================================================
   Prose — clean sans reading measure (17px / 1.7)
   ========================================================================== */
.prose { font-family: var(--sans); font-weight: 400; font-size: 17px; line-height: 1.7; color: var(--ink-2); max-width: var(--measure); }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { font-family: var(--sans); font-weight: 600; font-size: 1.5em; line-height: 1.2; letter-spacing: -0.02em; margin-top: 1.9em; margin-bottom: 0.15em; color: var(--ink); }
.prose h3 { font-family: var(--sans); font-weight: 600; font-size: 1.18em; line-height: 1.28; letter-spacing: -0.01em; margin-top: 1.6em; margin-bottom: 0.15em; color: var(--ink); }
.prose h2 + p, .prose h3 + p { margin-top: 0.5em; }
.prose p { text-wrap: pretty; }
.prose a { color: var(--cobalt); text-decoration: underline; text-decoration-color: color-mix(in oklab, var(--cobalt) 34%, transparent); text-underline-offset: 3px; text-decoration-thickness: 1px; transition: text-decoration-color 0.2s var(--ease); }
.prose a:hover { text-decoration-color: var(--cobalt); }
.prose strong { font-weight: 600; color: var(--ink); }
.prose em { font-style: italic; }
.prose mark, .prose .w-highlight { background: var(--wash); color: var(--cobalt); padding: 0.06em 0.28em; border-radius: 5px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-top: 0.45em; padding-left: 0.25em; }
.prose li::marker { color: var(--cobalt); }
.prose blockquote { margin: 1.15em 0; padding: 0.2em 0 0.2em 1.15em; border-left: 2px solid var(--cobalt); color: var(--ink-2); font-style: normal; }
.prose blockquote p { margin: 0; }
.prose code { font-family: var(--mono); font-size: 0.85em; background: var(--surface); border: 1px solid var(--hairline); border-radius: 6px; padding: 0.08em 0.4em; color: var(--ink); }
.prose pre { font-family: var(--mono); background: var(--surface); color: var(--ink); border: 1px solid var(--hairline-2); border-radius: var(--radius-sm); padding: 18px 20px; overflow-x: auto; font-size: 13.5px; line-height: 1.6; }
.prose pre code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; }
.prose img { border-radius: var(--radius-sm); border: 1px solid var(--hairline); }
.prose hr { border: 0; border-top: 1px solid var(--hairline); margin: 2em 0; }

/* Tables */
.prose table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 15px; margin: 0.4em 0; }
.prose thead th { text-align: left; font-weight: 600; color: var(--ink); background: var(--paper); padding: 11px 14px; border-bottom: 1px solid var(--hairline-2); font-size: 12.5px; letter-spacing: 0.01em; }
.prose tbody td { padding: 11px 14px; border-bottom: 1px solid var(--hairline); color: var(--ink-2); vertical-align: top; }
.prose tbody tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--hairline); border-radius: var(--radius-sm); }
.table-wrap table { margin: 0; }

/* ==========================================================================
   In-article CTA + tags + back
   ========================================================================== */
.cta-card { margin-top: 48px; max-width: var(--measure); border-radius: var(--radius); padding: 28px 30px; background: linear-gradient(160deg, var(--wash) 0%, var(--surface) 60%); border: 1px solid color-mix(in oklab, var(--cobalt) 26%, var(--hairline)); }
.cta-card__title { font-family: var(--sans); font-weight: 600; font-size: 22px; line-height: 1.24; letter-spacing: -0.01em; margin: 0; color: var(--ink); }
.cta-card__sub { font-size: 15px; color: var(--ink-3); margin: 8px 0 0; }
.cta-card .btn-primary { margin-top: 18px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 36px; }
.tags a { font-size: 12.5px; color: var(--ink-3); padding: 6px 12px; border-radius: 999px; border: 1px solid var(--hairline-2); transition: border-color 0.18s var(--ease), color 0.18s var(--ease); }
.tags a:hover { border-color: var(--cobalt); color: var(--cobalt); }

.back-row { margin-top: 42px; padding-top: 20px; border-top: 1px solid var(--hairline); }
.back-link { font-size: 13px; font-weight: 500; letter-spacing: 0.01em; color: var(--ink-3); display: inline-flex; align-items: center; gap: 8px; transition: color 0.18s var(--ease); }
.back-link:hover { color: var(--cobalt); }

/* ==========================================================================
   Sidebar
   ========================================================================== */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 941px) { .sidebar { position: sticky; top: calc(var(--toolbar-h) + 24px); align-self: start; } }
.side-card { border: 1px solid var(--hairline); border-radius: var(--radius); padding: 22px; background: var(--surface); }
.side-card__h { font-size: 12.5px; font-weight: 500; letter-spacing: 0.01em; color: var(--ink-3); margin: 0 0 16px; }
.side-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.side-list a { color: inherit; display: block; }
.side-list__meta { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.side-list__date { font-size: 11.5px; color: var(--ink-3); }
.side-list__title { font-family: var(--sans); font-weight: 600; font-size: 15px; line-height: 1.32; letter-spacing: -0.01em; margin: 0; color: var(--ink); transition: color 0.18s var(--ease); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.side-list a:hover .side-list__title { color: var(--cobalt); }

/* App cross-link card — dark ink mini-plate */
.app-card { border-radius: var(--radius); padding: 24px; color: #F1EEE6; position: relative; overflow: hidden; isolation: isolate; background: var(--ink); }
.app-card .band-bg { position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgba(241,238,230,0.4) 1.4px, transparent 1.4px); background-size: 12px 12px; opacity: 0.28; -webkit-mask-image: radial-gradient(ellipse 70% 60% at 80% 20%, #000, transparent 70%); mask-image: radial-gradient(ellipse 70% 60% at 80% 20%, #000, transparent 70%); }
.app-card__h { font-family: var(--sans); font-weight: 600; font-size: 20px; letter-spacing: -0.01em; margin: 0; }
.app-card__p { font-size: 13.5px; line-height: 1.5; color: #A7A296; margin: 10px 0 0; }
.app-card__links { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.app-card__link { font-size: 12.5px; font-weight: 600; letter-spacing: 0.01em; color: #F1EEE6; padding: 11px 16px; border-radius: var(--radius-xs); text-align: center; background: rgba(255,255,255,0.08); border: 1px solid rgba(241,238,230,0.26); transition: background 0.18s var(--ease); }
.app-card__link:hover { background: rgba(255,255,255,0.16); }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq { padding: 16px 0 84px; }
.faq__head { max-width: 640px; margin-bottom: 8px; }
.faq__head .display { color: var(--ink); font-size: clamp(26px, 3.4vw, 34px); }
.faq__head .eyebrow { display: block; margin-bottom: 6px; }
.faq__list { max-width: 820px; border-top: 1px solid var(--ink); margin-top: 22px; }
.faq__item { border-bottom: 1px solid var(--hairline); }
.faq__item summary { list-style: none; cursor: pointer; padding: 20px 44px 20px 2px; position: relative; font-family: var(--sans); font-weight: 600; font-size: 16.5px; line-height: 1.3; letter-spacing: -0.01em; color: var(--ink); }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; position: absolute; right: 6px; top: 18px; font-family: var(--mono); font-size: 18px; font-weight: 500; color: var(--cobalt); }
.faq__item[open] summary::after { content: "–"; }
.faq__answer { padding: 0 2px 22px; font-size: 15px; line-height: 1.62; color: var(--ink-2); max-width: var(--measure); }
.faq__answer p { margin: 0 0 0.8em; }
.faq__answer p:last-child { margin-bottom: 0; }

/* ==========================================================================
   Footer — ink-black band (pp footer feel). CRITICAL: .in shares the element
   with .shell, so it MUST use padding-block (never `padding:… 0 …`, which would
   wipe the shell's horizontal padding). Links are separate block <a> (no <br>).
   ========================================================================== */
.footer { background: var(--ink); color: #A7A296; margin-top: 72px; }
.footer .in { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 40px; align-items: start; padding-block: 40px 44px; font-size: 13.5px; }
.footer .col { min-width: 0; }
.footer .col b { display: block; color: #F1EEE6; font-size: 12.5px; font-weight: 600; letter-spacing: 0.01em; margin-bottom: 12px; }
.footer .col p { margin: 0; line-height: 2; }
.footer .col p.links a { display: block; color: #A7A296; transition: color 0.18s var(--ease); }
.footer .col a { color: #A7A296; transition: color 0.18s var(--ease); }
.footer .col a:hover { color: #F1EEE6; }
.footer .colbrand .brand { color: #F1EEE6; }
.footer .colbrand .brand .word { color: #F1EEE6; }
.footer .foottag { margin: 14px 0 0; line-height: 1.5; color: #A7A296; max-width: 34ch; }
.footer .colend .footbase { line-height: 1.9; }
.footer .colend .footbase span { display: block; }
@media (max-width: 900px) { .footer .in { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 520px) { .footer .in { grid-template-columns: 1fr; gap: 24px; padding-block: 32px 36px; } }

/* ==========================================================================
   Section scaffolding shared with the rules / answers / calculator PAGE_CSS
   ========================================================================== */
.rsec { padding: clamp(34px, 5vw, 58px) 0; }

/* ==========================================================================
   Motion preferences
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .card, .btn-ghost, .btn-primary, .pill, .seg a { transition: none !important; }
}
