/* ============================================
   404inc — Shared Stylesheet (dark theme)
   ============================================ */

:root {
  /* Surfaces — deep ink with subtle elevation */
  --bg: #0e0e14;
  --bg-elev: #16161e;
  --bg-card: #1c1c26;
  /* Text — lighter end for dark surfaces */
  --ink: #f0ede4;
  --ink-dim: #a8a5a0;
  --ink-muted: #6a6a73;
  /* Lines — subtle on dark */
  --line: #2a2a35;
  --line-soft: #1f1f29;
  /* Accents — moss greens still work; lime is the spotlight */
  --accent: #8db14d;
  --accent-bright: #b6dc63;
  --hi: #e8ff5a;
  --warn: #e08054;
  --cool: #6db4d6;
  --display: 'Fraunces', serif;
  --body: 'Inter Tight', sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 400;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Atmospheric background — soft gradient washes that feel like a deep night canvas */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 1100px 800px at 8% -10%, rgba(141, 177, 77, 0.06), transparent 65%),
    radial-gradient(ellipse 900px 700px at 95% 100%, rgba(232, 255, 90, 0.04), transparent 60%),
    radial-gradient(ellipse 700px 500px at 50% 50%, rgba(45, 58, 100, 0.025), transparent 70%);
}

.container { max-width: 1320px; margin: 0 auto; padding: 0 32px; position: relative; z-index: 2; }

/* ============ NAV ============ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(14, 14, 20, 0.78);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  max-width: 1320px;
  margin: 0 auto;
}
.logo-mark {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--ink);
}
.logo-mark svg { width: 38px; height: 38px; }
.logo-text { font-family: var(--mono); font-weight: 500; font-size: 15px; }
.logo-text span { color: var(--accent); }
.nav-links { display: flex; gap: 36px; list-style: none; }
.nav-links a {
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 13px;
  font-family: var(--mono);
  transition: color .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent); }
.nav-cta {
  font-family: var(--mono);
  font-size: 13px;
  padding: 10px 20px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s;
  display: inline-block;
}
.nav-cta:hover { background: var(--accent-bright); }

/* ============ LAYER HERO ============ */
.layer-hero {
  padding: 160px 0 60px;
  position: relative;
}
.crumb {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.crumb a { color: var(--ink-muted); text-decoration: none; }
.crumb a:hover { color: var(--accent); }
.crumb .arrow { color: var(--accent); }

.layer-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 1px solid var(--accent);
  border-radius: 100px;
  margin-bottom: 24px;
}

h1.layer-title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(44px, 7vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
  max-width: 1100px;
}
h1.layer-title em {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
  position: relative;
}
h1.layer-title em::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 8px;
  height: 14px;
  background: var(--hi);
  z-index: -1;
  opacity: 0.55;
}
.layer-sub {
  font-size: 18px;
  color: var(--ink-dim);
  max-width: 720px;
  line-height: 1.6;
  margin-bottom: 0;
}

/* ============ LIVE TICKER ============ */
.live-ticker {
  background: var(--ink);
  color: var(--bg);
  padding: 10px 0;
  font-family: var(--mono);
  font-size: 11px;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 80px;
}
.ticker-flow {
  display: flex;
  gap: 50px;
  white-space: nowrap;
  animation: tickerFlow 50s linear infinite;
}
@keyframes tickerFlow {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.ti {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(245, 243, 238, 0.65);
  letter-spacing: 0.04em;
}
.ti strong { color: var(--bg); font-weight: 500; }
.ti .ok { color: var(--hi); }
.ti .up { color: #6ee07a; }
.ti .dn { color: #ff8a6a; }

/* ============ SECTION COMMONS ============ */
section { padding: 100px 0; position: relative; }
.sec-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: block;
}
.sec-title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  max-width: 900px;
}
.sec-title em { font-style: italic; color: var(--accent); font-weight: 400; }
.sec-intro {
  font-size: 16px;
  color: var(--ink-dim);
  max-width: 680px;
  line-height: 1.6;
  margin-bottom: 48px;
}

/* ============ PHILOSOPHY 2-COL ============ */
.philosophy { border-top: 1px solid var(--line); }
.phi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.phi-text p {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 300;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 20px;
}
.phi-quote {
  font-style: italic;
  color: var(--accent);
}
.phi-card {
  background: var(--ink);
  color: var(--bg);
  padding: 32px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
}
.phi-card-h {
  color: var(--hi);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.code-block { color: rgba(245, 243, 238, 0.85); }
.c-com { color: #6a6a72; }
.c-key { color: #ff79c6; }
.c-str { color: #6ee07a; }
.c-num { color: var(--hi); }

/* ============ ANALYTICS GRID ============ */
.analytics { border-top: 1px solid var(--line); background: var(--bg-elev); }
.ana-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}
.ana-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.ana-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: scan 3.5s linear infinite;
}
@keyframes scan {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}
.ac-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.ac-name {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-dim);
  letter-spacing: 0.04em;
}
.ac-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--accent-bright);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ac-status::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent-bright);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--accent-bright);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.ac-val {
  font-family: var(--display);
  font-size: 36px;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 6px;
}
.ac-val em { color: var(--accent); font-style: normal; }
.ac-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}

.big-chart {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 32px;
}
.chart-h {
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.chart-t {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.chart-m {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-muted);
}
.chart-leg {
  display: flex;
  gap: 24px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.leg-i {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-dim);
}
.leg-s { width: 14px; height: 2px; }

/* ============ COMPARISON CARDS ============ */
.comparison { border-top: 1px solid var(--line); }
.comp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.comp-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 28px;
  position: relative;
}
.comp-card.featured {
  border-color: var(--accent);
  border-width: 2px;
}
.cc-tier {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 8px;
}
.comp-card.featured .cc-tier { color: var(--accent); }
.cc-name {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.cc-version {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 16px;
}
.cc-desc {
  font-size: 14px;
  color: var(--ink-dim);
  line-height: 1.6;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px dashed var(--line);
}
.cc-bars { display: flex; flex-direction: column; gap: 14px; }
.cc-bar {
  display: grid;
  grid-template-columns: 100px 1fr 40px;
  gap: 12px;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-dim);
}
.cc-bar .bar {
  height: 6px;
  background: var(--line-soft);
  border-radius: 1px;
  overflow: hidden;
}
.cc-bar .bar-f {
  height: 100%;
  background: var(--accent);
  border-radius: 1px;
  animation: fillBar 1.4s cubic-bezier(.2,.8,.2,1) backwards;
}
@keyframes fillBar { from { width: 0; } }
.cc-when {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-muted);
  line-height: 1.6;
}
.cc-when strong { color: var(--ink); }

/* ============ EVOLUTION CANVAS ============ */
.evolution { border-top: 1px solid var(--line); background: var(--ink); color: var(--bg); }
.evolution .sec-label { color: var(--hi); }
.evolution .sec-title { color: var(--bg); }
.evolution .sec-intro { color: rgba(245, 243, 238, 0.6); }
.evo-canvas {
  background: #0c0c10;
  border: 1px solid #2a2a33;
  border-radius: 4px;
  padding: 40px;
  overflow-x: auto;
}

/* ============ LAYER CTA ============ */
.layer-cta {
  border-top: 1px solid var(--line);
  text-align: center;
  padding: 100px 0;
}
.cta-h {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(36px, 5vw, 60px);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 20px;
}
.cta-h em { font-style: italic; color: var(--accent); }
.cta-s {
  color: var(--ink-dim);
  font-size: 17px;
  max-width: 580px;
  margin: 0 auto 36px;
}
.btn-p {
  background: var(--accent);
  color: var(--bg);
  padding: 16px 28px;
  font-family: var(--mono);
  font-size: 14px;
  border-radius: 2px;
  text-decoration: none;
  display: inline-block;
  transition: background .2s;
  border: none;
  cursor: pointer;
}
.btn-p:hover { background: var(--accent-bright); }
.btn-g {
  background: transparent;
  color: var(--ink);
  padding: 16px 28px;
  font-family: var(--mono);
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: 2px;
  text-decoration: none;
  display: inline-block;
  transition: border-color .2s;
}
.btn-g:hover { border-color: var(--accent); color: var(--accent); }

/* ============ OTHER LAYERS NAVIGATION ============ */
.other-layers { border-top: 1px solid var(--line); background: var(--bg-elev); }
.other-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 48px;
}
.other-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 28px;
  text-decoration: none;
  color: var(--ink);
  transition: all .2s;
  display: block;
  position: relative;
}
.other-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.other-card .oc-tag {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.other-card .oc-name {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.other-card .oc-desc {
  font-size: 13px;
  color: var(--ink-dim);
  line-height: 1.5;
}
.other-card .oc-arrow {
  position: absolute;
  top: 28px; right: 28px;
  font-family: var(--mono);
  color: var(--accent);
  transition: transform .2s;
}
.other-card:hover .oc-arrow { transform: translateX(4px); }

/* ============ FOOTER ============ */
footer {
  border-top: 1px solid var(--line);
  padding: 60px 0 40px;
  background: var(--bg);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
}
.footer-brand p {
  color: var(--ink-muted);
  font-size: 13px;
  margin-top: 16px;
  max-width: 320px;
  line-height: 1.6;
}
.footer-col h4 {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 14px;
  transition: color .2s;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-muted);
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom a {
  color: var(--ink-muted);
  text-decoration: none;
  margin-left: 18px;
}
.footer-bottom a:hover { color: var(--accent); }

/* ============ COOKIE CONSENT BANNER ============ */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  max-width: 720px;
  margin: 0 auto;
  background: #08080c;
  color: #f0ede4;
  border-radius: 6px;
  padding: 24px 28px;
  z-index: 9999;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  display: none;
  font-size: 13px;
  line-height: 1.55;
  border: 1px solid #2a2a35;
}
.cookie-banner.show { display: block; animation: cookieIn .4s cubic-bezier(.2,.8,.2,1); }
@keyframes cookieIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.cookie-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--hi);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.cookie-head::before {
  content: '';
  width: 8px; height: 8px;
  background: var(--hi);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--hi);
}
.cookie-body {
  color: rgba(245, 243, 238, 0.78);
  margin-bottom: 18px;
  max-width: 580px;
}
.cookie-body a { color: var(--hi); text-decoration: none; }
.cookie-body a:hover { text-decoration: underline; }
.cookie-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.cookie-btn {
  font-family: var(--mono);
  font-size: 12px;
  padding: 10px 18px;
  border-radius: 2px;
  border: 1px solid rgba(240, 237, 228, 0.25);
  background: transparent;
  color: #f0ede4;
  cursor: pointer;
  transition: all .2s;
}
.cookie-btn:hover { border-color: var(--hi); color: var(--hi); }
.cookie-btn.primary {
  background: var(--hi);
  color: #14141a;
  border-color: var(--hi);
}
.cookie-btn.primary:hover { background: #d4eb40; border-color: #d4eb40; color: #14141a; }
.cookie-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(245, 243, 238, 0.6);
  cursor: pointer;
  user-select: none;
  margin-right: 6px;
}
.cookie-toggle input { accent-color: var(--hi); }

/* Static-banner shape: icon + text + actions on one row */
.cookie-banner .cookie-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(232, 255, 90, 0.12);
  color: var(--hi);
  font-size: 14px;
  margin-right: 14px;
  flex-shrink: 0;
}
.cookie-banner .cookie-text {
  color: rgba(245, 243, 238, 0.78);
  font-size: 13px;
  line-height: 1.55;
  margin-right: 18px;
  flex: 1 1 320px;
}
.cookie-banner .cookie-text strong {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--hi);
  letter-spacing: 0.1em;
  margin-bottom: 4px;
  font-weight: 500;
}
.cookie-banner .cookie-text a { color: var(--hi); text-decoration: none; }
.cookie-banner .cookie-text a:hover { text-decoration: underline; }

/* When the static banner is in use, lay everything out in one flex row */
.cookie-banner:has(.cookie-icon) {
  display: none;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
.cookie-banner:has(.cookie-icon).show {
  display: flex;
}

.cookie-btn.cookie-accept {
  background: var(--hi);
  color: var(--ink);
  border-color: var(--hi);
}
.cookie-btn.cookie-accept:hover {
  background: #d4eb40;
  border-color: #d4eb40;
  color: var(--ink);
}
.cookie-btn.cookie-decline {
  background: transparent;
  color: var(--bg);
}

/* ============ ANIMATIONS ============ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.reveal { opacity: 0; }
.reveal.in { animation: fadeUp .8s cubic-bezier(.2,.8,.2,1) forwards; }

/* ============ MOBILE NAV BUTTON (hidden on desktop) ============ */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--ink);
  transition: transform .25s, opacity .25s;
}
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 28px; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ RESPONSIVE — TABLET ============ */
@media (max-width: 1100px) {
  .container { padding: 0 24px; }
  .nav-inner { padding: 16px 24px; }
}

/* ============ RESPONSIVE — MOBILE ============ */
@media (max-width: 900px) {
  /* Nav: hamburger pattern */
  .nav-inner { padding: 14px 20px; }
  .nav-toggle { display: block; }
  .nav-cta { display: none; }

  /* Hide desktop links — they reappear inside the drawer below */
  .nav-links {
    position: fixed;
    top: 64px;
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    transform: translateY(-200%);
    transition: transform .3s cubic-bezier(.2,.8,.2,1);
    pointer-events: none;
    z-index: 99;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
  }
  .nav-links.open {
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-links li {
    width: 100%;
    border-bottom: 1px solid var(--line-soft);
  }
  .nav-links li:last-child { border-bottom: none; }
  .nav-links a {
    display: block;
    padding: 18px 24px;
    font-size: 15px;
  }
  .nav-links a:hover { background: var(--bg-elev); }

  /* Containers, sections */
  .container { padding: 0 20px; }
  section { padding: 60px 0; }

  /* Common grids — stack on mobile */
  .ana-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .comp-grid, .other-grid, .phi-grid, .footer-grid { grid-template-columns: 1fr; gap: 24px; }

  /* Layer hero */
  .layer-hero { padding: 110px 0 32px; }

  /* Cookie banner & modal: edge-tight on small screens */
  .cookie-banner { left: 12px; right: 12px; bottom: 12px; padding: 18px; }
  .cookie-actions { width: 100%; justify-content: flex-end; }

  /* Footer text alignment */
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .nav-inner { padding: 12px 16px; }
  .logo-mark svg { width: 32px; height: 32px; }
  .logo-text { font-size: 13px; }
  section { padding: 48px 0; }

  .ana-grid { grid-template-columns: 1fr; }
}

/* Touch-target minimum on small screens (WCAG 2.5.5 — 44×44 minimum) */
@media (max-width: 900px) and (pointer: coarse) {
  .btn-p, .btn-g, .nav-cta, .cookie-btn, .cs-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

/* ============ COOKIE SETTINGS MODAL ============ */
.cookie-settings-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity .2s ease;
}
.cookie-settings-overlay.show {
  display: flex;
  opacity: 1;
}
.cookie-settings-panel {
  background: var(--bg-card);
  color: var(--ink);
  border-radius: 6px;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  border: 1px solid var(--line);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
  animation: csIn .3s cubic-bezier(.2,.8,.2,1);
}
@keyframes csIn {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.cs-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-dim);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: all .15s;
  z-index: 1;
}
.cs-close:hover {
  background: var(--bg-elev);
  color: var(--ink);
  border-color: var(--ink-muted);
}

.cs-head {
  padding: 36px 36px 24px;
  border-bottom: 1px solid var(--line-soft);
}
.cs-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}
.cs-title {
  font-family: var(--display);
  font-weight: 300;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--ink);
}
.cs-title em { font-style: italic; color: var(--accent); font-weight: 400; }
.cs-sub {
  color: var(--ink-dim);
  font-size: 14px;
  line-height: 1.6;
}

.cs-categories {
  padding: 8px 36px 8px;
}
.cs-cat {
  border-bottom: 1px solid var(--line-soft);
  padding: 22px 0;
}
.cs-cat:last-child { border-bottom: none; }
.cs-cat-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
}
.cs-cat-name {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.cs-required {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0.05em;
  background: var(--bg-elev);
  padding: 3px 8px;
  border-radius: 2px;
}
.cs-cat-desc {
  color: var(--ink-dim);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 10px;
}
.cs-cat-cookies {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-muted);
  line-height: 1.7;
  background: var(--bg-elev);
  padding: 10px 12px;
  border-radius: 3px;
  border-left: 2px solid var(--line);
}
.cs-cat-cookies code {
  color: var(--accent);
  background: transparent;
  font-family: var(--mono);
  font-size: 11px;
}

/* Toggle switch */
.cs-toggle {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 4px;
  cursor: pointer;
}
.cs-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.cs-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--line);
  border-radius: 24px;
  transition: background-color .2s;
}
.cs-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.cs-toggle input:checked + .cs-slider {
  background-color: var(--accent);
}
.cs-toggle input:checked + .cs-slider:before {
  transform: translateX(18px);
}
.cs-toggle input:focus-visible + .cs-slider {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}
.cs-toggle.disabled { cursor: not-allowed; }
.cs-toggle.disabled .cs-slider { background-color: var(--accent); opacity: 0.4; cursor: not-allowed; }

.cs-footer {
  padding: 20px 36px 28px;
  border-top: 1px solid var(--line-soft);
  background: var(--bg-elev);
  border-radius: 0 0 6px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.cs-status {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}
.cs-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cs-btn {
  font-family: var(--mono);
  font-size: 12px;
  padding: 10px 18px;
  border-radius: 2px;
  border: 1px solid;
  cursor: pointer;
  transition: all .15s;
  letter-spacing: 0.02em;
}
.cs-btn-ghost {
  background: transparent;
  color: var(--ink-dim);
  border-color: var(--line);
}
.cs-btn-ghost:hover {
  border-color: var(--ink-muted);
  color: var(--ink);
}
.cs-btn-primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.cs-btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
}

@media (max-width: 600px) {
  .cs-head { padding: 28px 24px 20px; }
  .cs-categories { padding: 4px 24px 4px; }
  .cs-footer { padding: 16px 24px 20px; }
  .cs-title { font-size: 26px; }
  .cs-cat-row { grid-template-columns: 1fr auto; }
  .cs-actions { width: 100%; justify-content: flex-end; }
}
