/* Design tokens mirror the app's Themes/Dark.xaml so the site and the
   product read as one thing. */
:root {
    --bg: #0F0F11;
    --panel: #191A1D;
    --surface: #1E1F23;
    --sunken: #141518;
    --border: #2A2B32;
    --border-subtle: #212227;
    --text: #E6E6EA;
    --text-2: #9A9AA4;
    --text-3: #63646D;
    --accent: #4C8DFF;
    --danger: #E5484D;
    --success: #57C97B;
    --radius: 12px;
    --max: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.6 "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

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

/* Keyboard users get a clear ring; mouse users never see it. */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

.skip {
    position: absolute;
    left: -9999px;
    top: 8px;
    padding: 10px 16px;
    background: var(--accent);
    color: #fff;
    border-radius: 8px;
    z-index: 100;
}
.skip:focus { left: 12px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---- Header ---- */

header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(15,15,17,.82);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
}

header .wrap { display: flex; align-items: center; gap: 28px; height: 62px; }

.logo { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; }
.logo svg {
    width: 26px; height: 26px; stroke: var(--text); fill: none;
    stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round;
}

nav { display: flex; align-items: center; gap: 24px; margin-left: auto; font-size: 14px; }
nav a { color: var(--text-2); }
nav a:hover { color: var(--text); }
nav a.cta { color: var(--text); }

.menu-btn {
    display: none;
    margin-left: auto;
    width: 38px; height: 38px;
    align-items: center; justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
}
.menu-btn svg {
    width: 18px; height: 18px; stroke: var(--text); fill: none;
    stroke-width: 1.6; stroke-linecap: round;
}

/* ---- Buttons ---- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 22px;
    border: 0;
    border-radius: 8px;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity .15s ease, background .15s ease, transform .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { opacity: .9; }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-ghost {
    background: #26272E;
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-ghost:hover { background: #2E2F37; }
.btn svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.6;
           stroke-linecap: round; stroke-linejoin: round; }

/* ---- Hero ---- */

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 56px;
    align-items: center;
    padding: 84px 0 76px;
}
.hero h1 {
    margin: 0 0 20px;
    font-size: clamp(36px, 4.6vw, 54px);
    line-height: 1.06;
    letter-spacing: -.025em;
    font-weight: 700;
}
.hero p {
    margin: 0 0 30px;
    max-width: 460px;
    font-size: 17px;
    color: var(--text-2);
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.pill {
    display: inline-block;
    margin-bottom: 22px;
    padding: 5px 13px;
    border: 1px solid var(--border);
    border-radius: 100px;
    background: var(--panel);
    font-size: 12px;
    color: var(--text-2);
}
.pill b { color: var(--accent); font-weight: 600; }

/* Status line. Colour is driven by /api/status, never hardcoded. */
.status {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 26px;
    font-size: 13px;
    color: var(--text-3);
}
.status .led {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--text-3);
    flex: none;
}
.status.ok    .led { background: var(--success); box-shadow: 0 0 0 3px rgba(87,201,123,.15); }
.status.warn  .led { background: #E0A030; box-shadow: 0 0 0 3px rgba(224,160,48,.15); }
.status.down  .led { background: var(--danger); box-shadow: 0 0 0 3px rgba(229,72,77,.15); }
.status a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; gap: 44px; padding: 60px 0 56px; }
    .hero p { max-width: none; }
}

/* ---- App mockup ---- */
/* Mirrors the real window chrome: title bar, icon rail, tab strip, editor,
   action bar and output panel. */

.app {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,.65);
    font-size: 12px;
    user-select: none;
}

.app-title {
    display: flex; align-items: center;
    height: 36px; padding: 0 12px;
    background: #17171A;
    border-bottom: 1px solid var(--border-subtle);
}
.app-title .mark { width: 15px; height: 15px; stroke: var(--text-2); fill: none; stroke-width: 1.5; }
.app-title .ver { margin: 0 auto; color: var(--text-2); font-size: 11px; }
.app-title .win { display: flex; gap: 15px; color: var(--text-3); font-size: 11px; }

.app-body { display: grid; grid-template-columns: 40px 1fr; }

.app-rail {
    background: var(--rail, #131316);
    border-right: 1px solid var(--border-subtle);
    padding: 8px 0;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.app-rail i {
    position: relative;
    width: 26px; height: 26px;
    border-radius: 7px;
    display: grid; place-items: center;
}
.app-rail i.on { background: #1F2027; }
.app-rail i.on::before {
    content: '';
    position: absolute; left: -7px;
    width: 2px; height: 13px; border-radius: 0 2px 2px 0;
    background: var(--accent);
}
.app-rail svg { width: 14px; height: 14px; stroke: var(--text-3); fill: none; stroke-width: 1.5; }
.app-rail i.on svg { stroke: var(--text); }

.app-tabs {
    display: flex; align-items: center;
    height: 32px;
    background: var(--panel);
    border-bottom: 1px solid var(--border-subtle);
    padding-right: 10px;
}
.app-tabs .tab {
    display: flex; align-items: center; gap: 8px;
    height: 100%; padding: 0 12px;
    background: var(--surface);
    color: var(--text);
    border-bottom: 2px solid var(--accent);
    font-size: 11.5px;
}
.app-tabs .tab .x { color: var(--text-3); }
.app-tabs .plus { margin-left: auto; color: var(--text-3); font-size: 14px; }

.app-code {
    margin: 0;
    padding: 12px 14px;
    background: var(--surface);
    font: 11.5px/1.85 "Cascadia Mono", Consolas, monospace;
    overflow-x: auto;
    min-height: 176px;
}
.app-code .ln { display: inline-block; width: 20px; color: #4A4B55; user-select: none; }

.app-actions {
    display: flex; align-items: center; gap: 16px;
    height: 34px; padding: 0 14px;
    background: var(--surface);
    border-top: 1px solid var(--border-subtle);
    color: var(--text-2);
    font-size: 11.5px;
}
.app-actions .act { display: flex; align-items: center; gap: 6px; }
.app-actions svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 1.5;
                   stroke-linecap: round; stroke-linejoin: round; }
.app-actions .right { margin-left: auto; }

.app-out {
    background: var(--panel);
    border-top: 1px solid var(--border-subtle);
    padding: 10px 14px 14px;
}
.app-out .head {
    display: flex; align-items: center;
    color: var(--text); font-weight: 600; font-size: 11.5px;
    margin-bottom: 7px;
}
.app-out .head .tools { margin-left: auto; display: flex; gap: 10px; color: var(--text-3); }
.app-out pre {
    margin: 0;
    font: 11px/1.85 "Cascadia Mono", Consolas, monospace;
    color: var(--text-2);
    overflow-x: auto;
}
.l-tag { color: var(--text-3); }
.l-ok  { color: var(--success); }
.l-num { color: var(--accent); }

.c-key { color: #C586C0; }
.c-fn  { color: #DCDCAA; }
.c-str { color: #CE9178; }
.c-com { color: #6A9955; }
.c-num { color: #B5CEA8; }

/* ---- Sections ---- */

section { padding: 80px 0; border-top: 1px solid var(--border-subtle); }
section h2 {
    margin: 0 0 12px;
    font-size: 30px;
    letter-spacing: -.01em;
    font-weight: 600;
}
.lede { margin: 0 0 44px; color: var(--text-2); max-width: 560px; }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .grid { grid-template-columns: 1fr; } }

.card {
    padding: 26px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color .18s ease, transform .18s ease;
}
.card:hover { border-color: #3A3B45; transform: translateY(-2px); }
.card svg {
    width: 26px; height: 26px; margin-bottom: 16px;
    stroke: var(--accent); fill: none;
    stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round;
}
.card h3 { margin: 0 0 8px; font-size: 16px; font-weight: 600; }
.card p { margin: 0; font-size: 14px; color: var(--text-2); }
.card code {
    font-family: "Cascadia Mono", Consolas, monospace;
    font-size: 13px;
    color: var(--text);
}

/* ---- Steps ---- */

.steps { counter-reset: step; display: grid; gap: 16px; }
.step {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 16px;
    align-items: start;
    padding: 20px 22px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.step::before {
    counter-increment: step;
    content: counter(step);
    display: grid;
    place-items: center;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: 13px;
    color: var(--accent);
    font-weight: 600;
}
.step h3 { margin: 5px 0 5px; font-size: 15px; font-weight: 600; }
.step p { margin: 0; font-size: 14px; color: var(--text-2); }
.step a { color: var(--accent); }

/* ---- Download ---- */

.download-row {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 28px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.download-row .meta { flex: 1; min-width: 220px; }
.download-row h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.download-row p { margin: 0; font-size: 14px; color: var(--text-2); }

/* ---- FAQ ---- */

details {
    padding: 18px 22px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
}
summary {
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 16px;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; color: var(--text-3); font-size: 19px; line-height: 1; }
details[open] summary::after { content: '\2212'; }
details p { margin: 14px 0 0; font-size: 14px; color: var(--text-2); }
details code {
    font-family: "Cascadia Mono", Consolas, monospace;
    font-size: 13px;
    color: var(--text);
}

/* ---- Footer ---- */

footer {
    padding: 42px 0;
    border-top: 1px solid var(--border-subtle);
    color: var(--text-3);
    font-size: 13px;
}
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
footer a { color: var(--text-2); }
footer a:hover { color: var(--text); }
.links { display: flex; gap: 20px; flex-wrap: wrap; }

/* ---- Key page ---- */

.narrow { max-width: 520px; }

.form-card {
    padding: 32px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 7px; }

input[type=text] {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    background: var(--sunken);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font: 14px "Cascadia Mono", Consolas, monospace;
    letter-spacing: .04em;
}
input[type=text]:focus { outline: none; border-color: var(--accent); }
input[type=text]::placeholder { color: var(--text-3); }

fieldset { border: 0; padding: 0; margin: 20px 0 0; }
legend { font-size: 12px; color: var(--text-2); padding: 0; margin-bottom: 7px; }
.durations { display: flex; gap: 8px; flex-wrap: wrap; }
.durations label { margin: 0; }
.durations input { position: absolute; opacity: 0; pointer-events: none; }
.durations span {
    display: inline-block;
    padding: 9px 16px;
    background: var(--sunken);
    border: 1px solid var(--border);
    border-radius: 7px;
    font-size: 13px;
    color: var(--text-2);
    cursor: pointer;
    user-select: none;
    transition: border-color .15s ease, background .15s ease;
}
.durations input:checked + span {
    background: #26272E; border-color: var(--accent); color: var(--text);
}
.durations input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.detected {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 9px 0 0;
    font-size: 12px;
    color: var(--success);
}
.detected svg {
    width: 13px; height: 13px; flex: none;
    stroke: currentColor; fill: none;
    stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}

.duration-note { margin: 14px 0 0; font-size: 13px; color: var(--text-2); }
.duration-note b { color: var(--text); font-weight: 600; }

#generate { width: 100%; margin-top: 18px; }

/* The old single-card key layout lived here. Its #copy { width: 100% } and
   .key { display: block } collapsed the new flex key row, so they are gone -
   .key-box below owns this now. */

#error {
    margin-top: 16px;
    padding: 11px 13px;
    background: rgba(229,72,77,.1);
    border: 1px solid rgba(229,72,77,.35);
    border-radius: 8px;
    font-size: 13px;
    color: var(--danger);
}

/* ---- Licence / key page ---- */

.license-page { padding: 60px 24px 80px; }

.license-title {
    margin: 0 0 14px;
    font-size: clamp(30px, 4.4vw, 44px);
    font-weight: 700;
    letter-spacing: -.025em;
    line-height: 1.08;
}
.license-sub { margin: 0 0 40px; font-size: 16px; color: var(--text-2); }

.license-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
    align-items: start;
}
@media (max-width: 900px) { .license-grid { grid-template-columns: 1fr; } }

.panel {
    padding: 26px 28px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.panel + .panel { margin-top: 16px; }
.panel-title { margin: 0 0 6px; font-size: 17px; font-weight: 600; }
.panel-sub { margin: 0 0 22px; font-size: 13px; color: var(--text-2); }

/* key + copy */
.key-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px 14px 18px;
    background: var(--sunken);
    border: 1px solid var(--border);
    border-radius: 10px;
}
.key-box code {
    flex: 1;
    min-width: 0;
    font: 15px "Cascadia Mono", Consolas, monospace;
    letter-spacing: .06em;
    word-break: break-all;
    user-select: all;
}
.key-box .btn { flex: none; }

/* Product / Expires / Device */
.meta-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--border-subtle);
}
@media (max-width: 560px) { .meta-row { grid-template-columns: 1fr 1fr; } }

.meta-label {
    display: block;
    font-size: 11px;
    letter-spacing: .04em;
    color: var(--text-3);
    margin-bottom: 6px;
}
.meta-value { display: block; font-size: 14px; color: var(--text); }
.meta-value.mono {
    font: 12px "Cascadia Mono", Consolas, monospace;
    word-break: break-all;
    color: var(--text-2);
}
.countdown {
    font: 14px "Cascadia Mono", Consolas, monospace;
    color: #E0A030;
    font-variant-numeric: tabular-nums;
}
.countdown.dead { color: var(--danger); }

.steps-title {
    margin: 26px 0 12px;
    padding-top: 22px;
    border-top: 1px solid var(--border-subtle);
    font-size: 14px;
    font-weight: 600;
}
.mini-steps {
    counter-reset: mini;
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}
.mini-steps li {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 12px;
    align-items: start;
    font-size: 14px;
    color: var(--text-2);
}
.mini-steps li::before {
    counter-increment: mini;
    content: counter(mini);
    display: grid;
    place-items: center;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: 11px;
    color: var(--accent);
    font-weight: 600;
}
.mini-steps b { color: var(--text); font-weight: 600; }

/* sidebar */
.side-title { margin: 0 0 16px; font-size: 15px; font-weight: 600; }

.active-row { padding-bottom: 16px; }
.active-row + .active-row {
    margin-top: 16px;
    border-top: 1px solid var(--border-subtle);
    padding-top: 16px;
}
.active-head { display: flex; align-items: center; justify-content: space-between; }
.active-product { font-size: 13px; font-weight: 600; color: var(--accent); }
.active-state { font-size: 11px; color: var(--text-3); }
.active-key {
    display: block;
    margin: 8px 0 10px;
    font: 11px "Cascadia Mono", Consolas, monospace;
    color: var(--text-2);
    word-break: break-all;
}
.active-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.active-left {
    font: 12px "Cascadia Mono", Consolas, monospace;
    color: #E0A030;
    font-variant-numeric: tabular-nums;
}

.note-panel { font-size: 12.5px; line-height: 1.7; color: var(--text-2); }
.note-panel b { color: var(--text); font-weight: 600; }

.how { margin-top: 60px; padding-top: 0; border-top: 0; }
.how h2 { margin: 0 0 10px; font-size: 24px; font-weight: 600; }
.how .lede { margin-bottom: 26px; }

/* ---- Unlock gate ---- */

.lock-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.lock-head svg {
    width: 22px; height: 22px; flex: none;
    stroke: var(--accent); fill: none;
    stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.lock-head h2 { margin: 0; font-size: 17px; font-weight: 600; }
.lock-copy { margin: 0 0 20px; font-size: 14px; color: var(--text-2); }
#unlock-btn { width: 100%; }
#lock-error {
    margin-top: 16px;
    padding: 11px 13px;
    background: rgba(229,72,77,.1);
    border: 1px solid rgba(229,72,77,.35);
    border-radius: 8px;
    font-size: 13px;
    color: var(--danger);
}

.hint { margin-top: 22px; font-size: 12px; color: var(--text-3); line-height: 1.7; }
.hint code {
    color: var(--text-2);
    font-family: "Cascadia Mono", Consolas, monospace;
}

/* ---- Auth pages ---- */

.auth-page {
    min-height: 72vh;
    display: grid;
    place-items: center;
    padding: 48px 24px 72px;
}
.auth-page .form-card { width: 100%; max-width: 420px; }
.auth-page h1 { margin: 0 0 6px; font-size: 24px; font-weight: 600; }
.auth-sub { margin: 0 0 24px; font-size: 14px; color: var(--text-2); }
.auth-page #submit { width: 100%; margin-top: 20px; }
.auth-alt {
    margin: 22px 0 0;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
    font-size: 13px;
    color: var(--text-2);
    text-align: center;
}
.auth-alt a { color: var(--text); font-weight: 500; }
.field-hint { margin: 7px 0 0; font-size: 12px; color: var(--text-3); }

input[type=password] {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    background: var(--sunken);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font: 14px "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
}
input[type=password]:focus { outline: none; border-color: var(--accent); }

.field { margin-bottom: 18px; }
.field:last-of-type { margin-bottom: 0; }

/* Invalid state mirrors the server's per-field response. */
input.invalid,
input[type=text].invalid,
input[type=email].invalid,
input[type=password].invalid {
    border-color: var(--danger);
}
input.invalid:focus { border-color: var(--danger); }

/* ---- Admin ---- */

.admin-tag,
.role-tag {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 7px;
    border-radius: 5px;
    background: rgba(229,72,77,.14);
    border: 1px solid rgba(229,72,77,.4);
    color: var(--danger);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    vertical-align: middle;
}

/* Owner reads as the higher tier, so it gets the accent rather than the
   warning colour used for a delegated admin. */
.admin-tag.owner,
.role-tag.owner {
    background: rgba(76,141,255,.14);
    border-color: rgba(76,141,255,.45);
    color: var(--accent);
}

#nav-admin { color: var(--danger); }
#nav-admin:hover { color: var(--text); }

.admin-panel { margin-bottom: 18px; }
.admin-panel textarea {
    width: 100%;
    padding: 12px;
    background: var(--sunken);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font: 14px "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
    resize: vertical;
}
.admin-panel textarea:focus { outline: none; border-color: var(--accent); }
.admin-panel input[type=number] {
    width: 120px;
    height: 42px;
    padding: 0 12px;
    background: var(--sunken);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font: 14px "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
}
.admin-panel input[type=number]:focus { outline: none; border-color: var(--accent); }

.admin-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

.admin-panel select {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    background: var(--sunken);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font: 14px "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
}
.admin-panel select:focus { outline: none; border-color: var(--accent); }

.minted-list { margin-top: 18px; display: grid; gap: 8px; }
.minted-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 12px 16px;
    background: var(--sunken);
    border: 1px solid var(--border);
    border-left: 3px solid var(--success);
    border-radius: 8px;
}
.minted-row code {
    font: 15px "Cascadia Mono", Consolas, monospace;
    letter-spacing: .1em;
    color: var(--text);
    user-select: all;
}
.minted-row span { flex: 1; font-size: 12px; color: var(--text-2); }

.lookup-hit {
    margin: 14px 0 0;
    padding: 12px 16px;
    background: var(--sunken);
    border: 1px solid var(--border);
    border-radius: 8px;
    font: 13px "Cascadia Mono", Consolas, monospace;
    color: var(--text-2);
}

.current-toast {
    padding: 16px 18px;
    background: var(--sunken);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 8px;
}
.current-toast b { display: block; font-size: 14px; font-weight: 600; }
.current-toast .toast-body {
    display: block; margin-top: 6px; font-size: 13px; color: var(--text-2);
    white-space: pre-wrap;
}
.current-toast .toast-meta {
    display: block; margin-top: 10px; font-size: 11px; color: var(--text-3);
}

/* ---- Redeem ---- */

.account-block {
    margin-bottom: 40px;
    padding-bottom: 36px;
    border-bottom: 1px solid var(--border-subtle);
}

.redeem-row { display: flex; gap: 10px; flex-wrap: wrap; }
.redeem-row input {
    flex: 1;
    min-width: 200px;
    height: 42px;
    padding: 0 12px;
    background: var(--sunken);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font: 14px "Cascadia Mono", Consolas, monospace;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.redeem-row input:focus { outline: none; border-color: var(--accent); }
.redeem-row .btn { flex: none; }

#redeem-msg {
    margin: 14px 0 0;
    padding: 11px 13px;
    border-radius: 8px;
    font-size: 13px;
}
.redeem-err {
    background: rgba(229,72,77,.1);
    border: 1px solid rgba(229,72,77,.35);
    color: var(--danger);
}
.redeem-ok {
    background: rgba(87,201,123,.1);
    border: 1px solid rgba(87,201,123,.35);
    color: var(--success);
}

.perk-list { margin-top: 18px; display: grid; gap: 10px; }
.perk-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-left: 3px solid var(--success);
    border-radius: var(--radius);
}
.perk-row svg {
    width: 16px; height: 16px; flex: none; margin-top: 2px;
    stroke: var(--success); fill: none;
    stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
}
.perk-row b { display: block; font-size: 14px; font-weight: 600; }
.perk-row span { display: block; font-size: 13px; color: var(--text-2); margin-top: 3px; }

/* ---- Account ---- */

.key-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 16px 20px;
    margin-bottom: 10px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.key-meta { flex: 1; min-width: 200px; }
.key-device {
    display: block;
    font: 12px "Cascadia Mono", Consolas, monospace;
    color: var(--text-2);
}
.key-when { font-size: 12px; }
.key-when.live { color: var(--success); }
.key-when.dead { color: var(--text-3); }
.key-value {
    font: 14px "Cascadia Mono", Consolas, monospace;
    letter-spacing: .05em;
    color: var(--text);
    user-select: all;
}
.empty-note { color: var(--text-3); font-size: 14px; }
.empty-note a { color: var(--accent); }

/* ---- Status page ---- */

.status-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    margin-bottom: 18px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 17px;
    font-weight: 500;
}
.status-banner .led { width: 11px; height: 11px; border-radius: 50%; background: var(--text-3); }
.status-banner.ok   .led { background: var(--success); box-shadow: 0 0 0 4px rgba(87,201,123,.15); }
.status-banner.warn .led { background: #E0A030; box-shadow: 0 0 0 4px rgba(224,160,48,.15); }
.status-banner.down .led { background: var(--danger); box-shadow: 0 0 0 4px rgba(229,72,77,.15); }

.status-grid { display: grid; gap: 10px; }
.status-card {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 16px 20px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-left-width: 3px;
    border-radius: var(--radius);
}
.status-card.ok   { border-left-color: var(--success); }
.status-card.warn { border-left-color: #E0A030; }
.status-card.down { border-left-color: var(--danger); }
.status-label { flex: 1; min-width: 160px; font-size: 15px; }
.status-value { font-size: 13px; color: var(--text-2); }

/* ---- 404 ---- */

.center-page {
    min-height: 70vh;
    display: grid;
    place-items: center;
    text-align: center;
}
.center-page h1 { font-size: 62px; margin: 0 0 8px; font-weight: 600; letter-spacing: -.02em; }
.center-page p { color: var(--text-2); margin: 0 0 26px; }

/* ---- Scroll reveal ---- */

.reveal { opacity: 0; transform: translateY(14px); }
.reveal.in {
    opacity: 1;
    transform: none;
    transition: opacity .5s ease, transform .5s ease;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal, .reveal.in { opacity: 1; transform: none; transition: none; }
    .btn, .card { transition: none; }
    .card:hover { transform: none; }
}

/* ---- Small screens ---- */

@media (max-width: 720px) {
    .menu-btn { display: flex; }
    nav {
        display: none;
        position: absolute;
        top: 62px; left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin: 0;
        padding: 8px 24px 16px;
        background: var(--bg);
        border-bottom: 1px solid var(--border-subtle);
    }
    nav.open { display: flex; }
    nav a { padding: 12px 0; border-bottom: 1px solid var(--border-subtle); }
    nav a:last-child { border-bottom: 0; }

    .hero { padding: 64px 0 48px; }
    section { padding: 60px 0; }
    .form-card { padding: 24px; }
    .center-page h1 { font-size: 48px; }
}
