/* ==========================================================================
   Caseline v3.2.1 — "Obsidian Editorial" for We Case Study
   Updated: 2026-08-01
   Display: Bricolage Grotesque · Text/UI: Inter
   Dual theme (dark default + light), drawer navigation, audited spacing scale
   ========================================================================== */

/* ---------- Fonts ------------------------------------------------------- */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   1. Theme tokens
   ========================================================================== */
:root {
  color-scheme: dark;

  /* surfaces */
  --bg:        #06070c;
  --bg-2:      #0a0c15;
  --surface:   rgba(255, 255, 255, .045);
  --surface-2: rgba(255, 255, 255, .075);
  --edge:      rgba(255, 255, 255, .10);
  --edge-2:    rgba(255, 255, 255, .18);

  /* text — contrast checked against --bg */
  --tx:   #eef1f8;   /* 17.4:1 */
  --tx-2: #bcc4d6;   /* 11.2:1 */
  --tx-3: #8b93a5;   /*  6.3:1 */

  /* brand */
  --accent: #6366f1;
  --violet: #a855f7;
  --cyan:   #22d3ee;
  --amber:  #f59e0b;
  --grad: linear-gradient(98deg, var(--accent), var(--violet) 48%, var(--cyan));

  /* inverted button */
  --ink-bg: #ffffff;
  --ink-fg: #0a0c15;

  --shadow:    0 24px 70px rgba(0, 0, 0, .55);
  --shadow-sm: 0 10px 30px rgba(0, 0, 0, .40);
  --glass:     rgba(13, 16, 26, .70);
  --only-dark: block;
  --only-light: none;

  /* typography */
  --font-display: "Bricolage Grotesque", "Arial Black", sans-serif;
  --font-sans: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;

  /* layout + spacing scale */
  --wrap: 84rem;
  --gut: clamp(1.25rem, 3.5vw, 2.5rem);
  --section: clamp(3rem, 4.6vw, 5rem);      /* between major sections      */
  --section-sm: clamp(2rem, 3vw, 3rem);     /* tighter bands               */
  --gap: clamp(1rem, 1.3vw, 1.5rem);        /* grid gutter                 */
  --stack: clamp(1.4rem, 2.2vw, 2.2rem);    /* header block -> content     */

  --r: 18px;
  --r-sm: 12px;
  --ease: cubic-bezier(.22, .8, .3, 1);
}

/* Light theme ------------------------------------------------------------ */
[data-theme="light"] {
  color-scheme: light;

  --bg:        #f6f7fb;
  --bg-2:      #eceef6;
  --surface:   #ffffff;
  --surface-2: #ffffff;
  --edge:      #e2e6f0;
  --edge-2:    #ccd2e2;

  --tx:   #0c1020;   /* 17.8:1 on white */
  --tx-2: #464f68;   /*  8.4:1          */
  --tx-3: #5c6478;   /*  6.1:1          */

  --accent: #4f46e5;
  --violet: #7c3aed;
  --cyan:   #0e7490;   /* 5.4:1 on white — the gradient tail must stay legible in small caps */
  --amber:  #b45309;
  --grad: linear-gradient(98deg, var(--accent), var(--violet) 48%, var(--cyan));

  --ink-bg: #0c1020;
  --ink-fg: #ffffff;

  --shadow:    0 18px 46px rgba(14, 20, 40, .13);
  --shadow-sm: 0 6px 20px rgba(14, 20, 40, .09);
  --glass:     rgba(255, 255, 255, .82);
  --only-dark: none;
  --only-light: block;
}

/* Always-dark bands (hero, dossier, wiki hero, footer, drawer) ------------ */
.on-dark {
  color-scheme: dark;
  --bg:        #06070c;
  --bg-2:      #0a0c15;
  --surface:   rgba(255, 255, 255, .05);
  --surface-2: rgba(255, 255, 255, .085);
  --edge:      rgba(255, 255, 255, .11);
  --edge-2:    rgba(255, 255, 255, .20);
  --tx:   #eef1f8;
  --tx-2: #bcc4d6;
  --tx-3: #8b93a5;
  --accent: #6366f1;
  --violet: #a855f7;
  --cyan:   #22d3ee;
  --amber:  #f59e0b;
  --grad: linear-gradient(98deg, var(--accent), var(--violet) 48%, var(--cyan));
  --ink-bg: #ffffff;
  --ink-fg: #0a0c15;
  --shadow: 0 24px 70px rgba(0, 0, 0, .55);
  --glass: rgba(13, 16, 26, .70);
  color: var(--tx);
}

/* Wide screens: the layout grows with the display ------------------------ */
@media (min-width: 1500px) { :root { --wrap: 92rem; } }
@media (min-width: 1800px) { :root { --wrap: 100rem; --gut: 3rem; } }
@media (min-width: 2200px) { :root { --wrap: 108rem; } }

/* ==========================================================================
   2. Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--tx);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
body.is-locked { overflow: hidden; }
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
p a, li a:not([class]) {
  color: var(--tx);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
  text-underline-offset: 3px;
}
p a:hover, li a:not([class]):hover { text-decoration-color: var(--accent); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
hr { border: 0; border-top: 1px solid var(--edge); margin: 2rem 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: #fff; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 640;
  line-height: 1.06;
  letter-spacing: -0.022em;
  margin: 0 0 .5em;
  text-wrap: balance;
  color: var(--tx);
}

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
.skip-link {
  position: absolute; inset-inline-start: 1rem; top: -3rem; z-index: 400;
  background: var(--accent); color: #fff;
  padding: .6rem 1rem; border-radius: 0 0 var(--r-sm) var(--r-sm);
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 0; }

/* ==========================================================================
   3. Atoms
   ========================================================================== */
.kicker {
  font-size: .6875rem; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; margin: 0 0 .7rem; display: inline-block;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.kicker--gold { background: linear-gradient(98deg, var(--amber), color-mix(in srgb, var(--amber) 60%, #fff)); -webkit-background-clip: text; background-clip: text; }
.kicker--light { background: none; color: var(--tx-3); }

/* Buttons carry NO border at all. A transparent border leaves a ring that the
   background box does not line up with, which shows as a hairline of the wrong
   colour at the rounded left and right caps. Outlined variants use an inset
   box-shadow instead, so every variant has exactly the same geometry.
   Fills are set with the background-image / background-color longhands: the
   `background` shorthand would reset background-origin and background-repeat
   back to padding-box / repeat and bring the artefact straight back. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem 1.35rem; border: 0; border-radius: 999px;
  font-size: .875rem; font-weight: 650; line-height: 1; white-space: nowrap;
  background-color: transparent;
  background-origin: border-box;
  background-clip: border-box;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background-color .18s var(--ease), color .18s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--accent {
  background-image: var(--grad); color: #fff;
  box-shadow: 0 8px 26px color-mix(in srgb, var(--accent) 40%, transparent);
}
.btn--accent:hover { box-shadow: 0 10px 36px color-mix(in srgb, var(--accent) 58%, transparent); transform: translateY(-1px); }
.btn--ink { background-color: var(--ink-bg); color: var(--ink-fg); }
.btn--ink:hover { background-color: var(--accent); color: #fff; }
.btn--ghost {
  color: var(--tx); background-color: var(--surface);
  box-shadow: inset 0 0 0 1px var(--edge-2);
}
.btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--tx); }

.chip {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .5rem 1rem; border: 1px solid var(--edge); border-radius: 999px;
  background-origin: border-box; background-repeat: no-repeat;
  font-size: .8125rem; font-weight: 600; color: var(--tx-2);
  background: var(--surface);
  transition: border-color .18s var(--ease), color .18s var(--ease), background .18s var(--ease), transform .18s var(--ease);
}
.chip:hover { border-color: var(--edge-2); color: var(--tx); background: var(--surface-2); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.chip__count { font-size: .6875rem; font-weight: 700; color: var(--tx-3); font-variant-numeric: tabular-nums; }

.sec-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  margin-bottom: var(--stack);
}
.sec-head__title {
  font-size: clamp(1.5rem, 2.6vw, 2.3rem); margin: 0;
  display: flex; align-items: center; gap: .7rem;
}
.sec-head__title::before {
  content: ""; width: .5em; height: .5em; border-radius: 3px;
  background: var(--grad); transform: rotate(45deg); flex: none;
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 55%, transparent);
}
.sec-head__all { font-size: .8125rem; font-weight: 650; color: var(--tx-3); white-space: nowrap; transition: color .15s; }
.sec-head__all:hover { color: var(--accent); }

/* Ledger rows ------------------------------------------------------------ */
.ledger { list-style: none; margin: 0; padding: 0; }
.ledger__row { display: flex; align-items: baseline; gap: .75rem; padding: .7rem 0; font-size: .9rem; }
.ledger__row + .ledger__row { border-top: 1px solid var(--edge); }
.ledger__label { color: var(--tx-3); font-weight: 550; flex: none; font-size: .8125rem; }
.ledger__dots {
  flex: 1; min-width: 1.5rem; align-self: center; height: 2px; transform: translateY(-.24em);
  background-image: radial-gradient(circle, color-mix(in srgb, var(--tx-3) 65%, transparent) 1px, transparent 1.4px);
  background-size: 8px 2px; background-repeat: repeat-x; background-position: 0 50%;
}
.ledger__value { font-weight: 650; text-align: end; font-variant-numeric: tabular-nums; color: var(--tx); }
.ledger__value a:hover { color: var(--accent); }

/* ==========================================================================
   Aurora — the artwork, drawn entirely in CSS
   Layered radial fields plus one thin light streak. No image requests, no
   decode cost, resolution independent, and it recolours with the theme.
   ========================================================================== */
.aurora {
  position: relative; display: block; width: 100%; height: 100%;
  background-color: #06070c;
  background-image:
    radial-gradient(58% 78% at var(--a-x1, 82%) var(--a-y1, 18%), var(--a-c1, rgba(74,92,255,.85)), transparent 62%),
    radial-gradient(52% 72% at var(--a-x2, 15%) var(--a-y2, 90%), var(--a-c2, rgba(150,84,255,.7)), transparent 60%),
    radial-gradient(42% 58% at var(--a-x3, 55%) var(--a-y3, 55%), var(--a-c3, rgba(46,211,238,.3)), transparent 66%);
  overflow: hidden;
  isolation: isolate;
}
/* the streak */
.aurora::before {
  content: ""; position: absolute; inset: -40%;
  background-image: linear-gradient(var(--a-angle, 118deg),
    transparent calc(50% - 2px),
    rgba(255, 255, 255, .30) calc(50% - 1px),
    rgba(255, 255, 255, .85) 50%,
    rgba(255, 255, 255, .30) calc(50% + 1px),
    transparent calc(50% + 2px));
  transform: translate(var(--a-shift-x, 0), var(--a-shift-y, 0));
  opacity: var(--a-streak, .5);
  pointer-events: none;
}
/* vignette, so the panels sit on the page the way the artwork did */
.aurora::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(120% 120% at 50% 50%, transparent 42%, rgba(4, 5, 10, .55) 100%);
}
.aurora--1  { --a-c1: rgba(74,92,255,1);   --a-c2: rgba(150,84,255,0.78); --a-c3: rgba(46,211,238,0.33); --a-angle: 118deg; }
.aurora--2  { --a-c1: rgba(46,211,238,0.78); --a-c2: rgba(37,99,235,1);  --a-c3: rgba(255,255,255,0.12); --a-x1: 20%; --a-y1: 25%; --a-x2: 90%; --a-y2: 85%; --a-angle: 62deg; }
.aurora--3  { --a-c1: rgba(236,72,153,0.9); --a-c2: rgba(150,84,255,1.0);  --a-c3: rgba(245,158,11,0.28); --a-x1: 85%; --a-y1: 75%; --a-x2: 20%; --a-y2: 20%; --a-angle: 112deg; }
.aurora--4  { --a-c1: rgba(16,185,129,0.75);  --a-c2: rgba(46,211,238,0.83); --a-c3: rgba(255,255,255,0.1); --a-x1: 25%; --a-y1: 80%; --a-x2: 85%; --a-y2: 20%; --a-angle: 108deg; }
.aurora--5  { --a-c1: rgba(245,158,11,0.83); --a-c2: rgba(244,63,94,0.69);  --a-c3: rgba(150,84,255,0.38);  --a-x1: 80%; --a-y1: 30%; --a-x2: 15%; --a-y2: 75%; --a-angle: 55deg; }
.aurora--6  { --a-c1: rgba(74,92,255,1);   --a-c2: rgba(46,211,238,0.62);  --a-c3: rgba(150,84,255,0.56); --a-x1: 50%; --a-y1: 95%; --a-x2: 90%; --a-y2: 10%; --a-angle: 90deg; }
.aurora--7  { --a-c1: rgba(37,99,235,1);  --a-c2: rgba(150,84,255,0.9); --a-c3: rgba(255,255,255,0.07); --a-x1: 15%; --a-y1: 20%; --a-x2: 85%; --a-y2: 85%; --a-angle: 135deg; --a-streak: .65; }
.aurora--8  { --a-c1: rgba(244,63,94,0.78);  --a-c2: rgba(236,72,153,0.69); --a-c3: rgba(245,158,11,0.38);  --a-x1: 85%; --a-y1: 50%; --a-x2: 15%; --a-y2: 50%; --a-angle: 72deg; }
.aurora--9  { --a-c1: rgba(46,211,238,0.75);  --a-c2: rgba(16,185,129,0.65); --a-c3: rgba(37,99,235,0.62);   --a-x1: 50%; --a-y1: 35%; --a-x2: 20%; --a-y2: 90%; --a-angle: 102deg; }
.aurora--10 { --a-c1: rgba(150,84,255,1); --a-c2: rgba(74,92,255,0.9);  --a-c3: rgba(236,72,153,0.4); --a-x1: 75%; --a-y1: 65%; --a-x2: 20%; --a-y2: 30%; --a-angle: 30deg; }

/* Company monogram tiles — also CSS only */
.mono {
  position: relative; display: grid; place-items: center; flex: none;
  width: 36px; height: 36px; border-radius: 11px;
  background-color: #0b0e18;
  background-image: radial-gradient(80% 90% at 50% 108%, var(--tile, #6366f1), transparent 62%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
  font-family: var(--font-display); font-weight: 700; font-size: .95rem;
  color: #fff; letter-spacing: 0;
  text-shadow: 0 0 12px var(--tile, #6366f1);
}
.mono--lg { width: 52px; height: 52px; border-radius: 14px; font-size: 1.35rem; }

/* ==========================================================================
   4. Cards
   ========================================================================== */
.card {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r);
  padding: 1rem; overflow: hidden;
  transition: transform .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: var(--edge-2); background: var(--surface-2); box-shadow: var(--shadow); }
.card__media {
  position: relative; overflow: hidden; border-radius: calc(var(--r) - 8px);
  background: var(--bg-2); margin-bottom: 1rem; aspect-ratio: 3 / 2;
}
.card__media img, .card__media .aurora { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card__media img, .card:hover .card__media .aurora { transform: scale(1.045); }
.card__kicker { margin-bottom: .5rem; }
.card__kicker a { position: relative; z-index: 2; }
.card__title { font-size: 1.22rem; line-height: 1.18; margin: 0 0 .5rem; }
.card__title a::after { content: ""; position: absolute; inset: 0; }
.card:hover .card__title { color: var(--accent); }
.card__title, .card__excerpt { overflow-wrap: anywhere; }
.card__excerpt { color: var(--tx-2); font-size: .9rem; margin: 0 0 .8rem; }
.card__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem;
  font-size: .75rem; color: var(--tx-3); margin-top: auto;
}
.card__meta b { font-weight: 650; color: var(--tx-2); }
.card__meta .dot::before { content: "·"; }
.card--lg .card__title { font-size: clamp(1.5rem, 2.4vw, 2.1rem); }
.card--row { flex-direction: row; gap: 1.1rem; align-items: center; }
.card--row .card__media { flex: 0 0 34%; aspect-ratio: 4 / 3; margin-bottom: 0; }
.card--row .card__body { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.card__listing {
  position: relative; z-index: 2;
  display: inline-flex; align-items: center; gap: .5rem; align-self: flex-start;
  font-size: .72rem; font-weight: 700; color: var(--tx-2);
  padding: .3rem .7rem .3rem .3rem; margin-bottom: .6rem;
  background: var(--surface-2); border: 1px solid var(--edge); border-radius: 999px;
  transition: color .15s, border-color .15s;
}
.card__listing img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.card__listing:hover { color: var(--tx); border-color: var(--edge-2); }

/* ==========================================================================
   5. Header + drawer navigation
   ========================================================================== */
.site-head { position: sticky; top: 0; z-index: 150; }
.site-head__utility {
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--accent) 18%, var(--bg)),
    color-mix(in srgb, var(--violet) 14%, var(--bg)) 50%,
    color-mix(in srgb, var(--cyan) 11%, var(--bg)));
  border-bottom: 1px solid var(--edge);
  color: var(--tx-2); font-size: .75rem;
}
.site-head__utility-row { display: flex; align-items: center; gap: 1.25rem; min-height: 2.15rem; }
.site-head__date { font-variant-numeric: tabular-nums; color: var(--tx-3); }
.site-head__tagline { color: var(--tx-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-head__promo { margin-inline-start: auto; font-weight: 650; color: var(--tx); display: inline-flex; gap: .4rem; align-items: center; white-space: nowrap; }
.site-head__promo:hover { color: var(--accent); }
.site-head__promo-mark { transition: transform .2s var(--ease); }
.site-head__promo:hover .site-head__promo-mark { transform: translateX(3px); }

.site-head__main {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--edge);
  transition: background .3s var(--ease);
}
.site-head.is-compact .site-head__main { background: color-mix(in srgb, var(--bg) 92%, transparent); }
.site-head__main-row { display: flex; align-items: center; gap: clamp(.6rem, 1.4vw, 1.2rem); min-height: 4.6rem; transition: min-height .25s var(--ease); }
.site-head.is-compact .site-head__main-row { min-height: 3.7rem; }

/* menu button (all breakpoints — it opens the drawer) */
.menu-btn {
  display: inline-flex; align-items: center; gap: .6rem; flex: none;
  padding: .55rem .95rem .55rem .8rem; border-radius: 999px;
  border: 1px solid var(--edge); background: var(--surface);
  font-size: .8125rem; font-weight: 650; color: var(--tx);
  transition: border-color .18s var(--ease), background .18s var(--ease);
}
.menu-btn:hover { border-color: var(--edge-2); background: var(--surface-2); }
.menu-btn__bars { display: inline-flex; flex-direction: column; gap: 4px; }
.menu-btn__bars i { width: 17px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .25s var(--ease), opacity .2s; }
.menu-btn__bars i:nth-child(2) { width: 12px; }

.brand { display: inline-flex; align-items: center; min-width: 0; }
.brand__logo { height: clamp(1.9rem, 3vw, 2.5rem); width: auto; }
.site-head.is-compact .brand__logo { height: 1.75rem; }

/* Typographic wordmark — Bricolage Grotesque, slightly condensed and tightly
   tracked, with the terminating dot carrying the brand gradient. */
.brand__word {
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 92%;
  font-size: clamp(1.28rem, 2.1vw, 1.6rem);
  letter-spacing: -0.038em;
  line-height: 1;
  white-space: nowrap;
  color: var(--tx);
  display: inline-flex; align-items: baseline;
  transition: color .2s var(--ease);
}
.brand:hover .brand__word { color: var(--accent); }
.brand__word::after {
  content: ".";
  margin-inline-start: .02em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.site-head.is-compact .brand__word { font-size: clamp(1.18rem, 1.8vw, 1.4rem); }
.brand--foot .brand__word { font-size: 1.55rem; }
.drawer .brand__word { font-size: 1.45rem; }

.site-head__tools { margin-inline-start: auto; display: flex; align-items: center; gap: .5rem; flex: none; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; border-radius: 50%; color: var(--tx-2);
  border: 0; background-color: transparent;
  transition: box-shadow .15s, color .15s, background-color .15s;
}
.icon-btn:hover, .icon-btn[aria-expanded="true"] {
  color: var(--tx); background-color: var(--surface);
  box-shadow: inset 0 0 0 1px var(--edge-2);
}
.theme-toggle__sun { display: var(--only-light); }
.theme-toggle__moon { display: var(--only-dark); }

.site-search { border-top: 1px solid var(--edge); background: var(--bg-2); }
.site-search__form { display: flex; gap: .6rem; padding-block: .9rem; }
.site-search__input {
  flex: 1; min-width: 0; padding: .7rem 1.1rem;
  border: 1px solid var(--edge-2); border-radius: 999px;
  background: var(--surface); color: var(--tx);
}
.site-search__input::placeholder { color: var(--tx-3); }
.site-search__input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }

/* Drawer ---------------------------------------------------------------- */
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 190;
  background: rgba(4, 5, 10, .62);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility .3s;
}
.drawer-backdrop.is-open { opacity: 1; visibility: visible; }

.drawer {
  position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 200;
  width: min(26rem, 90vw); max-width: 100%;
  background: linear-gradient(180deg, #0b0e18, #06070c 60%);
  border-inline-end: 1px solid var(--edge);
  box-shadow: 0 0 80px rgba(0, 0, 0, .6);
  transform: translateX(-101%);
  transition: transform .38s var(--ease);
  display: flex; flex-direction: column;
  overflow-y: auto; overscroll-behavior: contain;
}
.drawer.is-open { transform: none; }
.drawer::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(30rem 18rem at 110% -5%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 60%);
}
.drawer__inner { position: relative; padding: clamp(1.3rem, 3vw, 2rem); display: flex; flex-direction: column; gap: 1.6rem; min-height: 100%; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.drawer__close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  border: 1px solid var(--edge); color: var(--tx-2); flex: none;
  transition: border-color .15s, color .15s, transform .2s var(--ease);
}
.drawer__close:hover { border-color: var(--edge-2); color: var(--tx); transform: rotate(90deg); }
.drawer__label { font-size: .6875rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--tx-3); margin: 0 0 .8rem; }

.drawer__primary { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.drawer__primary li + li { border-top: 1px solid var(--edge); }
.drawer__primary a {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .85rem 0; font-family: var(--font-display); font-weight: 620;
  font-size: 1.3rem; letter-spacing: -0.02em; color: var(--tx);
  transition: color .18s var(--ease), padding-inline-start .18s var(--ease);
}
.drawer__primary a::after { content: "→"; font-family: var(--font-sans); font-size: .9rem; color: var(--tx-3); opacity: 0; transform: translateX(-6px); transition: opacity .18s, transform .18s; }
.drawer__primary a:hover { color: var(--accent); padding-inline-start: .4rem; }
.drawer__primary a:hover::after { opacity: 1; transform: none; }

.drawer__verticals { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.drawer__verticals a {
  display: flex; align-items: center; gap: .7rem;
  padding: .5rem .6rem; border-radius: 10px; font-size: .9rem; font-weight: 550; color: var(--tx-2);
  transition: background .16s var(--ease), color .16s var(--ease);
}
.drawer__verticals a:hover { background: var(--surface-2); color: var(--tx); }
.drawer__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tile, var(--accent)); flex: none; box-shadow: 0 0 10px var(--tile, var(--accent)); }

.drawer__search { display: flex; gap: .5rem; }
.drawer__search input {
  flex: 1; min-width: 0; padding: .7rem 1rem; border-radius: 999px;
  border: 1px solid var(--edge-2); background: var(--surface); color: var(--tx);
}
.drawer__search input::placeholder { color: var(--tx-3); }
.drawer__search input:focus { border-color: var(--accent); outline: none; }
.drawer__foot { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--edge); font-size: .8rem; color: var(--tx-3); }

/* CMS menu markup, when a "main"/"footer" menu exists --------------------- */
.menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.menu__item { position: relative; }
.menu__item + .menu__item { border-top: 1px solid var(--edge); }
.menu__item > a {
  display: flex; align-items: center; padding: .8rem 0;
  font-family: var(--font-display); font-weight: 620; font-size: 1.2rem;
  letter-spacing: -0.02em; color: var(--tx);
  transition: color .16s var(--ease), padding-inline-start .16s var(--ease);
}
.menu__item > a:hover { color: var(--accent); padding-inline-start: .4rem; }
.menu__item.is-active > a { color: var(--accent); }
.menu__submenu { list-style: none; margin: 0 0 .6rem; padding: 0 0 0 .9rem; }
.menu__submenu .menu__item { border: 0; }
.menu__submenu .menu__item > a { font-family: var(--font-sans); font-size: .9rem; font-weight: 550; color: var(--tx-2); padding: .4rem 0; }
.menu__submenu .menu__item > a:hover { color: var(--tx); }

/* ==========================================================================
   6. Hero
   ========================================================================== */
.hero { position: relative; overflow: hidden; background: var(--bg); }
.hero__bg {
  position: absolute; inset: 0;
  background-color: #06070c;
  background-image:
    radial-gradient(48% 70% at 88% 12%, rgba(74, 92, 255, 1.0), transparent 62%),
    radial-gradient(46% 66% at 4% 96%, rgba(150, 84, 255, 0.69), transparent 62%),
    radial-gradient(34% 48% at 74% 96%, rgba(46, 211, 238, 0.38), transparent 66%),
    radial-gradient(30% 40% at 28% 8%, rgba(37, 99, 235, 0.35), transparent 68%);
}
.hero__bg::before {
  content: ""; position: absolute; inset: -30%;
  background-image: linear-gradient(118deg,
    transparent calc(50% - 2px),
    rgba(255, 255, 255, .25) calc(50% - 1px),
    rgba(255, 255, 255, .7) 50%,
    rgba(255, 255, 255, .25) calc(50% + 1px),
    transparent calc(50% + 2px));
  transform: translate(18%, -12%);
  opacity: .5;
}
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6,7,12,.58), rgba(6,7,12,.28) 38%, rgba(6,7,12,.94) 94%);
}
.hero__inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(2rem, 4vw, 3.5rem); align-items: center;
  padding-block: clamp(3rem, 5.5vw, 5.5rem);
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: .75rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--tx-2); margin-bottom: 1.2rem;
  padding: .45rem 1rem; border: 1px solid var(--edge-2); border-radius: 999px;
  background: rgba(255,255,255,.06); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.hero__eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.hero__title {
  font-size: clamp(2.6rem, 5.6vw, 6rem); font-weight: 760; line-height: .98;
  letter-spacing: -0.035em; margin-bottom: 1.1rem; color: #fff;
}
.hero__title em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__sub { font-size: clamp(1rem, 1.25vw, 1.25rem); color: var(--tx-2); max-width: 56ch; margin: 0 0 1.9rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; }

.hero__card {
  position: relative;
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border: 1px solid var(--edge-2); border-radius: var(--r);
  padding: 1.1rem; box-shadow: var(--shadow);
  transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.hero__card:hover { transform: translateY(-5px); border-color: rgba(255,255,255,.3); }
.hero__card-media { border-radius: calc(var(--r) - 8px); overflow: hidden; aspect-ratio: 16 / 10; margin-bottom: 1rem; }
.hero__card-media img, .hero__card-media .aurora { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.hero__card:hover .hero__card-media img, .hero__card:hover .hero__card-media .aurora { transform: scale(1.04); }
.hero__card-title { font-size: clamp(1.2rem, 1.5vw, 1.55rem); line-height: 1.14; margin-bottom: .5rem; color: #fff; }
.hero__card-title a::after { content: ""; position: absolute; inset: 0; }
.hero__card-sub { font-size: .9rem; color: var(--tx-2); margin: 0 0 .8rem; }
.hero__card-meta { display: flex; gap: .6rem; font-size: .75rem; color: var(--tx-3); }

/* ==========================================================================
   7. Front page sections
   ========================================================================== */
.front-sec { padding-block: var(--section); }
.front-sec + .front-sec { padding-top: 0; }      /* no doubled gaps between stacked sections */

/* Companies carousel — manual, no autoplay */
.logos {
  position: relative;
  border: 1px solid var(--edge); border-radius: var(--r);
  background:
    radial-gradient(40rem 16rem at 15% -60%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 65%),
    var(--surface);
  padding: 1.3rem clamp(1rem, 2vw, 1.5rem) 1.4rem;
}
.logos__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.logos__label { font-size: .6875rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--tx-3); margin: 0; }
.logos__nav { display: flex; gap: .4rem; flex: none; }
.carousel-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  border: 1px solid var(--edge); background: var(--surface); color: var(--tx-2);
  transition: border-color .16s, color .16s, background .16s, opacity .16s;
}
.carousel-btn:hover { border-color: var(--edge-2); color: var(--tx); background: var(--surface-2); }
.carousel-btn[disabled] { opacity: .3; cursor: default; }
.logos__viewport {
  display: flex; gap: clamp(1.4rem, 3vw, 2.6rem);
  overflow-x: auto; scroll-behavior: smooth; scroll-snap-type: x proximity;
  scrollbar-width: none; padding-bottom: .2rem;
}
.logos__viewport::-webkit-scrollbar { display: none; }
.logos__item {
  display: inline-flex; align-items: center; gap: .7rem; flex: none; scroll-snap-align: start;
  font-family: var(--font-display); font-weight: 640; font-size: 1.02rem;
  color: var(--tx-2); white-space: nowrap;
  transition: color .2s var(--ease), transform .2s var(--ease);
}
.logos__item:hover { color: var(--tx); transform: translateY(-2px); }
.logos__item img { width: 36px; height: 36px; border-radius: 11px; flex: none; }

.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
.bento > .card--lg { grid-column: span 7; }
.bento > .card--tall { grid-column: span 5; }
.bento > .card--sm { grid-column: span 4; }

.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }

/* Wiki banner */
.wiki-banner {
  position: relative; overflow: hidden;
  border-block: 1px solid var(--edge);
  background:
    radial-gradient(60rem 28rem at 85% -10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%),
    radial-gradient(50rem 26rem at 0% 110%, color-mix(in srgb, var(--violet) 18%, transparent), transparent 60%),
    var(--bg-2);
  padding-block: var(--section);
}
.wiki-banner__head { display: grid; grid-template-columns: minmax(0, 1.4fr) auto; gap: 1.5rem; align-items: end; margin-bottom: var(--stack); }
.wiki-banner__title { font-size: clamp(1.9rem, 3.4vw, 3.2rem); margin-bottom: .5rem; }
.wiki-banner__title em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wiki-banner__sub { color: var(--tx-2); margin: 0; max-width: 60ch; }

.wiki-strip__rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(16rem, 1fr);
  gap: var(--gap); overflow-x: auto; padding-bottom: .6rem;
  scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--edge-2) transparent;
}
.wiki-card {
  position: relative; scroll-snap-align: start;
  background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r);
  padding: 1.2rem; display: flex; flex-direction: column; gap: .55rem;
  transition: border-color .22s var(--ease), background .22s var(--ease), transform .22s var(--ease), box-shadow .22s var(--ease);
}
.wiki-card:hover { border-color: var(--edge-2); background: var(--surface-2); transform: translateY(-4px); box-shadow: var(--shadow); }
.wiki-card__logo { width: 52px; height: 52px; border-radius: 14px; overflow: hidden; background: var(--bg-2); display: grid; place-items: center; flex: none; }
.wiki-card__logo img { width: 100%; height: 100%; object-fit: cover; }
.wiki-card__name { font-size: 1.12rem; margin: 0; }
.wiki-card__name a::after { content: ""; position: absolute; inset: 0; }
.wiki-card:hover .wiki-card__name { color: var(--accent); }
.wiki-card__industry { font-size: .75rem; color: var(--tx-3); }
.wiki-card__excerpt { font-size: .84rem; color: var(--tx-2); margin: 0; }
.wiki-card__ledger { margin-top: auto; padding-top: .5rem; }
.wiki-card__ledger .ledger__row { padding: .3rem 0; font-size: .8125rem; border: 0; }

/* Rails */
.rail + .rail { margin-top: var(--section); }
.rail__grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--gap); }
.rail__list { display: flex; flex-direction: column; gap: var(--gap); }
.rail__list .card--row .card__media { flex-basis: 30%; }
.rail__list .card__title { font-size: .98rem; }

/* Dossier band */
.dossier {
  position: relative; overflow: hidden; border-block: 1px solid var(--edge);
  background: #06070c;
}
.dossier__bg {
  position: absolute; inset: 0;
  background-color: #06070c;
  background-image:
    radial-gradient(46% 78% at 88% 42%, rgba(245, 158, 11, 0.85), transparent 62%),
    radial-gradient(44% 70% at 8% 84%, rgba(244, 63, 94, 0.62), transparent 62%),
    radial-gradient(30% 46% at 52% 16%, rgba(236, 72, 153, 0.35), transparent 66%);
}
.dossier__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6,7,12,.94), rgba(6,7,12,.6) 55%, rgba(6,7,12,.38)); }
.dossier__inner { position: relative; z-index: 1; padding-block: var(--section); max-width: 46rem; }
.dossier__no {
  font-size: .6875rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  color: var(--amber); display: inline-flex; align-items: center; gap: .7rem; margin-bottom: 1.1rem;
}
.dossier__no::after { content: ""; width: 3.2rem; height: 2px; background-image: radial-gradient(circle, var(--amber) 1px, transparent 1.4px); background-size: 8px 2px; opacity: .8; }
.dossier__title { font-size: clamp(1.9rem, 3.2vw, 3rem); line-height: 1.03; }
.dossier__sub { color: var(--tx-2); max-width: 54ch; margin: 0 0 1.5rem; }
.dossier .ledger { max-width: 32rem; margin-bottom: 1.7rem; }

/* Verticals tiles */
.verticals__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.vertical-tile {
  position: relative; overflow: hidden;
  border: 1px solid var(--edge); border-radius: var(--r);
  background: var(--surface); padding: 1.3rem 1.4rem; min-height: 8.5rem;
  display: flex; flex-direction: column; justify-content: flex-end; gap: .3rem;
  transition: transform .22s var(--ease), border-color .22s var(--ease), box-shadow .22s var(--ease);
}
.vertical-tile::before {
  content: ""; position: absolute; inset: -40% 40% 55% -20%;
  background: radial-gradient(closest-side, var(--tile, var(--accent)), transparent 70%);
  opacity: .28; filter: blur(6px); transition: opacity .25s var(--ease), transform .25s var(--ease);
}
[data-theme="light"] .vertical-tile::before { opacity: .18; }
.vertical-tile:hover { transform: translateY(-4px); border-color: var(--edge-2); box-shadow: var(--shadow); }
.vertical-tile:hover::before { opacity: .5; transform: scale(1.15); }
.vertical-tile__no { position: relative; font-size: .6875rem; font-weight: 700; letter-spacing: .14em; color: var(--tx-3); font-variant-numeric: tabular-nums; }
.vertical-tile__name { position: relative; font-family: var(--font-display); font-weight: 660; font-size: 1.18rem; letter-spacing: -0.015em; color: var(--tx); }
.vertical-tile__hint { position: relative; font-size: .78rem; color: var(--tx-2); }

/* ==========================================================================
   8. Archives
   ========================================================================== */
.archive-head {
  position: relative; overflow: hidden;
  padding-block: clamp(2.4rem, 4.5vw, 4rem) var(--section-sm);
  border-bottom: 1px solid var(--edge);
  background:
    radial-gradient(46rem 20rem at 80% -30%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 65%),
    var(--bg);
}
.archive-head__title { font-size: clamp(2rem, 4vw, 3.6rem); margin-bottom: .5rem; }
.archive-head__desc { color: var(--tx-2); max-width: 70ch; margin: 0 0 .7rem; font-size: 1.02rem; }
.archive-head__desc :first-child { margin-top: 0; }
.archive-head__desc :last-child { margin-bottom: 0; }
.archive-head__count { font-size: .8125rem; color: var(--tx-3); font-variant-numeric: tabular-nums; }
.archive-body { padding-block: var(--section); }
.archive-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }

.empty {
  text-align: center; padding: clamp(2.6rem, 7vw, 5rem) 1.4rem;
  border: 1px dashed var(--edge-2); border-radius: var(--r); background: var(--surface);
}
.empty__title { font-size: 1.5rem; margin-bottom: .4rem; }
.empty__sub { color: var(--tx-3); margin: 0 0 1.3rem; }

.pagination { display: flex; align-items: center; justify-content: center; gap: .5rem; margin-top: var(--section-sm); font-size: .875rem; font-weight: 650; }
.pagination__pages { list-style: none; display: flex; gap: .3rem; margin: 0; padding: 0; }
.pagination__page a, .pagination__page.is-current, .pagination__gap {
  display: grid; place-items: center; min-width: 2.4rem; height: 2.4rem;
  border-radius: 999px; padding-inline: .4rem; font-variant-numeric: tabular-nums;
}
.pagination__page a { border: 0; transition: box-shadow .15s, background-color .15s; }
.pagination__page a:hover { background-color: var(--surface-2); box-shadow: inset 0 0 0 1px var(--edge); }
.pagination__page.is-current { background-image: var(--grad); background-repeat: no-repeat; background-size: 100% 100%; color: #fff; }
.pagination__gap { color: var(--tx-3); }
.pagination__prev, .pagination__next { padding: .55rem 1rem; border-radius: 999px; transition: background .15s; }
.pagination__prev:hover, .pagination__next:hover { background: var(--surface-2); }
.pagination__prev.is-disabled, .pagination__next.is-disabled { color: var(--tx-3); opacity: .45; }

/* ==========================================================================
   9. Article
   ========================================================================== */
.progress {
  position: fixed; top: 0; inset-inline-start: 0; z-index: 300;
  height: 3px; width: 100%; transform: scaleX(0); transform-origin: 0 50%;
  background: var(--grad); transition: transform .08s linear;
}

.post-hero {
  position: relative;
  padding-block: clamp(2.2rem, 4vw, 3.6rem) 0;
  background:
    radial-gradient(50rem 22rem at 15% -30%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 65%),
    var(--bg);
}
.post-hero__inner { max-width: 52rem; margin-inline: auto; }
.post-hero__cats { display: flex; flex-wrap: wrap; gap: .45rem .95rem; margin-bottom: 1rem; }
.post-hero__cats a {
  font-size: .6875rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.post-hero__cats a:hover { filter: brightness(1.2); }
.post-hero__title { font-size: clamp(2rem, 4.2vw, 3.6rem); line-height: 1.02; }
.post-hero__excerpt { font-size: clamp(1.02rem, 1.4vw, 1.22rem); color: var(--tx-2); max-width: 64ch; margin: 0 0 1.4rem; }
.post-hero__byline {
  display: flex; align-items: center; gap: .8rem; flex-wrap: wrap;
  padding-block: 1rem; border-block: 1px solid var(--edge);
  font-size: .8125rem; color: var(--tx-3);
}
.post-hero__avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 1px solid var(--edge-2); }
.post-hero__byline b { color: var(--tx); font-weight: 650; }
.post-hero__byline a:hover b { color: var(--accent); }
.post-hero__sep::before { content: "·"; }

.post-figure { margin: clamp(1.5rem, 3vw, 2.4rem) 0 0; }
.post-figure img { width: 100%; border-radius: var(--r); border: 1px solid var(--edge); background: var(--bg-2); }
.post-figure figcaption { font-size: .78rem; color: var(--tx-3); padding-top: .6rem; }

.post-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 52rem) minmax(0, 1fr);
  gap: 0 clamp(1.2rem, 2.5vw, 2.5rem); padding-block: var(--section-sm) var(--section);
}
.post-layout > * { grid-column: 2; }
.post-aside { grid-column: 1; grid-row: 1 / span 6; justify-self: end; width: min(15rem, 100%); }
.post-aside--right { grid-column: 3; grid-row: 1 / span 6; justify-self: start; width: min(17rem, 100%); }
.post-aside__sticky { position: sticky; top: 7rem; }
.post-aside__label { font-size: .6875rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--tx-3); margin: 0 0 .7rem; }
.post-aside .toc ul, .post-aside .toc ol { list-style: none; margin: 0; padding: 0; font-size: .8125rem; }
.post-aside .toc li { margin: 0; }
.post-aside .toc a { display: block; padding: .34rem 0 .34rem .8rem; border-inline-start: 2px solid var(--edge); color: var(--tx-3); transition: color .15s, border-color .15s; }
.post-aside .toc a:hover { color: var(--tx); border-color: var(--accent); }
.post-aside .toc ul ul a, .post-aside .toc ol ol a { padding-inline-start: 1.6rem; }

.summary-card {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--surface)), var(--surface));
  border: 1px solid var(--edge-2); border-radius: var(--r);
  padding: 1.3rem 1.5rem; margin-bottom: var(--stack);
}
.summary-card__label { font-size: .6875rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; margin: 0 0 .6rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.prose { font-size: 1.08rem; line-height: 1.8; color: var(--tx-2); }
[data-theme="light"] .prose { color: #1c2333; }
.prose > :first-child { margin-top: 0; }
.prose h2, .prose h3, .prose h4 { color: var(--tx); margin-top: 2em; scroll-margin-top: 7rem; }
.prose h2 { font-size: 1.65rem; }
.prose h3 { font-size: 1.28rem; }
.prose p { margin: 0 0 1.25em; }
.prose img { border-radius: var(--r-sm); border: 1px solid var(--edge); margin-block: 1.5em; }
.prose figure { margin: 1.5em 0; }
.prose figcaption { font-size: .8rem; color: var(--tx-3); padding-top: .5rem; }
.prose blockquote {
  margin: 1.8em 0; padding: 1.1em 1.4em;
  border-inline-start: 3px solid var(--accent);
  background: var(--surface); border: 1px solid var(--edge); border-inline-start-width: 3px;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 1.06em; color: var(--tx);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose ul, .prose ol { padding-inline-start: 1.4em; margin: 0 0 1.25em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--accent); }
.prose table { width: 100%; border-collapse: collapse; font-size: .9rem; margin: 1.6em 0; font-variant-numeric: tabular-nums; }
.prose th, .prose td { padding: .65em .85em; border-bottom: 1px solid var(--edge); text-align: start; }
.prose th { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--tx-3); border-bottom: 1px solid var(--edge-2); }
.prose pre { background: var(--bg-2); border: 1px solid var(--edge); border-radius: var(--r-sm); padding: 1.1em 1.3em; overflow-x: auto; font-size: .85em; color: var(--tx); }
.prose :not(pre) > code { background: var(--surface-2); border: 1px solid var(--edge); border-radius: 5px; padding: .12em .4em; font-size: .88em; }
.prose a { color: var(--tx); text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.prose a:hover { text-decoration-color: var(--accent); }
.prose hr { margin: 2.5em auto; width: 6rem; border: 0; height: 2px; background-image: radial-gradient(circle, color-mix(in srgb, var(--tx-3) 70%, transparent) 1px, transparent 1.4px); background-size: 9px 2px; }

.post-tags { display: flex; flex-wrap: wrap; gap: .55rem; padding-top: var(--stack); }

.author-box {
  display: flex; gap: 1.2rem; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--edge); border-radius: var(--r);
  padding: 1.4rem 1.5rem; margin-top: var(--stack);
}
.author-box__avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; border: 1px solid var(--edge-2); }
.author-box__name { font-size: 1.18rem; margin: 0 0 .15rem; }
.author-box__name a:hover { color: var(--accent); }
.author-box__role { font-size: .78rem; color: var(--tx-3); margin: 0 0 .5rem; }
.author-box__bio { font-size: .9rem; color: var(--tx-2); }
.author-box__bio :last-child { margin-bottom: 0; }
.author-box__social { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: .7rem; font-size: .78rem; font-weight: 650; }
.author-box__social a { color: var(--tx-3); transition: color .15s; }
.author-box__social a:hover { color: var(--accent); }

.related { padding-block: var(--section); border-top: 1px solid var(--edge); }

.co-card {
  background: var(--surface); border: 1px solid var(--edge-2); border-radius: var(--r);
  padding: 1.25rem 1.35rem; box-shadow: var(--shadow-sm);
}
.co-card__head { display: flex; align-items: center; gap: .8rem; margin-bottom: .8rem; }
.co-card__logo { width: 46px; height: 46px; border-radius: 12px; background: var(--bg-2); overflow: hidden; display: grid; place-items: center; flex: none; }
.co-card__logo img { width: 100%; height: 100%; object-fit: cover; }
.co-card__name { font-size: 1.12rem; margin: 0; }
.co-card__name a:hover { color: var(--accent); }
.co-card__industry { font-size: .72rem; color: var(--tx-3); }
.co-card .ledger__row { padding: .42rem 0; font-size: .8125rem; }
.co-card__all { display: inline-block; margin-top: .9rem; font-size: .8125rem; font-weight: 650; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.co-card__all:hover { filter: brightness(1.2); }

/* ==========================================================================
   10. Wiki
   ========================================================================== */
.wiki-hero {
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--edge);
  background:
    radial-gradient(52rem 24rem at 85% -20%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 62%),
    radial-gradient(44rem 22rem at 5% 120%, color-mix(in srgb, var(--violet) 22%, transparent), transparent 60%),
    #0a0c15;
  padding-block: clamp(2.6rem, 5vw, 4.5rem);
}
.wiki-hero__title { font-size: clamp(2.2rem, 4.6vw, 4rem); margin-bottom: .5rem; }
.wiki-hero__sub { color: var(--tx-2); max-width: 62ch; margin: 0; }
.wiki-hero__count { font-size: .8125rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; margin-top: 1.1rem; display: inline-block; font-variant-numeric: tabular-nums; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.wiki-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }

.profile-head {
  position: relative; border-bottom: 1px solid var(--edge);
  background:
    radial-gradient(48rem 22rem at 12% -30%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 62%),
    var(--bg-2);
  padding-block: clamp(2.4rem, 4.5vw, 4rem) var(--section-sm);
}
.profile-head__row { display: flex; gap: clamp(1.3rem, 2.6vw, 2.2rem); align-items: flex-start; }
.profile-head__logo {
  flex: none; width: clamp(80px, 9vw, 116px); height: clamp(80px, 9vw, 116px);
  border: 1px solid var(--edge-2); border-radius: 22px; background: var(--surface);
  display: grid; place-items: center; overflow: hidden;
  box-shadow: 0 0 44px color-mix(in srgb, var(--accent) 22%, transparent);
}
.profile-head__logo img { width: 100%; height: 100%; object-fit: cover; }
.profile-head__type { display: inline-flex; gap: .5rem; align-items: center; font-size: .6875rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; margin-bottom: .55rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.profile-head__name { font-size: clamp(2.2rem, 4.6vw, 4rem); line-height: .98; margin-bottom: .4rem; }
.profile-head__industry { color: var(--tx-2); font-size: .95rem; margin: 0; }
.profile-head__social { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.1rem; font-size: .78rem; font-weight: 650; }
.profile-head__social a { color: var(--tx-2); padding: .4rem .9rem; border: 1px solid var(--edge); border-radius: 999px; background: var(--surface); transition: color .15s, border-color .15s; }
.profile-head__social a:hover { color: var(--tx); border-color: var(--edge-2); }

.profile-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 22rem;
  gap: clamp(1.6rem, 3vw, 3rem); padding-block: var(--section-sm); align-items: start;
}
.profile-about { font-size: 1.04rem; line-height: 1.78; color: var(--tx-2); }
[data-theme="light"] .profile-about { color: #1c2333; }
.profile-about :first-child { margin-top: 0; }
.profile-about h2 { font-size: 1.5rem; margin-top: 1.8em; color: var(--tx); }
.profile-about a { color: var(--tx); }
.profile-sections { margin-top: var(--stack); display: flex; flex-wrap: wrap; gap: .55rem; }

.facts {
  position: sticky; top: 6.8rem;
  background: var(--surface); border: 1px solid var(--edge-2); border-radius: var(--r);
  box-shadow: var(--shadow-sm); padding: 1.35rem 1.45rem;
}
.facts__label { font-size: .6875rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; margin: 0 0 .6rem; display: flex; align-items: center; gap: .7rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.facts__label::after { content: ""; flex: 1; height: 2px; background-image: radial-gradient(circle, color-mix(in srgb, var(--tx-3) 60%, transparent) 1px, transparent 1.4px); background-size: 8px 2px; }
.facts .ledger__value { max-width: 60%; overflow-wrap: anywhere; }

.profile-feed { border-top: 1px solid var(--edge); padding-block: var(--section-sm) var(--section); }

/* ==========================================================================
   11. Footer
   ========================================================================== */
.site-foot { border-top: 1px solid var(--edge); background: #0a0c15; }
.site-foot__cta {
  position: relative; overflow: hidden; border-bottom: 1px solid var(--edge);
  background:
    radial-gradient(46rem 22rem at 20% -40%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 62%),
    radial-gradient(40rem 20rem at 95% 140%, color-mix(in srgb, var(--cyan) 14%, transparent), transparent 60%),
    #0a0c15;
  padding-block: var(--section);
}
.site-foot__cta-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 2rem; align-items: center; }
.site-foot__cta-title { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: .45rem; }
.site-foot__cta-sub { color: var(--tx-2); margin: 0; max-width: 50ch; }
.newsletter { display: flex; gap: .6rem; }
.newsletter__input {
  flex: 1; min-width: 0; padding: .8rem 1.2rem; border-radius: 999px;
  border: 1px solid var(--edge-2); background: rgba(255,255,255,.06); color: #fff;
}
.newsletter__input::placeholder { color: var(--tx-3); }
.newsletter__input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }

.site-foot__body { padding-block: var(--section-sm) 0; }
.site-foot__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr) minmax(0, 1fr); gap: 2rem; padding-bottom: var(--section-sm); }
.site-foot__note { color: var(--tx-3); font-size: .875rem; max-width: 36ch; margin: 1rem 0 0; }
.site-foot__label { font-size: .6875rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--tx-3); margin: 0 0 .9rem; }
.site-foot__nav .menu__item { border: 0; }
.site-foot__nav .menu__item > a { font-family: var(--font-sans); font-size: .9rem; font-weight: 500; padding: .32rem 0; color: var(--tx-2); }
.site-foot__nav .menu__item > a:hover { color: var(--tx); padding-inline-start: 0; }
.site-foot__links { list-style: none; margin: 0 0 1.2rem; padding: 0; }
.site-foot__links--split { columns: 2; column-gap: 1.4rem; }
.site-foot__links--split li { break-inside: avoid; }
.site-foot__links a { display: inline-block; padding: .32rem 0; font-size: .9rem; color: var(--tx-2); }
.site-foot__links a:hover { color: var(--tx); }
.site-foot__langs { list-style: none; margin: 1.2rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .8rem; font-size: .8125rem; color: var(--tx-3); }
.site-foot__langs a:hover { color: var(--tx); }
.site-foot__legal {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  border-top: 1px solid var(--edge); padding-block: 1.2rem; font-size: .78rem; color: var(--tx-3);
}
.site-foot__legal p { margin: 0; }
.site-foot__top:hover { color: var(--tx); }

/* ==========================================================================
   12. 404
   ========================================================================== */
.oops { text-align: center; padding-block: clamp(3.5rem, 9vw, 7rem); }
.oops__code {
  font-family: var(--font-display); font-weight: 780; font-size: clamp(5rem, 13vw, 11rem); line-height: .95; margin: 0;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  letter-spacing: -0.04em;
}
.oops__title { font-size: clamp(1.5rem, 3vw, 2.3rem); margin: .5rem 0; }
.oops__sub { color: var(--tx-3); margin: 0 auto 1.8rem; max-width: 46ch; }
.oops__form { display: flex; gap: .6rem; max-width: 29rem; margin: 0 auto 1.5rem; }
.oops__form input { flex: 1; min-width: 0; padding: .75rem 1.2rem; border: 1px solid var(--edge-2); border-radius: 999px; background: var(--surface); color: var(--tx); }
.oops__form input:focus { border-color: var(--accent); outline: none; }
.oops__links { display: flex; justify-content: center; flex-wrap: wrap; gap: .6rem; }

/* ==========================================================================
   13. Motion
   ========================================================================== */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .logos__viewport { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ==========================================================================
   14. Responsive
   ========================================================================== */
@media (min-width: 1500px) {
  .archive-grid, .wiki-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .verticals__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .post-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 54rem) minmax(0, 1fr); }
}

@media (max-width: 1200px) {
  .post-layout { grid-template-columns: minmax(0, 1fr); }
  .post-layout > * { grid-column: 1; }
  .post-aside, .post-aside--right { grid-column: 1; grid-row: auto; width: 100%; justify-self: stretch; margin-bottom: 1.6rem; }
  .post-aside__sticky { position: static; }
}

@media (max-width: 1000px) {
  .hero__inner { grid-template-columns: 1fr; padding-block: clamp(2.5rem, 6vw, 4rem); }
  .hero__card { max-width: 34rem; }
  .bento > .card--lg, .bento > .card--tall { grid-column: span 12; }
  .bento > .card--sm { grid-column: span 6; }
  .archive-grid, .wiki-grid, .verticals__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rail__grid { grid-template-columns: 1fr; }
  .wiki-banner__head { grid-template-columns: 1fr; align-items: start; }
  .profile-layout { grid-template-columns: 1fr; }
  .facts { position: static; }
  .site-foot__cta-row { grid-template-columns: 1fr; }
  .site-foot__grid { grid-template-columns: 1fr 1fr; }
  .site-head__tagline { display: none; }
}

@media (max-width: 700px) {
  .site-head__cta { display: none; }
  .menu-btn__label { display: none; }
  .menu-btn { padding: .55rem .8rem; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .archive-grid, .wiki-grid { grid-template-columns: 1fr; }
  .verticals__grid { grid-template-columns: 1fr 1fr; }
  .bento > .card--sm { grid-column: span 12; }
  .card--row { flex-direction: column; align-items: stretch; }
  .card--row .card__media { flex-basis: auto; width: 100%; margin-bottom: .8rem; }
  .rail__list .card--row .card__media { flex-basis: auto; }
  .profile-head__row { flex-direction: column; }
  .newsletter { flex-direction: column; }
  .site-foot__grid { grid-template-columns: 1fr; }
  .site-foot__links--split { columns: 1; }
  .oops__form { flex-direction: column; }
  .hero__cta .btn { flex: 1; }
  .logos__head { flex-direction: column; align-items: flex-start; gap: .8rem; }
}
