/* ==========================================================================
   Kirk — beta design system
   One stylesheet for every page in /beta site. Pages only add small,
   page-specific rules on top of this.
   ========================================================================== */

@view-transition { navigation: auto; }

:root {
    --font: "Figtree", "Helvetica Neue", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

    --page: #0b0c10;
    --surface: #13151b;
    --surface-2: #191c23;
    --surface-3: #21252e;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.14);

    --text: #fff;
    --soft: rgba(255, 255, 255, 0.78);
    --muted: rgba(255, 255, 255, 0.56);
    --faint: rgba(255, 255, 255, 0.38);

    --brand: #e5383b;
    --brand-hover: #ef4a4d;
    --accent: #ff7b7d;
    --success: #7fdca4;
    --success-bg: rgba(127, 220, 164, 0.08);
    --warning: #f3c06b;
    --warning-bg: rgba(243, 192, 107, 0.08);
    --danger: #ff8a80;
    --danger-bg: rgba(255, 138, 128, 0.08);
    --discord: #5865f2;

    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius: 14px;
    --radius-sm: 10px;
    --pill: 980px;

    --ease-out: cubic-bezier(.2, .7, .3, 1);
    --fast: .16s;
    --gutter: clamp(16px, 4vw, 40px);
    --content: 1120px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--page); color-scheme: dark; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--page);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
main { flex: 1; }
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: rgba(229, 56, 59, 0.45); }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
code, kbd { font-family: var(--mono); font-size: .9em; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
[hidden] { display: none !important; }

/* ── Layout ─────────────────────────────────────────────────────────────── */
.container { width: 100%; max-width: calc(var(--content) + 2 * var(--gutter)); padding: 0 var(--gutter); margin: 0 auto; }
.container-narrow { width: 100%; max-width: calc(760px + 2 * var(--gutter)); padding: 0 var(--gutter); margin: 0 auto; }
.container-tight { width: 100%; max-width: calc(520px + 2 * var(--gutter)); padding: 0 var(--gutter); margin: 0 auto; }
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section + .section { padding-top: 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.section-head p { color: var(--muted); max-width: 520px; margin-top: 8px; }
.stack { display: flex; flex-direction: column; gap: var(--gap, 16px); }
.row { display: flex; align-items: center; flex-wrap: wrap; gap: var(--gap, 10px); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ── Type ───────────────────────────────────────────────────────────────── */
.eyebrow { color: var(--accent); font-size: 14px; font-weight: 500; letter-spacing: .01em; }
.display { font-size: clamp(38px, 6vw, 68px); font-weight: 600; line-height: 1.04; letter-spacing: -.035em; text-wrap: balance; }
h1, .h1 { font-size: clamp(30px, 4vw, 42px); font-weight: 600; line-height: 1.1; letter-spacing: -.03em; text-wrap: balance; }
h2, .h2 { font-size: 22px; font-weight: 600; line-height: 1.25; letter-spacing: -.02em; }
h3, .h3 { font-size: 17px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
h4 { font-size: 14px; font-weight: 600; }
.lede { color: var(--muted); font-size: clamp(16px, 1.4vw, 19px); line-height: 1.5; max-width: 620px; text-wrap: pretty; }
.muted { color: var(--muted); }
.soft { color: var(--soft); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.mono { font-family: var(--mono); font-size: .92em; letter-spacing: 0; }
.num { font-variant-numeric: tabular-nums; }
.link { color: var(--text); text-decoration: underline; text-decoration-color: rgba(255,255,255,.35); text-underline-offset: 3px; transition: text-decoration-color var(--fast) ease; }
.link:hover { text-decoration-color: #fff; }
.prose p, .prose ul { color: var(--soft); }
.prose p + p, .prose p + ul, .prose ul + p { margin-top: 12px; }
.prose ul { padding-left: 20px; }
.prose li + li { margin-top: 6px; }
.prose a { color: var(--text); text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,.35); }
.prose strong { color: var(--text); font-weight: 600; }

/* ── Topbar ─────────────────────────────────────────────────────────────── */
.skip { position: fixed; top: 10px; left: 10px; z-index: 200; background: #fff; color: #000; padding: 10px 16px; border-radius: var(--pill); font-size: 14px; text-decoration: none; transform: translateY(-200%); transition: transform var(--fast) ease; }
.skip:focus { transform: none; }

.topbar {
    position: sticky; top: 0; z-index: 50;
    background: rgba(11, 12, 16, 0.72);
    -webkit-backdrop-filter: saturate(160%) blur(18px);
    backdrop-filter: saturate(160%) blur(18px);
    border-bottom: 1px solid transparent;
    transition: border-color .24s, background .24s;
}
.topbar.is-scrolled { border-bottom-color: var(--line); }
.topbar-inner { max-width: calc(var(--content) + 2 * var(--gutter)); height: 60px; padding: 0 var(--gutter); margin: 0 auto; display: flex; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; font-size: 17px; font-weight: 600; letter-spacing: -.01em; text-decoration: none; }
.brand img { width: 26px; height: 26px; border-radius: 7px; object-fit: cover; }
.nav { display: flex; gap: clamp(14px, 2.2vw, 28px); margin-left: 8px; }
.nav a { color: rgba(255,255,255,.66); font-size: 14px; text-decoration: none; transition: color var(--fast) ease; }
.nav a:hover, .nav a.is-current { color: #fff; }
.topbar-end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.signin { color: rgba(255,255,255,.82); font-size: 14px; text-decoration: none; padding: 0 12px; line-height: 34px; transition: color var(--fast) ease; }
.signin:hover { color: #fff; }
.account-chip { display: inline-flex; align-items: center; gap: 9px; height: 36px; padding: 0 12px 0 4px; border-radius: var(--pill); font-size: 14px; text-decoration: none; transition: background var(--fast) ease; max-width: 220px; }
.account-chip:hover { background: rgba(255,255,255,.08); }
.account-chip img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.account-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-btn { display: none; width: 38px; height: 38px; border-radius: var(--pill); background: transparent; border: 1px solid var(--line-strong); align-items: center; justify-content: center; }
.menu-btn svg { width: 18px; height: 18px; }
.mobile-nav { display: none; }
@media (max-width: 820px) {
    .nav { display: none; }
    .menu-btn { display: inline-flex; }
    .topbar-end .signin { display: none; }
    .mobile-nav.is-open { display: flex; flex-direction: column; padding: 8px var(--gutter) 18px; border-top: 1px solid var(--line); }
    .mobile-nav a { padding: 12px 0; color: var(--soft); text-decoration: none; font-size: 16px; border-bottom: 1px solid var(--line); }
    .mobile-nav a:last-child { border-bottom: 0; }
}
@media (max-width: 420px) { .topbar-end .btn-sm.hide-xs { display: none; } }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 42px; padding: 0 20px; border-radius: var(--pill); border: 1px solid transparent;
    font-size: 15px; font-weight: 500; line-height: 1; white-space: nowrap; text-decoration: none;
    cursor: pointer; user-select: none;
    transition: background var(--fast) ease, border-color var(--fast) ease, color var(--fast) ease, opacity var(--fast) ease, scale .3s var(--ease-out);
}
.btn:active:not(:disabled) { scale: .97; transition: background var(--fast) ease, scale .12s var(--ease-out); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 14px; }
.btn-lg { height: 50px; padding: 0 26px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--brand-hover); }
.btn-white { background: #fff; color: #0b0c10; }
.btn-white:hover:not(:disabled) { background: #e9e9ec; }
.btn-secondary { background: rgba(255,255,255,.06); border-color: var(--line-strong); color: #fff; }
.btn-secondary:hover:not(:disabled) { background: rgba(255,255,255,.12); }
.btn-ghost { background: transparent; color: var(--soft); }
.btn-ghost:hover:not(:disabled) { background: rgba(255,255,255,.06); color: #fff; }
.btn-danger { background: var(--danger-bg); color: var(--danger); border-color: rgba(255,138,128,.35); }
.btn-danger:hover:not(:disabled) { background: rgba(255,138,128,.14); }
.btn-discord { background: var(--discord); color: #fff; }
.btn-discord:hover:not(:disabled) { background: #6874f5; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-arrow { display: inline-grid; place-items: center; width: 1.35em; height: 1.35em; margin: -.2em -.45em -.2em .1em; border-radius: 50%; background: #fff; color: var(--brand); }
.btn-arrow svg { width: 62%; height: 62%; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease-out); }
.btn:hover .btn-arrow svg { transform: translate(1px, -1px); }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Surfaces ───────────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; }
.card-lg { padding: clamp(24px, 4vw, 36px); border-radius: var(--radius-xl); }
.card-flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.card-body { padding: 22px; }
.card-row { display: flex; align-items: center; gap: 12px; padding: 16px 22px; border-top: 1px solid var(--line); }
.card-row:first-child { border-top: 0; }
.inset { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.divider { height: 1px; background: var(--line); border: 0; margin: 20px 0; }

.tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--pill); background: rgba(255,255,255,.06); border: 1px solid var(--line); color: var(--soft); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.tag-brand { background: rgba(229,56,59,.12); border-color: rgba(229,56,59,.3); color: var(--accent); }
.tag-success { background: var(--success-bg); border-color: rgba(127,220,164,.3); color: var(--success); }
.tag-warning { background: var(--warning-bg); border-color: rgba(243,192,107,.3); color: var(--warning); }
.tag-danger { background: var(--danger-bg); border-color: rgba(255,138,128,.3); color: var(--danger); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.dot-success { background: var(--success); }
.dot-warning { background: var(--warning); }
.dot-danger { background: var(--danger); }
.dot-brand { background: var(--brand); }

.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--soft); font-size: 14px; }
.notice svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.notice strong { color: #fff; font-weight: 600; }
.notice-success { background: var(--success-bg); border-color: rgba(127,220,164,.3); }
.notice-success svg { color: var(--success); }
.notice-warning { background: var(--warning-bg); border-color: rgba(243,192,107,.3); }
.notice-warning svg { color: var(--warning); }
.notice-danger { background: var(--danger-bg); border-color: rgba(255,138,128,.3); }
.notice-danger svg { color: var(--danger); }

.facts { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 10px 24px; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 480px) { .facts { grid-template-columns: 1fr; gap: 2px; } .facts dd { margin-bottom: 10px; } }

.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--surface-3); flex: none; }
.avatar-lg { width: 64px; height: 64px; }

.empty { text-align: center; color: var(--muted); font-size: 14px; padding: 36px 16px; }

/* ── Forms ──────────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field-label { color: var(--soft); font-size: 14px; font-weight: 500; }
.field-help { color: var(--muted); font-size: 13px; line-height: 1.45; }
.control {
    width: 100%; min-width: 0; height: 44px; padding: 0 14px;
    background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
    color: var(--text); font-size: 15px; outline: none;
    transition: border-color var(--fast) ease, box-shadow var(--fast) ease;
}
.control::placeholder { color: var(--faint); }
.control:hover:not(:disabled) { border-color: rgba(255,255,255,.22); }
.control:focus { border-color: rgba(229,56,59,.7); box-shadow: 0 0 0 3px rgba(229,56,59,.18); }
.control.is-mono { font-family: var(--mono); font-size: 14px; }
textarea.control { height: auto; min-height: 110px; padding: 11px 14px; line-height: 1.5; resize: vertical; }
select.control { appearance: none; cursor: pointer; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.6)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
.input-row { display: flex; gap: 8px; }
@media (max-width: 480px) { .input-row { flex-direction: column; } }

/* ── Tabs / segmented ───────────────────────────────────────────────────── */
.segmented { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--pill); background: var(--surface); border: 1px solid var(--line); }
.segmented button { height: 32px; padding: 0 14px; border-radius: var(--pill); border: 0; background: transparent; color: var(--muted); font-size: 14px; transition: background var(--fast) ease, color var(--fast) ease; }
.segmented button:hover { color: #fff; }
.segmented button.active { background: rgba(255,255,255,.1); color: #fff; }

/* ── Disclosure (FAQ / changelog) ───────────────────────────────────────── */
.disclosure { border-top: 1px solid var(--line); }
.disclosure:last-child { border-bottom: 1px solid var(--line); }
.disclosure summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; font-size: 16px; font-weight: 500; }
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary::after { content: ""; width: 10px; height: 10px; flex: none; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s var(--ease-out); }
.disclosure[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.disclosure .disclosure-body { padding: 0 0 20px; color: var(--soft); max-width: 680px; }
.disclosure .disclosure-body p + p { margin-top: 10px; }
.disclosure .disclosure-body a { color: #fff; text-underline-offset: 3px; }

/* ── Tables ─────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 13px; padding: 12px 22px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 14px 22px; border-bottom: 1px solid var(--line); color: var(--soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }

/* ── Modal ──────────────────────────────────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(5, 6, 9, 0.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal.is-open, .modal.active, .modal.open { display: flex; }
.modal-card { position: relative; width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); padding: 26px; animation: rise-in .28s var(--ease-out) both; }
.modal-close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; }
.modal-close:hover { background: rgba(255,255,255,.08); color: #fff; }

/* ── Toast ──────────────────────────────────────────────────────────────── */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 300; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: var(--pill); background: #fff; color: #0b0c10; font-size: 14px; font-weight: 500; box-shadow: 0 10px 30px rgba(0,0,0,.4); transition: opacity .2s ease, transform .3s var(--ease-out); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #ffdcd8; color: #5a0d08; }

/* ── Spinner ────────────────────────────────────────────────────────────── */
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: #fff; animation: spin .7s linear infinite; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.footer-cta { padding: clamp(56px, 8vw, 88px) 0; border-top: 1px solid var(--line); }
.footer-cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer { border-top: 1px solid var(--line); padding: 40px 0 36px; color: var(--muted); font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer-grid h4 { color: #fff; font-weight: 500; font-size: 14px; margin-bottom: 12px; }
.footer-grid ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-grid a { color: var(--muted); text-decoration: none; transition: color var(--fast) ease; }
.footer-grid a:hover { color: #fff; }
.footer-legal { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--faint); }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ── Page header (inner pages) ──────────────────────────────────────────── */
.page-head { padding: clamp(48px, 7vw, 80px) 0 clamp(28px, 4vw, 40px); }
.page-head .eyebrow { margin-bottom: 12px; }
.page-head .lede { margin-top: 14px; }

/* ── Motion ─────────────────────────────────────────────────────────────── */
@keyframes rise-in { from { opacity: 0; transform: translateY(14px); } }
.rise-in { animation: rise-in .8s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 90ms); }
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .9s var(--ease-out); }
[data-reveal].is-revealed { opacity: 1; transform: none; }
::view-transition-old(root) { animation: .16s both vt-out; }
::view-transition-new(root) { animation: .28s var(--ease-out) both vt-in; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    [data-reveal] { opacity: 1; transform: none; }
    ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* Google auto-ads: keep them from breaking the layout width */
ins.adsbygoogle { max-width: 100%; }

/* ==========================================================================
   Theme layer — depth, light and brand colour on top of the base system.
   Kept restrained: one red light source, soft highlights, real shadows.
   ========================================================================== */
:root {
    --brand-deep: #b3202a;
    --brand-glow: rgba(229, 56, 59, 0.16);
    --highlight: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35), 0 4px 12px rgba(0, 0, 0, .18);
    --shadow: 0 2px 6px rgba(0, 0, 0, .3), 0 18px 40px -12px rgba(0, 0, 0, .55);
    --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 255, 255, .04);
}

/* Ambient backdrop: the animated title.frag shader (kirk-bg.js) fills the viewport behind
   everything; a dark wash on top keeps text readable. Without WebGL a static red light is used. */
body { background: transparent; isolation: isolate; }
body::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 1100px; z-index: -1; pointer-events: none;
    background:
        radial-gradient(60% 520px at 50% -120px, rgba(229, 56, 59, .20), transparent 70%),
        radial-gradient(40% 380px at 85% 0, rgba(255, 123, 125, .06), transparent 70%);
}
.has-kirk-bg body::before { display: none; }
#kirkBg {
    position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none;
    display: block; max-width: none;
    opacity: 0; animation: kirk-bg-in 1.2s ease .1s forwards;
}
@keyframes kirk-bg-in { to { opacity: .9; } }
.has-kirk-bg body::after {
    content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background:
        linear-gradient(180deg, rgba(11, 12, 16, .15) 0%, rgba(11, 12, 16, .55) 55%, rgba(11, 12, 16, .78) 100%);
}

/* Scrollbar + selection */
html { scrollbar-color: #2a2e38 var(--page); scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--page); }
::-webkit-scrollbar-thumb { background: #2a2e38; border-radius: 10px; border: 2px solid var(--page); }
::-webkit-scrollbar-thumb:hover { background: #3a3f4b; }

/* Type */
.display, .hero h1 {
    background: linear-gradient(180deg, #fff 30%, rgba(255,255,255,.72));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.eyebrow { text-transform: none; }
.text-brand { color: var(--accent); }

/* Topbar */
.topbar { background: rgba(11, 12, 16, 0.55); }
.topbar.is-scrolled { background: rgba(11, 12, 16, 0.82); box-shadow: 0 10px 30px -18px rgba(0,0,0,.8); }
.brand img { box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 4px 14px rgba(229,56,59,.25); }
.nav a { position: relative; }
.nav a.is-current::after { content: ""; position: absolute; left: 0; right: 0; bottom: -20px; height: 2px; border-radius: 2px; background: var(--brand); }

/* Buttons */
.btn-primary {
    background: linear-gradient(180deg, #ec4548, var(--brand-deep));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 0 0 1px rgba(229,56,59,.5), 0 8px 22px -8px rgba(229,56,59,.7);
}
.btn-primary:hover:not(:disabled) {
    background: linear-gradient(180deg, #f2585b, #c52530);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.26), 0 0 0 1px rgba(239,74,77,.6), 0 10px 28px -8px rgba(229,56,59,.85);
}
.btn-white { box-shadow: inset 0 -1px 0 rgba(0,0,0,.12), 0 6px 18px -8px rgba(255,255,255,.35); }
.btn-secondary { background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03)); box-shadow: var(--highlight); }
.btn-secondary:hover:not(:disabled) { background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.07)); border-color: rgba(255,255,255,.22); }
.btn-discord { box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 8px 22px -8px rgba(88,101,242,.7); }

/* Surfaces: a lit top edge and soft shadow so cards sit above the page */
.card, .product, .modal-card, .showcase-card, .dash-card, .table-card {
    background: linear-gradient(180deg, rgba(255,255,255,.028), rgba(255,255,255,0) 120px), var(--surface);
    box-shadow: var(--highlight), var(--shadow-sm);
}
.inset { box-shadow: inset 0 1px 2px rgba(0,0,0,.25); }
.product { transition: border-color var(--fast) ease, transform .35s var(--ease-out), box-shadow .35s var(--ease-out); }
.product:hover { transform: translateY(-3px); box-shadow: var(--highlight), var(--shadow); }
.product.is-featured {
    border-color: rgba(229,56,59,.35);
    background:
        radial-gradient(120% 140px at 50% 0, rgba(229,56,59,.12), transparent 70%),
        linear-gradient(180deg, rgba(255,255,255,.028), rgba(255,255,255,0) 120px), var(--surface);
}
.product.is-featured:hover { border-color: rgba(229,56,59,.55); box-shadow: var(--highlight), var(--shadow), 0 0 40px -12px rgba(229,56,59,.45); }
.modal-card { box-shadow: var(--highlight), var(--shadow-lg); }

/* Controls */
.control { background: #15171d; box-shadow: inset 0 1px 2px rgba(0,0,0,.3); }
.segmented { box-shadow: inset 0 1px 2px rgba(0,0,0,.3); }
.segmented button.active { background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.08)); box-shadow: var(--highlight), 0 1px 3px rgba(0,0,0,.4); }

/* Tables: subtle row hover */
.table tbody tr { transition: background var(--fast) ease; }
.table tbody tr:hover td { background: rgba(255,255,255,.02); }

/* Footer CTA becomes a lit panel */
.footer-cta { border-top: 0; }
.footer-cta-inner {
    position: relative; overflow: hidden;
    padding: clamp(28px, 5vw, 48px);
    border: 1px solid rgba(229,56,59,.25); border-radius: var(--radius-xl);
    background:
        radial-gradient(60% 200% at 100% 0, rgba(229,56,59,.22), transparent 60%),
        linear-gradient(180deg, rgba(255,255,255,.03), transparent), var(--surface);
    box-shadow: var(--highlight), var(--shadow);
}
.footer { background: linear-gradient(180deg, transparent, rgba(0,0,0,.25)); }

/* Toast with depth */
.toast { box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 16px 40px rgba(0,0,0,.5); }

/* Homepage hero screenshot sits in the light */
.hero-shot { box-shadow: var(--shadow-lg), 0 0 120px -30px rgba(229,56,59,.45); transition: transform .5s var(--ease-out); will-change: transform; }
.hero-shot:hover { transform: translateY(-4px); }
