/* Deluair Consultancy: editorial design system.
 * Light theme by default (institutional). Dark theme via [data-theme="dark"] on <html>.
 * Typography: Source Serif 4 for editorial text, Inter for UI, JetBrains Mono for technical detail.
 */

:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --surface-2: #f5f4ee;
  --ink: #0a1628;
  --body: #1f2937;
  --muted: #4b5563;
  --faint: #6b7280;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --accent: #b8723f;
  --accent-hover: #9a5e35;
  --accent-faint: #f4eee5;
  --critical: #9f1239;
  --positive: #166534;

  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-serif: 'Source Serif 4', ui-serif, Georgia, Cambria, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, 'Liberation Mono', monospace;

  --radius: 4px;
  --radius-lg: 8px;
  --container: 1200px;
  --container-narrow: 760px;
  --container-wide: 1320px;
  --shadow: 0 1px 2px rgba(10, 22, 40, 0.04), 0 6px 16px rgba(10, 22, 40, 0.05);
  --shadow-lift: 0 2px 4px rgba(10, 22, 40, 0.06), 0 14px 32px rgba(10, 22, 40, 0.08);
}

[data-theme="dark"] {
  --bg: #0a0a0b;
  --surface: #131318;
  --surface-2: #1a1a20;
  --ink: #f5f3eb;
  --body: #e5e7eb;
  --muted: #9ca3af;
  --faint: #6b7280;
  --border: #1f2027;
  --border-strong: #2b2c34;
  --accent: #d97757;
  --accent-hover: #ec8a6f;
  --accent-faint: rgba(217, 119, 87, 0.10);
  --critical: #fca5a5;
  --positive: #86efac;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 16px rgba(0, 0, 0, 0.55);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.45), 0 14px 32px rgba(0, 0, 0, 0.65);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0a0a0b;
    --surface: #131318;
    --surface-2: #1a1a20;
    --ink: #f5f3eb;
    --body: #e5e7eb;
    --muted: #9ca3af;
    --faint: #6b7280;
    --border: #1f2027;
    --border-strong: #2b2c34;
    --accent: #d97757;
    --accent-hover: #ec8a6f;
    --accent-faint: rgba(217, 119, 87, 0.10);
    --critical: #fca5a5;
    --positive: #86efac;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 16px rgba(0, 0, 0, 0.55);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.45), 0 14px 32px rgba(0, 0, 0, 0.65);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--body);
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'kern', 'liga', 'calt';
}

img, svg { max-width: 100%; height: auto; }

a { color: var(--accent); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent-hover); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

::selection { background: var(--accent-faint); color: var(--ink); }

h1, h2, h3, h4, h5 {
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.012em;
  line-height: 1.18;
}
h1 { font-size: clamp(2.4rem, 5vw, 3.4rem); margin: 0 0 1rem; }
h2 { font-size: clamp(1.7rem, 3vw, 2.1rem); margin: 2.5rem 0 1rem; }
h3 { font-size: 1.35rem; margin: 1.5rem 0 0.6rem; }
h4 { font-size: 1.1rem; margin: 1.25rem 0 0.5rem; }
p { margin: 0 0 1rem; }
p.lede { font-size: 1.2rem; line-height: 1.55; color: var(--body); max-width: 64ch; }

ul, ol { padding-left: 1.4rem; }
li { margin-bottom: 0.4rem; }
hr { border: none; border-top: 1px solid var(--border); margin: 3rem 0; }

.mono {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
}
.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 0.85rem;
}
.eyebrow-muted { color: var(--muted); }

/* ===== Skip link ===== */
.skip-link {
  position: absolute; left: -1000px; top: 8px;
  background: var(--ink); color: var(--surface);
  padding: 0.5rem 0.85rem; border-radius: var(--radius);
  font-family: var(--font-sans); font-size: 0.9rem; z-index: 100;
}
.skip-link:focus { left: 8px; color: var(--surface); text-decoration: none; }

/* ===== Navigation ===== */
.nav {
  position: sticky; top: 0; z-index: 30;
  background: rgba(250, 250, 247, 0.92);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-sans);
}
[data-theme="dark"] .nav { background: rgba(10, 10, 11, 0.84); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .nav { background: rgba(10, 10, 11, 0.84); }
}
.nav-inner {
  max-width: var(--container-wide); margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem; align-items: center;
}
.brand {
  display: inline-flex; align-items: baseline; gap: 0.4rem;
  color: var(--ink); font-family: var(--font-serif);
  font-weight: 600; font-size: 1.2rem; letter-spacing: -0.01em;
}
.brand:hover { color: var(--ink); text-decoration: none; }
.brand-mark { color: var(--accent); font-family: var(--font-mono); font-weight: 500; }
.brand-omc {
  font-family: var(--font-mono); font-weight: 400;
  font-size: 0.7rem; padding: 0.15rem 0.4rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--muted); margin-left: 0.5rem;
  text-transform: uppercase; letter-spacing: 0.1em;
}

.nav-links {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 1.5rem; justify-content: center;
}
.nav-links a {
  color: var(--body); font-size: 0.95rem; font-weight: 500;
  padding: 0.4rem 0; border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.nav-links a:hover {
  color: var(--ink); text-decoration: none;
  border-bottom-color: var(--accent);
}
.nav-links a.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.nav-actions { display: flex; align-items: center; gap: 0.65rem; }
.nav-cta {
  font-family: var(--font-sans); font-weight: 500; font-size: 0.9rem;
  padding: 0.5rem 1rem;
  background: var(--ink); color: var(--bg) !important;
  border-radius: var(--radius);
  transition: background 0.15s;
}
.nav-cta:hover { background: var(--accent); text-decoration: none; }

.nav-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.nav-icon:hover { color: var(--ink); border-color: var(--border-strong); }
.nav-icon svg { width: 16px; height: 16px; }

.nav-search-form {
  display: flex; align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.3rem 0.65rem;
  background: var(--surface);
  width: 200px;
}
.nav-search-form input {
  border: none; outline: none; background: transparent;
  font-family: var(--font-sans); font-size: 0.88rem;
  width: 100%; color: var(--body);
}
.nav-search-form input::placeholder { color: var(--faint); }

.nav-mobile-toggle { display: none; }

@media (max-width: 1000px) {
  .nav-inner { grid-template-columns: auto auto; }
  .nav-links {
    display: none;
    grid-column: 1 / -1; flex-direction: column; gap: 0.4rem; padding: 0.75rem 0; align-items: stretch;
    border-top: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.6rem 0.5rem; border-bottom: none; border-left: 2px solid transparent; }
  .nav-links a.active { border-left-color: var(--accent); }
  .nav-search-form { display: none; }
  .nav-mobile-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    border: 1px solid var(--border); border-radius: var(--radius);
    background: transparent; color: var(--muted); cursor: pointer;
  }
}

/* ===== Layout primitives ===== */
.container { max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }
.container-wide { max-width: var(--container-wide); margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 1.5rem; }

.section { padding: 5rem 0; border-bottom: 1px solid var(--border); }
.section:last-of-type { border-bottom: none; }
.section-tight { padding: 3rem 0; }
.section-quiet { background: var(--surface-2); }

.section-head { margin-bottom: 2.5rem; max-width: 64ch; }
.section-head h2 { margin: 0.25rem 0 0.6rem; }
.section-lede { color: var(--muted); font-size: 1.05rem; line-height: 1.6; }

/* ===== Hero ===== */
.hero {
  padding: 7rem 0 5rem;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(700px 350px at 12% 0%, var(--accent-faint), transparent 70%),
    var(--bg);
}
.hero-eyebrow { color: var(--accent); }
.hero h1 {
  font-size: clamp(2.6rem, 5.6vw, 4rem);
  max-width: 22ch; margin: 0 0 1.25rem;
}
.hero-lede {
  font-size: 1.25rem; line-height: 1.55;
  color: var(--body); max-width: 60ch;
  font-family: var(--font-serif);
}
.hero-cta { display: flex; gap: 0.85rem; margin-top: 2rem; flex-wrap: wrap; }

.hero-meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem; margin-top: 4rem; padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}
.hero-meta-item .num {
  display: block; font-family: var(--font-serif);
  font-size: 2.4rem; font-weight: 500; color: var(--ink);
  line-height: 1.05;
}
.hero-meta-item .label {
  display: block; margin-top: 0.4rem;
  font-family: var(--font-sans); font-size: 0.82rem;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em;
}

/* ===== Subhero ===== */
.subhero {
  padding: 5rem 0 3rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.subhero h1 { max-width: 30ch; margin: 0.4rem 0 1rem; }
.subhero .lede { color: var(--body); }

.breadcrumb {
  font-family: var(--font-sans); font-size: 0.85rem;
  color: var(--muted); margin-bottom: 0.8rem;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { padding: 0 0.4rem; color: var(--faint); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-sans); font-weight: 500; font-size: 0.95rem;
  padding: 0.7rem 1.3rem; border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer; line-height: 1;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.05s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--ink); color: var(--bg);
  border-color: var(--ink);
}
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.btn-secondary {
  background: transparent; color: var(--ink);
  border-color: var(--border-strong);
}
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); }
.btn-accent {
  background: var(--accent); color: #fff;
  border-color: var(--accent);
}
.btn-accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn-ghost {
  background: transparent; color: var(--accent);
  border-color: transparent;
  padding: 0.4rem 0;
}
.btn-ghost:hover { color: var(--accent-hover); }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.85rem; }

/* ===== Cards ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
}
.card h3 { margin: 0 0 0.4rem; font-size: 1.2rem; }
.card-tag {
  display: block; font-family: var(--font-sans); font-size: 0.78rem;
  color: var(--accent); margin-bottom: 0.55rem;
  text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600;
}
.card-summary { color: var(--muted); font-size: 0.95rem; margin: 0.5rem 0 0.7rem; }
.card-meta { display: flex; gap: 0.85rem; font-size: 0.82rem; color: var(--faint); font-family: var(--font-sans); }
.card-arrow { color: var(--accent); font-family: var(--font-sans); font-size: 0.9rem; }
a.card { color: var(--body); display: block; }
a.card:hover { color: var(--body); text-decoration: none; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; }

/* ===== Long-form article ===== */
.article {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  line-height: 1.78;
  color: var(--body);
}
.article p { margin: 0 0 1.2rem; }
.article p.lede { font-size: 1.3rem; color: var(--ink); margin-bottom: 1.6rem; font-style: italic; }
.article h2 {
  font-size: 1.7rem; margin: 3rem 0 1rem; font-weight: 500;
  scroll-margin-top: 90px;
}
.article h3 { font-size: 1.25rem; margin: 2rem 0 0.7rem; scroll-margin-top: 90px; }
.article h2 a.anchor, .article h3 a.anchor {
  color: var(--faint); margin-left: 0.4rem; opacity: 0;
  font-weight: 400; font-size: 0.85em; text-decoration: none;
}
.article h2:hover a.anchor, .article h3:hover a.anchor { opacity: 1; }
.article ul, .article ol { padding-left: 1.5rem; margin: 0 0 1.2rem; }
.article li { margin-bottom: 0.5rem; }
.article blockquote {
  margin: 1.5rem 0; padding: 0.5rem 0 0.5rem 1.25rem;
  border-left: 3px solid var(--accent);
  color: var(--body); font-style: italic;
}
.article hr { margin: 2.25rem 0; }
.article figure { margin: 1.75rem 0; }
.article figcaption {
  margin-top: 0.55rem;
  font-family: var(--font-sans); font-size: 0.85rem;
  color: var(--faint); font-style: italic;
}
.article a { border-bottom: 1px solid rgba(184, 114, 63, 0.3); }
.article a:hover { border-bottom-color: var(--accent); }

/* ===== Tables ===== */
.data-table {
  width: 100%; border-collapse: collapse;
  font-family: var(--font-sans); font-size: 0.92rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.data-table th, .data-table td {
  padding: 0.7rem 0.95rem;
  border-bottom: 1px solid var(--border);
  text-align: left; vertical-align: top;
}
.data-table th {
  background: var(--surface-2); color: var(--ink);
  font-weight: 600; font-size: 0.82rem;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.data-table td { color: var(--body); font-family: var(--font-mono); font-size: 0.86rem; }
.data-table td:first-child { font-family: var(--font-sans); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--surface-2); }

/* ===== TOC sidebar ===== */
.with-toc {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 4rem;
  align-items: start;
}
@media (max-width: 1000px) { .with-toc { grid-template-columns: 1fr; gap: 2rem; } }

.toc {
  position: sticky; top: 96px;
  font-family: var(--font-sans); font-size: 0.85rem;
}
.toc-title {
  font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--muted); margin-bottom: 0.75rem; font-weight: 600;
}
.toc ol { list-style: none; padding: 0; margin: 0; }
.toc li { margin: 0; padding: 0.35rem 0; line-height: 1.4; }
.toc a {
  color: var(--muted); display: block;
  border-left: 2px solid transparent;
  padding-left: 0.65rem; margin-left: -0.65rem;
}
.toc a:hover, .toc a.active {
  color: var(--ink); text-decoration: none;
  border-left-color: var(--accent);
}

@media (max-width: 1000px) { .toc { display: none; } }

/* ===== Reading progress ===== */
.read-progress {
  position: fixed; top: 0; left: 0;
  height: 3px; width: 0%;
  background: var(--accent);
  z-index: 50; transition: width 0.05s linear;
}

/* ===== Floating action bar ===== */
.action-bar {
  position: fixed; right: 1.5rem; bottom: 1.5rem;
  display: flex; flex-direction: column; gap: 0.5rem;
  z-index: 40;
}
.action-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: var(--shadow);
  transition: color 0.15s, border-color 0.15s, transform 0.1s;
  text-decoration: none;
}
.action-btn:hover {
  color: var(--ink); border-color: var(--ink);
  transform: scale(1.05); text-decoration: none;
}
.action-btn svg { width: 18px; height: 18px; }
@media (max-width: 720px) {
  .action-bar { right: 0.75rem; bottom: 0.75rem; }
  .action-btn { width: 40px; height: 40px; }
}

/* ===== Cite widget ===== */
.cite-widget {
  margin: 2.5rem 0; padding: 1.25rem 1.5rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-family: var(--font-sans);
}
.cite-widget h4 {
  margin: 0 0 0.6rem; font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted);
  font-weight: 600;
}
.cite-tabs { display: flex; gap: 0.4rem; margin-bottom: 0.8rem; }
.cite-tab {
  font-size: 0.82rem; padding: 0.3rem 0.7rem;
  background: transparent; border: 1px solid var(--border);
  border-radius: var(--radius); cursor: pointer; color: var(--muted);
  font-family: var(--font-sans);
}
.cite-tab.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.cite-pre {
  background: var(--surface); padding: 0.85rem 1rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-family: var(--font-mono); font-size: 0.82rem;
  white-space: pre-wrap; word-break: break-word;
  color: var(--body); margin: 0; max-height: 200px; overflow: auto;
}
.cite-copy {
  margin-top: 0.6rem; font-size: 0.82rem;
  font-family: var(--font-sans); color: var(--accent);
  background: none; border: none; cursor: pointer; padding: 0;
}

/* ===== Forms ===== */
.form-grid { display: grid; gap: 1rem; max-width: 640px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field label {
  font-family: var(--font-sans); font-size: 0.85rem; font-weight: 500;
  color: var(--ink);
}
.field .hint {
  font-family: var(--font-sans); font-size: 0.78rem; color: var(--muted);
}
.field input, .field select, .field textarea {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 0.7rem 0.85rem;
  color: var(--body); font-family: var(--font-sans); font-size: 0.95rem;
  transition: border-color 0.15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-faint);
}
.form-error {
  padding: 0.85rem 1rem; background: rgba(159, 18, 57, 0.08);
  border: 1px solid rgba(159, 18, 57, 0.3);
  color: var(--critical); border-radius: var(--radius);
  font-size: 0.92rem; font-family: var(--font-sans);
}
.form-success {
  padding: 1.5rem 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--positive);
  border-radius: var(--radius-lg);
  font-family: var(--font-sans);
}
.form-success h2 { margin-top: 0; }
.form-step {
  display: flex; align-items: center; gap: 0.4rem;
  font-family: var(--font-sans); font-size: 0.82rem; color: var(--muted);
  margin-bottom: 1rem;
}
.form-step .dot {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.74rem; font-weight: 600; color: var(--muted);
}
.form-step .dot.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.form-step .dot.done { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ===== Newsletter inline widget ===== */
.newsletter-inline {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 2.5rem 0;
}
.newsletter-inline h3 { margin: 0 0 0.4rem; font-size: 1.15rem; }
.newsletter-inline p { color: var(--muted); margin-bottom: 1rem; font-family: var(--font-sans); font-size: 0.92rem; }
.newsletter-inline form {
  display: grid; grid-template-columns: 1fr auto; gap: 0.5rem;
}
@media (max-width: 600px) { .newsletter-inline form { grid-template-columns: 1fr; } }
.newsletter-inline input[type="email"] {
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 0.65rem 0.85rem;
  font-family: var(--font-sans); font-size: 0.95rem;
  color: var(--body);
}
.newsletter-inline input[type="email"]:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-faint);
}
.newsletter-inline .micro {
  font-family: var(--font-sans); font-size: 0.78rem; color: var(--faint);
  margin-top: 0.6rem;
}

/* ===== Footer ===== */
.footer {
  padding: 4rem 0 2.5rem;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  font-family: var(--font-sans);
}
.footer-inner {
  max-width: var(--container-wide); margin: 0 auto; padding: 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(4, minmax(0, 1fr));
  gap: 2rem;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-brand {
  font-family: var(--font-serif); font-weight: 600; font-size: 1.4rem;
  color: var(--ink); display: block; margin-bottom: 0.6rem;
}
.footer-tagline { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.25rem; }
.footer-col h4 {
  font-family: var(--font-sans); font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--muted); font-weight: 600; margin: 0 0 0.85rem;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a { color: var(--body); font-size: 0.92rem; }
.footer-col a:hover { color: var(--accent); text-decoration: none; }

.footer-meta {
  margin-top: 3rem; padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  font-size: 0.85rem; color: var(--faint);
}
.footer-social { display: flex; gap: 0.85rem; }
.footer-social a { color: var(--muted); }
.footer-social a:hover { color: var(--accent); }

/* ===== Tags ===== */
.tag-chip {
  display: inline-block;
  font-family: var(--font-mono); font-size: 0.72rem;
  padding: 0.22rem 0.6rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--muted);
  text-transform: lowercase; letter-spacing: 0.02em;
  background: var(--surface);
  text-decoration: none;
  margin-right: 0.4rem; margin-bottom: 0.4rem;
}
a.tag-chip:hover {
  color: var(--ink); border-color: var(--ink); text-decoration: none;
}
.tag-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* ===== Insight (brief) page header ===== */
.insight-header {
  padding: 5rem 0 3rem; border-bottom: 1px solid var(--border);
  background:
    radial-gradient(600px 300px at 18% 0%, var(--accent-faint), transparent 70%),
    var(--bg);
}
.insight-meta {
  display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap;
  margin-bottom: 0.85rem;
  font-family: var(--font-sans); font-size: 0.85rem; color: var(--muted);
}
.insight-meta .practice { color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.78rem; }
.insight-header h1 { max-width: 28ch; }
.insight-header .deck {
  font-size: 1.3rem; color: var(--ink); font-style: italic;
  font-family: var(--font-serif); max-width: 60ch; margin: 0.5rem 0 0;
}

/* ===== Engage CTA block ===== */
.engage-cta {
  margin: 3rem 0; padding: 2rem 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-lg);
  font-family: var(--font-sans);
}
.engage-cta h3 { margin: 0 0 0.5rem; }
.engage-cta p { color: var(--muted); margin-bottom: 1rem; font-family: var(--font-sans); font-size: 0.95rem; }

/* ===== Pipeline kanban ===== */
.kanban {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  font-family: var(--font-sans);
}
.kanban-col {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
}
.kanban-col h3 {
  font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.12em;
  margin: 0 0 0.85rem; color: var(--muted);
  display: flex; justify-content: space-between; font-weight: 600;
}
.kanban-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.6rem;
  font-size: 0.88rem;
  color: var(--body);
  text-decoration: none;
}
.kanban-card:hover { border-color: var(--ink); text-decoration: none; }
.kanban-card .name { font-weight: 600; color: var(--ink); display: block; margin-bottom: 0.2rem; }
.kanban-card .meta { color: var(--faint); font-size: 0.78rem; }

/* ===== Admin tables ===== */
.admin-table {
  width: 100%; border-collapse: collapse;
  font-family: var(--font-sans); font-size: 0.88rem;
}
.admin-table th, .admin-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: left; vertical-align: top; color: var(--body);
}
.admin-table th {
  color: var(--ink); background: var(--surface-2);
  font-weight: 600; font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.08em;
}

.metric-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.metric { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem 1.4rem; font-family: var(--font-sans); }
.metric .label { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600; }
.metric .value { font-family: var(--font-serif); font-size: 2rem; font-weight: 500; color: var(--ink); margin-top: 0.4rem; line-height: 1.05; }
.metric .delta { font-size: 0.85rem; color: var(--faint); margin-top: 0.25rem; }

/* ===== Sidebar block ===== */
.sidebar {
  display: flex; flex-direction: column; gap: 1rem;
  position: sticky; top: 96px; align-self: start;
}
.side-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
  font-family: var(--font-sans);
}
.side-block h4 {
  margin: 0 0 0.5rem; font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--muted); font-weight: 600;
}
.side-block p { margin-bottom: 0; font-family: var(--font-sans); font-size: 0.92rem; }
.side-block ul { list-style: none; padding: 0; margin: 0; font-size: 0.9rem; }
.side-block li { padding: 0.35rem 0; border-bottom: 1px solid var(--border); }
.side-block li:last-child { border-bottom: none; }

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 3rem;
}
@media (max-width: 1000px) { .detail-grid { grid-template-columns: 1fr; } }

/* ===== Search results ===== */
.search-result {
  padding: 1.25rem 0; border-bottom: 1px solid var(--border);
}
.search-result:last-child { border-bottom: none; }
.search-result h3 { margin: 0 0 0.3rem; font-size: 1.15rem; }
.search-result h3 a { color: var(--ink); text-decoration: none; }
.search-result h3 a:hover { color: var(--accent); }
.search-result .kind {
  font-family: var(--font-sans); font-size: 0.78rem;
  color: var(--accent); text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600;
}
.search-result .snippet { color: var(--muted); font-size: 0.95rem; font-family: var(--font-serif); }
.search-result mark {
  background: var(--accent-faint); color: var(--ink);
  padding: 0 0.15rem; border-radius: 2px;
}

/* ===== List rows (used for insights, news, events) ===== */
.list-row {
  display: block;
  padding: 1.6rem 0;
  border-top: 1px solid var(--border);
  color: var(--body);
  text-decoration: none;
}
.list-row:hover { color: var(--body); text-decoration: none; }
.list-row:hover h3 { color: var(--accent); }
.list-row:last-child { border-bottom: 1px solid var(--border); }
.list-row .row-meta {
  display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;
  font-family: var(--font-sans); font-size: 0.82rem; color: var(--muted);
  margin-bottom: 0.45rem;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.list-row .row-meta .kind { color: var(--accent); font-weight: 600; }
.list-row h3 { margin: 0 0 0.5rem; font-size: 1.4rem; transition: color 0.15s; }
.list-row .row-deck {
  color: var(--ink); font-style: italic; font-family: var(--font-serif);
  font-size: 1.08rem; margin-bottom: 0.55rem;
}
.list-row .row-summary { color: var(--muted); font-size: 0.95rem; max-width: 72ch; }

/* ===== Megamenu ===== */
.has-mega { position: relative; }
.megamenu {
  position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: 580px; max-width: 92vw;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  padding: 1.5rem;
  display: none;
  z-index: 40;
}
.megamenu.open { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.megamenu a {
  display: block; padding: 0.55rem 0.65rem;
  color: var(--body); border-radius: var(--radius);
  font-size: 0.92rem;
}
.megamenu a:hover { background: var(--surface-2); color: var(--accent); text-decoration: none; }
.megamenu .mega-title {
  font-family: var(--font-sans); font-size: 0.74rem;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--muted); padding: 0.4rem 0.65rem; font-weight: 600;
}

/* === Wave 13 polish === */

/* Hero counters: large display numerals in accent, small caps labels in muted */
.hero-counters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
  max-width: 720px;
}
@media (max-width: 640px) {
  .hero-counters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2.75rem;
    padding-top: 1.75rem;
  }
}
.hero-counter { display: flex; flex-direction: column; gap: 0.5rem; }
.hero-counter-num {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 4.4vw, 3.4rem);
  font-weight: 500;
  line-height: 1;
  color: var(--accent);
  letter-spacing: -0.02em;
  font-variant-numeric: lining-nums tabular-nums;
}
.hero-counter-label {
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  line-height: 1.2;
}

/* Insight meta: monospace read-time badge */
.insight-meta .read-time {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.18rem 0.55rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  letter-spacing: 0.02em;
  text-transform: none;
}
.insight-meta .published {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

/* Insight lede: heavier, slightly differentiated body color */
.article p.lede {
  font-size: 1.36rem;
  line-height: 1.5;
  color: var(--ink);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.005em;
  margin-bottom: 1.8rem;
  max-width: 62ch;
}

/* Hide floating action bar on small screens (under 700px) */
@media (max-width: 700px) {
  .action-bar { display: none; }
}

/* Footer: tagline wrap and meta byline */
.footer-tagline { overflow-wrap: break-word; word-break: break-word; }
.footer-tagline a { color: var(--body); border-bottom: 1px solid var(--border-strong); }
.footer-tagline a:hover { color: var(--accent); border-bottom-color: var(--accent); text-decoration: none; }
@media (max-width: 540px) {
  .footer-tagline { font-size: 0.85rem; line-height: 1.55; }
}
.footer-meta-byline {
  margin: 0.85rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* Nav active link: smoother transition with confirmed accent underline */
.nav-links a {
  position: relative;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.nav-links a.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}
@media (min-width: 1001px) {
  .nav-links a.active::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    height: 2px;
    background: var(--accent);
    transform: scaleX(1);
    transform-origin: center;
    transition: transform 0.18s ease;
  }
}

/* ===== Print: leaner palette for PDF ===== */
@media print {
  .nav, .footer, .action-bar, .read-progress, .toc, .engage-cta, .newsletter-inline, .nav-search-form { display: none !important; }
  body { background: #fff; color: #111; font-size: 11pt; }
  .insight-header { background: none; padding: 0 0 1rem; border-bottom: 1px solid #999; }
  a { color: #111; text-decoration: underline; }
  .data-table { border-color: #999; }
  .article { font-size: 10.5pt; }
  h1, h2, h3 { color: #111; }
  .page-break { page-break-before: always; }
}

/* tools: layout for /tools, /tools/tariff-impact, /tools/feoc-check */
.tools-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.1fr);
  gap: 3rem;
  align-items: start;
}
@media (max-width: 1000px) { .tools-layout { grid-template-columns: 1fr; gap: 2rem; } }

/* tools: form column (sticky on wide viewports) */
.tools-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.75rem;
  display: flex; flex-direction: column; gap: 1rem;
  font-family: var(--font-sans);
  position: sticky; top: 96px; align-self: start;
}
@media (max-width: 1000px) { .tools-form { position: static; } }
.tools-form h2 { font-size: 1.1rem; margin: 0 0 0.4rem; font-family: var(--font-sans); text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); font-weight: 600; }
.tools-form input[type="number"], .tools-form input[type="range"] {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 0.55rem 0.75rem;
  color: var(--body); font-family: var(--font-mono); font-size: 0.95rem;
  width: 100%;
}
.tools-form input[type="range"] { padding: 0.35rem 0; }
.tools-form input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-faint);
}

/* tools: output column */
.tools-output { font-family: var(--font-sans); }
.tools-output h2 { font-size: 1.1rem; margin: 0 0 1rem; font-family: var(--font-sans); text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); font-weight: 600; }
.tools-metrics { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.tools-metrics .metric .value { font-size: 1.5rem; }

.tools-formulas, .tools-method {
  margin-top: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.6rem;
}
.tools-formulas h3, .tools-method h3 {
  margin: 0 0 0.7rem; font-size: 0.82rem;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--muted); font-weight: 600; font-family: var(--font-sans);
}
.tools-formulas ol, .tools-formulas ul {
  padding-left: 1.4rem; margin: 0; font-size: 0.84rem; color: var(--body);
}
.tools-formulas li { margin-bottom: 0.3rem; }
.tools-method p { font-family: var(--font-sans); font-size: 0.93rem; color: var(--body); }

/* tools: FEOC question fieldsets */
.feoc-q {
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin: 0;
  transition: border-color 0.15s, background 0.15s;
}
.feoc-q legend {
  font-family: var(--font-sans); font-size: 0.95rem;
  font-weight: 500; color: var(--ink);
  padding: 0 0.4rem;
}
.feoc-q .feoc-num {
  display: inline-block; margin-right: 0.35rem;
  font-family: var(--font-mono); color: var(--accent); font-weight: 600;
}
.feoc-choices {
  display: flex; flex-wrap: wrap; gap: 1.25rem;
  margin-top: 0.6rem;
  font-family: var(--font-sans); font-size: 0.92rem;
}
.feoc-choices label {
  display: inline-flex; align-items: center; gap: 0.4rem;
  cursor: pointer; color: var(--body);
}
.feoc-choices input[type="radio"] { accent-color: var(--accent); }
.feoc-q.hit-yes { border-left-color: var(--critical); background: rgba(159, 18, 57, 0.04); }
.feoc-q.hit-unknown { border-left-color: var(--accent); background: var(--accent-faint); }

/* tools: FEOC verdict block */
.feoc-verdict {
  padding: 1.5rem 1.75rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  border-left-width: 4px;
  background: var(--surface);
  font-family: var(--font-sans);
}
.feoc-verdict-tag {
  font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--muted); font-weight: 600; margin-bottom: 0.5rem;
}
.feoc-verdict-headline {
  font-family: var(--font-serif); font-size: 1.4rem; line-height: 1.25;
  color: var(--ink); font-weight: 500; margin-bottom: 0.6rem;
}
.feoc-verdict-detail { font-size: 0.95rem; color: var(--body); margin: 0; }
.feoc-verdict.feoc-clean { border-left-color: var(--positive); }
.feoc-verdict.feoc-warn { border-left-color: var(--accent); }
.feoc-verdict.feoc-fail { border-left-color: var(--critical); }


/* watchlist */
.watchlist-cats {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-bottom: 2rem; padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.watchlist-cat {
  display: inline-flex; align-items: center;
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem; font-weight: 500;
  color: var(--body); background: var(--surface);
  border: 1px solid var(--border); border-radius: 999px;
  text-decoration: none; transition: all 0.15s ease;
}
.watchlist-cat:hover { background: var(--accent-faint); color: var(--ink); border-color: var(--accent); }
.watchlist-cat.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.watchlist-list { display: flex; flex-direction: column; gap: 0; }
.watchlist-event {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}
.watchlist-event:last-child { border-bottom: none; }
.watchlist-event-when {
  display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center;
  font-size: 0.78rem; color: var(--muted);
  margin-bottom: 0.55rem;
}
.watchlist-date {
  font-family: var(--font-mono); font-weight: 600;
  color: var(--ink); font-size: 0.84rem;
  letter-spacing: 0.02em;
}
.watchlist-cat-tag {
  text-transform: uppercase; letter-spacing: 0.12em;
  font-size: 0.68rem; font-weight: 600;
  color: var(--accent);
  padding: 0.18rem 0.55rem;
  background: var(--accent-faint);
  border-radius: 4px;
}
.watchlist-region {
  font-size: 0.78rem; color: var(--muted);
}
.watchlist-event-title {
  font-family: var(--font-serif); font-size: 1.25rem; line-height: 1.3;
  margin: 0.2rem 0 0.5rem;
}
.watchlist-event-title a { color: var(--ink); text-decoration: none; }
.watchlist-event-title a:hover { color: var(--accent); }
.watchlist-event-desc {
  font-size: 0.95rem; color: var(--body); line-height: 1.55;
  margin: 0 0 0.7rem; max-width: 75ch;
}
.watchlist-event-watching {
  font-size: 0.9rem; color: var(--body); line-height: 1.5;
  margin: 0 0 0.6rem; max-width: 75ch;
  padding: 0.6rem 0.85rem;
  background: var(--surface);
  border-left: 2px solid var(--accent);
  border-radius: 0 4px 4px 0;
}
.watchlist-watching-tag {
  font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--accent); margin-right: 0.4rem;
}
.watchlist-event-related {
  font-size: 0.82rem; color: var(--muted);
  line-height: 1.5;
}
.watchlist-related-tag {
  font-weight: 600; color: var(--ink);
  margin-right: 0.3rem;
}
.watchlist-event-related a {
  color: var(--accent); text-decoration: none;
}
.watchlist-event-related a:hover { text-decoration: underline; }
.watchlist-footer-note {
  margin-top: 2.5rem; padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.84rem; color: var(--muted);
  font-style: italic; max-width: 70ch;
}

/* ===== Home watchlist (hoisted, richer card) ===== */
.home-watchlist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.1rem;
  margin-top: 1.25rem;
}
.watch-event {
  padding: 1.1rem 1.25rem 1.05rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
  display: flex; flex-direction: column;
  gap: 0.55rem;
}
.watch-when {
  display: flex; flex-wrap: wrap; gap: 0.5rem 0.7rem; align-items: center;
  font-size: 0.74rem;
}
.watch-date {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--ink);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.watch-cat {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--accent);
}
.watch-region {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
}
.watch-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.3;
  color: var(--ink);
  font-weight: 500;
  margin: 0;
}
.watch-desc {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.5;
}
.watch-for {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--body);
  line-height: 1.5;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border);
}
.watch-for-label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--accent);
  margin-right: 0.35rem;
}
.watch-source { margin: 0; }
.watch-source a {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.watch-source a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ===== Hero live tariff widget ===== */
.hero-live {
  margin-top: 3.5rem;
  padding: 1.8rem 1.9rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 0 var(--surface-2), 0 4px 24px rgba(0, 0, 0, 0.04);
}
[data-theme="dark"] .hero-live { box-shadow: 0 1px 0 var(--surface-2), 0 4px 24px rgba(0, 0, 0, 0.35); }

.hero-live-head { margin-bottom: 1.2rem; }
.hero-live-headline {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  margin: 0.35rem 0 0.5rem;
  color: var(--ink);
  line-height: 1.2;
  font-weight: 500;
}
.hero-live-sub {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: var(--muted);
  max-width: 70ch;
  line-height: 1.55;
}

.hero-live-grid {
  display: grid;
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
  gap: 1.8rem;
  align-items: start;
}
@media (max-width: 760px) { .hero-live-grid { grid-template-columns: 1fr; } }

.hero-live-controls { display: flex; flex-direction: column; gap: 0.9rem; }
.hero-live-label {
  display: flex; align-items: baseline; gap: 0.35rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.hero-live-label .mono {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  margin-left: 0.4rem;
  font-variant-numeric: tabular-nums;
}
.hero-live-label .hero-live-pct {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: var(--muted);
  letter-spacing: 0;
  text-transform: none;
}

#hl-tariff {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  height: 24px;
  margin: 0;
}
#hl-tariff:focus { outline: none; }
#hl-tariff::-webkit-slider-runnable-track {
  background: var(--surface-2);
  border: 1px solid var(--border);
  height: 4px;
  border-radius: 999px;
}
#hl-tariff::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px; height: 18px;
  background: var(--accent);
  border: 2px solid var(--surface);
  border-radius: 50%;
  margin-top: -8px;
  cursor: pointer;
  box-shadow: 0 0 0 1px var(--accent);
}
#hl-tariff::-moz-range-track {
  background: var(--surface-2); border: 1px solid var(--border);
  height: 4px; border-radius: 999px;
}
#hl-tariff::-moz-range-thumb {
  width: 16px; height: 16px;
  background: var(--accent); border: 2px solid var(--surface);
  border-radius: 50%; cursor: pointer;
  box-shadow: 0 0 0 1px var(--accent);
}
#hl-tariff:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--accent); outline-offset: 2px; }

.hero-live-presets { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.hero-live-preset {
  font-family: var(--font-sans);
  font-size: 0.76rem;
  padding: 0.32rem 0.7rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.hero-live-preset:hover {
  background: var(--accent-faint);
  border-color: var(--accent);
  color: var(--accent);
}
.hero-live-tip {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--faint);
  line-height: 1.5;
}
.hero-live-tip a { color: var(--muted); border-bottom: 1px solid var(--border); }
.hero-live-tip a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.hero-live-chart {
  margin: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.7rem 0.8rem 0.4rem;
}
.hero-live-chart svg { width: 100%; height: auto; display: block; }
.hero-live-caption {
  font-family: var(--font-sans);
  font-size: 0.74rem;
  color: var(--faint);
  margin-top: 0.4rem;
  text-align: center;
}

.hero-live-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.85rem 1.4rem;
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
}
.hero-live-metric { display: flex; flex-direction: column; gap: 0.25rem; }
.hero-live-num {
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 2.2vw, 1.85rem);
  color: var(--ink);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}
.hero-live-mlabel {
  font-family: var(--font-sans);
  font-size: 0.74rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.hero-live-foot {
  margin: 1rem 0 0;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--faint);
  line-height: 1.55;
}
.hero-live-foot a { color: var(--muted); border-bottom: 1px solid var(--border); }
.hero-live-foot a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* SVG internals for the hero curve */
.hl-grid { stroke: var(--border); stroke-width: 1; }
.hl-curve {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hl-area { fill: var(--accent); opacity: 0.08; }
.hl-marker { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.hl-vline {
  stroke: var(--accent);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  opacity: 0.45;
}
.hl-axlab {
  font-family: var(--font-sans);
  font-size: 11px;
  fill: var(--muted);
}
.hl-axtitle {
  font-size: 10px;
  fill: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* ===== Insights index re-IA: meta line, browse strip, source badge ===== */
.insights-meta {
  margin: 1.4rem 0 0;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--muted);
}
.insights-meta .mono {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.browse-strip { margin-bottom: 2rem; }
.browse-strip:last-of-type { margin-bottom: 0; }
.browse-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.7rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.browse-all {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}
.browse-all:hover { color: var(--accent); }

.chip-rail {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.chip-rail-item {
  display: inline-flex; align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--ink);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.chip-rail-item:hover {
  background: var(--accent-faint);
  border-color: var(--accent);
  color: var(--accent);
}
.chip-rail-label { font-weight: 500; }
.chip-rail-count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.chip-rail-item:hover .chip-rail-count { color: var(--accent); }

.row-source-count {
  display: inline-flex;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--accent);
  background: var(--accent-faint);
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.filter-bar {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.45rem;
  margin: 0 0 1.6rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--muted);
}
.filter-clear {
  margin-left: 0.4rem;
  font-size: 0.82rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.filter-clear:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ===== Principal masthead on home ===== */
.principal-masthead {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
  padding: 1.5rem 0;
}
@media (max-width: 880px) { .principal-masthead { grid-template-columns: 1fr; gap: 1.6rem; } }
.principal-masthead-text { display: flex; flex-direction: column; gap: 0.6rem; }
.principal-masthead-name {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin: 0.2rem 0 0;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.15;
}
.principal-masthead-bio {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.02rem;
  color: var(--body);
  line-height: 1.55;
  max-width: 56ch;
}
.principal-masthead-cta { margin: 0.4rem 0 0; }

.principal-masthead-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem 1.8rem;
  padding: 1.4rem 1.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.principal-stat { display: flex; flex-direction: column; gap: 0.3rem; }
.principal-stat-num {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 2.6vw, 2.2rem);
  color: var(--ink);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}
.principal-stat-label {
  font-family: var(--font-sans);
  font-size: 0.74rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
