/* ============================================
   MY WEAPONIZED FAITH — Timeline Styles
   ============================================ */

/* ---- Glossary terms & tooltip ---- */

.glossary-term {
  cursor: help;
  border-bottom: 1px dotted rgba(94,80,63,0.55);
  display: inline;
  pointer-events: all;
  position: relative;
}

.glossary-tooltip {
  /* position/left/top/bottom set inline via portal */
  width: 270px;
  background: #0A0908;
  color: #EAE0D5;
  border: 1px solid rgba(198,172,143,0.30);
  border-radius: 3px;
  padding: 0.6rem 0.75rem 0.65rem;
  z-index: 9999;
  pointer-events: none;
  box-shadow: 0 6px 24px rgba(0,0,0,0.45);
  text-align: left;
  font-style: normal;
  font-weight: normal;
  line-height: 1.5;
}

/* Arrows */
.glossary-tooltip__arrow {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border: 6px solid transparent;
}
.glossary-tooltip__arrow--down {
  top: 100%;
  border-top-color: #0A0908;
}
.glossary-tooltip__arrow--up {
  bottom: 100%;
  border-bottom-color: #0A0908;
}

.glossary-tooltip__label {
  display: block;
  font-family: var(--font-display-sc, serif);
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(198,172,143,0.65);
  margin-bottom: 0.3rem;
}

.glossary-tooltip__term {
  display: block;
  font-family: var(--font-display, serif);
  font-size: 0.82rem;
  font-weight: 700;
  color: #C6AC8F;
  margin-bottom: 0.35rem;
}

.glossary-tooltip__def {
  display: block;
  font-size: 0.75rem;
  color: rgba(234,224,213,0.82);
  font-style: italic;
}

/* High Contrast palette override */
[data-palette="b"] .glossary-term {
  border-bottom-color: rgba(26,92,138,0.50);
}
[data-palette="b"] .glossary-tooltip {
  background: #111111;
  color: #FFFFFF;
  border-color: rgba(26,92,138,0.35);
}
[data-palette="b"] .glossary-tooltip__arrow--down { border-top-color: #111111; }
[data-palette="b"] .glossary-tooltip__arrow--up   { border-bottom-color: #111111; }
[data-palette="b"] .glossary-tooltip__label { color: rgba(42,112,168,0.70); }
[data-palette="b"] .glossary-tooltip__term  { color: #2070A8; }
[data-palette="b"] .glossary-tooltip__def   { color: rgba(255,255,255,0.80); }

/* ---- Wrapper ---- */

.timeline-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background-color: var(--canvas);
}

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

.filter-bar {
  display: flex;
  flex-direction: column;
  background-color: var(--charcoal);
  border-bottom: 1px solid #333;
  font-size: 0.75rem;
}

.filter-bar__top-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
}

.filter-bar__tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.75rem 0.45rem;
  border-top: 1px solid #2a2a2a;
}

.filter-bar__section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}

.filter-bar__label {
  font-family: var(--font-display-sc);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: #888;
  margin-right: 0.2rem;
  white-space: nowrap;
}

.filter-btn {
  border: 1px solid #3a3a3a;
  background: transparent;
  color: #888;
  font-family: var(--font-serif);
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
}

.filter-btn:hover {
  border-color: var(--gold);
  color: var(--white);
}

.filter-btn--active {
  background-color: var(--gold-dim);
  color: var(--white);
  border-color: var(--gold);
}

.filter-btn--opposition {
  border-color: rgba(38,38,38,0.5);
  color: #888;
  margin-left: 0.4rem;
}

.filter-btn--opposition:hover {
  background-color: rgba(38,38,38,0.12);
  border-color: var(--gold);
  color: var(--gold);
}

.filter-btn--opposition-active {
  background-color: var(--charcoal);
  border-color: var(--gold);
  color: var(--gold);
}

.filter-btn--reset {
  border-color: rgba(155, 32, 32, 0.5);
  color: #9B2020;
}

.filter-btn--reset:hover {
  background-color: rgba(155, 32, 32, 0.12);
  border-color: #9B2020;
  color: #9B2020;
}

/* ---- Main layout ---- */

.timeline-main {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}

/* ---- Swim lane sidebar ---- */

.swimlane-sidebar {
  width: var(--sidebar-width, 140px);
  flex-shrink: 0;
  position: relative;
  background-color: var(--charcoal);
  border-right: 1px solid #2a2a2a;
  overflow: hidden;
}

.swimlane-label {
  position: absolute;
  left: 0;
  width: 100%;
  transform-origin: top left;
  margin-top: -0.55rem;
  padding: 0.25rem 0.6rem;
  font-family: var(--font-display-sc);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #b0a898;
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
  border-top: 1px solid #3a3530;
}

.swimlane-label--events {
  color: var(--gold-bright);
  border-top: 1px solid var(--gold);
}

/* ---- Canvas area ---- */

.timeline-canvas-area {
  flex: 1;
  position: relative;
  overflow: hidden;
}

/* ---- Cytoscape canvas ---- */

.cytoscape-container {
  width: 100%;
  height: 100%;
  background-color: var(--canvas);
}

/* ---- 5-year grid overlay ---- */

.timeline-grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* ---- Zoom indicator (debug) ---- */

.zoom-indicator {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  z-index: 50;
  font-family: var(--font-mono, monospace);
  font-size: 0.7rem;
  color: #666;
  background: var(--charcoal);
  border: 1px solid #3a3a3a;
  border-radius: 2px;
  padding: 4px 8px;
  pointer-events: none;
}

/* ---- Zoom controls ---- */

.zoom-controls {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 50;
}

.zoom-btn {
  width: 30px;
  height: 30px;
  background-color: var(--charcoal);
  border: 1px solid #3a3a3a;
  color: #888;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
}

.zoom-btn:hover {
  border-color: var(--gold);
  color: var(--white);
}

.zoom-btn--reset {
  font-size: 0.55rem;
  font-family: var(--font-display-sc);
  letter-spacing: 0.08em;
  color: #666;
}

/* ---- Loading ---- */

.timeline-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--canvas);
  font-family: var(--font-display-sc);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  color: var(--text-light);
}

/* ---- Node Panel ---- */

.node-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: var(--panel-width, 360px);
  max-width: 90vw;
  height: 100%;
  background-color: var(--white);
  border-left: 1px solid var(--canvas-border);
  overflow-y: auto;
  padding: 1.25rem;
  transform: translateX(100%);
  transition: transform 0.2s ease;
  z-index: 100;
  box-shadow: -8px 0 32px rgba(0,0,0,0.1);
}

.node-panel--open {
  transform: translateX(0);
}

.node-panel__back {
  display: block;
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid var(--canvas-border);
  color: var(--text-mid);
  font-family: var(--font-serif);
  font-size: 0.78rem;
  text-align: left;
  padding: 0.6rem 1.25rem;
  cursor: pointer;
  opacity: 0.75;
  letter-spacing: 0.01em;
}
.node-panel__back:hover { opacity: 1; }

.node-panel__actions {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.node-panel__close {
  background: transparent;
  border: 1px solid var(--canvas-border);
  color: var(--text-light);
  font-size: 0.75rem;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.12s;
}

.node-panel__close:hover {
  border-color: #9B2020;
  color: #9B2020;
}

/* Listen pill — below the node title */
.node-panel__listen-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.9rem;
  background: rgba(196, 101, 42, 0.82);
  border: 1px solid rgba(220, 130, 60, 0.9);
  color: #FDF6EC;
  font-family: var(--font-display-sc);
  font-size: 0.62rem;
  letter-spacing: 0.13em;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 0.85rem;
}

.node-panel__listen-pill:hover {
  background: rgba(220, 120, 50, 0.95);
  border-color: #E08040;
}

.node-panel__listen-pill--active {
  background: rgba(130, 60, 20, 0.9);
  border-color: rgba(196, 101, 42, 0.7);
  animation: listen-pulse 1.4s ease-in-out infinite;
}

@keyframes listen-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.65; }
}

.node-panel__header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.node-panel__type-badge {
  font-family: var(--font-display-sc);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background-color: var(--text);
  color: var(--white);
  padding: 0.15rem 0.45rem;
  border-radius: 2px;
}

.node-panel__dates {
  font-family: var(--font-serif);
  font-size: 0.78rem;
  color: var(--text-light);
  font-style: italic;
}

.node-panel__effectiveness {
  font-family: var(--font-display-sc);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  padding: 0.15rem 0.4rem;
  border-radius: 2px;
  margin-left: auto;
}
.node-panel__effectiveness--high   { background: #14532d; color: #86efac; }
.node-panel__effectiveness--medium { background: #78350f; color: #fde68a; }
.node-panel__effectiveness--low    { background: #7f1d1d; color: #fca5a5; }

.node-panel__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}

.node-panel__short-desc {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-mid);
  font-style: italic;
  margin-bottom: 0.75rem;
  border-left: 2px solid var(--gold);
  padding-left: 0.7rem;
}

.node-panel__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.75rem;
}

.tag {
  font-size: 0.65rem;
  font-family: var(--font-display-sc);
  letter-spacing: 0.07em;
  padding: 0.15rem 0.45rem;
  border-radius: 2px;
  background-color: var(--text);
  color: #D6CCAE;
}

/* ---- Relationship sections ---- */

.node-panel__relationships {
  margin: 0.6rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.relationship-section {
  background-color: var(--canvas);
  border-left: 2px solid var(--canvas-border);
  padding: 0.45rem 0.65rem;
}

.relationship-section--opposition {
  border-left-color: var(--green);
  background-color: var(--canvas);
}

.relationship-section__heading {
  font-family: var(--font-display-sc);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  color: var(--text-light);
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.relationship-section--opposition .relationship-section__heading {
  color: var(--green);
}

.relationship-section__list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.relationship-section__item {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-mid);
}

.relationship-section__node-link {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--amber);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}

.relationship-section__node-link:hover {
  color: var(--text);
  text-decoration-style: solid;
}

.relationship-section__detail {
  font-style: italic;
  color: var(--text-light);
  font-size: 0.76rem;
}

/* ---- Divider ---- */

.node-panel__divider {
  height: 1px;
  background-color: var(--canvas-border);
  margin: 0.75rem 0;
}

/* ---- Long description ---- */

.node-panel__long-desc {
  font-size: 0.865rem;
  line-height: 1.75;
  color: var(--text);
}

.node-panel__long-desc p + p {
  margin-top: 0.7rem;
}

/* ---- Counter-narrative ---- */

.node-panel__counter-narrative {
  margin-top: 1rem;
  padding: 0.7rem;
  background-color: var(--canvas);
  border-left: 2px solid var(--canvas-border);
}

.node-panel__counter-title {
  font-family: var(--font-display-sc);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  color: var(--green);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.node-panel__counter-narrative p {
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--text-mid);
  font-style: italic;
}

/* ---- Sources ---- */

.node-panel__sources {
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--canvas-border);
}

.node-panel__sources-title {
  font-family: var(--font-display-sc);
  font-size: 0.56rem;
  letter-spacing: 0.14em;
  color: var(--text-light);
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}

.node-panel__sources-list { list-style: none; padding: 0; }

.node-panel__source {
  font-size: 0.72rem;
  color: var(--text-mid);
  line-height: 1.35;
  padding: 0.28rem 0;
  border-bottom: 1px solid var(--canvas-border);
}

.node-panel__source:last-child { border-bottom: none; }

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

.connection-panel__relationship {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.connection-panel__node {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
}

.connection-panel__arrow {
  color: var(--gold);
  font-size: 1.1rem;
}

.connection-panel__label {
  font-style: italic;
  color: var(--text-light);
  font-size: 0.82rem;
  margin-bottom: 0.5rem;
}

/* ---- Legend ---- */

.timeline-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding: 0.5rem 0.75rem 0.5rem calc(var(--sidebar-width, 140px) + 0.75rem);
  background-color: var(--charcoal);
  border-top: 1px solid #2a2a2a;
  font-size: 0.72rem;
  min-height: var(--legend-height, 44px);
  align-items: center;
}

.legend-section {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.legend-title {
  font-family: var(--font-display-sc);
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  color: #444;
  text-transform: uppercase;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: #666;
  font-size: 0.7rem;
  font-family: var(--font-serif);
}

.legend-shape {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 1.5px solid #1F1A11;
  background-color: #F0E8D2;
}
.legend-shape--person       { border-radius: 50%; }
.legend-shape--organization { border-radius: 2px; }
.legend-shape--event        { transform: rotate(45deg); width: 10px; height: 10px; }

.legend-line {
  display: inline-block;
  width: 24px;
  height: 2px;
  background-color: rgba(31,26,17,0.5);
}
.legend-line--founded      { background-color: #1F1A11; }
.legend-line--influenced   { background-color: rgba(31,26,17,0.7); }
.legend-line--funded       { border-top: 2px dashed #A63D1F; height: 0; background: transparent; }
.legend-line--responded_to { border-top: 2px dashed rgba(100,90,70,0.75); height: 0; background: transparent; }
.legend-line--exploited    { border-top: 2px dashed #A07830; height: 0; background: transparent; }
.legend-line--opposed      { border-top: 2px dashed rgba(214,204,174,0.9); height: 0; background: transparent; }

/* ---- Story mode button ---- */

@keyframes story-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(196, 101, 42, 0.45); }
  50%       { box-shadow: 0 0 0 9px rgba(196, 101, 42, 0); }
}

.story-mode-btn {
  border: 1px solid rgba(196, 101, 42, 0.5);
  background: transparent;
  color: var(--gold);
  font-family: var(--font-display-sc);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.story-mode-btn:hover {
  background-color: rgba(196, 101, 42, 0.10);
  border-color: var(--gold);
  color: var(--gold-bright);
}

.story-mode-btn--pulse {
  animation: story-pulse 2.6s ease-in-out infinite;
}

.story-mode-btn--active {
  background-color: rgba(196, 101, 42, 0.15);
  border-color: var(--gold);
  color: var(--gold-bright);
}

/* Narrative launch button — lives in the tag row, slides in when a tag is active */
.narrative-launch-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.85rem;
  background: transparent;
  border: 1px solid rgba(196, 101, 42, 0.75);
  color: rgba(220, 140, 70, 0.9);
  font-family: var(--font-display-sc);
  font-size: 0.6rem;
  letter-spacing: 0.13em;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s, border-color 0.18s, color 0.18s, box-shadow 0.18s;
  animation: narrative-btn-in 0.25s ease-out both;
  flex-shrink: 0;
}

.narrative-launch-btn:hover {
  background: rgba(196, 101, 42, 0.15);
  border-color: rgba(220, 130, 60, 0.9);
  color: #FDF6EC;
}

/* ON state — glowing solid amber */
.narrative-launch-btn--active {
  background: rgba(196, 101, 42, 0.88);
  border-color: rgba(230, 140, 70, 1);
  color: #FDF6EC;
  box-shadow: 0 0 10px rgba(196, 101, 42, 0.55), 0 0 2px rgba(230, 150, 80, 0.4);
}

.narrative-launch-btn--active:hover {
  background: rgba(220, 115, 45, 0.95);
  box-shadow: 0 0 14px rgba(196, 101, 42, 0.7), 0 0 3px rgba(230, 150, 80, 0.5);
}

@keyframes narrative-btn-in {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ---- Story overlay panels ---- */

/* Context node overlay — map-relative text, no box, fixed font size regardless of zoom */
.context-node-overlay {
  position: absolute;
  transform: translateX(-100%);
  width: 480px;
  pointer-events: all;
  z-index: 12;
  padding: 1rem 18px 1rem 1.25rem;
  background: rgba(10, 9, 8, 0.88);
  border-right: 1.5px solid rgba(196, 101, 42, 0.55);
}

.context-node-overlay__eyebrow {
  font-family: var(--font-display-sc);
  font-size: 0.55rem;
  letter-spacing: 0.22em;
  color: rgba(196, 101, 42, 0.8);
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.context-node-overlay__subtitle {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(240, 232, 210, 0.7);
  line-height: 1.2;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.context-node-overlay__listen {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  margin-bottom: 0.55rem;
  background: transparent;
  border: 1px solid rgba(196, 101, 42, 0.55);
  color: rgba(220, 140, 70, 0.85);
  font-family: var(--font-display-sc);
  font-size: 0.56rem;
  letter-spacing: 0.12em;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.15s;
}

.context-node-overlay__listen:hover {
  background: rgba(196, 101, 42, 0.12);
  color: #FDF6EC;
}

.context-node-overlay__listen--active {
  background: rgba(196, 101, 42, 0.75);
  border-color: rgba(230, 140, 70, 1);
  color: #FDF6EC;
  animation: listen-pulse 1.4s ease-in-out infinite;
}

.context-node-overlay__text {
  font-family: var(--font-serif);
  font-size: 0.68rem;
  line-height: 1.7;
  color: #EAE0D5;
  margin: 0;
  white-space: pre-wrap;
}

.story-panels-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 15;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 34px 14px 0;
}

@keyframes story-panel-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.story-panel {
  flex: 1;
  min-width: 0;
  background-color: rgba(31, 26, 17, 0.93);
  border: 1px solid rgba(196, 101, 42, 0.35);
  border-radius: 2px;
  padding: 0.85rem 1rem;
  backdrop-filter: blur(6px);
  animation: story-panel-in 0.25s ease both;
}

.story-panel__act {
  font-family: var(--font-display-sc);
  font-size: 0.5rem;
  letter-spacing: 0.2em;
  color: rgba(196, 101, 42, 0.65);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.story-panel__title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: #F0E8D2;
  line-height: 1.2;
  margin-bottom: 0.55rem;
  letter-spacing: -0.01em;
}

.story-panel__listen {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.7rem;
  margin-bottom: 0.6rem;
  background: transparent;
  border: 1px solid rgba(196, 101, 42, 0.65);
  color: rgba(220, 140, 70, 0.9);
  font-family: var(--font-display-sc);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.story-panel__listen:hover {
  background: rgba(196, 101, 42, 0.15);
  border-color: rgba(220, 130, 60, 0.9);
  color: #FDF6EC;
}

.story-panel__listen--active {
  background: rgba(196, 101, 42, 0.82);
  border-color: rgba(230, 140, 70, 1);
  color: #FDF6EC;
  box-shadow: 0 0 8px rgba(196, 101, 42, 0.45);
  animation: listen-pulse 1.4s ease-in-out infinite;
}

.story-panel__narrative {
  font-family: var(--font-serif);
  font-size: 0.72rem;
  line-height: 1.6;
  color: rgba(240, 232, 210, 0.72);
  margin: 0;
}

.story-link {
  display: inline;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(196, 101, 42, 0.55);
  color: rgba(192, 72, 32, 0.9);
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  padding: 0;
  cursor: pointer;
  pointer-events: all;
  transition: color 0.15s, border-color 0.15s;
}

.story-link:hover {
  color: #C04820;
  border-bottom-color: #C04820;
}

/* ---- Story mode filter bar group ---- */

.filter-bar__right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ---- Node Search ---- */

.search-trigger {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: transparent;
  border: 1px solid var(--canvas-border);
  color: var(--text-light);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.search-trigger:hover {
  border-color: rgba(196, 101, 42, 0.6);
  color: var(--gold);
}

.search-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99;
}

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  pointer-events: none;
}

.search-palette {
  pointer-events: all;
  width: min(560px, 90vw);
  background: #F0E8D2;
  border: 1px solid #B0A080;
  border-radius: 3px;
  box-shadow: 0 16px 48px rgba(31, 26, 17, 0.35);
  overflow: hidden;
}

.search-input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid #B0A080;
}

.search-icon {
  flex-shrink: 0;
  color: rgba(31, 26, 17, 0.35);
}

.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #1F1A11;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  caret-color: #A63D1F;
}

.search-input::placeholder {
  color: rgba(31, 26, 17, 0.30);
}

.search-esc {
  flex-shrink: 0;
  background: rgba(31, 26, 17, 0.06);
  border: 1px solid rgba(31, 26, 17, 0.18);
  border-radius: 3px;
  color: rgba(31, 26, 17, 0.45);
  font-size: 0.6rem;
  padding: 0.1rem 0.35rem;
  cursor: pointer;
  font-family: inherit;
}

.search-results {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0;
  max-height: 340px;
  overflow-y: auto;
}

.search-result {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  transition: background 0.08s;
}

.search-result--active {
  background: rgba(196, 101, 42, 0.10);
}

.search-result__type {
  font-size: 0.65rem;
  flex-shrink: 0;
  width: 14px;
  text-align: center;
}

.search-result__type--person       { color: #7A4A28; }
.search-result__type--organization { color: #2A4848; }
.search-result__type--event        { color: #6A5A40; }

.search-result__label {
  flex: 1;
  font-family: var(--font-serif);
  font-size: 0.85rem;
  color: #1F1A11;
}

.search-result--active .search-result__label {
  color: #A63D1F;
}

.search-result__meta {
  font-size: 0.65rem;
  color: rgba(31, 26, 17, 0.40);
  white-space: nowrap;
}

.search-hint,
.search-empty {
  font-size: 0.7rem;
  color: rgba(31, 26, 17, 0.35);
  text-align: center;
  padding: 0.75rem;
  margin: 0;
  font-style: italic;
}

/* Mobile sources modal: hidden on desktop, shown only inside mobile media query */
.mobile-sources-modal {
  display: none;
}

/* ---- Mobile ---- */

@media (max-width: 768px) {
  /* ── Layout ── */
  .timeline-wrapper { height: auto; min-height: unset; }
  .filter-bar { display: none; }
  .swimlane-sidebar { display: none; }
  .timeline-legend { display: none; }
  .zoom-controls { display: none; }
  .zoom-indicator { display: none; }
  .nav-hint { display: none; }

  /* Map fills the full viewport minus nothing — no filter bar on mobile */
  .cytoscape-container {
    height: 100vh;
    height: 100dvh;
    min-height: unset;
  }

  /* ── Node panel: full screen sheet ── */
  .node-panel {
    width: 100%;
    max-width: 100%;
    top: 0;
    bottom: 0;
    right: 0;
    height: 100vh;
    height: 100dvh;
    border-left: none;
    border-top: none;
    border-radius: 0;
    transform: translateY(100%);
    overflow-y: auto;
    padding-top: calc(env(safe-area-inset-top, 0px) + 16px);
    z-index: 250;
  }
  .node-panel--open { transform: translateY(0); }

  /* Drag handle pill at top of panel */
  .node-panel__drag-handle {
    width: 36px;
    height: 4px;
    background: var(--canvas-border);
    border-radius: 2px;
    margin: 10px auto 14px;
    flex-shrink: 0;
  }

  /* ── Hamburger filter trigger ── */
  .mobile-filter-trigger {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 60;
    width: 40px;
    height: 40px;
    background: rgba(13, 11, 8, 0.82);
    border: 1.5px solid #C6703A;
    border-radius: 8px;
    color: #C6703A;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    box-shadow: 0 0 8px rgba(198, 112, 58, 0.25);
  }

  /* ── Mobile filter drawer ── */
  .mobile-filter-drawer {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    pointer-events: none;
  }
  .mobile-filter-drawer--open {
    pointer-events: all;
  }
  .mobile-filter-drawer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    transition: opacity 0.25s ease;
  }
  .mobile-filter-drawer--open .mobile-filter-drawer__backdrop {
    opacity: 1;
  }
  .mobile-filter-drawer__panel {
    position: relative;
    width: 85vw;
    max-width: 340px;
    height: 100%;
    background: var(--charcoal, #1a1612);
    border-right: 1px solid var(--canvas-border);
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
    padding: 0 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .mobile-filter-drawer--open .mobile-filter-drawer__panel {
    transform: translateX(0);
  }
  .mobile-filter-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1rem 0.75rem;
    border-bottom: 1px solid var(--canvas-border);
    position: sticky;
    top: 0;
    background: var(--charcoal, #1a1612);
    z-index: 1;
  }
  .mobile-filter-drawer__title {
    font-family: 'Playfair Display SC', 'Times New Roman', serif;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    color: rgba(232, 220, 200, 0.9);
  }
  .mobile-filter-drawer__close {
    background: none;
    border: none;
    color: rgba(232, 220, 200, 0.6);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
  }
  .mobile-filter-drawer__section {
    padding: 0.85rem 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
  }
  .mobile-filter-drawer__section-label {
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(232, 220, 200, 0.5);
    margin-bottom: 0.1rem;
  }
  .mobile-filter-drawer__section-hint {
    font-size: 0.68rem;
    color: rgba(232, 220, 200, 0.38);
    font-style: italic;
    margin-bottom: 0.25rem;
    line-height: 1.4;
  }
  .mobile-filter-drawer__tag-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  .mobile-filter-drawer__trail-item {
    display: flex;
    flex-direction: column;
    background: none;
    border: 1px solid var(--canvas-border);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    text-align: left;
    cursor: pointer;
    color: var(--fg);
    gap: 0.15rem;
  }
  .mobile-filter-drawer__trail-item--active {
    border-color: var(--amber, rgba(196,101,42,0.8));
    background: rgba(196, 101, 42, 0.08);
  }

  /* ── Drawer: Display (palette) buttons ── */
  .mobile-filter-drawer__palette-row {
    display: flex;
    gap: 0.5rem;
  }
  .mobile-filter-drawer__palette-btn {
    flex: 1;
    background: none;
    border: 1px solid rgba(232, 220, 200, 0.18);
    border-radius: 4px;
    color: rgba(232, 220, 200, 0.6);
    font-family: inherit;
    font-size: 0.78rem;
    padding: 0.45rem 0.5rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
  }
  .mobile-filter-drawer__palette-btn.palette-btn--active {
    background: rgba(196, 101, 42, 0.15);
    border-color: rgba(196, 101, 42, 0.7);
    color: rgba(232, 220, 200, 0.95);
  }

  /* ── Drawer: Sources footer button ── */
  .mobile-filter-drawer__section--footer {
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(232, 220, 200, 0.08);
  }
  .mobile-filter-drawer__sources-btn {
    width: 100%;
    background: none;
    border: 1px solid rgba(232, 220, 200, 0.15);
    border-radius: 4px;
    color: rgba(232, 220, 200, 0.5);
    font-family: inherit;
    font-size: 0.78rem;
    padding: 0.5rem;
    cursor: pointer;
    text-align: center;
    transition: color 0.15s, border-color 0.15s;
  }
  .mobile-filter-drawer__sources-btn:hover {
    color: rgba(232, 220, 200, 0.85);
    border-color: rgba(232, 220, 200, 0.3);
  }

  /* ── Mobile story card ── */
  .mobile-story-card-wrap {
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: all;
    display: flex;
    flex-direction: column;
    background: rgba(18, 14, 9, 0.99);
  }
  .mobile-story-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    overflow: hidden;
    touch-action: pan-y;
    min-height: 0;
  }
  .mobile-story-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem 0.7rem;
    border-bottom: 1px solid rgba(196, 101, 42, 0.2);
    flex-shrink: 0;
  }
  .mobile-story-card__close {
    background: none;
    border: 1px solid rgba(232, 220, 200, 0.2);
    border-radius: 50%;
    color: rgba(232, 220, 200, 0.6);
    font-size: 0.85rem;
    cursor: pointer;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  /* Scrollable body between header and footer */
  .mobile-story-card__body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1rem 1rem 0.5rem;
    min-height: 0;
  }
  .mobile-story-card__narrative {
    font-size: 0.85rem;
    line-height: 1.65;
    margin-top: 0.5rem;
  }
  /* Pips pinned to bottom */
  .mobile-story-card__footer {
    flex-shrink: 0;
    padding: 0.75rem 1rem 1.5rem;
    border-top: 1px solid rgba(196, 101, 42, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
  }
  .mobile-story-card__pips {
    display: flex;
    justify-content: center;
    gap: 8px;
  }
  .mobile-story-card__pip {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: none;
    border: 1px solid rgba(196, 101, 42, 0.4);
    cursor: pointer;
    padding: 0;
  }
  .mobile-story-card__pip--active {
    background: rgba(196, 101, 42, 0.85);
    border-color: rgba(196, 101, 42, 0.85);
  }
  .mobile-story-card__swipe-hint {
    text-align: center;
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    color: rgba(232, 220, 200, 0.25);
    text-transform: uppercase;
  }

  /* ── Mobile timeline scrubber ── */
  .mobile-scrubber {
    position: fixed;
    bottom: 2.4rem; /* sits just above beta banner */
    left: 0;
    right: 0;
    height: 30px;
    background: rgba(14, 11, 7, 0.92);
    border-top: 1px solid rgba(232, 220, 200, 0.08);
    z-index: 85;
    touch-action: none;
    cursor: grab;
    user-select: none;
  }
  .mobile-scrubber__tick {
    position: absolute;
    bottom: 3px;
    font-size: 0.5rem;
    color: rgba(232, 220, 200, 0.28);
    transform: translateX(-50%);
    letter-spacing: 0.03em;
    pointer-events: none;
    line-height: 1;
  }
  .mobile-scrubber__tick::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 5px;
    background: rgba(232, 220, 200, 0.18);
  }
  .mobile-scrubber__thumb {
    position: absolute;
    top: 4px;
    bottom: 4px;
    background: rgba(196, 101, 42, 0.35);
    border: 1px solid rgba(196, 101, 42, 0.75);
    border-radius: 3px;
    pointer-events: none;
    min-width: 10px;
    transition: left 0.04s linear, width 0.04s linear;
  }

  /* ── Mobile tap hint (first-tap "tap again" bar) ── */
  .mobile-tap-hint {
    position: fixed;
    bottom: 5.4rem; /* above scrubber + beta banner */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(26, 22, 18, 0.93);
    border: 1px solid rgba(196, 101, 42, 0.55);
    color: rgba(232, 220, 200, 0.95);
    padding: 0.45rem 1.1rem;
    border-radius: 24px;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.8rem;
    z-index: 90;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
    animation: tap-hint-in 0.2s ease-out both;
  }
  @keyframes tap-hint-in {
    from { opacity: 0; transform: translateX(-50%) translateY(8px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
  }
  .mobile-tap-hint__label {
    font-weight: 600;
    font-family: "IM Fell English", "Times New Roman", serif;
    font-style: italic;
  }
  .mobile-tap-hint__cta {
    color: rgba(196, 101, 42, 0.95);
    font-size: 0.72rem;
    letter-spacing: 0.01em;
  }

  /* ── Mobile sources full-screen modal ── */
  .mobile-sources-modal {
    position: fixed;
    inset: 0;
    background: #1a1612;
    z-index: 300;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transform: translateY(16px);
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .mobile-sources-modal--open {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
  }
  .mobile-sources-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem 0.75rem;
    border-bottom: 1px solid rgba(232, 220, 200, 0.1);
    flex-shrink: 0;
  }
  .mobile-sources-modal__title {
    font-family: "Playfair Display SC", serif;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(232, 220, 200, 0.7);
  }
  .mobile-sources-modal__close {
    background: none;
    border: none;
    color: rgba(232, 220, 200, 0.45);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    line-height: 1;
  }
  .mobile-sources-modal__content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1rem 4rem;
    -webkit-overflow-scrolling: touch;
  }
  /* Re-style sources grid inside the modal for single-column layout */
  .mobile-sources-modal__content .sources-grid {
    grid-template-columns: 1fr;
    padding: 0 0 1rem;
    gap: 1.2rem 0;
  }
  .mobile-sources-modal__content .sources-note,
  .mobile-sources-modal__content .sources-author-note {
    padding-left: 0;
    padding-right: 0;
    text-align: left;
  }
  .mobile-sources-modal__content .sources-author-note a {
    color: rgba(198, 172, 143, 0.85);
  }
}

/* ---- Keyboard nav hint ---- */

.nav-hint {
  position: absolute;
  bottom: 52px; /* above zoom controls */
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.75rem;
  background: rgba(13, 11, 8, 0.88);
  border: 1px solid rgba(184, 150, 12, 0.4);
  border-radius: 20px;
  font-family: 'IM Fell English', 'Times New Roman', serif;
  font-size: 0.7rem;
  color: rgba(232, 220, 200, 0.85);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}

.nav-hint--idle {
  opacity: 0.55;
  border-color: rgba(184, 150, 12, 0.2);
}

.nav-hint__keys {
  font-size: 0.75rem;
  color: rgba(212, 170, 26, 0.9);
  letter-spacing: 0.05em;
}

.nav-hint__text {
  color: rgba(200, 185, 155, 0.8);
}

/* ---- Legal record badges (node panel) ---- */

.node-panel__legal-badge {
  background: transparent;
  border: 1.5px solid;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.12s;
  flex-shrink: 0;
}

.node-panel__legal-badge--accusation {
  border-color: #B07020;
  color: #C98020;
}

.node-panel__legal-badge--accusation:hover {
  background-color: rgba(201,128,32,0.15);
  border-color: #C98020;
  color: #C09040;
}

.node-panel__legal-badge--conviction {
  border-color: #9B1515;
  color: #CC2222;
  font-weight: 700;
}

.node-panel__legal-badge--conviction:hover {
  background-color: rgba(155,20,20,0.18);
  border-color: #CC2222;
  color: #C03030;
}

/* ---- Legal record modal ---- */

.legal-modal-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.55);
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
  overflow-y: auto;
}

.legal-modal {
  background-color: #100808;
  color: #F0E0D8;
  width: 100%;
  max-width: 360px;
  border-radius: 2px;
  border-top: 3px solid #8B0000;
  box-shadow: 0 12px 48px rgba(0,0,0,0.65), 0 0 0 1px rgba(139,0,0,0.35);
  outline: none;
  overflow: hidden;
}

.legal-modal__header {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid rgba(139,0,0,0.35);
  background-color: #1A0A0A;
}

.legal-modal__tabs {
  display: flex;
  flex: 1;
  gap: 0;
}

.legal-modal__tab {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 1;
  background: transparent;
  border: none;
  border-right: 1px solid rgba(139,0,0,0.25);
  padding: 0.55rem 0.75rem;
  font-family: var(--font-display-sc);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background 0.12s;
  color: rgba(240,224,216,0.45);
}

.legal-modal__tab--accusation { color: #C98020; }
.legal-modal__tab--conviction { color: #CC2222; }

.legal-modal__tab--active {
  font-weight: 700;
}

.legal-modal__tab--active.legal-modal__tab--accusation {
  background-color: rgba(201,128,32,0.14);
  color: #E09830;
}
.legal-modal__tab--active.legal-modal__tab--conviction {
  background-color: rgba(155,20,20,0.22);
  color: #E03030;
}

.legal-modal__close {
  background: transparent;
  border: none;
  padding: 0.55rem 0.75rem;
  font-size: 0.8rem;
  color: rgba(240,224,216,0.35);
  cursor: pointer;
  transition: color 0.12s;
}

.legal-modal__close:hover { color: #E03030; }

.legal-modal__body {
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 70vh;
  overflow-y: auto;
}

/* ---- Individual legal record item ---- */

.legal-record-item {
  border-left: 3px solid rgba(139,0,0,0.40);
  padding-left: 0.65rem;
}

.legal-record-item + .legal-record-item {
  padding-top: 0.75rem;
  border-top: 1px solid rgba(139,0,0,0.20);
}

.legal-modal__tab--active.legal-modal__tab--accusation ~ .legal-modal__body .legal-record-item,
.legal-record-item--accusation {
  border-left-color: #C98020;
}

.legal-record-item--conviction {
  border-left-color: #CC2222;
}

.legal-record-item__charge {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: #F0E0D8;
  line-height: 1.3;
  margin-bottom: 0.2rem;
}

.legal-record-item__year {
  font-family: var(--font-display-sc);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  color: rgba(240,224,216,0.45);
  margin-bottom: 0.45rem;
}

.legal-record-item__description {
  font-size: 0.82rem;
  line-height: 1.65;
  color: rgba(240,224,216,0.85);
  margin-bottom: 0.5rem;
}

.legal-record-item__outcome {
  font-size: 0.8rem;
  line-height: 1.55;
  color: rgba(240,224,216,0.80);
  background-color: #1A0A0A;
  border: 1px solid rgba(139,0,0,0.30);
  padding: 0.4rem 0.55rem;
  margin-bottom: 0.4rem;
}

.legal-record-item__outcome-label {
  font-family: var(--font-display-sc);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: rgba(240,224,216,0.40);
  display: block;
  margin-bottom: 0.15rem;
}

.legal-record-item__context-note {
  font-size: 0.76rem;
  line-height: 1.55;
  color: #7A5020;
  background-color: rgba(160, 120, 48, 0.10);
  border: 1px solid rgba(160, 120, 48, 0.30);
  padding: 0.35rem 0.55rem;
  margin-bottom: 0.4rem;
  font-style: italic;
}

.legal-record-item__context-flag {
  font-style: normal;
  margin-right: 0.2rem;
}

.legal-record-item__sources {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-top: 0.3rem;
}

.legal-record-item__source {
  font-size: 0.72rem;
  color: var(--text-light);
  line-height: 1.45;
}

.legal-record-item__source a {
  color: var(--amber);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}

.legal-record-item__source a:hover {
  color: var(--text);
  text-decoration-style: solid;
}

/* ---- Sexual abuse record badge ---- */

.node-panel__legal-badge--sexual-abuse {
  border-color: #7B2D8B;
  color: #9B3DAB;
}

.node-panel__legal-badge--sexual-abuse:hover {
  background-color: rgba(155,61,171,0.15);
  border-color: #9B3DAB;
  color: #9B3DAB;
}

/* ---- Sexual abuse record modal ---- */

.sexual-abuse-modal {
  background-color: #0E0810;
  color: #F0E0F8;
  width: 100%;
  max-width: 360px;
  border-radius: 2px;
  border-top: 3px solid #6B1F7B;
  box-shadow: 0 12px 48px rgba(0,0,0,0.65), 0 0 0 1px rgba(107,31,123,0.35);
  outline: none;
  overflow: hidden;
}

.sexual-abuse-modal__header {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid rgba(107,31,123,0.35);
  background-color: #180A20;
}

.sexual-abuse-modal__tabs {
  display: flex;
  flex: 1;
  gap: 0;
}

.sexual-abuse-modal__tab {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 1;
  background: transparent;
  border: none;
  border-right: 1px solid rgba(107,31,123,0.25);
  padding: 0.55rem 0.75rem;
  font-family: var(--font-display-sc);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background 0.12s;
  color: rgba(240,224,248,0.45);
}

.sexual-abuse-modal__tab--allegations { color: #9B3DAB; }
.sexual-abuse-modal__tab--coverups { color: #7B5DAB; }

.sexual-abuse-modal__tab--active {
  font-weight: 700;
}

.sexual-abuse-modal__tab--active.sexual-abuse-modal__tab--allegations {
  background-color: rgba(155,61,171,0.18);
  color: #B050C8;
}

.sexual-abuse-modal__tab--active.sexual-abuse-modal__tab--coverups {
  background-color: rgba(123,93,171,0.18);
  color: #9080C8;
}

.sexual-abuse-modal__close {
  background: transparent;
  border: none;
  padding: 0.55rem 0.75rem;
  font-size: 0.8rem;
  color: rgba(240,224,248,0.35);
  cursor: pointer;
  transition: color 0.12s;
}

.sexual-abuse-modal__close:hover { color: #B050C8; }

.sexual-abuse-modal__body {
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 70vh;
  overflow-y: auto;
}

/* ---- Individual sexual abuse record item ---- */

.sexual-abuse-record-item {
  border-left: 3px solid rgba(107,31,123,0.50);
  padding-left: 0.65rem;
}

.sexual-abuse-record-item + .sexual-abuse-record-item {
  padding-top: 0.75rem;
  border-top: 1px solid rgba(107,31,123,0.20);
}

.sexual-abuse-record-item__allegation {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: #F0E0F8;
  line-height: 1.3;
  margin-bottom: 0.2rem;
}

.sexual-abuse-record-item__year {
  font-family: var(--font-display-sc);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  color: rgba(240,224,248,0.45);
  margin-bottom: 0.45rem;
}

.sexual-abuse-record-item__description {
  font-size: 0.82rem;
  line-height: 1.65;
  color: rgba(240,224,248,0.85);
  margin-bottom: 0.5rem;
}

.sexual-abuse-record-item__outcome {
  font-size: 0.8rem;
  line-height: 1.55;
  color: rgba(240,224,248,0.80);
  background-color: #180A20;
  border: 1px solid rgba(107,31,123,0.30);
  padding: 0.4rem 0.55rem;
  margin-bottom: 0.4rem;
}

.sexual-abuse-record-item__outcome-label {
  font-family: var(--font-display-sc);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: rgba(240,224,248,0.40);
  display: block;
  margin-bottom: 0.15rem;
}

.sexual-abuse-record-item__context-note {
  font-size: 0.76rem;
  line-height: 1.55;
  color: #7A4A90;
  background-color: rgba(123,45,139,0.10);
  border: 1px solid rgba(123,45,139,0.30);
  padding: 0.35rem 0.55rem;
  margin-bottom: 0.4rem;
  font-style: italic;
}

.sexual-abuse-record-item__sources {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-top: 0.3rem;
}

.sexual-abuse-record-item__source {
  font-size: 0.72rem;
  color: var(--text-light);
  line-height: 1.45;
}

.sexual-abuse-record-item__source a {
  color: #9B3DAB;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}

.sexual-abuse-record-item__source a:hover {
  color: #F0E0F8;
  text-decoration-style: solid;
}

/* ---- Guided Trail picker (FilterBar) ---- */

.trail-picker {
  position: relative;
}

.trail-picker__btn {
  border: 1px solid var(--canvas-border);
  background: transparent;
  color: var(--text-light);
  font-family: var(--font-display-sc);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  padding: 0.2rem 0.55rem;
  border-radius: 2px;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s;
}

.trail-picker__btn:hover {
  border-color: rgba(196, 101, 42, 0.6);
  color: var(--gold-bright);
}

.trail-picker__btn--active {
  background-color: rgba(196, 101, 42, 0.12);
  border-color: rgba(196, 101, 42, 0.6);
  color: var(--gold-bright);
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trail-picker__caret {
  font-size: 0.55rem;
  opacity: 0.7;
}

.trail-picker__menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  width: 340px;
  background: #131210;
  border: 1px solid #3a3530;
  border-radius: 3px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.55);
  z-index: 200;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.trail-picker__item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.55rem 0.8rem;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  border-bottom: 1px solid #1e1c19;
  transition: background 0.1s;
}

.trail-picker__item:last-child {
  border-bottom: none;
}

.trail-picker__item:hover {
  background: rgba(200, 169, 110, 0.07);
}

.trail-picker__item--active {
  background: rgba(200, 169, 110, 0.12);
}

.trail-picker__item-title {
  font-family: var(--font-serif);
  font-size: 0.78rem;
  color: #f0e8d8;
  line-height: 1.3;
}

.trail-picker__item-sub {
  font-family: var(--font-serif);
  font-size: 0.67rem;
  color: #7a6f60;
  line-height: 1.35;
  font-style: italic;
}

/* ---- Guided Trail Lower-Third Panel ---- */

.trail-lower {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10, 8, 6, 0.96);
  border-top: 1px solid rgba(200, 169, 110, 0.30);
  z-index: 120;
  pointer-events: auto;
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 -6px 32px rgba(0,0,0,0.55);
  animation: trailSlideUp 0.28s ease-out;
}

@keyframes trailSlideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ── Top bar: always visible ── */
.trail-lower__bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 1rem 0.45rem 1.1rem;
  border-bottom: 1px solid rgba(200, 169, 110, 0.12);
  flex-shrink: 0;
}

.trail-lower__meta {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.trail-lower__title {
  font-family: var(--font-display-sc);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  color: var(--canvas-border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trail-lower__counter {
  font-family: var(--font-display-sc);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: #a09888;
  white-space: nowrap;
  flex-shrink: 0;
}

.trail-lower__controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.trail-lower__btn {
  border: 1px solid #3a3530;
  background: transparent;
  color: #aaa;
  font-family: var(--font-serif);
  font-size: 0.72rem;
  padding: 0.2rem 0.7rem;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
}

.trail-lower__btn:hover:not(:disabled) {
  border-color: var(--gold);
  color: #f0e8d8;
}

.trail-lower__btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.trail-lower__btn--exit {
  border-color: rgba(155, 32, 32, 0.45);
  color: #9B2020;
}

.trail-lower__btn--exit:hover {
  background-color: rgba(155, 32, 32, 0.1);
  border-color: #9B2020;
  color: #c03030;
}

.trail-lower__collapse {
  background: transparent;
  border: none;
  color: #666;
  font-size: 0.6rem;
  cursor: pointer;
  padding: 0.2rem 0.3rem;
  line-height: 1;
  flex-shrink: 0;
  transition: color 0.12s;
}

.trail-lower__collapse:hover {
  color: #aaa;
}

/* ── Body: graphic + narrative ── */
.trail-lower__body {
  display: flex;
  height: 180px;
  overflow: hidden;
}

.trail-lower__graphic {
  width: 220px;
  flex-shrink: 0;
  border-right: 1px solid rgba(200, 169, 110, 0.12);
  background: rgba(255,255,255,0.015);
  /* placeholder — future graphics go here */
}

.trail-lower__text {
  flex: 1;
  padding: 0.85rem 1.2rem 0.85rem 1.1rem;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(200,169,110,0.2) transparent;
}

.trail-lower__page-heading {
  font-family: var(--font-display-sc);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--gold, #C8A96E);
  margin: 0 0 0.55rem;
  text-transform: uppercase;
}

.trail-lower__node-label {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  font-weight: 700;
  color: #f0e8d8;
  margin: 0 0 0.5rem;
}

.trail-lower__narrative {
  font-family: var(--font-serif);
  font-size: 0.82rem;
  line-height: 1.65;
  color: #c8bfb2;
  margin: 0;
  white-space: pre-line;
}

/* ---- Pin mode HUD ---- */

.pin-hud {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(220,38,38,0.10);
  border: 1px solid rgba(220,38,38,0.45);
  border-radius: 3px;
  padding: 0.3rem 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  pointer-events: none;
  z-index: 25;
  white-space: nowrap;
}

.pin-hud__icon {
  color: #DC143C;
  font-size: 0.8rem;
}

.pin-hud__text {
  font-family: var(--font-serif);
  font-size: 0.75rem;
  color: #F4547A;
}

.pin-hud__text strong {
  color: #DC143C;
  font-weight: 700;
}

.pin-hud__divider {
  color: rgba(220,20,60,0.38);
}

.pin-hud__hint {
  font-family: var(--font-display-sc);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  color: rgba(220,20,60,0.55);
}

/* ---- Node hover tooltip ---- */

.node-hover-tooltip {
  position: absolute;
  transform: translateX(-50%);
  background: rgba(10,9,8,0.88);
  color: #EAE0D5;
  border: 1px solid rgba(198,172,143,0.22);
  border-radius: 3px;
  padding: 0.25rem 0.55rem;
  pointer-events: none;
  z-index: 20;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.node-hover-tooltip__name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 0.75rem;
}

.node-hover-tooltip__role {
  font-family: var(--font-display-sc);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  opacity: 0.60;
}

[data-palette="b"] .node-hover-tooltip {
  background: rgba(17,17,17,0.92);
  color: #FFFFFF;
  border-color: rgba(26,92,138,0.30);
}

/* ---- Pre-release banner ---- */

.prerelease-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0.9rem;
  background: repeating-linear-gradient(
    -45deg,
    #1a1400,
    #1a1400 10px,
    #1f1800 10px,
    #1f1800 20px
  );
  border-top: 1px solid #7a5500;
  border-bottom: 2px solid #c47a00;
  flex-shrink: 0;
}

.prerelease-banner__badge {
  font-family: var(--font-display-sc);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #F5A623;
  background: rgba(245,166,35,0.12);
  border: 1px solid rgba(245,166,35,0.45);
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
  white-space: nowrap;
  flex-shrink: 0;
}

.prerelease-banner__text {
  font-family: var(--font-serif);
  font-size: 0.72rem;
  color: rgba(245,166,35,0.70);
  font-style: italic;
  flex: 1;
}

.prerelease-banner__btn {
  background: transparent;
  border: 1px solid rgba(245,166,35,0.50);
  color: #F5A623;
  font-family: var(--font-display-sc);
  font-size: 0.60rem;
  letter-spacing: 0.12em;
  padding: 0.2rem 0.65rem;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
  flex-shrink: 0;
}

.prerelease-banner__btn:hover {
  background: rgba(245,166,35,0.12);
  border-color: #F5A623;
}

.prerelease-banner__beta { display: none; }

.prerelease-banner__copied {
  font-family: var(--font-display-sc);
  font-size: 0.60rem;
  letter-spacing: 0.12em;
  color: #F5A623;
  opacity: 0;
  transition: opacity 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.prerelease-banner__copied--visible {
  opacity: 1;
}

.kofi-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: transparent;
  border: 1px solid rgba(245, 166, 35, 0.35);
  color: rgba(245, 166, 35, 0.75);
  font-family: var(--font-serif);
  font-size: 0.68rem;
  padding: 0.2rem 0.65rem;
  border-radius: 3px;
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.kofi-btn:hover {
  background: rgba(245, 166, 35, 0.10);
  border-color: rgba(245, 166, 35, 0.75);
  color: #F5A623;
}

.sources-kofi {
  text-align: center;
  padding: 0.5rem 0 1.25rem;
}
.kofi-btn--large {
  font-size: 0.85rem;
  padding: 0.55rem 1.4rem;
  border-radius: 4px;
  border-color: rgba(245, 166, 35, 0.5);
  color: rgba(245, 166, 35, 0.85);
  letter-spacing: 0.02em;
}
.kofi-btn--large:hover {
  background: rgba(245, 166, 35, 0.12);
  border-color: #F5A623;
  color: #F5A623;
}

/* ---- Sources / Footer ---- */

.site-footer {
  padding: 0 !important;
  border-top: 1px solid rgba(198,172,143,0.18) !important;
  background: var(--black, #0A0908) !important;
  font-style: normal !important;
}

.sources-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.65rem 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-display-sc, serif);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(198,172,143,0.65);
  transition: color 0.18s;
}

.sources-toggle:hover {
  color: rgba(198,172,143,0.95);
}

.sources-toggle__arrow {
  font-size: 0.65rem;
  transition: transform 0.22s;
}

.sources-toggle[aria-expanded="true"] .sources-toggle__arrow {
  transform: rotate(180deg);
}

.sources-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.28s ease;
}

.sources-panel--open {
  grid-template-rows: 1fr;
}

.sources-panel__inner {
  overflow: hidden;
}

/* Wrap grid + note in a single child so grid-template-rows collapses cleanly */
.sources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem 2rem;
  padding: 1.25rem 2rem 0.5rem;
  overflow: hidden;
}

.sources-category__title {
  font-family: var(--font-display-sc, serif);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(198,172,143,0.55);
  margin: 0 0 0.6rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(198,172,143,0.15);
}

.sources-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.sources-item {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 0.5rem;
  row-gap: 0.05rem;
}

.sources-item__title {
  grid-column: 1;
  grid-row: 1;
  font-size: 0.8rem;
  color: var(--color-text, #EAE0D5);
  line-height: 1.3;
}

.sources-item__author {
  grid-column: 1;
  grid-row: 2;
  font-size: 0.72rem;
  color: rgba(198,172,143,0.60);
}

.sources-item__year {
  display: none;
}

.sources-item__link {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  font-size: 0.68rem;
  color: rgba(198,172,143,0.50);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s;
}

.sources-item__link:hover {
  color: rgba(198,172,143,0.95);
}

.sources-item--primary .sources-item__title {
  color: #C6AC8F;
}

.sources-note {
  font-size: 0.7rem;
  color: rgba(198,172,143,0.40);
  text-align: center;
  padding: 0.75rem 2rem 1rem;
  margin: 0;
  line-height: 1.5;
}

.sources-author-note {
  font-size: 0.8rem;
  color: rgba(198,172,143,0.60);
  text-align: center;
  padding: 0.5rem 3rem;
  margin: 0;
  line-height: 1.7;
  border-top: 1px solid rgba(198,172,143,0.12);
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}
.sources-author-note a {
  color: rgba(198,172,143,0.80);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.sources-author-note a:hover {
  color: #C6AC8F;
}

/* Dark theme adjustments */
[data-theme="dark"] .sources-toggle,
[data-theme="reader"] .sources-toggle {
  color: rgba(198,172,143,0.50);
}
[data-theme="dark"] .sources-toggle:hover,
[data-theme="reader"] .sources-toggle:hover {
  color: rgba(198,172,143,0.85);
}

/* ---- Help button ---- */

.fullscreen-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 3px;
  border: 1.5px solid rgba(198,172,143,0.35);
  background: none;
  color: rgba(198,172,143,0.55);
  font-size: 0.85rem;
  cursor: pointer;
  line-height: 1;
  transition: border-color 0.15s, color 0.15s;
  flex-shrink: 0;
}

.fullscreen-btn:hover {
  border-color: rgba(198,172,143,0.75);
  color: rgba(198,172,143,0.95);
}

.help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid rgba(198,172,143,0.35);
  background: none;
  color: rgba(198,172,143,0.55);
  font-family: var(--font-sans, sans-serif);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  transition: border-color 0.15s, color 0.15s;
  flex-shrink: 0;
}

.help-btn:hover {
  border-color: rgba(198,172,143,0.75);
  color: rgba(198,172,143,0.95);
}

/* ---- Tutorial flash (mobile hamburger hint) ---- */
@keyframes tutorial-flash-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(198,172,143,0.8); }
  50%  { box-shadow: 0 0 0 10px rgba(198,172,143,0); }
  100% { box-shadow: 0 0 0 0 rgba(198,172,143,0); }
}

.tutorial-flash {
  animation: tutorial-flash-pulse 0.5s ease-out 2;
  outline: 2px solid rgba(198,172,143,0.8);
  border-radius: 4px;
}

/* ---- Tutorial overlay ---- */

.tutorial-overlay {
  position: fixed;
  inset: 0;
  z-index: 9990;
  pointer-events: none;
}

.tutorial-overlay[hidden] {
  display: none;
}

.tutorial-highlight {
  position: fixed;
  pointer-events: none;
  z-index: 9991;
  transition: left 0.25s ease, top 0.25s ease, width 0.25s ease, height 0.25s ease;
}

.tutorial-card {
  position: fixed;
  z-index: 9992;
  width: 320px;
  max-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  pointer-events: all;
  cursor: grab;
  background: #1a1714;
  border: 1px solid rgba(198,172,143,0.28);
  border-radius: 8px;
  padding: 1.1rem 1.25rem 1rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.55);
  transition: top 0.25s ease, left 0.25s ease, bottom 0.25s ease;
}

.tutorial-card__meta {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.55rem;
  flex-shrink: 0;
}

.tutorial-btn--mute {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  padding: 0 0 0 0.4rem;
  color: rgba(198,172,143,0.5);
  display: flex;
  align-items: center;
  transition: color 0.15s;
}

.tutorial-btn--mute:hover {
  color: rgba(198,172,143,0.95);
}

.tutorial-card__counter {
  font-family: var(--font-display-sc, serif);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(198,172,143,0.40);
  white-space: nowrap;
}

.tutorial-card__title {
  font-family: var(--font-display-sc, serif);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #C6AC8F;
}

.tutorial-card__text {
  font-size: 0.83rem;
  line-height: 1.6;
  color: rgba(234,224,213,0.88);
  margin: 0 0 1rem;
  white-space: pre-line;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.tutorial-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-shrink: 0;
}

.tutorial-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.tutorial-card button {
  cursor: pointer;
}

.tutorial-btn {
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-sans, sans-serif);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  transition: background 0.15s, color 0.15s;
}

.tutorial-btn--skip {
  background: none;
  color: rgba(198,172,143,0.45);
}

.tutorial-btn--skip:hover {
  color: rgba(198,172,143,0.8);
}

.tutorial-btn--back {
  background: none;
  color: rgba(198,172,143,0.55);
  border: 1px solid rgba(198,172,143,0.2);
}

.tutorial-btn--back:hover {
  color: rgba(198,172,143,0.85);
  border-color: rgba(198,172,143,0.4);
}

.tutorial-btn--next {
  background: #C6AC8F;
  color: #0A0908;
  letter-spacing: 0.03em;
}

.tutorial-btn--next:hover {
  background: #d4bc9f;
}
