/* =========================================================================
   5GasDiagnostic.com — Design System
   Tech / developer vibe. Dark-first with optional light mode.
   ========================================================================= */

:root {
  /* Type */
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* Palette — dark (default) */
  --bg:        #0b0d10;
  --bg-elev:  #111418;
  --bg-elev-2: #171b21;
  --border:   #232a33;
  --border-strong: #323a45;
  --text:     #e6ebf2;
  --text-dim: #a4acb8;
  --text-muted: #6b7482;

  --accent:       oklch(74% 0.15 152);        /* lambda-green */
  --accent-dim:   oklch(74% 0.15 152 / 0.14);
  --accent-text:  oklch(88% 0.14 152);
  --warn:         oklch(78% 0.14 75);         /* amber */
  --warn-dim:     oklch(78% 0.14 75 / 0.14);
  --danger:       oklch(68% 0.18 25);         /* red */
  --danger-dim:   oklch(68% 0.18 25 / 0.14);
  --info:         oklch(72% 0.13 235);        /* blue for links */
  --info-dim:     oklch(72% 0.13 235 / 0.14);

  /* Layout */
  --maxw: 1200px;
  --maxw-narrow: 860px;
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow: 0 8px 24px -12px rgba(0,0,0,0.6), 0 2px 6px rgba(0,0,0,0.3);

  --grid-line: rgba(255,255,255,0.035);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: -1px -1px;
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin-top: 2em; }
h3 { font-size: 1.2rem; margin-top: 1.6em; }
h4 { font-size: 1rem; }
p { text-wrap: pretty; }
code, kbd, samp {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  padding: 0.1em 0.4em;
  border-radius: var(--radius-sm);
}

/* ---------- Containers ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
.container-narrow { max-width: var(--maxw-narrow); margin: 0 auto; padding: 0 1.25rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,13,16,0.85);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 1.5rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.65rem;
  font-family: var(--font-mono);
  font-weight: 600; font-size: 0.95rem;
  color: var(--text); text-decoration: none;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px; flex: 0 0 32px;
  display: grid; place-items: center;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02), 0 0 0 0 var(--accent-dim);
  transition: box-shadow 0.3s;
}
.brand:hover .brand-mark { box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02), 0 0 0 4px var(--accent-dim); }
.brand-mark svg { width: 20px; height: 20px; }
.brand-text small {
  display: block; font-size: 0.7rem; color: var(--text-muted);
  letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500;
  margin-top: -2px;
}

.main-nav { display: flex; align-items: center; gap: 0.25rem; }
.main-nav a {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.86rem;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}
.main-nav a:hover { color: var(--text); background: var(--bg-elev); text-decoration: none; }
.main-nav a.active { color: var(--accent-text); background: var(--accent-dim); }

.menu-toggle {
  display: none;
  background: transparent; border: 1px solid var(--border);
  color: var(--text);
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.2rem;
  align-items: center; justify-content: center;
}
.menu-toggle:hover { background: var(--bg-elev); }

@media (max-width: 820px) {
  .menu-toggle { display: inline-flex; }
  .main-nav {
    position: absolute; left: 0; right: 0; top: 64px;
    flex-direction: column; align-items: stretch;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1.25rem 1rem;
    gap: 0.1rem;
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 0.75rem 0.5rem; }
}

/* ---------- Hero / page header ---------- */
.page-title {
  padding: 4rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.page-title::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(1000px 400px at 50% 0%, var(--accent-dim), transparent 60%);
  pointer-events: none;
}
.page-title .container { position: relative; }
.page-title h1 { margin: 0.5rem 0; }
.page-title p { color: var(--text-dim); font-size: 1.1rem; max-width: 68ch; margin: 0; }
.page-title .back-link {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-family: var(--font-mono); font-size: 0.82rem;
  color: var(--text-muted); text-decoration: none;
  margin-bottom: 0.75rem;
}
.page-title .back-link:hover { color: var(--accent-text); text-decoration: none; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono); font-size: 0.75rem;
  color: var(--accent-text);
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--accent-dim);
  background: var(--accent-dim);
  border-radius: 999px;
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

/* ---------- Layout: content + sidebar ---------- */
.content-area {
  display: grid;
  grid-template-columns: minmax(0,1fr) 320px;
  gap: 2.5rem;
  padding: 2.5rem 0 4rem;
}
@media (max-width: 980px) {
  .content-area { grid-template-columns: 1fr; gap: 2rem; }
  .sidebar { order: 2; }
}

.main-content { min-width: 0; }
.sidebar { display: flex; flex-direction: column; gap: 1.25rem; }

/* ---------- Cards / panels ---------- */
.panel {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
}
.panel.flush { padding: 0; }
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-mono); font-size: 0.75rem;
  color: var(--text-muted); letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.75rem 1rem;
  border-bottom: 1px dashed var(--border);
  background: var(--bg-elev-2);
}
.panel-head .dots { display: inline-flex; gap: 6px; }
.panel-head .dots i {
  width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong);
  display: inline-block;
}
.panel-head .dots i.on { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.panel-body { padding: 1.5rem; }
.panel h2:first-child, .panel h3:first-child { margin-top: 0; }

.sidebar-widget {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.sidebar-widget h3 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 0.85rem;
  font-weight: 500;
}
.sidebar-widget ul { margin: 0; padding: 0; list-style: none; }
.sidebar-widget li { padding: 0.45rem 0; border-bottom: 1px dashed var(--border); }
.sidebar-widget li:last-child { border-bottom: 0; }
.sidebar-widget li a { color: var(--text-dim); font-size: 0.92rem; }
.sidebar-widget li a:hover { color: var(--accent-text); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--font-mono); font-size: 0.9rem; font-weight: 500;
  padding: 0.75rem 1.1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.08s, background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--accent);
  color: #07140c;
  border-color: var(--accent);
}
.btn-primary:hover { background: oklch(80% 0.15 152); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: var(--bg-elev); border-color: var(--accent); color: var(--accent-text); }
.btn-block { width: 100%; }

/* ---------- Hero (homepage) ---------- */
.hero {
  position: relative;
  padding: 5rem 0 4rem;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 70%;
  background:
    radial-gradient(600px 300px at 20% 40%, oklch(74% 0.15 152 / 0.18), transparent 70%),
    radial-gradient(500px 260px at 80% 30%, oklch(72% 0.13 235 / 0.12), transparent 70%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: center;
}
@media (max-width: 900px) { .hero-inner { grid-template-columns: 1fr; } }
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  margin: 1rem 0;
}
.hero h1 .accent { color: var(--accent-text); }
.hero p.lede {
  font-size: 1.2rem; color: var(--text-dim); max-width: 52ch;
  margin: 0 0 2rem;
}
.hero-cta { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* HUD panel on hero right */
.hud {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hud-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev-2);
  font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--text-muted); letter-spacing: 0.14em; text-transform: uppercase;
}
.hud-head .dots { display: inline-flex; gap: 5px; }
.hud-head .dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.hud-head .dots i.on { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.hud-body { padding: 1.25rem; display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.gauge {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
}
.gauge label {
  font-family: var(--font-mono); font-size: 0.7rem;
  color: var(--text-muted); letter-spacing: 0.14em; text-transform: uppercase;
}
.gauge .val {
  display: flex; align-items: baseline; gap: 0.25rem;
  font-family: var(--font-mono); font-size: 1.6rem; font-weight: 600;
  color: var(--text);
  margin-top: 0.15rem;
}
.gauge .val small {
  font-size: 0.75rem; color: var(--text-muted); font-weight: 400;
}
.gauge .bar {
  height: 4px; background: var(--border); border-radius: 2px; margin-top: 0.7rem;
  overflow: hidden; position: relative;
}
.gauge .bar i { position: absolute; top: 0; bottom: 0; left: 0; background: var(--accent); }
.gauge.warn .bar i { background: var(--warn); }
.gauge.danger .bar i { background: var(--danger); }
.hud-foot {
  padding: 0.7rem 1.25rem;
  border-top: 1px dashed var(--border);
  font-family: var(--font-mono); font-size: 0.78rem;
  color: var(--text-dim);
  background: var(--bg-elev-2);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.hud-foot .lambda { color: var(--accent-text); }

/* ---------- Feature grid ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.feature {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  overflow: hidden;
}
.feature::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--accent-dim), transparent 50%);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}
.feature:hover::before { opacity: 1; }
.feature .tag {
  display: inline-block; font-family: var(--font-mono); font-size: 0.7rem;
  color: var(--text-muted); letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.feature h3 { margin: 0.15rem 0 0.5rem; font-size: 1.15rem; }
.feature p { color: var(--text-dim); margin: 0 0 1rem; font-size: 0.95rem; }
.feature .link {
  font-family: var(--font-mono); font-size: 0.85rem;
  color: var(--accent-text);
}
.feature .link:hover { text-decoration: underline; }

/* ---------- Blog grid ---------- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}
.post-card {
  display: flex; flex-direction: column;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color 0.15s, transform 0.15s;
  text-decoration: none;
  color: inherit;
  min-height: 200px;
}
.post-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  text-decoration: none;
}
.post-card .meta {
  font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--text-muted); letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: 0.75rem;
  display: flex; gap: 0.75rem; flex-wrap: wrap;
}
.post-card .meta .cat { color: var(--accent-text); }
.post-card h3 { font-size: 1.1rem; margin: 0 0 0.5rem; letter-spacing: -0.01em; }
.post-card p { color: var(--text-dim); font-size: 0.92rem; margin: 0 0 auto; }
.post-card .read-more {
  font-family: var(--font-mono); font-size: 0.82rem;
  color: var(--accent-text);
  margin-top: 1rem;
}

/* ---------- Article body ---------- */
.article-body {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text);
  max-width: 72ch;
}
.article-body h2 {
  font-size: 1.6rem; margin-top: 2.5em; margin-bottom: 0.5em;
  padding-top: 0.5em;
  border-top: 1px dashed var(--border);
}
.article-body h2:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.article-body h3 {
  font-size: 1.2rem; margin-top: 2em;
  color: var(--accent-text);
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
}
.article-body p { margin: 0 0 1.2em; }
.article-body ul, .article-body ol { padding-left: 1.5em; margin: 0 0 1.5em; }
.article-body li { margin-bottom: 0.5em; }
.article-body li::marker { color: var(--accent); }
.article-body strong { color: var(--text); font-weight: 600; }
.article-body em { color: var(--text-dim); }
.article-body a { color: var(--info); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--info-dim); }
.article-body a:hover { text-decoration-color: var(--info); }

/* Callout */
.callout {
  margin: 2em 0;
  padding: 1.25rem 1.5rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
}
.callout.warn { border-left-color: var(--warn); }
.callout.info { border-left-color: var(--info); }
.callout h4 {
  margin: 0 0 0.35rem;
  font-family: var(--font-mono); font-size: 0.78rem;
  color: var(--accent-text);
  letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 500;
}
.callout.warn h4 { color: var(--warn); }
.callout.info h4 { color: var(--info); }
.callout p:last-child { margin-bottom: 0; }

/* Signature table — for gas readings */
.signature {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem;
  margin: 1.5em 0;
  font-family: var(--font-mono);
}
.sig-cell {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
}
.sig-cell label {
  font-size: 0.7rem; color: var(--text-muted);
  letter-spacing: 0.14em; text-transform: uppercase;
  display: block;
}
.sig-cell .v { font-size: 1.3rem; color: var(--text); font-weight: 600; margin-top: 0.15rem; }
.sig-cell.hi .v { color: var(--warn); }
.sig-cell.lo .v { color: var(--info); }
.sig-cell.bad .v { color: var(--danger); }
.sig-cell.ok .v { color: var(--accent-text); }

/* Article meta header */
.article-meta {
  display: flex; gap: 1rem; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0.5rem 0 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px dashed var(--border);
}
.article-meta .chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  color: var(--text-dim);
}
.article-meta .chip.cat { color: var(--accent-text); }

/* Series nav / prev-next */
.series-nav {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1rem; margin-top: 2rem;
}
.series-nav a {
  display: block;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: var(--text-dim);
  transition: border-color 0.15s, color 0.15s;
}
.series-nav a:hover { border-color: var(--accent); color: var(--text); text-decoration: none; }
.series-nav a small {
  display: block;
  font-family: var(--font-mono); font-size: 0.7rem;
  color: var(--text-muted); letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: 0.25rem;
}
.series-nav a.next { text-align: right; }
@media (max-width: 600px) { .series-nav { grid-template-columns: 1fr; } }

/* ---------- Ad container ---------- */
.ad-container {
  margin: 1.5rem 0;
  padding: 0.5rem;
  background: var(--bg-elev);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
  min-height: 90px;
  display: flex; flex-direction: column; justify-content: center;
}
.ad-label {
  font-family: var(--font-mono); font-size: 0.7rem;
  color: var(--text-muted); letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: 0.35rem;
}
.ad-container ins { display: block; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
  background: var(--bg-elev);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col h4 {
  font-family: var(--font-mono); font-size: 0.75rem;
  color: var(--text-muted); letter-spacing: 0.14em; text-transform: uppercase;
  margin: 0 0 0.85rem; font-weight: 500;
}
.footer-col p { color: var(--text-dim); font-size: 0.9rem; margin: 0; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.45rem; }
.footer-col a { color: var(--text-dim); font-size: 0.9rem; }
.footer-col a:hover { color: var(--accent-text); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.75rem;
  font-family: var(--font-mono); font-size: 0.78rem;
  color: var(--text-muted);
}
.footer-bottom a { color: var(--text-muted); }
.footer-bottom a:hover { color: var(--accent-text); }
.footer-bottom .status {
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.footer-bottom .status::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem;
  max-width: 520px;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
  z-index: 100;
  display: none;
}
.cookie-banner.show { display: block; }
.cookie-banner h4 {
  font-family: var(--font-mono); font-size: 0.78rem;
  color: var(--accent-text);
  letter-spacing: 0.14em; text-transform: uppercase;
  margin: 0 0 0.5rem; font-weight: 500;
}
.cookie-banner p { font-size: 0.9rem; color: var(--text-dim); margin: 0 0 1rem; }
.cookie-banner .actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.cookie-banner .btn { flex: 1; min-width: 120px; }

/* ---------- Utilities ---------- */
.mono { font-family: var(--font-mono); }
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }
.center { text-align: center; }
.divider {
  height: 1px; background: var(--border); border: 0; margin: 2rem 0;
}
.kbd {
  font-family: var(--font-mono); font-size: 0.75rem;
  background: var(--bg-elev-2);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  padding: 0.1em 0.4em;
  border-radius: 4px;
  color: var(--text-dim);
}

/* Sectional dividers */
.section { padding: 4rem 0; border-bottom: 1px solid var(--border); }
.section-head { margin-bottom: 2rem; }
.section-head .eyebrow { margin-bottom: 0.75rem; }
.section-head h2 { margin: 0; }
.section-head p { color: var(--text-dim); max-width: 60ch; margin: 0.75rem 0 0; }

/* Animated scanline on hero */
@keyframes scan {
  0% { transform: translateY(-100%); opacity: 0; }
  50% { opacity: 0.4; }
  100% { transform: translateY(100%); opacity: 0; }
}
.scanline {
  position: absolute; left: 0; right: 0; height: 30%;
  background: linear-gradient(180deg, transparent, var(--accent-dim), transparent);
  pointer-events: none;
  animation: scan 8s ease-in-out infinite;
}

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1rem 0 2.5rem;
}
.contact-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  transition: border-color 0.15s, transform 0.15s;
}
.contact-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.contact-card .icn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 8px;
  background: var(--accent-dim); color: var(--accent-text);
  font-family: var(--font-mono); font-weight: 600; font-size: 1.1rem;
  margin-bottom: 0.85rem;
}
.contact-card h3 { margin: 0 0 0.35rem; font-size: 1.05rem; letter-spacing: -0.01em; }
.contact-card p { color: var(--text-dim); font-size: 0.9rem; margin: 0 0 0.85rem; }
.contact-card .contact-link {
  font-family: var(--font-mono); font-size: 0.88rem;
  color: var(--accent-text);
  word-break: break-all;
}

.contact-form {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-top: 1.5rem;
}
.contact-form h2 { margin-top: 0; }
.contact-form .form-row { margin-bottom: 1rem; }
.contact-form label {
  display: block;
  font-family: var(--font-mono); font-size: 0.75rem;
  color: var(--text-muted); letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: 0.35rem;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.7rem 0.85rem;
  color: var(--text);
  font-family: inherit; font-size: 0.95rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.contact-form textarea { resize: vertical; min-height: 120px; }

/* ---------- Cookie policy table ---------- */
.cookie-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.9rem;
}
.cookie-table th, .cookie-table td {
  text-align: left;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.cookie-table th {
  font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--text-muted); letter-spacing: 0.14em; text-transform: uppercase;
  background: var(--bg-elev);
  font-weight: 500;
}
.cookie-table td code {
  font-family: var(--font-mono); font-size: 0.82rem;
  background: var(--bg-elev);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  color: var(--accent-text);
}

/* ---------- Legal pages ---------- */
.article-body.legal h2 { font-size: 1.25rem; }
.article-body.legal h3 { font-size: 1.05rem; color: var(--text); }
.article-body.legal ul { margin-bottom: 1.2em; }

/* Print */
@media print {
  .site-header, .sidebar, .ad-container, .cookie-banner, .site-footer { display: none !important; }
  body { background: white; color: black; }
  .article-body { max-width: none; }
}
