:root {
    --bg: #08090d;
    --bg-2: #10131a;
    --line: rgba(255, 255, 255, 0.08);
    --text: #f6f3ec;
    --muted: #9a9488;
    --mint: #3ee0c6;
    --mint-ink: #06241e;
    --gold: #e8b15a;
    --danger: #ffb4b4;
    --side: 248px;
    --font: "Outfit", sans-serif;
    --serif: "Fraunces", serif;
    --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
    background:
        radial-gradient(900px 420px at 100% -10%, rgba(62, 224, 198, 0.08), transparent 55%),
        var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.45;
}

.gate {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(280px, 1.05fr) minmax(320px, 0.95fr);
}
.gate-brand {
    padding: 48px 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-right: 1px solid var(--line);
    background:
        linear-gradient(165deg, rgba(62, 224, 198, 0.08), transparent 42%),
        #0c0e13;
}
.mark {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.mark i {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: var(--mint);
    color: var(--mint-ink);
    font-style: normal;
    font-family: var(--serif);
    font-weight: 600;
}
.gate-brand h1 {
    margin: 0;
    max-width: 12ch;
    font-family: var(--serif);
    font-weight: 560;
    font-size: clamp(48px, 5vw, 76px);
    line-height: 0.95;
    letter-spacing: -0.03em;
}
.gate-brand p {
    max-width: 36ch;
    color: var(--muted);
    font-size: 16px;
}
.gate-form {
    display: grid;
    place-items: center;
    padding: 32px 24px;
}
.gate-form form {
    width: min(380px, 100%);
}
.kicker {
    margin: 0 0 8px;
    color: var(--mint);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.gate-form h2 {
    margin: 0 0 8px;
    font-size: 32px;
    letter-spacing: -0.03em;
}
.lede {
    margin: 0 0 22px;
    color: var(--muted);
}
label {
    display: block;
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 13px;
}
input[type="password"] {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #0c0e13;
    color: var(--text);
    font: inherit;
    font-size: 16px;
}
input[type="password"]:focus {
    outline: 2px solid rgba(62, 224, 198, 0.45);
    outline-offset: 2px;
}
.gate button, .btn, .sheet button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    margin-top: 14px;
    padding: 0 18px;
    border: 0;
    border-radius: 14px;
    background: var(--mint);
    color: var(--mint-ink);
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
.btn.slim { min-height: 36px; margin-top: 0; padding: 0 12px; font-size: 13px; }
.btn.ghost, .sheet a.ghost {
    background: transparent;
    color: var(--text);
    box-shadow: inset 0 0 0 1px var(--line);
}
.btn.danger { background: #3a2222; color: var(--danger); }
.err {
    margin: 0 0 14px;
    color: var(--danger);
    font-size: 14px;
}

.shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--side) 1fr;
}
.side {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 28px 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    border-right: 1px solid var(--line);
    background: #0c0e13;
}
.nav { display: grid; gap: 2px; }
.nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
}
.pill {
    min-height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--mint);
    color: var(--mint-ink);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 18px;
}
.nav a:hover { color: var(--text); }
.nav a.on {
    color: var(--text);
    box-shadow: inset 2px 0 0 var(--mint);
}
.side .out {
    margin-top: auto;
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    padding: 8px 12px;
}
.main {
    padding: 48px 56px 72px;
    max-width: 1120px;
}
.main h1 {
    margin: 0 0 10px;
    font-family: var(--serif);
    font-weight: 560;
    font-size: 48px;
    line-height: 0.98;
    letter-spacing: -0.03em;
}
.main .lede { max-width: 46ch; margin-bottom: 0; }

.tiers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 28px;
}
.tier {
    padding: 18px 18px 16px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: var(--bg-2);
}
.tier em {
    display: block;
    margin-bottom: 18px;
    font-style: normal;
    color: var(--muted);
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.tier.pro { border-color: rgba(232, 177, 90, 0.35); }
.tier.ult { border-color: rgba(62, 224, 198, 0.35); }
.price {
    font-family: var(--mono);
    font-size: 28px;
    letter-spacing: -0.04em;
}
.price span { color: var(--muted); font-size: 13px; letter-spacing: 0; }
.tier small {
    display: block;
    margin-top: 10px;
    color: var(--muted);
}

.table-wrap {
    margin-top: 22px;
    overflow: auto;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
}
table { width: 100%; border-collapse: collapse; min-width: 640px; }
th, td {
    padding: 15px 18px 15px 0;
    text-align: left;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
th {
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { color: #fff; }
td.num, th.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.06);
}
.tag.hide { color: var(--muted); }

.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
    margin-top: 36px;
}
.stat {
    padding: 0 0 4px;
    border: 0;
    border-radius: 0;
    background: transparent;
}
.sheet {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}
.stat em, .tabs a {
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-style: normal;
}
.stat strong {
    display: block;
    margin: 10px 0 6px;
    font-family: var(--serif);
    font-weight: 560;
    font-size: 36px;
    letter-spacing: -0.03em;
}
.stat a, .stat span, .shop-now { color: var(--muted); font-size: 13px; text-decoration: none; }
.shop-now { margin: 14px 0 0; }
.main h2 {
    margin: 0 0 4px;
    font-family: var(--serif);
    font-weight: 560;
    font-size: 26px;
    letter-spacing: -0.02em;
}
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; margin-top: 40px; }
.main:has(.desk) {
    max-width: 1240px;
    padding: 32px 36px 64px;
}
.main:has(.desk) h1 { font-size: 40px; margin-bottom: 0; }
.desk {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 16px;
    align-items: stretch;
    margin-top: 18px;
}
.desk-main { min-width: 0; display: grid; gap: 12px; }
.metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.panels .span { grid-column: 1 / -1; }
.rail {
    display: flex;
    flex-direction: column;
    align-self: stretch;
}
.box {
    min-width: 0;
    padding: 14px 14px 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.025);
}
.box h2 {
    margin: 0;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.rail-note {
    margin: 2px 0 10px;
    color: var(--muted);
    font-size: 12px;
}
.box.stat strong { font-size: 26px; margin: 2px 0; }
.box.stat strong.ok { color: var(--mint); }
.box.stat strong.bad { color: var(--danger); }
.muted { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.block { margin-top: 40px; }
.rank, .langs, .chips-row {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
}
.rank li {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr) auto auto;
    gap: 8px;
    align-items: center;
    padding: 7px 0;
    border-top: 1px solid var(--line);
    font-size: 13px;
}
.rank.pairs li { grid-template-columns: minmax(0, 1fr) auto; }
.rank .n { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.rank .who, .chips-row .who {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: inherit;
    text-decoration: none;
}
.rank .who:hover, .chips-row .who:hover { color: var(--mint); }
.rank b, .langs b, .chips-row b {
    font-family: var(--mono);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}
.kind { color: var(--muted); font-size: 12px; }
.kind.pre { color: var(--gold); }
.rank time {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 12px;
    white-space: nowrap;
}
.chips-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.chips-row li {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    font-size: 13px;
}
.langs li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    padding: 9px 0 8px;
    border-top: 1px solid var(--line);
}
.langs span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.langs { flex: 1; }
.langs i {
    grid-column: 1 / -1;
    display: block;
    height: 3px;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--mint), rgba(62, 224, 198, 0.35));
}
.rail-foot {
    margin-top: auto;
    padding-top: 14px;
    color: var(--muted);
    font-size: 12px;
    font-family: var(--mono);
}
.table-wrap a { color: inherit; text-decoration: none; }
.table-wrap a:hover { color: var(--mint); }
.split .table-wrap { margin-top: 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 18px; margin: 0 0 22px; }
.tabs a {
    letter-spacing: 0.14em;
    text-decoration: none;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    padding: 0;
    border: 0;
    border-bottom: 1px solid transparent;
    border-radius: 0;
}
.tabs a.on { color: var(--text); border-bottom-color: var(--mint); }
.head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.head-row h1 { margin-bottom: 0; }
.sheet { max-width: 440px; margin-top: 28px; display: grid; }
.sheet input, .sheet select, .search input {
    color-scheme: dark;
}
.sheet input, .sheet select {
    width: 100%;
    height: 52px;
    margin-bottom: 14px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #0c0e13;
    color: var(--text);
    font: inherit;
    font-size: 16px;
}
.sheet input:focus, .sheet select:focus {
    outline: 2px solid rgba(62, 224, 198, 0.45);
    outline-offset: 2px;
}
.sheet .btn, .sheet button { margin-right: 8px; }
.check { display: flex; align-items: center; gap: 8px; color: var(--text); min-height: 44px; }
.check input { width: 18px; height: 18px; margin: 0; }
.log {
    margin-top: 22px;
    max-height: 68vh;
    overflow: auto;
    padding: 18px 0;
    border-radius: 0;
    border: 0;
    border-top: 1px solid var(--line);
    background: transparent;
    color: #d7d1c6;
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.55;
    white-space: pre-wrap;
}
.acts { display: flex; gap: 8px; align-items: center; }
.acts form { margin: 0; }
td.hash { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.pager { display: flex; gap: 14px; align-items: center; color: var(--muted); }
.pager a { color: var(--text); }
.stat strong.small { font-size: 18px; letter-spacing: 0; }
.search { display: flex; gap: 8px; max-width: 520px; margin: 18px 0 8px; }
.search input {
    flex: 1;
    min-width: 0;
    height: 52px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #0c0e13;
    color: var(--text);
    font: inherit;
    font-size: 16px;
}
.search input:focus {
    outline: 2px solid rgba(62, 224, 198, 0.45);
    outline-offset: 2px;
}
.field { display: block; margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.chips label {
    position: relative;
    margin: 0;
    min-height: 44px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--text);
    cursor: pointer;
}
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips label:has(input:checked) {
    border-color: transparent;
    background: var(--mint);
    color: var(--mint-ink);
}
.sheet.inline {
    display: flex;
    max-width: none;
    margin-top: 12px;
    padding: 0;
    border: 0;
    background: transparent;
}
.flash {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(62, 224, 198, 0.12);
    color: var(--mint);
}

@media (max-width: 900px) {
    .gate { grid-template-columns: 1fr; }
    .gate-brand { min-height: 280px; padding: 28px 24px; border-right: 0; border-bottom: 1px solid var(--line); }
    .gate-brand h1 { font-size: 52px; }
    .shell { grid-template-columns: 1fr; }
    .side {
        position: static;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
    .nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .side .out { margin-top: 8px; }
    .main { padding: 28px 20px 56px; }
    .tiers, .split { grid-template-columns: 1fr; }
    .stats { grid-template-columns: 1fr 1fr; }
    .desk, .metrics, .panels { grid-template-columns: 1fr; }
    .main:has(.desk) { padding: 28px 20px 56px; }
    .main h1 { font-size: 40px; }
    .stats { gap: 22px; }
}
