/* Strata — 代码托管控制台
   色：#191919 / #fff / #f4f3f3；字：Inter；动效仅 200ms 颜色 */

:root {
    --ink: #191919;
    --muted: #6b6b6b;
    --faint: #9a9a9a;
    --paper: #ffffff;
    --wash: #f4f3f3;
    --line: #e8e8e8;
    --sidebar: 220px;
    --radius: 6px;
    --ease: 200ms ease;
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
    font-family: var(--font);
    background: var(--paper);
    color: var(--ink);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ----- 品牌 / 顶栏 ----- */

.brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--ink);
}

.brand-mark { width: 22px; height: 22px; display: block; }
.brand-name { font-size: 14px; font-weight: 600; letter-spacing: -0.02em; }
.brand-word {
    color: #10233f;
    font-weight: 700;
    letter-spacing: -0.045em;
    font-size: 17px;
    line-height: 1;
}

.topbar-public {
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    border-bottom: 1px solid var(--line);
}

.topbar-public .nav-links,
.topbar {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar {
    height: 52px;
    justify-content: flex-end;
    padding: 0 28px;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}

.topbar a,
.nav-links a {
    font-size: 13px;
    color: var(--muted);
    text-decoration: none;
    transition: color var(--ease);
}

.topbar a:hover,
.nav-links a:hover { color: var(--ink); }

.nav-user { font-size: 13px; font-weight: 500; }

.auth-page .topbar-public .nav-links { display: none; }

/* ----- 管理壳 ----- */

.shell { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar);
    flex-shrink: 0;
    border-right: 1px solid var(--line);
    background: #fafafa;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar .brand { padding: 8px 10px 16px; }

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }

.side-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius);
    text-decoration: none;
    color: #444;
    font-size: 13px;
    transition: background var(--ease), color var(--ease);
}

.side-link svg { width: 15px; height: 15px; opacity: 0.65; flex-shrink: 0; }

.side-link:hover { background: var(--wash); color: var(--ink); }

.side-link.is-active {
    background: var(--wash);
    color: var(--ink);
    font-weight: 600;
}

.side-link.is-active svg { opacity: 1; }

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

.admin-main,
.page-main {
    flex: 1;
    padding: 24px 28px 48px;
}

body:not(.is-admin) .page-main {
    padding: 28px 48px 56px;
}

.admin-main { max-width: 1080px; }

.public-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ----- 页头 ----- */

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.page-head h1 {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.page-head .lede,
.lede {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.page-head-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* ----- 按钮 ----- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 12px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background var(--ease), border-color var(--ease), color var(--ease);
}

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

.btn-secondary { background: var(--wash); color: var(--ink); }
.btn-secondary:hover { background: #eaeaea; }

.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--ink); background: var(--wash); }

.btn-danger {
    background: #fff;
    color: var(--ink);
    border-color: var(--line);
}
.btn-danger:hover { background: var(--wash); }

.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }

.btn-link {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    padding: 0;
    transition: color var(--ease);
}
.btn-link:hover { color: var(--ink); }

/* ----- 表单 ----- */

.form-group { margin-bottom: 14px; }

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="search"],
.form-group input[type="number"],
.form-group input[type="url"],
.form-group select,
.form-group textarea,
.form-input {
    width: 100%;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-size: 13px;
    font-family: inherit;
    color: var(--ink);
    background: var(--paper);
    transition: border-color var(--ease), box-shadow var(--ease);
}

.form-group select {
    height: 36px;
}

.form-group textarea {
    height: auto;
    min-height: 160px;
    padding: 10px;
    line-height: 1.45;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 12px;
    resize: vertical;
}

.form-group textarea.short {
    min-height: 72px;
    font-family: inherit;
    font-size: 13px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 12px;
}

.form-section {
    margin: 22px 0 12px;
    font-size: 13px;
    font-weight: 600;
}

.form-group input[type="file"] {
    display: block;
    font-size: 13px;
}

.choice {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    margin: 6px 0;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.form-input:focus {
    outline: none;
    border-color: var(--ink);
    box-shadow: 0 0 0 3px rgba(25, 25, 25, 0.06);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--faint);
    font-size: 12px;
}

.form-group small code {
    font-size: 11px;
    background: var(--wash);
    padding: 1px 4px;
    border-radius: 3px;
}

.form-actions { display: flex; gap: 8px; margin-top: 18px; align-items: center; }

.narrow { max-width: 480px; }
.narrow-lg { max-width: 640px; }

.docker-tabs {
    display: flex;
    gap: 4px;
    margin: -8px 0 20px;
    border-bottom: 1px solid var(--line);
}

.docker-tab {
    padding: 8px 12px;
    font-size: 13px;
    color: var(--muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.docker-tab:hover { color: var(--ink); }
.docker-tab.is-active {
    color: var(--ink);
    font-weight: 600;
    border-bottom-color: var(--ink);
}

.status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--faint);
    margin-right: 6px;
    vertical-align: middle;
}
.status-dot.is-success { background: var(--ink); }
.status-dot.is-running, .status-dot.is-queued { background: #444; }
.status-dot.is-failed, .status-dot.is-canceled { background: var(--muted); }

.build-log {
    background: #191919;
    color: #ececec;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 12px;
    line-height: 1.5;
    padding: 14px 16px;
    border-radius: var(--radius);
    min-height: 360px;
    max-height: 70vh;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.inline-form { display: inline; }

.settings-item {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 10px;
    background: #fff;
}

.settings-item summary {
    padding: 12px 14px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.settings-item summary::-webkit-details-marker { display: none; }

.settings-item summary::after {
    content: "";
    width: 6px;
    height: 6px;
    border-right: 1.5px solid var(--muted);
    border-bottom: 1.5px solid var(--muted);
    transform: rotate(45deg);
    transition: transform var(--ease);
}

.settings-item[open] summary::after {
    transform: rotate(225deg);
}

.settings-item summary:hover { background: #fafafa; }

.settings-body {
    padding: 4px 14px 16px;
    border-top: 1px solid var(--line);
}

.alert {
    padding: 10px 12px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 13px;
    border: 1px solid var(--line);
    background: var(--wash);
}

.alert-error { background: #fff; border-color: var(--ink); }

/* ----- 表格 ----- */

.table-wrap { width: 100%; overflow-x: auto; }

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    font-size: 12px;
    font-weight: 500;
    color: var(--faint);
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
}

.data-table td {
    padding: 10px;
    border-bottom: 1px solid #f2f2f2;
    font-size: 13px;
    color: #444;
    vertical-align: middle;
}

.data-table tbody tr:hover td { background: #fafafa; }

.data-table td a.repo-name {
    color: var(--ink);
    text-decoration: none;
    font-weight: 500;
}
.data-table td a.repo-name:hover { text-decoration: underline; }

.repo-table { table-layout: fixed; }
.repo-table .col-name { width: 14%; }
.repo-table .col-desc { width: 24%; }
.repo-table .col-admin { width: 12%; }
.repo-table .col-size { width: 9%; }
.repo-table .col-count { width: 9%; }
.repo-table .col-time { width: 14%; }
.repo-table .col-actions { width: 132px; }
.cell-clip {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.row-actions { display: flex; gap: 4px; justify-content: flex-end; white-space: nowrap; }

/* ----- 指标条 ----- */

.metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 28px;
    overflow: hidden;
}

.metric {
    padding: 14px 16px;
    border-right: 1px solid var(--line);
}
.metric:last-child { border-right: none; }

.metric .lbl {
    font-size: 12px;
    color: var(--faint);
    margin-bottom: 4px;
}

.metric .num {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.section { margin-top: 28px; }

.section h2 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
}

.hairline { height: 1px; background: var(--line); border: 0; margin: 24px 0; }

.empty { padding: 20px 0; color: var(--faint); font-size: 13px; }

/* ----- 公开目录 ----- */

body.is-catalog { background: #f5f6f8; }
body.is-catalog .topbar-public {
    background: #fff;
    border-bottom: 1px solid #eceef2;
    height: 56px;
    padding: 0 22px;
}
body.is-catalog .page-main {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 28px 48px;
}
body.is-catalog .footer {
    background: transparent;
    border-top: none;
}

.menu-glyph { width: 18px; height: 18px; color: #5c6570; }

.catalog {
    display: flex;
    align-items: flex-start;
    gap: 28px;
    width: 100%;
}

.repo-nav {
    flex: 0 0 232px;
    background: #fff;
    border: 1px solid #e7e9ee;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.repo-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 10px;
    font-size: 14px;
    color: #3c4450;
    text-decoration: none;
    border-radius: 8px;
}

.repo-nav-main {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.repo-nav-icon { width: 16px; height: 16px; flex-shrink: 0; }

.repo-nav-count {
    font-variant-numeric: tabular-nums;
    color: #98a0aa;
    font-size: 13px;
}

.repo-nav-item:hover { background: #f4f7fb; }

.repo-nav-item.active {
    background: #e8f1ff;
    color: #1d6fe8;
    font-weight: 600;
}
.repo-nav-item.active .repo-nav-count { color: #1d6fe8; }

.catalog-main { flex: 1; min-width: 0; }

.catalog-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}

.catalog-title {
    display: flex;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
}

.catalog-head h1 {
    font-size: 22px;
    font-weight: 650;
    letter-spacing: -0.03em;
}

.catalog-count {
    color: #8b939e;
    font-size: 13px;
    white-space: nowrap;
}

.repo-filter { position: relative; }
.repo-filter svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #9aa3ad;
}
.repo-filter form { margin: 0; }
.repo-filter input {
    height: 36px;
    padding: 0 12px 0 34px;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
    font-size: 13px;
    width: 240px;
    font-family: inherit;
    background: #fff;
    color: var(--ink);
}
.repo-filter input:focus {
    outline: none;
    border-color: #1d6fe8;
    box-shadow: 0 0 0 3px rgba(29, 111, 232, 0.12);
}
.repo-filter button { display: none; }

.repo-list-wrapper {
    background: #fff;
    border: 1px solid #e7e9ee;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.repo-table { width: 100%; border-collapse: collapse; }

.repo-table thead th {
    text-align: left;
    font-size: 13px;
    font-weight: 500;
    color: #7b8490;
    padding: 0;
    background: #f7f8fa;
    border-bottom: 1px solid #eef0f3;
}

.sort-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    color: inherit;
    text-decoration: none;
}
.repo-table thead th.desc-col { padding: 12px 16px; }

.sort-caret { font-size: 11px; color: #b0b7c0; }
.sort-link.is-active { color: #3c4450; }
.sort-link.is-active .sort-caret { color: #1d6fe8; }

.repo-table tbody td {
    padding: 13px 16px;
    border-bottom: 1px solid #f2f3f5;
    font-size: 14px;
    color: #5c6570;
}

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

.repo-table .name-col { width: 22%; }
.repo-table .desc-col {
    color: #8b939e;
    max-width: 360px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.repo-table .tl-col {
    width: 120px;
    white-space: nowrap;
    text-align: left;
    font-variant-numeric: tabular-nums;
    color: #3c4450;
}

.repo-table .time-col {
    width: 190px;
    white-space: nowrap;
    color: #6b7380;
    font-variant-numeric: tabular-nums;
}

.repo-table tbody tr:hover td { background: #fafbfc; }

.repo-table td.name-col a {
    color: #1a73e8;
    text-decoration: none;
    font-weight: 500;
}
.repo-table td.name-col a:hover { text-decoration: underline; }

.repo-table .empty-msg {
    padding: 48px 12px;
    text-align: center;
    color: var(--faint);
}

.pagination {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    font-size: 13px;
    color: var(--faint);
    border-top: 1px solid #f2f3f5;
}

.pagination-links { display: flex; gap: 12px; }
.pagination-links a { color: var(--ink); text-decoration: none; }
.pagination-links a:hover { text-decoration: underline; }

/* ----- 登录 ----- */

.auth-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-card { width: 100%; max-width: 360px; }
.auth-card-wide { max-width: 640px; }
.auth-card h1 { font-size: 22px; font-weight: 600; margin-bottom: 8px; }
.auth-card .lede { margin-bottom: 16px; }

/* ----- 详情 ----- */

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    padding: 12px 0;
    margin-bottom: 24px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    color: var(--muted);
}

.meta-row strong { color: var(--ink); font-weight: 500; margin-left: 6px; }

.panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px 18px;
    margin-bottom: 16px;
}

.panel h2 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 14px;
}

.danger-zone {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.danger-zone h2 { font-size: 14px; font-weight: 600; margin-bottom: 6px; }

/* ----- 远程 ----- */

.group-block { margin-bottom: 24px; }

.group-block h3 {
    font-size: 12px;
    font-weight: 600;
    color: var(--faint);
    margin-bottom: 6px;
}

.remote-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 4px;
    border-bottom: 1px solid #f2f2f2;
}

.remote-row a { color: var(--ink); text-decoration: none; font-weight: 500; }
.remote-row a:hover { text-decoration: underline; }

/* ----- 错误 / 页脚 ----- */

.error-screen { min-height: 50vh; display: flex; align-items: center; }
.error-screen h1 { font-size: 40px; font-weight: 600; letter-spacing: -0.03em; }
.error-screen p { margin: 8px 0 20px; color: var(--muted); }

.footer {
    text-align: center;
    padding: 16px;
    color: var(--faint);
    font-size: 12px;
    border-top: 1px solid var(--line);
}

.footer a { color: var(--faint); text-decoration: none; }
.footer a:hover { color: var(--ink); }
.footer-sep { margin: 0 8px; color: #ccc; }
.police-icon { width: 14px; height: 14px; vertical-align: middle; margin-right: 3px; }

/* ----- 模态 ----- */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(25, 25, 25, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-box {
    background: #fff;
    border-radius: 8px;
    padding: 22px;
    width: 400px;
    max-width: 92vw;
    border: 1px solid var(--line);
}

.modal-box h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.modal-box p { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }

/* ----- 响应式 ----- */

@media (max-width: 800px) {
    .shell { flex-direction: column; }
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--line);
        padding: 10px 12px;
    }
    .sidebar-nav { flex-direction: row; flex-wrap: wrap; }
    .admin-main, .page-main, .topbar-public,
    body:not(.is-admin) .page-main { padding-left: 16px; padding-right: 16px; }
    .metrics { grid-template-columns: 1fr 1fr; }
    .metric { border-bottom: 1px solid var(--line); }
    .catalog { flex-direction: column; }
    .catalog-head { flex-direction: column; align-items: stretch; }
    .repo-filter input { width: 100%; }
    .repo-nav { flex: none; width: 100%; }
    .form-row { grid-template-columns: 1fr; }
    .page-head { flex-direction: column; }
}

/* ----- 控制台壳子 ----- */

body.forge {
    background: #f4f7fb;
    color: #1d2433;
}

.forge-app { min-height: 100vh; display: flex; }

.forge-side {
    width: 248px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #e7edf5;
    padding: 18px 14px 16px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.forge-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px 18px;
    text-decoration: none;
    color: #172033;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.03em;
}

.forge-brand .brand-mark { width: 30px; height: 30px; }
.forge-card .brand-mark { width: 22px; height: 22px; }
.forge-brand .brand-word { font-size: 20px; }
.forge-card .brand-word { font-size: 14px; }
.forge-brand span,
.forge-card strong {
    min-width: 0;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.forge-card strong { min-width: 0; line-height: 1.3; font-size: 13px; }

.forge-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; min-height: 0; overflow: auto; }

.forge-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: #4b5568;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.forge-link svg { width: 18px; height: 18px; }
.forge-link:hover { background: #f4f7fb; color: #1d2433; }
.forge-link.is-active { background: #e8f0ff; color: #2563eb; }

.forge-card {
    margin-top: auto;
    border: 1px solid #e7edf5;
    border-radius: 14px;
    padding: 14px;
    background: #fff;
}

.forge-card-name {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1d2433;
    font-size: 14px;
}

.forge-card p {
    margin: 8px 0 10px;
    color: #8b95a7;
    font-size: 12px;
    line-height: 1.45;
}

.forge-version { color: #9aa3b2; font-size: 12px; }

.forge-main { flex: 1; min-width: 0; max-width: 100%; display: flex; flex-direction: column; overflow-x: hidden; }

.forge-top {
    height: 64px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 22px;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid #e7edf5;
    position: sticky;
    top: 0;
    z-index: 5;
}

.forge-icon-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #667085;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

button.forge-icon-btn { cursor: pointer; }
button.forge-icon-btn:hover { background: #f2f5fa; }
.forge-icon-btn svg { width: 18px; height: 18px; }

.forge-search {
    margin-left: auto;
    width: min(420px, 46vw);
    height: 38px;
    border: 1px solid #e6ebf2;
    background: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px 0 12px;
    color: #98a2b3;
}

.forge-search svg { width: 16px; height: 16px; flex-shrink: 0; }
.forge-search input {
    border: none;
    outline: none;
    flex: 1;
    font: inherit;
    font-size: 13px;
    color: #1d2433;
    background: transparent;
    min-width: 0;
}
.forge-search kbd {
    border: 1px solid #e6ebf2;
    border-radius: 6px;
    padding: 1px 6px;
    font-size: 11px;
    color: #98a2b3;
    font-family: inherit;
}

.forge-login {
    height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

.forge-user { position: relative; }
.forge-user summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2px;
    cursor: pointer;
}
.forge-user summary::-webkit-details-marker { display: none; }
.forge-user summary svg { width: 16px; height: 16px; color: #98a2b3; }
.forge-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #e8eefc;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}
.forge-user-menu {
    position: absolute;
    right: 0;
    top: 42px;
    width: 180px;
    background: #fff;
    border: 1px solid #e7edf5;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(16, 24, 40, 0.08);
    padding: 6px;
    z-index: 8;
}
.forge-user-menu a,
.forge-user-menu button {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    font: inherit;
    font-size: 13px;
    color: #344054;
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
}
.forge-user-menu a:hover,
.forge-user-menu button:hover { background: #f4f7fb; }
.forge-app.is-collapsed .forge-side { display: none; }
.forge-board, .forge-content { padding: 22px 28px 36px; }
.forge .admin-main { max-width: none; }

.hub-hero { position: relative; min-height: 92px; margin-bottom: 8px; overflow: hidden; }
.hub-hero h1 { font-size: 32px; font-weight: 700; letter-spacing: -0.04em; line-height: 1.15; }
.hub-hero p { margin-top: 6px; color: #8b95a7; font-size: 14px; }
.hub-mountains {
    position: absolute;
    right: 0;
    top: 0;
    width: min(460px, 46%);
    height: 100%;
    pointer-events: none;
}

.hub-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #eef4ff;
    border: 1px solid #d9e6ff;
    color: #3b4a68;
    border-radius: 12px;
    padding: 12px 14px;
    margin: 8px 0 18px;
    font-size: 14px;
}
.hub-banner-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3b82f6;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.hub-banner p { flex: 1; min-width: 0; }
.hub-banner button {
    border: none;
    background: transparent;
    color: #98a2b3;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.hub-banner button svg { width: 16px; height: 16px; }

.hub-tabs {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #e7edf5;
    margin-bottom: 14px;
}
.hub-tablist { display: flex; gap: 18px; }
.hub-tab {
    position: relative;
    padding: 10px 2px 12px;
    color: #667085;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}
.hub-tab em {
    font-style: normal;
    margin-left: 6px;
    color: #98a2b3;
    font-weight: 600;
    display: inline-flex;
    min-width: 22px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #f2f4f7;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}
.hub-tab.is-active { color: #2563eb; }
.hub-tab.is-active em { color: #2563eb; background: #e8f0ff; }
.hub-tab.is-active::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 2px;
    background: #2563eb;
    border-radius: 2px;
}
.hub-new {
    margin-bottom: 8px;
    background: #2563eb;
    color: #fff;
    text-decoration: none;
    height: 36px;
    padding: 0 14px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
}

.hub-tools { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.hub-tool-search, .hub-tools select {
    height: 38px;
    border: 1px solid #e6ebf2;
    background: #fff;
    border-radius: 10px;
    color: #344054;
    font: inherit;
    font-size: 13px;
}
.hub-tool-search {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    color: #98a2b3;
    max-width: 420px;
}
.hub-tool-search svg { width: 16px; height: 16px; }
.hub-tool-search input {
    border: none;
    outline: none;
    flex: 1;
    font: inherit;
    font-size: 13px;
    background: transparent;
    color: #1d2433;
}
.hub-tools select { padding: 0 28px 0 12px; }
.hub-views {
    margin-left: auto;
    display: flex;
    border: 1px solid #e6ebf2;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}
.hub-views a {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #98a2b3;
}
.hub-views a svg { width: 16px; height: 16px; }
.hub-views a.is-active { color: #2563eb; background: #f3f7ff; }

.hub-table-wrap, .hub-empty {
    background: #fff;
    border: 1px solid #e7edf5;
    border-radius: 14px;
    overflow: hidden;
}
.hub-table-wrap { overflow-x: auto; max-width: 100%; }
.hub-empty { padding: 48px 16px; text-align: center; color: #98a2b3; }
.hub-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.hub-table th {
    text-align: left;
    font-size: 13px;
    font-weight: 500;
    color: #98a2b3;
    background: #f8fafc;
    padding: 12px 16px;
    border-bottom: 1px solid #eef2f6;
}
.hub-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f2f4f7;
    font-size: 14px;
    color: #344054;
    vertical-align: middle;
}
.hub-table tr:last-child td { border-bottom: none; }
.hub-name {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}
.hub-name svg { width: 16px; height: 16px; color: #98a2b3; }
.hub-name:hover { text-decoration: underline; }
.hub-desc {
    max-width: 280px;
    color: #667085;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hub-muted { color: #667085; white-space: nowrap; }

.pill {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    background: #eef2ff;
    color: #3b5bdb;
}
.pill-public { background: #e8f8ef; color: #179a57; }
.pill-private { background: #ecebff; color: #5b4cdb; }
.tone-1 { background: #e7f6ff; color: #0b7ac2; }
.tone-2 { background: #f3e8ff; color: #7c3aed; }
.tone-3 { background: #fff4e5; color: #b76e00; }
.tone-4 { background: #e8f8f6; color: #0f766e; }

.hub-menu { position: relative; }
.hub-menu summary {
    list-style: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #667085;
    letter-spacing: 1px;
    font-weight: 700;
}
.hub-menu summary::-webkit-details-marker { display: none; }
.hub-menu div {
    position: absolute;
    right: 0;
    top: 34px;
    background: #fff;
    border: 1px solid #e7edf5;
    border-radius: 10px;
    min-width: 120px;
    box-shadow: 0 10px 24px rgba(16, 24, 40, 0.08);
    z-index: 4;
    padding: 4px;
}
.hub-menu a {
    display: block;
    padding: 8px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: #344054;
    font-size: 13px;
}

.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.hub-card { background: #fff; border: 1px solid #e7edf5; border-radius: 14px; padding: 16px; }
.hub-card p { margin: 8px 0 12px; color: #667085; font-size: 13px; }
.hub-card p:empty { display: none; }
.hub-pills, .hub-card-meta { display: flex; gap: 8px; align-items: center; }
.hub-card-meta { margin-top: 12px; color: #98a2b3; font-size: 12px; justify-content: space-between; }

.hub-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    color: #98a2b3;
    font-size: 13px;
}
.hub-pages { display: flex; gap: 6px; align-items: center; }
.hub-pages a, .hub-pages span {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: 8px;
    border: 1px solid #e6ebf2;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #344054;
    text-decoration: none;
}
.hub-pages .is-current { background: #2563eb; border-color: #2563eb; color: #fff; }
.hub-pages .is-disabled { color: #d0d5dd; }
.forge-filings { background: transparent; border: none; }

@media (max-width: 900px) {
    .forge-side { display: none; }
    .forge-top { padding: 0 12px; gap: 8px; }
    .forge-top > .forge-icon-btn[aria-hidden="true"] { display: none; }
    .forge-search { min-width: 0; }
    .hub-tabs { flex-wrap: wrap; row-gap: 8px; }
    .hub-tablist { min-width: 0; }
    .hub-new { margin-left: auto; flex: 0 0 auto; }
    .forge-app.is-collapsed .forge-side {
        display: flex;
        position: fixed;
        z-index: 20;
        box-shadow: 12px 0 30px rgba(16, 24, 40, 0.08);
    }
    .hub-tools { flex-wrap: wrap; }
    .hub-tool-search { flex: 1 1 100%; max-width: none; }
    .hub-views { margin-left: auto; }
    .hub-mountains { display: none; }
    .forge-search { width: auto; flex: 1; }
    .forge-search kbd { display: none; }
    .docs-layout { grid-template-columns: 1fr; }
    .docs-side { position: static; }
    .archive-layout { grid-template-columns: 1fr; }
    .archive-repos, .archive-layout .docs-side { position: static; max-height: none; }
    .archive-admin-bar { grid-template-columns: 1fr; }
}

.docs-empty {
    min-height: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #fff;
    border: 1px solid #e7edf5;
    border-radius: 16px;
}
.docs-empty h1 { margin: 0 0 8px; font-size: 28px; color: #172033; }
.docs-empty p { margin: 0; color: #667085; }

.archive-layout {
    display: grid;
    grid-template-columns: 200px 240px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}
.archive-repos,
.archive-layout .docs-side {
    max-height: calc(100vh - 92px);
    overflow: auto;
    position: sticky;
    top: 16px;
}
.archive-repos {
    background: #fff;
    border: 1px solid #e7edf5;
    border-radius: 14px;
    padding: 12px;
}
.archive-repos a {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    border-radius: 8px;
    color: #344054;
    text-decoration: none;
}
.archive-repos a em {
    font-style: normal;
    color: #98a2b3;
    font-size: 12px;
}
.archive-repos a.is-active { background: #eef4ff; color: #1d4ed8; }
.archive-repos a.is-active em { color: #1d4ed8; }
.archive-admin {
    background: #fff;
    border: 1px solid #e7edf5;
    border-radius: 14px;
    overflow: hidden;
}
.archive-admin-bar {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #eef2f6;
}
.archive-admin-bar input[type="search"] {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border: 1px solid #e6ebf2;
    border-radius: 8px;
    font: inherit;
    font-size: 14px;
    color: #172033;
    background: #fff;
}
.archive-scroll {
    max-height: min(520px, calc(100vh - 240px));
    overflow: auto;
}
.archive-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
.archive-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8fafc;
    text-align: left;
    font-size: 12px;
    font-weight: 500;
    color: #98a2b3;
    padding: 10px 12px;
    border-bottom: 1px solid #eef2f6;
}
.archive-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f2f4f7;
    font-size: 14px;
    color: #344054;
}
.archive-table .col-check { width: 72px; }
.archive-table .col-name { width: 220px; }
.archive-table tr.is-on td { background: #f8fbff; }
.archive-table tbody tr:hover td { background: #fafafa; }
.archive-table tr.is-on:hover td { background: #eef4ff; }
.docs-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}
.docs-side {
    position: sticky;
    top: 16px;
    background: #fff;
    border: 1px solid #e7edf5;
    border-radius: 14px;
    padding: 12px;
}
.docs-repo {
    margin: 16px 8px 4px;
    font-size: 13px;
    font-weight: 700;
    color: #172033;
}
.docs-side .docs-repo:first-child { margin-top: 4px; }
.docs-cat {
    margin: 12px 8px 6px;
    font-size: 12px;
    color: #98a2b3;
}
.docs-side a {
    display: block;
    padding: 8px 10px;
    border-radius: 8px;
    color: #344054;
    text-decoration: none;
}
.docs-side a.is-active { background: #eef4ff; color: #1d4ed8; }
.docs-article {
    background: #fff;
    border: 1px solid #e7edf5;
    border-radius: 16px;
    padding: 28px 32px 36px;
    min-width: 0;
    color: #172033;
    line-height: 1.7;
}
.docs-kicker { margin: 0 0 8px; color: #98a2b3; font-size: 13px; }
.docs-article h1 { margin: 0 0 16px; font-size: 30px; line-height: 1.3; }
.docs-article h2 { margin: 28px 0 10px; font-size: 22px; }
.docs-article h3 { margin: 22px 0 8px; font-size: 18px; }
.docs-article p { margin: 0 0 14px; }
.docs-article a { color: #1d4ed8; }
.docs-article ul, .docs-article ol { margin: 0 0 14px; padding-left: 1.3em; }
.docs-article blockquote {
    margin: 0 0 14px;
    padding: 8px 14px;
    border-left: 3px solid #bfdbfe;
    background: #f8fbff;
    color: #475467;
}
.docs-article code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.92em;
    background: #eef2ff;
    border-radius: 4px;
    padding: 0 4px;
}
.docs-article pre {
    margin: 0 0 16px;
    padding: 14px 16px;
    overflow: auto;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 12px;
}
.docs-article pre code { background: transparent; color: inherit; padding: 0; }
.docs-article img { max-width: 100%; border-radius: 8px; }
