/* kascov — watch Kaspa's smart coins live their lives */

:root {
  color-scheme: dark;
  --bg: #0a100f;
  --bg-soft: #0e1514;
  --card: #111a18;
  --card-hover: #15201e;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(112, 199, 186, 0.35);
  --text: #e9f1ef;
  --muted: #a7b8b4;
  --faint: #8fa19d;
  --accent: #70c7ba;
  --accent-soft: rgba(112, 199, 186, 0.12);
  --born: #6fd9a4;
  --born-soft: rgba(111, 217, 164, 0.14);
  --move: #98a8ff;
  --move-soft: rgba(152, 168, 255, 0.14);
  --burn: #f2a566;
  --burn-soft: rgba(242, 165, 102, 0.14);
  --watch: #ffd479;
  --watch-soft: rgba(255, 212, 121, 0.1);
  --watch-border: rgba(255, 212, 121, 0.35);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Instrument Sans", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Space Grotesk", "Instrument Sans", system-ui, sans-serif;
  --radius: 16px;
  --radius-sm: 10px;
  --hairline: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 520px at 50% -180px, rgba(112, 199, 186, 0.10), transparent 70%),
    radial-gradient(900px 700px at 88% 12%, rgba(111, 217, 164, 0.035), transparent 65%),
    radial-gradient(800px 640px at 8% 30%, rgba(242, 165, 102, 0.028), transparent 65%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: min(1080px, 100% - 2.5rem);
  margin-inline: auto;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #06211d;
  padding: 0.5rem 1rem;
  border-radius: 0 0 8px 0;
  z-index: 20;
}
.skip-link:focus { left: 0; }

.mono { font-family: var(--mono); font-size: 0.86em; }
.break { word-break: break-all; }
.dim { color: var(--faint); font-weight: 400; }
em { font-style: normal; }

h2 {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 1rem;
}
h2::before { content: "▮ "; color: var(--accent); font-size: 0.6rem; }
h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

/* ------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 16, 15, 0.82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.7rem;
}

/* nav + network tabs are one right-hand group, so they stay put whether or
   not the search box (center, explorer-only) is present */
.header-right {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  flex: none;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  color: var(--text);
}
.wordmark:hover { text-decoration: none; }
.wordmark-eye { color: var(--accent); flex: none; }

.network-tabs {
  display: inline-flex;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.network-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.32rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.network-tab:hover { color: var(--text); }
.network-tab[aria-pressed="true"] {
  background: var(--accent);
  color: #06211d;
}

/* search lives in the header, but only on the explorer view */
.search-wrap.header-search {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 460px;
  margin-inline: auto;
}
.search-wrap.header-search[hidden] { display: none; }
.header-search #search { padding-block: 0.45rem; }

/* --------------------------------------------------------------- panel */

.panel {
  margin-top: 3rem;
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  text-align: center;
  color: var(--muted);
}
.panel-error { border-color: rgba(242, 165, 102, 0.4); }

/* ---------------------------------------------------------------- hero */

.hero {
  position: relative;
  padding: 4rem 0 1.8rem;
  text-align: center;
}
/* the living field: faint coin-lives drifting through the observatory glass */
.hero::before {
  content: "";
  position: absolute;
  inset: -40px 0 0;
  pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 12% 28%, rgba(111, 217, 164, 0.5), transparent 100%),
    radial-gradient(1.6px 1.6px at 78% 18%, rgba(112, 199, 186, 0.45), transparent 100%),
    radial-gradient(1.4px 1.4px at 32% 68%, rgba(152, 168, 255, 0.4), transparent 100%),
    radial-gradient(2px 2px at 62% 52%, rgba(242, 165, 102, 0.35), transparent 100%),
    radial-gradient(1.3px 1.3px at 88% 62%, rgba(112, 199, 186, 0.4), transparent 100%),
    radial-gradient(1.5px 1.5px at 45% 12%, rgba(111, 217, 164, 0.35), transparent 100%),
    radial-gradient(1.2px 1.2px at 22% 48%, rgba(233, 241, 239, 0.28), transparent 100%),
    radial-gradient(1.2px 1.2px at 70% 78%, rgba(233, 241, 239, 0.22), transparent 100%),
    linear-gradient(rgba(112, 199, 186, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112, 199, 186, 0.05) 1px, transparent 1px);
  background-size: auto, auto, auto, auto, auto, auto, auto, auto, 44px 44px, 44px 44px;
  -webkit-mask-image: radial-gradient(80% 90% at 50% 30%, #000 35%, transparent 100%);
  mask-image: radial-gradient(80% 90% at 50% 30%, #000 35%, transparent 100%);
  animation: hero-drift 26s linear infinite alternate;
  opacity: 0;
  animation-delay: 0.15s;
  animation-fill-mode: forwards;
}
@keyframes hero-drift {
  0% { opacity: 0; transform: translateY(6px); }
  8% { opacity: 1; }
  100% { opacity: 1; transform: translateY(-10px); }
}

.hero-title {
  font-family: var(--display);
  font-size: clamp(2.2rem, 6vw, 3.7rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 auto 1.1rem;
  max-width: 22ch;
  animation: rise-in 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.hero-title em {
  font-style: normal;
  background: linear-gradient(92deg, var(--accent), var(--born));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  color: var(--muted);
  font-size: clamp(1rem, 2.4vw, 1.16rem);
  max-width: 56ch;
  margin: 0 auto 2.2rem;
  animation: rise-in 0.7s 0.12s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.hero-stats { animation: rise-in 0.7s 0.24s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.freshness { animation: rise-in 0.7s 0.34s cubic-bezier(0.2, 0.7, 0.2, 1) both; }

@keyframes rise-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero::before { animation: none; opacity: 0.7; }
  .hero-title, .hero-sub, .hero-stats, .freshness { animation: none; }
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
  max-width: 720px;
  margin: 0 auto 1rem;
}

.stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 0.6rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.stat-n {
  font-size: clamp(1.7rem, 4.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 500;
}

.freshness {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0;
}

/* --------------------------------------------------------------- guide */

.guide { margin: 1.8rem 0 2.6rem; }

.guide-title {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  color: var(--faint);
}

.guide-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.guide-step {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.05rem 1.15rem;
  transition: transform 0.14s ease, border-color 0.14s ease;
}
.guide-step:nth-child(1) {
  border-color: rgba(111, 217, 164, 0.24);
  background: linear-gradient(180deg, rgba(111, 217, 164, 0.07), var(--card) 65%);
}
.guide-step:nth-child(2) {
  border-color: rgba(152, 168, 255, 0.24);
  background: linear-gradient(180deg, rgba(152, 168, 255, 0.07), var(--card) 65%);
}
.guide-step:nth-child(3) {
  border-color: rgba(242, 165, 102, 0.24);
  background: linear-gradient(180deg, rgba(242, 165, 102, 0.07), var(--card) 65%);
}
.guide-step:hover { transform: translateY(-2px); }
.guide-step:nth-child(1):hover { border-color: rgba(111, 217, 164, 0.55); }
.guide-step:nth-child(2):hover { border-color: rgba(152, 168, 255, 0.55); }
.guide-step:nth-child(3):hover { border-color: rgba(242, 165, 102, 0.55); }

.guide-step:not(:last-child)::after {
  content: "\2192";
  position: absolute;
  right: -1.18rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--faint);
  font-size: 1.05rem;
}

.guide-icon {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
}
.guide-icon svg { width: 24px; height: 24px; }
.guide-step:nth-child(1) .guide-icon { background: var(--born-soft); color: var(--born); }
.guide-step:nth-child(2) .guide-icon { background: var(--move-soft); color: var(--move); }
.guide-step:nth-child(3) .guide-icon { background: var(--burn-soft); color: var(--burn); }

.guide-step strong { display: block; font-size: 1.02rem; margin-bottom: 2px; }
.guide-step:nth-child(1) strong { color: var(--born); }
.guide-step:nth-child(2) strong { color: var(--move); }
.guide-step:nth-child(3) strong { color: var(--burn); }
.guide-step span:not(.guide-icon) { color: var(--muted); font-size: 0.86rem; line-height: 1.45; display: block; }

/* ------------------------------------------------------------- explorer */

#view-explore { padding-top: 1.3rem; }

.explore-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1.2rem;
  margin-bottom: 1.7rem;
}

.stats-strip {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
}

.howto-link { font-size: 0.82rem; color: var(--faint); white-space: nowrap; }
.howto-link:hover { color: var(--accent); text-decoration: none; }

/* the "what IS a smart coin" expander under the landing guide */
.guide-more { max-width: 720px; margin: 1rem auto 0; }
.guide-more summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.95rem;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius);
  list-style-position: inside;
}
.guide-more summary:hover { color: var(--accent); background: var(--card); }
.guide-more[open] summary { color: var(--accent); }
.guide-more-body {
  padding: 0.9rem 1.1rem 0.4rem;
  border-left: 2px solid var(--border);
  margin: 0.4rem 0 0 0.6rem;
}
.guide-more-body p { margin: 0 0 0.85rem; line-height: 1.65; color: var(--text); font-size: 0.95rem; }
.guide-more-body strong { color: var(--accent); }

/* --------------------------------------------------------------- pulse */

.pulse { margin-bottom: 2.6rem; }

.pulse-chart {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  padding: 1rem 1rem 0.7rem;
}
.pulse-chart svg { display: block; width: 100%; height: auto; }
.pulse-axis { stroke: var(--border); stroke-width: 1; }
.pulse-tick {
  fill: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
}
.pulse-count {
  fill: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  text-anchor: middle;
}
.pulse-caption {
  margin: 0 0 0.6rem;
  color: var(--faint);
  font-size: 0.82rem;
}

.pulse-legend {
  display: flex;
  gap: 1.1rem;
  justify-content: center;
  padding: 0.55rem 0 0.3rem;
  color: var(--muted);
  font-size: 0.8rem;
}
.pulse-legend span { display: inline-flex; align-items: center; gap: 0.38rem; }
.dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.dot-born { background: var(--born); }
.dot-move { background: var(--move); }
.dot-burn { background: var(--burn); }

/* -------------------------------------------------------------- stories */

.stories { margin-bottom: 2.6rem; }

.story-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.story {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--text);
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}
.story:hover {
  text-decoration: none;
  transform: translateY(-1px);
  border-color: var(--border-strong);
  background: var(--card-hover);
}
.story .avatar { flex: none; }
.story-text { font-size: 0.94rem; min-width: 0; }
.story-text strong { font-weight: 650; }
.story-when { color: var(--faint); font-size: 0.86em; white-space: nowrap; }
.story-kind {
  margin-left: auto;
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
}
.kind-born .story-kind { background: var(--born-soft); color: var(--born); }
.kind-move .story-kind { background: var(--move-soft); color: var(--move); }
.kind-burn .story-kind { background: var(--burn-soft); color: var(--burn); }

/* ---------------------------------------------------------------- grid */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.1rem;
}

.search-wrap {
  position: relative;
  flex: 1 1 260px;
  min-width: 220px;
}

.search-icon {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--faint);
  pointer-events: none;
}

#search {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  padding: 0.55rem 1rem 0.55rem 2.35rem;
  transition: border-color 0.15s ease;
}
#search::placeholder { color: var(--faint); }
#search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.chips { display: inline-flex; gap: 0.35rem; }

.chip {
  appearance: none;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.34rem 0.85rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--border-strong);
  color: var(--accent);
}

.result-count {
  margin: 0 0 0 auto;
  color: var(--faint);
  font-size: 0.83rem;
  font-variant-numeric: tabular-nums;
}

.coin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 0.8rem;
}

.card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.95rem 1rem;
  color: var(--text);
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}
.card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  border-color: var(--border-strong);
  background: var(--card-hover);
}

.card-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.55rem;
}
.card-head .avatar { flex: none; }

.card-id { display: flex; flex-direction: column; align-items: flex-start; gap: 0.2rem; min-width: 0; }

.card-name {
  font-weight: 650;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.pill {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.13rem 0.55rem;
}
.pill-alive { background: var(--born-soft); color: var(--born); }
.pill-retired { background: var(--burn-soft); color: var(--burn); }

.card-story {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2.4rem 1rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
}
.no-results p { margin: 0.25rem 0; }

.grid-foot { text-align: center; padding: 1.3rem 0 0.4rem; }

.btn {
  appearance: none;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 1.25rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.14s ease;
}
.btn:hover { border-color: var(--border-strong); background: var(--card-hover); transform: translateY(-1px); }
a.btn { display: inline-block; }
a.btn:hover { text-decoration: none; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #06211d; }
.btn-accent:hover { background: #86d4c8; border-color: #86d4c8; }

/* landing teaser + call to action */
.teaser { margin-bottom: 2rem; }
.cta-row { text-align: center; padding: 0.2rem 0 2.8rem; }
.btn-cta { font-size: 1rem; font-weight: 700; padding: 0.75rem 1.9rem; }

/* ---------------------------------------------------------- empty state */

.empty-net { margin-bottom: 2.6rem; }

.empty-card {
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  padding: 3rem 1.5rem;
  margin-top: 1rem;
}
.empty-card h2 {
  text-transform: none;
  letter-spacing: normal;
  color: var(--text);
  font-size: 1.35rem;
  margin: 0.8rem 0 0.4rem;
}
.empty-card p { color: var(--muted); max-width: 46ch; margin: 0 auto 1.4rem; }
.empty-icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--born-soft);
  color: var(--born);
}
.empty-icon svg { width: 26px; height: 26px; }

/* --------------------------------------------------------------- detail */

#view-detail { padding-top: 1.6rem; }

.back {
  display: inline-block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.4rem;
}
.back:hover { color: var(--accent); }

.detail-head {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 0.9rem;
}
.detail-head .avatar { flex: none; }

.detail-id h1 {
  margin: 0 0 0.25rem;
  font-size: clamp(1.5rem, 4.5vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
}

.detail-tags {
  margin: 0 0 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
}

.id-chip {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.22rem 0.4rem 0.22rem 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.copy-btn {
  appearance: none;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 0;
  border-radius: 999px;
  padding: 0.18rem 0.6rem;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}
.copy-btn:hover { background: rgba(112, 199, 186, 0.22); }
.copy-btn.copied { color: var(--born); background: var(--born-soft); }

.detail-summary {
  color: var(--muted);
  font-size: 1.02rem;
  margin: 0 0 2.2rem;
}

/* -------------------------------------------------------------- timeline */

.timeline {
  list-style: none;
  margin: 0 0 2.4rem;
  padding: 0;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 14px;
  bottom: 14px;
  width: 2px;
  background: var(--border);
}

.tl-item {
  position: relative;
  display: flex;
  gap: 0.95rem;
  padding: 0.55rem 0;
}

.tl-icon {
  position: relative;
  z-index: 1;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg-soft);
  border: 2px solid var(--border);
  color: var(--muted);
}
.tl-item.kind-born .tl-icon { border-color: var(--born); color: var(--born); background: var(--born-soft); }
.tl-item.kind-move .tl-icon { border-color: var(--move); color: var(--move); background: var(--move-soft); }
.tl-item.kind-burn .tl-icon { border-color: var(--burn); color: var(--burn); background: var(--burn-soft); }

.tl-body { padding-top: 0.2rem; min-width: 0; }
.tl-text { margin: 0; font-size: 0.98rem; }
.tl-text strong { font-weight: 650; }
.tl-meta {
  margin: 0.15rem 0 0;
  color: var(--faint);
  font-size: 0.84rem;
}
.tl-meta a { white-space: nowrap; }
.tl-note .tl-icon { border-style: dashed; }

.trunc-note { margin: -0.3rem 0 0.9rem; font-size: 0.88rem; }

/* ------------------------------------------------------------ nerd mode */

.nerd { margin-bottom: 3rem; }

.nerd-toggle {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  text-align: left;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.nerd-toggle:hover { border-color: var(--border-strong); }
.nerd-hint { font-size: 0.82rem; font-weight: 400; }

.nerd-switch {
  flex: none;
  width: 34px;
  height: 19px;
  border-radius: 999px;
  background: var(--border);
  position: relative;
  transition: background 0.15s ease;
}
.nerd-switch::after {
  content: "";
  position: absolute;
  top: 2.5px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.18s ease, background 0.15s ease;
}
.nerd-toggle[aria-expanded="true"] .nerd-switch { background: var(--accent-soft); }
.nerd-toggle[aria-expanded="true"] .nerd-switch::after {
  transform: translateX(14px);
  background: var(--accent);
}

.nerd-panel {
  margin-top: 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  padding: 1.1rem 1.2rem 1.3rem;
}

.nerd-rows { margin: 0 0 1.4rem; }
.nerd-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0.6rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.nerd-row:last-child { border-bottom: 0; }
.nerd-row dt {
  color: var(--faint);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.nerd-row dd { margin: 0; font-size: 0.88rem; min-width: 0; }

.nerd-h {
  margin: 0 0 0.7rem;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.flag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 6px;
  padding: 0.1rem 0.45rem;
}
.flag-yes { background: var(--born-soft); color: var(--born); }
.flag-no { background: var(--burn-soft); color: var(--burn); }
.flag-off { background: rgba(255, 255, 255, 0.08); color: var(--faint); }
.flag-ops { background: var(--move-soft); color: var(--move); }

.utxo {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.65rem;
}
.utxo-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-bottom: 0.3rem;
}
.utxo-flags { display: inline-flex; gap: 0.35rem; flex: none; }
.utxo-meta {
  display: flex;
  gap: 0.9rem;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}
.script {
  margin: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0.6rem 0.75rem;
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.6;
  color: var(--muted);
  overflow-x: auto;
  white-space: pre;
}

/* --------------------------------------------------------------- footer */

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  padding: 2rem 0 2.4rem;
  background: var(--bg-soft);
}
.footer-inner { text-align: center; color: var(--muted); font-size: 0.88rem; }
.footer-inner p { margin: 0.3rem 0; }
.footer-motto strong { color: var(--accent); }
.footer-dim { color: var(--faint); font-size: 0.8rem; }

/* ----------------------------------------------------------- transitions */

/* Views rest at opacity 1 (no class needed); .is-entering is a transient
   JS-applied state removed on the next frame, so content can never stay
   invisible — even if the removal never runs, reduced-motion pins it to 1
   and a JS timeout clears the class. */
.view-fade { transition: opacity 0.22s ease, transform 0.22s ease; }
.view-fade.is-entering { opacity: 0; transform: translateY(5px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .view-fade.is-entering { opacity: 1 !important; transform: none !important; }
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 720px) {
  /* header search drops to its own row so nothing overflows on phones */
  .header-inner { flex-wrap: wrap; }
  .search-wrap.header-search { order: 3; flex-basis: 100%; max-width: none; margin: 0; }
  .guide-steps { grid-template-columns: 1fr; gap: 0.8rem; }
  .guide-step:not(:last-child)::after { content: ""; }
  .nerd-row { grid-template-columns: 1fr; gap: 0.15rem; padding: 0.55rem 0; }
  .result-count { flex-basis: 100%; margin-left: 0.2rem; }
  .story-when { white-space: normal; }
  /* the amber "catching up — about …" badge copy cannot fit a phone in
     one nowrap line; .live-dot's flex:none keeps the dot round on wrap */
  .live-badge { white-space: normal; }
  /* 16px stops iOS Safari from auto-zooming the page on focus */
  #search { font-size: 1rem; }
  /* svg text scales down with the viewBox; bump it and thin out ticks */
  .pulse-tick { font-size: 22px; }
  .pulse-count { font-size: 18px; }
  .pulse-chart svg > text:nth-of-type(2),
  .pulse-chart svg > text:nth-of-type(4) { display: none; }
}

@media (max-width: 460px) {
  .hero { padding-top: 2.2rem; }
  .hero-stats { grid-template-columns: 1fr; max-width: 340px; }
  .stat { flex-direction: row; align-items: baseline; gap: 0.6rem; padding: 0.8rem 1rem; }
  .stat-n { font-size: 1.6rem; }
  /* keep the sticky header to one slim row on phones */
  .header-inner { gap: 0.6rem; padding-block: 0.55rem; }
  .wordmark { font-size: 1rem; gap: 0.4rem; }
  .network-tab { font-size: 0.76rem; padding: 0.28rem 0.6rem; }
  .detail-head { gap: 0.9rem; }
  .detail-head .avatar { width: 64px; height: 64px; }
  .story { align-items: flex-start; }
  .story .avatar { margin-top: 0.1rem; }
  .story-kind { display: none; }
}

/* ==================================================== search suggestions */

.suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5);
  max-height: min(340px, 60vh);
  overflow-y: auto;
  padding: 4px;
}
.suggest-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.6rem;
  border-radius: 7px;
  color: var(--text);
  font-size: 0.9rem;
}
.suggest-item:hover,
.suggest-item.is-active { background: var(--card-hover); text-decoration: none; }
.suggest-item .avatar { flex: none; }
.suggest-name { flex: 1 1 auto; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.suggest-name mark { background: transparent; color: var(--accent); }
.suggest-kind {
  color: var(--faint);
  font-size: 0.72rem;
  font-family: var(--mono);
  white-space: nowrap;
  flex: none;
}
.suggest-item .pill { flex: none; }

/* ============================================================== site nav */

.site-nav { display: inline-flex; gap: 0.95rem; flex: none; }
.nav-link {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
}
.nav-link:hover { color: var(--text); text-decoration: none; }
.nav-link[aria-current="page"] { color: var(--accent); }

/* ============================================================ live badge */

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  font-weight: 600;
  white-space: nowrap;
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.live-on { color: var(--born); }
.live-on .live-dot { background: var(--born); animation: livepulse 2.2s ease-out infinite; }
.live-stale { color: var(--burn); }
.live-stale .live-dot { background: var(--burn); }
.live-off { color: var(--faint); }
.live-off .live-dot { background: var(--faint); }

/* healthy but replaying a backlog — amber, dot still pulsing */
.live-lag { color: var(--burn); }
.live-lag .live-dot { background: var(--burn); animation: livepulse-amber 2.2s ease-out infinite; }

@keyframes livepulse {
  0% { box-shadow: 0 0 0 0 rgba(111, 217, 164, 0.45); }
  70% { box-shadow: 0 0 0 6px rgba(111, 217, 164, 0); }
  100% { box-shadow: 0 0 0 0 rgba(111, 217, 164, 0); }
}

@keyframes livepulse-amber {
  0% { box-shadow: 0 0 0 0 rgba(242, 165, 102, 0.45); }
  70% { box-shadow: 0 0 0 6px rgba(242, 165, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(242, 165, 102, 0); }
}

/* ================================================== records + watch strip */

.watch-strip, .records { margin-bottom: 2.6rem; }
.watch-hint { text-transform: none; letter-spacing: normal; font-weight: 400; }

.mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 0.7rem;
}

.mini-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.8rem;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}
.mini-card:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  background: var(--card-hover);
}
.mini-card .avatar { flex: none; }
.mini-body { min-width: 0; }
.mini-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
}
.mini-name {
  display: block;
  font-weight: 650;
  font-size: 0.9rem;
  color: var(--text);
  overflow-wrap: anywhere;
}
.mini-name:hover { text-decoration: none; }
.mini-name::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.mini-sub { display: block; color: var(--faint); font-size: 0.78rem; }

/* ================================================== cards with a star */

.card { position: relative; }
.card-link { color: inherit; font-weight: 650; font-size: 0.95rem; overflow-wrap: anywhere; }
.card-link:hover { text-decoration: none; }
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }

.star {
  appearance: none;
  position: relative;
  z-index: 2;
  margin-left: auto;
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font-size: 1rem;
  line-height: 1;
  color: var(--faint);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}
.star:hover { color: var(--watch); border-color: var(--border-strong); background: var(--bg-soft); transform: scale(1.08); }
.star.starred { color: var(--watch); }

.detail-tags .star { width: 28px; height: 28px; }
.chip-watch[aria-pressed="true"] { color: var(--watch); background: var(--watch-soft); border-color: var(--watch-border); }

/* ======================================================= toolbar sorting */

.toolbar-right { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }
.sort-label { color: var(--faint); font-size: 0.8rem; }
#sort {
  appearance: none;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 1.7rem 0.3rem 0.8rem;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='6'%3E%3Cpath d='M1 1l3.5 3.5L8 1' stroke='%238fa19d' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); /* %238fa19d = var(--faint) */
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
}
#sort:hover { color: var(--text); border-color: var(--border-strong); }
.toolbar-right .result-count { margin-left: 0.2rem; }

/* ==================================================== dev teaser (landing) */

.devcards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.9rem;
  margin-bottom: 3rem;
}
.devcard {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  color: var(--text);
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}
.devcard:hover {
  text-decoration: none;
  transform: translateY(-2px);
  border-color: var(--border-strong);
  background: var(--card-hover);
}
.devcard h3 { margin: 0 0 0.3rem; font-size: 1rem; color: var(--accent); }
.devcard p { margin: 0; color: var(--muted); font-size: 0.86rem; line-height: 1.5; }

/* ======================================================== decode + dev */

.page-head { padding: 2.2rem 0 1.4rem; }
.page-head h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 4.5vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.015em;
}
.page-sub { color: var(--muted); max-width: 68ch; margin: 0; }

.decode-box { margin-bottom: 1.2rem; }
#decode-input {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.84rem;
  line-height: 1.55;
  padding: 0.85rem 1rem;
  resize: vertical;
  transition: border-color 0.15s ease;
}
#decode-input::placeholder { color: var(--faint); }
#decode-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.decode-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.7rem; }

.decode-out { margin-bottom: 1.6rem; }
.decode-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.decode-err { color: var(--burn); }

.op-chip {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  border-radius: 6px;
  padding: 0.12rem 0.5rem;
  font-family: var(--mono);
}
.op-push { background: var(--accent-soft); color: var(--accent); }
.op-standard { background: rgba(255, 255, 255, 0.08); color: var(--muted); }
.op-introspection { background: var(--move-soft); color: var(--move); }
.op-covenant { background: var(--burn-soft); color: var(--burn); }
.op-zk { background: rgba(195, 152, 255, 0.14); color: #c398ff; }
.op-unknown { background: rgba(255, 139, 139, 0.14); color: #ff8b8b; }

.inst-list {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  overflow-x: auto;
}
.inst {
  display: grid;
  grid-template-columns: 58px 46px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: baseline;
  padding: 0.42rem 1rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  border-bottom: 1px solid var(--border);
}
.inst:last-child { border-bottom: 0; }
.inst-off { color: var(--faint); }
.inst-hex { color: var(--faint); }
.inst-text { overflow-wrap: anywhere; }
.inst-text .op-name { font-weight: 600; }
.inst.g-push .op-name { color: var(--accent); }
.inst.g-standard .op-name { color: var(--text); }
.inst.g-introspection .op-name { color: var(--move); }
.inst.g-covenant .op-name { color: var(--burn); }
.inst.g-zk .op-name { color: #c398ff; }
.inst.g-unknown .op-name { color: #ff8b8b; }
.inst-data { color: var(--muted); }

.op-legend { margin-bottom: 2.6rem; color: var(--muted); font-size: 0.88rem; }
.op-legend summary { cursor: pointer; color: var(--faint); }
.op-legend ul { list-style: none; padding: 0.7rem 0 0; margin: 0; display: grid; gap: 0.45rem; }
.op-legend li { display: flex; align-items: baseline; gap: 0.55rem; }

.decode-open { font-size: 0.8rem; display: inline-block; margin-top: 0.4rem; }

#decode-input.collapsed { height: 88px; min-height: 88px; }
.decode-foot { margin-top: 0.7rem; text-align: center; }
.btn-expand { display: block; margin: 0.5rem auto 1.4rem; }
.timeline + .btn-expand { margin-left: 56px; margin-right: auto; display: inline-block; }
.example-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.8rem;
}
.example-label { font-size: 0.82rem; margin-right: 0.2rem; }

.reveal-label { margin: 0.7rem 0 0.35rem; font-size: 0.8rem; color: var(--burn); }
.script-reveal { border-color: rgba(242, 165, 102, 0.35); }
.spend-note { margin: 0.5rem 0 0; font-size: 0.8rem; }

.flag-tpl { background: var(--accent-soft); color: var(--accent); text-transform: none; letter-spacing: 0.02em; }
.tpl-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem 0.9rem;
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
}
.tpl-field { white-space: nowrap; }

/* dev page */
.dev-section { margin-bottom: 2.6rem; }
.dev-section h2 { margin-top: 0; }
.dev-section h3 {
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: lowercase;
  color: var(--muted);
  margin: 1.2rem 0 0.6rem;
}
.dev-section p { color: var(--muted); font-size: 0.92rem; max-width: 76ch; }

.dev-endpoints { display: grid; gap: 0.6rem; margin-bottom: 0.8rem; }
.endpoint {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  padding: 0.75rem 1rem;
}
.endpoint-line { margin: 0 0 0.25rem; font-size: 0.9rem; overflow-wrap: anywhere; }
.endpoint-desc { margin: 0; color: var(--muted); font-size: 0.85rem; max-width: none; }
.method {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: var(--born-soft);
  color: var(--born);
  border-radius: 6px;
  padding: 0.12rem 0.5rem;
  margin-right: 0.35rem;
}
.dev-note { font-size: 0.83rem; }

.codeblock {
  margin: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.65;
  color: var(--muted);
  overflow-x: auto;
}
.codeblock code { font-family: inherit; }

.dev-dict { margin: 0; }
.dev-dict > div {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0.6rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.dev-dict > div:last-child { border-bottom: 0; }
.dev-dict dt { color: var(--accent); font-size: 0.82rem; }
.dev-dict dd { margin: 0; font-size: 0.88rem; color: var(--muted); min-width: 0; }
.dev-dict code { font-family: var(--mono); font-size: 0.92em; color: var(--text); }

.dev-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.45rem; color: var(--muted); font-size: 0.92rem; }

.footer-nav { font-size: 0.85rem; }

/* ===================================================== timeline highlight */

.tl-item.tl-flash > .tl-body {
  animation: tlflash 2.6s ease-out 1;
  border-radius: var(--radius-sm);
}
@keyframes tlflash {
  0% { background: var(--accent-soft); box-shadow: 0 0 0 8px var(--accent-soft); }
  100% { background: transparent; box-shadow: 0 0 0 8px transparent; }
}

/* ------------------------------------------------- responsive additions */

@media (max-width: 860px) {
  .devcards { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .wordmark { order: 0; }
  /* nav + tabs stay grouped on the right; search drops to its own row (above) */
  .header-right { order: 1; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; gap: 0.6rem; }
  .site-nav { gap: 0.7rem; }
  .toolbar-right { margin-left: 0; flex-basis: 100%; }
  .toolbar-right .result-count { margin-left: auto; }
  .dev-dict > div { grid-template-columns: 1fr; gap: 0.15rem; }
  .inst { grid-template-columns: 48px minmax(0, 1fr); }
  .inst-hex { display: none; }
}

/* ------------------------------------------------------- address pages */

.addr-head { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; }
/* the 999px pill radius looks wrong once a ~70-char address wraps */
.addr-head .id-chip { border-radius: 14px; max-width: 100%; }

/* ------------------------------------------------------------- live flash */

/* one ripple on the live-badge dot per pushed (SSE) event; the global
   reduced-motion rule above already pins animations to 0.01ms */
.live-on.live-flash .live-dot { animation: livepulse 2.2s ease-out infinite, liveflash 0.8s ease-out; }
.live-lag.live-flash .live-dot { animation: livepulse-amber 2.2s ease-out infinite, liveflash-amber 0.8s ease-out; }

@keyframes liveflash {
  0% { box-shadow: 0 0 0 0 rgba(111, 217, 164, 0.85); }
  100% { box-shadow: 0 0 0 14px rgba(111, 217, 164, 0); }
}

@keyframes liveflash-amber {
  0% { box-shadow: 0 0 0 0 rgba(242, 165, 102, 0.85); }
  100% { box-shadow: 0 0 0 14px rgba(242, 165, 102, 0); }
}

/* ================================================== what's running here */

.templates { margin-bottom: 2.6rem; }
.template-bars { display: grid; gap: 0.5rem; }
/* .tpl-row/.tpl-name are the explore bars — distinct from the detail
   page's .tpl-line/.tpl-field template chips */
.tpl-row {
  display: grid;
  grid-template-columns: 210px minmax(70px, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.88rem;
}
.tpl-name { font-weight: 600; overflow-wrap: anywhere; }
.tpl-track {
  height: 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.tpl-fill { display: block; height: 100%; border-radius: 5px; }
.tpl-counts { font-size: 0.82rem; white-space: nowrap; }

@media (max-width: 720px) {
  .tpl-row { grid-template-columns: 1fr; gap: 0.2rem; }
  .tpl-counts { white-space: normal; }
}

/* ===================================================== daily digest strip */

.digest { max-width: 720px; margin: 0 auto 2.4rem; }
.digest h2 { text-align: center; }
/* one quiet card for the three counters — five mismatched boxes read as
   clutter; a single strip reads as one fact about the day */
.digest-counts {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.95rem 1rem 0.85rem;
  margin-bottom: 0.6rem;
}
.digest-counts .stat {
  background: none;
  border: 0;
  padding: 0;
  align-items: center;
  text-align: center;
}
.digest-counts .stat-n { font-size: clamp(1.4rem, 3.5vw, 1.9rem); }
.digest-counts .n-born { color: var(--born); }
.digest-counts .n-move { color: var(--move); }
.digest-counts .n-burn { color: var(--burn); }
/* the two headliners split the same width evenly under the strip */
.digest .mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ================================= pulse v2: interactive activity chart */
/* (the legacy .pulse-* SVG rules above still serve the 404 fallback chart) */

.pulse-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-bottom: 0.7rem; }
.pulse-head .pulse-caption { margin: 0; flex: 1 1 240px; }
.pulse-ranges { display: inline-flex; gap: 0.3rem; margin-left: auto; }

.pulse-plot { position: relative; outline-offset: 4px; }
.pulse-bars {
  display: flex;
  align-items: stretch;
  gap: 2px;
  height: 170px;
  border-bottom: 1px solid var(--border);
  cursor: crosshair;
  touch-action: pan-y; /* horizontal scrub inspects buckets, vertical still scrolls */
}
/* display:flex would beat the UA [hidden] rule — pin the empty state */
.pulse-bars[hidden], .pulse-ticks[hidden] { display: none; }
.pulse-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; }
.pulse-col.is-hot .pulse-seg { filter: brightness(1.25); }
.pulse-seg { width: 100%; height: 0%; border-radius: 1px 1px 0 0; transition: height 0.35s ease, margin-top 0.35s ease; }
.pulse-seg.seg-cap { border-radius: 3px 3px 0 0; } /* rounded data-end, square baseline */
.seg-born { background: var(--born); }
.seg-move { background: var(--move); }
.seg-burn { background: var(--burn); }

.pulse-ticks { display: flex; justify-content: space-between; gap: 0.4rem; padding-top: 6px; color: var(--faint); font-family: var(--mono); font-size: 11px; }
.pulse-ticks span { white-space: nowrap; }

.pulse-tip {
  position: absolute;
  top: 4px;
  left: 0;
  z-index: 5;
  pointer-events: none;
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  padding: 0.45rem 0.7rem;
  font-size: 0.8rem;
  line-height: 1.55;
  white-space: nowrap;
}
.pulse-tip .tip-when { color: var(--faint); font-size: 0.74rem; }
.pulse-tip .dot { width: 8px; height: 8px; }
.pulse-tip strong { font-variant-numeric: tabular-nums; }

.pulse-none { text-align: center; padding: 2.6rem 1rem; margin: 0; }

/* --- mobile: tighter bars, fewer ticks, caption under the pills */
@media (max-width: 720px) {
  .pulse-bars { gap: 1px; height: 150px; }
  .pulse-ticks span:nth-child(2), .pulse-ticks span:nth-child(4) { display: none; }
  .pulse-head .pulse-caption { flex-basis: 100%; order: 2; }
  .pulse-ranges { margin-left: 0; }
}

/* ================================================= mobile-perfect pass */
/* phone-first rules grouped here on purpose; breakpoints reuse the file's
   existing cuts: 720px (phones/small tablets), 460px (small phones).
   default (desktop) styles above stay untouched. the interactive pulse
   chart (pulse v2 above) already ships its own pointer tooltip, mobile
   tick thinning, and range pills — this section only tops it up (taller
   bars, an in-card tip clamp, scrollable pills); the legacy svg-font
   rules in the first 720px block still serve the 404 fallback chart. */

/* iOS safe areas — env() is 0 everywhere else; pairs with
   viewport-fit=cover in index.html */
.site-header {
  padding-top: env(safe-area-inset-top);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
.site-footer { padding-bottom: calc(2.4rem + env(safe-area-inset-bottom)); }

/* display:flex on .mini-grid (below) would beat the hidden attribute's UA
   display:none (#digest-cards carries hidden directly on a .mini-grid) */
.mini-grid[hidden] { display: none; }

@media (max-width: 720px) {
  /* last-ditch guard: nothing may pan the page sideways. clip (not
     hidden) creates no scroll container, so the sticky header survives */
  body { overflow-x: clip; }

  /* the nav + tabs group sizes to max-content (flex: none), so its own
     flex-wrap never engaged and the mainnet tab poked past a 320px screen
     — capping it lets nav and tabs share a line and wrap when they must */
  .header-right { max-width: 100%; }

  /* tap targets ≥44px effective, visuals unchanged (no horizontal padding
     on .nav-link: measured at 390px, +0.3rem/side tips nav + tabs past one
     line — the 44px height is the win that matters) */
  .nav-link { display: inline-flex; align-items: center; min-height: 44px; }
  .network-tab { position: relative; }
  .network-tab::after { content: ""; position: absolute; inset: -9px -2px; }
  .copy-btn { position: relative; }
  .copy-btn::after { content: ""; position: absolute; inset: -9px -6px; }
  .star::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; }
  .suggest-item { padding: 0.7rem; }

  /* explore toolbar: every filter chip stays visible */
  .chips { flex-wrap: wrap; }
  .chip { padding: 0.5rem 0.95rem; }

  /* the long "catching up …" badge copy wraps instead of panning. the
     same rule in the first 720px block is cascade-dead — the base
     .live-badge { white-space: nowrap } sits LATER in the file and wins
     at equal specificity; from down here it actually applies */
  .live-badge { white-space: normal; flex-wrap: wrap; }
  /* 16px stops iOS Safari zooming the page when these get focus
     (#search already gets 1rem in the first 720px block above) */
  #sort { font-size: 16px; padding-block: 0.45rem; }
  #decode-input { font-size: 16px; }

  /* records / watch / digest cards: horizontal scroll-snap strips */
  .mini-grid {
    display: flex;
    gap: 0.7rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.4rem;
    /* subtle right-edge fade as a "more this way" hint; floors at 35%
       opacity so the last card never disappears */
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 26px), rgba(0, 0, 0, 0.35));
    mask-image: linear-gradient(90deg, #000 calc(100% - 26px), rgba(0, 0, 0, 0.35));
  }
  .mini-card { flex: 0 0 min(76vw, 250px); scroll-snap-align: start; }

  /* chart card: tighter frame so the bars get the width */
  .pulse-chart { padding: 0.75rem 0.65rem 0.5rem; }
  /* the mobile contract asks for ~220px of chart at 1:1 pixels — 194px
     of bars + the ~26px tick row lands there (overrides the 150px above) */
  .pulse-bars { height: 194px; }
  /* the pointer tooltip may never poke past the chart card on a phone */
  .pulse-tip { max-width: calc(100% - 8px); white-space: normal; }
  /* range pills scroll instead of wrapping so the chart keeps its height
     (five pills + the fatter tap padding can overflow a 320px screen) */
  .pulse-ranges {
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .pulse-ranges::-webkit-scrollbar { display: none; }
  .pulse-ranges .chip { flex: none; min-height: 44px; } /* comfortable thumb target */

  /* stats line breathes when it wraps */
  .stats-strip { line-height: 1.75; }

  /* analytics bars: each row is 3 stacked lines here — space the rows */
  .template-bars { gap: 0.85rem; }

  /* decoder + dev: reachable buttons, momentum scrolling in code */
  .decode-actions .btn, .example-row .chip { min-height: 44px; }
  .inst-list, .codeblock, .script { -webkit-overflow-scrolling: touch; }
  .codeblock { font-size: 0.72rem; padding: 0.75rem 0.8rem; }
}

@media (max-width: 460px) {
  /* one comfortable column of coin cards (auto-fill already yields one
     at this width — this makes it a decision, not an accident) */
  .coin-grid { grid-template-columns: 1fr; }

  /* detail: avatar above the name, everything tightens a notch */
  .detail-head { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
  .id-chip { flex-wrap: wrap; max-width: 100%; row-gap: 0.25rem; }
  .tl-item { gap: 0.75rem; }
  .tl-text { font-size: 0.92rem; }
  .tl-meta { font-size: 0.8rem; }
  .nerd-panel { padding: 0.9rem 0.75rem 1.1rem; }
  .script { font-size: 0.7rem; padding: 0.55rem 0.6rem; }
  .utxo { padding: 0.7rem; }
  .utxo-meta { flex-direction: column; gap: 0.15rem; }

  /* digest: keep the 3 counters abreast, restack each tile vertically
     (overrides the row-flip the earlier 460 rule gives hero .stat tiles) */
  .digest-counts { gap: 0.5rem; padding: 0.75rem 0.5rem 0.65rem; }
  .digest-counts .stat { flex-direction: column; align-items: center; gap: 0.1rem; padding: 0; }
  .digest-counts .stat-n { font-size: 1.35rem; }
  .digest .mini-grid { grid-template-columns: 1fr; }

  /* page frames tighten */
  .page-head { padding: 1.7rem 0 1.1rem; }
  .empty-card { padding: 2.1rem 1rem; }
  .pulse-legend { gap: 0.8rem; flex-wrap: wrap; }
}

/* multi-covenant mentions under timeline rows */
.tl-with { margin: 0.25rem 0 0; font-size: 0.86rem; }
.tl-with a { color: var(--accent); }

/* ===================== contract generator ("make this yours") ========== */

.gen-cta-row { display: flex; align-items: center; gap: 0.8rem; margin: 0.6rem 0 0.2rem; flex-wrap: wrap; }
.gen-cta-hint { font-size: 0.85rem; }
.gen-panel {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--card);
  padding: 1rem 1.1rem;
  margin: 0.7rem 0 1rem;
}
.gen-head { margin: 0 0 0.9rem; display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; align-items: baseline; }
.gen-keyhint { font-size: 0.82rem; }
.gen-keyhint code { font-family: var(--mono); background: rgba(255,255,255,0.06); padding: 0.1rem 0.4rem; border-radius: 6px; }
.gen-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0.8rem 1.2rem; margin-bottom: 1rem; }
.gen-field { display: flex; flex-direction: column; gap: 0.25rem; }
.gen-label { font-size: 0.88rem; font-weight: 600; }
.gen-field input {
  font-family: var(--mono);
  font-size: 16px; /* iOS: no zoom */
  background: var(--bg-soft);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.5rem 0.65rem;
}
.gen-field input:focus { outline: none; border-color: var(--accent); }
.gen-hint { font-size: 0.78rem; }
.gen-err { color: var(--burn); font-size: 0.8rem; }
.gen-wait { margin: 0.4rem 0; }
.gen-verify-ok {
  color: var(--born);
  font-size: 0.88rem;
  margin: 0.2rem 0 0.8rem;
}
.gen-block { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 0.8rem; overflow: hidden; }
.gen-block-head {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.5rem 0.8rem;
  background: rgba(255,255,255,0.04);
  font-size: 0.85rem; font-weight: 650;
}
.gen-block-head .copy-btn { margin-left: auto; }
.gen-block pre {
  margin: 0; padding: 0.7rem 0.8rem;
  font-size: 0.78rem; line-height: 1.5;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  white-space: pre; max-height: 340px; overflow-y: auto;
}
@media (max-width: 720px) {
  .gen-fields { grid-template-columns: 1fr; }
}

/* inline absolute times: quiet, non-wrapping segments */
.abs-t { color: var(--faint); white-space: nowrap; }
.tl-meta .abs-t { font-variant-numeric: tabular-nums; }
@media (max-width: 480px) {
  .story-when .abs-t { display: block; margin-left: 0; } /* stack under the relative time on tiny screens */
}

/* ================================ first-visit story tour =============== */
#tour-root .tour-spot {
  position: absolute;
  z-index: 60;
  border-radius: 12px;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 9999px rgba(5, 10, 9, 0.62), 0 0 24px rgba(112, 199, 186, 0.35);
  pointer-events: none;
  transition: all 0.25s ease;
}
#tour-root .tour-card {
  position: absolute;
  z-index: 61;
  width: min(336px, calc(100vw - 24px));
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 0.9rem 1rem 0.8rem;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
}
#tour-root .tour-text { margin: 0 0 0.75rem; font-size: 0.95rem; line-height: 1.55; }
#tour-root .tour-text strong { color: var(--accent); }
#tour-root .tour-nav { display: flex; align-items: center; gap: 0.6rem; }
#tour-root .tour-count { margin-right: auto; font-size: 0.8rem; }
#tour-root .tour-skip { padding: 0.35rem 0.8rem; font-size: 0.82rem; }

.guide-tourline { text-align: center; margin: 1rem 0 0; }

/* the generator entry chip stands out from the plain examples */
.chip-make {
  border-color: var(--border-strong);
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 650;
}
.chip-make:hover { background: var(--accent); color: #06211d; }

.gen-note { margin: 0 0 0.8rem; line-height: 1.55; }
.gen-note strong { color: var(--accent); }

/* reveal preview on unspent commitment states */
.reveal-preview { margin-top: 0.6rem; }
.reveal-row { display: flex; gap: 0.5rem; margin-top: 0.35rem; }
.reveal-input {
  flex: 1; min-width: 0; font-family: var(--mono); font-size: 16px;
  background: var(--bg-soft); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px; padding: 0.45rem 0.6rem;
}
.reveal-hint { margin: 0; font-size: 0.85rem; }

/* apps · covenant families */
.families { margin-bottom: 2.4rem; }
.families-sub { margin: -0.4rem 0 0.9rem; font-size: 0.88rem; }
.family-card { display: flex; align-items: center; gap: 0.9rem; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.8rem 1rem; }
.family-avatars { display: flex; }
.family-avatars a { margin-left: -8px; border-radius: 999px; }
.family-avatars a:first-child { margin-left: 0; }
.family-body { display: flex; flex-direction: column; min-width: 0; }
.family-label { font-weight: 650; }
.family-sub { font-size: 0.82rem; }

.dev-lab-intro { max-width: 68ch; line-height: 1.6; margin: 0 0 1rem; }
.dev-lab-intro a { color: var(--accent); }


/* ================================================================
   overhaul layer — the naturalist's observatory
   surfaces get depth (hairline + soft shadow), the lifecycle palette
   (born/move/burn) carries structure, display serif for key moments.
   ================================================================ */

.site-header {
  background: rgba(10, 16, 15, 0.82);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.wordmark { font-family: var(--display); font-weight: 700; font-size: 1.22rem; letter-spacing: -0.02em; }

.stat, .devcard, .family-card, .mini-card, .record-card {
  box-shadow: var(--hairline), 0 1px 2px rgba(0, 0, 0, 0.18);
}
.digest-count, .tpl-row, .guide-step { box-shadow: none; }
.stat { border-radius: var(--radius); background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent 55%), var(--card); }
.stat b, .stat .stat-num { font-family: var(--mono); }

.devcard {
  transition: transform 0.22s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.22s, background 0.22s;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent 55%), var(--card);
}
.devcard:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  background: linear-gradient(180deg, rgba(112,199,186,0.05), transparent 60%), var(--card-hover);
  text-decoration: none;
}
.devcard h3 { font-family: var(--display); font-weight: 700; font-size: 1.12rem; letter-spacing: -0.01em; }

/* lifecycle palette carries the guide: each step is tinted by its event */
.guide-step:nth-child(1) { border-left: 2px solid var(--born); }
.guide-step:nth-child(2) { border-left: 2px solid var(--move); }
.guide-step:nth-child(3) { border-left: 2px solid var(--burn); }
.guide-step { border-radius: var(--radius-sm); padding-left: 0.9rem; }

.chip, .network-tab, .btn {
  transition: transform 0.16s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.16s, background 0.16s;
}
.chip:hover, .btn:hover { transform: translateY(-1px); }
.chip-make { box-shadow: 0 0 0 1px rgba(112, 199, 186, 0.25), 0 2px 10px rgba(112, 199, 186, 0.08); }

.codeblock, pre.script, .gen-block pre {
  box-shadow: var(--hairline);
  border-radius: var(--radius-sm);
}

.detail-name, #detail-title, .coin-name-big { font-family: var(--display); font-weight: 600; letter-spacing: 0; }

.family-card { transition: transform 0.22s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.22s; }
.family-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }

::selection { background: rgba(112, 199, 186, 0.28); }

html { scrollbar-color: rgba(112, 199, 186, 0.28) transparent; }

@media (prefers-reduced-motion: reduce) {
  .devcard, .chip, .btn, .family-card { transition: none; }
}


/* overhaul layer 2 — inner pages */

/* coin pages: the specimen's name in the display face */
.detail-head h1 { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; }
.detail-summary { font-size: 1.02rem; }

/* story rows: quiet lift, lifecycle tint on the icon side */
.story-row, .lite-story-row {
  transition: background 0.15s, transform 0.15s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.story-row:hover, .lite-story-row:hover { transform: translateX(2px); }

/* decode + dev pages: display face for section h1/h3s */
.decode-title, .dev-title, .view-fade > h1, #view-decode h1, #view-dev h1 {
  font-family: var(--display); font-weight: 600; letter-spacing: 0;
}
.dev-section h2 { margin-top: 2.2rem; }

/* gen panel: give the "your contract" moment the display voice */
.gen-title, .gen-panel h3 { font-family: var(--display); font-weight: 600; }

/* timeline: hairline connector in the lifecycle spirit */
.timeline-item, .tl-item { position: relative; }

/* footer */
.site-footer { border-top: 1px solid rgba(255,255,255,0.06); }
.site-footer a:hover { color: var(--accent); }

/* tables & nerd panel surfaces */
.nerd-panel, .utxo { border-radius: var(--radius-sm); }
.utxo { box-shadow: var(--hairline); }

/* search: focus glow in brand */
#search:focus { border-color: var(--border-strong); box-shadow: 0 0 0 3px rgba(112, 199, 186, 0.12); }

/* mini-grid cards (digest, watchlist, families) hover */
.mini-card { transition: transform 0.18s cubic-bezier(0.2,0.7,0.2,1), border-color 0.18s; }
.mini-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }

@media (prefers-reduced-motion: reduce) {
  .story-row, .lite-story-row, .mini-card { transition: none; }
  .story-row:hover, .lite-story-row:hover, .mini-card:hover { transform: none; }
}


/* ================================================================
   overhaul v2 — mission control
   geometric grotesk, mono instrument labels, blueprint grid, one
   radar sweep across the hero. the serif is gone.
   ================================================================ */

/* the radar sweep — one thin scan line crossing the hero */
.hero::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 62%;
  width: 1px;
  left: 0;
  background: linear-gradient(180deg, transparent, rgba(112, 199, 186, 0.4), transparent);
  box-shadow: 0 0 14px rgba(112, 199, 186, 0.25);
  animation: radar-sweep 7s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  pointer-events: none;
}
@keyframes radar-sweep {
  0% { left: 6%; opacity: 0; }
  8% { opacity: 1; }
  46% { opacity: 1; }
  54% { left: 94%; opacity: 0; }
  100% { left: 94%; opacity: 0; }
}

/* stats read as instruments: mono digits, tick + label */
.stat b, .stat strong, .stat-num {
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.hero-stats .stat { position: relative; overflow: hidden; }
.hero-stats .stat::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent 70%);
  opacity: 0.55;
}

.hero-sub { font-size: clamp(0.98rem, 2.3vw, 1.1rem); }

/* buttons/chips: squarer, technical */
.chip, .btn, .network-tab { border-radius: 9px; }

@media (prefers-reduced-motion: reduce) {
  .hero::after { animation: none; opacity: 0; }
}

/* fixes: brighter instrument digits */
.stat b, .stat strong, .stat-num { color: #a4ecdf; }

.digest-counts .stat, #digest-counts .stat { box-shadow: none; background: transparent; border: none; }

/* freshness line: readable, live dot pops */
.freshness { color: #b9cac6; }
.freshness .live, .freshness strong { color: var(--born); }


/* ================================================================
   overhaul v2b — "it's alive": dossier, LEDs, instrument
   chart, radar states, breathing logo, palette flash
   ================================================================ */

/* instrument chart bezel */
.pulse-chart {
  position: relative;
  border-radius: var(--radius);
  box-shadow: var(--hairline), inset 0 0 40px rgba(0,0,0,0.25);
}
.pulse-chart::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,0.012) 0 1px, transparent 1px 4px);
}

/* 3. dossier: alive coins breathe, retired coins are stamped */
.detail-head [role="img"] { position: relative; display: inline-block; }
.detail-head:has(.pill-alive) [role="img"]::after {
  content: ""; position: absolute; inset: -7px; border-radius: 999px;
  border: 2px solid rgba(111, 217, 164, 0.5);
  animation: alive-ring 2.6s ease-out infinite;
  pointer-events: none;
}
@keyframes alive-ring {
  0% { transform: scale(0.92); opacity: 0.9; }
  70% { transform: scale(1.12); opacity: 0; }
  100% { opacity: 0; }
}
.detail-tags .pill-retired {
  font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.1em;
  border: 1.5px solid var(--burn); color: var(--burn); background: transparent;
  transform: rotate(-3deg); border-radius: 6px; font-weight: 600;
}

/* 4. grid card LEDs */
.pill-alive::before, .pill-retired::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 99px;
  margin-right: 0.35rem; vertical-align: 1px;
}
.pill-alive::before { background: var(--born); box-shadow: 0 0 6px var(--born); animation: led 2.2s ease-in-out infinite; }
.pill-retired::before { background: var(--burn); opacity: 0.8; }
@keyframes led { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* flight-log timeline: connected, glowing nodes */
.tl-icon { position: relative; z-index: 1; }
.tl-icon svg, .tl-icon { filter: drop-shadow(0 0 6px rgba(112, 199, 186, 0.18)); }

/* 5. radar scanning state */
.radar {
  display: inline-block; width: 14px; height: 14px; margin-right: 0.5rem;
  border-radius: 999px; border: 1.5px solid rgba(112, 199, 186, 0.4);
  position: relative; vertical-align: -2px; overflow: hidden;
}
.radar::after {
  content: ""; position: absolute; inset: 0;
  background: conic-gradient(from 0deg, rgba(112,199,186,0.8), transparent 70deg, transparent);
  animation: radar-spin 1.6s linear infinite;
}
@keyframes radar-spin { to { transform: rotate(360deg); } }

/* 6. the eye breathes while watching */
.wordmark-eye circle:last-child { transform-origin: center; animation: eye-pulse 3.4s ease-in-out infinite; }
@keyframes eye-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(0.8); } }
.wordmark:hover .wordmark-eye { filter: drop-shadow(0 0 8px rgba(112, 199, 186, 0.5)); }

/* 7. palette flash on cmd-K */
.palette-flash { animation: pal-flash 0.7s; }
@keyframes pal-flash { 0% { box-shadow: 0 0 0 3px rgba(112, 199, 186, 0.5); } 100% { box-shadow: none; } }

@media (prefers-reduced-motion: reduce) {
  .radar::after, .wordmark-eye circle:last-child { animation: none; }
  .detail-head:has(.pill-alive) [role="img"]::after { animation: none; opacity: 0.5; }
  .pill-alive::before { animation: none; }
}


/* overhaul v2c — cohesion polish */

/* timeline spine reads as a signal line, fading at both ends */
.timeline::before {
  background: linear-gradient(180deg, transparent, rgba(112,199,186,0.28) 12%, rgba(112,199,186,0.28) 88%, transparent) !important;
  width: 1.5px !important;
}

/* the "watching live" dot glows across the site */
.live-dot, .freshness .live::before, [data-net-word] { }
.freshness .live { position: relative; }

/* record-holder + digest cards: unify hover with the rest */
.record-card, .digest-count { transition: transform 0.18s cubic-bezier(0.2,0.7,0.2,1), border-color 0.18s; }
.record-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }

/* grid coin cards: lift + brand edge on hover */
.card {
  transition: transform 0.18s cubic-bezier(0.2,0.7,0.2,1), border-color 0.18s, background 0.18s;
  box-shadow: var(--hairline);
}
.card:hover { transform: translateY(-2px); border-color: var(--border-strong); }

/* decode + gen: technical panels */
.gen-block pre, .codeblock { background: #0b0f0e; }
.chip-make { font-weight: 600; }

/* network tab active gets the gradient tick feel */
.network-tab[aria-pressed="true"] { box-shadow: inset 0 0 0 1px rgba(112,199,186,0.4); }

/* pill polish: mono, tighter */
.pill { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; }

@media (prefers-reduced-motion: reduce) {
  .record-card, .card { transition: none; }
  .record-card:hover, .card:hover { transform: none; }
}


/* ================================================================
   REDESIGN — "GHOSTDAG": the living block-lattice
   Deeper luminous abyss, Bricolage display, the BlockDAG as the hero.
   This layer intentionally overrides the earlier mission-control passes.
   ================================================================ */

:root {
  --bg: #05100e;
  --bg-soft: #081613;
  --card: #0b1a17;
  --card-hover: #0f231e;
  --border: rgba(120, 220, 200, 0.09);
  --border-strong: rgba(73, 234, 203, 0.36);
  --text: #eaf6f2;
  --muted: #9fb8b2;
  --faint: #7f9a94;
  --accent: #49eacb;
  --accent-soft: rgba(73, 234, 203, 0.12);
  --born: #5be49b; --born-soft: rgba(91, 228, 155, 0.15);
  --move: #8ab4ff; --move-soft: rgba(138, 180, 255, 0.15);
  --burn: #ffb067; --burn-soft: rgba(255, 176, 103, 0.15);
  --display: "Bricolage Grotesque", "Space Grotesk", system-ui, sans-serif;
}

body {
  background:
    radial-gradient(1200px 620px at 50% -220px, rgba(73, 234, 203, 0.10), transparent 68%),
    radial-gradient(1000px 800px at 92% 4%, rgba(91, 228, 155, 0.04), transparent 64%),
    radial-gradient(900px 720px at 4% 24%, rgba(138, 180, 255, 0.035), transparent 64%),
    var(--bg);
}

/* ---- the DAG hero ---- */
.hero {
  position: relative;
  padding: 5.4rem 0 2.2rem;
  min-height: 540px;
  overflow: hidden;
  background-image: none !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
}
.hero::before,          /* kill the old speck/grid layer */
.hero::after {          /* kill the old radar sweep */
  display: none !important;
}
.dag-canvas {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 100%;
  z-index: 0;
  -webkit-mask-image: radial-gradient(130% 108% at 50% -8%, #000 42%, transparent 94%);
  mask-image: radial-gradient(130% 108% at 50% -8%, #000 42%, transparent 94%);
}
/* legibility scrim behind the headline, so the lattice reads as depth */
.hero > *:not(.dag-canvas) { position: relative; z-index: 1; }
.hero-title {
  position: relative;
  font-family: var(--display);
  font-optical-sizing: auto;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.035em;
  max-width: 18ch;
  text-shadow: 0 2px 40px rgba(5, 16, 14, 0.9);
}
.hero-title em {
  font-style: normal;
  background: linear-gradient(96deg, var(--accent), var(--born) 60%, #b7f5e6);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub {
  font-size: clamp(1.02rem, 2.3vw, 1.2rem);
  color: var(--muted);
  text-shadow: 0 2px 30px rgba(5, 16, 14, 0.85);
}

/* stat cards: luminous glass on the abyss */
.hero-stats .stat {
  background: linear-gradient(180deg, rgba(73,234,203,0.05), rgba(11,26,23,0.55));
  border-color: var(--border);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.hero-stats .stat::before { background: linear-gradient(90deg, var(--accent), transparent 72%); opacity: 0.7; }
.stat b, .stat strong, .stat-n { color: #b7f5e6; }

/* section labels pick up the electric accent */
h2::before { color: var(--accent); }

/* the wordmark eye + display users adopt Bricolage's weight */
.wordmark { font-family: var(--display); font-weight: 800; letter-spacing: -0.03em; }
.detail-head h1 { font-family: var(--display); font-weight: 700; letter-spacing: -0.03em; }
.devcard h3 { font-family: var(--display); font-weight: 700; }

/* guide steps: the lifecycle as luminous stages */
.guide-step { background: linear-gradient(180deg, rgba(255,255,255,0.015), transparent 60%), var(--card); }
.guide-step:nth-child(1) { box-shadow: -2px 0 16px -8px var(--born); }
.guide-step:nth-child(2) { box-shadow: -2px 0 16px -8px var(--move); }
.guide-step:nth-child(3) { box-shadow: -2px 0 16px -8px var(--burn); }

@media (max-width: 640px) {
  .hero { min-height: 440px; padding-top: 3.4rem; }
}

/* ================================================================
   BUILD page + API docs — GHOSTDAG language
   ================================================================ */

.page-eyebrow {
  font-family: var(--mono); font-size: 0.76rem; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent);
  margin: 0 0 0.6rem;
}
.page-head h1 .grad, h1 .grad {
  background: linear-gradient(96deg, var(--accent), var(--born) 65%, #b7f5e6);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.build-head, .api-docs .page-head { padding: 2.6rem 0 1.4rem; }
.build-head h1, .api-docs h1 {
  font-family: var(--display); font-weight: 700; letter-spacing: -0.03em;
  font-size: clamp(2.1rem, 5vw, 3.3rem); line-height: 1.02; margin: 0 0 0.7rem;
}
.build-cta-row { margin-top: 1.5rem; }
.build-hero-cmd {
  display: inline-flex; align-items: center; gap: 1rem;
  font-family: var(--mono); font-size: 1.05rem; color: var(--text);
  background: linear-gradient(180deg, rgba(73,234,203,0.06), rgba(11,26,23,0.7));
  border: 1px solid var(--border-strong); border-radius: 12px;
  padding: 0.85rem 1.2rem; cursor: pointer; transition: border-color 0.15s, transform 0.15s;
}
.build-hero-cmd:hover { transform: translateY(-1px); border-color: var(--accent); }
.build-hero-cmd .copy-hint { font-family: var(--sans); font-size: 0.72rem; color: var(--faint); letter-spacing: 0.04em; }
.build-hero-cmd.copied .copy-hint::after { content: " ✓ copied"; color: var(--born); }

.build-section { margin: 2.6rem 0; }
.build-lead { max-width: 68ch; color: var(--muted); margin: -0.3rem 0 1.3rem; line-height: 1.6; }
.build-lead a, .build-foot a { color: var(--accent); }

/* the flow — a numbered, lifecycle-tinted sequence */
.flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.flow-step { display: flex; gap: 1rem; align-items: flex-start; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem 1.2rem; box-shadow: var(--hairline); }
.flow-n { flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-family: var(--mono); font-weight: 600; font-size: 0.9rem; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--border-strong); }
.flow-step strong { display: block; font-family: var(--display); font-weight: 600; margin-bottom: 0.15rem; }
.flow-step span { color: var(--muted); font-size: 0.95rem; }
.flow-born .flow-n { color: var(--born); background: var(--born-soft); border-color: rgba(91,228,155,0.4); }
.flow-move .flow-n { color: var(--move); background: var(--move-soft); border-color: rgba(138,180,255,0.4); }
.flow-burn .flow-n { color: var(--burn); background: var(--burn-soft); border-color: rgba(255,176,103,0.4); }

.build-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 1rem; }
.build-card { background: linear-gradient(180deg, rgba(255,255,255,0.015), transparent 55%), var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--hairline); display: block; }
a.build-card { transition: transform 0.18s cubic-bezier(0.2,0.7,0.2,1), border-color 0.18s; }
a.build-card:hover { transform: translateY(-3px); border-color: var(--border-strong); text-decoration: none; }
.build-card-head { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.7rem; }
.build-card-head h3 { font-family: var(--display); font-weight: 700; font-size: 1.12rem; margin: 0; }
.build-card p { color: var(--muted); font-size: 0.92rem; line-height: 1.55; margin: 0 0 0.9rem; }
.build-card p em { color: var(--text); font-style: normal; font-weight: 600; }
.bc-icon { flex: none; width: 26px; height: 26px; border-radius: 7px; background: var(--accent-soft); border: 1px solid var(--border-strong); position: relative; }
.bc-icon::after { content: ""; position: absolute; inset: 7px; border-radius: 3px; background: var(--accent); }
.bc-mecenas::after { background: var(--born); } .bc-escrow::after { background: var(--move); } .bc-lastwill::after { background: var(--burn); } .bc-examples::after { background: var(--accent); }
.build-make { color: var(--accent); font-weight: 600; font-size: 0.92rem; }
.build-cmd { display: block; font-family: var(--mono); font-size: 0.8rem; line-height: 1.5; background: #06120f; border: 1px solid var(--border); border-radius: 9px; padding: 0.6rem 0.75rem; color: var(--text); cursor: pointer; white-space: pre-wrap; overflow-wrap: anywhere; transition: border-color 0.15s; }
.build-cmd:hover { border-color: var(--border-strong); }
.build-cmd.copied { border-color: var(--born); }
.build-cmd.copied::after { content: " ✓"; color: var(--born); }

.build-steps { display: grid; gap: 0.8rem; }
.build-stepblock { display: flex; gap: 1.2rem; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem 1.3rem; box-shadow: var(--hairline); }
.bs-num { flex: none; font-family: var(--mono); font-weight: 600; font-size: 1.5rem; color: var(--accent); opacity: 0.5; }
.bs-body { min-width: 0; flex: 1; }
.bs-body h3 { font-family: var(--display); font-weight: 600; font-size: 1.08rem; margin: 0 0 0.35rem; }
.bs-body > p { color: var(--muted); margin: 0 0 0.7rem; line-height: 1.55; }
.bs-body a { color: var(--accent); }
.bs-alt { font-size: 0.85rem; color: var(--faint) !important; margin: 0.6rem 0 0 !important; }
.build-foot { margin-top: 1.4rem; color: var(--faint); font-size: 0.9rem; }

/* ---- API docs ---- */
.api-layout { display: grid; grid-template-columns: 200px 1fr; gap: 2.4rem; align-items: start; }
.api-nav { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 0.1rem; font-size: 0.9rem; max-height: calc(100vh - 100px); overflow-y: auto; }
.api-nav-group { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin: 1rem 0 0.35rem; }
.api-nav-group:first-child { margin-top: 0; }
.api-nav a { color: var(--muted); padding: 0.28rem 0.6rem; border-radius: 7px; border-left: 2px solid transparent; }
.api-nav a:hover { color: var(--text); text-decoration: none; background: var(--bg-soft); }
.api-nav a[aria-current="true"] { color: var(--accent); border-left-color: var(--accent); background: var(--accent-soft); }
.api-main { min-width: 0; }
.api-block { margin-bottom: 2.2rem; scroll-margin-top: 84px; }
.api-block h2 { font-family: var(--display); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.01em; color: var(--text); text-transform: none; }
.api-block h2::before, .api-block h3::before { content: none; }
.api-block h3 { font-family: var(--display); font-weight: 600; font-size: 1.1rem; color: var(--text); text-transform: none; letter-spacing: 0; margin: 0 0 0.5rem; }
.api-meta { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.api-meta th { text-align: left; color: var(--faint); font-weight: 500; padding: 0.5rem 1.2rem 0.5rem 0; white-space: nowrap; vertical-align: top; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.api-meta td { padding: 0.5rem 0; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 0.92rem; }

.api-endpoint { margin-bottom: 2.6rem; scroll-margin-top: 84px; padding-bottom: 2rem; border-bottom: 1px solid var(--border); }
.ep-head { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; margin-bottom: 0.7rem; }
.method { font-family: var(--mono); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; padding: 0.25rem 0.55rem; border-radius: 6px; }
.method.get { color: var(--born); background: var(--born-soft); border: 1px solid rgba(91,228,155,0.35); }
.ep-path { font-family: var(--mono); font-size: 1rem; color: var(--text); word-break: break-all; }
.ep-path + .ep-q, .ep-q { font-family: var(--mono); font-size: 0.9rem; color: var(--faint); }
.ep-desc { color: var(--muted); line-height: 1.6; margin: 0 0 1rem; max-width: 70ch; }
.ep-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.ep-example { min-width: 0; margin-bottom: 1rem; }
.ep-ex-head { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); margin-bottom: 0.4rem; }
.ep-ex-head .ok { color: var(--born); } .ep-ex-head .warn { color: var(--burn); }
.api-docs .codeblock { background: #06120f; border: 1px solid var(--border); border-radius: 10px; padding: 0.9rem 1rem; overflow-x: auto; margin: 0; }
.api-docs .codeblock code { font-family: var(--mono); font-size: 0.8rem; line-height: 1.55; color: #cfe7e0; white-space: pre; }
.ep-fields, .ep-params { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: 0.88rem; }
.ep-fields th, .ep-params th { text-align: left; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); font-weight: 600; padding: 0 1rem 0.5rem 0; border-bottom: 1px solid var(--border); }
.ep-fields td, .ep-params td { padding: 0.55rem 1rem 0.55rem 0; border-bottom: 1px solid var(--border); color: var(--muted); vertical-align: top; }
.ep-fields td:first-child { color: var(--text); white-space: nowrap; }
.api-foot { margin-top: 1rem; }
.api-foot a { color: var(--accent); }

@media (max-width: 800px) {
  .api-layout { grid-template-columns: 1fr; gap: 1rem; }
  .api-nav { position: static; flex-flow: row wrap; max-height: none; gap: 0.3rem 0.5rem; padding-bottom: 0.8rem; border-bottom: 1px solid var(--border); margin-bottom: 1.4rem; }
  .api-nav-group { width: 100%; margin: 0.5rem 0 0; }
  .ep-cols { grid-template-columns: 1fr; }
}

/* verified contract — Etherscan-style "verified source", for covenants */
.verified-contract { margin: 0.7rem 0; border: 1px solid rgba(91,228,155,0.28); border-radius: var(--radius-sm); background: linear-gradient(180deg, rgba(91,228,155,0.05), transparent 60%), var(--card); padding: 0.9rem 1rem; box-shadow: var(--hairline); }
.vc-head { display: flex; align-items: center; flex-wrap: wrap; gap: 0.55rem; }
.vc-head strong { font-family: var(--display); font-weight: 700; }
.vc-badge { font-family: var(--mono); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--born); background: var(--born-soft); border: 1px solid rgba(91,228,155,0.4); border-radius: 6px; padding: 0.22rem 0.5rem; }
.vc-proof { font-family: var(--mono); font-size: 0.76rem; color: var(--born); margin-left: auto; }
.vc-args { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin: 0.7rem 0; }
.vc-arg { display: flex; gap: 0.4rem; font-size: 0.85rem; }
.vc-arg .mono { color: var(--text); }
.vc-source summary { cursor: pointer; color: var(--accent); font-size: 0.85rem; }
.vc-source pre.script { margin-top: 0.5rem; max-height: 340px; overflow: auto; }

/* visual script debugger — the symbolic stepper */
.dbg-cta { margin: 1rem 0 0.4rem; display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.dbg-open-btn { border-color: var(--border-strong); }
.dbg { margin-top: 0.8rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); overflow: hidden; box-shadow: var(--hairline); }
.dbg-controls { display: flex; align-items: center; gap: 0.7rem; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--border); background: var(--bg-soft); }
.dbg-btn { padding: 0.3rem 0.7rem; }
.dbg-slider { flex: 1; accent-color: var(--accent); }
.dbg-count { font-size: 0.82rem; color: var(--muted); white-space: nowrap; }
.dbg-close { margin-left: 0.2rem; font-size: 0.8rem; }
.dbg-now { padding: 0.8rem 0.9rem; display: flex; gap: 0.7rem; align-items: baseline; border-bottom: 1px solid var(--border); }
.dbg-now-op { font-size: 1.05rem; font-weight: 600; color: var(--accent); }
.dbg-now-note { color: var(--muted); }
.dbg-stacks { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); }
.dbg-col { background: #06120f; padding: 0.7rem 0.9rem; min-height: 130px; }
.dbg-col-h { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin-bottom: 0.5rem; }
.dbg-item { font-family: var(--mono); font-size: 0.85rem; color: var(--muted); padding: 0.28rem 0.55rem; margin-bottom: 0.28rem; border-radius: 7px; background: var(--bg-soft); border: 1px solid var(--border); word-break: break-all; }
.dbg-top { color: var(--text); border-color: var(--border-strong); background: var(--accent-soft); }
.dbg-empty { font-family: var(--mono); font-size: 0.82rem; color: var(--faint); font-style: italic; }
.dbg-oplist { max-height: 260px; overflow: auto; border-top: 1px solid var(--border); font-family: var(--mono); font-size: 0.8rem; }
.dbg-op { display: flex; gap: 0.9rem; padding: 0.24rem 0.9rem; cursor: pointer; color: var(--muted); }
.dbg-op:hover { background: var(--bg-soft); }
.dbg-active { background: var(--accent-soft); color: var(--text); }
.dbg-op-off { color: var(--faint); }
.dbg-footnote { padding: 0.6rem 0.9rem; margin: 0; font-size: 0.78rem; border-top: 1px solid var(--border); }
@media (max-width: 640px) { .dbg-stacks { grid-template-columns: 1fr; } }

/* KIP-16 ZK-app panel */
.zk-panel { margin: 0.7rem 0; border: 1px solid rgba(138,180,255,0.34); border-radius: var(--radius-sm); background: linear-gradient(180deg, rgba(138,180,255,0.06), transparent 60%), var(--card); padding: 0.9rem 1rem; box-shadow: var(--hairline); }
.zk-head { display: flex; align-items: center; flex-wrap: wrap; gap: 0.55rem; margin-bottom: 0.4rem; }
.zk-head strong { font-family: var(--display); font-weight: 700; }
.zk-badge { font-family: var(--mono); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.05em; color: var(--move); background: var(--move-soft); border: 1px solid rgba(138,180,255,0.45); border-radius: 6px; padding: 0.22rem 0.55rem; }
.zk-sys { margin-left: auto; font-family: var(--mono); font-size: 0.8rem; color: var(--move); }
.zk-desc { color: var(--muted); line-height: 1.55; margin: 0; font-size: 0.92rem; }
.zk-desc code { color: var(--move); }

/* based-app lanes — activity by payload namespace */
.lanes { margin-bottom: 2.4rem; }
.lane-row { display: grid; grid-template-columns: minmax(140px, 200px) 1fr auto; align-items: center; gap: 1rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.lane-ns { font-size: 0.92rem; }
.ns-ascii { font-family: var(--mono); font-weight: 600; color: var(--accent); }
.lane-track { height: 8px; border-radius: 99px; background: var(--bg-soft); overflow: hidden; }
.lane-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--move), var(--accent)); border-radius: 99px; }
.lane-counts { font-size: 0.82rem; white-space: nowrap; }
@media (max-width: 640px) { .lane-row { grid-template-columns: 1fr auto; } .lane-track { display: none; } }

/* ---- fixes: debugger stability, uniform lanes, family member chips ---- */

/* debugger: fixed-height stacks so the panel never grows/jumps between steps */
.dbg-col { height: 200px; min-height: 0; overflow-y: auto; }

/* lanes: one uniform label per row, no teal/hex split, no wrapping */
.lane-ns { font-family: var(--mono); font-weight: 600; font-size: 0.9rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* family cards: every member is a clickable named chip (not anonymous bubbles) */
.family-card { display: block; }
.family-head { display: flex; flex-direction: column; gap: 0.15rem; margin-bottom: 0.75rem; }
.family-members { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.fam-member { display: inline-flex; align-items: center; gap: 0.45rem; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 999px; padding: 0.28rem 0.75rem 0.28rem 0.32rem; font-size: 0.9rem; color: var(--text); transition: border-color 0.15s, transform 0.15s; }
.fam-member:hover { border-color: var(--border-strong); transform: translateY(-1px); text-decoration: none; }

/* in-browser spend simulation */
.sim-panel { margin: 0.9rem 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); padding: 1rem 1.1rem; box-shadow: var(--hairline); }
.sim-head { display: flex; align-items: center; flex-wrap: wrap; gap: 0.55rem; }
.sim-head strong { font-family: var(--display); font-weight: 700; }
.sim-badge { font-family: var(--mono); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--border-strong); border-radius: 6px; padding: 0.22rem 0.55rem; }
.sim-sub { margin: 0.4rem 0 0.7rem; font-size: 0.9rem; line-height: 1.5; }
.sim-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.sim-chip { font-size: 0.88rem; padding: 0.42rem 0.8rem; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-soft); color: var(--muted); cursor: pointer; transition: border-color 0.15s, color 0.15s, transform 0.1s; }
.sim-chip:hover { border-color: var(--border-strong); color: var(--text); }
.sim-chip.sim-active { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }
.sim-result:not(:empty) { margin-top: 0.85rem; }
.sim-verdict { display: flex; align-items: baseline; gap: 0.6rem; font-size: 0.95rem; padding: 0.55rem 0.8rem; border-radius: var(--radius-sm); }
.sim-icon { font-family: var(--mono); font-weight: 700; white-space: nowrap; }
.sim-pass { background: var(--born-soft); border: 1px solid rgba(111,217,164,0.4); }
.sim-pass .sim-icon { color: var(--born); }
.sim-fail { background: var(--burn-soft); border: 1px solid rgba(242,165,102,0.4); }
.sim-fail .sim-icon { color: var(--burn); }
.sim-na { background: var(--bg-soft); border: 1px solid var(--border); color: var(--muted); }
.sim-rule { margin-top: 0.4rem; padding-left: 0.8rem; font-family: var(--mono); font-size: 0.86rem; color: var(--burn); }
.sim-note { margin: 0.5rem 0 0; font-size: 0.8rem; line-height: 1.45; }

/* covenant security lint — the audit panel */
.lint-panel { margin: 0.8rem 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); box-shadow: var(--hairline); overflow: hidden; }
.lint-panel > summary { cursor: pointer; padding: 0.75rem 1rem; display: flex; align-items: center; gap: 0.5rem; list-style: none; }
.lint-panel > summary::-webkit-details-marker { display: none; }
.lint-badge { font-family: var(--mono); font-size: 0.74rem; font-weight: 600; color: var(--text); }
.lint-body { padding: 0.3rem 1rem 0.9rem; display: flex; flex-direction: column; gap: 0.6rem; }
.lint-row { display: flex; gap: 0.7rem; align-items: baseline; font-size: 0.92rem; line-height: 1.5; }
.lint-dot { flex: none; width: 9px; height: 9px; border-radius: 99px; margin-top: 0.35rem; }
.lint-ok .lint-dot { background: var(--born); box-shadow: 0 0 8px var(--born); }
.lint-warn .lint-dot { background: var(--burn); box-shadow: 0 0 8px var(--burn); }
.lint-high .lint-dot { background: #ff6b6b; box-shadow: 0 0 10px #ff6b6b; }
.lint-high strong { color: #ff8f8f; }

/* collapsible explore sections (based-app activity, inscriptions, apps) */
details.collapse-sec > summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 0.7rem; padding: 0.25rem 0; }
details.collapse-sec > summary::-webkit-details-marker { display: none; }
details.collapse-sec > summary::before { content: '▸'; color: var(--accent); font-size: 0.85rem; align-self: center; transition: transform 0.15s ease; }
details.collapse-sec[open] > summary::before { transform: rotate(90deg); }
details.collapse-sec > summary h2 { margin: 0; display: inline-block; }
details.collapse-sec > summary:hover h2 { color: var(--accent); }
.collapse-count { font-size: 0.85rem; font-family: var(--mono); }

/* plain-English explainer panel */
.explain-panel { margin: 0.8rem 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); box-shadow: var(--hairline); overflow: hidden; }
.explain-panel > summary { cursor: pointer; padding: 0.7rem 1rem; list-style: none; display: flex; align-items: center; gap: 0.5rem; }
.explain-panel > summary::-webkit-details-marker { display: none; }
.explain-badge { font-family: var(--mono); font-size: 0.74rem; font-weight: 600; color: var(--accent); }
.explain-body { margin: 0; padding: 0 1rem 0.95rem; line-height: 1.62; color: var(--muted); max-width: 68ch; }
.explain-body strong { color: var(--text); }
.explain-body code { color: var(--accent); font-size: 0.86em; }

/* app graph — force-directed cluster of a family */
.appgraph-wrap { margin-top: 0.3rem; }
.appgraph-canvas { width: 100%; height: 380px; display: block; border: 1px solid var(--border); border-radius: var(--radius); background: #06120f; }
.appgraph-controls { display: flex; align-items: center; gap: 0.9rem; margin-top: 0.7rem; }

/* SilverScript compiler playground */
.compiler-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1rem; margin-top: 0.4rem; }
.compiler-label { display: block; font-size: 0.82rem; color: var(--muted); margin-bottom: 0.4rem; }
.compiler-src, .compiler-argsbox { width: 100%; font-family: var(--mono); font-size: 0.82rem; line-height: 1.5; background: #06120f; color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.8rem; resize: vertical; }
.compiler-src { min-height: 340px; }
.compiler-argsbox { min-height: 120px; }
.compiler-side { display: flex; flex-direction: column; }
.compiler-controls { display: flex; gap: 0.6rem; margin-top: 0.8rem; flex-wrap: wrap; }
.compiler-result:not(:empty) { margin-top: 1rem; }
.compile-ok { color: var(--born); font-weight: 600; font-size: 0.92rem; }
.compile-err { color: var(--burn); font-family: var(--mono); font-size: 0.86rem; background: var(--burn-soft); border: 1px solid rgba(242,165,102,0.35); border-radius: var(--radius-sm); padding: 0.7rem 0.9rem; white-space: pre-wrap; }
.compile-hex { margin: 0.6rem 0; max-height: 130px; overflow: auto; word-break: break-all; cursor: pointer; }
.compile-tpl { color: var(--accent); font-size: 0.9rem; margin-bottom: 0.5rem; }
.compile-actions { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
@media (max-width: 720px) { .compiler-grid { grid-template-columns: 1fr; } }

/* verify-and-publish: community source + publish result */
.registry-src { margin: 0.7rem 0; }
.registry-src > summary { cursor: pointer; list-style: none; }
.registry-src > summary::-webkit-details-marker { display: none; }
.compile-publish-result:not(:empty) { margin-top: 0.7rem; }

/* ZK proof verification */
.zk-verify { margin-top: 0.7rem; display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.zk-verify-btn { border-color: rgba(138,180,255,0.45); }
.zk-verify-result { font-size: 0.9rem; }
.zk-valid { color: var(--born); font-weight: 600; }
.zk-invalid { color: var(--burn); font-weight: 600; }

/* playground mode switch (read | write) */
.pg-modes { display: inline-flex; gap: 0.3rem; padding: 0.3rem; margin-bottom: 1.4rem; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 999px; }
.pg-mode { padding: 0.45rem 1.1rem; border-radius: 999px; font-size: 0.92rem; font-weight: 500; color: var(--muted); text-decoration: none; transition: background 0.15s, color 0.15s; }
.pg-mode:hover { color: var(--text); text-decoration: none; }
.pg-mode.pg-active { background: var(--accent); color: var(--bg); font-weight: 600; }

/* simulate panel is now collapsible (a deep tool) */
details.sim-panel > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 0.5rem; }
details.sim-panel > summary::-webkit-details-marker { display: none; }
details.sim-panel > summary::before { content: '▸'; color: var(--accent); font-size: 0.85rem; transition: transform 0.15s; }
details.sim-panel[open] > summary::before { transform: rotate(90deg); }

/* deep-tools divider in the read tier stack */
.deep-tools-head { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; margin: 1.6rem 0 0.4rem; padding-top: 1rem; border-top: 1px solid var(--border); }

/* Write-mode template picker */
.compiler-templates { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }

/* collapsed CLI wall on Write */
.cli-wall { margin-top: 1.6rem; border-top: 1px solid var(--border); }
.cli-wall-sum { cursor: pointer; list-style: none; font-family: var(--mono); font-size: 0.86rem; color: var(--muted); padding: 0.9rem 0; }
.cli-wall-sum::-webkit-details-marker { display: none; }
.cli-wall-sum::before { content: '▸ '; color: var(--accent); }
.cli-wall[open] .cli-wall-sum::before { content: '▾ '; }
.cli-wall:not([open]) > *:not(summary) { display: none; }
