:root {
    --bg:            #0a0a0b;
    --bg-raise:      #111113;
    --bg-raise-2:    #18181b;
    --text:          #f4f4f5;
    --muted:         #8b8b95;
    --accent:        #a0a0a0;
    --accent-dim:    rgba(160, 160, 160, 0.14);
    --accent-hover:  #c0c0c0;
    --accent-deep:   #707070;
    --danger:        #a0a0a0;
    --danger-text:   #d0d0d0;
    --warning:       #d97706;
    --border:        rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.15);
    --code-bg:       #0e0e10;
    --input-bg:      #1a1a1e;
    --light-1:       #fafafa;
    --light-2:       #ffffff;
    --on-light:      #0a0a0b;
    --on-accent:     #f5f5f5;

    --radius:        10px;
    --radius-sm:     6px;
    --radius-lg:     14px;
    --font-display:  "Space Grotesk", sans-serif;
    --font-body:     "DM Sans", system-ui, sans-serif;
    --font-mono:     "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color .14s ease; }
a:hover { color: var(--accent-hover); }

.app {
    display: grid;
    grid-template-columns: 248px 1fr;
    min-height: 100vh;
    position: relative;
}

.sidebar {
    background: var(--bg-raise);
    border-right: 1px solid var(--border);
    padding: 24px 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.brand {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 0 10px 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}
.brand-mark {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 21px;
    letter-spacing: -0.02em;
}
.brand-mark .at { color: var(--accent); }
.brand-link { text-decoration: none; color: inherit; }
.brand-link:hover { color: inherit; }
.brand-sub {
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 500;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--muted);
    font-weight: 500;
    font-size: 13.5px;
    border: 1px solid transparent;
    transition: background .14s ease, color .14s ease, border-color .14s ease;
}
.nav-item:hover {
    background: var(--bg-raise-2);
    color: var(--text);
    border-color: var(--border);
}
.nav-item.active {
    background: var(--accent-dim);
    color: var(--text);
    border-color: rgba(160, 160, 160, 0.28);
}
.nav-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: .85;
}
.nav-item.active .nav-icon { opacity: 1; color: var(--accent); }

.sidebar-foot {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sidebar-foot form { margin: 0; }
.sidebar-foot .who {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 10px;
    color: var(--text);
}
.sidebar-foot .avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent-dim);
    border: 1px solid rgba(220, 38, 38, 0.28);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--accent);
    font-size: 12px;
    font-family: var(--font-display);
}
.sidebar-foot .host {
    padding: 6px 10px;
    font-size: 11px;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.main {
    padding: 32px 40px 64px;
    max-width: 1280px;
}

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 28px;
    gap: 20px;
    flex-wrap: wrap;
}
.page-head h1 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.03em;
}
.page-head .sub {
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
}

.card {
    background: var(--bg-raise);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.card-pad { padding: 20px 22px; }
.card-head {
    padding: 15px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.card-head h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
@media (max-width: 980px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .stats { grid-template-columns: 1fr; } }

.stat {
    background: var(--bg-raise);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
}
.stat .label {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 500;
}
.stat .value {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 600;
    margin-top: 8px;
    letter-spacing: -0.03em;
    font-feature-settings: "tnum";
}
.stat .delta {
    color: var(--muted);
    font-size: 12px;
    margin-top: 4px;
}
.stat .value.value-sm {
    font-size: 22px;
    line-height: 1.2;
}
.stats-3 {
    grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 820px) { .stats-3 { grid-template-columns: 1fr; } }

.panel-title {
    margin: 0 0 8px;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
}
.info-list {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.info-list li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 13px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.info-list li:last-child { border-bottom: none; padding-bottom: 0; }

.grid-2 {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 20px;
}
@media (max-width: 1080px) { .grid-2 { grid-template-columns: 1fr; } }

table.atlas {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
table.atlas th, table.atlas td {
    padding: 11px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
table.atlas th {
    background: var(--bg-raise-2);
    color: var(--muted);
    font-weight: 500;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
table.atlas tr:last-child td { border-bottom: none; }
table.atlas tbody tr:hover td { background: var(--bg-raise-2); }
table.atlas td.mono {
    font-family: var(--font-mono);
    color: var(--muted);
    font-size: 12px;
}
table.atlas td.num { text-align: right; font-variant-numeric: tabular-nums; }

.pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
}
.pill.ok {
    background: var(--accent-dim);
    color: var(--accent);
    border-color: rgba(160, 160, 160, 0.28);
}
.pill.warn {
    background: rgba(217, 165, 83, 0.12);
    color: #e8c48a;
    border-color: rgba(217, 165, 83, 0.25);
}
.pill.bad {
    background: rgba(217, 108, 108, 0.12);
    color: var(--danger-text);
    border-color: rgba(217, 108, 108, 0.25);
}
.pill.muted {
    background: var(--bg-raise-2);
    color: var(--muted);
    border-color: var(--border);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 36px;
    padding: 0 15px;
    border: 1px solid var(--border);
    background: var(--bg-raise-2);
    color: var(--text);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background .14s ease, border-color .14s ease, transform .06s ease;
    text-decoration: none;
}
.btn:hover {
    background: #1a1d22;
    border-color: var(--border-strong);
}
.btn:active { transform: translateY(1px); }

.btn.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-light);
}
.btn.primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.btn.danger {
    color: var(--danger-text);
    border-color: rgba(217, 108, 108, 0.3);
    background: rgba(217, 108, 108, 0.08);
}
.btn.danger:hover { background: rgba(217, 108, 108, 0.14); }
.btn.ghost { background: transparent; }
.btn.sm { height: 30px; padding: 0 11px; font-size: 12px; }

.input,
input[type="text"],
input[type="password"],
input[type="number"],
input[type="search"],
select,
textarea {
    width: 100%;
    height: 38px;
    padding: 0 13px;
    background: var(--input-bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font: inherit;
    outline: none;
    transition: border-color .14s ease, background .14s ease;
}
textarea { height: auto; padding: 11px 13px; resize: vertical; line-height: 1.5; }

textarea.code-editor {
    min-height: 360px;
    padding: 16px 18px;
    font-family: var(--font-mono);
    font-size: 13.5px;
    line-height: 1.65;
    background: var(--code-bg);
    tab-size: 4;
    -moz-tab-size: 4;
    white-space: pre;
    overflow: auto;
}
.input:focus, input:focus, select:focus, textarea:focus {
    border-color: rgba(160, 160, 160, 0.5);
    background: #1c1f24;
}
.input.sm { height: 32px; padding: 0 10px; font-size: 12px; }

.form-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.form-row .grow { flex: 1; min-width: 160px; }
.form-row label {
    display: block;
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 6px;
    font-weight: 500;
}

.inline-form {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.flashes {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}
.flash {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 11px 15px;
    background: var(--bg-raise);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.flash::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--muted);
    flex-shrink: 0;
}
.flash.success {
    border-color: rgba(160, 160, 160, 0.35);
    color: #d0d0d0;
}
.flash.success::before { background: var(--accent); }
.flash.error {
    border-color: rgba(217, 108, 108, 0.3);
    color: var(--danger-text);
}
.flash.error::before { background: var(--danger); }

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    position: relative;
}
.login-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg-raise);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 36px 32px 30px;
    position: relative;
    z-index: 1;
}
.login-brand {
    margin-bottom: 28px;
}
.login-brand .mark {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.03em;
}
.login-brand .mark .at { color: var(--accent); }
.login-brand .sub {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-top: 6px;
    font-weight: 500;
}
.login-card label {
    display: block;
    margin: 16px 0 7px;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 500;
}
.login-card .btn.primary {
    width: 100%;
    height: 42px;
    margin-top: 22px;
    font-weight: 600;
}
.login-foot {
    margin-top: 22px;
    color: var(--muted);
    font-size: 11.5px;
    letter-spacing: 0.05em;
}

.err-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    text-align: center;
    position: relative;
    padding: 24px;
}
.err-inner { position: relative; z-index: 1; }
.err-code {
    font-family: var(--font-display);
    font-size: 80px;
    color: var(--accent);
    line-height: 1;
    letter-spacing: -0.04em;
}
.err-msg {
    color: var(--muted);
    margin-top: 10px;
    font-size: 15px;
}

.muted { color: var(--muted); }
.right { text-align: right; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.divider {
    height: 1px;
    background: var(--border);
    margin: 16px 0;
}
details.collapse > summary {
    cursor: pointer;
    list-style: none;
    color: var(--accent);
    font-size: 12px;
    padding: 4px 0;
}
details.collapse > summary::-webkit-details-marker { display: none; }
details.collapse[open] > summary { color: var(--text); }

@media (max-width: 820px) {
    .app { grid-template-columns: 1fr; }
    .sidebar {
        position: relative;
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        padding: 16px;
    }
    .brand {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
        width: 100%;
    }
    .sidebar-foot { display: none; }
    .main { padding: 24px 18px 48px; }
}

/* ── Public site (x3-style) ── */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px max(24px, 5vw);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}
.site-logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 22px;
    letter-spacing: -0.03em;
    color: var(--text);
    text-decoration: none;
}
.site-logo:hover { color: var(--text); }
.site-logo .at { color: var(--accent); }
.site-logo.sm { font-size: 18px; }
.site-links {
    display: flex;
    align-items: center;
    gap: 28px;
}
.site-links a { color: var(--muted); font-weight: 500; font-size: 14px; text-decoration: none; }
.site-links a:hover { color: var(--text); }
.inline-nav-form { margin: 0; display: inline; }
.site-flashes {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px max(24px, 5vw) 0;
    position: relative;
    z-index: 10;
}
.site-foot {
    border-top: 1px solid var(--border);
    padding: 48px max(24px, 5vw);
    margin-top: 0;
}
.site-foot-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
}

.x3-hero {
    padding: 72px max(24px, 5vw) 56px;
    position: relative;
    z-index: 1;
}
.x3-hero-inner {
    max-width: 1200px;
    margin: 0 auto;
}
.x3-tag {
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}
.x3-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(48px, 8vw, 88px);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 0.95;
    margin: 0;
    max-width: 720px;
}
.x3-hero h1 .accent { color: var(--accent); }
.x3-lead {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.65;
    max-width: 560px;
    margin: 28px 0 0;
}
.x3-actions {
    display: flex;
    gap: 18px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 32px;
}
.btn.lg { height: 46px; padding: 0 24px; font-size: 15px; font-weight: 600; }

.ghost-link {
    color: var(--muted);
    font-size: 13.5px;
    font-weight: 500;
    border-bottom: 1px solid var(--border-strong);
    padding-bottom: 2px;
    transition: color .14s ease, border-color .14s ease;
}
.ghost-link:hover { color: var(--text); border-color: var(--text); }

.x3-feature-list { margin-top: 0; }
.x3-feature-list li {
    border-top: 1px solid var(--border);
    padding: 18px 0;
    display: block;
}
.x3-feature-list li:last-child { border-bottom: 1px solid var(--border); }
.x3-feature-list strong { display: block; font-size: 15px; font-weight: 600; margin-bottom: 4px; color: var(--text); }
.x3-feature-list p { color: var(--muted); margin: 0; font-size: 13.5px; line-height: 1.6; }
.x3-feature-list code {
    background: var(--code-bg);
    padding: 1px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent);
}

.dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; align-items: baseline; font-size: 13px; }
.dl dt { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.10em; }
.dl dd { margin: 0; font-family: var(--font-mono); font-size: 12.5px; color: var(--text); }

.x3-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    margin-top: 64px;
    max-width: 900px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
@media (max-width: 720px) { .x3-stats { grid-template-columns: repeat(2, 1fr); } }
.x3-stat {
    background: var(--bg-raise);
    padding: 24px 20px;
    text-align: center;
}
.x3-stat-val {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.x3-stat-lbl {
    color: var(--muted);
    font-size: 12px;
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.x3-section {
    padding: 80px max(24px, 5vw);
    position: relative;
    z-index: 1;
}
.x3-section-alt {
    background: var(--bg-raise);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.x3-section-inner {
    max-width: 1200px;
    margin: 0 auto;
}
.x3-kicker {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
}
.x3-section-title {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.03em;
    margin: 0 0 32px;
}

.x3-num-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
@media (max-width: 980px) { .x3-num-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .x3-num-grid { grid-template-columns: 1fr; } }
.x3-num-card {
    background: var(--bg-raise);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    min-height: 180px;
}
.x3-section-alt .x3-num-card { background: var(--bg); }
.x3-num {
    display: block;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 16px;
}
.x3-num-card h3 {
    margin: 0 0 10px;
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
}
.x3-num-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.x3-split {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 48px;
    align-items: start;
}
@media (max-width: 900px) { .x3-split { grid-template-columns: 1fr; } }
.x3-split-copy h2 {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.03em;
    margin: 0 0 16px;
}
.x3-bullets {
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}
.x3-bullets li {
    position: relative;
    padding-left: 18px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}
.x3-bullets li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}
.x3-split-panel h3 { margin-top: 4px; }
.x3-price-rows { margin-top: 20px; display: flex; flex-direction: column; gap: 0; }
.x3-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.x3-price-row.highlight {
    color: var(--accent);
    border-bottom: none;
    padding-bottom: 0;
}
.x3-price-row strong { font-family: var(--font-display); }

.x3-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
@media (max-width: 820px) { .x3-steps { grid-template-columns: 1fr; } }
.x3-step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: var(--bg-raise);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
}
.step-num {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent-dim);
    border: 1px solid rgba(220, 38, 38, 0.35);
    color: var(--accent);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: var(--font-display);
    font-size: 14px;
}
.x3-step strong { display: block; margin-bottom: 4px; font-size: 15px; }
.x3-step p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

.x3-cta {
    padding: 88px max(24px, 5vw);
    text-align: center;
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border);
}
.x3-cta-inner { max-width: 560px; margin: 0 auto; }
.x3-cta h2 {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0;
}
.x3-cta p { margin: 12px 0 0; font-size: 15px; }

.small { font-size: 13px; }
.redeem-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.redeem-form .input { flex: 1; min-width: 200px; }
.mark-link { text-decoration: none; color: inherit; }
.mono { font-family: var(--font-mono); }
.status-pill {
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: 1px solid var(--border);
}
.status-pill.ok {
    background: var(--accent-dim);
    color: var(--accent);
    border-color: rgba(160, 160, 160, 0.35);
}
.status-pill.bad {
    background: rgba(255,255,255,0.04);
    color: var(--muted);
}

@media (max-width: 640px) {
    .site-nav { padding: 14px 20px; }
    .site-links { gap: 16px; }
    .x3-hero { padding-top: 48px; }
    .x3-section { padding: 56px 20px; }
    .x3-cta { padding: 64px 20px; }
}

/* ── Profile picture ───────────────────────────────────────────── */

.avatar-img {
    object-fit: cover;
    padding: 0;
}

.page-head-id {
    display: flex;
    align-items: center;
    gap: 16px;
}
.page-pfp {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--accent-dim);
    border: 1px solid rgba(160, 160, 160, 0.30);
    object-fit: cover;
    flex-shrink: 0;
}
.page-pfp.page-pfp-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    color: var(--accent);
}

.pfp-row {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-top: 14px;
}
.pfp-preview {
    width: 96px;
    height: 96px;
    border-radius: 18px;
    background: var(--bg-raise-2);
    border: 1px solid var(--border);
    overflow: hidden;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-family: var(--font-display);
    font-size: 38px;
    font-weight: 600;
}
.pfp-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pfp-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.pfp-upload-form {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}
.pfp-pick {
    position: relative;
    cursor: pointer;
    overflow: hidden;
}
.pfp-pick input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.pfp-hint {
    flex-basis: 100%;
    margin-top: 4px;
}

@media (max-width: 640px) {
    .page-head-id { flex-wrap: wrap; }
    .pfp-row      { flex-direction: column; align-items: flex-start; }
}

/* ── Home page ─────────────────────────────────────────────────── */

.home-hero {
    max-width: 1180px;
    margin: 64px auto 0;
    padding: 0 36px;
}
.home-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: 56px;
    align-items: end;
}

.home-status {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 5px 12px 5px 10px;
    border-radius: 999px;
    background: rgba(160, 160, 160, 0.10);
    border: 1px solid rgba(160, 160, 160, 0.30);
    color: var(--accent);
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 0.04em;
    margin-bottom: 22px;
}
.home-status .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(160, 160, 160, 0.20);
    animation: home-dot 1.8s ease-in-out infinite;
}
@keyframes home-dot {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.45; }
}

.home-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 76px;
    line-height: 0.98;
    letter-spacing: -0.04em;
    margin: 0;
}
.home-title .muted-line {
    color: var(--muted);
    font-weight: 500;
}

.home-lead {
    color: var(--muted);
    font-size: 16px;
    line-height: 1.62;
    max-width: 560px;
    margin: 22px 0 0;
}

.home-cta {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.home-card {
    background: linear-gradient(180deg, var(--bg-raise) 0%, var(--bg-raise-2) 100%);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px 22px 18px;
    position: relative;
    overflow: hidden;
}
.home-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 0%, rgba(220,38,38,0.10), transparent 55%);
    pointer-events: none;
}
.home-card header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    position: relative;
}
.home-card .kicker {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--accent);
    font-weight: 600;
}
.home-card .version {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
}

.home-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin: 0;
    position: relative;
}
.home-stats > div {
    background: var(--bg-raise-2);
    padding: 14px 12px 12px;
}
.home-stats dt {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    margin: 0 0 6px;
    font-weight: 500;
}
.home-stats dd {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0;
    font-feature-settings: "tnum";
}

.home-tip {
    margin-top: 18px;
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.55;
    position: relative;
}
.home-tip code {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 6px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--text);
}

/* ── Features ──────────────────────────────────────────────────── */

.home-section {
    max-width: 1180px;
    margin: 120px auto 0;
    padding: 0 36px;
}
.home-section-inner {
    /* nothing yet — wrapper for max-width handoff */
}
.kicker {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--accent);
    font-weight: 600;
    margin: 0 0 10px;
}
.section-title {
    font-family: var(--font-display);
    font-size: 38px;
    line-height: 1.08;
    letter-spacing: -0.025em;
    font-weight: 600;
    margin: 0 0 36px;
    max-width: 720px;
}

.home-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(170px, auto);
    gap: 16px;
}
.home-feature {
    background: var(--bg-raise);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px 22px 20px;
    transition: border-color .18s ease, transform .22s ease;
}
.home-feature:hover {
    border-color: var(--border-strong);
    transform: translateY(-2px);
}
.home-feature h3 {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 16px;
    margin: 0 0 10px;
    letter-spacing: -0.005em;
}
.home-feature p {
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.6;
    margin: 0;
}
.home-feature code {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0 5px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--text);
}
.home-feature em {
    color: var(--text);
    font-style: normal;
    font-weight: 500;
}
.home-feature .bullets {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    color: var(--muted);
    font-size: 12.5px;
}
.home-feature .bullets li {
    padding: 5px 0;
    border-top: 1px solid var(--border);
}
.home-feature .bullets li:first-child { border-top: 0; padding-top: 0; }

.feature-tall { grid-row: span 2; }
.feature-wide { grid-column: span 2; }

/* ── Setup flow ────────────────────────────────────────────────── */

.home-flow {
    max-width: 1180px;
    margin: 120px auto 0;
    padding: 0 36px;
}
.home-flow-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.home-flow-steps li {
    background: var(--bg-raise);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px 22px 20px;
    display: flex;
    gap: 18px;
    align-items: flex-start;
}
.home-flow-steps .step-num {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 600;
    color: var(--accent);
    line-height: 1;
    letter-spacing: -0.02em;
    min-width: 38px;
}
.home-flow-steps strong {
    display: block;
    font-size: 15px;
    margin-bottom: 5px;
    font-weight: 600;
}
.home-flow-steps p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
    margin: 0;
}
.home-flow-steps code {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0 5px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text);
}

/* ── Final CTA ─────────────────────────────────────────────────── */

.home-final {
    max-width: 920px;
    margin: 140px auto 96px;
    padding: 64px 40px 56px;
    text-align: center;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: radial-gradient(circle at 50% 0%, rgba(220,38,38,0.06), transparent 70%);
}
.home-final h2 {
    font-family: var(--font-display);
    font-size: 42px;
    letter-spacing: -0.025em;
    font-weight: 600;
    margin: 0 0 8px;
}
.home-final p { font-size: 14px; margin: 0; }
.home-final .home-cta { justify-content: center; margin-top: 24px; }

/* ── Mobile ────────────────────────────────────────────────────── */

@media (max-width: 980px) {
    .home-hero-grid    { grid-template-columns: 1fr; gap: 36px; }
    .home-title        { font-size: 54px; }
    .home-features     { grid-template-columns: 1fr 1fr; }
    .feature-tall      { grid-row: auto; }
    .feature-wide      { grid-column: span 2; }
    .home-flow-steps   { grid-template-columns: 1fr; }
    .section-title     { font-size: 30px; }
    .home-final        { padding: 48px 24px; }
    .home-final h2     { font-size: 32px; }
}
@media (max-width: 600px) {
    .home-hero         { padding: 0 22px; margin-top: 40px; }
    .home-title        { font-size: 40px; }
    .home-section,
    .home-flow         { padding: 0 22px; margin-top: 80px; }
    .home-features     { grid-template-columns: 1fr; }
    .feature-wide      { grid-column: auto; }
}
