/* Fren Pepe. Pond palette taken from the sprite itself: lily green, Pepe's shirt blue, lip red, coin gold. */
:root {
  --ink: #17302a;
  --ink-soft: #3d5a50;
  --moss: #2f5d3f;
  --moss-hi: #4b8a58;
  --lily: #6daf4b;
  --paper: #eef3e2;
  --paper-2: #dde8cc;
  --gold: #f0b23f;
  --gold-deep: #c2861f;
  --lip: #b85b41;
  --shirt: #3c6cc6;
  --up: #2e8a4a;
  --down: #b8483a;
  --shadow: rgba(10, 30, 22, 0.32);
  --px: 4px;
  --display: "Jersey 10", ui-monospace, monospace;
  --body: "Atkinson Hyperlegible", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e2ecd6; --ink-soft: #a9bfa6; --moss: #1c3a29; --moss-hi: #2f5d3f; --paper: #14231d; --paper-2: #1d3229;
    --up: #7fd38f; --down: #ff8f7a; --shadow: rgba(0, 0, 0, 0.5); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #e2ecd6; --ink-soft: #a9bfa6; --moss: #1c3a29; --moss-hi: #2f5d3f; --paper: #14231d; --paper-2: #1d3229;
  --up: #7fd38f; --down: #ff8f7a; --shadow: rgba(0, 0, 0, 0.5); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font: 400 1rem/1.55 var(--body);
  color: var(--ink);
  background: #26396a;
  min-height: 100vh;
  overflow-x: clip;
}
#world {
  position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1;
  image-rendering: pixelated; object-fit: cover;
}
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--lily); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.05; margin: 0; letter-spacing: 0.02em; }
h1 { font-size: clamp(2.2rem, 1.5rem + 2.2vw, 3rem); }
h2 { font-size: 2rem; }
h3 { font-size: 1.45rem; margin: 1.6rem 0 0.6rem; }
p { margin: 0 0 0.8rem; max-width: 64ch; }
code { font-family: var(--display); font-size: 1.1em; word-break: break-all; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------ pixel frame
   A notched box: four flat shadows draw a border with empty corner pixels, the way sprites draw boxes. */
.pixel-box, .panel, .device, .btn, .bubble, .ticker, .toast, .lookup input, .seat, .gameover {
  box-shadow:
    calc(var(--px) * -1) 0 0 0 var(--ink), var(--px) 0 0 0 var(--ink),
    0 calc(var(--px) * -1) 0 0 var(--ink), 0 var(--px) 0 0 var(--ink);
}

/* ------------------------------------------------------------ top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 1.25rem;
  padding: 0.7rem clamp(1rem, 3vw, 2rem);
  background: color-mix(in srgb, var(--moss) 92%, transparent);
  color: #eef3e2;
  border-bottom: var(--px) solid #10241a;
  backdrop-filter: blur(4px);
}
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; font: 400 1.62rem var(--display); }
.brand img { image-rendering: pixelated; width: 36px; height: 36px; }
.nav { display: flex; gap: 0.35rem; margin-left: auto; font-family: var(--display); font-size: 1.3rem; }
.nav a { text-decoration: none; padding: 0.2rem 0.6rem; color: #cfe6bd; position: relative; }
.nav a:hover { color: #fff; }
.nav a[aria-current="page"] { color: #fff; background: rgba(0, 0, 0, 0.22); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0.6rem; right: 0.6rem; bottom: -0.78rem; height: var(--px); background: var(--gold); }
.follow {
  display: inline-flex; align-items: center; gap: 0.45rem; text-decoration: none;
  font: 400 1.25rem/1 var(--display); color: #10241a; background: #eef3e2; padding: 0.4rem 0.7rem; margin: var(--px);
  box-shadow: -4px 0 0 0 #0a1a12, 4px 0 0 0 #0a1a12, 0 -4px 0 0 #0a1a12, 0 4px 0 0 #0a1a12, inset 0 -3px 0 0 #b9cba3;
}
.follow:hover { background: #fff; }
.follow .ico { width: 15px; height: 15px; }
.ico { width: 1em; height: 1em; fill: currentColor; shape-rendering: crispEdges; flex: none; }
.ticker {
  display: flex; gap: 0.45rem; align-items: baseline; text-decoration: none;
  font-family: var(--display); font-size: 1.25rem;
  background: #10241a; color: #eef3e2; padding: 0.25rem 0.7rem; margin: var(--px);
  --ink: #0a1a12;
}
.ticker-sym { color: var(--gold); }
.chg { font-family: var(--display); }
.chg.up { color: var(--up); }
.chg.down { color: var(--down); }
.ticker .chg.up { color: #8fe39d; }
.ticker .chg.down { color: #ff9a86; }

/* ------------------------------------------------------------ layout */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 600px) minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.75rem);
  align-items: start;
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(1.25rem, 3vw, 2.5rem) clamp(1rem, 3vw, 2rem) 3rem;
}
.column { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.25rem; min-width: 0; }
.column > * { min-width: 0; }
@media (max-width: 1000px) {
  .layout { grid-template-columns: minmax(0, 1fr); max-width: 680px; }
}

/* ------------------------------------------------------------ the device */
.device {
  position: sticky; top: 92px;
  margin: var(--px);
  padding: 1rem 1.1rem 1.1rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 30%),
    var(--moss);
  color: #eef3e2;
  --ink: #0d1f16;
  box-shadow:
    calc(var(--px) * -1) 0 0 0 var(--ink), var(--px) 0 0 0 var(--ink),
    0 calc(var(--px) * -1) 0 0 var(--ink), 0 var(--px) 0 0 var(--ink),
    calc(var(--px) * 3) calc(var(--px) * 3) 0 0 var(--shadow);
}
@media (max-width: 1000px) { .device { position: relative; top: 0; } }
.device-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 0.75rem; }
.pet-name, .pet-name-input {
  font: 400 2.04rem/1.1 var(--display); color: #fff; background: none; border: 0; padding: 0; cursor: text; text-align: left;
}
.pet-name:hover { text-decoration: underline dotted var(--gold); text-underline-offset: 5px; }
.pet-name-input { background: rgba(0, 0, 0, 0.25); width: 12ch; padding: 0 0.3rem; }
.pet-meta { margin: 0.15rem 0 0; font-family: var(--display); color: #bfe0a8; font-size: 1.2rem; }
.xp { display: grid; justify-items: end; gap: 0.25rem; font-family: var(--display); font-size: 1.1rem; color: #bfe0a8; }
.xp-bar { width: 132px; height: 12px; background: #10241a; box-shadow: 0 0 0 2px #0d1f16; display: block; }
.xp-bar span { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--gold) 0 6px, var(--gold-deep) 6px 8px); transition: width 0.4s steps(8); }

.screen {
  position: relative;
  background: #0d1f16;
  padding: 10px;
  box-shadow: inset 0 0 0 4px #0d1f16, inset 6px 6px 0 4px rgba(0, 0, 0, 0.35);
}
.screen canvas { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; image-rendering: pixelated; cursor: pointer; touch-action: none; }

.bubble {
  position: absolute; left: 50%; top: 16px; transform: translateX(-50%);
  width: max-content; max-width: min(86%, 440px);
  margin: 0; padding: 0.5rem 0.8rem;
  background: #fbfdf4; color: #17302a; --ink: #17302a;
  font: 400 1.2rem/1.3 var(--display); text-align: center;
  opacity: 0; transition: opacity 0.2s steps(3);
  pointer-events: none;
}
.bubble.show { opacity: 1; }
.bubble::after {
  content: ""; position: absolute; left: 50%; bottom: -14px; width: 8px; height: 8px; background: #fbfdf4;
  box-shadow: 0 0 0 0 #17302a, -4px 0 0 0 #17302a, 4px 0 0 0 #17302a, 0 4px 0 0 #17302a, 4px 4px 0 0 #17302a;
  transform: translateX(-50%);
}
.hud {
  position: absolute; inset: 18px 22px auto; display: flex; justify-content: space-between;
  font: 400 1.5rem var(--display); color: #fff; text-shadow: 2px 2px 0 #0d1f16; pointer-events: none;
}
.gameover {
  position: absolute; inset: 22% 14%; display: grid; place-content: center; justify-items: center; gap: 0.3rem;
  background: #fbfdf4; color: #17302a; --ink: #17302a; text-align: center; padding: 1rem;
}
.gameover p { margin: 0; }
.gameover-title { font: 400 1.68rem var(--display); }
.gameover .btn { margin-top: 0.6rem; }

.weather { display: flex; align-items: center; gap: 0.5rem; margin: 0.7rem 0 0.9rem; font-size: 0.95rem; color: #d6ebc6; max-width: none; }
.weather-icon { width: 20px; height: 20px; flex: none; image-rendering: pixelated; background-size: contain; }

.meters { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem 1.4rem; }
.meter { display: grid; grid-template-columns: 5.6rem 1fr 2.2rem; align-items: center; gap: 0.6rem; font-family: var(--display); }
.meter-label { font-size: 1.18rem; color: #eef3e2; white-space: nowrap; }
.meter-val { text-align: right; color: #bfe0a8; font-size: 1.15rem; }
.meter-bar { height: 14px; background: #10241a; box-shadow: 0 0 0 2px #0d1f16; position: relative; }
.meter-bar i {
  position: absolute; inset: 0 auto 0 0; width: 50%;
  background: repeating-linear-gradient(90deg, var(--c, var(--lily)) 0 calc(10% - 2px), transparent calc(10% - 2px) 10%);
  transition: width 0.5s steps(10);
}
.meter[data-meter="belly"] { --c: #f0b23f; }
.meter[data-meter="mood"] { --c: #f2a6c0; }
.meter[data-meter="energy"] { --c: #8fd0f0; }
.meter[data-meter="sync"] { --c: #9ad472; }
.meter.low .meter-bar i { --c: #ff7a6a; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) { .meter.low .meter-bar i { animation: none; } }
@media (max-width: 520px) {
  .meters { grid-template-columns: 1fr; }
  .meter { grid-template-columns: 6.5rem 1fr 2.2rem; }
}

.actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.9rem; margin-top: 1.15rem; padding: var(--px); }
#game-controls { grid-template-columns: 1fr 2fr 1fr; }
.actions[hidden] { display: none; }
.bond { margin: 1rem 0 0; font-size: 0.95rem; color: #d6ebc6; max-width: none; }
.bond a { color: #fff; }
.bond b { color: var(--gold); font-weight: 700; }

/* ------------------------------------------------------------ buttons */
.btn {
  --ink: #17302a;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  font: 400 1.26rem/1 var(--display);
  color: #17302a; background: #eef3e2;
  border: 0; padding: 0.7rem 0.9rem; cursor: pointer; text-decoration: none;
  position: relative; top: 0;
  box-shadow:
    -4px 0 0 0 var(--ink), 4px 0 0 0 var(--ink), 0 -4px 0 0 var(--ink), 0 4px 0 0 var(--ink),
    inset 0 -4px 0 0 #b9cba3;
  transition: none;
}
.btn:hover { background: #fff; }
.btn:active, .btn.pressed { top: 2px; box-shadow: -4px 0 0 0 var(--ink), 4px 0 0 0 var(--ink), 0 -4px 0 0 var(--ink), 0 4px 0 0 var(--ink), inset 0 2px 0 0 #b9cba3; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; top: 0; }
.btn kbd { font: inherit; font-size: 0.9rem; color: #6c8466; }
.btn-gold { background: var(--gold); box-shadow: -4px 0 0 0 var(--ink), 4px 0 0 0 var(--ink), 0 -4px 0 0 var(--ink), 0 4px 0 0 var(--ink), inset 0 -4px 0 0 var(--gold-deep); }
.btn-gold:hover { background: #ffc85a; }
.btn-gold kbd { color: #7a5410; }
.btn-ghost { background: var(--paper-2); color: inherit; box-shadow: -4px 0 0 0 currentColor, 4px 0 0 0 currentColor, 0 -4px 0 0 currentColor, 0 4px 0 0 currentColor; }
.btn-ghost:hover { background: var(--paper); }
@media (max-width: 520px) {
  .actions { grid-template-columns: 1fr 1fr; }
  .btn kbd { display: none; }
}

/* ------------------------------------------------------------ panels */
.panel {
  margin: var(--px);
  background: var(--paper);
  padding: clamp(1.1rem, 2.5vw, 1.75rem);
  box-shadow:
    calc(var(--px) * -1) 0 0 0 var(--ink), var(--px) 0 0 0 var(--ink),
    0 calc(var(--px) * -1) 0 0 var(--ink), 0 var(--px) 0 0 var(--ink),
    calc(var(--px) * 3) calc(var(--px) * 3) 0 0 var(--shadow);
}
.panel > p { color: var(--ink); }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.fresh { margin: 0; font-family: var(--display); color: var(--ink-soft); font-size: 1.15rem; }
.fresh::before { content: ""; display: inline-block; width: 8px; height: 8px; background: var(--lily); margin-right: 0.45rem; vertical-align: 1px; animation: blink 2s steps(2) infinite; }
.fresh.stale::before { background: var(--down); animation: none; }
.intro h1 { margin-bottom: 0.9rem; }
.intro .hint { color: var(--ink-soft); margin: 0; }
.note { color: var(--ink-soft); font-size: 0.9rem; margin: 0.6rem 0 0; }

/* vitals: four live numbers in one strip, separated by pixel rules */
.vitals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; background: var(--paper-2); }
.vitals > div { padding: 0.85rem 1rem; border-left: 3px dotted color-mix(in srgb, var(--ink) 25%, transparent); min-width: 0; }
.vitals > div:first-child { border-left: 0; }
.vitals dt { font-size: 0.88rem; color: var(--ink-soft); line-height: 1.25; }
.vitals dd { margin: 0.25rem 0 0; font: 400 2.28rem/1 var(--display); }
.vitals dd.sub { font: 400 0.82rem/1.3 var(--body); color: var(--ink-soft); margin-top: 0.3rem; }
.vitals-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.panel { container-type: inline-size; }
@container (max-width: 640px) {
  .vitals { grid-template-columns: 1fr 1fr; }
  .vitals > div:nth-child(3) { border-left: 0; }
  .vitals > div:nth-child(n + 3) { border-top: 3px dotted color-mix(in srgb, var(--ink) 25%, transparent); }
  .vitals-3 { grid-template-columns: 1fr 1fr 1fr; }
  .vitals-3 > div:nth-child(3) { border-left: 3px dotted color-mix(in srgb, var(--ink) 25%, transparent); }
  .vitals-3 > div:nth-child(n + 3) { border-top: 0; }
  .vitals-3 dd { font-size: 1.35rem; }
}

/* 24h chart */
.chart { margin: 1.4rem 0 0; }
.chart figcaption { font-family: var(--display); font-size: 1.3rem; margin-bottom: 0.6rem; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; border-bottom: 3px solid var(--ink); }
.bars button {
  flex: 1; min-width: 0; height: var(--h); min-height: 3px; padding: 0; border: 0; cursor: default;
  background: repeating-linear-gradient(0deg, var(--moss-hi) 0 4px, var(--lily) 4px 8px);
  position: relative;
}
.bars button.peak { background: repeating-linear-gradient(0deg, var(--gold-deep) 0 4px, var(--gold) 4px 8px); }
.bars button:hover, .bars button:focus-visible { background: var(--shirt); outline: none; }
.bars { margin-top: 1.4rem; }
/* a gap across the top of a bar says "this one is taller than the chart"; its real value sits above it */
.bars button.broken::after { content: ""; position: absolute; left: -2px; right: -2px; top: 10px; height: 4px; background: var(--paper); }
.bars button .val {
  position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%);
  font: 400 0.98rem/1 var(--display); color: var(--ink); white-space: nowrap;
}
.bars button .tip {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--paper); font: 400 1.02rem/1.2 var(--display); padding: 0.3rem 0.5rem; white-space: nowrap;
  display: none; pointer-events: none; z-index: 2;
}
.bars button:hover .tip, .bars button:focus-visible .tip { display: block; }
.bars button:first-child .tip { left: 0; transform: none; }
.bars button:last-child .tip { left: auto; right: 0; transform: none; }
.bars-axis { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--ink-soft); margin-top: 0.3rem; }

/* live event feed: a small LCD */
.feed h3 { margin-top: 1.6rem; }
.events {
  list-style: none; margin: 0; padding: 0.6rem 0.8rem;
  background: #10241a; color: #bfe8a6; font: 400 1.14rem/1.45 var(--display);
  height: 15.5rem; overflow: auto; scrollbar-color: #2f5d3f #10241a;
  box-shadow: inset 0 0 0 3px #0a1a12;
}
.events li { display: grid; grid-template-columns: 3.3rem minmax(0, 1fr); gap: 0.6rem; padding: 0.15rem 0; }
.events li.fresh-in { animation: arrive 1.2s steps(4); }
@keyframes arrive { from { background: #2f5d3f; } }
@media (prefers-reduced-motion: reduce) { .events li.fresh-in { animation: none; } }
.events time { color: #6fa35a; }
.events .who { color: #ffe08a; }
.events .ok { color: #9ef0b0; }
.events .bad { color: #ff9a86; }
.events .obj { color: #8fb87e; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.events .empty { display: block; color: #6fa35a; }

.totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem 1.25rem; margin: 1.5rem 0 0; }
.totals dt { font-size: 0.88rem; color: var(--ink-soft); }
.totals dd { margin: 0.1rem 0 0; font: 400 1.56rem/1.2 var(--display); }
.services { display: flex; gap: 0.6rem; flex-wrap: wrap; font-size: 1.15rem !important; }
.svc::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 0.3rem; background: var(--up); }
.svc.off::before { background: var(--down); }
@media (max-width: 640px) { .totals { grid-template-columns: 1fr 1fr; } }

.questions { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.questions li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.75rem; align-items: start; padding: 0.6rem 0.75rem; background: var(--paper-2); }
.questions .q { font-size: 0.95rem; line-height: 1.4; overflow-wrap: anywhere; }
.questions .when { display: block; font-size: 0.82rem; color: var(--ink-soft); margin-top: 0.15rem; }
.tag { font: 400 0.98rem/1 var(--display); padding: 0.3rem 0.45rem; background: var(--ink); color: var(--paper); white-space: nowrap; }
.tag.attested { background: var(--moss-hi); color: #fff; }
.tag.disagreed, .tag.blocked, .tag.refused, .tag.failed, .tag.mismatch { background: var(--lip); color: #fff; }
.empty { color: var(--ink-soft); }

/* ------------------------------------------------------------ agents */
.lookup { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1.1rem 0 0.4rem; padding: var(--px); }
.lookup input {
  flex: 1 1 16rem; min-width: 0; font: 400 1.26rem var(--display); color: var(--ink); background: #fbfdf4;
  border: 0; padding: 0.65rem 0.8rem; margin: 0;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lookup input { background: #0f1c17; } }
.lookup-msg { min-height: 1.5em; font-size: 0.95rem; color: var(--ink-soft); }
.seats { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.25rem; padding: var(--px); }
.seat { background: var(--paper-2); padding: 1rem; display: grid; gap: 0.55rem; }
.seat.bonded { background: color-mix(in srgb, var(--gold) 22%, var(--paper-2)); }
.seat-top { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.seat-id { font: 400 1.8rem var(--display); }
.seat-status { font: 400 1.08rem var(--display); color: var(--ink-soft); }
.seat-status.on { color: var(--up); }
.seat dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4rem; margin: 0; }
.seat dt { font-size: 0.78rem; color: var(--ink-soft); }
.seat dd { margin: 0; font: 400 1.32rem var(--display); }
.seat .owner { font-size: 0.85rem; color: var(--ink-soft); margin: 0; overflow-wrap: anywhere; }
.seat-actions { display: flex; gap: 0.9rem; align-items: center; flex-wrap: wrap; margin-top: 0.3rem; padding-left: 4px; }
.seat-actions .btn { padding: 0.5rem 0.7rem; font-size: 0.95rem; }
.seat-actions a { font-size: 0.92rem; }

.board-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.board-head h2 { margin: 0; }
.tabs { display: flex; gap: 0; background: var(--paper-2); padding: 3px; }
.tabs button { font: 400 1.14rem var(--display); border: 0; background: none; color: var(--ink); padding: 0.4rem 0.7rem; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.leaders { list-style: none; margin: 0.9rem 0 0; padding: 0; counter-reset: rank; }
.leaders li {
  counter-increment: rank;
  display: grid; grid-template-columns: 2.4rem 6.5rem 1fr 6.5rem; align-items: center; gap: 0.75rem;
  padding: 0.55rem 0.4rem; border-bottom: 3px dotted color-mix(in srgb, var(--ink) 18%, transparent);
}
.leaders li.empty { display: block; counter-increment: none; }
.leaders li::before { content: counter(rank); font: 400 1.44rem var(--display); color: var(--ink-soft); text-align: center; }
.leaders li:nth-child(1)::before { color: var(--gold-deep); }
.leaders li.empty::before { content: none; }
.leaders .agent { font: 400 1.32rem var(--display); text-decoration: none; }
.leaders .agent:hover { text-decoration: underline; }
.leaders .work { display: grid; gap: 0.2rem; min-width: 0; }
.leaders .work-bar { height: 8px; background: var(--paper-2); }
.leaders .work-bar i { display: block; height: 100%; background: repeating-linear-gradient(90deg, var(--lily) 0 6px, var(--moss-hi) 6px 8px); }
.leaders .work-num { font-size: 0.85rem; color: var(--ink-soft); }
.leaders .last { font-size: 0.85rem; color: var(--ink-soft); text-align: right; }
.leaders .busy { color: var(--up); font-family: var(--display); }
@media (max-width: 520px) {
  .leaders li { grid-template-columns: 2rem 5rem 1fr; }
  .leaders .last { grid-column: 2 / -1; text-align: left; margin-top: -0.3rem; }
}

/* ------------------------------------------------------------ $IMD */
.price-row { display: flex; align-items: baseline; gap: 1rem 1.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.price { font: 400 3.6rem/1 var(--display); margin: 0; }
.price .chg { font-size: 1.6rem; }
.price-sub { color: var(--ink-soft); margin: 0; font-size: 0.95rem; }
.supply { display: flex; height: 34px; gap: 3px; background: var(--paper); }
.supply span { height: 100%; min-width: 4px; }
.supply-legend { list-style: none; padding: 0; margin: 0.7rem 0 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; font-size: 0.92rem; }
.supply-legend i { display: inline-block; width: 12px; height: 12px; margin-right: 0.4rem; vertical-align: -1px; }
.supply-legend b { font-family: var(--display); font-weight: 400; font-size: 1.15rem; }
.uses { margin: 1.4rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.7rem; }
.uses li { padding-left: 1.3rem; position: relative; max-width: 64ch; }
.uses li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 8px; height: 8px; background: var(--gold); box-shadow: 0 0 0 2px var(--ink); }
.cta-row { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-top: 1.4rem; padding: var(--px); }
.ca { margin: 1.2rem 0 0; font-size: 0.9rem; color: var(--ink-soft); }
.copy { font: 400 1.02rem var(--display); background: var(--ink); color: var(--paper); border: 0; padding: 0.2rem 0.5rem; cursor: pointer; margin-left: 0.3rem; }

/* ------------------------------------------------------------ story */
.timeline { list-style: none; margin: 1.2rem 0 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 5.4rem; top: 0.6rem; bottom: 0.6rem; width: 3px; background: repeating-linear-gradient(180deg, var(--ink) 0 6px, transparent 6px 10px); opacity: 0.5; }
.timeline li { display: grid; grid-template-columns: 5rem 1fr; gap: 1.4rem; padding: 0.35rem 0; position: relative; }
.timeline li::after { content: ""; position: absolute; left: calc(5.4rem - 4px); top: 0.75rem; width: 11px; height: 11px; background: var(--lily); box-shadow: 0 0 0 3px var(--ink); }
.timeline li.now::after { background: var(--gold); }
.timeline time { font: 400 1.2rem var(--display); color: var(--ink-soft); padding-top: 0.1rem; }
.timeline p { margin: 0; }
.glossary { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.6rem; }
.glossary dt { font: 400 1.32rem var(--display); color: var(--moss-hi); }
:root[data-theme="dark"] .glossary dt { color: var(--lily); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .glossary dt { color: var(--lily); } }
.glossary dd { margin: 0.15rem 0 0; font-size: 0.95rem; }
@media (max-width: 640px) { .glossary { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ footer + toast */
.footer { max-width: 1320px; margin: 0 auto; padding: 1.5rem clamp(1rem, 3vw, 2rem) 2.5rem; color: #eef3e2; font-size: 0.9rem; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6); }
.footer p { max-width: none; margin: 0 0 0.3rem; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50;
  background: #fbfdf4; color: #17302a; --ink: #17302a; font: 400 1.2rem var(--display); padding: 0.6rem 1rem; max-width: calc(100vw - 48px);
}


/* ------------------------------------------------------------ views (one section on screen at a time) */
.view { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.25rem; }
.view.entering { animation: view-in 0.32s steps(4) both; }
@keyframes view-in { from { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) { .view.entering { animation: none; } }
.view h1:focus, .view h2:focus { outline: none; }
.lede { font-size: 1.05rem; color: var(--ink); margin-bottom: 1.2rem; }
.panel h3:first-child { margin-top: 0; }

.skip { position: absolute; left: 1rem; top: -4rem; z-index: 60; background: var(--gold); color: #17302a; padding: 0.5rem 0.8rem; font: 400 1.2rem var(--display); }
.skip:focus { top: 0.6rem; }

/* home tiles: each one is a door into a section */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; padding: var(--px); }
.tile {
  display: grid; gap: 0.15rem; padding: 0.9rem 1rem; text-decoration: none; background: var(--paper-2); position: relative;
}
.tile::after { content: "▸"; position: absolute; right: 0.8rem; top: 0.7rem; font-family: var(--display); color: var(--ink-soft); }
.tile:hover { background: color-mix(in srgb, var(--lily) 22%, var(--paper-2)); }
.tile:hover::after { color: var(--ink); }
.tile-label { font-size: 0.88rem; color: var(--ink-soft); }
.tile-value { font: 400 2.1rem/1.05 var(--display); }
.tile-sub { font-size: 0.85rem; color: var(--ink-soft); }
@container (max-width: 420px) { .tiles { grid-template-columns: 1fr; } }

.care { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.6rem; }
.care dt { font: 400 1.45rem var(--display); display: flex; align-items: center; gap: 0.5rem; }
.care dd { margin: 0.15rem 0 0; font-size: 0.96rem; }
kbd {
  font: 400 0.95rem/1 var(--display); padding: 0.15rem 0.35rem; background: var(--paper-2); color: var(--ink-soft);
  box-shadow: 0 2px 0 0 color-mix(in srgb, var(--ink) 30%, transparent);
}
.btn kbd { background: none; box-shadow: none; padding: 0; }
@container (max-width: 520px) { .care { grid-template-columns: 1fr; } }

.cta-row .btn-x .ico, .btn-x .ico { width: 14px; height: 14px; }
.intro .cta-row { margin-top: 1.2rem; }

.follow-panel { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.2rem; }
.follow-panel h2 { font-size: 1.7rem; }
.follow-panel p { margin: 0.2rem 0 0; color: var(--ink-soft); }
.follow-mark { width: 44px; height: 44px; fill: var(--ink); shape-rendering: crispEdges; }
@container (max-width: 560px) { .follow-panel { grid-template-columns: auto 1fr; } .follow-panel .btn { grid-column: 1 / -1; justify-self: start; } }

.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.footer-brand, .footer-x { display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; font: 400 1.4rem var(--display); }
.footer-brand img { image-rendering: pixelated; }
.footer-x .ico { width: 14px; height: 14px; }
.footer-x:hover, .footer-brand:hover { color: var(--gold); }

/* ------------------------------------------------------------ boot screen */
.loader {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: #2f5d3f;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.12) 50%, transparent 50%);
  background-size: 100% 8px;
  color: #eef3e2;
  animation: loader-failsafe 0s 9s forwards;
}
@keyframes loader-failsafe { to { visibility: hidden; opacity: 0; } }
.loader-inner { display: grid; justify-items: center; gap: 0.9rem; padding: 2rem; text-align: center; }
.loader-pepe { width: 144px; height: 144px; image-rendering: pixelated; animation: hop 0.9s steps(2) infinite; }
@keyframes hop { 50% { transform: translateY(-8px); } }
.loader-title { margin: 0; font: 400 3rem/1 var(--display); letter-spacing: 0.03em; text-shadow: 4px 4px 0 #10241a; }
.loader-bar { width: min(280px, 70vw); height: 20px; background: #10241a; box-shadow: 0 0 0 4px #0a1a12; padding: 4px; }
.loader-bar i { display: block; height: 100%; width: 4%; background: repeating-linear-gradient(90deg, #f0b23f 0 10px, #c2861f 10px 12px); transition: width 0.35s steps(6); }
.loader-step { margin: 0; font: 400 1.35rem var(--display); color: #bfe0a8; min-height: 1.5em; }
.loader.done { animation: loader-out 0.5s steps(5) forwards; }
@keyframes loader-out { to { clip-path: inset(0 0 100% 0); visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
  .loader-pepe { animation: none; }
  .loader.done { animation: loader-gone 0s forwards; }
  @keyframes loader-gone { to { visibility: hidden; } }
}

/* ------------------------------------------------------------ phones: app-style tab bar */
.tabbar { display: none; }
@media (max-width: 760px) {
  .nav { display: none; }
  .ticker { margin-left: auto; }
  .follow span { display: none; }
  .follow { padding: 0.45rem 0.55rem; }
  .brand span { font-size: 1.45rem; white-space: nowrap; }
  .topbar { gap: 0.6rem; }
  .brand img { width: 30px; height: 30px; }
  .ticker { padding: 0.25rem 0.5rem; font-size: 1.15rem; }
  .price { font-size: 2.4rem; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: #10241a; border-top: var(--px) solid #0a1a12;
    padding: 0.35rem 0.25rem calc(0.35rem + env(safe-area-inset-bottom));
  }
  .tabbar a {
    display: grid; justify-items: center; gap: 0.2rem; text-decoration: none; color: #8fb87e;
    font: 400 1.05rem/1 var(--display); padding: 0.4rem 0;
  }
  .tabbar .ico { width: 20px; height: 20px; }
  .tabbar a[aria-current="page"] { color: #ffe08a; background: rgba(255, 255, 255, 0.06); }
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(86px + env(safe-area-inset-bottom)); }
}
/* the pet only takes the screen on the Pond page when there is no room for two columns */
@media (max-width: 1000px) {
  body:not([data-route="pond"]) .device { display: none; }
}
