/* ==========================================================================
   PROTON — Discord-native suite
   1) Operations  = Discord Developer Portal clone
   2) Community   = Discord client clone (rail/channels/chat/members)
   3) Home/Login  = Discord landing + Nitro-style plans + login card
   Real Discord theme variables and metrics throughout.
   ========================================================================== */

:root {
    --bg-primary: #232428;
    --bg-secondary: #1e1f22;
    --bg-tertiary: #141517;
    --bg-hover: #2b2d31;
    --bg-active: #35373c;
    --textarea-bg: #2e3035;
    --panel-2: #1b1c1f;
    --panel-3: #0d0e10;
    --border: rgba(255, 255, 255, 0.06);
    --border-strong: rgba(255, 255, 255, 0.10);
    --text: #dbdee1;
    --text-bright: #f2f3f5;
    --text-2: #b5bac1;
    --text-muted: #949ba4;
    --text-faint: #80848e;
    --interactive: #b5bac1;
    --interactive-hover: #dbdee1;
    --blurple: #5865f2;
    --blurple-hover: #4752c4;
    --fuchsia: #eb459e;
    --cyan: #22d3ee;
    --green: #23a55a;
    --red: #f23f43;
    --amber: #f0b232;
    --link: #00a8fc;
    --font-sans: "gg sans", "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
    --radius: 8px;
    --radius-sm: 6px;
    color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.375;
    color: var(--text);
    background: var(--bg-primary);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: rgba(88, 101, 242, 0.4); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #1a1b1e; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #111214; }

.mono { font-family: var(--font-mono); font-size: 0.92em; }
.muted { color: var(--text-muted); }

/* ==========================================================================
   OPERATIONS — Developer Portal layout
   ========================================================================== */

.portal { display: flex; height: 100vh; }

.p-side {
    width: 240px;
    flex-shrink: 0;
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(0, 0, 0, 0.25);
}

.p-app-head {
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 11px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.25);
}

.p-app-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blurple), var(--fuchsia));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.p-app-icon svg { width: 22px; height: 22px; color: #fff; }

.p-app-name {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-bright);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.p-app-sub {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-faint);
}

.p-nav { padding: 10px 8px; flex: 1; overflow-y: auto; }

.p-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border-radius: 4px;
    border: none;
    background: transparent;
    color: var(--interactive);
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    margin-bottom: 1px;
    transition: background-color 0.1s ease, color 0.1s ease;
}

.p-nav-item svg { width: 19px; height: 19px; flex-shrink: 0; }

.p-nav-item:hover { background: var(--bg-hover); color: var(--interactive-hover); }

.p-nav-item.active { background: var(--bg-active); color: var(--text-bright); }

.p-foot {
    padding: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.25);
}

.p-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.p-topbar {
    height: 56px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 26px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.25);
}

.p-topbar h1 { margin: 0; font-size: 17px; font-weight: 800; color: var(--text-bright); }

.p-topbar .p-topic { font-size: 13px; color: var(--text-muted); }

.p-key-chip {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-2, #b5bac1);
    background: var(--bg-secondary);
    border: 1px solid var(--border-strong);
    padding: 4px 11px;
    border-radius: 4px;
}

.p-content {
    flex: 1;
    overflow-y: auto;
    padding: 26px;
}

.p-inner { max-width: 820px; margin: 0 auto; }

.view { display: none; }
.view.on { display: block; }

/* Dev-portal panels */

.panel {
    background: var(--bg-secondary);
    border: 1px solid rgba(0, 0, 0, 0.25);
    border-radius: var(--radius);
    margin-bottom: 22px;
    overflow: hidden;
    animation: p-in 0.25s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes p-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.panel-head {
    padding: 18px 22px 0;
}

.panel-title {
    margin: 0 0 4px;
    font-size: 19px;
    font-weight: 800;
    color: var(--text-bright);
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-title svg { width: 19px; height: 19px; color: var(--blurple-2, #8b95f8); }

.panel-desc {
    margin: 0 0 16px;
    font-size: 13.5px;
    color: var(--text-2, #b5bac1);
}

.panel-body { padding: 0 22px 20px; }

.panel-foot {
    padding: 14px 22px;
    border-top: 1px solid rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    background: rgba(0, 0, 0, 0.12);
}

.p-save-note {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-right: auto;
}

/* Metrics tiles */

.tiles {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 22px;
}

@media (max-width: 900px) { .tiles { grid-template-columns: 1fr 1fr; } }

.tile {
    background: var(--bg-secondary);
    border: 1px solid rgba(0, 0, 0, 0.25);
    border-radius: var(--radius);
    padding: 16px 18px;
}

.tile .t-num {
    font-family: var(--font-mono);
    font-size: 30px;
    font-weight: 700;
    color: var(--text-bright);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.tile .t-sub {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 4px;
}

.tile.t-accent .t-num { color: var(--blurple-2, #8b95f8); }

/* KV rows */

.kv { display: flex; flex-direction: column; }
.kv-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}
.kv-row:last-child { border-bottom: none; }

.kv-label {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.kv-label svg { width: 14px; height: 14px; color: var(--blurple-2, #8b95f8); }

.kv-value { font-size: 14px; font-weight: 600; text-align: right; word-break: break-all; color: var(--text); }

/* Forms */

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

.label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-2, #b5bac1);
    margin-bottom: 8px;
}

.label svg { width: 13px; height: 13px; color: var(--blurple-2, #8b95f8); }

.input,
.select,
.file {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 14px;
    padding: 10px 12px;
    outline: none;
    transition: border-color 0.12s ease;
}

.input:focus, .select:focus { border-color: var(--blurple); }
.input::placeholder { color: var(--text-faint); }
.input-mono { font-family: var(--font-mono); font-size: 13px; }

.file { cursor: pointer; padding: 8px 10px; }
.file::file-selector-button {
    background: var(--blurple);
    border: none;
    color: #fff;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 12.5px;
    padding: 6px 13px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
}

.hint { margin: 6px 0 0; font-size: 12.5px; color: var(--text-muted); }

.save-row { display: flex; gap: 10px; align-items: flex-start; }
.save-row .input, .save-row .select { flex: 1; }

.form-actions { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.section-gap { margin-top: 18px; }
.divider { border: none; border-top: 1px solid rgba(0, 0, 0, 0.25); margin: 18px 0; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }
.row { display: flex; gap: 10px; flex-wrap: wrap; }

/* Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 700;
    padding: 9px 18px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.2;
    transition: background-color 0.15s ease;
    white-space: nowrap;
}

.btn svg { width: 15px; height: 15px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--blurple); color: #fff; }
.btn-primary:hover { background: var(--blurple-hover); }

.btn-secondary { background: var(--bg-active); color: var(--text); }
.btn-secondary:hover { background: #4e5058; }

.btn-ghost { background: transparent; color: var(--interactive); }
.btn-ghost:hover { color: var(--interactive-hover); text-decoration: underline; }

.btn-sm { padding: 6px 13px; font-size: 13px; }
.btn-lg { padding: 13px 26px; font-size: 15px; }
.btn-block { width: 100%; }

/* Tables / lookup */

.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }

.table td {
    padding: 11px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.045);
    vertical-align: top;
}

.table tr:last-child td { border-bottom: none; }

.cell-mono { font-family: var(--font-mono); font-size: 12.5px; color: var(--blurple-2, #8b95f8); }

.lookup-group { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }

.lookup-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid rgba(0, 0, 0, 0.25);
    border-radius: 4px;
    background: var(--bg-tertiary);
    flex-wrap: wrap;
    transition: background-color 0.12s ease;
}

.lookup-item:hover { background: var(--bg-hover); }

.lookup-item-text h4 {
    margin: 0 0 3px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-bright);
    display: flex;
    align-items: center;
    gap: 8px;
}

.lookup-item-text h4 svg { width: 15px; height: 15px; color: var(--blurple-2, #8b95f8); }

.lookup-item-text p { margin: 0; font-size: 12.5px; color: var(--text-muted); }

.build-table-wrap {
    border: 1px solid rgba(0, 0, 0, 0.25);
    border-radius: 4px;
    overflow: hidden;
}

.build-table-wrap .table td:first-child {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.webhook-cell {
    color: var(--text-2, #b5bac1);
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 12.5px;
    user-select: none;
}

.webhook-cell:hover { color: var(--link); }

.webhook-cell svg { width: 13px; height: 13px; vertical-align: -2px; margin-right: 5px; }

.card-desc {
    font-size: 13.5px;
    color: var(--text-2, #b5bac1);
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px dashed var(--border-strong);
    border-radius: 4px;
    padding: 11px 14px;
}

.card-desc svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--text-muted); }

/* ==========================================================================
   COMMUNITY — Discord client layout
   ========================================================================== */

.app { display: flex; height: 100vh; }

.rail {
    width: 72px;
    flex-shrink: 0;
    background: var(--bg-tertiary);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 0;
    gap: 8px;
    overflow-y: auto;
}

.rail::-webkit-scrollbar { width: 0; }
.rail-sep { width: 32px; height: 2px; border-radius: 1px; background: var(--border-strong); margin: 2px 0; flex-shrink: 0; }

.rail-icon {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--bg-secondary);
    color: var(--interactive);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    text-decoration: none;
    transition: border-radius 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.rail-icon svg { width: 24px; height: 24px; }

.rail-icon:hover { border-radius: 16px; background: var(--blurple); color: #fff; }
.rail-icon.active { border-radius: 16px; background: var(--blurple); color: #fff; }

.rail-icon.active::before,
.rail-icon:hover::before {
    content: "";
    position: absolute;
    left: -14px;
    width: 4px;
    height: 26px;
    border-radius: 0 4px 4px 0;
    background: #fff;
}

.rail-icon.active::before { height: 40px; }

.rail-icon[data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    left: 58px;
    top: 50%;
    transform: translateY(-50%) scale(0.92);
    background: var(--panel-3);
    color: var(--text-bright);
    font-size: 14px;
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s ease, transform 0.12s ease;
    z-index: 60;
}

.rail-icon:hover::after { opacity: 1; transform: translateY(-50%) scale(1); }

.sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
}

.server-head {
    height: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.25);
    font-size: 15px;
    font-weight: 800;
    color: var(--text-bright);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

.server-head .mark { color: var(--blurple-2, #8b95f8); display: flex; }
.server-head .mark svg { width: 18px; height: 18px; }

.chan-scroll { flex: 1; overflow-y: auto; padding: 8px; }
.chan-scroll::-webkit-scrollbar { width: 4px; }
.chan-scroll::-webkit-scrollbar-thumb { background: #202225; border: none; }

.cCategory {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 8px 4px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.chan-row {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 8px;
    border-radius: 4px;
    color: var(--interactive);
    cursor: pointer;
    margin-bottom: 1px;
    transition: background-color 0.1s ease, color 0.1s ease;
}

.chan-row:hover { background: var(--bg-hover); color: var(--interactive-hover); }
.chan-row.active { background: var(--bg-active); color: var(--text-bright); }

.chan-row .glyph {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 17px;
    font-weight: 400;
}

.chan-row.active .glyph, .chan-row:hover .glyph { color: var(--interactive-hover); }
.chan-row .glyph svg { width: 16px; height: 16px; }

.chan-row .cname {
    font-size: 15px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chan-row.active .cname { font-weight: 600; }

.user-area {
    height: 52px;
    flex-shrink: 0;
    background: var(--panel-2);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 8px 0 10px;
    cursor: pointer;
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 15px;
    color: #fff;
    overflow: hidden;
}

.avatar img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.avatar .initial { position: relative; z-index: 1; text-transform: uppercase; }

.da1 { background: #5865f2; }
.da2 { background: #757e8a; }
.da3 { background: #eb459e; }
.da4 { background: #22d3ee; }
.da5 { background: #23a55a; }

.user-area .u-name {
    flex: 1;
    min-width: 0;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-bright);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-area .u-sub {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.u-sub .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

.u-gear { color: var(--interactive); display: flex; padding: 4px; border-radius: 4px; }
.u-gear:hover { color: var(--interactive-hover); }
.u-gear svg { width: 18px; height: 18px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg-primary); }

.chan-head {
    height: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.25);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
}

.chan-head .glyph {
    width: 22px;
    height: 22px;
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: 21px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chan-head .glyph svg { width: 18px; height: 18px; }
.chan-head .c-title { font-size: 15.5px; font-weight: 700; color: var(--text-bright); }

.chan-head .c-topic {
    margin-left: 12px;
    padding-left: 12px;
    border-left: 1px solid var(--border-strong);
    font-size: 13px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chan-content { flex: 1; overflow-y: auto; padding: 20px 24px 40px; }
.content-inner { max-width: 960px; margin: 0 auto; }

/* Chat */

.chat-scroll { flex: 1; overflow-y: auto; padding: 18px 22px 8px; }

.chat-msg { display: flex; gap: 14px; padding: 6px 0; }
.chat-msg .avatar { width: 40px; height: 40px; }
.chat-msg .cm-body { min-width: 0; flex: 1; }

.chat-msg .cm-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 1px; }
.chat-msg .cm-name { font-size: 15.5px; font-weight: 600; color: var(--text-bright); }
.chat-msg .cm-time { font-size: 11.5px; color: var(--text-faint); }

.chat-msg .cm-text {
    font-size: 15px;
    color: var(--text);
    word-wrap: break-word;
    white-space: pre-wrap;
}

.chat-msg.compact { padding: 1px 0 1px 54px; }
.chat-msg.compact:hover .cm-time-hover { visibility: visible; }

.chat-msg .cm-time-hover {
    visibility: hidden;
    font-size: 10.5px;
    color: var(--text-faint);
    width: 64px;
    flex-shrink: 0;
    text-align: right;
    margin-right: -66px;
    margin-top: 3px;
}

.composer { flex-shrink: 0; padding: 0 18px 22px; }

.composer .composer-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--textarea-bg);
    border-radius: var(--radius);
    padding: 0 14px;
    min-height: 46px;
}

.composer input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 14.5px;
    padding: 13px 0;
}

.composer input::placeholder { color: var(--text-faint); }

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

/* Marketplace */

.market-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.listing {
    background: var(--bg-secondary);
    border: 1px solid rgba(0, 0, 0, 0.25);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.16s ease, border-color 0.16s ease;
}

.listing:hover { transform: translateY(-2px); border-color: rgba(88, 101, 242, 0.45); }

.listing .l-head { display: flex; align-items: center; gap: 10px; }

.listing .l-title { font-size: 14.5px; font-weight: 700; color: var(--text-bright); flex: 1; }

.listing .l-price {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 700;
    color: var(--green);
    white-space: nowrap;
}

.listing .l-body { font-size: 13px; color: var(--text-2, #b5bac1); max-height: 88px; overflow: hidden; }

.listing .l-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }

.listing .l-seller { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-muted); }
.listing .l-seller .avatar { width: 22px; height: 22px; font-size: 11px; }

/* Members */

.members { width: 240px; flex-shrink: 0; background: var(--bg-secondary); overflow-y: auto; padding: 16px 8px; }

.members::-webkit-scrollbar { width: 4px; }
.members::-webkit-scrollbar-thumb { background: #202225; border: none; }

.members h4 {
    margin: 12px 8px 6px;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.member-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 8px;
    border-radius: 4px;
    cursor: default;
}

.member-row:hover { background: var(--bg-hover); }

.member-row .m-name {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-2, #b5bac1);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-row .avatar { width: 30px; height: 30px; font-size: 13px; position: relative; }

.member-row .avatar .st {
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--green);
    border: 3px solid var(--bg-secondary);
    z-index: 2;
}

/* Profile popout */

.profile-pop {
    position: fixed;
    left: 250px;
    bottom: 60px;
    z-index: 90;
    width: 300px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    box-shadow: 0 24px 72px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    display: none;
}

.profile-pop.open { display: block; animation: p-in 0.2s ease both; }

.pp-banner { height: 60px; background: linear-gradient(120deg, var(--blurple), var(--fuchsia)); }

.pp-avatar-row { padding: 0 16px; margin-top: -28px; display: flex; align-items: flex-end; gap: 10px; }

.pp-avatar-row .avatar { width: 64px; height: 64px; border: 5px solid var(--bg-secondary); font-size: 26px; }

.pp-username { font-size: 17px; font-weight: 800; color: var(--text-bright); margin: 8px 0 2px; }

.pp-body { padding: 14px 16px 16px; }

/* ==========================================================================
   Notifications / modal / chart (shared)
   ========================================================================== */

.notification {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 200;
    display: flex;
    align-items: center;
    max-width: 380px;
    padding: 12px 18px;
    font-size: 13.5px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    background: var(--panel-3);
    color: var(--text-bright);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    animation: p-in 0.2s ease both;
}

.notification.success { border-left: 4px solid var(--green); }
.notification.error   { border-left: 4px solid var(--red); }
.notification.warning { border-left: 4px solid var(--amber); }
.notification.info    { border-left: 4px solid var(--blurple); }

.notification.fade-out { opacity: 0; transition: opacity 0.4s ease; }

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.open { display: flex; }

.modal-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    box-shadow: 0 24px 72px rgba(0, 0, 0, 0.55);
    width: 100%;
    max-width: 500px;
    animation: p-in 0.22s ease both;
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.25);
}

.modal-head h3 { margin: 0; font-size: 15px; font-weight: 800; color: var(--text-bright); }

.modal-close { background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 4px; display: flex; }
.modal-close:hover { color: var(--text); }
.modal-close svg { width: 16px; height: 16px; }

.modal-body { padding: 20px; word-break: break-all; }

/* Chart */

.chart-wrap { width: 100%; position: relative; }
.victim-chart { width: 100%; height: auto; display: block; overflow: visible; }

.ch-grid { stroke: rgba(255, 255, 255, 0.07); stroke-width: 1; }
.ch-num { font: 10px var(--font-mono); fill: var(--text-faint); text-anchor: end; }
.ch-lab { font: 10px var(--font-mono); fill: var(--text-faint); text-anchor: middle; }

.ch-area { fill: url(#victimAreaFill); opacity: 0; animation: fade-area 0.9s ease 0.5s forwards; }
@keyframes fade-area { to { opacity: 1; } }

.ch-line {
    fill: none;
    stroke: url(#victimLineGrad);
    stroke-width: 2.5;
    stroke-linejoin: round;
    stroke-linecap: round;
    filter: drop-shadow(0 0 6px rgba(88, 101, 242, 0.5));
}

.ch-draw {
    stroke-dasharray: 2400;
    stroke-dashoffset: 2400;
    animation: draw-line 1.6s cubic-bezier(0.4, 0, 0.2, 1) 0.35s forwards;
}

@keyframes draw-line { to { stroke-dashoffset: 0; } }

.ch-dot { fill: var(--bg-primary); stroke: var(--blurple-2, #8b95f8); stroke-width: 2; }

.ch-peak-label {
    font: 10.5px var(--font-mono);
    fill: var(--fuchsia);
    text-anchor: middle;
    opacity: 0;
    animation: fade-area 0.5s ease 1.9s forwards;
}

.chart-hover-line {
    stroke: rgba(255, 255, 255, 0.25);
    stroke-width: 1;
    stroke-dasharray: 3 3;
    visibility: hidden;
}

.chart-hover-dot {
    fill: var(--blurple-2, #8b95f8);
    stroke: var(--bg-primary);
    stroke-width: 2;
    visibility: hidden;
}

.chart-tip {
    position: absolute;
    pointer-events: none;
    visibility: hidden;
    background: var(--panel-3);
    color: var(--text-bright);
    border: 1px solid rgba(88, 101, 242, 0.4);
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 1.5;
    padding: 6px 10px;
    border-radius: 6px;
    white-space: nowrap;
    transform: translate(-50%, -120%);
    z-index: 5;
}

.chart-tip .tip-count { color: var(--blurple-2, #8b95f8); font-weight: 700; }

.chart-note { margin-top: 10px; font-size: 12px; color: var(--text-muted); }

@media (prefers-reduced-motion: reduce) {
    .panel, .ch-draw, .ch-area, .ch-peak-label { animation: none; stroke-dashoffset: 0; opacity: 1; }
}

/* ==========================================================================
   LANDING � two moods: dark chrome + pale chapters (Nitro comparison style)
   ========================================================================== */

.home-body { background: var(--bg-tertiary); overflow-x: hidden; }

.home-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 26px;
    padding: 13px 28px;
    background: #000000;
    border-bottom: 1px solid var(--border-strong);
}

.hn-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.14em;
    color: var(--text-bright);
}

.hn-eye {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #0b0608;
    border: 1px solid rgba(255, 46, 76, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hn-eye svg { width: 20px; height: 20px; }

.hn-link { color: var(--interactive); font-size: 14px; font-weight: 600; }
.hn-link:hover { color: var(--interactive-hover); text-decoration: none; }

.hn-spacer { flex: 1; }

.home-pill {
    background: #fff;
    color: #000;
    font-weight: 800;
    font-size: 14px;
    padding: 9px 22px;
    border-radius: 100px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.home-pill:hover {
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(255, 255, 255, 0.18);
}

/* Hero � saturated violet-to-pink field, white type, one white pill */

.home-hero {
    position: relative;
    padding: 84px 24px 76px;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(118deg, #5865f2 0%, #7c5cf0 34%, #b658a8 66%, #eb459e 100%);
}

.hh-title {
    margin: 0 auto 18px;
    max-width: 780px;
    font-size: clamp(2.4rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: #fff;
    position: relative;
    z-index: 1;
}

.hh-title .grad {
    background: linear-gradient(92deg, #ffd7e2, #22d3ee);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hh-sub {
    margin: 0 auto 32px;
    max-width: 620px;
    font-size: 17px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.82);
    position: relative;
    z-index: 1;
}

.hh-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; position: relative; z-index: 1; }

.hh-pill {
    background: #fff;
    color: #1e1f22;
    font-weight: 800;
    font-size: 15px;
    padding: 13px 34px;
    border-radius: 100px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hh-pill:hover {
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
}

.hh-ghost {
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    padding: 13px 26px;
    border-radius: 100px;
    border: 2px solid rgba(255, 255, 255, 0.55);
}

.hh-ghost:hover { text-decoration: none; border-color: #fff; }

.hh-sticker {
    position: absolute;
    width: 74px;
    height: 74px;
    background: #0b0608;
    border-radius: 20px;
    padding: 12px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
    animation: hh-float 5s ease-in-out infinite alternate;
}

.hh-sticker svg { width: 100%; height: 100%; }

.hh-sticker.s1 { left: 9%; top: 34px; transform: rotate(-12deg); }
.hh-sticker.s2 { right: 10%; bottom: 26px; transform: rotate(10deg); color: #fff; animation-delay: 0.6s; }

@keyframes hh-float {
    from { transform: translateY(-4px) rotate(-12deg); }
    to   { transform: translateY(8px) rotate(-8deg); }
}

.hh-sticker.s2 { animation-name: hh-float2; }

@keyframes hh-float2 {
    from { transform: translateY(6px) rotate(10deg); }
    to   { transform: translateY(-6px) rotate(14deg); }
}

/* Pale chapters � light canvas on the dark page (Nitro FAQ/table pattern) */

.pale-chapter {
    background: #fbfbfb;
    padding: 58px 24px 64px;
    color: #191917;
}

.pale-chapter .pc-head { max-width: 980px; margin: 0 auto 34px; text-align: center; }

.pc-title {
    margin: 0 0 8px;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    color: #191917;
}

.pc-sub { margin: 0; font-size: 15.5px; color: #5c5e66; }

.feat-grid {
    max-width: 1080px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 14px;
}

.feat {
    background: #ffffff;
    border: 1px solid #efeff1;
    border-radius: 10px;
    padding: 18px 20px;
    transition: transform 0.16s ease, border-color 0.16s ease;
}

.feat:hover { transform: translateY(-3px); border-color: #c9cdfb; }

.feat h3 {
    margin: 0 0 6px;
    font-size: 14.5px;
    font-weight: 800;
    color: #191917;
    display: flex;
    align-items: center;
    gap: 8px;
}

.feat h3::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--blurple);
    box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.15);
}

.feat p { margin: 0; font-size: 13.5px; line-height: 1.55; color: #5c5e66; }

/* Comparison table */

.compare-wrap {
    max-width: 980px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid #efeff1;
    border-radius: 12px;
    overflow: hidden;
}

.compare { width: 100%; border-collapse: collapse; font-size: 14px; }

.compare th, .compare td {
    padding: 12px 16px;
    text-align: center;
    border-bottom: 1px solid #efeff1;
}

.compare thead th {
    font-size: 15px;
    font-weight: 800;
    color: #191917;
    padding-top: 22px;
}

.compare .cmp-feature {
    text-align: left;
    font-size: 13.5px;
    color: #3d3f46;
    font-weight: 500;
}

.cmp-mut { color: #8a8a90 !important; font-weight: 400 !important; }

.cmp-pop {
    background: #ffffff;
    border-left: 2px solid var(--blurple);
    border-right: 2px solid var(--blurple);
    position: relative;
}

.cmp-price {
    font-family: var(--font-mono);
    font-size: 24px;
    font-weight: 700;
    color: #191917;
}

.cmp-price span { font-size: 12.5px; font-weight: 500; color: #8a8a90; margin-left: 4px; }

.cmp-yes { color: var(--green); font-weight: 800; font-size: 15px; }
.cmp-no { color: #c0c0c8; font-weight: 700; }

.cmp-btn-row td { padding-top: 18px; padding-bottom: 22px; }

.np-tag {
    display: block;
    width: fit-content;
    margin: 0 auto 6px;
    background: var(--blurple);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 3px 12px;
    border-radius: 100px;
}

/* Footer � deep blue-violet with oversized wordmark */

.home-foot {
    background: #3c45a5;
    padding: 52px 24px 26px;
}

.hf-cols {
    max-width: 980px;
    margin: 0 auto 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 28px;
}

.hf-col h4 {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
}

.hf-col a, .hf-col span {
    display: block;
    color: rgba(255, 255, 255, 0.92);
    font-size: 14px;
    font-weight: 600;
    padding: 3px 0;
}

.hf-col a:hover { text-decoration: underline; }
.hf-col span { cursor: default; }

.hf-wordmark {
    text-align: center;
    font-size: clamp(64px, 14vw, 150px);
    font-weight: 900;
    letter-spacing: 0.06em;
    line-height: 1;
    color: rgba(255, 255, 255, 0.14);
    user-select: none;
}

@media (max-width: 760px) {
    .home-nav { padding: 12px 16px; gap: 14px; }
    .home-hero { padding: 60px 18px 56px; }
    .hh-sticker { display: none; }
}