/* QXVault — neo-brutalist theme. Sharp corners, hard shadows, flat fills. */

:root {
    --paper: #070514;
    --card: #0e0a26;
    --card-2: #181240;
    --ink: #edebff;
    --muted: #b3aedd;
    --brand: #00e5ff;
    --brand-ink: #04121a;
    --brand-soft: rgba(0, 229, 255, 0.13);
    --violet: #a78bfa;
    --danger: #ff5470;
    --ok: #3dff88;
    --focus: #00e5ff;
    --line: 3px;
    --shadow: 6px 6px 0 var(--ink);
    --shadow-sm: 4px 4px 0 var(--ink);
    --font-display: 'Archivo Black', 'Arial Black', sans-serif;
    --font-ui: 'Space Grotesk', 'Segoe UI', sans-serif;
    --font-mono: 'Space Mono', 'Consolas', monospace;
}

[data-theme="light"] {
    --paper: #f7f5ff;
    --card: #ffffff;
    --card-2: #ebe6fc;
    --ink: #171233;
    --muted: #66608a;
    --brand: #00e5ff;
    --brand-ink: #04121a;
    --brand-soft: rgba(0, 150, 180, 0.12);
    --violet: #7c3aed;
    --danger: #c81e1e;
    --ok: #0a7a3d;
    --focus: #6d28d9;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-ui);
    background: var(--paper);
    color: var(--ink);
    line-height: 1.55;
    font-size: 16px;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Quantum field backdrop: faint lattice grid with violet/cyan aurora */
.quantum-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background-image:
        radial-gradient(640px 420px at 12% -4%, rgba(139, 92, 246, 0.16), transparent 62%),
        radial-gradient(760px 520px at 92% 22%, rgba(0, 229, 255, 0.10), transparent 62%),
        linear-gradient(color-mix(in srgb, var(--ink) 7%, transparent) 1px, transparent 1px),
        linear-gradient(90deg, color-mix(in srgb, var(--ink) 7%, transparent) 1px, transparent 1px);
    background-size: auto, auto, 32px 32px, 32px 32px;
}

/* Ticker */
.ticker {
    background: var(--brand);
    color: var(--brand-ink);
    border-bottom: var(--line) solid var(--ink);
    overflow: hidden;
    white-space: nowrap;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.ticker-track {
    display: inline-block;
    padding: 8px 0;
    animation: ticker 28s linear infinite;
}

.ticker-track span { margin: 0 10px; }
.ticker-sep { opacity: 0.55; }

@keyframes ticker {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* Nav */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--paper);
    border-bottom: var(--line) solid var(--ink);
}

.nav-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo {
    font-family: var(--font-display);
    font-size: 22px;
    letter-spacing: 0.02em;
    color: var(--ink);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.logo-mark {
    background: var(--brand);
    color: var(--brand-ink);
    border: var(--line) solid var(--ink);
    box-shadow: 3px 3px 0 var(--ink);
    padding: 0 8px;
    line-height: 1.5;
}

.nav-tabs {
    display: flex;
    gap: 0;
    border: var(--line) solid var(--ink);
    background: var(--card);
    box-shadow: var(--shadow-sm);
}

.nav-tab {
    background: transparent;
    border: none;
    border-right: var(--line) solid var(--ink);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 10px 14px;
    cursor: pointer;
}

.nav-tab:last-child { border-right: none; }
.nav-tab:hover { background: var(--brand-soft); }
.nav-tab.active:hover { background: var(--brand); filter: brightness(1.05); }
.nav-tab.active { background: var(--brand); color: var(--brand-ink); }

.nav-controls { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--card);
    color: var(--ink);
    border: var(--line) solid var(--ink);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform 80ms ease, box-shadow 80ms ease;
}

.theme-toggle:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.theme-toggle:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }

.mobile-menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    background: var(--brand);
    border: var(--line) solid var(--ink);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.mobile-menu-btn span {
    display: block;
    width: 20px;
    height: 3px;
    background: var(--brand-ink);
}

/* Layout */
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 32px 20px 64px;
}

.tab-content { display: none; }
.tab-content.active { display: block; animation: rise 160ms ease; }

@keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero */
.hero {
    border: var(--line) solid var(--ink);
    background: var(--card);
    box-shadow: var(--shadow);
    padding: clamp(24px, 5vw, 56px);
    margin-bottom: 28px;
    position: relative;
}

.hero-eyebrow {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.dot { width: 12px; height: 12px; background: var(--brand); border: 2px solid var(--ink); display: inline-block; }

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.15rem, 8.5vw, 5.5rem);
    line-height: 0.98;
    letter-spacing: -0.01em;
    margin-bottom: 16px;
}

.hl { background: var(--brand); color: var(--brand-ink); padding: 0 12px; border: var(--line) solid var(--ink); white-space: nowrap; }

.tagline { font-size: clamp(1rem, 2.4vw, 1.25rem); color: var(--muted); max-width: 56ch; margin-bottom: 24px; }

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: var(--line) solid var(--ink);
    margin-bottom: 24px;
    background: var(--paper);
}

.hero-stat { padding: 14px 16px; border-right: var(--line) solid var(--ink); }
.hero-stat:last-child { border-right: none; }
.hero-stat strong { display: block; font-family: var(--font-display); font-size: 1.6rem; }
.hero-stat span { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

/* Cards */
.card {
    background: var(--card);
    border: var(--line) solid var(--ink);
    box-shadow: var(--shadow);
    padding: clamp(20px, 4vw, 36px);
    margin-bottom: 28px;
}

.card-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.card-head-inline { margin-bottom: 0; }

.card-index {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 13px;
    background: var(--ink);
    color: var(--paper);
    padding: 4px 10px;
}

.card-head h2, .card-head h3 {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 3.5vw, 2rem);
    letter-spacing: 0;
}

.card-tag {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border: 2px solid var(--ink);
    padding: 4px 10px;
    background: var(--brand);
    color: var(--brand-ink);
}

.card h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    margin: 26px 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.card p { margin-bottom: 12px; max-width: 72ch; }
.lede { font-size: 1.12rem; }

.card ul, .card ol { margin: 0 0 14px 22px; }
.card li { margin-bottom: 8px; }
.card li::marker { color: var(--ink); font-weight: 700; }

.checklist { list-style: none; margin-left: 0; }
.checklist li {
    border: 2px solid var(--ink);
    background: var(--paper);
    padding: 10px 14px 10px 40px;
    position: relative;
}
.checklist li::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 16px;
    width: 12px;
    height: 7px;
    border-left: 3px solid var(--ink);
    border-bottom: 3px solid var(--ink);
    transform: rotate(-45deg);
}
.checklist-bad li::before {
    content: '×';
    border: none;
    transform: none;
    top: 7px;
    left: 13px;
    font-weight: 700;
    font-size: 18px;
}

code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: var(--card-2);
    border: 1px solid var(--ink);
    padding: 1px 6px;
}

.codeblock {
    background: var(--ink);
    color: var(--paper);
    border: var(--line) solid var(--ink);
    padding: 16px 18px;
    overflow-x: auto;
    margin: 12px 0 16px;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.7;
}

.codeblock code { background: none; border: none; padding: 0; color: inherit; }

/* Forms */
.form-group { margin-bottom: 22px; }

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.opt { color: var(--muted); font-weight: 400; }

.form-input {
    width: 100%;
    font-family: var(--font-mono);
    font-size: 15px;
    color: var(--ink);
    background: var(--paper);
    border: var(--line) solid var(--ink);
    box-shadow: var(--shadow-sm);
    padding: 14px 16px;
    border-radius: 0;
    outline: none;
}

.form-input::placeholder { color: var(--muted); }
.form-input:focus { background: var(--card); transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }

.password-input-container { position: relative; }
.password-input-container .form-input { padding-right: 56px; }

.password-toggle {
    position: absolute;
    right: 6px;
    top: 6px;
    bottom: 6px;
    width: 46px;
    background: var(--brand);
    color: var(--brand-ink);
    border: var(--line) solid var(--ink);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Buttons — press interaction: translate matches shadow offset */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink);
    background: var(--card);
    border: var(--line) solid var(--ink);
    box-shadow: 5px 5px 0 var(--ink);
    padding: 14px 20px;
    cursor: pointer;
    border-radius: 0;
    text-decoration: none;
    transition: transform 80ms ease, box-shadow 80ms ease;
}

.btn:hover { transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--ink); filter: brightness(1.07); }
.btn:active { transform: translate(5px, 5px); box-shadow: 0 0 0 var(--ink); filter: none; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: 5px 5px 0 var(--ink); filter: grayscale(0.5); }

.btn-primary { background: var(--brand); color: var(--brand-ink); }

#generateHardwareBtn.is-armed { background: var(--violet); color: #131311; }
[data-theme="dark"] #generateHardwareBtn.is-armed { color: #131311; }

.btn-group { display: flex; flex-wrap: wrap; gap: 18px; margin: 6px 0 4px; }
.btn-wrap { display: flex; align-items: center; gap: 8px; flex: 1 1 260px; }
.btn-wrap .btn { flex: 1; justify-content: center; }

/* Info buttons + tooltips */
.info-btn {
    position: relative;
    width: 24px;
    height: 24px;
    flex: none;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    color: var(--paper);
    background: var(--ink);
    border: 2px solid var(--ink);
    cursor: help;
}

.tooltip {
    display: none;
    position: absolute;
    left: 50%;
    bottom: calc(100% + 12px);
    transform: translateX(-50%);
    width: max-content;
    max-width: 260px;
    white-space: normal;
    text-align: left;
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    background: var(--ink);
    color: var(--paper);
    border: 2px solid var(--ink);
    box-shadow: 4px 4px 0 color-mix(in srgb, var(--ink) 35%, transparent);
    padding: 10px 12px;
    z-index: 50;
}

.info-btn:hover .tooltip, .info-btn:focus .tooltip, .info-btn:focus-within .tooltip,
.mini-btn:hover .tooltip, .mini-btn:focus .tooltip, .mini-btn:focus-within .tooltip { display: block; }

/* Small square action button (dice, version bump) */
.mini-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    background: var(--brand);
    color: var(--brand-ink);
    border: 2px solid var(--ink);
    box-shadow: 3px 3px 0 var(--ink);
    padding: 2px 8px;
    cursor: pointer;
    transition: transform 80ms ease, box-shadow 80ms ease;
}

.mini-btn:hover { transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--ink); }
.mini-btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.mini-btn .material-icons-round { font-size: 18px; }
.mini-btn .tooltip { left: auto; right: 0; transform: none; }

/* Segmented charset control */
.segmented {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: var(--line) solid var(--ink);
    box-shadow: var(--shadow-sm);
}

.segment { position: relative; }
.segment + .segment { border-left: var(--line) solid var(--ink); }
.segment input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.segment span {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 56px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    padding: 8px 4px;
    background: var(--card);
    cursor: pointer;
    white-space: nowrap;
}

.segment span small {
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.75;
}

.segment:hover span { background: var(--brand-soft); }
.segment input:checked + span:hover { background: var(--brand); filter: brightness(1.05); }
.segment input:checked + span { background: var(--brand); color: var(--brand-ink); }
.segment input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: -3px; }

/* Site profiles */
.profile-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.profile-list:empty { display: none; }

.profile-item {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 2px solid var(--ink);
    background: var(--paper);
    padding: 8px 8px 8px 12px;
    font-family: var(--font-mono);
    font-size: 13px;
}

.profile-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-item .tag {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    border: 2px solid var(--ink);
    background: var(--card-2);
    padding: 1px 6px;
    white-space: nowrap;
}

.profile-item .spacer { flex: 1; }
.profile-del {
    font-family: var(--font-mono);
    font-weight: 700;
    background: var(--danger);
    color: #fff;
    border: 2px solid var(--ink);
    width: 28px;
    height: 28px;
    cursor: pointer;
    line-height: 1;
}

.btn-small { padding: 10px 14px; font-size: 12px; }

/* Brutalist select (native arrow replaced by .select-wrap chevron) */
.select-input {
    appearance: none;
    -webkit-appearance: none;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
    background: var(--card);
    border: var(--line) solid var(--ink);
    box-shadow: var(--shadow-sm);
    padding: 10px 36px 10px 12px;
    border-radius: 0;
    cursor: pointer;
    outline: none;
}

.select-input:hover { background: var(--brand-soft); }
.select-input:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

/* QR modal */
.qr-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.72);
    display: flex;
    overflow-y: auto;
    padding: 16px;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
}

.qr-box {
    background: var(--card);
    border: var(--line) solid var(--ink);
    box-shadow: 8px 8px 0 var(--ink);
    padding: 26px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    margin: auto;
}

.qr-box canvas {
    display: block;
    width: 100%;
    max-width: 320px;
    height: auto;
    border: var(--line) solid var(--ink);
    background: #fff;
    image-rendering: pixelated;
    margin: 6px auto 12px;
}

.qr-note { font-size: 13px; color: var(--muted); margin-bottom: 16px; }

/* Auto-clear countdown */
#autoClearNote { color: var(--ink); font-weight: 700; }
#autoClearNote:empty { display: none; }

/* Stale output: inputs changed after generation */
#staleNote { color: var(--danger); font-weight: 700; }
#staleNote:empty { display: none; }

.password-output.stale { opacity: 0.6; border-style: dashed; }

/* Content links: clear interactive affordance */
.card a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--brand);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.card a:hover { background: var(--brand-soft); }

/* Comfortable touch targets on coarse pointers */
@media (pointer: coarse) {
    .info-btn, .mini-btn { min-width: 36px; min-height: 36px; }
    .nav-tab { padding: 14px 20px; font-size: 15px; }
    .profile-del { width: 36px; height: 36px; }
    .faq-question { padding: 20px 52px 20px 18px; }
}

/* Status */
.status {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    border: var(--line) solid var(--ink);
    padding: 14px 16px;
    margin: 18px 0;
    background: var(--paper);
}

.status.success { background: var(--brand); color: var(--brand-ink); }
.status.error { background: var(--danger); color: #fff; }
[data-theme="light"] .status.error { color: #fff; }
.status.info { background: var(--card-2); }

/* Output */
.password-output {
    font-family: var(--font-mono);
    font-size: clamp(14px, 2.6vw, 18px);
    word-break: break-all;
    background: var(--paper);
    border: var(--line) solid var(--ink);
    box-shadow: var(--shadow-sm);
    padding: 18px;
    min-height: 64px;
}

.password-output.has-value { background: var(--brand); color: var(--brand-ink); font-weight: 700; }

.output-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
    margin-top: 10px;
}

/* Settings */
.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.minimize-btn {
    width: 44px;
    height: 44px;
    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 700;
    background: var(--brand);
    color: var(--brand-ink);
    border: var(--line) solid var(--ink);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform 80ms ease, box-shadow 80ms ease;
}

.minimize-btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.minimize-btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }

.settings-content { overflow: hidden; max-height: 1200px; transition: max-height 200ms ease; }
.settings-content.collapsed { max-height: 0; }

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.settings-card {
    background: var(--paper);
    border: var(--line) solid var(--ink);
    box-shadow: var(--shadow-sm);
    padding: 18px;
}

.settings-card .form-group { margin-bottom: 0; }

/* Sliders */
.slider-container { margin-top: 6px; }
.slider-wrapper { display: flex; align-items: center; gap: 14px; }
.slider-track-container { flex: 1; }

.slider-input {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 14px;
    background: var(--card-2);
    border: var(--line) solid var(--ink);
    outline: none;
    cursor: pointer;
}

.slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 26px;
    height: 26px;
    background: var(--brand);
    border: var(--line) solid var(--ink);
    box-shadow: 3px 3px 0 var(--ink);
    cursor: grab;
}

.slider-input::-moz-range-thumb {
    width: 22px;
    height: 22px;
    background: var(--brand);
    border: var(--line) solid var(--ink);
    border-radius: 0;
    box-shadow: 3px 3px 0 var(--ink);
    cursor: grab;
}

.slider-value-display {
    font-family: var(--font-display);
    font-size: 1.3rem;
    min-width: 56px;
    text-align: center;
    background: var(--ink);
    color: var(--paper);
    padding: 4px 8px;
}

/* Switches */
.switch-container { display: flex; align-items: center; gap: 12px; font-size: 14px; }

.switch-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.switch {
    position: relative;
    flex: none;
    width: 58px;
    height: 30px;
    background: var(--card-2);
    border: var(--line) solid var(--ink);
    cursor: pointer;
}

.switch::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--muted);
    transition: left 90ms ease, background 90ms ease;
}

.switch-input:checked + .switch { background: var(--brand); }
.switch-input:checked + .switch::before { left: 30px; background: var(--brand-ink); }
.switch-input:focus-visible + .switch { outline: 3px solid var(--focus); outline-offset: 3px; }

.switch-label { display: inline-flex; cursor: pointer; }

.select-wrap { position: relative; display: inline-flex; }

.select-wrap::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    width: 9px;
    height: 9px;
    border-right: 3px solid var(--ink);
    border-bottom: 3px solid var(--ink);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}

.select-input option { background: var(--card); color: var(--ink); }

/* Compare */
.compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin: 14px 0 6px;
}

.mode-card {
    border: var(--line) solid var(--ink);
    box-shadow: var(--shadow-sm);
    padding: 18px;
    background: var(--paper);
}

.mode-card h4 {
    font-family: var(--font-display);
    text-transform: uppercase;
    font-size: 1rem;
    margin-bottom: 10px;
    display: inline-block;
    padding: 2px 10px;
    border: 2px solid var(--ink);
}

.mode-card-hw h4 { background: var(--violet); color: #131311; }
.mode-card-normal h4 { background: var(--brand); color: var(--brand-ink); }
.mode-card ul { margin: 0 0 0 20px; }

/* FAQ */
.faq-item { border: var(--line) solid var(--ink); box-shadow: var(--shadow-sm); margin-bottom: 14px; background: var(--paper); }

.faq-question {
    font-weight: 700;
    padding: 16px 52px 16px 18px;
    cursor: pointer;
    position: relative;
    background: var(--card);
}

.faq-question:hover { background: var(--brand); color: var(--brand-ink); }
.faq-question::after {
    content: '+';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 700;
}

.faq-question.expanded { background: var(--ink); color: var(--paper); }
.faq-question.expanded::after { content: '–'; }
.faq-answer { padding: 16px 18px; border-top: var(--line) solid var(--ink); }
.faq-answer p { margin-bottom: 10px; }

/* Footer */
.footer { border-top: var(--line) solid var(--ink); background: var(--ink); color: var(--paper); }

.footer-content {
    max-width: 1120px;
    margin: 0 auto;
    padding: 22px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.footer-logo { font-family: var(--font-display); font-size: 16px; display: inline-flex; gap: 8px; align-items: center; }
.footer .logo-mark { box-shadow: none; }

.hidden { display: none !important; }

/* Focus — thick borders would otherwise swallow the ring */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

/* Responsive */
@media (max-width: 900px) {
    .mobile-menu-btn { display: inline-flex; }

    .nav-tabs {
        display: none;
        position: absolute;
        top: 100%;
        left: 12px;
        right: 12px;
        flex-direction: column;
        z-index: 999;
    }

    .nav-tabs.mobile-open { display: flex; }
    .nav-tabs.mobile-open .nav-tab { border-right: none; border-bottom: var(--line) solid var(--ink); text-align: left; padding: 14px 18px; }
    .nav-tabs.mobile-open .nav-tab:last-child { border-bottom: none; }

    .navbar { position: sticky; }
    .nav-container { position: relative; }
}

@media (max-width: 768px) {
    .container { padding: 20px 14px 48px; }
    .compare-grid { grid-template-columns: 1fr; }
    .hero-stats { grid-template-columns: repeat(3, 1fr); }
    .hero-stat { padding: 10px; }
    .hero-stat strong { font-size: 1.2rem; }
    .card-tag { margin-left: 0; }
}

@media (max-width: 480px) {
    .segmented { grid-template-columns: repeat(2, 1fr); }
    .segment:nth-child(3) { border-left: none; }
    .segment:nth-child(n+3) { border-top: var(--line) solid var(--ink); }
    .btn { width: 100%; justify-content: center; }
    .btn-wrap { flex: 1 1 100%; }
    .hero-stats { grid-template-columns: 1fr; }
    .hero-stat { border-right: none; border-bottom: var(--line) solid var(--ink); }
    .hero-stat:last-child { border-bottom: none; }
    .tooltip { max-width: 210px; }
    .footer-content { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
}

@media (prefers-contrast: high) {
    .tagline, .hero-stat span, .output-meta { color: var(--ink); }
}
