:root {
  --bg: #03050c;
  --panel: rgba(8, 14, 30, 0.72);
  --line: rgba(110, 190, 255, 0.22);
  --text: #d8e8ff;
  --dim: #7f93b5;
  --cyan: #4fe3ff;
  --magenta: #ff4fd8;
  --up: #5dffb0;
  --down: #ff6b7d;
  --topic-panel-width: 332px;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "SFMono-Regular", monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font: 13px/1.4 "Segoe UI", system-ui, sans-serif;
}

#galaxy { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.renderer-status { position: fixed; z-index: 3; left: calc(var(--topic-panel-width) + 48px); right: 24px; top: 24px; max-width: 420px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: #0b1728; color: var(--text); }
.renderer-status button { margin-top: 12px; display: block; border: 1px solid var(--line); border-radius: 5px; padding: 7px 12px; background: transparent; }
@media (max-width: 640px) { .renderer-status { left: 16px; right: 16px; top: 72px; } }
.graph-label-layer { position: fixed; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
.graph-node-label {
  position: absolute; display: flex; align-items: center; justify-content: center; text-align: center;
  color: #f4f8ff; font-weight: 600; line-height: 1.05; overflow: hidden; overflow-wrap: anywhere;
  text-shadow: 0 1px 2px #000; pointer-events: none; transform: translate(-50%, -50%);
}
.graph-edge-weight {
  position: absolute; transform: translate(-50%, -50%); font: 600 11px var(--mono); color: #c9d9e8;
  background: rgba(5, 12, 24, 0.94); border: 1px solid rgba(135, 170, 205, 0.25); border-radius: 4px;
  padding: 2px 5px; white-space: nowrap; pointer-events: none; box-shadow: none;
}

.graph-node-label.is-removal-marked, .graph-node-label.is-removal-preview { color: #ffe2a2; text-shadow: 0 1px 3px #201300; }
.graph-removal-marquee {
  position: fixed; z-index: 6; pointer-events: none; border: 1px solid #ffd083;
  background: rgba(255, 196, 104, 0.08); box-shadow: 0 0 0 1px rgba(8, 12, 20, 0.65), inset 0 0 18px rgba(255, 196, 104, 0.04);
  border-radius: 3px;
}
.graph-removal-count { position: absolute; top: 5px; left: 6px; padding: 3px 6px; border-radius: 3px; background: rgba(15, 18, 27, 0.92); color: #ffe2a2; font: 10px var(--mono); white-space: nowrap; }

button, select, input, textarea { font: inherit; color: inherit; }
button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }


button { cursor: pointer; }
button:disabled { cursor: default; }
button, select, input { -webkit-tap-highlight-color: transparent; }
.panel { position: fixed; z-index: 4; background: rgba(7, 13, 25, 0.88); border: 1px solid rgba(122, 163, 207, 0.19); border-radius: 12px; backdrop-filter: blur(16px); box-shadow: 0 10px 42px rgba(0, 0, 0, 0.16); }
.left { top: 16px; left: 16px; width: var(--topic-panel-width); bottom: 16px; padding: 16px; display: flex; flex-direction: column; overflow: hidden; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; flex-shrink: 0; }
.brand { color: #abc0da; font: 600 10px var(--mono); letter-spacing: 0.2em; }
.brand span { color: #6f89aa; }
.icon-button { background: transparent; border: 0; color: var(--dim); font-size: 24px; line-height: 1; }
#topics-close, .topics-toggle { display: none; }
.topic-options { margin: 9px 0 0; font-size: 11px; color: var(--dim); }
.topic-options > summary { cursor: pointer; width: fit-content; padding: 3px 0; }
.options-content { padding: 12px 0 5px; }
.options-content > .field { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 9px; align-items: center; margin: 14px 0; font-size: 11px; }
select { background: rgba(8, 14, 30, 0.95); border: 1px solid var(--line); border-radius: 5px; padding: 5px 7px; max-width: 100%; }
.option-label { color: var(--dim); font-size: 10px; margin: 11px 0 5px; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.seg button { flex: 1; background: transparent; border: 0; padding: 6px 4px; color: var(--dim); font-size: 10px; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: rgba(79, 227, 255, 0.12); color: #b3f5ff; }
.archive-controls { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin: 15px 0 7px; }
#clock { color: var(--dim); font-size: 10px; }
.live { background: transparent; border: 1px solid var(--line); border-radius: 4px; padding: 3px 7px; font-size: 10px; white-space: nowrap; }
.live.on { color: var(--up); }
#time { width: 100%; margin: 3px 0; accent-color: #91b8c9; }
.view-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.view-actions button { background: transparent; border: 1px solid var(--line); border-radius: 4px; padding: 5px 8px; font-size: 10px; color: #a8bfd5; }
.view-actions button:hover, .view-actions button[aria-pressed="true"] { color: var(--cyan); border-color: #457488; }
.map-exploration { margin-top: 12px; padding: 10px 0 3px; border-top: 1px solid rgba(110, 190, 255, 0.1); }
.exploration-heading { display: flex; justify-content: space-between; align-items: center; font-size: 10px; color: var(--dim); }
.exploration-heading button { background: transparent; border: 0; padding: 0; font-size: 10px; color: #a8bfd5; }
.exploration-heading button:hover { color: var(--cyan); }
.exploration-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.exploration-chip { display: inline-flex; align-items: center; gap: 7px; min-width: 0; max-width: 100%; border: 1px solid rgba(110, 190, 255, 0.22); border-radius: 6px; padding: 4px 7px 4px 9px; background: rgba(79, 227, 255, 0.045); color: #c4deea; font-size: 11px; }
.exploration-chip > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exploration-anchor { border-color: rgba(79, 227, 255, 0.4); }
.exploration-remove { color: #8ca8be; font-size: 15px; line-height: 1; }
.exploration-chip:hover { border-color: #72bfd0; }
.exploration-chip.loading { border-style: dashed; }
.exploration-chip.failed { border-color: var(--down); color: #ffb8c0; }
.exploration-chip.hidden-root { border-style: dashed; color: #8b94a1; }
#map-exploration-status { font-size: 10px; color: var(--dim); margin: 7px 0 0; }
#map-exploration-status.error { color: #ffb8c0; }
.removal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.removal-actions.has-removal-edits { margin: 11px 0 5px; }
#map-removal-status { flex-basis: 100%; color: #e2c28b; font-size: 10px; }
.removal-actions button { padding: 5px 7px; border: 1px solid rgba(255, 204, 129, 0.32); border-radius: 4px; background: transparent; color: #ffe2a2; font-size: 10px; }
.topic-tools { flex: 0 1 auto; min-height: 138px; max-height: 64%; overflow-y: auto; padding: 2px 2px 6px; margin: -2px -2px 0; scrollbar-width: thin; scrollbar-color: #28405d transparent; }
.search-label { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 7px; color: #f1f7ff; font-size: 15px; font-weight: 600; }
.search-label span { font: 10px var(--mono); color: var(--dim); font-weight: 400; }
.topic-search-field { display: flex; align-items: center; min-height: 40px; padding: 0 9px; gap: 8px; border: 1px solid rgba(110, 190, 255, 0.4); border-radius: 7px; background: rgba(3, 8, 18, 0.85); }
.topic-search-field:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 2px rgba(79, 227, 255, 0.09); }
.topic-search-field svg { flex-shrink: 0; width: 17px; height: 17px; fill: none; stroke: var(--dim); stroke-width: 1.7; }
.topic-search-field input { width: 100%; min-width: 0; border: 0; padding: 9px 0; background: transparent; outline: none; font-size: 12px; }
.topic-search-field input:focus-visible { outline: none; }
.topic-search-field input::placeholder { color: #8294ae; opacity: 1; }
.topic-search-field input::-webkit-search-cancel-button { display: none; }
#topic-search-clear { border: 0; background: transparent; color: var(--dim); font-size: 21px; line-height: 1; padding: 0 3px; cursor: pointer; }
.search-scope { color: var(--dim); font-size: 10px; line-height: 1.5; margin: 6px 0 9px; }
.search-order { display: flex; gap: 7px; align-items: center; }
.search-order > label { color: var(--dim); font-size: 11px; white-space: nowrap; }
#topic-sort { flex: 1; min-width: 0; font-size: 12px; padding: 5px 6px; border-radius: 5px; }
.filter-toggle { display: flex; gap: 5px; align-items: center; border: 1px solid var(--line); padding: 5px 8px; border-radius: 5px; background: transparent; cursor: pointer; font-size: 11px; }
.filter-toggle[aria-expanded="true"] { background: rgba(79, 227, 255, 0.1); border-color: #457488; }
#topic-filter-count { min-width: 15px; padding: 0 4px; background: var(--cyan); border-radius: 8px; color: #02121a; font: 10px/15px var(--mono); }
.search-presets { display: flex; align-items: center; gap: 6px; padding: 8px 0 2px; }
.search-presets > span { margin-right: 1px; color: var(--dim); font-size: 10px; }
.search-presets button, .query-examples button { border: 1px solid rgba(110, 190, 255, 0.18); border-radius: 12px; padding: 3px 8px; background: transparent; color: #a9bdd7; font-size: 10px; cursor: pointer; }
.search-presets button:hover, .query-examples button:hover { color: var(--cyan); border-color: #457488; }
.search-presets button[aria-pressed="true"] { background: rgba(79, 227, 255, 0.08); border-color: #3f6779; color: var(--cyan); }
.topic-filters { border: 1px solid rgba(110, 190, 255, 0.16); border-radius: 6px; padding: 9px; margin-top: 8px; background: rgba(3, 8, 18, 0.4); }
.filter-heading { display: flex; justify-content: space-between; align-items: center; color: #a9bdd7; font-size: 11px; margin-bottom: 8px; }
.filter-heading button, #topic-search-retry { background: transparent; border: 0; padding: 0; font-size: 10px; color: var(--cyan); cursor: pointer; }
.filter-heading button:disabled { opacity: 0.4; cursor: default; }
.filter-range { display: flex; align-items: center; gap: 8px; border: 0; padding: 0; margin: 0 0 8px; min-width: 0; }
.filter-range legend { color: var(--dim); font-size: 10px; padding: 0; margin-bottom: 4px; }
.filter-range label { flex: 1; min-width: 0; }
.filter-range > span { color: var(--dim); font-size: 10px; }
.topic-filters input[type="number"], .topic-filters select { display: block; width: 100%; min-width: 0; background: rgba(8, 14, 30, 0.9); border: 1px solid var(--line); border-radius: 4px; padding: 5px 7px; font-size: 11px; }
.topic-filters input::placeholder { color: var(--dim); }
.filter-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 9px; }
.filter-pair label { display: grid; gap: 4px; color: var(--dim); font-size: 10px; }
.filter-check { display: flex; gap: 7px; align-items: center; font-size: 11px; color: #a9bdd7; }
.filter-check input { margin: 0; accent-color: var(--cyan); }
.filter-check span { color: var(--dim); }
.search-help { color: var(--dim); font-size: 10px; line-height: 1.55; margin-top: 7px; }
.search-help summary { cursor: pointer; width: fit-content; }
.search-help p { margin: 7px 0; }
.search-help code { color: #bcd0e9; font: 10px var(--mono); }
.query-examples { display: flex; gap: 5px; flex-wrap: wrap; }
.query-examples button { padding: 2px 6px; font-family: var(--mono); font-size: 9px; }
.results-heading { display: flex; justify-content: space-between; align-items: center; min-height: 30px; flex-shrink: 0; border-top: 1px solid rgba(110, 190, 255, 0.13); margin-top: 3px; font-size: 10px; color: var(--dim); }
.search-error { flex-shrink: 0; color: #ffb8c0; background: rgba(255, 107, 125, 0.07); border: 1px solid rgba(255, 107, 125, 0.2); border-radius: 5px; padding: 8px; margin: 0 0 6px; font-size: 11px; overflow-wrap: anywhere; }
.topics { list-style: none; margin: 0; padding: 0 2px 0 0; overflow-y: auto; flex: 1 1 80px; min-height: 60px; scrollbar-width: thin; scrollbar-color: #28405d transparent; }
.topics li { display: grid; grid-template-columns: minmax(0, 1fr) 23px; gap: 2px; align-items: center; border-bottom: 1px solid rgba(110, 190, 255, 0.08); }
.topics button[data-topic-id] {
  display: grid; grid-template-columns: minmax(0, 1fr) 42px; align-items: center; gap: 7px;
  width: 100%; padding: 9px 5px; border: 0; border-radius: 4px; cursor: pointer; text-align: left; background: transparent;
}
.topics button:hover, .topics button:focus-visible, .topics li.sel button { background: rgba(79, 227, 255, 0.08); }
.topics li.sel button[data-topic-id] { box-shadow: inset 2px 0 var(--cyan); }
.topics li.removal-marked > button[data-topic-id] { background: rgba(255, 196, 104, 0.1); box-shadow: inset 2px 0 #ffd083; }
.topics li.removal-marked .topic-name { color: #ffe2a2; }
.topics li.hidden-from-cloud .topic-name { color: #a3aab6; }
.topics .topic-add { display: block; width: 22px; height: 25px; padding: 0; border: 1px solid rgba(110, 190, 255, 0.2); border-radius: 5px; color: #93c9df; background: rgba(79, 227, 255, 0.035); font: 17px/20px var(--mono); cursor: pointer; }
.topics .topic-add:hover, .topics .topic-add:focus-visible { color: var(--cyan); border-color: var(--cyan); }
.topics button:focus-visible { outline-offset: -2px; }
.topics .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topics .topic-name { font-size: 13px; }
.topics mark { background: rgba(79, 227, 255, 0.17); color: #a9f3ff; border-radius: 2px; }
.topics .name small { color: var(--dim); display: block; font: 10px var(--mono); margin-top: 2px; }
.topics .chg { font: 12px var(--mono); text-align: right; }
.topics .search-empty { color: var(--dim); padding: 16px 8px; font-size: 12px; line-height: 1.6; border: 0; }
.load-more { flex-shrink: 0; cursor: pointer; padding: 7px; margin-top: 6px; border: 1px solid var(--line); border-radius: 5px; background: rgba(79, 227, 255, 0.04); color: #a9dce8; font-size: 11px; }
.load-more:hover { border-color: #457488; }
.load-more:disabled { opacity: 0.5; cursor: wait; }
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--dim); }
.note { flex-shrink: 0; color: var(--dim); font-size: 10px; margin: 8px 0 0; line-height: 1.5; }


.right { top: 16px; right: 16px; bottom: 16px; width: 342px; padding: 18px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #28405d transparent; }
.posts-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 15px; }
.eyebrow { color: #6f89a7; font: 9px var(--mono); letter-spacing: 0.16em; }
.right h2 { color: #eaf3ff; font-size: 22px; font-weight: 500; margin: 3px 0 0; }
.detail-toggle { display: none; }
.posts-topics { display: flex; flex-wrap: wrap; gap: 5px; }
.post-topic { border-radius: 5px; padding: 3px 7px; background: rgba(79, 227, 255, 0.07); color: #bedde9; border: 1px solid rgba(110, 190, 255, 0.16); font-size: 11px; overflow-wrap: anywhere; max-width: 100%; }
.posts-match { display: flex; margin: 13px 0 0; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.posts-match button { flex: 1; border: 0; background: transparent; color: #7f93b5; padding: 7px; font-size: 11px; }
.posts-match button[aria-pressed="true"] { background: rgba(79, 227, 255, 0.09); color: #c5edfa; }
.posts-context { color: #93abc7; font-size: 10px; margin: 12px 0 4px; }
.posts-sampling { color: #7f93b5; font-size: 10px; line-height: 1.6; margin: 0 0 14px; }
.posts-results-heading { display: flex; justify-content: space-between; gap: 9px; align-items: center; border-top: 1px solid rgba(110, 190, 255, 0.14); padding: 11px 0 6px; font-size: 10px; color: #8fa7c3; }
#posts-retry { color: var(--cyan); border: 0; background: transparent; font-size: 11px; padding: 0; }
.posts { list-style: none; margin: 0; padding: 0; }
.posts .post-card { padding: 14px 0; border-bottom: 1px solid rgba(110, 190, 255, 0.1); overflow-wrap: anywhere; }
.post-meta { color: #7890ac; font: 10px var(--mono); }
.post-text { color: #cbdaec; font-size: 12px; line-height: 1.65; white-space: pre-wrap; margin: 8px 0; }
.post-matches { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 9px; }
.post-matches span { padding: 2px 5px; border-radius: 4px; background: rgba(116, 156, 201, 0.09); color: #94bad0; font-size: 9px; }
.post-link { display: inline-block; font-size: 10px; color: #8eb8ca; text-decoration: none; margin-top: 9px; }
.post-link:hover { color: var(--cyan); }
.post-link { background: transparent; border: 0; padding: 0; text-align: left; }

/* Public post reader lives in the browser's modal top layer; the map keeps its state. */
.post-modal {
  width: min(940px, calc(100vw - 40px)); max-width: none; max-height: calc(100dvh - 40px);
  margin: auto; padding: 0; overflow: hidden; color: var(--text); background: #080f1c;
  border: 1px solid rgba(110, 190, 255, 0.3); border-radius: 16px;
  box-shadow: 0 24px 100px rgba(0, 0, 0, 0.65); color-scheme: dark;
}
.post-modal[open] { display: flex; flex-direction: column; }
.post-modal::backdrop, .post-image-modal::backdrop { background: rgba(1, 4, 12, 0.8); backdrop-filter: blur(5px); }
.post-modal-header { display: flex; align-items: center; gap: 16px; padding: 16px 22px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.post-modal-heading { min-width: 0; flex: 1; }
.post-modal-header h2 { font-size: 18px; font-weight: 500; margin: 0; color: #eaf3ff; }
.post-modal-caption { margin: 4px 0 0; font-size: 11px; color: #93abc7; overflow-wrap: anywhere; }
.post-modal a, .post-image-modal a { color: #8ed7ed; text-decoration: none; }
.post-modal a:hover { color: var(--cyan); text-decoration: underline; }
.post-original { flex-shrink: 0; font-size: 12px; }
.post-modal-close { flex-shrink: 0; border: 1px solid var(--line); background: transparent; color: #b3cde4; border-radius: 8px; font-size: 25px; width: 38px; height: 38px; line-height: 1; }
.post-modal-close:hover { color: var(--cyan); border-color: var(--cyan); }
.post-modal-back { border: 0; background: transparent; color: #aad3e3; padding: 8px 0; white-space: nowrap; }
.post-modal-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #35506c transparent; }
.post-detail-content { padding: 24px 28px 32px; overflow-wrap: anywhere; }
.post-full { min-width: 0; }
.post-author { display: flex; align-items: center; gap: 10px; min-width: 0; }
.post-avatar { display: flex; align-items: center; justify-content: center; flex-shrink: 0; position: relative; overflow: hidden; width: 44px; height: 44px; border-radius: 12px; background: #192b40; color: #bce8ef; font-size: 18px; }
.post-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.post-author-identity { display: flex; flex-direction: column; min-width: 0; }
.post-author-name { font-size: 14px; font-weight: 600; color: #deecfc !important; }
.post-author-handle { color: #8ca5bf; font-size: 12px; overflow-wrap: anywhere; }
.post-published { display: block; color: #8ca5bf; font-size: 11px; margin-top: 10px; }
.post-full-text { color: #d7e5f6; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; font-size: 15px; margin: 14px 0; }
.post-full-compact { padding: 17px 0; border-bottom: 1px solid rgba(110, 190, 255, 0.12); }
.post-full-compact .post-full-text { font-size: 13px; margin: 10px 0; }
.post-full-compact .post-avatar { width: 36px; height: 36px; border-radius: 10px; }
.post-inline-stats { display: flex; flex-wrap: wrap; font-size: 11px; color: #89a2bc; margin: 11px 0 6px; }
.post-action { display: inline-flex; align-items: center; justify-content: center; padding: 8px 12px; border-radius: 6px; border: 1px solid var(--line); background: rgba(79, 227, 255, 0.04); color: #b6deeb; font-size: 12px; }
.post-action:hover { border-color: #5c92a8; color: var(--cyan); }
.post-action:disabled { opacity: 0.5; cursor: wait; }
.post-thread-action { margin: 5px 0; font-size: 11px; padding: 6px 9px; }
.post-detail-notice, .post-archive-context { color: #92a9c3; font-size: 12px; line-height: 1.65; margin: 12px 0; }
.post-archive-context { font-size: 11px; border-top: 1px solid rgba(110, 190, 255, 0.1); padding-top: 12px; }
.post-detail-error { border: 1px solid rgba(255, 107, 125, 0.25); background: rgba(255, 107, 125, 0.06); color: #ffbdc6; border-radius: 8px; padding: 14px; font-size: 13px; }
.post-archived-sample { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 18px; }
.post-archived-sample h3 { font-size: 15px; margin: 0; font-weight: 500; }
.post-information { margin: 14px 0; border-top: 1px solid rgba(110, 190, 255, 0.12); padding-top: 12px; }
.post-information summary, .post-parent-thread > summary, .post-media-warning > summary { cursor: pointer; color: #adcce0; font-size: 12px; padding: 3px 0; }
.post-information dl { display: grid; grid-template-columns: 145px minmax(0, 1fr); gap: 8px 16px; font-size: 12px; margin: 14px 0; }
.post-information dt { color: #8ca5bf; }
.post-information dd { margin: 0; color: #c3d9ec; overflow-wrap: anywhere; }
.post-detail-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); gap: 5px; margin-top: 22px; }
.post-detail-tab { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; padding: 12px 5px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #91a9c4; font-size: 12px; }
.post-detail-tab[aria-selected="true"] { color: #cef1ff; border-bottom-color: var(--cyan); background: rgba(79, 227, 255, 0.05); }
.post-tab-count { font: 11px var(--mono); color: #b8cadd; }
.post-tab-content { padding-top: 8px; min-height: 100px; }
.post-parent-thread { padding: 10px 0; border-bottom: 1px solid var(--line); }
.post-reply-children { margin-left: 16px; padding-left: 16px; border-left: 1px solid rgba(110, 190, 255, 0.22); }
.post-reply-children .post-reply-children .post-reply-children { margin-left: 6px; padding-left: 8px; }
.post-actor-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 14px 0; border-bottom: 1px solid rgba(110, 190, 255, 0.12); }
.post-actor-time { color: #8ca5bf; font-size: 11px; }
.post-load-more { width: 100%; margin: 16px 0; }
.post-embed { margin: 13px 0; }
.post-image-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.post-image-grid.single { grid-template-columns: minmax(0, 1fr); }
.post-image { margin: 0; min-width: 0; }
.post-image-open { display: block; width: 100%; border: 1px solid rgba(110, 190, 255, 0.16); border-radius: 10px; padding: 0; overflow: hidden; background: #040914; cursor: zoom-in; }
.post-image-open img { display: block; width: 100%; max-height: 480px; object-fit: contain; }
.post-image-grid:not(.single) .post-image-open img { height: 240px; object-fit: cover; }
.post-image-description { margin: 5px 0; color: #91a9c4; font-size: 11px; }
.post-image-description summary { cursor: pointer; }
.post-video { display: block; width: 100%; max-height: 500px; background: #000; border: 1px solid rgba(110, 190, 255, 0.16); border-radius: 10px; }
.post-video-description { font-size: 12px; color: #91a9c4; }
.post-play-video { margin-top: 10px; }
.post-external-card { display: flex; flex-direction: column; overflow: hidden; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: rgba(79, 227, 255, 0.025); }
.post-external-card img { width: 100%; max-height: 280px; object-fit: cover; border-radius: 6px; }
.post-external-card strong { font-size: 14px; color: #d3e7f7; }
.post-external-card span, .post-external-card small { font-size: 12px; color: #92a9c3; }
.post-quoted-record { border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.post-quoted-record .post-full-compact { border: 0; padding-bottom: 0; }
.post-content-labels { font-size: 11px; color: #edc89e; }
.post-media-warning { border: 1px solid rgba(237, 200, 158, 0.3); border-radius: 8px; padding: 12px; }
.post-image-modal { width: min(1200px, calc(100vw - 24px)); max-width: none; max-height: calc(100dvh - 24px); margin: auto; padding: 16px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: #060c17; color: var(--text); }
.post-image-modal[open] { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.post-image-modal > img { max-width: 100%; max-height: 76dvh; object-fit: contain; flex-shrink: 0; }
.post-image-modal > button { align-self: flex-end; flex-shrink: 0; }
.post-image-modal > p { font-size: 12px; max-width: 80ch; margin: 0; white-space: pre-wrap; }
@media (max-width: 640px) {
  .post-modal { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 12px; }
  .post-modal-header { gap: 10px; padding: 12px; flex-wrap: wrap; }
  .post-modal-heading { flex-basis: calc(100% - 60px); order: 0; }
  .post-modal-close { order: 1; width: 42px; height: 42px; }
  .post-modal-back { order: 2; }
  .post-original { order: 3; margin-left: auto; }
  .post-detail-content { padding: 18px 14px 24px; }
  .post-full-text { font-size: 14px; }
  .post-information dl { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .post-information dd { margin-bottom: 9px; }
  .post-detail-tab { font-size: 11px; gap: 4px; }
  .post-reply-children { margin-left: 6px; padding-left: 8px; }
  .post-reply-children .post-reply-children .post-reply-children { margin-left: 2px; padding-left: 4px; }
  .post-image-grid:not(.single) .post-image-open img { height: 150px; }
  .post-quoted-record { padding: 9px; }
}
@media (pointer: coarse) {
  .post-modal button, .post-image-modal button { min-height: 44px; }
  .post-link { min-height: 36px; }
}
.posts-empty { color: var(--dim); padding: 20px 0; line-height: 1.7; font-size: 12px; }
#posts-load-more { width: 100%; margin-top: 15px; }
.tip { position: fixed; z-index: 9; pointer-events: none; padding: 5px 9px; border-radius: 4px; max-width: min(360px, 80vw); background: rgba(3, 5, 12, 0.94); border: 1px solid #42657c; font: 11px var(--mono); overflow-wrap: anywhere; }
.status { position: fixed; z-index: 8; bottom: 24px; left: 50%; transform: translateX(-50%); padding: 13px 18px; max-width: min(460px, calc(100vw - 32px)); text-align: center; background: rgba(7, 13, 25, 0.95); border: 1px solid var(--line); border-radius: 8px; font-size: 12px; }
@media (max-width: 1100px) {
  :root { --topic-panel-width: 300px; }
  .left { padding: 14px; }
  .right { width: 294px; padding: 15px; }
}
@media (min-width: 641px) and (max-width: 820px) {
  :root { --topic-panel-width: 270px; }
  .left { left: 12px; }
  .right { width: 250px; right: 12px; padding: 13px; }
  .topics button[data-topic-id] { grid-template-columns: minmax(0, 1fr) 35px; gap: 4px; }
  .topics .name small { font-size: 9px; }
  .topics .chg { font-size: 10px; }
}
@media (max-width: 640px) {
  .topics-toggle { display: block; position: fixed; z-index: 5; left: 12px; top: 12px; min-height: 40px; padding: 8px 15px; border: 1px solid rgba(122, 163, 207, 0.3); border-radius: 8px; background: rgba(7, 13, 25, 0.9); color: #d3e8f6; font-size: 12px; backdrop-filter: blur(10px); }
  .topics-toggle[aria-expanded="true"] { border-color: #6aafc0; }
  .left { display: none; top: 64px; bottom: 94px; left: 12px; width: calc(100% - 24px); max-width: 420px; padding: 16px; background: rgba(7, 13, 25, 0.97); }
  body.topics-open .left { display: flex; z-index: 7; }
  #topics-close { display: block; }
  .panel-heading { margin-bottom: 16px; }
  .topic-tools { max-height: 64%; }
  .topics button[data-topic-id] { min-height: 46px; padding: 9px 4px; }
  .topics .topic-add { height: 32px; }
  .right { top: auto; left: 12px; right: 12px; bottom: 12px; width: auto; min-height: 70px; max-height: 70vh; padding: 11px 15px; overflow: hidden; background: rgba(7, 13, 25, 0.94); }
  .posts-heading { margin: 0; min-height: 46px; }
  .right h2 { font-size: 18px; margin: 0; }
  .eyebrow { font-size: 8px; }
  .detail-toggle { display: block; padding: 8px; background: transparent; border: 0; color: #a9c8da; font-size: 11px; }
  #detail-content { display: none; }
  body.detail-open .right { overflow-y: auto; }
  body.detail-open #detail-content { display: block; padding-top: 14px; }
  .status { bottom: 94px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
/* Collection freshness is independent of following the newest archived minute. */
.collection-health, .coverage-status { margin: 0 18px 8px; font-size: 11px; color: #9baac0; line-height: 1.5; }
.collection-health::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 7px; background: #e4b269; }
.collection-health[data-state="collecting"]::before { background: #66debc; }
.collection-health[data-state="failed"]::before, .collection-health[data-state="stale"]::before { background: #f18692; }
.workspace-navigation { position: fixed; z-index: 12; top: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 24px; background: #091320e8; backdrop-filter: blur(12px); }
.workspace-navigation button { min-height: 34px; padding: 6px 20px; border: 0; border-radius: 18px; background: transparent; color: var(--dim); }
.workspace-navigation button[aria-pressed="true"] { background: #173344; color: #b9edf2; }
.ingestion-active > .panel, .ingestion-active > #galaxy, .ingestion-active > .topics-toggle, .ingestion-active > .renderer-status, .ingestion-active > .tip { visibility: hidden; pointer-events: none; }
.ingestion-view { position: fixed; z-index: 8; inset: 0; padding: 90px max(28px, calc((100vw - 1380px) / 2)) 40px; overflow-y: auto; background: radial-gradient(ellipse at 40% 20%, #10263d70, transparent 65%), #040912; }
.ingestion-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.ingestion-header h1 { font-size: clamp(25px, 3vw, 38px); font-weight: 400; letter-spacing: -1px; margin: 8px 0; }
.ingestion-header p { color: var(--dim); font-size: 12px; }
.ingestion-actions { display: flex; align-items: center; gap: 12px; }
.ingestion-actions label { color: var(--dim); display: grid; gap: 5px; font-size: 11px; }
.ingestion-view button, .ingestion-view select { border: 1px solid #34506a70; background: #0b1b2c; border-radius: 6px; min-height: 38px; padding: 8px 12px; }
.ingestion-tabs { display: flex; gap: 10px; margin: 22px 0 0; }
.ingestion-tabs [aria-pressed="true"] { border-color: #68cde0; color: #b4edf6; }
.processing-space { height: clamp(280px, 34vw, 440px); position: relative; border-bottom: 1px solid #243a4d; margin-top: 10px; overflow: hidden; }
#processing-canvas, .processing-labels { position: absolute; inset: 0; width: 100%; height: 100%; }
.processing-labels { pointer-events: none; }
.ingestion-label-leaders { position: absolute; inset: 0; width: 100%; height: 100%; stroke: #7196af; stroke-opacity: .55; stroke-width: 1; pointer-events: none; }
.publication-topics { padding: 14px 0; color: #9bb8d1; font-size: 12px; }
.publication-topic-list { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; }
.publication-topic-list button { max-width: 100%; overflow-wrap: anywhere; }
.ingestion-view .ingestion-object-label { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.ingestion-view .ingestion-object-label { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; border: 1px solid #3e718366; background: #081420ce; color: #c1e4ee; font-size: 11px; white-space: nowrap; padding: 4px 9px; min-height: 32px; }
.processing-caption { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); width: 100%; text-align: center; font: 10px var(--mono); color: #718ea5; pointer-events: none; }
#processing-fallback { position: relative; padding: 60px 25px; color: var(--dim); }
.ingestion-stages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 20px; }
.ingestion-view .ingestion-stage { text-align: left; border-top: 2px solid var(--stage-color); padding: 16px 20px; background: linear-gradient(140deg, #122337b0, #081321); }
.ingestion-stage .eyebrow { color: var(--stage-color); font-size: 10px; }
.ingestion-stage strong { display: block; font: 400 clamp(22px, 3vw, 32px) var(--mono); margin: 12px 0 7px; }
.ingestion-stage small { color: #8fa6bf; }
.ingestion-context { font-size: 11px; color: var(--dim); line-height: 1.7; }
.ingestion-evidence { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; margin-top: 30px; }
.ingestion-evidence h2 { font-size: 16px; font-weight: 500; margin: 0 0 18px; }
.ingestion-section-heading { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
#trace-sampling { font-size: 10px; color: var(--dim); }
.trace-list { display: flex; flex-direction: column; gap: 5px; max-height: 420px; overflow: auto; }
.ingestion-view .trace-row { display: grid; grid-template-columns: 94px 1fr auto; text-align: left; align-items: center; gap: 10px; border-radius: 6px; padding: 12px; font-size: 11px; background: #0b1725; }
.trace-row > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trace-row[aria-pressed="true"] { border-color: #70c6d7; }
.trace-state { color: #82d7bd; font: 10px var(--mono); }
.trace-row time { color: var(--dim); }
.trace-inspector { border: 1px solid #254159; border-radius: 10px; padding: 24px; background: #0b1827; align-self: start; }
.trace-inspector .eyebrow { color: #6dd6dd; font-size: 10px; }
.trace-inspector h2 { margin-top: 8px; }
.trace-timeline { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 14px; }
.trace-timeline li { display: flex; justify-content: space-between; padding-left: 18px; position: relative; font-size: 12px; }
.trace-timeline li::before { content: ''; width: 6px; height: 6px; position: absolute; left: 0; top: 6px; border-radius: 50%; background: #70d4c2; }
.trace-timeline .pending { opacity: 0.4; }
.trace-timeline time { font-family: var(--mono); color: var(--dim); font-size: 11px; }
.trace-inspector blockquote { margin: 20px 0; padding: 12px; border-left: 2px solid #457b90; color: #a7c0d8; font-size: 12px; overflow-wrap: anywhere; }
.trace-candidate { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; gap: 10px; }
.trace-candidate small { color: var(--dim); font-size: 10px; }
.trace-open-post { margin: 16px 0 6px; }
.ingestion-empty { color: var(--dim); font-size: 12px; padding: 20px 0; }
@media (max-width: 640px) {
  .workspace-navigation { left: auto; right: 16px; transform: none; top: 14px; }
  .workspace-navigation button { padding: 6px 13px; }
  .ingestion-view { padding: 84px 16px 35px; }
  .ingestion-header { align-items: flex-start; flex-direction: column; gap: 8px; }
  .ingestion-actions { width: 100%; justify-content: space-between; }
  .ingestion-stages { grid-template-columns: repeat(2, 1fr); }
  .ingestion-view .ingestion-stage { padding: 14px; }
  .ingestion-evidence { grid-template-columns: 1fr; }
  .trace-row time { display: none; }
  .ingestion-view .trace-row { grid-template-columns: 90px 1fr; }
  .processing-space { height: 260px; }
  .processing-caption { font-size: 8px; }
}
.investigation-tools { margin: 14px 0; font-size: 11px; }
.investigation-tools summary { color: #9bb8d1; cursor: pointer; }
.investigation-tools label { display: grid; gap: 5px; color: var(--dim); margin: 12px 0; }
.investigation-tools input, .investigation-tools select { width: 100%; min-height: 34px; padding: 6px 8px; border-radius: 5px; border: 1px solid var(--line); background: #0a1727; }
.investigation-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.investigation-actions button { padding: 6px 9px; border: 1px solid var(--line); border-radius: 5px; background: #0e2234; min-height: 32px; }
#investigation-message { color: var(--dim); font-size: 10px; }
.export-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.export-actions button { border: 1px solid var(--line); background: #0a1b2b; padding: 7px; border-radius: 4px; font-size: 10px; }
.source-comparison-tools { margin: 12px 0; border: 1px solid var(--line); border-radius: 7px; padding: 10px; background: #071523; }
.source-comparison-tools summary { cursor: pointer; color: #a8d9ed; }
.source-comparison-tools p, .comparison-definitions { color: var(--dim); font-size: 10px; line-height: 1.5; }
.comparison-sources { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; max-height: 160px; overflow: auto; margin: 10px 0; }
.comparison-sources label { display: flex; align-items: center; gap: 6px; min-height: 30px; font-size: 11px; overflow-wrap: anywhere; }
.comparison-sources input { width: 16px; height: 16px; flex: 0 0 auto; }
.comparison-query { width: 100%; padding: 7px; border: 1px solid var(--line); border-radius: 4px; background: #091b2d; margin: 6px 0; }
.comparison-actions { display: flex; gap: 5px; }
.comparison-actions button, .comparison-table button { padding: 6px 8px; border: 1px solid var(--line); border-radius: 4px; background: #0c2435; color: #b9e4f1; }
.comparison-table { max-height: 360px; overflow: auto; border: 1px solid var(--line); }
.comparison-table table { border-collapse: collapse; min-width: 100%; font-size: 10px; }
.comparison-table th { position: sticky; top: 0; background: #0a1c2c; z-index: 1; }
.comparison-table th, .comparison-table td { min-width: 80px; padding: 8px; text-align: left; border-bottom: 1px solid var(--line); }
.comparison-table td { position: relative; }
.comparison-bar { position: absolute; bottom: 1px; left: 0; height: 3px; background: linear-gradient(90deg,#346bb6,#60dfcf); }
.comparison-definitions { padding-left: 16px; }
.public-post-details .post-card { padding: 18px; }
.public-post-details .post-full-text { white-space: pre-wrap; line-height: 1.65; }
.public-post-details .post-statistics { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; padding: 12px; background: #0a1a2b; border: 1px solid var(--line); border-radius: 7px; }
.public-post-details .post-reply { padding: 12px; margin: 10px 0 10px 8px; border-left: 2px solid #397a91; }
.public-post-details .post-image { max-width: 100%; max-height: 480px; }
.ingestion-object-label.publication-strengthened { border-color: #6fe3bd; color: #b6f5d9; box-shadow: 0 0 16px #6fe3bd24; }
