/* fx16: pulse lanes, what's-next lanes, type, color, accents, header, cursors. */

/* ---- tokens: one color, one meaning ---- */
:root {
  --fx16-kas: #1f5be0;          /* Kaspa block / live */
  --fx16-kas-ink: #0f2a8f;
  --fx16-btc: #b15b12;          /* Bitcoin */
  --fx16-other: #5c6370;        /* other chains */
  --fx16-attack: #b42318;       /* attacker */
  --display: var(--font);
  --sans: var(--font);
}

/* One sans everywhere; mono only for numbers and hashes */
html, body, button, input, select, textarea, .wm, .p-h1, .zh, .cmp-h,
.fx5-usp-h, .fx2-toy-h, .fx3-guess-h, .rn-h1, .live-h, .pf-k, .fv-n, .sv-bignum {
  font-family: var(--font);
}
.num, #tenCount, #hudRate, .fx16-cap b, .cmp-n b, .fv-n, .sv-bignum,
[data-snap], .ten-t, code, kbd, .hash, .mono, #fx3GuessClock, .fp-clock,
.rn-time, .rn-score {
  font-variant-numeric: tabular-nums;
}
.num, #tenCount, #hudRate, .fx16-cap b, .cmp-n b, [data-snap],
code, kbd, .hash, #fx3GuessClock, .fp-clock, .rn-time {
  font-family: var(--mono);
}

/* No uppercase mono kickers */
.p-badge, .proof .pl, .ch-kicker, .door-tag, .tour-more b,
.rv-card .k, .rc-k, .rc-grid .k, .fx-mq-k, .fx4-secrets-btn,
.side-name, .deeper .k, #moose .meta, .site-foot h2, .grp-label,
.tk-h, .rail .rail-h, .ke-legend .kl-h, .prevnext .pn-dir, .deep-tile .dt-k,
.rail-ch .rail-h, .race-strip .rs-name, .cross-strip .cs-k, .takeaway .tk-k,
.hudRateL, #hudRateL, .st-tag, .cmp-n small {
  font-family: var(--font) !important;
  font-weight: 600;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

/* Phone type floor: 14px, axis labels 12px */
@media (max-width: 760px) {
  .p-badge, .proof .pl, .ch-kicker, .door-tag, .tour-more b,
  .rv-card .k, .rc-k, .rc-grid .k, .fx-mq-k, .side-name, .deeper .k,
  .tk-h, .rail .rail-h, .ke-legend .kl-h, .prevnext .pn-dir, .deep-tile .dt-k,
  .race-strip .rs-name, .cross-strip .cs-k, .takeaway .tk-k, #hudRateL,
  .st-tag, .cmp-n small, .fx16-src, .fx16-note, .fv-u, .pf-src, .pl {
    font-size: 14px !important;
    line-height: 1.35;
  }
  .rv-axis, .fx16-axis, .cmp-lane + .cmp-n, .d3-hint {
    font-size: 12px !important;
  }
}

/* ---- kill remaining AI accents ---- */
.p-h1, .p-hero.fx8-dag-on #ten-h, .p-hero #ten-h {
  text-shadow: none !important;
}
.ten-t, .rn-go, .btn.primary, .pf, .sz-kas, .sc .sc-card, .ps canvas, .tm {
  box-shadow: none !important;
}
.p-badge, .p-badge.live {
  display: inline;
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--muted);
  font: 600 14px/1.3 var(--font) !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}
.p-badge::before, .p-badge.live::before { content: none !important; display: none !important; }
.os-dots { display: none !important; }
.os-ctl::before { content: none; }
.mark { display: none !important; }

/* Five Kaspa numbers: one blue, not a pastel set */
.fv-rate, .fv-seen, .fv-secs, .fv-mined, .fv-zero { --c: var(--fx16-kas) !important; }
.fv li {
  border-radius: 4px;
  background: var(--bg);
  border: 1px solid var(--line);
}
.fv-pic { opacity: .2; }

/* ---- cursors: pointer only on real controls ---- */
.p-hero, .p-kick, #ten, #tenCount, #tenLine, #tenAge, #tenBadge,
#fx8Dag, canvas, .fx6-pulse, .kicker, .pl, .ch-kicker {
  cursor: auto;
}
a, button, [role="button"], [role="tab"], select, input, textarea, label,
#ten-h, #tenRow, .ten-t, .tour-row, .tour-more, .fx14-go, .fx8-how-open,
.term, summary, .panel-tab,
#stCanvas, .rn.on .rn-cv, #fx2ToyCv, #rvCanvas, #fx3GuessPad {
  cursor: pointer;
}

/* ---- iPhone header: one closed row ---- */
@media (max-width: 760px) {
  :root { --bar-h: 56px !important; }
  header.bar .bar-in,
  .bar:has(#barMore) .bar-in,
  .bar-in {
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 4px 8px !important;
    min-height: 44px !important;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
  }
  header.bar .chapnav,
  .bar:has(#barMore) .chapnav,
  .bar-in > .chapnav {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    flex: none !important;
    display: block !important;
    order: 0 !important;
    pointer-events: none !important;
  }
  .bar.more .bar-in { flex-wrap: wrap !important; }
  .bar.more #barSwitch,
  .bar.more .switch {
    display: flex !important;
    flex-wrap: wrap !important;
    order: 8 !important;
    flex: 1 1 100% !important;
    width: 100% !important;
    gap: 8px !important;
    margin: 4px 0 2px !important;
    pointer-events: auto !important;
  }
  .bar.more #barSwitch .chapnav,
  .fx16-more-slot .chapnav {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    clip: auto !important;
    flex: 1 1 100% !important;
    display: block !important;
    pointer-events: auto !important;
    order: 0 !important;
  }
  .bar.more #barSwitch .chapnav select,
  .fx16-more-slot .chapnav select {
    width: 100% !important;
    min-height: 44px !important;
    height: 44px !important;
    font-size: 16px !important;
  }
  .bar .brand { order: 1 !important; flex: none !important; }
  .bar .kp-path {
    order: 3 !important;
    margin-left: auto !important;
    height: 44px !important;
    min-height: 44px !important;
    min-width: 44px !important;
    width: auto !important;
    padding: 0 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .bar .icon-btn,
  .bar .bar-more,
  .bar .fx8-how-open {
    width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    min-width: 44px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 0 !important;
  }
  .bar .icon-btn { order: 4 !important; }
  .bar .fx8-how-open { order: 5 !important; }
  .bar .bar-more { order: 6 !important; }
  /* How to lives in the more drawer on the phone */
  .bar .fx8-how-open { display: none !important; }
  .bar.more #barSwitch .fx8-how-open,
  .fx16-more-slot .fx8-how-open {
    display: inline-flex !important;
    width: auto !important;
    min-width: 44px !important;
    padding: 0 12px !important;
    font: 600 14px/1 var(--font) !important;
    border: 0 !important;
    border-bottom: 1px solid var(--line) !important;
    background: transparent !important;
    border-radius: 0 !important;
  }
}

/* ---- pulse lanes ---- */
.fx15-pulse-sec, #kaspa-vs-now { max-width: 40rem; }
#kaspa-vs-now, #whats-next, #pulse-h { scroll-margin-top: 100px; }
@media (max-width: 760px) {
  #kaspa-vs-now, #whats-next, #pulse-h { scroll-margin-top: 72px; }
}
.fx15-pulse-lede, .fx16-lede {
  margin: 0 0 16px;
  font: 500 16px/1.45 var(--font);
  color: var(--muted);
  max-width: 40rem;
}
.fx16-lanes, #fx15Pulse {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
}
.fx16-lane {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  grid-template-rows: auto auto;
  column-gap: 16px;
  row-gap: 4px;
  align-items: center;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
}
.fx16-lane-hd { min-width: 0; }
.fx16-lane h3, .fx16-pname {
  margin: 0;
  font: 650 16px/1.25 var(--font);
  color: var(--text);
}
.fx16-lane h3 a, .fx16-pname a { color: inherit; text-decoration: none; }
.fx16-lane h3 a:hover, .fx16-pname a:hover { text-decoration: underline; }
.fx16-cap {
  margin: 4px 0 0;
  font: 400 14px/1.3 var(--font);
  color: var(--muted);
}
.fx16-cap b {
  display: block;
  font: 700 18px/1.15 var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--text);
  letter-spacing: 0;
  text-transform: none;
}
.fx16-track {
  position: relative;
  grid-column: 2;
  grid-row: 1 / span 2;
  height: 56px;
  border: 1px solid var(--line);
  background: var(--bg);
  min-width: 0;
}
.fx16-track canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: auto;
}
.fx16-axis {
  display: flex;
  justify-content: space-between;
  margin: 0;
  font: 500 12px/1.2 var(--font);
  color: var(--faint);
  grid-column: 2;
}
.fx16-src, .fx16-note {
  margin: 0;
  font: 500 14px/1.35 var(--font);
  color: var(--muted);
}
.fx16-src { grid-column: 1 / -1; }
.fx16-src a { color: inherit; }
.fx16-lane[data-kind="kaspa"] .fx16-cap b { color: var(--fx16-kas-ink); }
html[data-theme="dark"] .fx16-lane[data-kind="kaspa"] .fx16-cap b { color: #9cb6ff; }
.fx16-lane[data-kind="bitcoin"] .fx16-cap b { color: var(--fx16-btc); }
.fx16-pulse-foot, .fx15-pulse-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
  margin: 16px 0 0;
  font: 500 14px/1.4 var(--font);
  color: var(--muted);
}
.fx15-pulse-foot button, #fx15PulseRefresh {
  font: 600 14px/1 var(--font);
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
@media (max-width: 760px) {
  .fx16-lane {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    row-gap: 8px;
  }
  .fx16-track { grid-column: 1; grid-row: auto; height: 48px; }
  .fx16-axis, .fx16-src { grid-column: 1; }
  .fx16-cap b { display: inline; font-size: 16px; }
  .fx16-cap { margin: 0; }
}

/* ---- what's not on mainnet: same lane language ---- */
.fx15-next, #whats-next {
  max-width: 40rem;
  margin: 24px 0 0;
  padding: 0;
  border: 0;
  background: none;
}
.fx15-next > h3, #whats-next > h3 {
  margin: 0 0 16px;
  font: 650 20px/1.25 var(--font);
  color: var(--text);
  text-shadow: none;
}
.fx16-next-lanes {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.fx16-next-lane {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}
.fx16-next-lane h4 {
  margin: 0 0 4px;
  font: 650 16px/1.25 var(--font);
  color: var(--text);
}
.fx16-sketch {
  position: relative;
  height: 72px;
  border: 1px solid var(--line);
  background: var(--bg);
  overflow: hidden;
}
.fx16-sketch svg { display: block; width: 100%; height: 100%; }
.fx16-next-lane .fx16-cap { margin: 8px 0 0; }
.fx16-next-links, .fx15-next-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 8px 0 0;
}
.fx16-next-links a, .fx15-next-links a,
.fx16-next-links .fx14-go, .fx15-next-links .fx14-go {
  font: 600 14px/1.3 var(--font);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--text);
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 0;
  cursor: pointer;
}
.fx15-next dl { display: none; } /* replaced by lanes */

/* ---- teasers that replace moved toys ---- */
.fx16-go-try {
  max-width: 40rem;
  margin: 24px 0;
  padding: 0 0 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
}
.fx16-go-try p {
  margin: 0 0 8px;
  font: 500 16px/1.45 var(--font);
  color: var(--text);
}
.fx16-go-try a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font: 600 16px/1.3 var(--font);
  color: var(--text);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.fx16-go-try a:hover { border-bottom-color: var(--text); }
.live-panel .fx16-go-try {
  margin: 16px 0 0;
  padding: 0;
  border-bottom: 0;
}

/* Try pages */
.fx16-try main { max-width: 40rem; margin: 0 auto; padding: 24px var(--gutter, 16px) 64px; }
.fx16-try .fx16-back { display: inline-flex; align-items: center; min-height: 44px; font: 600 14px/1.3 var(--font); color: var(--muted); }
.fx16-try #rain, .fx16-try #guess-confirm, .fx16-try #pocket-dag, .fx16-try #street {
  padding-top: 16px;
}

@media (prefers-reduced-motion: reduce) {
  .fx16-track canvas, .fx16-sketch { /* JS pauses movement; keep layout */ }
}


/* fx16 follow-up: hide leftover LIVE markers, flatten tiles, try-page header */
.p-badge, .p-badge.live, .fx6-pulse, .live-dot, .p-badge::before, .p-badge.live::before {
  display: none !important;
  content: none !important;
  box-shadow: none !important;
  background: none !important;
  border: 0 !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}
#tenAge, #rvAge, .p-kick, .rv-status {
  font: 600 14px/1.35 var(--font) !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  color: var(--muted);
}
.p-hero, .p-hero *, #ten, #tenCount, #tenAge, #tenBadge, #fx8Dag, .fx6-pulse {
  cursor: auto !important;
}
a, button, [role="button"], [role="tab"], select, input, textarea, label,
#ten-h, #tenRow, .ten-t, .tour-row, .tour-more, .fx14-go, .fx8-how-open,
.term, summary, .panel-tab, #stCanvas, .rn.on .rn-cv, #fx2ToyCv, #rvCanvas, #fx3GuessPad {
  cursor: pointer !important;
}
.ten-t, .ten-t.stamp, .ten-t.stamp-swap, .ten-t.on {
  box-shadow: none !important;
  filter: none !important;
}
.st, .chap-l, .fx3-card-btn, .chapnav .chap-l {
  font: 600 14px/1.3 var(--font) !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}
.kp-m { display: none; }
.fx16-try main { padding-top: calc(var(--bar-h, 56px) + 16px); }
.fx16-try #hstreet { position: static; width: auto; height: auto; overflow: visible; clip: auto; font: 650 28px/1.2 var(--font); color: var(--text); margin: 0 0 12px; }

/* pulse lanes: each chain is a full-width row */
.fx16-lane {
  display: grid !important;
  grid-template-columns: 1fr auto !important;
  grid-template-rows: auto auto auto auto !important;
  column-gap: 16px;
  row-gap: 6px;
  align-items: baseline;
}
.fx16-lane-hd { grid-column: 1; grid-row: 1; }
.fx16-cap { grid-column: 2; grid-row: 1; text-align: right; margin: 0 !important; }
.fx16-cap b { display: inline !important; font-size: 18px; }
.fx16-track {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  height: 72px !important;
}
.fx16-axis { grid-column: 1 / -1 !important; grid-row: 3 !important; }
.fx16-src { grid-column: 1 / -1 !important; grid-row: 4 !important; }
@media (max-width: 760px) {
  .fx16-lane { grid-template-columns: 1fr !important; }
  .fx16-lane-hd, .fx16-cap, .fx16-track, .fx16-axis, .fx16-src { grid-column: 1 !important; }
  .fx16-lane-hd { grid-row: 1 !important; }
  .fx16-cap { grid-row: 2 !important; text-align: left; }
  .fx16-track { grid-row: 3 !important; height: 64px !important; }
  .fx16-src { grid-row: 4 !important; }
  header.bar .bar-in .icon-btn,
  header.bar .bar-in .bar-more,
  header.bar .icon-btn,
  header.bar .bar-more {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    box-sizing: border-box !important;
  }
  .fx16-more-slot {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    flex: 1 1 100%;
  }
  .bar.more .switch {
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
  }
  .bar.more .switch > button {
    width: auto !important;
    align-self: stretch !important;
    min-height: 44px !important;
    justify-content: flex-start !important;
  }
  .bar.more #barSwitch .fx8-how-open,
  .fx16-more-slot .fx8-how-open {
    white-space: nowrap !important;
    width: auto !important;
    align-self: flex-start !important;
    min-height: 44px !important;
    padding: 0 4px !important;
  }
  .bar.more #barSwitch .chapnav,
  .fx16-more-slot .chapnav {
    width: 100% !important;
  }
}

@media (max-width: 760px) {
  .kp-path .kp-d { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .kp-path .kp-m { display: inline; position: static; width: auto; height: auto; overflow: visible; clip: auto; font: 600 14px/1 var(--font); }
}

@media (max-width: 760px) {
  .bar .icon-btn,
  .bar .bar-more,
  header.bar .icon-btn,
  header.bar .bar-more {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
    box-sizing: border-box !important;
    padding: 0 !important;
  }
  .fx16-more-slot .fx8-how-open,
  #barSwitch .fx8-how-open,
  .bar.more .fx8-how-open,
  .bar.more #barSwitch .fx8-how-open {
    width: auto !important;
    max-width: none !important;
    min-width: 88px !important;
    height: 44px !important;
    min-height: 44px !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 0 8px !important;
  }
}

/* Beat fx8's 36px phone How-to "?" icon and 36px header hits. */
@media (max-width: 760px) {
  header.bar:has(#barMore) .bar-in > .icon-btn,
  header.bar:has(#barMore) .bar-more,
  .bar:has(#barMore) .bar-in > .icon-btn,
  .bar:has(#barMore) .bar-more {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }
  .fx16-more-slot .fx8-how-open,
  .bar.more .fx8-how-open,
  .bar.more #barSwitch .fx8-how-open {
    font-size: 14px !important;
    line-height: 44px !important;
    overflow: visible !important;
    width: auto !important;
    max-width: none !important;
    min-width: 7rem !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 8px !important;
    justify-content: flex-start !important;
    position: relative !important;
  }
  .fx16-more-slot .fx8-how-open::after,
  .bar.more .fx8-how-open::after,
  .bar.more #barSwitch .fx8-how-open::after {
    content: none !important;
    display: none !important;
  }
}

/* One owner for the reading bar: JS sets transform: scaleX(); no transition; one solid color. */
#progress.progress,
.progress,
body:not(.deep-page) .progress,
.deep-page .progress {
  width: 100%;
  height: 3px;
  background: var(--fx-blue, #1f5be0) !important;
  transform-origin: 0 50%;
  transition: none !important;
  will-change: transform;
  border-radius: 0;
}
