/* =========================================================================
   Corporate Design System
   Verbindliche Tokens und Komponenten — wird in allen Projekten verwendet.
   Aenderungen hier wirken sich auf alle Folgeprojekte aus.
   ========================================================================= */

/* -------------------------------------------------------------------------
   1) Design Tokens
   ------------------------------------------------------------------------- */
:root {
    /* Brand (Forest Green) — abgeleitet von --brand-500 = #356e35 (User-Vorgabe) */
    --brand-50:  #f3f8f3;
    --brand-100: #e1efe1;
    --brand-200: #c2dfc2;
    --brand-300: #94c694;
    --brand-400: #5fa85f;
    --brand-500: #356e35;
    --brand-600: #2c5c2c;
    --brand-700: #244a24;
    --brand-800: #1c391c;
    --brand-900: #162a16;

    /* Accent (Violet) */
    --accent-400: #a78bfa;
    --accent-500: #8b5cf6;
    --accent-600: #7c3aed;

    /* Status */
    --success-400: #34d399;
    --success-500: #10b981;
    --success-600: #059669;
    --warning-400: #fbbf24;
    --warning-500: #f59e0b;
    --warning-600: #d97706;
    --danger-400:  #f87171;
    --danger-500:  #ef4444;
    --danger-600:  #dc2626;
    --info-500:    #3b82f6;

    /* Neutral scale */
    --gray-50:  #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --gray-950: #020617;

    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, system-ui, sans-serif;
    --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono",
                 Consolas, "Liberation Mono", Menlo, monospace;

    --fs-xs:   0.75rem;   /* 12 */
    --fs-sm:   0.875rem;  /* 14 */
    --fs-base: 1rem;      /* 16 */
    --fs-md:   1.125rem;  /* 18 */
    --fs-lg:   1.25rem;   /* 20 */
    --fs-xl:   1.5rem;    /* 24 */
    --fs-2xl:  1.875rem;  /* 30 */
    --fs-3xl:  2.25rem;   /* 36 */
    --fs-4xl:  3rem;      /* 48 */

    --fw-regular:  400;
    --fw-medium:   500;
    --fw-semibold: 600;
    --fw-bold:     700;

    --lh-tight:  1.2;
    --lh-base:   1.5;
    --lh-loose:  1.75;

    /* Spacing (4px base) */
    --sp-0:  0;
    --sp-1:  0.25rem;
    --sp-2:  0.5rem;
    --sp-3:  0.75rem;
    --sp-4:  1rem;
    --sp-5:  1.25rem;
    --sp-6:  1.5rem;
    --sp-8:  2rem;
    --sp-10: 2.5rem;
    --sp-12: 3rem;
    --sp-16: 4rem;
    --sp-20: 5rem;

    /* Radii */
    --radius-xs:   4px;
    --radius-sm:   6px;
    --radius-md:   10px;
    --radius-lg:   16px;
    --radius-xl:   24px;
    --radius-pill: 9999px;

    /* Borders */
    --border-w: 1px;

    /* Layout */
    --container-max: 1200px;
    --container-pad: var(--sp-6);
    --content-max:   880px;

    /* Transitions */
    --t-fast: 120ms cubic-bezier(.2,.0,.2,1);
    --t-base: 200ms cubic-bezier(.2,.0,.2,1);
    --t-slow: 320ms cubic-bezier(.2,.0,.2,1);

    /* Z-Index */
    --z-base:     1;
    --z-dropdown: 100;
    --z-sticky:   200;
    --z-modal:    1000;
    --z-toast:    1100;
}

/* -------------------------------------------------------------------------
   2) Theme: Dark (default) & Light
   ------------------------------------------------------------------------- */
:root,
[data-theme="dark"] {
    color-scheme: dark;
    --bg:           var(--gray-950);
    --bg-gradient:  radial-gradient(ellipse at top, rgba(95,168,95,.12), transparent 50%),
                    radial-gradient(ellipse at bottom right, rgba(139,92,246,.06), transparent 60%),
                    var(--gray-950);
    --surface-1:    rgba(30, 41, 59, .55);    /* glass card */
    --surface-2:    rgba(30, 41, 59, .85);    /* solid card */
    --surface-3:    var(--gray-800);
    --border:       rgba(148, 163, 184, .14);
    --border-strong:rgba(148, 163, 184, .28);
    --text:         #e2e8f0;
    --text-muted:   #94a3b8;
    --text-soft:    #64748b;
    --link:         var(--brand-300);
    --link-hover:   var(--brand-200);
    --shadow-sm:    0 1px 2px rgba(0,0,0,.30);
    --shadow-md:    0 4px 16px rgba(0,0,0,.35);
    --shadow-lg:    0 24px 60px rgba(0,0,0,.45);
    --glow-brand:   0 0 0 1px rgba(95,168,95,.38), 0 0 24px rgba(53,110,53,.28);
    --input-bg:     rgba(15, 23, 42, .65);
    --input-border: rgba(148,163,184,.20);
    --input-focus:  var(--brand-400);
}

[data-theme="light"] {
    color-scheme: light;
    --bg:           #f7faf7;
    --bg-gradient:  radial-gradient(ellipse at top, rgba(53,110,53,.10), transparent 50%),
                    radial-gradient(ellipse at bottom right, rgba(139,92,246,.05), transparent 60%),
                    #f7faf7;
    --surface-1:    rgba(255,255,255,.75);
    --surface-2:    #ffffff;
    --surface-3:    var(--gray-100);
    --border:       rgba(15,23,42,.08);
    --border-strong:rgba(15,23,42,.18);
    --text:         var(--gray-900);
    --text-muted:   var(--gray-600);
    --text-soft:    var(--gray-500);
    --link:         var(--brand-700);
    --link-hover:   var(--brand-800);
    --shadow-sm:    0 1px 2px rgba(15,23,42,.06);
    --shadow-md:    0 8px 24px rgba(15,23,42,.08);
    --shadow-lg:    0 24px 60px rgba(15,23,42,.12);
    --glow-brand:   0 0 0 1px rgba(53,110,53,.30), 0 0 18px rgba(53,110,53,.18);
    --input-bg:     #ffffff;
    --input-border: rgba(15,23,42,.12);
    --input-focus:  var(--brand-500);
}

/* -------------------------------------------------------------------------
   3) Reset & Base
   ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    line-height: var(--lh-base);
    color: var(--text);
    background: var(--bg-gradient);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img, svg, video { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
::selection { background: var(--brand-500); color: white; }

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 var(--sp-4);
    line-height: var(--lh-tight);
    font-weight: var(--fw-semibold);
    letter-spacing: -0.01em;
}
h1 { font-size: var(--fs-3xl); font-weight: var(--fw-bold); letter-spacing: -0.02em; }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }
p  { margin: 0 0 var(--sp-4); color: var(--text-muted); }

code, kbd, samp, pre { font-family: var(--font-mono); }

/* -------------------------------------------------------------------------
   4) Layout primitives
   ------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-pad);
}
.container-narrow {
    width: 100%;
    max-width: var(--content-max);
    margin-inline: auto;
    padding-inline: var(--container-pad);
}
.stack > * + * { margin-top: var(--sp-4); }
.stack-sm > * + * { margin-top: var(--sp-2); }
.stack-lg > * + * { margin-top: var(--sp-6); }
.row { display: flex; gap: var(--sp-3); align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: var(--sp-3); align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grid { display: grid; gap: var(--sp-4); }

/* -------------------------------------------------------------------------
   5) Header / Nav
   ------------------------------------------------------------------------- */
.app-header {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    background: color-mix(in srgb, var(--bg) 75%, transparent);
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    border-bottom: var(--border-w) solid var(--border);
}
.app-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
    padding-block: var(--sp-3);
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    font-weight: var(--fw-bold);
    font-size: var(--fs-md);
    color: var(--text);
}
.brand-mark {
    width: 32px; height: 32px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--brand-400), var(--accent-500));
    box-shadow: var(--glow-brand);
    display: grid;
    place-items: center;
    color: white;
}
.nav-links {
    display: flex;
    gap: var(--sp-2);
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-links a {
    padding: var(--sp-2) var(--sp-3);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: var(--fw-medium);
    transition: var(--t-fast);
}
.nav-links a:hover {
    background: var(--surface-3);
    color: var(--text);
    text-decoration: none;
}
.nav-links a.active {
    background: var(--brand-500);
    color: white;
}

/* -------------------------------------------------------------------------
   6) Buttons
   ------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: var(--sp-3) var(--sp-5);
    border: var(--border-w) solid transparent;
    border-radius: var(--radius-sm);
    font-weight: var(--fw-semibold);
    font-size: var(--fs-sm);
    line-height: 1;
    cursor: pointer;
    transition: var(--t-fast);
    white-space: nowrap;
    user-select: none;
    text-decoration: none;
}
.btn:focus-visible {
    outline: 2px solid var(--brand-400);
    outline-offset: 2px;
}
.btn:disabled,
.btn[aria-disabled="true"] {
    opacity: 0.55;
    cursor: not-allowed;
}
.btn .icon { width: 1em; height: 1em; }

.btn-primary {
    background: linear-gradient(180deg, var(--brand-500), var(--brand-600));
    color: white;
    box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, var(--shadow-sm);
}
.btn-primary:hover:not(:disabled) {
    background: linear-gradient(180deg, var(--brand-400), var(--brand-500));
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    color: white;
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    background: var(--surface-2);
    color: var(--text);
    border-color: var(--border-strong);
}
.btn-secondary:hover:not(:disabled) {
    background: var(--surface-3);
    text-decoration: none;
    color: var(--text);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
}
.btn-ghost:hover:not(:disabled) {
    background: var(--surface-3);
    color: var(--text);
    text-decoration: none;
}

.btn-danger {
    background: linear-gradient(180deg, var(--danger-500), var(--danger-600));
    color: white;
}
.btn-danger:hover:not(:disabled) {
    background: linear-gradient(180deg, var(--danger-400), var(--danger-500));
    color: white;
    text-decoration: none;
}

.btn-sm { padding: var(--sp-2) var(--sp-3); font-size: var(--fs-xs); }
.btn-lg { padding: var(--sp-4) var(--sp-6); font-size: var(--fs-base); }

.btn-icon {
    padding: var(--sp-2);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    border: var(--border-w) solid transparent;
}
.btn-icon:hover {
    background: var(--surface-3);
    color: var(--text);
}
.btn-icon .icon { width: 18px; height: 18px; }

/* -------------------------------------------------------------------------
   7) Card / Surface
   ------------------------------------------------------------------------- */
.card {
    background: var(--surface-1);
    border: var(--border-w) solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--sp-6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
}
.card-solid {
    background: var(--surface-2);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.card-title {
    font-size: var(--fs-lg);
    font-weight: var(--fw-semibold);
    margin: 0 0 var(--sp-2);
    color: var(--text);
}
.card-sub {
    color: var(--text-muted);
    font-size: var(--fs-sm);
    margin: 0 0 var(--sp-4);
}

/* -------------------------------------------------------------------------
   8) Forms
   ------------------------------------------------------------------------- */
.field {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}
.label {
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--text);
}
.help-text {
    font-size: var(--fs-xs);
    color: var(--text-soft);
}
.input,
.select,
.textarea {
    width: 100%;
    padding: var(--sp-3) var(--sp-4);
    background: var(--input-bg);
    border: var(--border-w) solid var(--input-border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font: inherit;
    transition: var(--t-fast);
}
.input::placeholder,
.textarea::placeholder { color: var(--text-soft); }
.input:focus,
.select:focus,
.textarea:focus {
    outline: none;
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-500) 22%, transparent);
}
.textarea { min-height: 100px; resize: vertical; }
.select {
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right var(--sp-3) center;
    background-size: 18px;
    padding-right: var(--sp-10);
}
.error-text {
    color: var(--danger-400);
    font-size: var(--fs-xs);
    margin-top: var(--sp-1);
}

/* File / Drop zone */
.dropzone {
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    padding: var(--sp-10) var(--sp-6);
    text-align: center;
    background: var(--surface-1);
    transition: var(--t-base);
    cursor: pointer;
}
.dropzone:hover,
.dropzone.is-drag {
    border-color: var(--brand-400);
    background: color-mix(in srgb, var(--brand-500) 8%, var(--surface-1));
    box-shadow: var(--glow-brand);
}
.dropzone-icon {
    width: 48px; height: 48px;
    margin: 0 auto var(--sp-3);
    color: var(--brand-400);
}
.dropzone-title { font-weight: var(--fw-semibold); color: var(--text); margin-bottom: var(--sp-1); }
.dropzone-sub   { color: var(--text-muted); font-size: var(--fs-sm); }

/* -------------------------------------------------------------------------
   9) Code / PIN display + Copy button
   ------------------------------------------------------------------------- */
.code-display {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    padding: var(--sp-3) var(--sp-4);
    background: var(--surface-3);
    border: var(--border-w) solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: var(--fs-sm);
    color: var(--text);
    overflow: hidden;
}
.code-display > .code-value {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.copy-btn {
    flex-shrink: 0;
    background: transparent;
    border: var(--border-w) solid var(--border);
    border-radius: var(--radius-xs);
    padding: var(--sp-1) var(--sp-2);
    color: var(--text-muted);
    font-size: var(--fs-xs);
    transition: var(--t-fast);
    display: inline-flex;
    align-items: center;
    gap: var(--sp-1);
}
.copy-btn:hover {
    background: var(--surface-2);
    border-color: var(--border-strong);
    color: var(--text);
}
.copy-btn.is-copied {
    background: var(--success-500);
    color: white;
    border-color: var(--success-500);
}
.copy-btn .icon { width: 14px; height: 14px; }

.pin-display {
    font-family: var(--font-mono);
    font-size: var(--fs-2xl);
    font-weight: var(--fw-bold);
    letter-spacing: 0.18em;
    color: var(--brand-300);
    background: var(--surface-3);
    border: var(--border-w) solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--sp-4) var(--sp-6);
    text-align: center;
    text-shadow: 0 0 18px color-mix(in srgb, var(--brand-400) 50%, transparent);
}

/* -------------------------------------------------------------------------
   10) Badge / Alert
   ------------------------------------------------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-1);
    padding: 2px var(--sp-2);
    border-radius: var(--radius-pill);
    font-size: var(--fs-xs);
    font-weight: var(--fw-medium);
    background: var(--surface-3);
    color: var(--text-muted);
    border: var(--border-w) solid var(--border);
}
.badge-success { background: color-mix(in srgb, var(--success-500) 18%, transparent); color: var(--success-400); border-color: color-mix(in srgb, var(--success-500) 30%, transparent); }
.badge-warning { background: color-mix(in srgb, var(--warning-500) 18%, transparent); color: var(--warning-400); border-color: color-mix(in srgb, var(--warning-500) 30%, transparent); }
.badge-danger  { background: color-mix(in srgb, var(--danger-500) 18%, transparent);  color: var(--danger-400);  border-color: color-mix(in srgb, var(--danger-500) 30%, transparent); }
.badge-brand   { background: color-mix(in srgb, var(--brand-500) 18%, transparent);   color: var(--brand-300);   border-color: color-mix(in srgb, var(--brand-500) 30%, transparent); }

.alert {
    display: flex;
    gap: var(--sp-3);
    padding: var(--sp-4);
    border-radius: var(--radius-md);
    border: var(--border-w) solid var(--border);
    background: var(--surface-1);
}
.alert .icon { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; }
.alert-title { font-weight: var(--fw-semibold); margin-bottom: var(--sp-1); }
.alert-success { border-color: color-mix(in srgb, var(--success-500) 40%, transparent); background: color-mix(in srgb, var(--success-500) 10%, var(--surface-1)); }
.alert-success .icon { color: var(--success-400); }
.alert-warning { border-color: color-mix(in srgb, var(--warning-500) 40%, transparent); background: color-mix(in srgb, var(--warning-500) 10%, var(--surface-1)); }
.alert-warning .icon { color: var(--warning-400); }
.alert-danger  { border-color: color-mix(in srgb, var(--danger-500) 40%, transparent);  background: color-mix(in srgb, var(--danger-500) 10%, var(--surface-1));  }
.alert-danger .icon { color: var(--danger-400); }
.alert-info    { border-color: color-mix(in srgb, var(--brand-500) 40%, transparent);   background: color-mix(in srgb, var(--brand-500) 10%, var(--surface-1));   }
.alert-info .icon { color: var(--brand-300); }

/* -------------------------------------------------------------------------
   11) Table
   ------------------------------------------------------------------------- */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-sm);
}
.table th,
.table td {
    text-align: left;
    padding: var(--sp-3) var(--sp-4);
    border-bottom: var(--border-w) solid var(--border);
}
.table th {
    color: var(--text-muted);
    font-weight: var(--fw-medium);
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--surface-3);
}
.table tbody tr { transition: var(--t-fast); }
.table tbody tr:hover { background: var(--surface-3); }

/* -------------------------------------------------------------------------
   12) Progress
   ------------------------------------------------------------------------- */
.progress {
    width: 100%;
    height: 8px;
    background: var(--surface-3);
    border-radius: var(--radius-pill);
    overflow: hidden;
    position: relative;
}
.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--brand-400), var(--accent-500));
    border-radius: inherit;
    transition: width var(--t-base);
    box-shadow: 0 0 12px color-mix(in srgb, var(--brand-400) 50%, transparent);
}

/* -------------------------------------------------------------------------
   13) Modal / Toast
   ------------------------------------------------------------------------- */
.modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: var(--z-modal);
    display: grid; place-items: center;
    padding: var(--sp-4);
    animation: fadeIn var(--t-base);
}
.modal {
    background: var(--surface-2);
    border: var(--border-w) solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 480px; width: 100%;
    padding: var(--sp-6);
    animation: popIn var(--t-base);
}

.toast-container {
    position: fixed;
    bottom: var(--sp-6);
    right: var(--sp-6);
    z-index: var(--z-toast);
    display: flex; flex-direction: column; gap: var(--sp-3);
    pointer-events: none;
}
.toast {
    background: var(--surface-2);
    border: var(--border-w) solid var(--border-strong);
    border-radius: var(--radius-md);
    padding: var(--sp-3) var(--sp-4);
    box-shadow: var(--shadow-lg);
    color: var(--text);
    min-width: 240px;
    pointer-events: auto;
    animation: slideIn var(--t-base);
    display: flex; align-items: center; gap: var(--sp-2);
}
.toast-success { border-color: color-mix(in srgb, var(--success-500) 50%, transparent); }
.toast-error   { border-color: color-mix(in srgb, var(--danger-500) 50%, transparent);  }

@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn   { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }
@keyframes slideIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* -------------------------------------------------------------------------
   14) Footer
   ------------------------------------------------------------------------- */
.app-footer {
    border-top: var(--border-w) solid var(--border);
    margin-top: var(--sp-16);
    padding-block: var(--sp-6);
    color: var(--text-soft);
    font-size: var(--fs-sm);
}
.app-footer a { color: var(--text-muted); }

/* -------------------------------------------------------------------------
   15) Utilities
   ------------------------------------------------------------------------- */
.text-muted   { color: var(--text-muted); }
.text-soft    { color: var(--text-soft); }
.text-brand   { color: var(--brand-300); }
.text-success { color: var(--success-400); }
.text-danger  { color: var(--danger-400); }
.text-center  { text-align: center; }
.text-mono    { font-family: var(--font-mono); }
.fs-xs   { font-size: var(--fs-xs); }
.fs-sm   { font-size: var(--fs-sm); }
.fs-lg   { font-size: var(--fs-lg); }
.fw-semibold { font-weight: var(--fw-semibold); }
.mt-0    { margin-top: 0; }
.mt-2    { margin-top: var(--sp-2); }
.mt-4    { margin-top: var(--sp-4); }
.mt-6    { margin-top: var(--sp-6); }
.mt-8    { margin-top: var(--sp-8); }
.flex-1  { flex: 1; }
.hidden  { display: none !important; }
.icon    { width: 18px; height: 18px; flex-shrink: 0; }

/* -------------------------------------------------------------------------
   16) Responsive
   ------------------------------------------------------------------------- */
@media (max-width: 640px) {
    :root { --container-pad: var(--sp-4); }
    h1 { font-size: var(--fs-2xl); }
    h2 { font-size: var(--fs-xl); }
    .card { padding: var(--sp-4); }
    .nav-links { gap: var(--sp-1); }
    .nav-links a { padding: var(--sp-2); font-size: var(--fs-sm); }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
