/* ==========================================================================
   NoSub.tools — Precision Industrial Craft & Transitions Design System
   Inspired by: transitions.dev, Linear, Teenage Engineering, ONCE
   22 Handcrafted Color Schemes across 4 Design Movements
   ========================================================================== */

:root {
  /* Motion & Spring Easing Tokens (Calibrated from transitions.dev) */
  --ease-spring: cubic-bezier(0.34, 1.35, 0.64, 1);
  --ease-spring-bouncy: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-spring: 400ms;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "PingFang SC", "Hiragino Sans GB", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}


/* 纸质出版与人文工坊 — 瑞士档案纸 (Swiss Warm Paper) */
:root, [data-theme="warm-paper"] {
  color-scheme: light;

  --bg: #f8f8f5;
  --bg-pattern-dot: rgba(0, 0, 0, 0.05);
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f0f0eb;
  --bg-surface-hover: #eaeae4;
  --bg-card-inner: #f5f5ef;

  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.16);
  --border-active: rgba(0, 0, 0, 0.35);

  --text-main: #18181b;
  --text-secondary: #52525b;
  --text-muted: #71717a;
  --text-faint: #a1a1aa;

  --amber: #c26a08;
  --amber-dim: rgba(194, 106, 8, 0.09);
  --amber-border: rgba(194, 106, 8, 0.28);
  --amber-glow: rgba(194, 106, 8, 0.18);

  --emerald: #059669;
  --emerald-dim: rgba(16, 185, 129, 0.12);
  --emerald-border: rgba(16, 185, 129, 0.28);

  --cyan: #0284c7;
  --cyan-dim: rgba(56, 189, 248, 0.12);
  --cyan-border: rgba(56, 189, 248, 0.28);

  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --card-shadow-hover: 0 16px 36px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
}

/* 纸质出版与人文工坊 — 包豪斯素白 (Bauhaus Studio) */
[data-theme="bauhaus"] {
  color-scheme: light;

  --bg: #ffffff;
  --bg-pattern-dot: rgba(0, 0, 0, 0.06);
  --bg-surface: #f7f7f8;
  --bg-surface-elevated: #efeff2;
  --bg-surface-hover: #e5e5eb;
  --bg-card-inner: #ffffff;

  --border-subtle: rgba(0, 0, 0, 0.11);
  --border-strong: rgba(0, 0, 0, 0.22);
  --border-active: rgba(0, 0, 0, 0.45);

  --text-main: #050505;
  --text-secondary: #3f3f46;
  --text-muted: #71717a;
  --text-faint: #a1a1aa;

  --amber: #dc2626;
  --amber-dim: rgba(220, 38, 38, 0.08);
  --amber-border: rgba(220, 38, 38, 0.3);
  --amber-glow: rgba(220, 38, 38, 0.2);

  --emerald: #16a34a;
  --emerald-dim: rgba(16, 185, 129, 0.12);
  --emerald-border: rgba(16, 185, 129, 0.28);

  --cyan: #2563eb;
  --cyan-dim: rgba(56, 189, 248, 0.12);
  --cyan-border: rgba(56, 189, 248, 0.28);

  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --card-shadow-hover: 0 16px 36px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
}

/* 纸质出版与人文工坊 — 纽约客米墨 (The New Yorker) */
[data-theme="new-yorker"] {
  color-scheme: light;

  --bg: #f6f2e9;
  --bg-pattern-dot: rgba(44, 30, 20, 0.06);
  --bg-surface: #fdfbf7;
  --bg-surface-elevated: #ede8dd;
  --bg-surface-hover: #e5dfd2;
  --bg-card-inner: #f4efe4;

  --border-subtle: rgba(60, 40, 20, 0.09);
  --border-strong: rgba(60, 40, 20, 0.18);
  --border-active: rgba(60, 40, 20, 0.35);

  --text-main: #1c1917;
  --text-secondary: #44403c;
  --text-muted: #78716c;
  --text-faint: #a8a29e;

  --amber: #b91c1c;
  --amber-dim: rgba(185, 28, 28, 0.08);
  --amber-border: rgba(185, 28, 28, 0.28);
  --amber-glow: rgba(185, 28, 28, 0.18);

  --emerald: #15803d;
  --emerald-dim: rgba(16, 185, 129, 0.12);
  --emerald-border: rgba(16, 185, 129, 0.28);

  --cyan: #0369a1;
  --cyan-dim: rgba(56, 189, 248, 0.12);
  --cyan-border: rgba(56, 189, 248, 0.28);

  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --card-shadow-hover: 0 16px 36px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
}

/* 纸质出版与人文工坊 — 复古牛皮纸 (Kraft Ledger) */
[data-theme="kraft-paper"] {
  color-scheme: light;

  --bg: #efe8db;
  --bg-pattern-dot: rgba(70, 50, 25, 0.06);
  --bg-surface: #f9f6f0;
  --bg-surface-elevated: #e5dcce;
  --bg-surface-hover: #ddd2c0;
  --bg-card-inner: #eae1d2;

  --border-subtle: rgba(80, 55, 30, 0.1);
  --border-strong: rgba(80, 55, 30, 0.2);
  --border-active: rgba(80, 55, 30, 0.38);

  --text-main: #292524;
  --text-secondary: #57534e;
  --text-muted: #78716c;
  --text-faint: #a8a29e;

  --amber: #9a3412;
  --amber-dim: rgba(154, 52, 18, 0.09);
  --amber-border: rgba(154, 52, 18, 0.3);
  --amber-glow: rgba(154, 52, 18, 0.2);

  --emerald: #15803d;
  --emerald-dim: rgba(16, 185, 129, 0.12);
  --emerald-border: rgba(16, 185, 129, 0.28);

  --cyan: #0284c7;
  --cyan-dim: rgba(56, 189, 248, 0.12);
  --cyan-border: rgba(56, 189, 248, 0.28);

  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --card-shadow-hover: 0 16px 36px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
}

/* 纸质出版与人文工坊 — 原色水磨石 (Raw Concrete) */
[data-theme="concrete-white"] {
  color-scheme: light;

  --bg: #f1f3f5;
  --bg-pattern-dot: rgba(0, 0, 0, 0.05);
  --bg-surface: #ffffff;
  --bg-surface-elevated: #e9ecef;
  --bg-surface-hover: #dee2e6;
  --bg-card-inner: #f8f9fa;

  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.16);
  --border-active: rgba(0, 0, 0, 0.32);

  --text-main: #212529;
  --text-secondary: #495057;
  --text-muted: #6c757d;
  --text-faint: #adb5bd;

  --amber: #2563eb;
  --amber-dim: rgba(37, 99, 235, 0.09);
  --amber-border: rgba(37, 99, 235, 0.28);
  --amber-glow: rgba(37, 99, 235, 0.18);

  --emerald: #059669;
  --emerald-dim: rgba(16, 185, 129, 0.12);
  --emerald-border: rgba(16, 185, 129, 0.28);

  --cyan: #0891b2;
  --cyan-dim: rgba(56, 189, 248, 0.12);
  --cyan-border: rgba(56, 189, 248, 0.28);

  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --card-shadow-hover: 0 16px 36px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
}

/* 现代暗黑与顶级 SaaS — Linear 哑光深钛 (Linear Matte Titanium) */
[data-theme="matte-titanium"] {
  color-scheme: dark;

  --bg: #0c0c0f;
  --bg-pattern-dot: rgba(255, 255, 255, 0.04);
  --bg-surface: #141419;
  --bg-surface-elevated: #1c1c23;
  --bg-surface-hover: #23232c;
  --bg-card-inner: #0f0f13;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-active: rgba(255, 255, 255, 0.35);

  --text-main: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --text-faint: #52525b;

  --amber: #f59e0b;
  --amber-dim: rgba(245, 158, 11, 0.12);
  --amber-border: rgba(245, 158, 11, 0.28);
  --amber-glow: rgba(245, 158, 11, 0.25);

  --emerald: #10b981;
  --emerald-dim: rgba(16, 185, 129, 0.12);
  --emerald-border: rgba(16, 185, 129, 0.28);

  --cyan: #38bdf8;
  --cyan-dim: rgba(56, 189, 248, 0.12);
  --cyan-border: rgba(56, 189, 248, 0.28);

  --card-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  --card-shadow-hover: 0 20px 48px rgba(0, 0, 0, 0.6), 0 0 24px rgba(245, 158, 11, 0.25);
}

/* 现代暗黑与顶级 SaaS — Raycast 深海夜蓝 (Raycast Midnight) */
[data-theme="raycast-midnight"] {
  color-scheme: dark;

  --bg: #0a0f1d;
  --bg-pattern-dot: rgba(56, 189, 248, 0.05);
  --bg-surface: #111827;
  --bg-surface-elevated: #1a243a;
  --bg-surface-hover: #23304c;
  --bg-card-inner: #0d1322;

  --border-subtle: rgba(148, 163, 184, 0.12);
  --border-strong: rgba(148, 163, 184, 0.22);
  --border-active: rgba(56, 189, 248, 0.4);

  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-faint: #475569;

  --amber: #38bdf8;
  --amber-dim: rgba(56, 189, 248, 0.12);
  --amber-border: rgba(56, 189, 248, 0.3);
  --amber-glow: rgba(56, 189, 248, 0.25);

  --emerald: #34d399;
  --emerald-dim: rgba(16, 185, 129, 0.12);
  --emerald-border: rgba(16, 185, 129, 0.28);

  --cyan: #818cf8;
  --cyan-dim: rgba(56, 189, 248, 0.12);
  --cyan-border: rgba(56, 189, 248, 0.28);

  --card-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  --card-shadow-hover: 0 20px 48px rgba(0, 0, 0, 0.6), 0 0 24px rgba(56, 189, 248, 0.25);
}

/* 现代暗黑与顶级 SaaS — 纯血 OLED 极黑 (Pure Pitch OLED) */
[data-theme="pure-oled"] {
  color-scheme: dark;

  --bg: #000000;
  --bg-pattern-dot: rgba(255, 255, 255, 0.06);
  --bg-surface: #0a0a0a;
  --bg-surface-elevated: #141414;
  --bg-surface-hover: #1f1f1f;
  --bg-card-inner: #050505;

  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.2);
  --border-active: rgba(255, 255, 255, 0.45);

  --text-main: #ffffff;
  --text-secondary: #a3a3a3;
  --text-muted: #737373;
  --text-faint: #525252;

  --amber: #22c55e;
  --amber-dim: rgba(34, 197, 94, 0.12);
  --amber-border: rgba(34, 197, 94, 0.3);
  --amber-glow: rgba(34, 197, 94, 0.25);

  --emerald: #22c55e;
  --emerald-dim: rgba(16, 185, 129, 0.12);
  --emerald-border: rgba(16, 185, 129, 0.28);

  --cyan: #06b6d4;
  --cyan-dim: rgba(56, 189, 248, 0.12);
  --cyan-border: rgba(56, 189, 248, 0.28);

  --card-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  --card-shadow-hover: 0 20px 48px rgba(0, 0, 0, 0.6), 0 0 24px rgba(34, 197, 94, 0.25);
}

/* 现代暗黑与顶级 SaaS — Vercel 工业冷银 (Geist Industrial) */
[data-theme="vercel-mono"] {
  color-scheme: dark;

  --bg: #000000;
  --bg-pattern-dot: rgba(255, 255, 255, 0.04);
  --bg-surface: #111111;
  --bg-surface-elevated: #1a1a1a;
  --bg-surface-hover: #262626;
  --bg-card-inner: #0d0d0d;

  --border-subtle: rgba(255, 255, 255, 0.14);
  --border-strong: rgba(255, 255, 255, 0.28);
  --border-active: rgba(255, 255, 255, 0.6);

  --text-main: #ededed;
  --text-secondary: #888888;
  --text-muted: #666666;
  --text-faint: #444444;

  --amber: #ffffff;
  --amber-dim: rgba(255, 255, 255, 0.12);
  --amber-border: rgba(255, 255, 255, 0.4);
  --amber-glow: rgba(255, 255, 255, 0.25);

  --emerald: #50e3c2;
  --emerald-dim: rgba(16, 185, 129, 0.12);
  --emerald-border: rgba(16, 185, 129, 0.28);

  --cyan: #0070f3;
  --cyan-dim: rgba(56, 189, 248, 0.12);
  --cyan-border: rgba(56, 189, 248, 0.28);

  --card-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  --card-shadow-hover: 0 20px 48px rgba(0, 0, 0, 0.6), 0 0 24px rgba(255, 255, 255, 0.25);
}

/* 现代暗黑与顶级 SaaS — 极客深紫霓虹 (Cyber Violet) */
[data-theme="neon-matrix"] {
  color-scheme: dark;

  --bg: #0b0813;
  --bg-pattern-dot: rgba(168, 85, 247, 0.06);
  --bg-surface: #130f21;
  --bg-surface-elevated: #1c1630;
  --bg-surface-hover: #271e42;
  --bg-card-inner: #0f0b1a;

  --border-subtle: rgba(192, 132, 252, 0.12);
  --border-strong: rgba(192, 132, 252, 0.24);
  --border-active: rgba(192, 132, 252, 0.45);

  --text-main: #f3e8ff;
  --text-secondary: #c084fc;
  --text-muted: #9333ea;
  --text-faint: #581c87;

  --amber: #c084fc;
  --amber-dim: rgba(192, 132, 252, 0.15);
  --amber-border: rgba(192, 132, 252, 0.35);
  --amber-glow: rgba(192, 132, 252, 0.3);

  --emerald: #34d399;
  --emerald-dim: rgba(16, 185, 129, 0.12);
  --emerald-border: rgba(16, 185, 129, 0.28);

  --cyan: #38bdf8;
  --cyan-dim: rgba(56, 189, 248, 0.12);
  --cyan-border: rgba(56, 189, 248, 0.28);

  --card-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  --card-shadow-hover: 0 20px 48px rgba(0, 0, 0, 0.6), 0 0 24px rgba(192, 132, 252, 0.3);
}

/* 实体工控与经典硬件 — Braun 经典白橙 (Dieter Rams Braun) */
[data-theme="braun-orange"] {
  color-scheme: light;

  --bg: #ebeae5;
  --bg-pattern-dot: rgba(0, 0, 0, 0.05);
  --bg-surface: #f7f6f2;
  --bg-surface-elevated: #dfded9;
  --bg-surface-hover: #d5d4ce;
  --bg-card-inner: #f2f1ed;

  --border-subtle: rgba(0, 0, 0, 0.1);
  --border-strong: rgba(0, 0, 0, 0.2);
  --border-active: rgba(0, 0, 0, 0.4);

  --text-main: #1c1b18;
  --text-secondary: #4a4843;
  --text-muted: #706e67;
  --text-faint: #9e9b91;

  --amber: #ea580c;
  --amber-dim: rgba(234, 88, 12, 0.1);
  --amber-border: rgba(234, 88, 12, 0.32);
  --amber-glow: rgba(234, 88, 12, 0.22);

  --emerald: #15803d;
  --emerald-dim: rgba(16, 185, 129, 0.12);
  --emerald-border: rgba(16, 185, 129, 0.28);

  --cyan: #0284c7;
  --cyan-dim: rgba(56, 189, 248, 0.12);
  --cyan-border: rgba(56, 189, 248, 0.28);

  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --card-shadow-hover: 0 16px 36px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
}

/* 实体工控与经典硬件 — Teenage Engineering (OP-1 Industrial) */
[data-theme="teenage-op1"] {
  color-scheme: light;

  --bg: #e6e6e8;
  --bg-pattern-dot: rgba(0, 0, 0, 0.06);
  --bg-surface: #f4f4f6;
  --bg-surface-elevated: #dcdce0;
  --bg-surface-hover: #d1d1d6;
  --bg-card-inner: #ededf0;

  --border-subtle: rgba(0, 0, 0, 0.12);
  --border-strong: rgba(0, 0, 0, 0.24);
  --border-active: rgba(0, 0, 0, 0.48);

  --text-main: #111113;
  --text-secondary: #3a3a3e;
  --text-muted: #686870;
  --text-faint: #92929c;

  --amber: #ef4444;
  --amber-dim: rgba(239, 68, 68, 0.1);
  --amber-border: rgba(239, 68, 68, 0.32);
  --amber-glow: rgba(239, 68, 68, 0.22);

  --emerald: #10b981;
  --emerald-dim: rgba(16, 185, 129, 0.12);
  --emerald-border: rgba(16, 185, 129, 0.28);

  --cyan: #06b6d4;
  --cyan-dim: rgba(56, 189, 248, 0.12);
  --cyan-border: rgba(56, 189, 248, 0.28);

  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --card-shadow-hover: 0 16px 36px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
}

/* 实体工控与经典硬件 — 复古打字机 (Olivetti Sage) */
[data-theme="vintage-sage"] {
  color-scheme: dark;

  --bg: #111513;
  --bg-pattern-dot: rgba(134, 239, 172, 0.04);
  --bg-surface: #19201c;
  --bg-surface-elevated: #222b26;
  --bg-surface-hover: #2b3730;
  --bg-card-inner: #141a16;

  --border-subtle: rgba(156, 177, 164, 0.12);
  --border-strong: rgba(156, 177, 164, 0.22);
  --border-active: rgba(134, 239, 172, 0.38);

  --text-main: #edf3ee;
  --text-secondary: #9cb1a4;
  --text-muted: #6d8074;
  --text-faint: #4e5f54;

  --amber: #86efac;
  --amber-dim: rgba(134, 239, 172, 0.12);
  --amber-border: rgba(134, 239, 172, 0.3);
  --amber-glow: rgba(134, 239, 172, 0.22);

  --emerald: #4ade80;
  --emerald-dim: rgba(16, 185, 129, 0.12);
  --emerald-border: rgba(16, 185, 129, 0.28);

  --cyan: #2dd4bf;
  --cyan-dim: rgba(56, 189, 248, 0.12);
  --cyan-border: rgba(56, 189, 248, 0.28);

  --card-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  --card-shadow-hover: 0 20px 48px rgba(0, 0, 0, 0.6), 0 0 24px rgba(134, 239, 172, 0.22);
}

/* 实体工控与经典硬件 — GameBoy 像素灰绿 (Retro Handheld DMG) */
[data-theme="gameboy-classic"] {
  color-scheme: light;

  --bg: #8b956d;
  --bg-pattern-dot: rgba(15, 56, 15, 0.08);
  --bg-surface: #9bbc0f;
  --bg-surface-elevated: #8bac0f;
  --bg-surface-hover: #7c9c0d;
  --bg-card-inner: #94b40e;

  --border-subtle: rgba(15, 56, 15, 0.18);
  --border-strong: rgba(15, 56, 15, 0.35);
  --border-active: rgba(15, 56, 15, 0.6);

  --text-main: #0f380f;
  --text-secondary: #306230;
  --text-muted: #4d734d;
  --text-faint: #6b8b6b;

  --amber: #9f1239;
  --amber-dim: rgba(159, 18, 57, 0.12);
  --amber-border: rgba(159, 18, 57, 0.35);
  --amber-glow: rgba(159, 18, 57, 0.25);

  --emerald: #0f380f;
  --emerald-dim: rgba(16, 185, 129, 0.12);
  --emerald-border: rgba(16, 185, 129, 0.28);

  --cyan: #0f380f;
  --cyan-dim: rgba(56, 189, 248, 0.12);
  --cyan-border: rgba(56, 189, 248, 0.28);

  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --card-shadow-hover: 0 16px 36px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
}

/* 实体工控与经典硬件 — 黑胶古铜金 (Vinyl & Brass) */
[data-theme="vinyl-brass"] {
  color-scheme: dark;

  --bg: #14110f;
  --bg-pattern-dot: rgba(217, 169, 79, 0.05);
  --bg-surface: #1e1a17;
  --bg-surface-elevated: #292420;
  --bg-surface-hover: #352e29;
  --bg-card-inner: #191512;

  --border-subtle: rgba(217, 169, 79, 0.12);
  --border-strong: rgba(217, 169, 79, 0.24);
  --border-active: rgba(217, 169, 79, 0.45);

  --text-main: #f7f2ea;
  --text-secondary: #c9bfb5;
  --text-muted: #968b80;
  --text-faint: #665d54;

  --amber: #d4af37;
  --amber-dim: rgba(212, 175, 55, 0.14);
  --amber-border: rgba(212, 175, 55, 0.35);
  --amber-glow: rgba(212, 175, 55, 0.25);

  --emerald: #10b981;
  --emerald-dim: rgba(16, 185, 129, 0.12);
  --emerald-border: rgba(16, 185, 129, 0.28);

  --cyan: #38bdf8;
  --cyan-dim: rgba(56, 189, 248, 0.12);
  --cyan-border: rgba(56, 189, 248, 0.28);

  --card-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  --card-shadow-hover: 0 20px 48px rgba(0, 0, 0, 0.6), 0 0 24px rgba(212, 175, 55, 0.25);
}

/* 实体工控与经典硬件 — Leica 旁轴黑红 (Leica M Black) */
[data-theme="leica-monochrome"] {
  color-scheme: dark;

  --bg: #0d0d0d;
  --bg-pattern-dot: rgba(255, 255, 255, 0.05);
  --bg-surface: #171717;
  --bg-surface-elevated: #222222;
  --bg-surface-hover: #2e2e2e;
  --bg-card-inner: #121212;

  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.2);
  --border-active: rgba(255, 255, 255, 0.45);

  --text-main: #fafafa;
  --text-secondary: #a3a3a3;
  --text-muted: #737373;
  --text-faint: #525252;

  --amber: #e11d48;
  --amber-dim: rgba(225, 29, 72, 0.12);
  --amber-border: rgba(225, 29, 72, 0.35);
  --amber-glow: rgba(225, 29, 72, 0.25);

  --emerald: #10b981;
  --emerald-dim: rgba(16, 185, 129, 0.12);
  --emerald-border: rgba(16, 185, 129, 0.28);

  --cyan: #38bdf8;
  --cyan-dim: rgba(56, 189, 248, 0.12);
  --cyan-border: rgba(56, 189, 248, 0.28);

  --card-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  --card-shadow-hover: 0 20px 48px rgba(0, 0, 0, 0.6), 0 0 24px rgba(225, 29, 72, 0.25);
}

/* 自然诗意与复古终端 — 烘焙浓缩咖啡 (Espresso Roast) */
[data-theme="espresso-roast"] {
  color-scheme: dark;

  --bg: #15100e;
  --bg-pattern-dot: rgba(217, 119, 6, 0.05);
  --bg-surface: #201815;
  --bg-surface-elevated: #2b211d;
  --bg-surface-hover: #382c26;
  --bg-card-inner: #1b1411;

  --border-subtle: rgba(217, 150, 100, 0.12);
  --border-strong: rgba(217, 150, 100, 0.22);
  --border-active: rgba(217, 119, 6, 0.4);

  --text-main: #f5ece7;
  --text-secondary: #c2b2a9;
  --text-muted: #8c7d75;
  --text-faint: #5f534d;

  --amber: #ea580c;
  --amber-dim: rgba(234, 88, 12, 0.12);
  --amber-border: rgba(234, 88, 12, 0.3);
  --amber-glow: rgba(234, 88, 12, 0.22);

  --emerald: #10b981;
  --emerald-dim: rgba(16, 185, 129, 0.12);
  --emerald-border: rgba(16, 185, 129, 0.28);

  --cyan: #38bdf8;
  --cyan-dim: rgba(56, 189, 248, 0.12);
  --cyan-border: rgba(56, 189, 248, 0.28);

  --card-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  --card-shadow-hover: 0 20px 48px rgba(0, 0, 0, 0.6), 0 0 24px rgba(234, 88, 12, 0.22);
}

/* 自然诗意与复古终端 — 北欧森林苔藓 (Nordic Evergreen) */
[data-theme="nordic-forest"] {
  color-scheme: dark;

  --bg: #0a1310;
  --bg-pattern-dot: rgba(52, 211, 153, 0.04);
  --bg-surface: #12201b;
  --bg-surface-elevated: #1a2c26;
  --bg-surface-hover: #233a32;
  --bg-card-inner: #0e1a16;

  --border-subtle: rgba(110, 231, 183, 0.1);
  --border-strong: rgba(110, 231, 183, 0.2);
  --border-active: rgba(52, 211, 153, 0.4);

  --text-main: #ecfdf5;
  --text-secondary: #a7f3d0;
  --text-muted: #6ee7b7;
  --text-faint: #047857;

  --amber: #10b981;
  --amber-dim: rgba(16, 185, 129, 0.12);
  --amber-border: rgba(16, 185, 129, 0.3);
  --amber-glow: rgba(16, 185, 129, 0.25);

  --emerald: #34d399;
  --emerald-dim: rgba(16, 185, 129, 0.12);
  --emerald-border: rgba(16, 185, 129, 0.28);

  --cyan: #38bdf8;
  --cyan-dim: rgba(56, 189, 248, 0.12);
  --cyan-border: rgba(56, 189, 248, 0.28);

  --card-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  --card-shadow-hover: 0 20px 48px rgba(0, 0, 0, 0.6), 0 0 24px rgba(16, 185, 129, 0.25);
}

/* 自然诗意与复古终端 — 琥珀 CRT 单色终端 (Phosphor Amber CRT) */
[data-theme="crt-amber"] {
  color-scheme: dark;

  --bg: #0a0800;
  --bg-pattern-dot: rgba(255, 176, 0, 0.06);
  --bg-surface: #141000;
  --bg-surface-elevated: #211a00;
  --bg-surface-hover: #302600;
  --bg-card-inner: #0e0c00;

  --border-subtle: rgba(255, 176, 0, 0.18);
  --border-strong: rgba(255, 176, 0, 0.35);
  --border-active: rgba(255, 176, 0, 0.65);

  --text-main: #ffb000;
  --text-secondary: #d49200;
  --text-muted: #996a00;
  --text-faint: #664700;

  --amber: #ffb000;
  --amber-dim: rgba(255, 176, 0, 0.15);
  --amber-border: rgba(255, 176, 0, 0.4);
  --amber-glow: rgba(255, 176, 0, 0.35);

  --emerald: #ffb000;
  --emerald-dim: rgba(16, 185, 129, 0.12);
  --emerald-border: rgba(16, 185, 129, 0.28);

  --cyan: #ffb000;
  --cyan-dim: rgba(56, 189, 248, 0.12);
  --cyan-border: rgba(56, 189, 248, 0.28);

  --card-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  --card-shadow-hover: 0 20px 48px rgba(0, 0, 0, 0.6), 0 0 24px rgba(255, 176, 0, 0.35);
}

/* 自然诗意与复古终端 — 矩阵黑客绿屏 (Matrix Green Terminal) */
[data-theme="crt-green"] {
  color-scheme: dark;

  --bg: #020902;
  --bg-pattern-dot: rgba(34, 197, 94, 0.06);
  --bg-surface: #051605;
  --bg-surface-elevated: #0a260a;
  --bg-surface-hover: #0f360f;
  --bg-card-inner: #031003;

  --border-subtle: rgba(34, 197, 94, 0.18);
  --border-strong: rgba(34, 197, 94, 0.35);
  --border-active: rgba(34, 197, 94, 0.65);

  --text-main: #4ade80;
  --text-secondary: #22c55e;
  --text-muted: #16a34a;
  --text-faint: #14532d;

  --amber: #22c55e;
  --amber-dim: rgba(34, 197, 94, 0.15);
  --amber-border: rgba(34, 197, 94, 0.4);
  --amber-glow: rgba(34, 197, 94, 0.35);

  --emerald: #4ade80;
  --emerald-dim: rgba(16, 185, 129, 0.12);
  --emerald-border: rgba(16, 185, 129, 0.28);

  --cyan: #4ade80;
  --cyan-dim: rgba(56, 189, 248, 0.12);
  --cyan-border: rgba(56, 189, 248, 0.28);

  --card-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  --card-shadow-hover: 0 20px 48px rgba(0, 0, 0, 0.6), 0 0 24px rgba(34, 197, 94, 0.35);
}

/* 自然诗意与复古终端 — 极地冰川幽蓝 (Glacier Frost) */
[data-theme="arctic-glacier"] {
  color-scheme: light;

  --bg: #f0f7fb;
  --bg-pattern-dot: rgba(2, 132, 199, 0.05);
  --bg-surface: #ffffff;
  --bg-surface-elevated: #e2f0f8;
  --bg-surface-hover: #d3e7f4;
  --bg-card-inner: #f5faff;

  --border-subtle: rgba(2, 132, 199, 0.1);
  --border-strong: rgba(2, 132, 199, 0.2);
  --border-active: rgba(2, 132, 199, 0.4);

  --text-main: #0c2438;
  --text-secondary: #26547c;
  --text-muted: #4c7c9e;
  --text-faint: #8ab0ca;

  --amber: #0284c7;
  --amber-dim: rgba(2, 132, 199, 0.09);
  --amber-border: rgba(2, 132, 199, 0.28);
  --amber-glow: rgba(2, 132, 199, 0.18);

  --emerald: #0d9488;
  --emerald-dim: rgba(16, 185, 129, 0.12);
  --emerald-border: rgba(16, 185, 129, 0.28);

  --cyan: #0284c7;
  --cyan-dim: rgba(56, 189, 248, 0.12);
  --cyan-border: rgba(56, 189, 248, 0.28);

  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --card-shadow-hover: 0 16px 36px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
}

/* 自然诗意与复古终端 — 京都枯山水 (Kyoto Zen Garden) */
[data-theme="kyoto-sand"] {
  color-scheme: light;

  --bg: #eae8e3;
  --bg-pattern-dot: rgba(75, 70, 65, 0.05);
  --bg-surface: #f5f4f0;
  --bg-surface-elevated: #dfded9;
  --bg-surface-hover: #d5d3ce;
  --bg-card-inner: #f0efe9;

  --border-subtle: rgba(80, 75, 70, 0.1);
  --border-strong: rgba(80, 75, 70, 0.2);
  --border-active: rgba(80, 75, 70, 0.38);

  --text-main: #2b2926;
  --text-secondary: #58544e;
  --text-muted: #7e7972;
  --text-faint: #aaa59d;

  --amber: #78716c;
  --amber-dim: rgba(120, 113, 108, 0.1);
  --amber-border: rgba(120, 113, 108, 0.3);
  --amber-glow: rgba(120, 113, 108, 0.2);

  --emerald: #15803d;
  --emerald-dim: rgba(16, 185, 129, 0.12);
  --emerald-border: rgba(16, 185, 129, 0.28);

  --cyan: #0369a1;
  --cyan-dim: rgba(56, 189, 248, 0.12);
  --cyan-border: rgba(56, 189, 248, 0.28);

  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --card-shadow-hover: 0 16px 36px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background-color: var(--bg);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--duration-normal) ease, color var(--duration-normal) ease;
}

body {
  min-height: 100vh;
  background-color: var(--bg);
  background-image: 
    radial-gradient(circle at 50% 0%, var(--amber-dim) 0%, transparent 50%),
    radial-gradient(circle at 85% 40%, var(--cyan-dim) 0%, transparent 40%),
    linear-gradient(to right, var(--bg-pattern-dot) 1px, transparent 1px),
    linear-gradient(to bottom, var(--bg-pattern-dot) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 32px 32px, 32px 32px;
  background-position: 0 0, 0 0, 0 0, 0 0;
  overflow-x: hidden;
  transition: background-color var(--duration-normal) ease;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
}

/* ==========================================================================
   Header & Nav
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: border-color var(--duration-normal) ease, background-color var(--duration-normal) ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
  transition: transform var(--duration-fast) var(--ease-spring);
}

.brand:hover {
  transform: scale(1.02);
}

.brand-icon {
  width: 28px;
  height: 28px;
  background: var(--amber);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 14px;
  box-shadow: 0 2px 10px var(--amber-glow);
  transition: transform var(--duration-spring) var(--ease-spring-bouncy);
}

.brand:hover .brand-icon {
  transform: rotate(-8deg) scale(1.08);
}

.brand-text {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.03em;
}

.brand-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: var(--amber-dim);
  color: var(--amber);
  border: 1px solid var(--amber-border);
  text-transform: uppercase;
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  position: relative;
  transition: color var(--duration-fast) ease;
  padding: 4px 0;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--amber);
  border-radius: var(--radius-full);
  transition: width var(--duration-normal) var(--ease-out-expo);
}

.nav-link:hover {
  color: var(--text-main);
}

.nav-link:hover::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ==========================================================================
   Multi-Palette Switcher Dropdown (5 Design Themes)
   ========================================================================== */
.palette-switcher-wrap {
  position: relative;
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  color: var(--text-main);
  font-size: 16px;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-spring);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  user-select: none;
}

.theme-toggle-btn:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--amber);
  transform: translateY(-1px);
}

.theme-toggle-btn:active {
  transform: scale(0.92);
}

.palette-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  transition: all var(--duration-fast) var(--ease-spring);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  cursor: pointer;
}

.palette-btn:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--amber);
  transform: translateY(-1px);
}

.palette-swatch-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 6px var(--amber-glow);
  display: inline-block;
}

.palette-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 280px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  z-index: 100;
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  pointer-events: none;
  transition: all var(--duration-normal) var(--ease-spring-bouncy);
}

.palette-dropdown.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.palette-dropdown-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  padding: 6px 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.palette-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  transition: background-color var(--duration-fast) ease;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.palette-item:hover {
  background: var(--bg-surface-elevated);
}

.palette-item.active {
  background: var(--bg-surface-hover);
}

.theme-swatch-pair {
  display: flex;
  align-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  overflow: hidden;
  flex-shrink: 0;
}

.theme-swatch-half {
  width: 50%;
  height: 100%;
}

.palette-info {
  display: flex;
  flex-direction: column;
}

.palette-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.palette-desc {
  font-size: 11px;
  color: var(--text-muted);
}

/* ==========================================================================
   Tactile Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  transition: all var(--duration-fast) var(--ease-out-expo);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  user-select: none;
  cursor: pointer;
}

.btn:active {
  transform: scale(0.96) !important;
}

.btn-primary {
  background: var(--text-main);
  color: var(--bg);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}

.btn-amber {
  background: var(--amber);
  color: #fff;
  box-shadow: 0 2px 10px var(--amber-glow);
}

.btn-amber:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--amber-glow);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12.5px;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   Hero & Manifesto Section
   ========================================================================== */
.hero-section {
  padding: clamp(48px, 8vw, 88px) 0 40px;
  text-align: center;
  position: relative;
}

.eyebrow-container {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
  animation: fadeInDown 0.6s var(--ease-out-expo) backwards;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
  animation: pulseGlow 2.5s infinite;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.hero-title {
  font-size: clamp(34px, 5.2vw, 62px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.12;
  color: var(--text-main);
  margin-bottom: 20px;
  animation: fadeInUp 0.7s var(--ease-out-expo) backwards;
  animation-delay: 0.1s;
}

.gradient-text {
  background: linear-gradient(135deg, var(--text-main) 30%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-secondary);
  max-width: 720px;
  margin: 0 auto 36px;
  line-height: 1.65;
  animation: fadeInUp 0.7s var(--ease-out-expo) backwards;
  animation-delay: 0.2s;
}

.hero-subtitle strong {
  color: var(--text-main);
  font-weight: 700;
}

/* ==========================================================================
   Freedom Calculator Card (transitions.dev Number Pop-in)
   ========================================================================== */
.calculator-card {
  max-width: 780px;
  margin: 0 auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  text-align: left;
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
  transition: transform var(--duration-normal) var(--ease-spring), box-shadow var(--duration-normal) ease;
  animation: fadeInUp 0.8s var(--ease-out-expo) backwards;
  animation-delay: 0.3s;
}

.calculator-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
}

.calculator-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--amber) 50%, transparent 100%);
}

.calc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.calc-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  color: var(--text-main);
}

.calc-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 9px;
  background: var(--amber-dim);
  color: var(--amber);
  border: 1px solid var(--amber-border);
  border-radius: var(--radius-full);
  font-weight: 600;
}

.slider-container {
  margin-bottom: 24px;
}

.slider-label {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.slider-value-display {
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--text-main);
  display: inline-block;
  transition: transform var(--duration-fast) var(--ease-spring-bouncy);
}

.custom-range {
  width: 100%;
  height: 8px;
  -webkit-appearance: none;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  outline: none;
  cursor: pointer;
}

.custom-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--amber);
  cursor: pointer;
  box-shadow: 0 2px 8px var(--amber-glow);
  transition: transform var(--duration-fast) var(--ease-spring-bouncy), box-shadow var(--duration-fast) ease;
}

.custom-range::-webkit-slider-thumb:hover {
  transform: scale(1.25);
  box-shadow: 0 4px 14px var(--amber-glow);
}

.calc-results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
}

.result-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.result-label {
  font-size: 11.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
  font-weight: 600;
}

.result-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
  display: inline-block;
  transition: transform var(--duration-fast) var(--ease-spring-bouncy), filter var(--duration-fast) ease;
}

.result-value.accent {
  color: var(--amber);
}

.result-value.popping {
  transform: scale(1.12);
  filter: blur(0.5px);
}

.result-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ==========================================================================
   Section Headers
   ========================================================================== */
.section {
  padding: 64px 0;
  border-top: 1px solid var(--border-subtle);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 36px;
  flex-wrap: wrap;
  gap: 16px;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  font-weight: 700;
}

.section-title {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.03em;
}

.section-desc {
  font-size: 14.5px;
  color: var(--text-secondary);
  max-width: 600px;
  margin-top: 4px;
}

/* ==========================================================================
   Section 1: Atelier Originals (Self-Made Showcase)
   ========================================================================== */
.atelier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 24px;
}

.atelier-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  box-shadow: var(--card-shadow);
  transition: transform var(--duration-spring) var(--ease-spring), border-color var(--duration-normal) ease, box-shadow var(--duration-normal) ease;
}

.atelier-card:hover {
  transform: translateY(-4px) scale(1.006);
  border-color: var(--border-active);
  box-shadow: var(--card-shadow-hover);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
}

.app-icon-wrap {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--amber);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: transform var(--duration-spring) var(--ease-spring-bouncy);
}

.app-icon-wrap.has-img {
  width: 56px;
  height: 56px;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
}

.app-real-icon-img {
  width: 56px;
  height: 56px;
  border-radius: 13px;
  display: block;
  object-fit: cover;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.16));
  transition: transform var(--duration-spring) var(--ease-spring-bouncy), filter var(--duration-fast) ease;
}

.atelier-card:hover .app-real-icon-img {
  transform: scale(1.08) translateY(-2px);
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.22));
}

.atelier-card:hover .app-icon-wrap:not(.has-img) {
  transform: scale(1.1) rotate(4deg);
}

.badge-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  font-weight: 600;
  transition: transform var(--duration-fast) var(--ease-spring);
}

.tag-badge:hover {
  transform: scale(1.05);
}

.tag-badge.original {
  background: var(--cyan-dim);
  color: var(--cyan);
  border-color: var(--cyan-border);
}

.tag-badge.freeze {
  background: var(--amber-dim);
  color: var(--amber);
  border-color: var(--amber-border);
  font-weight: 700;
}

.tag-badge.emerald {
  background: var(--emerald-dim);
  color: var(--emerald);
  border-color: var(--emerald-border);
}

.atelier-card h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.atelier-card p.card-desc {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Warranty Accordion (CSS Grid Smooth Height Interpolation) */
.warranty-badge-box {
  background: var(--bg-card-inner);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 24px;
  transition: border-color var(--duration-normal) ease, background-color var(--duration-normal) ease;
}

.warranty-badge-box:hover {
  border-color: var(--amber);
}

.warranty-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.warranty-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--amber);
}

.warranty-chevron {
  font-size: 11px;
  color: var(--text-muted);
  transition: transform var(--duration-spring) var(--ease-spring-bouncy);
}

.warranty-accordion-wrapper {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--duration-spring) var(--ease-spring);
}

.warranty-accordion-wrapper.open {
  grid-template-rows: 1fr;
}

.warranty-accordion-inner {
  overflow: hidden;
}

.warranty-content {
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-secondary);
  border-top: 1px dashed var(--border-subtle);
  margin-top: 10px;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity var(--duration-normal) var(--ease-out-expo), transform var(--duration-normal) var(--ease-out-expo);
}

.warranty-accordion-wrapper.open .warranty-content {
  opacity: 1;
  transform: translateY(0);
}

.warranty-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
}

.warranty-item span.icon {
  color: var(--emerald);
  font-size: 13px;
  line-height: 1.2;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 12px;
}

.price-display {
  display: flex;
  flex-direction: column;
}

.price-main {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
}

.price-sub {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* ==========================================================================
   Section 2: Curated Shelf
   ========================================================================== */
.controls-bar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}

.search-input-wrap {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  transition: color var(--duration-fast) ease;
}

.search-input {
  width: 100%;
  height: 48px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0 48px 0 44px;
  color: var(--text-main);
  font-size: 14.5px;
  font-family: inherit;
  box-shadow: 0 2px 6px rgba(0,0,0,0.02);
  transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease, transform var(--duration-fast) ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-glow);
  transform: translateY(-1px);
}

.search-input:focus + .search-icon {
  color: var(--amber);
}

.search-shortcut {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  background: var(--bg-surface-elevated);
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  pointer-events: none;
}

.filter-pills-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.pill-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all var(--duration-fast) var(--ease-spring);
  position: relative;
}

.filter-btn:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-main);
  transform: translateY(-1px);
}

.filter-btn:active {
  transform: scale(0.95);
}

.filter-btn.active {
  background: var(--text-main);
  color: var(--bg);
  border-color: var(--text-main);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.curated-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 18px;
}

.tool-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--card-shadow);
  transition: transform var(--duration-spring) var(--ease-spring), border-color var(--duration-normal) ease, box-shadow var(--duration-normal) ease;
  position: relative;
}

.tool-card:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-strong);
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--card-shadow-hover);
}

.tool-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.tool-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  transition: transform var(--duration-spring) var(--ease-spring-bouncy);
}

.tool-card:hover .tool-icon {
  transform: scale(1.1) rotate(-4deg);
}

.tool-icon.has-img {
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
}

.tool-real-icon-img {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: block;
  object-fit: cover;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.14));
  transition: transform var(--duration-spring) var(--ease-spring-bouncy), filter var(--duration-fast) ease;
}

.tool-card:hover .tool-real-icon-img {
  transform: scale(1.1) rotate(-3deg);
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.22));
}

.tool-card h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.tool-author {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.tool-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
}

.tool-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.tool-price {
  font-weight: 700;
  color: var(--text-main);
}

.tool-price.free {
  color: var(--emerald);
}

.tool-date {
  color: var(--text-faint);
}

/* ==========================================================================
   Section 3: Feature Freeze Manifesto
   ========================================================================== */
.manifesto-box {
  background: linear-gradient(135deg, var(--amber-dim) 0%, var(--bg-surface) 100%);
  border: 1px solid var(--amber-border);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 48px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
  box-shadow: var(--card-shadow);
  transition: transform var(--duration-spring) var(--ease-spring);
}

.manifesto-box:hover {
  transform: translateY(-2px);
}

.manifesto-text h3 {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.manifesto-text p {
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.7;
  margin-bottom: 16px;
}

.manifesto-pillars {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pillar-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  transition: all var(--duration-fast) var(--ease-spring);
}

.pillar-item:hover {
  transform: translateX(4px);
  border-color: var(--border-strong);
}

.pillar-item h5 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.pillar-item p {
  font-size: 12.5px;
  color: var(--text-secondary);
}

/* ==========================================================================
   Section 4: The Petition Desk with Microinteractions
   ========================================================================== */
.petition-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.petition-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
  overflow-x: auto;
}

.petition-tab-btn {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast) var(--ease-spring);
}

.petition-tab-btn:hover {
  color: var(--text-main);
  background: var(--bg-surface-elevated);
}

.petition-tab-btn.active {
  color: var(--text-main);
  background: var(--bg-surface-hover);
  font-weight: 700;
}

.petition-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.petition-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: var(--card-shadow);
  transition: transform var(--duration-spring) var(--ease-spring), border-color var(--duration-normal) ease, background-color var(--duration-normal) ease;
}

.petition-card:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.petition-main {
  flex: 1;
}

.petition-header-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.petition-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.petition-status-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.petition-status-badge.building {
  background: var(--cyan-dim);
  color: var(--cyan);
  border: 1px solid var(--cyan-border);
}

.petition-status-badge.searching {
  background: var(--amber-dim);
  color: var(--amber);
  border: 1px solid var(--amber-border);
}

.petition-status-badge.evaluating {
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.petition-status-badge.solved {
  background: var(--emerald-dim);
  color: var(--emerald);
  border: 1px solid var(--emerald-border);
}

.petition-target {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-bottom: 6px;
  font-weight: 600;
}

.petition-reason {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* transitions.dev Spring Upvote Button */
.upvote-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  height: 68px;
  background: var(--bg-card-inner);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 6px;
  cursor: pointer;
  transition: all var(--duration-spring) var(--ease-spring-bouncy);
  user-select: none;
}

.upvote-box:hover {
  background: var(--bg-surface-hover);
  border-color: var(--amber);
  transform: translateY(-3px) scale(1.05);
}

.upvote-box:active {
  transform: scale(0.92);
}

.upvote-box.voted {
  background: var(--amber-dim);
  border-color: var(--amber);
  color: var(--amber);
}

.upvote-icon {
  font-size: 14px;
  line-height: 1;
  transition: transform var(--duration-spring) var(--ease-spring-bouncy);
}

.upvote-box:hover .upvote-icon {
  transform: translateY(-2px);
}

.upvote-count {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 800;
  margin-top: 3px;
  transition: transform var(--duration-fast) var(--ease-spring);
}

.upvote-count.pop {
  animation: numberPop 0.3s var(--ease-spring-bouncy);
}

@keyframes numberPop {
  0% { transform: scale(0.8); }
  50% { transform: scale(1.3); color: var(--amber); }
  100% { transform: scale(1); }
}

/* ==========================================================================
   Modals with transitions.dev Scale & Blur Pop-in
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-normal) var(--ease-out-expo);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  box-shadow: 0 32px 72px rgba(0, 0, 0, 0.35);
  padding: 32px;
  transform: scale(0.92) translateY(12px);
  filter: blur(4px);
  transition: transform var(--duration-spring) var(--ease-spring), filter var(--duration-spring) ease;
  position: relative;
}

.modal-overlay.active .modal-box {
  transform: scale(1) translateY(0);
  filter: blur(0);
}

.modal-close-btn {
  position: absolute;
  right: 18px;
  top: 18px;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-fast) var(--ease-spring);
}

.modal-close-btn:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-main);
  transform: scale(1.1) rotate(90deg);
}

.modal-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
}

.modal-subtitle {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-bottom: 22px;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-input, .form-textarea {
  width: 100%;
  background: var(--bg-card-inner);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 14px;
  transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
}

.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-glow);
}

.form-textarea {
  min-height: 85px;
  resize: vertical;
}

/* Thermal Paper Receipt Modal */
.receipt-paper {
  background: #fbfbf8;
  color: #18181b;
  border-radius: var(--radius-sm);
  padding: 26px;
  font-family: var(--font-mono);
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
  position: relative;
  border: 1px solid rgba(0,0,0,0.1);
  animation: receiptSlide 0.5s var(--ease-spring-bouncy);
}

@keyframes receiptSlide {
  0% { transform: translateY(-30px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.receipt-header {
  text-align: center;
  border-bottom: 1px dashed #a1a1aa;
  padding-bottom: 14px;
  margin-bottom: 14px;
}

.receipt-header h4 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #000;
}

.receipt-body {
  font-size: 13px;
  line-height: 1.6;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.receipt-divider {
  border-bottom: 1px dashed #a1a1aa;
  margin: 10px 0;
}

.receipt-total {
  font-size: 15px;
  font-weight: 800;
  display: flex;
  justify-content: space-between;
  color: #000;
}

.receipt-stamp {
  border: 2px solid #dc2626;
  color: #dc2626;
  padding: 4px 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transform: rotate(-5deg);
  display: inline-block;
  margin-top: 14px;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 48px 0;
  margin-top: 80px;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

/* Keyframe animations */
@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(16px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  0% { opacity: 0; transform: translateY(-12px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Responsive & Mobile Polishing */
@media (max-width: 768px) {
  .header-inner {
    height: 56px;
    gap: 8px;
  }

  .brand-text {
    font-size: 15px;
  }

  .brand-badge {
    display: none;
  }

  .nav-links {
    display: none;
  }

  .header-actions {
    gap: 6px;
  }

  /* Compact header buttons for mobile */
  #btn-open-receipt span {
    display: none;
  }
  #btn-open-receipt {
    padding: 7px 9px;
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  #btn-open-receipt svg {
    margin: 0;
  }

  #btn-open-petition {
    padding: 6px 10px;
    font-size: 11.5px;
    white-space: nowrap;
    height: 36px;
  }

  .theme-toggle-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
  }

  /* Hero adjustments */
  .hero-section {
    padding: 32px 0 28px;
  }

  .eyebrow-container {
    font-size: 10px;
    padding: 4px 10px;
    margin-bottom: 12px;
  }

  .hero-title {
    font-size: clamp(21px, 6vw, 26px);
    line-height: 1.22;
    letter-spacing: -0.03em;
    margin-bottom: 14px;
  }

  .flipping-word-wrap {
    display: inline-block;
    min-width: auto;
  }

  .hero-subtitle {
    font-size: 14px;
    line-height: 1.5;
    padding: 0 4px;
    margin-bottom: 24px;
  }

  /* Freedom Calculator: Crisp horizontal 3-stat display on mobile */
  .calculator-card {
    padding: 18px 14px;
    border-radius: var(--radius-md);
  }

  .calc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    margin-bottom: 12px;
  }

  .calc-title {
    font-size: 13.5px;
    white-space: nowrap;
  }

  .calc-badge {
    font-size: 10px;
    padding: 2px 6px;
    white-space: nowrap;
  }

  .calc-results-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
  }

  .result-item {
    padding: 0;
    background: transparent;
  }

  .result-label {
    font-size: 9.5px;
    letter-spacing: 0.02em;
  }

  .result-value {
    font-size: 18px;
    font-weight: 800;
  }

  .result-sub {
    font-size: 10px;
    line-height: 1.25;
  }

  /* Atelier & Curated Sections */
  .atelier-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .atelier-card {
    padding: 20px 16px;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .manifesto-box {
    grid-template-columns: 1fr;
  }

  /* Petition Desk */
  .petition-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 16px;
  }

  .upvote-box {
    align-self: flex-end;
    margin-top: 8px;
  }

  .palette-dropdown {
    right: -60px;
    width: 260px;
  }
}

/* 22-Palette Gallery Card Styling */
.palette-card-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  text-align: left;
  transition: all var(--duration-fast) var(--ease-spring);
  cursor: pointer;
  width: 100%;
}

.palette-card-item:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--amber);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.palette-card-item:active {
  transform: scale(0.98);
}

.palette-card-item.active {
  border-color: var(--amber);
  box-shadow: 0 0 0 2px var(--amber-glow);
  background: var(--bg-card-inner);
}

/* ==========================================================================
   MOTION SYSTEM — 5 signature animations (transitions.dev calibrated)
   ========================================================================== */

/* 1. Scroll reveal choreography */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 700ms var(--ease-out-expo), transform 700ms var(--ease-out-expo);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero staged entrance */
.hero-line {
  display: inline-block;
  opacity: 0;
  transform: translateY(18px);
  animation: heroLineIn 780ms var(--ease-out-expo) forwards;
}
.hero-line:nth-child(1) { animation-delay: 80ms; }
.hero-line:nth-child(2) { animation-delay: 180ms; }

@keyframes heroLineIn {
  to { opacity: 1; transform: translateY(0); }
}

.eyebrow-container { opacity: 0; animation: heroLineIn 620ms var(--ease-out-expo) 20ms forwards; }
.hero-subtitle { opacity: 0; animation: heroLineIn 700ms var(--ease-out-expo) 280ms forwards; }
.calculator-card { opacity: 0; transform: translateY(20px) scale(0.985); animation: calcIn 820ms var(--ease-spring) 380ms forwards; }
@keyframes calcIn {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 2. Flipping word in hero */
.flipping-word-wrap {
  display: inline-block;
  position: relative;
  vertical-align: baseline;
  min-width: 5.2ch;
  text-align: left;
}
.flipping-word {
  display: inline-block;
  color: var(--amber);
  transition: transform 380ms var(--ease-spring), opacity 260ms ease, filter 260ms ease;
  will-change: transform, opacity, filter;
}
.flipping-word.out {
  opacity: 0;
  transform: translateY(-70%) scale(0.96);
  filter: blur(6px);
}
.flipping-word.in {
  opacity: 0;
  transform: translateY(70%) scale(0.96);
  filter: blur(6px);
}

/* 3. Odometer digit roll */
.odometer {
  display: inline-flex;
  align-items: baseline;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}
.odometer-col {
  display: inline-block;
  height: 1em;
  line-height: 1em;
  overflow: hidden;
  vertical-align: baseline;
}
.odometer-track {
  display: flex;
  flex-direction: column;
  transition: transform 560ms var(--ease-spring);
  will-change: transform;
}
.odometer-track > span {
  display: block;
  height: 1em;
  line-height: 1em;
  text-align: center;
}
.odometer-static {
  display: inline-block;
  vertical-align: baseline;
}

/* 4. Warranty accordion inner grid + stroke-draw checks + stamp */
.warranty-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-subtle);
}
.warranty-cell {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 420ms var(--ease-out-expo), transform 420ms var(--ease-out-expo);
}
.warranty-accordion-wrapper.open .warranty-cell {
  opacity: 1;
  transform: translateY(0);
}
.warranty-accordion-wrapper.open .warranty-cell:nth-child(1) { transition-delay: 60ms; }
.warranty-accordion-wrapper.open .warranty-cell:nth-child(2) { transition-delay: 120ms; }
.warranty-accordion-wrapper.open .warranty-cell:nth-child(3) { transition-delay: 180ms; }
.warranty-accordion-wrapper.open .warranty-cell:nth-child(4) { transition-delay: 240ms; }

.warranty-cell .num {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--amber);
  opacity: 0.75;
  padding-top: 1px;
  letter-spacing: 0.04em;
}
.warranty-cell .txt { font-size: 12.5px; line-height: 1.5; color: var(--text-secondary); }
.warranty-cell .txt strong { color: var(--text-main); font-weight: 700; }

.check-icon { flex-shrink: 0; margin-top: 2px; }
.check-icon path {
  stroke: var(--emerald);
  stroke-width: 2.4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  transition: stroke-dashoffset 520ms var(--ease-out-expo);
}
.warranty-accordion-wrapper.open .check-icon path { stroke-dashoffset: 0; }
.warranty-accordion-wrapper.open .warranty-cell:nth-child(2) .check-icon path { transition-delay: 120ms; }
.warranty-accordion-wrapper.open .warranty-cell:nth-child(3) .check-icon path { transition-delay: 180ms; }
.warranty-accordion-wrapper.open .warranty-cell:nth-child(4) .check-icon path { transition-delay: 240ms; }

/* Wax-stamp freeze seal */
.freeze-stamp {
  position: absolute;
  right: 22px;
  bottom: 76px;
  padding: 5px 10px;
  border: 2px solid var(--amber);
  border-radius: 4px;
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.25;
  text-align: center;
  transform: rotate(-7deg) scale(1.55);
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 0 0 1px var(--amber-dim) inset;
  transition: transform 420ms var(--ease-spring-bouncy), opacity 200ms ease;
  background: var(--bg-surface);
}
.warranty-accordion-wrapper.open ~ .freeze-stamp,
.atelier-card.stamped .freeze-stamp {
  opacity: 0.92;
  transform: rotate(-7deg) scale(1);
}

/* 5. Sliding pill indicator */
.sliding-pill-group { position: relative; }
.sliding-pill-indicator {
  position: absolute;
  top: 50%;
  left: 0;
  height: 30px;
  width: 0;
  transform: translateY(-50%) translateX(0);
  border-radius: var(--radius-full);
  background: var(--text-main);
  opacity: 0;
  transition: transform 400ms var(--ease-spring), width 400ms var(--ease-spring), opacity 180ms ease;
  pointer-events: none;
  z-index: 0;
}
.sliding-pill-indicator.ready { opacity: 0.1; }
.sliding-pill-group .filter-btn { position: relative; z-index: 1; }
.sliding-pill-group .filter-btn.active {
  background: transparent;
  border-color: transparent;
  color: var(--bg);
  box-shadow: none;
}

/* Floating +1 on upvote */
.float-plus-one {
  position: fixed;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 15px;
  color: var(--amber);
  pointer-events: none;
  z-index: 9999;
  animation: floatUp 900ms var(--ease-out-expo) forwards;
  text-shadow: 0 2px 10px var(--amber-glow);
}
@keyframes floatUp {
  0%   { opacity: 0; transform: translate(-50%, 0) scale(0.7); }
  25%  { opacity: 1; transform: translate(-50%, -14px) scale(1.12); }
  100% { opacity: 0; transform: translate(-50%, -58px) scale(1); }
}

/* Grid card stagger on filter change */
.tool-card {
  animation: cardIn 420ms var(--ease-out-expo) backwards;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(10px) scale(0.99); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Theme switch wipe */
.theme-wipe {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background: var(--bg);
  opacity: 0;
  transition: opacity 180ms ease;
}
.theme-wipe.active { opacity: 0.55; }

/* Reduced motion: strip all decorative motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-line, .eyebrow-container, .hero-subtitle, .calculator-card { opacity: 1; transform: none; }
}

/* 6. Spotlight cursor glow on atelier cards */
.atelier-card {
  --spot-x: 50%;
  --spot-y: 50%;
}
.atelier-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--spot-x) var(--spot-y), var(--amber-glow), transparent 65%);
  opacity: 0;
  transition: opacity 320ms ease;
  pointer-events: none;
  z-index: 0;
}
.atelier-card:hover::before { opacity: 0.65; }
.atelier-card > * { position: relative; z-index: 1; }

/* 44x44px touch targets on icon buttons */
.theme-toggle-btn {
  position: relative;
}
.theme-toggle-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
}

/* Thermal receipt tear edge */
.receipt-paper::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 0;
  right: 0;
  height: 6px;
  background: radial-gradient(circle, transparent 4px, #fbfbf8 4.5px);
  background-size: 10px 10px;
}

/* ==========================================================================
   Honest Economics Card Styling
   ========================================================================== */
.economics-card {
  margin-top: 36px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 36px);
  box-shadow: var(--card-shadow);
  transition: transform var(--duration-spring) var(--ease-spring), border-color var(--duration-fast) ease;
}

.economics-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.economics-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 12px;
}

.economics-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.economics-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 10px;
  background: var(--emerald-dim);
  color: var(--emerald);
  border: 1px solid var(--emerald-border);
  border-radius: var(--radius-full);
  font-weight: 600;
  text-transform: uppercase;
}

.economics-intro {
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.economics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.economics-item {
  background: var(--bg-card-inner);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: all var(--duration-fast) var(--ease-spring);
}

.economics-item:hover {
  transform: translateY(-2px);
  border-color: var(--amber-border);
  background: var(--bg-surface-elevated);
}

.economics-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.economics-item h5 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.economics-item p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .economics-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .economics-card {
    padding: 20px 16px;
    margin-top: 24px;
  }
}
