/* ============================================================================
   low-poly.com — design system
   ----------------------------------------------------------------------------
   Tokens live as CSS custom properties. Switch theme by toggling [data-theme]
   on <html>. The default is dark; light is the alternate.
   ========================================================================= */

:root,
[data-theme="dark"] {
    --bg:           #0e0d0c;
    --bg-elev:      #161413;
    --bg-elev-2:    #1c1a18;
    --bg-card:      #161413;
    --bg-input:     #100f0e;
    --fg:           #f3eee7;
    --fg-muted:     #9b938a;
    --fg-faint:     #5a544c;
    --line:         rgba(243, 238, 231, 0.08);
    --line-strong:  rgba(243, 238, 231, 0.16);
    --accent:       #ff6a1f;
    --accent-soft:  rgba(255, 106, 31, 0.16);
    --accent-line:  rgba(255, 106, 31, 0.32);
    --accent-fg:    #0e0d0c;
    --bevel-light:  rgba(255, 255, 255, 0.04);
    --bevel-dark:   rgba(0, 0, 0, 0.45);
    --shadow:       0 12px 40px rgba(0, 0, 0, 0.6);
    --danger:       #ff4f4f;
    --success:      #4ade80;
    --info:         #60a5fa;
    --warn:         #fbbf24;
}

[data-theme="light"] {
    --bg:           #fbf7f1;
    --bg-elev:      #ffffff;
    --bg-elev-2:    #f1ece4;
    --bg-card:      #ffffff;
    --bg-input:     #ffffff;
    --fg:           #1a1815;
    --fg-muted:     #5d564d;
    --fg-faint:     #a39c91;
    --line:         rgba(26, 24, 21, 0.08);
    --line-strong:  rgba(26, 24, 21, 0.16);
    --accent:       #d44e0a;
    --accent-soft:  rgba(212, 78, 10, 0.10);
    --accent-line:  rgba(212, 78, 10, 0.28);
    --accent-fg:    #ffffff;
    --bevel-light:  rgba(255, 255, 255, 0.85);
    --bevel-dark:   rgba(0, 0, 0, 0.06);
    --shadow:       0 8px 24px rgba(26, 24, 21, 0.08);
    --danger:       #d92626;
    --success:      #16a34a;
    --info:         #2563eb;
    --warn:         #d97706;
}

:root {
    --font-display: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-brand:   'Sora', 'Inter', ui-sans-serif, system-ui, sans-serif;
    --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    --radius-sm:    6px;
    --radius:       10px;
    --radius-lg:    16px;
    --container:    1200px;
    --header-h:     64px;
    --transition:   180ms cubic-bezier(0.2, 0, 0.2, 1);
}

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

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-display);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition);
}
a:hover { color: var(--accent); }

img, svg, video { max-width: 100%; height: auto; display: block; }

button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
}

::selection { background: var(--accent); color: var(--accent-fg); }

.grid-overlay {
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 0;
    opacity: .4;
    background-image:
        linear-gradient(to right, var(--line) 1px, transparent 1px),
        linear-gradient(to bottom, var(--line) 1px, transparent 1px);
    background-size: 80px 80px;
    -webkit-mask-image: linear-gradient(#0000 0%, #000 30% 70%, #0000 100%);
            mask-image: linear-gradient(#0000 0%, #000 30% 70%, #0000 100%);
}

/* ─── Layout ─────────────────────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 24px;
    flex: 1;
}
@media (max-width: 600px) { .container { padding-inline: 16px; } }

main.container { padding-block: 32px; }

/* ─── Typography ─────────────────────────────────────────────────────────── */
h1, h2, h3, h4 { margin: 0 0 0.6em 0; font-weight: 600; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); line-height: 1.05; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.15; }
h3 { font-size: 1.25rem; line-height: 1.3; }
h4 { font-size: 1rem; line-height: 1.4; }
p  { margin: 0 0 1em 0; color: var(--fg-muted); }
p:last-child { margin-bottom: 0; }
small { color: var(--fg-faint); }

.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--accent);
}
.lead { font-size: 1.125rem; color: var(--fg-muted); max-width: 620px; }

code, pre, kbd {
    font-family: var(--font-mono);
    font-size: 0.875em;
}
pre {
    background: var(--bg-input);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px;
    overflow-x: auto;
    color: var(--fg);
}
:not(pre) > code {
    background: var(--bg-input);
    border: 1px solid var(--line);
    padding: 1px 6px;
    border-radius: 4px;
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius);
    border: 1px solid var(--line-strong);
    background: var(--bg-elev);
    color: var(--fg);
    font-weight: 500;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
    line-height: 1.2;
}
.btn:hover { color: var(--fg); background: var(--bg-elev-2); border-color: var(--line-strong); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn[disabled], .btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-primary {
    background: var(--accent);
    color: var(--accent-fg);
    border-color: var(--accent);
    box-shadow: 0 1px 0 var(--bevel-light) inset, 0 -1px 0 var(--bevel-dark) inset;
}
.btn-primary:hover { color: var(--accent-fg); background: color-mix(in srgb, var(--accent) 90%, white); border-color: var(--accent); }

.btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--fg-muted);
}
.btn-ghost:hover { background: var(--bg-elev); color: var(--fg); }

.btn-sm { padding: 6px 12px; font-size: 0.8125rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 14px 24px; font-size: 1rem; }

/* ─── Cards / Panels ─────────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 1px 0 var(--bevel-light) inset;
}
.card-tight { padding: 16px; }

.divider { height: 1px; background: var(--line); margin-block: 32px; border: 0; }

/* ─── Forms ──────────────────────────────────────────────────────────────── */
label { display: block; font-size: 0.875rem; color: var(--fg-muted); margin-bottom: 6px; font-weight: 500; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"], input[type="url"], textarea, select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    color: var(--fg);
    font-family: inherit;
    font-size: 0.9375rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }

.field { margin-bottom: 16px; }
.field-error { color: var(--danger); font-size: 0.8125rem; margin-top: 4px; }
.field-hint  { color: var(--fg-faint); font-size: 0.8125rem; margin-top: 4px; }

/* ─── Auth / Dashboard panels (CMS markup) ───────────────────────────────── */
.auth, .dashboard, .twofa, .twofa-setup, .settings {
    max-width: 480px;
    margin: 48px auto;
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 1px 0 var(--bevel-light) inset;
}
.auth h1, .dashboard h1, .twofa h1, .twofa-setup h1, .settings h1 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0 0 16px;
}
.auth h2, .settings h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 24px 0 12px;
}
.auth form, .dashboard form, .twofa form, .twofa-setup form, .settings form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}
.auth label, .settings label, .twofa label, .twofa-setup label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 0;
}
.auth label span,
.settings label span,
.twofa label span,
.twofa-setup label span {
    font-size: 0.75rem;
    color: var(--fg-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.auth button[type="submit"],
.settings button[type="submit"],
.twofa button[type="submit"],
.twofa-setup button[type="submit"] {
    background: var(--accent);
    color: var(--accent-fg);
    border: 0;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
}
.auth button[type="submit"]:hover,
.settings button[type="submit"]:hover,
.twofa button[type="submit"]:hover,
.twofa-setup button[type="submit"]:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}
.auth button.danger,
.settings button.danger {
    background: var(--danger);
    color: #fff;
}
.auth p, .settings p { margin: 12px 0; color: var(--fg-muted); font-size: 0.9375rem; }
.auth p a, .settings p a { color: var(--accent); }
.auth p a:hover, .settings p a:hover { text-decoration: underline; }

.oauth-btn {
    display: inline-block;
    padding: 10px 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    color: var(--fg);
    margin-top: 8px;
    transition: border-color var(--transition), background var(--transition);
}
.oauth-btn:hover { border-color: var(--accent-line); background: var(--accent-soft); color: var(--fg); }

.settings hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }

.twofa-secret code {
    display: inline-block;
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.9375rem;
    letter-spacing: 0.05em;
}

/* Inline form messages used by CMS templates */
.error-msg {
    background: color-mix(in srgb, var(--danger) 14%, transparent);
    color: var(--danger);
    border: 1px solid color-mix(in srgb, var(--danger) 32%, transparent);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    margin: 0 0 4px;
    font-size: 0.8125rem;
}
.status-msg {
    background: color-mix(in srgb, var(--success) 14%, transparent);
    color: var(--success);
    border: 1px solid color-mix(in srgb, var(--success) 32%, transparent);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    margin: 0 0 12px;
    font-size: 0.8125rem;
}

/* ─── Public contact page (CMS markup) ───────────────────────────────────── */
.contact-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 24px 0 8px;
    color: var(--fg-muted);
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
}
.contact-back:hover { color: var(--fg); text-decoration: none; }
.contact-back svg { width: 16px; height: 16px; }

.contact-status {
    margin: 16px 0;
    padding: 12px 16px;
    background: color-mix(in srgb, var(--success) 14%, transparent);
    color: var(--success);
    border: 1px solid color-mix(in srgb, var(--success) 32%, transparent);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 56px;
    align-items: start;
    padding: 32px 0 56px;
}
.contact-intro h1.h-section { margin: 0 0 12px; font-size: 1.875rem; font-weight: 700; letter-spacing: -0.02em; }
.contact-intro .lead {
    color: var(--fg-muted);
    margin: 0 0 32px;
    max-width: 40ch;
    font-size: 1rem;
}
.contact-info-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.contact-info-item strong {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--fg);
}
.contact-info-item p {
    margin: 2px 0 0;
    font-size: 0.8125rem;
    color: var(--fg-muted);
    line-height: 1.5;
}
.contact-info-icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    background: var(--bg-elev-2);
    color: var(--fg);
    border-radius: 8px;
    border: 1px solid var(--line);
}
.contact-info-icon svg { width: 18px; height: 18px; }
.contact-info-icon-mail   { background: color-mix(in srgb, var(--info) 18%, var(--bg-elev-2)); color: var(--info); border-color: color-mix(in srgb, var(--info) 28%, transparent); }
.contact-info-icon-clock  { background: color-mix(in srgb, var(--success) 18%, var(--bg-elev-2)); color: var(--success); border-color: color-mix(in srgb, var(--success) 28%, transparent); }
.contact-info-icon-chat   { background: color-mix(in srgb, var(--accent) 18%, var(--bg-elev-2)); color: var(--accent); border-color: var(--accent-line); }
.contact-info-icon-shield { background: color-mix(in srgb, #a78bfa 22%, var(--bg-elev-2)); color: #a78bfa; border-color: color-mix(in srgb, #a78bfa 32%, transparent); }
.contact-info-icon-gavel  { background: color-mix(in srgb, var(--danger) 18%, var(--bg-elev-2)); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 28%, transparent); }

.contact-form-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: 0 1px 0 var(--bevel-light) inset, var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.contact-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.contact-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.contact-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.8125rem;
    margin-bottom: 0;
}
.contact-field > span {
    font-weight: 600;
    color: var(--fg);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.contact-field input,
.contact-field select,
.contact-field textarea {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--fg);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.contact-field input::placeholder,
.contact-field textarea::placeholder { color: var(--fg-faint); }
.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.contact-field textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.contact-field select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239b938a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.contact-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 4px;
    padding: 12px 18px;
    background: var(--accent);
    color: var(--accent-fg);
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), transform var(--transition);
}
.contact-submit:hover { filter: brightness(1.05); transform: translateY(-1px); }
.contact-submit:active { transform: translateY(1px); }
.contact-submit svg { width: 16px; height: 16px; }

/* ── Direct emails section ─────────────────────────────────── */
.contact-direct {
    border-top: 1px solid var(--line);
    padding: 48px 0 64px;
}
.contact-direct-head {
    text-align: center;
    margin-bottom: 28px;
}
.contact-direct-head h2 { margin: 0 0 8px; font-size: 1.5rem; font-weight: 700; letter-spacing: -0.01em; }
.contact-direct-head p { margin: 0; color: var(--fg-muted); }
.contact-direct-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.contact-direct-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.contact-direct-card:hover {
    border-color: var(--accent-line);
    box-shadow: 0 1px 0 var(--bevel-light) inset, 0 8px 24px rgba(0, 0, 0, 0.25);
    transform: translateY(-1px);
    text-decoration: none;
    color: inherit;
}
.contact-direct-icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--info) 18%, var(--bg-elev-2));
    color: var(--info);
    border: 1px solid color-mix(in srgb, var(--info) 28%, transparent);
    border-radius: 8px;
}
.contact-direct-icon svg { width: 18px; height: 18px; }
.contact-direct-card strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--fg);
    margin-bottom: 2px;
}
.contact-direct-mail {
    display: block;
    font-size: 0.8125rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 6px;
    word-break: break-all;
}
.contact-direct-card p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--fg-muted);
    line-height: 1.5;
}

@media (max-width: 880px) {
    .contact-grid { grid-template-columns: 1fr; gap: 32px; padding: 16px 0 32px; }
    .contact-form-row { grid-template-columns: 1fr; }
    .contact-direct-grid { grid-template-columns: 1fr; }
    .contact-form-card { padding: 22px; }
}

/* ─── Header ─────────────────────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: color-mix(in srgb, var(--bg) 85%, transparent);
    border-bottom: 1px solid var(--line);
    height: var(--header-h);
}
.site-header-inner {
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 24px;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
}
@media (max-width: 600px) { .site-header-inner { padding-inline: 16px; gap: 12px; } }

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: -0.01em;
    color: var(--fg);
}
.brand:hover { color: var(--fg); }
.brand-mark { width: 28px; height: 28px; flex: none; }
.brand-name { font-family: var(--font-brand); font-weight: 700; letter-spacing: -0.025em; font-size: 1.05rem; }

.site-nav { display: flex; align-items: center; gap: 4px; justify-self: center; }
.site-nav a {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--fg-muted);
    font-size: 0.9375rem;
}
.site-nav a:hover { color: var(--fg); background: var(--bg-elev); }
.site-nav a.active { color: var(--fg); }

/* ─── Header dropdowns ───────────────────────────────────────────────────── */
.nav-item.has-submenu { position: relative; }
.nav-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: 0;
    color: var(--fg-muted);
    font-size: 0.9375rem;
    font-family: inherit;
    cursor: pointer;
}
.nav-trigger:hover { color: var(--fg); background: var(--bg-elev); }
.nav-trigger.active { color: var(--fg); }
.nav-caret { transition: transform var(--transition); opacity: 0.7; }
.nav-item.open .nav-caret { transform: rotate(180deg); }

.nav-submenu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    padding: 8px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    z-index: 60;
}
.nav-item.open > .nav-submenu { display: block; }
.nav-submenu a {
    display: block;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--fg-muted);
    font-size: 0.9375rem;
    white-space: nowrap;
}
.nav-submenu a:hover { color: var(--fg); background: var(--bg-elev); }

.nav-submenu-convert {
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: calc(100vw - 32px);
    padding: 10px;
}
.nav-submenu-headline {
    display: flex !important;
    flex-direction: column;
    gap: 1px;
    padding: 8px 10px !important;
    margin-bottom: 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg-elev);
}
.nav-submenu-headline strong { color: var(--fg); font-weight: 600; font-size: 0.875rem; }
.nav-submenu-headline span { color: var(--fg-muted); font-size: 0.75rem; }

.convert-matrix { display: flex; flex-direction: column; }
.convert-matrix-row {
    display: grid;
    grid-template-columns: 72px 1fr;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    border-top: 1px solid var(--line);
}
.convert-matrix-row:first-child { border-top: 0; }
.convert-matrix-from {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
    color: var(--fg);
    font-weight: 600;
    font-size: 0.8125rem;
}
.convert-matrix-arrow { color: var(--fg-muted); opacity: 0.5; }
.convert-matrix-targets {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.convert-matrix-chip {
    display: inline-flex !important;
    padding: 3px 8px !important;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--fg-muted) !important;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    white-space: nowrap;
}
.convert-matrix-chip:hover {
    border-color: var(--accent);
    color: var(--fg) !important;
    background: var(--accent-soft) !important;
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    justify-self: end;
    gap: 8px;
}

/* ─── User menu (CMS-shared bubble dropdown) ─────────────────────────────── */
/* Hexagonal bubble — matches the low-poly hex brand mark.
   The summary is the outer hex (acts as a 2px "ring" around the bubble),
   the inner .user-menu-bubble is the content. clip-path replaces border,
   so we rely on filter: drop-shadow for elevation and focus halo. */
.user-menu { position: relative; }
.user-menu > summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    background: color-mix(in srgb, var(--accent) 55%, var(--line));
    clip-path: polygon(50% 6.25%, 87.5% 28.125%, 87.5% 71.875%, 50% 93.75%, 12.5% 71.875%, 12.5% 28.125%);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.12));
    outline: none;
    transition: background var(--transition), filter var(--transition), transform var(--transition);
}
.user-menu > summary::-webkit-details-marker { display: none; }
.user-menu > summary:focus-visible {
    filter: drop-shadow(0 0 0 var(--bg)) drop-shadow(0 0 4px var(--accent)) drop-shadow(0 0 4px var(--accent));
}
.user-menu-bubble {
    width: 36px;
    height: 36px;
    border-radius: 0;
    border: 0;
    background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--accent-soft) 30%, var(--bg-elev)));
    color: var(--accent);
    clip-path: polygon(50% 6.25%, 87.5% 28.125%, 87.5% 71.875%, 50% 93.75%, 12.5% 71.875%, 12.5% 28.125%);
    display: inline-grid;
    place-items: center;
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: -0.01em;
    overflow: hidden;
    transition: background var(--transition), color var(--transition);
}
.user-menu-bubble img { width: 100%; height: 100%; object-fit: cover; }
.user-menu-bubble--guest {
    background: var(--bg-elev);
    color: var(--fg-muted);
}
/* Guest: subdued ring (line color), no accent */
.user-menu:has(.user-menu-bubble--guest) > summary {
    background: var(--line-strong);
}
.user-menu > summary:hover {
    background: var(--accent);
    transform: translateY(-1px);
    filter: drop-shadow(0 6px 14px color-mix(in srgb, var(--accent) 28%, transparent));
}
.user-menu > summary:hover .user-menu-bubble--guest {
    color: var(--fg);
    background: var(--bg-elev-2);
}
.user-menu[open] > summary {
    background: var(--accent);
    transform: none;
    filter: drop-shadow(0 0 0 var(--accent-soft)) drop-shadow(0 0 6px var(--accent-soft));
}
.user-menu-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 240px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    padding: 6px;
    z-index: 60;
}
[dir="rtl"] .user-menu-panel { right: auto; left: 0; }
.user-menu-identity {
    padding: 10px 12px 8px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 4px;
}
.user-menu-name {
    color: var(--fg);
    font-weight: 600;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-menu-email {
    color: var(--fg-muted);
    font-size: 0.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-menu-section { padding: 4px 0; }
.user-menu-section + .user-menu-section {
    border-top: 1px solid var(--line);
    margin-top: 4px;
}
.user-menu-section-title {
    padding: 6px 12px 2px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--fg-muted);
}
.user-menu-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 12px;
    border-radius: 4px;
    color: var(--fg);
    font-size: 0.88rem;
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    font: inherit;
}
.user-menu-item:hover { background: var(--bg-elev); text-decoration: none; }
.user-menu-item--danger { color: #ffb4b4; }
.user-menu-item--danger:hover { background: #3a1414; }
.user-menu-locale-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 240px;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.user-menu-locale-list li { margin: 0; }
.user-menu-locale-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.user-menu-locale-name {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-menu-locale-code {
    flex: 0 0 auto;
    color: var(--fg-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0;
    transition: opacity 0.15s;
}
.user-menu-locale-item:hover .user-menu-locale-code { opacity: 0.7; }
.user-menu-locale-check {
    flex: 0 0 auto;
    color: var(--accent);
    font-size: 0.85rem;
}
.user-menu-locale-item--active {
    background: var(--bg-elev);
    color: var(--fg);
    cursor: default;
}
.user-menu-locale-item--active:hover { background: var(--bg-elev); }
.user-menu-logout { margin: 0; }

.user-menu-theme-row {
    display: flex;
    gap: 4px;
    padding: 4px 8px;
}
.user-menu-theme-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    border-radius: 4px;
    background: transparent;
    border: 1px solid var(--line);
    color: var(--fg-muted);
    cursor: pointer;
    transition: color var(--transition), background var(--transition), border-color var(--transition);
}
.user-menu-theme-btn:hover {
    color: var(--fg);
    background: var(--bg-elev);
}
.user-menu-theme-btn.is-active {
    color: var(--fg);
    background: var(--bg-elev);
    border-color: var(--accent);
}

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--fg);
    width: 36px; height: 36px;
    align-items: center; justify-content: center;
}
@media (max-width: 800px) {
    .site-header-inner { grid-template-columns: 1fr auto; }
    .site-nav { display: none; }
    .site-nav.open {
        display: flex;
        position: absolute;
        top: var(--header-h);
        left: 0; right: 0;
        flex-direction: column;
        background: var(--bg-elev);
        border-bottom: 1px solid var(--line);
        padding: 12px 16px;
        gap: 0;
        max-height: calc(100vh - var(--header-h));
        overflow-y: auto;
    }
    .site-nav.open a { width: 100%; padding: 12px; }
    .mobile-menu-toggle { display: inline-flex; }

    .nav-item.has-submenu { width: 100%; }
    .nav-trigger { width: 100%; justify-content: space-between; padding: 12px; }
    .nav-submenu {
        position: static;
        transform: none;
        width: 100%;
        min-width: 0;
        box-shadow: none;
        border: 0;
        background: transparent;
        padding: 0 0 8px 12px;
    }
    .nav-submenu-convert { width: 100%; min-width: 0; padding: 0 0 8px 12px; }
    .nav-submenu-headline { margin-bottom: 6px; }
    .convert-matrix-row { grid-template-columns: 1fr; padding: 8px 0; }
    .convert-matrix-from { padding: 0; }
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
    border-top: 1px solid var(--line);
    background: var(--bg-elev);
    padding: 48px 0 32px 0;
    margin-top: 64px;
    color: var(--fg-muted);
    font-size: 0.875rem;
}
.site-footer-inner {
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 24px;
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 32px;
}
@media (max-width: 800px) {
    .site-footer-inner { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .site-footer-inner > div:first-child { grid-column: 1 / -1; }
}
.site-footer h4 {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--fg-faint);
    font-weight: 500;
    margin-bottom: 16px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--fg-muted); }
.site-footer a:hover { color: var(--fg); }
.site-footer-bottom {
    max-width: var(--container);
    margin: 32px auto 0;
    padding: 24px 24px 0;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--fg-faint);
    font-size: 0.8125rem;
}

/* ─── Hero ───────────────────────────────────────────────────────────────── */
.hero {
    padding: clamp(48px, 10vw, 96px) 0 clamp(64px, 12vw, 128px);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(60% 60% at 50% 0%, var(--accent-soft), transparent 70%);
    pointer-events: none;
    z-index: -1;
}
.hero h1 { max-width: 18ch; margin-inline: auto; }
.hero h1 .accent { color: var(--accent); }
.hero .lead { margin: 16px auto 32px; }
.hero-cta { display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ─── Sections ───────────────────────────────────────────────────────────── */
.section { padding: clamp(48px, 8vw, 96px) 0; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header .eyebrow { display: block; margin-bottom: 8px; }
.section-header h2 { max-width: 22ch; margin-inline: auto; }
.section-header p { max-width: 56ch; margin-inline: auto; color: var(--fg-muted); }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 800px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ─── Feature card ───────────────────────────────────────────────────────── */
.feature {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    box-shadow: 0 1px 0 var(--bevel-light) inset;
    transition: border-color var(--transition), transform var(--transition);
}
.feature:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.feature h3 { font-size: 1.0625rem; margin-bottom: 8px; }
.feature p { font-size: 0.9375rem; color: var(--fg-muted); margin: 0; }
.feature-icon {
    width: 36px; height: 36px;
    border-radius: var(--radius);
    background: var(--accent-soft);
    color: var(--accent);
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 16px;
}

/* ─── Stats band ─────────────────────────────────────────────────────────── */
.stats-band {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--line);
    border-block: 1px solid var(--line);
    padding-block: 0;
}
.stats-band > div {
    background: var(--bg);
    padding: 32px 24px;
    text-align: center;
}
.stats-band .stat-value {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 600;
    color: var(--fg);
    letter-spacing: -0.02em;
}
.stats-band .stat-label {
    margin-top: 4px;
    font-size: 0.8125rem;
    color: var(--fg-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
@media (max-width: 800px) { .stats-band { grid-template-columns: repeat(2, 1fr); } }

/* ─── CTA strip ──────────────────────────────────────────────────────────── */
.cta-strip {
    margin-top: 64px;
    padding: 48px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--accent-soft), transparent 60%), var(--bg-elev);
    border: 1px solid var(--accent-line);
    text-align: center;
}
.cta-strip h2 { margin-bottom: 12px; }
.cta-strip p { max-width: 56ch; margin: 0 auto 24px; }

/* ─── Tables ─────────────────────────────────────────────────────────────── */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}
th, td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}
th {
    font-weight: 600;
    color: var(--fg-muted);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ─── Badges & status ────────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 10px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 999px;
    background: var(--bg-elev);
    border: 1px solid var(--line);
    color: var(--fg-muted);
}
.badge-accent { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.badge-ok     { background: rgba(74, 222, 128, 0.10); color: var(--success); border-color: rgba(74, 222, 128, 0.32); }
.badge-warn   { background: rgba(251, 191, 36, 0.10); color: var(--warn);    border-color: rgba(251, 191, 36, 0.32); }
.badge-err    { background: rgba(255, 79, 79, 0.10);  color: var(--danger);  border-color: rgba(255, 79, 79, 0.32); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ─── Format picker (pair page) ──────────────────────────────────────────── */
.format-picker { position: relative; }
.format-picker > summary { list-style: none; cursor: pointer; }
.format-picker > summary::-webkit-details-marker { display: none; }
.format-picker-card {
    position: relative;
    transition: border-color var(--transition), background var(--transition);
}
.format-picker-card:hover { border-color: var(--accent); }
.format-picker-caret {
    position: absolute;
    top: 14px;
    right: 14px;
    color: var(--fg-muted);
    transition: transform var(--transition);
}
.format-picker[open] .format-picker-caret { transform: rotate(180deg); }
.format-picker[open] .format-picker-card { border-color: var(--accent); }

.format-picker-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 4px;
    padding: 12px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}
.format-picker-option {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--fg);
    text-align: left;
}
.format-picker-option:hover { background: var(--bg-elev); color: var(--fg); }
.format-picker-option strong { font-weight: 600; }
.format-picker-option.is-current {
    background: var(--bg-elev);
    border: 1px solid var(--accent-line);
}
.format-picker-option .text-muted { font-size: 0.8125rem; }
@media (max-width: 600px) {
    .format-picker-menu { grid-template-columns: repeat(2, 1fr); }
}

/* ─── Flash messages ─────────────────────────────────────────────────────── */
.flash {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    border: 1px solid var(--line);
    font-size: 0.9375rem;
}
.flash-success { background: rgba(74, 222, 128, 0.06); border-color: rgba(74, 222, 128, 0.32); color: var(--success); }
.flash-error   { background: rgba(255, 79, 79, 0.06);  border-color: rgba(255, 79, 79, 0.32);  color: var(--danger); }
.flash-info    { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }

/* ─── Cookie consent ─────────────────────────────────────────────────────── */
.consent-bar {
    position: fixed;
    bottom: 16px; left: 16px; right: 16px;
    z-index: 100;
    background: var(--bg-elev);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    max-width: 720px;
    margin-inline: auto;
}
.consent-bar p { flex: 1; min-width: 220px; margin: 0; font-size: 0.875rem; color: var(--fg-muted); }
.consent-bar form { display: inline; }
.link-button {
    background: none; border: none; padding: 0;
    color: var(--accent); font-size: inherit; font-family: inherit;
    cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}

/* ─── Utility ────────────────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted  { color: var(--fg-muted); }
.text-faint  { color: var(--fg-faint); }
.text-accent { color: var(--accent); }
.mono        { font-family: var(--font-mono); }
.flex { display: flex; gap: 12px; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.flex-col { display: flex; flex-direction: column; gap: 12px; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.mt-1 { margin-top: 8px; }  .mt-2 { margin-top: 16px; }  .mt-3 { margin-top: 24px; }  .mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; }
.hidden { display: none !important; }

/* ─── Anti-FOUC: hide body until theme is set on <html> ──────────────────── */
html:not([data-theme]) body { visibility: hidden; }

/* ─── Convert pair pages ─────────────────────────────────────────────────── */

/* Tighter vertical rhythm for content-rich pair pages. Default `.section`
   padding is meant for hero/marketing density — here we have many short
   sections in a row, so we trim the air. */
.pair-section { padding-block: 48px; }
.pair-section .section-header { margin-bottom: 24px; }
.pair-section .section-header h2,
.pair-section .pair-h2 {
    font-size: 1.625rem;
    line-height: 1.2;
    margin: 0 0 8px;
}
.pair-section .section-header p { margin: 0; }
.pair-grid-gap { gap: 24px; }

/* "What survives" comparison table */
.pair-compare {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-card);
}
.pair-compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}
.pair-compare-table thead th {
    text-align: left;
    padding: 14px 20px;
    background: var(--bg-elev);
    color: var(--fg-muted);
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--line);
}
.pair-compare-table th.pair-compare-fmt,
.pair-compare-table td.pair-compare-fmt { text-align: center; width: 90px; }
.pair-compare-table th.pair-compare-status,
.pair-compare-table td.pair-compare-status { text-align: right; width: 130px; padding-right: 20px; }
.pair-compare-row { border-bottom: 1px solid var(--line); }
.pair-compare-row:last-child { border-bottom: 0; }
.pair-compare-row td { padding: 12px 20px; }
.pair-compare-cap { color: var(--fg); }
.pair-compare-row--lost .pair-compare-cap { color: var(--fg); }
.pair-compare-row--gained .pair-compare-cap { color: var(--fg-muted); }

.pair-tick {
    display: inline-block;
    min-width: 20px;
    font-family: var(--font-mono);
    font-size: 0.9375rem;
}
.pair-tick.yes { color: var(--success); font-weight: 600; }
.pair-tick.no  { color: var(--fg-faint); }

.pair-badge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    font-family: var(--font-mono);
}
.pair-badge--ok   { background: color-mix(in srgb, var(--success) 15%, transparent); color: var(--success); }
.pair-badge--lost { background: color-mix(in srgb, var(--danger)  15%, transparent); color: var(--danger); }
.pair-badge--na   { background: var(--bg-elev); color: var(--fg-muted); }

/* Use-cases / Tips — small tiles in a stacked grid */
.pair-tile-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}
.pair-tile {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-card);
    font-size: 0.9375rem;
    line-height: 1.45;
}
.pair-tile-icon {
    flex: 0 0 24px;
    width: 24px; height: 24px;
    border-radius: 6px;
    background: var(--accent-soft);
    color: var(--accent);
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 700;
}
.pair-tile--tip .pair-tile-icon {
    background: color-mix(in srgb, var(--success) 15%, transparent);
    color: var(--success);
}

/* Pitfalls — warning-styled cards */
.pair-pitfall { padding: 20px 22px; }
.pair-pitfall-head {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
}
.pair-pitfall-head h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}
.pair-pitfall-icon {
    flex: 0 0 24px;
    width: 24px; height: 24px;
    border-radius: 6px;
    background: color-mix(in srgb, var(--warn) 20%, transparent);
    color: var(--warn);
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.875rem;
}
.pair-pitfall p {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--fg-muted);
    line-height: 1.55;
}

/* FAQ — flat list, accordion-style */
.pair-faq {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-card);
}
.pair-faq-item {
    border-bottom: 1px solid var(--line);
}
.pair-faq-item:last-child { border-bottom: 0; }
.pair-faq-item > summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-weight: 500;
    color: var(--fg);
    transition: background var(--transition);
}
.pair-faq-item > summary::-webkit-details-marker { display: none; }
.pair-faq-item > summary:hover { background: var(--bg-elev); }
.pair-faq-caret {
    flex: 0 0 24px;
    color: var(--fg-muted);
    font-family: var(--font-mono);
    font-size: 1.25rem;
    transition: transform var(--transition);
}
.pair-faq-item[open] > summary .pair-faq-caret { transform: rotate(45deg); }
.pair-faq-body {
    padding: 0 22px 18px;
    color: var(--fg-muted);
    line-height: 1.6;
    font-size: 0.9375rem;
}

@media (max-width: 720px) {
    .pair-section { padding-block: 32px; }
    .pair-compare-table { font-size: 0.875rem; }
    .pair-compare-table thead th,
    .pair-compare-row td { padding: 10px 12px; }
    .pair-compare-table th.pair-compare-fmt,
    .pair-compare-table td.pair-compare-fmt { width: 56px; }
    .pair-compare-table th.pair-compare-status,
    .pair-compare-table td.pair-compare-status { width: auto; padding-right: 12px; }
}

/* ============================================================================
   Home page — asymmetric, dev-leaning landing.
   Scoped to .lp-home-* so .hero / .stats-band / .cta-strip stay free for
   the other templates that use them.
   ========================================================================== */

/* ── Hero: centered text + faceted 3D-shaded demo ────────────────────────── */
.lp-home-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: clamp(40px, 6vw, 64px);
    padding: clamp(48px, 9vw, 96px) 0 clamp(48px, 7vw, 88px);
    position: relative;
}
.lp-home-hero::before {
    content: "";
    position: absolute;
    inset: -10% -20% auto -20%;
    height: 90%;
    background:
        radial-gradient(40% 50% at 50% 30%, var(--accent-soft), transparent 65%),
        radial-gradient(30% 40% at 50% 60%, color-mix(in srgb, var(--accent) 5%, transparent), transparent 70%);
    pointer-events: none;
    z-index: -1;
    filter: blur(10px);
}
.lp-home-hero-text {
    text-align: center;
    max-width: 640px;
}
.lp-home-hero-text h1 {
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    margin: 14px auto 18px;
    max-width: 18ch;
    line-height: 1.05;
}
.lp-home-hero-text .lead { margin: 0 auto 32px; max-width: 56ch; }
.lp-home-hero-text .hero-cta { justify-content: center; }

/* ── Live decimation demo: faceted, shaded, 3D-feeling crystal ───────────── */
@property --tris {
    syntax: "<integer>";
    initial-value: 184320;
    inherits: false;
}

.lp-hero-demo {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    width: 100%;
}

.lp-hero-demo-stage {
    position: relative;
    width: 100%;
    max-width: 420px;
    aspect-ratio: 1 / 1;
    filter: drop-shadow(0 14px 32px color-mix(in srgb, var(--accent) 22%, transparent))
            drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25));
}
.lp-hero-demo-stage::before {
    content: "";
    position: absolute;
    inset: 10%;
    background: radial-gradient(55% 50% at 35% 30%, var(--accent-soft), transparent 75%);
    filter: blur(32px);
    z-index: -1;
}

.lp-hero-demo-mesh {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* dense state: triangulated wireframe inside the gem silhouette */
.lp-hero-demo-dense {
    color: var(--fg-muted);
    animation: lp-mesh-dense 5.4s cubic-bezier(0.5, 0, 0.5, 1) infinite alternate;
}
@keyframes lp-mesh-dense {
    0%, 16%   { opacity: 0.75; }
    84%, 100% { opacity: 0.04; }
}

/* sparse state: shaded faceted crystal — fades in as decimation completes */
.lp-hero-demo-sparse {
    animation: lp-mesh-sparse 5.4s cubic-bezier(0.5, 0, 0.5, 1) infinite alternate;
}
@keyframes lp-mesh-sparse {
    0%, 16%   { opacity: 0.05; }
    84%, 100% { opacity: 1; }
}

/* per-facet shading for the hexagonal bipyramid in 3/4 view (light from upper-left).
   Each fill is computed from the facet's true 3D face normal dotted with the light
   direction, then mapped onto the accent→shadow ramp. The class names are legacy --
   what matters is the brightness ladder below (--tl is brightest, --br is darkest). */
.lp-facet                   { transition: fill 200ms; }
.lp-facet--tl { fill: color-mix(in srgb, var(--accent) 60%, var(--bg-elev)); } /* T-E2-E3 : brightest        */
.lp-facet--tr { fill: color-mix(in srgb, var(--accent) 38%, var(--bg-elev)); } /* T-E1-E2 : lit              */
.lp-facet--ml { fill: color-mix(in srgb, var(--accent) 20%, var(--bg));      } /* Bot-E2-E1 : medium         */
.lp-facet--mr { fill: color-mix(in srgb, var(--accent)  9%, var(--bg-elev)); } /* T-E0-E1 : dim              */
.lp-facet--bl { fill: color-mix(in srgb, var(--accent)  3%, var(--bg-elev)); } /* T-E5-E0 : near-shadow      */
.lp-facet--br { fill: color-mix(in srgb, black 38%, var(--bg));              } /* Bot-E1-E0 : deepest shadow */

/* scan line that sweeps L→R during the morph */
.lp-hero-demo-scan {
    position: absolute;
    top: 6%;
    bottom: 6%;
    width: 2px;
    left: 6%;
    background: var(--accent);
    box-shadow: 0 0 14px var(--accent), 0 0 4px var(--accent);
    border-radius: 2px;
    opacity: 0;
    pointer-events: none;
    animation: lp-scan 5.4s cubic-bezier(0.5, 0, 0.5, 1) infinite alternate;
}
@keyframes lp-scan {
    0%        { left: 6%;  opacity: 0; }
    16%       { opacity: 0.9; }
    84%       { opacity: 0.9; }
    100%      { left: 94%; opacity: 0; }
}

/* metadata pill — echoes the original's "scene_01 · N tris · flat shaded" */
.lp-hero-demo-meta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg-elev);
    font-family: var(--font-mono);
    font-size: 0.84rem;
    font-variant-numeric: tabular-nums;
    color: var(--fg-muted);
}
.lp-hero-demo-pulse {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 0 var(--accent);
    animation: lp-pulse 1.6s ease-out infinite;
}
@keyframes lp-pulse {
    0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 50%, transparent); }
    100% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent) 0%, transparent); }
}
.lp-hero-demo-name { color: var(--fg); font-weight: 500; }
.lp-hero-demo-sep  { color: var(--fg-faint); }
.lp-hero-demo-count {
    --tris: 184320;
    counter-reset: t var(--tris);
    color: var(--fg);
    font-weight: 600;
    min-width: 6ch;
    text-align: right;
    animation: lp-count 5.4s cubic-bezier(0.5, 0, 0.5, 1) infinite alternate;
}
.lp-hero-demo-count::after { content: counter(t); }
@keyframes lp-count {
    to { --tris: 412; }
}
.lp-hero-demo-unit {
    color: var(--fg-muted);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.14em;
}
.lp-hero-demo-shaded {
    color: var(--accent);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.14em;
}

/* Respect users who don't want animations: lock to the decimated 3D state */
@media (prefers-reduced-motion: reduce) {
    .lp-hero-demo-dense  { opacity: 0.04; animation: none; }
    .lp-hero-demo-sparse { opacity: 1;    animation: none; }
    .lp-hero-demo-scan   { display: none; }
    .lp-hero-demo-count  { animation: none; --tris: 412; }
    .lp-hero-demo-pulse  { animation: none; }
}

/* Tokens shared by dev terminal */
.lp-tk-prompt  { color: var(--fg-faint); user-select: none; }
.lp-tk-cmd     { color: var(--fg); }
.lp-tk-flag    { color: var(--accent); }
.lp-tk-ok      { color: var(--success); }
.lp-tk-dim     { color: var(--fg-muted); }
.lp-tk-arrow   { color: var(--accent); }
.lp-tk-comment { color: var(--fg-faint); font-style: italic; }
.lp-tk-str     { color: var(--success); }
.lp-tk-key     { color: var(--info); }

@media (max-width: 720px) {
    .lp-hero-demo-stage { max-width: 320px; }
    .lp-hero-demo-meta  { font-size: 0.76rem; padding: 7px 12px; gap: 8px; }
    .lp-hero-demo-name  { display: none; }
    .lp-hero-demo-sep:first-of-type { display: none; }
}

/* ── Specs band (replaces .stats-band) ───────────────────────────────────── */
.lp-home-specs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-block: 1px solid var(--line);
    margin-block: clamp(16px, 3vw, 32px);
}
.lp-home-spec {
    padding: 28px 24px;
    text-align: left;
    border-right: 1px solid var(--line);
}
.lp-home-spec:last-child { border-right: 0; }
.lp-home-spec-value {
    font-family: var(--font-mono);
    font-size: clamp(1.4rem, 2.4vw, 1.85rem);
    font-weight: 600;
    color: var(--fg);
    letter-spacing: -0.02em;
}
.lp-home-spec-label {
    margin-top: 6px;
    font-size: 0.84rem;
    color: var(--fg-muted);
}
@media (max-width: 800px) {
    .lp-home-specs { grid-template-columns: 1fr; }
    .lp-home-spec { border-right: 0; border-bottom: 1px solid var(--line); }
    .lp-home-spec:last-child { border-bottom: 0; }
}

/* ── Featured operation card ─────────────────────────────────────────────── */
.lp-home-featured {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: clamp(24px, 4vw, 56px);
    align-items: center;
    padding: clamp(28px, 4vw, 48px);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(70% 100% at 100% 0%, var(--accent-soft), transparent 60%),
        var(--bg-elev);
    margin-bottom: clamp(24px, 3vw, 40px);
    color: inherit;
    text-decoration: none;
    transition: border-color var(--transition), transform var(--transition);
}
.lp-home-featured:hover {
    color: inherit;
    border-color: var(--accent-line);
    transform: translateY(-2px);
}
.lp-home-featured-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--accent);
    margin-bottom: 14px;
}
.lp-home-featured-title {
    font-size: clamp(1.4rem, 2.4vw, 1.85rem);
    margin: 0 0 12px;
    max-width: 22ch;
    line-height: 1.2;
}
.lp-home-featured p { max-width: 50ch; margin-bottom: 20px; color: var(--fg-muted); }
.lp-home-featured-cta {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--accent);
    font-weight: 500;
    font-size: 0.94rem;
    transition: transform var(--transition);
}
.lp-home-featured:hover .lp-home-featured-cta { transform: translateX(4px); }

.lp-home-featured-visual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: stretch;
}
.lp-home-mesh {
    aspect-ratio: 1 / 1;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg);
    display: flex; align-items: center; justify-content: center;
    position: relative;
    overflow: hidden;
    color: var(--fg-muted);
}
.lp-home-mesh.is-low { color: var(--accent); background: color-mix(in srgb, var(--accent) 4%, var(--bg)); }
.lp-home-mesh::after {
    content: attr(data-label);
    position: absolute;
    bottom: 8px; right: 10px;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    color: var(--fg-faint);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.lp-home-mesh.is-low::after { color: var(--accent); opacity: 0.85; }
.lp-home-mesh svg { width: 90%; height: 90%; display: block; }

@media (max-width: 800px) {
    .lp-home-featured { grid-template-columns: 1fr; }
}

/* ── Step flow — horizontal numbered cards w/ arrows ─────────────────────── */
.lp-home-flow {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    align-items: stretch;
    gap: 12px;
}
.lp-home-flow-step {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    box-shadow: 0 1px 0 var(--bevel-light) inset;
}
.lp-home-flow-num {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent);
    letter-spacing: 0.18em;
    margin-bottom: 14px;
}
.lp-home-flow-step h3 { font-size: 1.0625rem; margin-bottom: 6px; }
.lp-home-flow-step p { font-size: 0.9rem; margin: 0; color: var(--fg-muted); }
.lp-home-flow-arrow {
    align-self: center;
    color: var(--fg-faint);
    font-family: var(--font-mono);
    font-size: 1.5rem;
}
@media (max-width: 800px) {
    .lp-home-flow { grid-template-columns: 1fr; }
    .lp-home-flow-arrow { display: none; }
}

/* ── Developer surface — terminal w/ pseudo-tabs ─────────────────────────── */
.lp-home-dev-terminal {
    background: var(--bg-elev);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.lp-home-dev-tabs {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--line);
    background: var(--bg-elev-2);
}
.lp-home-dev-tab {
    padding: 12px 20px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--fg-muted);
    background: transparent;
    border: 0;
    border-right: 1px solid var(--line);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}
.lp-home-dev-tab:hover {
    color: var(--fg);
    background: var(--bg-elev);
}
.lp-home-dev-tab:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}
.lp-home-dev-tab.is-active {
    color: var(--accent);
    background: var(--bg-elev);
    box-shadow: inset 0 -1px 0 var(--bg-elev), inset 0 2px 0 var(--accent);
}
.lp-home-dev-panel { display: none; }
.lp-home-dev-panel.is-active { display: block; }
.lp-home-dev-tab-spacer { flex: 1; border-right: 0; }
.lp-home-dev-tab-meta {
    padding: 12px 18px;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--fg-faint);
    letter-spacing: 0.04em;
}
.lp-home-dev-body {
    padding: 24px 28px;
    overflow-x: auto;
}
.lp-home-dev-body pre {
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.84rem;
    line-height: 1.8;
    color: var(--fg);
    white-space: pre;
}
@media (max-width: 800px) {
    .lp-home-dev-tab-meta { display: none; }
    .lp-home-dev-body { padding: 18px 18px; }
    .lp-home-dev-body pre { font-size: 0.74rem; }
}

/* ── Final CTA — split, asymmetric (replaces .cta-strip on home) ─────────── */
.lp-home-cta-wrap { padding: clamp(40px, 6vw, 80px) 0; }
.lp-home-cta {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: clamp(24px, 4vw, 56px);
    align-items: center;
    padding: clamp(32px, 5vw, 56px);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, var(--accent-soft), transparent 55%),
        var(--bg-elev);
    border: 1px solid var(--accent-line);
}
.lp-home-cta-text h2 { margin: 0 0 12px; max-width: 22ch; }
.lp-home-cta-text p { margin: 0; max-width: 56ch; color: var(--fg-muted); }
.lp-home-cta-buttons {
    display: inline-flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
@media (max-width: 800px) {
    .lp-home-cta { grid-template-columns: 1fr; }
    .lp-home-cta-buttons { justify-content: flex-start; }
}

/* ─── Print ──────────────────────────────────────────────────────────────── */
@media print {
    .site-header, .site-footer, .consent-bar, .user-menu { display: none; }
    body, .container { background: white; color: black; }
}
