/* ==========================================================================
   A³L-FEC — Design System
   Scientific / modern / minimal. Deep-navy palette with cyan accent.
   ========================================================================== */

:root {
  /* Palette */
  --bg:            #060b1c;
  --bg-2:          #0a1330;
  --bg-grad-a:     #081026;
  --bg-grad-b:     #0b1740;
  --panel:         rgba(17, 28, 60, 0.55);
  --panel-solid:   #0e1939;
  --panel-2:       rgba(13, 22, 48, 0.85);
  --border:        rgba(120, 150, 220, 0.16);
  --border-strong: rgba(120, 160, 230, 0.32);

  --text:          #e8eefb;
  --text-soft:     #c6d2ec;
  --muted:         #93a4c8;
  --muted-2:       #6f80a6;

  --accent:        #2dd4ee;   /* cyan */
  --accent-2:      #4f8cff;   /* blue */
  --accent-3:      #7c5cff;   /* violet (sparingly) */
  --accent-soft:   rgba(45, 212, 238, 0.12);
  --good:          #34d399;
  --warn:          #fbbf24;
  --bad:           #fb7185;

  --shadow-soft:   0 10px 40px -12px rgba(0, 8, 30, 0.6);
  --shadow-glow:   0 0 0 1px rgba(45,212,238,0.18), 0 18px 60px -20px rgba(45,212,238,0.28);

  --radius:        16px;
  --radius-sm:     10px;
  --radius-lg:     24px;

  --maxw:          1180px;
  --gap:           clamp(1rem, 2.5vw, 2rem);

  --font-head: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

  /* Semantic, theme-switchable tokens (dark defaults) */
  --heading:    #ffffff;
  --nav-bg:     linear-gradient(180deg, rgba(6,11,28,0.92), rgba(6,11,28,0.62));
  --footer-bg:  linear-gradient(180deg, transparent, rgba(8,14,34,0.6));
  --input-bg:   rgba(6,11,28,0.6);
  --overlay-bg: rgba(6,11,28,0.6);
  --hover-bg:   rgba(255,255,255,0.05);
  --grad-glow-a: rgba(45,212,238,0.10);
  --grad-glow-b: rgba(79,140,255,0.12);
}

/* ----------------------------------------------------------- Day / Light theme */
html[data-theme="light"] {
  --bg:            #eef3fb;
  --bg-2:          #e3ebf8;
  --bg-grad-a:     #eef3fb;
  --bg-grad-b:     #dde8fb;
  --panel:         rgba(255, 255, 255, 0.78);
  --panel-solid:   #ffffff;
  --panel-2:       rgba(255, 255, 255, 0.92);
  --border:        rgba(30, 64, 128, 0.14);
  --border-strong: rgba(28, 84, 168, 0.30);

  --text:          #0e1c38;
  --text-soft:     #26354f;
  --muted:         #4c5d79;
  --muted-2:       #6b7c98;

  --accent:        #0e93b3;
  --accent-2:      #2f6df0;
  --accent-3:      #6d4bf0;
  --accent-soft:   rgba(14, 147, 179, 0.10);
  --good:          #0f9d6b;
  --warn:          #b9820a;
  --bad:           #e23b58;

  --shadow-soft:   0 12px 40px -16px rgba(30, 64, 128, 0.28);
  --shadow-glow:   0 0 0 1px rgba(14,147,179,0.18), 0 18px 60px -22px rgba(47,109,240,0.22);

  --heading:    #08152e;
  --nav-bg:     linear-gradient(180deg, rgba(238,243,251,0.95), rgba(238,243,251,0.68));
  --footer-bg:  linear-gradient(180deg, transparent, rgba(219,232,251,0.7));
  --input-bg:   #ffffff;
  --overlay-bg: rgba(255, 255, 255, 0.82);
  --hover-bg:   rgba(20, 50, 110, 0.07);
  --grad-glow-a: rgba(14,147,179,0.10);
  --grad-glow-b: rgba(47,109,240,0.10);
}

html { transition: background-color .3s ease; }
body, .card, .nav, .footer, table.data, .field input, .field textarea, .codeblock { transition: background .3s ease, color .3s ease, border-color .3s ease; }

/* ------------------------------------------------------------------ Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { padding: 0; list-style: none; }

/* Ambient page background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1100px 700px at 78% -8%, var(--grad-glow-a), transparent 60%),
    radial-gradient(900px 700px at 8% 8%, var(--grad-glow-b), transparent 58%),
    linear-gradient(180deg, var(--bg-grad-a), var(--bg) 45%, var(--bg-grad-a));
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(120,150,220,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,150,220,0.045) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 75%);
}

/* ------------------------------------------------------------------ Layout */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2rem); }
.section { padding-block: clamp(3.4rem, 8vw, 6.5rem); }
.section--tight { padding-block: clamp(2.4rem, 5vw, 3.6rem); }

.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.split--rev > :first-child { order: 2; }
@media (max-width: 880px) { .split, .split--rev { grid-template-columns: 1fr; } .split--rev > :first-child { order: 0; } }

/* ------------------------------------------------------------- Typography */
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.12; letter-spacing: -0.015em; color: var(--heading); }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.7rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); }
h4 { font-size: 1.05rem; }
p { color: var(--text-soft); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--muted); max-width: 65ch; }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
strong { color: var(--heading); font-weight: 600; }
.mono { font-family: var(--font-mono); }
.accent { color: var(--accent); }
.center { text-align: center; }
.mx-auto { margin-inline: auto; }
.maxw-prose { max-width: 70ch; }

sup { font-size: 0.62em; vertical-align: super; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.74rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent);
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--accent-soft);
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }

.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head .lead { margin-top: 1rem; }
.section-head.center { margin-inline: auto; }

/* ------------------------------------------------------------------ Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-head); font-weight: 600; font-size: 0.95rem;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform .18s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  color: #04121b;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 34px -12px rgba(45,212,238,0.65);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 44px -12px rgba(45,212,238,0.8); }
.btn-ghost { color: var(--text); border-color: var(--border-strong); background: rgba(255,255,255,0.02); }
.btn-ghost:hover { border-color: var(--accent); color: var(--heading); background: var(--accent-soft); transform: translateY(-2px); }
.btn-sm { padding: 0.55rem 1rem; font-size: 0.85rem; }
.btn svg { width: 1.05em; height: 1.05em; }

/* ------------------------------------------------------------------- Cards */
.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.3rem, 2.4vw, 1.9rem);
  backdrop-filter: blur(8px);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
  overflow: hidden;
}
.card--hover:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-soft); }
.card--glow::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, rgba(45,212,238,0.5), transparent 40%, transparent 70%, rgba(79,140,255,0.4));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .3s ease; pointer-events: none;
}
.card--glow:hover::before { opacity: 1; }

.card .card-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--accent-soft); border: 1px solid var(--border-strong);
  color: var(--accent); margin-bottom: 1rem;
}
.card .card-icon svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: 0.5rem; }
.card h3 + p { color: var(--muted); }

.pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.74rem; font-family: var(--font-mono); letter-spacing: 0.04em;
  padding: 0.28rem 0.7rem; border-radius: 999px;
  border: 1px solid var(--border-strong); color: var(--text-soft);
  background: rgba(255,255,255,0.03);
}
.pill--accent { color: var(--accent); border-color: rgba(45,212,238,0.4); background: var(--accent-soft); }
.pill--good { color: var(--good); border-color: rgba(52,211,153,0.4); background: rgba(52,211,153,0.1); }
.pill--warn { color: var(--warn); border-color: rgba(251,191,36,0.4); background: rgba(251,191,36,0.1); }

.tag-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ---------------------------------------------------------------- Navbar */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(14px);
  background: var(--nav-bg);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.nav.is-scrolled { border-bottom-color: var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 68px; }
.brand { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-head); font-weight: 700; font-size: 1.12rem; color: var(--heading); letter-spacing: -0.01em; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04121b; font-weight: 800; font-size: 0.82rem; font-family: var(--font-head);
  box-shadow: 0 8px 22px -8px rgba(45,212,238,0.7);
}
.nav-links { display: flex; align-items: center; gap: 0.15rem; }
.nav-links a {
  font-size: 0.92rem; color: var(--muted); font-weight: 500;
  padding: 0.5rem 0.7rem; border-radius: 8px; transition: color .2s ease, background .2s ease;
}
.nav-links a:hover { color: var(--heading); background: var(--hover-bg); }
.nav-links a.active { color: var(--accent); }
.nav-cta { display: flex; align-items: center; gap: 0.6rem; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border-strong); border-radius: 9px; width: 42px; height: 40px; color: var(--heading); }
.nav-toggle svg { width: 22px; height: 22px; margin-inline: auto; }
.theme-toggle { display: grid; place-items: center; background: rgba(127,150,200,0.08); border: 1px solid var(--border-strong); border-radius: 9px; width: 40px; height: 40px; color: var(--text); transition: color .2s ease, border-color .2s ease, background .2s ease; }
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.theme-toggle svg { width: 19px; height: 19px; }

@media (max-width: 1020px) {
  .nav-links, .nav-cta .btn { display: none; }
  .nav-toggle { display: grid; place-items: center; }
  .nav.is-open .nav-links {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 68px; left: 0; right: 0;
    background: var(--panel-solid); border-bottom: 1px solid var(--border);
    padding: 0.8rem 1.1rem 1.4rem; gap: 0.2rem;
  }
  .nav.is-open .nav-links a { padding: 0.75rem 0.8rem; font-size: 1rem; }
}

/* ----------------------------------------------------------------- Hero */
.hero { position: relative; padding-top: clamp(2.5rem, 6vw, 4.5rem); padding-bottom: clamp(3rem, 7vw, 5rem); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.02fr 0.98fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
@media (max-width: 940px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { margin: 1.2rem 0 0.4rem; }
.hero h1 .grad {
  background: linear-gradient(120deg, var(--heading) 10%, var(--accent) 55%, var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead { margin-bottom: 1.8rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 1.8rem; margin-top: 2.4rem; padding-top: 1.6rem; border-top: 1px solid var(--border); }
.hero-stats .stat .n { font-family: var(--font-head); font-size: 1.7rem; font-weight: 700; color: var(--heading); }
.hero-stats .stat .n .accent { font-size: inherit; }
.hero-stats .stat .l { font-size: 0.8rem; color: var(--muted); letter-spacing: 0.02em; }

/* Canvas hosts for Three.js */
.viz {
  position: relative; width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: radial-gradient(120% 120% at 70% 10%, rgba(45,212,238,0.08), transparent 50%), var(--panel-2);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.viz canvas { display: block; width: 100%; height: 100%; }
.viz--hero { aspect-ratio: 1 / 0.92; min-height: 380px; }
.viz--wide { aspect-ratio: 16 / 8; min-height: 320px; }
.viz-badge {
  position: absolute; left: 14px; top: 14px; z-index: 2;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); padding: 0.3rem 0.7rem; border-radius: 999px;
  background: var(--overlay-bg); border: 1px solid var(--border-strong);
}
.viz-legend {
  position: absolute; right: 14px; bottom: 14px; z-index: 2;
  display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem; justify-content: flex-end;
  font-size: 0.72rem; color: var(--muted);
  background: var(--overlay-bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 0.5rem 0.7rem; max-width: 70%;
}
.viz-legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.viz-legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.viz-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 0.85rem; padding: 2rem; text-align: center; }

/* --------------------------------------------------------- Page header */
.pagehead { padding-block: clamp(2.6rem, 6vw, 4.2rem) clamp(1.5rem, 3vw, 2.4rem); }
.breadcrumb { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted-2); letter-spacing: 0.06em; margin-bottom: 1rem; }
.breadcrumb a:hover { color: var(--accent); }

/* ------------------------------------------------------------- Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
table.data { width: 100%; border-collapse: collapse; min-width: 520px; }
table.data th, table.data td { padding: 0.85rem 1.1rem; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
table.data thead th { font-family: var(--font-head); color: var(--heading); font-weight: 600; background: var(--hover-bg); font-size: 0.82rem; letter-spacing: 0.04em; text-transform: uppercase; }
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: rgba(45,212,238,0.04); }
table.data td .accent { font-weight: 600; }
table.data .col-feature { color: var(--muted); font-weight: 500; }

/* --------------------------------------------------------- Definition list */
.deflist { display: grid; gap: 1rem; }
.deflist .def { padding: 1.1rem 1.3rem; border-left: 2px solid var(--accent); background: rgba(45,212,238,0.04); border-radius: 0 12px 12px 0; }
.deflist .def dt { font-family: var(--font-head); color: var(--heading); font-weight: 600; margin-bottom: 0.25rem; }
.deflist .def dd { color: var(--muted); font-size: 0.95rem; }

/* ------------------------------------------------------------- Steps */
.steps { counter-reset: step; display: grid; gap: 1rem; }
.step { position: relative; display: flex; gap: 1.1rem; padding: 1.2rem 1.3rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
.step .num { counter-increment: step; flex: none; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--border-strong); }
.step .num::before { content: counter(step, decimal-leading-zero); }
.step h4 { margin-bottom: 0.2rem; }
.step p { font-size: 0.92rem; color: var(--muted); }

/* ------------------------------------------------------- Code / BibTeX */
.codeblock { position: relative; background: #060c1f; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.codeblock-head { display: flex; align-items: center; justify-content: space-between; padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.02); }
.codeblock-head .label { font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted); letter-spacing: 0.06em; }
.codeblock pre { margin: 0; padding: 1rem 1.1rem; overflow-x: auto; }
.codeblock code { font-family: var(--font-mono); font-size: 0.8rem; line-height: 1.6; color: #cfe0ff; white-space: pre; }
.copy-btn { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; font-family: var(--font-mono); color: var(--accent); border: 1px solid var(--border-strong); background: rgba(45,212,238,0.06); padding: 0.32rem 0.7rem; border-radius: 8px; transition: all .2s ease; }
.copy-btn:hover { background: var(--accent-soft); color: #fff; }
.copy-btn.copied { color: var(--good); border-color: rgba(52,211,153,0.5); }
.copy-btn svg { width: 14px; height: 14px; }

/* --------------------------------------------------- Publication cards */
.pub { display: grid; grid-template-columns: auto 1fr; gap: 1.4rem; }
@media (max-width: 640px) { .pub { grid-template-columns: 1fr; } }
.pub .pub-side { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; }
.pub .pub-badge { width: 64px; height: 80px; border-radius: 10px; display: grid; place-content: center; text-align: center; background: linear-gradient(160deg, rgba(45,212,238,0.16), rgba(79,140,255,0.12)); border: 1px solid var(--border-strong); color: var(--accent); font-family: var(--font-mono); font-size: 0.66rem; line-height: 1.3; padding: 0.4rem; }
.pub h3 { margin-bottom: 0.35rem; }
.pub .authors { color: var(--text-soft); font-size: 0.95rem; margin-bottom: 0.2rem; }
.pub .venue { color: var(--muted); font-size: 0.86rem; margin-bottom: 0.8rem; }
.pub .venue .accent { font-family: var(--font-mono); }
.pub-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
details.bibtex { margin-top: 1rem; }
details.bibtex > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 0.45rem; font-family: var(--font-mono); font-size: 0.82rem; color: var(--accent); padding: 0.4rem 0; user-select: none; }
details.bibtex > summary::-webkit-details-marker { display: none; }
details.bibtex > summary .chev { transition: transform .2s ease; }
details.bibtex[open] > summary .chev { transform: rotate(90deg); }
details.bibtex .codeblock { margin-top: 0.7rem; }

/* ----------------------------------------------------------- Team cards */
.person { text-align: left; }
.person .avatar { width: 78px; height: 78px; border-radius: 18px; display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; font-size: 1.5rem; color: #04121b; background: linear-gradient(135deg, var(--accent), var(--accent-2)); margin-bottom: 1.1rem; box-shadow: 0 12px 30px -12px rgba(45,212,238,0.6); }
.person .role { color: var(--accent); font-size: 0.85rem; font-family: var(--font-mono); letter-spacing: 0.04em; }
.person .affil { color: var(--muted); font-size: 0.9rem; margin: 0.2rem 0 0.9rem; }
.person ul.interests { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.9rem 0 1.1rem; }
.person .links { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.iconlink { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border-strong); color: var(--muted); transition: all .2s ease; }
.iconlink:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.iconlink svg { width: 18px; height: 18px; }

/* ---------------------------------------------------------------- Forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.82rem; color: var(--text-soft); font-weight: 500; letter-spacing: 0.02em; }
.field input, .field textarea {
  font-family: inherit; font-size: 0.95rem; color: var(--text);
  background: var(--input-bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 0.75rem 0.9rem; transition: border-color .2s ease, box-shadow .2s ease;
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted-2); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(45,212,238,0.12); }
.field textarea { resize: vertical; min-height: 130px; }
.form-note { font-size: 0.82rem; color: var(--muted); }
.form-status { font-size: 0.9rem; padding: 0.8rem 1rem; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--accent-soft); color: var(--text); display: none; }
.form-status.show { display: block; }

/* ------------------------------------------------------------- Callout */
.callout { display: flex; gap: 1rem; padding: 1.2rem 1.4rem; border-radius: var(--radius); border: 1px solid var(--border-strong); background: linear-gradient(135deg, rgba(45,212,238,0.07), rgba(79,140,255,0.05)); }
.callout .ic { flex: none; color: var(--accent); }
.callout .ic svg { width: 26px; height: 26px; }
.callout--warn { border-color: rgba(251,191,36,0.35); background: rgba(251,191,36,0.06); }
.callout--warn .ic { color: var(--warn); }

.disclaimer { font-size: 0.85rem; color: var(--muted); border-top: 1px solid var(--border); padding-top: 1rem; margin-top: 1.4rem; }

/* ------------------------------------------------------------- Charts */
.chart-card { display: flex; flex-direction: column; }
.chart-card .chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 0.4rem; }
.chart-card h3 { font-size: 1.1rem; }
.chart-card .chart-sub { color: var(--muted); font-size: 0.85rem; margin-bottom: 1rem; }
.chart-holder { position: relative; width: 100%; height: 320px; }
.chart-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; margin-top: 1rem; font-size: 0.78rem; color: var(--muted-2); font-family: var(--font-mono); }

/* ------------------------------------------------------- Figure / images */
figure.fig { margin: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
figure.fig img { width: 100%; height: auto; }
figure.fig figcaption { padding: 0.8rem 1.1rem; font-size: 0.84rem; color: var(--muted); border-top: 1px solid var(--border); }

.placeholder-box { border: 1.5px dashed var(--border-strong); border-radius: var(--radius); padding: 2rem; text-align: center; color: var(--muted); background: rgba(255,255,255,0.015); }
.placeholder-box .ic { color: var(--accent); margin-bottom: 0.6rem; }
.placeholder-box .ic svg { width: 28px; height: 28px; margin-inline: auto; }

/* ------------------------------------------------------------ Feature row */
.feature-list { display: grid; gap: 0.9rem; }
.feature-list li { display: flex; gap: 0.8rem; align-items: flex-start; color: var(--text-soft); }
.feature-list li .chk { flex: none; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: var(--accent-soft); border: 1px solid var(--border-strong); color: var(--accent); margin-top: 2px; }
.feature-list li .chk svg { width: 13px; height: 13px; }

/* --------------------------------------------------------------- CTA band */
.ctaband { position: relative; border-radius: var(--radius-lg); border: 1px solid var(--border-strong); overflow: hidden; padding: clamp(2rem, 5vw, 3.4rem); text-align: center; background: radial-gradient(120% 140% at 50% 0%, rgba(45,212,238,0.14), transparent 55%), var(--panel-2); }
.ctaband h2 { margin-bottom: 0.7rem; }
.ctaband .hero-cta { justify-content: center; margin-top: 1.6rem; }

/* ------------------------------------------------------------- Footer */
.footer { border-top: 1px solid var(--border); margin-top: 2rem; padding-block: 3rem 2rem; background: var(--footer-bg); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer h5 { font-family: var(--font-head); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.9rem; }
.footer a { display: block; color: var(--text-soft); font-size: 0.9rem; padding: 0.25rem 0; transition: color .2s ease; }
.footer a:hover { color: var(--accent); }
.footer .brand { margin-bottom: 0.9rem; }
.footer .desc { color: var(--muted); font-size: 0.9rem; max-width: 34ch; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2.4rem; padding-top: 1.5rem; border-top: 1px solid var(--border); font-size: 0.82rem; color: var(--muted-2); }

/* ----------------------------------------------------- Reveal animation */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal][data-delay="1"] { transition-delay: .08s; }
[data-reveal][data-delay="2"] { transition-delay: .16s; }
[data-reveal][data-delay="3"] { transition-delay: .24s; }
[data-reveal][data-delay="4"] { transition-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ----------------------------------------------------- Scroll-to-top */
.scrolltop {
  position: fixed; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem); z-index: 90;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  color: #04121b; background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none; box-shadow: 0 12px 30px -10px rgba(45,212,238,0.6);
  opacity: 0; visibility: hidden; transform: translateY(14px) scale(0.9);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease, box-shadow .25s ease;
}
.scrolltop.show { opacity: 1; visibility: visible; transform: none; }
.scrolltop:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -10px rgba(45,212,238,0.8); }
.scrolltop:active { transform: translateY(0) scale(0.95); }
.scrolltop svg { width: 22px; height: 22px; }
@media (prefers-reduced-motion: reduce) { .scrolltop { transition: opacity .2s ease, visibility .2s ease; transform: none; } .scrolltop.show { transform: none; } }

/* --------------------------------------------------------------- Utilities */
.stack > * + * { margin-top: 1rem; }
.mt-1{margin-top:.5rem} .mt-2{margin-top:1rem} .mt-3{margin-top:1.5rem} .mt-4{margin-top:2rem} .mt-6{margin-top:3rem}
.mb-2{margin-bottom:1rem} .mb-3{margin-bottom:1.5rem} .mb-4{margin-bottom:2rem}
.flex{display:flex} .items-center{align-items:center} .gap-2{gap:.7rem} .gap-3{gap:1rem} .wrap{flex-wrap:wrap}
.full-w{width:100%}
.divider { height: 1px; background: var(--border); margin-block: clamp(2rem,5vw,3.5rem); }
