rl-wiki / styles.css
thomwolf's picture
thomwolf HF Staff
Search inside article bodies from the top-left box; ⌘K focuses it (#2)
adc659d
Raw
History Blame Contribute Delete
41.1 kB
/* ============================================================
RL-for-LLMs Wiki Reader β€” styles
Editorial palette borrowed from the project dashboard.
============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
--bg: #fafafa;
--bg-soft: #f4f4f4;
--bg-card: #ffffff;
--bg-code: #f6f7f9;
--border: #ddd;
--border-soft: #eee;
--ink: #1a1a1a;
--ink-2: #2a2a2a;
--ink-3: #444;
--muted: #555;
--muted-2: #777;
--muted-3: #888;
--muted-4: #999;
--muted-5: #aaa;
--accent: #0f3787; /* deep editorial blue */
--accent-deep: #0a275f;
--accent-soft: #dde6f5;
--accent-hover-row: #c8d6ee;
--hl-bg: #0f3787; /* search-hit rectangle */
--hl-ink: #ffffff;
--good: #1c7c3f;
--warn: #9a6b00;
--danger: #a12d2d;
--shadow: 0 1px 2px rgba(0,0,0,0.04), 0 2px 8px rgba(0,0,0,0.03);
--mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
--sans: "Inter", "Helvetica Neue", system-ui, sans-serif;
--sidebar-w: 280px;
--aside-w: 248px;
}
[data-theme="dark"] {
--bg: #15171a;
--bg-soft: #1b1e22;
--bg-card: #1e2228;
--bg-code: #14181d;
--border: #2e343c;
--border-soft: #262b31;
--ink: #e9ecf0;
--ink-2: #dfe3e8;
--ink-3: #c4cad2;
--muted: #aab2bd;
--muted-2: #8b94a0;
--muted-3: #79828e;
--muted-4: #69707b;
--muted-5: #585f69;
--accent: #8fb2f0;
--accent-deep: #b6cdf7;
--accent-soft: #20304d;
--accent-hover-row: #28395a;
--hl-bg: #4f7fe0;
--hl-ink: #ffffff;
--good: #6fcf8f;
--warn: #e0b15a;
--danger: #e08585;
--shadow: 0 1px 2px rgba(0,0,0,0.35), 0 2px 10px rgba(0,0,0,0.25);
}
html { scroll-behavior: smooth; }
body {
font-family: var(--sans);
font-size: 14px;
font-weight: 300;
line-height: 1.65;
color: var(--ink);
background: var(--bg);
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-deep); }
/* ── Top bar ───────────────────────────────────────────── */
.topbar {
position: sticky; top: 0; z-index: 50;
display: flex; align-items: center; gap: 18px;
padding: 12px 22px;
background: color-mix(in srgb, var(--bg) 88%, transparent);
backdrop-filter: blur(8px);
border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: baseline; gap: 10px; cursor: pointer; min-width: 0; }
.brand .logo {
font-family: var(--mono); font-weight: 600; font-size: 16px;
letter-spacing: 0.5px; color: var(--ink); white-space: nowrap;
}
.brand .logo .dot { color: var(--accent); }
.brand .tag {
font-size: 11.5px; color: var(--muted-2); font-weight: 300;
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.counts {
font-family: var(--mono); font-size: 11px; font-weight: 500;
color: var(--muted-2); letter-spacing: 0.3px; font-variant-numeric: tabular-nums;
white-space: nowrap;
}
.counts .n { color: var(--accent); font-weight: 600; }
.counts .sep { color: var(--muted-4); margin: 0 8px; }
.topbar .spacer { flex: 1 1 auto; }
.toolbar { display: flex; align-items: center; gap: 7px; }
.btn {
font-family: var(--mono); font-size: 10.5px; font-weight: 400; letter-spacing: 0.4px;
padding: 5px 10px; border: 1px solid var(--border); border-radius: 4px;
background: var(--bg-card); color: var(--muted); cursor: pointer;
transition: all .15s; white-space: nowrap; text-decoration: none;
display: inline-flex; align-items: center; gap: 5px;
}
.btn:hover { border-color: var(--muted-3); color: var(--ink); }
.icon-btn { padding: 5px 8px; font-size: 13px; line-height: 1; }
/* internal nav (sources) β€” tinted to read as primary, not an external link */
.btn-sources { background: var(--accent-soft); color: var(--accent-deep); border-color: transparent; font-weight: 500; }
.btn-sources:hover { background: var(--accent-hover-row); color: var(--accent-deep); border-color: transparent; }
.btn-sources.active { background: var(--accent); color: #fff; }
[data-theme="dark"] .btn-sources.active { color: #0b1220; }
/* ── Mobile sidebar toggle ─────────────────────────────── */
.menu-toggle { display: none; }
/* ── Layout ────────────────────────────────────────────── */
.layout {
display: grid;
grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
align-items: start;
}
@media (min-width: 1180px) {
.layout.has-aside {
grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--aside-w);
}
}
/* ── Sidebar (navigation) ──────────────────────────────── */
.sidebar {
position: sticky; top: 53px; align-self: start;
height: calc(100vh - 53px);
overflow-y: auto;
border-right: 1px solid var(--border);
padding: 16px 14px 40px;
background: var(--bg);
}
/* sidebar section header β€” "Topics" (the first-class citizen) */
.side-head {
font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 1px;
text-transform: uppercase; color: var(--ink-2); margin: 2px 2px 12px;
}
.search-wrap { position: relative; margin-bottom: 16px; }
.search {
width: 100%; font-family: var(--sans); font-size: 13px;
padding: 8px 44px 8px 28px; border: 1px solid var(--border); border-radius: 6px;
background: var(--bg-card); color: var(--ink);
}
.search:focus { outline: none; border-color: var(--accent); }
.search-wrap::before {
content: "βŒ•"; position: absolute; left: 9px; top: 50%; transform: translateY(-50%);
color: var(--muted-3); font-size: 15px;
}
/* the ⌘K badge on the search box: click (or ⌘K) β†’ focus the search input */
.search-k {
position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
font-family: var(--mono); font-size: 10px; padding: 2px 6px; border-radius: 4px;
border: 1px solid var(--border); background: var(--bg-soft); color: var(--muted-3);
cursor: pointer; transition: all .12s;
}
.search-k:hover { border-color: var(--accent); color: var(--accent-deep); }
/* once a query is entered, the badge becomes a βœ• clear button */
.search-k.is-clear { font-family: var(--sans); font-size: 12px; line-height: 1; padding: 3px 6.5px; }
.search-k.is-clear:hover { background: var(--accent-soft); }
.nav-group { margin-bottom: 14px; }
.nav-group-title {
font-family: var(--mono); font-size: 9.5px; font-weight: 600;
text-transform: uppercase; letter-spacing: 1.4px; color: var(--muted-3);
padding: 4px 8px; margin-bottom: 2px;
display: flex; justify-content: space-between; align-items: center;
}
.nav-group-title .c { color: var(--muted-4); font-weight: 500; }
.nav-item {
display: block; padding: 5px 9px; border-radius: 5px;
font-size: 12.5px; color: var(--ink-3); cursor: pointer;
line-height: 1.35; transition: background .12s, color .12s;
border-left: 2px solid transparent;
}
.nav-item:hover { background: var(--bg-soft); color: var(--ink); }
.nav-item.active {
background: var(--accent-soft); color: var(--accent-deep);
border-left-color: var(--accent); font-weight: 500;
}
.nav-item .ni-sub {
display: block; font-family: var(--mono); font-size: 9.5px;
color: var(--muted-4); margin-top: 1px; letter-spacing: 0.2px;
}
/* content-search: a matched-body excerpt under the topic name, query bolded */
.nav-item .nav-item-title { display: block; }
.nav-item .nav-item-title b { color: var(--accent-deep); font-weight: 600; }
.nav-item .nav-snippets { display: block; margin-top: 2px; }
.nav-item .nav-snippet {
display: block; margin-top: 2px; padding: 2px 6px; font-size: 11px; line-height: 1.4;
color: var(--muted-3); font-weight: 400; cursor: pointer;
border-left: 2px solid var(--border); border-radius: 0 4px 4px 0;
transition: background .12s, border-color .12s, color .12s;
}
.nav-item .nav-snippet:hover { background: var(--accent-soft); border-left-color: var(--accent); color: var(--ink); }
.nav-item .nav-snippet b { color: var(--accent-deep); font-weight: 600; }
.nav-item .nav-snippet.more { font-style: italic; cursor: default; border-left-color: transparent; color: var(--muted-4); }
.nav-item .nav-snippet.more:hover { background: none; }
.nav-hit-count {
display: inline-block; margin-left: 5px; padding: 0 5px; font-family: var(--mono);
font-size: 9px; line-height: 15px; vertical-align: 1px; border-radius: 8px;
background: var(--accent-soft); color: var(--accent-deep); font-weight: 600;
}
.nav-empty { color: var(--muted-4); font-size: 11.5px; padding: 8px; font-style: italic; }
.mini-spin { display: inline-block; width: 10px; height: 10px; vertical-align: -1px; margin-right: 4px;
border: 1.5px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
/* ── Main content ──────────────────────────────────────── */
.main { min-width: 0; padding: 26px 38px 80px; }
@media (max-width: 760px) { .main { padding: 20px 18px 60px; } }
.crumbs {
font-family: var(--mono); font-size: 10.5px; color: var(--muted-3);
letter-spacing: 0.3px; margin-bottom: 14px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
}
.crumbs a { color: var(--muted-2); }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { color: var(--muted-5); }
/* doc header */
.doc-head { margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.doc-kicker {
font-family: var(--mono); font-size: 10.5px; letter-spacing: 1.5px;
text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 8px;
}
.doc-title {
font-family: var(--mono); font-weight: 600; font-size: 26px; line-height: 1.2;
color: var(--ink); letter-spacing: -0.2px;
}
.doc-meta-row { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-top: 12px; }
.doc-authors { font-size: 12.5px; color: var(--muted); }
.doc-sub { font-size: 12px; color: var(--muted-2); font-family: var(--mono); }
/* badges */
.badge {
display: inline-flex; align-items: center; gap: 5px;
font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: 0.4px;
padding: 2.5px 8px; border-radius: 20px; border: 1px solid var(--border);
background: var(--bg-card); color: var(--muted); text-transform: uppercase;
white-space: nowrap;
}
.badge .b-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted-4); }
.badge.mat-comprehensive { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, var(--border)); }
.badge.mat-comprehensive .b-dot { background: var(--good); }
.badge.mat-developing { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, var(--border)); }
.badge.mat-developing .b-dot { background: var(--warn); }
.badge.mat-stub { color: var(--muted-2); }
.badge.mat-stub .b-dot { background: var(--muted-4); }
.badge.type { background: var(--accent-soft); color: var(--accent-deep); border-color: transparent; }
/* ── Prose (rendered markdown) ─────────────────────────── */
.prose { font-size: 14.5px; line-height: 1.75; color: var(--ink-2); max-width: 860px; }
.prose > *:first-child { margin-top: 0; }
.prose h1 { display: none; } /* title handled by doc-head */
.prose h2 {
font-family: var(--mono); font-size: 19px; font-weight: 600; color: var(--ink);
margin: 34px 0 12px; padding-top: 6px; letter-spacing: -0.1px;
scroll-margin-top: 70px;
}
.prose h3 {
font-family: var(--mono); font-size: 15.5px; font-weight: 600; color: var(--ink-2);
margin: 26px 0 10px; scroll-margin-top: 70px;
}
.prose h4 { font-size: 14px; font-weight: 600; color: var(--ink-2); margin: 20px 0 8px; scroll-margin-top: 70px; }
.prose h2 .anchor, .prose h3 .anchor, .prose h4 .anchor {
opacity: 0; margin-left: 8px; font-size: 0.6em; vertical-align: middle;
transition: opacity .12s; text-decoration: none; border-bottom: none; cursor: pointer;
}
.prose h2:hover .anchor, .prose h3:hover .anchor, .prose h4:hover .anchor { opacity: 0.55; }
.prose .anchor:hover { opacity: 1 !important; }
/* page-level "copy link" button in the doc header */
.share-btn {
margin-left: 12px; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.4px;
padding: 2px 8px; border: 1px solid var(--border); border-radius: 4px; background: var(--bg-card);
color: var(--muted-2); cursor: pointer; transition: all .12s; text-transform: none; vertical-align: middle;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent-deep); }
/* toast */
#toast {
position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(10px);
background: var(--ink); color: var(--bg-card); font-family: var(--mono); font-size: 11.5px;
padding: 8px 16px; border-radius: 6px; box-shadow: var(--shadow); z-index: 300;
opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s;
}
[data-theme="dark"] #toast { background: var(--accent); color: #0b1220; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
/* source hovercard */
#hovercard {
position: fixed; z-index: 250; max-width: 340px; pointer-events: none;
background: var(--bg-card); border: 1px solid var(--border); border-radius: 9px;
box-shadow: 0 8px 28px rgba(0,0,0,0.18); padding: 10px 13px;
opacity: 0; transition: opacity .12s; font-family: var(--sans);
}
#hovercard.show { opacity: 1; }
#hovercard .hc-title { font-size: 13px; font-weight: 500; color: var(--ink); line-height: 1.35; margin-bottom: 4px; }
#hovercard .hc-authors { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
#hovercard .hc-line { font-size: 11px; color: var(--muted-2); margin-top: 3px; }
#hovercard .hc-id { font-family: var(--mono); font-size: 9.5px; color: var(--muted-4); margin-top: 5px; letter-spacing: 0.2px; }
.prose p { margin: 12px 0; }
.prose ul, .prose ol { margin: 12px 0 12px 24px; }
.prose li { margin: 5px 0; }
.prose li::marker { color: var(--muted-3); }
.prose strong { font-weight: 600; color: var(--ink); }
.prose em { font-style: italic; }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 28px 0; }
.prose a { border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.prose a:hover { border-bottom-color: var(--accent); }
/* inline code & blocks */
.prose code {
font-family: var(--mono); font-size: 0.86em;
background: var(--bg-code); border: 1px solid var(--border-soft);
padding: 1px 5px; border-radius: 4px; color: var(--ink);
}
.prose pre {
background: var(--bg-code); border: 1px solid var(--border);
border-radius: 8px; padding: 14px 16px; overflow-x: auto; margin: 16px 0;
font-size: 12.8px; line-height: 1.55;
}
.prose pre code { background: none; border: none; padding: 0; font-size: inherit; color: var(--ink-2); }
/* cross-reference: a `category/node` code span linked to its topic page */
.prose a.xref { border-bottom: none; text-decoration: none; }
.prose a.xref code {
background: var(--accent-soft); border-color: transparent; color: var(--accent-deep);
cursor: pointer; transition: background .12s, color .12s;
}
.prose a.xref:hover code { background: var(--accent); color: #fff; }
[data-theme="dark"] .prose a.xref:hover code { color: #0b1220; }
/* active-search term highlighting inside the article (cleared with the search) β€”
bold, slightly larger blue text (no pill, so it doesn't read like a link chip) */
mark.search-hl {
background: var(--hl-bg); color: var(--hl-ink);
font-weight: 600; border-radius: 3px;
padding: 0.5px 3.5px; margin: 0 0.5px;
box-shadow: 0 0 0 1px var(--hl-bg);
-webkit-box-decoration-break: clone; box-decoration-break: clone;
}
/* blockquote */
.prose blockquote {
margin: 16px 0; padding: 8px 16px; border-left: 3px solid var(--accent);
background: var(--bg-soft); color: var(--muted); border-radius: 0 6px 6px 0;
}
.prose blockquote p { margin: 6px 0; }
/* tables */
.prose table {
border-collapse: collapse; margin: 18px 0; font-size: 13px; width: 100%;
display: block; overflow-x: auto; box-shadow: var(--shadow); border-radius: 8px;
}
.prose thead { background: var(--bg-soft); }
.prose th {
text-align: left; font-family: var(--mono); font-weight: 600; font-size: 11px;
letter-spacing: 0.4px; text-transform: uppercase; color: var(--muted);
padding: 9px 13px; border-bottom: 2px solid var(--border); white-space: nowrap;
}
.prose td { padding: 8px 13px; border-bottom: 1px solid var(--border-soft); color: var(--ink-3); vertical-align: top; }
.prose tbody tr:last-child td { border-bottom: none; }
.prose tbody tr:hover { background: var(--bg-soft); }
.prose td code { white-space: nowrap; }
/* KaTeX */
.prose .katex { font-size: 1.04em; }
.prose .katex-display {
margin: 18px 0; padding: 6px 4px; overflow-x: auto; overflow-y: hidden;
}
.prose .katex-display > .katex { white-space: nowrap; }
.katex-error { color: var(--danger) !important; font-family: var(--mono); font-size: 0.9em; }
/* ── Citation chips (the signature feature) ────────────── */
.cite {
display: inline-block; font-family: var(--mono); font-size: 0.74em;
font-weight: 500; letter-spacing: 0.2px; line-height: 1.3;
padding: 0.5px 5px; margin: 0 1px; border-radius: 4px; vertical-align: 0.12em;
background: var(--accent-soft); color: var(--accent-deep);
border: 1px solid transparent; white-space: nowrap; cursor: pointer;
transition: background .12s, border-color .12s; border-bottom: none;
}
.cite:hover { background: var(--accent-hover-row); color: var(--accent-deep); border-color: var(--accent); }
.cite.unresolved { background: var(--bg-soft); color: var(--muted-2); }
.cite.unresolved:hover { border-color: var(--muted-4); color: var(--ink-3); }
.cite .cite-mark { opacity: 0.65; margin-right: 2px; }
/* ── Right aside (metadata + TOC) ──────────────────────── */
.aside {
position: sticky; top: 53px; align-self: start;
height: calc(100vh - 53px); overflow-y: auto;
padding: 26px 20px 60px 4px; display: none;
}
@media (min-width: 1180px) { .layout.has-aside .aside { display: block; } }
.panel {
background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
padding: 14px 15px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.panel-title {
font-family: var(--mono); font-size: 9.5px; font-weight: 600; text-transform: uppercase;
letter-spacing: 1.3px; color: var(--muted-3); margin-bottom: 10px;
}
.meta-row { display: flex; gap: 8px; font-size: 12px; margin: 6px 0; line-height: 1.5; }
.meta-row .k {
flex: 0 0 78px; color: var(--muted-3); font-family: var(--mono); font-size: 10.5px;
text-transform: uppercase; letter-spacing: 0.3px; padding-top: 1px;
}
.meta-row .v { flex: 1; color: var(--ink-3); min-width: 0; word-break: break-word; }
.meta-row .v a { word-break: break-all; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.chip {
display: inline-flex; align-items: center; font-family: var(--mono); font-size: 10.5px;
padding: 2px 7px; border-radius: 5px; background: var(--bg-soft);
border: 1px solid var(--border-soft); color: var(--muted); cursor: pointer; transition: all .12s;
}
.chip:hover { border-color: var(--accent); color: var(--accent-deep); background: var(--accent-soft); }
.chip.ext::after { content: "β†—"; margin-left: 4px; opacity: 0.5; font-size: 0.9em; }
.chip.res { background: var(--accent-soft); color: var(--accent-deep); border-color: transparent; }
.toc { line-height: 1.4; }
.toc a {
display: block; font-size: 12px; color: var(--muted-2); padding: 3px 0 3px 10px;
border-left: 2px solid var(--border-soft); transition: all .12s;
}
.toc a:hover { color: var(--ink); border-left-color: var(--muted-3); }
.toc a.h3 { padding-left: 22px; font-size: 11.5px; }
.toc a.active { color: var(--accent-deep); border-left-color: var(--accent); font-weight: 500; }
.oq-list { list-style: none; margin: 0 !important; }
.oq-list li {
font-size: 12px; color: var(--ink-3); padding: 8px 0; border-bottom: 1px solid var(--border-soft);
line-height: 1.5;
}
.oq-list li:last-child { border-bottom: none; }
.oq-list li::before { content: "?"; color: var(--accent); font-family: var(--mono); font-weight: 600; margin-right: 7px; }
/* ── Home view ─────────────────────────────────────────── */
.home { padding: 40px 38px 80px; max-width: 780px; margin: 0 auto; }
@media (max-width: 760px) { .home { padding: 28px 18px 60px; } }
/* ── Hero + foreword (the "book intro") ────────────────── */
.hero { margin-bottom: 22px; }
.hero h1 {
font-family: var(--mono); font-weight: 600; font-size: 38px; line-height: 1.1;
letter-spacing: -0.5px; color: var(--ink); margin-bottom: 14px;
}
.hero h1 .dot { color: var(--accent); }
.hero-tag { font-size: 17px; line-height: 1.5; color: var(--muted); font-weight: 300; max-width: 640px; }
.foreword { margin: 26px 0 24px; }
.foreword p {
font-size: 15.5px; line-height: 1.72; color: var(--ink-2); font-weight: 300;
margin: 0 0 14px;
}
.foreword p:last-child { margin-bottom: 0; }
.foreword em { font-style: italic; color: var(--ink); }
.foreword strong { font-weight: 600; color: var(--ink); }
.foreword abbr, .prose abbr { text-decoration: none; border-bottom: 1px dotted var(--muted-4); cursor: help; font-weight: 500; color: var(--ink); }
/* acronym hovers inside article prose β€” subtle (there can be many); inherit color, faint underline */
.prose abbr.ac { font-weight: inherit; color: inherit; border-bottom: 1px dotted var(--muted-5); }
/* in-article Β§N section references */
.prose a.secref {
color: var(--accent); border-bottom: 1px dotted color-mix(in srgb, var(--accent) 45%, transparent);
font-variant-numeric: tabular-nums; white-space: nowrap;
}
.prose a.secref:hover { border-bottom-style: solid; }
/* slim stats line β€” present but subordinate to the narrative */
.home-stats {
display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0;
font-family: var(--mono); font-size: 12px; color: var(--muted-2);
padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
margin-bottom: 8px; font-variant-numeric: tabular-nums;
}
.home-stats a, .home-stats span { color: var(--muted); text-decoration: none; }
.home-stats a:hover { color: var(--accent); }
.home-stats b { color: var(--accent); font-weight: 600; }
.home-stats .sep { color: var(--muted-4); margin: 0 12px; }
.section-head {
font-family: var(--mono); font-size: 12px; font-weight: 600; text-transform: uppercase;
letter-spacing: 1.5px; color: var(--ink-3); margin: 34px 0 6px;
display: flex; align-items: center; gap: 10px;
}
.section-head::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.section-lead { font-size: 13px; color: var(--muted-2); margin: 0 0 14px; line-height: 1.5; }
/* Start-here featured cards */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.feature-card {
background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
padding: 15px 16px; cursor: pointer; transition: all .15s; box-shadow: var(--shadow);
display: flex; flex-direction: column; gap: 6px;
}
.feature-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.feature-card .fc-cat { font-family: var(--mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--accent); }
.feature-card .fc-title { font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.feature-card .fc-scope { font-size: 12px; color: var(--muted-2); line-height: 1.45; }
.built-open {
margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--border);
font-size: 12.5px; color: var(--muted-2); line-height: 1.6;
}
.built-open a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--border); }
.built-open a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.cat-block { margin-bottom: 22px; }
.cat-name {
font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
color: var(--muted-2); margin-bottom: 8px;
}
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.card {
background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
padding: 15px 16px; cursor: pointer; transition: all .15s; box-shadow: var(--shadow);
display: flex; flex-direction: column; gap: 8px; min-height: 84px;
}
.card:hover { border-color: var(--accent); transform: translateY(-1px); }
.card .c-title { font-family: var(--mono); font-size: 13.5px; font-weight: 500; color: var(--ink); line-height: 1.35; }
.card .c-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.card .c-id { font-family: var(--mono); font-size: 10px; color: var(--muted-4); letter-spacing: 0.2px; }
/* source rows on home */
.src-row {
display: flex; align-items: baseline; gap: 12px; padding: 10px 12px;
border-bottom: 1px solid var(--border-soft); cursor: pointer; transition: background .12s; border-radius: 6px;
}
.src-row:hover { background: var(--bg-soft); }
.src-row .sr-id { font-family: var(--mono); font-size: 11px; color: var(--accent); flex: 0 0 150px; }
.src-row .sr-title { font-size: 13.5px; color: var(--ink-2); flex: 1; min-width: 0; }
.src-row .sr-year { font-family: var(--mono); font-size: 11px; color: var(--muted-4); white-space: nowrap; }
/* ── Sources browser (#/sources, main area) ────────────── */
.src-browser { max-width: 920px; }
.src-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 6px; }
.src-search-wrap { position: relative; flex: 1 1 280px; }
.src-search-wrap::before { content: "βŒ•"; position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted-3); font-size: 15px; }
.src-search { width: 100%; font-family: var(--sans); font-size: 13.5px; padding: 9px 12px 9px 32px;
border: 1px solid var(--border); border-radius: 7px; background: var(--bg-card); color: var(--ink); }
.src-search:focus { outline: none; border-color: var(--accent); }
.src-browser .sort-switch { margin: 0; flex: 0 0 auto; width: auto; }
.src-browser .ns-chips { margin: 0 0 10px; }
.src-browser .list-meta { padding: 2px 4px 8px; }
/* ── States ───────────────────────────────────────────── */
.loading, .error-box {
padding: 40px; text-align: center; color: var(--muted-2); font-family: var(--mono); font-size: 13px;
}
.error-box { color: var(--danger); }
.spinner {
width: 22px; height: 22px; border: 2px solid var(--border); border-top-color: var(--accent);
border-radius: 50%; animation: spin .7s linear infinite; margin: 0 auto 14px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.skel { background: linear-gradient(90deg, var(--bg-soft) 25%, var(--border-soft) 50%, var(--bg-soft) 75%);
background-size: 200% 100%; animation: sh 1.3s infinite; border-radius: 5px; }
@keyframes sh { to { background-position: -200% 0; } }
/* footer */
.foot { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--border);
font-family: var(--mono); font-size: 11px; color: var(--muted-3); display: flex; gap: 16px; flex-wrap: wrap; }
.foot a { color: var(--muted-2); }
/* ── Responsive sidebar ────────────────────────────────── */
@media (max-width: 900px) {
.layout { grid-template-columns: 1fr; }
.menu-toggle { display: inline-flex; }
.sidebar {
position: fixed; left: 0; top: 0; bottom: 0; width: 290px; z-index: 100;
height: 100vh; transform: translateX(-100%); transition: transform .2s;
box-shadow: var(--shadow); padding-top: 60px;
}
body.nav-open .sidebar { transform: translateX(0); }
.nav-scrim { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 99; }
body.nav-open .nav-scrim { display: block; }
}
@media (min-width: 901px) { .nav-scrim { display: none !important; } }
/* ── Collapsible taxonomy tree (topics sidebar) ────────── */
.nav-cat { margin-bottom: 10px; }
.nav-cat-head {
display: flex; align-items: baseline; gap: 7px; width: 100%; padding: 5px 6px; cursor: pointer;
border-radius: 5px; background: none; border: none; text-align: left;
font-family: var(--sans); font-size: 13.5px; font-weight: 600; letter-spacing: 0;
color: var(--ink); transition: background .12s;
}
.nav-cat-head:hover { background: var(--bg-soft); }
.nav-cat-head .caret { font-size: 9px; color: var(--muted-4); transition: transform .15s; width: 9px; align-self: center; }
.nav-cat-head.collapsed .caret { transform: rotate(-90deg); }
.nav-cat-head .cat-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nav-cat-head .cat-count {
font-family: var(--mono); font-size: 10px; font-weight: 500; color: var(--muted-4); font-variant-numeric: tabular-nums;
}
.nav-cat-head .cat-count .w { color: var(--accent); font-weight: 600; }
/* items sit visually under their (bolder) heading */
.nav-cat-body { padding-left: 16px; margin-top: 1px; border-left: 1px solid var(--border-soft); margin-left: 9px; }
.nav-cat-body.collapsed { display: none; }
.nav-cat-body .nav-item { font-size: 12.5px; }
/* ── Namespace filter chips (sources sidebar) ──────────── */
.ns-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.ns-chip {
font-family: var(--mono); font-size: 10px; padding: 3px 9px; border-radius: 20px;
border: 1px solid var(--border); background: var(--bg-card); color: var(--muted-2); cursor: pointer; transition: all .12s;
}
.ns-chip:hover { border-color: var(--muted-3); color: var(--ink); }
.ns-chip.active { background: var(--ink); color: var(--bg-card); border-color: var(--ink); }
[data-theme="dark"] .ns-chip.active { background: var(--accent); border-color: var(--accent); color: #0b1220; }
.ns-chip .c { opacity: 0.6; }
.list-meta {
font-family: var(--mono); font-size: 10px; color: var(--muted-4); letter-spacing: 0.2px;
padding: 8px 9px 4px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
}
.list-meta .hint { color: var(--muted-5); }
/* ── Home: the Contents tree (rollup words + references) ── */
.tree { border: 1px solid var(--border); border-radius: 10px; background: var(--bg-card); box-shadow: var(--shadow); overflow: hidden; }
.tree-root {
font-family: var(--mono); font-size: 12.5px; color: var(--muted); padding: 12px 16px;
border-bottom: 1px solid var(--border); background: var(--bg-soft); font-variant-numeric: tabular-nums;
}
.tree-root b { color: var(--accent); font-weight: 600; }
.tree-cat { border-bottom: 1px solid var(--border-soft); }
.tree-cat:last-child { border-bottom: none; }
.tree-cat-head {
display: flex; align-items: baseline; gap: 9px; width: 100%; text-align: left; cursor: pointer;
background: none; border: none; padding: 10px 16px; transition: background .12s;
}
.tree-cat-head:hover { background: var(--bg-soft); }
.tree-cat-head .caret { font-size: 9px; color: var(--muted-4); transition: transform .15s; width: 9px; align-self: center; }
.tree-cat-head.collapsed .caret { transform: rotate(-90deg); }
.tree-cat-head .tc-name { font-family: var(--mono); font-size: 13.5px; font-weight: 600; color: var(--ink); }
.tree-cat-head .tc-frac { font-family: var(--mono); font-size: 10.5px; color: var(--muted-4); font-variant-numeric: tabular-nums; }
.tree-cat-head .tc-frac .w { color: var(--accent); }
.t-count {
margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--muted-2);
font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 12px;
}
.t-count b { color: var(--ink-3); font-weight: 600; }
.tree-cat-body { padding: 2px 16px 12px 30px; }
.tree-cat-body.collapsed { display: none; }
.tree-desc { font-size: 12px; color: var(--muted-2); line-height: 1.5; margin: 0 0 8px; max-width: 640px; }
.tree-leaf {
display: flex; align-items: baseline; gap: 8px; padding: 4px 6px; border-radius: 5px;
font-size: 13px; color: var(--ink-2); text-decoration: none; border-bottom: none;
}
a.tree-leaf { cursor: pointer; }
a.tree-leaf:hover { background: var(--bg-soft); color: var(--accent-deep); }
.tree-leaf .tl-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--good); flex: 0 0 auto; align-self: center; }
.tree-leaf .tl-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-leaf.planned { color: var(--muted-4); cursor: default; }
.tree-leaf.planned[title] { cursor: help; }
.tree-leaf .tl-dot.planned { background: none; border: 1px solid var(--muted-5); }
.tree-leaf .tl-tag { margin-left: auto; font-family: var(--mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted-5); }
/* inline legend dots in the section lead */
.section-lead .tl-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--good); vertical-align: middle; margin: 0 2px; }
.section-lead .tl-dot.planned { background: none; border: 1px solid var(--muted-5); }
/* ── Sources sort switch ───────────────────────────────── */
.sort-switch { display: flex; gap: 0; margin-bottom: 8px; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.sort-opt {
flex: 1; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.3px; text-transform: uppercase;
padding: 5px 4px; border: none; background: var(--bg-card); color: var(--muted-2); cursor: pointer;
border-right: 1px solid var(--border); transition: all .12s;
}
.sort-opt:last-child { border-right: none; }
.sort-opt:hover { color: var(--ink); background: var(--bg-soft); }
.sort-opt.active { background: var(--accent-soft); color: var(--accent-deep); font-weight: 600; }
/* ── Cited-by panel (source page) ──────────────────────── */
.cite-loading { font-size: 11.5px; color: var(--muted-3); font-style: italic; padding: 2px 0; }
.citedby-row {
display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
padding: 6px 0; border-bottom: 1px solid var(--border-soft); cursor: pointer;
}
.citedby-row:last-child { border-bottom: none; }
.citedby-row .cb-title { font-size: 12.5px; color: var(--ink-2); line-height: 1.35; border-bottom: none; }
.citedby-row:hover .cb-title { color: var(--accent-deep); }
.citedby-row .cb-cat { font-family: var(--mono); font-size: 9px; color: var(--muted-4); text-transform: uppercase; letter-spacing: 0.3px; white-space: nowrap; }
/* ============================================================
BOOK VIEW (#/book) β€” the whole wiki as one printable document
============================================================ */
.book-cta {
display: flex; align-items: center; gap: 4px; margin: 10px 0 2px; padding: 12px 16px;
border: 1px solid var(--border); border-radius: 10px; background: var(--bg-card);
font-size: 13.5px; color: var(--ink-2); text-decoration: none; transition: all .15s; box-shadow: var(--shadow);
}
.book-cta:hover { border-color: var(--accent); color: var(--accent-deep); transform: translateY(-1px); }
.book-cta .arr { margin-left: auto; color: var(--accent); font-weight: 600; }
body.book-mode .sidebar, body.book-mode .aside { display: none !important; }
body.book-mode .layout { grid-template-columns: 1fr; }
body.book-mode .main { padding: 0; }
.book-toolbar {
position: sticky; top: 53px; z-index: 40; display: flex; align-items: center; gap: 8px;
padding: 10px 22px; background: color-mix(in srgb, var(--bg) 90%, transparent);
backdrop-filter: blur(8px); border-bottom: 1px solid var(--border);
}
.book-toolbar .spacer { flex: 1; }
.book-toolbar .bk-hint { font-size: 11.5px; color: var(--muted-3); }
@media (max-width: 640px) { .book-toolbar .bk-hint { display: none; } }
.book { max-width: 760px; margin: 0 auto; padding: 40px 40px 90px; color: var(--ink-2); }
.book .dot { color: var(--accent); }
/* title page */
.book-titlepage { text-align: center; padding: 56px 0 72px; border-bottom: 1px solid var(--border); margin-bottom: 44px; }
.bk-tp-kicker { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 1.6px; color: var(--accent); margin-bottom: 22px; }
.bk-tp-title { font-family: var(--mono); font-weight: 600; font-size: 42px; line-height: 1.08; color: var(--ink); margin-bottom: 22px; letter-spacing: -0.5px; }
.bk-tp-sub { font-size: 15px; line-height: 1.62; color: var(--muted); max-width: 540px; margin: 0 auto 34px; font-weight: 300; }
.bk-tp-meta { font-family: var(--mono); font-size: 12px; color: var(--muted-2); line-height: 2; }
.bk-tp-meta b { color: var(--accent); }
.bk-tp-src { color: var(--muted-4); font-size: 11px; }
/* contents */
.book-toc { margin-bottom: 20px; }
.bk-h { font-family: var(--mono); font-size: 24px; font-weight: 600; color: var(--ink); margin-bottom: 18px; }
.bk-toc-part { margin: 13px 0 3px; }
.bk-toc-part a { font-family: var(--mono); font-weight: 600; font-size: 14px; color: var(--ink); cursor: pointer; text-decoration: none; }
.bk-toc-num { color: var(--accent); margin-right: 8px; }
.bk-toc-art { padding-left: 28px; margin: 2px 0; }
.bk-toc-art a { font-size: 13px; color: var(--muted); cursor: pointer; text-decoration: none; }
.bk-toc-art a:hover, .bk-toc-part a:hover { color: var(--accent); }
/* parts */
.book-part { padding: 30px 0 10px; border-top: 2px solid var(--ink); margin-top: 44px; }
.bk-part-kicker { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 2px; color: var(--accent); }
.bk-part-title { font-family: var(--mono); font-size: 30px; font-weight: 600; color: var(--ink); margin: 8px 0 12px; letter-spacing: -0.3px; }
.bk-part-desc { font-size: 14px; color: var(--muted); line-height: 1.6; max-width: 560px; }
/* articles */
.book-article { padding: 30px 0; border-top: 1px solid var(--border); }
.bk-art-cat { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted-3); }
.bk-art-title { font-family: var(--mono); font-size: 22px; font-weight: 600; color: var(--ink); margin: 4px 0 14px; letter-spacing: -0.2px; }
.book-prose h1 { display: block; font-size: 20px; }
/* appendix + colophon */
.book-appendix { padding: 30px 0; border-top: 2px solid var(--ink); margin-top: 44px; }
.bk-appendix-lead { font-size: 13px; color: var(--muted); margin-bottom: 16px; max-width: 560px; }
.bk-refs { display: block; }
.bk-ref { display: grid; grid-template-columns: 150px 1fr; gap: 2px 12px; padding: 7px 0; border-bottom: 1px solid var(--border-soft); font-size: 12px; }
.bk-ref-id { font-family: var(--mono); color: var(--accent); }
.bk-ref-title { color: var(--ink-3); }
.bk-ref-url { grid-column: 2; font-family: var(--mono); font-size: 10.5px; color: var(--muted-4); }
.book-colophon { margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 11px; color: var(--muted-3); text-align: center; line-height: 1.6; }
/* ── Print (browser "Save as PDF") ─────────────────────── */
@media print {
.topbar, .sidebar, .aside, .nav-scrim, .book-toolbar, #hovercard, #toast, .foot, .menu-toggle { display: none !important; }
html, body { background: #fff; color: #000; }
.layout, .main, body.book-mode .main { display: block; padding: 0; margin: 0; }
.book { max-width: none; margin: 0; padding: 0; color: #111; font-size: 10.5pt; }
@page { size: A4; margin: 18mm 16mm; }
.book-titlepage { break-after: page; border: none; padding: 30mm 0; margin: 0; }
.book-toc { break-after: page; }
.book-part { break-before: page; border-top: none; margin: 0; padding: 0; }
.book-appendix { break-before: page; border-top: none; margin: 0; }
.book-article { break-before: page; border-top: none; padding: 0; margin: 0; } /* each topic starts a fresh page */
.bk-art-title, .bk-part-title, .prose h2, .prose h3, .bk-art-cat { break-after: avoid; }
.prose table, .prose pre, .prose blockquote, .katex-display, .bk-ref, .prose li { break-inside: avoid; }
.book-prose { line-height: 1.5; }
.book-colophon { break-before: avoid; }
.prose a, .book a { color: #111; text-decoration: none; }
.cite { background: none !important; border: none !important; color: #444 !important; font-size: 0.78em; padding: 0 1px; }
.cite .cite-mark { display: none; }
a.secref { color: #111; border: none; }
.prose abbr.ac { border: none; }
}