/* Outside Director Looking In. Tokens and sizes from the DBIC brief sections 6, 10, 15, 16 and 21 (they apply unchanged); layout from the design canvas. */
@font-face { font-family: 'Feature Display'; font-weight: 400; src: url(/fonts/FeatureDisplay-Regular.otf) format('opentype'); font-display: swap; }
@font-face { font-family: 'Feature Display'; font-weight: 500; src: url(/fonts/FeatureDisplay-Medium.otf) format('opentype'); font-display: swap; }
@font-face { font-family: 'Feature Display'; font-weight: 700; src: url(/fonts/FeatureDisplay-Bold.otf) format('opentype'); font-display: swap; }
@font-face { font-family: 'Scala Sans Offc'; font-weight: 400; src: url(/fonts/ScalaSansOffc.ttf) format('truetype'); font-display: swap; }
@font-face { font-family: 'Scala Sans Offc'; font-weight: 700; src: url(/fonts/ScalaSansOffc-Bold.ttf) format('truetype'); font-display: swap; }

:root {
  --text: #1d2529; --accent: #007375; --secondary: #545454; --muted: #666666;
  --line: #e6e6e6; --input: #cccccc; --band: #f4f4f4; --dark: #1d2529; --divider: #3c4c54; --hl: #e1efef;
  --display: 'Feature Display', Lora, serif;
  --body: 'Scala Sans Offc', Arial, sans-serif;
  /* DBIC brief 15: content is capped at 1440 px and centred. --gut is the side padding below ~1630 px; --edge is the full inset from each side of
     the screen to the content box (equal to --gut, or more once the screen is wider than 1440 + 2 x --gut). Backgrounds stay full-bleed. */
  --gut: clamp(24px, 6.67vw, 96px);
  --edge: max(var(--gut), calc((100% - 1440px) / 2));
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--body); color: var(--text); background: #fff; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 500; margin: 0; }
a { color: var(--text); text-decoration: none; }
@media (hover: hover) { a:hover { color: var(--accent); } } /* hover only where there is a real pointer: no sticky hover after a tap */
button { font-family: inherit; cursor: pointer; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.label { font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); }
.page { display: flex; flex-direction: column; min-height: 100vh; }

/* ---------- header ---------- */
.hdr { height: 80px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 var(--edge); border-bottom: 1px solid var(--line); background: #fff; }
.logo { display: inline-flex; align-items: center; height: 36px; }
.logo img { height: 36px; width: auto; display: block; }
.nav { display: flex; gap: 40px; font-size: 16px; }
.nav a.on { color: var(--accent); border-bottom: 2px solid var(--accent); padding-bottom: 4px; }
.hdr-r { display: flex; align-items: center; gap: 24px; font-size: 14px; }
.icon-btn { background: none; border: none; padding: 10px; color: var(--text); display: inline-flex; align-items: center; justify-content: center; }
.hdr .menu-btn { display: none; }

/* ---------- buttons, inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 48px; min-width: 100px; background: var(--accent); color: #fff; border: none; border-radius: 4px; padding: 0 24px; font-size: 16px; font-weight: 400; }
@media (hover: hover) { .btn:hover { color: #fff; background: #005354; } }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-line { display: inline-flex; align-items: center; justify-content: center; height: 48px; background: #fff; border: 1px solid var(--accent); color: var(--accent); border-radius: 4px; padding: 0 16px; font-size: 16px; font-weight: 400; }
@media (hover: hover) { .btn-line:hover { background: var(--hl); color: var(--accent); } }
.more { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--accent); }
.field { flex: 1; display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--input); border-radius: 4px; padding: 0 20px; height: 48px; }
.field input { flex: 1; min-width: 0; border: none; outline: none; font-family: inherit; font-size: 16px; color: var(--text); background: transparent; }
.field:focus-within { border-color: var(--accent); }

/* ---------- landing ---------- */
/* Hero, DBIC brief 16 (option C) and 21: full-bleed dark band, content in the 1440 px box. */
.hero { background: var(--dark); color: #fff; padding: 64px var(--edge); display: flex; gap: 80px; align-items: center; min-height: 640px; }
.hero-l { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero h1 { font-size: 80px; line-height: 1.02; letter-spacing: 0.01em; color: #fff; margin-left: -0.045em; }
.hero p { max-width: 560px; font-size: 20px; line-height: 1.5; color: #ccc; }
.byline { font-size: 14px; color: #b3b3b3; }
.byline a { color: #fff; font-weight: 700; }
@media (hover: hover) { .byline a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; } }
.hc-ph { display: inline-flex; align-items: center; gap: 16px; font-size: 15px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: #7fd0d3; }
.hc-dot { position: relative; width: 12px; height: 12px; border-radius: 50%; background: #7fd0d3; flex-shrink: 0; box-shadow: 0 0 0 4px rgba(99,175,178,.28), 0 0 14px 2px rgba(99,175,178,.55); }
.hc-dot::before, .hc-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #63afb2; animation: hc-pulse 2.2s cubic-bezier(.2,.6,.3,1) infinite; }
.hc-dot::after { animation-delay: 1.1s; }
@keyframes hc-pulse { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(3.6); opacity: 0; } }
.hero-btns { display: flex; gap: 16px; align-items: center; margin-top: 8px; }
.btn-dark { display: inline-flex; align-items: center; justify-content: center; height: 48px; background: none; border: 1px solid #fff; color: #fff; border-radius: 4px; padding: 0 16px; font-size: 16px; font-weight: 400; }
.hero-art { position: relative; width: 520px; height: 460px; flex-shrink: 0; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.hc-panel { position: absolute; left: -64px; bottom: 40px; width: 400px; background: #fff; color: var(--text); padding: 24px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.25); cursor: pointer; }
.hc-q { font-family: var(--display); font-size: 22px; line-height: 1.2; }
.hc-typing { display: inline-flex; gap: 5px; align-items: center; overflow: hidden; }
.hc-typing span { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #007375; animation: hc-bounce 1s ease-in-out infinite; }
.hc-typing span:nth-child(2) { animation-delay: .15s; } .hc-typing span:nth-child(3) { animation-delay: .3s; }
.hc-a { font-size: 15px; line-height: 1.5; }
.hc-n { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: #007375; color: #fff; font-size: 11px; font-weight: 700; margin-left: 5px; vertical-align: 1px; }
.hc-n.o { background: transparent; border: 1px solid #007375; color: #007375; box-sizing: border-box; }
.hc-src { font-size: 12px; color: #545454; border-top: 1px solid var(--line); padding-top: 10px; }
/* the panel is a looping illustration: a fixed 9 s cycle (question 0-6%, dots 10-26%, line 1 28-34%, line 2 40-46%, sources 52-58%), everything fades out at 90-96% */
.hc-q { animation: hc-q 9s ease infinite; }
.hc-typing { animation: hc-typing 9s ease infinite; }
.hc-a1 { animation: hc-a1 9s ease infinite; }
.hc-a2 { animation: hc-a2 9s ease infinite; }
.hc-src { animation: hc-src 9s ease infinite; }
@keyframes hc-bounce { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }
@keyframes hc-q { 0% { opacity: 0; transform: translateY(6px); } 6%, 90% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; } }
@keyframes hc-typing { 0%, 8% { opacity: 0; height: 0; } 10%, 26% { opacity: 1; height: 14px; } 28%, 100% { opacity: 0; height: 0; } }
@keyframes hc-a1 { 0%, 28% { opacity: 0; transform: translateY(6px); } 34%, 90% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; } }
@keyframes hc-a2 { 0%, 40% { opacity: 0; transform: translateY(6px); } 46%, 90% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; } }
@keyframes hc-src { 0%, 52% { opacity: 0; } 58%, 90% { opacity: 1; } 96%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .hc-dot::before, .hc-dot::after { animation: none; opacity: 0; }
  .hc-q, .hc-a1, .hc-a2, .hc-src { animation: none; opacity: 1; transform: none; }
  .hc-typing { animation: none; display: none; }
}
.ask-band { background: var(--band); padding: 48px var(--edge) 56px; display: flex; flex-direction: column; gap: 20px; }
.ask-band > label { font-family: var(--display); font-weight: 500; font-size: 32px; line-height: 1.15; letter-spacing: 0.02em; }
.ask-row { display: flex; gap: 12px; align-items: center; }
.pills { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.pills .lead { font-size: 14px; color: var(--secondary); margin-right: 4px; }
.pill { background: #fff; border: 1px solid var(--input); color: var(--text); border-radius: 280px; padding: 10px 18px; font-size: 14px; }
@media (hover: hover) { .pill:hover { border-color: var(--accent); color: var(--accent); } }
.pill.first { border-color: var(--accent); color: var(--accent); }
.how { padding: 88px var(--edge); display: grid; grid-template-columns: 360px 1fr; gap: 80px; border-bottom: 1px solid var(--line); }
.explore { padding: 88px var(--edge); display: grid; grid-template-columns: 360px 1fr; gap: 80px; }
.side-h { display: flex; flex-direction: column; gap: 16px; }
.how .side-h { gap: 20px; }
.how.brief .side-h, .how.rf-teaser .side-h, .explore .side-h { gap: 16px; }
.side-h h2 { font-size: 48px; line-height: 1.1; letter-spacing: 0.02em; }
.side-h p { font-size: 16px; line-height: 1.5; color: var(--secondary); }
.side-h .btn-line, .side-h .btn { align-self: flex-start; margin-top: 8px; }
.side-h .more { align-self: flex-start; }
.side-h blockquote { margin: 0; padding: 0 0 0 20px; border-left: 2px solid var(--accent); font-family: var(--display); font-size: 22px; line-height: 1.35; }
.side-h blockquote a { display: block; margin-top: 10px; font-family: var(--body); font-size: 13px; color: var(--secondary); }
.brief-r { display: flex; flex-direction: column; gap: 32px; }
.brief-lead { font-family: var(--display); font-size: 34px; line-height: 1.25; letter-spacing: 0.01em; }
.brief-pts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.brief-pts li { display: flex; flex-direction: column; gap: 10px; border-top: 2px solid var(--accent); padding-top: 16px; font-size: 16px; line-height: 1.5; }
.brief-pts li span { color: var(--secondary); }
.flag-chips { display: flex; flex-wrap: wrap; gap: 12px; align-content: flex-start; padding-top: 40px; }
.flag-chip { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--input); border-radius: 280px; padding: 9px 16px; font-size: 14px; }
.flag-chip .box { width: 14px; height: 14px; border: 1.5px solid var(--secondary); border-radius: 3px; flex-shrink: 0; }
@media (hover: hover) { .flag-chip:hover { border-color: var(--accent); } }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.steps li { display: grid; grid-template-columns: 64px 1fr; gap: 24px; padding: 28px 0; border-top: 1px solid var(--line); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps .num { font-family: var(--display); font-size: 32px; color: var(--accent); }
.steps h3 { font-size: 24px; line-height: 1.15; letter-spacing: 0.02em; margin-bottom: 8px; }
.steps p { font-size: 16px; line-height: 1.5; color: var(--secondary); }
.chap-list { list-style: none; margin: 0; padding: 0; }
.chap-list li { border-top: 1px solid var(--line); }
.chap-list li:last-child { border-bottom: 1px solid var(--line); }
.chap-list a { display: grid; grid-template-columns: 56px 1fr 24px; align-items: center; padding: 22px 0; font-family: var(--display); font-size: 26px; line-height: 1.2; letter-spacing: 0.02em; }
.chap-list .no { font-size: 20px; color: var(--accent); }
.chap-list svg { flex-shrink: 0; }
.about { background: var(--band); padding: 72px var(--edge); display: grid; grid-template-columns: 360px 1fr; gap: 80px; align-items: start; }
.about h2 { font-size: 40px; line-height: 1.1; letter-spacing: 0.02em; }
.about-r { display: grid; grid-template-columns: 1fr 320px; gap: 64px; align-items: start; }
.about-r > p { font-size: 18px; line-height: 1.6; }
.disclaimer { padding: 32px var(--edge); background: #fff; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.5; color: var(--secondary); }

/* ---------- author card ---------- */
.a-card { display: flex; flex-direction: column; gap: 16px; color: var(--text); }
.a-top { display: flex; gap: 16px; align-items: center; }
.a-avatar { width: 72px; height: 72px; border-radius: 280px; background: var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; flex-shrink: 0; overflow: hidden; }
.a-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: 50% 20%; }
.a-id { display: flex; flex-direction: column; gap: 2px; }
.a-name { font-family: var(--display); font-size: 22px; line-height: 1.15; color: inherit; }
@media (hover: hover) { .a-name:hover { text-decoration: underline; text-underline-offset: 3px; color: inherit; } }
.a-sub { font-size: 14px; color: var(--secondary); }
.a-cred { font-size: 14px; line-height: 1.5; color: var(--secondary); }
.a-contact { padding: 0 20px; }
.a-more { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--accent); }

/* ---------- footer ---------- */
.ftr { margin-top: auto; background: var(--dark); color: #fff; padding: 64px var(--edge) 32px; display: flex; flex-direction: column; gap: 48px; }
.ftr-grid { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 48px; }
.ftr-col { display: flex; flex-direction: column; gap: 12px; }
.ftr-col a { color: #fff; font-family: var(--display); font-size: 24px; }
.ftr-offices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 32px; font-family: var(--display); font-size: 24px; }
.ftr-base { display: flex; justify-content: space-between; border-top: 1px solid var(--divider); padding-top: 24px; font-size: 13px; color: var(--input); gap: 16px; }
.ftr-base a { color: var(--input); }
.ftr-base .links { display: flex; gap: 32px; flex-wrap: wrap; }
.ftr-mini { display: none; }
.page.has-fn .ftr { padding-bottom: 80px; } /* the footnotes tab is fixed to the bottom of the screen */

/* ---------- answer page ---------- */
.ask-bar { background: var(--band); padding: 24px var(--edge); display: flex; gap: 12px; align-items: center; }
.ask-bar .back { font-size: 14px; color: var(--secondary); margin-right: 12px; white-space: nowrap; }
.art-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr) 300px; gap: 64px; padding: 56px var(--edge) 96px; align-items: start; }
.toc { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; line-height: 1.35; max-height: calc(100vh - 48px); overflow-y: auto; }
.toc .label { margin-bottom: 12px; }
.toc a { padding: 6px 0; color: var(--secondary); }
.toc a .n { color: var(--secondary); }
.toc .open { padding: 6px 0; font-weight: 700; color: var(--text); }
.toc .open .n { font-weight: 400; color: var(--secondary); }
.toc a.sub { padding: 5px 0 5px 16px; font-weight: 400; }
.toc a.cited { color: var(--accent); }
.toc a.here { padding-left: 14px; border-left: 2px solid var(--accent); color: var(--accent); font-weight: 700; }
.toc a.here .tag { font-weight: 400; }
.centre { display: flex; flex-direction: column; gap: 48px; min-width: 0; }
.is-personal .centre { gap: 40px; }
.q-art { display: flex; flex-direction: column; gap: 24px; }
.q-art .kicker { font-size: 14px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.q-art h1 { font-size: 48px; line-height: 1.1; letter-spacing: 0.02em; }
.q-art.personal h1 { font-size: 40px; line-height: 1.15; }
.ans { font-size: 20px; line-height: 1.55; display: flex; flex-direction: column; gap: 16px; max-width: 720px; }
.ans a.inline { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.chip { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; margin-left: 4px; border-radius: 280px; border: 1px solid var(--accent); color: var(--accent); background: transparent; padding: 0; font-size: 13px; font-weight: 700; vertical-align: 3px; line-height: 1; }
.chip.on { background: var(--accent); color: #fff; }
@media (hover: hover) { .chip:hover { background: var(--accent); color: #fff; } }
.ans-tools { display: flex; gap: 12px; align-items: center; padding-top: 8px; flex-wrap: wrap; }
.ans-tools .note { font-size: 13px; color: var(--secondary); margin-left: 8px; }
.ans-tools .note:first-child { margin-left: 0; }
.pending { font-size: 18px; color: var(--secondary); display: flex; align-items: center; gap: 12px; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); opacity: .25; animation: blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25 } 40% { opacity: 1 } }
.err { font-size: 18px; color: var(--text); display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.sources { display: flex; flex-direction: column; border-top: 1px solid var(--text); }
.sources h2 { font-size: 32px; line-height: 1.15; letter-spacing: 0.02em; padding: 32px 0 8px; }
.sources > p { margin: 0 0 24px; font-size: 16px; color: var(--secondary); }
.src-row { display: flex; align-items: center; gap: 16px; border-top: 1px solid var(--line); padding: 24px 0; width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; color: var(--text); font-family: inherit; }
.src-row:last-child { border-bottom: 1px solid var(--line); }
.num-chip { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 280px; border: 1px solid var(--accent); color: var(--accent); font-size: 14px; font-weight: 700; flex-shrink: 0; }
.num-chip.on { background: var(--accent); color: #fff; }
.num-chip.sm { width: 28px; height: 28px; }
.src-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.src-txt .ch { font-size: 13px; color: var(--secondary); }
.src-txt .ti { font-family: var(--display); font-size: 24px; line-height: 1.15; letter-spacing: 0.02em; }
.fn-line { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--secondary); }
.fn-badge { font-size: 11px; font-weight: 700; color: var(--text); background: var(--line); border-radius: 3px; padding: 1px 5px; }
.fn-short { display: none; }
.src-go { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.paa { display: flex; flex-direction: column; gap: 16px; }
.paa h2 { font-size: 24px; line-height: 1.15; letter-spacing: 0.02em; }
.paa .row { display: flex; flex-wrap: wrap; gap: 12px; }
.paa button { background: var(--band); border: none; border-radius: 280px; padding: 10px 18px; font-size: 14px; color: var(--text); text-align: left; }
@media (hover: hover) { .paa button:hover { color: var(--accent); } }
.rail { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 20px; border-top: 2px solid var(--accent); padding-top: 24px; }
.author-mobile { display: none; }

/* verging on legal advice (DBIC-style stop, brief 6.3): neutral grey, not an error red */
.stop { background: var(--band); border-top: 4px solid var(--dark); padding: 40px 48px; display: flex; flex-direction: column; gap: 20px; }
.stop-top { display: flex; align-items: center; gap: 14px; }
.stop-top svg { flex-shrink: 0; }
.stop h2 { font-size: 36px; line-height: 1.15; letter-spacing: 0.02em; max-width: 680px; }
.stop p { font-size: 18px; line-height: 1.6; max-width: 680px; }
.stop-btns { display: flex; gap: 12px; align-items: center; padding-top: 8px; }
.general { display: flex; flex-direction: column; gap: 20px; }
.general h2 { font-size: 28px; line-height: 1.15; letter-spacing: 0.02em; }
.general .ans { font-size: 18px; line-height: 1.6; gap: 14px; }
.src-compact { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.src-c { display: flex; align-items: center; gap: 16px; padding: 18px 0; border: 0; border-bottom: 1px solid var(--line); background: none; width: 100%; text-align: left; font-size: 16px; color: var(--text); }
.src-c-t { flex: 1; min-width: 0; }
.src-c-go { color: var(--accent); display: inline-flex; }
@media (hover: hover) { .src-c:hover .src-c-t strong { color: var(--accent); } }

/* ---------- source (document) view ---------- */
body.doc-open { overflow: hidden; }
.src-page { height: 100vh; height: 100dvh; display: flex; flex-direction: column; background: #fff; overflow: hidden; position: relative; }
.bar { position: relative; z-index: 2; flex-shrink: 0; height: 56px; background: var(--band); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 24px; padding: 0 var(--edge); }
.bar .q { flex: 1; font-size: 15px; color: var(--secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.bar .lbl { font-size: 13px; color: var(--secondary); }
.bar .chips { display: flex; gap: 8px; }
.bar .chips button { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 280px; border: 1px solid var(--accent); color: var(--accent); background: transparent; font-size: 14px; font-weight: 700; padding: 0; }
.bar .chips button[aria-current="true"] { background: var(--accent); color: #fff; }
.pull { position: absolute; left: 50%; top: 55px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 18px; background: var(--band); border: 1px solid var(--line); border-top: none; border-radius: 0 0 12px 12px; font-size: 13px; font-weight: 700; color: var(--text); }
.doc { flex: 1; display: grid; grid-template-columns: var(--edge) 232px minmax(0, 1fr) 56px var(--edge); min-height: 0; }
.doc-nav { grid-column: 2; } .scroller { grid-column: 3; } .minimap { grid-column: 4; }
.doc-nav { border-right: 1px solid var(--line); padding: 40px 24px 130px 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; line-height: 1.35; overflow-y: auto; }
.doc-nav .label { margin-bottom: 12px; }
.doc-nav a { padding: 6px 0; color: var(--secondary); }
.doc-nav a.open { font-weight: 700; color: var(--text); }
.doc-nav a.open .n { font-weight: 400; color: var(--secondary); }
.doc-nav a.sub { padding: 5px 0 5px 16px; font-weight: 400; }
.doc-nav a.cited { color: var(--accent); }
.doc-nav a.here { padding-left: 14px; border-left: 2px solid var(--accent); color: var(--accent); font-weight: 700; }
.doc-nav .tag { font-weight: 400; }
.doc-nav .ask-link { margin-top: 16px; color: var(--accent); font-weight: 700; }
.scroller { position: relative; overflow-y: auto; padding: 8px 0 0; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 36px, #000 calc(100% - 140px), rgba(0,0,0,.55) calc(100% - 60px), rgba(0,0,0,.3) 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 36px, #000 calc(100% - 140px), rgba(0,0,0,.55) calc(100% - 60px), rgba(0,0,0,.3) 100%); }
.scroller.plain { -webkit-mask-image: none; mask-image: none; }
.reading { position: relative; width: 720px; max-width: 100%; margin: 0 auto; padding: 32px 0 240px; font-size: 18px; line-height: 1.6; }
.sec { display: flex; flex-direction: column; gap: 18px; margin-bottom: 20px; scroll-margin-top: 40px; }
.sec.item { margin-bottom: 14px; }
.chap-head { display: flex; flex-direction: column; gap: 6px; padding-top: 24px; border-top: 1px solid var(--line); margin-top: 28px; }
.chap-head .label { font-size: 13px; color: var(--secondary); }
.chap-head h2 { font-size: 40px; line-height: 1.1; letter-spacing: 0.02em; }
.sec:first-child .chap-head { border-top: none; margin-top: 0; padding-top: 0; }
.sec h3 { font-size: 28px; line-height: 1.15; letter-spacing: 0.02em; padding-top: 16px; border-top: 1px solid var(--line); }
.sec .chap-head + h3 { padding-top: 0; border-top: none; }
.sec p.li { display: flex; gap: 12px; }
.sec p.li .mk { flex-shrink: 0; min-width: 28px; }
.sec ul { margin: 0; padding-left: 24px; }
.sec li { padding-left: 0; }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.tbl th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; padding: 0 16px 10px 0; border-bottom: 1px solid var(--text); vertical-align: bottom; }
.tbl td { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl td:first-child { width: 26%; font-weight: 700; }
mark.hl { background: var(--hl); color: var(--text); box-shadow: -4px 0 0 var(--hl), 4px 0 0 var(--hl); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
/* footnote markers: small square, #e6e6e6 on dark text; dark with white text when it belongs to the passage in focus */
sup { line-height: 0; }
.fnm { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; margin-left: 2px; border-radius: 3px; background: #e6e6e6; color: var(--text); font-size: 11px; font-weight: 700; padding: 0 3px; line-height: 1; vertical-align: baseline; }
.fnm::before { content: ""; position: absolute; inset: -12px -6px; } /* a larger hit area, same look */
.fnm.on { background: #1d2529; color: #fff; }
@media (hover: hover) { .fnm:hover { background: #1d2529; color: #fff; } }
.badge { position: absolute; left: -48px; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 280px; border: 1px solid var(--accent); background: #fff; color: var(--accent); font-size: 13px; font-weight: 700; }
.badge.on { background: var(--accent); color: #fff; }
.minimap { position: relative; border-left: 1px solid var(--line); }
.minimap .track { position: absolute; left: 26px; top: 24px; bottom: 120px; width: 4px; background: var(--line); border-radius: 280px; }
.minimap .thumb { position: absolute; left: -2px; width: 8px; background: var(--text); border-radius: 280px; opacity: .25; min-height: 12px; }
.minimap .tick { position: absolute; left: 18px; width: 20px; height: 3px; background: var(--accent); opacity: .6; }
.minimap .tick.on { opacity: 1; }

/* footnotes dock (brief 6.4): the tab is the button; the panel shows the footnotes of the section in view */
.fn { position: fixed; left: 0; right: 0; bottom: 0; z-index: 3; }
.fn.hidden { display: none; }
.fn-tab { position: absolute; left: var(--edge); top: -36px; height: 36px; display: inline-flex; align-items: center; gap: 10px; padding: 0 14px 0 16px; background: var(--dark); color: #fff; border: none; border-radius: 8px 8px 0 0; font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.fn-tab::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; } /* 44 px hit area, same look */
.fn-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; border-radius: 280px; background: #fff; color: var(--dark); font-size: 12px; letter-spacing: 0; }
.fn-tab .chev { width: 14px; height: 14px; flex-shrink: 0; transition: transform .2s; }
.fn.min .fn-tab .chev { transform: rotate(180deg); }
.fn-body { background: var(--dark); color: #fff; padding: 28px var(--edge) 32px; display: grid; grid-template-columns: 252px repeat(var(--cols, 1), minmax(0, 1fr)); gap: 48px; max-height: 42vh; overflow-y: auto; }
.fn.min .fn-body { display: none; }
.fn-head { display: flex; flex-direction: column; gap: 4px; align-self: start; }
.fn-head .by { font-size: 13px; color: #b3b3b3; }
.fn-head .hd { font-family: var(--display); font-size: 20px; line-height: 1.15; }
.fn-note { display: grid; grid-template-columns: 28px 1fr; gap: 12px; font-size: 15px; line-height: 1.55; padding-left: 18px; align-self: start; }
.fn-note p { min-width: 0; }
.fn-n { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 3px; background: #fff; color: var(--dark); font-size: 12px; font-weight: 700; }
.fn-note.on { border-left: 2px solid #63afb2; padding-left: 16px; }
.fn-note.dim { color: var(--input); }
.fn-note.dim .fn-n { background: var(--divider); color: #fff; }
.fn-note mark.hl { background: rgba(99,175,178,.32); color: #fff; box-shadow: -3px 0 0 rgba(99,175,178,.32), 3px 0 0 rgba(99,175,178,.32); }
.fn-sheet { display: none !important; }

/* contents menu (mobile) */
.menu-panel { position: fixed; inset: 0; z-index: 20; background: #fff; overflow-y: auto; display: none; flex-direction: column; }
.menu-panel.open { display: flex; }
.menu-panel .top { height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px 0 16px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.menu-panel nav { display: flex; flex-direction: column; padding: 16px; gap: 2px; font-size: 16px; }
.menu-panel nav a { padding: 10px 0; color: var(--secondary); }
.menu-panel nav a.sub { padding-left: 16px; font-size: 15px; }
.menu-panel nav a.open { font-weight: 700; color: var(--text); }
.menu-panel nav a.cited { color: var(--accent); }

#toast { position: fixed; left: 50%; bottom: 120px; transform: translate(-50%, 20px); background: var(--dark); color: #fff; border-radius: 280px; padding: 12px 24px; font-size: 14px; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 30; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- red flag check ---------- */
.crumbs { padding: 20px var(--edge) 0; font-size: 14px; color: var(--secondary); display: flex; gap: 8px; }
.crumbs a { color: var(--secondary); }
.crumbs .cur { color: var(--text); }
.rf-intro { padding: 40px var(--edge) 48px; display: flex; flex-direction: column; gap: 16px; }
.rf-intro > * { max-width: 900px; }
.rf-intro h1 { font-size: 64px; line-height: 1.05; letter-spacing: 0.01em; }
.rf-intro p { font-size: 20px; line-height: 1.5; }
.rf-grid { padding: 0 var(--edge) 96px; display: grid; grid-template-columns: 1fr 400px; gap: 56px; align-items: start; }
.rf-list { border: none; margin: 0; padding: 0; min-width: 0; }
.rf-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rf { display: grid; grid-template-columns: 24px 1fr; gap: 14px; padding: 20px; border: 1px solid var(--input); border-radius: 4px; background: #fff; cursor: pointer; }
@media (hover: hover) { .rf:hover { border-color: var(--accent); } }
.rf.on { border-color: var(--accent); background: #f0f7f7; box-shadow: inset 0 0 0 1px var(--accent); }
.rf:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.rf input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); }
.rf-t { display: flex; flex-direction: column; gap: 6px; }
.rf-h { font-size: 17px; font-weight: 700; }
.rf-s { font-size: 14px; line-height: 1.5; color: var(--secondary); }
.rf-aside { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 16px; border-top: 4px solid var(--dark); background: var(--band); padding: 28px; }
.rf-off { display: flex; flex-direction: column; gap: 10px; }
.rf-off p { font-size: 16px; line-height: 1.5; color: var(--secondary); }
.rf-on { display: flex; flex-direction: column; gap: 16px; }
.rf-on h2 { font-size: 28px; line-height: 1.15; letter-spacing: 0.02em; }
.rf-cite { font-size: 15px; line-height: 1.5; color: var(--secondary); }
.rf-steps { list-style: none; margin: 0; padding: 0; }
.rf-steps li { display: grid; grid-template-columns: 32px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.rf-steps .sn { font-family: var(--display); font-size: 22px; color: var(--accent); line-height: 1; }
.rf-steps .st { display: flex; flex-direction: column; gap: 4px; }
.rf-steps .st strong { font-size: 16px; }
.rf-steps .st span { font-size: 14px; line-height: 1.5; color: var(--secondary); }
.rf-notes { border-top: 1px solid var(--input); padding-top: 16px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 1.5; }
.rf-notes .more { display: inline; }
.rf-on .btn { margin-top: 4px; }

.rf-bar { display: none; }

/* ---------- smaller desktops ---------- */
@media (max-width: 1180px) {
  .art-grid { grid-template-columns: 220px minmax(0, 1fr); }
  .rail { grid-column: 2; position: static; }
  .hero { gap: 48px; }
  .hero h1 { font-size: clamp(52px, 5.6vw, 80px); }
  .hero-art { width: 380px; height: 400px; }
  .hc-panel { left: -32px; width: 340px; }
  .nav { gap: 24px; }
  .fn-body { grid-template-columns: 200px repeat(var(--cols, 1), minmax(0, 1fr)); gap: 32px; }
  .rf-grid { grid-template-columns: 1fr 340px; gap: 40px; }
  .about-r { grid-template-columns: 1fr 280px; gap: 40px; }
  .how, .explore, .about { grid-template-columns: 280px 1fr; gap: 56px; }
  .brief-lead { font-size: 30px; }
}

/* tablets (768-959 px): the hero stacks, same order as mobile, so the heading keeps its two lines */
@media (min-width: 768px) and (max-width: 959px) {
  .nav { gap: 16px; font-size: 15px; }
  .hero { flex-direction: column; align-items: stretch; gap: 40px; padding: 48px var(--edge); min-height: 0; }
  .hero h1 { font-size: 64px; }
  .hero-art { width: 100%; height: 380px; }
  .hc-panel { left: 24px; bottom: 24px; width: 400px; }
  .rf-grid { grid-template-columns: 1fr; }
  .rf-aside { position: static; }
  .how, .explore, .about { grid-template-columns: 1fr; gap: 32px; }
  .brief-pts { grid-template-columns: 1fr; gap: 24px; }
  .flag-chips { padding-top: 0; }
}

/* ---------- mobile (< 768px), from MobileAnswer / MobileSource / MobileDeclined ---------- */
@media (max-width: 767px) {
  :root { --gut: 16px; }
  .hdr { height: 56px; padding: 0 12px 0 16px; }
  .logo, .logo img { height: 28px; }
  .nav, .hdr-r .fr { display: none; }
  .hdr .menu-btn { display: inline-flex; }
  .hdr-r { gap: 0; }
  .hdr .icon-btn { width: 44px; height: 44px; padding: 0; }

  .hero { flex-direction: column; align-items: stretch; gap: 24px; padding: 40px 16px; min-height: 0; }
  .hero h1 { font-size: 44px; }
  .hero p { font-size: 17px; }
  .hero-btns { flex-direction: column; align-items: stretch; gap: 16px; margin-top: 0; }
  .hero-btns .btn, .hero-btns .btn-dark { width: 100%; }
  /* photo full width at 4:3, the panel overlaps its bottom 40% (30% of the width is 40% of a 4:3 photo's height) */
  .hero-art { width: auto; height: auto; margin: 0 -16px; }
  .hero-img { position: static; width: 100%; height: auto; aspect-ratio: 4 / 3; }
  .hc-panel { position: relative; left: auto; bottom: auto; width: auto; margin: -30% 16px 0; }
  .hc-src { display: none; } /* DBIC brief 21: the question and every line stay, only the sources line is hidden */
  .ask-band { padding: 24px 16px 32px; }
  .ask-band > label { font-size: 26px; }
  .ask-row { flex-direction: column; gap: 8px; align-items: stretch; }
  .ask-row .field { flex: none; width: 100%; padding: 0 14px; }
  .ask-row .btn { width: 100%; }
  .how, .explore { grid-template-columns: 1fr; gap: 24px; padding: 40px 16px; }
  .how.brief .side-h, .how.rf-teaser .side-h { gap: 12px; }
  .side-h h2 { font-size: 32px; }
  .brief-lead { font-size: 24px; }
  .brief-pts { grid-template-columns: 1fr; gap: 24px; }
  .flag-chips { padding-top: 0; }
  .chap-list a { font-size: 20px; padding: 18px 0; grid-template-columns: 40px 1fr 24px; }
  .chap-list .no { font-size: 16px; }
  .steps li { grid-template-columns: 40px 1fr; gap: 12px; }
  .about { grid-template-columns: 1fr; gap: 24px; padding: 40px 16px; }
  .about h2 { font-size: 32px; }
  .about-r { grid-template-columns: 1fr; gap: 28px; }
  .about-r > p { font-size: 17px; }
  .disclaimer { padding: 24px 16px; }
  .ftr { padding: 24px 16px; gap: 0; }
  .ftr-grid, .ftr-base { display: none; }
  .ftr-mini { display: block; font-size: 13px; color: var(--input); }
  .page.has-fn .ftr { padding-bottom: 64px; }

  .ask-bar { padding: 16px; gap: 8px; }
  .ask-bar .back { display: none; }
  .ask-bar .field { padding: 0 14px; }
  .ask-bar .field svg { display: none; }
  .ask-bar .btn { min-width: 72px; padding: 0 16px; }
  .art-grid { display: flex; flex-direction: column; gap: 0; padding: 0; }
  .toc, .rail { display: none; }
  .centre, .is-personal .centre { gap: 0; }
  .q-art { padding: 28px 16px 32px; gap: 16px; }
  .q-art .kicker { font-size: 12px; }
  .q-art h1 { font-size: 30px; }
  .q-art.personal { padding: 28px 16px 12px; gap: 12px; }
  .q-art.personal h1 { font-size: 24px; line-height: 1.2; }
  .ans { font-size: 17px; line-height: 1.55; }
  .ans-tools .btn-line { display: none; }
  .ans-tools { padding-top: 0; }
  .ans-tools .note { margin-left: 0; }
  .sources { margin: 0 16px 32px; }
  .sources h2 { font-size: 24px; padding: 24px 0 16px; }
  .sources > p { display: none; }
  .src-row { gap: 12px; padding: 16px 0; }
  .src-txt .ch { display: none; }
  .src-txt .ti { font-size: 20px; }
  .fn-badge, .fn-long { display: none; }
  .fn-short { display: inline; }
  .fn-line { font-size: 12px; margin-top: 4px; }
  .src-go span { display: none; }
  .paa { padding: 0 16px 40px; gap: 12px; }
  .paa h2 { font-size: 20px; }
  .paa .row { flex-direction: column; gap: 12px; }
  .paa button { padding: 12px 18px; font-size: 15px; }
  .author-mobile { display: flex; flex-direction: column; gap: 16px; margin: 0 16px 40px; padding-top: 24px; border-top: 2px solid var(--accent); }
  .stop { margin: 16px; padding: 24px 20px; gap: 14px; }
  .stop-top { gap: 10px; }
  .stop-top svg { width: 22px; height: 22px; }
  .stop h2 { font-size: 24px; line-height: 1.2; }
  .stop p { font-size: 16px; line-height: 1.55; }
  .stop-btns { padding-top: 0; flex-direction: column; align-items: stretch; gap: 14px; }
  .stop-btns .btn, .stop-btns .btn-line { width: 100%; padding: 0 20px; }
  .general { padding: 16px 16px 32px; gap: 12px; }
  .general h2 { font-size: 22px; line-height: 1.2; }
  .general .ans { font-size: 16px; line-height: 1.55; gap: 12px; }
  .src-compact { margin-top: 8px; }
  .src-c { gap: 12px; padding: 16px 0; font-size: 15px; line-height: 1.4; }
  .src-compact .src-c:last-child { border-bottom: 1px solid var(--line); }

  .bar { height: 52px; gap: 8px; padding: 0 16px; }
  .bar .q, .bar .lbl { display: none; }
  .bar .barlbl { flex: 1; }
  .bar .chips { gap: 8px; }
  .bar .chips button { width: 36px; height: 36px; }
  .pull { top: 51px; height: 30px; padding: 0 16px; }
  .doc { display: block; flex: 1; min-height: 0; }
  .doc-nav, .minimap { display: none; }
  .scroller { height: 100%; padding: 0; }
  .reading { padding: 44px 16px 160px 36px; font-size: 17px; line-height: 1.55; width: 100%; }
  .sec { gap: 14px; }
  .chap-head h2 { font-size: 26px; }
  .sec h3 { font-size: 26px; }
  .sec ul { padding-left: 20px; }
  .badge { left: 6px; width: 22px; height: 22px; font-size: 11px; }

  /* footnotes: the tab sits at the bottom and opens a sheet with a grab handle and a 44 px close button */
  .fn-tab { left: 16px; top: -36px; height: 36px; padding: 0 12px; gap: 8px; font-size: 11px; }
  .fn-count { min-width: 18px; height: 18px; font-size: 11px; }
  .fn-body { display: none !important; }
  .fn-sheet { display: none !important; background: var(--dark); color: #fff; border-radius: 16px 16px 0 0; padding: 12px 16px 28px; flex-direction: column; gap: 14px; max-height: 70vh; overflow-y: auto; box-shadow: 0 -8px 24px rgba(0,0,0,.18); }
  .fn.sheet-open .fn-sheet { display: flex !important; }
  .fn.sheet-open .fn-tab { display: none; }
  .fn-sheet .grab { align-self: center; width: 40px; height: 4px; border-radius: 280px; background: var(--secondary); flex-shrink: 0; }
  .fn-sheet-top { display: flex; align-items: center; justify-content: space-between; }
  .fn-x { width: 44px; height: 44px; margin-right: -10px; background: none; border: none; color: #fff; display: inline-flex; align-items: center; justify-content: center; }
  .fn-note.sheet { grid-template-columns: 24px 1fr; padding-left: 0; font-size: 15px; line-height: 1.55; }
  .fn-note.sheet .fn-n { width: 22px; height: 22px; }
  .fn-note.sheet.on { border-left: none; padding-left: 0; }
  .fn-note.sheet.dim { font-size: 14px; line-height: 1.5; color: #b3b3b3; border-top: 1px solid var(--divider); padding-top: 12px; }
  #toast { bottom: 110px; }

  .crumbs { padding: 16px 16px 0; }
  .rf-intro { padding: 28px 16px 32px; }
  .rf-intro h1 { font-size: 40px; }
  .rf-intro p { font-size: 17px; }
  .rf-grid { grid-template-columns: 1fr; gap: 32px; padding: 0 16px 56px; }
  .rf-cards { grid-template-columns: 1fr; }
  .rf-aside { position: static; padding: 24px 20px; }
  .rf-bar:not([hidden]) { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 4; height: calc(56px + env(safe-area-inset-bottom)); padding: 0 16px env(safe-area-inset-bottom); align-items: center; justify-content: space-between; background: var(--dark); color: #fff; border: none; font-size: 15px; text-align: left; }
  .rf-bar-r { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
  .rf-bar-r svg { flex-shrink: 0; }
  .rf-grid + .ftr { padding-bottom: 80px; }
}
@media (min-width: 768px) { .fn-sheet { display: none !important; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- no widows (DBIC brief 10.6) ---------- */
h1, h2, h3, h4, .src-txt .ti, .chap-list a > span, .steps .num + div h3 { text-wrap: balance; }
p, li, .ans, .ans p, .sec p, .sec li, .steps p, .side-h p, .disclaimer, .src-txt .ch, .pill, .paa button, .toc a, .doc-nav a, .a-cred, .rf-s, .rf-steps .st span, .brief-pts li span, .stop p, .src-c-t { text-wrap: pretty; }
.hero h1 { text-wrap: wrap; } /* fixed copy with a hard break */
.hc-q { text-wrap: balance; } .hc-a, .hero p { text-wrap: pretty; }
.nb { white-space: nowrap; }
.toc a, .doc-nav a, .menu-panel nav a { text-wrap: balance; }
