* { box-sizing: border-box; }

/* Vibrant dark design tokens on the 4c "Elevated graphite" base
   (design_handoff_dashboard/README.md + CORRECTION-nav-and-palette.md):
   neutrals lifted off pure black; accents unchanged. */
:root {
    --canvas: #17181f;
    --card: #1c1d25;
    --card-2: #191a21;
    --ribbon: #20212a;
    --pill: #24252e;
    --b1: #2a2b36;
    --b2: #262731;
    --b3: #282932;
    --b4: #363845;
    --text: #f4f4f6;
    --muted: #9295a5;
    --faint: #7d8092;
    --title: #cbccd8;
    --pink: #ff4d8d;
    --violet: #8b5cff;
    --cyan: #35e0d8;
    --lime: #b6ff3d;
    --empty-star: #3d3e4a;
}

html, body {
    font-family: 'Space Grotesk', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 0;
    /* Graphite canvas with the faint violet corner wash from the 4c base. */
    background: radial-gradient(90% 60% at 88% -12%, rgba(139, 92, 255, .12), transparent 55%), var(--canvas);
    background-attachment: fixed;
    color: var(--text);
    font-size: 15px;
    line-height: 1.5;
}

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

/* app shell: no global sidebar — centered column on the dark canvas */
.shell { max-width: 1180px; margin: 0 auto; padding: 0 30px; }
.content { padding: 24px 0 48px; overflow-x: auto; }

/* shared horizontal top nav (Browse / Authors / Topics / Lists);
   hidden on the Overview route, which supplies its own header */
.topnav { display: flex; align-items: center; gap: 26px; padding: 22px 0; border-bottom: 1px solid #24252e; }
.wordmark { font-size: 19px; font-weight: 700; letter-spacing: -.01em; color: var(--text); }
.wordmark:hover { text-decoration: none; }
.wordmark .dot { color: var(--pink); }
.topnav-links { display: flex; gap: 20px; }
.topnav-link { font-size: 13px; color: var(--muted); }
.topnav-link:hover { color: #cfcfda; text-decoration: none; }
.topnav-link.active { color: var(--text); font-weight: 600; }

h1 { font-size: 1.5rem; font-weight: 700; margin: 20px 0 16px; }
h2 { font-size: 1.05rem; font-weight: 600; margin: 1.4rem 0 0.75rem; color: var(--title); }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 1rem;
}
.stat-card {
    background: var(--card);
    border: 1px solid var(--b1);
    padding: 1rem;
    border-radius: 12px;
}
.stat-card .num { font-size: 1.8rem; font-weight: 700; color: var(--text); }
.stat-card .label { font-size: 0.85rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }

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

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--b3); }
th { font-weight: 600; font-size: 0.85rem; color: var(--muted); }
tr:hover td { background: #24252e; }

.bar-row { display: grid; grid-template-columns: 160px 1fr 40px; gap: 0.75rem; align-items: center; margin: 0.35rem 0; font-size: 0.9rem; }
.bar-track { background: var(--b3); height: 10px; border-radius: 5px; overflow: hidden; }
.bar-fill { background: linear-gradient(90deg, var(--violet), var(--pink)); height: 100%; }
.bar-num { text-align: right; color: var(--faint); font-variant-numeric: tabular-nums; }

.chart { display: flex; align-items: flex-end; gap: 3px; height: 180px; padding: 0.5rem 0; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-width: 8px; }
.chart .col .b { width: 100%; background: linear-gradient(180deg, var(--violet), #5a3aa8); border-radius: 3px 3px 0 0; min-height: 1px; }
.chart .col .lbl { font-size: 0.65rem; color: var(--faint); margin-top: 4px; transform: rotate(-45deg); transform-origin: top left; white-space: nowrap; }

.controls { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: end; margin-bottom: 1rem; }
.controls label { display: flex; flex-direction: column; font-size: 0.8rem; color: var(--muted); gap: 0.2rem; }
.controls input[type=text], .controls select {
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--b1);
    border-radius: 8px;
    background: var(--card);
    color: var(--text);
    font-size: 0.9rem;
    font-family: inherit;
}
.controls .actions { display: flex; gap: 0.5rem; }
/* .btn covers <button> AND <a class="btn"> (e.g. the backup download link). */
.btn {
    display: inline-block;
    padding: 0.45rem 0.9rem; border: 1px solid var(--b1); background: var(--card); color: var(--text);
    border-radius: 8px; cursor: pointer; font-size: 0.9rem; font-family: inherit;
}
.btn:hover { background: var(--pill); text-decoration: none; }
.btn.primary { background: linear-gradient(90deg, var(--pink), var(--violet)); color: #fff; border: none; font-weight: 600; }
.btn.primary:hover { opacity: 0.92; }

.pager { display: flex; gap: 0.5rem; align-items: center; margin-top: 1rem; }
.pager .info { color: var(--muted); font-size: 0.85rem; }

.muted { color: var(--muted); }
.badge { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 10px; font-size: 0.75rem; background: var(--pill); color: var(--title); margin-left: 0.25rem; }

.detail-grid {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 0.4rem 1rem;
    font-size: 0.92rem;
}
.detail-grid .k { color: var(--faint); text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.04em; padding-top: 0.15rem; }
.detail-grid .v { color: var(--text); }

.chip-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip {
    display: inline-flex; align-items: center; gap: 0.35rem;
    background: var(--pill); color: var(--text); border: 1px solid var(--b1);
    padding: 0.25rem 0.5rem 0.25rem 0.7rem;
    border-radius: 99px; font-size: 0.85rem;
}
.chip-x {
    background: transparent; border: none; cursor: pointer;
    color: var(--muted); font-size: 1rem; line-height: 1; padding: 0;
}
.chip-x:hover { color: var(--pink); }

.shelf-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.35rem; }
.shelf-list label { display: flex; align-items: center; gap: 0.5rem; }

.book-header { display: flex; gap: 1.5rem; align-items: flex-start; margin-bottom: 1rem; }
.book-header .cover { width: 120px; height: auto; border-radius: 6px; box-shadow: 0 8px 18px -8px rgba(0,0,0,0.6); }

/* ============================================================
   Overview dashboard — design "2a / Vibrant" (dark, neon accents)
   ============================================================ */
.dash { color: var(--text); padding-top: 4px; }
.dash a { color: inherit; text-decoration: none; }
.dash a:hover { text-decoration: none; }

/* header */
.dash-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.dash-wordmark { font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.dash-wordmark .dot { color: #ff4d8d; }
.dash-pills { display: flex; gap: 8px; font-size: 12.5px; flex-wrap: wrap; }
.dash-pill {
    padding: 8px 14px; border-radius: 99px;
    background: #24252e; color: #9c9fae;
    border: none; cursor: pointer;
    font-family: inherit; font-size: 12.5px; line-height: 1;
}
.dash-pill:hover { color: #cfcfda; }
.dash-pill.active {
    background: linear-gradient(90deg, #ff4d8d, #8b5cff);
    color: #fff; font-weight: 600;
}

/* KPI ribbon */
.dash-ribbon {
    display: flex; gap: 26px; align-items: center; flex-wrap: wrap;
    padding: 13px 20px; border-radius: 12px;
    background: linear-gradient(90deg, #20212a, #1c1d25); border: 1px solid #2c2d38; margin-bottom: 22px;
}
.dash-kpi { display: flex; align-items: baseline; gap: 8px; }
.dash-kpi .num { font-size: 22px; font-weight: 700; }
.dash-kpi .label { font-size: 12px; color: #9295a5; }
.dash-kpi .num.cyan { color: #35e0d8; }
.dash-kpi .num.lime { color: #b6ff3d; }
.dash-kpi .num.violet { color: #8b5cff; }
.dash-vsep { width: 1px; height: 22px; background: #363845; }

/* hero: three list cards */
.dash-hero { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.dash-list { border-radius: 16px; padding: 20px 20px 12px; background: #1c1d25; border: 1px solid #2a2b36; }
.dash-list-head { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.dash-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dash-list-title { font-size: 14.5px; font-weight: 600; }
.dash-list-meta { margin-left: auto; font-size: 11px; color: #7d8092; }
.dash-rows { display: flex; flex-direction: column; }
.dash-row { display: flex; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid #282932; }
.dash-row:last-child { border-bottom: none; }
a.dash-row:hover .dash-row-title { color: #fff; }
.dash-thumb { width: 30px; height: 44px; border-radius: 3px; flex: none; background-size: cover; background-position: center; }
.dash-row-body { min-width: 0; }
.dash-row-title { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-row-author { font-size: 11.5px; color: #9295a5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-row-date { margin-left: auto; font-size: 11px; color: #7d8092; white-space: nowrap; }
.dash-reading-pill {
    margin-left: auto; font-size: 10px; color: #35e0d8;
    background: #0f2b2a; border: 1px solid #1c4a47;
    border-radius: 99px; padding: 3px 9px; white-space: nowrap;
}
.dash-stars { margin-left: auto; font-size: 11px; letter-spacing: 1px; white-space: nowrap; }
.dash-stars .on { color: #b6ff3d; }
.dash-stars .off { color: #3d3e4a; }
.dash-empty { font-size: 12px; color: #7d8092; padding: 12px 0; }

/* secondary: charts */
.dash-charts { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; }
.dash-chart-card { border-radius: 16px; padding: 18px 22px; background: #191a21; border: 1px solid #262731; }
.dash-chart-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.dash-chart-title { font-size: 13.5px; font-weight: 600; color: #cbccd8; }
.dash-chart-meta { font-size: 11px; color: #7d8092; }
.dash-bars { display: flex; align-items: flex-end; gap: 11px; height: 110px; }
.dash-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.dash-bar { width: 100%; border-radius: 5px; min-height: 2px; }
.dash-bar-lbl { font-size: 10px; color: #7d8092; }
.dash-donut-wrap { display: flex; align-items: center; gap: 18px; }
.dash-donut { width: 92px; height: 92px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; }
.dash-donut-inner { width: 62px; height: 62px; border-radius: 50%; background: #191a21; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.dash-donut-pct { font-size: 19px; font-weight: 700; color: #35e0d8; }
.dash-legend { font-size: 12.5px; line-height: 1.9; }

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

/* ============================================================
   Full-page views (3a–3e) — shared vibrant-dark building blocks
   ============================================================ */

/* breadcrumb bar (Book detail, Author) */
.crumbs { font-size: 13px; color: var(--muted); padding: 20px 0 6px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: #cfcfda; text-decoration: none; }
.crumbs .sep { color: var(--empty-star); margin: 0 8px; }
.crumbs .current { color: var(--title); }

/* page header row (title + right-aligned meta/controls) */
.view-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin: 6px 0 18px; }
.view-title { font-size: 22px; font-weight: 700; margin: 0; }
.view-sub { font-size: 12.5px; color: var(--muted); margin: 4px 0 0; }

/* shared cover card / grid */
.cover-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px 16px; }
.book-card { display: flex; flex-direction: column; gap: 8px; color: inherit; }
.book-card:hover { text-decoration: none; }
.book-cover {
    aspect-ratio: 2 / 3; border-radius: 6px; position: relative;
    box-shadow: 0 8px 18px -8px rgba(0,0,0,.6);
    display: flex; align-items: flex-end; overflow: hidden;
}
.book-card:hover .book-cover { box-shadow: 0 10px 22px -8px rgba(0,0,0,.75); }
.book-cover-title { padding: 10px; font-size: 11.5px; font-weight: 500; line-height: 1.25; }
.book-caption { display: flex; align-items: center; gap: 6px; }
.book-caption-text { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.book-caption-mark { margin-left: auto; font-size: 11px; flex: none; }
.book-caption-mark.reading { color: var(--cyan); }
.book-caption-mark.read { color: var(--lime); }
.book-caption-mark.dnf { color: var(--pink); }

/* dashed "add" tile (Lists grid) */
.add-tile {
    aspect-ratio: 2 / 3; border-radius: 6px;
    border: 1px dashed #33343f; color: var(--faint);
    display: flex; align-items: center; justify-content: center;
    font-size: 12.5px; cursor: pointer; background: transparent;
    font-family: inherit;
}
.add-tile:hover { color: var(--pink); border-color: #3a3a48; text-decoration: none; }

/* two-pane body: left rail + main (Browse, Lists) */
.two-pane { display: grid; gap: 26px; align-items: start; }
.two-pane.browse { grid-template-columns: 212px 1fr; }
.two-pane.lists { grid-template-columns: 230px 1fr; }
.two-pane.add { grid-template-columns: minmax(0, 1fr) 340px; margin-top: 18px; }
.rail { border-right: 1px solid #24252e; padding-right: 22px; }

/* ---- Add-book page (D5) ---- */
.add-search-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.add-form label {
    display: block; font-size: 11px; color: var(--faint); text-transform: uppercase;
    letter-spacing: .04em; margin-bottom: 14px;
}
.add-form label > input, .add-form label > select, .add-form label > textarea { margin-top: 6px; }
.add-form textarea { font-family: inherit; resize: vertical; }

.candidate-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px;
    margin: 18px 0;
}
.candidate-card {
    display: flex; flex-direction: column; gap: 8px; text-align: left;
    background: var(--card); border: 1px solid var(--b1); border-radius: 10px;
    padding: 10px; cursor: pointer; font-family: inherit; color: inherit;
}
.candidate-card:hover { border-color: #2f2f3a; }
.candidate-card.selected { border-color: var(--pink); box-shadow: 0 0 0 1px var(--pink); }
.candidate-thumb {
    aspect-ratio: 2 / 3; border-radius: 6px; background: var(--pill); overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.candidate-thumb img { width: 100%; height: 100%; object-fit: cover; }
.candidate-title { font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.candidate-authors { font-size: 11px; color: var(--muted); margin-top: 2px; }
.candidate-pages, .candidate-provider { font-size: 10.5px; color: var(--faint); margin-top: 2px; }

.decision-author { padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--b1); }
.decision-author:last-of-type { border-bottom: none; margin-bottom: 0; }
.decision-author-name { font-size: 13px; font-weight: 600; color: var(--title); }

/* filter rail (Browse) */
.facet-group { padding: 16px 0; border-bottom: 1px solid #24252e; }
.facet-group:first-child { padding-top: 4px; }
.facet-group:last-child { border-bottom: none; }
.facet-label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; }
.facet {
    display: flex; align-items: center; gap: 9px; width: 100%;
    padding: 5px 0; background: none; border: none; cursor: pointer;
    font-family: inherit; font-size: 12.5px; color: var(--title); text-align: left;
}
.facet .box {
    width: 15px; height: 15px; border-radius: 4px; flex: none;
    border: 1px solid #33343f; background: #24252e;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; color: #0a0a0d;
}
.facet.on .box { border-color: transparent; }
.facet .count { margin-left: auto; color: var(--faint); font-variant-numeric: tabular-nums; }
.facet:hover .name { color: #fff; }

/* facet accent fills (checked state) */
.facet.on.pink .box { background: var(--pink); }
.facet.on.cyan .box { background: var(--cyan); }
.facet.on.violet .box { background: var(--violet); }
.facet.on.lime .box { background: var(--lime); }

/* topic chips (Browse rail + Topics view) */
.chip-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.topic-chip {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 6px 12px; border-radius: 99px; cursor: pointer;
    background: var(--card); border: 1px solid var(--b1);
    color: var(--title); font-size: 12.5px; font-family: inherit;
}
.topic-chip:hover { border-color: #2f2f3a; text-decoration: none; color: #fff; }
.topic-chip .c { color: var(--faint); font-weight: 700; font-variant-numeric: tabular-nums; }
.topic-chip.active { background: linear-gradient(90deg, var(--pink), var(--violet)); border-color: transparent; color: #fff; }
.topic-chip.active .c { color: rgba(255,255,255,.85); }
.topic-chip.muted-chip { color: var(--muted); }

/* sort / pill control */
.sort-pill {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--card); border: 1px solid var(--b1); border-radius: 99px;
    padding: 7px 14px; color: var(--title); font-size: 12.5px;
    font-family: inherit; cursor: pointer;
}
.sort-pill select {
    background: none; border: none; color: inherit; font-family: inherit;
    font-size: 12.5px; cursor: pointer; outline: none;
}
.sort-pill select option { background: #1c1d25; }

/* search input in top nav (Browse) */
.nav-search {
    width: 300px; max-width: 40vw; margin-left: auto;
    background: var(--card); border: 1px solid var(--b1); border-radius: 9px;
    padding: 8px 12px; color: var(--text); font-family: inherit; font-size: 13px;
}
.nav-search::placeholder { color: var(--faint); }

/* results header (Browse) */
.results-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.results-count { font-size: 13px; color: var(--muted); }
.results-count b { color: var(--text); font-weight: 700; }

/* ---- Book detail (3b) ---- */
.detail-cols { display: grid; grid-template-columns: 210px 1fr; gap: 36px; align-items: start; }
.detail-cover {
    aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden;
    box-shadow: 0 20px 44px -18px rgba(0,0,0,.75);
    display: flex; align-items: flex-end; margin-bottom: 18px;
}
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-cover .book-cover-title { font-size: 13px; }

/* cover upload (D3) */
.cover-upload-input {
    display: block; width: 100%; font-size: 11px; color: var(--muted);
    margin-bottom: 14px;
}

/* reading-status segmented control */
.seg { display: flex; border-radius: 9px; overflow: hidden; border: 1px solid var(--b1); margin-bottom: 16px; }
.seg button {
    flex: 1; padding: 8px 0; background: var(--pill); color: #9c9fae;
    border: none; border-right: 1px solid var(--b1); cursor: pointer;
    font-family: inherit; font-size: 12px;
}
.seg button:last-child { border-right: none; }
.seg button.active { background: #0f2b2a; color: var(--cyan); }

/* variant for compact count-labelled filters (e.g. author read/unread) */
.seg.seg-filter { display: inline-flex; }
.seg.seg-filter button { flex: none; padding: 8px 14px; white-space: nowrap; }

/* editable star rating */
.stars-label { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
.stars-edit { font-size: 19px; letter-spacing: 3px; margin-bottom: 18px; user-select: none; }
.stars-edit .star { cursor: pointer; color: var(--empty-star); }
.stars-edit .star.on { color: var(--lime); }

.detail-actions { display: flex; flex-direction: column; gap: 9px; }

.author-line { font-size: 15px; color: #c9a3ff; margin: 4px 0 14px; }
.author-line a { color: inherit; }

/* metadata grid (Book detail) */
.meta-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 20px;
    border-top: 1px solid var(--b1); border-bottom: 1px solid var(--b1);
    padding: 18px 0; margin: 18px 0;
}
.meta-grid .k { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.meta-grid .v { font-size: 13.5px; color: var(--text); }

.section-label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin: 22px 0 10px; }
.section-label .note { text-transform: none; letter-spacing: 0; color: var(--empty-star); font-size: 11px; margin-left: 6px; }
.description { font-size: 13.5px; line-height: 1.65; color: #b8b8c4; }

/* ---- Lists / shelves (3c) ---- */
.shelf-rail-label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; }
.shelf-row {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 9px 11px; border-radius: 9px; margin-bottom: 4px;
    background: transparent; border: 1px solid transparent; cursor: pointer;
    font-family: inherit; font-size: 13px; color: var(--title); text-align: left;
}
.shelf-row:hover { background: #101015; text-decoration: none; }
.shelf-row.active { background: var(--card); border-color: var(--b1); }
.shelf-row .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.shelf-row .count { margin-left: auto; color: var(--faint); font-variant-numeric: tabular-nums; }
.shelf-new {
    display: flex; align-items: center; gap: 8px; width: 100%;
    padding: 9px 11px; margin-top: 8px; border-radius: 9px;
    border: 1px dashed #33343f; background: transparent; color: var(--faint);
    cursor: pointer; font-family: inherit; font-size: 12.5px;
}
.shelf-new:hover { color: var(--pink); border-color: #3a3a48; }
.shelf-head { display: flex; align-items: center; gap: 11px; margin-bottom: 4px; }
.shelf-head .dot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.shelf-head h1 { font-size: 22px; margin: 0; }
.shelf-head .count { color: var(--faint); font-size: 14px; }

/* ---- Author view (3d) ---- */
.author-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 1px solid var(--b1); margin-bottom: 22px; }
.author-name { font-size: 32px; font-weight: 700; margin: 0; }
.author-since { font-size: 12.5px; color: var(--faint); margin: 6px 0 0; }
.author-stats { display: flex; gap: 30px; }
.author-stat { text-align: right; }
.author-stat .n { font-size: 26px; font-weight: 700; line-height: 1; }
.author-stat .n.cyan { color: var(--cyan); }
.author-stat .n.lime { color: var(--lime); }
.author-stat .l { font-size: 11.5px; color: var(--faint); margin-top: 5px; }

@media (max-width: 820px) {
    .two-pane.browse, .two-pane.lists { grid-template-columns: 1fr; }
    .rail { border-right: none; border-bottom: 1px solid #24252e; padding-right: 0; padding-bottom: 16px; }
    .cover-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .detail-cols { grid-template-columns: 1fr; }
}

/* ---- Auth pages (login / change password / no access) ----
   Static Razor Pages (Identity host) rendered on the same graphite tokens;
   the shared shell is Pages/Shared/_AuthLayout.cshtml. */
.auth-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { width: 100%; max-width: 380px; padding: 30px 32px 28px; }
.auth-card .wordmark { font-size: 22px; }
.auth-title { font-size: 20px; margin: 18px 0 4px; }
.auth-sub { color: var(--muted); font-size: 13px; margin: 0 0 20px; }
.auth-card form label { display: block; font-size: 12.5px; color: var(--muted); margin: 0 0 14px; }
.auth-card form label .nav-search { display: block; width: 100%; margin-top: 5px; }
.auth-error { color: #ff7a9a; font-size: 12.5px; margin: 2px 0 0; }
.auth-actions { margin-top: 20px; }
.auth-actions .btn { display: block; width: 100%; text-align: center; }

/* Sign-out: a form-post button styled as a quiet nav link (POST so logout isn't a CSRF-able GET). */
.signout-form { display: inline; margin-left: auto; }
.signout-btn { background: none; border: none; padding: 0; cursor: pointer; font: inherit; font-size: 13px; color: var(--muted); }
.signout-btn:hover { color: #cfcfda; }
