@font-face {
  font-family: "Source Sans 3";
  src: url("../assets/fonts/SourceSans3-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../assets/fonts/SourceSans3-Semibold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
}
@font-face {
  font-family: Manrope;
  src: url("../assets/fonts/manrope.ttf") format("truetype");
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
}

:root {
  --terra-navy: #102d46;
  --terra-blue: #2766a4;
  --terra-paper: #f6f3ed;
  --terra-mist: #dceaf3;
  --terra-sand: #c4ae8f;
  --terra-slate: #516674;
}

[hidden] { display: none !important; }

html { scroll-behavior: smooth; overflow-x: clip; }
body {
  font-family: "Source Sans 3", Arial, sans-serif !important;
  font-size: 17px;
  line-height: 1.55;
  user-select: text;
  overflow-x: clip !important;
}
button, input, select { font-family: Manrope, Arial, sans-serif; }
h1, h2, h3, h4, .drawer-tab-btn, .sidebar-section summary { font-family: Manrope, Arial, sans-serif; }
button, a, summary { touch-action: manipulation; }

.graph-tools { position: absolute; z-index: 18; right: 24px; bottom: 24px; display: flex; gap: 7px; align-items: center; padding: 6px; border: 1px solid #dceaf333; border-radius: 10px; background: #081826e8; box-shadow: 0 10px 30px #0006; }
.graph-tools button { min-width: 44px; min-height: 44px; padding: 0 11px; border: 1px solid #668ba566; border-radius: 7px; background: #153b59; color: #f6f3ed; font: 700 13px Manrope,Arial,sans-serif; cursor: pointer; }
.graph-tools button:focus-visible,.graph-popover button:focus-visible,.graph-list-panel button:focus-visible,.graph-list-panel input:focus-visible,.graph-quick-card button:focus-visible { outline: 3px solid #c4ae8f; outline-offset: 2px; }
.graph-minimap { position: absolute; z-index: 17; right: 24px; bottom: 86px; width: 180px; height: 112px; border: 1px solid #668ba566; border-radius: 7px; background: #081826dc; box-shadow: 0 8px 24px #0005; }
.graph-popover { position: absolute; z-index: 19; right: 24px; bottom: 206px; width: min(390px,calc(100vw - 32px)); padding: 15px; border: 1px solid #668ba5; border-radius: 8px; background: #f6f3ed; color: #102d46; box-shadow: 0 15px 40px #0008; }
.graph-popover p { margin: 9px 0; font-size: 13px; line-height: 1.5; }
.legend-line { display: inline-block; width: 25px; margin: 0 5px; border-top: 3px solid; vertical-align: middle; }
.legend-line.incoming { border-color: #10b981; }.legend-line.outgoing { border-color: #f97316; }.legend-line.loop { border-color: #f43f5e; border-top-style: dashed; }
.graph-category-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 12px; font-size: 12px; }
.graph-category-legend span { display: flex; align-items: center; gap: 7px; }
.graph-category-legend i { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.graph-list-panel { position: absolute; z-index: 31; top: 82px; right: 20px; bottom: 86px; width: min(390px,calc(100vw - 40px)); padding: 18px; overflow: auto; border: 1px solid #668ba5; border-radius: 8px; background: #f6f3ed; color: #102d46; box-shadow: 0 18px 55px #000a; }
.graph-list-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 16px; }
.graph-list-head button { width: 44px; height: 44px; border: 0; background: transparent; color: #102d46; font-size: 24px; }
.graph-list-panel label { display: block; margin-bottom: 5px; font-size: 13px; font-weight: 700; }
.graph-list-panel input { width: 100%; min-height: 46px; padding: 8px 10px; border: 1px solid #97aab8; border-radius: 5px; background: white; color: #102d46; font: inherit; }
#graph-list-results { margin-top: 12px; }
#graph-list-results button { display: block; width: 100%; min-height: 48px; padding: 9px 7px; border: 0; border-bottom: 1px solid #d1dce3; background: transparent; color: #102d46; text-align: left; font: 600 13px Manrope,Arial,sans-serif; }
#graph-list-results small { display: block; margin-top: 3px; color: #516674; font-weight: 400; }
.graph-quick-card { position: absolute; z-index: 25; right: 24px; top: 94px; width: min(380px,calc(100vw - 40px)); padding: 18px; border: 1px solid #668ba5; border-radius: 9px; background: #f6f3ed; color: #102d46; box-shadow: 0 18px 55px #000a; user-select: text; }
.quick-card-close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border: 0; background: transparent; color: #102d46; font-size: 23px; }
.quick-card-meta { padding-right: 38px; color: #2766a4; font: 700 11px Manrope,Arial,sans-serif; letter-spacing: .06em; text-transform: uppercase; }
.graph-quick-card h2 { margin: 7px 34px 8px 0; color: #102d46; font: 700 19px/1.3 Manrope,Arial,sans-serif; }
.graph-quick-card > p:not(.quick-card-meta) { color: #344f60; font-size: 14px; line-height: 1.48; }
.quick-card-relations { margin-top: 10px; padding-top: 9px; border-top: 1px solid #cbd8df; font-weight: 700; }
.quick-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.quick-card-actions button { min-height: 44px; padding: 7px 11px; border: 1px solid #2766a4; border-radius: 5px; background: white; color: #205b90; font: 700 12px Manrope,Arial,sans-serif; }
#quick-card-full { background: #2766a4; color: white; }

@media (max-width:760px) {
  .graph-tools { right: 12px; bottom: 96px; left: 12px; justify-content: center; }
  .graph-tools button { flex: 1 1 auto; padding: 0 6px; }
  .graph-popover { right: 12px; bottom: 154px; }
  .graph-minimap { display: none; }
  .graph-list-panel { top: 114px; right: 10px; bottom: 12px; width: calc(100vw - 20px); }
  .graph-quick-card { position: absolute; top: auto; right: 10px; bottom: 10px; left: 10px; width: auto; max-height: 48vh; overflow: auto; }
  body.graph-card-open .graph-tools { display: none; }
  body.graph-card-open #map-prompt { display: none; }
}
:focus-visible { outline: 3px solid var(--terra-blue) !important; outline-offset: 3px; }
#inspection-drawer :focus-visible, header :focus-visible { outline-color: var(--terra-mist) !important; }
::selection { background: var(--terra-blue); color: white; }

/* The landing screen gives readers and researchers equally visible entrances. */
.welcome-screen {
  position: fixed;
  inset: 0;
  z-index: 80;
  overflow: auto;
  background: var(--terra-navy);
  color: var(--terra-paper);
}
.welcome-screen[hidden] { display: none !important; }
.welcome-inner { width: min(1100px, 100%); margin: 0 auto; padding: clamp(28px, 5vw, 72px) 24px 40px; }
.welcome-brand { display: inline-block; margin-bottom: clamp(35px, 8vh, 95px); }
.welcome-brand img { display: block; width: clamp(180px, 24vw, 270px); height: auto; }
.welcome-kicker { color: var(--terra-sand); font: 600 12px Manrope, Arial, sans-serif; letter-spacing: .12em; text-transform: uppercase; }
.welcome-inner h1 { max-width: 850px; margin: 16px 0; color: #fff; font-size: clamp(38px, 5vw, 72px); line-height: 1.08; letter-spacing: -.055em; }
.welcome-intro { max-width: 720px; margin-bottom: 30px; color: var(--terra-mist); font-size: clamp(17px, 2vw, 21px); }
.welcome-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.welcome-choice {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  align-items: flex-start;
  gap: 11px;
  padding: clamp(22px, 3vw, 36px);
  border: 1px solid #dceaf375;
  border-radius: 3px;
  background: var(--terra-paper);
  color: var(--terra-navy);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.welcome-choice:hover { transform: translateY(-3px); box-shadow: 0 16px 42px #0004; }
.welcome-choice-index { color: var(--terra-blue); font: 700 12px Manrope, Arial, sans-serif; text-transform: uppercase; letter-spacing: .1em; }
.welcome-choice strong { font: 700 clamp(23px, 2.5vw, 32px) Manrope, Arial, sans-serif; letter-spacing: -.035em; }
.welcome-choice > span:last-child { margin-top: auto; color: var(--terra-blue); font: 700 14px Manrope, Arial, sans-serif; }
.welcome-map-link { display: inline-flex; min-height: 48px; align-items: center; margin-top: 18px; padding: 0; border: 0; background: transparent; color: var(--terra-mist); font-size: 15px; cursor: pointer; }
.welcome-map-link:hover { color: white; text-decoration: underline; }

/* Quiet, squared controls follow the active Terra Perpetua brand. */
body > header.glass-panel { top: 0 !important; left: 0 !important; right: 0 !important; border-radius: 0 !important; border: 0; border-bottom: 1px solid #dceaf344; background: #102d46f4; box-shadow: 0 8px 25px #08182755; backdrop-filter: blur(8px); }
@media (min-width: 1000px) { body > header.glass-panel { flex-wrap: nowrap; } }
body > header button, body > header a.header-library-link { min-height: 44px; border-radius: 3px !important; }
.header-logo { width: 130px; height: auto; max-height: 38px; object-fit: contain; }
.header-project-name { color: var(--terra-paper); font: 700 11px Manrope, Arial, sans-serif; letter-spacing: .12em; }
.header-counts { color: var(--terra-sand); font: 600 10px Manrope, Arial, sans-serif; white-space: nowrap; }
.header-subtitle { color: var(--terra-mist); font-size: 11px; }
.header-library-link { display: none; align-items: center; padding: 0 12px; color: var(--terra-mist); font: 600 12px Manrope, Arial, sans-serif; text-decoration: none; border: 1px solid #dceaf344; }
.header-library-link:hover { background: var(--terra-blue); color: white; }
#search-input { min-height: 32px; font-size: 14px; }
#search-results { min-width: min(420px, 92vw); }
#btn-reset-camera { min-width: 44px; }

/* Paper navigation panel, with progressive disclosure. */
#navigation-sidebar {
  width: min(430px, 100vw);
  max-width: 100vw;
  padding: 22px;
  background: var(--terra-paper);
  color: var(--terra-navy);
  border-right: 1px solid #51667455;
  box-shadow: 16px 0 45px #08182766;
}
#navigation-sidebar.-translate-x-full, #inspection-drawer.translate-x-full { display: none; }
#navigation-sidebar h2 { color: var(--terra-navy) !important; font-size: 17px; }
#navigation-sidebar [class*="text-slate-"] { color: var(--terra-slate) !important; }
#navigation-sidebar [class*="bg-slate-"] { background: #fff !important; }
#navigation-sidebar [class*="border-slate-"] { border-color: #51667438 !important; }
#navigation-sidebar [class*="rounded-"] { border-radius: 3px !important; }
#sidebar-close-btn { min-width: 48px; min-height: 48px; color: var(--terra-navy) !important; background: var(--terra-mist) !important; }
.sidebar-context { margin: 4px 0 12px; font-size: 14px; line-height: 1.45; color: var(--terra-slate); }
.sidebar-stats { margin-bottom: 14px; padding: 9px 12px; border: 1px solid #51667438; background: #fff; color: var(--terra-navy); font: 600 12px Manrope, Arial, sans-serif; }
.sidebar-section { margin-bottom: 9px; border: 1px solid #51667442; background: #fff; }
.sidebar-section summary { display: flex; align-items: center; justify-content: space-between; min-height: 54px; padding: 10px 14px; color: var(--terra-navy); font-size: 15px; font-weight: 700; cursor: pointer; }
.sidebar-section summary::after { content: "+"; color: var(--terra-blue); font-size: 24px; line-height: 1; }
.sidebar-section[open] summary::after { content: "−"; }
.sidebar-section summary span:nth-child(2) { margin-left: auto; margin-right: 12px; font-size: 12px; color: var(--terra-slate); }
.sidebar-section-intro { padding: 0 14px 9px; color: var(--terra-slate); font-size: 13px; }
.sidebar-section > div, .sidebar-section > h3, .sidebar-section > label, .sidebar-section > input, .sidebar-section > button { margin-left: 12px; margin-right: 12px; }
.sidebar-section > div { margin-bottom: 12px; }
.sidebar-subheading { margin-top: 14px; margin-bottom: 8px; color: var(--terra-navy); font-size: 13px; }
.sidebar-reset { min-height: 44px; padding: 0 8px; border: 0; background: transparent; color: var(--terra-blue); font-size: 13px; text-decoration: underline; cursor: pointer; }
.sidebar-search-label { display: block; margin-top: 5px; font-size: 13px; }
#sidebar-node-search, #sidebar-route-search, #sidebar-global-search { display: block; width: 100%; min-height: 48px; margin-bottom: 12px; padding: 8px 12px; border: 1px solid #51667455; border-radius: 3px; background: white; color: var(--terra-navy); }
.sidebar-node-list { max-height: 360px; overflow: auto; }
.sidebar-node-list button, #sidebar-paths-list button { display: block; width: 100%; min-height: 48px; padding: 9px 12px; border: 0; border-top: 1px solid #51667422; background: #fff; color: var(--terra-navy); text-align: left; font-size: 13px; cursor: pointer; }
.sidebar-node-list button:hover, #sidebar-paths-list button:hover { background: var(--terra-mist); }
.sidebar-library-links { display: grid; gap: 8px; margin-top: 10px; }
.sidebar-library-links a { display: flex; justify-content: space-between; align-items: center; min-height: 50px; padding: 10px 14px; border: 1px solid var(--terra-blue); color: var(--terra-blue); text-decoration: none; font: 700 13px Manrope, Arial, sans-serif; }
.sidebar-library-links a:hover { background: var(--terra-blue); color: white; }
.sidebar-show-more { display: block; width: calc(100% - 24px); min-height: 44px; margin: 0 12px 12px !important; padding: 6px; border: 1px solid var(--terra-blue); color: var(--terra-blue); background: white; font-size: 13px; cursor: pointer; }
.sidebar-show-more:hover { background: var(--terra-mist); }
.route-card-action { color: var(--terra-blue); font: 700 12px Manrope, Arial, sans-serif; }
.path-finder { display: grid; gap: 6px; padding: 14px; border-top: 1px solid #51667442; }
.path-finder h3 { margin-bottom: 5px; color: var(--terra-navy); font-size: 14px; }
.path-finder label { font-size: 12px; color: var(--terra-slate); }
.path-finder select { width: 100%; min-height: 46px; padding: 6px; border: 1px solid #51667455; background: white; color: var(--terra-navy); font-size: 12px; }
.path-finder > button, #path-result button { min-height: 46px; padding: 7px 10px; border: 1px solid var(--terra-blue); background: var(--terra-blue); color: white; font-size: 12px; cursor: pointer; }
.path-finder p { display: grid; gap: 7px; color: var(--terra-navy); font-size: 13px; }
#sidebar-tours-list > button, #sidebar-loops-list > button, #sidebar-actors-list > button { display: block; width: 100%; min-height: 58px; padding: 11px; border: 1px solid #51667438; background: var(--terra-paper); color: var(--terra-navy); text-align: left; cursor: pointer; }
#sidebar-tours-list > button:hover, #sidebar-loops-list > button:hover, #sidebar-actors-list > button:hover { border-color: var(--terra-blue); background: var(--terra-mist); }
#navigation-sidebar .font-semibold, #navigation-sidebar .font-bold { color: var(--terra-navy); }
.sidebar-entry-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-bottom: 14px; }
.sidebar-entry { display: grid; align-content: start; min-height: 92px; padding: 9px; border: 1px solid #51667444; background: white; color: var(--terra-navy); text-align: left; cursor: pointer; }
.sidebar-entry > span { color: var(--terra-blue); font: 700 10px Manrope, Arial, sans-serif; }
.sidebar-entry strong { margin: 4px 0; font-size: 12px; line-height: 1.2; }
.sidebar-entry small { color: var(--terra-slate); font-size: 10px; line-height: 1.25; }
.sidebar-entry:hover, .sidebar-entry.active { border-color: var(--terra-blue); background: var(--terra-mist); box-shadow: inset 0 -3px var(--terra-blue); }
.sidebar-entry-panel { padding: 14px 0 4px; border-top: 2px solid var(--terra-navy); }
.sidebar-entry-panel[hidden], .sidebar-global-results[hidden] { display: none !important; }
.sidebar-panel-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 10px; }
.sidebar-panel-heading > div > span { color: var(--terra-blue); font: 700 10px Manrope, Arial, sans-serif; text-transform: uppercase; letter-spacing: .1em; }
.sidebar-panel-heading h3 { margin: 2px 0 0; color: var(--terra-navy); font-size: 19px; }
.sidebar-panel-heading > span { color: var(--terra-slate); font-size: 11px; }
.sidebar-entry-panel .sidebar-section-intro { padding: 0 0 10px; }
.sidebar-entry-panel .sidebar-search-label { margin-top: 0; }
.sidebar-entry-panel #sidebar-route-search, .sidebar-entry-panel #sidebar-node-search { width: 100%; }
.sidebar-entry-panel #sidebar-tours-list > button { min-height: 64px; padding: 9px 10px; }
.sidebar-entry-panel .sidebar-show-more { width: 100%; margin: 8px 0 12px !important; }
.scope-switch { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 12px; padding: 3px; background: var(--terra-mist); }
.scope-switch button { min-height: 44px; border: 0; background: transparent; color: var(--terra-navy); font-weight: 700; cursor: pointer; }
.scope-switch button[aria-pressed="true"] { background: var(--terra-navy); color: white; }
.sidebar-stage-list { display: grid; gap: 6px; }
.sidebar-stage-list button { display: flex; align-items: center; justify-content: space-between; min-height: 58px; padding: 9px 11px; border: 1px solid #51667444; background: white; color: var(--terra-navy); text-align: left; cursor: pointer; }
.sidebar-stage-list button:hover { border-color: var(--terra-blue); background: var(--terra-mist); }
.sidebar-stage-list b, .sidebar-stage-list small { display: block; }
.sidebar-stage-list b { font-size: 13px; }
.sidebar-stage-list small { margin-top: 3px; color: var(--terra-slate); font-size: 10px; line-height: 1.3; }
.sidebar-stage-list em { margin-left: 8px; color: var(--terra-blue); font: 700 12px Manrope, Arial, sans-serif; }
.sidebar-node-list button span, .sidebar-node-list button small { display: block; }
.sidebar-node-list button small { margin-top: 3px; color: var(--terra-slate); font-size: 10px; }
.sidebar-evidence-summary { display: grid; justify-items: start; gap: 2px; margin: 10px 0 14px; padding: 18px; background: var(--terra-navy); color: white; }
.sidebar-evidence-summary strong { color: var(--terra-sand); font-size: 28px; }
.sidebar-evidence-summary span { font-weight: 700; }
.sidebar-evidence-summary small { margin-top: 4px; color: var(--terra-mist); }
.sidebar-primary-link, .sidebar-secondary-link { display: flex; align-items: center; min-height: 50px; margin-bottom: 8px; padding: 10px 13px; border: 1px solid var(--terra-blue); color: var(--terra-blue); font-weight: 700; text-decoration: none; }
.sidebar-primary-link { background: var(--terra-blue); color: white; }
.sidebar-primary-link:hover, .sidebar-secondary-link:hover { background: var(--terra-navy); color: white; }
.sidebar-global-results { position: relative; z-index: 2; max-height: 330px; margin: -7px 0 14px; overflow: auto; border: 1px solid #51667455; background: white; box-shadow: 0 12px 30px #08182722; }
.sidebar-global-results > button, .sidebar-global-results > a { display: grid; width: 100%; min-height: 52px; padding: 9px 11px; border: 0; border-bottom: 1px solid #51667422; background: white; color: var(--terra-navy); text-align: left; text-decoration: none; cursor: pointer; }
.sidebar-global-results small { color: var(--terra-blue); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.sidebar-global-results strong { margin-top: 2px; font-size: 12px; }
.sidebar-advanced { margin-top: 14px; border: 1px solid #51667455; background: white; }
.sidebar-advanced > summary { display: flex; align-items: center; min-height: 50px; padding: 10px 13px; color: var(--terra-navy); font-weight: 700; cursor: pointer; }
.sidebar-advanced > h3, .sidebar-advanced > p, .sidebar-advanced > div { margin-left: 12px; margin-right: 12px; }
.sidebar-advanced > h3 { margin-top: 12px; color: var(--terra-navy); font-size: 14px; }
.sidebar-advanced > p { margin-bottom: 9px; color: var(--terra-slate); font-size: 12px; }
.sidebar-advanced .path-finder { margin: 12px 0 0; }
.legend-line.knowledge { border-top: 2px dashed var(--terra-sand); background: none; }

/* The detailed drawer keeps a focused reading column and large section targets. */
#inspection-drawer { width: min(720px, 100vw); max-width: 100vw; background: var(--terra-navy); box-shadow: -14px 0 40px #08182777; }
#inspection-drawer .drawer-grid-layout { display: flex; flex-direction: column; gap: 28px; }
#inspection-drawer p, #inspection-drawer li { font-size: 15px; line-height: 1.6; }
#inspection-drawer h2 { font-size: clamp(24px, 3vw, 34px); line-height: 1.2; }
#drawer-close-btn, #drawer-fullscreen-btn { min-width: 48px; min-height: 48px; border-radius: 3px !important; }
#drawer-section-nav { display: grid; flex: 0 0 auto; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; min-height: 126px; padding-top: 8px; padding-bottom: 8px; overflow: visible; }
.drawer-tab-btn { width: 100%; min-height: 52px; justify-content: center; padding: 7px 10px; border-radius: 3px; font-size: 14px; line-height: 1.2; white-space: normal; text-align: center; }
.drawer-section-label, #drawer-section-select { display: none; }
.drawer-evidence-status { margin-top: 12px; padding: 10px 12px; border-left: 3px solid var(--terra-sand); background: #ffffff0c; color: var(--terra-mist); font-size: 13px !important; }
.drawer-visuals { display: grid; gap: 12px; margin-bottom: 14px; }
.drawer-research-section { padding: 18px; border: 1px solid #dceaf344; background: #ffffff08; }
.drawer-research-section h3 { margin-bottom: 6px; color: var(--terra-paper); font-size: 16px; }
.drawer-research-section p { color: var(--terra-mist); font-size: 13px !important; }
.drawer-research-section a { display: block; min-height: 44px; margin-top: 8px; padding: 9px 12px; border: 1px solid #dceaf344; color: var(--terra-paper); text-decoration: none; }
.drawer-research-section a:hover { background: var(--terra-blue); }
.section-source-links { margin-top: 15px; border: 1px solid #dceaf355; background: #ffffff08; }
.section-source-links summary { display: flex; min-height: 48px; align-items: center; padding: 9px 14px; color: var(--terra-mist); font: 600 13px Manrope, Arial, sans-serif; cursor: pointer; }
.section-source-links > p { margin: 0 14px 10px; color: var(--terra-mist); font-size: 12px !important; }
.section-source-links ul { margin: 0 14px 14px; padding-left: 18px; }
.section-source-links a { display: inline-block; min-height: 36px; padding: 5px 0; color: var(--terra-mist); text-decoration: underline; }
.section-source-links a:hover { color: white; }
#drawer-external-links-details { border-radius: 3px; }
#drawer-external-links-details summary { min-height: 52px; }
.terra-link-card { min-height: 60px; border-radius: 3px; }

#tour-bar { position: fixed; z-index: 50; border-radius: 3px; }
#tour-bar:not(.tour-bar-docked) { transform: translateX(-50%); }
#tour-bar.tour-bar-docked { left: 16px; right: calc(var(--tour-drawer-width, 720px) + 16px); width: auto; max-width: none; transform: none; }
#tour-bar p { font-size: 15px; }
#tour-bar button { min-height: 48px; border-radius: 3px; }
#intro-guide { max-width: 330px; border-radius: 3px; }
#intro-guide li { font-size: 13px; }
#map-prompt { display: none; }
#guide-close-btn, #loop-banner-close { min-width: 44px; min-height: 44px; }
.search-result { display: grid; width: 100%; gap: 2px; min-height: 55px; padding: 9px 12px; border: 0; border-bottom: 1px solid #dceaf333; background: transparent; color: white; text-align: left; text-decoration: none; cursor: pointer; }
.search-result:hover { background: var(--terra-blue); }
.search-result small { color: var(--terra-sand); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.search-result strong { font-size: 13px; }
.search-empty { padding: 15px; color: var(--terra-mist); font-size: 13px; }

@media (max-width: 1100px) {
  body > header.glass-panel { left: 16px; right: 16px; width: auto; box-sizing: border-box; }
  .header-subtitle, .header-counts { display: none; }
  #btn-global-citizen, #btn-global-researcher { display: none; }
  body > header > div:nth-of-type(2) { display: none; }
}

@media (max-width: 760px) {
  body > header.glass-panel { padding: 8px 10px; gap: 7px; }
  .header-logo { width: 82px; }
  .header-project-name { display: none; }
  .header-subtitle, .header-counts, .header-library-link { display: none; }
  #btn-global-citizen, #btn-global-researcher { display: none; }
  body > header > div:nth-of-type(2) { display: none; }
  #search-input { width: min(31vw, 125px); }
  #navigation-sidebar { padding: 15px; }
  .sidebar-entry { min-height: 82px; padding: 7px; }
  .sidebar-entry small { display: none; }
  #inspection-drawer { padding: 14px; }
  #drawer-section-nav { display: none; }
  .drawer-section-label { display: block; margin: 0 0 5px; color: var(--terra-mist); font-size: 12px; }
  #drawer-section-select { display: block; position: sticky; top: 0; z-index: 25; width: 100%; min-height: 52px; margin-bottom: 16px; padding: 8px 12px; border: 1px solid var(--terra-mist); border-radius: 3px; background: var(--terra-navy); color: white; font-size: 15px; }
  #tour-bar { left: 0; right: 0; bottom: 0; width: 100%; max-width: 100%; max-height: 44vh; overflow-y: auto; transform: none; padding: 12px; }
  #inspection-drawer.tour-active { padding-bottom: 46vh; }
  #intro-guide { display: none; }
  #map-prompt { display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 20; align-items: center; gap: 12px; min-height: 76px; padding: 10px 12px; border: 1px solid var(--terra-mist); border-radius: 3px; background: var(--terra-paper); color: var(--terra-navy); box-shadow: 0 8px 24px #08182788; }
  #map-prompt span { flex: 1; font-size: 12px; line-height: 1.35; }
  #map-prompt button { flex: none; min-height: 44px; padding: 0 11px; border: 0; border-radius: 3px; background: var(--terra-blue); color: white; font-size: 12px; font-weight: 700; cursor: pointer; }
  .welcome-choices { grid-template-columns: 1fr; }
  .welcome-choice { min-height: 175px; }
  .welcome-brand { margin-bottom: 35px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .welcome-choice:hover, .drawer-tab-btn:hover { transform: none; }
}

/* Contrast fixes measured against the paper panels and solid action buttons. */
#navigation-sidebar input::placeholder{color:var(--terra-slate);opacity:1}
#search-input{background:#0f172a;color:var(--terra-paper)}
#search-input::placeholder{color:var(--terra-mist);opacity:1}
#guide-close-btn{color:var(--terra-mist)}
#tour-next-btn{background:var(--terra-blue);color:#fff}
#tour-next-btn:hover{background:var(--terra-navy)}
#guide-conclusion .eyebrow{color:var(--terra-blue)}
