:root {
  --bg-main: #0f1011;
  --bg-sidebar: #111315;
  --bg-sidebar-deep: #0d0e0f;
  --paper-primary: #ede7db;
  --paper-secondary: #f1ece1;
  --paper-aged: #e3dcc6;
  --ink-primary: #2a2926;
  --ink-dark: #1f1f1f;
  --ink-muted: #6f6a5d;
  --border-paper: #cabfae;
  --border-dark: rgba(255,255,255,.10);
  --accent-red: #8f3d35;
  --accent-red-soft: #a8473b;
  --status-green: #7e8a3c;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--bg-main);
}

body {
  color: #ece7d9;
  font-family: "IBM Plex Mono", monospace;
  overflow-x: hidden;
}

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

button {
  border: 0;
}

::selection {
  background: var(--accent-red-soft);
  color: var(--paper-secondary);
}

.app {
  min-height: 100vh;
  background-color: var(--bg-main);
  background-image:
    linear-gradient(rgba(232,227,212,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232,227,212,.025) 1px, transparent 1px);
  background-size: 26px 26px;
}

.shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  width: 300px;
  height: 100vh;
  flex: 0 0 300px;
  display: flex;
  flex-direction: column;
  padding: 22px 14px 16px;
  background:
    radial-gradient(circle at 80% 0%, rgba(237,231,219,.045), transparent 30%),
    linear-gradient(180deg, var(--bg-sidebar), var(--bg-sidebar-deep));
  border-right: 1px solid rgba(232,227,212,.12);
  box-shadow: inset -1px 0 rgba(255,255,255,.03);
}

.brand-panel,
.nav-panel,
.console-panel,
.quote-panel,
.status-panel {
  border: 1px solid rgba(232,227,212,.12);
  background: rgba(0,0,0,.16);
  box-shadow: inset 0 0 30px rgba(0,0,0,.22);
}

.brand-panel {
  padding: 17px 14px 18px;
}

.eyebrow,
.label,
.topline,
.nav-heading,
.panel-title,
.paper-label,
.card-title,
.stat-label {
  font-family: "Special Elite", serif;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.eyebrow {
  color: #a9a399;
  font-size: 12px;
}

.brand-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

.brand-wordmark {
  font-family: "Special Elite", serif;
  font-size: 30px;
  line-height: .98;
  letter-spacing: .025em;
  color: #d9d4c8;
}

.globe-seal {
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
  border-radius: 50%;
  opacity: .8;
  filter: grayscale(1) contrast(1.08);
}

.tagline {
  margin: 14px 0 0;
  color: #aaa397;
  font-size: 12px;
  line-height: 1.65;
}

.nav-panel {
  margin-top: 10px;
  padding: 14px 8px 10px;
}

.nav-heading {
  margin: 0 8px 10px;
  color: #8f897c;
  font-size: 11px;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 37px;
  padding: 8px 10px;
  border-left: 2px solid transparent;
  background: transparent;
  color: #aaa397;
  cursor: pointer;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .015em;
  text-align: left;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(232,227,212,.08);
  border-left-color: var(--accent-red-soft);
  color: #ece7d9;
}

.nav-icon {
  width: 21px;
  color: #bfb8aa;
  font-size: 17px;
  line-height: 1;
  text-align: center;
}

.console-panel {
  margin-top: 10px;
  padding: 12px 14px 13px;
}

.console-panel .panel-title {
  text-align: center;
  font-size: 10px;
}

.console-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 12px;
  margin-top: 10px;
  color: #aaa397;
  font-size: 10px;
  line-height: 1.35;
}

.console-row strong {
  display: block;
  color: #d9d4c8;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
}

.quote-panel {
  margin-top: 12px;
  padding: 16px 18px;
  color: #b9b2a7;
  font-size: 12px;
  line-height: 1.65;
}

.status-panel {
  margin-top: auto;
  padding: 14px 16px;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--status-green);
  box-shadow: 0 0 9px rgba(126,138,60,.9);
}

.status-line {
  color: #b9b2a7;
  font-size: 11px;
}

.pulse-line {
  height: 40px;
  margin-top: 10px;
  background:
    linear-gradient(90deg, transparent 0 15%, rgba(126,138,60,.95) 16% 17%, transparent 18% 38%, rgba(126,138,60,.7) 39% 40%, transparent 41% 63%, rgba(126,138,60,.85) 64% 66%, transparent 67% 100%),
    linear-gradient(rgba(126,138,60,.35), rgba(126,138,60,.35)) center/100% 1px no-repeat;
  opacity: .75;
}

.main {
  flex: 1;
  min-width: 0;
}

.page {
  min-height: 100vh;
  padding: 24px 28px 34px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 38px;
  margin-bottom: 10px;
  padding: 0 16px;
  border: 1px solid rgba(232,227,212,.1);
  background: rgba(0,0,0,.25);
  color: #d9d4c8;
  font-family: "Special Elite", serif;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.clickable {
  cursor: pointer;
}

.clickable:hover {
  color: var(--paper-secondary);
}

.paper-surface {
  position: relative;
  overflow: hidden;
  background-color: var(--paper-primary);
  background-image:
    radial-gradient(circle at 4% 5%, rgba(77,58,34,.18), transparent 13%),
    radial-gradient(circle at 96% 4%, rgba(69,50,28,.15), transparent 12%),
    radial-gradient(circle at 98% 98%, rgba(73,52,29,.22), transparent 15%),
    radial-gradient(circle at 2% 100%, rgba(82,58,32,.20), transparent 15%),
    linear-gradient(90deg, rgba(45,34,22,.25), transparent 18px, transparent calc(100% - 18px), rgba(45,34,22,.24)),
    linear-gradient(180deg, rgba(45,34,22,.24), transparent 18px, transparent calc(100% - 18px), rgba(45,34,22,.28)),
    linear-gradient(90deg, rgba(133,107,70,.10) 0 1px, transparent 1px 5px),
    linear-gradient(180deg, rgba(133,107,70,.08) 0 1px, transparent 1px 5px);
  color: var(--ink-primary);
  border: 1px solid #b5aa98;
  border-radius: 12px;
  box-shadow:
    inset 0 0 0 1px rgba(80,62,38,.24),
    inset 0 0 0 3px rgba(255,255,255,.12),
    inset 0 0 28px rgba(69,51,29,.20),
    inset 0 0 76px rgba(70,55,35,.23),
    inset 0 0 15px rgba(50,38,22,.20),
    0 2px 6px rgba(0,0,0,.15),
    0 15px 40px rgba(0,0,0,.12);
}

.paper-surface::before,
.paper-surface::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.paper-surface::before {
  background:
    linear-gradient(rgba(60,60,60,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(60,60,60,.03) 1px, transparent 1px),
    url("./public/textures/paper-grain.png") center/cover no-repeat,
    radial-gradient(circle at 0% 0%, rgba(80,62,38,.13), transparent 12%),
    radial-gradient(circle at 100% 0%, rgba(80,62,38,.11), transparent 12%),
    radial-gradient(circle at 100% 100%, rgba(80,62,38,.13), transparent 12%),
    radial-gradient(circle at 0% 100%, rgba(80,62,38,.15), transparent 14%);
  background-size: 28px 28px, 28px 28px, cover, auto, auto, auto, auto;
  opacity: .58;
  mix-blend-mode: normal;
}

.paper-surface::after {
  background:
    url("./public/textures/paper-edge-wear.png") center/100% 100% no-repeat,
    linear-gradient(90deg, rgba(65,48,27,.16), rgba(65,48,27,0) 12px, rgba(65,48,27,0) calc(100% - 12px), rgba(65,48,27,.14)),
    linear-gradient(180deg, rgba(65,48,27,.14), rgba(65,48,27,0) 13px, rgba(65,48,27,0) calc(100% - 13px), rgba(65,48,27,.18)),
    repeating-linear-gradient(90deg, rgba(48,35,19,.08) 0 1px, transparent 1px 7px) top left / 100% 16px no-repeat,
    repeating-linear-gradient(90deg, rgba(48,35,19,.08) 0 1px, transparent 1px 9px) bottom left / 100% 20px no-repeat,
    repeating-linear-gradient(0deg, rgba(48,35,19,.07) 0 1px, transparent 1px 8px) top left / 18px 100% no-repeat,
    repeating-linear-gradient(0deg, rgba(48,35,19,.07) 0 1px, transparent 1px 8px) top right / 18px 100% no-repeat,
    radial-gradient(ellipse at 50% 0%, rgba(53,39,21,.12), transparent 34%),
    radial-gradient(ellipse at 50% 100%, rgba(53,39,21,.14), transparent 38%),
    radial-gradient(circle at 92% 91%, rgba(101,73,40,.11), transparent 17%),
    url("./public/textures/coffee-stains.png") center/cover no-repeat,
    url("./public/textures/smudges.png") center/cover no-repeat;
  opacity: .22;
  mix-blend-mode: multiply;
}

.paper-content {
  position: relative;
  z-index: 1;
}

.home-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 28px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 48% 10%, rgba(232,227,212,.08), transparent 24%),
    radial-gradient(circle at 85% 70%, rgba(168,71,59,.08), transparent 26%),
    #121210;
}

.home-dossier {
  width: min(1110px, 100%);
  min-height: 660px;
  padding: 38px 44px;
  transform: rotate(-.08deg);
}

.home-rule {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(60,55,45,.25);
  color: var(--ink-muted);
  font-size: 10px;
  letter-spacing: .18em;
}

.stamp {
  position: absolute;
  top: 75px;
  right: 44px;
  z-index: 2;
  padding: 7px 14px;
  border: 2px solid var(--accent-red-soft);
  color: var(--accent-red-soft);
  font-family: "Special Elite", serif;
  font-size: 14px;
  letter-spacing: .18em;
  transform: rotate(-8deg);
  opacity: .82;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 44px;
  margin-top: 42px;
  align-items: start;
}

.home-kicker {
  color: #7a7567;
  font-size: 11px;
  letter-spacing: .28em;
}

.home-title {
  margin: 10px 0 0;
  color: #23211d;
  font-family: "Special Elite", serif;
  font-size: clamp(48px, 6vw, 76px);
  line-height: .95;
  letter-spacing: .035em;
}

.home-title-rule {
  width: 136px;
  height: 2px;
  margin: 22px 0 28px;
  background: #23211d;
}

.mission-label {
  color: var(--accent-red-soft);
  font-size: 11px;
  letter-spacing: .2em;
}

.mission-copy {
  max-width: 610px;
  margin: 16px 0 0;
  color: #3a382f;
  font-size: 14px;
  line-height: 2;
}

.mission-statement {
  margin-top: 20px;
  color: #56534a;
  font-family: "Special Elite", serif;
  font-size: 18px;
  line-height: 1.55;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-top: 34px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid rgba(60,55,45,.35);
  background: transparent;
  color: #332f29;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
}

.action-btn.primary {
  border-color: #23211d;
  background: #23211d;
  color: #ede7db;
}

.action-btn:hover {
  border-color: var(--accent-red-soft);
}

.planet-card {
  position: relative;
  padding: 16px;
  background: #161512;
  box-shadow: 0 16px 36px rgba(0,0,0,.42);
}

.tape {
  position: absolute;
  left: -13px;
  top: -9px;
  width: 58px;
  height: 22px;
  background: rgba(214,206,184,.52);
  transform: rotate(-24deg);
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.planet-orb {
  position: relative;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #0d0d0b;
}

.planet-sphere {
  width: 246px;
  height: 246px;
  border-radius: 50%;
  background: url('./public/images/globe-eithirea.png') center/cover no-repeat;
  box-shadow: 0 0 60px rgba(150,160,168,.12);
}

.map-pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-red-soft);
  box-shadow: 0 0 0 5px rgba(168,71,59,.25), 0 0 14px rgba(168,71,59,.8);
  animation: blink 2.4s infinite;
}

.plate-caption {
  display: flex;
  justify-content: space-between;
  margin-top: 11px;
  color: #9c988d;
  font-size: 10px;
  letter-spacing: .14em;
}

.footer-rule {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 38px;
  padding-top: 14px;
  border-top: 1px solid rgba(60,55,45,.25);
  color: var(--ink-muted);
  font-size: 10px;
  letter-spacing: .16em;
}

.database-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 18px 0 22px;
}

.page-title {
  margin: 0;
  color: #f1ece0;
  font-family: "Special Elite", serif;
  font-size: 36px;
  letter-spacing: .04em;
  line-height: 1.05;
  text-transform: uppercase;
}

.page-subtitle {
  margin-top: 10px;
  color: #8c887d;
  font-size: 11.5px;
  line-height: 1.55;
}

.database-table {
  border: 1px solid rgba(232,227,212,.12);
  background: rgba(0,0,0,.12);
}

.database-row {
  display: grid;
  grid-template-columns: 110px minmax(170px, 1.4fr) 120px minmax(160px, 1fr) 40px;
  gap: 18px;
  align-items: center;
  min-height: 76px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(232,227,212,.07);
}

.database-row.header {
  min-height: 45px;
  background: rgba(232,227,212,.04);
  color: #76736a;
  font-family: "Special Elite", serif;
  font-size: 10px;
  letter-spacing: .18em;
}

.database-row.record {
  cursor: pointer;
}

.database-row.record:hover {
  background: rgba(232,227,212,.055);
}

.thumb-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.thumb {
  width: 48px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--paper-primary);
  color: rgba(44,42,37,.42);
  font-family: "Special Elite", serif;
  font-size: 20px;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: multiply;
  filter: grayscale(1) contrast(1.08);
}

.specimen-title {
  color: #ece7d9;
  font-family: "IBM Plex Mono", monospace;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0;
}

.muted {
  color: #9c988d;
}

.threat-high {
  color: #c97a6d;
}

.specimen-page {
  padding-top: 20px;
}

.specimen-dossier {
  border-color: #9f927f;
  border-radius: 18px 20px 17px 19px;
  transform: rotate(.08deg);
  box-shadow:
    inset 0 0 0 1px rgba(61,45,24,.28),
    inset 0 0 0 4px rgba(255,255,255,.10),
    inset 0 0 36px rgba(54,39,20,.26),
    inset 0 0 92px rgba(64,48,26,.28),
    0 2px 6px rgba(0,0,0,.15),
    0 15px 40px rgba(0,0,0,.12);
}

.specimen-dossier::before {
  opacity: .64;
}

.specimen-dossier::after {
  opacity: .27;
}

.specimen-dossier-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  gap: 26px;
  min-height: calc(100vh - 166px);
  padding: 30px 32px 28px;
}

.metadata-column {
  padding-right: 22px;
  border-right: 1px solid rgba(60,55,45,.22);
}

.paper-label {
  color: #7a7567;
  font-size: 11px;
}

.metadata-column .paper-label {
  font-size: 12px;
  letter-spacing: .055em;
}

.metadata-column .paper-label::after {
  content: ":";
}

.metadata-identity .paper-label:first-child::after {
  content: "";
}

.specimen-number {
  margin-top: 8px;
  color: #171715;
  font-family: "IBM Plex Mono", monospace;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.08;
  white-space: nowrap;
}

.creature-name {
  margin-top: 8px;
  color: #23211d;
  font-family: "Caveat", cursive;
  font-size: clamp(1.95rem, 2.15vw, 2.45rem);
  font-weight: 600;
  letter-spacing: .025em;
  line-height: 1.05;
  text-transform: uppercase;
}

.metadata-divider {
  height: 1px;
  margin: 18px 0;
  background: rgba(60,55,45,.22);
}

.metadata-group {
  display: grid;
  gap: 15px;
}

.metadata-value {
  margin-top: 5px;
  color: #23211d;
  font-size: 13.5px;
  line-height: 1.5;
}

.metadata-column .metadata-value {
  margin-top: 6px;
  font-family: "Caveat", cursive;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .015em;
  line-height: 1.22;
}

.metadata-column .metric-grid .metadata-value {
  font-size: 17px;
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.threat-pips {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 10px;
}

.threat-pip {
  width: 18px;
  height: 20px;
  flex: 0 0 18px;
  display: inline-block;
}

.threat-pip.high {
  /* Tint filled skulls red for high threat levels (4+) */
  filter: brightness(0) saturate(100%) invert(20%) sepia(80%) saturate(2000%) hue-rotate(350deg) brightness(0.7);
}

.specimen-stage {
  display: grid;
  grid-template-rows: minmax(360px, 1fr) auto;
  gap: 24px;
  min-width: 0;
}

.drawing-plate {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 380px;
  padding: 10px;
}

.specimen-image {
  display: block;
  max-width: 100%;
  max-height: min(620px, 58vh);
  object-fit: contain;
  mix-blend-mode: darken;
  filter: grayscale(.2) contrast(1.14);
}

.missing-sketch {
  position: relative;
  width: min(560px, 100%);
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(60,55,45,.24);
  background:
    repeating-linear-gradient(45deg, rgba(60,55,45,.05) 0, rgba(60,55,45,.05) 1px, transparent 1px, transparent 10px);
}

.missing-sketch span:first-child {
  color: rgba(44,42,37,.13);
  font-family: "Special Elite", serif;
  font-size: 150px;
  font-weight: 400;
}

.missing-sketch span:last-child {
  position: absolute;
  right: 14px;
  bottom: 12px;
  color: #8f897c;
  font-family: "Special Elite", serif;
  font-size: 10px;
  letter-spacing: .08em;
}

.specimen-info-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.specimen-info-card {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  padding: 16px 18px;
  border: 1px solid rgba(60,55,45,.32);
  background: rgba(255,253,247,.40);
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
}

.specimen-info-card:nth-child(1) {
  transform: rotate(.12deg);
}

.specimen-info-card:nth-child(3) {
  transform: rotate(-.12deg);
}

.card-title {
  margin-bottom: 12px;
  color: #23211d;
  font-size: 12px;
}

.card-body {
  color: #3a382f;
  font-size: 12px;
  line-height: 1.7;
}

.habitat-frame {
  position: relative;
  flex: 1;
  min-height: 112px;
  overflow: hidden;
  border: 1px solid rgba(40,32,18,.42);
  background: var(--paper-aged);
}

.habitat-frame img {
  width: 100%;
  height: 118px;
  object-fit: cover;
  filter: grayscale(.18) contrast(1.05);
  mix-blend-mode: multiply;
  opacity: .9;
}

.habitat-marker {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-red-soft);
  box-shadow: 0 0 0 4px rgba(168,71,59,.25), 0 0 10px rgba(168,71,59,.65);
}

.region-caption {
  margin-top: 10px;
  color: #56534a;
  font-size: 9.5px;
  line-height: 1.6;
}

.enemy-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.enemy-list li {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #23211d;
  font-size: 12px;
}

.enemy-dot {
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: var(--accent-red-soft);
}

.specimen-stat-strip {
  display: grid;
  grid-template-columns: 1fr 1fr 220px;
  margin-top: 14px;
  background: #1a1916;
  color: #cdc8ba;
  box-shadow: 0 8px 24px rgba(0,0,0,.40);
}

.stat-cell {
  min-height: 88px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  border-right: 1px solid rgba(232,227,212,.10);
}

.stat-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid rgba(232,227,212,.22);
  color: #c97a6d;
  font-size: 22px;
}

.stat-label {
  color: #8c887d;
  font-size: 11px;
}

.stat-value {
  margin-top: 4px;
  color: #ece7d9;
  font-size: 20px;
  font-weight: 500;
}

.stat-note {
  margin-top: 3px;
  color: #8c887d;
  font-size: 9.5px;
}

.barcode {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  padding: 18px 24px;
  color: #6f6c63;
}

.barcode-lines {
  width: 142px;
  height: 28px;
  background:
    repeating-linear-gradient(90deg, #cdc8ba 0 2px, transparent 2px 5px, #cdc8ba 5px 6px, transparent 6px 11px);
  opacity: .65;
}

.pager-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 17px;
  color: #9c988d;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.pager-row button {
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.pager-row button:hover {
  color: #ece7d9;
}

.survey-map {
  padding: 18px;
  transform: rotate(.05deg);
}

.survey-map img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  filter: contrast(1.05) saturate(.82);
}

/* Map container and text-only biosphere hotspots */
.map-container {
  position: relative;
}

.map-text-link {
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 50%);
  width: var(--w, 8%);
  height: var(--h, 4%);
  z-index: 2;
  display: block;
  border-radius: 2px;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  border: none;
}

.map-text-link:focus-visible {
  box-shadow: 0 0 0 2px rgba(168,71,59,.45);
  outline: none;
}

/* Nav flyout menu */
.nav-group {
  position: relative;
}

.flyout-arrow {
  margin-left: auto;
  font-size: 10px;
  opacity: .6;
  transition: transform .2s ease;
}

.nav-group:hover .flyout-arrow {
  transform: rotate(180deg);
}

.nav-flyout {
  display: none;
  flex-direction: column;
  padding: 2px 0 4px 32px;
}

.nav-group:hover .nav-flyout,
.nav-group:focus-within .nav-flyout {
  display: flex;
}

.nav-flyout-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: transparent;
  color: #8f897c;
  cursor: pointer;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 400;
  text-align: left;
  border: none;
  transition: color .16s ease;
}

.nav-flyout-item:hover,
.nav-flyout-item.active {
  color: #ece7d9;
}

.nav-flyout-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-red-soft);
  opacity: .5;
}

.nav-flyout-item:hover .nav-flyout-dot,
.nav-flyout-item.active .nav-flyout-dot {
  opacity: 1;
}

/* Biosphere page */
.biosphere-panel {
  border: 1px solid rgba(232,227,212,.13);
  background: #161513;
  max-width: 1020px;
  padding: 34px 38px;
}

.biosphere-image-wrap {
  margin: 0 0 24px;
}

.biosphere-image {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(232,227,212,.08);
}

.biosphere-description {
  margin-top: 16px;
}

.biosphere-description .paper-label {
  color: #23211d;
}

.biosphere-description p {
  color: #3a382f;
  font-size: 14px;
  line-height: 1.7;
  margin-top: 8px;
}

.about-panel {
  border: 1px solid rgba(232,227,212,.13);
  background: #161513;
}

.about-panel {
  max-width: 1020px;
  padding: 34px 38px;
}

.about-grid {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 38px;
}

.about-name {
  color: #23211d;
  font-family: "Special Elite", serif;
  font-size: 43px;
  line-height: 1;
}

.about-panel.paper-surface {
  background-color: var(--paper-primary);
}

.about-copy {
  color: #3a382f;
  font-size: 14px;
  line-height: 1.85;
}

.mission-block {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(60,55,45,.22);
  color: #23211d;
  font-family: "Special Elite", serif;
  font-size: 22px;
  line-height: 1.45;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: .32;
  }
}

@media (max-width: 1040px) {
  .shell {
    display: block;
  }

  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 14px;
  }

  .brand-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
  }

  .nav-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .console-panel,
  .quote-panel,
  .status-panel {
    display: none;
  }

  .specimen-dossier-inner,
  .home-grid,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .specimen-dossier-inner {
    display: flex;
    flex-direction: column;
  }

  .metadata-column {
    display: contents;
    border-right: 0;
    padding-right: 0;
  }

  .metadata-identity {
    order: 1;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(60,55,45,.22);
  }

  .specimen-stage {
    display: contents;
    order: 2;
  }

  .drawing-plate {
    order: 2;
  }

  .mobile-metadata-later {
    order: 3;
    padding-top: 18px;
    border-top: 1px solid rgba(60,55,45,.22);
  }

  .specimen-info-row {
    order: 4;
  }

  .specimen-info-row,
  .specimen-stat-strip {
    grid-template-columns: 1fr;
  }

  .stat-cell {
    border-right: 0;
    border-bottom: 1px solid rgba(232,227,212,.10);
  }
}

@media (max-width: 720px) {
  .page,
  .home-page {
    padding: 16px;
  }

  .home-dossier {
    padding: 28px 24px;
  }

  .home-rule,
  .footer-rule,
  .topbar,
  .database-header {
    align-items: flex-start;
    flex-direction: column;
    height: auto;
    gap: 8px;
    padding: 12px;
  }

  .brand-panel {
    display: block;
  }

  .nav-list {
    grid-template-columns: 1fr 1fr;
  }

  .nav-item {
    font-size: 11px;
  }

  .database-row,
  .database-row.header {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .database-row.header {
    display: none;
  }

  .specimen-dossier-inner {
    padding: 24px 20px;
  }

  .drawing-plate,
  .missing-sketch {
    min-height: 300px;
  }
}
