/* Rethink Matters: Provocation Map
   Design tokens are lifted from rethinkmatters.org: paper #FAF8F3, ink #22211C, faint #6B675C, line #E6E1D6,
   accents olive #5B6B3C · terracotta #B65438 · teal #2F6B63 · gold #C9963F, Inter (UI) + Spectral (editorial). */

:root {
  --paper: #FAF8F3;
  --ink: #22211C;
  --faint: #6B675C;
  --line: #E6E1D6;
  --card: #FFFDF6;
  --olive: #5B6B3C;
  --terracotta: #B65438;
  --teal: #2F6B63;
  --gold: #C9963F;
  --thread: #666666;
  --font-ui: Inter, "Inter Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: Spectral, "Spectral Fallback", Georgia, "Times New Roman", serif;
  --hdr-h: 64px;
  --left-w: 328px;
  --right-w: 456px;
  --shadow: 0 1px 2px rgba(34, 33, 28, .05), 0 8px 28px rgba(34, 33, 28, .07);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-ui); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- header (mirrors the site header) */
.site-header {
  position: relative; z-index: 60; height: var(--hdr-h); border-bottom: 1px solid var(--line);
  background: rgba(250, 248, 243, .85); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.hdr-inner { height: 100%; max-width: 1280px; margin: 0 auto; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand span { font-weight: 600; font-size: 16px; letter-spacing: -.01em; white-space: nowrap; }
.brand .crumb { font-weight: 400; color: var(--faint); }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { font-size: 14px; color: var(--faint); text-decoration: none; transition: color .15s; white-space: nowrap; }
.nav a:hover { color: var(--ink); }
.nav a.btn-apply { background: var(--ink); color: var(--paper); font-weight: 500; padding: 8px 20px; border-radius: 999px; transition: opacity .15s; }
.nav a.btn-apply:hover { color: var(--paper); opacity: .85; }
body.embed .site-header { display: none; }
body.embed { --hdr-h: 0px; }

/* ---------------------------------------------------------------- app shell */
.app { position: relative; height: calc(100vh - var(--hdr-h)); height: calc(100dvh - var(--hdr-h)); display: flex; overflow: hidden; }
.left {
  width: var(--left-w); flex: none; border-right: 1px solid var(--line); background: var(--paper);
  overflow-y: auto; overflow-x: hidden; padding: 22px 20px 28px; z-index: 30; transition: margin-left .35s var(--ease), visibility 0s;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
body.left-closed .left { margin-left: calc(-1 * var(--left-w)); visibility: hidden; transition: margin-left .35s var(--ease), visibility 0s linear .35s; }
.stage { position: relative; flex: 1; min-width: 0; overflow: hidden; touch-action: manipulation; perspective: 1600px; perspective-origin: 50% 35%; }

/* ---------------------------------------------------------------- left panel */
.title-block h1 { font-family: var(--font-serif); font-weight: 500; font-size: 34px; line-height: 1.05; letter-spacing: -.025em; margin: 2px 0 8px; }
.title-block p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--faint); }
.title-block .stats { margin-top: 10px; font-size: 12.5px; color: var(--faint); display: flex; flex-wrap: wrap; gap: 6px 14px; }
.title-block .stats b { color: var(--ink); font-weight: 600; }

.search { position: relative; margin: 18px 0 14px; }
.search input {
  width: 100%; height: 42px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); padding: 0 40px 0 40px;
  font: inherit; font-size: 14px; color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s;
}
.search input::placeholder { color: #9a958a; }
.search input::-webkit-search-cancel-button, .search input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
.search input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(47, 107, 99, .12); }
.search .ico { position: absolute; left: 14px; top: 12px; width: 18px; height: 18px; color: var(--faint); pointer-events: none; }
.search .clr { position: absolute; right: 8px; top: 7px; width: 28px; height: 28px; border: 0; background: transparent; border-radius: 50%; cursor: pointer; color: var(--faint); display: none; }
.search .clr:hover { background: var(--line); }
.search.has-text .clr { display: block; }
.results {
  position: absolute; z-index: 40; left: 0; right: 0; top: 46px; background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); max-height: 340px; overflow: auto; padding: 6px; display: none;
}
.results.open { display: block; }
.results button { display: flex; width: 100%; align-items: center; gap: 10px; text-align: left; border: 0; background: transparent; padding: 8px 10px; border-radius: 9px; cursor: pointer; font-size: 13.5px; line-height: 1.3; }
.results button:hover, .results button.active { background: rgba(34, 33, 28, .06); }
.results .k { flex: none; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); width: 62px; }
.results .none { padding: 10px; font-size: 13px; color: var(--faint); }

.tabs { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; margin-bottom: 18px; background: rgba(255, 253, 246, .6); }
.tabs button { flex: 1; border: 0; background: transparent; padding: 7px 8px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--faint); cursor: pointer; transition: all .15s; }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.tabs button:not([aria-selected="true"]):hover { color: var(--ink); }

.sec { margin: 0 0 22px; }
.sec > h3 { margin: 0 0 9px; font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); display: flex; justify-content: space-between; align-items: baseline; }
.sec > h3 small { font-weight: 400; letter-spacing: 0; text-transform: none; font-size: 12px; }
.sec .hint { font-size: 12.5px; color: var(--faint); margin: 8px 0 0; line-height: 1.45; }

.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: transparent; color: var(--faint); border-radius: 999px;
  padding: 5px 12px; font-size: 13px; line-height: 1.25; cursor: pointer; transition: all .15s; text-align: left;
}
.chip:hover { color: var(--ink); border-color: #cfc8b8; }
.chip[aria-pressed="true"], .chip.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--c, var(--faint)); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .0); }
.chip[aria-pressed="true"] .dot, .chip.on .dot { box-shadow: 0 0 0 1.5px var(--paper); }
.chip .n { opacity: .6; font-variant-numeric: tabular-nums; font-size: 11.5px; }
.chip.dashed { border-style: dashed; }
.chip.sm { padding: 3px 10px; font-size: 12.5px; }
.chip.static { cursor: default; }
.chip.ro { cursor: pointer; background: var(--card); color: var(--ink); }
.chip.ro:hover { border-color: var(--ink); }

.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; }
.row label { cursor: pointer; flex: 1; }
.row small { display: block; color: var(--faint); font-size: 12px; line-height: 1.35; }
.switch { position: relative; width: 38px; height: 22px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; background: #d9d3c5; border-radius: 999px; transition: background .2s; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .2s var(--ease); }
.switch input:checked + i { background: var(--ink); }
.switch input:checked + i::after { transform: translateX(16px); }
.switch input:focus-visible + i { outline: 2px solid var(--teal); outline-offset: 2px; }

input[type="range"] { width: 100%; accent-color: var(--ink); margin: 6px 0 0; }
.range-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--faint); }

details.facet { border-top: 1px solid var(--line); padding: 10px 0; }
details.facet:last-child { border-bottom: 1px solid var(--line); }
details.facet summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; font-weight: 500; }
details.facet summary::-webkit-details-marker { display: none; }
details.facet summary small { font-weight: 400; color: var(--faint); font-size: 12px; }
details.facet summary::after { content: "+"; color: var(--faint); font-weight: 400; margin-left: 8px; }
details.facet[open] summary::after { content: "–"; }
details.facet .q { font-size: 12.5px; color: var(--faint); margin: 8px 0 10px; line-height: 1.45; }
details.facet .seg { margin-bottom: 4px; }

.btn { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 7px 16px; font-size: 13px; cursor: pointer; transition: all .15s; }
.btn:hover { border-color: var(--ink); }
.btn.solid { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn.solid:hover { opacity: .88; }
.btn.ghost { border-color: transparent; color: var(--faint); }
.btn.ghost:hover { color: var(--ink); border-color: var(--line); }
.matchline { font-size: 13px; color: var(--faint); display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; min-height: 30px; }
.matchline b { color: var(--ink); }

/* threads + index lists */
.thread-card { display: block; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 16px; padding: 14px 16px 15px; margin-bottom: 10px; cursor: pointer; transition: all .18s; }
.thread-card:hover { border-color: #cfc8b8; box-shadow: var(--shadow); transform: translateY(-1px); }
.thread-card h4 { margin: 0 0 4px; font-family: var(--font-serif); font-weight: 500; font-size: 19px; letter-spacing: -.01em; line-height: 1.2; }
.thread-card p { margin: 0 0 9px; font-size: 13px; line-height: 1.5; color: var(--faint); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.thread-card .meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--faint); }
.thread-card .pips { display: flex; gap: 3px; }
.thread-card .pips i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }

.idx-arc {
  display: flex; align-items: center; gap: 9px; width: 100%; margin: 18px 0 6px; padding: 0; border: 0; background: transparent; cursor: pointer; text-align: left;
  font-family: var(--font-serif); font-style: italic; font-size: 15px; color: var(--faint); transition: color .15s;
}
.idx-arc::before { content: ""; width: 16px; height: 3px; border-radius: 2px; background: var(--c, var(--line)); flex: none; }
.idx-arc:hover { color: var(--ink); }
.idx-theme { margin: 6px 0 10px; }
.idx-theme > button { display: flex; align-items: baseline; gap: 8px; border: 0; background: transparent; padding: 4px 0; cursor: pointer; text-align: left; font-weight: 600; font-size: 14px; letter-spacing: -.005em; }
.idx-theme > button i { font-style: normal; font-weight: 500; font-size: 11px; color: var(--faint); width: 18px; flex: none; }
.idx-theme ul { list-style: none; margin: 2px 0 0; padding: 0 0 0 26px; }
.idx-theme li button { display: flex; gap: 8px; align-items: baseline; border: 0; background: transparent; padding: 3px 0; cursor: pointer; text-align: left; font-size: 13.5px; color: var(--faint); line-height: 1.35; }
.idx-theme li button:hover { color: var(--ink); }
.idx-theme li .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--c); transform: translateY(0px); }

/* ---------------------------------------------------------------- stage overlays */
.fab-row { position: absolute; top: 16px; left: 16px; z-index: 20; display: flex; gap: 8px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 253, 246, .92); display: grid; place-items: center; cursor: pointer; transition: all .15s; backdrop-filter: blur(6px); box-shadow: 0 1px 2px rgba(34, 33, 28, .05); }
.icon-btn:hover { border-color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }

.legend {
  position: absolute; left: 16px; bottom: 16px; z-index: 20; max-width: 280px; background: rgba(255, 253, 246, .93); border: 1px solid var(--line); border-radius: 16px;
  padding: 12px 14px 12px; font-size: 12.5px; backdrop-filter: blur(6px); box-shadow: 0 1px 2px rgba(34, 33, 28, .04);
}
.legend-inline { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 253, 246, .7); font-size: 12.5px; }
.legend-inline ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.legend-inline li { display: flex; align-items: center; gap: 9px; line-height: 1.3; }
.legend-inline li i { width: 11px; height: 11px; border-radius: 50%; background: var(--c); flex: none; }
.legend-inline .keys { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); display: grid; gap: 5px; color: var(--faint); }
.legend-inline .keys span { display: flex; align-items: center; gap: 8px; }
.legend-inline .keys-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 10px; }
.legend-inline svg { width: 22px; height: 12px; flex: none; }
.legend h4 { margin: 0 0 7px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.legend ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.legend li { display: flex; align-items: center; gap: 8px; line-height: 1.3; }
.legend li i { width: 11px; height: 11px; border-radius: 50%; background: var(--c); flex: none; opacity: .9; }
.legend .keys { margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--line); display: grid; gap: 4px; color: var(--faint); }
.legend .keys span { display: flex; align-items: center; gap: 8px; }
.legend svg { width: 22px; height: 12px; flex: none; }
.legend-toggle { position: absolute; left: 16px; bottom: 16px; }
body.legend-hidden .legend { display: none; }
.tip {
  position: absolute; z-index: 25; pointer-events: none; max-width: 280px; background: var(--ink); color: var(--paper); border-radius: 12px; padding: 8px 12px; font-size: 12.5px; line-height: 1.4;
  opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s; box-shadow: var(--shadow);
}
.tip.show { opacity: 1; transform: none; }
.tip b { display: block; font-weight: 600; font-size: 13px; margin-bottom: 1px; }
.tip small { color: rgba(250, 248, 243, .7); }

.threadbar {
  position: absolute; z-index: 22; left: 50%; bottom: 20px; transform: translate(-50%, 24px); width: min(640px, calc(100% - 32px)); opacity: 0; pointer-events: none;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 16px 18px 14px;
  visibility: hidden; transition: opacity .3s var(--ease), transform .3s var(--ease), left .3s var(--ease), width .3s var(--ease), visibility 0s linear .3s;
}
.threadbar.open { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); visibility: visible; transition: opacity .3s var(--ease), transform .3s var(--ease), left .3s var(--ease), width .3s var(--ease), visibility 0s; }
body.right-open .threadbar { left: calc(50% - var(--right-w) / 2); width: min(640px, calc(100% - var(--right-w) - 32px)); }
.threadbar .t-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.threadbar .t-top .btn { white-space: nowrap; flex: none; }
.threadbar .t-title { font-family: var(--font-serif); font-weight: 500; font-size: 19px; letter-spacing: -.01em; }
.threadbar .t-step { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin: 8px 0 3px; display: flex; align-items: center; gap: 8px; }
.threadbar .t-step .num { width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: var(--paper); display: inline-grid; place-items: center; font-size: 11px; letter-spacing: 0; }
.threadbar .t-topic { display: block; border: 0; background: transparent; padding: 0; text-align: left; font-weight: 600; font-size: 15px; margin: 0 0 2px; cursor: pointer; }
.threadbar .t-topic:hover { text-decoration: underline; text-underline-offset: 3px; }
.threadbar .t-text { font-size: 14px; color: var(--ink); opacity: .86; margin: 0 0 12px; line-height: 1.5; min-height: 42px; }
.threadbar .t-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.threadbar .t-dots { display: flex; gap: 6px; }
.threadbar .t-dots button { width: 9px; height: 9px; border-radius: 50%; border: 0; background: #d9d3c5; padding: 0; cursor: pointer; }
.threadbar .t-dots button.on { background: var(--ink); transform: scale(1.25); }
.threadbar .t-sowhat { font-family: var(--font-serif); font-style: italic; font-size: 15px; line-height: 1.45; color: var(--ink); margin: 0 0 12px; }

.qcap {
  position: absolute; z-index: 19; left: 50%; top: 62px; transform: translateX(-50%); width: min(620px, calc(100% - 190px)); border: 0; background: transparent; cursor: pointer;
  text-align: center; padding: 6px 14px 7px; border-radius: 16px; background: rgba(250, 248, 243, .82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background .2s, opacity .25s;
}
.qcap:hover { background: rgba(255, 253, 246, .97); }
.qcap .q { display: block; font-family: var(--font-serif); font-style: italic; font-weight: 500; font-size: 17px; line-height: 1.35; letter-spacing: -.005em; color: var(--ink); }
.qcap .c { display: block; margin-top: 3px; font-size: 11.5px; color: var(--faint); letter-spacing: .01em; }
body.right-open .qcap { left: calc(50% - var(--right-w) / 2); width: min(620px, calc(100% - var(--right-w) - 60px)); }
body:not([data-level="landscape"]) .qcap { display: none; }
.notice { position: absolute; left: 50%; bottom: 60px; top: auto; transform: translateX(-50%); z-index: 21; font-size: 12.5px; color: var(--faint); background: rgba(255, 253, 246, .9); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; backdrop-filter: blur(6px); max-width: calc(100% - 140px); text-align: center; pointer-events: none; opacity: 0; transition: opacity .25s; }
.notice.show { opacity: 1; }
body.right-open .notice { left: calc(50% - var(--right-w) / 2); }
body.thread-on .notice { bottom: 262px; }
body[data-level="landscape"] .notice { left: 16px; bottom: 16px; transform: none; max-width: 300px; text-align: left; }

/* ---------------------------------------------------------------- right (note) panel */
.right {
  position: absolute; z-index: 35; top: 0; bottom: 0; right: 0; width: var(--right-w); max-width: 100%; background: var(--card); border-left: 1px solid var(--line);
  box-shadow: -10px 0 32px rgba(34, 33, 28, .06); transform: translateX(102%); transition: transform .38s var(--ease), visibility 0s linear .38s; display: flex; flex-direction: column;
  visibility: hidden;
}
body.right-open .right { transform: none; visibility: visible; transition: transform .38s var(--ease), visibility 0s; }
.r-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px 8px 20px; }
.r-head .crumb { font-size: 12px; color: var(--faint); letter-spacing: .01em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-head .acts { display: flex; gap: 4px; flex: none; }
.r-head .icon-btn { width: 34px; height: 34px; box-shadow: none; background: transparent; border-color: transparent; }
.r-head .icon-btn:hover { background: rgba(34, 33, 28, .06); border-color: transparent; }
.r-body { flex: 1; overflow-y: auto; padding: 4px 26px 40px 26px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.r-body h1 { font-family: var(--font-serif); font-weight: 500; font-size: 30px; line-height: 1.12; letter-spacing: -.025em; margin: 6px 0 14px; }
.r-body h2 { font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); margin: 30px 0 11px; }
.r-body h2 small { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 12px; margin-left: 6px; }
.kind { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); }
.kind i { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--faint)); }
.prompt {
  font-family: var(--font-serif); font-size: 19px; line-height: 1.5; color: var(--ink); margin: 0 0 18px; padding-left: 16px; border-left: 3px solid var(--c, var(--line)); font-style: italic;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lens-row { display: grid; grid-template-columns: 74px 1fr; gap: 8px 10px; align-items: center; margin: 0 0 6px; }
.lens-row > span { font-size: 12px; color: var(--faint); }
.rel-item { display: block; width: 100%; text-align: left; border: 1px solid var(--line); background: transparent; border-radius: 14px; padding: 11px 14px 12px; margin-bottom: 8px; cursor: pointer; transition: all .15s; }
.rel-item:hover { border-color: var(--ink); background: rgba(255, 255, 255, .6); }
.rel-item .rt { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14.5px; line-height: 1.3; }
.rel-item .rt i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.rel-item .ty { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-left: auto; padding-left: 8px; white-space: nowrap; }
.rel-item .why { margin: 5px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--ink); opacity: .82; }
.rel-item .via { margin: 5px 0 0; font-size: 12px; color: var(--faint); line-height: 1.5; }
.rel-item.derived { border-style: dashed; }
.ty-echoes { color: var(--teal); } .ty-tension { color: var(--terracotta); } .ty-enables { color: var(--olive); } .ty-extends { color: #9a6f1f; }
.more { border: 0; background: transparent; color: var(--faint); font-size: 13px; cursor: pointer; padding: 4px 0; text-decoration: underline; text-underline-offset: 3px; }
.more:hover { color: var(--ink); }

.disc { border: 1px solid var(--line); border-radius: 16px; margin-bottom: 10px; background: rgba(255, 255, 255, .5); overflow: hidden; }
.disc > summary { list-style: none; cursor: pointer; padding: 13px 16px; display: block; }
.disc > summary::-webkit-details-marker { display: none; }
.disc .d-title { font-weight: 600; font-size: 14.5px; line-height: 1.35; display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.disc .d-title::after { content: "+"; color: var(--faint); font-weight: 400; }
.disc[open] .d-title::after { content: "–"; }
.disc .d-meta { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 5px 8px; font-size: 12px; color: var(--faint); }
.disc .d-meta .tagm { border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; background: var(--paper); }
.disc .d-meta .tagm.proposed { border-style: dashed; }
.disc .d-body { padding: 2px 16px 16px; border-top: 1px solid var(--line); }
.d-body h3 { font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); margin: 16px 0 7px; }
.d-body blockquote { margin: 0 0 8px; padding: 0 0 0 14px; border-left: 3px solid var(--line); font-family: var(--font-serif); font-size: 16px; line-height: 1.55; color: var(--ink); }
.d-body blockquote p { margin: 0 0 9px; }
.d-body .session-tag { display: inline-block; font-size: 11.5px; font-weight: 600; color: var(--faint); margin: 6px 0 4px; }
.d-body ul.qs { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.5; }
.d-body ul.qs li { margin-bottom: 4px; }
.md { font-size: 14px; line-height: 1.58; }
.md p { margin: 0 0 8px; }
.md ul { margin: 0 0 8px; padding-left: 18px; }
.md ul ul { margin: 3px 0 4px; }
.md li { margin-bottom: 4px; }
.md strong { font-weight: 600; }
.md a, .refs a, .r-body a.ext { color: var(--teal); text-underline-offset: 3px; }
.refs { margin: 0; padding: 0; list-style: none; font-size: 13.5px; display: grid; gap: 4px; }
.refs li::before { content: "↗ "; color: var(--faint); }
.books .chip { cursor: pointer; }
.cite { font-size: 13px; color: var(--faint); margin: 8px 0 0; }
.value-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.value-grid .vg { text-align: left; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.value-grid .vg-n { margin-left: auto; font-weight: 400; color: var(--faint); font-size: 12px; }
.value-grid b { display: flex; align-items: center; gap: 7px; font-size: 14px; }
.value-grid b i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.value-grid small { display: block; color: var(--faint); font-size: 12px; line-height: 1.4; margin-top: 3px; }
.howto { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.55; }
.howto li { margin-bottom: 6px; }
.poles { display: flex; align-items: stretch; gap: 0; margin: 4px 0 16px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; font-size: 13.5px; font-weight: 600; }
.poles span { flex: 1; padding: 10px 12px; line-height: 1.3; text-align: center; }
.poles span + span { border-left: 1px solid var(--line); }
.poles em { align-self: center; font-style: normal; color: var(--faint); padding: 0 2px; font-weight: 400; }
.group-h { font-size: 12.5px; color: var(--faint); margin: 12px 0 6px; font-weight: 500; }
.conf { font-size: 12px; color: var(--faint); line-height: 1.5; margin-top: 30px; padding-top: 14px; border-top: 1px solid var(--line); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  :root { --left-w: 300px; --right-w: 420px; }
}
@media (max-width: 820px) {
  .hdr-inner { padding: 0 16px; }
  .nav a:not(.btn-apply) { display: none; }
  .left { position: absolute; z-index: 45; top: 0; bottom: 0; left: 0; width: min(88vw, 360px); box-shadow: 10px 0 40px rgba(34, 33, 28, .12); margin-left: 0; transform: translateX(-102%); visibility: hidden; transition: transform .35s var(--ease), visibility 0s linear .35s; }
  body.left-closed .left { margin-left: 0; }
  body.left-open .left { transform: none; visibility: visible; transition: transform .35s var(--ease), visibility 0s; }
  .right { top: auto; height: 68%; width: 100%; border-left: 0; border-top: 1px solid var(--line); border-radius: 22px 22px 0 0; transform: translateY(104%); box-shadow: 0 -10px 40px rgba(34, 33, 28, .12); }
  body.right-open .right { transform: none; }
  .r-body { padding: 4px 20px 40px; }
  .r-body h1 { font-size: 26px; }
  .legend { display: none; }
  .legend-toggle { display: none; }
  .qcap { display: none !important; }   /* the question heads the list of themes instead */
  .threadbar { bottom: 70px; }
  body.right-open .threadbar { opacity: 0; pointer-events: none; visibility: hidden; }
  .notice { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation-duration: .01ms !important; }   /* none at all: sizes must change at once, or the top row measures stale widths */
}

/* ================================================================ the three levels */
/* each level is a plane; switching tilts one past the other (instant with reduced motion) */
.plane { position: absolute; inset: 0; transform-origin: 50% 50%; transition: transform .52s var(--ease), opacity .42s var(--ease); }
.plane.off { visibility: hidden; opacity: 0; pointer-events: none; }
.plane.leave-down { transform: translateY(-14%) rotateX(32deg) scale(1.04); opacity: 0; pointer-events: none; }
.plane.leave-up { transform: translateY(16%) rotateX(32deg) scale(.9); opacity: 0; pointer-events: none; }
.plane.enter-down { transform: translateY(16%) rotateX(32deg) scale(.9); opacity: 0; transition: none; }
.plane.enter-up { transform: translateY(-14%) rotateX(32deg) scale(1.04); opacity: 0; transition: none; }

/* ---------------------------------------------------------------- level switcher */
.levels {
  position: absolute; z-index: 24; top: 12px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 2px; padding: 4px;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 253, 246, .93); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 1px 2px rgba(34, 33, 28, .05); transition: left .38s var(--ease);
}
.levels button { display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent; border-radius: 999px; padding: 6px 13px 6px 9px; font-size: 13.5px; font-weight: 500; color: var(--faint); cursor: pointer; transition: background .15s, color .15s; }
.levels button:hover { color: var(--ink); background: rgba(34, 33, 28, .05); }
.levels button[aria-current="page"] { background: var(--ink); color: var(--paper); }
.levels .lv-ico, .peek .lv-ico { width: 20px; height: 19px; flex: none; }
.levels .lv-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; text-align: left; min-width: 0; }
.levels .lv-what { display: none; font-size: 12.5px; font-weight: 600; max-width: 190px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.levels button.has-what .lv-what { display: block; }
.levels button.has-what .lv-name { font-size: 9.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.levels button.has-what { padding-top: 4px; padding-bottom: 4px; }
body.right-open .levels .lv-what { max-width: 120px; }
.levels .lv-sep { width: 14px; height: 0; border-top: 1.5px dashed #b9b2a3; flex: none; }
.levels .lv-sep.solid { border-top-style: solid; }
body.right-open .levels { left: calc(50% - var(--right-w) / 2); }


.peek {
  position: absolute; z-index: 20; left: 50%; bottom: 14px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); background: rgba(255, 253, 246, .94); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-radius: 999px;
  padding: 6px 15px 6px 10px; font-size: 13px; color: var(--faint); cursor: pointer; box-shadow: 0 1px 2px rgba(34, 33, 28, .05); transition: color .15s, border-color .15s, left .38s var(--ease), bottom .2s;
}
.peek:hover { color: var(--ink); border-color: var(--ink); bottom: 11px; }
.peek[hidden] { display: none; }
body.right-open .peek { left: calc(50% - var(--right-w) / 2); }
body.thread-on .peek { opacity: 0; pointer-events: none; visibility: hidden; }

.pill-btn {
  height: 40px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: rgba(255, 253, 246, .92); backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px); border-radius: 999px; padding: 0 15px 0 12px; font-size: 13.5px; font-weight: 500; cursor: pointer; box-shadow: 0 1px 2px rgba(34, 33, 28, .05); transition: border-color .15s;
}
.pill-btn svg { width: 18px; height: 18px; color: var(--gold); flex: none; }
.pill-btn:hover { border-color: var(--ink); }
body.thread-on #btnWalks { display: none; }   /* (Up stays: it ends the walk and goes up a level) */

/* ---------------------------------------------------------------- Landscape: the nine themes on a ring */
.landscape { overflow: hidden; touch-action: manipulation; }
.ls-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.ls-ring { fill: none; stroke: rgba(107, 103, 92, .32); stroke-width: 1; stroke-dasharray: 1.5 5; }
.ls-band { fill: none; stroke-width: 3; stroke-linecap: round; opacity: .55; transition: opacity .2s, stroke-width .2s; }
.ls-band.on { opacity: .95; stroke-width: 4.6; }
.landscape.focused .ls-band:not(.on) { opacity: .16; }
.ls-link { fill: none; stroke: #6B675C; stroke-dasharray: 5 5; stroke-linecap: round; opacity: 0; transition: opacity .22s, stroke .22s; }
.ls-link.rest { opacity: .34; }
.ls-link.faint { opacity: .08; }
.ls-link.lit { opacity: .9; stroke: var(--ink); }

.ls-center {
  position: absolute; border-radius: 50%; padding: 0 10px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  border: calc(var(--rc, 80px) * .12) solid transparent;
  background: linear-gradient(var(--paper), var(--paper)) padding-box, linear-gradient(135deg, #e7cfab, #eab55c 20%, #a04340 35%, #983836 50%, #aa6336 65%, #7f8c64 80%, #48909f) border-box;
  transition: box-shadow .2s;
}
.ls-center .ls-q { font-family: var(--font-serif); font-weight: 500; font-size: var(--fsq, max(13px, calc(var(--rc, 80px) * .2))); line-height: 1.12; letter-spacing: -.01em; }
.ls-center .ls-full { display: none; }
.ls-center .ls-sub { margin-top: 6px; font-size: 11px; color: var(--faint); max-width: 84%; line-height: 1.25; }
.ls-center:hover, .ls-center.sel { box-shadow: 0 0 0 7px rgba(201, 150, 63, .15); }

.ls-chapter { display: contents; }
.ls-arc {
  position: absolute; z-index: 2; border: 0; background: transparent; padding: 2px 4px; cursor: pointer; font-family: var(--font-serif); font-style: italic; font-weight: 500;
  font-size: 16px; line-height: 1.2; color: var(--faint); color: color-mix(in srgb, var(--c) 40%, var(--ink)); max-width: var(--capw, 172px); text-align: left;
}
.ls-arc.cap-r { transform: translate(0, -50%); }
.ls-arc.cap-l { transform: translate(-100%, -50%); text-align: right; }
.ls-arc.cap-t { transform: translate(-50%, -100%); text-align: center; max-width: none; white-space: nowrap; }
.ls-arc.cap-b { transform: translate(-50%, 0); text-align: center; max-width: none; white-space: nowrap; }
.ls-arc:hover, .ls-arc.on { text-decoration: underline; text-decoration-color: var(--c); text-decoration-thickness: 1.5px; text-underline-offset: 4px; }


.ls-theme { position: absolute; z-index: 1; width: calc(var(--rd, 44px) * 2); height: calc(var(--rd, 44px) * 2); transition: opacity .2s; }
.ls-disc {
  position: absolute; inset: 0; border-radius: 50%; border: 2.6px solid var(--c); background: var(--paper); background: color-mix(in srgb, var(--c) 11%, var(--paper));
  cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 calc(var(--rd, 44px) * .14);
  transition: transform .2s var(--ease), box-shadow .2s, background .2s;
}
.ls-num { font-size: max(8.5px, calc(var(--rd, 44px) * .165)); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #5A564C; }
.ls-label { font-size: var(--fsl, 11px); font-weight: 600; line-height: 1.15; margin-top: 2px; hyphens: auto; -webkit-hyphens: auto; text-wrap: balance; }
.ls-lead { display: none; }
.ls-theme:hover .ls-disc, .ls-theme.on .ls-disc { transform: scale(1.06); background: color-mix(in srgb, var(--c) 20%, var(--paper)); }
.ls-theme.sel .ls-disc { box-shadow: 0 0 0 5px var(--paper), 0 0 0 6.5px var(--c); }
.landscape.focused .ls-theme.dim .ls-disc { border-color: color-mix(in srgb, var(--c) 35%, var(--paper)); background: var(--paper); }
.ls-down {
  position: absolute; left: calc(50% + var(--ux, 0) * (var(--rd, 44px) + 6px)); top: calc(50% + var(--uy, 1) * (var(--rd, 44px) + 6px));
  transform: translate(calc(-50% + var(--ux, 0) * 50%), calc(-50% + var(--uy, 1) * 50%)); white-space: nowrap; border: 1px solid var(--line); background: var(--card);
  border-radius: 999px; padding: 2px 10px; font-size: 11.5px; color: var(--faint); cursor: pointer; transition: all .15s;
}
.ls-theme.on .ls-down { color: var(--ink); border-color: var(--c); }
.ls-down:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.landscape.intro .ls-theme { animation: ls-in .55s var(--ease) both; animation-delay: calc(140ms + var(--i, 0) * 60ms); }
.landscape.intro .ls-center { animation: ls-in .5s var(--ease) both; }
@keyframes ls-in { from { opacity: 0; transform: scale(.86); } }

/* phones: the ring becomes a list of cards, the question at the top */
.landscape.stack { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 64px 14px 92px; scroll-padding: 64px 0 84px; touch-action: pan-y; }
.landscape.stack .ls-lines { display: none; }
.landscape.stack .ls-center { position: static; width: auto; height: auto; border-radius: 18px; border-width: 3px; padding: 14px 16px; align-items: flex-start; text-align: left; margin: 0 0 20px; }
.landscape.stack .ls-center .ls-q { display: none; }
.landscape.stack .ls-center .ls-full { display: block; font-family: var(--font-serif); font-style: italic; font-weight: 500; font-size: 18px; line-height: 1.35; }
.landscape.stack .ls-center .ls-sub { max-width: none; margin-top: 8px; font-size: 12px; }
.landscape.stack .ls-chapter { display: block; margin: 0 0 20px; }
.landscape.stack .ls-arc { position: relative; transform: none; max-width: none; white-space: normal; text-align: left; margin: 0 0 8px; padding: 0 0 0 26px; font-size: 17px; }
.landscape.stack .ls-arc::before { content: ""; position: absolute; left: 0; top: 50%; width: 18px; height: 3px; border-radius: 2px; background: var(--c); }
.landscape.stack .ls-theme { position: relative; width: auto; height: auto; margin: 0 0 8px; }
.landscape.stack .ls-disc { position: relative; inset: auto; width: 100%; border-radius: 16px; border: 1px solid var(--line); border-left: 4px solid var(--c); align-items: flex-start; text-align: left; padding: 11px 56px 11px 14px; transform: none; }
.landscape.stack .ls-num { font-size: 10.5px; }
.landscape.stack .ls-label { font-size: 16px; margin: 2px 0 4px; hyphens: manual; }
.landscape.stack .ls-lead { display: block; font-size: 13px; line-height: 1.4; color: var(--faint); font-weight: 400; }
.landscape.stack .ls-down { left: auto; right: 12px; top: 50%; bottom: auto; transform: translateY(-50%); font-size: 12.5px; padding: 3px 12px; }
.landscape.stack.focused .ls-theme.dim .ls-disc { border-color: var(--line); border-left-color: var(--c); background: color-mix(in srgb, var(--c) 11%, var(--paper)); }

/* ---------------------------------------------------------------- Niche */
body[data-level="niche"] .notice { bottom: 92px; }
.type-key { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 7px 16px; font-size: 13px; }
.type-key li { display: flex; align-items: center; gap: 9px; }
.shape { display: inline-block; width: 11px; height: 11px; flex: none; background: var(--c, var(--ink)); }
.shape.shape-square { width: 10px; height: 10px; border-radius: 1px; }
.shape.shape-dot { border-radius: 50%; }
.shape.shape-ring { border-radius: 50%; background: transparent; border: 2px solid var(--c, var(--ink)); }
.shape.shape-diamond { width: 9px; height: 9px; border-radius: 1px; transform: rotate(45deg); }
.shape.shape-triangle { border-radius: 0; clip-path: polygon(50% 6%, 100% 92%, 0 92%); }
.shape.shape-cross { border-radius: 0; background: linear-gradient(45deg, transparent 40%, var(--c, var(--ink)) 40% 60%, transparent 60%), linear-gradient(-45deg, transparent 40%, var(--c, var(--ink)) 40% 60%, transparent 60%); }
.type-key .shape { --c: var(--ink); }

/* ---------------------------------------------------------------- left panel: hero, level note, walks */
.hero-ico { display: block; width: 34px; height: 33px; color: var(--ink); margin: 0 0 8px; }
.hero-ico svg { width: 100%; height: 100%; display: block; }
.walk-cta { margin-top: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px 9px 14px; font-size: 14px; font-weight: 500; }
.walk-cta svg { width: 18px; height: 18px; flex: none; }
.level-note { margin: 16px 0 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 253, 246, .7); font-size: 13px; line-height: 1.5; }
.level-note .ln-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.level-note .ln-head b { font-family: var(--font-serif); font-weight: 600; font-size: 16px; letter-spacing: -.01em; }
.level-note .ln-head span { color: var(--faint); font-size: 12.5px; }
.level-note p { margin: 5px 0 0; }
.level-note .ln-aria { color: var(--faint); }
.level-note a.ext { color: var(--teal); text-underline-offset: 3px; }
.about-levels { margin-top: 8px; }
.about-levels summary { cursor: pointer; font-size: 12.5px; color: var(--faint); list-style: none; }
.about-levels summary::-webkit-details-marker { display: none; }
.about-levels summary::before { content: "+ "; }
.about-levels[open] summary::before { content: "– "; }
.about-levels .md { font-size: 13px; margin-top: 6px; }
.about-levels .refs { font-size: 12px; margin-top: 2px; }
.about-levels .refs a { color: var(--teal); text-underline-offset: 3px; }
.pane-intro, .landscape-only.hint { margin: 0 0 14px; font-size: 13px; line-height: 1.55; color: var(--faint); }
body[data-level="landscape"] .not-landscape, body[data-level="landscape"] .regime-only, body[data-level="niche"] .regime-only { display: none; }
body:not([data-level="landscape"]) .landscape-only { display: none; }
.seg .num { font-weight: 700; }
.group-h small { color: var(--faint); font-weight: 400; margin-left: 6px; }
.clear-row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.more-opts { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 0; margin: 0 0 22px; }
.more-opts summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); }
.more-opts summary::-webkit-details-marker { display: none; }
.more-opts summary::after { content: "+"; font-weight: 400; }
.more-opts[open] summary::after { content: "–"; }
.legend-note { margin: 0; color: var(--faint); line-height: 1.4; }
.legend-inline .keys-h { color: var(--ink); font-weight: 500; }

/* ---------------------------------------------------------------- notes: futures, drill-down, examples */
.faint { color: var(--faint); }
.prompt.plain { font-style: normal; font-size: 17px; }
.r-body h1.q-title { font-size: 29px; }
.meta-line { margin: 4px 0 0; font-size: 12.5px; color: var(--faint); }
.meta-line.strong { color: var(--ink); font-size: 13.5px; margin: -6px 0 14px; }
.down-btn { display: inline-flex; align-items: center; gap: 2px; margin: 0 0 4px; padding: 8px 16px; font-size: 13.5px; }
.down-btn.on { border-color: var(--ink); }
.r-body h1:focus { outline: none; }
.r-body h1:focus-visible { outline: 2px solid var(--teal); outline-offset: 4px; }
.future { margin: 20px 0 0; padding: 14px 16px 12px; border-radius: 16px; background: rgba(201, 150, 63, .07); border: 1px solid rgba(201, 150, 63, .3); }
.r-body .future h2 { margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.future-text { font-family: var(--font-serif); font-size: 18px; line-height: 1.5; margin: 0 0 10px; }
.future-note { font-size: 12.5px; color: var(--faint); font-style: italic; margin: -4px 0 10px; }
.drawn { display: grid; gap: 6px; }
.drawn-k { font-size: 12px; color: var(--faint); }
.future .cite { margin-top: 10px; font-size: 12px; }
.badge { display: inline-block; font-size: 10px; letter-spacing: .06em; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px dashed var(--gold); color: #8a6420; text-transform: uppercase; }
.badge.rm-edited { border-style: solid; }
.badge.rm-approved { border-style: solid; background: var(--olive); border-color: var(--olive); color: var(--paper); }
.ground { display: grid; gap: 8px; justify-items: start; }
.ground .md { margin: 0; }
.rel-item.slim { padding: 8px 14px; }
.rel-item.slim .rt span { font-weight: 500; }
.rel-item .ty.faint { color: var(--faint); }
.walk-item .rt span:first-child { font-family: var(--font-serif); font-weight: 500; font-size: 16px; }
.kind i.shape { border-radius: 0; }
.kind i.shape.shape-dot, .kind i.shape.shape-ring { border-radius: 50%; }
.tip.wide { max-width: 330px; }
.tip .tip-future { display: block; margin-top: 7px; padding-top: 7px; border-top: 1px solid rgba(250, 248, 243, .18); font-family: var(--font-serif); font-style: italic; font-size: 13.5px; line-height: 1.45; }
.tip .tip-future em { font-family: var(--font-ui); font-style: normal; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }

@media (max-width: 1080px) {
  .pill-btn { width: 40px; padding: 0; justify-content: center; }
  .pill-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .levels .lv-n { display: none; }
}
@media (max-width: 820px) {
  .levels {
    top: auto; bottom: 0; left: 0; right: 0; transform: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; justify-content: space-around; gap: 0;
    padding: 4px 8px calc(4px + env(safe-area-inset-bottom)); background: rgba(250, 248, 243, .97);
  }
  body.right-open .levels { left: 0; }
  .levels button { flex: 1; flex-direction: column; gap: 1px; padding: 5px 4px 6px; border-radius: 12px; font-size: 12px; }
  .levels .lv-sep { display: none; }
  .peek { display: none; }
  body[data-level="landscape"] .fab-row { left: 14px; }
}

/* ================================================================ Regime and Niche: one thing in focus */
/* its parts round it on a ring, what it connects to further out; the same grammar as the Landscape, one level closer to the ground */
.fmap { overflow: hidden; touch-action: manipulation; }
.fm-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.fm-ring { fill: none; stroke: rgba(107, 103, 92, .3); stroke-width: 1; stroke-dasharray: 1.5 5; }
.fm-ring2 { stroke: rgba(107, 103, 92, .16); }
.fm-fan { fill: none; stroke: rgba(102, 102, 102, .28); stroke-width: 1; transition: stroke .2s; }
.fmap.focused .fm-fan { stroke: rgba(102, 102, 102, .12); }
.fm-link { fill: none; stroke: #6B675C; stroke-linecap: round; opacity: 0; transition: opacity .2s, stroke-width .2s; }
.fm-link.curated { opacity: .34; stroke-width: 1.2; }
.fm-link.derived { stroke-dasharray: 3.5 4; }
.fm-link.lit { opacity: .95; stroke-width: 2.2; }
.fm-link.derived.lit { stroke-width: 1.4; opacity: .8; }
.fm-tie { fill: none; stroke: #6B675C; stroke-width: 1; stroke-dasharray: 4 5; opacity: .3; transition: opacity .2s, stroke-width .2s; }
.fm-tie.lit { opacity: .95; stroke-width: 1.7; }
.fmap.focused .fm-tie:not(.lit) { opacity: .08; }
.fmap[data-style="niche"] .fm-tie { opacity: .6; stroke-width: 1.3; }
.fmap[data-style="niche"] .fm-tie.curated { stroke-dasharray: none; stroke-width: 1.8; }
.fm-link.lit.t-echoes, .fm-tie.lit.t-echoes, .fmap[data-style="niche"] .fm-tie.curated.t-echoes { stroke: #2F6B63; }
.fm-link.lit.t-tension, .fm-tie.lit.t-tension, .fmap[data-style="niche"] .fm-tie.curated.t-tension { stroke: #B65438; }
.fm-link.lit.t-enables, .fm-tie.lit.t-enables, .fmap[data-style="niche"] .fm-tie.curated.t-enables { stroke: #5B6B3C; }
.fm-link.lit.t-extends, .fm-tie.lit.t-extends, .fmap[data-style="niche"] .fm-tie.curated.t-extends { stroke: #9A6F1F; }
.fm-walkpath { fill: none; stroke: var(--gold); stroke-width: 3.2; stroke-linecap: round; }
.fm-walkpath.todo { stroke-dasharray: 6 6; stroke-width: 2.4; opacity: .8; }

.fm-centre {
  position: absolute; z-index: 2; border-radius: 50%; border: 3px solid var(--c); background: var(--paper); background: color-mix(in srgb, var(--c) 14%, var(--paper));
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 12px; cursor: pointer;
  box-shadow: 0 0 0 7px rgba(201, 150, 63, .08); transition: box-shadow .2s;
}
.fm-centre .fm-kicker { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #5A564C; }
.fm-centre .fm-title { font-family: var(--font-serif); font-weight: 500; font-size: var(--fs, 18px); line-height: 1.12; letter-spacing: -.01em; margin: 3px 0 2px; hyphens: auto; -webkit-hyphens: auto; text-wrap: balance; }
.fm-centre .fm-sub { font-family: var(--font-serif); font-style: italic; font-size: 11.5px; color: #5A564C; line-height: 1.2; }
.fm-centre:hover, .fm-centre.sel { box-shadow: 0 0 0 8px rgba(201, 150, 63, .2); }

.fm-member { position: absolute; z-index: 3; transition: opacity .2s; }
.fmap[data-style="regime"] .fm-node {
  position: absolute; inset: 0; border-radius: 50%; border: 2.4px solid var(--c); box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--c2);
  background: var(--paper); background: color-mix(in srgb, var(--c) 10%, var(--paper)); cursor: pointer; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 0 calc(var(--rm, 40px) * .13); transition: transform .2s var(--ease), background .2s, border-color .2s;
}
.fmap[data-style="regime"] .fm-label { font-size: var(--fsm, 12px); font-weight: 600; line-height: 1.15; hyphens: auto; -webkit-hyphens: auto; text-wrap: balance; }
.fmap[data-style="regime"] .fm-member.on .fm-node, .fmap[data-style="regime"] .fm-node:hover { transform: scale(1.06); background: color-mix(in srgb, var(--c) 20%, var(--paper)); }
.fmap[data-style="regime"] .fm-member.sel .fm-node { box-shadow: 0 0 0 4px var(--paper), 0 0 0 6px var(--c); }
.fmap[data-style="regime"].focused .fm-member.dim .fm-node { border-color: color-mix(in srgb, var(--c) 35%, var(--paper)); background: var(--paper); box-shadow: 0 0 0 2px var(--paper); }
.fm-down {
  position: absolute; z-index: 1; left: calc(50% + var(--ux, 0) * (var(--rm, 40px) + 7px)); top: calc(50% + var(--uy, 1) * (var(--rm, 40px) + 7px));
  transform: translate(calc(-50% + var(--ux, 0) * 50%), calc(-50% + var(--uy, 1) * 50%)); white-space: nowrap; border: 1px solid var(--line); background: var(--card);
  border-radius: 999px; padding: 2px 9px; font-size: 11.5px; color: var(--faint); cursor: pointer; transition: all .15s;
}
.fm-member.on .fm-down { color: var(--ink); border-color: var(--c); }
.fm-down:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.fm-badge { position: absolute; z-index: 2; left: -3px; top: -3px; min-width: 21px; height: 21px; border-radius: 50%; background: var(--gold); color: var(--ink); font-size: 11px; font-weight: 700; display: none; place-items: center; border: 2px solid var(--paper); }
.fm-member.walk-stop .fm-badge { display: grid; }
.fm-member.walk-cur .fm-badge { background: var(--ink); color: var(--paper); }
.fmap[data-style="regime"] .fm-member.walk-cur .fm-node { box-shadow: 0 0 0 4px var(--paper), 0 0 0 7px var(--gold); }

.fmap[data-style="niche"] .fm-member { transform: translate(-50%, -50%); }
.fmap[data-style="niche"] .fm-node {
  display: grid; grid-template-columns: auto 1fr; column-gap: 7px; align-items: center; width: 100%; text-align: left; cursor: pointer;
  border: 1px solid var(--line); border-left: 3px solid var(--c); border-radius: 12px; background: var(--card); padding: 8px 11px 9px;
  box-shadow: 0 1px 2px rgba(34, 33, 28, .04); transition: border-color .15s, box-shadow .15s, transform .2s var(--ease);
}
.fmap[data-style="niche"] .fm-node .shape { --c: var(--c); }
.fmap[data-style="niche"] .fm-kicker { font-size: 10.5px; color: #5A564C; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fmap[data-style="niche"] .fm-label { grid-column: 1 / -1; margin-top: 3px; font-size: 13px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fmap[data-style="niche"] .fm-node:hover, .fmap[data-style="niche"] .fm-member.sel .fm-node { border-color: var(--ink); border-left-color: var(--c); box-shadow: var(--shadow); }
.fm-empty { position: absolute; z-index: 2; transform: translateX(-50%); max-width: 300px; text-align: center; font-size: 13px; line-height: 1.5; color: var(--faint); }
.fm-empty b { display: block; color: var(--ink); font-family: var(--font-serif); font-weight: 500; font-size: 17px; margin-bottom: 4px; }
.fm-empty p { margin: 0; }

.fm-nb { position: absolute; z-index: 2; padding: 0; border: 0; background: none; cursor: pointer; }
.fmap[data-style="regime"] .fm-nb { width: 38px; height: 38px; }
.fmap[data-style="niche"] .fm-nb { width: 12px; height: 12px; }
.fm-nbdot {
  position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--c); background: var(--paper); background: color-mix(in srgb, var(--c) 12%, var(--paper));
  display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--ink); transition: transform .2s var(--ease), border-color .2s;
}
.fmap[data-style="niche"] .fm-nbdot { background: var(--c); border: 2px solid var(--paper); box-shadow: 0 0 0 1px var(--c); }
.fm-nblabel { position: absolute; top: 50%; transform: translateY(-50%); width: max-content; max-width: 150px; font-size: 12.5px; font-weight: 600; line-height: 1.2; color: var(--ink); text-align: left; }
.fmap[data-style="niche"] .fm-nblabel { max-width: 172px; }
.fm-nb.side-r .fm-nblabel { left: calc(100% + 8px); }
.fm-nb.side-l .fm-nblabel { right: calc(100% + 8px); text-align: right; }
.fm-nb.side-t .fm-nblabel, .fm-nb.side-b .fm-nblabel { left: 50%; transform: translateX(-50%); text-align: center; }   /* a narrow stage: names above and below */
.fm-nb.side-t .fm-nblabel { top: auto; bottom: calc(100% + 4px); }
.fm-nb.side-b .fm-nblabel { top: calc(100% + 4px); }
.fm-nblabel small { display: block; font-weight: 400; font-size: 11px; color: var(--faint); margin-top: 1px; }
.fm-nb:hover .fm-nbdot, .fm-nb.on .fm-nbdot { transform: scale(1.14); }
.fm-nb:hover .fm-nbname { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--c); }
.fmap.focused .fm-nb.dim .fm-nbdot { border-color: color-mix(in srgb, var(--c) 35%, var(--paper)); background: var(--paper); }
.fm-nb.walk-next .fm-nbdot, .fm-nb.walk-prev .fm-nbdot { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--gold); }
.fmap:not(.stack) .fm-h { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }   /* drawn as a ring: the headings are for screen readers */

/* sideways, and in from the side */
.fmap.fm-enter .fm-member, .fmap.fm-enter .fm-nb, .fmap.fm-enter .fm-centre { animation: fm-in .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 30ms); }
.fmap.fm-enter .fm-lines { animation: fm-fade .7s ease both; }
@keyframes fm-in { from { opacity: 0; translate: var(--dx, 0) var(--dy, 0); } }
@keyframes fm-fade { from { opacity: 0; } }
.shape.shape-book { width: 8px; height: 11px; border-radius: 1px 2px 2px 1px; box-shadow: inset 2px 0 0 rgba(0, 0, 0, .25); }

.side-arrow {
  position: absolute; z-index: 21; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; gap: 3px; width: 58px; padding: 10px 5px 11px;
  border: 1px solid var(--line); background: rgba(255, 253, 246, .92); border-radius: 16px; cursor: pointer; color: var(--faint); font-size: 11px; line-height: 1.2; text-align: center;
  transition: border-color .15s, color .15s, right .38s var(--ease);
}
.side-arrow .sa-arrow { font-size: 24px; line-height: 1; color: var(--ink); }
.side-arrow .sa-label { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.side-arrow.prev { left: 10px; }
.side-arrow.next { right: 10px; }
body.right-open .side-arrow.next { right: calc(var(--right-w) + 10px); }
.side-arrow:hover { border-color: var(--ink); color: var(--ink); }
.side-arrow[hidden], body[data-level="landscape"] .side-arrow, body.thread-on .side-arrow { display: none; }

/* phones: lists, the thing in focus at the top */
.fmap.stack { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 64px 14px 92px; scroll-padding: 64px 0 84px; touch-action: pan-y; }
.fmap.stack .fm-lines { display: none; }
.fmap.stack .fm-centre { position: relative; width: auto; height: auto; border-radius: 18px; padding: 14px 16px; align-items: flex-start; text-align: left; margin: 0 0 8px; box-shadow: none; }
.fmap.stack .fm-centre .fm-title { font-size: 22px; }
.fmap.stack .fm-h { margin: 18px 0 8px; font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); }
.fmap.stack .fm-member { position: relative; transform: none; margin: 0 0 8px; }
.fmap.stack[data-style="regime"] .fm-node { position: relative; inset: auto; width: 100%; min-height: 54px; border-radius: 14px; border-width: 1px; border-left-width: 4px; box-shadow: none; justify-content: flex-start; text-align: left; padding: 12px 56px 12px 14px; transform: none; }
.fmap.stack[data-style="regime"] .fm-label { font-size: 15px; }
.fmap.stack .fm-down { left: auto; right: 10px; top: 50%; transform: translateY(-50%); font-size: 12.5px; padding: 3px 11px; }
.fmap.stack .fm-badge { left: -6px; top: -6px; }
.fmap.stack .fm-nb { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; height: auto; padding: 8px 4px; text-align: left; }
.fmap.stack .fm-nbdot { position: relative; inset: auto; width: 30px; height: 30px; flex: none; }
.fmap.stack[data-style="niche"] .fm-nbdot { width: 12px; height: 12px; }
.fmap.stack .fm-nblabel { position: static; transform: none; max-width: none; text-align: left; }
.fmap.stack .fm-empty { position: relative; transform: none; left: auto; top: auto; max-width: none; text-align: left; margin: 8px 0; }
@media (max-width: 820px) {
  .side-arrow { display: none; }
  .levels .lv-what { max-width: 28vw; font-size: 11.5px; }
  .levels button.has-what .lv-name { display: none; }
}

/* quiet at rest: a prompt's way down shows when you point at it, open it or tab to it; a neighbour's link count on pointing */
.fmap[data-style="regime"]:not(.stack) .fm-down { opacity: 0; pointer-events: none; transition: opacity .15s, background .15s, color .15s; }
.fmap[data-style="regime"]:not(.stack) .fm-member.hot .fm-down, .fmap[data-style="regime"]:not(.stack) .fm-member:focus-within .fm-down { opacity: 1; pointer-events: auto; }
.fmap[data-style="regime"]:not(.stack) .fm-nblabel { font-size: 11.5px; max-width: 132px; }
.fmap[data-style="regime"]:not(.stack) .fm-nblabel small { display: none; }
.fmap[data-style="regime"]:not(.stack) .fm-nb:hover .fm-nblabel small, .fmap[data-style="regime"]:not(.stack) .fm-nb.on .fm-nblabel small, .fmap[data-style="regime"]:not(.stack) .fm-nb:focus-visible .fm-nblabel small { display: block; }
.fmap.stack .fm-centre { width: 100%; }

/* the left panel's list of themes */
.theme-list { display: grid; gap: 4px; margin-top: 8px; }
.theme-go { display: grid; grid-template-columns: 24px 1fr auto; align-items: baseline; gap: 6px; width: 100%; text-align: left; border: 1px solid transparent; background: transparent; border-radius: 10px; padding: 6px 8px; cursor: pointer; font-size: 13.5px; line-height: 1.3; transition: background .15s, border-color .15s; }
.theme-go .num { font-size: 12px; font-weight: 700; color: var(--c); color: color-mix(in srgb, var(--c) 55%, var(--ink)); }
.theme-go small { font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.theme-go:hover { background: rgba(34, 33, 28, .05); }
.theme-go[aria-current="true"] { border-color: var(--line); background: var(--card); font-weight: 600; }
.rel-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: start; }
.rel-row .rel-item { margin-bottom: 8px; }
.down-mini { margin-top: 8px; white-space: nowrap; font-size: 12px; padding: 5px 11px; }
/* the way down sits on the disc's lower edge: pointing outward it would land on the neighbour theme the prompt links to */
.fmap[data-style="regime"]:not(.stack) .fm-down { left: 50%; top: 100%; transform: translate(-50%, -60%); z-index: 4; }
/* a note open on a laptop, or a level bar that would run over them: the buttons fold to their icons */
body.right-open .pill-btn, body.fab-tight .pill-btn { width: 40px; padding: 0; justify-content: center; }
body.right-open .pill-btn span, body.fab-tight .pill-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* the list beside an open note on a laptop: one readable column */
.fmap.stack > .fm-centre, .fmap.stack > .fm-member, .fmap.stack > .fm-nb, .fmap.stack > .fm-h, .fmap.stack > .fm-empty { max-width: 620px; margin-left: auto; margin-right: auto; }
.fm-centre.tight { padding: 0 8px; }
.fm-centre.tight .fm-sub { display: none; }
.fm-centre.tight .fm-kicker { font-size: 9px; letter-spacing: .06em; }

/* up a level, and the map or list view of the Regime and Niche */
.up-btn { gap: 6px; font-weight: 600; }
.up-btn svg { color: var(--ink); }
.up-btn[hidden] { display: none; }
.view-toggle { position: absolute; z-index: 20; top: 14px; right: 16px; display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 253, 246, .93); backdrop-filter: blur(6px); transition: right .38s var(--ease); }
.view-toggle[hidden] { display: none; }
.view-toggle button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; border-radius: 999px; padding: 5px 11px 5px 8px; font-size: 12.5px; font-weight: 500; color: var(--faint); cursor: pointer; }
.view-toggle button svg { width: 16px; height: 16px; }
.view-toggle button:hover { color: var(--ink); }
.view-toggle button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
body.right-open .view-toggle { right: calc(var(--right-w) + 16px); }
.fm-nblabel, .fmap[data-style="regime"]:not(.stack) .fm-nblabel, .fmap[data-style="niche"]:not(.stack) .fm-nblabel { max-width: var(--labw, 150px); }
@media (max-width: 1080px) { .up-btn .up-what { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } .up-btn { width: 40px; padding: 0; justify-content: center; } }
@media (max-width: 820px) { .view-toggle { display: none; } }
/* a crowded top row (see fitChrome in ui.js): the map/list switch folds to its icons, then the level bar's names shorten */
body.vt-tight .view-toggle button { padding: 5px 8px; }
body.vt-tight .view-toggle button span, body.lv-tight .levels button:not([aria-current]) .lv-what { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
body.lv-tight .levels button:not([aria-current]).has-what .lv-name { font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; }
body.lv-tight .levels button:not([aria-current]).has-what { padding-top: 6px; padding-bottom: 6px; }
body.lv-tight .levels button { padding-left: 8px; padding-right: 10px; gap: 6px; }
body.lv-tight:not(.right-open) .levels .lv-what { max-width: 150px; }
.levels button { min-width: 0; }
body.lv-tight .levels button:not([aria-current]) { flex-shrink: 0; }
body.lv-tight .levels .lv-text { overflow: hidden; }
body.lv-row2 .levels { top: 62px; }
body.lv-row2 .qcap { top: 112px; }
/* no room for a ring beside an open note and the left panel: a narrow list, no side arrows, each card's way down under its name */
body.cramped .side-arrow { display: none; }
body.lv-icons .levels button:not([aria-current]) .lv-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
body.lv-icons .levels button:not([aria-current]) { padding: 6px 8px; }
.landscape.stack ~ .qcap { visibility: hidden; }   /* as cards (no room for the ring), the question heads the list instead */
/* the map/list switch when the ring has no room here: Map is unavailable (and says why), List shows as on */
.view-toggle button[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.view-toggle button[aria-disabled="true"]:hover { color: var(--faint); }
body.no-arrows .side-arrow { display: none; }   /* the ring needed their room (the themes further out still move you across) */
.ls-center.tight .ls-sub { display: none; }   /* a small middle keeps only the question */
.fm-centre.bare .fm-kicker, .fm-centre.bare .fm-sub { display: none; }
/* a guided walk beside the ring: the card docks at the left of the map, under the top row */
body.walk-dock .threadbar, body.walk-dock.right-open .threadbar { left: 16px; top: var(--walk-top, 76px); bottom: auto; width: 300px; max-height: calc(100% - var(--walk-top, 76px) - 16px); overflow-y: auto; transform: translate(-12px, 0); }
body.walk-dock .threadbar.open { transform: none; }
body.walk-dock .threadbar .t-nav { flex-wrap: wrap; row-gap: 10px; }
body.walk-dock .threadbar .t-dots { order: 3; width: 100%; justify-content: center; }
body.thread-on .view-toggle { display: none; }   /* a walk is always a map */
@media (max-height: 780px) { .qcap .c { display: none; } }   /* a short window: the question without its citation line */
/* no counts on the map: no way-down pills on the rings (a double click, or Go down in a note), no numbers on the Landscape's ties */
.landscape:not(.stack) .ls-down, .fmap:not(.stack) .fm-down { display: none; }
.landscape.stack .ls-down, .fmap.stack .fm-down { min-width: 34px; padding: 3px 10px; font-size: 14px; text-align: center; }
