/* Public-site primitives follow the existing help page's palette and typography. */
:root {
    color-scheme: dark;
    --bg: #17191d;
    --text: #d5dad5;
    --muted: #aab3ad;
    --border: #33383a;
    --panel: #25292b;
    --accent: #c1e9a1;
    --ink: #203019;
    --success: #92d47f;
    --warning: #f0c96a;
    --danger: #f18a84;
    --info: #91c0e8;
}
html {
    scroll-padding-top: 24px;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font:
        16px/1.75 system-ui,
        sans-serif;
}
a {
    color: var(--accent);
    text-underline-offset: 3px;
}
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}
.site-header,
.site-main,
.site-footer {
    max-width: 1120px;
    margin: auto;
    padding: 28px 24px;
}
.site-header,
.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.site-header {
    border-bottom: 1px solid var(--border);
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
}
.site-nav {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}
.site-nav a {
    color: var(--muted);
    text-decoration-color: transparent;
    text-decoration-thickness: 2px;
    text-underline-offset: 7px;
}
.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] {
    color: var(--accent);
    text-decoration-color: currentColor;
}
h1,
h2 {
    line-height: 1.2;
}
h1 {
    font-size: clamp(36px, 6vw, 64px);
    letter-spacing: -0.035em;
    margin: 16px 0 24px;
}
h2 {
    font-size: 22px;
}
.hero {
    padding: 48px 0 56px;
    max-width: 780px;
}
.eyebrow,
.muted,
.site-footer {
    color: var(--muted);
}
.eyebrow {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.intro {
    font-size: 20px;
    max-width: 630px;
}
.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 28px 0 16px;
}
.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 44px;
    padding: 10px 20px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    text-decoration: none;
    font: inherit;
    cursor: pointer;
}
.button.primary {
    background: var(--accent);
    color: var(--ink);
    border-color: var(--accent);
    font-weight: 600;
}
.button:hover,
.button:focus-visible {
    border-color: var(--accent);
}
.features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
    border-top: 1px solid var(--border);
    padding-top: 24px;
    margin-bottom: 48px;
}
.features p {
    color: var(--muted);
}
.showcase {
    display: grid;
    gap: 48px;
    margin-bottom: 48px;
}
.showcase figure {
    margin: 0;
    min-width: 0;
}
.showcase figure > a {
    display: block;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}
.showcase img {
    display: block;
    width: 100%;
    height: auto;
}
.showcase figcaption {
    max-width: 680px;
}
.showcase figcaption h2 {
    margin-bottom: 8px;
}
.showcase figcaption p {
    margin-top: 0;
    color: var(--muted);
}
.prose {
    max-width: 780px;
    margin: 16px auto 40px;
    overflow-wrap: anywhere;
}
.prose h1 {
    font-size: clamp(32px, 5vw, 48px);
}
.prose h2 {
    margin-top: 32px;
}
.prose figure,
.guide-content figure {
    margin: 28px 0;
}
.prose figure > a,
.prose figure > img,
.guide-content figure > a,
.guide-content figure > img {
    display: block;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}
.prose img,
.guide-content img {
    width: 100%;
    height: auto;
    background: var(--panel);
}
.prose figcaption,
.guide-content figcaption {
    margin-top: 10px;
    color: var(--muted);
    font-size: 15px;
}
.prose kbd {
    font:
        12px/1.6 ui-monospace,
        monospace;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 5px;
}
.landing-more {
    margin-right: 0;
    margin-left: 0;
    border-top: 1px solid var(--border);
    padding-top: 8px;
}
.page-intro {
    max-width: 780px;
    margin: 16px 0 48px;
}
.page-intro h1 {
    font-size: clamp(32px, 5vw, 48px);
}
.guide-index {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 20px;
    margin: 0 0 56px;
}
.guide-card {
    min-width: 0;
    overflow: hidden;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
}
.guide-card > a {
    display: flex;
    height: 100%;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
}
.guide-card img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-bottom: 1px solid var(--border);
}
.guide-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 22px;
}
.guide-card-title {
    margin: 0;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.25;
}
.guide-card-copy {
    margin: 0;
    color: var(--muted);
}
.guide-card-link {
    margin-top: auto;
    padding-top: 8px;
    color: var(--accent);
    font-weight: 700;
}
.guide-card:hover,
.guide-card:focus-within {
    border-color: var(--accent);
}
.guide-sidebar {
    position: sticky;
    top: 24px;
    align-self: start;
}
.guide-sidebar .docs-nav {
    position: static;
}
.guide-all-link {
    display: block;
    margin: 16px 12px 0;
    color: var(--muted);
    font-size: 14px;
}
.guide-all-link:hover,
.guide-all-link:focus-visible {
    color: var(--accent);
}
.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
}
.breadcrumbs li {
    display: flex;
    align-items: center;
}
.breadcrumbs li:not(:last-child)::after {
    content: "/";
    margin: 0 8px;
    color: var(--border);
}
.related {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    margin: 36px 0 8px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}
.docs-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 48px;
    padding: 8px 0 24px;
}
.docs-sidebar {
    min-width: 0;
}
.docs-sidebar-title {
    margin: 0 12px 8px;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.docs-nav {
    position: sticky;
    top: 24px;
    display: grid;
    gap: 3px;
}
.docs-nav a {
    padding: 7px 12px;
    border-radius: 6px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
    text-decoration: none;
}
.docs-nav a:hover,
.docs-nav a:focus-visible {
    background: var(--panel);
    color: var(--accent);
}
.docs-content {
    min-width: 0;
    max-width: 780px;
    overflow-wrap: anywhere;
}
.docs-content h1 {
    margin: 8px 0 16px;
    font-size: clamp(32px, 5vw, 48px);
}
.docs-content > .intro {
    margin-top: 0;
}
.docs-content section {
    padding: 28px 0;
    border-bottom: 1px solid var(--border);
}
.docs-content section h2 {
    margin: 0 0 20px;
    font-size: 23px;
}
.docs-content section p {
    margin: 0 0 16px;
}
.docs-content li {
    margin-bottom: 8px;
}
.docs-content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    font-size: 14px;
}
.docs-content kbd {
    font: 12px/1.6 ui-monospace, monospace;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 5px;
    white-space: nowrap;
}
.docs-cta {
    margin-top: 28px;
    padding: 20px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--muted);
}
.prose table {
    min-width: 560px;
    table-layout: fixed;
}
.prose th:first-child {
    width: 22%;
}
.prose th:last-child {
    width: 25%;
}
.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 32px;
}
.account {
    max-width: 440px;
    margin: 32px auto 64px;
    padding: clamp(24px, 5vw, 40px);
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
}
.account h1 {
    font-size: 36px;
    margin-top: 0;
}
form {
    display: grid;
    gap: 12px;
}
input {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    font: inherit;
    color: var(--text);
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 6px;
}
form .button {
    margin-top: 12px;
}
.error {
    border-left: 3px solid var(--danger);
    padding-left: 12px;
}
.admin-dashboard {
    display: grid;
    gap: 36px;
    margin: 16px 0 48px;
}
.admin-heading,
.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}
.admin-heading h1 {
    margin: 4px 0 8px;
    font-size: clamp(36px, 5vw, 48px);
}
.admin-heading p,
.section-heading p {
    margin: 6px 0 0;
}
.admin-signout {
    flex: 0 0 auto;
}
.admin-signout .button {
    margin: 8px 0 0;
}
.section-heading {
    margin-bottom: 16px;
}
.section-heading h2,
.health-group h3 {
    margin: 0;
}
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.dashboard-stat,
.dashboard-panel,
.health-group {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
}
.dashboard-stat {
    display: flex;
    flex-direction: column;
    min-height: 142px;
    padding: 20px;
}
.dashboard-stat-value {
    font-size: 34px;
    font-weight: 700;
    line-height: 1.2;
}
.dashboard-stat-label {
    margin-top: 10px;
    font-weight: 600;
}
.dashboard-stat-note {
    color: var(--muted);
    font-size: 13px;
}
.dashboard-columns {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 16px;
}
.dashboard-panel {
    min-width: 0;
    padding: 22px;
}
.table-scroll {
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
}
th,
td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}
th {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}
td span {
    display: block;
    color: var(--muted);
    font-size: 14px;
}
tbody tr:last-child td {
    border-bottom: 0;
}
.role-list {
    display: grid;
    gap: 12px;
}
.role-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.role-row:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}
.role-row span,
.empty-state {
    color: var(--muted);
}
.system-health {
    padding: 24px;
}
.health-summary,
.health-label {
    display: inline-flex;
    align-items: center;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}
.health-summary {
    min-height: 32px;
    padding: 8px 12px;
}
.health-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.health-group {
    align-self: start;
    padding: 18px;
}
.health-group h3 {
    font-size: 16px;
}
.health-list {
    display: grid;
    gap: 0;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}
.health-check {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
    padding: 12px 0;
    border-top: 1px solid var(--border);
}
.health-indicator {
    width: 9px;
    height: 9px;
    margin-top: 8px;
    border-radius: 50%;
    background: currentColor;
}
.health-copy {
    min-width: 0;
}
.health-copy strong,
.health-copy span {
    display: block;
}
.health-copy span {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}
.health-label {
    margin-top: 3px;
    padding: 5px 7px;
}
.health-pass {
    color: var(--success);
}
.health-warning {
    color: var(--warning);
}
.health-error {
    color: var(--danger);
}
.health-info {
    color: var(--info);
}
.skip {
    position: absolute;
    top: -100px;
    left: 24px;
}
.skip:focus {
    top: 8px;
    background: var(--bg);
    padding: 8px;
}
@media (max-width: 760px) {
    .docs-layout {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .docs-nav {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .docs-nav a {
        background: var(--panel);
    }
    .guide-sidebar {
        position: static;
    }
    .guide-all-link {
        margin-top: 18px;
    }
}
@media (max-width: 700px) {
    .site-header,
    .site-footer {
        align-items: flex-start;
    }
    .site-nav {
        gap: 12px 18px;
    }
    .features {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .hero {
        padding: 24px 0;
    }
    .admin-heading,
    .section-heading,
    .role-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }
    .dashboard-stats,
    .dashboard-columns,
    .health-groups {
        grid-template-columns: 1fr;
    }
    .dashboard-stat {
        min-height: 0;
    }
    .health-check {
        grid-template-columns: 10px minmax(0, 1fr);
    }
    .health-label {
        grid-column: 2;
        justify-self: start;
    }
}
@media (prefers-color-scheme: light) {
    :root {
        color-scheme: light;
        --bg: #f5f7f1;
        --text: #304338;
        --muted: #596b60;
        --border: #d5dbd1;
        --panel: #e9eee4;
        --accent: #527a3e;
        --ink: #fff;
        --success: #3e762e;
        --warning: #855b00;
        --danger: #a13d38;
        --info: #356b91;
    }
}
@media print {
    .site-header,
    .site-footer,
    .docs-sidebar,
    .skip {
        display: none;
    }
    body {
        background: white;
        color: black;
    }
    .site-main,
    .docs-content {
        max-width: none;
        padding: 0;
    }
    .docs-layout {
        display: block;
        padding: 0;
    }
    a {
        color: inherit;
    }
}
