:root {
  --ink: #1b2529;
  --ink-2: #26363b;
  --panel: #ffffff;
  --paper: #eef2f2;
  --muted: #68777d;
  --line: rgba(29, 48, 54, 0.16);
  --accent: #c43e37;
  --accent-dark: #992e2a;
  --water: #2f7d82;
  --water-bright: #226a70;
  --white: #ffffff;
  --night-glass: rgba(255, 255, 255, 0.96);
  --night-glass-soft: rgba(247, 250, 250, 0.94);
  --night-cyan-soft: rgba(47, 125, 130, 0.1);
  --night-red-soft: rgba(196, 62, 55, 0.1);
}

html,
body {
  color: var(--ink);
  background: #dfe5e6;
}

body::after {
  display: none;
}

.app-shell {
  color: var(--ink);
  background: var(--paper);
}

button {
  letter-spacing: 0;
}

/* Header */

.topbar {
  color: var(--ink);
  background: #f8fafa;
  border-bottom: 1px solid #cfd7d9;
  box-shadow: 0 5px 18px rgba(40, 62, 68, 0.08);
}

.topbar::after {
  left: 0;
  right: 0;
  background: linear-gradient(90deg, var(--accent) 0 48px, #cfd7d9 48px);
}

.brand-mark {
  color: #fff;
  background: var(--accent);
  border-color: rgba(120, 22, 20, 0.12);
  box-shadow: none;
}

.brand-copy strong {
  color: #182227;
}

.brand-copy small {
  color: #718087;
}

.view-switcher {
  background: #e9eeee;
  border-color: #d4dcde;
}

.view-button {
  color: #617076;
}

.view-button:hover {
  color: #172126;
}

.view-button.active {
  color: #182227;
  background: #fff;
  box-shadow:
    inset 0 -2px var(--water),
    0 1px 2px rgba(40, 62, 68, 0.08);
}

.search-wrap input {
  color: #172126;
  background: #fff;
  border-color: #cbd5d7;
  box-shadow: inset 0 1px 2px rgba(40, 62, 68, 0.04);
}

.search-wrap::after {
  color: var(--water);
}

.search-wrap input::placeholder {
  color: #89969b;
}

.search-results {
  color: var(--ink);
  background: #fff;
  border-color: #cbd5d7;
  box-shadow: 0 18px 48px rgba(40, 62, 68, 0.18);
}

.search-results button {
  color: var(--ink);
}

.search-results button:hover,
.search-results button:focus-visible {
  background: #edf4f4;
}

.search-results .result-type {
  color: var(--water);
  border-color: rgba(47, 125, 130, 0.28);
}

.dataset-count {
  color: #44545a;
  border-right-color: #d9e0e1;
}

.status-dot {
  background: var(--water);
  box-shadow: 0 0 0 3px rgba(47, 125, 130, 0.1);
}

.dataset-count.is-offline {
  color: #78858a;
}

.tool-button {
  color: #5e6c72;
  background: #fff;
  border-color: #d4dcde;
}

.tool-button:hover {
  color: #182227;
  border-color: #aebbbf;
  background: #f4f7f7;
}

.tool-button[aria-pressed="true"] {
  color: var(--accent-dark);
  background: #fff3f2;
  border-color: rgba(196, 62, 55, 0.42);
}

.tool-button i {
  background: #9aa6aa;
}

/* Data rails */

.workspace {
  background: #dfe5e6;
}

.filter-rail {
  color: var(--ink);
  background: #f8fafa;
  border-right-color: #ccd5d7;
}

.rail-heading {
  color: #1d292e;
}

.rail-heading > span small,
.record-index {
  color: var(--water);
}

.clear-button,
.map-rail-close,
.graph-rail-close {
  color: #69777d;
}

.map-rail-close,
.graph-rail-close {
  background: #fff;
  border-color: #d2dadd;
}

.explore-index button,
.topic,
.check-row {
  color: #5f6e74;
}

.explore-index button:hover,
.explore-index button:focus-visible,
.topic:hover {
  color: #172126;
  background: #eaf0f0;
}

.explore-index button.active,
.topic.active {
  color: #172126;
  background: #edf4f4;
  border-left-color: var(--accent);
}

.explore-index button > span {
  color: #5d6c72;
  background: #fff;
  border-color: #cbd5d7;
}

.explore-index button.active > span {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.explore-index button small,
.check-row b,
.layer-intensity,
legend,
.legend {
  color: #718087;
}

fieldset,
.layer-intensity,
.legend {
  border-color: #d7dfe1;
}

.check-mark {
  background: #fff;
  border-color: #9aa8ad;
}

.check-row input:checked + .check-mark {
  border-color: var(--accent);
}

.layer-intensity input {
  accent-color: var(--accent);
}

.graph-rail-center {
  border-color: #d7dfe1;
}

.graph-rail-center::before {
  color: rgba(47, 125, 130, 0.06);
}

.graph-rail-center small,
.graph-rail-status span,
.graph-rail-center p {
  color: #718087;
}

.graph-rail-center strong,
.graph-rail-status strong {
  color: #1b282d;
}

.graph-rail-sigil {
  color: var(--water);
  background: #fff;
  border-color: rgba(47, 125, 130, 0.3);
  box-shadow: inset 0 0 18px rgba(47, 125, 130, 0.06);
}

.graph-family-list button {
  color: #68777d;
  border-color: #d9e0e1;
}

.graph-family-list button:hover,
.graph-family-list button:focus-visible,
.graph-family-list button.active {
  color: #182227;
  background: #edf3f3;
}

.graph-family-list button i {
  border-top-color: #5e7076;
}

.graph-minimap,
.graph-rail-status {
  border-color: #d7dfe1;
}

.graph-minimap-control {
  background:
    linear-gradient(rgba(38, 58, 64, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(38, 58, 64, 0.05) 1px, transparent 1px),
    #f1f5f5;
  background-size: 16px 16px;
  border-color: #cad4d6;
}

/* Map */

.map-stage {
  background: #dce3e4;
}

.map-stage::before {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 54px rgba(46, 65, 71, 0.1);
}

.map-stage::after {
  background-image:
    linear-gradient(rgba(38, 58, 64, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(38, 58, 64, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mix-blend-mode: multiply;
  opacity: 0.42;
}

.map-image {
  filter:
    brightness(var(--map-intensity, 0.92))
    saturate(0.78)
    contrast(1.04);
  opacity: 1;
}

.map-tint {
  background: rgba(240, 244, 244, 0.04);
}

.route {
  stroke: rgba(178, 63, 56, 0.62);
  filter: none;
}

.poem-evidence-path {
  stroke: rgba(47, 125, 130, 0.72);
  filter: none;
}

.poem-evidence-origin,
.poem-evidence-target {
  fill: #fff;
  stroke: var(--water);
  filter: none;
}

.marker-core {
  background: #fff;
  border-color: #41535a;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.82),
    0 2px 8px rgba(32, 51, 57, 0.25);
}

.map-marker:hover .marker-core,
.map-marker.active .marker-core {
  background: var(--accent);
  border-color: #fff;
  box-shadow:
    0 0 0 3px rgba(196, 62, 55, 0.18),
    0 2px 9px rgba(32, 51, 57, 0.3);
}

.map-marker[data-layer="poem"] .marker-core {
  background: #fff;
  border-color: var(--water);
}

.map-marker[data-layer="poem"].active .marker-core {
  background: var(--water);
  border-color: #fff;
}

.marker-pulse {
  border-color: rgba(196, 62, 55, 0.34);
}

.marker-label {
  color: #19252a;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(49, 71, 78, 0.18);
  box-shadow: 0 4px 14px rgba(40, 62, 68, 0.13);
}

.marker-label span,
.marker-label small {
  color: #607077;
}

.marker-label b {
  color: #172126;
}

.map-marker.active .marker-label {
  border-color: rgba(196, 62, 55, 0.46);
}

.scene-status {
  color: #35464c;
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(47, 125, 130, 0.24);
  box-shadow: 0 8px 24px rgba(40, 62, 68, 0.12);
}

.scene-status i {
  background: var(--water);
  box-shadow: 0 0 0 3px rgba(47, 125, 130, 0.1);
}

.scene-status strong {
  color: #172126;
}

.scene-status b {
  color: #172126;
}

.scene-status small {
  color: #718087;
}

.map-meta,
.zoom-control {
  color: #4e5d63;
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(49, 71, 78, 0.18);
  box-shadow: 0 6px 20px rgba(40, 62, 68, 0.1);
}

.map-meta b,
.zoom-control button {
  color: var(--water);
}

.zoom-control span,
.zoom-control button {
  border-color: #d8e0e2;
}

.zoom-control button:hover {
  color: #fff;
  background: var(--water);
}

.poetry-field {
  opacity: 0.22;
  mix-blend-mode: multiply;
}

.focus-bloom {
  border-color: rgba(196, 62, 55, 0.32);
  box-shadow: none;
}

/* Dossiers */

.knowledge-panel {
  color: var(--ink);
  background: #fbfcfc;
  border-left-color: #cbd5d7;
  box-shadow: -10px 0 28px rgba(40, 62, 68, 0.07);
  scrollbar-color: #b8c5c8 transparent;
}

.panel-toolbar {
  color: #69777d;
}

.panel-toolbar button,
.dialog-close {
  color: #65747a;
  background: #fff;
  border-color: #d1dadd;
}

.panel-toolbar button:hover,
.dialog-close:hover {
  color: var(--accent-dark);
  background: #fff2f1;
  border-color: rgba(196, 62, 55, 0.42);
}

.person-heading h1,
.place-dossier-heading h1 {
  color: #172126;
  text-shadow: none;
}

.person-heading p,
.place-dossier-heading > div:first-child > span,
.place-dossier-heading p,
.place-dossier-status,
.place-dossier-section > header,
.place-dossier-coordinate span,
.place-dossier-coordinate small {
  color: #6c7a80;
}

.dynasty-stamp {
  color: #fff;
  background: var(--accent);
  box-shadow: none;
}

.portrait,
.place-dossier-sigil {
  color: var(--water);
  background: #edf4f4;
  border-color: rgba(47, 125, 130, 0.28);
  box-shadow: inset 0 0 24px rgba(47, 125, 130, 0.06);
}

.knowledge-panel blockquote {
  color: #425158;
  border-color: #cfd9db;
}

.person-stats,
.person-stats div,
.place-dossier-stats,
.place-dossier-stats div,
.place-dossier-coordinate,
.place-dossier-author-list,
.place-dossier-work-list,
.place-dossier-author-list button,
.place-dossier-work-list button,
.place-dossier-empty {
  border-color: #d9e0e2;
}

.person-stats dt,
.place-dossier-stats dt {
  color: #718087;
}

.person-stats dd,
.place-dossier-stats dd,
.place-dossier-coordinate strong {
  color: var(--water);
  font-variant-numeric: tabular-nums;
}

.panel-tabs {
  border-color: #d6dfe1;
}

.panel-tab {
  color: #6b797f;
}

.panel-tab.active {
  color: #172126;
  border-bottom-color: var(--accent);
}

.featured-poem {
  color: var(--ink);
  background: #fff;
  border-color: #d4dddf;
  box-shadow: 0 6px 20px rgba(40, 62, 68, 0.06);
}

.featured-poem > p,
.featured-poem h2,
.context-list b,
.poem-place-evidence q {
  color: #2e3b40;
}

.featured-poem footer,
.context-list button,
.poem-place-evidence {
  border-color: #dbe2e4;
}

.context-list button:hover,
.context-list button:focus-visible {
  background: #edf3f3;
}

.poem-place-evidence header span,
.poem-place-evidence header button {
  color: var(--water);
}

.mini-graph {
  background:
    linear-gradient(rgba(38, 58, 64, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(38, 58, 64, 0.045) 1px, transparent 1px),
    #fff;
  background-size: 18px 18px;
  border-color: #d5dee0;
}

.mini-node {
  color: #25343a;
  background: #f5f7f7;
  border-color: #9fadb1;
}

.mini-node.center {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

#place-dossier-return {
  color: #65747a;
  background: #fff;
  border-color: #d1dadd;
}

#place-dossier-return:hover,
#place-dossier-return:focus-visible {
  color: var(--accent-dark);
  background: #fff2f1;
  border-color: rgba(196, 62, 55, 0.42);
}

.place-dossier-boundary {
  color: #46565c;
  background: #f0f5f5;
  border-left-color: var(--accent);
}

.place-dossier-author-list button,
.place-dossier-work-list button {
  color: #223136;
}

.place-dossier-author-list button:hover,
.place-dossier-author-list button:focus-visible,
.place-dossier-work-list button:hover,
.place-dossier-work-list button:focus-visible {
  background: #edf4f4;
}

.place-dossier-author-list button small,
.place-dossier-author-list button span,
.place-dossier-work-list button > span:first-child,
.place-dossier-work-list button small,
.place-dossier-work-list button q,
.place-dossier-empty {
  color: #6e7d83;
}

.place-dossier-actions button {
  color: #284047;
  background: #fff;
  border-color: #bfcdd0;
}

.place-dossier-actions button:hover,
.place-dossier-actions button:focus-visible {
  color: var(--water-bright);
  background: #edf4f4;
  border-color: var(--water);
}

.place-dossier-actions button:first-child {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.place-dossier[data-state="fallback"] .place-dossier-status {
  color: var(--accent-dark);
}

/* Timeline */

.timeline-bar {
  color: var(--ink);
  background: rgba(249, 251, 251, 0.98);
  border-color: #cbd5d7;
  box-shadow: 0 -8px 24px rgba(40, 62, 68, 0.08);
}

.timeline-copy,
.timeline-stats {
  border-color: #d6dfe1;
}

.timeline-copy small {
  color: #718087;
}

.timeline-copy strong {
  color: #233238;
}

.timeline-scroll button {
  color: #69777d;
  border-left-color: #e1e6e7;
}

.timeline-scroll button.active {
  color: #172126;
  background: #fff;
}

.timeline-scroll button.active::before {
  background: var(--accent);
}

.timeline-scroll small {
  color: #8a969a;
}

.timeline-stats {
  color: #718087;
}

.timeline-stats b {
  color: var(--water);
  font-variant-numeric: tabular-nums;
}

/* Constellation */

.graph-layer {
  color: var(--ink);
  background:
    linear-gradient(rgba(38, 58, 64, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(38, 58, 64, 0.045) 1px, transparent 1px),
    rgba(238, 243, 243, 0.96);
  background-size: 32px 32px;
  backdrop-filter: blur(4px);
}

.graph-mode .poetry-field {
  opacity: 0.04;
  mix-blend-mode: multiply;
}

.graph-title,
.graph-title strong {
  color: #172126;
}

.graph-title small,
.graph-title span {
  color: #6b797f;
}

.graph-toolbar button,
.graph-navigation button,
.graph-navigation-label {
  color: #526168;
  background: rgba(255, 255, 255, 0.92);
  border-color: #cbd5d7;
  box-shadow: 0 4px 14px rgba(40, 62, 68, 0.08);
}

.graph-toolbar button:hover,
.graph-toolbar button.active,
.graph-navigation button:hover,
.graph-navigation button:focus-visible {
  color: var(--accent-dark);
  background: #fff;
  border-color: rgba(196, 62, 55, 0.4);
}

.graph-navigation-label b {
  color: var(--water);
}

.graph-orbit-axis,
.graph-orbit-ring,
.graph-orbit-ring-inner {
  border-color: rgba(45, 82, 91, 0.14);
}

.graph-orbit-core {
  border-color: rgba(47, 125, 130, 0.28);
}

.graph-orbit-label {
  color: rgba(48, 69, 76, 0.5);
  background: rgba(238, 243, 243, 0.86);
}

.graph-edge-path {
  stroke: rgba(48, 69, 76, 0.42);
  filter: none;
}

.graph-edge-path.relation-place,
.graph-edge-path.relation-evidence,
.graph-edge-path.relation-source {
  stroke: rgba(47, 125, 130, 0.7);
}

.graph-edge-path.relation-peer {
  stroke: rgba(68, 82, 87, 0.58);
}

.graph-edge-label {
  color: #627178;
  background: rgba(238, 243, 243, 0.92);
}

.graph-geo-path {
  stroke: rgba(47, 125, 130, 0.52);
  filter: none;
}

.graph-geo-origin,
.graph-geo-target {
  fill: #fff;
  stroke: var(--water);
}

.graph-geo-label {
  color: #617178;
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(47, 125, 130, 0.2);
}

.graph-node {
  color: #1f2d32;
  background: rgba(255, 255, 255, 0.94);
  border-color: #aebdc1;
  box-shadow: 0 5px 16px rgba(40, 62, 68, 0.12);
}

.graph-node::after {
  border-color: rgba(47, 125, 130, 0.14);
}

.graph-node:hover,
.graph-node:focus-visible,
.graph-node.selected {
  color: #172126;
  background: #fff;
  border-color: var(--accent);
  box-shadow:
    0 0 0 3px rgba(196, 62, 55, 0.1),
    0 7px 20px rgba(40, 62, 68, 0.14);
}

.graph-node small {
  color: #718087;
}

.graph-node-author {
  color: #fff;
  background: #2f4147;
  border-color: #2f4147;
  box-shadow: 0 10px 30px rgba(40, 62, 68, 0.2);
}

.graph-node-author::after {
  border-color: rgba(255, 255, 255, 0.28);
}

.graph-author-sigil,
.graph-poem-sigil,
.graph-place-sigil {
  color: rgba(255, 255, 255, 0.18);
  text-shadow: none;
}

.graph-node-author small {
  color: rgba(255, 255, 255, 0.68);
}

.graph-node-author:hover,
.graph-node-author:focus-visible,
.graph-node-author.selected {
  color: #fff;
  background: #26383e;
}

.graph-node-peerauthor {
  color: #203036;
  background: #fff;
  border-color: #71878d;
}

.graph-node-place {
  color: #fff;
  background: var(--water);
  border-color: var(--water);
}

.graph-node-place small {
  color: rgba(255, 255, 255, 0.76);
}

.graph-node-poem,
.graph-node-genre,
.graph-node-dynasty,
.graph-node-source,
.graph-node-category,
.graph-node-collection,
.graph-node-volume {
  color: #24343a;
  background: #fff;
}

.graph-focus-ring,
.graph-focus-halo::before,
.graph-focus-halo::after {
  border-color: rgba(196, 62, 55, 0.36);
  box-shadow: none;
}

.graph-focus-degree,
.graph-focus-kind {
  color: var(--accent-dark);
  background: rgba(255, 255, 255, 0.94);
}

.graph-trail-badge {
  color: #fff;
  background: var(--accent);
  border-color: #fff;
}

.graph-inspector,
.graph-reading-aperture,
.graph-comparison,
.graph-evidence-lens {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.98);
  border-color: #cbd5d7;
  box-shadow: 0 18px 54px rgba(40, 62, 68, 0.18);
}

.graph-inspector-entity > span,
#graph-probe-count,
.graph-trail-heading,
.graph-evidence-lens span {
  color: #718087;
}

.graph-inspector-entity > strong,
.graph-evidence-lens strong,
.graph-reading-title strong,
.graph-comparison strong {
  color: #172126;
}

.graph-inspector-entity > small,
.graph-evidence-lens small,
.graph-reading-source,
.graph-comparison small {
  color: #68777d;
}

.graph-relation-link,
.graph-trail-step,
.graph-reading-evidence-item,
.graph-comparison-work {
  color: #26363b;
  background: #f4f7f7;
  border-color: #c8d3d5;
}

.graph-relation-link:hover,
.graph-relation-link:focus-visible,
.graph-trail-step:hover,
.graph-trail-step:focus-visible {
  color: #172126;
  background: #eaf1f1;
  border-color: var(--water);
}

.graph-relation-link small,
.graph-trail-step small,
.graph-reading-evidence-item small {
  color: #718087;
}

.graph-inspector-actions button,
.graph-reading-aperture button,
.graph-comparison button,
.graph-evidence-actions button {
  color: #46575e;
  background: #fff;
  border-color: #c7d2d4;
}

.graph-inspector-actions button:hover,
.graph-inspector-actions button:focus-visible,
.graph-reading-aperture button:hover,
.graph-comparison button:hover,
.graph-evidence-actions button:hover {
  color: var(--accent-dark);
  background: #fff2f1;
  border-color: rgba(196, 62, 55, 0.42);
}

.graph-reading-poem,
.graph-comparison-work p,
.graph-evidence-proof q {
  color: #35454b;
}

.graph-reading-evidence,
.graph-comparison-works,
.graph-evidence-relation,
.graph-evidence-proof,
.graph-trail {
  border-color: #d9e1e3;
}

.graph-legend {
  color: #66757b;
}

.graph-legend span::before {
  border-top-color: #61747a;
}

.graph-legend span.is-active {
  color: #182227;
}

/* Review workbenches */

.identity-workbench,
.classic-workbench,
.place-audit-workbench {
  color: var(--ink);
  background: #fbfcfc;
  border-color: #c6d1d3;
  box-shadow: 0 26px 72px rgba(40, 62, 68, 0.22);
}

.identity-workbench > header,
.classic-workbench > header,
.place-audit-workbench > header,
.identity-queue,
.classic-queue,
.place-audit-queue,
.identity-evidence,
.classic-method,
.place-audit-method,
.identity-cluster-heading,
.classic-audit-heading,
.place-audit-heading,
.identity-cluster,
.classic-audit-item,
.place-audit-relation {
  border-color: #d9e1e3;
}

.identity-workbench > header,
.classic-workbench > header,
.place-audit-workbench > header {
  background: #f1f5f5;
  border-bottom-color: #cbd5d7;
}

.identity-workbench > header span,
.identity-workbench > header small,
.classic-workbench > header span,
.classic-workbench > header small,
.place-audit-workbench > header span,
.place-audit-workbench > header small,
.identity-queue > span,
.classic-queue > span,
.place-audit-queue > span,
.identity-evidence > span,
.classic-method > span,
.place-audit-method > span {
  color: #6d7c82;
}

.identity-workbench > header strong,
.classic-workbench > header strong,
.place-audit-workbench > header strong,
.identity-cluster-heading strong,
.classic-audit-heading strong,
.place-audit-heading strong {
  color: #172126;
}

#identity-workbench-close,
#classic-workbench-close,
#place-audit-workbench-close,
.review-export-button {
  color: #5f6f75;
  background: #fff;
  border-color: #cbd5d7;
}

#identity-workbench-close:hover,
#classic-workbench-close:hover,
#place-audit-workbench-close:hover,
.review-export-button:hover {
  color: var(--accent-dark);
  background: #fff2f1;
  border-color: rgba(196, 62, 55, 0.42);
}

.identity-queue-item,
.classic-queue-item,
.place-audit-queue-item {
  color: #34454b;
}

.identity-queue-item:hover,
.identity-queue-item:focus-visible,
.identity-queue-item.active,
.classic-queue-item:hover,
.classic-queue-item:focus-visible,
.classic-queue-item.active,
.place-audit-queue-item:hover,
.place-audit-queue-item:focus-visible,
.place-audit-queue-item.active {
  color: #172126;
  background: #edf3f3;
  border-left-color: var(--accent);
}

.identity-queue-item small,
.classic-queue-item small,
.place-audit-queue-item small,
.identity-cluster small,
.classic-audit-item small,
.place-audit-relation small {
  color: #718087;
}

.identity-cluster > header b,
.classic-audit-item > header b,
.place-audit-relation > header strong {
  color: #223238;
}

.identity-cluster > header i,
.classic-audit-item > header i,
.place-audit-relation > header i {
  color: #66767c;
}

.identity-cluster-meter,
.classic-method-meter {
  background: #e0e6e7;
}

.identity-cluster-meter span,
.classic-method-meter span {
  background: var(--water);
}

.identity-cluster-sources span,
.classic-audit-evidence span,
.place-audit-evidence span {
  color: #64747a;
  background: #f7f9f9;
  border-color: #d5dee0;
}

.identity-cluster-samples button,
.classic-candidate,
.place-audit-sample {
  color: #2a3a40;
  background: #f3f6f6;
  border-color: #bfcdd0;
}

.identity-cluster-samples button:hover,
.classic-candidate:hover,
.place-audit-sample:hover {
  color: #172126;
  background: #eaf1f1;
  border-color: var(--water);
}

.identity-cluster-samples small,
.classic-candidate small,
.place-audit-sample small,
.place-audit-sample p {
  color: #68777d;
}

.identity-evidence > strong,
.classic-method > strong,
.place-audit-method > strong {
  color: var(--water);
}

.identity-evidence > p,
.classic-method > p,
.place-audit-method > p,
.identity-evidence > small,
.classic-method > small,
.place-audit-method > small {
  color: #52636a;
}

.classic-method dl,
.classic-method dl div,
.place-audit-method dl,
.place-audit-method dl div {
  border-color: #d6dfe1;
}

.classic-method dt,
.place-audit-method dt {
  color: #718087;
}

.classic-method dd,
.place-audit-method dd {
  color: #223238;
  font-variant-numeric: tabular-nums;
}

.place-audit-relation blockquote {
  color: #34454b;
  border-color: rgba(47, 125, 130, 0.34);
}

.place-audit-relation::before {
  background: rgba(47, 125, 130, 0.55);
}

.place-audit-relation[data-status="rejected"]::before {
  background: var(--accent);
}

.place-audit-method dl,
.place-audit-method dl div {
  border-color: #d6dfe1;
}

#place-audit-map-focus {
  color: var(--water-bright);
  background: #edf4f4;
  border-color: rgba(47, 125, 130, 0.36);
}

/* Reading dialog */

dialog {
  color: var(--ink);
  background: #fbfcfc;
  border: 1px solid #c7d2d4;
  box-shadow: 0 28px 80px rgba(40, 62, 68, 0.25);
}

dialog::backdrop {
  background: rgba(37, 52, 58, 0.34);
}

.dialog-author {
  color: #6d7b81;
}

.dialog-poem {
  color: #2b3a40;
}

@media (max-width: 900px) {
  .workspace:not(.graph-active) .filter-rail,
  .knowledge-panel {
    background: rgba(250, 252, 252, 0.98);
    border-color: #cbd5d7;
    box-shadow: 0 20px 56px rgba(40, 62, 68, 0.2);
  }

  .map-filter-toggle {
    color: #4f6067;
    background: rgba(255, 255, 255, 0.94);
    border-color: #c9d4d6;
  }

  .map-filter-toggle:hover,
  .map-filter-toggle:focus-visible,
  .map-filter-toggle[aria-expanded="true"] {
    color: var(--accent-dark);
    background: #fff;
    border-color: rgba(196, 62, 55, 0.45);
  }
}

@media (max-width: 560px) {
  .place-dossier-actions {
    background: rgba(251, 252, 252, 0.98);
  }

  .topbar {
    background: #f8fafa;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .knowledge-panel,
  .scene-status,
  .map-meta,
  .zoom-control,
  .graph-inspector,
  .graph-reading-aperture,
  .graph-comparison,
  .graph-evidence-lens {
    background: #fff;
    backdrop-filter: none;
  }
}
