/* ============================================================================
   kung-iptv.se — "Regalia"
   ----------------------------------------------------------------------------
   Design language rebuilt from the Leverage 2.1 "home-2" layout in plain CSS.
   The template ships Bootstrap, jQuery and thirteen vendor scripts; none of that
   is here. What is kept is the look: a #111111 dark shell around alternating
   light bands, one crimson→red gradient used as the single accent, a heavy 900
   display face, and near-square 2px geometry.

   NO JAVASCRIPT DRIVES ANYTHING IN THIS FILE. The mobile menu and the FAQ are
   <details>. If a layout problem here looks like it needs a script, it needs a
   different layout instead.

   Contrast: every foreground/background pair used for text clears WCAG AA.
   --crown (#dd1e4b) is 4.41:1 on paper — large text and non-text only. Body copy
   and links on light use --crown-ink (6.47:1); on dark they use --crown-lift
   (6.37:1). Do not swap one for the other to "match the buttons".
   ========================================================================== */

/* ── Font: self-hosted Poppins ──────────────────────────────────────────────
   Self-hosted rather than linked from fonts.googleapis.com on purpose. /om-oss/
   and llms.txt both state that the chat widget is the only thing this site loads
   from anywhere else, and a webfont CDN would make those sentences false. 40 KB
   for six files, served from our own origin.
   `font-display: swap` so text paints immediately in the fallback. */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/poppins-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/poppins-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, 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: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/poppins-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/poppins-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, 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: 'Poppins';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('/fonts/poppins-900-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('/fonts/poppins-900-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ── Tokens ───────────────────────────────────────────────────────────────── */
:root {
  /* Dark shell — header, hero, footer, and every "invert" band */
  --ink: #111111;
  --ink-deep: #040402;
  --ink-lift: #191919;
  --ink-line: rgba(255, 255, 255, .16);
  --ink-line-bright: rgba(255, 255, 255, .28);

  /* Light bands */
  --paper: #f5f5f5;
  --paper-2: #eeeeee;
  --paper-3: #e5e5e5;
  --white: #f9f9f9;
  --line: rgba(0, 0, 0, .14);
  --line-strong: rgba(0, 0, 0, .26);

  /* Type */
  --text: #2f323a;      /* 11.4:1 on paper */
  --text-2: #5f5f5f;    /* 5.86:1 on paper */
  --text-inv: #f5f5f5;  /* 17.3:1 on ink */
  --text-inv-2: #a4a4a4;/* 7.4:1 on ink */

  /* The one accent, and its two legible variants */
  --crown: #dd1e4b;       /* fills, rules, large display only — 4.41:1 on paper */
  --crown-2: #e0040b;     /* gradient partner, never used alone */
  --crown-ink: #b01038;   /* links and body accent on light — 6.47:1 */
  --crown-lift: #ff5c7e;  /* links and body accent on dark — 6.37:1 */
  --crown-wash: #fdeaef;  /* tinted well on light */

  --grad: linear-gradient(45deg, var(--crown-2) 15%, var(--crown) 65%);

  --ok: #007a4d;
  --warn: #b3261e;

  --wrap: 1180px;
  --radius: 2px;
  --sans: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SFMono-Regular', 'Cascadia Mono', Consolas, monospace;
}

/* ── Reset ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 1rem/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--crown-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--crown-2); }
:focus-visible { outline: 3px solid var(--crown); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .6em; letter-spacing: -.02em; }
h1 { font-weight: 900; font-size: clamp(2.1rem, 6.2vw, 3.9rem); letter-spacing: -.035em; }
h2 { font-weight: 600; font-size: clamp(1.5rem, 3.4vw, 2.25rem); }
h3 { font-weight: 600; font-size: 1.14rem; letter-spacing: -.01em; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.15em; }
li { margin-bottom: .4em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.4rem 0; }
code { font-family: var(--mono); font-size: .92em; background: var(--paper-3); padding: .1em .35em; border-radius: var(--radius); }

.container { width: min(100% - 2.4rem, var(--wrap)); margin-inline: auto; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--crown); color: var(--white);
  padding: .8rem 1.2rem; font-weight: 600;
}
.skip:focus { left: 0; }

/* Utility ------------------------------------------------------------------ */
.kicker {
  display: block; font-size: .72rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--crown-ink); margin-bottom: .7rem;
}
.invert .kicker { color: var(--crown-lift); }
.lede { font-size: 1.12rem; color: var(--text-2); max-width: 62ch; }
.invert .lede { color: var(--text-inv-2); }
.r { text-align: right; }

/* The template's signature: headline text filled with the gradient.
   `color` stays set underneath so the text is still legible if
   background-clip is unsupported. */
.grad-text {
  background-image: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--crown);
}
@supports (-webkit-text-fill-color: transparent) {
  .grad-text { -webkit-text-fill-color: transparent; }
}

/* ── Ticker ───────────────────────────────────────────────────────────────── */
.ticker {
  background: var(--ink-deep); color: var(--text-inv-2);
  font-size: .78rem; border-bottom: 1px solid var(--ink-line);
}
.ticker .container { display: flex; gap: 1.6rem; padding: .5rem 0; overflow-x: auto; scrollbar-width: none; }
.ticker .container::-webkit-scrollbar { display: none; }
.ticker span { white-space: nowrap; }
.ticker b { color: var(--text-inv); font-weight: 600; }
.ticker .hl { color: var(--crown-lift); font-weight: 600; margin-left: auto; padding-left: 1.6rem; }

/* ── Masthead ─────────────────────────────────────────────────────────────── */
.masthead { background: var(--ink); position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--ink-line); }
.masthead .nav { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }
.brand {
  display: inline-flex; align-items: center; gap: .55rem;
  color: var(--text-inv); text-decoration: none;
  font-weight: 900; font-size: 1.16rem; letter-spacing: -.03em;
  flex-shrink: 0;
}
.brand:hover { color: var(--text-inv); }
.brand .mark { color: var(--crown); flex-shrink: 0; }
.brand b { color: var(--crown-lift); font-weight: 900; }

.desktop-nav { display: none; margin-left: auto; }
.desktop-nav ul { display: flex; gap: 1.55rem; list-style: none; margin: 0; padding: 0; }
/* nowrap is load-bearing: without it a wrapped nav label produces no horizontal
   overflow and still looks broken, which `npm run audit` would happily pass.
   With it, the same condition becomes overflow — which the audit does catch. */
.desktop-nav li { margin: 0; white-space: nowrap; }
/* .65rem of vertical padding, not .5 — with the inherited 1.7 line-height on a
   .88rem label that lands the link box at ~45px, over the 44px tap-target
   minimum `npm run audit` measures. The masthead is 68px tall, so it fits. */
.desktop-nav a {
  color: var(--text-inv); text-decoration: none;
  font-size: .88rem; font-weight: 400;
  padding: .65rem 0; display: block; position: relative;
}
.desktop-nav a::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: .32rem;
  height: 2px; background: var(--grad); transition: right .18s ease;
}
.desktop-nav a:hover { color: var(--white); }
.desktop-nav a:hover::after { right: 0; }

/* Mobile menu — <details>, no script. */
.mobile-nav { margin-left: auto; }
.mobile-nav summary {
  list-style: none; cursor: pointer;
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--ink-line-bright); border-radius: var(--radius);
}
.mobile-nav summary::-webkit-details-marker { display: none; }
.bars, .bars::before, .bars::after {
  display: block; width: 20px; height: 2px; background: var(--text-inv); content: '';
}
.bars { position: relative; }
.bars::before { position: absolute; top: -6px; }
.bars::after { position: absolute; top: 6px; }
.mobile-nav[open] summary { border-color: var(--crown); }
.mobile-panel {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--ink-lift); border-bottom: 3px solid var(--crown);
  padding: 1rem 0 1.6rem;
}
.mobile-panel ul { list-style: none; margin: 0 0 1rem; padding: 0; }
.mobile-panel li { margin: 0; border-bottom: 1px solid var(--ink-line); }
.mobile-panel a {
  display: block; padding: .85rem 1.2rem;
  color: var(--text-inv); text-decoration: none; font-size: .96rem;
}
.mobile-panel a:hover { color: var(--crown-lift); background: var(--ink); }
.mobile-panel .btn { margin: 0 1.2rem; display: block; text-align: center; }

@media (min-width: 1001px) {
  .desktop-nav { display: block; }
  .mobile-nav { display: none; }
  .masthead .nav > .btn { margin-left: 0; }
}
@media (max-width: 1000px) {
  .masthead .nav > .btn-sm { display: none; }
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: .65rem 1.55rem;
  background: var(--crown); color: var(--white);
  border: 0; border-radius: var(--radius);
  font: 600 .93rem/1.3 var(--sans); letter-spacing: .01em;
  text-decoration: none; cursor: pointer;
  transition: background-image .2s ease, background-color .2s ease;
}
.btn:hover, .btn:focus { background-image: var(--grad); color: var(--white); }
.btn-sm { min-height: 44px; padding: .45rem 1.05rem; font-size: .85rem; }
.btn-ghost {
  background: transparent; color: var(--crown-ink);
  box-shadow: inset 0 0 0 1px var(--crown);
}
.btn-ghost:hover, .btn-ghost:focus { background: var(--crown); background-image: var(--grad); color: var(--white); box-shadow: none; }
.invert .btn-ghost { color: var(--text-inv); box-shadow: inset 0 0 0 1px var(--ink-line-bright); }
.invert .btn-ghost:hover, .invert .btn-ghost:focus { box-shadow: none; color: var(--white); }

/* ── Section rhythm ───────────────────────────────────────────────────────── */
.section { padding: clamp(3.2rem, 7vw, 5.6rem) 0; }
.section.odd { background: var(--paper-2); }
.section.invert { background: var(--ink); color: var(--text-inv); }
.section.invert h1, .section.invert h2, .section.invert h3 { color: var(--text-inv); }
.section.invert a { color: var(--crown-lift); }
.section.invert a:hover { color: var(--white); }
.section-head { max-width: 62ch; margin-bottom: 2.4rem; }
.section-head p { color: var(--text-2); margin: 0; }
.invert .section-head p { color: var(--text-inv-2); }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  background: var(--ink); color: var(--text-inv);
  padding: clamp(3.4rem, 9vw, 6.6rem) 0 clamp(3rem, 7vw, 5rem);
  border-bottom: 1px solid var(--ink-line);
  position: relative; overflow: hidden;
}
/* One soft crimson bloom behind the headline. A gradient, not an image —
   nothing extra to download and nothing to lay out. */
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(58% 78% at 78% 8%, rgba(221, 30, 75, .26), transparent 68%);
  pointer-events: none;
}
.hero .container { position: relative; }
.hero h1 { margin-bottom: .5rem; max-width: 17ch; }
.hero .lede { color: var(--text-inv-2); margin: 1.1rem 0 0; font-size: clamp(1rem, 2.1vw, 1.2rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.hero-note { margin: 1.3rem 0 0; font-size: .84rem; color: var(--text-inv-2); }
.hero-grid { display: grid; gap: 2.6rem; }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.15fr .85fr; align-items: center; }
}
.hero-card {
  background: var(--ink-lift); border: 1px solid var(--ink-line);
  border-top: 3px solid var(--crown);
  padding: 1.5rem 1.6rem;
}
.hero-card h2 { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; letter-spacing: 0; }
.hero-card dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: .1rem 1rem; }
.hero-card dt { color: var(--text-inv-2); font-size: .88rem; padding: .48rem 0; border-bottom: 1px solid var(--ink-line); }
.hero-card dd { margin: 0; text-align: right; font-weight: 600; font-size: .93rem; padding: .48rem 0; border-bottom: 1px solid var(--ink-line); }
.hero-card dl > :nth-last-child(-n+2) { border-bottom: 0; }

/* ── Cards ────────────────────────────────────────────────────────────────── */
.grid { display: grid; gap: 1.4rem; }
@media (min-width: 700px) { .grid.g2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 700px) { .grid.g3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid.g3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 700px) { .grid.g4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid.g4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--white); border: 1px solid var(--line);
  border-top: 3px solid var(--crown);
  padding: 1.6rem 1.5rem;
}
.card h3 { margin-bottom: .5rem; }
.card p { margin: 0; color: var(--text-2); font-size: .95rem; }
.card .num-mark {
  display: block; font: 900 1.5rem/1 var(--sans);
  margin-bottom: .8rem; color: var(--crown);
}
.invert .card { background: var(--ink-lift); border-color: var(--ink-line); }
.invert .card p { color: var(--text-inv-2); }

/* Linked card */
.entry {
  display: block; text-decoration: none; color: inherit;
  background: var(--white); border: 1px solid var(--line);
  border-left: 3px solid var(--crown);
  padding: 1.3rem 1.4rem;
}
.entry h3 { margin-bottom: .35rem; color: var(--text); }
.entry p { margin: 0; color: var(--text-2); font-size: .92rem; }
.entry:hover { border-color: var(--crown); background: var(--crown-wash); color: inherit; }
.entry:hover h3 { color: var(--crown-ink); }
.invert .entry { background: var(--ink-lift); border-color: var(--ink-line); border-left-color: var(--crown); }
.invert .entry h3 { color: var(--text-inv); }
.invert .entry p { color: var(--text-inv-2); }
.invert .entry:hover { background: var(--ink-deep); }
.invert .entry:hover h3 { color: var(--crown-lift); }

/* ── Figures strip ────────────────────────────────────────────────────────── */
.figures { background: var(--ink); color: var(--text-inv); padding: 2.4rem 0; }
.figures .container { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6rem 1rem; }
@media (min-width: 800px) { .figures .container { grid-template-columns: repeat(4, 1fr); } }
.figures .cell { border-left: 2px solid var(--crown); padding-left: 1rem; }
.figures .num { display: block; font: 900 clamp(1.5rem, 3.6vw, 2.1rem)/1 var(--sans); letter-spacing: -.03em; }
.figures .lbl { display: block; font-size: .8rem; color: var(--text-inv-2); margin-top: .35rem; }

/* ── Tables ───────────────────────────────────────────────────────────────── */
.scroller { overflow-x: auto; margin: 0 0 1.6rem; }
table.data { border-collapse: collapse; width: 100%; font-size: .93rem; background: var(--white); }
table.data th, table.data td { padding: .7rem .85rem; text-align: left; border-bottom: 1px solid var(--line); }
table.data th {
  background: var(--ink); color: var(--text-inv);
  font-weight: 600; font-size: .78rem;
  letter-spacing: .1em; text-transform: uppercase;
  white-space: nowrap;
}
table.data tbody tr:nth-child(even) { background: var(--paper); }
table.data td.r, table.data th.r { text-align: right; font-variant-numeric: tabular-nums; }
table.data tbody tr:last-child td { border-bottom: 0; }

/* ── Price ladder ─────────────────────────────────────────────────────────── */
.ladder { display: grid; gap: 1.2rem; margin: 0 0 1.6rem; }
@media (min-width: 640px) { .ladder { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .ladder { grid-template-columns: repeat(5, 1fr); } }
.tier {
  background: var(--white); border: 1px solid var(--line);
  padding: 1.5rem 1.25rem 1.4rem; display: flex; flex-direction: column;
  position: relative;
}
.tier h3 { font-size: 1.02rem; margin-bottom: .7rem; }
.tier .price { font: 900 2.15rem/1 var(--sans); letter-spacing: -.04em; color: var(--text); }
.tier .price span { font-size: .95rem; font-weight: 600; letter-spacing: 0; }
.tier .per { font-size: .82rem; color: var(--text-2); margin: .35rem 0 1rem; }
.tier ul { list-style: none; padding: 0; margin: 0 0 1.3rem; font-size: .88rem; }
.tier li { padding-left: 1.1rem; position: relative; margin-bottom: .45rem; color: var(--text-2); }
.tier li::before { content: ''; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; background: var(--crown); }
.tier .btn { margin-top: auto; width: 100%; }
.tier-pick { border-color: var(--crown); border-top: 3px solid var(--crown); }
.tier-trial { background: var(--paper-2); }
.tier-label {
  position: absolute; top: 0; right: 0;
  background: var(--crown); background-image: var(--grad); color: var(--white);
  font-size: .68rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  padding: .25rem .6rem;
}
.tier-label-plain { background: var(--ink); background-image: none; }

/* ── Answer / callouts ────────────────────────────────────────────────────── */
.answer {
  background: var(--crown-wash); border-left: 3px solid var(--crown);
  padding: 1.2rem 1.35rem; margin: 0 0 1.8rem;
}
.answer p:last-child { margin-bottom: 0; }
.invert .answer { background: var(--ink-lift); }

.inline-cta {
  background: var(--ink); color: var(--text-inv);
  border-left: 3px solid var(--crown);
  padding: 1.1rem 1.35rem; margin: 1.8rem 0; font-size: .95rem;
}
.inline-cta a { color: var(--crown-lift); }
.inline-cta a:hover { color: var(--white); }
.inline-cta p:last-child { margin-bottom: 0; }

.note {
  border: 1px solid var(--line); border-left: 3px solid var(--text-2);
  background: var(--paper-2); padding: 1rem 1.2rem; margin: 1.6rem 0; font-size: .93rem;
}
.note p:last-child { margin-bottom: 0; }
.note.warn { border-left-color: var(--warn); }

/* ── CTA band ─────────────────────────────────────────────────────────────── */
.enlist { background: var(--ink); color: var(--text-inv); padding: clamp(2.6rem, 6vw, 4rem) 0; }
.enlist .container { display: grid; gap: 1.6rem; align-items: center; }
@media (min-width: 800px) { .enlist .container { grid-template-columns: 1fr auto; } }
.enlist h2 { margin-bottom: .5rem; color: var(--text-inv); }
.enlist p { margin: 0; color: var(--text-inv-2); max-width: 58ch; }
.enlist .kicker { color: var(--crown-lift); }

/* ── Tag links ────────────────────────────────────────────────────────────── */
.tags { display: flex; flex-wrap: wrap; gap: .55rem; margin: 0 0 1.6rem; }
.tag-link {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: .35rem .95rem; font-size: .85rem; text-decoration: none;
  background: var(--white); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.tag-link:hover { border-color: var(--crown); color: var(--crown-ink); background: var(--crown-wash); }
.invert .tag-link { background: var(--ink-lift); border-color: var(--ink-line); color: var(--text-inv); }
.invert .tag-link:hover { border-color: var(--crown); color: var(--crown-lift); background: var(--ink-deep); }

/* ── Breadcrumb trail ─────────────────────────────────────────────────────── */
.trail {
  padding: 1rem 0 0; font-size: .82rem; color: var(--text-2);
  display: flex; flex-wrap: wrap; gap: .4rem; align-items: center;
}
.trail a { color: var(--text-2); text-decoration: none; }
.trail a:hover { color: var(--crown-ink); text-decoration: underline; }
.trail span[aria-hidden] { color: var(--line-strong); }
.trail [aria-current] { color: var(--text); font-weight: 600; }

/* ── Article ──────────────────────────────────────────────────────────────── */
.article { padding: 1.6rem 0 clamp(3rem, 7vw, 5rem); }
.article-head { max-width: 26ch; margin-bottom: 2.2rem; }
.article-head h1 { max-width: none; }
.article-head .meta { font-size: .82rem; color: var(--text-2); }
@media (min-width: 900px) { .article-head { max-width: 62ch; } }

.wrap { display: grid; gap: 2.6rem; }
@media (min-width: 980px) {
  .wrap { grid-template-columns: minmax(0, 1fr) 268px; }
  /* The TOC is emitted BEFORE .col-main in the DOM so the phone stack reads
     h1 → meta → contents → body. Explicit placement puts it back on the right
     at desktop widths. Do not "fix" the source order. */
  .toc { grid-column: 2; grid-row: 1; position: sticky; top: 92px; align-self: start; }
  .col-main { grid-column: 1; grid-row: 1; }
}
.col-main { min-width: 0; }
.col-main > h2 { margin-top: 2.6rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.col-main > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.col-main > h3 { margin-top: 1.9rem; }
.col-main p, .col-main li { max-width: 68ch; }
.col-main figure { margin: 0 0 1.8rem; }
.col-main figure img { width: 100%; border: 1px solid var(--line); }

.toc { font-size: .88rem; }
.toc h2 {
  font-size: .74rem; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--text-2);
  margin-bottom: .8rem; padding-bottom: .6rem; border-bottom: 1px solid var(--line);
}
.toc ul { list-style: none; padding: 0; margin: 0 0 1.8rem; counter-reset: toc; }
.toc li { counter-increment: toc; margin-bottom: .1rem; }
.toc a {
  display: block; padding: .4rem 0 .4rem 1.9rem; position: relative;
  color: var(--text-2); text-decoration: none;
}
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute; left: 0; font-variant-numeric: tabular-nums;
  font-size: .76rem; color: var(--crown); font-weight: 600;
}
.toc a:hover { color: var(--crown-ink); }
.toc .related { border-top: 1px solid var(--line); padding-top: 1rem; }
.toc .related a { padding-left: 0; display: block; padding-block: .35rem; }
.toc .related a::before { content: none; }

/* ── FAQ ──────────────────────────────────────────────────────────────────── */
.queries { margin: 0 0 1.8rem; border-top: 1px solid var(--line); }
.queries details { border-bottom: 1px solid var(--line); }
.queries summary {
  cursor: pointer; list-style: none;
  padding: 1rem 2.2rem 1rem 0; position: relative;
  font-weight: 600; font-size: .98rem;
}
.queries summary::-webkit-details-marker { display: none; }
.queries summary::after {
  content: ''; position: absolute; right: .55rem; top: 1.42rem;
  width: 9px; height: 9px;
  border-right: 2px solid var(--crown); border-bottom: 2px solid var(--crown);
  transform: rotate(45deg); transition: transform .18s ease;
}
.queries details[open] summary::after { transform: rotate(-135deg); top: 1.6rem; }
.queries summary:hover { color: var(--crown-ink); }
.queries details > div { padding: 0 0 1.1rem; color: var(--text-2); }
.queries details > div p:last-child { margin-bottom: 0; }

/* ── Related block ────────────────────────────────────────────────────────── */
.related-block { background: var(--paper-2); padding: clamp(2.6rem, 6vw, 4rem) 0; }

/* ── Steps ────────────────────────────────────────────────────────────────── */
ol.steps { list-style: none; padding: 0; counter-reset: step; margin: 0 0 1.8rem; }
ol.steps > li {
  counter-increment: step; position: relative;
  padding: 0 0 1.4rem 3.1rem; margin: 0;
  border-left: 1px solid var(--line); margin-left: 1.05rem;
}
ol.steps > li:last-child { border-left-color: transparent; padding-bottom: 0; }
ol.steps > li::before {
  content: counter(step); position: absolute; left: -1.05rem; top: 0;
  width: 2.1rem; height: 2.1rem; display: grid; place-items: center;
  background: var(--crown); color: var(--white);
  font: 900 .88rem/1 var(--sans);
}
ol.steps > li strong { display: block; margin-bottom: .25rem; font-size: 1.02rem; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
footer { background: var(--ink); color: var(--text-inv-2); padding: clamp(2.8rem, 6vw, 4rem) 0 0; }
footer .cols { display: grid; gap: 2rem; padding-bottom: 2.4rem; }
@media (min-width: 640px) { footer .cols { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { footer .cols { grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2.6rem; } }
/* Styled small, but still <h2>: these are top-level sections of the document.
   The size is presentation; the level is structure. Do not demote them to h4/h5
   to match their appearance — `npm run audit-a11y` fails on the heading skip. */
footer h2 {
  font-size: .74rem; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--text-inv); margin-bottom: 1rem;
}
footer ul { list-style: none; padding: 0; margin: 0; }
footer li { margin-bottom: .55rem; }
footer a { color: var(--text-inv-2); text-decoration: none; font-size: .92rem; }
footer a:hover { color: var(--crown-lift); text-decoration: underline; }
.foot-blurb { font-size: .92rem; max-width: 42ch; margin: 1rem 0 0; }
.legal {
  border-top: 1px solid var(--ink-line); padding: 1.4rem 0 1.8rem;
  font-size: .8rem; color: var(--text-inv-2);
}
.legal a { font-size: inherit; }

/* ── 404 ──────────────────────────────────────────────────────────────────── */
.oops { padding: clamp(3.5rem, 9vw, 6rem) 0; text-align: center; }
.oops .code { font: 900 clamp(4rem, 16vw, 8rem)/1 var(--sans); letter-spacing: -.05em; margin: 0 0 .4rem; }
.oops .tags { justify-content: center; }

/* ── Print ────────────────────────────────────────────────────────────────── */
@media print {
  .masthead, .ticker, .enlist, .toc, footer, .skip, .inline-cta { display: none; }
  body { background: #fff; color: #000; }
  .wrap { display: block; }
  a::after { content: ' (' attr(href) ')'; font-size: .8em; }
}
