/* ============ style.css — Robinhood Chain Dashboard ============ */

/* ---------- Top nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--sp-6);
  align-items: center;
  height: var(--nav-h);
  padding: 0 var(--sp-6);
  background: rgba(8, 9, 10, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}
.nav__brand-mark {
  width: 22px;
  height: 22px;
  color: var(--hood);
}
.nav__brand-sep {
  color: var(--ink-quiet);
  font-weight: 400;
}
.nav__brand-title {
  color: var(--ink);
}

.nav__links {
  display: flex;
  gap: var(--sp-1);
  justify-content: center;
}
.nav__link {
  position: relative;
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  color: var(--ink-dim);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.nav__link:hover { color: var(--ink); background: var(--panel); }
.nav__link[aria-expanded="true"] { color: var(--ink); background: var(--panel-2); }
.nav__link .chev { font-size: 9px; opacity: 0.5; margin-left: 4px; }

.nav__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 220px;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-md);
  padding: 4px;
  box-shadow: var(--shadow-panel);
  display: none;
}
.nav__link[aria-expanded="true"] .nav__menu { display: block; }
.nav__menu a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius);
  color: var(--ink-dim);
  font-size: var(--text-sm);
  transition: background 0.12s, color 0.12s;
}
.nav__menu a:hover { color: var(--ink); background: var(--panel-3); text-decoration: none; }

.nav__tools {
  display: flex;
  gap: var(--sp-2);
  align-items: center;
}
.nav__search {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 6px 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink-dim);
  font-size: var(--text-sm);
  min-width: 240px;
  transition: border-color 0.15s;
}
.nav__search:hover { border-color: var(--line-3); }
.nav__search kbd {
  margin-left: auto;
  padding: 1px 6px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--ink-mute);
}

.nav__icon-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  color: var(--ink-dim);
  transition: color 0.15s, background 0.15s;
}
.nav__icon-btn:hover { color: var(--ink); background: var(--panel); }

/* ---------- Breadcrumb ---------- */
.crumb {
  padding: 12px var(--sp-6);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: relative;
  z-index: 1;
}
.crumb a { color: var(--ink-dim); }
.crumb .sep { margin: 0 8px; color: var(--ink-quiet); }
.crumb .here { color: var(--ink); }

/* ---------- Hero: The Flow ---------- */
.hero {
  position: relative;
  padding: var(--sp-8) var(--sp-6) var(--sp-6);
  z-index: 1;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--sp-6);
  align-items: stretch;
  min-height: 620px;
}
@media (max-width: 1100px) {
  .hero__grid { grid-template-columns: 1fr; }
}

.flow {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 620px;
}
.flow__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.flow__label {
  position: absolute;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  background: rgba(8, 9, 10, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  z-index: 2;
}
.flow__label--tl { top: 20px; left: 20px; }
.flow__label--tr { top: 20px; right: 20px; }
.flow__label--bl { bottom: 20px; left: 20px; }
.flow__label--br { bottom: 20px; right: 20px; }
.flow__label .k { color: var(--ink); font-weight: 700; margin-right: 4px; }
.flow__legend {
  display: flex;
  gap: 12px;
  align-items: center;
}
.flow__legend .dot {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}
.flow__legend .dot--herd { background: var(--herd); box-shadow: 0 0 8px var(--herd); }
.flow__legend .dot--whale { background: var(--whale); box-shadow: 0 0 8px var(--whale); }

.flow__stat {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: rgba(8, 9, 10, 0.75);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  z-index: 2;
}
.flow__stat-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.flow__stat-value {
  font-family: var(--font-mono);
  font-size: 42px;
  font-weight: 700;
  color: var(--hood);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.flow__stat-value .unit {
  font-size: 14px;
  color: var(--ink-dim);
  font-weight: 400;
  margin-left: 6px;
}

/* Herd panel (right side of hero) */
.herd-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.herd-panel__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--line);
}
.herd-panel__title {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
}
.herd-panel__badge {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  padding: 3px 7px;
  border-radius: 3px;
  background: var(--hood-hair);
  color: var(--hood);
  border: 1px solid var(--hood-dim);
}
.herd-panel__lead {
  font-family: var(--font-display);
  font-size: 44px;
  line-height: 1.05;
  color: var(--ink);
}
.herd-panel__lead em { color: var(--hood); font-style: italic; }
.herd-panel__note {
  font-size: var(--text-sm);
  color: var(--ink-dim);
  line-height: 1.55;
}

.herd-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.herd-stat {
  background: var(--panel);
  padding: 12px 14px;
}
.herd-stat__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.herd-stat__value {
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.herd-stat__value .up { color: var(--up); }
.herd-stat__value .down { color: var(--down); }

.herd-panel__controls {
  display: flex;
  gap: var(--sp-2);
  margin-top: auto;
}
.btn {
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
  color: var(--ink);
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn:hover { border-color: var(--line-3); background: var(--panel-2); }
.btn--primary {
  background: var(--hood);
  color: #000;
  border-color: var(--hood);
  font-weight: 700;
}
.btn--primary:hover { background: #00e006; border-color: #00e006; }

/* ---------- Hero bottom bar (3 live metrics) ---------- */
.hero-bar {
  padding: 0 var(--sp-6);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
  position: relative;
  z-index: 1;
}
@media (max-width: 1100px) { .hero-bar { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .hero-bar { grid-template-columns: 1fr; } }

.hero-bar__cell {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hero-bar__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  text-transform: uppercase;
}
.hero-bar__value {
  font-family: var(--font-mono);
  font-size: 30px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.hero-bar__value .u {
  font-size: 13px;
  color: var(--ink-dim);
  margin-left: 4px;
  font-weight: 400;
}
.hero-bar__delta {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--up);
  letter-spacing: 0.06em;
}
.hero-bar__delta.down { color: var(--down); }

/* ---------- Section ---------- */
section {
  padding: var(--sp-10) var(--sp-6);
  position: relative;
  z-index: 1;
}
.section__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--sp-5);
}
.section__title {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
  display: flex;
  align-items: center;
  gap: 12px;
}
.section__title::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--hood);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--hood);
}
.section__more {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--ink-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.section__more:hover { color: var(--hood); text-decoration: none; }

/* ---------- 3x3 metric cards ---------- */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
}
@media (max-width: 1000px) { .metric-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .metric-grid { grid-template-columns: 1fr; } }

.metric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  min-height: 170px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.15s;
}
.metric:hover { border-color: var(--line-2); }

.metric__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.metric__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}
.metric__info {
  color: var(--ink-quiet);
  font-size: 11px;
  border: 1px solid var(--ink-quiet);
  width: 14px; height: 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: help;
}
.metric__tools {
  display: flex;
  gap: 6px;
  color: var(--ink-mute);
  font-family: var(--font-mono);
  font-size: 10px;
}
.metric__tool {
  padding: 2px 5px;
  border-radius: 3px;
  transition: color 0.12s, background 0.12s;
  cursor: pointer;
}
.metric__tool:hover { color: var(--ink); background: var(--panel-3); }
.metric__tool.active { color: var(--ink); background: var(--panel-3); }

.metric__value {
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.metric__value .u {
  font-size: 12px;
  color: var(--ink-dim);
  margin-left: 4px;
  font-weight: 400;
}

.metric__spark {
  height: 60px;
  width: 100%;
  margin-top: auto;
}
.metric__foot {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--ink-mute);
}
.metric__foot .up { color: var(--up); }
.metric__foot .down { color: var(--down); }

/* ---------- Ecosystem row ---------- */
.eco-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
}
@media (max-width: 900px) { .eco-grid { grid-template-columns: 1fr; } }

.eco {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  transition: border-color 0.15s;
  min-height: 220px;
}
.eco:hover { border-color: var(--line-2); }
.eco__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.eco__name {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  letter-spacing: 0.06em;
  color: var(--ink);
  font-weight: 700;
}
.eco__url {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--ink-mute);
  margin-top: 2px;
}
.eco__status {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  padding: 3px 7px;
  border-radius: 3px;
  background: var(--hood-hair);
  color: var(--hood);
  border: 1px solid var(--hood-dim);
  text-transform: uppercase;
}
.eco__status--pending {
  background: rgba(255, 182, 72, 0.08);
  color: var(--warn);
  border-color: rgba(255, 182, 72, 0.4);
}
.eco__body {
  font-size: var(--text-sm);
  color: var(--ink-dim);
  line-height: 1.5;
}
.eco__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: auto;
}
.eco__stat {
  background: var(--panel-2);
  padding: 10px 12px;
}
.eco__stat-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  text-transform: uppercase;
  margin-bottom: 2px;
}
.eco__stat-value {
  font-family: var(--font-mono);
  font-size: var(--text-md);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* ---------- Data tables ---------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.card__title {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}
.card__meta {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--ink-mute);
  letter-spacing: 0.1em;
}
.card__meta .live-dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--hood);
  border-radius: 50%;
  margin-right: 6px;
  box-shadow: 0 0 6px var(--hood);
  animation: livePulse 1.6s ease-in-out infinite;
}
@keyframes livePulse {
  0%,100% { opacity: 1; }
  50% { opacity: 0.35; }
}

table.tape {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}
table.tape th, table.tape td {
  text-align: left;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.tape th {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
  background: var(--bg-2);
}
table.tape tbody tr { transition: background 0.15s; }
table.tape tbody tr:hover { background: var(--panel-2); }
table.tape tbody tr:last-child td { border-bottom: 0; }
table.tape .hash { color: var(--hood); }
table.tape .hash:hover { text-decoration: underline; text-underline-offset: 3px; }

.pill {
  display: inline-block;
  padding: 2px 8px;
  font-size: 10px;
  letter-spacing: 0.12em;
  border-radius: 3px;
  background: var(--panel-3);
  color: var(--ink-dim);
  text-transform: uppercase;
}
.pill--swap   { background: rgba(255, 92, 26, 0.1); color: var(--hood); }
.pill--mint   { background: rgba(255, 182, 72, 0.1); color: var(--warn); }
.pill--burn   { background: rgba(255, 80, 0, 0.1); color: var(--down); }
.pill--whale  { background: rgba(255, 60, 60, 0.1); color: var(--whale); }
.pill--herd   { background: rgba(74, 222, 128, 0.1); color: var(--herd); }
.pill--nft    { background: rgba(160, 130, 255, 0.1); color: #a082ff; }

.bar {
  display: inline-block;
  height: 3px;
  width: 60px;
  background: var(--line-2);
  border-radius: 2px;
  vertical-align: middle;
  margin-left: 6px;
  overflow: hidden;
  position: relative;
}
.bar__fill { position: absolute; inset: 0 auto 0 0; background: var(--hood); border-radius: 2px; }

/* Validator table specifics */
.dec-score {
  display: inline-flex;
  gap: 2px;
  vertical-align: middle;
  margin-right: 4px;
}
.dec-score span {
  width: 10px; height: 10px;
  background: var(--line-2);
}
.dec-score span.on { background: var(--hood); }

/* ---------- Footer ---------- */
.footer {
  padding: var(--sp-8) var(--sp-6);
  border-top: 1px solid var(--line);
  color: var(--ink-mute);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--sp-6);
  position: relative;
  z-index: 1;
}
.footer h4 {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 12px;
}
.footer a {
  display: block;
  color: var(--ink-dim);
  padding: 4px 0;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.12em;
}
.footer a:hover { color: var(--hood); text-decoration: none; }
@media (max-width: 700px) { .footer { grid-template-columns: 1fr; } }

/* ============ CRUMB extras ============ */
.crumb {
  display: flex;
  align-items: center;
}
.crumb__spacer { flex: 1; }
.crumb__inspo {
  color: var(--ink-mute);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
@media (max-width: 720px) { .crumb__inspo { display: none; } }

/* nav brand link */
.nav__brand { text-decoration: none; }
.nav__brand:hover .nav__brand-mark { color: #00e006; }

/* ============ HERO PANEL kicker ============ */
.herd-panel__kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: -8px;
}
.herd-panel__kicker em {
  color: var(--hood);
  font-style: normal;
  font-weight: 700;
}

/* ============ POSITIONING STRIP ============ */
.pos { padding-bottom: var(--sp-8); }
.pos__grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: var(--sp-8);
  align-items: start;
}
@media (max-width: 900px) { .pos__grid { grid-template-columns: 1fr; } }
.pos__eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--hood);
  text-transform: uppercase;
  margin-bottom: var(--sp-3);
}
.pos__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.12;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.pos__title em {
  color: var(--hood);
  font-style: italic;
}
.pos__body {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-dim);
  margin-top: var(--sp-4);
  max-width: 560px;
}
.pos__body a { color: var(--hood); }

.pos__pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.pillar {
  background: var(--panel);
  padding: 20px 22px;
  min-height: 132px;
}
.pillar__n {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--hood);
  margin-bottom: 6px;
}
.pillar__t {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--ink);
  margin-bottom: 8px;
}
.pillar__d {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-dim);
}

/* ============ FEED FILTER CHIPS ============ */
.feed-filter {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  align-items: center;
  flex-wrap: wrap;
}
.feed-filter__sep { color: var(--ink-quiet); padding: 0 4px; }
.feed-filter__paused {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--warn);
  text-transform: uppercase;
}
.chip {
  padding: 5px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: 20px;
  transition: all 0.15s;
}
.chip:hover { color: var(--ink); border-color: var(--line-3); }
.chip.active {
  color: #000;
  background: var(--hood);
  border-color: var(--hood);
  font-weight: 700;
}

/* clickable cells */
table.tape td .clickable,
table.tape .hash {
  cursor: pointer;
  user-select: none;
}
table.tape .hash::after {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 5px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300c805' stroke-width='2'><rect x='9' y='9' width='13' height='13' rx='2' ry='2'/><path d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.3;
  transition: opacity 0.15s;
  vertical-align: middle;
}
table.tape .hash:hover::after { opacity: 1; }

/* ============ SEARCH MODAL ============ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
}
.modal[aria-hidden="false"] { display: flex; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.15s ease;
}
.modal__panel {
  position: relative;
  width: 640px;
  max-width: calc(100vw - 32px);
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
  overflow: hidden;
  animation: modalIn 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(-12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.search {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-mute);
}
.search input {
  flex: 1;
  background: none;
  border: 0;
  outline: 0;
  color: var(--ink);
  font-size: 15px;
  font-family: var(--font-mono);
}
.search input::placeholder { color: var(--ink-mute); }
.search__close {
  padding: 4px 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-mute);
  background: var(--panel-3);
  border: 1px solid var(--line-2);
  border-radius: 3px;
  letter-spacing: 0.14em;
}
.search__body {
  max-height: 460px;
  overflow-y: auto;
}
.search__hint {
  padding: 20px;
}
.search__hint-title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.search__hint-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.search__chip {
  padding: 6px 12px;
  border: 1px solid var(--line-2);
  border-radius: 3px;
  color: var(--ink-dim);
  font-size: 12px;
  font-family: var(--font-mono);
  transition: all 0.15s;
}
.search__chip:hover { border-color: var(--hood-dim); color: var(--hood); }

.search__results { padding: 8px 0; }
.search__result {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 20px;
  cursor: pointer;
  transition: background 0.12s;
}
.search__result:hover, .search__result.active { background: var(--panel-2); }
.search__result-icon {
  width: 24px; height: 24px;
  border-radius: 4px;
  background: var(--panel-3);
  color: var(--hood);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
}
.search__result-main {
  font-family: var(--font-mono);
  color: var(--ink);
  font-size: 13px;
}
.search__result-sub {
  color: var(--ink-mute);
  font-size: 11px;
  margin-top: 2px;
}
.search__result-type {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  text-transform: uppercase;
}
.search__empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--ink-mute);
  font-size: 13px;
}

/* ============ DRAWER ============ */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
}
.drawer[aria-hidden="false"] { display: block; }
.drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.2s ease;
}
.drawer__panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 480px;
  max-width: 100vw;
  background: var(--panel);
  border-left: 1px solid var(--line-2);
  overflow-y: auto;
  animation: drawerIn 0.22s cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes drawerIn {
  from { transform: translateX(30px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
.drawer__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 1;
}
.drawer__title {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
}
.drawer__close {
  color: var(--ink-mute);
  font-size: 18px;
  padding: 4px 8px;
  border-radius: 4px;
}
.drawer__close:hover { color: var(--ink); background: var(--panel-2); }

.drawer__body { padding: 22px; }
.drawer__hero {
  padding: 16px 18px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}
.drawer__hero-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.drawer__hero-value {
  font-family: var(--font-mono);
  color: var(--hood);
  font-size: 15px;
  word-break: break-all;
  line-height: 1.4;
}
.drawer__row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.drawer__row:last-child { border-bottom: 0; }
.drawer__k {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  text-transform: uppercase;
}
.drawer__v {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
  word-break: break-all;
}
.drawer__v .hash { color: var(--hood); cursor: pointer; }

.drawer__actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}

/* ============ TOAST ============ */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translate(-50%, 20px);
  padding: 10px 18px;
  background: var(--panel-2);
  border: 1px solid var(--hood-dim);
  border-radius: 6px;
  color: var(--hood);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s;
  z-index: 200;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* eco tile clickable */
.eco { cursor: pointer; }
.eco:hover .eco__name { color: var(--hood); }
