/* ═══════════════════════════════════════════════════════════════════
   AaaS "Carved Logic" Design System — Centralized Template Base
   ─────────────────────────────────────────────────────────────────
   SINGLE SOURCE OF TRUTH for all Business Startup Toolbox templates.
   Every template <link>s this file. No inline token duplication.
   Settings are controlled from index.html → stored in localStorage
   → read by template-base.js on every page load.

   Supports: style presets (data-style), custom palettes (inline vars),
   light/dark themes (data-theme).
   ═══════════════════════════════════════════════════════════════════ */

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

/* ══════════════════════════════════════════════════════
   SECTION 1 — THEME TOKENS (light / dark)
   ══════════════════════════════════════════════════════ */

/* ── Light Theme (default / leading) ────────────────── */
:root, [data-theme="light"] {
    /* Surfaces — white-first, warm gray progression */
    --bg:            #ffffff;
    --bg-secondary:  #f7f7f6;
    --bg-tertiary:   #efefed;
    --bg-card:       #ffffff;
    --bg-hover:      #f2f2f1;
    --bg-accent:     rgba(0,136,160,0.05);

    /* Text — black/gray spectrum, no colored text */
    --text:          #111113;
    --text-secondary: rgba(17,17,19,0.62);
    --text-muted:    rgba(17,17,19,0.38);

    /* Borders — subtle, structural */
    --border:        rgba(0,0,0,0.08);
    --border-strong: rgba(0,0,0,0.15);

    /* Accent — structural use only (borders, fills), never text */
    --circuit:       #0088A0;
    --circuit-dim:   rgba(0,136,160,0.08);
    --accent-red:    #C9335A;
    --accent-red-dim:rgba(201,51,90,0.06);

    /* Semantic status */
    --success:       #2a9d6a;
    --success-dim:   rgba(42,157,106,0.08);
    --warning:       #c98a2e;
    --warning-dim:   rgba(201,138,46,0.08);
    --danger:        #c93a3a;
    --danger-dim:    rgba(201,58,58,0.08);

    /* Elevation */
    --shadow-xs:     0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm:     0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
    --shadow-md:     0 4px 12px rgba(0,0,0,0.06);
    --shadow-lg:     0 12px 32px rgba(0,0,0,0.08);

    /* Glass */
    --glass-bg:      rgba(255,255,255,0.82);
    --glass-border:  rgba(255,255,255,0.6);
    --glass-inset:   inset 0 1px 0 rgba(255,255,255,0.8);
    --card-glow:     none;

    /* Grain overlay — off in light */
    --grain-opacity: 0;

    /* Geometry */
    --radius:        0.5rem;
    --radius-sm:     0.25rem;
    --radius-md:     0.5rem;
    --radius-lg:     0.75rem;

    /* Typography */
    --sans:          'Inter', system-ui, -apple-system, sans-serif;
    --mono:          'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

    /* Motion */
    --ease:          cubic-bezier(0.23, 1, 0.32, 1);
    --duration:      0.2s;
}

/* ── Dark Theme — Basalt Surface System ──────────────── */
[data-theme="dark"] {
    --bg:            #080809;
    --bg-secondary:  #111113;
    --bg-tertiary:   #1a1a1c;
    --bg-card:       rgba(26,26,28,0.65);
    --bg-hover:      #242426;
    --bg-accent:     rgba(0,243,255,0.05);

    --text:          #e0e0de;
    --text-secondary: rgba(224,224,222,0.55);
    --text-muted:    rgba(224,224,222,0.30);

    --border:        rgba(255,255,255,0.06);
    --border-strong: rgba(255,255,255,0.12);

    --circuit:       #00d4e6;
    --circuit-dim:   rgba(0,212,230,0.10);
    --accent-red:    #F43F6C;
    --accent-red-dim:rgba(244,63,108,0.10);

    --success:       #34d399;
    --success-dim:   rgba(52,211,153,0.10);
    --warning:       #fbbf24;
    --warning-dim:   rgba(251,191,36,0.10);
    --danger:        #f87171;
    --danger-dim:    rgba(248,113,113,0.10);

    --shadow-xs:     none;
    --shadow-sm:     none;
    --shadow-md:     0 4px 20px rgba(0,0,0,0.4);
    --shadow-lg:     0 12px 40px rgba(0,0,0,0.5);

    --glass-bg:      rgba(26,26,28,0.65);
    --glass-border:  rgba(255,255,255,0.06);
    --glass-inset:   inset 0 1px 0 rgba(255,255,255,0.04);
    --card-glow:     0 0 24px rgba(255,255,255,0.02);

    --grain-opacity: 0.35;
}


/* ══════════════════════════════════════════════════════
   SECTION 2 — STYLE PRESETS
   ──────────────────────────────────────────────────────
   Each preset overrides only the tokens it needs to
   change. The theme (light/dark) layer sits underneath.
   Precedence: inline palette > preset > theme > :root
   ══════════════════════════════════════════════════════ */

/* ── Tech — Sharp, monospace-heavy, neon-cyan accent ── */
[data-style="tech"] {
    --circuit:       #00e5ff;
    --circuit-dim:   rgba(0,229,255,0.08);
    --accent-red:    #ff3d71;
    --accent-red-dim:rgba(255,61,113,0.06);
    --radius:        0.25rem;
    --radius-sm:     0.125rem;
    --radius-md:     0.25rem;
    --radius-lg:     0.375rem;
    --sans:          'JetBrains Mono', 'SF Mono', monospace;
    --mono:          'JetBrains Mono', 'SF Mono', monospace;
}
[data-style="tech"][data-theme="light"] {
    --bg:            #f8f9fb;
    --bg-secondary:  #f0f2f5;
    --bg-tertiary:   #e4e7ec;
    --bg-card:       #ffffff;
    --circuit:       #0097a7;
    --circuit-dim:   rgba(0,151,167,0.08);
}
[data-style="tech"][data-theme="dark"] {
    --bg:            #0a0b0e;
    --bg-secondary:  #12141a;
    --bg-tertiary:   #1a1d26;
    --bg-card:       rgba(18,20,26,0.75);
    --circuit:       #00e5ff;
    --circuit-dim:   rgba(0,229,255,0.10);
    --grain-opacity: 0.45;
}

/* ── SaaS — Clean, rounded, friendly purple-blue ───── */
[data-style="saas"] {
    --circuit:       #6366f1;
    --circuit-dim:   rgba(99,102,241,0.08);
    --accent-red:    #f43f5e;
    --accent-red-dim:rgba(244,63,94,0.06);
    --radius:        0.75rem;
    --radius-sm:     0.375rem;
    --radius-md:     0.75rem;
    --radius-lg:     1rem;
    --success:       #10b981;
    --success-dim:   rgba(16,185,129,0.08);
}
[data-style="saas"][data-theme="light"] {
    --bg:            #fafaff;
    --bg-secondary:  #f4f4ff;
    --bg-tertiary:   #ecedf8;
    --bg-card:       #ffffff;
}
[data-style="saas"][data-theme="dark"] {
    --bg:            #0c0a15;
    --bg-secondary:  #13111d;
    --bg-tertiary:   #1c1929;
    --bg-card:       rgba(19,17,29,0.70);
    --circuit:       #818cf8;
    --circuit-dim:   rgba(129,140,248,0.12);
}

/* ── Modern Business — Professional, refined, navy ──── */
[data-style="business"] {
    --circuit:       #1e40af;
    --circuit-dim:   rgba(30,64,175,0.08);
    --accent-red:    #b91c1c;
    --accent-red-dim:rgba(185,28,28,0.06);
    --radius:        0.375rem;
    --radius-sm:     0.1875rem;
    --radius-md:     0.375rem;
    --radius-lg:     0.5rem;
    --sans:          'Inter', 'Georgia', serif;
}
[data-style="business"][data-theme="light"] {
    --bg:            #fafbfc;
    --bg-secondary:  #f3f5f7;
    --bg-tertiary:   #e8ecf0;
    --bg-card:       #ffffff;
    --text:          #0f172a;
    --text-secondary: rgba(15,23,42,0.65);
    --text-muted:    rgba(15,23,42,0.40);
}
[data-style="business"][data-theme="dark"] {
    --bg:            #0b0e14;
    --bg-secondary:  #111827;
    --bg-tertiary:   #1e293b;
    --bg-card:       rgba(17,24,39,0.70);
    --circuit:       #60a5fa;
    --circuit-dim:   rgba(96,165,250,0.12);
}

/* ── Consultancy — Minimal, restrained, warm-gray ───── */
[data-style="consultancy"] {
    --circuit:       #78716c;
    --circuit-dim:   rgba(120,113,108,0.08);
    --accent-red:    #a16207;
    --accent-red-dim:rgba(161,98,7,0.06);
    --radius:        0.1875rem;
    --radius-sm:     0.0625rem;
    --radius-md:     0.1875rem;
    --radius-lg:     0.25rem;
    --sans:          'Inter', system-ui, sans-serif;
}
[data-style="consultancy"][data-theme="light"] {
    --bg:            #fafaf8;
    --bg-secondary:  #f5f5f0;
    --bg-tertiary:   #ecece6;
    --bg-card:       #fafaf8;
    --text:          #1c1917;
    --text-secondary: rgba(28,25,23,0.60);
    --text-muted:    rgba(28,25,23,0.35);
    --border:        rgba(0,0,0,0.06);
    --border-strong: rgba(0,0,0,0.12);
}
[data-style="consultancy"][data-theme="dark"] {
    --bg:            #0c0b09;
    --bg-secondary:  #171614;
    --bg-tertiary:   #211f1b;
    --bg-card:       rgba(23,22,20,0.70);
    --circuit:       #a8a29e;
    --circuit-dim:   rgba(168,162,158,0.10);
    --accent-red:    #eab308;
    --accent-red-dim:rgba(234,179,8,0.08);
}

/* ── Creative — Bold, vibrant, playful ──────────────── */
[data-style="creative"] {
    --circuit:       #e11d48;
    --circuit-dim:   rgba(225,29,72,0.08);
    --accent-red:    #7c3aed;
    --accent-red-dim:rgba(124,58,237,0.06);
    --radius:        1rem;
    --radius-sm:     0.5rem;
    --radius-md:     1rem;
    --radius-lg:     1.5rem;
    --success:       #059669;
    --success-dim:   rgba(5,150,105,0.08);
}
[data-style="creative"][data-theme="light"] {
    --bg:            #fffbf5;
    --bg-secondary:  #fef5ed;
    --bg-tertiary:   #fdede0;
    --bg-card:       #ffffff;
}
[data-style="creative"][data-theme="dark"] {
    --bg:            #110a0a;
    --bg-secondary:  #1a1010;
    --bg-tertiary:   #261616;
    --bg-card:       rgba(26,16,16,0.70);
    --circuit:       #fb7185;
    --circuit-dim:   rgba(251,113,133,0.12);
}

/* ── Finance — Traditional, structured, green ─────── */
[data-style="finance"] {
    --circuit:       #166534;
    --circuit-dim:   rgba(22,101,52,0.08);
    --accent-red:    #991b1b;
    --accent-red-dim:rgba(153,27,27,0.06);
    --radius:        0.25rem;
    --radius-sm:     0.125rem;
    --radius-md:     0.25rem;
    --radius-lg:     0.375rem;
    --sans:          'Inter', system-ui, sans-serif;
    --success:       #15803d;
    --success-dim:   rgba(21,128,61,0.08);
}
[data-style="finance"][data-theme="light"] {
    --bg:            #fafdfb;
    --bg-secondary:  #f0faf4;
    --bg-tertiary:   #e0f2e8;
    --bg-card:       #ffffff;
    --text:          #052e16;
    --text-secondary: rgba(5,46,22,0.62);
    --text-muted:    rgba(5,46,22,0.38);
}
[data-style="finance"][data-theme="dark"] {
    --bg:            #020c04;
    --bg-secondary:  #071a0d;
    --bg-tertiary:   #0d2a16;
    --bg-card:       rgba(7,26,13,0.70);
    --circuit:       #4ade80;
    --circuit-dim:   rgba(74,222,128,0.12);
}

/* ── Startup — Energetic, gradient-forward, orange ─── */
[data-style="startup"] {
    --circuit:       #ea580c;
    --circuit-dim:   rgba(234,88,12,0.08);
    --accent-red:    #7c2d12;
    --accent-red-dim:rgba(124,45,18,0.06);
    --radius:        0.625rem;
    --radius-sm:     0.3125rem;
    --radius-md:     0.625rem;
    --radius-lg:     0.875rem;
    --success:       #16a34a;
    --success-dim:   rgba(22,163,74,0.08);
}
[data-style="startup"][data-theme="light"] {
    --bg:            #fffcf5;
    --bg-secondary:  #fef7ec;
    --bg-tertiary:   #feefd6;
    --bg-card:       #ffffff;
}
[data-style="startup"][data-theme="dark"] {
    --bg:            #0f0906;
    --bg-secondary:  #1a110a;
    --bg-tertiary:   #271a0e;
    --bg-card:       rgba(26,17,10,0.70);
    --circuit:       #fb923c;
    --circuit-dim:   rgba(251,146,60,0.12);
}


/* ══════════════════════════════════════════════════════
   SECTION 3 — BASE STYLES
   ══════════════════════════════════════════════════════ */

/* ── Base Body ──────────────────────────────────────── */
body {
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
}

/* Grain texture overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
    opacity: var(--grain-opacity);
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 9999;
}

/* ── Typography ─────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--sans);
    font-weight: 700;
    line-height: 1.25;
    color: var(--text);
    letter-spacing: -0.02em;
}
h1 { font-size: 1.875rem; }
h2 { font-size: 1.375rem; margin-top: 2rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.1rem; margin-top: 1.5rem; margin-bottom: 0.5rem; }
h4 { font-size: 0.95rem; }

p { margin-bottom: 0.75rem; color: var(--text-secondary); }
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--text-secondary); }
strong { font-weight: 600; color: var(--text); }
small, .meta { font-size: 0.8rem; color: var(--text-muted); }
code { font-family: var(--mono); font-size: 0.85em; background: var(--bg-tertiary); padding: 0.1rem 0.35rem; border-radius: var(--radius-sm); }

/* ── Layout ──────────────────────────────────────────── */
.container       { max-width: 1100px; margin: 0 auto; padding: 2rem; }
.container-wide  { max-width: 1400px; margin: 0 auto; padding: 2rem; }
.container-narrow{ max-width: 800px; margin: 0 auto; padding: 2rem; }

/* ── Toolbar ─────────────────────────────────────────── */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 1.5rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.toolbar-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
    letter-spacing: -0.01em;
}
.toolbar-actions { display: flex; gap: 0.375rem; align-items: center; }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.45rem 0.875rem;
    border-radius: var(--radius);
    font-size: 0.825rem;
    font-weight: 500;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all var(--duration) var(--ease);
    font-family: var(--sans);
    background: transparent;
    color: var(--text-secondary);
    line-height: 1.4;
}
.btn:hover { background: var(--bg-hover); color: var(--text); border-color: var(--border-strong); }
.btn-primary { background: var(--text); color: var(--bg); border-color: transparent; }
.btn-primary:hover { opacity: 0.88; }
.btn-ghost { border: none; }
.btn-ghost:hover { background: var(--bg-hover); }
.btn-sm { padding: 0.3rem 0.625rem; font-size: 0.775rem; }
.btn-xs { padding: 0.2rem 0.5rem; font-size: 0.725rem; }
.btn-icon { padding: 0.4rem; border-radius: var(--radius); aspect-ratio: 1; }

/* ── Cards ───────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    transition: all var(--duration) var(--ease);
    box-shadow: var(--shadow-xs);
}
.card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md), var(--card-glow);
}
[data-theme="dark"] .card {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.card-grid   { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0.75rem; }
.card-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.card-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }

/* ── Tables ──────────────────────────────────────────── */
.table-wrap { overflow-x: auto; margin: 1rem 0; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
thead th {
    font-family: var(--mono);
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    padding: 0.625rem 0.875rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
}
tbody td {
    padding: 0.625rem 0.875rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    color: var(--text-secondary);
}
tbody tr:hover { background: var(--bg-hover); }

/* ── Forms ───────────────────────────────────────────── */
.form-group { margin-bottom: 0.875rem; }
.form-label {
    display: block;
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}
.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--sans);
    font-size: 0.875rem;
    color: var(--text);
    background: var(--bg);
    transition: border-color var(--duration) var(--ease);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--border-strong);
    box-shadow: 0 0 0 3px var(--circuit-dim);
}
.form-textarea { min-height: 72px; resize: vertical; }

/* ── Badges ──────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    border-radius: 100px;
    font-family: var(--mono);
    font-size: 0.675rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}
.badge-neutral  { background: var(--bg-tertiary); color: var(--text-muted); }
.badge-success  { background: var(--success-dim); color: var(--success); }
.badge-warning  { background: var(--warning-dim); color: var(--warning); }
.badge-danger   { background: var(--danger-dim); color: var(--danger); }

/* ── Tabs ────────────────────────────────────────────── */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}
.tab {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all var(--duration) var(--ease);
    background: none;
    border-top: none; border-left: none; border-right: none;
    font-family: var(--sans);
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--text); }
[data-theme="dark"] .tab.active { border-bottom-color: var(--circuit); color: var(--text); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Sections ────────────────────────────────────────── */
.section { margin-bottom: 2rem; }
.section-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}
.section-label {
    font-family: var(--mono);
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.375rem;
}

/* ── Placeholders ────────────────────────────────────── */
.ph {
    background: var(--circuit-dim);
    border: 1px dashed var(--border-strong);
    padding: 0.05rem 0.3rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    color: var(--text);
    font-size: 0.875em;
}

/* ── Theme Toggle ────────────────────────────────────── */
.theme-toggle {
    width: 34px;
    height: 34px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration) var(--ease);
    color: var(--text-muted);
    padding: 0;
}
.theme-toggle:hover { border-color: var(--border-strong); color: var(--text); background: var(--bg-hover); }
.theme-toggle svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; }

/* ── Dark Theme Toggle ───────────────────────────────── */
[data-theme="dark"] .theme-toggle { background: var(--bg-secondary); border-color: var(--border-strong); }
[data-theme="dark"] .theme-toggle::after { left: 24px; background-color: var(--bg-secondary); }

/* ── Dark Placeholders ──────────────────────────────── */
[data-theme="dark"] .ph {
    background: var(--circuit-dim);
    color: var(--text);
    border-color: var(--border-strong);
}

/* ── Dark Semantic Badges ───────────────────────────── */
[data-theme="dark"] .wcag-pass, [data-theme="dark"] .status-pass { background-color: var(--success-dim); color: var(--success); }
[data-theme="dark"] .wcag-fail, [data-theme="dark"] .status-fail { background-color: var(--danger-dim); color: var(--danger); }
[data-theme="dark"] .disclaimer { border-left-color: var(--circuit); }

/* ── Accent Box ──────────────────────────────────────── */
.accent-box {
    background: var(--bg-secondary);
    border-left: 2px solid var(--border-strong);
    padding: 0.875rem 1.125rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 1rem 0;
}
.accent-box p:last-child { margin-bottom: 0; }

/* ── Progress ────────────────────────────────────────── */
.progress-bar {
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: var(--text);
    border-radius: 2px;
    transition: width 0.3s var(--ease);
}
[data-theme="dark"] .progress-fill { background: var(--circuit); }

/* ── Kinetic Bar ─────────────────────────────────────── */
.kinetic-bar {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
    position: relative;
    overflow: hidden;
}
[data-theme="dark"] .kinetic-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    width: 100px;
    background: var(--circuit);
    filter: blur(3px);
    animation: kinetic-sweep 6s var(--ease) infinite;
}
@keyframes kinetic-sweep {
    0%   { transform: translateX(-100px); }
    100% { transform: translateX(calc(100vw + 100px)); }
}

/* ── Lucide icon sizing ──────────────────────────────── */
.icon { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.125em; flex-shrink: 0; }
.icon-sm { width: 14px; height: 14px; }
.icon-lg { width: 20px; height: 20px; }
.icon-xl { width: 24px; height: 24px; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
    .container, .container-wide { padding: 1rem; }
    .card-grid-3, .card-grid-2 { grid-template-columns: 1fr; }
    .toolbar { padding: 0.5rem 1rem; }
    h1 { font-size: 1.5rem; }
}

/* ── Print ───────────────────────────────────────────── */
@media print {
    .toolbar, .theme-toggle, .no-print, .settings-panel { display: none !important; }
    body { background: #fff !important; color: #000 !important; }
    body::before { display: none !important; }
    .card { break-inside: avoid; border: 1px solid #ddd !important; box-shadow: none !important; }
}

/* ── Reduced Motion ──────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
