/* Redesign layer: structure and feel in the style of a modern mod hub
 * (centered header, pill navigation, card sidebars, calm surfaces).
 * Loaded after app.css, so it only overrides. Palette stays DeltaV. */

:root {
    --rd-width: 1180px;
    --rd-radius: 16px;
}

/* Header: one calm bar with a hairline, no heavy chrome */
.app-header {
    background: rgba(13, 21, 17, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    box-shadow: none;
}
.header-inner {
    max-width: var(--rd-width);
    margin: 0 auto;
    min-height: 68px;
    gap: 8px;
}
.brand-word {
    font-family: var(--display);
    letter-spacing: 0.02em;
}
.primary-nav .nav-link {
    border-radius: 12px;
    padding: 8px 14px;
    font-weight: 500;
    color: var(--text-2);
}
.primary-nav .nav-link:hover,
.primary-nav .nav-link:focus-visible {
    background: var(--surface-2);
    color: var(--text);
}
.primary-nav .nav-link.active {
    background: var(--green-soft);
    color: var(--green-bright);
}
.primary-nav .nav-link::before,
.primary-nav .nav-link::after {
    display: none;
}
.header-search {
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
}
.user-menu-panel {
    border-radius: var(--rd-radius);
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}
.user-menu-item {
    border-radius: 10px;
}

/* Buttons */
.btn {
    border-radius: 12px;
    font-weight: 600;
}
.btn-primary {
    background: var(--green);
    border-color: var(--green);
    color: #06121a;
}
.btn-primary:hover {
    background: var(--green-bright);
    border-color: var(--green-bright);
}

/* Cards and project rows */
.project-card,
.panel,
.card {
    border-radius: var(--rd-radius);
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: none;
}
.project-card:hover {
    border-color: var(--border-strong);
    transform: none;
}

/* Dashboard sidebar becomes a card with grouped links */
.dash-side {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--rd-radius);
    padding: 10px;
}
.dash-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-3);
}
.dash-link {
    border-radius: 10px;
    color: var(--text-2);
}
.dash-link:hover {
    background: var(--surface-2);
}
.dash-link.active {
    background: var(--green-soft);
    color: var(--green-bright);
    font-weight: 600;
}

/* Footer: quiet, wide, links in a row */
.site-footer {
    border-top: 1px solid var(--border);
    background: var(--bg-deep);
}
.footer-inner {
    max-width: var(--rd-width);
    margin: 0 auto;
}
.footer-links a {
    color: var(--text-3);
}
.footer-links a:hover {
    color: var(--text);
}

/* Inputs */
input[type="text"],
input[type="search"],
input[type="email"],
input[type="password"],
select,
textarea {
    border-radius: 12px;
}

/* ---- Header: text navigation instead of round icon buttons ---- */
@media (min-width: 961px) {
    .primary-nav {
        gap: 2px;
        margin-left: 20px;
    }
    .primary-nav .nav-link {
        width: auto;
        height: 40px;
        padding: 0 14px;
        gap: 8px;
        border: 0;
        border-radius: 12px;
        background: transparent;
        color: var(--text-2);
        font-size: 14.5px;
    }
    .primary-nav .nav-link .icon {
        width: 17px;
        height: 17px;
        color: var(--text-3);
    }
    .primary-nav .nav-link .nav-label {
        position: static;
        clip: auto;
        width: auto;
        height: auto;
        overflow: visible;
        color: inherit;
    }
    .primary-nav .nav-link:hover,
    .primary-nav .nav-link:focus-visible {
        background: var(--surface-2);
        color: var(--text);
        border: 0;
    }
    .primary-nav .nav-link.active {
        background: var(--green-soft);
        color: var(--green-bright);
        border: 0;
    }
    .primary-nav .nav-link:hover .icon,
    .primary-nav .nav-link.active .icon {
        color: var(--green-bright);
    }
    .primary-nav .nav-link::before,
    .primary-nav .nav-link::after {
        display: none;
    }
    .header-search {
        max-width: 300px;
    }
}

/* ---- Home: centered hero, card grid ---- */
.rd-hero { text-align: center; padding: 76px 24px 48px; background: radial-gradient(900px 340px at 50% 0, rgba(58, 155, 208, 0.16), transparent 70%); }
.rd-eyebrow { display: inline-block; margin-bottom: 16px; font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.rd-hero h1 { margin: 0 auto 16px; max-width: 780px; font-family: var(--display); font-size: clamp(34px, 5vw, 54px); line-height: 1.08; text-wrap: balance; }
.rd-lead { margin: 0 auto 28px; max-width: 580px; color: var(--text-3); font-size: 18px; }
.rd-cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.rd-search { display: flex; align-items: center; gap: 10px; max-width: 580px; margin: 28px auto 0; height: 50px; padding: 0 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); color: var(--text-3); }
.rd-search:focus-within { border-color: var(--green); }
.rd-search input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 15px; }
.rd-hero .hero-stats { justify-content: center; margin-top: 22px; }
.rd-wrap { max-width: var(--rd-width); margin: 0 auto; padding: 0 24px; }
.rd-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.rd-card { display: flex; gap: 12px; padding: 14px; border-radius: var(--rd-radius); background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.rd-card:hover { border-color: var(--border-strong); color: var(--text); }
.rd-card > div { min-width: 0; }
.rd-card strong { display: block; }
.rd-card span { display: block; color: var(--text-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 800px) { .rd-cards { grid-template-columns: minmax(0, 1fr); } }

/* ---- Footer: four columns ---- */
.rd-footer { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px 48px; }
.rd-footer .footer-note { grid-column: 1 / -1; }
.rd-footer-col h4 { margin: 0 0 10px; font-size: 13px; color: var(--text); }
.rd-footer-col a { display: block; padding: 3px 0; color: var(--text-3); font-size: 14px; }
.rd-footer-col a:hover { color: var(--text); }
@media (max-width: 760px) { .rd-footer { grid-template-columns: 1fr 1fr; } }

/* ---- Canvas typography: Space Grotesk headings, no all-caps ---- */
:root {
    --display: "IBM Plex Sans", "Segoe UI", sans-serif;
}
h1, h2, h3, h4,
.brand-word,
.rd-hero h1,
[class*="title"],
.project-hero h1 {
    font-family: var(--display);
    text-transform: none;
    letter-spacing: -0.01em;
}
.brand-word {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: 0.01em;
}
.project-hero {
    border-radius: var(--rd-radius);
    background: var(--surface);
    border: 1px solid var(--border);
}
.tabs .tab.active {
    color: var(--text);
    border-bottom: 2px solid var(--green);
}
.content-card {
    border-radius: var(--rd-radius);
    background: var(--surface);
    border: 1px solid var(--border);
}
.chip, .chip-muted, .type-pill {
    border-radius: 99px;
}
.browse-page-head { max-width: var(--rd-width); margin: 0 auto; padding: 28px 24px 0; }
.browse-page-head h1 { margin: 0; font-size: 34px; }

/* ---- Canvas: white card headings, calm eyebrows ---- */
.site-main h2,
.content-card h2,
.panel h2 {
    color: var(--text);
}
.eyebrow {
    color: var(--text-3);
    letter-spacing: 0.08em;
}
.dash-side .dash-user {
    border-bottom: 1px solid var(--border);
}

/* ---- Error page: big number like the canvas ---- */
.error-page { text-align: center; padding-top: 90px; }
.error-page .error-code {
    display: block;
    width: auto;
    height: auto;
    margin: 0 auto 10px;
    padding: 0;
    border: 0;
    background: none;
    font-family: var(--display);
    font-size: 110px;
    font-weight: 700;
    line-height: 1;
    color: var(--green);
}

/* ---- Issues and forms (canvas: list in one card, dark fields) ---- */
.form-stack { display: grid; gap: 14px; }
.form-stack label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.form-stack label.checkbox { display: flex; gap: 8px; align-items: center; font-weight: 400; color: var(--text-2); }
/* the mail switches of settings > Email: box left, name and hint right, one row per kind */
.form-stack label.rd-mailswitch { display: grid; grid-template-columns: 18px minmax(0, 1fr); column-gap: 12px; align-items: start;
    padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); font-weight: 400; cursor: pointer; }
.form-stack label.rd-mailswitch:hover { border-color: var(--border-strong); }
.rd-mailswitch input[type="checkbox"] { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--green); }
.rd-mailswitch b { color: var(--text); font-weight: 600; }
.rd-mailswitch .field-hint { display: block; margin-top: 3px; }
.form-stack label.rd-mailswitch:has(input:disabled) { cursor: default; background: transparent; }
/* the spam hint under the mail switches: a box with a red round "!" */
/* same grid, padding and corners as the switch rows above: the "!" sits in the checkbox column, the text starts under the names */
.rd-spamnote { display: grid; grid-template-columns: 18px minmax(0, 1fr); column-gap: 12px; align-items: center; margin-top: 14px; padding: 12px 14px;
    border: 1px solid rgba(255, 107, 107, 0.3); border-radius: 12px; background: rgba(255, 107, 107, 0.07); }
.rd-spamnote-mark { display: block; width: 18px; height: 18px; }
.rd-box .rd-spamnote p, .rd-spamnote p { margin: 0; font-size: 13px; line-height: 20px; color: var(--text-2); }   /* .rd-box p (below) adds 4 / 12 px */
.rd-spamnote b { color: var(--text); font-weight: 600; }
.site-main input[type="text"],
.site-main input[type="email"],
.site-main input[type="password"],
.site-main input[type="url"],
.site-main input[type="number"],
.site-main select,
.site-main textarea {
    width: 100%;
    box-sizing: border-box;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #0f1a15;
    color: var(--text);
    font: inherit;
    font-weight: 400;
}
.site-main textarea { min-height: 140px; resize: vertical; }
.site-main input:focus, .site-main select:focus, .site-main textarea:focus { outline: 0; border-color: var(--green); }
.issue-sort select { width: auto; min-height: 36px; }
.issue-list { gap: 0; border: 1px solid var(--border); border-radius: var(--rd-radius); background: var(--surface); overflow: hidden; }
.issue-row { border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; padding: 14px 18px; }
.issue-row:last-child { border-bottom: 0; }
.issue-row:hover { background: var(--surface-2); }
.issue-score { min-width: 36px; }

/* No all-caps headings anywhere (the canvas uses sentence case) */
h1, h2, h3, h4 { text-transform: none !important; }

/* ---- Issue detail: comment cards, compact actions ---- */
.issue-comment { border: 1px solid var(--border); border-radius: var(--rd-radius); background: var(--surface); padding: 14px 18px; margin: 12px 0; }
.issue-comment header { border-bottom: 1px solid var(--border); margin: -14px -18px 12px; padding: 10px 18px; color: var(--text-3); font-size: 13.5px; }
.issue-head { padding: 4px 0; }
.issue-head-main h1 { font-size: 30px; margin: 0 0 6px; }
form .btn.btn-primary[type="submit"] { width: auto; }
.issue-vote .btn { min-width: 52px; }
.issue-layout { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.issue-main { flex: 1 1 560px; min-width: 0; }
.issue-side { flex: 0 0 280px; display: grid; gap: 14px; }
.issue-side h4 { margin: 0 0 10px; }
.issue-side .kv { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: 14px; color: var(--text-3); }
.issue-side .kv b { color: var(--text); font-weight: 600; text-align: right; }
.issue-labels { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.issue-meta-form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }

/* ---- Home bands (canvas Main) ---- */
.rd-band { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; margin-top: 72px; }
.rd-band-reverse { flex-wrap: wrap-reverse; }
.rd-text { flex: 1 1 360px; }
.rd-text h2, .rd-creators h2 { margin: 14px 0 12px; font-size: 36px; line-height: 1.1; letter-spacing: -0.02em; }
.rd-text p, .rd-sub { color: var(--text-3); font-size: 17px; margin: 0 0 18px; }
.rd-badge { display: inline-flex; padding: 3px 11px; border-radius: 99px; background: var(--green-soft); color: var(--green-bright); font-size: 12.5px; font-weight: 600; }
.rd-badge-warm { background: var(--orange-soft); color: #e6a98d; }
.rd-panel { flex: 1 1 420px; display: grid; gap: 10px; padding: 16px; border-radius: var(--rd-radius); background: var(--surface); border: 1px solid var(--border); }
.rd-fake-search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 10px; background: #0f1a15; border: 1px solid var(--border); color: var(--text-3); font-size: 14px; }
.rd-row { display: flex; gap: 12px; padding: 10px; border-radius: 12px; background: #0f1a15; color: var(--text); }
.rd-row > div { min-width: 0; }
.rd-row strong, .rd-row span { display: block; }
.rd-row span { color: var(--text-3); font-size: 13px; }
.rd-creators { margin-top: 80px; padding: 64px 0; background: var(--bg-deep); border-block: 1px solid var(--border); text-align: center; }
.rd-creators .rd-sub { max-width: 560px; margin: 0 auto 36px; }
.rd-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; text-align: left; }
.rd-box { padding: 22px; border-radius: var(--rd-radius); background: var(--surface); border: 1px solid var(--border); }
.rd-box strong { font-size: 17px; }
.rd-box p { margin: 6px 0 0; color: var(--text-3); }
@media (max-width: 700px) { .rd-grid2 { grid-template-columns: 1fr; } }

/* ---- Project header (canvas Project) ---- */
.rd-phero { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; padding: 22px; margin-bottom: 4px; border-radius: var(--rd-radius); background: var(--surface); border: 1px solid var(--border); }
.rd-phero-icon { width: 96px; height: 96px; border-radius: 20px; overflow: hidden; flex: none; display: grid; place-items: center; background: var(--project-color, var(--surface-2)); font: 700 38px var(--display); color: #06121a; }
.rd-phero-icon img { width: 100%; height: 100%; object-fit: cover; }
.rd-phero-icon:has(img) { background: transparent; } /* a transparent icon shows the page behind it, not the project colour */
.rd-phero-main { flex: 1 1 340px; min-width: 0; }
.rd-phero-main h1 { margin: 0; font-size: 30px; }
.rd-phero-sum { margin: 4px 0 10px; color: var(--text-3); }
.rd-phero-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.rd-phero-chips .chip, .rd-phero-chips .tag, .rd-phero-chips a { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 99px; background: var(--surface-2); color: var(--text-2); font-size: 12.5px; }
.rd-phero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rd-phero-actions .btn { height: 44px; }

/* ---- Page heads and stat cards (canvas dashboard) ---- */
.rd-pagehead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px; margin: 4px 0 18px; }
.rd-pagehead h1 { margin: 0 0 4px; font-size: 34px; }
.rd-pagehead p { margin: 0; color: var(--text-3); max-width: 640px; }
.rd-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.rd-stat { padding: 18px; border-radius: var(--rd-radius); background: var(--surface); border: 1px solid var(--border); }
.rd-stat span { color: var(--text-3); }
.rd-stat strong { display: block; font: 700 30px var(--display); }
.rd-stat em { font-style: normal; color: var(--text-3); font-size: 13px; }

/* ---- Auth pages (canvas Login / Register) ---- */
.auth-shell { display: flex; flex-direction: column; align-items: center; padding: 56px 16px; }
.auth-card { width: 100%; max-width: 420px; padding: 28px; border-radius: var(--rd-radius); background: var(--surface); border: 1px solid var(--border); box-shadow: none; }
.auth-card h1 { margin: 0 0 4px; font-size: 28px; }
.auth-sub { margin: 0 0 18px; color: var(--text-3); }
.rd-auth-foot { margin: 22px 0 0; font-size: 13px; color: var(--text-3); text-align: center; }
.rd-auth-foot a { color: var(--green-bright); }
.verify-facts { display: grid; gap: 10px; margin: 20px 0; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: #070b09; }
.verify-facts > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; }
.verify-facts dt { color: var(--text-3); font-size: 13px; }
.verify-facts dd { margin: 0; color: var(--text); font-size: 13px; font-weight: 600; overflow-wrap: anywhere; text-align: right; }

/* ---- Dashboard project list (canvas Projects) ---- */
.rd-list { border-radius: var(--rd-radius); background: var(--surface); border: 1px solid var(--border); overflow: hidden; }
.rd-prow { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.rd-prow:last-child { border-bottom: 0; }
.rd-prow-main { flex: 1 1 240px; min-width: 0; }
.rd-prow-main > a { color: var(--text); margin-right: 8px; }
.rd-prow-meta { color: var(--text-3); font-size: 13.5px; }

/* ---- Tokens (canvas Settings) ---- */
.dash-content > .rd-list, .dash-content > .rd-box { margin-bottom: 16px; }
.rd-tokens .rd-empty { padding: 24px; text-align: center; color: var(--text-3); }
.rd-tokenicon { width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; color: var(--green-bright); flex: none; }
.rd-box p { margin: 4px 0 12px; color: var(--text-3); }
.rd-inline-form { display: flex; flex-wrap: wrap; gap: 10px; }
.rd-inline-form input { flex: 1 1 240px; width: auto; }
.rd-newtoken { border-color: var(--green); }

/* ---- Settings (canvas) ---- */
.rd-switch { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.rd-switch a { padding: 7px 16px; border-radius: 9px; color: var(--text-2); font-weight: 600; font-size: 14px; }
.rd-switch a.on { background: var(--green-soft); color: var(--green-bright); }
.rd-account { display: flex; gap: 12px; align-items: center; margin-top: 10px; }
.dash-content > .rd-box { margin-bottom: 16px; max-width: 720px; }

/* ---- Dashboard overview (canvas) ---- */
.rd-gap { margin-top: 16px; }
.rd-listhead { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px 8px; }
.rd-empty { padding: 20px 18px; color: var(--text-3); text-align: center; }
a.rd-prow { color: var(--text); }
a.rd-prow:hover { background: var(--surface-2); }
.rd-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.rd-center { text-align: center; }

/* ---- Edit project (canvas Edit) ---- */
.rd-actions-flat { margin-top: 0; }
.rd-edit { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.rd-edit-main { flex: 1 1 560px; min-width: 0; }
.rd-edit-side { flex: 0 0 300px; display: grid; gap: 14px; }
.rd-form .form-section { padding: 22px; margin-bottom: 16px; border-radius: var(--rd-radius); background: var(--surface); border: 1px solid var(--border); }
.rd-form .form-section h2 { margin: 0 0 10px; font-size: 20px; }
.rd-check { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; color: var(--text-3); font-size: 14px; }
.rd-check .done { color: var(--text); }
.rd-iconrow { display: flex; gap: 12px; align-items: center; margin-top: 10px; }
.rd-kv { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; font-size: 14px; color: var(--text-3); }
.rd-kv b, .rd-kv code { color: var(--text); }
.rd-danger { border-color: rgba(240, 138, 131, 0.4); }

/* ---- Admin review (canvas Admin) ---- */
.rd-review { border-bottom: 1px solid var(--border); }
.rd-review:last-child { border-bottom: 0; }
.rd-prow-flat { border-bottom: 0; }
.rd-note { margin: 0 18px 12px; color: var(--text-3); font-size: 13.5px; }
.rd-review-form { padding: 0 18px 16px; }
.rd-sub-list { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 14px; }
.rd-sub-list .rd-prow { padding-left: 0; padding-right: 0; }

/* ---- Issues list (canvas Issues) ---- */
.rd-issuehead { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 6px 0 4px; }
.rd-issuehead h1 { margin: 0; flex: 1; font-size: 30px; }
.rd-tabs { display: flex; gap: 4px; margin: 10px 0 16px; border-bottom: 1px solid var(--border); }
.rd-tabs a { padding: 12px 6px; margin-right: 18px; color: var(--text-3); font-weight: 600; border-bottom: 2px solid transparent; }
.rd-tabs a.on { color: var(--text); border-bottom-color: var(--green); }
.rd-issuebar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.rd-issuebar .rd-switch { margin-bottom: 0; }
.rd-issuebar .issue-sort label { display: inline-flex; align-items: center; gap: 6px; }
.site-main > .rd-box, .site-main > .issue-list { max-width: var(--rd-width); margin-left: auto; margin-right: auto; }

/* ---- News (canvas News) ---- */
.rd-news { max-width: var(--rd-width); margin: 0 auto; padding: 36px 24px 64px; }
.rd-newshead { text-align: center; margin-bottom: 28px; }
.rd-newshead h1 { margin: 0 0 8px; font-size: 40px; }
.rd-newshead p { margin: 0 auto; max-width: 560px; color: var(--text-3); }
.rd-featured { display: flex; flex-wrap: wrap; gap: 24px; border-radius: var(--rd-radius); background: var(--surface); border: 1px solid var(--border); overflow: hidden; }
.rd-featured-img { flex: 1 1 380px; min-height: 220px; background: var(--surface-2); }
.rd-featured-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rd-featured-body { flex: 1 1 340px; padding: 24px; align-self: center; }
.rd-featured-body h2 { margin: 12px 0 8px; font-size: 28px; }
.rd-featured-body h2 a, .rd-newscard h3 a { color: var(--text); }
.rd-featured-body p { color: var(--text-2); }
.rd-news-sub { margin: 36px 0 14px; font-size: 22px; }
.rd-newsgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.rd-newscard-img { display: block; height: 150px; border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.rd-newscard-img img { width: 100%; height: 100%; object-fit: cover; }
.rd-newscard h3 { margin: 10px 0 4px; font-size: 17px; }
.rd-newscard p { margin: 0 0 6px; color: var(--text-3); font-size: 14px; }
@media (max-width: 800px) { .rd-newsgrid { grid-template-columns: 1fr; } }

/* ---- Admin overview ---- */
.rd-split { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; }
.rd-split p { margin-bottom: 0; }
.rd-group { margin: 18px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); }
.rd-flat { background: #0f1a15; }
.rd-feature { cursor: pointer; }
.rd-box .rd-note { margin: 14px 0 0; }
.rd-two { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: end; }
.rd-submit { display: flex; align-items: end; }
.rd-search-row { padding: 0 18px 12px; }
.rd-inline-form select { width: auto; min-height: 36px; }
.rd-steps { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 8px; color: var(--text-3); font-size: 14px; }
.rd-steps b { color: var(--text); }
.rd-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }

/* ---- Tools hub (canvas Tools) ---- */
.rd-tools { padding-bottom: 56px; }
.rd-tools h2 { margin: 36px 0 6px; font-size: 28px; }
.rd-tools .rd-sub { margin: 0 0 18px; color: var(--text-3); }
.rd-toolgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.rd-tool { display: grid; gap: 8px; align-content: start; padding: 22px; border-radius: var(--rd-radius); background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.rd-tool:hover { border-color: var(--border-strong); color: var(--text); }
.rd-tool strong { font-size: 18px; }
.rd-tool p { margin: 0; color: var(--text-3); }
.rd-notes { margin-top: 28px; }
@media (max-width: 760px) { .rd-toolgrid { grid-template-columns: 1fr; } }

/* ---- FAQ (canvas Faq) ---- */
.rd-faq { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; max-width: var(--rd-width); margin: 0 auto; padding: 0 24px 56px; }
.rd-faqnav { flex: 0 0 250px; display: grid; gap: 2px; padding: 12px; border-radius: var(--rd-radius); background: var(--surface); border: 1px solid var(--border); position: sticky; top: 84px; }
.rd-faqnav a { padding: 9px 12px; border-radius: 10px; color: var(--text-2); font-weight: 500; }
.rd-faqnav a:hover { background: var(--surface-2); color: var(--text); }
.rd-faqmain { flex: 1 1 560px; min-width: 0; display: grid; gap: 18px; }
.rd-faqmain .rd-box h2 { margin: 0 0 8px; font-size: 20px; }
.rd-faqmain .rd-box p { margin: 0; }
.rd-faqmain .rd-box .faq-item p { margin: 8px 0 0; color: var(--text-2); }
body > .site-main > .rd-pagehead { max-width: var(--rd-width); margin-left: auto; margin-right: auto; padding: 28px 24px 0; }

/* ---- Docs (canvas Docs) ---- */
.rd-faqnav small { margin: 8px 12px 2px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.rd-docs .rd-endpoints { overflow: visible; }
.rd-endpoint { padding: 14px 18px; border-bottom: 1px solid var(--border); }
.rd-endpoint:last-child { border-bottom: 0; }
.rd-endpoint p { margin: 8px 0; color: var(--text-3); }
.rd-docs .code-block { margin: 8px 0 0; }
.rd-pagehead .base-url { display: inline; padding: 2px 8px; width: auto; }

/* ---- Project body (canvas Project) ---- */
.rd-version { padding: 16px 18px; border-bottom: 1px solid var(--border); }
.rd-version:last-child { border-bottom: 0; }
.rd-version.is-draft { opacity: 0.75; }
.rd-version-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.rd-version .changelog { margin: 10px 0; color: var(--text-2); }
.rd-file { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 10px; margin-top: 8px; border-radius: 12px; background: #0f1a15; }
.rd-pside { display: grid; gap: 14px; align-content: start; }
.rd-pside .rd-box p { margin: 4px 0 12px; }
.rd-download .hash-box { margin-top: 12px; }

/* ---- Issue comments (canvas Issue) ---- */
.rd-thread { display: grid; gap: 14px; }
.rd-thread-title { margin: 0; font-size: 20px; }
.rd-comment { display: flex; gap: 12px; align-items: flex-start; }
.rd-comment-card { flex: 1; min-width: 0; border-radius: var(--rd-radius); background: var(--surface); border: 1px solid var(--border); overflow: hidden; }
.rd-comment-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.rd-comment-body { padding: 14px 16px; color: var(--text-2); }

/* ---- Tool editors: same surfaces and shapes as the canvas (no markup change) ---- */
.tool-shell { max-width: var(--rd-width); margin: 0 auto; padding: 20px 24px 40px; gap: 20px; }
.tool-aside, .tool-workspace { border-radius: var(--rd-radius); background: var(--surface); border: 1px solid var(--border); box-shadow: none; }
.tool-head h1 { font-size: 30px; margin: 0 0 6px; }
.tool-head p { color: var(--text-3); }
.tool-switch { border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); padding: 4px; }
.tool-switch a { border-radius: 9px; font-weight: 600; }
.tool-switch a.active { background: var(--green-soft); color: var(--green-bright); }
.tool-section { border-radius: 12px; }
.tool-shell .btn { border-radius: 12px; }
.tool-shell .eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }

/* ---- Discover and Islands (canvas Discover / Islands) ---- */
.rd-browse { padding-top: 22px; padding-bottom: 56px; }
.rd-typeswitch { margin: 0 0 18px; }
.rd-browse-grid { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.rd-filters { flex: 0 0 260px; display: grid; gap: 14px; }
.rd-filter-head { display: flex; justify-content: space-between; align-items: center; }
.rd-check-link { display: flex; align-items: center; gap: 10px; padding: 7px 4px; color: var(--text-2); font-size: 14.5px; }
.rd-check-link em { margin-left: auto; font-style: normal; color: var(--text-3); font-size: 12.5px; }
.rd-check-link:hover { color: var(--text); }
.rd-cb { width: 18px; height: 18px; flex: none; border-radius: 6px; border: 1.5px solid var(--border-strong); }
.rd-check-link.on { color: var(--green-bright); font-weight: 600; }
.rd-check-link.on .rd-cb { background: var(--green); border-color: var(--green); box-shadow: inset 0 0 0 3px var(--surface); }
.rd-note-box p { margin: 4px 0 0; font-size: 13.5px; }
.rd-results { flex: 1 1 560px; min-width: 0; }
.rd-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.rd-searchbox { flex: 1 1 280px; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); color: var(--text-3); }
.rd-searchbox:focus-within { border-color: var(--green); }
.rd-searchbox input { flex: 1; min-width: 0; border: 0 !important; outline: 0; background: transparent !important; color: var(--text); min-height: 0 !important; padding: 0 !important; }
.rd-bar select { width: auto; min-height: 48px; border-radius: 14px; background: var(--surface); }
.rd-results-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 6px 0 12px; }
.rd-results-head h1 { margin: 0; font-size: 26px; }
.rd-rows { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.rd-result { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: var(--rd-radius); background: var(--surface); border: 1px solid var(--border); }
.rd-result:hover { border-color: var(--border-strong); }
.rd-result-main { flex: 1; min-width: 0; }
.rd-result-main h3 { margin: 0; font-size: 17px; }
.rd-result-main h3 a { color: var(--text); }
.rd-by { margin-left: 6px; font-size: 14px; font-weight: 400; color: var(--text-3); }
.rd-result-main p { margin: 2px 0 8px; color: var(--text-3); }
.rd-islands { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.rd-island { display: block; overflow: hidden; border-radius: var(--rd-radius); background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.rd-island:hover { border-color: var(--border-strong); color: var(--text); }
.rd-island-map { display: block; height: 130px; background: linear-gradient(160deg, var(--island, #1c78b0), #0f2a3a); }
.rd-island-map img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.9; }
.rd-island-body { display: grid; gap: 4px; padding: 14px 16px 16px; }
@media (max-width: 900px) { .rd-islands { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .rd-islands { grid-template-columns: 1fr; } }
.rd-island-map { display: grid; place-items: center; }
.rd-island-map img { width: 72px; height: 72px; border-radius: 16px; object-fit: cover; opacity: 1; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); }

/* ---- Download (canvas Download) ---- */
.rd-dl-hero { padding-top: 56px; }
.rd-dl-file { margin: 14px auto 0; color: var(--text-3); font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; }
.rd-dl-notes { max-width: 760px; margin: 32px auto 0; text-align: left; }
.rd-dl-notes strong { display: block; margin-bottom: 6px; }
.rd-dl h2 { margin: 56px 0 22px; text-align: center; font-size: 32px; }
.rd-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.rd-grid3 .rd-box p { margin: 6px 0 0; }
.rd-platforms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.rd-platform { display: grid; gap: 8px; align-content: start; }
.rd-platform strong { font-size: 20px; }
.rd-platform p { margin: 0; }
.rd-platform.is-missing { opacity: 0.8; }
.rd-dl-fine { margin: 28px auto 0; max-width: 680px; text-align: center; color: var(--text-3); font-size: 14px; }
@media (max-width: 860px) { .rd-grid3, .rd-platforms { grid-template-columns: 1fr; } }

/* ---- Fix: version list and project panels ---- */
.rd-list.tab-panel { padding: 0; margin-top: 16px; }
.project-main .tab-panel:first-child { margin-top: 0; }
.rd-list.tab-panel .rd-listhead { padding: 16px 18px 10px; border-bottom: 1px solid var(--border); }
.rd-version { padding: 16px 18px; }
.rd-version-head strong { font-size: 18px; }
.rd-version .rd-chips { margin-left: auto; }
.rd-file { margin-top: 10px; }
.rd-file .rd-prow-main strong { word-break: break-all; }

/* ---- Fix: header never wider than the window (signed in: search, Publish and user menu) ---- */
@media (min-width: 961px) {
    .header-inner { gap: 6px; padding: 0 18px; }
    .brand-word { font-size: 17px; }
    .primary-nav { margin-left: 8px; gap: 0; }
    .primary-nav .nav-link { padding: 0 10px; font-size: 14px; gap: 6px; }
    .header-search { flex: 1 1 120px; min-width: 110px; max-width: 220px; margin-left: auto; }
    .header-search kbd { display: none; }
    .header-actions { gap: 8px; flex: none; }
}
@media (min-width: 961px) and (max-width: 1360px) {
    .primary-nav .nav-link .icon { display: none; }
    .header-user-name { display: none; }
}
@media (min-width: 961px) and (max-width: 1120px) {
    .header-search { display: none; }
}

/* ---- Project tabs: plain text with an underline (canvas) ---- */
.project-tabs { display: flex; gap: 4px; margin: 18px 0 14px; padding: 0; border-bottom: 1px solid var(--border); background: none; }
.project-tabs .tab { padding: 12px 8px; margin-right: 14px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: var(--text-3); font-size: 15px; font-weight: 600; }
.project-tabs .tab:hover { color: var(--text); background: none; }
.project-tabs .tab.active { color: var(--text); border-bottom-color: var(--green); background: none; }
.project-tabs .tab-count { margin-left: 4px; padding: 1px 7px; border-radius: 99px; background: var(--surface-2); color: var(--text-3); font-size: 12px; }
.rd-tools { padding-top: 24px; }

/* ---- Tools page: more space under the heading, darker background ---- */
.rd-tools h2 { margin-bottom: 26px; }
body:has(.rd-tools) { background: #050807; }
body:has(.rd-tools) .site-main { background: #050807; }
body:has(.rd-tools) .site-footer { background: #030504; }
body:has(.rd-tools) .rd-tool,
body:has(.rd-tools) .rd-tools .rd-box { background: #0b110e; }

/* ---- Blacker background on the whole site ---- */
:root {
    --bg: #050807;
    --bg-deep: #030504;
    --surface: #0b110e;
    --surface-2: #121a16;
    --surface-3: #18221d;
    --border: #1a2621;
}
body {
    background: linear-gradient(180deg, #08100d 0, #050807 600px);
    background-color: #050807;
}
.app-header { background: rgba(5, 8, 7, 0.92); }
.site-footer { background: #030504; }
.rd-hero { background: radial-gradient(900px 340px at 50% 0, rgba(58, 155, 208, 0.12), transparent 70%); }
.rd-flat, .rd-file, .rd-row, .rd-fake-search { background: #070b09; }
.rd-searchbox, .rd-switch { background: #0b110e; }
.site-main input[type="text"], .site-main input[type="email"], .site-main input[type="password"],
.site-main input[type="url"], .site-main input[type="number"], .site-main select, .site-main textarea { background: #070b09; }

/* ---- Header dropdowns (Discover, Resources) ---- */
.nav-drop { position: relative; }
.nav-drop > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.nav-drop > summary::-webkit-details-marker { display: none; }
.nav-drop[open] > summary { background: var(--surface-2); color: var(--text); }
.nav-drop-panel {
    position: absolute; top: calc(100% + 8px); left: 0; z-index: 90; min-width: 260px; padding: 8px;
    border-radius: var(--rd-radius); background: var(--surface); border: 1px solid var(--border);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6);
}
.nav-drop-item { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; color: var(--text-2); }
.nav-drop-item:hover { background: var(--surface-2); color: var(--text); }
.nav-drop-item span { display: grid; }
.nav-drop-item strong { color: var(--text); font-size: 14.5px; }
.nav-drop-item small { color: var(--text-3); font-size: 12.5px; }
.nav-drop-item .icon { color: var(--green-bright); flex: none; }
@media (max-width: 960px) {
    .nav-drop-panel { position: static; box-shadow: none; margin-top: 4px; }
}

/* ---- Home: latest news (canvas Main) ---- */
.rd-homenews { margin-top: 64px; padding-bottom: 24px; }
.rd-homenews h2 { margin: 0 0 20px; text-align: center; font-size: 30px; }
.rd-homenews .rd-center { margin-top: 22px; }
.rd-hero { padding-bottom: 56px; }

/* ---- Home: creators block as a normal card (no darker band) ---- */
.rd-creators {
    max-width: var(--rd-width);
    margin: 72px auto 0;
    padding: 48px 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
}
.rd-creators .rd-wrap { padding-left: 40px; padding-right: 40px; }
.rd-creators .rd-box { background: #070b09; }
@media (max-width: 760px) { .rd-creators .rd-wrap { padding-left: 18px; padding-right: 18px; } }

/* ---- Header: navigation exactly in the middle, home hero without the lead text ---- */
@media (min-width: 961px) {
    .header-inner { position: relative; }
    .primary-nav {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        margin: 0;
    }
    .header-search { margin-left: auto; }
}
@media (min-width: 961px) and (max-width: 1400px) {
    .header-search { display: none; }
    .header-actions { margin-left: auto; }
}
.rd-hero h1 { margin-bottom: 28px; }
.header-actions { margin-left: auto; }

/* ---- Header: icons before the text, space between the buttons ---- */
@media (min-width: 961px) {
    .primary-nav { gap: 8px; }
    .primary-nav .nav-link { padding: 0 14px; gap: 8px; }
    .primary-nav .nav-link .icon,
    .nav-drop > summary .icon { display: inline-block; width: 17px; height: 17px; color: var(--text-3); flex: none; }
    .nav-drop > summary .icon:last-child { width: 14px; height: 14px; }
    .primary-nav .nav-link:hover .icon,
    .primary-nav .nav-link.active .icon,
    .nav-drop[open] > summary .icon { color: var(--green-bright); }
}
@media (min-width: 961px) and (max-width: 1360px) {
    .primary-nav .nav-link .icon { display: inline-block; }
}

/* ---- Header dropdown centered under its button; icons in the filters ---- */
.nav-drop-panel { left: 50%; transform: translateX(-50%); }
@media (max-width: 960px) { .nav-drop-panel { left: auto; transform: none; } }
.rd-check-link .icon, .rd-check-link svg { width: 16px; height: 16px; flex: none; color: var(--text-3); }
.rd-check-link.on .icon, .rd-check-link.on svg, .rd-check-link:hover .icon { color: var(--green-bright); }
.primary-nav .nav-link, .nav-drop > summary { white-space: nowrap; }

/* ---- Pages with a hero start right under the header (no gap) ---- */
body:has(.site-main > .rd-hero:first-child) .site-main { padding-top: 0; }

/* ---- Sign in / sign up dialog ---- */
.auth-dialog { width: min(420px, calc(100vw - 32px)); padding: 28px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); color: var(--text); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7); }
.auth-dialog::backdrop { background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(3px); }
.auth-close { position: absolute; top: 12px; right: 14px; width: 34px; height: 34px; border: 0; border-radius: 10px; background: transparent; color: var(--text-3); font-size: 26px; line-height: 1; cursor: pointer; }
.auth-close:hover { background: var(--surface-2); color: var(--text); }
.auth-pane[hidden] { display: none; }
.auth-pane h2 { margin: 0 0 20px; text-align: center; font-size: 24px; }
.auth-form { display: grid; gap: 12px; }
.auth-field { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border-radius: 12px; background: #070b09; border: 1px solid var(--border); color: var(--text-3); }
.auth-field:focus-within { border-color: var(--green); }
.auth-field input { flex: 1; min-width: 0; height: 100%; border: 0 !important; outline: 0; background: transparent !important; color: var(--text); font: inherit; padding: 0 !important; min-height: 0 !important; }
.auth-switch { margin: 16px 0 0; text-align: center; color: var(--text-3); font-size: 14px; }
.auth-terms { margin-top: 12px; font-size: 13px; }
.auth-link { border: 0; background: none; padding: 0; color: var(--green-bright); font: inherit; font-weight: 600; cursor: pointer; }
.auth-link:hover { text-decoration: underline; }
.auth-dialog h2, .auth-dialog .auth-pane h2 { color: var(--text); }

/* ---- Tags: readable size, visible background (project lists and pages) ---- */
.chip, .rd-chips .chip, .rd-result .chip, .rd-phero-chips .chip {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 11px;
    border-radius: 99px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-2);
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}
.rd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.header-actions .btn svg, .header-actions .btn .icon { width: 16px; height: 16px; flex: none; }

/* ---- Email confirmation pages ---- */
.rd-verify { text-align: center; max-width: 460px; }
.rd-verify-icon { display: inline-grid; place-items: center; width: 60px; height: 60px; margin-bottom: 14px; border-radius: 18px; background: var(--green-soft); color: var(--green-bright); }
.rd-verify-icon.rd-ok { background: rgba(111, 207, 142, 0.16); color: #6fcf8e; }
.rd-verify-icon.rd-bad { background: rgba(240, 138, 131, 0.16); color: #f08a83; }
.rd-verify .alert { text-align: left; margin: 14px 0; }
.rd-verify-facts { display: grid; gap: 8px; margin: 14px 0; padding: 12px 16px; border-radius: 12px; background: #070b09; border: 1px solid var(--border); text-align: left; }
.rd-verify-facts div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.rd-verify-facts span { color: var(--text-3); }
.rd-verify .rd-steps { text-align: left; margin: 14px 0 18px; }
.rd-verify-actions { display: grid; gap: 10px; margin-top: 18px; }

/* ---- Requirements (dependencies) in the upload form ---- */
.rd-deps-filter { margin: 8px 0; }
.rd-deps-list { display: grid; gap: 6px; max-height: 260px; overflow: auto; padding: 4px; border-radius: 12px; border: 1px solid var(--border); background: #070b09; }
.rd-dep { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; font-weight: 500; }
.rd-dep:hover { background: var(--surface-2); }
.rd-dep[hidden] { display: none; }
.rd-dep small { margin-left: 6px; color: var(--text-3); font-weight: 400; }
.rd-dep select { width: auto; min-width: 140px; min-height: 36px; }

/* ---- 2026-11-14: master TODO B10, B11, B16 - B18 ---- */

/* B10: a page change keeps the old page on screen until the new one is ready (cross-document view transition), no dark flash */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 120ms; }
html { background: var(--bg); }

/* B18: five footer columns (brand, About, Products, Resources, Legal); links never carry an icon, so they line up */
.rd-footer { grid-template-columns: 2fr 1fr 1fr 1fr 1fr; }
.rd-footer-col a { display: block; line-height: 1.5; }
.rd-footer .footer-disclaimer { grid-column: 1 / -1; margin: 0; font-size: 11px; letter-spacing: .02em; color: var(--text-3); text-align: center; }
@media (max-width: 900px) { .rd-footer { grid-template-columns: 1fr 1fr 1fr; } .rd-footer .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 560px) { .rd-footer { grid-template-columns: 1fr 1fr; } }

/* B11: the end of every page sits on its own darker band, also on short pages */
body { min-height: 100vh; display: flex; flex-direction: column; }
.site-main { flex: 1 0 auto; }
.site-footer { margin-top: 48px; padding-top: 32px; padding-bottom: 32px; background: var(--bg-deep); }

/* B16: legal text */
.rd-legal { max-width: 820px; line-height: 1.65; }
.rd-legal h2 { margin-top: 28px; font-size: 18px; }
.rd-legal ul { padding-left: 20px; }

/* B9 + Modrinth-style rows: the whole card is the link, stats on the right, tags in one line */
.rd-result { position: relative; align-items: flex-start; padding: 14px 16px; gap: 16px; }
.rd-result:hover { background: var(--surface-2); }
.rd-result-icon img, .rd-result-icon .project-icon { width: 72px; height: 72px; border-radius: 14px; }
.rd-result-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.rd-result-main h3 { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 18px; }
.rd-result-main p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 4px 0 10px; }
.rd-chips-line { flex-wrap: nowrap; overflow: hidden; margin: 0; }
.rd-chips-line .chip { gap: 5px; flex: none; height: 24px; padding: 0 9px; }
.rd-chips-line .chip svg { width: 13px; height: 13px; flex: none; opacity: .8; }
@media (max-width: 700px) { .rd-chips-line { flex-wrap: wrap; overflow: visible; } }
.rd-result-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; min-width: 120px; color: var(--text-2); font-size: 14px; }
.rd-hstat { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.rd-hstat svg { width: 15px; height: 15px; color: var(--text-3); }
.rd-hstat-time { font-weight: 500; color: var(--text-3); }
.rd-result-install { position: relative; z-index: 1; margin-top: 4px; gap: 6px; }
@media (max-width: 700px) { .rd-result { flex-wrap: wrap; } .rd-result-side { flex-direction: row; flex-wrap: wrap; min-width: 0; width: 100%; justify-content: flex-start; gap: 12px; } }
.is-searching > *:not(form) { opacity: .55; transition: opacity .12s; }

/* B3: long file names wrap inside their box instead of widening the side column */
.rd-pside, .project-side { min-width: 0; }
.rd-filename { display: block; overflow-wrap: anywhere; word-break: break-word; }
.rd-file .rd-prow-main { min-width: 0; }
.rd-download .btn svg, .rd-file .btn svg { margin-right: 6px; }

/* B15: the publishing checklist with real icons, aligned */
.rd-check li { display: flex; align-items: center; gap: 10px; }
.rd-check-icon { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; flex: none; border: 1px solid var(--border-strong); color: var(--text-3); }
.rd-check .done .rd-check-icon { background: var(--green); border-color: var(--green); color: #fff; }
.rd-check-icon svg { width: 13px; height: 13px; }

/* B4: the empty issue list is as wide as the bar above it and has room */
.rd-issues-empty { width: 100%; box-sizing: border-box; margin-top: 16px; padding: 40px 24px; }

/* B13: space between the creator and the "Manage project" button */
.rd-creator { margin-bottom: 14px; }

/* B7: the user search in the admin panel like every other search field */
.rd-search-row { display: flex; gap: 10px; align-items: center; }
.rd-search-row .rd-searchbox { height: 42px; }
.rd-search-row .rd-searchbox input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; }

/* B6: every box of the token page has the same width */
.rd-tokenpage > .rd-box, .rd-tokenpage > .rd-list { width: 100%; max-width: none; box-sizing: border-box; margin-left: 0; margin-right: 0; }
.rd-tokenpage .rd-inline-form { display: flex; gap: 10px; margin-top: 10px; }
.rd-tokenpage .rd-inline-form input { flex: 1; min-width: 0; }
.rd-tokenpage > * + * { margin-top: 16px; }
.chip svg, .rd-prow-meta svg { width: 13px; height: 13px; margin-right: 4px; vertical-align: -2px; flex: none; }

/* B14: the "To review" thread of a project */
.rd-manage-tabs { margin: 12px 0 16px; }
.rd-review { margin-top: 20px; }
.rd-review-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.rd-review-hint { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--text-2); }
.rd-thread { display: grid; gap: 12px; margin: 14px 0; }
.rd-msg { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.rd-msg.is-staff { border-color: var(--green); }
.rd-msg-body { min-width: 0; flex: 1; }
.rd-msg-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.rd-msg-form { display: grid; gap: 10px; }
.rd-msg-form textarea { width: 100%; box-sizing: border-box; resize: vertical; }
.rd-msg-form .btn { justify-self: end; }

/* Firefox performance: a sticky header with backdrop-filter is re-blurred on every frame in Firefox (80 % of a core when idle,
 * 100 % while scrolling - Chrome and Edge cache it). The header is nearly opaque anyway, so the blur is dropped and the last
 * 3 % of see-through goes with it; the drop-shadow filter of the logo inside the header (barely visible on the dark bar) made
 * Firefox repaint the header layer as well. */
.app-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(5, 8, 7, 0.97); }
.brand-logo { filter: none; }

/* Status page (/status, views/status.php) */
.st-page { max-width: 1040px; margin: 0 auto; padding: 32px 24px 64px; display: flex; flex-direction: column; gap: 24px; }
.st-up { --st: #1bd96a; } .st-slow { --st: #f2b33d; } .st-down { --st: #ef5b5b; } .st-none { --st: #1e2a24; }
.st-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; padding: 24px 28px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--st) 36%, transparent); background: color-mix(in srgb, var(--st) 8%, transparent); }
.st-banner.st-none { border-color: var(--border); background: var(--surface); }
.st-banner-dot { width: 48px; height: 48px; flex: none; border-radius: 999px; display: flex; align-items: center; justify-content: center; background: var(--st); color: #06100b; }
.st-banner.st-none .st-banner-dot { background: #2a3830; color: #c9d6cf; }
.st-banner-text { flex: 1 1 320px; min-width: 0; }
.st-banner-text h1 { margin: 0; font-family: var(--display); font-size: 28px; line-height: 1.2; }
.st-banner-text p { margin: 4px 0 0; color: var(--text-2); }
.st-banner-meta { text-align: right; color: var(--text-2); font-size: 13px; }
.st-banner-meta strong { display: block; color: var(--text); }
.st-box { border-radius: 16px; border: 1px solid var(--border); background: var(--surface); overflow: hidden; }
.st-pad { padding: 20px 24px; display: flex; flex-direction: column; gap: 12px; }
.st-box-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; padding: 20px 24px 8px; }
.st-box-head.st-flat { padding: 0; }
.st-box-head h2 { margin: 0; font-family: var(--display); font-size: 20px; }
.st-box-head span, .st-muted { color: var(--text-2); font-size: 13px; margin: 0; }
.st-service { padding: 18px 24px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.st-service-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.st-service-name { display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; }
.st-service-name code { color: var(--text-2); font-size: 13px; background: none; padding: 0; }
.st-dot { width: 10px; height: 10px; border-radius: 999px; background: var(--st); flex: none; }
.st-service-meta { display: flex; align-items: center; gap: 14px; font-size: 13px; }
.st-state { color: var(--st); font-weight: 600; }
.st-state.st-none { color: var(--text-2); }
.st-uptime { font-weight: 600; font-variant-numeric: tabular-nums; }
.st-bars { display: flex; gap: 2px; height: 34px; }
.st-bars span { flex: 1 1 0; min-width: 1px; border-radius: 2px; background: var(--st); }
.st-axis { display: flex; justify-content: space-between; color: var(--text-2); font-size: 12px; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 20px; }
.st-latency { color: var(--text-2); }
.st-latency strong { font-family: var(--display); font-size: 34px; color: var(--text); margin-right: 6px; font-variant-numeric: tabular-nums; }
.st-spark { width: 100%; height: 110px; display: block; }
.st-spark line { stroke: var(--border); stroke-width: 1; }
.st-spark polygon { fill: rgba(58, 155, 208, 0.14); }
.st-spark polyline { fill: none; stroke: #3a9bd0; stroke-width: 2.2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.st-incident { border-radius: 12px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--st) 38%, transparent); background: color-mix(in srgb, var(--st) 8%, transparent); }
.st-incident-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--text-2); }
.st-incident-top strong { color: var(--st); }
.st-incident-title, .st-history-title { font-weight: 600; }
.st-history { display: flex; gap: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.st-history-date { width: 56px; flex: none; color: var(--text-2); font-size: 13px; }
.st-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--text-2); font-size: 13px; }
.st-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--st); vertical-align: -1px; margin-left: 10px; }
.st-legend i:first-child { margin-left: 0; }
@media (max-width: 640px) { .st-banner-meta { text-align: left; } .st-bars { gap: 1px; } }

/* Notifications (Render::flashes, app.js "notifications"): a solid card per message, the title says what happened, errors stay
 * until closed, the others run out (paused under the pointer). Several at once are a pile: the top card and a bar
 * "N notifications - Show all"; open on hover or click. Desktop: top right under the header; phone: at the bottom. */
.nt-stack { position: fixed; top: 84px; right: 16px; z-index: 200; width: min(380px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.nt-stack:empty { display: none; }
.nt-stack > * { pointer-events: auto; }
.nt { --nt: #3a9bd0; position: relative; box-sizing: border-box; display: flex; gap: 12px; padding: 14px 8px 16px 14px; border-radius: 14px; border: 1px solid #22332b; background: #0f1813; color: #e6efe9; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); overflow: hidden; font-size: 14px; line-height: 1.45; animation: nt-in 0.22s ease; transition: transform 0.2s ease, opacity 0.2s ease; touch-action: pan-y; }
.nt-success { --nt: #1bd96a; }
.nt-error { --nt: #ef5b5b; border-color: rgba(239, 91, 91, 0.45); background: #1a1011; padding-bottom: 14px; }
.nt-icon { width: 32px; height: 32px; flex: none; border-radius: 999px; display: flex; align-items: center; justify-content: center; color: var(--nt); background: color-mix(in srgb, var(--nt) 15%, transparent); }
.nt-body { flex: 1; min-width: 0; padding-top: 5px; display: flex; flex-direction: column; }
.nt-title { font-weight: 600; }
.nt-text { color: #a9bab1; overflow-wrap: anywhere; }
.nt-error .nt-text { color: #c9b8b8; }
.nt-link { margin-top: 6px; font-weight: 600; color: #7cc3ea; text-decoration: none; align-self: flex-start; }
.nt-link:hover { color: #a9d8f2; text-decoration: underline; }
.nt-close { width: 44px; height: 44px; margin: -8px 0 0; flex: none; border: 0; border-radius: 10px; background: transparent; color: #a9bab1; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.nt-close:hover { background: rgba(255, 255, 255, 0.06); color: #e6efe9; }
.nt-close:focus-visible, .nt-pile-bar:focus-visible, .nt-pile-actions button:focus-visible { outline: 2px solid #7cc3ea; outline-offset: 2px; }
.nt-timer { position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; background: var(--nt); transform-origin: left; animation: nt-run var(--nt-ms, 5000ms) linear forwards; }
.nt-stack:hover .nt-timer, .nt-stack.is-open .nt-timer, .nt-stack:focus-within .nt-timer, .nt.is-dragging .nt-timer { animation-play-state: paused; }
.nt.is-leaving { opacity: 0; transform: translateX(24px); }
/* the pile */
.nt-stack.is-piled:not(.is-open) > .nt:not(:first-child) { display: none; }
.nt-stack.is-piled:not(.is-open) > .nt:first-child { margin-bottom: 12px; box-shadow: 0 7px 0 -3px #0d1611, 0 7px 0 -2px #22332b, 0 14px 0 -7px #0b130f, 0 14px 0 -6px #1c2a23, 0 16px 40px rgba(0, 0, 0, 0.5); overflow: visible; }
.nt-stack.is-piled:not(.is-open) > .nt:first-child .nt-timer { border-radius: 0 0 0 14px; }
.nt-pile-bar { display: none; min-height: 44px; box-sizing: border-box; align-items: center; justify-content: space-between; padding: 0 14px; border-radius: 12px; border: 1px solid #22332b; background: #0f1813; color: #e6efe9; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45); }
.nt-pile-bar span:last-child { color: #7cc3ea; }
.nt-stack.is-piled:not(.is-open) .nt-pile-bar { display: flex; }
.nt-pile-actions { display: none; justify-content: space-between; gap: 8px; }
.nt-stack.is-piled.is-open .nt-pile-actions { display: flex; }
.nt-pile-actions button { min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid #22332b; background: #0f1813; color: #e6efe9; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.nt-pile-actions button + button { border-color: transparent; background: transparent; color: #7cc3ea; }
@keyframes nt-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes nt-run { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (max-width: 640px) {
    .nt-stack { top: auto; bottom: 16px; left: 16px; right: 16px; width: auto; flex-direction: column-reverse; }
    .nt-stack.is-piled:not(.is-open) > .nt:first-child { margin-bottom: 0; margin-top: 12px; }
    @keyframes nt-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
    .nt { animation: none; transition: opacity 0.2s ease; }
    .nt.is-leaving { transform: none; }
}

/* /mods, /tools ... on a phone: the filters wait behind a "Filters" button above the list (app.js "filter toggle");
 * without JavaScript, and on wide screens, they stay a column as before */
.rd-filter-toggle { display: none; }
@media (max-width: 880px) {
    .rd-browse-grid[data-filters] .rd-filters { flex: 1 1 100%; }
    .rd-browse-grid.has-toggle .rd-filter-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
    .rd-browse-grid.has-toggle .rd-filter-toggle em { font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; box-sizing: border-box; border-radius: 999px; background: #3a9bd0; color: #04121b; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
    .rd-browse-grid.has-toggle .rd-filter-caret { transition: transform 0.15s ease; }
    .rd-browse-grid.has-toggle.is-open .rd-filter-caret { transform: rotate(180deg); }
    .rd-browse-grid.has-toggle:not(.is-open) .rd-filters { display: none; }
    .rd-browse-grid.has-toggle .rd-note-box { display: none; }
}

/* ===================================================================== project page (pp-)
 * views/_project_head.php, project.php, issues.php: banner hero, stats strip, pill tabs, Overview / Versions /
 * Changelog panels and the Issues tab. Colours are the site tokens; the banner takes the project colour. */

.pp-hero { position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: 24px; background: var(--surface); }
.pp-banner { height: 120px; border-bottom: 1px solid var(--border);
    background: linear-gradient(120deg, color-mix(in srgb, var(--project-color, #3a9bd0) 42%, #0d1511) 0%, color-mix(in srgb, var(--project-color, #3a9bd0) 16%, #102a2a) 55%, var(--surface) 100%); }
.pp-hero-body { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-end; padding: 0 32px 28px; }
.pp-icon { flex: none; width: 128px; height: 128px; margin-top: -64px; border-radius: 28px; overflow: hidden; border: 4px solid var(--surface);
    background: var(--project-color, var(--surface-2)); display: grid; place-items: center; font: 700 44px var(--display); color: #06121a; }
.pp-icon:has(img) { background: var(--bg-deep); }
.pp-icon img { width: 100%; height: 100%; object-fit: cover; }
.pp-hero-main { flex: 999 1 420px; min-width: 0; padding-top: 18px; }
.pp-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.pp-title-row h1 { margin: 0; font-size: 38px; line-height: 1.15; letter-spacing: -0.01em; }
.pp-works { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--green-soft); color: var(--green-bright); font-size: 13px; font-weight: 600; }
.pp-summary { margin: 8px 0 0; font-size: 17px; color: var(--text-2); }
.pp-byline { margin: 10px 0 0; font-size: 14px; color: var(--text-3); }
.pp-byline strong { color: var(--text); }
.pp-actions { flex: 1 1 280px; max-width: 340px; display: flex; flex-direction: column; gap: 10px; }
.pp-manage { display: flex; gap: 8px; }
.pp-manage .btn { flex: 1 1 0; }
.pp-follow { margin: 0; }
.pp-follow .btn { width: 100%; justify-content: center; gap: 8px; }
.pp-follow .btn .pp-mono { color: var(--text-3); font-size: 12px; }
.pp-follow .btn.is-on { border-color: var(--green); color: var(--green-bright); }

.pp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 18px; border-radius: 14px;
    font-weight: 600; font-size: 15px; text-decoration: none; border: 1px solid transparent; cursor: pointer; font-family: inherit; }
.pp-btn:hover { text-decoration: none; }
.pp-btn-primary { min-height: 52px; background: var(--green); color: #06121a; font-weight: 700; font-size: 16px; }
.pp-btn-primary:hover { background: var(--green-bright); color: #06121a; }
.pp-btn-file { justify-content: space-between; border-color: var(--border-strong); color: var(--text); font-size: 14px; }
.pp-btn-file:hover { background: var(--surface-2); color: var(--text); }
.pp-btn-file .pp-mono { font-size: 12px; color: var(--text-3); }
.pp-btn-outline { border-color: var(--border-strong); color: var(--text); background: transparent; }
.pp-btn-outline:hover { background: var(--surface-2); color: var(--text); }
.pp-btn-quiet { width: 100%; margin-top: 16px; min-height: 44px; border-color: var(--border); color: var(--text-2); font-weight: 500; font-size: 14px; }
.pp-btn-quiet:hover { background: var(--surface-2); color: var(--text); }
.pp-btn-sm { min-height: 44px; padding: 0 16px; font-size: 14px; }
.pp-mono { font-family: var(--mono); }
.pp-muted { color: var(--text-3); }

.pp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin: 0; border-top: 1px solid var(--border); }
.pp-stats > div { padding: 16px 32px; border-right: 1px solid var(--border); }
.pp-stats > div:last-child { border-right: 0; }
.pp-stats dt { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); }
.pp-stats dd { margin: 0; font-size: 22px; font-weight: 700; color: var(--text); }

.pp-tabs { display: flex; flex-wrap: wrap; gap: 6px; width: fit-content; max-width: 100%; margin: 22px 0 18px; padding: 6px;
    border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.pp-tab { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 18px; border-radius: 11px; color: var(--text-2); font-weight: 500; text-decoration: none; }
.pp-tab:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.pp-tab.active { background: var(--surface-3); color: var(--text); font-weight: 600; }
.pp-tab-count { padding: 1px 8px; border-radius: 999px; background: var(--surface-2); font-size: 12px; }

.pp-card { border: 1px solid var(--border); border-radius: 20px; background: var(--surface); }
.pp-overview { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.pp-overview[hidden], .pp-panel[hidden] { display: none; }
.pp-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.pp-main > .markdown { padding: 28px 32px; }
.pp-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.pp-box { padding: 20px 22px; }
.pp-box h2 { margin: 0 0 14px; font-size: 15px; }
.pp-box .btn-block { margin-top: 14px; }
.pp-compat { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pp-compat li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 13px; color: var(--text-3); }
.pp-compat li .pp-mono { color: var(--text-2); }
.pp-compat li.is-current { background: var(--green-soft); color: var(--green-bright); font-weight: 600; }
.pp-compat li.is-current .pp-mono { color: var(--text); }
.pp-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; margin: 16px 0 0; font-size: 14px; }
.pp-box h2 + .pp-kv { margin-top: 0; }
.pp-kv dt { color: var(--text-3); }
.pp-kv dd { margin: 0; text-align: right; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.pp-creator { display: flex; align-items: center; gap: 12px; }
.pp-creator strong { display: block; color: var(--text); }
.pp-creator span { font-size: 13px; color: var(--text-3); }

.pp-panel-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.pp-panel-head h2 { margin: 0; font-size: 22px; }
.pp-panel-head p { margin: 4px 0 0; font-size: 14px; color: var(--text-3); }
.pp-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.pp-filters label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-3); }
.pp-filters select { min-height: 44px; min-width: 130px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; }
.pp-empty { padding: 28px; text-align: center; color: var(--text-3); }

.pp-versions { display: flex; flex-direction: column; gap: 14px; }
.pp-version { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; padding: 20px 24px; }
.pp-version[hidden] { display: none; }
.pp-version.is-latest { border-color: var(--green); }
.pp-version.is-draft { opacity: 0.75; }
.pp-version-main { flex: 999 1 380px; min-width: 0; }
.pp-version-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pp-version-title h3 { margin: 0; font-size: 20px; }
.pp-version-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; font-size: 14px; color: var(--text-3); }
.pp-version-meta b { color: var(--text); font-weight: 500; }
.pp-link { display: inline-block; margin-top: 10px; font-size: 14px; }
.pp-pill { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-size: 12px; font-weight: 600; }
.pp-pill-accent { background: var(--green-soft); color: var(--green-bright); }
.pp-files { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.pp-file { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--bg-deep); color: var(--text-3); }
.pp-file-name { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.pp-file-name .pp-mono { font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-file-name small { font-size: 12px; color: var(--text-3); }
.pp-file .pp-btn-primary { min-height: 44px; font-size: 14px; }

.pp-timeline { list-style: none; margin: 0; padding: 0; max-width: 860px; }
.pp-timeline > li { position: relative; padding: 0 0 28px 36px; }
.pp-timeline > li::before { content: ""; position: absolute; left: 7px; top: 22px; bottom: 0; width: 2px; background: var(--border); }
.pp-timeline > li:last-child::before { display: none; }
.pp-timeline > li::after { content: ""; position: absolute; left: 0; top: 8px; width: 12px; height: 12px; border-radius: 50%;
    background: var(--border-strong); border: 2px solid var(--bg); box-shadow: 0 0 0 2px var(--border-strong); }
.pp-timeline > li.is-latest::after { background: var(--green); box-shadow: 0 0 0 2px var(--green); }
.pp-timeline-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pp-timeline-head h3 { margin: 0; font-size: 20px; }
.pp-timeline-head .pp-muted { font-size: 14px; }
.pp-changelog { margin-top: 12px; padding: 18px 22px; color: var(--text-2); }
.pp-changelog > :first-child { margin-top: 0; }
.pp-changelog > :last-child { margin-bottom: 0; }

.pp-issuebar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.pp-switch { display: flex; gap: 4px; padding: 4px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.pp-switch a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 10px; color: var(--text-2); font-size: 14px; text-decoration: none; }
.pp-switch a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.pp-switch a.on { background: var(--surface-3); color: var(--text); font-weight: 600; }
.pp-issues-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 48px 32px; text-align: center; border-style: dashed; border-color: var(--border-strong); }
.pp-issues-empty h2 { margin: 0; font-size: 19px; }
.pp-issues-empty p { margin: 0; max-width: 420px; color: var(--text-2); }
.pp-empty-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-2); color: var(--green-bright); }
.pp-issue-list { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.pp-issue { display: flex; gap: 16px; align-items: flex-start; padding: 16px 20px; border-top: 1px solid var(--border); }
.pp-issue:first-child { border-top: 0; }
.pp-issue:hover { background: var(--surface-2); }
.pp-votes { flex: 0 0 52px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; border-radius: 12px; background: var(--surface-2); color: var(--text-3); }
.pp-votes svg { transform: rotate(180deg); }
.pp-votes b { color: var(--text); font-size: 14px; }
.pp-issue-main { flex: 1 1 auto; min-width: 0; }
.pp-issue-title { color: var(--text); font-weight: 600; font-size: 16px; }
.pp-issue-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; font-size: 13px; color: var(--text-3); }
.pp-kind { padding: 1px 9px; border-radius: 999px; font-weight: 600; background: var(--surface-2); color: var(--text-2); }
.pp-kind-bug { background: var(--orange-soft); color: #f0a382; }
.pp-kind-request { background: var(--green-soft); color: var(--green-bright); }
.pp-form { display: flex; flex-direction: column; gap: 14px; }
.pp-form > label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); }
.pp-form input[type="text"], .pp-form textarea { width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-deep); color: var(--text); font: inherit; font-size: 14px; }
.pp-form input[type="text"] { min-height: 44px; }
.pp-form textarea { resize: vertical; }
.pp-form .pp-check { flex-direction: row; align-items: flex-start; gap: 10px; }
.pp-form .pp-check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--green); flex: none; }
.pp-box .pp-muted { margin: -8px 0 16px; font-size: 13px; }
.pp-segment { margin: 0; padding: 0; border: 0; }
.pp-segment legend { margin-bottom: 6px; font-size: 13px; color: var(--text-2); }
.pp-segment > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 4px; border-radius: 12px; background: var(--bg-deep); }
.pp-segment label { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; border-radius: 9px; font-size: 14px; color: var(--text-2); cursor: pointer; }
.pp-segment label:has(input:checked) { background: var(--surface-3); color: var(--text); font-weight: 600; }
.pp-segment input { accent-color: var(--green); }

@media (max-width: 720px) {
    .pp-hero-body { padding: 0 16px 20px; gap: 16px; }
    .pp-icon { width: 96px; height: 96px; margin-top: -48px; border-radius: 22px; }
    .pp-title-row h1 { font-size: 30px; }
    .pp-actions { max-width: none; flex-basis: 100%; }
    .pp-banner { height: 96px; }
    .pp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pp-stats > div { padding: 12px 16px; border-bottom: 1px solid var(--border); }
    .pp-stats > div:nth-child(2n) { border-right: 0; }
    .pp-stats dd { font-size: 18px; }
    .pp-tabs { width: auto; flex-wrap: nowrap; overflow-x: auto; }
    .pp-tab { flex: none; padding: 0 14px; }
    .pp-main > .markdown { padding: 20px; }
    .pp-version { padding: 16px; }
    .pp-issue { padding: 14px 16px; }
}

/* ===================================================================== download page (dl-)
 * views/download.php: one narrow centred column - mark, title, one download button, three points, notes, platforms. */
.dl-page { max-width: 720px; margin: 0 auto; padding: 48px 0 32px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.dl-mark { width: 88px; height: 88px; border-radius: 24px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--green-bright); }
.dl-page h1 { margin: 24px 0 0; font-size: 44px; line-height: 1.1; letter-spacing: -0.015em; }
.dl-lead { margin: 12px 0 0; max-width: 520px; font-size: 18px; color: var(--text-2); }
.dl-cta { margin-top: 32px; display: inline-flex; align-items: center; gap: 12px; min-height: 60px; padding: 0 32px; border-radius: 16px;
    background: var(--green); color: #06121a; font-weight: 700; font-size: 18px; text-decoration: none; }
.dl-cta:hover { background: var(--green-bright); color: #06121a; text-decoration: none; }
.dl-cta.is-off { background: var(--surface-2); color: var(--text-3); cursor: default; }
.dl-file { margin: 12px 0 0; max-width: 100%; font-size: 13px; color: var(--text-3); overflow-wrap: anywhere; }
.dl-mono { font-family: var(--mono); }
.dl-points { list-style: none; margin: 40px 0 0; padding: 0; width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; text-align: left; }
.dl-points li { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); font-size: 14px; color: var(--text-2); }
.dl-points svg { flex: none; color: var(--green-bright); }
.dl-notes { margin-top: 28px; width: 100%; text-align: left; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.dl-notes summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; padding: 0 18px; font-weight: 600; color: var(--text); }
.dl-notes > .markdown, .dl-notes > p { margin: 0; padding: 0 18px 16px; font-size: 14px; color: var(--text-2); }
.dl-platforms { margin-top: 40px; width: 100%; text-align: left; }
.dl-platforms h2 { margin: 0 0 12px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); text-align: center; }
.dl-platform-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.dl-platform { padding: 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.dl-platform.is-available { border-color: var(--green); }
.dl-platform.is-recommended { box-shadow: 0 0 0 1px var(--green-bright); }
.dl-platform-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dl-platform-head strong { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--text); }
.dl-platform-head .launcher-platform-icon { display: inline-flex; width: auto; height: auto; padding: 0; border: 0; border-radius: 0; background: none; color: var(--text-2); }
.dl-platform.is-available .launcher-platform-icon { color: var(--green-bright); }
.dl-pill { padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-size: 12px; font-weight: 600; white-space: nowrap; }
.dl-platform.is-available .dl-pill { background: var(--green-soft); color: var(--green-bright); }
.dl-platform p { margin: 6px 0 0; font-size: 13px; color: var(--text-2); }
.dl-platform-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; }
.dl-previous h3 { margin: 4px 18px 6px; font-size: 13px; color: var(--text-3); }
.dl-previous ul { list-style: none; margin: 0; padding: 0 18px 12px; }
.dl-previous li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 14px; }
.dl-previous li em { font-style: normal; color: var(--text-3); margin-left: 6px; }
/* the Server tab (/server): setup steps with commands, REPORT 3.219 */
.server-steps { width: 100%; margin-top: 32px; text-align: left; }
.server-steps h2 { text-align: center; }
.server-step { margin-top: 16px; padding: 16px 20px; border: 1px solid var(--line, rgba(127,127,127,.25)); border-radius: 12px; }
.server-step h3 { margin: 0 0 8px; font-size: 16px; }
.server-step ol { margin: 0; padding-left: 20px; }
.server-step pre { margin: 8px 0; padding: 12px 14px; overflow-x: auto; border-radius: 8px; font-family: var(--mono); font-size: 13px; text-align: left; }
.server-page .dl-mark svg { width: 44px; height: 44px; }
.rd-tabs { display: flex; gap: 8px; margin: 0 0 16px; }
.dl-more { margin-top: 24px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; font-size: 14px; }

@media (max-width: 720px) {
    .dl-page { padding-top: 24px; }
    .dl-page h1 { font-size: 34px; }
    .dl-lead { font-size: 16px; }
    .dl-cta { width: 100%; justify-content: center; padding: 0 20px; }
}

/* ===================================================================== FAQ (qa-) and news (nw-)
 * views/server_faq.php, news_index.php, news_article.php: one narrow centred column each. */
.qa-page { max-width: 760px; margin: 0 auto; padding: 32px 0 24px; }
.qa-page h1 { margin: 0; font-size: 40px; line-height: 1.1; letter-spacing: -0.015em; text-align: center; }
.qa-lead { margin: 12px auto 0; max-width: 520px; font-size: 17px; color: var(--text-2); text-align: center; }
.qa-search { display: flex; align-items: center; gap: 10px; min-height: 52px; margin-top: 28px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text-3); }
.qa-search:focus-within { border-color: var(--green); }
.qa-search input { flex: 1 1 auto; min-width: 0; min-height: 50px; border: 0; outline: none; background: transparent; color: var(--text); font: inherit; font-size: 15px; box-shadow: none; padding: 0; }
.qa-topics { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.qa-topics a { padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); font-size: 14px; text-decoration: none; }
.qa-topics a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.qa-group { margin-top: 36px; scroll-margin-top: 90px; }
.qa-group[hidden] { display: none; }
.qa-group > h2 { margin: 0 0 12px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); }
.qa-list { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); overflow: hidden; }
.qa-item { border-top: 1px solid var(--border); }
.qa-item:first-child { border-top: 0; }
.qa-item[hidden] { display: none; }
.qa-item summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; font-weight: 600; color: var(--text); }
.qa-item summary::-webkit-details-marker { display: none; }
.qa-item summary::after { content: "+"; flex: none; font-size: 20px; line-height: 1; color: var(--text-3); }
.qa-item[open] summary::after { content: "\2212"; }
.qa-item summary:hover { background: var(--surface-2); }
.qa-item p { margin: 0; padding: 0 20px 18px; color: var(--text-2); }
.qa-none { margin: 28px 0 0; text-align: center; color: var(--text-3); }
.qa-help { margin-top: 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); }
.qa-help h2 { margin: 0; font-size: 17px; }
.qa-help p { margin: 4px 0 0; font-size: 14px; color: var(--text-2); }

.nw-page { max-width: 860px; margin: 0 auto; padding: 32px 0 24px; }
.nw-page h1 { margin: 0; font-size: 40px; line-height: 1.1; letter-spacing: -0.015em; }
.nw-lead { margin: 10px 0 0; font-size: 17px; color: var(--text-2); }
.nw-meta { font-size: 13px; color: var(--text-3); }
.nw-featured { display: block; margin-top: 32px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); overflow: hidden; color: var(--text); text-decoration: none; }
.nw-featured:hover { border-color: var(--border-strong); text-decoration: none; color: var(--text); }
.nw-featured img { display: block; width: 100%; aspect-ratio: 16 / 7; object-fit: cover; background: var(--surface-2); }
.nw-featured-body { padding: 22px 24px; }
.nw-featured h2 { margin: 6px 0 0; font-size: 26px; line-height: 1.25; }
.nw-featured p { margin: 8px 0 0; color: var(--text-2); }
.nw-list { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid var(--border); }
.nw-list li { border-bottom: 1px solid var(--border); }
.nw-list a { display: flex; gap: 20px; align-items: center; padding: 18px 0; color: var(--text); text-decoration: none; }
.nw-list a:hover h3 { color: var(--green-bright); }
.nw-list img { flex: 0 0 120px; width: 120px; height: 72px; border-radius: 12px; object-fit: cover; background: var(--surface-2); }
.nw-list h3 { margin: 2px 0 0; font-size: 18px; }
.nw-list p { margin: 4px 0 0; font-size: 14px; color: var(--text-2); }
.nw-empty { margin-top: 32px; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 56px 32px; border-radius: 20px; border: 1px dashed var(--border-strong); background: var(--surface); text-align: center; }
.nw-empty h2 { margin: 0; font-size: 19px; }
.nw-empty p { margin: 0; color: var(--text-2); }
.nw-empty-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-2); color: var(--green-bright); }

.nw-article { max-width: 720px; margin: 0 auto; padding: 16px 0 24px; }
.nw-back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-3); text-decoration: none; }
.nw-back:hover { color: var(--text); text-decoration: none; }
.nw-article header { margin-top: 24px; }
.nw-article h1 { margin: 8px 0 0; font-size: 40px; line-height: 1.15; letter-spacing: -0.015em; }
.nw-article .nw-lead { font-size: 19px; }
.nw-hero { display: block; width: 100%; margin-top: 28px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 18px; border: 1px solid var(--border); background: var(--surface-2); }
.nw-body { margin-top: 32px; font-size: 17px; line-height: 1.7; color: var(--text-2); }
.nw-body h2, .nw-body h3 { color: var(--text); }
.nw-foot { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 14px; }

@media (max-width: 720px) {
    .qa-page, .nw-page { padding-top: 12px; }
    .qa-page h1, .nw-page h1, .nw-article h1 { font-size: 32px; }
    .nw-featured h2 { font-size: 22px; }
    .nw-list img { flex-basis: 84px; width: 84px; height: 56px; }
}

/* ===================================================================== dashboard (second redesign)
 * Every page under /dashboard: a plain menu column with icons, the account at the bottom, calm page heads, cards with
 * one border, inputs on the deep background, and the confirm dialog of app.js (askConfirm). */
.dashboard-shell { grid-template-columns: 240px minmax(0, 1fr); gap: 32px; }
.dash-side { padding: 4px 0 0; gap: 12px; background: transparent; border: 0; border-radius: 0; }
.dash-nav { gap: 2px; }
.dash-label { margin: 14px 12px 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.1em; color: var(--text-3); }
.dash-nav .dash-label:first-child { margin-top: 0; }
.dash-link { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 12px; border-radius: 10px; color: var(--text-2); font-size: 14px; font-weight: 500; }
.dash-link .icon, .dash-link svg { color: var(--text-3); flex: none; }
.dash-link:hover { background: var(--surface); color: var(--text); }
.dash-link.active { background: var(--surface-2); color: var(--text); font-weight: 600; box-shadow: inset 3px 0 0 var(--green); }
.dash-link.active .icon, .dash-link.active svg { color: var(--green-bright); }
.dash-count { margin-left: auto; padding: 0 8px; border-radius: 999px; background: var(--green); color: #06121a; font-size: 12px; font-style: normal; font-weight: 700; }
.dash-links { display: flex; flex-direction: column; gap: 2px; padding: 10px 0 0; border-top: 1px solid var(--border); }
.dash-links a { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 0 12px; border-radius: 10px; color: var(--text-3); font-size: 13px; }
.dash-links a:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.dash-side .dash-user { display: flex; align-items: center; gap: 10px; padding: 12px; border: 0; border-top: 1px solid var(--border); border-radius: 0; color: var(--text); text-decoration: none; }
.dash-side .dash-user:hover { background: var(--surface); text-decoration: none; }
.dash-side .dash-user strong { font-size: 14px; }
.dash-side .dash-user span span { display: block; font-size: 12px; color: var(--text-3); }

.dash-content { padding-top: 4px; }
.dash-content .rd-pagehead { margin: 0 0 22px; }
.dash-content .rd-pagehead h1 { font-size: 30px; margin: 0 0 4px; }
.dash-content .rd-stat strong { font: 700 26px var(--font); }
.dash-content .rd-stat, .dash-content .rd-box, .dash-content .rd-list, .dash-content .content-card { border-radius: 16px; }
.dash-content .rd-box { padding: 22px; }
.dash-content .rd-box > strong:first-child, .dash-content .rd-box > h2:first-child { display: block; margin: 0 0 14px; font-size: 16px; }
.dash-content .rd-prow { padding: 14px 18px; }
.dash-content .rd-tokenicon { width: 40px; height: 40px; border-radius: 11px; background: var(--surface-2); color: var(--green-bright); display: grid; place-items: center; flex: none; }
.dash-content input[type="text"], .dash-content input[type="email"], .dash-content input[type="password"], .dash-content input[type="url"],
.dash-content input[type="search"], .dash-content input[type="number"], .dash-content input[type="date"], .dash-content select, .dash-content textarea {
    min-height: 44px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-deep); color: var(--text); }
.dash-content textarea { min-height: 0; }
.dash-content input:focus, .dash-content select:focus, .dash-content textarea:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px var(--green-soft); }
.dash-content .btn { min-height: 44px; border-radius: 12px; }
.dash-content .btn-sm { min-height: 38px; border-radius: 10px; }

.dash-create { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-bottom: 16px; }
.dash-create label { flex: 1 1 260px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); }
.btn-danger-ghost { border: 1px solid rgba(255, 107, 107, 0.45); background: transparent; color: #ff8a8a; font-weight: 600; }
.btn-danger-ghost:hover { background: var(--red-soft); color: #ffb0b0; }

.confirm-dialog { width: min(440px, calc(100vw - 32px)); box-sizing: border-box; padding: 24px; border: 1px solid var(--border-strong); border-radius: 20px; background: var(--surface); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55); }
.confirm-dialog::backdrop { background: rgba(5, 9, 7, 0.72); backdrop-filter: blur(2px); }
.confirm-dialog .confirm-icon { width: 48px; height: 48px; border: 0; border-radius: 14px; background: var(--red-soft); color: #ff8a8a; display: grid; place-items: center; }
.confirm-dialog h2 { margin: 16px 0 0; font-size: 20px; line-height: 1.3; color: var(--text); }
.confirm-item { display: flex; flex-direction: column; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--bg-deep); border: 1px solid var(--border); }
.confirm-item[hidden] { display: none; }
.confirm-item strong { font-weight: 600; overflow-wrap: anywhere; }
.confirm-item span { font-size: 13px; color: var(--text-3); }
.confirm-dialog p { margin: 14px 0 0; font-size: 14px; line-height: 1.55; color: var(--text-2); }
.confirm-dialog .confirm-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 22px; padding: 0; }
.confirm-dialog .confirm-actions .btn { min-height: 44px; padding: 0 18px; border-radius: 12px; }
.confirm-dialog .confirm-actions .btn-danger { border-color: #e5484d; background: #e5484d; color: #fff; font-weight: 700; }
.confirm-dialog .confirm-actions .btn-danger:hover { border-color: #f06368; background: #f06368; }

@media (max-width: 860px) {
    .dashboard-shell { grid-template-columns: 1fr; gap: 16px; }
    .dash-side { position: static; }
    .dash-nav { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
    .dash-nav .dash-label { display: none; }
    .dash-link { flex: none; border: 1px solid var(--border); }
    .dash-link.active { box-shadow: none; border-color: var(--green); }
    .dash-links, .dash-side .dash-user { display: none; }
    .dash-content .rd-pagehead h1 { font-size: 26px; }
}
.dash-allclear { display: flex; align-items: center; gap: 10px; margin: 16px 0; padding: 12px 16px; border-radius: 12px; background: var(--green-soft); color: var(--text-2); font-size: 14px; }
.dash-allclear svg { color: var(--green-bright); }

/* Site settings: every box as wide as the lists below; the feature rows with icon, name and text */
.rd-adminpage > .rd-box, .rd-adminpage > .rd-list { width: 100%; max-width: none; box-sizing: border-box; margin: 16px 0 0; }
.rd-adminpage .rd-feature { display: flex; align-items: center; gap: 14px; }
.rd-adminpage .rd-feature .rd-prow-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rd-adminpage .rd-feature .rd-prow-main strong { font-size: 15px; }
.rd-adminpage .rd-feature .rd-prow-meta { margin: 0; }
.rd-adminpage .rd-feature .switch { flex: none; }

/* Dashboard: every box runs to the right edge of the content - no box stops short when nothing stands beside it */
.dash-content > .rd-box, .dash-content > .rd-list, .dash-content > form, .dash-content > section,
.dash-content > form > .rd-box, .dash-content > form > .rd-list, .dash-content > form > section {
    width: 100%; max-width: none; box-sizing: border-box; margin-left: 0; margin-right: 0;
}

/* Discord preview: the card fills its column below the heading instead of 100% of it (it ran out of the box) */
.discord-preview-grid > div { display: flex; flex-direction: column; }
.discord-preview-grid .discord-preview { height: auto; flex: 1; }
.discord-preview-grid .discord-embed { max-width: none; }

/* Project head: an uploaded icon keeps its own transparency (no dark square, no frame around it) */
.pp-icon:has(img) { background: transparent; border-color: transparent; }

/* Project head: the buttons stay where they are; above them the banner gets a rounded bay in the colour of the
   card, so the install button does not run into the banner's hard edge. Only where the buttons stand at the top
   right beside the title (wide screens); on a narrow screen they wrap below and there is no bay. */
@media (min-width: 1080px) {
    .pp-actions { position: relative; align-self: flex-start; }
    .pp-actions::before { content: ''; position: absolute; left: -14px; right: -14px; bottom: 100%; height: 18px;
        background: var(--surface); border-radius: 18px 18px 0 0; }
    .pp-actions > .pp-btn:first-child, .pp-actions > :first-child { margin-top: 0; }
}
.pp-bundled { display: flex; align-items: center; gap: 8px; margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--green-soft); color: var(--text-2); font-size: 14px; }
.pp-bundled svg { flex: none; color: var(--green-bright); }

/* ---- Requirements of a version: the added projects as rows, "Add requirement" opens a search popup (app.js, data-reqs) ---- */
.rq { border: 0; padding: 0; margin: 0; min-width: 0; }
.rq-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.rq-head legend { float: left; padding: 0; font-weight: 600; }
.rq-head .field-hint { clear: left; margin: 4px 0 0; }
.rq-add { display: inline-flex; align-items: center; gap: 8px; }
.rq-empty { margin-top: 12px; padding: 18px; border: 1px dashed var(--border-strong); border-radius: 14px; text-align: center; color: var(--text-3); font-size: 14px; }
.rq-empty[hidden] { display: none; }
.rq-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.rq-list:empty { display: none; }
.rq-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-deep); }
.rq-icon { flex: none; display: flex; }
.rq-main { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; }
.rq-main strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rq-meta { font-size: 13px; color: var(--text-3); }
.rq-kinds { display: flex; padding: 3px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface); }
.rq-kinds button { min-height: 34px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--text-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.rq-kinds button[aria-pressed="true"] { background: var(--green); color: #06121a; }
.rq-kinds button[data-kind="incompatible"][aria-pressed="true"] { background: rgba(255, 107, 107, 0.18); color: #ff8a8a; }
.rq-remove, .rq-close { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: transparent; color: var(--text-3); cursor: pointer; }
.rq-close { border: 0; }
.rq-remove:hover, .rq-close:hover { color: var(--text); background: var(--surface-2); }

.rq-dialog { width: 520px; max-width: calc(100vw - 32px); padding: 0; border: 1px solid var(--border-strong); border-radius: 20px; background: var(--surface); color: var(--text); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55); overflow: hidden; }
.rq-dialog::backdrop { background: rgba(5, 9, 7, 0.72); }
.rq-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px 0; }
.rq-dialog-head h2 { margin: 0; font-size: 19px; color: var(--text); }
.rq-search { display: flex; align-items: center; gap: 10px; margin: 14px 22px; min-height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--bg-deep); color: var(--text-3); }
.rq-search:focus-within { border-color: var(--green); }
.rq-search input { flex: 1; min-width: 0; min-height: 0; height: 44px; padding: 0; border: 0 !important; outline: 0; background: transparent !important; box-shadow: none !important; color: var(--text); font: inherit; font-size: 15px; }
.rq-results { max-height: 340px; overflow: auto; border-top: 1px solid var(--border); }
.rq-result { display: flex; align-items: center; gap: 12px; padding: 10px 22px; border-bottom: 1px solid var(--border); }
.rq-result[hidden] { display: none; }
.rq-added { display: none; align-items: center; gap: 6px; font-size: 13px; color: var(--green-bright); }
.rq-result.is-added .rq-added { display: inline-flex; }
.rq-result.is-added [data-reqs-pick] { display: none; }
.rq-none { padding: 26px 22px; text-align: center; color: var(--text-3); font-size: 14px; }
.rq-none[hidden] { display: none; }
.rq-dialog-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; font-size: 13px; color: var(--text-3); }
.rq-dialog-foot strong { color: var(--text); }

/* Upload dropzones: icon above the text, both centred; "(optional)" stays on the label's line */
.dropzone { flex-direction: column; flex-wrap: nowrap; justify-content: center; align-items: center; gap: 10px; min-height: 132px; text-align: center; }
.dropzone-copy { align-items: center; }
.dropzone-title { font-size: 15px; font-weight: 600; }
.dropzone-hint { font-size: 13px; }
.field > label .muted { display: inline; margin-left: 4px; font-weight: 400; color: var(--text-3); }
/* the form's own label / strong rules (grid labels, 17 px box titles) must not reach into the requirements */
form label.rq-search { display: flex; flex-direction: row; grid-template-columns: none; }
.rq .rq-main strong, .rq .rq-dialog-foot strong, .rq .rq-dialog-head h2 { font-size: inherit; }
.rq .rq-main strong { font-size: 15px; }
.rq .rq-dialog-head h2 { font-size: 19px; }
.rq .rq-dialog-foot span { display: inline; }
/* form labels are a grid in the upload form: the dropzone is a centred column, the field label one line */
form label.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; grid-template-columns: none; }
form .field > label:not(.dropzone) { display: block; }
form .field > label .muted { display: inline; }

/* Scrollbars in the site's colours (page, lists, the requirements popup): a thin rounded thumb on the dark ground */
html { scrollbar-color: #2f4a40 transparent; }
* { scrollbar-width: thin; scrollbar-color: #2f4a40 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2f4a40; border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #3a9bd0; background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }
.rq-results { scrollbar-color: #3b5366 transparent; }

/* the editor of the requirements of an uploaded version: the picker inside a dialog */
.rq-editor { width: 640px; }
.rq-editor-body { padding: 4px 22px 18px; max-height: 60vh; overflow: auto; }
.rq-editor-body .rq-head legend { font-size: 15px; }
.rq-editor-actions { display: inline-flex; gap: 8px; }
.rq-editor .rq-dialog-foot { border-top: 1px solid var(--border); }

/* Game versions (admin): version, type and date in one row, the major switch as a row, the list like the other lists */
.gv-form { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.gv-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
form label.gv-field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.gv-field .muted { font-weight: 400; color: var(--text-3); }
.gv-field input, .gv-field select { width: 100%; box-sizing: border-box; min-height: 44px; }
.gv-hint { margin: -6px 0 0; }
form label.gv-switch { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px;
    border: 1px solid var(--border); border-radius: 14px; background: var(--bg-deep); cursor: pointer; }
.gv-switch-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gv-switch-text strong { font-size: 15px; color: var(--text); }
.gv-switch-text span { font-size: 13px; font-weight: 400; color: var(--text-3); }
.gv-switch .switch { flex: none; }
.gv-actions .btn { display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 760px) { .gv-fields { grid-template-columns: 1fr; } }

/* ---- Header: the centred navigation never covers Publish and the user menu ----
   The navigation was absolutely centred, so it took no room: signed in, Publish and the user menu (about 285 px) did not fit into the
   right side of the 1180 px bar and slid under "Resources". A three-column grid keeps the navigation in the middle while the sides have
   room, and gives the sides their room first when they do not. The bar may grow to 1400 px on wide windows. */
@media (min-width: 961px) {
    .header-inner {
        display: grid;
        grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr);
        align-items: center;
        column-gap: 16px;
        max-width: min(1400px, 100%);
    }
    .header-inner > .brand { grid-column: 1; justify-self: start; }
    .primary-nav { position: static; transform: none; grid-column: 2; margin: 0; }
    .header-actions { grid-column: 3; justify-self: end; margin-left: 0; }
    .nav-toggle { display: none; }
}
@media (min-width: 961px) and (max-width: 1360px) {
    .primary-nav { gap: 2px; }
    .primary-nav .nav-link { padding: 0 10px; }
}
@media (min-width: 961px) and (max-width: 1180px) {
    .primary-nav .nav-link .icon:first-child { display: none; }
}

/* ---- Server tab (/server): the set-up steps as cards in the style of the platform cards ---- */
.server-steps { margin-top: 48px; }
.server-steps h2 {
    margin: 0 0 14px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); text-align: center;
}
.server-step {
    margin-top: 12px; padding: 20px 22px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border);
}
.server-step h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 16px; color: var(--text); }
.server-step h3::before {
    content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--green-bright);
    box-shadow: 0 0 0 4px var(--green-soft);
}
.server-step p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--text-2); }
.server-step p + pre, .server-step pre + p { margin-top: 12px; }
.server-step ol { list-style: none; counter-reset: srvstep; margin: 0; padding: 0; display: grid; gap: 10px; }
.server-step ol li {
    counter-increment: srvstep; position: relative; padding-left: 36px; min-height: 24px; font-size: 14.5px; line-height: 1.6; color: var(--text-2);
}
.server-step ol li::before {
    content: counter(srvstep); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%;
    display: grid; place-items: center; background: var(--green-soft); color: var(--green-bright); font-size: 12px; font-weight: 700;
}
.server-step strong { color: var(--text); }
.server-step .dl-mono {
    padding: 1px 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); font-size: 0.88em;
    overflow-wrap: anywhere;
}
.server-step pre {
    margin: 0; padding: 14px 16px; border-radius: 10px; background: #070b09; border: 1px solid var(--border);
    border-left: 3px solid var(--green); font-size: 13px; line-height: 1.7; color: var(--text);
}
.server-step pre code { font-family: var(--mono); background: none; padding: 0; border: 0; white-space: pre; }
@media (max-width: 720px) {
    .server-step { padding: 16px; }
    .server-step pre { font-size: 12px; }
}

/* ---- Server tab (/server): the set-up guide - tabs, a numbered flow, three cards (REPORT 3.230) ---- */
.srv-guide { width: 100%; margin-top: 56px; text-align: left; }
.srv-guide > h2 {
    margin: 0 0 18px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); text-align: center;
}
.srv-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.srv-tabs > input { position: absolute; opacity: 0; pointer-events: none; }
.srv-tabs > label {
    display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; cursor: pointer;
    font-size: 14px; font-weight: 600; color: var(--text-2); background: var(--surface); border: 1px solid var(--border);
    transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.srv-tabs > label:hover { color: var(--text); border-color: var(--green); }
.srv-tabs > label .launcher-platform-icon svg { width: 16px; height: 16px; }
.srv-tabs > input:checked + label { color: #04150d; background: var(--green-bright); border-color: var(--green-bright); }
.srv-tabs > input:focus-visible + label { outline: 2px solid var(--green-bright); outline-offset: 2px; }
.srv-panel { display: none; width: 100%; margin-top: 14px; }
#srv-tab-app:checked ~ .srv-panel-app,
#srv-tab-cli:checked ~ .srv-panel-cli,
#srv-tab-linux:checked ~ .srv-panel-linux { display: block; }

.srv-flow { list-style: none; counter-reset: srvflow; margin: 0; padding: 0; display: grid; gap: 12px; }
.srv-flow > li {
    counter-increment: srvflow; position: relative; padding: 20px 22px 20px 74px; border-radius: 14px;
    background: var(--surface); border: 1px solid var(--border);
}
.srv-flow > li::before {
    content: counter(srvflow); position: absolute; left: 22px; top: 18px; width: 34px; height: 34px; border-radius: 50%;
    display: grid; place-items: center; font-size: 15px; font-weight: 700; color: var(--green-bright);
    background: var(--green-soft); box-shadow: inset 0 0 0 1px var(--green);
}
.srv-flow > li:not(:last-child)::after {
    content: ""; position: absolute; left: 38px; top: 56px; bottom: -14px; width: 2px; background: var(--green-soft);
}
.srv-flow h3 { margin: 4px 0 8px; font-size: 16px; color: var(--text); }
.srv-flow p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--text-2); }
.srv-flow p + pre, .srv-flow pre + p, .srv-flow pre + .srv-copy + p { margin-top: 12px; }
.srv-flow strong, .srv-card strong { color: var(--text); }
.srv-guide .dl-mono {
    padding: 1px 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); font-size: 0.88em;
    overflow-wrap: anywhere;
}
.srv-guide pre {
    margin: 0; padding: 14px 16px; overflow-x: auto; border-radius: 10px; background: #070b09; border: 1px solid var(--border);
    border-left: 3px solid var(--green); font-size: 13px; line-height: 1.7; color: var(--text); text-align: left;
}
.srv-guide pre code { font-family: var(--mono); background: none; padding: 0; border: 0; white-space: pre; }
.srv-copy {
    display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 5px 12px; border-radius: 999px; cursor: pointer;
    font-size: 12.5px; font-weight: 600; color: var(--text-2); background: transparent; border: 1px solid var(--border);
}
.srv-copy:hover { color: var(--text); border-color: var(--green); }

.srv-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
.srv-card { padding: 20px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); display: grid; align-content: start; gap: 10px; }
.srv-card-icon {
    width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--green-bright); background: var(--green-soft);
}
.srv-card h3 { margin: 0; font-size: 15.5px; color: var(--text); }
.srv-card p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text-2); }
.srv-card pre { font-size: 12px; }
@media (max-width: 900px) { .srv-cards { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
    .srv-flow > li { padding: 16px 16px 16px 62px; }
    .srv-flow > li::before { left: 16px; top: 14px; width: 30px; height: 30px; }
    .srv-flow > li:not(:last-child)::after { left: 30px; top: 48px; }
    .srv-guide pre { font-size: 12px; }
}
.srv-tabs > label { height: 40px; line-height: 1; margin: 0; box-sizing: border-box; }
.srv-tabs > label .launcher-platform-icon {
    width: auto; height: auto; padding: 0; margin: 0; border: 0; background: none; box-shadow: none; display: inline-grid; color: inherit;
}
