/* ==========================================================================
   Specialist — theme.css
   Flat, architectural, framed. Newsreader display over Archivo UI.
   Every colour reads from a custom property so the Colour scheme settings
   tab can repaint the theme by overriding :root. Never hard-code a palette
   hex below this token block.
   ========================================================================== */

:root {
  /* Palette (Broadsheet default). Overridable from Appearance -> Specialist. */
  --ground: #f3f2f2;
  --ink: #201e1d;
  --brand: #0049b7;   /* eyebrows, numbers, links, data */
  --cta: #ff1d58;     /* actions / CTAs only */
  --pink: #f75990;    /* tertiary accent, Note type */
  --cyan: #00ddff;    /* ledger accent (box 3) */
  --yellow: #fff685;  /* ledger accent (box 4) */
  --surface: #eceaf3; /* tinted hover fill */
  --placeholder: #eae9e9; /* image placeholder box */
  --paper: #ffffff;

  /* Type */
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-ui: "Archivo", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  /* Structure */
  --rule: 2px solid var(--ink);
  --hair: 1px solid rgba(32, 30, 29, 0.18);
  --frame-radius: 22px;
  --control-radius: 12px;
  --chip-radius: 999px;

  /* Rhythm */
  --pad-section: 40px;
  --pad-tight: 28px;
  --maxw: 1120px;
}

/* ---- reset / base ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
}
a { color: var(--brand); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
h1, h2, h3, h4, h5, h6 { margin: 0 0 .4em; line-height: 1.1; letter-spacing: -0.01em; font-weight: 700; }
.disp { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.015em; }
.muted { color: rgba(32, 30, 29, 0.6); }
.eyebrow {
  font-family: var(--font-ui); font-size: 12px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--brand);
}
.num { font-family: var(--font-ui); font-weight: 800; color: var(--brand); }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- accessibility chrome ---------------------------------------------- */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--brand) 26%, transparent); }
.skip-link {
  position: absolute; left: 8px; top: -56px; z-index: 200;
  background: var(--ink); color: var(--ground);
  font-weight: 700; font-size: 13px; letter-spacing: .04em; text-transform: uppercase;
  padding: 10px 16px; border-radius: var(--control-radius); transition: top .15s;
}
.skip-link:focus { top: 8px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---- the frame ---------------------------------------------------------- */
.site {
  max-width: var(--maxw); margin: 24px auto; padding: 0 24px;
}
.frame {
  background: var(--ground);
  border: var(--rule);
  border-radius: var(--frame-radius);
  overflow: hidden;
}
.rule-b { border-bottom: var(--rule); }
.rule-t { border-top: var(--rule); }
.section { padding: var(--pad-section); }
.section-tight { padding: var(--pad-tight); }

/* ---- utility strip ------------------------------------------------------ */
.utility {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 28px; font-size: 12px; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase; border-bottom: var(--rule);
  flex-wrap: wrap;
}
.utility .coords { color: rgba(32, 30, 29, .7); }
.utility .util-links { display: flex; gap: 16px; align-items: center; }
.util-links a:hover { color: var(--brand); text-decoration: none; }
.srch {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  border: 1px solid rgba(32, 30, 29, .35); border-radius: var(--chip-radius);
  padding: 4px 12px; background: transparent; color: inherit;
  font: inherit; text-transform: uppercase; letter-spacing: .04em;
  transition: background .14s, color .14s, border-color .14s;
}
.srch:hover, .srch:focus-visible { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.srch kbd {
  font-family: var(--font-ui); font-size: 10px; border: 1px solid currentColor;
  border-radius: 5px; padding: 1px 5px; opacity: .8;
}

/* ---- masthead ----------------------------------------------------------- */
.masthead { padding: 30px 40px; border-bottom: var(--rule); }
.masthead-row {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  flex-wrap: wrap;
}
.nameplate {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(30px, 6vw, 64px); line-height: .98; letter-spacing: -0.02em;
  white-space: nowrap;
}
.nameplate-sub { font-size: 15px; font-weight: 600; margin-top: 8px; letter-spacing: .01em; }
.mainnav { display: flex; gap: 22px; align-items: baseline; white-space: nowrap; }
.mainnav a { color: var(--ink); font-weight: 600; font-size: 15px; }
.mainnav a:hover, .navlink:hover { color: var(--brand); text-decoration: none; }
.mainnav .cta-link { color: var(--cta); }
.nav-toggle {
  display: none; border: 1px solid var(--ink); background: transparent;
  border-radius: var(--control-radius); padding: 8px 12px; cursor: pointer;
  font: inherit; font-weight: 700;
}

/* ---- buttons / tags ----------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-family: var(--font-ui); font-weight: 700; font-size: 15px; line-height: 1.1;
  padding: 13px 20px; border-radius: var(--control-radius);
  border: 2px solid var(--ink); background: transparent; color: var(--ink);
  text-decoration: none; transition: background .14s, color .14s, border-color .14s;
}
.btn:hover { background: var(--ink); color: var(--ground); text-decoration: none; }
.btn-cta { background: var(--cta); border-color: var(--cta); color: #fff; }
.btn-cta:hover { background: #d60d40; border-color: #d60d40; color: #fff; }
.btn svg { width: 18px; height: 18px; }
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; letter-spacing: .04em;
  padding: 6px 12px; border-radius: var(--chip-radius);
  border: 1px solid rgba(32, 30, 29, .3); color: var(--ink); background: transparent;
}
.type-chip {
  display: inline-flex; align-items: center; font-size: 11px; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase; padding: 4px 10px;
  border-radius: var(--chip-radius); color: #fff;
}
.type-chip[data-kind="case"]  { background: var(--cta); }
.type-chip[data-kind="guide"] { background: var(--brand); }
.type-chip[data-kind="note"]  { background: var(--pink); }

/* ---- hero --------------------------------------------------------------- */
.hero { display: grid; grid-template-columns: 1.4fr 1fr; }
.hero-main { padding: var(--pad-section); border-right: var(--rule); }
.hero-side { padding: var(--pad-section); display: flex; flex-direction: column; gap: 20px; }
.hero-eyebrows { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.hero h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(30px, 4.6vw, 52px); line-height: 1.02; letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.hero-lede { font-size: 19px; line-height: 1.5; max-width: 46ch; }
.prooflist { list-style: none; margin: 0; padding: 0; }
.prooflist li {
  display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; border-top: var(--hair);
  font-size: 15.5px;
}
.prooflist li:first-child { border-top: 0; }
.prooflist svg { width: 18px; height: 18px; color: var(--brand); flex: none; margin-top: 2px; }

/* ---- stat ledger -------------------------------------------------------- */
.ledger { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: var(--rule); }
.ledger .stat { padding: 26px var(--pad-tight); border-right: var(--hair); }
.ledger .stat:last-child { border-right: 0; }
.stat .stat-n { font-family: var(--font-display); font-size: 40px; font-weight: 600; color: var(--brand); line-height: 1; }
.stat .stat-l { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-top: 8px; color: rgba(32,30,29,.7); }

/* ---- generic section heads --------------------------------------------- */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.sec-head h2 { font-family: var(--font-display); font-weight: 600; font-size: 30px; }
.sec-head .badge { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }

/* ---- services / AI grid ------------------------------------------------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); }
.cell { padding: var(--pad-tight); border-top: var(--rule); border-right: var(--hair); transition: background .14s; }
.grid-3 .cell:nth-child(3n) { border-right: 0; }
.grid-2 .cell:nth-child(2n) { border-right: 0; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); }
.grid-4 .cell { border-right: var(--rule); border-bottom: var(--rule); }
.grid-4 .cell:nth-child(4n) { border-right: 0; }
.cta-banner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 40px var(--pad-section); background: var(--ink); color: var(--ground); text-decoration: none; border-top: var(--rule); }
.cta-banner .disp { font-size: clamp(24px, 3.6vw, 40px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; max-width: 26ch; }
.cta-banner:hover { background: #000; text-decoration: none; }
.cta-banner-go { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; font-size: 15px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cta); }
@media (max-width: 900px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-4 .cell:nth-child(2n) { border-right: 0; } }
@media (max-width: 680px) { .grid-4 { grid-template-columns: 1fr; } .grid-4 .cell { border-right: 0; } }
.svc:hover { background: var(--surface); }
.cell h3 { font-size: 19px; margin-bottom: 6px; }
.cell .cell-icon { width: 24px; height: 24px; color: var(--brand); margin-bottom: 12px; }
.cell .cell-mark { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); margin-bottom: 8px; }
.cell p { font-size: 14.5px; color: rgba(32,30,29,.8); margin: 0; }

/* ---- ranking strip ------------------------------------------------------ */
.ranking-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 18px 28px; border-bottom: var(--rule); flex-wrap: wrap; }
.ranking-head .label { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.ranking-head .summary { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); }
.ranking-row { display: grid; grid-template-columns: 1fr 120px 90px; gap: 20px; align-items: baseline; padding: 13px 28px; border-top: var(--hair); }
.ranking-row .q { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.ranking-row .pos { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .55; text-align: right; }
.ranking-row .impr { font-size: 17px; font-weight: 800; color: var(--brand); text-align: right; }

/* ---- the index / post list --------------------------------------------- */
.index-filter { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; letter-spacing: .04em;
  padding: 7px 14px; border-radius: var(--chip-radius); border: 1px solid rgba(32,30,29,.3);
  background: transparent; color: var(--ink); text-transform: uppercase;
  transition: background .12s, color .12s, border-color .12s;
}
.chip:hover, .chip[aria-pressed="true"] { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.idx-row { position: relative; display: grid; grid-template-columns: 56px 1fr auto; gap: 22px; align-items: baseline; padding: 20px 28px; border-top: var(--rule); transition: background .12s, color .12s; }
.idx-row:first-of-type { border-top: 0; }
.idx-row:hover { background: var(--ink); color: #fff; }
.idx-row:hover .idx-meta, .idx-row:hover .idx-num, .idx-row:hover a { color: #fff; }
.idx-num { font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--brand); }
.idx-body h3 { font-family: var(--font-display); font-weight: 600; font-size: 22px; margin: 6px 0; }
.idx-body h3 a { color: var(--ink); }
.idx-dek { font-size: 14.5px; color: rgba(32,30,29,.75); margin: 0; }
.idx-meta { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; color: rgba(32,30,29,.6); }
.idx-row:hover .idx-dek { color: rgba(255,255,255,.8); }
.idx-arrow { opacity: 0; transform: translateX(-6px); transition: .16s; }
.idx-row:hover .idx-arrow { opacity: 1; transform: translateX(0); }

/* ---- FAQ ---------------------------------------------------------------- */
.faq details { border-top: var(--rule); padding: 18px 28px; }
.faq details:first-of-type { border-top: 0; }
.faq summary { cursor: pointer; list-style: none; font-family: var(--font-display); font-weight: 600; font-size: 20px; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-ui); font-weight: 700; color: var(--brand); }
.faq details[open] summary::after { content: "\2013"; }
.faq p { margin: 12px 0 0; color: rgba(32,30,29,.82); max-width: 70ch; }

/* ---- articles / pages --------------------------------------------------- */
.article { display: grid; grid-template-columns: 1fr; }
.article-head { padding: var(--pad-section); border-bottom: var(--rule); }
.article-head h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(30px, 4.4vw, 46px); line-height: 1.05; }
.article-dek { font-size: 20px; line-height: 1.45; color: rgba(32,30,29,.8); margin-top: 14px; max-width: 60ch; }
.article-meta { display: flex; gap: 16px; align-items: center; margin-top: 18px; font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: rgba(32,30,29,.6); flex-wrap: wrap; }
.factbox { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: var(--rule); }
.factbox .fact { padding: 18px var(--pad-tight); border-right: var(--hair); }
.factbox .fact:last-child { border-right: 0; }
.factbox .fk { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; opacity: .6; }
.factbox .fv { display: inline-block; margin-top: 8px; padding: 3px 10px; border-radius: var(--chip-radius); font-weight: 800; font-size: 13px; }
.entry { padding: var(--pad-section); display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: start; }
.entry-aside { position: sticky; top: 20px; }
.entry-toc { list-style: none; margin: 0 0 24px; padding: 0; }
.entry-toc li { padding: 7px 0; border-top: var(--hair); font-size: 14px; }
.entry-toc li:first-child { border-top: 0; }
.entry-toc a { color: var(--ink); }
.entry-content { font-size: 17.5px; line-height: 1.7; max-width: 68ch; }
.entry-content h2 { font-family: var(--font-display); font-weight: 600; font-size: 28px; margin: 1.6em 0 .5em; }
.entry-content h3 { font-family: var(--font-display); font-weight: 600; font-size: 22px; margin: 1.4em 0 .4em; }
.entry-content p { margin: 0 0 1.1em; }
.entry-content blockquote { margin: 1.4em 0; padding: 8px 0 8px 22px; border-left: 3px solid var(--cta); font-family: var(--font-display); font-size: 24px; line-height: 1.35; font-style: italic; }
.entry-content a { color: var(--brand); text-decoration: underline; }
.entry-content img { border-radius: var(--control-radius); margin: 1.4em 0; }
.entry-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

/* featured / hero images print in full colour */
.grayscale { border-radius: var(--control-radius); overflow: hidden; }

/* author card + next-in-cluster */
.authorcard { display: flex; gap: 20px; align-items: center; padding: var(--pad-tight); border-top: var(--rule); }
.authorcard .avatar { width: 64px; height: 64px; border-radius: var(--chip-radius); overflow: hidden; flex: none; }
.authorcard .avatar img { width: 100%; height: 100%; object-fit: cover; }
.authorcard h4 { font-size: 17px; margin: 0 0 2px; }
.authorcard p { margin: 0; font-size: 14px; color: rgba(32,30,29,.75); }
.next-cluster { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 28px; border-top: var(--rule); }
.next-cluster .lbl { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
.next-cluster a { font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--ink); }
.share-row { display: flex; gap: 10px; align-items: center; padding: 18px 28px; border-top: var(--rule); flex-wrap: wrap; }
.share-row .lbl { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(32,30,29,.6); margin-right: 6px; }
.share-row a { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border: 1px solid rgba(32,30,29,.3); border-radius: var(--control-radius); color: var(--ink); }
.share-row a:hover { background: var(--ink); color: #fff; }
.share-row a svg { width: 18px; height: 18px; }

/* ---- resume ------------------------------------------------------------- */
.resume-summary { font-size: 19px; line-height: 1.55; max-width: 62ch; }
.eng-row { display: grid; grid-template-columns: 56px 150px 1fr auto; gap: 24px; align-items: baseline; padding: 24px 28px; border-top: var(--rule); }
.eng-row:first-of-type { border-top: 0; }
.eng-num { font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--brand); }
.eng-years { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.eng-role { font-family: var(--font-display); font-weight: 600; font-size: 19px; margin: 0 0 6px; }
.eng-detail { font-size: 14.5px; color: rgba(32,30,29,.8); margin: 0; max-width: 68ch; }
.eng-result { align-self: start; }
.eng-result .tag { border-color: var(--brand); color: var(--brand); font-weight: 800; }
.cred-row { display: grid; grid-template-columns: 90px 1fr auto; gap: 20px; align-items: baseline; padding: 16px 28px; border-top: var(--hair); }
.cred-row:first-of-type { border-top: 0; }
.cred-year { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); }
.cert-row { cursor: pointer; }
.cert-row:hover { background: var(--surface); }
.skill-tags { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- forms -------------------------------------------------------------- */
.field { display: block; margin-bottom: 18px; }
.field > label { display: block; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 7px; }
.input, textarea.input, select.input {
  width: 100%; font: inherit; font-size: 15px; padding: 12px 14px;
  background: var(--paper); color: var(--ink);
  border: 1px solid rgba(32,30,29,.35); border-radius: var(--control-radius);
}
.input:focus-visible { border-color: var(--brand); }
.need-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.need-chips .chip { text-transform: none; letter-spacing: 0; cursor: pointer; }
/* Visually hide the native checkbox; the label chip is the control. */
.need-chip-input {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
/* Filled state, driven by js/forms.js on change and by .is-on server-side. */
.need-chip.is-on { background: var(--ink); color: var(--ground); border-color: var(--ink); }
/* Keyboard focus lands on the hidden input; ring the visible chip instead. */
.need-chip-input:focus-visible + .need-chip,
.need-chip:has(.need-chip-input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.form-error { color: #b3123f; font-size: 13px; font-weight: 700; margin-top: 6px; }
.form-note { font-size: 13px; color: rgba(32,30,29,.7); }
.form-success { padding: 16px 18px; border: 2px solid var(--brand); border-radius: var(--control-radius); font-weight: 600; }

/* ---- comments ----------------------------------------------------------- */
.comments { padding: var(--pad-section); border-top: var(--rule); }
.comment-list { list-style: none; margin: 0 0 32px; padding: 0; }
.comment-list li { padding: 18px 0; border-top: var(--hair); }
.comment-list li:first-child { border-top: 0; }
.comment-list .children { list-style: none; margin: 12px 0 0 28px; padding: 0; border-left: 2px solid rgba(32,30,29,.15); padding-left: 20px; }
.comment-meta { font-size: 13px; font-weight: 700; }
.comment-meta .date { color: rgba(32,30,29,.55); font-weight: 600; margin-left: 8px; }
.comment-body { margin: 6px 0 0; }

/* ---- footer ------------------------------------------------------------- */
.site-footer { border-top: var(--rule); }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; }
.footer-top > div { padding: var(--pad-tight); border-right: var(--hair); }
.footer-top > div:last-child { border-right: 0; }
.footer-brand .disp { font-size: 24px; }
.footer-col h5 { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); margin-bottom: 12px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { padding: 5px 0; }
.footer-col a { color: var(--ink); }
.footer-col a:hover { color: var(--brand); }
.footer-social { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.footer-social a { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; border: 1px solid rgba(32,30,29,.3); border-radius: var(--control-radius); color: var(--ink); }
.footer-social a:hover { background: var(--ink); color: #fff; }
.footer-social svg { width: 18px; height: 18px; }
.footer-legal { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 28px; border-top: var(--rule); font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: rgba(32,30,29,.65); flex-wrap: wrap; }
.footer-authority { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 28px; border-top: var(--hair); font-size: 12px; }
.footer-authority .lbl { font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
.footer-authority a { color: var(--ink); font-weight: 600; }
.footer-authority a:hover { color: var(--brand); }
.footer-authority .sep { opacity: .4; margin: 0 2px; }

/* ---- pagination --------------------------------------------------------- */
.pagination { display: flex; gap: 10px; align-items: center; justify-content: center; padding: 24px; border-top: var(--rule); }
.pagination .page-numbers { display: inline-flex; min-width: 40px; height: 40px; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid rgba(32,30,29,.3); border-radius: var(--control-radius); font-weight: 700; color: var(--ink); }
.pagination .page-numbers.current { background: var(--ink); color: #fff; border-color: var(--ink); }
.pagination .page-numbers:hover { background: var(--ink); color: #fff; text-decoration: none; }

/* ---- search overlay ----------------------------------------------------- */
.lb-back { position: fixed; inset: 0; background: rgba(20,18,17,.72); display: flex; align-items: flex-start; justify-content: center; padding: 96px 24px 24px; z-index: 120; }
.lb-back[hidden] { display: none; }
.search-panel { width: min(640px, 100%); background: var(--ground); border: var(--rule); border-radius: var(--frame-radius); overflow: hidden; }
.search-panel .search-input-row { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: var(--rule); }
.search-panel input[type="search"] { flex: 1; font: inherit; font-size: 18px; border: 0; background: transparent; color: var(--ink); }
.search-panel input[type="search"]:focus { outline: none; }
.search-panel .esc { font-size: 11px; border: 1px solid rgba(32,30,29,.4); border-radius: 6px; padding: 2px 7px; }

/* ---- cert lightbox ------------------------------------------------------ */
.cert-lightbox { width: min(720px, 100%); background: var(--ground); border: var(--rule); border-radius: var(--frame-radius); overflow: hidden; }
.cert-lightbox .lb-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; border-bottom: var(--rule); }
.cert-lightbox .lb-close { border: 1px solid var(--ink); background: transparent; border-radius: var(--control-radius); padding: 6px 12px; cursor: pointer; font: inherit; font-weight: 700; }
.cert-lightbox img { width: 100%; }

/* ---- empty / 404 -------------------------------------------------------- */
.empty { padding: 64px var(--pad-section); text-align: left; }
.empty svg { width: 48px; height: 48px; color: var(--brand); margin-bottom: 16px; }
.empty h1 { font-family: var(--font-display); font-weight: 600; font-size: 40px; }
.topic-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.inline-search { display: flex; gap: 10px; align-items: stretch; margin-top: 28px; max-width: 460px; }
.inline-search .input { flex: 1; }
.inline-search .btn { white-space: nowrap; }

/* ---- responsive: the mobile patch, now class-based ---------------------- */
@media (max-width: 900px) {
  .hero, .ledger, .grid-3, .grid-2, .factbox, .footer-top { grid-template-columns: 1fr; }
  .hero-main, .cell, .ledger .stat, .factbox .fact, .footer-top > div { border-right: 0; }
  .hero-main { border-bottom: var(--rule); }
  .ledger .stat, .factbox .fact { border-bottom: var(--hair); }
  .entry { grid-template-columns: 1fr; }
  .entry-aside { position: static; }
  .eng-row { grid-template-columns: 1fr; gap: 8px; }
  .cred-row { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 680px) {
  :root { --pad-section: 26px; --pad-tight: 20px; }
  .masthead-row { align-items: flex-start; }
  .mainnav { display: none; width: 100%; flex-direction: column; gap: 14px; margin-top: 16px; }
  .mainnav.open { display: flex; }
  .nav-toggle { display: inline-flex; }
  .idx-row { grid-template-columns: 1fr; gap: 6px; }
  .idx-arrow { display: none; }
  .ranking-row { grid-template-columns: 1fr auto; }
  .ranking-row .pos { grid-column: 2; }
}

/* ==========================================================================
   Comp fidelity layer (v1.5). Matches the approved front-page design comp.
   Overrides earlier generic rules where the comp is specific.
   ========================================================================== */

/* Eyebrow with a short blue lead rule */
.eyebrow.rule-eyebrow { display: flex; align-items: center; gap: 10px; }
.lead-rule { display: inline-block; width: 34px; height: 2px; background: var(--brand); flex: none; }

/* Utility strip: coords | centre quick-links | search + contact */
.utility { justify-content: space-between; }
.utility .coords { display: inline-flex; align-items: center; gap: 7px; }
.utility .coords svg { color: var(--brand); }
.util-center { display: flex; align-items: center; gap: 10px; }
.util-center a { color: var(--brand); font-weight: 700; }
.util-center a:hover { text-decoration: underline; }
.util-center .dot { opacity: .5; }
.util-links { display: flex; align-items: center; gap: 16px; }
.util-contact { color: var(--ink); font-weight: 700; }
.util-contact:hover { color: var(--brand); text-decoration: none; }

/* Masthead brand lockup + nav */
.brand-lockup { display: inline-flex; align-items: center; gap: 14px; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: var(--ink); color: var(--ground); border-radius: 8px; flex: none; }
.brand-word { font-family: var(--font-ui); font-weight: 800; font-size: clamp(18px, 2.2vw, 23px); letter-spacing: .01em; text-transform: uppercase; color: var(--ink); }
.brand-lockup:hover { text-decoration: none; }
.mainnav a { text-transform: uppercase; letter-spacing: .04em; font-size: 14px; font-weight: 700; }
.mainnav .cta-link { color: var(--cta); }

/* Hero: eyebrow + big serif name + full-bleed figure */
.hero-name { font-family: var(--font-display); font-weight: 600; font-size: clamp(40px, 7.4vw, 88px); line-height: .98; letter-spacing: -0.025em; margin: 10px 0 0; }
.hero-figure { margin: 0; width: 100%; aspect-ratio: 16 / 6.4; overflow: hidden; }
.hero-figure img { width: 100%; height: 100%; object-fit: cover; }
.hero-figure--ph { background: var(--placeholder); }

/* Statement band */
.statement { display: grid; grid-template-columns: 1.5fr 1fr; }
.statement-main { padding: var(--pad-section); border-right: var(--rule); }
.statement-head { font-family: var(--font-display); font-weight: 600; font-size: clamp(28px, 3.5vw, 44px); line-height: 1.06; letter-spacing: -0.02em; margin: 0 0 26px; }
.statement-side { padding: var(--pad-section); display: flex; flex-direction: column; gap: 20px; }
.portrait { margin: 0; width: 100%; aspect-ratio: 4 / 3; border-radius: var(--control-radius); overflow: hidden; background: var(--placeholder); }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.statement-lede { font-size: 16.5px; line-height: 1.55; color: rgba(32,30,29,.72); margin: 0; }
.statement-side .btn-cta { align-self: flex-start; }

/* Stat ledger: four solid colour boxes, edge to edge */
.ledger { grid-template-columns: repeat(4, 1fr); border-bottom: var(--rule); }
.ledger .stat { padding: 24px 26px 28px; border-right: var(--rule); display: flex; flex-direction: column; gap: 0; min-height: 150px; }
.ledger .stat:last-child { border-right: 0; }
.stat--blue   { background: var(--brand);  color: #fff; }
.stat--red    { background: var(--cta);    color: #fff; }
.stat--cyan   { background: var(--cyan);   color: var(--ink); }
.stat--yellow { background: var(--yellow); color: var(--ink); }
.stat-ico { margin-bottom: 20px; color: inherit; }
.ledger .stat .stat-n { font-family: var(--font-ui); font-weight: 800; font-size: clamp(34px, 4.4vw, 50px); line-height: 1; color: inherit; letter-spacing: -0.02em; }
.ledger .stat .stat-l { font-family: var(--font-ui); font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin-top: 10px; color: inherit; opacity: .92; }

/* Eyebrow bands (section headers) */
.band-eyebrow { padding: 18px 40px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* AI cells: icon, big serif mark, blue sub-label, body */
.ai-cell .ai-sub { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); margin: 0 0 10px; }
.ai-cell h3 { margin-bottom: 6px; }

/* Ranking strip head lead rule */
.ranking-head .label { display: inline-flex; align-items: center; gap: 10px; }

/* The index: number, kind label, body, date, with a coloured left accent */
.index-head { border-bottom: var(--rule); }
.idx-row { grid-template-columns: 48px 92px 1fr auto; gap: 22px; padding: 22px 40px 22px 36px; border-top: var(--rule); position: relative; align-items: baseline; }
.idx-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--brand); }
.idx-row[data-kind="case"]::before  { background: var(--cta); }
.idx-row[data-kind="guide"]::before { background: var(--brand); }
.idx-row[data-kind="note"]::before  { background: var(--pink); }
.idx-row:hover { background: var(--surface); }
.idx-row:hover .idx-dek, .idx-row:hover a, .idx-row:hover .idx-meta { color: inherit; }
.idx-num { font-family: var(--font-ui); font-weight: 800; font-size: 18px; color: var(--ink); }
.idx-kind { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.idx-kind--case  { color: var(--cta); }
.idx-kind--guide { color: var(--brand); }
.idx-kind--note  { color: var(--pink); }
.idx-body h3 { font-family: var(--font-display); font-weight: 600; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.08; margin: 0 0 8px; }
.idx-body h3 a { color: var(--ink); }
.idx-dek { font-size: 15px; color: rgba(32,30,29,.72); margin: 0; max-width: 60ch; }
.idx-meta { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: rgba(32,30,29,.5); white-space: nowrap; }

/* FAQ: two-column open grid + schema badge */
.faq-head { border-bottom: 0; }
.faq-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); }
.faq-grid { border-top: var(--rule); }
.faq-row { display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; padding: 24px 40px; border-top: var(--hair); }
.faq-row:first-child { border-top: 0; }
.faq-q { font-family: var(--font-display); font-weight: 600; font-size: 21px; line-height: 1.15; margin: 0; }
.faq-a { font-size: 15.5px; line-height: 1.55; color: rgba(32,30,29,.8); margin: 0; }

/* Archive / load-more bar */
.archive-bar { display: flex; align-items: stretch; justify-content: space-between; gap: 0; }
.archive-note { padding: 22px 40px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: rgba(32,30,29,.6); display: flex; align-items: center; }
.btn-dark { display: inline-flex; align-items: center; gap: 10px; background: var(--ink); color: var(--ground); font-weight: 700; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; padding: 22px 34px; }
.btn-dark:hover { background: #000; color: #fff; text-decoration: none; }

/* Footer: comp columns */
.footer-word { font-family: var(--font-ui); font-weight: 800; font-size: 20px; letter-spacing: .01em; text-transform: uppercase; }
.footer-role { font-weight: 700; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; margin: 6px 0 12px; }
.footer-tag { font-size: 14px; line-height: 1.5; max-width: 40ch; margin: 0 0 14px; }
.footer-email { font-weight: 700; color: var(--ink); }
.footer-email:hover { color: var(--brand); }

/* Responsive for the comp layout */
@media (max-width: 900px) {
  .statement { grid-template-columns: 1fr; }
  .statement-main { border-right: 0; border-bottom: var(--rule); }
  .ledger { grid-template-columns: 1fr 1fr; }
  .ledger .stat:nth-child(2) { border-right: 0; }
  .ledger .stat:nth-child(1), .ledger .stat:nth-child(2) { border-bottom: var(--rule); }
  .faq-row { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 680px) {
  .util-center { display: none; }
  .band-eyebrow { padding: 16px 26px; }
  .ledger { grid-template-columns: 1fr; }
  .ledger .stat { border-right: 0 !important; border-bottom: var(--rule); }
  .idx-row { grid-template-columns: 40px 1fr; gap: 6px 16px; padding: 18px 22px 18px 20px; }
  .idx-kind { grid-column: 2; }
  .idx-meta { grid-column: 2; }
  .archive-bar { flex-direction: column; }
  .btn-dark { justify-content: center; }
}

/* Comp fidelity: ranking impressions in ink, coloured filter chips */
.ranking-row .impr { color: var(--ink); }
.index-filter .chip--case  { border-color: var(--cta); }
.index-filter .chip--case:hover, .index-filter .chip--case[aria-pressed="true"] { background: var(--cta); border-color: var(--cta); color: #fff; }
.index-filter .chip--guide { border-color: var(--brand); }
.index-filter .chip--guide:hover, .index-filter .chip--guide[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.index-filter .chip--note  { border-color: var(--pink); }
.index-filter .chip--note:hover, .index-filter .chip--note[aria-pressed="true"] { background: var(--pink); border-color: var(--pink); color: var(--ink); }
