:root {
  color-scheme: light;
  --bg: #fbf7ff;
  --surface: #ffffff;
  --surface-2: #f6f1fa;
  --surface-3: #f3eef7;
  --text: #111111;
  --muted: #696969;
  --line: #ded7e6;
  --brand-purple: #9966cc;
  --brand-blue: #4682b4;
  --brand-magenta: #c154c1;
  --accent: #356d99;
  --accent-rgb: 53, 109, 153;
  --accent-2: #eef5fb;
  --accent-cool: #cbb3e6;
  --accent-purple-soft: #f4effa;
  --ink: #000000;
  --warn: #9a5b00;
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.06);
  --comment-panel-width: 380px;
  font-family:
    GothamPro, "Avenir Next", Montserrat, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

@font-face {
  font-family: GothamPro;
  src: url("https://static.tildacdn.com/tild3965-3130-4330-a635-376363656164/GothamPro.woff")
    format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: GothamPro;
  src: url("https://static.tildacdn.com/tild3266-6230-4831-b465-353437313663/GothamPro-Medium.woff")
    format("woff");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 9px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 600;
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background-color 0.2s ease,
    transform 0.2s ease;
}

button:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

button:disabled {
  color: #98a2b3;
  cursor: not-allowed;
}

.disclaimerDialog {
  width: min(720px, calc(100vw - 48px));
  max-width: none;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.22);
}

.disclaimerDialog::backdrop {
  background: rgba(17, 17, 17, 0.46);
}

.disclaimerDialog:not([open]) {
  display: none;
}

.hasDisclaimerDialog {
  overflow: hidden;
}

.disclaimerContent {
  max-height: inherit;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 14px;
  padding: 28px 30px;
}

.disclaimerKicker {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.disclaimerDialog h2 {
  margin: 0;
  color: var(--text);
  font-size: 23px;
  font-weight: 650;
  line-height: 1.2;
}

.disclaimerDialog h2:focus {
  outline: none;
}

.disclaimerLead {
  margin: 0;
  max-width: 68ch;
  color: #403848;
  font-size: 15px;
  line-height: 1.55;
}

.disclaimerSections {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 14px;
  padding-right: 4px;
}

.disclaimerSections section {
  display: grid;
  gap: 5px;
}

.disclaimerSections h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
}

.disclaimerSections p {
  margin: 0;
  max-width: 72ch;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.disclaimerActions {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
}

.disclaimerPrimaryBtn {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.disclaimerPrimaryBtn:hover:not(:disabled) {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--accent-cool);
}

.buttonLink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 16px;
  text-decoration: none;
  font-weight: 600;
  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.buttonLink:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.topbar {
  min-height: 70px;
  margin: 10px 16px 0;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--ink);
  border: 0;
  border-radius: 10px;
  box-shadow: none;
}

.topbar h1 {
  margin: 0 0 4px;
  font-size: 22px;
  line-height: 1.2;
  color: #ffffff;
  font-weight: 600;
}

.topbar p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}

.topbarBrand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.siteLogoLink {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 8px;
  overflow: hidden;
  outline-offset: 4px;
}

.siteLogoLink:focus-visible {
  outline: 2px solid var(--accent);
}

.siteLogo {
  display: block;
  width: 50px;
  height: 50px;
  object-fit: cover;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.topbar .buttonLink,
.topbar button {
  min-height: 36px;
  border: 0;
  background: #ffffff;
  color: #000000;
}

.topbar .buttonLink:hover,
.topbar button:hover:not(:disabled) {
  color: var(--accent);
  background: #ffffff;
}

.layout {
  min-height: calc(100vh - 80px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--comment-panel-width);
  align-items: start;
}

.layout.isCommentPanelClosed {
  grid-template-columns: minmax(0, 1fr);
}

.workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.toolbar {
  margin: 16px 16px 0;
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 240px 190px;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.toolbar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.toolbar input,
.toolbar select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--text);
}

.commentPanelToggleBtn {
  position: fixed;
  top: 50%;
  right: var(--comment-panel-width);
  z-index: 30;
  transform: translateY(-50%);
  min-width: 38px;
  width: 38px;
  height: 72px;
  padding: 6px;
  border-radius: 9px 0 0 9px;
  border-right: 0;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  font-size: 24px;
  line-height: 1;
}

.layout.isCommentPanelClosed .commentPanelToggleBtn {
  right: 0;
}

.phaseFilterBlock {
  display: grid;
  gap: 6px;
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  min-width: 0;
}

.phaseTimeline {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
}

.timelineAll,
.timelinePhase,
.timelineCrisis {
  min-width: 0;
  border: 0;
  font-size: 12px;
  line-height: 1.2;
}

.timelineAll {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
}

.timelineRail {
  display: grid;
  grid-template-columns: repeat(11, minmax(74px, 1fr));
  align-items: start;
  min-width: min(100%, 920px);
  flex: 1 1 auto;
}

.timelinePhase {
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 0 4px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
}

.timelineDot {
  width: 18px;
  height: 18px;
  border: 3px solid #cdbfd8;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(205, 191, 216, 0.22);
}

.timelineLabel {
  text-align: center;
  color: var(--text);
  font-weight: 650;
}

.timelineCrisis {
  display: grid;
  grid-template-rows: 18px auto;
  justify-items: stretch;
  gap: 7px;
  padding: 0;
  position: relative;
  color: var(--muted);
  background: transparent;
}

.timelineLine {
  align-self: center;
  height: 2px;
  border-top: 2px dashed #cdbfd8;
}

.timelineCrisisLabel {
  justify-self: center;
  max-width: 100%;
  border: 1px dashed #cdbfd8;
  border-radius: 999px;
  padding: 4px 8px;
  overflow: hidden;
  color: #746a7c;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.64);
}

.timelineAll.isActive,
.timelinePhase.isActive .timelineDot,
.timelineCrisis.isActive .timelineCrisisLabel {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.timelinePhase.isActive .timelineDot {
  box-shadow: 0 0 0 5px rgba(var(--accent-rgb), 0.2);
}

.timelinePhase.isActive .timelineLabel {
  color: var(--accent);
}

.timelineCrisis.isActive .timelineLine {
  border-top-color: var(--accent);
}

.phaseModelAttribution {
  overflow: hidden;
  color: #796f80;
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phaseModelAttribution:empty {
  display: none;
}

.phaseInfoCard {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(280px, 1.25fr);
  gap: 14px;
  align-items: start;
  margin: 12px 16px 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}

.phaseInfoCard[hidden] {
  display: none;
}

.phaseInfoHeader {
  display: grid;
  gap: 5px;
}

.phaseInfoEyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.phaseInfoHeader h3 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  line-height: 1.15;
}

.phaseInfoLead {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.phaseInfoList {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 7px 12px;
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
}

.phaseInfoList dt {
  color: var(--muted);
  font-weight: 700;
}

.phaseInfoList dd {
  margin: 0;
  color: var(--text);
}

.hiddenFieldLinks {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.hiddenFieldTitle {
  flex-basis: 100%;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.hiddenFieldBtn {
  min-height: 32px;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.84);
}

.hiddenFieldBtn.isActive {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.tableWrap {
  margin: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow-x: auto;
  overflow-y: visible;
  background: var(--surface);
  box-shadow: var(--shadow);
}

table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  max-width: 360px;
  min-width: 120px;
  padding: 12px 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: 14px;
  line-height: 1.35;
  background: var(--surface);
}

th {
  position: sticky;
  top: 0;
  z-index: 3;
  text-align: left;
  font-size: 12px;
  letter-spacing: 0;
  color: #403848;
  background: var(--surface-3);
  font-weight: 600;
}

td:first-child,
th:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 78px;
  max-width: 92px;
  font-weight: 700;
  background: #fbf9fd;
}

th:first-child {
  z-index: 4;
  background: #f0e9f7;
}

td[data-column="Комментарий"] {
  min-width: 150px;
}

td.cell {
  cursor: pointer;
}

td.cell:hover {
  background: #f5f1fb;
}

td.selected {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  background: var(--accent-2);
}

td.hasComment {
  box-shadow: inset 0 -3px 0 #f5b84b;
}

td.duplicateCell {
  background: #fff7ed;
}

td.semanticDuplicateCell {
  background: #f5f3ff;
}

.commentBadge {
  display: inline-flex;
  align-items: center;
  margin-top: 7px;
  padding: 2px 6px;
  border-radius: 999px;
  color: var(--warn);
  background: #fff4df;
  font-size: 11px;
  font-weight: 700;
}

.duplicateBadge {
  display: inline-flex;
  align-items: center;
  margin-top: 7px;
  padding: 2px 6px;
  border-radius: 999px;
  color: #9a3412;
  background: #ffedd5;
  font-size: 11px;
  font-weight: 700;
}

.semanticDuplicateBadge {
  display: inline-flex;
  align-items: center;
  margin-top: 7px;
  padding: 2px 6px;
  border-radius: 999px;
  color: #5b21b6;
  background: #ede9fe;
  font-size: 11px;
  font-weight: 700;
}

.commentPanel {
  min-width: 0;
  align-self: start;
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 24px);
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: -12px 0 32px rgba(0, 0, 0, 0.04);
}

.layout.isCommentPanelClosed .commentPanel {
  display: none;
}

.panelHeader {
  display: grid;
  gap: 4px;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panelHeader h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.panelHeader p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

textarea {
  min-height: 220px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 12px;
  line-height: 1.4;
}

textarea:focus,
input:focus,
select:focus {
  outline: 2px solid rgba(var(--accent-rgb), 0.2);
  border-color: var(--accent);
}

.panelActions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

#saveCommentBtn {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

#saveCommentBtn:hover:not(:disabled) {
  color: var(--accent-cool);
}

#clearCommentBtn {
  color: #8a1f11;
}

.saveStatus {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.hint {
  margin-top: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbf9fd;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

code {
  color: #403848;
  background: #f0e9f7;
  border-radius: 4px;
  padding: 1px 4px;
}

.empty {
  padding: 24px;
  color: var(--muted);
}

.anatomyPage {
  background: var(--bg);
}

.quadrantsPage {
  background: var(--bg);
}

.coresPage {
  background: var(--bg);
}

.anatomyLayout,
.quadrantsLayout {
  min-height: calc(100vh - 80px);
  display: grid;
  grid-template-columns: minmax(560px, 1fr) 430px;
  gap: 0;
}

.coresLayout {
  min-height: calc(100vh - 80px);
  display: grid;
  grid-template-columns: minmax(520px, 1fr) 430px;
  gap: 0;
}

.coresLayout.isDetailsClosed {
  grid-template-columns: minmax(520px, 1fr);
}

.coresSidebar,
.corePanel {
  min-width: 0;
  max-height: calc(100vh - 80px);
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
}

.coresSidebar {
  display: none;
}

.corePanel {
  grid-column: 2;
  border-left: 1px solid var(--line);
  box-shadow: -12px 0 32px rgba(0, 0, 0, 0.04);
}

.coresLayout.isDetailsClosed .corePanel {
  display: none;
}

.coreList {
  display: grid;
  gap: 8px;
}

.coreListItem {
  width: 100%;
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  text-align: left;
}

.coreListItem strong {
  font-size: 14px;
  line-height: 1.25;
}

.coreListItem span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.coreListItem.isSelected {
  border-color: var(--accent);
  background: var(--accent-2);
}

.coreListItem.isDimmed {
  opacity: 0.42;
}

.coresStage {
  grid-column: 1;
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-items: start;
  justify-items: start;
  overflow: auto;
  padding: 0 16px 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0)),
    var(--bg);
}

.coreGraphToolbar {
  width: min(100%, 1800px);
  align-self: end;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 0 8px;
}

.coreGraphToolbar button {
  min-width: 40px;
  height: 38px;
  padding: 7px 10px;
  font-weight: 900;
}

.coreDetailsToggleBtn {
  margin-left: auto;
  min-width: 46px;
  font-size: 24px;
  line-height: 1;
}

.coreLayerToggles {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.coreLayerToggles button {
  min-width: 0;
  height: 34px;
  padding: 6px 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.coreLayerToggles button.isActive {
  border-color: var(--accent);
  background: var(--accent-2);
  color: var(--accent);
}

.coreGraphToolbar label {
  min-width: 180px;
  display: grid;
  grid-template-columns: auto minmax(110px, 1fr);
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.coreGraphToolbar input {
  width: 100%;
  accent-color: var(--accent);
}

.coreGraph {
  width: clamp(1180px, 100%, 1800px);
  height: auto;
  aspect-ratio: 1800 / 1100;
  min-height: 0;
  max-height: none;
  border: 1px solid rgba(105, 105, 105, 0.2);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow);
  cursor: grab;
  touch-action: none;
}

.coreGraph[hidden] {
  display: none;
}

.coreGraphCy {
  display: block;
  width: 100%;
  height: min(760px, calc(100vh - 188px));
  min-height: 620px;
  aspect-ratio: auto;
  overflow: hidden;
}

.coreGraph.isPanning {
  cursor: grabbing;
}

.coreGraphViewport {
  transform-box: fill-box;
  transform-origin: 0 0;
}

.coreGraphEdge {
  stroke: rgba(105, 105, 105, 0.5);
  stroke-width: 2;
  transition:
    opacity 0.18s ease,
    stroke-width 0.18s ease;
}

.coreGraphEdgeLabel {
  fill: #667085;
  font-size: 12px;
  font-weight: 800;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.86);
  stroke-width: 5px;
}

.coreGraphNode {
  cursor: pointer;
  transition:
    opacity 0.18s ease,
    filter 0.18s ease;
}

.coreGraphNode .coreNodeHalo {
  opacity: 0.13;
}

.coreGraphNode .coreNodeShell {
  opacity: 0.9;
  stroke: rgba(255, 255, 255, 0.95);
  stroke-width: 4;
}

.coreGraphNode .coreNodeRing {
  fill: none;
  stroke: rgba(255, 255, 255, 0.68);
  stroke-width: 7;
}

.coreGraphNode .coreNodeCenter {
  opacity: 0.96;
  stroke: rgba(23, 32, 42, 0.14);
  stroke-width: 2;
}

.coreGraphNode text {
  fill: #17202a;
  font-size: 13px;
  font-weight: 900;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 5px;
}

.coreGraphNode .coreGraphNodeType {
  fill: #667085;
  font-size: 11px;
  font-weight: 800;
}

.coreGraphNode:hover,
.coreGraphNode:focus,
.coreGraphNode.isSelected {
  outline: none;
  filter: drop-shadow(0 0 10px rgba(var(--accent-rgb), 0.42));
}

.coreGraphNode.isSelected circle {
  filter: drop-shadow(0 0 5px rgba(var(--accent-rgb), 0.32));
}

.coreGraphNode.isSelected .coreNodeShell {
  stroke: var(--accent);
  stroke-width: 6;
}

.coreGraphNode.isDimmed,
.coreGraphEdge.isDimmed,
.coreGraphEdgeLabel.isDimmed {
  opacity: 0.22;
}

.coreGraphNode.isFiltered,
.coreGraphEdge.isFiltered,
.coreGraphEdgeLabel.isFiltered {
  opacity: 0.12;
}

.coreDetailGroup {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.coreDetailGroup h3 {
  margin: 0;
  color: #403848;
  font-size: 13px;
}

.coreDetailGroup p {
  margin: 0;
  color: #403848;
  font-size: 14px;
  line-height: 1.45;
}

.corePrinciples {
  display: grid;
  gap: 8px;
}

.corePrinciples p {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbf9fd;
}

.corePrinciples pre {
  max-width: 100%;
  overflow: auto;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbf9fd;
  color: #403848;
  font-size: 12px;
  line-height: 1.4;
}

.atlasStage {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0)),
    var(--bg);
}

.quadrantsStage {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0)),
    var(--bg);
}

.atlasToolbar,
.quadrantsToolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 16px 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.74);
}

.atlasToolbar .phaseTimeline,
.quadrantsToolbar .phaseTimeline {
  flex: 1 0 100%;
  order: 20;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.atlasToolbar .phaseModelAttribution,
.quadrantsToolbar .phaseModelAttribution {
  flex: 1 0 100%;
  order: 21;
}

.modeGroup,
.phaseControls {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
  padding-right: 8px;
  border-right: 1px solid var(--line);
}

.layerBtn,
.quadrantBtn,
.modeBtn,
.phaseBtn {
  min-width: 92px;
  background: rgba(255, 255, 255, 0.86);
  border-radius: 999px;
}

.layerBtn.isActive,
.quadrantBtn.isActive,
.modeBtn.isActive,
.phaseBtn.isActive {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.phaseControls,
.transitionSelect,
.atlasToolbar .phaseTimeline,
.atlasToolbar .phaseModelAttribution {
  display: none;
}

.phaseMode .phaseControls,
.phaseMode .atlasToolbar .phaseTimeline,
.phaseMode .atlasToolbar .phaseModelAttribution {
  display: inline-flex;
}

.quadrantsToolbar .phaseTimeline {
  display: inline-flex;
}

.phaseMode .transitionSelect {
  display: inline-grid;
}

.transitionSelect {
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.transitionSelect select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 7px 10px;
  background: #fff;
  color: var(--text);
}

.quadrantMap {
  position: relative;
  min-height: 560px;
  width: min(100% - 32px, 600px);
  align-self: center;
  justify-self: start;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  padding: 42px;
}

.axisLine {
  position: absolute;
  z-index: 2;
  background: rgba(52, 64, 84, 0.46);
  pointer-events: none;
}

.verticalAxis {
  top: 34px;
  bottom: 34px;
  left: 50%;
  width: 2px;
}

.horizontalAxis {
  left: 34px;
  right: 34px;
  top: 50%;
  height: 2px;
}

.axisLabel {
  position: absolute;
  z-index: 3;
  color: #475467;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.axisTop {
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
}

.axisBottom {
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
}

.axisLeft {
  left: 12px;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
}

.axisRight {
  right: 12px;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
}

.quadrantCell {
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: 205px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  align-items: start;
  gap: 8px;
  padding: 22px;
  border: 1px solid rgba(105, 105, 105, 0.2);
  border-radius: 8px;
  overflow: hidden;
  color: #17202a;
  text-align: left;
  box-shadow: var(--shadow);
  transition:
    transform 0.18s ease,
    opacity 0.18s ease,
    border-color 0.18s ease;
}

@media (min-width: 1500px) {
  .quadrantMap {
    min-height: 620px;
    width: min(100% - 32px, 900px);
    padding: 48px;
  }

  .quadrantCell {
    min-height: 230px;
  }
}

.quadrantCell::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.3;
  pointer-events: none;
}

.quadrantCell:hover,
.quadrantCell:focus {
  border-color: var(--accent);
  outline: none;
  transform: translateY(-2px);
  color: var(--text);
}

.quadrantCell.isSelected {
  border-color: var(--accent);
  outline: 3px solid rgba(var(--accent-rgb), 0.18);
}

.quadrantCell.isDimmed {
  opacity: 0.34;
}

.upperLeft {
  background: #fff9e8;
}

.upperLeft::before {
  background: linear-gradient(135deg, #e7a646, transparent 62%);
}

.upperRight {
  background: #eef7ff;
}

.upperRight::before {
  background: linear-gradient(225deg, #4d97c8, transparent 62%);
}

.lowerLeft {
  background: #f1f8ee;
}

.lowerLeft::before {
  background: linear-gradient(45deg, #6fa75e, transparent 62%);
}

.lowerRight {
  background: #f3f1fb;
}

.lowerRight::before {
  background: linear-gradient(315deg, #7c69b1, transparent 62%);
}

.quadrantCode {
  position: relative;
  z-index: 1;
  display: block;
  color: rgba(23, 32, 42, 0.92);
  font-size: 54px;
  line-height: 0.92;
  font-weight: 900;
}

.quadrantCell strong {
  position: relative;
  z-index: 1;
  font-size: 18px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.quadrantCell em {
  position: relative;
  z-index: 1;
  max-width: 360px;
  color: #475467;
  font-size: 13px;
  line-height: 1.35;
  font-style: normal;
  overflow-wrap: anywhere;
}

.quadrantCell b {
  position: relative;
  z-index: 1;
  align-self: end;
  justify-self: end;
  min-width: 52px;
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.78);
  color: #17202a;
  text-align: center;
  font-size: 18px;
  line-height: 1;
}

.treeAtlas {
  min-height: 620px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px;
}

.treeAtlas svg {
  width: min(100%, 980px);
  height: auto;
  max-height: calc(100vh - 150px);
  border: 1px solid rgba(105, 105, 105, 0.2);
  background: #eef5f0;
  box-shadow: var(--shadow);
}

.treeShape {
  stroke: rgba(23, 32, 42, 0.18);
  stroke-width: 2;
}

.treeLine {
  fill: none;
  stroke: rgba(92, 55, 27, 0.72);
  stroke-width: 18;
  stroke-linecap: round;
  opacity: 0.68;
}

.rootLine {
  fill: none;
  stroke: rgba(91, 58, 33, 0.78);
  stroke-width: 13;
  stroke-linecap: round;
  opacity: 0.74;
}

.weatherRing {
  fill: none;
  stroke: rgba(64, 87, 168, 0.32);
  stroke-width: 3;
  stroke-dasharray: 12 12;
  stroke-linecap: round;
}

.membraneLine {
  fill: none;
  stroke: rgba(245, 250, 246, 0.92);
  stroke-width: 10;
  stroke-linejoin: round;
  opacity: 0.76;
}

.poreFlower {
  filter: drop-shadow(0 2px 3px rgba(79, 70, 229, 0.2));
}

.poreFlower .porePetal {
  fill: rgba(244, 114, 182, 0.9);
  stroke: rgba(255, 255, 255, 0.86);
  stroke-width: 1.5;
}

.poreFlower .poreCenter {
  fill: #fef3c7;
  stroke: rgba(181, 84, 63, 0.86);
  stroke-width: 2;
}

.poreFlower .aromaLine {
  fill: none;
  stroke: rgba(139, 92, 246, 0.72);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 2 6;
}

.smallPoreFlower {
  opacity: 0.92;
}

.leafLayer ellipse {
  fill: rgba(185, 228, 128, 0.88);
  stroke: rgba(31, 102, 64, 0.58);
  stroke-width: 2;
}

.appleFruit {
  filter: drop-shadow(0 3px 4px rgba(116, 24, 24, 0.22));
}

.appleFruit .appleBody {
  fill: #d93232;
  stroke: rgba(255, 249, 232, 0.92);
  stroke-width: 2;
}

.appleFruit .appleStem {
  fill: none;
  stroke: #6b3f20;
  stroke-width: 3;
  stroke-linecap: round;
}

.appleFruit .appleLeaf {
  fill: #68b35b;
  stroke: rgba(31, 102, 64, 0.72);
  stroke-width: 1.5;
}

.smallApple {
  opacity: 0.96;
}

.vesselLayer path {
  fill: none;
  stroke: rgba(63, 203, 211, 0.72);
  stroke-width: 8;
  stroke-linecap: round;
  mix-blend-mode: screen;
}

.nerveLayer path {
  fill: none;
  stroke: rgba(61, 78, 156, 0.82);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 2 10;
}

.nerveLayer circle {
  fill: #fff7c7;
  stroke: #4057a8;
  stroke-width: 4;
}

.growthRingLayer path {
  fill: none;
  stroke: rgba(72, 41, 21, 0.38);
  stroke-width: 4;
  stroke-linecap: round;
}

.myceliumLayer path {
  fill: none;
  stroke: rgba(111, 87, 152, 0.7);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 1 8;
}

.myceliumLayer circle {
  fill: rgba(111, 87, 152, 0.78);
}

.energyLayer path {
  fill: none;
  stroke: rgba(208, 137, 40, 0.84);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 1 12;
}

.anatomyStructure,
.structureHit,
.substructureHit {
  cursor: pointer;
  transition:
    opacity 0.18s ease,
    filter 0.18s ease,
    transform 0.22s ease,
    stroke-width 0.22s ease;
  transform-box: fill-box;
  transform-origin: center;
}

.anatomyStructure.isDimmed {
  opacity: 0.2;
}

.anatomyStructure.isSelected {
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), 0.52));
}

.structureHit {
  fill: transparent;
  stroke: transparent;
  stroke-width: 30;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: all;
}

.structureHit:hover,
.structureHit:focus,
.structureHit.isSelected {
  stroke: rgba(var(--accent-rgb), 0.32);
  outline: none;
}

.structureHit[data-structure-id="canopy"],
.structureHit[data-structure-id="trunk"] {
  stroke-width: 4;
}

.structureHit[data-structure-id="boundary"] {
  fill: none;
  stroke-width: 22;
}

.structureHit[data-structure-id="roots"],
.structureHit[data-structure-id="mycelium"],
.structureHit[data-structure-id="flow"],
.structureHit[data-structure-id="senses"],
.structureHit[data-structure-id="energy"] {
  fill: none;
}

.structureHit.isDimmed {
  pointer-events: all;
}

.substructureHit {
  fill: transparent;
  stroke: rgba(248, 250, 252, 0);
  stroke-width: 22;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: all;
}

.substructurePointGroup {
  stroke-width: 0;
}

.substructurePointGroup circle {
  fill: transparent;
  stroke: transparent;
}

.substructureHit:hover,
.substructureHit:focus,
.substructureHit.isSelected {
  fill: rgba(255, 255, 255, 0.16);
  stroke: rgba(251, 191, 36, 0.68);
  outline: none;
}

.substructurePointGroup:hover circle,
.substructurePointGroup:focus circle,
.substructurePointGroup.isSelected circle {
  fill: rgba(255, 255, 255, 0.16);
  stroke: rgba(251, 191, 36, 0.68);
  stroke-width: 3;
}

.substructureHit.isSelected {
  filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.58));
}

.substructureHit.isDimmed {
  opacity: 0.28;
}

.externalConnector {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 6 9;
  pointer-events: stroke;
  transition:
    opacity 0.18s ease,
    stroke-width 0.18s ease,
    filter 0.18s ease;
}

.clientConnector {
  stroke: rgba(244, 114, 182, 0.78);
}

.fruitConsumptionConnector {
  stroke: rgba(217, 50, 50, 0.82);
  stroke-dasharray: 0;
  marker-end: url("#fruitExchangeArrow");
}

.partnerConnector {
  stroke: rgba(111, 87, 152, 0.78);
}

.externalActor {
  cursor: pointer;
  filter: drop-shadow(0 10px 18px rgba(23, 32, 42, 0.16));
}

.externalActor .actorHalo {
  fill: rgba(255, 255, 255, 0.86);
  stroke-width: 3;
}

.clientActor .actorHalo {
  stroke: rgba(244, 114, 182, 0.78);
}

.partnerActor .actorHalo {
  stroke: rgba(111, 87, 152, 0.78);
}

.externalActor .actorHead {
  fill: #f8d8c6;
  stroke: rgba(91, 58, 33, 0.62);
  stroke-width: 1.5;
}

.externalActor .actorBody {
  fill: #4d6f9f;
  stroke: rgba(255, 255, 255, 0.82);
  stroke-width: 1.5;
}

.partnerNode {
  fill: #6f5798;
  stroke: rgba(255, 255, 255, 0.88);
  stroke-width: 2;
}

.partnerLink {
  fill: none;
  stroke: rgba(111, 87, 152, 0.86);
  stroke-width: 3;
  stroke-linecap: round;
}

.externalActor text {
  fill: #17202a;
  font-size: 15px;
  font-weight: 900;
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.88);
  stroke-width: 5px;
}

.externalActor:hover .actorHalo,
.externalActor:focus .actorHalo,
.externalActor.isSelected .actorHalo {
  fill: rgba(255, 255, 255, 0.96);
  stroke-width: 5;
}

.externalConnector:hover,
.externalConnector:focus,
.externalConnector.isSelected {
  stroke-width: 7;
  filter: drop-shadow(0 0 8px rgba(111, 87, 152, 0.34));
  outline: none;
}

.externalActor.isDimmed,
.externalConnector.isDimmed {
  opacity: 0.24;
}

.anatomyLabelLayer {
  pointer-events: none;
}

.anatomyLabel {
  opacity: 0.88;
  transition: opacity 0.18s ease;
}

.anatomyLabel text {
  fill: #fff;
  font-size: 16px;
  font-weight: 800;
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgba(23, 32, 42, 0.64);
  stroke-width: 4px;
}

.anatomyLabel .anatomyLabelCount {
  font-size: 12px;
  font-weight: 700;
  stroke-width: 3px;
}

.anatomyLabel.isSelected {
  opacity: 1;
}

.anatomyLabel.isDimmed {
  opacity: 0.26;
}

.atlasLegend {
  width: min(100%, 980px);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 10px 12px;
  border: 1px solid rgba(105, 105, 105, 0.2);
  background: rgba(255, 255, 255, 0.74);
  color: #403848;
  font-size: 12px;
}

.atlasLegend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.atlasLegend i {
  width: 20px;
  height: 8px;
  border-radius: 999px;
}

.legendMembrane {
  background: #b5543f;
}

.legendVessels {
  background: #3fcbd3;
}

.legendLeaves {
  background: #9bd45e;
}

.legendMycelium {
  background: #6f5798;
}

.legendNerves {
  background: #4057a8;
}

#treeSvg[data-mode="phases"] .treeShape,
#treeSvg[data-mode="phases"] .anatomyStructure {
  transition:
    opacity 0.22s ease,
    filter 0.22s ease,
    transform 0.28s ease,
    stroke-width 0.22s ease;
}

#treeSvg[data-phase-variant="seedling"] .canopyShape,
#treeSvg[data-phase-variant="seedling"] .leafLayer {
  opacity: 1;
}

#treeSvg[data-phase-variant="seedling"] .myceliumLayer,
#treeSvg[data-phase-variant="seedling"] .weatherRing {
  opacity: 0.34;
}

#treeSvg[data-phase-variant="seedling"] .trunkShape,
#treeSvg[data-phase-variant="seedling"] .growthRingLayer {
  opacity: 0.9;
}

#treeSvg[data-phase-variant="seedling"] .vesselLayer,
#treeSvg[data-phase-variant="seedling"] .nerveLayer {
  opacity: 0.38;
}

#treeSvg[data-phase-variant="seedling"] .rootLayer,
#treeSvg[data-phase-variant="seedling"] .energyLayer,
#treeSvg[data-phase-variant="seedling"] .appleFruit {
  opacity: 1;
  filter: drop-shadow(0 0 10px rgba(208, 137, 40, 0.42));
}

#treeSvg[data-phase-variant="young-trunk"] .canopyShape,
#treeSvg[data-phase-variant="young-trunk"] .leafLayer {
  opacity: 1;
}

#treeSvg[data-phase-variant="young-trunk"] .trunkShape,
#treeSvg[data-phase-variant="young-trunk"] .growthRingLayer,
#treeSvg[data-phase-variant="young-trunk"] .membraneLine {
  filter: drop-shadow(0 0 8px rgba(123, 74, 38, 0.28));
}

#treeSvg[data-phase-variant="young-trunk"] .vesselLayer,
#treeSvg[data-phase-variant="young-trunk"] .myceliumLayer {
  opacity: 0.28;
}

#treeSvg[data-phase-variant="process-tree"] .vesselLayer path {
  stroke-width: 12;
}

#treeSvg[data-phase-variant="process-tree"] .vesselLayer,
#treeSvg[data-phase-variant="process-tree"] .nerveLayer {
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(63, 203, 211, 0.36));
}

#treeSvg[data-phase-variant="process-tree"] .myceliumLayer {
  opacity: 0.22;
}

#treeSvg[data-phase-variant="grove"] .weatherRing,
#treeSvg[data-phase-variant="grove"] .myceliumLayer {
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(111, 87, 152, 0.28));
}

#treeSvg[data-phase-variant="grove"] .canopyShape,
#treeSvg[data-phase-variant="grove"] .leafLayer {
  transform: scale(1.06);
}

#treeSvg[data-phase-variant="grove"] .trunkShape {
  opacity: 0.76;
}

#treeSvg[data-phase-variant="ecosystem"] .weatherRing,
#treeSvg[data-phase-variant="ecosystem"] .myceliumLayer,
#treeSvg[data-phase-variant="ecosystem"] .leafLayer,
#treeSvg[data-phase-variant="ecosystem"] .membranePores {
  opacity: 1;
  filter: drop-shadow(0 0 10px rgba(47, 125, 86, 0.3));
}

#treeSvg[data-phase-variant="ecosystem"] .vesselLayer,
#treeSvg[data-phase-variant="ecosystem"] .trunkShape {
  opacity: 0.72;
}

.anatomyPanel,
.quadrantsPanel {
  min-width: 0;
  position: sticky;
  top: 0;
  max-height: 100vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: -12px 0 32px rgba(0, 0, 0, 0.04);
}

.quadrantSectionHeader {
  border-color: rgba(52, 64, 84, 0.18);
  background: #f6f1fa;
  color: #403848;
}

.quadrantCard .toolChip {
  background: #f0e9f7;
}

.anatomyStats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.statItem {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbf9fd;
}

.statItem strong {
  display: block;
  font-size: 22px;
  line-height: 1.05;
}

.statItem span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.anatomySearch {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.anatomySearch input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 10px;
  background: var(--surface);
  color: var(--text);
}

.structureList {
  display: grid;
  gap: 14px;
}

.layerSection {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbf9fd;
}

.layerSectionHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #403848;
  font-size: 13px;
  font-weight: 900;
}

.layerSectionHeader strong {
  min-width: 34px;
  border-radius: 999px;
  padding: 2px 8px;
  background: #f0e9f7;
  color: #403848;
  text-align: center;
  font-size: 12px;
}

.structureSection {
  display: grid;
  gap: 8px;
}

.structureSectionHeader {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-color: rgba(var(--accent-rgb), 0.24);
  background: #f5f1fb;
  color: #574176;
  text-align: left;
  font-weight: 800;
}

.structureSectionHeader strong {
  min-width: 32px;
  border-radius: 999px;
  padding: 2px 8px;
  background: var(--accent);
  color: #fff;
  text-align: center;
  font-size: 12px;
}

.substructureSummary {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 9px;
  background: #fbf9fd;
}

.substructureCoverage {
  margin: 0;
  color: #667085;
  font-size: 12px;
  line-height: 1.35;
}

.substructureChips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.substructureChip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 5px 8px;
  border-color: rgba(var(--accent-rgb), 0.18);
  background: #fff;
  color: #403848;
  font-size: 12px;
  line-height: 1.2;
}

.substructureChip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.substructureChip strong {
  min-width: 24px;
  border-radius: 999px;
  padding: 2px 6px;
  background: #f0e9f7;
  color: #403848;
  text-align: center;
  font-size: 11px;
}

.substructureChip.isActive {
  border-color: rgba(var(--accent-rgb), 0.42);
  background: var(--accent);
  color: #fff;
}

.substructureChip.isActive strong {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.substructureChip:disabled {
  cursor: default;
  opacity: 0.55;
}

.structureCard {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 12px;
  background: #fff;
}

.structureCard h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.3;
}

.structureMeta {
  margin: 5px 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.toolChips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.toolChip {
  display: inline-flex;
  max-width: 100%;
  border-radius: 999px;
  padding: 4px 8px;
  background: #f0e9f7;
  color: #403848;
  font-size: 12px;
  line-height: 1.25;
}

.toolChip:hover,
.toolChip:focus {
  outline: 2px solid rgba(var(--accent-rgb), 0.22);
  background: var(--accent-2);
}

.moreChip {
  background: var(--accent-2);
  color: var(--accent);
  font-weight: 700;
}

.toolTip {
  position: fixed;
  z-index: 20;
  display: none;
  max-width: calc(100vw - 24px);
  padding: 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.14);
  pointer-events: none;
}

.toolTip.isVisible {
  display: grid;
  gap: 6px;
}

.toolTip strong {
  font-size: 14px;
  line-height: 1.25;
}

.toolTip span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.toolTip em {
  color: #403848;
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.toolTip small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .layout.isCommentPanelClosed {
    grid-template-columns: 1fr;
  }

  .commentPanelToggleBtn {
    right: 0;
  }

  .commentPanel {
    position: static;
    max-height: none;
    overflow: visible;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .toolbar {
    grid-template-columns: 1fr;
  }

  .phaseInfoCard {
    grid-template-columns: 1fr;
  }

  .anatomyLayout,
  .quadrantsLayout,
  .coresLayout {
    grid-template-columns: 1fr;
  }

  .coresLayout.isDetailsClosed {
    grid-template-columns: 1fr;
  }

  .coresSidebar,
  .coresStage,
  .corePanel {
    grid-column: 1;
    grid-row: auto;
  }

  .coresSidebar,
  .corePanel {
    max-height: none;
    overflow: visible;
    border-left: 0;
    border-right: 0;
  }

  .corePanel {
    border-top: 1px solid var(--line);
  }

  .coreGraph {
    width: 1180px;
    height: auto;
    min-height: 0;
  }

  .coreGraphCy {
    width: 100%;
    height: 620px;
    min-height: 520px;
  }

  .coreGraphToolbar {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .treeAtlas {
    min-height: 460px;
    padding: 12px;
  }

  .treeAtlas svg {
    max-height: none;
  }

  .anatomyPanel,
  .quadrantsPanel {
    position: static;
    max-height: none;
    overflow: visible;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .quadrantMap {
    min-height: auto;
    width: min(100% - 24px, 760px);
    padding: 42px;
  }

  .quadrantCell {
    min-height: 190px;
  }
}

@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .disclaimerDialog {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
  }

  .disclaimerContent {
    gap: 12px;
    padding: 22px 18px 18px;
  }

  .disclaimerDialog h2 {
    font-size: 20px;
  }

  .disclaimerLead,
  .disclaimerSections p {
    font-size: 14px;
  }

  .disclaimerActions {
    justify-content: stretch;
  }

  .disclaimerPrimaryBtn {
    width: 100%;
  }

  .siteLogoLink,
  .siteLogo {
    width: 42px;
    height: 42px;
  }

  .atlasToolbar,
  .quadrantsToolbar {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .layerBtn,
  .quadrantBtn {
    flex: 0 0 auto;
  }

  .phaseInfoList {
    grid-template-columns: 1fr;
  }

  .quadrantMap {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    gap: 10px;
    padding: 16px;
  }

  .axisLine,
  .axisLabel {
    display: none;
  }

  .quadrantCell {
    min-height: 174px;
    padding: 18px;
  }

  .quadrantCode {
    font-size: 42px;
  }

  .anatomyLabel text {
    font-size: 15px;
  }

  .anatomyLabel .anatomyLabelCount {
    font-size: 12px;
  }

  .anatomyStats {
    grid-template-columns: 1fr;
  }
}
