/* ============================================================
   coin-kitchen-mvp-final — css/style.css
   Light Flaunch-derived surface. Flat geometry, crisp 1px lines,
   no gradients / glass / neon / grid backgrounds / emoji.

   All colors are read from css/token.css tokens. Nothing here is a
   literal color except through a var(--…) reference.
   ============================================================ */

/* ---- 1. Reset -------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { min-width: 320px; overflow-x: clip; scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  overflow-x: clip;
}

button, input, select { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
a { color: inherit; }
img, svg { display: block; }
[hidden] { display: none !important; }

/* ---- 2. Base --------------------------------------------------- */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-16);
  line-height: 24px;
}

::selection { background: var(--brand-orange); color: var(--brand-black); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.container {
  width: 100%;
  max-width: var(--content);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 200;
  top: 8px;
  left: 8px;
  transform: translateY(-140%);
  padding: 8px 12px;
  border-radius: var(--radius);
  background: var(--brand-black);
  color: var(--on-black);
  font-weight: 700;
}
.skip-link:focus { transform: none; }

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- 2b. Design-state review bar (?lab=1 QA tooling) ------------- */
.lab-bar {
  background: var(--brand-black);
  border-bottom: 1px solid var(--brand-black);
}
.lab-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 42px;
  max-width: var(--content);
  margin-inline: auto;
  padding: 0 var(--gutter);
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scrollbar-width: none;
}
.lab-inner::-webkit-scrollbar { display: none; }

.lab-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  color: var(--brand-orange);
  font-family: var(--font-mono);
  font-size: var(--fs-10);
  font-weight: 600;
  letter-spacing: 0.06em;
}
.lab-label::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--brand-orange);
}

.lab-states { display: inline-flex; gap: 6px; flex: none; }
.lab-state {
  height: 27px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--on-black-muted);
  font-family: var(--font-mono);
  font-size: var(--fs-10);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.lab-state:hover { border-color: var(--on-black-muted); color: var(--on-black); }
.lab-state:focus-visible { outline-color: var(--brand-orange); }
.lab-state[aria-pressed="true"] {
  border-color: var(--brand-orange);
  background: var(--brand-orange);
  color: var(--on-accent);
}

/* ---- 3. Activity rail (newest-launch preview) ------------------ */
.activity-tape {
  position: relative;
  z-index: 70;
  height: var(--tape-height);
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}

.activity-rail { width: max-content; display: flex; }

.activity-track {
  display: flex;
  flex: none;
  gap: 8px;
  padding-right: 8px;
  animation: tape 34s linear infinite;
}

.activity-tape:hover .activity-track,
.activity-tape:focus-within .activity-track,
.activity-tape.is-paused .activity-track { animation-play-state: paused; }

@keyframes tape { to { transform: translateX(-100%); } }

.activity-pill {
  height: 40px;
  min-width: 196px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px 0 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--panel);
  font-size: var(--fs-12);
  line-height: 16px;
  white-space: nowrap;
}
.activity-pill.is-new { border-color: var(--brand-orange); }
.activity-pill.is-partial { border-color: var(--brand-black); }

.activity-art {
  position: relative;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: var(--panel2);
  color: var(--text);
  font-family: var(--font-display);
  font-size: var(--fs-13);
  font-weight: 900;
}
.activity-pill:nth-child(3n + 1) .activity-art { background: var(--brand-orange); }
.activity-pill:nth-child(3n + 2) .activity-art { background: var(--brand-black); color: var(--on-black); }

.event-marker {
  position: absolute;
  left: -5px;
  top: -4px;
  width: 16px;
  height: 16px;
  border: 2px solid var(--panel);
  border-radius: 50%;
  background: var(--brand-orange);
  box-shadow: 0 0 0 1px var(--brand-black);
}
.event-marker::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--brand-black);
}

.activity-copy { min-width: 0; display: flex; flex-direction: column; }
.activity-copy > span {
  max-width: 128px;
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.activity-copy small {
  max-width: 142px;
  overflow: hidden;
  color: var(--muted);
  font-size: var(--fs-12);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.activity-copy strong { color: var(--orange-ink); font-weight: 700; }
.activity-pill.is-placeholder .activity-copy strong { color: var(--text); }

.tape-toggle {
  position: absolute;
  z-index: 5;
  right: 10px;
  top: 13px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--brand-black);
  border-radius: 50%;
  background: var(--brand-black);
  color: var(--on-black);
  box-shadow: var(--shadow-2);
}
.tape-toggle svg { width: 16px; height: 16px; fill: currentColor; }
.tape-toggle .play-path { display: none; }
.tape-toggle[aria-pressed="true"] .pause-path { display: none; }
.tape-toggle[aria-pressed="true"] .play-path { display: block; }

/* ---- 4. Header -------------------------------------------------- */
.desktop-header { position: relative; z-index: 20; height: var(--header-height); }
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.header-left, .header-nav { display: flex; align-items: center; }
.header-left { min-width: 0; gap: 20px; }
.header-nav { flex: none; gap: 16px; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
}
.brand-logo { width: 34px; height: 34px; flex: none; border-radius: 50%; }
.brand-word {
  font-family: var(--font-display);
  font-size: var(--fs-20);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
}

.search-trigger {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  background: var(--panel2);
  color: var(--muted);
  font-size: var(--fs-14);
  font-weight: 700;
  text-align: left;
}
.header-search { width: 260px; flex: none; }

.header-link {
  color: var(--text);
  font-size: var(--fs-14);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.header-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.header-link.is-active { color: var(--orange-ink); }

.badge {
  margin-left: 5px;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-9);
  line-height: 15px;
  font-weight: 700;
}
.badge.neutral { background: var(--paper-deep); color: var(--text); }

.connection-pill {
  height: 40px;
  min-width: 141px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-inline: 16px;
  border-radius: var(--radius-pill);
  background: var(--brand-black);
  color: var(--on-black);
  white-space: nowrap;
}
.connection-pill > span:last-child { display: flex; flex-direction: column; line-height: 1; }
.connection-pill b { font-size: var(--fs-12); letter-spacing: 0.03em; }
.connection-pill small { margin-top: 3px; color: var(--on-black-muted); font-size: var(--fs-9); }

.connection-dot {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  background: var(--brand-orange);
  box-shadow: 0 0 0 1px currentColor;
}
.connection-pill[data-tone="pending"] { background: var(--warn-soft); color: var(--text); }
.connection-pill[data-tone="pending"] .connection-dot { background: var(--warn); }
.connection-pill[data-tone="error"] { background: var(--err-soft); color: var(--text); }
.connection-pill[data-tone="error"] .connection-dot { background: var(--err); }

/* ---- 5. Hero (compact, high-impact) ----------------------------- */
.hero {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 28px 44px;
  align-items: center;
  margin-top: 24px;
  margin-bottom: 32px;
  padding: 36px 32px;
  border-radius: var(--radius-panel);
  background: var(--brand-black);
  color: var(--on-black);
}

.hero-copy { min-width: 0; }

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--brand-orange);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-weight: 600;
  letter-spacing: 0.08em;
}
.hero-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-orange);
}

.hero-title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: var(--fs-52);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.hero-sub {
  max-width: 56ch;
  margin: 0;
  color: var(--on-black-muted);
  font-size: var(--fs-16);
  line-height: 26px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid var(--brand-orange);
  border-radius: var(--radius-pill);
  background: var(--brand-orange);
  color: var(--on-accent);
  font-size: var(--fs-14);
  font-weight: 700;
  text-decoration: none;
}
.hero-cta:hover { text-decoration: underline; text-underline-offset: 4px; }

.hero-boundary {
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid var(--brand-orange);
  border-radius: var(--radius-panel);
}
.hero-boundary strong {
  display: block;
  margin-bottom: 6px;
  color: var(--brand-orange);
  font-family: var(--font-display);
  font-size: var(--fs-20);
  font-weight: 900;
}
.hero-boundary span {
  display: block;
  color: var(--on-black-muted);
  font-size: var(--fs-13);
  line-height: 20px;
}

/* ---- 6. Overview ------------------------------------------------ */
.main-content { position: relative; z-index: 2; padding-bottom: 24px; }

.overview {
  height: 236px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.overview-panel {
  position: relative;
  height: 236px;
  overflow: hidden;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  background: var(--panel);
}
.overview-panel h2 { margin: 0 0 13px; font-size: var(--fs-16); font-weight: 700; line-height: 24px; }
.panel-badge {
  position: absolute;
  top: 17px;
  right: 16px;
  padding: 3px 8px;
  border: 1px solid var(--brand-black);
  border-radius: var(--radius-pill);
  background: var(--brand-black);
  color: var(--on-black);
  font-family: var(--font-mono);
  font-size: var(--fs-9);
  font-weight: 600;
  line-height: 15px;
  letter-spacing: 0.06em;
}

.feed-steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
}
.feed-steps li {
  counter-increment: step;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-12);
  font-weight: 700;
  line-height: 18px;
}
.feed-steps li:last-child { border-bottom: 0; }
.feed-steps li::before {
  content: counter(step, decimal-leading-zero);
  flex: none;
  color: var(--brand-orange);
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  font-weight: 600;
}

.feed-notes .table-head {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: var(--fs-9);
  letter-spacing: 0.16em;
}
.feed-notes .table-head span:last-child { text-align: right; }
.note-row {
  min-height: 47px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  align-items: center;
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-12);
}
.note-row:last-child { border-bottom: 0; }
.note-row strong { text-align: right; white-space: nowrap; }
.note-row small {
  padding: 2px 4px;
  border-radius: 4px;
  background: var(--brand-black);
  color: var(--on-black);
  font-size: 7px;
}

/* ---- 7. Feed controls ------------------------------------------- */
.feed-controls {
  position: relative;
  z-index: 10;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
}
.mode-rail { height: 36px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.filter-group { height: 44px; display: flex; align-items: center; gap: 8px; }

.mode {
  height: 32px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 0 12px 0 5px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--panel);
  font-size: var(--fs-14);
  font-weight: 700;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.mode.active { border-color: var(--brand-orange); background: var(--brand-orange); color: var(--on-accent); }

.mode-icon {
  position: relative;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--panel2);
}
.mode-icon i { display: block; }
.latest-icon { background: var(--panel); }
.latest-icon i { width: 8px; height: 8px; border: 2px solid var(--brand-orange); border-radius: 50%; box-shadow: 0 0 0 2px var(--orange-pale); }
.recent-icon { background: var(--orange-soft); }
.recent-icon i { width: 7px; height: 7px; background: var(--brand-black); transform: rotate(45deg); }
.art-icon { background: var(--info-soft); }
.art-icon i { width: 10px; height: 10px; border: 1px solid var(--brand-black); background: repeating-linear-gradient(90deg, transparent 0 2px, var(--brand-black) 2px 3px); }
.partial-icon { background: var(--brand-black); }
.partial-icon i { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-orange); }

.recent-check {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
  color: var(--muted);
  font-size: var(--fs-14);
  white-space: nowrap;
}
.sort-mark {
  position: relative;
  width: 16px;
  height: 16px;
  flex: none;
  border: 1px solid var(--brand-orange);
  border-radius: 5px;
  background: var(--panel);
}
.sort-mark::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 3px;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--brand-black);
  border-bottom: 1.5px solid var(--brand-black);
  transform: rotate(45deg);
}

.select-wrap {
  position: relative;
  width: 123px;
  height: 44px;
  min-width: 123px;
  display: flex;
  overflow: hidden;
  align-items: center;
  gap: 5px;
  padding: 0 34px 0 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel);
  font-size: var(--fs-14);
}
.select-wrap b { font-weight: 700; }
.select-wrap select {
  width: 48px;
  min-width: 0;
  flex: 1;
  appearance: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.select-wrap:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.select-wrap select:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.chevron {
  position: absolute;
  right: 14px;
  top: 16px;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  pointer-events: none;
}

/* ---- 8. Feed grid + cards --------------------------------------- */
.feed-region { position: relative; scroll-margin-top: 12px; }
.feed-region:focus-visible { outline: 3px solid var(--focus); outline-offset: 5px; }

.token-grid, .loading-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.feed-meta {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.token-card {
  height: 324px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--panel);
  transition: border-color 75ms;
}
.token-card:hover { border-color: var(--line-strong); }

.image-wrap { position: relative; aspect-ratio: 1; min-height: 0; flex: none; }

.token-art {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 14px;
  background: var(--paper-art);
  isolation: isolate;
}
.token-art::before, .token-art::after { content: ""; position: absolute; z-index: -1; }
.token-art::before {
  width: 64%;
  height: 64%;
  border: 2px solid var(--brand-black);
  border-radius: 22%;
  background: var(--brand-orange);
  transform: rotate(-13deg);
}
.token-art::after {
  width: 42%;
  height: 130%;
  background: var(--panel);
  opacity: 0.74;
  transform: rotate(39deg);
}
.token-art[data-art="frog"], .token-art[data-art="engine"] { background: var(--brand-black); color: var(--on-black); }
.token-art[data-art="frog"]::before, .token-art[data-art="engine"]::before { border-color: var(--on-black); background: var(--brand-orange); border-radius: 50%; }
.token-art[data-art="bread"], .token-art[data-art="cloth"], .token-art[data-art="soft"] { background: var(--orange-pale); }
.token-art[data-art="square"]::before, .token-art[data-art="receipt"]::before, .token-art[data-art="printer"]::before { border-radius: 4px; transform: rotate(0); }
.token-art[data-art="clock"]::before, .token-art[data-art="bloom"]::before, .token-art[data-art="satellite"]::before { border-radius: 50%; }
.token-art[data-art="logo"]::before { background: var(--brand-black); border-color: var(--brand-orange); }

.art-monogram {
  position: relative;
  z-index: 2;
  font-family: var(--font-display);
  font-size: clamp(45px, 5vw, 74px);
  font-weight: 900;
  letter-spacing: -0.035em;
}

.art-label {
  position: absolute;
  z-index: 3;
  right: 8px;
  bottom: 8px;
  padding: 2px 5px;
  border: 1px solid currentColor;
  border-radius: 3px;
  background: var(--panel);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 7px;
  line-height: 12px;
  letter-spacing: 0.04em;
}

.token-art.is-missing { background: var(--paper-soft); }
.token-art.is-missing::before, .token-art.is-missing::after {
  width: 1px;
  height: 140%;
  border: 0;
  border-radius: 0;
  background: var(--line-dark);
  transform: rotate(45deg);
}
.token-art.is-missing::after { transform: rotate(-45deg); }
.token-art.is-missing .art-monogram,
.token-art.is-loading .art-monogram {
  max-width: 12ch;
  font-family: var(--font-mono);
  font-size: var(--fs-10);
  line-height: 13px;
  text-align: center;
}

.token-art.is-loading::after {
  inset: -20% auto -20% -45%;
  width: 35%;
  height: auto;
  background: var(--panel);
  opacity: 0.85;
  transform: skewX(-12deg);
  animation: art-scan 1.35s ease-in-out infinite;
}
@keyframes art-scan { from { left: -45%; } to { left: 120%; } }

.network-mark {
  position: absolute;
  z-index: 5;
  top: 8px;
  right: 8px;
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border: 2px solid var(--panel);
  border-radius: 50%;
  background: var(--brand-orange);
  color: var(--brand-black);
  box-shadow: 0 0 0 1px var(--brand-black);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 600;
  line-height: 1;
}

.token-row { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.token-name {
  min-width: 0;
  overflow: hidden;
  margin: 0;
  font-size: var(--fs-14);
  font-weight: 700;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.age { flex: none; color: var(--orange-ink); font-size: var(--fs-12); font-weight: 700; line-height: 16px; white-space: nowrap; }

.symbol-row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  color: var(--muted);
  font-size: var(--fs-12);
  line-height: 16px;
}

.card-detail { min-width: 0; display: flex; flex-direction: column; overflow: hidden; line-height: 12px; }
.card-detail b, .card-detail small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-detail b { color: var(--muted); font-size: var(--fs-11); font-weight: 400; }
.card-detail small { color: var(--text); font-size: var(--fs-11); font-weight: 700; }

.copy-mint {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 8px;
  color: var(--muted);
}
.copy-mint:hover { background: var(--panel2); color: var(--text); }
.copy-mint .icon { width: 14px; height: 14px; }

.record-number { font-family: var(--font-display); font-size: var(--fs-23); font-weight: 900; line-height: 28px; }
.record-number small { margin-right: 3px; color: var(--brand-orange); font-size: var(--fs-13); }

.delay-badge { color: var(--muted); font-family: var(--font-mono); font-size: var(--fs-9); line-height: 13px; text-align: right; }
.delay-badge strong { display: block; color: var(--text); font-size: var(--fs-11); }

/* ---- Skeleton ---------------------------------------------------- */
.skeleton-card {
  height: 324px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--panel);
}
.skeleton-art { aspect-ratio: 1; border-radius: 14px; background: var(--paper-deep); }
.skeleton-lines { padding-top: 11px; }
.skeleton-lines i {
  display: block;
  height: 9px;
  margin-bottom: 9px;
  border-radius: 5px;
  background: var(--paper-deep);
}
.skeleton-lines i:nth-child(1) { width: 72%; }
.skeleton-lines i:nth-child(2) { width: 44%; }
.skeleton-lines i:nth-child(3) { width: 88%; margin-top: 13px; }

/* ---- 9. States --------------------------------------------------- */
.status-notice {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 10px 14px;
  border: 1px solid var(--warn);
  border-radius: 14px;
  background: var(--warn-soft);
  font-size: var(--fs-12);
}
.status-notice b { font-size: var(--fs-13); }
.notice-shape { width: 11px; height: 11px; flex: none; background: var(--warn); transform: rotate(45deg); }

.notice-tag {
  flex: none;
  padding: 3px 7px;
  border-radius: var(--radius-pill);
  background: var(--brand-black);
  color: var(--on-black);
  font-family: var(--font-mono);
  font-size: var(--fs-9);
  font-weight: 600;
  letter-spacing: 0.05em;
}
.status-notice[data-tone="loading"] { border-color: var(--line-dark); background: var(--panel2); }
.status-notice[data-tone="loading"] .notice-shape { background: var(--brand-black); }
.status-notice[data-tone="reconnecting"] { border-color: var(--info); background: var(--info-soft); }
.status-notice[data-tone="reconnecting"] .notice-shape { background: var(--info); }

.state-panel {
  min-height: 245px;
  padding: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  background: var(--panel);
}
.state-stamp {
  display: inline-block;
  padding: 3px 7px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-pill);
  font-size: var(--fs-10);
}
.state-panel h3 {
  max-width: 16ch;
  margin: 14px 0 6px;
  font-family: var(--font-display);
  font-size: var(--fs-42);
  line-height: 0.98;
  font-weight: 900;
}
.state-panel p { max-width: 60ch; margin: 0; color: var(--ink-soft); }

.retry-button {
  min-height: 44px;
  margin-top: 18px;
  padding-inline: 18px;
  border-radius: var(--radius-pill);
  background: var(--brand-orange);
  color: var(--on-accent);
  font-weight: 700;
}

/* ---- 10. Concept panel ------------------------------------------- */
.concept-panel {
  min-height: 120px;
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.9fr;
  align-items: center;
  gap: 30px;
  margin-top: 48px;
  padding: 24px 30px;
  border-radius: var(--radius-panel);
  background: var(--brand-black);
  color: var(--on-black);
}
.concept-panel .concept-kicker {
  display: inline-block;
  padding: 2px 7px;
  border: 1px solid var(--brand-orange);
  border-radius: var(--radius-pill);
  color: var(--orange-soft);
  font-family: var(--font-mono);
  font-size: var(--fs-9);
  letter-spacing: 0.05em;
}
.concept-panel h2 {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-size: var(--fs-28);
  line-height: 1;
  font-weight: 900;
}
.concept-panel p { margin: 0; color: var(--on-black-muted); }
.concept-panel p b { color: var(--on-black); }
.concept-boundary { display: flex; flex-direction: column; gap: 7px; text-align: right; }
.concept-boundary strong { color: var(--brand-orange); font-size: var(--fs-14); }
.concept-boundary small { color: var(--on-black-muted); font-size: var(--fs-11); line-height: 15px; }

/* ---- 11. Footer --------------------------------------------------- */
.site-footer {
  height: 45px;
  margin-top: 48px;
  border-top: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  font-size: var(--fs-13);
}
.footer-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.footer-inner nav { display: flex; gap: 18px; }
.footer-inner a { color: inherit; text-decoration: none; }
.footer-inner a:hover { color: var(--text); text-decoration: underline; }
.attribution { font-family: var(--font-mono); font-size: var(--fs-9); letter-spacing: 0.04em; }

/* ---- 12. Search overlay ------------------------------------------- */
.search-overlay { position: fixed; z-index: 100; inset: 0; }
.search-backdrop { position: absolute; inset: 0; background: var(--overlay-scrim); }
.search-dialog {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 672px;
  height: 327px;
  overflow: hidden;
  transform: translate(-50%, -50%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-1);
}
.dialog-search-row {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}
.dialog-search-row input { height: 50px; flex: 1; border: 0; outline: 0; background: transparent; font-size: var(--fs-16); }
.dialog-search-row input:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.dialog-search-row input::-webkit-search-cancel-button { display: none; appearance: none; }
.close-search { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; }
.close-search:hover { background: var(--panel2); }

.search-results { position: relative; padding: 16px; }
.search-results h2 { margin: 0 0 8px; font-size: var(--fs-16); line-height: 24px; }
.search-results > small {
  position: absolute;
  top: 20px;
  right: 16px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
}
.result-row {
  width: 100%;
  height: 58px;
  display: grid;
  grid-template-columns: 1fr 86px;
  align-items: center;
  gap: 10px;
  padding-inline: 8px;
  border-radius: var(--radius);
  text-align: left;
}
.result-row:hover { background: var(--panel2); }
.result-main { min-width: 0; display: flex; align-items: center; gap: 12px; }
.result-art {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: var(--orange-soft);
  font-family: var(--font-display);
  font-size: var(--fs-16);
  font-weight: 900;
}
.result-copy { min-width: 0; display: flex; flex-direction: column; }
.result-copy b, .result-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-copy b { font-size: var(--fs-14); }
.result-copy small { color: var(--muted); font-size: var(--fs-11); }
.result-age { color: var(--orange-ink); font-family: var(--font-mono); font-size: var(--fs-10); text-align: right; }
.no-results { color: var(--muted); }
.drag-handle { display: none; }

/* ---- 13. Toast ---------------------------------------------------- */
.toast {
  position: fixed;
  z-index: 150;
  left: 50%;
  bottom: 82px;
  transform: translate(-50%, 12px);
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  background: var(--brand-black);
  color: var(--on-black);
  font-size: var(--fs-12);
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---- 14. Mobile nav ------------------------------------------------ */
.mobile-nav { display: none; }

/* ---- 15. Responsive ------------------------------------------------ */
@media (min-width: 1001px) {
  .recent-check { position: absolute; left: 515px; margin: 0; }
}

@media (max-width: 1120px) and (min-width: 768px) {
  .desktop-header { height: 92px; }
  .header-search { width: 226px; }
  .header-left { gap: 16px; }
  .header-nav { gap: 10px; }
  .project-link, .connection-pill { display: none; }

  .hero { grid-template-columns: 1fr 1fr; gap: 24px 28px; padding: 32px 28px; }
  .hero-title { font-size: var(--fs-42); }

  .overview { height: 292px; }
  .overview-panel { height: 292px; }
  .feed-steps li { min-height: 61px; }
  .feed-notes .note-row { min-height: 61px; }
  .note-row { grid-template-columns: 1fr 1.1fr; }

  .token-grid, .loading-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .token-card, .skeleton-card { height: 318px; }

  .recent-check { position: absolute; left: 408px; width: 62px; overflow: hidden; margin: 0; gap: 5px; }
  .recent-check span { font-size: 0; }
  .recent-check span::after { content: "NEWEST"; font-family: var(--font-mono); font-size: var(--fs-9); letter-spacing: 0.03em; }
  .select-wrap { width: 112px; min-width: 112px; padding-left: 11px; padding-right: 26px; }
  .select-wrap .chevron { right: 10px; }

  .concept-panel { grid-template-columns: 1fr 1fr; }
  .concept-boundary { grid-column: 1 / -1; text-align: left; }
  .site-footer { height: 57px; }
}

@media (max-width: 767px) {
  .container { padding-inline: 16px; }
  body { padding-bottom: 64px; }

  .lab-inner {
    padding-inline: 16px;
    mask-image: linear-gradient(to right, var(--mask-solid) 0, var(--mask-solid) calc(100% - 20px), var(--mask-clear) 100%);
  }

  .activity-tape { height: var(--tape-height); }
  .tape-toggle { right: 7px; }

  .desktop-header { display: none; }
  .main-content { padding-bottom: 0; }

  .hero {
    display: block;
    margin-top: 16px;
    margin-bottom: 24px;
    padding: 26px 20px;
  }
  .hero-title { font-size: var(--fs-34); }
  .hero-sub { font-size: var(--fs-14); line-height: 22px; }
  .hero-boundary { margin-top: 20px; }

  .overview { display: none; }

  .feed-controls {
    height: 120px;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 16px;
  }
  .mode-rail {
    width: calc(100vw - 16px);
    overflow-x: auto;
    overflow-y: hidden;
    flex: none;
    padding-right: 18px;
    mask-image: linear-gradient(to right, var(--mask-solid) 0, var(--mask-solid) calc(100% - 22px), var(--mask-clear) 100%);
    scrollbar-width: none;
  }
  .mode-rail::-webkit-scrollbar { display: none; }
  .filter-group {
    height: 76px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 44px 24px;
    gap: 8px 12px;
  }
  .select-wrap { grid-row: 1; width: 100%; min-width: 0; }
  .select-wrap select { width: 100%; }
  .recent-check { grid-column: 1 / 3; grid-row: 2; justify-self: end; margin: 0; }

  .token-grid, .loading-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .token-card, .skeleton-card { height: 267px; padding: 12px; gap: 6px; }
  .record-number { font-size: var(--fs-20); line-height: 25px; }
  .art-label { font-size: 6px; }
  .copy-mint { width: 28px; height: 24px; }

  .status-notice { align-items: flex-start; flex-wrap: wrap; }
  .state-panel { min-height: 220px; padding: 26px 22px; }
  .state-panel h3 { font-size: var(--fs-34); }

  .concept-panel { display: block; margin-top: 40px; padding: 24px 20px; }
  .concept-panel p { display: block; margin-top: 18px; }
  .concept-boundary { display: flex; margin-top: 18px; text-align: left; }

  .site-footer { height: 137px; margin-top: 40px; padding-bottom: 80px; }
  .footer-inner { height: 56px; }
  .footer-inner nav { gap: 12px; }
  .footer-inner a:nth-child(n + 3), .attribution { display: none; }

  .mobile-nav {
    position: fixed;
    z-index: 90;
    inset: auto 0 0;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 0 16px;
    border-top: 1px solid var(--border);
    background: var(--panel);
  }
  .mobile-nav-button {
    position: relative;
    width: 38px;
    height: 40px;
    display: grid;
    place-items: center;
    flex: none;
    border-radius: 10px;
    color: var(--muted);
    text-decoration: none;
  }
  .mobile-nav-button[aria-current="page"] { color: var(--brand-orange); }
  .mobile-nav-button .icon { width: 20px; height: 20px; }
  .project-mobile small {
    position: absolute;
    top: -1px;
    right: -5px;
    padding: 1px 3px;
    border-radius: 4px;
    background: var(--orange-soft);
    color: var(--orange-ink);
    font-size: 6px;
  }
  .mobile-status {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-left: auto;
    padding-inline: 18px;
    border-radius: var(--radius-pill);
    background: var(--brand-black);
    color: var(--on-black);
    font-size: var(--fs-12);
  }

  .search-dialog {
    left: 0;
    top: auto;
    bottom: 0;
    width: 100%;
    height: 68dvh;
    transform: none;
    border-width: 1px 0 0;
    border-radius: 18px 18px 0 0;
  }
  .drag-handle {
    width: 44px;
    height: 4px;
    display: block;
    margin: 8px auto 2px;
    border-radius: var(--radius-pill);
    background: var(--line-dark);
  }
  .dialog-search-row { height: 60px; }
  .search-results > small { position: static; display: block; margin-top: -8px; margin-bottom: 8px; }
  .toast { bottom: 76px; }
}

@media (max-width: 370px) {
  .mobile-nav { padding-inline: 8px; }
  .mobile-status { padding-inline: 13px; }
  .token-card, .skeleton-card { padding: 10px; }
}

/* ---- 16. Motion + contrast preferences ---------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .activity-track, .token-art.is-loading::after { animation: none !important; }
}

@media (prefers-contrast: more) {
  .overview-panel, .token-card, .select-wrap { border-color: var(--brand-black); }
}

/* Production bindings for the real SSE feed. */
ol.token-grid { margin: 0; padding: 0; list-style: none; }
.token-item {
  min-width: 0;
  content-visibility: auto;
  contain-intrinsic-size: auto 390px;
}
.token-card { height: 390px; }
.token-media { display: grid; }
.token-image {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}
.token-monogram[hidden],
.token-image[hidden] { display: none; }
.mint-block {
  min-width: 0;
  height: 18px;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: var(--fs-9);
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mint-value { font: inherit; }
.copy-button { font-size: 0; }
.copy-button::before {
  content: "COPY";
  font-family: var(--font-mono);
  font-size: var(--fs-9);
  font-weight: 600;
}
.copy-button[data-copied="true"]::before { content: "COPIED"; }
.coming-soon-button {
  min-height: 26px;
  padding-inline: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--panel2);
  color: var(--muted);
  font-size: var(--fs-9);
  font-weight: 700;
  cursor: not-allowed;
}
.new-launches-slot {
  position: sticky;
  z-index: 40;
  top: 8px;
  min-height: 50px;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.new-launches-button {
  min-height: 40px;
  margin-bottom: 10px;
  padding-inline: 18px;
  border-radius: var(--radius-pill);
  background: var(--brand-black);
  color: var(--on-black);
  box-shadow: var(--shadow-2);
  font-size: var(--fs-12);
  font-weight: 700;
  pointer-events: auto;
}
.panel-footnote {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: var(--fs-9);
  line-height: 13px;
}
.concept-preview-link {
  color: var(--brand-orange);
  font-size: var(--fs-14);
  font-weight: 700;
  text-underline-offset: 4px;
}
.noscript-message {
  position: fixed;
  z-index: 200;
  inset: 0 0 auto;
  padding: 12px;
  background: var(--err-soft);
  color: var(--err);
  text-align: center;
}
.activity-track { min-width: max-content; }
.activity-pill { text-decoration: none; }
.token-item[data-image-state="loaded"] .token-art::before,
.token-item[data-image-state="loaded"] .token-art::after { display: none; }

@media (max-width: 1120px) and (min-width: 768px) {
  .token-card { height: 374px; }
}

@media (max-width: 767px) {
  .token-card { height: 326px; }
  .brand-word { display: none; }
  .activity-tape { position: relative; }
  .mobile-status { min-width: 112px; padding-inline: 12px; font-size: var(--fs-10); }
}
