/* ============================================================================
   KL-ANNUAIRE — Design system
   Editorial "kiosque" aesthetic. Signature colour: KL Blue (nod to Klein blue).
   Fraunces (display serif) · Inter (body) · Space Grotesk (labels/meta)
   ========================================================================== */

/* ---- Fonts (self-hosted, variable) --------------------------------------- */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('/fonts/fraunces-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('/fonts/fraunces-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/space-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/space-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---- Tokens -------------------------------------------------------------- */
:root {
  --paper: #f4f0e6;
  --paper-2: #ece7d8;
  --paper-card: #fbf9f3;
  --ink: #14131a;
  --ink-2: #45424f;
  --ink-3: #6f6b78;
  --line: #d9d3c4;
  --line-strong: #14131a;
  --kl: #1f35ff;          /* KL Blue — signature */
  --kl-deep: #0a1ac2;
  --kl-soft: #e7e9ff;
  --flame: #ff4a24;       /* vermilion accent */
  --flame-soft: #ffe6df;
  --amber: #f2b705;
  --green: #147d5a;
  --green-soft: #dff3ea;

  --bg: var(--paper);
  --bg-2: var(--paper-2);
  --card: var(--paper-card);
  --fg: var(--ink);
  --fg-2: var(--ink-2);
  --fg-3: var(--ink-3);
  --border: var(--line);
  --accent: var(--kl);
  --accent-ink: #fff;

  --serif: 'Fraunces', 'Times New Roman', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --grotesk: 'Space Grotesk', 'Inter', system-ui, sans-serif;

  --wrap: 1320px;
  --gutter: clamp(1.1rem, 4vw, 3rem);
  --radius: 4px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --shadow: 0 1px 2px rgba(20, 19, 26, 0.04), 0 12px 34px -18px rgba(20, 19, 26, 0.28);
  --grain: 0.04;
}

:root[data-theme='dark'] {
  --paper: #0b0b11;
  --paper-2: #121219;
  --paper-card: #16151d;
  --ink: #ece7da;
  --ink-2: #b3afa2;
  --ink-3: #8a8779;
  --line: #2a2933;
  --line-strong: #ece7da;
  --kl: #6072ff;
  --kl-deep: #3d51ff;
  --kl-soft: #1c2350;
  --flame: #ff6a49;
  --flame-soft: #3a1c14;
  --green: #4fd1a0;
  --green-soft: #143026;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 18px 50px -22px rgba(0, 0, 0, 0.8);
  --grain: 0.05;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #0b0b11; --paper-2: #121219; --paper-card: #16151d;
    --ink: #ece7da; --ink-2: #b3afa2; --ink-3: #8a8779;
    --line: #2a2933; --line-strong: #ece7da;
    --kl: #6072ff; --kl-deep: #3d51ff; --kl-soft: #1c2350;
    --flame: #ff6a49; --flame-soft: #3a1c14;
    --green: #4fd1a0; --green-soft: #143026;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 18px 50px -22px rgba(0,0,0,.8);
    --grain: 0.05;
  }
}

/* ---- Reset --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'kern', 'liga', 'calt', 'ss01';
  overflow-x: hidden;
}
img, picture, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul, ol { list-style: none; padding: 0; }
:focus-visible { outline: 3px solid var(--kl); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--kl); color: #fff; }

/* Grain overlay for print/editorial feel */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
:root[data-theme='dark'] body::after { mix-blend-mode: screen; }

/* ---- Layout helpers ------------------------------------------------------ */
.wrap { width: min(100% - var(--gutter) * 2, var(--wrap)); margin-inline: auto; }
.wrap--wide { width: min(100% - var(--gutter) * 2, 1560px); margin-inline: auto; }
.rule { height: 1px; background: var(--line-strong); border: 0; opacity: 0.85; }
.rule--thin { background: var(--border); }

/* Eyebrow / kicker label */
.eyebrow {
  font-family: var(--grotesk);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--kl);
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
}
.eyebrow::before {
  content: '';
  width: 1.6em; height: 2px; background: currentColor; display: inline-block;
}
.eyebrow--flame { color: var(--flame); }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem;
  padding-block: 0.5rem 1.4rem; flex-wrap: wrap;
}
.section-head h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  font-variation-settings: 'opsz' 40, 'SOFT' 0, 'WONK' 1;
}
.section-head .more {
  font-family: var(--grotesk); font-weight: 600; font-size: 0.85rem;
  letter-spacing: 0.02em; color: var(--fg); display: inline-flex; align-items: center; gap: 0.4em;
  border-bottom: 2px solid var(--kl); padding-bottom: 2px; transition: gap 0.3s var(--ease);
}
.section-head .more:hover { gap: 0.9em; }

/* ---- Masthead ------------------------------------------------------------ */
.masthead {
  position: sticky; top: 0; z-index: 200;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line-strong);
}
.masthead__bar {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.2rem;
  height: 66px;
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; }
.brand img { height: 33px; width: auto; }
.brand__mark {
  font-family: var(--serif); font-weight: 700; font-size: 1.35rem; letter-spacing: -0.02em;
  font-variation-settings: 'opsz' 40, 'WONK' 1;
}
.brand__mark b { color: var(--kl); }
.mainnav { display: flex; align-items: center; gap: 1.6rem; justify-self: center; }
.mainnav a {
  font-family: var(--grotesk); font-weight: 500; font-size: 0.88rem; letter-spacing: 0.01em;
  position: relative; padding-block: 0.4rem; color: var(--fg-2); transition: color 0.25s;
}
.mainnav a::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--kl);
  transition: width 0.32s var(--ease);
}
.mainnav a:hover, .mainnav a[aria-current] { color: var(--fg); }
.mainnav a:hover::after, .mainnav a[aria-current]::after { width: 100%; }
.mast-tools { display: flex; align-items: center; gap: 0.4rem; justify-self: end; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%;
  color: var(--fg); transition: background 0.25s, transform 0.25s var(--ease);
}
.icon-btn:hover { background: var(--bg-2); transform: translateY(-1px); }
.icon-btn svg { width: 19px; height: 19px; }

/* Ticker / kiosk strip */
.ticker {
  border-bottom: 1px solid var(--line-strong);
  background: var(--kl); color: #fff; overflow: hidden;
}
.ticker__track {
  display: flex; align-items: center; gap: 3rem; white-space: nowrap;
  padding-block: 0.42rem; width: max-content;
  animation: marquee 46s linear infinite;
  font-family: var(--grotesk); font-size: 0.8rem; font-weight: 500; letter-spacing: 0.02em;
}
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__track span { display: inline-flex; align-items: center; gap: 0.7rem; }
.ticker__track span::before { content: '✦'; color: rgba(255,255,255,.7); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Mobile nav */
.burger { display: none; }
.mobile-nav { display: none; }

/* ---- Hero / cover -------------------------------------------------------- */
.cover { padding-block: clamp(1.6rem, 4vw, 3.2rem) clamp(2rem, 5vw, 4rem); }
.cover__grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(1.4rem, 3vw, 3rem); align-items: stretch; }
.cover__lead { position: relative; display: flex; flex-direction: column; justify-content: flex-end; }
.cover__media {
  position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 11; background: var(--bg-2);
}
.cover__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.cover__lead:hover .cover__media img { transform: scale(1.04); }
.cover__badge {
  position: absolute; top: 1rem; left: 1rem; z-index: 3;
  background: var(--flame); color: #fff; font-family: var(--grotesk); font-weight: 700;
  font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; padding: 0.4rem 0.7rem;
}
.cover__body { padding-top: 1.4rem; }
.cover__title {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2.1rem, 5vw, 4.1rem); line-height: 0.97; letter-spacing: -0.025em;
  font-variation-settings: 'opsz' 130, 'SOFT' 20, 'WONK' 1;
  text-wrap: balance;
}
.cover__title a { background-image: linear-gradient(var(--kl), var(--kl)); background-size: 0% 3px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size 0.4s var(--ease); }
.cover__title a:hover { background-size: 100% 3px; }
.cover__dek { font-size: 1.15rem; color: var(--fg-2); margin-top: 1rem; max-width: 46ch; }
.cover__meta { margin-top: 1.2rem; display: flex; gap: 1rem; align-items: center; font-family: var(--grotesk); font-size: 0.8rem; color: var(--fg-3); }

/* Secondary cover stack */
.cover__side { display: flex; flex-direction: column; gap: 1.2rem; }
.side-story { display: grid; grid-template-columns: 96px 1fr; gap: 1rem; align-items: center; padding-bottom: 1.2rem; border-bottom: 1px solid var(--border); }
.side-story:last-child { border-bottom: 0; }
.side-story__media { aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--bg-2); }
.side-story__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.side-story:hover .side-story__media img { transform: scale(1.07); }
.side-story h3 { font-family: var(--serif); font-weight: 600; font-size: 1.12rem; line-height: 1.08; letter-spacing: -0.01em; }
.side-story .eyebrow { font-size: 0.62rem; margin-bottom: 0.35rem; }
.side-story .eyebrow::before { width: 1em; }

/* ---- Article cards / magazine grid -------------------------------------- */
.mag { padding-block: clamp(2rem, 5vw, 3.6rem); }
.mag-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(1.2rem, 2.4vw, 2rem); }
.card { grid-column: span 4; display: flex; flex-direction: column; }
.card--wide { grid-column: span 6; }
.card--tall { grid-column: span 4; }
.card__media { position: relative; overflow: hidden; border-radius: var(--radius); aspect-ratio: 4 / 3; background: var(--bg-2); }
.card--wide .card__media { aspect-ratio: 16 / 10; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.card:hover .card__media img { transform: scale(1.05); }
.card__num {
  position: absolute; left: 0; top: 0; z-index: 2;
  font-family: var(--grotesk); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.05em;
  background: var(--bg); color: var(--fg); padding: 0.3rem 0.55rem; border-bottom-right-radius: var(--radius);
}
.card__cat {
  position: absolute; right: 0.6rem; bottom: 0.6rem; z-index: 2;
  background: var(--kl); color: #fff; font-family: var(--grotesk); font-weight: 600;
  font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.28rem 0.55rem; border-radius: 2px;
}
.card__body { padding-top: 0.95rem; display: flex; flex-direction: column; gap: 0.5rem; }
.card__title { font-family: var(--serif); font-weight: 600; letter-spacing: -0.015em; line-height: 1.06; font-size: 1.28rem; font-variation-settings: 'opsz' 40, 'WONK' 1; text-wrap: balance; }
.card--wide .card__title { font-size: 1.7rem; }
.card__title a { background-image: linear-gradient(var(--fg), var(--fg)); background-size: 0% 2px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size 0.35s var(--ease); }
.card__title a:hover { background-size: 100% 2px; }
.card__dek { color: var(--fg-2); font-size: 0.96rem; line-height: 1.5; }
.card__meta { margin-top: auto; padding-top: 0.7rem; font-family: var(--grotesk); font-size: 0.74rem; color: var(--fg-3); display: flex; gap: 0.8rem; align-items: center; }
.card__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--fg-3); }

/* ---- Index (annuaire) ---------------------------------------------------- */
.index-sec { padding-block: clamp(2rem, 5vw, 3.6rem); background: var(--bg-2); border-block: 1px solid var(--line-strong); }
.index-filter { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.6rem; }
.chip {
  font-family: var(--grotesk); font-weight: 500; font-size: 0.8rem; letter-spacing: 0.01em;
  padding: 0.42rem 0.9rem; border: 1px solid var(--line-strong); border-radius: 100px;
  transition: all 0.25s var(--ease); color: var(--fg-2);
}
.chip:hover { background: var(--fg); color: var(--bg); }
.chip[aria-pressed='true'] { background: var(--kl); border-color: var(--kl); color: #fff; }
.index-list { border-top: 1px solid var(--line-strong); }
.index-row {
  display: grid; grid-template-columns: 3.2rem 1fr auto; gap: 1.2rem; align-items: baseline;
  padding: 1.05rem 0; border-bottom: 1px solid var(--border);
  position: relative; transition: padding-left 0.35s var(--ease);
}
.index-row:hover { padding-left: 1rem; }
.index-row::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--kl); transform: scaleY(0); transform-origin: top; transition: transform 0.35s var(--ease); }
.index-row:hover::before { transform: scaleY(1); }
.index-row__num { font-family: var(--grotesk); font-weight: 600; font-size: 0.85rem; color: var(--fg-3); }
.index-row__title { font-family: var(--serif); font-weight: 600; font-size: clamp(1.15rem, 2vw, 1.5rem); letter-spacing: -0.015em; line-height: 1.08; }
.index-row__title .t-cat { font-family: var(--grotesk); font-size: 0.66rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--kl); display: block; margin-bottom: 0.3rem; }
.index-row__meta { font-family: var(--grotesk); font-size: 0.76rem; color: var(--fg-3); white-space: nowrap; }
.index-more { margin-top: 1.6rem; text-align: center; }

/* Category rail (horizontal scroll) */
.rail { padding-block: clamp(2rem, 4vw, 3rem); }
.rail__track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 320px); gap: 1.4rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 1rem; scrollbar-width: thin; }
.rail__track > * { scroll-snap-align: start; }
.rail__track::-webkit-scrollbar { height: 6px; }
.rail__track::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 100px; }

/* ---- CTA / newsletter band ---------------------------------------------- */
.band {
  background: var(--ink); color: var(--paper); padding-block: clamp(3rem, 8vw, 6rem);
  position: relative; overflow: hidden;
}
:root[data-theme='dark'] .band { background: #05050a; }
.band__inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2.5rem; align-items: center; }
.band h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(2rem, 5vw, 3.8rem); line-height: 0.98; letter-spacing: -0.025em; font-variation-settings: 'opsz' 100, 'SOFT' 30, 'WONK' 1; }
.band h2 em { color: var(--kl); font-style: italic; }
.band p { color: rgba(244,240,230,.72); margin-top: 1rem; max-width: 44ch; }
.band__form { display: flex; gap: 0.6rem; margin-top: 1.6rem; max-width: 460px; }
.band__form input { flex: 1; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.2); color: #fff; padding: 0.9rem 1.1rem; border-radius: var(--radius); font: inherit; }
.band__form input::placeholder { color: rgba(255,255,255,.5); }
.btn {
  font-family: var(--grotesk); font-weight: 600; font-size: 0.9rem; letter-spacing: 0.01em;
  background: var(--kl); color: #fff; padding: 0.9rem 1.5rem; border-radius: var(--radius);
  display: inline-flex; align-items: center; gap: 0.5em; transition: transform 0.25s var(--ease), background 0.25s;
}
.btn:hover { background: var(--kl-deep); transform: translateY(-2px); }
.btn--ghost { background: transparent; border: 1.5px solid currentColor; color: var(--fg); }
.btn--ghost:hover { background: var(--fg); color: var(--bg); }
.band__deco { position: absolute; font-family: var(--serif); font-size: 42vw; line-height: 0.7; color: rgba(255,255,255,.03); right: -3vw; bottom: -12vw; z-index: 1; font-weight: 700; pointer-events: none; }

/* ---- Footer -------------------------------------------------------------- */
.foot { background: var(--bg-2); border-top: 1px solid var(--line-strong); padding-top: clamp(3rem, 6vw, 5rem); }
.foot__top { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; padding-bottom: 3rem; }
.foot__brand .brand__mark { font-size: 2rem; }
.foot__brand p { color: var(--fg-2); margin-top: 1rem; max-width: 34ch; font-size: 0.95rem; }
.foot__col h4 { font-family: var(--grotesk); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 1rem; }
.foot__col a { display: block; padding: 0.32rem 0; color: var(--fg-2); font-size: 0.92rem; transition: color 0.2s, transform 0.2s var(--ease); }
.foot__col a:hover { color: var(--kl); transform: translateX(4px); }
.foot__bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 1.6rem; border-top: 1px solid var(--border); font-family: var(--grotesk); font-size: 0.78rem; color: var(--fg-3); }
.foot__wordmark { font-family: var(--serif); font-weight: 700; font-size: clamp(3rem, 16vw, 14rem); line-height: 0.8; letter-spacing: -0.04em; text-align: center; padding-bottom: 1.5rem; color: var(--fg); font-variation-settings: 'opsz' 144, 'SOFT' 0, 'WONK' 1; overflow: hidden; }
.foot__wordmark b { color: var(--kl); }

/* ---- Reveal animations --------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d='1'] { transition-delay: 0.08s; }
.reveal[data-d='2'] { transition-delay: 0.16s; }
.reveal[data-d='3'] { transition-delay: 0.24s; }
.reveal[data-d='4'] { transition-delay: 0.32s; }
.clip-reveal { clip-path: inset(0 100% 0 0); transition: clip-path 1s var(--ease); }
.clip-reveal.in { clip-path: inset(0 0 0 0); }

/* ============================================================================
   ARTICLE
   ========================================================================== */
.readbar { position: fixed; top: 0; left: 0; height: 3px; background: var(--kl); z-index: 300; width: 0; transition: width 0.1s linear; }

.art-hero { padding-block: clamp(1.6rem, 4vw, 3rem) clamp(1.2rem, 3vw, 2rem); }
.art-hero__head { max-width: 940px; margin-inline: auto; text-align: center; }
.art-hero .eyebrow { justify-content: center; margin-bottom: 1.1rem; }
.art-title { font-family: var(--serif); font-weight: 600; font-size: clamp(2.1rem, 5.2vw, 4.2rem); line-height: 0.98; letter-spacing: -0.028em; font-variation-settings: 'opsz' 130, 'SOFT' 25, 'WONK' 1; text-wrap: balance; }
.art-dek { font-size: clamp(1.1rem, 2vw, 1.4rem); color: var(--fg-2); margin-top: 1.3rem; max-width: 60ch; margin-inline: auto; line-height: 1.4; }
.art-meta { display: flex; gap: 1.2rem; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 1.6rem; font-family: var(--grotesk); font-size: 0.82rem; color: var(--fg-3); }
.art-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.art-figure { margin-top: 2.2rem; border-radius: var(--radius); overflow: hidden; background: var(--bg-2); }
.art-figure img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.art-figure figcaption { font-family: var(--grotesk); font-size: 0.76rem; color: var(--fg-3); padding-top: 0.6rem; }

.art-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 680px) minmax(0, 1fr); gap: 0; padding-block: clamp(1.5rem, 4vw, 3rem) clamp(3rem, 7vw, 6rem); }
.art-aside { position: relative; }
.art-toc { position: sticky; top: 92px; padding-right: 2rem; }
.art-toc h4 { font-family: var(--grotesk); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 0.9rem; }
.art-toc a { display: block; padding: 0.32rem 0; font-size: 0.86rem; color: var(--fg-3); border-left: 2px solid var(--border); padding-left: 0.9rem; transition: color 0.25s, border-color 0.25s; line-height: 1.3; }
.art-toc a:hover { color: var(--fg); }
.art-toc a.active { color: var(--kl); border-color: var(--kl); font-weight: 500; }
.art-share { margin-top: 2rem; display: flex; gap: 0.5rem; }
.art-share button, .art-share a { width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 50%; display: grid; place-items: center; color: var(--fg-2); transition: all 0.25s var(--ease); }
.art-share button:hover, .art-share a:hover { background: var(--kl); color: #fff; border-color: var(--kl); transform: translateY(-2px); }
.art-share svg { width: 16px; height: 16px; }

/* Article body typography */
.prose { grid-column: 2; font-size: 1.16rem; line-height: 1.72; }
.prose > * + * { margin-top: 1.35em; }
.prose p { color: var(--fg); }
.prose .lead { font-size: 1.3rem; line-height: 1.55; color: var(--fg); }
.prose .lead::first-letter, .prose > p:first-of-type::first-letter {
  font-family: var(--serif); font-weight: 700; float: left; font-size: 3.8em; line-height: 0.72;
  padding-right: 0.09em; margin-top: 0.06em; color: var(--kl); font-variation-settings: 'opsz' 144, 'WONK' 1;
}
.prose h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.6rem, 3.4vw, 2.3rem); line-height: 1.04; letter-spacing: -0.02em; margin-top: 2.4em; padding-top: 0.2em; font-variation-settings: 'opsz' 60, 'SOFT' 0, 'WONK' 1; scroll-margin-top: 90px; }
.prose h2::before { content: ''; display: block; width: 46px; height: 3px; background: var(--kl); margin-bottom: 0.7rem; }
.prose h3 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.3rem, 2.6vw, 1.65rem); letter-spacing: -0.015em; margin-top: 1.8em; scroll-margin-top: 90px; }
.prose h4 { font-family: var(--grotesk); font-weight: 600; font-size: 1.05rem; letter-spacing: 0.02em; margin-top: 1.6em; }
.prose a:not(.btn) { color: var(--kl); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--kl) 40%, transparent); transition: text-decoration-color 0.2s; }
.prose a:not(.btn):hover { text-decoration-color: var(--kl); }
.prose strong, .prose b { font-weight: 700; }
.prose em, .prose i { font-style: italic; }
.prose ul, .prose ol { padding-left: 0; display: flex; flex-direction: column; gap: 0.7em; }
.prose ul li, .prose ol li { position: relative; padding-left: 1.9em; }
.prose ul li::before { content: ''; position: absolute; left: 0.2em; top: 0.62em; width: 0.5em; height: 0.5em; background: var(--kl); border-radius: 1px; transform: rotate(45deg); }
.prose ol { counter-reset: li; }
.prose ol li::before { counter-increment: li; content: counter(li); position: absolute; left: 0; top: 0.05em; font-family: var(--grotesk); font-weight: 700; font-size: 0.8em; color: var(--kl); background: var(--kl-soft); width: 1.5em; height: 1.5em; display: grid; place-items: center; border-radius: 50%; }
.prose blockquote { border: 0; padding: 0; }
.prose img { border-radius: var(--radius); margin-block: 1.6em; }
.prose figure figcaption { font-family: var(--grotesk); font-size: 0.78rem; color: var(--fg-3); margin-top: 0.5rem; text-align: center; }
.prose hr { border: 0; height: 1px; background: var(--border); margin-block: 2.4em; }

/* Rich components (author contract) */
.kl-callout { border-radius: var(--radius); padding: 1.3rem 1.5rem 1.3rem 1.6rem; border-left: 4px solid var(--kl); background: var(--kl-soft); position: relative; }
.kl-callout p { margin: 0; }
.kl-callout > * + * { margin-top: 0.6em; }
.kl-callout__label { font-family: var(--grotesk); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--kl); display: block; margin-bottom: 0.5rem; }
.kl-callout.is-warning { border-color: var(--flame); background: var(--flame-soft); }
.kl-callout.is-warning .kl-callout__label { color: var(--flame); }
.kl-callout.is-tip { border-color: var(--green); background: var(--green-soft); }
.kl-callout.is-tip .kl-callout__label { color: var(--green); }
.kl-callout.is-key { border-color: var(--amber); background: color-mix(in srgb, var(--amber) 14%, var(--card)); }
.kl-callout.is-key .kl-callout__label { color: color-mix(in srgb, var(--amber) 70%, var(--ink)); }

blockquote.kl-quote, .kl-quote { font-family: var(--serif); font-weight: 500; font-size: clamp(1.5rem, 3.2vw, 2.1rem); line-height: 1.18; letter-spacing: -0.015em; color: var(--fg); padding: 0.4em 0 0.4em 1.2rem; border-left: 4px solid var(--kl); font-variation-settings: 'opsz' 60, 'SOFT' 20, 'WONK' 1; font-style: normal; }
.kl-quote cite { display: block; font-family: var(--grotesk); font-size: 0.8rem; font-style: normal; color: var(--fg-3); margin-top: 0.8rem; letter-spacing: 0.02em; }

.kl-stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; border-block: 1px solid var(--line-strong); padding-block: 1.6rem; }
.kl-stat { text-align: left; }
.kl-stat b { display: block; font-family: var(--serif); font-weight: 600; font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1; letter-spacing: -0.03em; color: var(--kl); font-variation-settings: 'opsz' 80, 'WONK' 1; }
.kl-stat span { display: block; font-family: var(--grotesk); font-size: 0.82rem; color: var(--fg-2); margin-top: 0.5rem; }

.kl-table-wrap { overflow-x: auto; border: 1px solid var(--line-strong); border-radius: var(--radius); }
table.kl-table { width: 100%; border-collapse: collapse; font-size: 0.96rem; min-width: 460px; }
.kl-table thead th { background: var(--ink); color: var(--paper); font-family: var(--grotesk); font-weight: 600; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; text-align: left; padding: 0.85rem 1rem; }
:root[data-theme='dark'] .kl-table thead th { background: #05050a; }
.kl-table tbody td { padding: 0.8rem 1rem; border-top: 1px solid var(--border); vertical-align: top; }
.kl-table tbody tr:nth-child(even) { background: var(--bg-2); }
.kl-table tbody th { text-align: left; font-family: var(--grotesk); font-weight: 600; padding: 0.8rem 1rem; border-top: 1px solid var(--border); }

.kl-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.kl-compare__col { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 1.4rem; background: var(--card); }
.kl-compare__col h4 { font-family: var(--grotesk); font-weight: 700; font-size: 0.95rem; letter-spacing: 0.02em; margin: 0 0 0.9rem; display: flex; align-items: center; gap: 0.5rem; }
.kl-compare__col h4::before { content: ''; width: 10px; height: 10px; border-radius: 50%; }
.kl-compare__col.is-pro { border-color: color-mix(in srgb, var(--green) 40%, var(--line-strong)); }
.kl-compare__col.is-pro h4 { color: var(--green); }
.kl-compare__col.is-pro h4::before { background: var(--green); }
.kl-compare__col.is-con { border-color: color-mix(in srgb, var(--flame) 40%, var(--line-strong)); }
.kl-compare__col.is-con h4 { color: var(--flame); }
.kl-compare__col.is-con h4::before { background: var(--flame); }
.kl-compare__col ul { gap: 0.55em; }
.kl-compare__col ul li { padding-left: 1.6em; font-size: 0.98rem; }
.kl-compare__col ul li::before { top: 0.55em; }

/* FAQ accordion */
.faq { border-top: 1px solid var(--line-strong); }
.faq__item { border-bottom: 1px solid var(--border); }
.faq__q { width: 100%; text-align: left; display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: 1.3rem 0; font-family: var(--serif); font-weight: 600; font-size: 1.2rem; letter-spacing: -0.01em; color: var(--fg); }
.faq__q .plus { flex: none; width: 26px; height: 26px; position: relative; }
.faq__q .plus::before, .faq__q .plus::after { content: ''; position: absolute; background: var(--kl); border-radius: 2px; inset: 0; margin: auto; }
.faq__q .plus::before { width: 15px; height: 2.5px; }
.faq__q .plus::after { width: 2.5px; height: 15px; transition: transform 0.35s var(--ease); }
.faq__item[open] .plus::after { transform: rotate(90deg); scale: 0 1; }
.faq__a { overflow: hidden; }
.faq__a-inner { padding-bottom: 1.4rem; color: var(--fg-2); font-size: 1.05rem; line-height: 1.65; }
.faq__a-inner > * + * { margin-top: 0.8em; }

/* Key takeaways box */
.takeaways { border: 1.5px solid var(--line-strong); border-radius: var(--radius); padding: 1.6rem 1.8rem; background: var(--card); box-shadow: var(--shadow); }
.takeaways h3 { font-family: var(--grotesk); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--kl); margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.takeaways ul { display: flex; flex-direction: column; gap: 0.75rem; }
.takeaways li { position: relative; padding-left: 1.9rem; font-size: 1.02rem; line-height: 1.45; }
.takeaways li::before { content: '→'; position: absolute; left: 0; top: 0; color: var(--kl); font-weight: 700; }

/* Article footer: tags, related */
.art-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2.5rem; }
.tag { font-family: var(--grotesk); font-size: 0.78rem; padding: 0.35rem 0.85rem; border: 1px solid var(--border); border-radius: 100px; color: var(--fg-2); transition: all 0.2s; }
.tag:hover { border-color: var(--kl); color: var(--kl); }

.related { padding-block: clamp(2.5rem, 6vw, 4.5rem); border-top: 1px solid var(--line-strong); background: var(--bg-2); }

/* ---- Page (legal/about) -------------------------------------------------- */
.page-head { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(1.5rem, 3vw, 2.5rem); border-bottom: 1px solid var(--line-strong); }
.page-head h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(2.4rem, 6vw, 4.5rem); letter-spacing: -0.03em; line-height: 0.98; font-variation-settings: 'opsz' 130, 'SOFT' 20, 'WONK' 1; }

/* ---- 404 ----------------------------------------------------------------- */
.nf { min-height: 66vh; display: grid; place-items: center; text-align: center; padding-block: 4rem; }
.nf__code { font-family: var(--serif); font-weight: 700; font-size: clamp(6rem, 26vw, 20rem); line-height: 0.8; letter-spacing: -0.04em; color: var(--kl); font-variation-settings: 'opsz' 144, 'SOFT' 40, 'WONK' 1; }

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 1080px) {
  .art-layout { grid-template-columns: minmax(0, 1fr); }
  .prose { grid-column: 1; max-width: 680px; margin-inline: auto; }
  .art-aside { display: none; }
}
@media (max-width: 900px) {
  .cover__grid { grid-template-columns: 1fr; }
  .band__inner { grid-template-columns: 1fr; }
  .foot__top { grid-template-columns: 1fr 1fr; }
  .card, .card--wide, .card--tall { grid-column: span 6; }
}
@media (max-width: 720px) {
  .mainnav { display: none; }
  .burger { display: grid; }
  .card, .card--wide, .card--tall { grid-column: span 12; }
  .cover__title { font-size: clamp(2rem, 10vw, 3rem); }
  .kl-compare { grid-template-columns: 1fr; }
  .foot__top { grid-template-columns: 1fr; gap: 1.4rem; }
  .index-row { grid-template-columns: 2rem 1fr; }
  .index-row__meta { display: none; }
  .prose { font-size: 1.08rem; }
  .art-meta { font-size: 0.76rem; gap: 0.7rem; }
}

/* Mobile nav panel */
.mobile-nav { position: fixed; inset: 0; z-index: 250; background: var(--bg); transform: translateY(-100%); transition: transform 0.5s var(--ease); display: flex; flex-direction: column; padding: 1.4rem var(--gutter); }
.mobile-nav.open { transform: none; }
.mobile-nav__top { display: flex; justify-content: space-between; align-items: center; height: 44px; }
.mobile-nav ul { margin-top: 2rem; display: flex; flex-direction: column; gap: 0.4rem; }
.mobile-nav a { font-family: var(--serif); font-weight: 600; font-size: 2rem; letter-spacing: -0.02em; padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
