/* =====================================================================
   M-CSC · Design System - base.css  (LIGHT / editorial)
   Inspired by tasteskill.dev: warm paper, generous whitespace, big clean
   type, hairline borders, white cards, monospace micro-labels, dark code
   windows as tech accents. Accent: M-CSC blue→violet. Theme locked: light.
   ===================================================================== */

:root {
  /* ---- Brand (M-CSC blue→violet, tuned for contrast on light paper) ---- */
  --brand: #4b5fd6;          /* primary, passes AA for text on paper */
  --brand-strong: #3a4cc4;   /* hover / pressed */
  --brand-violet: #6f63e0;
  --brand-gradient: linear-gradient(120deg, #4b5fd6 0%, #5f60db 50%, #7468e2 100%);
  --brand-tint: rgba(75, 95, 214, 0.08);
  --brand-tint-2: rgba(124, 84, 232, 0.10);

  /* ---- Status (semantic) ---- */
  --ok: #1f9d6b;
  --ok-tint: rgba(31, 157, 107, 0.12);
  --danger: #c5302d;
  --danger-tint: rgba(197, 48, 45, 0.08);

  /* ---- Surfaces (warm paper) ---- */
  --bg: #f5f4f2;
  --bg-2: #efedea;
  --surface: #ffffff;
  --surface-2: #faf9f6;
  --ink: #0e111b;            /* dark code/terminal window */
  --ink-2: #161b29;

  /* ---- Text (warm near-black) ---- */
  --text: #15151a;
  --text-soft: #3b3b44;
  --muted: #6c6c75;
  --dim: #9a9aa1;

  /* ---- Hairlines / borders ---- */
  --border: rgba(20, 18, 14, 0.10);
  --border-soft: rgba(20, 18, 14, 0.06);
  --border-strong: rgba(20, 18, 14, 0.18);

  /* ---- Theme-adaptive UI ---- */
  --nav-bg: rgba(245, 244, 242, 0.78);
  --hover-tint: rgba(20, 18, 14, 0.05);

  /* ---- Radii ---- */
  --r-xs: 8px;
  --r-sm: 11px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* ---- Shadows (soft, neutral, light-appropriate) ---- */
  --shadow-xs: 0 1px 2px rgba(20, 20, 30, 0.04);
  --shadow-sm: 0 1px 2px rgba(20, 20, 30, 0.04), 0 6px 18px rgba(20, 20, 35, 0.05);
  --shadow-md: 0 2px 6px rgba(20, 20, 30, 0.05), 0 18px 44px rgba(20, 20, 40, 0.09);
  --shadow-lg: 0 30px 70px rgba(20, 20, 45, 0.14);

  /* ---- Layout ---- */
  --max: 1280px;
  --gutter: clamp(16px, 3vw, 32px);
  --nav-h: 66px;
  --safe-top: env(safe-area-inset-top, 0px);

  /* ---- Motion ---- */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* ---- Fonts (IBM Plex family: engineering-grade sans + matching mono;
     loaded via <link> in each page head. System stack as graceful fallback) ---- */
  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;

  color-scheme: light;
}

/* ---------------------------------------------------------------- Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
img, svg, picture { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.6;
  min-height: 100dvh;
  position: relative;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Subtle warm paper depth: faint top sheen + ultra-light grain. No photo. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1200px 540px at 50% -260px, rgba(255, 255, 255, 0.9), transparent 70%),
    radial-gradient(900px 600px at 100% 0%, var(--brand-tint), transparent 60%),
    var(--bg);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.4;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------- Layout */
.wrap { width: min(var(--max), 100% - (var(--gutter) * 2)); margin-inline: auto; }
.section { padding-block: clamp(56px, 8vw, 110px); position: relative; }
.section-tight { padding-block: clamp(40px, 5vw, 64px); }
main { display: block; }
:where(section, header)[id] { scroll-margin-top: calc(var(--nav-h) + 8px + var(--safe-top)); }

/* ---------------------------------------------------------------- Type */
h1, h2, h3, h4 { line-height: 1.06; letter-spacing: -0.025em; font-weight: 680; text-wrap: balance; color: var(--text); }
h1 { font-size: clamp(2.3rem, 1.55rem + 3.3vw, 3.7rem); }
h2 { font-size: clamp(1.7rem, 1.25rem + 1.9vw, 2.5rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.012em; font-weight: 650; }
p { text-wrap: pretty; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-strong);
  font-weight: 600;
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--brand); opacity: 0.6; }

.lead {
  color: var(--text-soft);
  font-size: clamp(1.04rem, 0.98rem + 0.4vw, 1.2rem);
  line-height: 1.62;
  max-width: 60ch;
}
.muted { color: var(--muted); }

.grad-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------------------------------------------------------------- Skip link */
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: calc(12px + var(--safe-top)); }

/* ---------------------------------------------------------------- Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding-top: var(--safe-top);
  background: var(--nav-bg);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid var(--border-soft);
}
.nav-inner {
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.16rem;
  letter-spacing: -0.01em;
  line-height: 1;
  flex-shrink: 0;
}
.brand img { height: 30px; width: 30px; object-fit: contain; }

.nav-menu { display: flex; align-items: center; gap: 2px; }
.nav-menu a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 8px 13px;
  border-radius: var(--r-sm);
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease);
}
.nav-menu a:hover { color: var(--text); background: var(--hover-tint); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

.nav-social {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  color: var(--muted);
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease);
}
.nav-social:hover { color: var(--text); background: var(--hover-tint); }
.nav-social svg { width: 17px; height: 17px; fill: currentColor; }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border-radius: var(--r-sm);
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 18px; height: 1.8px;
  background: var(--text);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: transform 0.28s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle span { top: 50%; margin-top: -0.9px; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateX(-50%) translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateX(-50%) translateY(-6px) rotate(-45deg); }

@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .nav-menu {
    position: absolute;
    top: calc(100% + 1px);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px var(--gutter) 18px;
    background: var(--surface);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.24s var(--ease), transform 0.24s var(--ease), visibility 0.24s;
  }
  .nav-menu.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav-menu a { padding: 13px; font-size: 1rem; }
  .nav-menu a:hover { background: var(--brand-tint); color: var(--brand-strong); }
}

/* ---------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 20px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.16s var(--ease), box-shadow 0.2s var(--ease),
    background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(40, 50, 130, 0.2), 0 10px 24px rgba(75, 95, 214, 0.28); }
.btn-primary:hover { background: var(--brand-strong); transform: translateY(-2px); box-shadow: 0 14px 30px rgba(75, 95, 214, 0.34); }

.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.btn-secondary:hover { border-color: var(--text); transform: translateY(-2px); box-shadow: var(--shadow-sm); }

.btn-ghost { background: transparent; color: var(--text-soft); }
.btn-ghost:hover { color: var(--text); background: var(--hover-tint); }

.btn-wa { background: #1fa855; color: #fff; box-shadow: 0 10px 24px rgba(31, 168, 85, 0.26); }
.btn-wa:hover { background: #19914a; transform: translateY(-2px); }
.btn-wa svg { fill: currentColor; }

.btn-lg { padding: 14px 24px; font-size: 1rem; }
.btn-sm { padding: 9px 15px; font-size: 0.87rem; }

/* ---------------------------------------------------------------- Chips / pills */
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: var(--r-pill);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-soft);
  background: var(--surface);
  border: 1px solid var(--border);
}
.pill.mono { font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.02em; }

/* ---------------------------------------------------------------- Cards */
.card {
  position: relative;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

/* ---------------------------------------------------------------- Dark code/terminal window (tech accent on the light page) */
.console {
  border-radius: var(--r-md);
  background: var(--ink);
  border: 1px solid var(--ink-2);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  color: #c8d0e0;
}
.console-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.02);
}
.console-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.console-dot.r { background: #ff5f57; }
.console-dot.y { background: #febc2e; }
.console-dot.g { background: #28c840; }
.console-title {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.console-body { padding: 16px 18px; font-family: var(--font-mono); font-size: 0.82rem; line-height: 1.7; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #46e0a0;
  background: rgba(70, 224, 160, 0.12);
  border: 1px solid rgba(70, 224, 160, 0.26);
}
.status::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #46e0a0;
  animation: pulse-dot 2.4s var(--ease) infinite;
}
.status.brand { color: #93a4ff; background: rgba(122, 140, 255, 0.14); border-color: rgba(122, 140, 255, 0.3); }
.status.brand::before { background: #93a4ff; }
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(70, 224, 160, 0.5); }
  70% { box-shadow: 0 0 0 6px rgba(70, 224, 160, 0); }
  100% { box-shadow: 0 0 0 0 rgba(70, 224, 160, 0); }
}
.cursor {
  display: inline-block;
  width: 7px; height: 1em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: #93a4ff;
  animation: blink 1.1s steps(2, start) infinite;
}
@keyframes blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

/* ---------------------------------------------------------------- Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 36px 0 calc(64px + var(--safe-top));
  margin-top: 8px;
}
.footer-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--muted);
}
.footer-brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; color: var(--text); }
.footer-brand img { height: 22px; width: 22px; }
.footer-links { margin-left: auto; display: inline-flex; gap: 8px 18px; flex-wrap: wrap; align-items: center; }
.footer-links a,
.footer-links button {
  color: var(--muted);
  text-decoration: none;
  background: none; border: 0; padding: 0;
  font: inherit; cursor: pointer;
  transition: color 0.18s var(--ease);
}
.footer-links a:hover,
.footer-links button:hover { color: var(--text); }

/* ---------------------------------------------------------------- Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.95s var(--ease-out), transform 0.95s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- Focus + a11y */
:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------------------------------------------------------------- 3D / motion utilities */
/* Pointer-driven tilt: JS sets --rx/--ry; children with .tilt-z float forward. */
.tilt-grid { perspective: 1200px; }
.tilt {
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0);
  transform-style: preserve-3d;
  transition: transform 0.4s var(--ease);
  will-change: transform;
}
.tilt.is-tilting { transition: transform 0.1s linear; }
.tilt-z { transform: translateZ(36px); transition: transform 0.4s var(--ease); }
.tilt-z2 { transform: translateZ(20px); transition: transform 0.4s var(--ease); }
/* moving glare that follows the cursor across a tilt card */
.tilt-glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, 0.5), transparent 45%);
  transition: opacity 0.3s var(--ease);
  mix-blend-mode: overlay;
}
.tilt.is-tilting .tilt-glare { opacity: 0.7; }

.magnetic { transition: transform 0.25s var(--ease); will-change: transform; }

/* Depth reveal - rises and settles from a slight 3D tilt */
.reveal-3d {
  opacity: 0;
  transform: perspective(1000px) rotateX(7deg) translateY(34px);
  transform-origin: 50% 100%;
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal-3d.in { opacity: 1; transform: none; }

/* Soft animated brand orbs (parallax background accents) */
.orb-bg { position: absolute; border-radius: 50%; filter: blur(60px); pointer-events: none; z-index: -1; opacity: 0.5; }

/* ---------------------------------------------------------------- Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal, .reveal-3d { opacity: 1; transform: none; }
  .cursor { opacity: 1; animation: none; }
  .tilt { transform: none !important; }
}

/* ---------------------------------------------------------------- Theme toggle (floating, bottom-right) */
.theme-toggle {
  position: fixed;
  right: 22px;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  width: 66px;
  height: 34px;
  padding: 0;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.theme-toggle:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--brand); }
.theme-toggle:active { transform: translateY(-1px); }
.tt-track { position: relative; display: flex; align-items: center; justify-content: space-between; width: 100%; height: 100%; padding: 0 9px; border-radius: inherit; }
.tt-track svg { width: 15px; height: 15px; z-index: 1; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tt-sun { color: #e0a43a; }
.tt-moon { color: var(--muted); }
.tt-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand-gradient);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.32s var(--ease);
}
[data-theme="dark"] .tt-knob { transform: translateX(32px); }
[data-theme="dark"] .tt-sun { color: var(--dim); }
[data-theme="dark"] .tt-moon { color: #cdb8ff; }

/* Theme reveal starts at the floating switch and expands across the viewport. */
html.theme-is-transitioning::view-transition-old(root),
html.theme-is-transitioning::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
html.theme-is-transitioning::view-transition-group(root) {
  animation: none;
}
html.theme-is-transitioning::view-transition-old(root) { z-index: 1; }
html.theme-is-transitioning::view-transition-new(root) {
  z-index: 2;
  animation: theme-wave-reveal 0.72s var(--ease-out) both;
}
html.theme-is-transitioning body *,
html.theme-is-transitioning body *::before,
html.theme-is-transitioning body *::after {
  transition-duration: 0s !important;
  transition-delay: 0s !important;
  animation-play-state: paused !important;
}
html.theme-is-transitioning .tt-knob {
  transition: transform 0.32s var(--ease) !important;
}
@keyframes theme-wave-reveal {
  from { clip-path: circle(0 at var(--theme-wave-x) var(--theme-wave-y)); }
  to { clip-path: circle(var(--theme-wave-radius) at var(--theme-wave-x) var(--theme-wave-y)); }
}
.theme-wave {
  position: fixed;
  left: var(--theme-wave-x);
  top: var(--theme-wave-y);
  z-index: 89;
  width: var(--theme-wave-size);
  height: var(--theme-wave-size);
  border: 2px solid var(--theme-wave-color);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0);
}
.theme-wave.is-active { animation: theme-wave-fallback 0.7s var(--ease-out) both; }
@keyframes theme-wave-fallback {
  0% { opacity: 0.9; transform: translate(-50%, -50%) scale(0); }
  70% { opacity: 0.28; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .tt-knob { transition: none; }
  .theme-toggle:hover { transform: none; }
  .theme-wave { display: none; }
}

/* ---------------------------------------------------------------- Dark theme */
[data-theme="dark"] {
  --brand: #8aa0ff;
  --brand-strong: #a6b6ff;
  --brand-violet: #9f93f7;
  --brand-gradient: linear-gradient(120deg, #6f86ff 0%, #8a85f3 52%, #9f93f7 100%);
  --brand-tint: rgba(138, 160, 255, 0.14);
  --brand-tint-2: rgba(177, 140, 255, 0.16);

  --ok: #4fe0a8;
  --ok-tint: rgba(79, 224, 168, 0.16);
  --danger: #ff8a8a;
  --danger-tint: rgba(255, 120, 120, 0.13);

  --bg: #0b0d12;
  --bg-2: #0f1219;
  --surface: #14171f;
  --surface-2: #181c26;
  --ink: #12151d;
  --ink-2: #2a3142;

  --text: #eef1f7;
  --text-soft: #c3c8d4;
  --muted: #8b91a3;
  --dim: #5f6678;

  --border: rgba(180, 190, 220, 0.12);
  --border-soft: rgba(180, 190, 220, 0.06);
  --border-strong: rgba(180, 190, 220, 0.22);

  --nav-bg: rgba(11, 13, 18, 0.72);
  --hover-tint: rgba(255, 255, 255, 0.06);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 18px rgba(0, 0, 0, 0.42);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.45), 0 18px 44px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 30px 70px rgba(0, 0, 0, 0.62);

  color-scheme: dark;
}
[data-theme="dark"] body::before {
  background:
    radial-gradient(1200px 540px at 50% -260px, rgba(138, 160, 255, 0.1), transparent 70%),
    radial-gradient(900px 600px at 100% 0%, var(--brand-tint), transparent 60%),
    var(--bg);
}
[data-theme="dark"] .tp-btn { color: #2fe0a0; }
[data-theme="dark"] .emergency-box p { color: #ffb4b0; }
