/* Advisor direction, on every page (21 November 2026). Reading rhythm for section heads, the scroll-drawn path,
   the statement band, glass captions on work samples, and the "how this page is built" panel. Moved from the
   prototype in _designs/advisor-direction-2026-11-21. The company map and the ad results are in advisor-map.css.
   Colours and type come from the variables in styles.css. */
.cm [hidden], .xr [hidden], .xr-btn[hidden], .xr-panel[hidden] { display: none !important; }
:root { --adv-warn: #b9791c; --adv-warn-bg: #fdf5e6; --adv-warn-ink: #7a4f0e; }

/* ───────────── 3. How this page is built ───────────── */
.xr-btn { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 14.5px; font-weight: 600; color: #fff; background: var(--brand-800); border: 1px solid rgba(98, 205, 200, .5); border-radius: 999px; padding: 10px 16px; cursor: pointer; box-shadow: 0 12px 26px -12px rgba(0, 0, 0, .55); }
.xr-btn:hover { background: var(--brand-700); }
.xr-btn .icon { width: 18px; height: 18px; color: var(--aqua); }
.xr-btn:focus-visible, .xr-panel button:focus-visible { outline: 2px solid var(--aqua); outline-offset: 2px; }
/* The panel opens on the left, clear of the right-aligned Arabic headings it describes. */
.xr-panel { position: fixed; left: 18px; bottom: 18px; z-index: 70; width: min(400px, calc(100vw - 36px)); max-height: min(78vh, 680px); overflow: auto; background: var(--brand-900); color: #dcebeb; border: 1px solid rgba(98, 205, 200, .35); border-radius: 8px; padding: 20px 20px 18px; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .7); font-size: 14.5px; line-height: 1.7; }
.xr-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 4px; }
.xr-head h2 { margin: 0; font-size: 18px; font-weight: 600; color: #fff; }
.xr-close { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 6px; background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; }
.xr-close .icon { width: 18px; height: 18px; }
.xr-lead { margin: 0 0 14px; color: #a9c7c7; font-size: 13.5px; }
.xr-hero { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; padding: 14px 0; border-block: 1px solid rgba(255, 255, 255, .12); }
.xr-hero b { direction: ltr; font-size: 44px; font-weight: 600; line-height: 1; color: var(--aqua); font-variant-numeric: tabular-nums; }
.xr-hero span { color: #e6f1f1; }
.xr-panel h3 { margin: 16px 0 6px; font-size: 13px; font-weight: 600; color: var(--aqua); }
.xr-panel dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 5px 14px; }
.xr-panel dt { color: #c5dada; }
.xr-panel dd { margin: 0; color: #fff; font-weight: 600; text-align: end; font-variant-numeric: tabular-nums; }
.xr-panel dd.ltr { direction: ltr; }
.xr-panel dd.wide { grid-column: 1 / -1; text-align: start; font-weight: 400; color: #e6f1f1; direction: ltr; text-align: right; font-size: 13.5px; }
.xr-toggle { margin-top: 16px; width: 100%; display: flex; justify-content: center; align-items: center; gap: 8px; font: inherit; font-weight: 600; color: var(--brand-900); background: var(--aqua); border: 0; border-radius: 6px; padding: 10px 14px; cursor: pointer; }
.xr-toggle[aria-pressed="true"] { background: #fff; }
.xr-foot { margin: 12px 0 0; font-size: 13px; color: #a9c7c7; }
.xr-foot a { color: var(--aqua); }
@media (max-width: 720px) {
  .xr-btn { right: 12px; bottom: 14px; padding: 9px 13px; font-size: 13.5px; }
  .xr-panel { left: 0; bottom: 0; width: 100vw; max-height: 82vh; border-radius: 12px 12px 0 0; border-inline: 0; border-bottom: 0; }
}

/* Structure overlay: headings, sections and images are marked in place, with CSS only. */
body.xr-on main :is(h1, h2, h3) { position: relative; outline: 1px dashed var(--aqua); outline-offset: 5px; }
body.xr-on main :is(h1, h2, h3)::after { position: absolute; top: -13px; inset-inline-end: -2px; font: 700 11px / 1.5 ui-monospace, Consolas, monospace; letter-spacing: 0; padding: 0 6px; border-radius: 3px; background: var(--aqua); color: var(--brand-900); -webkit-text-stroke: 0; }
body.xr-on main h1::after { content: "H1"; }
body.xr-on main h2::after { content: "H2"; }
body.xr-on main h3::after { content: "H3"; }
body.xr-on main section { outline: 1px dashed rgba(31, 136, 141, .55); outline-offset: -8px; }
body.xr-on main img { outline: 2px solid var(--adv-warn); outline-offset: 2px; }

/* ───────────── 4. Reading rhythm (21 November 2026) ─────────────
   Requested after the first review: long runs of text in one size and one colour read as flat. Three text levels
   (statement, body, detail), one accent per block, a soft halo behind section headings, and real glass only over
   images. The halo is a gradient, not a filter, so it costs nothing on phones. */

/* Halo behind section headings: a soft patch of colour that lifts the heading off the page. */
.section-head { position: relative; isolation: isolate; }
.section-head::before { content: ""; position: absolute; z-index: -1; inset-inline-start: -64px; top: -40px; width: min(460px, 86%); height: 230px; border-radius: 50%; background: radial-gradient(closest-side, rgba(31, 136, 141, .17), rgba(31, 136, 141, 0)); pointer-events: none; }
.section-cream .section-head::before { background: radial-gradient(closest-side, rgba(201, 167, 124, .36), rgba(201, 167, 124, 0)); }
.section-dark .section-head::before { background: radial-gradient(closest-side, rgba(98, 205, 200, .2), rgba(98, 205, 200, 0)); }
.section-head.center::before { inset-inline-start: auto; left: 50%; transform: translateX(-50%); }

/* One accent per heading: the phrase that carries the point, with a marker line under it. */
.hl { color: var(--brand-ink); background: linear-gradient(var(--aqua), var(--aqua)) no-repeat right 94% / 100% .13em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
html[dir="ltr"] .hl { background-position: left 94%; }
.section-dark .hl { color: var(--aqua); background-image: linear-gradient(rgba(98, 205, 200, .45), rgba(98, 205, 200, .45)); }

/* The first sentence of a lead carries the point; the rest steps back. */
.section-head .lead .lead-first { color: var(--ink); font-weight: 600; }
.section-dark .section-head .lead .lead-first { color: #fff; }

/* A statement between sections: one sentence, large, with room around it. */
.say { background: var(--cream, #f3efe6); padding: clamp(44px, 6vw, 76px) 0; position: relative; overflow: hidden; }
.say::before { content: ""; position: absolute; inset-inline-start: -8%; top: 50%; width: min(760px, 90%); aspect-ratio: 2 / 1; transform: translateY(-50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(98, 205, 200, .34), rgba(98, 205, 200, 0)); pointer-events: none; }
.say .container { position: relative; }
/* One line on a desktop, two on a phone (the owner found the first size too large, 22 November 2026). */
.say p { margin: 0; max-width: none; font-size: clamp(24px, 3.3vw, 44px); font-weight: 700; line-height: 1.4; color: transparent; background: linear-gradient(var(--brand-800), var(--brand-800)) no-repeat right / 100% 100%, linear-gradient(#a9c3c3, #a9c3c3); -webkit-background-clip: text; background-clip: text; }
html[dir="ltr"] .say p { background-position: left, 0 0; }
.say small { display: block; margin-top: 14px; font-size: 15px; color: var(--muted); }
/* The optional follow-up offer under the career tools: it gets a ring when a download brings it into view. */
.ct-offer { scroll-margin-top: 96px; }
.ct-offer .form { transition: box-shadow .5s ease; }
.ct-offer.is-hit .form { box-shadow: 0 0 0 3px rgba(98, 205, 200, .7), 0 18px 44px -18px rgba(12, 52, 54, .35); }
.ct-offer .ct-points { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.ct-offer .ct-points li { display: flex; gap: 10px; align-items: flex-start; }
.ct-offer .ct-points .icon { flex: none; width: 20px; height: 20px; margin-top: 4px; color: var(--brand-700, #146c70); }

/* Real glass, only where there is a picture behind it: the captions on the work samples. */
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .work-tile span { padding: 11px 14px 12px; background: rgba(6, 28, 29, .34); -webkit-backdrop-filter: blur(14px) saturate(150%); backdrop-filter: blur(14px) saturate(150%); border-top: 1px solid rgba(255, 255, 255, .22); }
}

/* The diagnosis panel in three levels. */
.cm-result h3 { margin: 0 0 12px; font-size: 13.5px; font-weight: 600; color: var(--brand-ink); }
.cm-summary { display: grid; gap: 6px; }
.cm-summary .s-small { font-size: 14.5px; color: var(--muted); }
.cm-summary .s-big { font-size: clamp(22px, 2.3vw, 28px); font-weight: 700; line-height: 1.45; color: var(--ink); }
.cm-summary .s-big strong { color: var(--brand-ink); background: linear-gradient(var(--aqua), var(--aqua)) no-repeat right 94% / 100% .13em; }
.cm-causes > li { position: relative; }
.cm-causes > li.is-first { border-top: 0; margin-top: 2px; padding: 16px 16px 12px; background: var(--brand-50); border-radius: 6px; border-inline-start: 3px solid var(--brand-600); }
.cm-causes > li.is-first h4::after { content: attr(data-first); margin-inline-start: 10px; font-size: 12.5px; font-weight: 600; color: #fff; background: var(--brand-600); border-radius: 999px; padding: 2px 10px; vertical-align: middle; white-space: nowrap; }
.cm-causes .cm-no { font-size: 34px; font-weight: 300; }
.cm-causes h4 { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.cm-causes p { color: var(--muted); font-size: 14.5px; }
.cm-causes p .cm-lede { color: var(--ink); font-weight: 600; font-size: 15.5px; }
.cm-arm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.cm-causes .cm-arm .link-arrow { font-size: 13.5px; font-weight: 600; background: #fff; border: 1px solid var(--brand-100); border-radius: 999px; padding: 4px 12px; }
.cm-note { font-size: 12.5px; }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .hl { animation: hl-draw linear both; animation-timeline: view(); animation-range: entry 30% cover 38%; }
    .say p { animation: say-wipe linear both; animation-timeline: view(); animation-range: entry 35% cover 55%; }
  }
}
@keyframes hl-draw { from { background-size: 0% .13em; } to { background-size: 100% .13em; } }
@keyframes say-wipe { from { background-size: 0% 100%, 100% 100%; } to { background-size: 100% 100%, 100% 100%; } }

@media (max-width: 720px) {
  .section-head::before { inset-inline-start: -28px; top: -30px; height: 190px; }
  .say p { max-width: none; }
}
/* ───────────── 5. One path from start to finish ─────────────
   The line is drawn by scroll: it follows the middle of the screen down the list, and each stop comes into focus as
   the line reaches it. Without scroll-driven animation, or with reduced motion, everything shows complete. */
.jr-path { list-style: none; margin: 46px 0 0; padding: 0; position: relative; }
.jr-path::before, .jr-path::after { content: ""; position: absolute; inset-inline-start: 11px; top: 14px; bottom: 30px; width: 2px; border-radius: 2px; }
.jr-path::before { background: var(--line); }
.jr-path::after { background: var(--brand); transform-origin: center top; }
.jr-stop { position: relative; display: grid; grid-template-columns: 24px minmax(0, 1.15fr) minmax(0, 1fr); gap: 10px 30px; align-items: start; padding-bottom: 52px; }
.jr-stop:last-child { padding-bottom: 0; }
.jr-dot { position: relative; z-index: 1; width: 24px; height: 24px; margin-top: 4px; border-radius: 50%; background: var(--brand); border: 5px solid #fff; box-shadow: 0 0 0 2px var(--brand); }
.jr-no { display: block; font-size: 13px; color: var(--muted); direction: ltr; text-align: right; font-variant-numeric: tabular-nums; }
html[dir="ltr"] .jr-no { text-align: left; }
.jr-main h3 { margin: 2px 0 8px; font-size: clamp(21px, 2.2vw, 27px); font-weight: 700; color: var(--ink); }
.jr-main p { margin: 0 0 10px; color: var(--muted); max-width: 46ch; }
.jr-main .link-arrow { font-size: 14.5px; }
.jr-proof { display: grid; gap: 18px; padding-top: 18px; }
.jr-num strong { display: block; direction: ltr; text-align: right; font-size: clamp(42px, 5.2vw, 68px); font-weight: 600; line-height: 1; color: var(--brand-ink); }
html[dir="ltr"] .jr-num strong { text-align: left; }
.jr-num span { display: block; margin-top: 8px; color: var(--body); font-size: 15.5px; max-width: 34ch; }
.jr-say { margin: 6px 0 0; padding-inline-start: 16px; border-inline-start: 3px solid var(--aqua); font-size: clamp(18px, 1.9vw, 22px); font-weight: 600; line-height: 1.6; color: var(--ink); max-width: 26ch; }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .jr-path::after { animation: jr-line linear both; animation-timeline: view(); animation-range: cover 50vh cover calc(100% - 50vh); }
    .jr-stop > :not(.jr-dot) { animation: jr-focus linear both; animation-timeline: view(); animation-range: cover 30% cover 44%; }
    .jr-dot { animation: jr-dot linear both; animation-timeline: view(); animation-range: cover 40% cover 47%; }
  }
}
@keyframes jr-line { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes jr-focus { from { opacity: .32; } to { opacity: 1; } }
@keyframes jr-dot { from { background: #fff; box-shadow: 0 0 0 2px var(--line); } to { background: var(--brand); box-shadow: 0 0 0 2px var(--brand); } }

@media (max-width: 720px) {
  .jr-stop { grid-template-columns: 24px minmax(0, 1fr); gap: 6px 18px; padding-bottom: 40px; }
  .jr-proof { grid-column: 2; padding-top: 8px; }
}
/* A path with nothing beside its stops is one column. */
.jr-plain .jr-stop { grid-template-columns: 24px minmax(0, 1fr); }
.jr-plain .jr-main p { max-width: 62ch; }
/* Left-to-right pages. */
html[dir="ltr"] .xr-panel dd.wide { text-align: left; }

/* ───────────── 6. Articles (21 November 2026) ─────────────
   Long text in one size and one colour reads as flat. The article keeps its words and gets a rhythm: a larger
   opening paragraph, numbered sections with room above them, a heavier first paragraph in each section, darker key
   phrases, a key-points box that stands out, large pull quotes, a reading bar and a contents list that follows the
   reader. Scoped to body.article-page, so legal pages and answers are untouched. */
.article-page .prose { counter-reset: sec; }
.article-page .prose > p:first-of-type { font-size: clamp(20px, 2.1vw, 23px); line-height: 1.85; font-weight: 500; color: var(--ink); }
.article-page .prose strong { color: var(--ink); }
.article-page .prose > h2 { counter-increment: sec; margin-top: 2.3em; padding-top: 1.05em; border-top: 1px solid var(--line); font-size: clamp(26px, 3vw, 34px); line-height: 1.4; }
.article-page .prose > h2::before { content: counter(sec, decimal-leading-zero); display: block; margin-bottom: 4px; font-size: 14px; font-weight: 600; color: var(--brand); font-variant-numeric: tabular-nums; }
.article-page .prose > h2 + p { font-size: 19.5px; color: var(--ink); }
.article-page .prose h3 { color: var(--brand-800); }
.article-page .prose ul > li::marker { color: var(--brand); }
.article-page .prose ol > li::marker { color: var(--brand); font-weight: 700; }
.article-page .prose .summary { background: var(--cream, #f3efe6); border-radius: 6px; border-inline-start: 3px solid var(--brand-600); padding: 24px 26px; margin: 1.8em 0; }
.article-page .prose .summary-title { font-size: 14px; font-weight: 600; color: var(--brand-ink); margin-bottom: 10px; }
.article-page .prose .summary li { color: var(--ink); font-weight: 500; margin-bottom: .35em; }
.article-page .prose blockquote { position: relative; isolation: isolate; margin: 2.1em 0; padding: 8px 0 8px 0; background: none; border: 0; border-radius: 0; font-size: clamp(22px, 2.7vw, 30px); line-height: 1.6; font-weight: 700; color: var(--brand-800); }
.article-page .prose blockquote::before { content: ""; position: absolute; z-index: -1; inset-inline-start: -40px; top: 50%; width: min(420px, 80%); height: 190px; transform: translateY(-50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(98, 205, 200, .3), rgba(98, 205, 200, 0)); pointer-events: none; }
.article-page .prose .quote-card blockquote::before { content: none; }
.article-page .prose tbody tr:nth-child(even) td { background: var(--surface); }
.toc-box ol a { transition: color .2s; }
.toc-box ol a.is-current { color: var(--brand-ink); font-weight: 700; }
.toc-box ol li:has(a.is-current)::marker { color: var(--brand-ink); font-weight: 700; }
/* Reading bar: drawn by the page scroll itself. Browsers without scroll timelines show no bar. */
@supports (animation-timeline: scroll()) {
  body.article-page::after { content: ""; position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 80; background: var(--aqua); transform-origin: right center; animation: read-bar linear both; animation-timeline: scroll(root); }
  html[dir="ltr"] body.article-page::after { transform-origin: left center; }
}
@keyframes read-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media print { body.article-page::after { display: none; } }
@media (max-width: 720px) {
  .article-page .prose > h2 + p { font-size: 18.5px; }
  .article-page .prose .summary { padding: 20px 18px; }
}/* The library's reference lists print full addresses; a long address must wrap, not widen the page on a phone. */
.article-page .prose a { overflow-wrap: anywhere; }
.article-page .prose #sources ~ ol { font-size: 15.5px; line-height: 1.8; color: var(--muted); }