/* article.css: the reading pages (the guides, the profiles, the research
   stories). A page a person reads for ten minutes is set like an article:
   paper under the words, ink on it, a newspaper serif in the headlines, and
   the site's dark frame around it. It loads after site.css and pages.css, on
   body.guide-page only (the privacy and accessibility pages keep their look).

   How it works: inside <main> the site's colour tokens are given their paper
   values, so every rule that says "var(--bone)" or "var(--mute)" follows. What
   was painted with a fixed dark colour is repainted below.

   Nothing here hides text. What moves: a line under the header that follows
   the reading, the marker under a heading's key words, and the cards and
   tables that step in once (article.js adds .rv only with scripts on, and
   never when the visitor asked for stillness). */

body.guide-page main.guide {
  --paper: #f5f3ed;
  --paper-2: #ebe8df;
  --card: #fffefb;
  --rule: #d8d4c8;
  --accent: #1a4fd6;              /* the brand's blue, deep enough for text on paper (6:1) */
  --bone: #10141c;
  --mute: #2f3644;
  --line: rgba(16, 20, 28, .3);
  --faint: rgba(16, 20, 28, .13);
  --cyan: var(--accent);
  --f-serif: "Frank Ruhl Libre", "David Libre", "Times New Roman", serif;
  background: var(--paper);
  color: var(--bone);
  padding-block: calc(62px + 34px) 72px;
}
html.a11y-contrast body.guide-page main.guide { --mute: #000; --bone: #000; --line: rgba(0, 0, 0, .75); --faint: rgba(0, 0, 0, .45); --accent: #0b2f9c; --rule: #6b675c; --paper: #fff; --card: #fff; }
body.guide-page ::selection { background: rgba(31, 99, 255, .24); }

/* ── the head of the article ───────────────────────────────────────────── */
body.guide-page .guide .legal__in { max-inline-size: 720px; }
body.guide-page .crumbs { margin-block-end: 18px; font-size: 14px; color: #5a6272; }
body.guide-page .crumbs a { color: #3c4453; text-decoration-color: rgba(16, 20, 28, .28); }
body.guide-page .crumbs a:hover { color: var(--accent); text-decoration-color: currentColor; }
body.guide-page .guide h1 { font-family: var(--f-serif); font-weight: 900; font-size: clamp(33px, 8.2vw, 56px); line-height: 1.14; letter-spacing: 0; color: var(--bone); text-wrap: balance; }
body.guide-page .guide h1 em { color: var(--accent); }
/* who wrote it and when: the academy's mark as the writer's picture, then a newspaper's double rule */
body.guide-page .guide .legal__date { position: relative; display: flow-root; min-block-size: 38px; margin-block-start: 18px; padding-block: 2px 16px; padding-inline-start: 50px; font-size: 14.5px; line-height: 1.5; color: #4a5262; border-block-end: 3px double #10141c; }
body.guide-page .guide .legal__date::before { content: ""; position: absolute; inset-inline-start: 0; inset-block-start: 0; inline-size: 38px; block-size: 38px; border-radius: 50%; background: #06080d url("../img/logo-mark-sm.webp") center / 68% no-repeat; }
body.guide-page .guide .legal__date .by__who { display: block; text-align: right; font-weight: 700; font-size: 15.5px; color: var(--bone); }
body.guide-page .guide .legal__date .by__sub::after { content: " · "; }
body.guide-page .read-time, body.guide-page .by__when { white-space: nowrap; }
/* on a narrow column the date takes its own line, so no separator is left hanging at a line's start */
@media (max-width: 859px) {
  body.guide-page .guide .legal__date .by__sub { display: block; }
  body.guide-page .guide .legal__date .by__sub::after { content: none; }
}
/* the site's frame over paper is solid: a dark bar, not a tinted glass */
body.guide-page .top.is-solid { background: #06080d; -webkit-backdrop-filter: none; backdrop-filter: none; border-color: #06080d; }
/* the deck: the answer in short, set larger, with the blue line of a pulled paragraph */
body.guide-page .guide__sum { margin-block-start: 22px; padding: 2px 16px 2px 0; border: 0; border-inline-start: 3px solid var(--blue); border-radius: 0; background: none; font-size: 17.5px; line-height: 1.68; color: var(--bone); }
body.guide-page .guide__sum b { color: var(--accent); }

/* ── running text ──────────────────────────────────────────────────────── */
body.guide-page .guide p, body.guide-page .guide li { font-size: 17.5px; line-height: 1.78; }
body.guide-page .guide .legal__in > p, body.guide-page .guide .legal__in > ul, body.guide-page .guide .legal__in > ol { margin-block-start: 14px; }
body.guide-page .guide h2 { position: relative; margin-block-start: 50px; padding-block-start: 24px; border-block-start: 1px solid var(--rule); font-family: var(--f-serif); font-weight: 700; font-size: clamp(25px, 6.3vw, 33px); line-height: 1.24; letter-spacing: 0; scroll-margin-block-start: 84px; }
body.guide-page .guide h2::before { content: ""; position: absolute; inset-inline-start: 0; inset-block-start: -1px; inline-size: 56px; block-size: 3px; background: var(--blue); }
/* the key words of a heading are run over with a marker, as a reader would */
body.guide-page .guide h2 em { color: inherit; padding-inline: 2px; margin-inline: -2px; background: linear-gradient(transparent 58%, rgba(31, 99, 255, .2) 58%, rgba(31, 99, 255, .2) 94%, transparent 94%) no-repeat right center / 100% 100%; -webkit-box-decoration-break: clone; box-decoration-break: clone; transition: background-size .75s cubic-bezier(.2, .7, .2, 1) .12s; }
.js body.guide-page .guide h2.mk:not(.is-in) em { background-size: 0% 100%; }
body.guide-page .guide h3 { margin-block-start: 26px; font-weight: 700; font-size: clamp(19px, 4.7vw, 22px); line-height: 1.38; }
body.guide-page .guide h3 em { color: var(--accent); }
body.guide-page .guide .legal__in > ul { padding-inline-start: 1.2em; }
body.guide-page .guide .legal__in > ul > li::marker { color: var(--blue); }
body.guide-page .guide ol:not(.guide__toc ol):not(.path-steps):not(.src) > li::marker { color: var(--accent); font-weight: 700; }
body.guide-page .guide .link, body.guide-page .guide .link--inline { color: var(--accent); text-decoration-color: rgba(26, 79, 214, .38); text-decoration-thickness: 1.5px; }
body.guide-page .guide .link:hover, body.guide-page .guide .link--inline:hover { text-decoration-color: currentColor; }
body.guide-page .guide code { color: #0c1a3d; background: rgba(31, 99, 255, .1); }
body.guide-page .guide pre code { color: inherit; background: none; }
/* a note: what the reader should keep in mind, set apart like a margin note */
body.guide-page .guide__note { margin-block-start: 16px !important; padding: 12px 16px; border-inline-start: 3px solid #b3ad9c; border-radius: 0 10px 10px 0; background: var(--paper-2); font-size: 15.5px !important; line-height: 1.65 !important; color: #2a303d; }
[dir="rtl"] body.guide-page .guide__note { border-radius: 10px 0 0 10px; }

/* ── "on this page" ────────────────────────────────────────────────────── */
body.guide-page .guide__toc { margin-block-start: 26px; padding: 16px 18px 14px; border: 1px solid var(--rule); border-radius: 14px; background: var(--card); }
body.guide-page .guide__toc h2 { margin: 0; padding: 0; border: 0; font-family: var(--f-body); font-weight: 700; font-size: 15px; line-height: 1.4; color: #4a5262; }
body.guide-page .guide__toc h2::before { content: none; }
body.guide-page .guide__toc ol { margin-block: 8px 0; padding-inline-start: 1.5em; gap: 2px; }
body.guide-page .guide__toc li { font-size: 15.5px; line-height: 1.5; }
body.guide-page .guide__toc li::marker { color: #7a8190; font-size: 13.5px; }
body.guide-page .guide__toc a { display: inline-block; padding-block: 5px; color: var(--bone); text-decoration: none; }
body.guide-page .guide__toc a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
body.guide-page .guide__toc a.is-on { color: var(--accent); font-weight: 700; }

/* ── tables, facts, steps, questions, cards ────────────────────────────── */
body.guide-page .guide__table { margin-block-start: 18px; border-color: var(--rule); background: var(--card); box-shadow: 0 1px 0 rgba(16, 20, 28, .04), 0 10px 30px -18px rgba(16, 20, 28, .28); }
body.guide-page .guide__table th { background: #efece2; color: var(--bone); }
body.guide-page .guide__table th[scope="row"] { background: none; }
body.guide-page .guide__table th, body.guide-page .guide__table td { font-size: 15.5px; line-height: 1.6; border-block-end-color: #e6e2d6; }
body.guide-page .guide__table td.ltr { color: var(--bone); }
body.guide-page .kv { border-color: var(--rule); background: var(--card); box-shadow: 0 10px 30px -18px rgba(16, 20, 28, .28); }
body.guide-page .kv > div { border-block-end-color: #e6e2d6; }
body.guide-page .kv dt { color: #4a5262; font-size: 15px; }
body.guide-page .kv dd { color: var(--bone); font-weight: 500; }
body.guide-page .path-steps { gap: 12px; }
body.guide-page .path-steps > li { border-color: var(--rule); background: var(--card); color: var(--mute); font-size: 16.5px; line-height: 1.65; }
body.guide-page .path-steps > li::before { color: #fff; background: var(--blue); }
body.guide-page .path-steps > li:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: 29px; inset-block: 50px -13px; inline-size: 2px; background: linear-gradient(#b9c9f1, #b9c9f1) no-repeat top / 100% 100%; }
body.guide-page .path-steps b { color: var(--bone); }
body.guide-page .faq details { border-color: var(--rule); background: var(--card); }
body.guide-page .faq details[open] { border-color: var(--accent); background: #fff; box-shadow: 0 12px 34px -20px rgba(26, 79, 214, .5); }
body.guide-page .faq summary { font-weight: 700; color: var(--bone); }
body.guide-page .faq summary:hover, body.guide-page .faq details[open] summary { color: var(--accent); }
body.guide-page .faq details[open] summary::after { color: var(--accent); }
body.guide-page .faq details p { color: var(--mute); }
body.guide-page .src { margin-block-start: 14px; font-size: 15px; }
body.guide-page .src li { font-size: 15px; line-height: 1.6; }
body.guide-page .rel a { border-color: var(--rule); background: var(--card); transition: border-color .25s, transform .25s, box-shadow .25s; }
body.guide-page .rel a:hover { border-color: var(--accent); background: #fff; transform: translateY(-2px); box-shadow: 0 14px 30px -18px rgba(26, 79, 214, .55); }
body.guide-page .rel b { font-family: var(--f-serif); font-weight: 700; font-size: 19px; line-height: 1.3; color: var(--bone); }
body.guide-page .rel span { color: #4a5262; }
body.guide-page .profile__pic { border-color: var(--rule); background: #dedad0; box-shadow: 0 18px 40px -22px rgba(16, 20, 28, .5); }
body.guide-page .byline { border-block-color: var(--rule); }

/* the close of the article is the one place the site's dark returns: the next step */
body.guide-page .guide__cta { --bone: #eef1f6; --mute: #c9d0dc; --line: rgba(238, 241, 246, .26); --faint: rgba(238, 241, 246, .12); --cyan: #38b6ff; margin-block-start: 54px; padding: 28px 24px; border: 0; border-radius: 20px; color: var(--bone); background: radial-gradient(120% 140% at 100% 0%, rgba(31, 99, 255, .42), rgba(31, 99, 255, 0) 58%), #06080d; box-shadow: 0 24px 50px -26px rgba(6, 8, 13, .7); }
body.guide-page .guide__cta-say { font-family: var(--f-serif); font-weight: 700 !important; font-size: clamp(22px, 5.6vw, 28px) !important; line-height: 1.3 !important; }
body.guide-page .guide__cta .btn--line { background: rgba(238, 241, 246, .04); }

/* buttons that stand on paper (the readiness check, the tool pages) */
body.guide-page .guide .legal__in > .pair .btn--line, body.guide-page .ready--tool .btn--line { background: var(--card); }

/* ── the readiness check on paper ──────────────────────────────────────── */
body.guide-page .kq__q { border-color: var(--rule); background: var(--card); }
body.guide-page .kq__q label { border-color: #cfcabb; background: #faf8f2; color: var(--bone); }
body.guide-page .kq__q label:hover { border-color: #10141c; }
body.guide-page .kq__q label.is-right { border-color: #1c9a66; background: #e2f5ea; }
body.guide-page .kq__q label.is-wrong { border-color: #d24a4a; background: #fdeaea; }
body.guide-page .kq__q label.is-right::after { color: #0d6f45; }
body.guide-page .kq__q label.is-wrong::after { color: #a82525; }
body.guide-page .kq__q[data-state="right"] { border-color: #1c9a66; }
body.guide-page .kq__q[data-state="wrong"] { border-color: #d24a4a; }
body.guide-page .kq__q summary { color: var(--accent); }
body.guide-page .kq__out { --bone: #eef1f6; --mute: #c9d0dc; --line: rgba(238, 241, 246, .26); --faint: rgba(238, 241, 246, .14); --cyan: #38b6ff; color: var(--bone); border: 0; background: radial-gradient(120% 140% at 100% 0%, rgba(31, 99, 255, .42), rgba(31, 99, 255, 0) 58%), #06080d; }
body.guide-page .kq__out .kq__head { font-family: var(--f-serif); }

/* ── a table on a phone: its cards are paper cards ─────────────────────── */
@media (max-width: 699px) {
  body.guide-page .guide__table--stack { background: none; box-shadow: none; }
  body.guide-page .guide__table--stack tr { border-color: var(--rule); background: var(--card); box-shadow: 0 10px 26px -20px rgba(16, 20, 28, .4); }
  body.guide-page .guide__table--stack th[scope="row"] { font-family: var(--f-serif); font-weight: 700; font-size: 19px; }
  body.guide-page .guide__table--stack td { border-block-start-color: #e6e2d6; }
  body.guide-page .guide__table--stack td::before { color: #4a5262; }
}

/* ── what moves ────────────────────────────────────────────────────────── */
/* the line under the header: how far into the article the reader is */
.art-progress { position: fixed; z-index: 29; inset-inline: 0; inset-block-start: 62px; block-size: 3px; pointer-events: none; background: rgba(16, 20, 28, .1); opacity: 0; transition: opacity .3s; }
.art-progress.is-on { opacity: 1; }
.art-progress i { display: block; block-size: 100%; background: var(--blue, #1f63ff); transform-origin: right center; transform: scaleX(var(--p, 0)); }
[dir="ltr"] .art-progress i { transform-origin: left center; }
/* the head settles into place (a move only: the words are painted from the first frame) */
@keyframes art-settle { from { transform: translateY(14px); } to { transform: none; } }
.js body.guide-page .guide h1 { animation: art-settle .7s cubic-bezier(.2, .7, .2, 1) both; }
.js body.guide-page .guide .legal__date, .js body.guide-page .guide__sum { animation: art-settle .8s cubic-bezier(.2, .7, .2, 1) .06s both; }
/* cards and tables settle into place once, as they come into view. A move only: what is
   written is never faded or hidden, so it reads at full contrast from the first frame, to
   a person and to any tool that looks at the page before it is scrolled. */
.js body.guide-page .rv { transform: translateY(24px) scale(.985); transition: transform .85s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s); }
.js body.guide-page .rv.is-in { transform: none; }
/* the line between two steps is drawn when the step arrives */
.js body.guide-page .path-steps > li.rv:not(.is-in)::after { background-size: 100% 0%; }
body.guide-page .path-steps > li::after { transition: background-size .7s ease .25s; }
html.is-still body.guide-page .rv { transform: none; }
@media print {
  .art-progress, .top, .foot, .a11y, .consent { display: none !important; }
  body.guide-page .rv { transform: none !important; }
  body.guide-page main.guide { padding-block-start: 0; }
}

/* ── a wide screen: the article in its column, "on this page" beside it ── */
@media (min-width: 720px) {
  body.guide-page main.guide { padding-block: calc(62px + 56px) 96px; }
  body.guide-page .guide p, body.guide-page .guide li { font-size: 18.5px; line-height: 1.8; }
  body.guide-page .guide__sum { font-size: 20.5px; line-height: 1.7; padding-inline-start: 22px; }
  body.guide-page .guide__table th, body.guide-page .guide__table td { font-size: 16px; padding: 12px 14px; }
  body.guide-page .path-steps > li { font-size: 17px; }
  body.guide-page .src li { font-size: 15.5px; }
  body.guide-page .guide__cta { padding: 34px 32px; }
}
@media (min-width: 1120px) {
  body.guide-page .guide .legal__in { max-inline-size: 1040px; display: grid; grid-template-columns: minmax(0, 720px) 250px; column-gap: 70px; align-items: start; }
  body.guide-page .guide .legal__in > * { grid-column: 1; min-inline-size: 0; }
  body.guide-page .guide .legal__in > .guide__toc { grid-column: 2; grid-row: 1 / span 600; position: sticky; inset-block-start: 96px; align-self: start; max-block-size: calc(100vh - 128px); overflow-y: auto; margin: 0; padding: 0 18px 0 0; border: 0; border-inline-start: 1px solid var(--rule); border-radius: 0; background: none; }
  body.guide-page .guide__toc ol { list-style: none; padding: 0; gap: 0; }
  body.guide-page .guide__toc li { font-size: 15px; }
  body.guide-page .guide__toc a { position: relative; display: block; padding: 6px 0; color: #4a5262; }
  body.guide-page .guide__toc a.is-on { color: var(--accent); }
  body.guide-page .guide__toc a.is-on::before { content: ""; position: absolute; inset-inline-start: -19px; inset-block: 4px; inline-size: 3px; background: var(--blue); }
}

/* lists that are not running text keep their own box */
body.guide-page .guide .path-steps, body.guide-page .guide .rel { padding: 0; }

/* the parents' checklist is a tool, not text: it keeps the site's dark, as an inset on the paper */
body.guide-page .ready { --bone: #eef1f6; --mute: #c9d0dc; --line: rgba(238, 241, 246, .26); --faint: rgba(238, 241, 246, .14); --cyan: #38b6ff; --accent: #8fd0ff; color: var(--bone); border: 0; border-radius: 20px; background: radial-gradient(120% 120% at 100% 0%, rgba(31, 99, 255, .3), rgba(31, 99, 255, 0) 56%), #080c15; box-shadow: 0 24px 50px -28px rgba(6, 8, 13, .7); }
body.guide-page .ready p, body.guide-page .ready li { font-size: 16.5px; line-height: 1.6; }
body.guide-page .ready .link, body.guide-page .ready .link--inline { color: #cfe6ff; text-decoration-color: rgba(207, 230, 255, .5); }

/* high contrast: on paper, the quiet text goes to black (site.css sends it to white, for the dark pages) */
html.a11y-contrast body.guide-page main.guide :is(.lead, .faq p, .rel span, .crumbs, .crumbs a, .legal__date, .guide__toc h2, .guide__toc a, .kv dt) { color: #000; }
html.a11y-contrast body.guide-page main.guide :is(.guide__cta, .kq__out, .ready) :is(p, li, span, b) { color: #fff; }
