/* Fekrnet explorer. Colour carries meaning only: accent = where you are, green/red/sand =
   how one thinker relates to another. Everything else is ink on paper. */

:root {
  --fs-text: 15px; /* panel: what is said */
  --fs-small: 12.5px; /* panel: headings, sources, counts */
  --fs-label: 11.5px; /* panel: tags and stances */
  --bg: #f6f3ec;
  --surface: #fffdf8;
  --surface-2: #eeeae0;
  --ink: #1b2027;
  --ink-2: #464c55;
  --muted: #7a7e86;
  --line: #dcd5c7;
  --line-soft: #e8e3d8;
  --wire: #c9c1b0;
  --accent: #24497a;
  --accent-line: #9fb3cf;
  --accent-soft: #e2e8f1;
  --pos: #2d7560;
  --neg: #a9492a;
  --neu: #8b7d5f;
  --mark: #f2d77c88;
  --target: #24497a0d;
  --glow: #24497a0f;
  --shadow: 0 1px 2px #1b20270d, 0 6px 22px #1b20270f;
  --ui: "Vazirmatn", system-ui, sans-serif;
  --read: var(--ui);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f141b;
    --surface: #161c25;
    --surface-2: #1d2531;
    --ink: #e8e4db;
    --ink-2: #bdb8ae;
    --muted: #868c96;
    --line: #2b3441;
    --line-soft: #222a36;
    --wire: #39424f;
    --accent: #93b5e6;
    --accent-line: #4a6488;
    --accent-soft: #1e2b3e;
    --pos: #6fc2a5;
    --neg: #e88d66;
    --neu: #b9a985;
    --mark: #c9a43a4d;
    --target: #93b5e60f;
    --glow: #93b5e60d;
    --shadow: 0 1px 2px #0006, 0 8px 26px #0005;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0f141b;
  --surface: #161c25;
  --surface-2: #1d2531;
  --ink: #e8e4db;
  --ink-2: #bdb8ae;
  --muted: #868c96;
  --line: #2b3441;
  --line-soft: #222a36;
  --wire: #39424f;
  --accent: #93b5e6;
  --accent-line: #4a6488;
  --accent-soft: #1e2b3e;
  --pos: #6fc2a5;
  --neg: #e88d66;
  --neu: #b9a985;
  --mark: #c9a43a4d;
  --target: #93b5e60f;
  --glow: #93b5e60d;
  --shadow: 0 1px 2px #0006, 0 8px 26px #0005;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.7 var(--ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
kbd {
  font: 500 11px/1 var(--ui);
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  color: var(--muted);
  background: var(--surface);
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.state { margin: 18vh auto; text-align: center; color: var(--muted); max-width: 480px; padding: 0 16px; }

/* ---------- bar ---------- */

.bar {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg);
  position: relative;
  z-index: 10;
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 800; font-size: 18px; }
.brand svg { width: 22px; height: 22px; fill: var(--accent); stroke: var(--accent); stroke-width: 1.3; }
.brand svg path { fill: none; opacity: .55; }
.tagline { font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.tagline .pipe { margin-inline-end: 12px; opacity: .45; }
.crumbs { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); overflow: hidden; white-space: nowrap; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs [aria-current] { color: var(--ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.crumbs .sep { opacity: .5; }
.search-btn {
  display: flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 10px 0 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 9px;
  color: var(--muted); cursor: pointer; font-size: 13.5px;
}
.search-btn:hover { color: var(--ink); border-color: var(--accent-line); }
.search-btn svg, .icon-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; background: none; border: 1px solid transparent; border-radius: 9px; cursor: pointer; color: var(--ink-2); }
.icon-btn:hover { border-color: var(--line); }
.icon-btn .fill { fill: currentColor; stroke: none; }

/* ---------- frame ---------- */

.app { position: absolute; inset: 56px 0 30px 0; display: flex; }
.foot {
  position: absolute; inset: auto 0 0 0; height: 30px;
  display: flex; align-items: center; gap: 10px; padding: 0 20px;
  border-top: 1px solid var(--line-soft); background: var(--bg);
  font-size: 11.5px; color: var(--muted);
}
.foot .credit { margin-inline-start: auto; }
.foot .credit a { color: var(--accent); text-decoration: none; }
.foot .credit a:hover { text-decoration: underline; }
.foot .meter { width: 90px; height: 3px; background: var(--line-soft); border-radius: 2px; overflow: hidden; }
.foot .meter span { display: block; height: 100%; min-width: 3px; background: var(--accent); opacity: .7; }
.stage { flex: 1; min-width: 0; position: relative; overflow: hidden; }
.stage.view-r, .stage.view-t, .stage.view-p { overflow: auto; }
.panel {
  flex: none; width: 0; overflow: hidden;
  background: var(--surface);
  border-inline-start: 1px solid var(--line-soft);
  transition: width .35s cubic-bezier(.2, .7, .2, 1);
}
.with-panel .panel { width: min(460px, 42vw); }
.instant .panel { transition: none; }
.panel-inner { width: min(460px, 42vw); height: 100%; overflow: auto; padding: 26px 28px 80px; }

.enter { animation: enter .5s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes enter { from { opacity: 0; transform: scale(.985); } }

.eyebrow { margin: 0 0 6px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.wires path { fill: none; stroke: var(--wire); stroke-width: 1; transition: opacity .25s, stroke .25s; }

/* ---------- home ---------- */

.home { position: relative; height: 100%; }
.home .map { position: absolute; inset: 0; }
.lists { display: none; }
.list-title { margin: 0 0 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.toplist { list-style: none; margin: 0 0 28px; padding: 0; }
.toplist a { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); text-decoration: none; }
.toplist a:hover b { color: var(--accent); }
.toplist b { font-weight: 600; }
.toplist small { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.map { position: relative; background: radial-gradient(closest-side, var(--glow), transparent); }
.node { position: absolute; left: 0; top: 0; text-decoration: none; color: inherit; transition: opacity .25s; }
.ready .node { transition: opacity .25s; }
.ready .wires path { transition: opacity .25s, stroke .25s; }

.thinker { width: 0; height: 0; }
.thinker .dot {
  position: absolute; left: -17px; top: -17px; width: 34px; height: 34px;
  box-shadow: 0 0 0 3px var(--bg); transition: transform .2s, box-shadow .2s;
}
.thinker .label { position: absolute; white-space: nowrap; font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.thinker .label small { display: block; font-weight: 400; font-size: 11.5px; color: var(--muted); }
.side-r .label { left: 26px; top: 0; transform: translateY(-50%); text-align: left; }
.side-l .label { right: 26px; top: 0; transform: translateY(-50%); text-align: right; }
.side-t .label { bottom: 24px; left: 0; transform: translateX(-50%); text-align: center; }
.side-b .label { top: 24px; left: 0; transform: translateX(-50%); text-align: center; }
.thinker:hover .dot, .thinker.on .dot { transform: scale(1.15); box-shadow: 0 0 0 3px var(--bg), 0 0 0 4.5px var(--accent); }
.thinker.quiet .dot { opacity: .55; }

/* portraits: black and white, round, the same in every theme */
.face { display: inline-block; flex: none; border-radius: 50%; object-fit: cover; filter: grayscale(1) contrast(1.06); background: var(--surface-2); }
.face.none { display: inline-grid; place-items: center; filter: none; color: var(--muted); font-weight: 700; border: 1px solid var(--line); }
.face.small { width: 28px; height: 28px; font-size: 13px; }
.face.mid { width: 44px; height: 44px; font-size: 18px; }
.face.big { width: 64px; height: 64px; font-size: 26px; }
.thinker .face.none { font-size: 15px; background: var(--surface); }
.v-name { display: flex; align-items: center; gap: 9px; }
.who-head { display: flex; align-items: center; gap: 14px; }
.who-head .eyebrow { margin-bottom: 2px; }
.credit { margin: 6px 0 0; font-size: var(--fs-label); color: var(--muted); }
.thinker.quiet .label { color: var(--muted); font-weight: 500; }

.topic, .orb, .chip {
  display: inline-block; white-space: nowrap;
  padding: 4px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 13.5px; line-height: 1.6;
}
.topic.v1 { font-size: 12px; padding: 2px 9px; color: var(--ink-2); }
.topic.v2 { font-size: 15px; font-weight: 600; border-color: var(--accent-line); }
.topic.v3 { font-size: 17px; font-weight: 700; color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.topic:hover, .orb:hover, .chip:hover { border-color: var(--accent); color: var(--accent); }
.focus .node:not(.on) { opacity: .18; }
.focus .wires path:not(.on) { opacity: .1; }
.wires path.on { stroke: var(--accent); stroke-width: 1.5; }

/* the landing page */
.stage.view-home, .stage.view-thinkers { overflow: auto; }
.landing { max-width: 1080px; margin: 0 auto; padding: 56px 32px 120px; }
.hero { text-align: center; padding: 28px 0 48px; }
.hero h1 { margin: 0; font-size: clamp(30px, 4.4vw, 50px); line-height: 1.35; font-weight: 800; letter-spacing: -.015em; }
.lede { margin: 16px auto 0; max-width: 620px; font-size: 16.5px; line-height: 2; color: var(--ink-2); }
.hero-search { margin: 30px auto 0; width: min(560px, 100%); height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 20px;
  border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 16px; cursor: pointer;
  box-shadow: 0 14px 40px -24px #1b202766; transition: border-color .2s, box-shadow .2s; }
.hero-search:hover { border-color: var(--accent-line); box-shadow: 0 16px 44px -22px #24497a55; }
.hero-search svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.hero-search span { flex: 1; text-align: start; }
.portraits { margin: 36px auto 0; display: flex; justify-content: center; flex-wrap: wrap; padding-inline-start: 14px; }
.portraits a { margin-inline-start: -14px; border-radius: 50%; transition: transform .2s; }
.portraits .face { width: 54px; height: 54px; box-shadow: 0 0 0 3px var(--bg); }
.portraits a:hover { transform: translateY(-4px); z-index: 1; }
.more-chip { display: table; margin: 14px auto 0; padding: 8px 18px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-2); font-size: 14px; font-weight: 600; text-decoration: none; }
.more-chip:hover { border-color: var(--accent-line); color: var(--accent); }

/* the full list of thinkers, and the form that suggests a missing one */
.roster-q, .suggest-row input[name=name] { all: unset; box-sizing: border-box; display: block; padding: 14px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-size: 16px; text-align: start; }
.roster-q { width: min(420px, 100%); margin: 24px auto 0; }
.roster-q:focus, .suggest-row input[name=name]:focus { border-color: var(--accent-line); }
.roster-grid { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.roster-grid li[hidden] { display: none; }
.roster-grid a { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: 14px; background: var(--surface); color: inherit; text-decoration: none; transition: border-color .2s; }
.roster-grid a:hover { border-color: var(--accent-line); }
.roster-grid b { display: block; font-size: 15.5px; }
.roster-grid small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.roster-none { margin: 36px auto 0; }
.suggest { position: relative; margin: 56px auto 0; max-width: 520px; text-align: center; padding: 28px 24px; border: 1px dashed var(--line); border-radius: 18px; }
.suggest h2 { margin: 0; font-size: 18px; }
.suggest p { margin: 8px 0 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.9; }
.suggest-row { display: flex; gap: 8px; margin-top: 16px; }
.suggest-row input[name=name] { flex: 1; min-width: 0; }
.suggest-row button { padding: 0 22px; border-radius: 14px; border: 0; background: var(--accent); color: var(--bg); font: inherit; font-weight: 700; cursor: pointer; }
.suggest .hp { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.suggest-msg { min-height: 1.9em; }
.kind-head { padding: 8px 0 28px; }
.kind-head h1 { margin: 0; font-size: 38px; font-weight: 800; }
.kind-head .lede { margin: 6px 0 0; }
.block { margin-top: 40px; }
.block > h2 { margin: 0 0 16px; font-size: 20px; font-weight: 800; }
.hot { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.hot-card { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: 16px; background: var(--surface); text-decoration: none;
  box-shadow: 0 0 0 1px var(--line-soft); transition: box-shadow .2s, transform .2s; }
.hot-card:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--accent-line), 0 14px 30px -20px #24497a66; }
.hot-card b { font-size: 17px; font-weight: 700; }
.hot-card:hover b { color: var(--accent); }
.hot-meta { font-size: var(--fs-small); color: var(--muted); }
.hot-card .stack { margin: 10px 0 0; }
.hot-card .face.tiny { width: 26px; height: 26px; box-shadow: 0 0 0 2px var(--surface); }
.domains { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.domain-card { padding: 20px 22px 10px; border-radius: 18px; background: var(--surface); box-shadow: 0 0 0 1px var(--line-soft);
  height: 340px; display: flex; flex-direction: column; }
.domain-card .groups { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; margin-inline-end: -10px; padding-inline-end: 10px; }
.domain-card .groups.scrolls { mask-image: linear-gradient(to bottom, #000 calc(100% - 36px), transparent); padding-bottom: 24px; }
.domain-card h3 { margin: 0; font-size: 17px; font-weight: 800; }
.d-meta { margin: 2px 0 10px; font-size: var(--fs-small); color: var(--muted); }
.groups { list-style: none; margin: 0; padding: 0; }
.groups a { display: grid; grid-template-columns: minmax(0, 1fr) 72px 28px; align-items: center; gap: 12px; padding: 7px 0; text-decoration: none; font-size: 14.5px; }
.groups li + li a { border-top: 1px solid color-mix(in srgb, var(--line-soft) 70%, transparent); }
.g-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.groups a:hover .g-name { color: var(--accent); }
.g-bar { height: 4px; border-radius: 2px; background: var(--line-soft); overflow: hidden; }
.g-bar i { display: block; height: 100%; border-radius: 2px; background: var(--accent); opacity: .65; }
.g-n { font-size: var(--fs-small); color: var(--muted); text-align: end; }
@media (max-width: 760px) { .landing { padding: 28px 16px 80px; } .hero { padding: 8px 0 24px; } .portraits .face { width: 42px; height: 42px; } }
.home.has-head { display: flex; flex-direction: column; }
.home.has-head .map { position: relative; inset: auto; flex: 1; min-height: 0; }
.map-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 24px 32px 20px; border-bottom: 1px solid var(--line-soft);
  background: radial-gradient(60% 140% at 100% 0%, var(--accent-soft), transparent 70%); }
.mh-domain { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 600;
  color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent-line); text-decoration: none; }
.mh-domain::after { content: "↖"; font-size: 11px; opacity: .7; }
.mh-domain:hover { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); }
.map-head h1 { margin: 10px 0 0; font-size: 32px; font-weight: 800; line-height: 1.3; letter-spacing: -.01em; }
.mh-who { display: flex; align-items: center; gap: 10px; margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.mh-who .stack { margin: 0; }
.mh-who .face.tiny { width: 26px; height: 26px; box-shadow: 0 0 0 2px var(--bg); }
.map-stats { display: flex; padding: 6px 4px; border-radius: 16px; background: var(--surface); box-shadow: 0 0 0 1px var(--line-soft), 0 12px 28px -22px #1b202766; }
.map-stats span { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 22px; font-size: 12px; color: var(--muted); }
.map-stats span + span { border-inline-start: 1px solid var(--line-soft); }
.map-stats b { font-size: 22px; font-weight: 800; color: var(--accent); line-height: 1.2; }
@media (max-width: 760px) { .map-head { padding: 18px 16px 14px; } .map-head h1 { font-size: 24px; } .map-stats span { padding: 4px 14px; } .map-stats b { font-size: 18px; } }

/* ---------- arena and thinker orbit ---------- */

.arena { position: absolute; inset: 0; background: radial-gradient(closest-side, var(--glow), transparent); }
.core { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(440px, 80%); text-align: center; z-index: 2; pointer-events: none; }
.core > * { pointer-events: auto; }
.core h1 { margin: 0; font-size: clamp(32px, 4.6vw, 54px); line-height: 1.3; font-weight: 800; letter-spacing: -.015em; }
.core .meta { margin: 8px 0 0; color: var(--muted); font-size: 13.5px; }
.core .hint { margin: 14px auto 0; max-width: 300px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.related { margin-top: 18px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; font-size: 12.5px; align-items: center; }
.related > span { color: var(--muted); margin-inline-end: 4px; }
.related + .related { margin-top: 8px; }
.chip small { color: var(--muted); font-size: var(--fs-label); }
.chip { font-size: var(--fs-small); padding: 2px 10px; text-decoration: none; color: var(--ink-2); }

.voice {
  position: absolute; left: 0; top: 0; width: max-content; max-width: 180px;
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  text-decoration: none; color: inherit; z-index: 3; transition: opacity .25s;
}
.face.sized { width: var(--s); height: var(--s); font-size: calc(var(--s) * .4); box-shadow: 0 0 0 1px var(--line); transition: box-shadow .2s; }
.face.none.sized { background: var(--surface); }
.voice:hover .face { box-shadow: 0 0 0 2px var(--accent-line); }
.voice.sel .face { box-shadow: 0 0 0 3px var(--accent); }
.has-sel .voice:not(.sel) { opacity: .45; }
.voice .v-name { font-weight: 600; font-size: 14px; margin-top: 4px; }
.voice .v-meta { font-size: 11.5px; color: var(--muted); }
.p-meta { margin: 4px 0 0; color: var(--muted); font-size: var(--fs-small); }
.defs { list-style: none; margin: 0; padding: 0; }
.defs li + li { border-top: 1px solid color-mix(in srgb, var(--line-soft) 60%, transparent); }
.def { display: flex; flex-direction: column; gap: 6px; padding: 14px 0; text-decoration: none; color: inherit; }
.def-who { display: flex; align-items: center; gap: 9px; font-size: var(--fs-text); }
.def-who b { font-weight: 600; }
.def-who small { margin-inline-start: auto; color: var(--muted); font-size: var(--fs-label); }
.def-text { font-size: var(--fs-text); line-height: 1.9; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.def:hover b, .def:hover .def-text { color: var(--accent); }
.family .related { justify-content: flex-start; margin-top: 0; }
.family .related + .related { margin-top: 12px; }

.orb { position: absolute; left: 0; top: 0; text-decoration: none; z-index: 3; }
.orb.shared { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.orb small { color: var(--muted); font-size: 11.5px; margin-inline-start: 4px; font-weight: 400; }
.ready .orb { transition: border-color .2s; }
.web .orb { transition: opacity .25s; }
.ready.web .orb { transition: border-color .2s, opacity .25s; }
.focus .orb:not(.on) { opacity: .2; }
.web { overflow: hidden; touch-action: none; cursor: grab; }
.web.dragging { cursor: grabbing; }
.web.dragging .orb, .web.dragging .node { pointer-events: none; }
.web-stage { position: absolute; inset: 0; transform-origin: 0 0; }
.zoom { position: absolute; bottom: 16px; inset-inline-end: 16px; display: flex; flex-direction: column; gap: 4px; z-index: 5; }
.zoom button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font: 500 16px/1 var(--ui); cursor: pointer; }
.zoom button:hover { border-color: var(--accent); color: var(--accent); }
.stacked .zoom { display: none; }
.stacked .web-stage { position: static; transform: none !important; display: flex; flex-direction: column; gap: 12px; }

.stacked { overflow: auto; padding: 28px 16px 120px; display: flex; flex-direction: column; gap: 12px; }
.stacked .core { position: static; transform: none; width: auto; margin-bottom: 14px; }
.stacked .voice, .stacked .orb { position: static; transform: none !important; width: auto; }
.stacked .orb { align-self: flex-start; }
.stacked .wires { display: none; }
.stacked .voice { flex-direction: row; max-width: none; text-align: start; gap: 10px; }
.stacked .voice .face.sized { --s: 40px !important; }
.stacked .voice .v-name { margin-top: 0; }


/* ---------- panel ---------- */

.p-head { position: relative; padding-inline-end: 36px; margin-bottom: 22px; }
.p-head h2 { margin: 0; font-size: 26px; line-height: 1.4; font-weight: 800; }
.p-head h2 a { text-decoration: none; }
.p-head h2 a:hover { color: var(--accent); }
.close {
  position: absolute; inset-inline-end: -6px; top: -4px;
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 8px; text-decoration: none; color: var(--muted); font-size: 22px; line-height: 1;
}
.close:hover { background: var(--surface-2); color: var(--ink); }
.stats { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 0; font-size: var(--fs-small); color: var(--muted); }
.stats b { color: var(--ink); font-weight: 600; }
.progress { margin-top: 14px; margin-inline-end: -36px; }  /* past the close button's room, to the content's edge */
.progress .meter { display: block; height: 3px; background: var(--line-soft); border-radius: 2px; overflow: hidden; }
.progress .meter span { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.progress .stats { margin-top: 8px; }
.section { margin: 0 0 30px; }
.section > h3 { margin: 0 0 6px; font-size: var(--fs-small); font-weight: 600; color: var(--muted); display: flex; align-items: baseline; gap: 8px; }
.section > h3 .n { font-weight: 400; opacity: .8; }
.section.sense { padding-inline-start: 14px; border-inline-start: 2px solid var(--accent-line); }
.sense-lead { margin: 0; font-family: var(--read); font-size: var(--fs-text); line-height: 1.95; font-weight: 500; }
.sense-src { display: block; margin-top: 6px; font-size: var(--fs-small); color: var(--muted); }
details.senses { margin-top: 10px; }
details.senses summary { cursor: pointer; list-style: none; width: fit-content; font-size: var(--fs-small); color: var(--muted); display: flex; align-items: center; gap: 6px; }
details.senses summary::-webkit-details-marker { display: none; }
/* a chevron pointing down to open, up to close */
details.senses summary::after { content: ""; width: 5px; height: 5px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
details.senses[open] summary::after { transform: translateY(1px) rotate(-135deg); }
details.senses summary:hover { color: var(--accent); }
details.senses ol { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
details.senses li p { margin: 0; font-size: var(--fs-text); line-height: 1.95; color: var(--ink-2); }

.claims { list-style: none; margin: 0; padding: 0; }
.claim + .claim { border-top: 1px solid color-mix(in srgb, var(--line-soft) 60%, transparent); }
.claim-head { all: unset; box-sizing: border-box; display: block; width: 100%; padding: 12px 0; cursor: pointer; }
.claim-head:hover .claim-text { color: var(--accent); }
.claim-head:focus-visible { outline: 2px solid var(--accent); border-radius: 10px; }
.claim-text { font-size: var(--fs-text); line-height: 1.9; color: var(--ink-2); }
.claim.open .claim-text { color: var(--ink); font-weight: 600; }
.claim-body { display: none; padding: 0 0 14px; }
.claim.open .claim-body { display: block; animation: enter .3s both; }
.who { margin: 0 0 10px; font-size: var(--fs-small); color: var(--muted); }
.who b { color: var(--ink-2); font-weight: 600; }
.quote {
  margin: 0 0 10px; padding: 10px 14px;
  border-inline-start: 2px solid var(--accent); background: var(--bg);
  border-start-end-radius: 8px; border-end-end-radius: 8px;
  font-family: var(--read); font-size: var(--fs-text); line-height: 1.95;
}
.quote::before { content: "«"; color: var(--muted); }
.quote::after { content: "»"; color: var(--muted); }
.claim-foot { display: flex; align-items: center; gap: 12px; font-size: var(--fs-small); line-height: 1.8; }
.claim-foot .src { flex: 1; }
.read-icon { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: var(--muted); transition: color .15s, background .15s; }
.read-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.read-icon:hover { color: var(--accent); background: var(--accent-soft); }
/* a claim's reactions: line icons, quiet until chosen */
.react { display: flex; gap: 4px; margin-top: 10px; }
.react button { all: unset; box-sizing: border-box; height: 32px; min-width: 32px; padding: 0 9px; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  border-radius: 16px; border: 1px solid transparent; color: var(--muted); font-size: 12px; cursor: pointer; transition: color .15s, border-color .15s, background .15s; }
.react button:hover { color: var(--ink-2); border-color: var(--line); }
.react button:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 1px; }
.react button.on { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.react svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.rc:empty { display: none; }
/* the counts on a collapsed claim: small, muted, only where someone reacted */
.react-sum { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; font-size: 12px; line-height: 1.8; color: var(--muted); }
.react-sum:empty { display: none; }
.react-sum .rs { display: inline-flex; align-items: center; gap: 4px; }
.react-sum svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.check { color: var(--muted); }
.check.ok { color: var(--pos); }
.check.bad { color: var(--neg); }
.read-link { color: var(--accent); text-decoration: none; font-weight: 600; white-space: nowrap; }
.read-link:hover { text-decoration: underline; }
.src { color: var(--muted); }
.empty { color: var(--muted); font-size: var(--fs-small); }
.section.onward { margin-top: 40px; }

.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: var(--fs-text); flex-wrap: wrap; }
.rows a { text-decoration: none; font-weight: 600; }
.rows a:hover { color: var(--accent); }
.rows .n { margin-inline-start: auto; font-size: var(--fs-small); color: var(--muted); }
.rows .x-head { font-weight: 400; }
.rows .x-head:hover { color: inherit; }
.xrow { display: block !important; padding: 0 !important; }
.x-head { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; width: 100%; padding: 10px 0; cursor: pointer; font-size: var(--fs-text); }
.x-head.static { cursor: default; }
.x-head b { font-weight: 600; }
.x-head:not(.static):hover b { color: var(--accent); }
.x-head:focus-visible { outline: 2px solid var(--accent); }
.x-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tally { display: flex; flex-wrap: wrap; gap: 0 12px; font-size: var(--fs-small); }
.tally .tone-neu { color: var(--muted); }
.chev { margin-inline-start: auto; color: var(--muted); font-size: 16px; line-height: 1; }
.x-head .n + .chev { margin-inline-start: 0; }
.back { display: inline-block; margin-bottom: 14px; font-size: 13px; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--accent); }
.row-meta { display: flex; align-items: center; gap: 10px; }
.places { list-style: none; margin: 0; padding: 0; }
.places li { padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.x-note { margin: 6px 0 4px; font-family: var(--read); font-size: var(--fs-text); line-height: 1.95; color: var(--ink); }
.x-src { margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: var(--fs-small); color: var(--muted); }
.rel { font-size: var(--fs-label); font-weight: 600; padding: 0 8px; border-radius: 999px; border: 1px solid currentColor; line-height: 1.8; }
.tone-pos { color: var(--pos); }
.tone-neg { color: var(--neg); }
.tone-neu { color: var(--neu); }
.kind { font-size: var(--fs-label); color: var(--muted); }
.works { list-style: none; margin: 0; padding: 0; }
.works li { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.works a.t { font-weight: 600; text-decoration: none; }
.works a.t:hover { color: var(--accent); }
.works p { margin: 4px 0 0; font-size: var(--fs-text); line-height: 1.85; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.works small { color: var(--muted); font-size: var(--fs-small); }
.others { display: flex; flex-wrap: wrap; gap: 6px; }
.more-list:not(.open) .extra { display: none; }
.more-btn { all: unset; cursor: pointer; font-size: var(--fs-small); color: var(--accent); padding: 2px 6px; }
.more-btn:hover { text-decoration: underline; }

/* ---------- reading ---------- */

.doc { max-width: 720px; margin: 0 auto; padding: 40px 24px 160px; }
.back { all: unset; cursor: pointer; font-size: 13px; color: var(--muted); }
.back:hover { color: var(--ink); }
.doc-head { margin: 22px 0 30px; padding-bottom: 22px; border-bottom: 1px solid var(--line-soft); }
.doc-head h1 { margin: 0 0 6px; font-size: 30px; line-height: 1.5; font-weight: 800; }
.byline { margin: 0; font-size: 14px; }
.byline a { text-decoration: none; color: var(--accent); font-weight: 600; }
details.summary { margin-top: 18px; font-size: 14px; }
details.summary summary { cursor: pointer; color: var(--muted); }
details.summary p { margin: 10px 0 0; line-height: 2; color: var(--ink-2); }
.claim-note {
  margin: 0 0 22px; padding: 14px 18px;
  font: 400 14.5px/1.9 var(--ui);
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}
.claim-note .who { margin: 6px 0 0; }
.paras { font-family: var(--read); font-size: 18.5px; line-height: 2.15; }
.para { position: relative; margin: 0 0 1.1em; border-radius: 4px; transition: background .3s; }
.para.target { background: var(--target); box-shadow: 0 0 0 12px var(--target); }
.para-h { margin: 1.8em 0 .8em; font: 700 21px/1.6 var(--ui); }
.pn { position: absolute; inset-inline-start: -56px; top: .45em; width: 40px; text-align: end; font: 400 11.5px/1.6 var(--ui); color: var(--muted); opacity: .7; user-select: none; }
.mks { position: absolute; inset-inline-end: -34px; top: .6em; display: flex; flex-direction: column; gap: 6px; }
.mk { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--accent); background: var(--bg); display: block; }
.mk:hover, .mk.on { background: var(--accent); }
mark { background: var(--mark); color: inherit; padding: 1px 0; border-radius: 3px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.doc-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line-soft); font-size: 14px; }
.doc-foot a { text-decoration: none; color: var(--accent); }

/* ---------- subject pages: an article, and a rail with a small graph ---------- */

.page { display: grid; grid-template-columns: minmax(0, 700px) 340px; gap: 64px; justify-content: center; padding: 44px 32px 140px; }
.read { min-width: 0; --fs-text: 16px; }
.rail { position: sticky; top: 24px; align-self: start; display: flex; flex-direction: column; gap: 22px; }
.page-head { margin-bottom: 30px; }
.page-head h1 { margin: 0; font-size: clamp(30px, 3.6vw, 42px); line-height: 1.4; font-weight: 800; letter-spacing: -.01em; }
.page-head .meta { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; }
.thinker-head { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 20px; align-items: center; }
.thinker-head > :not(.face):not(.name-block):not(.trend) { grid-column: 1 / -1; }
.thinker-head:has(> .trend) { grid-template-columns: auto minmax(0, 1fr) auto; }
.thinker-head > .trend { grid-column: 3; grid-row: 1; align-self: end; margin-bottom: 6px; }
.thinker-head .bio { max-width: none; margin-top: 18px; }
.page-head .face.big { width: 84px; height: 84px; }
.grow { flex: 1; min-width: 0; }
.bio { margin: 12px 0 4px; max-width: 600px; font-size: 15.5px; line-height: 2; color: var(--ink-2); }
.wiki { white-space: nowrap; font-size: var(--fs-small); color: var(--accent); text-decoration: none; }
.wiki:hover { text-decoration: underline; }
.page-head .progress { margin-inline-end: 0; max-width: 420px; }

.voice-sec { padding: 26px 0 10px; border-top: 1px solid var(--line-soft); scroll-margin-top: 16px; }
.who-line { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; font-size: 19px; font-weight: 700; line-height: 1.5; }
.who-line a { text-decoration: none; }
.who-line a:hover { color: var(--accent); }
.who-line small { margin-inline-start: auto; font-size: var(--fs-small); font-weight: 400; color: var(--muted); white-space: nowrap; }
.voice-sec.sel .who-line .face { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.voice-sec.sel .who-line span { color: var(--accent); }
.sec-title { margin: 0 0 10px; font-size: 19px; font-weight: 700; display: flex; align-items: baseline; gap: 10px; }
.sec-title .n { font-size: var(--fs-small); font-weight: 400; color: var(--muted); }
.read .sense { margin: 4px 0 8px; padding-inline-start: 14px; border-inline-start: 2px solid var(--accent-line); }
.sub { margin: 18px 0 0; font-size: var(--fs-small); font-weight: 600; color: var(--muted); }
.sub a { color: var(--ink); text-decoration: none; }
.sub a:hover { color: var(--accent); }
.read .tally { margin: -4px 0 6px; }
.claim-head .rel { display: inline-block; margin-inline-end: 8px; vertical-align: 2px; }
.claim-text.faint { color: var(--muted); font-size: var(--fs-small); }
.more-list:not(.open) > ul > li:nth-child(n+5),
.more-list.few:not(.open) > ul > li:nth-child(n+3),
.more-list.topics:not(.open) > .topic-block:nth-child(n+9) { display: none; }
.more-list > .more-btn { margin-top: 4px; padding: 4px 0; }
.onward { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 12px 0 0; font-size: var(--fs-small); }
.onward > span { color: var(--muted); margin-inline-end: 4px; }
.topic-block { padding: 14px 0 6px; }
.topic-block + .topic-block { border-top: 1px solid color-mix(in srgb, var(--line-soft) 60%, transparent); }
.topic-title { margin: 0; display: flex; align-items: baseline; gap: 10px; font-size: 16.5px; font-weight: 700; }
.topic-title a { text-decoration: none; }
.topic-title a:hover { color: var(--accent); }
.topic-title small { font-size: var(--fs-label); font-weight: 400; color: var(--muted); }
.sense-line { margin: 4px 0 0; font-size: var(--fs-text); line-height: 1.95; font-weight: 500; }
.xrows .claim-head { padding: 10px 0; }
.xrows .claim-body .more-link { margin-top: 10px; }

.rail .arena { position: relative; inset: auto; height: 360px; border-radius: 20px; overflow: hidden;
  background: radial-gradient(60% 55% at 50% 52%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%), var(--surface);
  box-shadow: 0 0 0 1px var(--line-soft), 0 10px 30px -18px #1b202740; }
.rail-cap { position: absolute; top: 14px; inset-inline-start: 18px; margin: 0; z-index: 4; font-size: var(--fs-label); font-weight: 600; color: var(--muted); letter-spacing: .01em; }
.rail .wires path { stroke: color-mix(in srgb, var(--accent-line) 60%, transparent); stroke-width: 1.1; stroke-linecap: round; }
.rail .wires path.hl { stroke: var(--accent); stroke-width: 1.6; }
.rail .lit .voice:not(.hl), .rail .lit .orb:not(.hl) { opacity: .3; }
.rail .lit .wires path:not(.hl) { opacity: .25; }

/* the thinker's web in the rail: dots sized by claims, labels beside them */
.rail .orb { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px 2px 6px; border: 0; border-radius: 8px; background: color-mix(in srgb, var(--surface) 82%, transparent); color: var(--ink-2); font-weight: 500; transition: opacity .2s, color .2s; }
.rail .orb::before { content: ""; flex: none; width: var(--d); height: var(--d); border-radius: 50%; background: var(--surface); border: 1.5px solid var(--muted); }
.rail .orb.shared { background: color-mix(in srgb, var(--surface) 82%, transparent); color: var(--accent); font-weight: 600; }
.rail .orb.shared::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.rail .orb:hover, .rail .orb.hl, .rail .orb.on { color: var(--accent); }
.rail .orb:hover::before, .rail .orb.hl::before { border-color: var(--accent); }

/* the concept's web: the concept in the middle, portraits and dots around it */
.pnode { position: absolute; left: 0; top: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 2px; max-width: 150px; text-align: center; text-decoration: none; color: inherit; transition: opacity .2s; }
/* a name is a small tag pinned to the portrait's foot */
.pnode .v-name { position: relative; z-index: 1; margin-top: -7px; padding: 1px 8px 2px; border-radius: 9px; max-width: 100%;
  font-size: 10.5px; font-weight: 600; line-height: 1.45; color: var(--ink); letter-spacing: -.005em; white-space: nowrap;
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(4px);
  box-shadow: 0 0 0 1px var(--line-soft), 0 4px 10px -6px #1b202755; transition: background .2s, color .2s, box-shadow .2s; }
.pnode:hover .v-name { box-shadow: 0 0 0 1px var(--accent-line), 0 6px 14px -8px #24497a77; color: var(--accent); }
.pnode .face.sized { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--line); transition: box-shadow .2s; }
.pnode:hover .face.sized, .pnode.hl .face.sized, .pnode.sel .face.sized { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.pnode.hl .v-name, .pnode.sel .v-name { color: #fff; background: var(--accent); box-shadow: 0 6px 14px -8px #24497a99; }
.rail .orb.center { z-index: 4; padding: 5px 16px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 15px; font-weight: 800; box-shadow: 0 0 0 1px var(--accent-line); }
.rail .orb.center::before { display: none; }
.rail .lit .pnode:not(.hl) { opacity: .3; }
.rail .has-sel .pnode:not(.sel) { opacity: .45; }

/* the subject's ring: portraits with a soft halo, the subject as a pill in the middle */
.rail .voice .face.sized { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--line); transition: box-shadow .2s; }
.rail .voice:hover .face.sized, .rail .voice.hl .face.sized { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.rail .voice.sel .face.sized { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.rail .voice .v-name { color: var(--ink-2); }
.rail .voice.hl .v-name, .rail .voice.sel .v-name { color: var(--accent); font-weight: 700; }
.rail .core-label { display: inline-block; padding: 5px 16px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 15px; box-shadow: 0 0 0 1px var(--accent-line); }
.rail .arena.web { height: 420px; }
.mini .core { width: 50%; }
.core-label { margin: 0; font-size: 17px; font-weight: 800; line-height: 1.4; }
.mini .voice { max-width: 96px; gap: 2px; }
.mini .voice .v-name { font-size: 11px; font-weight: 500; margin-top: 2px; line-height: 1.4; }
.mini .zoom { flex-direction: row; top: 10px; bottom: auto; inset-inline-end: 10px; }
.mini .zoom button { width: 26px; height: 26px; font-size: 14px; }
.rail-note { margin: -8px 0 0; display: flex; align-items: center; gap: 8px; font-size: var(--fs-label); color: var(--muted); }
.rail-note .meter { flex: none; width: 48px; height: 3px; border-radius: 2px; background: var(--line-soft); overflow: hidden; }
.rail-note .meter span { display: block; height: 100%; background: var(--accent); opacity: .7; }
.rail-more { margin-top: -12px; font-size: var(--fs-small); color: var(--muted); text-decoration: none; }
.rail-more:hover { color: var(--accent); }
.rail .family .related { justify-content: flex-start; margin-top: 0; }
.rail .family .related + .related { margin-top: 12px; }

@media (max-width: 1040px) {
  .page { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 28px 16px 100px; }
  .rail { position: static; }
  .rail .arena { display: none; }
}

.page-tabs { position: sticky; top: 0; z-index: 4; display: flex; gap: 26px; margin: -8px 0 6px; background: var(--bg); border-bottom: 1px solid var(--line-soft); overflow-x: auto; scrollbar-width: none; }
.page-tabs::-webkit-scrollbar { display: none; }
.page-tabs a { display: flex; align-items: baseline; gap: 6px; padding: 12px 0 11px; margin-bottom: -1px; border-bottom: 2px solid transparent; text-decoration: none; white-space: nowrap; color: var(--muted); font-size: 14.5px; font-weight: 500; transition: color .15s, border-color .15s; }
.page-tabs a small { font-size: 11.5px; font-weight: 400; opacity: .85; }
.page-tabs a:hover { color: var(--ink); }
.page-tabs a.on { color: var(--ink); font-weight: 700; border-bottom-color: var(--accent); }
.tab-panel { animation: fade .2s; }
.tab-panel > .voice-sec:first-child, .tab-panel > .more-list > .topic-block:first-child { border-top: 0; }
.more-list.many:not(.open) > ul > li:nth-child(n+13) { display: none; }
.texts li { padding: 12px 0; }
.texts .w-meta { margin: 2px 0 0; font-size: var(--fs-small); color: var(--muted); display: block; }
.sub.about { margin-top: 34px; }

/* list items with their own look: concepts as tags, people with faces, writings as papers */
.face.tiny { width: 22px; height: 22px; font-size: 10px; box-shadow: 0 0 0 2px var(--bg); }
.face.tiny + .face.tiny { margin-inline-start: -7px; }
.stack { display: inline-flex; align-items: center; margin-inline-start: auto; text-decoration: none; }
.stack .face.none { background: var(--surface-2); border: 0; font-weight: 600; }
.topic-title { align-items: center; }
.topic-tag { padding: 3px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 15px; }
.topic-tag.shared { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); }
.topic-title a.topic-tag:hover { border-color: var(--accent); color: var(--accent); }
.topic-block .sense-line { margin-top: 10px; }
.x-row { display: flex; align-items: center; gap: 12px; }
.x-row .x-main { flex: 1; }
.pair { display: inline-flex; flex: none; }
.pair .face + .face { margin-inline-start: -12px; box-shadow: 0 0 0 2px var(--bg); }
.sbar { flex: none; display: flex; width: 120px; height: 4px; margin-top: 6px; border-radius: 3px; overflow: hidden; gap: 1px; background: var(--line-soft); }
.sbar i { display: block; min-width: 3px; }
.bg-pos { background: var(--pos); }
.bg-neg { background: var(--neg); }
.bg-neu { background: color-mix(in srgb, var(--neu) 55%, transparent); }
.texts li { display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; align-items: start; }
.texts .paper { grid-row: span 2; width: 44px; height: 52px; display: grid; place-items: end center; padding-bottom: 6px; white-space: nowrap; border: 1px solid var(--line); border-radius: 3px 10px 3px 3px; background: var(--surface); font-size: 9px; color: var(--muted); box-shadow: 0 1px 0 var(--line-soft); }

/* a thread: a section's items hang off a line under its head (a portrait or a concept's tag), one dot each */
.thread { position: relative; --rail: 21.5px; --indent: 56px; --top: 82px; }
.topic-block.thread { --rail: 18px; --indent: 40px; --top: 58px; }
.person-block.thread { --rail: 21.5px; --indent: 56px; --top: 70px; }
.person-block .topic-title { display: block; font-size: var(--fs-text); }
.person-block .x-main a { text-decoration: none; font-weight: 700; }
.person-block .x-main a:hover { color: var(--accent); }
.thread::before { content: ""; position: absolute; inset-inline-start: var(--rail); top: var(--top); bottom: 22px; width: 1px; background: var(--line); }
.thread > :not(.who-line):not(.topic-title) { margin-inline-start: var(--indent); }
.thread .claim + .claim { border-top: 0; }
.thread .claim { position: relative; }
.thread .claim::before { content: ""; position: absolute; inset-inline-start: calc(var(--rail) + .5px - 5px - var(--indent)); top: 22px; width: 7px; height: 7px; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--accent-line); transition: background .15s, border-color .15s; }
.thread .claim:hover::before, .thread .claim.open::before { background: var(--accent); border-color: var(--accent); }
.thread .claim-head { padding: 10px 0; }

.by { display: flex; align-items: center; gap: 7px; margin-top: 4px; font-size: var(--fs-small); color: var(--muted); }
.by .face.tiny { box-shadow: none; }
.by b { font-weight: 600; color: var(--ink-2); }

/* ---------- search ---------- */

.search { position: fixed; inset: 0; z-index: 30; background: #0b0f1499; display: flex; justify-content: center; padding: 12vh 16px 16px; animation: fade .15s; }
.search[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.search-box { width: min(620px, 100%); max-height: 70vh; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 80px #0006; overflow: hidden; }
.search-box input { all: unset; padding: 18px 22px; font-size: 18px; border-bottom: 1px solid var(--line-soft); }
.results { overflow: auto; padding: 6px 0; }
.results h4 { margin: 10px 22px 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.result { display: block; padding: 8px 22px; text-decoration: none; }
.result b { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result small { color: var(--muted); font-size: 12.5px; }
.result.active, .result:hover { background: var(--accent-soft); }
.result.active b { color: var(--accent); }
.search-help { margin: 0; padding: 10px 22px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line-soft); }
.search-help kbd { margin: 0 2px; }
.empty { padding: 18px 22px; color: var(--muted); font-size: 14px; }

/* ---------- small screens ---------- */

@media (max-width: 760px) {
  .bar { padding: 0 16px; gap: 10px; }
  .search-btn span, .search-btn kbd { display: none; }
  .crumbs { font-size: 12.5px; }
  .tagline { display: none; }
  .crumbs { display: none; }
  .home { overflow: auto; }
  .home .map { display: none; }
  .lists { display: block; padding: 20px 16px 40px; }
  .foot { padding: 0 16px; }
  .foot .meter, .foot .meter + span { display: none; }
  .panel {
    position: fixed; inset: auto 0 0 0; width: auto; height: 0; z-index: 20;
    border: 0; border-top: 1px solid var(--line); border-radius: 18px 18px 0 0;
    box-shadow: 0 -12px 40px #0003; transition: height .35s cubic-bezier(.2, .7, .2, 1);
  }
  .with-panel .panel { width: auto; height: 74vh; }
  .panel-inner { width: auto; height: 74vh; padding: 22px 16px 60px; }
  .doc { padding: 24px 16px 120px; }
  .pn { position: static; display: inline; margin-inline-end: 6px; }
  .mks { position: static; display: inline-flex; flex-direction: row; vertical-align: middle; margin-inline-start: 6px; }
  .paras { font-size: 17.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.nw { white-space: nowrap; }

/* home: concepts or people and works */
.mode { flex: none; display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: var(--fs-small); }
.mode a { white-space: nowrap; padding: 3px 14px; border-radius: 999px; color: var(--muted); text-decoration: none; transition: color .15s, background .15s; }
.mode a:hover { color: var(--ink); }
.mode a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
@media (max-width: 760px) {
  .mode { flex: 0 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .mode::-webkit-scrollbar { display: none; }
}
.idea-blocks { list-style: none; margin: 0; padding: 0; }
.idea-block { padding: 16px 0; }
.idea-block + .idea-block { border-top: 1px solid color-mix(in srgb, var(--line-soft) 60%, transparent); }
.idea-block .def-who { text-decoration: none; color: inherit; }
.idea-block .def-who:hover b { color: var(--accent); }
.ideas { margin-top: 4px; }
.ideas .claim + .claim { border-top: 0; }
.ideas .claim-head .rel { display: inline-block; margin-bottom: 4px; }
.ideas .claim-text { display: block; }
.more-link { display: inline-block; margin-top: 8px; font-size: var(--fs-small); color: var(--accent); text-decoration: none; }
.more-link:hover { text-decoration: underline; }

/* a claim's passage: the sentences round its quote, never the whole text */
.passage .p-sec { margin: 4px 0 6px; font-size: var(--fs-small); font-weight: 700; color: var(--muted); }
.passage-text .cut { color: var(--muted); }
.doc-summary { margin: 14px 0 0; line-height: 2; color: var(--ink-2); }
.doc .sec-title { margin-top: 36px; }

/* rail graph with many thinkers: the lighter ones show their name on hover only */
.pnode.quiet .v-name { position: absolute; top: calc(100% - 7px); left: 50%; transform: translateX(-50%); white-space: nowrap; max-width: none; margin: 0; opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 4; }
.pnode.quiet:hover .v-name, .pnode.quiet.hl .v-name, .pnode.quiet.sel .v-name { opacity: 1; }
.rail-cap small { color: var(--muted); font-weight: 500; margin-inline-start: 4px; }

/* home: a split-flap board; a card folds away on its middle line and the next folds down */
.hot { perspective: 900px; }
.hot-card { position: relative; transform-origin: 50% 50%; backface-visibility: hidden; }
.hot-card.out { animation: flap-out .2s cubic-bezier(.55, 0, .9, .45) forwards; }
.hot-card.in { animation: flap-in .32s cubic-bezier(.2, .9, .3, 1.25); }
@keyframes flap-out { to { transform: rotateX(-90deg); filter: brightness(.7); } }
@keyframes flap-in { from { transform: rotateX(90deg); filter: brightness(.7); } }
@media (prefers-reduced-motion: reduce) { .hot-card.out, .hot-card.in { animation: none; } }

/* ---------- phones ---------- */
.who-strip { display: none; }
@media (max-width: 1040px) {
  .who-strip { display: flex; gap: 14px; margin: 18px -16px 0; padding: 4px 16px 6px; overflow-x: auto; scrollbar-width: none;
    mask-image: linear-gradient(to left, #000 calc(100% - 32px), transparent); }
  .who-strip::-webkit-scrollbar { display: none; }
  .who-strip a { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 62px; text-align: center; line-height: 1.35; text-decoration: none; font-size: 11px; color: var(--muted); }
  .who-strip .face { width: 44px; height: 44px; box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--line); }
  .who-strip span { max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .page-tabs { mask-image: linear-gradient(to left, #000 calc(100% - 28px), transparent); }
}
@media (max-width: 760px) {
  /* the bar: brand, search and theme on one row; the kinds of subject on a second, full width */
  .bar { height: auto; flex-wrap: wrap; row-gap: 8px; padding: 8px 16px; }
  .brand { margin-inline-end: auto; }
  .mode { order: 10; flex: 1 0 100%; justify-content: flex-start; mask-image: linear-gradient(to left, #000 calc(100% - 24px), transparent); }
  .mode a { padding: 5px 14px; }
  .app { top: 98px; }
  /* home: one row of faces, cards two by two */
  .hot { grid-template-columns: 1fr 1fr; gap: 10px; }
  .hot-card { padding: 12px 12px 10px; border-radius: 14px; }
  .hot-card b { font-size: 15px; }
  .hot-meta { font-size: 11.5px; }
  .hot-card .stack { margin-top: 8px; }
  .hot-card .face.tiny { width: 22px; height: 22px; }
  .block { margin-top: 28px; }
  .domains { grid-template-columns: 1fr; }
  .domain-card { height: 300px; }
  /* threads keep less room at their start */
  .thread { --indent: 40px; }
  .topic-block.thread { --indent: 30px; }
  .person-block.thread { --indent: 40px; }
  .page-head h1 { font-size: 30px; }
}

/* a subject by Solar year: a small soft line at the far side of the title */
.page-head.has-trend { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 24px; }
.page-head.has-trend > * { grid-column: 1; }
.page-head.has-trend > .trend { grid-column: 2; grid-row: 1 / span 3; align-self: end; margin-bottom: 4px; }
.trend { position: relative; margin: 0; width: 200px; }
.trend svg { display: block; overflow: visible; }
.t-line { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; opacity: .75; }
.t-area { fill: var(--accent); opacity: .08; }
.t-end { fill: var(--accent); }
.trend figcaption { direction: ltr; display: flex; justify-content: space-between; margin-top: 3px; font-size: 10.5px; color: var(--muted); opacity: .8; }
@media (max-width: 760px) { .trend { width: 120px; } .trend svg { width: 120px; height: 34px; } .page-head.has-trend { column-gap: 12px; } }
@media (max-width: 760px) {
  .thinker-head:has(> .trend) { grid-template-columns: auto minmax(0, 1fr); }
  .thinker-head > .trend { grid-column: 1 / -1; grid-row: auto; justify-self: end; margin: 10px 0 0; }
}

.claim-foot .filed { color: var(--ink-2); }

/* ---------- phones: a native feel ---------- */
html, body { height: 100dvh; }
body { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.back-btn, .to-top, .landing-foot, .search-close { display: none; }
.back-btn svg { stroke-width: 2; stroke-linejoin: round; }
@media (max-width: 760px) {
  .bar { padding-top: max(8px, env(safe-area-inset-top)); }
  body:not([data-view="home"]) .back-btn { display: grid; margin-inline-start: -8px; }
  /* the kinds of subject only where one chooses among them: home and the maps */
  body:not([data-view="home"]):not([data-view="g"]) .mode { display: none; }
  body:not([data-view="home"]):not([data-view="g"]) .app { top: 52px; }
  .foot { display: none; }
  .app { bottom: 0; }
  .page, .landing, .doc { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .landing-foot { display: block; margin: 44px 0 0; text-align: center; font-size: 12px; color: var(--muted); }
  .landing-foot a { color: var(--accent); text-decoration: none; }
  .foot-progress { display: block; margin-bottom: 8px; line-height: 1.8; }
  .doc .back { display: none; }
  .to-top:not([hidden]) { display: grid; place-items: center; position: fixed; z-index: 15; inset-inline-start: 16px; bottom: calc(18px + env(safe-area-inset-bottom));
    width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); color: var(--ink-2);
    background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(8px); box-shadow: 0 10px 24px -12px #0006; animation: fade .2s; }
  .to-top svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  /* search fills the screen, its field at the top, a close button beside it */
  .search { padding: 0; background: var(--bg); }
  .search-box { position: relative; width: 100%; height: 100%; max-height: none; border: 0; border-radius: 0; box-shadow: none; padding-top: env(safe-area-inset-top); }
  .search-box input { font-size: 17px; padding: 16px 16px 16px 76px; }
  .search-close { display: block; position: absolute; top: calc(10px + env(safe-area-inset-top)); inset-inline-end: 10px; height: 36px; padding: 0 12px;
    border: 0; border-radius: 9px; background: var(--surface-2); color: var(--ink-2); font: inherit; font-size: 14px; }
  .search-help { display: none; }
  .result { padding: 12px 16px; }
  .results h4 { margin: 14px 16px 4px; }
  /* touch: quick feedback, larger targets */
  .claim-head:active, .hot-card:active, .chip:active, .who-strip a:active, .texts a:active, .groups a:active, .toplist a:active { opacity: .55; }
  .who-strip a.sel .face { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
  .who-strip a.sel span { color: var(--accent); font-weight: 700; }
  .more-btn { padding: 10px 0; }
  .page-tabs a { padding: 14px 0 13px; }
  .groups a { padding: 10px 0; }
}
@media (max-width: 760px) { .domain-card { height: auto; max-height: 320px; } }
.bio-more { display: none; }
@media (max-width: 760px) {
  .thinker-head .bio:not(.open) { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
  .bio-more { display: block; grid-column: 1 / -1; justify-self: start; margin-top: 4px; padding: 6px 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: var(--fs-small); cursor: pointer; }
}
/* a category's lists on small screens: subjects as cards, thinkers with their portraits */
.lists .list-title { margin: 8px 0 12px; font-size: 15px; font-weight: 800; color: var(--ink); }
.lists .list-title small { margin-inline-start: 4px; font-size: 12px; font-weight: 500; color: var(--muted); }
.lists .subject-cards { margin-bottom: 32px; }
.people-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.people-list a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: var(--surface); box-shadow: 0 0 0 1px var(--line-soft); text-decoration: none; min-width: 0; }
.people-list .face.mid { flex: none; width: 38px; height: 38px; }
.people-list b { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; line-height: 1.4; }
.people-list small { display: none; }
.people-list a:active { opacity: .55; }
/* small screens: the strip of faces stays at the top with the tabs under it, so any thinker is one tap
   away; short pages get room at the end so the last thinker can still come up to the top */
@media (max-width: 1040px) {
  .who-strip { position: sticky; top: 0; z-index: 5; height: 70px; box-sizing: border-box; margin: 10px -16px 0; padding: 8px 16px 4px; gap: 10px; background: var(--bg); }
  .who-strip a { width: 54px; gap: 3px; font-size: 10.5px; }
  .who-strip .face { width: 38px; height: 38px; }
  .who-strip span { -webkit-line-clamp: 1; }
  .who-strip ~ .page-tabs { top: 70px; margin-top: 0; }
  .read:has(.who-strip) { padding-bottom: 65dvh; }
}
/* home portraits: one row only, as many as the width holds */
.portraits { max-height: 66px; overflow: hidden; padding-top: 6px; }
@media (max-width: 760px) { .portraits { max-height: 54px; margin-top: 28px; } }
/* the bar's title: the page's name, shown on small screens once its heading has scrolled away */
.bar-title { display: none; }
@media (max-width: 760px) {
  .bar-title { display: block; flex: 1; min-width: 0; margin-inline-end: auto; font-size: 16px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    opacity: 0; transform: translateY(6px); transition: opacity .18s, transform .18s; pointer-events: none; }
  body.titled .bar-title { opacity: 1; transform: none; }
  body.titled .brand span { display: none; }
  body.titled .brand { margin-inline-end: 0; }
  body:not(.titled) .bar-title { flex: 0; width: 0; }
}
/* home portraits: one row only, as many as the width holds */
.portraits { max-height: 66px; overflow: hidden; padding-top: 6px; }
@media (max-width: 760px) { .portraits { max-height: 54px; margin-top: 28px; } }
/* the bar's title: the page's name, shown on small screens once its heading has scrolled away */
.bar-title { display: none; }
@media (max-width: 760px) {
  .bar-title { display: block; flex: 1; min-width: 0; margin-inline-end: auto; font-size: 16px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    opacity: 0; transition: opacity .18s; pointer-events: none; }
  body.titled .bar-title { opacity: 1; }
  body.titled .brand span { display: none; }
  body.titled .brand { margin-inline-end: 0; }
  body:not(.titled) .bar-title { flex: 0; width: 0; }
}
/* the stuck faces keep a breath of space under the bar */
@media (max-width: 1040px) {
  .who-strip { height: 80px; padding-top: 14px; border-top: 0; }
  .who-strip ~ .page-tabs { top: 80px; }
}
/* a book's pager: step buttons around a track of its parts, one tick each, taller where more was found */
.book-nav { display: flex; align-items: center; gap: 10px; margin: -8px 0 26px; padding: 10px 12px; border-radius: 16px; background: var(--surface); box-shadow: 0 0 0 1px var(--line-soft); }
.bn-step { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); color: var(--ink-2); text-decoration: none; }
.bn-step svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.bn-step[aria-disabled] { opacity: .3; pointer-events: none; }
.bn-step:not([aria-disabled]):hover { color: var(--accent); }
.bn-track { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; }
.bn-ticks { flex: 1; min-width: 0; display: flex; justify-content: center; align-items: flex-end; gap: 3px; height: 28px; overflow-x: auto; scrollbar-width: none; }
.bn-ticks::-webkit-scrollbar { display: none; }
.bn-ticks a { flex: 1 0 6px; max-width: 14px; height: calc(var(--h) * 100%); border-radius: 3px; background: color-mix(in srgb, var(--ink) 16%, transparent); transition: background .15s; }
.bn-ticks a:hover { background: color-mix(in srgb, var(--accent) 55%, transparent); }
.bn-ticks a.on { background: var(--accent); }
.bn-at { flex: none; font-size: 15px; font-weight: 800; color: var(--ink); }
.bn-at small { font-size: 12px; font-weight: 500; color: var(--muted); }
/* the text's own headings, between the items and as a short contents list */
.claims .sec-mark { list-style: none; margin: 26px 0 8px; padding-inline-start: 0; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.claims .sec-mark::before { display: none; }
.claims .sec-mark:first-child { margin-top: 4px; }
@media (max-width: 760px) {
  /* the pager rides at the bottom, under the thumb */
  .doc.has-pager .book-nav { position: fixed; z-index: 14; inset-inline: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); margin: 0; padding: 8px;
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); box-shadow: 0 0 0 1px var(--line-soft), 0 14px 30px -14px #0007; }
  .doc.has-pager .doc-foot { display: none; }
  .doc.has-pager { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
  body:has(.doc.has-pager) .to-top { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .bn-step { width: 44px; height: 44px; }
  .bn-ticks a { flex-basis: 5px; }
  }
/* local only: the way to the usage dashboard */
