/* ==========================================================================
   Ghost Crypto — design tokens + primitives
   Source of truth for docs/01-design-rules.md. Used by canvas renders now,
   becomes assets/css/ of the Ghost theme later.

   Layers: primitives → semantic → component.
   Responsive rules use container queries on .gc-root, so the same markup
   renders correctly in a 390px artboard and a 1440px page.
   ========================================================================== */

/* ---------- 1. Primitives ---------- */
:root, .gc-root {
  /* ink — one cool, low-chroma neutral ramp */
  --ink-0: #ffffff;
  --ink-25: #f7f8fa;
  --ink-50: #eef0f3;
  --ink-100: #e2e5ea;
  --ink-200: #cbd0d8;
  --ink-300: #a8afbb;
  --ink-400: #868e9d;
  --ink-500: #5d6575;
  --ink-600: #454c59;
  --ink-700: #2e333d;
  --ink-800: #1c2028;
  --ink-850: #151820;
  --ink-900: #0f1218;
  --ink-950: #090b10;
  --ink-text-dark: #eceef2;

  /* amber — the only accent (hardware indicator light) */
  --amber-300: #f6bd55;
  --amber-400: #eda42d;
  --amber-500: #d38a10;
  --amber-600: #a76a00;
  --amber-700: #7c4f00;

  /* meaning only */
  --green-600: #15803d;
  --green-400: #4cc38a;
  --red-600: #c53030;
  --red-400: #ef6b6b;

  /* spacing — 4px base */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* radius */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* type families */
  --font-sans: var(--gh-font-body, "IBM Plex Sans"), -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: var(--gh-font-heading, "IBM Plex Sans"), -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* motion */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --dur-fast: 150ms;
  --dur-base: 200ms;
  --dur-slow: 400ms;

  /* layout */
  --container: 1280px;
  --measure: 680px;
  --wide: 960px;
}

/* ---------- 2. Semantic — light (default) ---------- */
.gc-root,
.gc-root[data-theme="light"] {
  --bg: var(--ink-25);
  --surface: var(--ink-0);
  --surface-raised: var(--ink-50);
  --surface-sunken: var(--ink-50);
  --text-1: var(--ink-900);
  --text-2: var(--ink-600);
  --text-3: var(--ink-500);
  --line: rgba(15, 18, 24, .10);
  --line-strong: rgba(15, 18, 24, .18);
  --accent: var(--amber-400);
  --accent-hover: var(--amber-300);
  --on-accent: var(--ink-950);
  --accent-ink: var(--amber-700);
  --accent-wash: color-mix(in srgb, var(--amber-400) 14%, var(--ink-0));
  --positive: var(--green-600);
  --negative: var(--red-600);
  --shadow-sm: 0 1px 2px rgba(15, 18, 24, .05);
  --shadow-lg: 0 12px 32px rgba(15, 18, 24, .10);
  --btn-highlight: none;
  color-scheme: light;
}

/* ---------- 2b. Semantic — dark ---------- */
.gc-root[data-theme="dark"] {
  --bg: var(--ink-950);
  --surface: var(--ink-900);
  --surface-raised: var(--ink-800);
  --surface-sunken: var(--ink-850);
  --text-1: var(--ink-text-dark);
  --text-2: var(--ink-300);
  --text-3: var(--ink-400);
  --line: rgba(236, 238, 242, .09);
  --line-strong: rgba(236, 238, 242, .16);
  --accent: var(--amber-400);
  --accent-hover: var(--amber-300);
  --on-accent: var(--ink-950);
  --accent-ink: var(--amber-300);
  --accent-wash: color-mix(in srgb, var(--amber-400) 12%, var(--ink-900));
  --positive: var(--green-400);
  --negative: var(--red-400);
  --shadow-sm: none;
  --shadow-lg: none;
  --btn-highlight: inset 0 1px 0 rgba(255, 255, 255, .10);
  color-scheme: dark;
}

/* ---------- 3. Root + responsive scale ---------- */
.gc-root {
  container: gc / inline-size;
  background: var(--bg);
  color: var(--text-1);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.gc-root *, .gc-root *::before, .gc-root *::after { box-sizing: border-box; }

.gc-page {
  /* mobile-first type */
  --fs-meta: 12px;   --lh-meta: 16px;
  --fs-sm: 14px;     --lh-sm: 20px;
  --fs-ui: 15px;     --lh-ui: 22px;
  --fs-body: 17px;   --lh-body: 28px;
  --fs-h4: 17px;     --lh-h4: 24px;
  --fs-h3: 19px;     --lh-h3: 26px;
  --fs-h2: 24px;     --lh-h2: 32px;
  --fs-h1: 32px;     --lh-h1: 40px;
  --fs-display: 34px; --lh-display: 40px;
  --fs-figure: 24px; --lh-figure: 28px;

  --page-pad: var(--space-4);
  --gutter: var(--space-4);
  --section-gap: var(--space-12);
  --header-h: 56px;
  --card-pad: var(--space-5);

  min-height: 100%;
  background: var(--bg);
  color: var(--text-1);
  font-size: var(--fs-ui);
  line-height: var(--lh-ui);
}

@container gc (min-width: 768px) {
  .gc-page {
    --fs-h3: 20px;     --lh-h3: 28px;
    --fs-h2: 28px;     --lh-h2: 36px;
    --fs-h1: 40px;     --lh-h1: 48px;
    --fs-display: 44px; --lh-display: 48px;
    --fs-figure: 28px; --lh-figure: 32px;
    --page-pad: var(--space-6);
    --gutter: var(--space-6);
    --section-gap: var(--space-16);
    --header-h: 64px;
    --card-pad: var(--space-6);
  }
}
@container gc (min-width: 1024px) {
  .gc-page {
    --fs-body: 18px;   --lh-body: 30px;
    --fs-h1: 44px;     --lh-h1: 52px;
    --fs-display: 52px; --lh-display: 56px;
    --page-pad: var(--space-8);
  }
}

/* resets have zero specificity (:where) so component rules like .gc-prose > * + * always win */
:where(.gc-root) :where(a) { color: inherit; text-decoration: none; }
:where(.gc-root) :where(h1, h2, h3, h4, p, figure, ul, ol, dl, dd, blockquote) { margin: 0; }
:where(.gc-root) :where(ul, ol) { padding: 0; list-style: none; }
:where(.gc-root) :where(img) { display: block; max-width: 100%; }
.gc-root svg { flex-shrink: 0; }
.gc-root :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-xs); }

.gc-tabular { font-variant-numeric: tabular-nums; }
.gc-mono { font-family: var(--font-mono); }
.gc-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 4. Layout ---------- */
.gc-container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--page-pad); }
.gc-section { margin-top: var(--section-gap); }

.gc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: var(--space-8); }
.gc-grid > * { grid-column: 1 / -1; min-width: 0; }
@container gc (min-width: 768px) {
  .gc-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .gc-md-4 { grid-column: span 4 !important; }
}
@container gc (min-width: 1024px) {
  .gc-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .gc-lg-3 { grid-column: span 3 !important; }
  .gc-lg-4 { grid-column: span 4 !important; }
  .gc-lg-5 { grid-column: span 5 !important; }
  .gc-lg-6 { grid-column: span 6 !important; }
  .gc-lg-7 { grid-column: span 7 !important; }
  .gc-lg-8 { grid-column: span 8 !important; }
  .gc-lg-9 { grid-column: span 9 !important; }
}
.gc-stack { display: flex; flex-direction: column; }
.gc-row { display: flex; align-items: center; }

.gc-only-desktop { display: none !important; }
@container gc (min-width: 1024px) {
  .gc-only-desktop { display: revert !important; }
  .gc-only-mobile { display: none !important; }
}
.gc-hide-mobile { display: none !important; }
@container gc (min-width: 768px) { .gc-hide-mobile { display: revert !important; } }

/* ---------- 5. Ticker (signature) ---------- */
.gc-ticker {
  height: 32px;
  background: var(--surface-sunken);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  line-height: var(--lh-meta);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  white-space: nowrap;
}
.gc-ticker__inner { height: 100%; display: flex; align-items: center; gap: var(--space-6); }
.gc-ticker__item { display: inline-flex; gap: var(--space-2); align-items: baseline; }
.gc-ticker__label { color: var(--text-3); }
.gc-ticker__value { color: var(--text-1); }
.gc-ticker__src { margin-left: auto; color: var(--text-3); display: inline-flex; align-items: center; gap: var(--space-2); }
.gc-up { color: var(--positive); }
.gc-down { color: var(--negative); }

/* status pixel */
.gc-px { display: inline-block; width: 6px; height: 6px; border-radius: 1px; background: var(--accent); flex-shrink: 0; }
.gc-px--ok { background: var(--positive); }
.gc-px--down { background: var(--negative); }
.gc-px--idle { background: var(--text-3); }

/* ---------- 6. Header + nav ---------- */
.gc-header { background: var(--bg); border-bottom: 1px solid var(--line); }
.gc-header__inner { height: var(--header-h); display: flex; align-items: center; gap: var(--space-8); }
.gc-logo { display: inline-flex; align-items: center; gap: var(--space-2); font-family: var(--font-head); font-size: 18px; line-height: 1; font-weight: 500; color: var(--text-1); letter-spacing: -0.01em; }
.gc-logo svg { color: var(--text-1); }
.gc-nav { display: flex; align-items: stretch; gap: var(--space-6); height: 100%; }
.gc-nav a { display: inline-flex; align-items: center; font-size: var(--fs-ui); font-weight: 500; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color var(--dur-fast) var(--ease); }
.gc-nav a:hover { color: var(--text-1); }
.gc-nav a[aria-current="page"] { color: var(--text-1); border-bottom-color: var(--accent); }
.gc-header__actions { margin-left: auto; display: flex; align-items: center; gap: var(--space-2); }

.gc-search-btn {
  display: inline-flex; align-items: center; gap: var(--space-2);
  height: 36px; width: 200px; padding: 0 var(--space-2) 0 var(--space-3);
  border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--surface); color: var(--text-3); font: inherit; font-size: var(--fs-sm); cursor: pointer;
}
.gc-search-btn .gc-kbd { margin-left: auto; }

/* ---------- 7. Buttons, inputs, small primitives ---------- */
.gc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  height: 40px; padding: 0 var(--space-4);
  border: 0; border-radius: var(--radius-sm);
  font-family: var(--font-sans); font-size: var(--fs-ui); line-height: 1; font-weight: 500;
  cursor: pointer; white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.gc-btn:active { transform: scale(.98); }
.gc-btn--primary { background: var(--accent); color: var(--on-accent); }
.gc-btn--primary:hover { background: var(--accent-hover); }
.gc-btn--secondary { background: var(--surface-raised); color: var(--text-1); box-shadow: inset 0 0 0 1px var(--line), var(--btn-highlight); }
.gc-btn--secondary:hover { box-shadow: inset 0 0 0 1px var(--line-strong), var(--btn-highlight); }
.gc-btn--ghost { background: transparent; color: var(--text-2); }
.gc-btn--ghost:hover { background: var(--surface-raised); color: var(--text-1); }
.gc-btn--sm { height: 32px; padding: 0 var(--space-3); font-size: var(--fs-sm); }
.gc-btn--lg { height: 48px; padding: 0 var(--space-5); font-size: 16px; }
.gc-btn--icon { width: 40px; padding: 0; }
.gc-btn--icon.gc-btn--sm { width: 32px; }
.gc-btn[disabled] { opacity: .45; cursor: not-allowed; }

.gc-input {
  height: 40px; width: 100%; padding: 0 var(--space-3);
  border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text-1);
  font-family: var(--font-sans); font-size: var(--fs-ui);
}
.gc-input::placeholder { color: var(--text-3); }
.gc-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.gc-input--lg { height: 48px; padding: 0 var(--space-4); }
.gc-input[aria-invalid="true"] { border-color: var(--negative); }
.gc-field { display: flex; flex-direction: column; gap: var(--space-2); }
.gc-label { font-size: var(--fs-sm); color: var(--text-2); }
.gc-hint { font-size: var(--fs-meta); line-height: var(--lh-meta); color: var(--text-3); }
.gc-hint--error { color: var(--negative); }

.gc-kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 var(--space-1);
  border-radius: var(--radius-xs); border: 1px solid var(--line-strong);
  font-family: var(--font-mono); font-size: 11px; line-height: 1; color: var(--text-3);
}

.gc-kicker { font-family: var(--font-mono); font-size: var(--fs-meta); line-height: var(--lh-meta); color: var(--text-2); }
a.gc-kicker:hover { color: var(--text-1); }
.gc-meta {
  display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--space-2); row-gap: var(--space-1);
  font-family: var(--font-mono); font-size: var(--fs-meta); line-height: var(--lh-meta);
  color: var(--text-3); font-variant-numeric: tabular-nums;
}
.gc-meta > * + *::before { content: "·"; margin-right: var(--space-2); color: var(--text-3); }
.gc-meta .gc-kicker { color: var(--text-2); }

.gc-badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 20px; padding: 0 6px;
  border-radius: var(--radius-xs); border: 1px solid var(--line-strong);
  font-family: var(--font-mono); font-size: var(--fs-meta); line-height: 1; color: var(--text-2);
}
.gc-badge--breaking { color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.gc-badge--sponsored { color: var(--text-3); }

.gc-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--radius-full);
  background: var(--surface-raised); color: var(--text-2);
  font-family: var(--font-mono); font-size: 13px; font-weight: 500; flex-shrink: 0;
  box-shadow: inset 0 0 0 1px var(--line);
}
.gc-avatar--sm { width: 24px; height: 24px; font-size: 10px; }
.gc-avatar--lg { width: 64px; height: 64px; font-size: 18px; }

.gc-more { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--text-2); white-space: nowrap; }
.gc-more:hover { color: var(--text-1); }

.gc-crumbs { display: flex; flex-wrap: wrap; gap: var(--space-2); font-size: var(--fs-sm); color: var(--text-3); }
.gc-crumbs a { color: var(--text-2); }
.gc-crumbs a:hover { color: var(--text-1); }

.gc-tabs { display: flex; gap: var(--space-1); flex-wrap: wrap; }
.gc-tab { height: 32px; padding: 0 var(--space-3); border-radius: var(--radius-sm); border: 0; background: transparent; color: var(--text-2); font-family: var(--font-sans); font-size: var(--fs-sm); cursor: pointer; }
.gc-tab:hover { color: var(--text-1); }
.gc-tab[aria-selected="true"] { background: var(--surface-raised); color: var(--text-1); box-shadow: inset 0 0 0 1px var(--line); }
.gc-tab__count { font-family: var(--font-mono); font-size: var(--fs-meta); color: var(--text-3); margin-left: 6px; }

/* ---------- 8. Section head ---------- */
.gc-section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4);
  padding-top: var(--space-4); margin-bottom: var(--space-6);
  border-top: 1px solid var(--line-strong);
}
.gc-section-head__title { font-family: var(--font-head); font-size: var(--fs-h2); line-height: var(--lh-h2); font-weight: 500; letter-spacing: -0.01em; }
.gc-section-head__desc { font-size: var(--fs-sm); color: var(--text-2); margin-top: var(--space-1); }

/* ---------- 9. Cards ---------- */
.gc-card { position: relative; display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.gc-card__media { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-md); overflow: hidden; background: var(--surface-raised); }
.gc-card__body { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.gc-card__title { font-family: var(--font-head); font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: 500; letter-spacing: -0.005em; color: var(--text-1); text-wrap: pretty; }
.gc-card__title a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.gc-card__dek { font-size: var(--fs-ui); line-height: var(--lh-ui); color: var(--text-2); text-wrap: pretty; }

.gc-card--lead .gc-card__title { font-size: var(--fs-display); line-height: var(--lh-display); letter-spacing: -0.025em; text-wrap: balance; }
.gc-card--lead .gc-card__dek { font-size: 17px; line-height: 26px; max-width: 40em; }
.gc-card--lead .gc-card__body { gap: var(--space-3); }

.gc-card--row {
  display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: var(--space-4); align-items: start;
  padding-block: var(--space-5); border-bottom: 1px solid var(--line);
}
.gc-card--row .gc-card__media { border-radius: var(--radius-sm); grid-column: 2; grid-row: 1; }
.gc-card--row .gc-card__body { grid-column: 1; grid-row: 1; }
.gc-card--row .gc-card__title { font-size: var(--fs-h4); line-height: var(--lh-h4); }
.gc-card--row .gc-card__dek { display: none; }
@container gc (min-width: 768px) {
  .gc-card--row { grid-template-columns: 240px minmax(0, 1fr); gap: var(--space-6); }
  .gc-card--row .gc-card__media { grid-column: 1; border-radius: var(--radius-md); }
  .gc-card--row .gc-card__body { grid-column: 2; }
  .gc-card--row .gc-card__title { font-size: var(--fs-h3); line-height: var(--lh-h3); }
  .gc-card--row .gc-card__dek { display: block; }
}

.gc-card--compact { gap: var(--space-1); padding-block: var(--space-3); border-bottom: 1px solid var(--line); }
.gc-card--compact .gc-card__title { font-size: 16px; line-height: 22px; }

.gc-card--mini { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: var(--space-4); align-items: start; padding-block: var(--space-4); border-bottom: 1px solid var(--line); }
.gc-card--mini .gc-card__media { border-radius: var(--radius-sm); }
.gc-card--mini .gc-card__title { font-size: var(--fs-h4); line-height: var(--lh-h4); }

.gc-card--text { padding: var(--card-pad); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }

.gc-list > :last-child { border-bottom: 0; }

/* ---------- 10. Editorial art stand-ins (replace with feature_image) ---------- */
.gc-art { position: absolute; inset: 0; background-color: var(--ink-850); }
.gc-art--rack {
  background-color: var(--ink-900);
  background-image:
    radial-gradient(circle at 18px 8px, var(--amber-400) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 30px 8px, #4cc38a 0 1.5px, transparent 2.5px),
    repeating-linear-gradient(180deg, var(--ink-800) 0 14px, var(--ink-950) 14px 16px);
  background-size: 100% 48px, 100% 32px, 100% 16px;
}
.gc-art--rack::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 46%; background: linear-gradient(90deg, var(--ink-950), transparent); }
.gc-art--grid {
  background-color: var(--ink-900);
  background-image:
    linear-gradient(var(--ink-700) 1px, transparent 1px),
    linear-gradient(90deg, var(--ink-700) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: -1px -1px;
}
.gc-art--grid::after { content: ""; position: absolute; width: 27px; height: 27px; left: calc(28px * 9); top: calc(28px * 4); background: var(--amber-400); }
.gc-art--bridge {
  background-color: var(--ink-850);
  background-image:
    linear-gradient(transparent 62%, var(--ink-300) 62%, var(--ink-300) calc(62% + 2px), transparent calc(62% + 2px)),
    radial-gradient(ellipse 60% 80% at 50% 100%, transparent 98%, var(--ink-300) 98.5%, transparent 99.5%),
    repeating-linear-gradient(90deg, transparent 0 22px, var(--ink-700) 22px 23px);
}
.gc-art--bridge::after { content: ""; position: absolute; left: 50%; top: calc(62% - 7px); width: 8px; height: 8px; margin-left: -4px; background: var(--amber-400); }
.gc-art--contour {
  background-color: var(--ink-900);
  background-image: repeating-radial-gradient(circle at 78% 120%, var(--ink-900) 0 13px, var(--ink-700) 13px 14px);
}
.gc-art--paper {
  background-color: var(--ink-100);
  background-image: repeating-linear-gradient(90deg, transparent 0 39px, var(--ink-200) 39px 40px), linear-gradient(transparent 70%, var(--ink-200) 70%);
}
.gc-art--paper::after { content: ""; position: absolute; left: 22%; bottom: 30%; width: 40px; height: 34%; background: var(--ink-900); box-shadow: 52px 18px 0 var(--ink-700), 104px -24px 0 var(--amber-400), 156px 8px 0 var(--ink-700); }
.gc-art--chain {
  background-color: var(--ink-850);
  background-image:
    linear-gradient(90deg, transparent 0 calc(50% - 1px), var(--ink-600) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    repeating-linear-gradient(90deg, transparent 0 56px, var(--ink-700) 56px 96px);
  background-size: 96px 2px, 100% 40px;
  background-position: 0 50%, 0 calc(50% - 20px);
  background-repeat: repeat-x, repeat-x;
}

/* ---------- 11. Data ---------- */
.gc-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--card-pad); }
.gc-panel__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-5); }
.gc-panel__title { font-size: var(--fs-ui); font-weight: 500; }

.gc-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
@container gc (min-width: 1024px) { .gc-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.gc-stat { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-5); background: var(--surface); min-width: 0; }
.gc-stat__label { font-size: var(--fs-sm); line-height: var(--lh-sm); color: var(--text-2); }
.gc-stat__value { font-family: var(--font-mono); font-size: var(--fs-figure); line-height: var(--lh-figure); font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.gc-stat__value small { font-size: var(--fs-sm); color: var(--text-3); font-weight: 400; margin-left: 4px; letter-spacing: 0; }
.gc-stat__delta { font-family: var(--font-mono); font-size: var(--fs-meta); line-height: var(--lh-meta); color: var(--text-3); font-variant-numeric: tabular-nums; }

.gc-chart { display: block; width: 100%; height: auto; }
.gc-chart__grid { stroke: var(--line); stroke-width: 1; }
.gc-chart__axis { font-family: var(--font-mono); font-size: 11px; fill: var(--text-3); }
.gc-chart__line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.gc-chart__line--muted { stroke: var(--text-3); stroke-width: 1.5; stroke-dasharray: 3 4; }
.gc-chart__area { fill: color-mix(in srgb, var(--accent) 10%, transparent); }
.gc-chart__dot { fill: var(--accent); stroke: var(--surface); stroke-width: 3; }

.gc-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.gc-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); line-height: var(--lh-sm); }
.gc-table th { text-align: left; font-weight: 400; color: var(--text-3); padding: var(--space-3) var(--space-4); background: var(--surface-sunken); border-bottom: 1px solid var(--line); white-space: nowrap; }
.gc-table td { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
.gc-table tr:last-child td { border-bottom: 0; }
.gc-table .num { text-align: right; font-family: var(--font-mono); font-size: 13px; font-variant-numeric: tabular-nums; }
.gc-table .muted { color: var(--text-3); }
.gc-table td:first-child { font-weight: 500; }

.gc-status { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--fs-sm); color: var(--text-1); white-space: nowrap; }
.gc-status::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--text-3); }
.gc-status--ok::before { background: var(--positive); }
.gc-status--degraded::before { background: var(--accent); }
.gc-status--down::before { background: var(--negative); }

.gc-source { font-family: var(--font-mono); font-size: var(--fs-meta); line-height: var(--lh-meta); color: var(--text-3); display: inline-flex; align-items: center; gap: var(--space-2); }

/* ---------- 12. Subscribe ---------- */
.gc-subscribe { display: grid; gap: var(--space-6); padding: var(--space-8) var(--card-pad); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
@container gc (min-width: 1024px) { .gc-subscribe { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; padding: var(--space-10); gap: var(--space-12); } }
.gc-subscribe__title { font-family: var(--font-head); font-size: var(--fs-h2); line-height: var(--lh-h2); font-weight: 500; letter-spacing: -0.01em; }
.gc-subscribe__text { margin-top: var(--space-2); color: var(--text-2); }
.gc-subscribe__form { display: flex; flex-direction: column; gap: var(--space-2); }
.gc-subscribe__row { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.gc-subscribe__row .gc-input { flex: 1 1 220px; }

/* ---------- 13. Footer ---------- */
.gc-footer { margin-top: var(--section-gap); border-top: 1px solid var(--line); padding-block: var(--space-6); background: var(--bg); }
.gc-footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-8); }
.gc-footer__copyright { color: var(--text-2); font-size: 1rem; line-height: 1.5; }
.gc-footer__legal-nav { display: flex; flex-wrap: wrap; gap: 0 var(--space-6); min-width: 0; }
.gc-footer__legal-nav a { display: inline-flex; align-items: center; min-height: 44px; padding-block: var(--space-2); color: var(--text-2); font-size: 1rem; line-height: 1.5; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.gc-footer__legal-nav a:hover { color: var(--text-1); text-decoration-line: underline; }
.gc-footer__legal-nav a:focus-visible { outline: 2px solid var(--text-1); outline-offset: 3px; border-radius: var(--radius-xs); }

/* ---------- 14. Article ---------- */
.gc-article-head { max-width: var(--measure); margin-inline: auto; display: flex; flex-direction: column; gap: var(--space-5); padding-top: var(--space-10); }
.gc-article-head__title { font-family: var(--font-head); font-size: var(--fs-h1); line-height: var(--lh-h1); font-weight: 500; letter-spacing: -0.02em; text-wrap: balance; }
.gc-article-head__dek { font-size: 19px; line-height: 28px; color: var(--text-2); text-wrap: pretty; }
.gc-article-cover { max-width: var(--wide); margin: var(--space-10) auto 0; }
.gc-article-cover .gc-card__media { border-radius: var(--radius-md); }
.gc-figcaption { margin-top: var(--space-3); font-size: var(--fs-sm); line-height: var(--lh-sm); color: var(--text-3); }

.gc-byline { display: flex; align-items: center; gap: var(--space-3); padding-block: var(--space-4); border-block: 1px solid var(--line); }
.gc-byline__name { font-size: var(--fs-ui); font-weight: 500; }
.gc-byline__share { margin-left: auto; display: flex; gap: var(--space-1); }

.gc-article-body { display: grid; grid-template-columns: minmax(0, 1fr); margin-top: var(--space-10); }
.gc-article-body .gc-prose { max-width: var(--measure); margin-inline: auto; width: 100%; }
.gc-toc-aside { display: none; }
@container gc (min-width: 1200px) {
  .gc-article-body { grid-template-columns: minmax(0, 1fr) minmax(0, var(--measure)) minmax(0, 1fr); column-gap: var(--space-12); }
  .gc-article-body .gc-prose { grid-column: 2; }
  .gc-toc-aside { display: block; grid-column: 1; grid-row: 1; justify-self: end; width: 220px; }
  .gc-toc-inline { display: none; }
}

.gc-toc { font-size: var(--fs-sm); line-height: var(--lh-sm); }
.gc-toc__title { font-family: var(--font-mono); font-size: var(--fs-meta); color: var(--text-3); margin-bottom: var(--space-3); }
.gc-toc ol { border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.gc-toc li a { display: block; padding: 6px 0 6px var(--space-3); margin-left: -1px; border-left: 2px solid transparent; color: var(--text-2); }
.gc-toc li a:hover { color: var(--text-1); }
.gc-toc li a[aria-current="true"] { color: var(--text-1); border-left-color: var(--accent); }
.gc-toc-inline { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); padding: var(--space-4); margin-bottom: var(--space-8); }
.gc-toc-inline summary { cursor: pointer; font-size: var(--fs-ui); font-weight: 500; list-style: none; display: flex; justify-content: space-between; align-items: center; }

.gc-progress { height: 2px; background: var(--line); }
.gc-progress__bar { height: 100%; background: var(--accent); }

.gc-prose { font-size: var(--fs-body); line-height: var(--lh-body); color: var(--text-1); }
.gc-prose > * + * { margin-top: var(--space-6); }
.gc-prose h2 { font-family: var(--font-head); font-size: var(--fs-h2); line-height: var(--lh-h2); font-weight: 500; letter-spacing: -0.01em; margin-top: var(--space-12); }
.gc-prose h3 { font-family: var(--font-head); font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: 500; margin-top: var(--space-8); }
.gc-prose h2 + *, .gc-prose h3 + * { margin-top: var(--space-3); }
.gc-prose a { color: var(--accent-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--accent-ink) 40%, transparent); }
.gc-prose a:hover { text-decoration-color: currentColor; }
.gc-prose strong { font-weight: 600; }
.gc-prose ul, .gc-prose ol { padding-left: var(--space-6); }
.gc-prose ul { list-style: disc; }
.gc-prose ol { list-style: decimal; }
.gc-prose li + li { margin-top: var(--space-2); }
.gc-prose li::marker { color: var(--text-3); }
.gc-prose code { font-family: var(--font-mono); font-size: .86em; padding: 2px 5px; border-radius: var(--radius-xs); background: var(--surface-raised); }
.gc-prose :not(pre) > code { overflow-wrap: anywhere; }
.gc-prose pre { font-family: var(--font-mono); font-size: 14px; line-height: 22px; padding: var(--space-4) var(--space-5); border-radius: var(--radius-md); background: var(--surface-sunken); border: 1px solid var(--line); overflow-x: auto; margin-block: var(--space-8); }
.gc-prose pre code { padding: 0; background: none; font-size: inherit; }
.gc-prose .tok-c { color: var(--text-3); }
.gc-prose .tok-k { color: var(--accent-ink); }
.gc-prose blockquote { margin: var(--space-10) 0; padding-left: var(--space-5); border-left: 2px solid var(--text-1); font-size: var(--fs-h3); line-height: 30px; }
.gc-prose figure { margin-block: var(--space-10); }
.gc-prose .gc-table-wrap { margin-block: var(--space-8); }

.gc-callout { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: var(--space-3); padding: var(--space-4) var(--space-5); border-radius: var(--radius-md); background: var(--surface-raised); font-size: var(--fs-ui); line-height: 24px; margin-block: var(--space-8); }
.gc-callout svg { color: var(--text-2); margin-top: 2px; }
.gc-callout__title { font-weight: 500; margin-bottom: var(--space-1); }
.gc-callout--warning { background: var(--accent-wash); }
.gc-callout--warning svg { color: var(--accent-ink); }

.gc-specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; margin-block: var(--space-8); }
@container gc (min-width: 768px) { .gc-specs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.gc-specs > div { background: var(--surface); padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-1); }
.gc-specs dt { font-size: var(--fs-meta); line-height: var(--lh-meta); color: var(--text-3); font-family: var(--font-mono); }
.gc-specs dd { font-family: var(--font-mono); font-size: 16px; line-height: 24px; font-weight: 500; font-variant-numeric: tabular-nums; }

.gc-steps { list-style: none !important; padding-left: 0 !important; counter-reset: step; }
.gc-steps > li { counter-increment: step; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: var(--space-4); }
.gc-steps > li + li { margin-top: var(--space-4) !important; }
.gc-steps > li::before { content: counter(step); width: 28px; height: 28px; margin-top: 1px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-xs); border: 1px solid var(--line-strong); font-family: var(--font-mono); font-size: 13px; color: var(--text-2); }

.gc-tags { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.gc-tag { display: inline-flex; align-items: center; height: 28px; padding: 0 var(--space-3); border-radius: var(--radius-sm); background: var(--surface-raised); font-size: var(--fs-sm); color: var(--text-2); }
.gc-tag:hover { color: var(--text-1); }

.gc-author-card { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: var(--space-4); padding: var(--card-pad); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.gc-author-card__name { font-size: 17px; font-weight: 500; }
.gc-author-card__bio { margin-top: var(--space-1); font-size: var(--fs-sm); line-height: var(--lh-sm); color: var(--text-2); }

/* ---------- 15. Canvas-only: spec sheet helpers ---------- */
.gc-spec-label { font-family: var(--font-mono); font-size: 12px; line-height: 16px; color: var(--text-3); }
.gc-swatch { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.gc-swatch__chip { height: 56px; border-radius: var(--radius-sm); box-shadow: inset 0 0 0 1px var(--line); }
.gc-swatch__name { font-family: var(--font-mono); font-size: 12px; line-height: 16px; color: var(--text-1); }
.gc-swatch__hex { font-family: var(--font-mono); font-size: 11px; line-height: 14px; color: var(--text-3); }

@media (prefers-reduced-motion: reduce) {
  .gc-root *, .gc-root *::before, .gc-root *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; }
}

/* ==========================================================================
   Theme-only styles: things the canvas renders did not need
   (real responsive header, drawer, Ghost content grid, Koenig cards,
   members forms, data loading states). Tokens come from gc.css.
   ========================================================================== */

/* ---------- Base ---------- */
html.gc-root { background: var(--bg); scroll-padding-top: var(--space-6); }
body.gc-page { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
.gc-main { flex: 1 0 auto; }
::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }
.gc-lower { text-transform: lowercase; }
.gc-root button { font: inherit; }

.gc-skip {
  position: absolute; left: var(--space-4); top: -100px; z-index: 100;
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm);
  background: var(--accent); color: var(--on-accent); font-weight: 500;
}
.gc-skip:focus { top: var(--space-4); }

/* Ghost admin accent opt-in */
.gc-use-ghost-accent {
  --accent: var(--ghost-accent-color, #eda42d);
  --accent-hover: color-mix(in srgb, var(--ghost-accent-color, #eda42d) 85%, #fff);
  --accent-ink: var(--ghost-accent-color, #7c4f00);
  --on-accent: #fff;
}

/* ---------- Ticker: scrolls sideways on narrow screens ---------- */
.gc-ticker { overflow-x: auto; scrollbar-width: none; }
.gc-root[data-theme="light"] .gc-ticker .gc-up {
  color: color-mix(in srgb, var(--positive) 90%, var(--text-1));
}
.gc-ticker::-webkit-scrollbar { display: none; }
.gc-ticker__src { display: none; }
@media (min-width: 1024px) { .gc-ticker__src { display: inline-flex; } }
.gc-ticker[data-gc-state="error"] { display: none; }
.gc-ticker [data-gc] { min-width: 3ch; }

/* ---------- Header ---------- */
.gc-header__inner { gap: var(--space-2); }
.gc-header .gc-nav--main { display: none; }
.gc-header__lg { display: none !important; }
.gc-header__sm { display: inline-flex; }
@media (min-width: 1024px) {
  .gc-header__inner { gap: var(--space-8); }
  .gc-header .gc-nav--main { display: flex; }
  .gc-header__lg { display: inline-flex !important; }
  .gc-header__sm { display: none !important; }
}
.gc-header__actions { gap: 0; }
@media (min-width: 1024px) { .gc-header__actions { gap: var(--space-2); } }
/* Keep search and menu reachable when readers enlarge the mobile logo text. */
@media (max-width: 1023px) {
  .gc-header .gc-logo { min-width: 0; flex-shrink: 1; white-space: normal; }
  .gc-header .gc-logo img { flex-shrink: 0; }
  .gc-header__inner { height: auto; min-height: var(--header-h); padding-block: 8px; }
}


/* theme toggle shows the theme you would switch to */
.gc-theme-toggle .gc-icon-sun { display: none; }
[data-theme="dark"] .gc-theme-toggle .gc-icon-sun { display: block; }
[data-theme="dark"] .gc-theme-toggle .gc-icon-moon { display: none; }

/* ---------- Drawer (mobile menu) ---------- */
.gc-drawer {
  position: fixed; inset: 0; z-index: 50;
  background: var(--bg); color: var(--text-1);
  display: flex; flex-direction: column;
  overflow-y: auto;
  opacity: 0; transform: translateY(-8px);
  transition: opacity var(--dur-base) var(--ease), transform var(--dur-base) var(--ease);
}
.gc-drawer[hidden] { display: none; }
.gc-drawer.is-open { opacity: 1; transform: none; }
.gc-drawer__head { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.gc-drawer__body { display: flex; flex-direction: column; gap: var(--space-8); padding-block: var(--space-6) var(--space-12); }
.gc-drawer__nav { display: flex; flex-direction: column; }
.gc-drawer__nav a { display: flex; align-items: center; min-height: 48px; font-size: 20px; line-height: 28px; font-weight: 500; border-bottom: 1px solid var(--line); }
.gc-drawer__nav a[aria-current="page"] { color: var(--accent-ink); }
.cb-mobile-catalog summary { display:flex; align-items:center; justify-content:space-between; min-height:48px; border-bottom:1px solid var(--line); font-size:20px; line-height:28px; font-weight:500; cursor:pointer; list-style:none; }
.cb-mobile-catalog summary::-webkit-details-marker { display:none; }
.cb-mobile-catalog summary::after { content:""; width:7px; height:7px; margin-right:8px; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; transform:rotate(45deg) translateY(-2px); }
.cb-mobile-catalog[open] summary { color:var(--accent-ink); }
.cb-mobile-catalog[open] summary::after { transform:rotate(225deg) translateY(-2px); }
.gc-drawer__nav .cb-mobile-catalog__links { padding:8px 0 16px 16px; }
.gc-drawer__nav .cb-mobile-catalog__links a { min-height:44px; font-size:16px; line-height:24px; font-weight:400; border-bottom:0; }
.gc-drawer__nav .cb-mobile-catalog__links a:last-child { color:var(--accent-ink); text-decoration:underline; text-underline-offset:4px; margin-top:8px; }
.gc-drawer__secondary { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-5); font-size: var(--fs-sm); color: var(--text-2); }
.gc-drawer__actions { display: flex; flex-direction: column; gap: var(--space-2); }
.gc-drawer__actions .gc-btn { width: 100%; }
html.gc-drawer-open { overflow: hidden; }

/* ---------- Lists and cards ---------- */
.gc-list > :first-child { padding-top: 0; }
.gc-card__media img { width: 100%; height: 100%; object-fit: cover; }
.gc-card__media { display: block; }

.gc-card--feature .gc-card__title { font-size: var(--fs-h3); line-height: var(--lh-h3); }
@media (min-width: 768px) {
  .gc-card--feature .gc-card__title { font-size: 28px; line-height: 36px; letter-spacing: -0.01em; }
}

/* posts without feature image */
.gc-card--noimg.gc-card--row,
.gc-card--noimg.gc-card--mini { grid-template-columns: minmax(0, 1fr); }
.gc-card--noimg.gc-card--row .gc-card__body,
.gc-card--noimg.gc-card--mini .gc-card__body { grid-column: 1 / -1; }
.gc-card--noimg.gc-card--standard,
.gc-card--noimg.gc-card--feature { padding: var(--card-pad); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }

.gc-lead-pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-8); margin-top: var(--space-10); }
@media (min-width: 768px) { .gc-lead-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); } }

.gc-col-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); padding-bottom: var(--space-3); border-bottom: 1px solid var(--line-strong); }
.gc-col-head__title { font-size: 17px; line-height: 24px; font-weight: 500; }

.gc-home-top { margin-top: var(--space-6); }
@media (min-width: 768px) { .gc-home-top { margin-top: var(--space-8); } }

/* ---------- Data states ---------- */
.gc-net { display: flex; flex-direction: column; gap: var(--space-6); }
/* Network values and source labels must reflow when readers enlarge text. */
.gc-net .gc-stat { overflow-wrap: anywhere; }
.gc-net .gc-stat__value { min-width: 0; overflow-wrap: anywhere; }
.gc-net .gc-panel__head { flex-wrap: wrap; }
.gc-net .gc-source { min-width: 0; max-width: 100%; flex-wrap: wrap; overflow-wrap: anywhere; }
.gc-net .gc-quotes th, .gc-net .gc-quotes td { white-space: normal; overflow-wrap: anywhere; }
.gc-net[data-gc-state="error"] { display: flex; }
[data-gc-state="loading"] .gc-stat__value,
[data-gc-state="loading"] .gc-stat__delta,
[data-gc-state="loading"] .gc-quotes td { color: transparent !important; }
[data-gc-state="loading"] .gc-stat__value { background: var(--surface-raised); border-radius: var(--radius-xs); width: 60%; }
.gc-chart-box { position: relative; aspect-ratio: 760 / 240; }
.gc-chart-box svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.gc-quotes td:first-child span { font-weight: 400; }

.gc-data-page > * + * { margin-top: var(--space-6); }
.gc-data-page .gc-table-wrap { margin: 0; }
.gc-data-page p { font-size: var(--fs-sm); line-height: var(--lh-sm); color: var(--text-3); font-family: var(--font-mono); }

/* ---------- Tag / author headers ---------- */
.gc-archive-head { display: flex; flex-wrap: wrap; gap: var(--space-6); align-items: flex-end; justify-content: space-between; padding-top: var(--space-10); }
.gc-archive-head__text { display: flex; flex-direction: column; gap: var(--space-3); max-width: 720px; }
.gc-archive-head__title { font-family: var(--font-head); font-size: var(--fs-h1); line-height: var(--lh-h1); font-weight: 500; letter-spacing: -0.02em; }
.gc-archive-head__desc { font-size: 17px; line-height: 26px; color: var(--text-2); }
.gc-archive-head__side { display: flex; gap: var(--space-4); align-items: center; }
.gc-author-head { display: flex; gap: var(--space-5); align-items: center; }
.gc-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }

.gc-feed-wrap { margin-top: var(--space-10); }
.gc-aside { display: flex; flex-direction: column; gap: var(--space-12); }

/* ---------- Pagination ---------- */
.gc-pager { display: flex; flex-wrap: wrap; gap: var(--space-4); justify-content: space-between; align-items: center; padding-top: var(--space-6); border-top: 1px solid var(--line); }
.gc-pager .gc-meta a:hover { color: var(--text-1); }
.gc-pager [data-gc-more][aria-busy="true"] { opacity: .6; pointer-events: none; }

/* ---------- Post ---------- */
.gc-read-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 40; background: transparent; pointer-events: none; }
.gc-read-progress .gc-progress__bar { width: 0; transform-origin: left; }
.gc-article-head { padding-inline: 0; }
.gc-article-cover { padding-inline: 0; }
.gc-article-cover .gc-card__media { aspect-ratio: auto; }
.gc-article-cover img { width: 100%; height: auto; border-radius: var(--radius-md); }
@media (max-width: 767px) {
  .gc-article-cover { margin-inline: calc(var(--page-pad) * -1); }
  .gc-article-cover img { border-radius: 0; }
  .gc-article-cover .gc-figcaption { padding-inline: var(--page-pad); }
}

.gc-post-body { position: relative; margin-top: var(--space-10); }
.gc-post-toc { display: none; }
.gc-toc-inline { display: none; }
.has-toc .gc-toc-inline { display: block; }
@media (min-width: 1200px) {
  .has-toc .gc-post-toc {
    display: block;
    position: absolute; top: 0; bottom: 0;
    left: max(var(--page-pad), calc((100% - var(--container)) / 2 + var(--page-pad)));
    width: 200px;
  }
  .has-toc .gc-toc-inline { display: none; }
  .gc-post-toc .gc-toc { position: sticky; top: var(--space-8); transition: opacity var(--dur-base) var(--ease); }
  .gc-post-toc.is-covered .gc-toc { opacity: 0; pointer-events: none; }
}
.gc-toc-inline[open] summary { margin-bottom: var(--space-3); }
.gc-toc-inline ol { margin: 0; }

/* Ghost content grid: main 680 · wide 960 · full */
.gc-content {
  --wide-side: calc((var(--wide) - var(--measure)) / 2);
  display: grid;
  grid-template-columns:
    [full-start] minmax(var(--page-pad), 1fr)
    [wide-start] minmax(0, var(--wide-side))
    [main-start] min(var(--measure), calc(100% - var(--page-pad) * 2))
    [main-end] minmax(0, var(--wide-side))
    [wide-end] minmax(var(--page-pad), 1fr)
    [full-end];
}
@media (min-width: 1200px) {
  .has-toc .gc-content { --wide-side: clamp(0px, calc((100vw - var(--measure)) / 2 - 264px), 140px); }
}
.gc-content > * { grid-column: main-start / main-end; min-width: 0; }
.gc-content > .kg-width-wide { grid-column: wide-start / wide-end; }
.gc-content > .kg-width-full { grid-column: full-start / full-end; }
.gc-content > .kg-width-full img { border-radius: 0; }
.gc-content > .gc-toc-inline { margin-top: 0; }

/* tables pasted without our wrapper */
.gc-content > table { display: block; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-md); border-collapse: collapse; font-size: var(--fs-sm); line-height: var(--lh-sm); }
.gc-content > table th { text-align: left; font-weight: 400; color: var(--text-3); padding: var(--space-3) var(--space-4); background: var(--surface-sunken); border-bottom: 1px solid var(--line); white-space: nowrap; }
.gc-content > table td { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); }
.gc-content > table tr:last-child td { border-bottom: 0; }

.gc-content hr { border: 0; height: 1px; background: var(--line-strong); margin-block: var(--space-12); }
.gc-content img { height: auto; }

/* ---------- Koenig cards ---------- */
.gc-content .kg-card { margin-block: var(--space-10); }
.gc-content .kg-image-card img,
.gc-content .kg-gallery-image img { border-radius: var(--radius-md); }
.gc-content .kg-width-full.kg-image-card img { border-radius: 0; }
.gc-content figcaption { margin-top: var(--space-3); font-size: var(--fs-sm); line-height: var(--lh-sm); color: var(--text-3); text-align: left; }
.gc-content .kg-width-full figcaption { padding-inline: var(--page-pad); }
.gc-content .kg-embed-card { display: flex; flex-direction: column; align-items: center; }

/* callout → gc-callout look; all Ghost colour variants map to two of ours */
.gc-content .kg-callout-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-3);
  padding: var(--space-4) var(--space-5); border-radius: var(--radius-md);
  background: var(--surface-raised); color: var(--text-1);
  font-size: var(--fs-ui); line-height: 24px;
}
.gc-content .kg-callout-card-yellow,
.gc-content .kg-callout-card-accent,
.gc-content .kg-callout-card-red { background: var(--accent-wash); }
.gc-content .kg-callout-card-accent { color: var(--text-1); }
.gc-content .kg-callout-emoji { font-size: 18px; line-height: 24px; padding: 0; }
.gc-content .kg-callout-text { font-size: inherit; line-height: inherit; }

.gc-content .kg-bookmark-card a.kg-bookmark-container {
  border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface);
  color: var(--text-1); box-shadow: none; overflow: hidden; text-decoration: none;
}
.gc-content .kg-bookmark-title { font-weight: 500; color: var(--text-1); }
.gc-content .kg-bookmark-description,
.gc-content .kg-bookmark-metadata { color: var(--text-2); }
.gc-content .kg-bookmark-thumbnail img { border-radius: 0; }

.gc-content .kg-toggle-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: none; }
.gc-content .kg-toggle-heading-text { font-size: 17px; font-weight: 500; }

.gc-content .kg-button-card a.kg-btn,
.gc-content .kg-header-card a.kg-header-card-button,
.gc-content .kg-product-card a.kg-product-card-button {
  height: 44px; padding: 0 var(--space-5); border-radius: var(--radius-sm);
  background: var(--accent); color: var(--on-accent); font-weight: 500; text-decoration: none;
}
.gc-content .kg-file-card-container,
.gc-content .kg-audio-card,
.gc-content .kg-product-card-container { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: none; }

.gc-content blockquote.kg-blockquote-alt { border-left: 0; padding: 0; text-align: center; font-size: var(--fs-h2); line-height: var(--lh-h2); color: var(--text-1); font-style: normal; }

/* Ghost signup card / members */
.gc-content .kg-signup-card { border-radius: var(--radius-lg); }

/* ---------- Post footer ---------- */
.gc-post-foot { max-width: var(--measure); margin: var(--space-12) auto 0; display: flex; flex-direction: column; gap: var(--space-8); }
.gc-post-foot__row { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.gc-share { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.gc-share [data-copied="true"] { color: var(--positive); }
.gc-comments { max-width: var(--measure); margin: var(--space-12) auto 0; }

/* ---------- Members forms ---------- */
.gc-form-msg { display: none; font-size: var(--fs-sm); line-height: var(--lh-sm); }
form.success .gc-form-msg--success { display: block; color: var(--positive); }
form.error .gc-form-msg--error { display: block; color: var(--negative); }
form.success .gc-subscribe__row,
form.success .gc-subscribe__hint { display: none; }
form.loading button[type="submit"] { opacity: .6; pointer-events: none; }
.gc-subscribe__form .gc-btn { flex: 0 0 auto; }
.gc-subscribe--compact { grid-template-columns: minmax(0, 1fr) !important; gap: var(--space-4) !important; padding: var(--card-pad) !important; }
.gc-subscribe--compact .gc-subscribe__title { font-size: 17px; line-height: 24px; }
.gc-subscribe--compact .gc-subscribe__text { font-size: var(--fs-sm); line-height: var(--lh-sm); margin-top: var(--space-1); }
.gc-subscribe--compact .gc-subscribe__row { flex-direction: column; }
.gc-subscribe--compact .gc-input { flex: 0 0 auto; }

/* ---------- Error page ---------- */
.gc-error { padding-block: var(--space-16) var(--space-12); display: flex; flex-direction: column; gap: var(--space-4); max-width: var(--measure); }
.gc-error__code { font-family: var(--font-mono); font-size: var(--fs-meta); color: var(--text-3); }

/* ---------- Static page ---------- */
.gc-page-head { max-width: var(--measure); margin-inline: auto; padding-top: var(--space-10); display: flex; flex-direction: column; gap: var(--space-4); }

.gc-card--compact .gc-card__body { gap: var(--space-1); }
.gc-footer__brand p { font-size: var(--fs-sm); line-height: var(--lh-sm); color: var(--text-2); }
.gc-logo img { display: block; height: 24px; width: auto; }

/* header between 1024 and 1280: logo on one line, search collapses to an icon */
.gc-logo { white-space: nowrap; flex-shrink: 0; }
@media (min-width: 1024px) and (max-width: 1279px) {
  .gc-header__inner { gap: var(--space-6); }
  .gc-header .gc-nav--main { gap: var(--space-5); }
  .gc-search-btn { width: 36px; padding: 0; justify-content: center; }
  .gc-search-btn__label, .gc-search-btn .gc-kbd { display: none; }
}

/* Clear surfaces: neutral black/white with a precise blue action color. */
.gc-root, .gc-root[data-theme="light"] {
  --bg:#fafafa;
  --surface:#ffffff;
  --surface-raised:#f0f0f0;
  --surface-sunken:#f4f4f4;
  --text-1:#171717;
  --text-2:#505050;
  --text-3:#626262;
  --line:rgba(0,0,0,.10);
  --line-strong:rgba(0,0,0,.20);
  --accent:#2c63d6;
  --accent-hover:#204fae;
  --accent-ink:#295bc3;
  --on-accent:#ffffff;
  --accent-wash:#edf3ff;
  --clear-header:rgba(255,255,255,.94);
  --clear-edge:rgba(255,255,255,.90);
  --clear-shadow:0 2px 8px rgba(0,0,0,.025);
}
.gc-root[data-theme="dark"] {
  --bg:#111111;
  --surface:#1a1a1a;
  --surface-raised:#262626;
  --surface-sunken:#151515;
  --text-1:#f4f4f4;
  --text-2:#b9b9b9;
  --text-3:#a0a0a0;
  --line:rgba(255,255,255,.11);
  --line-strong:rgba(255,255,255,.23);
  --accent:#82aaff;
  --accent-hover:#abc6ff;
  --accent-ink:#92b5ff;
  --on-accent:#111111;
  --accent-wash:#202a3f;
  --clear-header:rgba(26,26,26,.96);
  --clear-edge:rgba(255,255,255,.12);
  --clear-shadow:none;
}
body.gc-page { background:var(--bg); }
.gc-ticker { background:transparent; border-color:var(--line); }
.gc-header {
  width:calc(100% - 32px); max-width:1280px; margin:14px auto 0;
  background:var(--surface); border:1px solid var(--line); border-radius:20px;
  box-shadow:var(--clear-shadow);
}
.gc-header__inner { padding-inline:24px; }
.gc-header .gc-nav a[aria-current="page"],.gc-header .gc-nav a:hover { color:var(--accent-ink); }
.gc-search-btn { border-radius:999px; background:transparent; }
.gc-header .gc-theme-toggle { border-radius:50%; }
.gc-panel,.gc-table-wrap,.gc-card--text,.gc-card--noimg.gc-card--standard,.gc-card--noimg.gc-card--feature { background:var(--surface); border-color:var(--line); box-shadow:none; }
.gc-panel { border-radius:18px; }
.gc-stats { gap:12px; background:transparent; border:0; border-radius:0; overflow:visible; }
.gc-stat { background:var(--surface); border:1px solid var(--line); border-radius:14px; box-shadow:none; }
.gc-stat__value { letter-spacing:-.04em; }
.gc-chart__line { stroke:var(--accent); stroke-width:2.5; }
.gc-chart__area { fill:color-mix(in srgb,var(--accent) 8%,transparent); }
.gc-card__media { border-radius:16px; }
.gc-prose a { color:var(--accent-ink); }
.gc-footer { background:transparent; }
@supports (backdrop-filter:blur(12px)) {
  .gc-header { background:var(--clear-header); backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px); }
}
@media(max-width:600px) {
  .gc-header { width:calc(100% - 24px); margin-top:10px; border-radius:16px; }
  .gc-header__inner { padding-inline:14px; }
  .gc-header .gc-logo { font-size:17px; }
  .gc-stats { gap:10px; }
  .gc-panel { border-radius:16px; }
}
@media(prefers-reduced-transparency:reduce) {
  .gc-header { background:var(--surface); backdrop-filter:none; -webkit-backdrop-filter:none; }
}
/* Full-width category disclosure; solid surfaces keep the current palette crisp. */
.gc-header { position:relative; z-index:30; }
.cb-catalog[hidden] { display:none; }
.cb-catalog { position:absolute; left:-1px; right:-1px; top:calc(100% + 10px); display:grid; grid-template-columns:minmax(0,1fr) 230px; gap:30px; padding:28px; background:var(--surface); border:1px solid var(--line-strong); border-radius:22px; box-shadow:0 16px 32px #00000012; max-height:min(620px,70dvh); overflow-y:auto; }
.cb-catalog__grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px 16px; }
.cb-catalog__grid a { display:flex; align-items:center; min-height:52px; padding:12px; border-radius:10px; color:var(--text-1); font-size:16px; line-height:1.4; }
.cb-catalog__grid a:hover,.cb-catalog__grid a:focus-visible { color:var(--accent-ink); background:var(--accent-wash); }
.cb-catalog__all { border-left:1px solid var(--line); display:flex; align-items:center; justify-content:center; padding-left:24px; }
.cb-catalog__all a { color:var(--accent-ink); text-decoration:underline; text-underline-offset:5px; padding-block:12px; font-weight:500; }
.gc-nav .cb-catalog-trigger { display:inline-flex; align-items:center; gap:8px; font-size:var(--fs-ui); font-weight:500; color:var(--text-2); background:none; padding:0; border:0; border-bottom:2px solid transparent; margin-bottom:-1px; cursor:pointer; white-space:nowrap; }
.gc-nav .cb-catalog-trigger:hover,.gc-nav .cb-catalog-trigger[aria-expanded="true"] { color:var(--accent-ink); }
.gc-nav .cb-catalog-trigger[aria-current="page"] { color:var(--accent-ink); border-bottom-color:var(--accent); }
.cb-catalog-chevron { width:6px; height:6px; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; transform:translateY(-2px) rotate(45deg); }
.cb-catalog-trigger[aria-expanded="true"] .cb-catalog-chevron { transform:translateY(2px) rotate(225deg); }
.cb-directory { padding-bottom:56px; }
.cb-directory-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0 32px; }
.cb-directory-item { padding:28px 0; border-top:1px solid var(--line); }
.cb-directory-item h2 { font-size:24px; font-weight:500; line-height:1.25; letter-spacing:-.02em; }
.cb-directory-item h2 a:hover { color:var(--accent-ink); text-decoration:underline; text-underline-offset:5px; }
.cb-directory-item p { margin-top:12px; max-width:34ch; color:var(--text-2); line-height:1.6; font-size:16px; }
@media(max-width:1023px) {
 .cb-catalog { grid-template-columns:minmax(0,1fr); gap:16px; padding:20px; }
 .cb-catalog__all { border-left:0; border-top:1px solid var(--line); padding:8px 0 0; justify-content:flex-start; }
 .cb-directory-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:600px) {
 .cb-catalog { padding:14px; border-radius:16px; }
 .cb-catalog__grid { grid-template-columns:1fr; gap:0; }
 .cb-catalog__grid a { min-height:44px; font-size:15px; padding:10px; }
 .cb-directory-grid { grid-template-columns:1fr; }
 .cb-directory-item { padding:24px 0; }
}
/* Article figure frame; enlargement is handled by the separate image viewer. */
.gc-content .cb-interface-scroll { overflow-x:auto; border:1px solid var(--line); border-radius:12px; background:var(--surface); scrollbar-width:thin; }
.gc-content .cb-interface-scroll img { display:block; width:auto; min-width:0; max-width:100%; height:auto; border-radius:0; }
.gc-content .cb-interface-scroll--portrait { max-width:520px; margin-inline:auto; }
.gc-content .cb-interface-scroll--portrait img { min-width:0; }

/* Article images start with the complete frame; detail inspection is explicit. */
html.gc-root .gc-content figure { min-width:0; max-width:100%; }
html.gc-root .gc-content figure img {
  display:block;
  width:auto !important;
  min-width:0 !important;
  max-width:100% !important;
  height:auto !important;
  margin-inline:auto;
  object-fit:contain;
}
html.gc-root .gc-content .cb-interface-scroll {
  min-width:0 !important;
  max-width:100% !important;
  overflow:visible !important;
}
.cb-image-actions { display:flex; justify-content:flex-end; margin-top:8px; }
.cb-image-enlarge { min-height:44px; padding:6px 10px; border:1px solid var(--line-strong); border-radius:8px; background:var(--surface); color:var(--text-1); font:inherit; font-size:14px; line-height:1.4; cursor:pointer; }
.cb-image-viewer { width:calc(100vw - 24px); max-width:1400px; height:calc(100dvh - 24px); max-height:none; padding:16px; border:1px solid var(--line-strong); border-radius:12px; color:var(--text-1); background:var(--surface); }
.cb-image-viewer[open] { display:flex; flex-direction:column; gap:12px; }
.cb-image-viewer::backdrop { background:rgb(0 0 0 / .8); }
.cb-image-viewer__head { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.cb-image-viewer__title { flex:1 1 160px; font-size:16px; line-height:1.4; }
.cb-image-viewer__stage { flex:1; min-height:0; overflow:auto; overscroll-behavior:contain; display:flex; align-items:center; justify-content:center; background:var(--surface-sunken); }
.cb-image-viewer__stage img { display:block; width:auto; height:auto; max-width:100%; max-height:100%; object-fit:contain; }
.cb-image-viewer__stage.is-zoomed { display:block; }
.cb-image-viewer__stage.is-zoomed img { max-width:none; max-height:none; }
.cb-image-viewer__hint { margin:0; font-size:14px; line-height:1.4; color:var(--text-2); }
html.gc-root .gc-article-cover > img {
  width:100%;
  height:auto;
  aspect-ratio:16 / 9;
  object-fit:contain;
  background:var(--surface-sunken);
}
html.gc-root .gc-card__media img { object-fit:contain; background:var(--surface-sunken); }

/* Editorial comparisons keep a native table inside one named scroll region. */
html.gc-root [data-gc-article] .gc-content .cb-table-region {
  display:block;
  min-width:0 !important;
  max-width:100% !important;
  overflow:auto !important;
  border:1px solid var(--line-strong) !important;
  border-radius:var(--radius-md);
  background:var(--surface);
  scrollbar-color:var(--text-2) var(--surface-sunken);
  scrollbar-width:auto;
  overscroll-behavior-inline:contain;
  scroll-padding-inline-start:var(--cb-sticky-column, 0px);
}
html.gc-root [data-gc-article] .gc-content .cb-table-region:focus-visible {
  outline:3px solid var(--accent-ink);
  outline-offset:4px;
}
html.gc-root [data-gc-article] .gc-content .cb-editorial-table {
  display:table;
  width:100% !important;
  min-width:30rem !important;
  max-width:none !important;
  margin:0 !important;
  border:0 !important;
  border-collapse:separate !important;
  border-spacing:0;
  table-layout:fixed;
  font-family:var(--font-sans);
  font-size:1rem !important;
  line-height:1.55;
  color:var(--text-1) !important;
  background:var(--surface) !important;
}
html.gc-root [data-gc-article] .gc-content .cb-editorial-table[data-cb-columns="3"] { min-width:40rem !important; }
html.gc-root [data-gc-article] .gc-content .cb-editorial-table[data-cb-columns="4"] { min-width:48rem !important; }
html.gc-root [data-gc-article] .gc-content .cb-editorial-table :is(th,td) {
  min-width:0 !important;
  padding:14px 16px !important;
  border:0 !important;
  border-bottom:1px solid var(--line) !important;
  vertical-align:top !important;
  text-align:left !important;
  white-space:normal !important;
  overflow-wrap:anywhere;
  word-break:normal;
  font-size:inherit !important;
  line-height:inherit;
  color:var(--text-1) !important;
  background:transparent !important;
  font-variant-numeric:tabular-nums;
}
html.gc-root [data-gc-article] .gc-content .cb-editorial-table thead th {
  font-weight:600;
  background:var(--surface-sunken) !important;
  border-bottom:2px solid var(--line-strong) !important;
}
html.gc-root [data-gc-article] .gc-content .cb-editorial-table thead th:first-child { width:26%; }
html.gc-root [data-gc-article] .gc-content .cb-editorial-table[data-cb-columns="2"] thead th:first-child { width:34%; }
html.gc-root [data-gc-article] .gc-content .cb-editorial-table tbody th[scope="row"] { font-weight:600; }
html.gc-root [data-gc-article] .gc-content .cb-editorial-table tbody tr:nth-child(even) { background:var(--surface-sunken); }
html.gc-root [data-gc-article] .gc-content .cb-editorial-table tbody tr:last-child :is(th,td) { border-bottom:0 !important; }
html.gc-root [data-gc-article] .gc-content .cb-editorial-table caption {
  position:sticky;
  left:0;
  width:var(--cb-table-viewport, 100%);
  max-width:var(--cb-table-viewport, 100%);
  box-sizing:border-box;
  padding:14px 16px;
  text-align:left;
  font-size:1rem;
  line-height:1.5;
  color:var(--text-2);
  background:var(--surface);
  border-bottom:1px solid var(--line);
}
html.gc-root [data-gc-article] .gc-content .cb-editorial-table :is(p,ul,ol) { margin-block:0; }
html.gc-root [data-gc-article] .gc-content .cb-editorial-table code { white-space:normal !important; overflow-wrap:anywhere !important; word-break:normal; font-size:1em; padding:0; }
html.gc-root [data-gc-article] .gc-content .cb-table-scroll-hint {
  margin-top:8px;
  font-size:14px;
  line-height:1.5;
  color:var(--text-2);
}
html.gc-root [data-gc-article] .gc-content .cb-table-scroll-hint[hidden] { display:none; }
@media (max-width:600px) {
  html.gc-root [data-gc-article] .gc-content .cb-editorial-table[data-cb-columns="2"] { min-width:0 !important; }
  html.gc-root [data-gc-article] .gc-content .cb-editorial-table[data-cb-columns="3"] { min-width:34rem !important; }
  html.gc-root [data-gc-article] .gc-content .cb-editorial-table[data-cb-columns="4"] { min-width:42rem !important; }
  html.gc-root [data-gc-article] .gc-content .cb-editorial-table[data-cb-columns="4"] thead th:first-child { width:24%; }
  html.gc-root [data-gc-article] .gc-content .cb-editorial-table:not([data-cb-columns="2"]) :is(thead th:first-child,tbody th[scope="row"]) {
    position:sticky;
    left:0;
    z-index:1;
    background:var(--surface) !important;
    border-right:1px solid var(--line-strong) !important;
  }
  html.gc-root [data-gc-article] .gc-content .cb-editorial-table:not([data-cb-columns="2"]) thead th:first-child { z-index:2; background:var(--surface-sunken) !important; }
  html.gc-root [data-gc-article] .gc-content .cb-editorial-table:not([data-cb-columns="2"]) tbody tr:nth-child(even) th[scope="row"] { background:var(--surface-sunken) !important; }
}
@media (max-width:360px) {
  html.gc-root [data-gc-article] .gc-content .cb-editorial-table[data-cb-columns="3"] :is(thead th:first-child,tbody th[scope="row"]) { padding-inline:8px !important; }
  html.gc-root [data-gc-article] .gc-content .cb-editorial-table :is(th,td) { padding-inline:12px !important; }
  html.gc-root [data-gc-article] .gc-content .cb-editorial-table[data-cb-columns="2"] thead th:first-child { width:45%; }
  html.gc-root [data-gc-article] .gc-content .cb-editorial-table[data-cb-columns="3"] thead th:first-child { width:27.8%; }
  html.gc-root [data-gc-article] .gc-content .cb-editorial-table[data-cb-columns="3"] { min-width:28rem !important; }
  html.gc-root [data-gc-article] .gc-content .cb-editorial-table[data-cb-columns="4"] { min-width:36rem !important; }
}
@media print {
  html.gc-root [data-gc-article] .gc-content .cb-table-region { overflow:visible !important; }
  html.gc-root [data-gc-article] .gc-content .cb-editorial-table { min-width:0 !important; }
  .cb-table-scroll-hint { display:none !important; }
}
