/* ==========================================================================
   CryptoChakra — components layered on the shared Chakra design system
   ========================================================================== */
:root,
[data-theme='dark'] {
  --color-bg: #0b0d13;
  --color-accent2: #4fd1c5;
  --color-accent2-soft: rgba(79, 209, 197, 0.12);
}
[data-theme='light'] {
  --color-bg: #f5f3ee;
  --color-accent2: #0f8a80;
  --color-accent2-soft: rgba(15, 138, 128, 0.1);
}

.brand svg {
  color: var(--color-primary);
}
.brand b {
  font-weight: 800;
}
.brand .brand__crypto {
  font-weight: 500;
  color: var(--color-text-muted);
}

/* ---------- Command search ---------- */
.search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 42px;
  padding: 0 0.6rem 0 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  min-width: 190px;
  justify-content: space-between;
}
.search-trigger:hover {
  border-color: var(--color-border-strong);
  color: var(--color-text);
}
.search-trigger svg {
  width: 16px;
  height: 16px;
}
.search-trigger kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  border: 1px solid var(--color-border-strong);
}
.cmdk {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  background: rgba(5, 7, 12, 0.6);
  backdrop-filter: blur(6px);
  padding: 12vh 1rem 1rem;
}
.cmdk.open {
  display: block;
}
.cmdk__panel {
  max-width: 620px;
  margin: 0 auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  animation: fadeSwap 0.25s var(--ease-out);
}
.cmdk__input {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0 1.1rem;
  border-bottom: 1px solid var(--color-border);
}
.cmdk__input svg {
  width: 18px;
  height: 18px;
  color: var(--color-text-faint);
}
.cmdk__input input {
  flex: 1;
  min-height: 58px;
  background: none;
  border: none;
  font-size: var(--text-base);
}
.cmdk__input input:focus {
  outline: none;
}
.cmdk__list {
  max-height: 52vh;
  overflow-y: auto;
  list-style: none;
  padding: 0.4rem;
}
.cmdk__list a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
}
.cmdk__list a[aria-selected='true'],
.cmdk__list a:hover {
  background: var(--color-surface-2);
}
.cmdk__list img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
}
.cmdk__list .ico {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: var(--color-primary);
}
.cmdk__list small {
  margin-left: auto;
  font-family: var(--font-mono);
  color: var(--color-text-faint);
}
.cmdk__group {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--color-text-faint);
  padding: 0.6rem 0.8rem 0.3rem;
}

/* ---------- Hero with dial ---------- */
.cc-hero {
  padding-block: clamp(var(--space-10), 6vw, var(--space-20)) clamp(var(--space-12), 6vw, var(--space-20));
}
.cc-hero .hero__grid {
  grid-template-columns: 1fr 1fr;
}
.hero-search {
  position: relative;
  margin-top: var(--space-8);
  max-width: 520px;
}
.hero-search button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 60px;
  padding: 0 1.2rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: var(--text-base);
  text-align: left;
}
.hero-search button:hover {
  border-color: var(--color-primary);
}
.hero-search svg {
  width: 20px;
  height: 20px;
  color: var(--color-primary);
}
.hero-search kbd {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  border: 1px solid var(--color-border-strong);
}
.popular {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.popular a {
  font-family: var(--font-mono);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
}
.popular a:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.dial-card {
  position: relative;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.dial-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-5) var(--space-6) 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  letter-spacing: 0.08em;
}
.dial-card canvas {
  width: 100%;
  aspect-ratio: 1 / 0.78;
}
.dial-card__foot {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--color-border);
}
.dial-card__foot div {
  padding: var(--space-4) var(--space-5);
  border-right: 1px solid var(--color-border);
}
.dial-card__foot div:last-child {
  border-right: none;
}
.dial-card__foot span {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.dial-card__foot b {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--text-base);
}
.dial-legend {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  padding: 0 var(--space-5) var(--space-4);
}
.dial-legend button {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-text-faint);
  padding: 0.35rem 0.1rem;
  border-radius: 6px;
  text-align: center;
  min-height: 36px;
  line-height: 1.2;
}
.dial-legend button b {
  display: block;
  color: var(--color-text);
  font-size: 12px;
  font-weight: 500;
}
.dial-legend button[aria-pressed='true'],
.dial-legend button:hover {
  background: var(--color-surface-2);
  color: var(--color-primary);
}
.dial-tip {
  position: absolute;
  top: 44px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 88%;
  text-align: center;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  pointer-events: none;
}

/* ---------- Pulse cards ---------- */
.pulse {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}
.pulse-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-height: 190px;
}
a.pulse-card:hover {
  border-color: var(--color-border-strong);
  transform: translateY(-2px);
}
.pulse-card__tag {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.pulse-card__coin {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.pulse-card__coin img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}
.pulse-card__coin b {
  font-size: var(--text-lg);
  font-family: var(--font-display);
}
.pulse-card__big {
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  font-weight: 500;
}
.pulse-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: auto;
}

/* ---------- Explorer ---------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
}
.toolbar__left,
.toolbar__right {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}
.input-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 0.9rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  min-width: 240px;
}
.input-search svg {
  width: 16px;
  height: 16px;
  color: var(--color-text-faint);
}
.input-search input {
  flex: 1;
  background: none;
  border: none;
  min-height: 42px;
  font-size: var(--text-sm);
}
.input-search input:focus {
  outline: none;
}
.input-search:focus-within {
  border-color: var(--color-primary);
}
.select {
  min-height: 44px;
  padding: 0 2rem 0 0.9rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface);
  font-size: var(--text-sm);
}
.xtable {
  font-size: var(--text-sm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
}
.xtable th {
  text-align: left;
  font-weight: 500;
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.9rem 0.8rem;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
  background: var(--color-surface-2);
}
.xtable th button {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  display: inline-flex;
  gap: 0.3rem;
  align-items: center;
}
.xtable th button:hover,
.xtable th button[aria-sort] {
  color: var(--color-text);
}
.xtable td {
  padding: 0.85rem 0.8rem;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
  vertical-align: middle;
}
.xtable tbody tr {
  cursor: pointer;
}
.xtable tbody tr:hover td {
  background: var(--color-surface-2);
}
.xtable tbody tr:last-child td {
  border-bottom: none;
}
.xtable .num {
  text-align: right;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.coin-cell {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.coin-cell img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-surface-3);
}
.coin-cell a {
  font-weight: 700;
}
.coin-cell a:hover {
  color: var(--color-primary);
}
.coin-cell small {
  font-family: var(--font-mono);
  color: var(--color-text-faint);
  margin-left: 0.25rem;
  font-size: 11px;
}
.star {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: var(--color-text-faint);
}
.star svg {
  width: 17px;
  height: 17px;
}
.star:hover {
  color: var(--color-primary);
  background: var(--color-primary-soft);
}
.star[aria-pressed='true'] {
  color: var(--color-primary);
}
.star[aria-pressed='true'] svg {
  fill: currentColor;
}
.rangebar {
  position: relative;
  width: 180px;
  height: 28px;
  margin-left: auto;
}
.rangebar__track {
  position: absolute;
  top: 12px;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 99px;
  background: var(--color-surface-3);
}
.rangebar__band {
  position: absolute;
  top: 10px;
  height: 8px;
  border-radius: 99px;
  background: var(--color-primary-soft);
  border: 1px solid rgba(242, 169, 59, 0.5);
}
.rangebar__dot {
  position: absolute;
  top: 8px;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  border-radius: 50%;
  background: var(--color-text);
  box-shadow: 0 0 0 3px var(--color-surface);
}
.rangebar__lbl {
  position: absolute;
  top: -3px;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--color-text-faint);
}
.rangebar__lbl--l {
  left: 0;
}
.rangebar__lbl--r {
  right: 0;
}
.risk {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}
.risk i {
  display: inline-block;
  width: 34px;
  height: 5px;
  border-radius: 99px;
  background: var(--color-surface-3);
  position: relative;
  overflow: hidden;
}
.risk i::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w, 50%);
  background: var(--c, var(--color-primary));
  border-radius: 99px;
}
.flagdot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-down);
  margin-left: 0.35rem;
  vertical-align: middle;
  animation: flagPulse 1.8s ease-in-out infinite;
}
.state {
  padding: var(--space-12) var(--space-6);
  text-align: center;
  color: var(--color-text-muted);
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-lg);
}
.state b {
  display: block;
  color: var(--color-text);
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}
.skel {
  display: inline-block;
  height: 12px;
  width: 80px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--color-surface-2), var(--color-surface-3), var(--color-surface-2));
  background-size: 200% 100%;
  animation: skel 1.2s linear infinite;
}
@keyframes skel {
  to {
    background-position: -200% 0;
  }
}
.more-row {
  display: flex;
  justify-content: center;
  margin-top: var(--space-6);
}
.note-line {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-4);
}
.note-line a {
  color: var(--color-primary);
}

/* ---------- How it works ---------- */
.how {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  padding: clamp(var(--space-5), 3vw, var(--space-10));
}
.how svg {
  width: 100%;
  height: auto;
}
.how .hnode rect {
  fill: var(--color-surface-2);
  stroke: var(--color-border-strong);
  transition: all 0.3s;
}
.how .hnode.on rect {
  stroke: var(--color-primary);
  fill: var(--color-primary-soft);
}
.how .hnode text {
  fill: var(--color-text);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
}
.how .hnode text.n {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 11px;
  fill: var(--color-text-faint);
}
.how .hnode text.s {
  font-weight: 400;
  font-size: 12px;
  fill: var(--color-text-muted);
}
.how .hedge {
  stroke: var(--color-border-strong);
  fill: none;
  stroke-width: 1.5;
}
.how .hflow {
  stroke: var(--color-primary);
  fill: none;
  stroke-width: 1.5;
  stroke-dasharray: 4 10;
  animation: dash 1.4s linear infinite;
}
.how .hloop {
  stroke: var(--color-accent2);
  fill: none;
  stroke-dasharray: 3 6;
  stroke-width: 1.3;
  opacity: 0.8;
}
.how__steps {
  display: none;
}

/* ---------- Scorecard teaser & page ---------- */
.score-hero {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--space-8);
  align-items: stretch;
}
.score-big {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  padding: clamp(var(--space-6), 4vw, var(--space-10));
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.score-big .figure {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-hero);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--color-accent2);
}
.score-big p {
  color: var(--color-text-muted);
}
.score-chart {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.score-chart canvas {
  width: 100%;
  height: 300px;
}
.score-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}
.score-cell {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  padding: var(--space-5);
}
.score-cell small {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.score-cell b {
  display: block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--text-xl);
  margin-top: 0.2rem;
}
.score-cell span {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.hitchips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: var(--space-3);
}
.hitchips i {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--color-surface-3);
}
.hitchips i.hit {
  background: var(--color-accent2);
}
.hitchips i.miss {
  background: var(--color-down);
  opacity: 0.75;
}

/* ---------- Radar ---------- */
.radar-band {
  background: var(--color-surface);
  border-block: 1px solid var(--color-border);
}
.radar-wrap {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: var(--space-8);
  align-items: stretch;
}
.radar-canvas {
  align-self: start;
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-bg);
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
}
.radar-canvas canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.radar-canvas,
.dial-card,
.radar-wrap > * {
  min-width: 0;
}
.dial-card canvas,
.score-chart canvas {
  display: block;
  max-width: 100%;
}
.radar-canvas .hud-card {
  position: absolute;
  left: 14px;
  bottom: 14px;
}
.feed {
  list-style: none;
  display: grid;
  gap: var(--space-2);
  align-content: start;
}
.feed li a,
.feed li > div {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 0.9rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
}
.feed li a:hover {
  border-color: var(--color-border-strong);
}
.feed img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}
.feed b {
  font-size: var(--text-sm);
}
.feed p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 0.1rem;
}
.sev {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  border: 1px solid currentColor;
  white-space: nowrap;
}
.sev--high {
  color: var(--color-down);
}
.sev--med {
  color: var(--color-primary);
}
.sev--low {
  color: var(--color-text-muted);
}
.flag-types {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-3);
}
.flag-type {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  padding: var(--space-5);
}
.flag-type b {
  display: block;
  font-size: var(--text-sm);
}
.flag-type span {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  display: block;
  margin-top: 0.3rem;
}
.flag-type small {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-primary);
}

/* ---------- Chakra path ---------- */
.path {
  position: relative;
  display: grid;
  gap: var(--space-3);
  padding-left: 56px;
}
.path::before {
  content: '';
  position: absolute;
  left: 21px;
  top: 16px;
  bottom: 16px;
  width: 2px;
  background: var(--color-border-strong);
}
.path__fill {
  position: absolute;
  left: 21px;
  top: 16px;
  width: 2px;
  height: 0;
  background: var(--color-primary);
  transition: height 0.9s var(--ease-out);
}
.pstep {
  position: relative;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}
.pstep__node {
  position: absolute;
  left: -50px;
  top: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--color-border-strong);
  background: var(--color-bg);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-text-faint);
  transition: all 0.4s;
}
.pstep.done .pstep__node {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-primary-ink);
}
.pstep.current .pstep__node {
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: 0 0 0 6px var(--color-primary-soft);
}
.pstep summary {
  list-style: none;
  cursor: pointer;
  padding: var(--space-5) var(--space-6);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-4);
  align-items: center;
}
.pstep summary::-webkit-details-marker {
  display: none;
}
.pstep summary h3 {
  font-size: var(--text-lg);
}
.pstep summary h3 small {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-left: 0.5rem;
  letter-spacing: 0;
}
.pstep summary p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: 0.2rem;
}
.pstep__status {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.pstep.done .pstep__status {
  color: var(--color-accent2);
}
.pstep__body {
  padding: 0 var(--space-6) var(--space-6);
  display: grid;
  gap: var(--space-4);
}
.lessons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}
.lesson {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  padding: var(--space-4);
}
.lesson b {
  display: block;
  font-size: var(--text-sm);
}
.lesson p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 0.35rem;
  line-height: 1.55;
}
.progress {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}
.progress__bar {
  flex: 1;
  height: 8px;
  border-radius: 99px;
  background: var(--color-surface-3);
  overflow: hidden;
}
.progress__bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--color-primary);
  border-radius: 99px;
  transition: width 0.6s var(--ease-out);
}
.progress b {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--text-sm);
}

/* ---------- Quiz ---------- */
.quiz {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  padding: clamp(var(--space-6), 4vw, var(--space-12));
  max-width: 860px;
}
.quiz__meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-bottom: var(--space-4);
}
.quiz__q {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.quiz__opts {
  list-style: none;
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-6);
}
.quiz__opts button {
  width: 100%;
  text-align: left;
  padding: 1rem 1.2rem;
  min-height: 56px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface-2);
  font-size: var(--text-sm);
  display: flex;
  gap: 0.9rem;
  align-items: center;
}
.quiz__opts button span {
  font-family: var(--font-mono);
  color: var(--color-text-faint);
  font-size: var(--text-xs);
}
.quiz__opts button:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
}
.quiz__bar {
  height: 4px;
  border-radius: 99px;
  background: var(--color-surface-3);
  margin-bottom: var(--space-6);
  overflow: hidden;
}
.quiz__bar i {
  display: block;
  height: 100%;
  background: var(--color-primary);
  transition: width 0.4s var(--ease-out);
}
.result {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  animation: fadeSwap 0.5s var(--ease-out);
}
.result__card {
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  background: var(--color-bg);
  border: 1px solid var(--color-primary);
  position: relative;
  overflow: hidden;
}
.result__card small {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-primary);
  letter-spacing: 0.1em;
}
.result__card h3 {
  font-size: var(--text-2xl);
  margin-top: var(--space-3);
}
.result__card p {
  color: var(--color-text-muted);
  margin-top: var(--space-4);
}
.result__card svg.rings {
  position: absolute;
  right: -60px;
  bottom: -60px;
  width: 220px;
  height: 220px;
  color: var(--color-primary);
  opacity: 0.15;
}
.traits {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-4);
}
.trait {
  display: grid;
  grid-template-columns: 110px 1fr 36px;
  gap: 0.7rem;
  align-items: center;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.trait .gauge {
  margin: 0;
}
.trait b {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--color-text);
  text-align: right;
}

/* ---------- Glossary ---------- */
.gloss {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-6);
}
.term {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  padding: var(--space-5);
}
.term b {
  display: block;
  font-size: var(--text-sm);
}
.term p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 0.35rem;
  line-height: 1.55;
}

/* ---------- Coin page ---------- */
.coin-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-5);
  justify-content: space-between;
}
.coin-head__id {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.coin-head__id img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-surface-3);
}
.coin-head h1 {
  font-size: var(--text-2xl);
  font-weight: 800;
}
.coin-head h1 small {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: var(--text-base);
  color: var(--color-text-faint);
  margin-left: 0.5rem;
  letter-spacing: 0;
}
.coin-head__price {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.coin-head__price b {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--text-xl);
}
.coin-head__actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.summary-line {
  margin-top: var(--space-6);
  font-size: var(--text-lg);
  line-height: 1.5;
  max-width: 70ch;
  color: var(--color-text-muted);
}
.summary-line b {
  color: var(--color-text);
  font-weight: 500;
}
.summary-line time {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  display: block;
  margin-top: 0.3rem;
}
.panel {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  padding: clamp(var(--space-5), 3vw, var(--space-8));
}
.calc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: start;
}
.calc__out {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}
.calc__out div {
  padding: var(--space-5);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
}
.calc__out div.mid {
  border-color: var(--color-primary);
}
.calc__out span {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.calc__out b {
  display: block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--text-lg);
  margin-top: 0.25rem;
}
.slider {
  width: 100%;
  accent-color: var(--color-primary);
  min-height: 32px;
}
.scen-presets {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.scen-out {
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: 500;
  margin-top: var(--space-4);
}
.flags-list {
  list-style: none;
  display: grid;
  gap: var(--space-2);
}
.flags-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: var(--text-sm);
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--color-border);
}
.flags-list li span {
  color: var(--color-text-muted);
}

/* ---------- Pro ---------- */
.pro-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-10);
  align-items: start;
}
.feat-list {
  list-style: none;
  display: grid;
  gap: var(--space-3);
}
.feat-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}
.feat-list b {
  display: block;
}
.feat-list p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: 0.2rem;
}

.tag-planned {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border-strong);
  color: var(--color-text-muted);
  align-self: start;
  white-space: nowrap;
}
.tag-live {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(79, 209, 197, 0.45);
  color: var(--color-accent2);
  align-self: start;
  white-space: nowrap;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  opacity: 0;
  z-index: 400;
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius-full);
  background: var(--color-text);
  color: var(--color-bg);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all 0.3s var(--ease-out);
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .search-trigger {
    min-width: 0;
  }
  .search-trigger span,
  .search-trigger kbd {
    display: none;
  }
  .cc-hero .hero__grid,
  .score-hero,
  .radar-wrap,
  .calc,
  .pro-grid,
  .result {
    grid-template-columns: 1fr;
  }
  .flag-types {
    grid-template-columns: repeat(3, 1fr);
  }
  .score-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .lessons,
  .gloss {
    grid-template-columns: 1fr 1fr;
  }
  .radar-canvas {
    max-width: 520px;
    width: 100%;
    position: relative !important;
    top: auto !important;
  }
}
@media (max-width: 760px) {
  .pulse {
    grid-template-columns: 1fr;
  }
  .flag-types,
  .lessons,
  .gloss,
  .calc__out {
    grid-template-columns: 1fr;
  }
  .how svg {
    display: none;
  }
  .how__steps {
    display: grid;
    gap: 0.5rem;
    list-style: none;
  }
  .how__steps li {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 0.8rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface-2);
    font-size: var(--text-sm);
  }
  .how__steps li span {
    font-family: var(--font-mono);
    color: var(--color-primary);
    font-size: var(--text-xs);
  }
  .how__steps li p {
    color: var(--color-text-muted);
    font-size: var(--text-xs);
  }
  .xtable .hide-sm {
    display: none;
  }
  .rangebar {
    width: 112px;
  }
  .xtable td,
  .xtable th {
    padding-inline: 0.45rem;
  }
  .coin-cell small {
    display: none;
  }
  .coin-cell a {
    display: inline-block;
    max-width: 92px;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
  }
  .coin-cell {
    gap: 0.45rem;
  }
  .coin-cell img {
    width: 22px;
    height: 22px;
  }
  .star {
    width: 30px;
  }
  .input-search {
    min-width: 0;
    flex: 1 1 100%;
  }
  .dial-legend button {
    font-size: 9px;
  }
  .dial-legend button b {
    font-size: 11px;
  }
  .trait {
    grid-template-columns: 90px 1fr 32px;
  }
  .coin-head h1 {
    font-size: var(--text-xl);
  }
}

.flags-list li b {
  flex: 0 0 auto;
  min-width: 120px;
}
.flags-list li span {
  text-align: right;
}

/* ==========================================================================
   v2.1 additions — Odds Engine, heatmap, guides, articles, timeline, matrix
   ========================================================================== */

/* ---------- Scam strip ---------- */
.scam-strip {
  background: var(--color-primary-soft);
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.scam-strip .container {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 34px;
}
.scam-strip b {
  color: var(--color-text);
}
.scam-strip a {
  color: var(--color-primary);
  font-weight: 700;
  white-space: nowrap;
}
.scam-strip button {
  margin-left: auto;
  font-size: 18px;
  line-height: 1;
  width: 32px;
  height: 32px;
  color: var(--color-text-faint);
  border-radius: 6px;
}
.scam-strip button:hover {
  color: var(--color-text);
}

/* ---------- Hero stats ---------- */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: var(--space-8);
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
}
.hero-stats b {
  display: block;
  font-size: var(--text-lg);
  font-weight: 500;
}
.hero-stats span {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ---------- Chakra Odds Engine ---------- */
.odds-card {
  position: relative;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(120% 80% at 85% 0%, rgba(142, 156, 255, 0.1), transparent 60%),
    radial-gradient(90% 70% at 0% 100%, rgba(79, 209, 197, 0.08), transparent 60%),
    linear-gradient(180deg, #121726 0%, #0d111c 100%);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  outline: none;
}
[data-theme='light'] .odds-card {
  background:
    radial-gradient(120% 80% at 85% 0%, rgba(79, 95, 214, 0.08), transparent 60%),
    radial-gradient(90% 70% at 0% 100%, rgba(15, 138, 128, 0.07), transparent 60%),
    #ffffff;
  box-shadow: 0 30px 60px -34px rgba(20, 24, 34, 0.25);
}
.odds-card:focus-visible {
  box-shadow: 0 0 0 3px var(--color-primary-soft), 0 0 0 1px var(--color-primary);
}
.odds-card__head {
  display: flex;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5) 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--color-text-faint);
}
.odds-card__head span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text-muted);
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-up);
  box-shadow: 0 0 0 0 var(--color-up);
  animation: livepulse 2s infinite;
}
@keyframes livepulse {
  0% { box-shadow: 0 0 0 0 rgba(62, 207, 142, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(62, 207, 142, 0); }
  100% { box-shadow: 0 0 0 0 rgba(62, 207, 142, 0); }
}
.odds-stage {
  position: relative;
}
.odds-stage canvas {
  display: block;
  width: 100%;
  height: clamp(360px, 36vw, 470px);
  touch-action: none;
  cursor: crosshair;
}
.odds-legend {
  position: absolute;
  top: 10px;
  left: 14px;
  right: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.odds-legend button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: color-mix(in srgb, var(--color-surface) 70%, transparent);
  backdrop-filter: blur(6px);
  font-size: 12px;
  color: var(--color-text-muted);
  min-height: 32px;
}
.odds-legend button i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.odds-legend button small {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-text-faint);
}
.odds-legend button[aria-pressed='false'] {
  opacity: 0.45;
}
.odds-legend button[aria-pressed='false'] i {
  background: transparent !important;
  outline: 1px solid var(--color-text-faint);
}
.odds-legend button[data-sel] {
  color: var(--color-text);
  border-color: var(--color-border-strong);
}
.odds-hint {
  position: absolute;
  right: 80px;
  bottom: 44px;
  font-size: 12px;
  color: var(--color-text-faint);
  font-style: italic;
  pointer-events: none;
  transition: opacity 0.6s;
}
.odds-hint.gone {
  opacity: 0;
}
.odds-caption {
  position: absolute;
  left: 58px;
  bottom: 38px;
  margin: 0;
  font-size: 12px;
  color: var(--color-primary);
  font-style: italic;
  pointer-events: none;
  max-width: 60%;
}
.odds-caption b {
  font-style: normal;
  color: var(--color-text-muted);
  font-weight: 500;
}
.odds-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--color-border);
}
.odds-read {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  flex-wrap: wrap;
  min-height: 2.2rem;
}
.odds-read span {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  max-width: 34ch;
}
.odds-read b {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--text-xl);
  line-height: 1;
}
.odds-note {
  display: block;
  width: 100%;
  font-size: 11px;
  color: var(--color-text-faint);
}

/* ---------- Pulse + dial ---------- */
.pulse-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: var(--space-4);
  align-items: stretch;
}
.pulse--stack {
  grid-template-columns: 1fr;
}
.pulse-wrap .dial-card canvas {
  aspect-ratio: 1 / 0.7;
}

/* ---------- Reading cards ---------- */
.read-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}
.read-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}
.read-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  padding: var(--space-5);
  color: var(--color-text);
  transition: border-color 0.2s, transform 0.2s;
}
.read-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
}
.read-card__art {
  display: block;
  height: 120px;
  margin: calc(var(--space-5) * -1) calc(var(--space-5) * -1) var(--space-3);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-2);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
}
.read-card__art svg,
.feature__art svg,
.article-art svg,
.guide-hero__art svg {
  width: 100%;
  height: 100%;
  display: block;
}
.read-card small {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.read-card b {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: 1.2;
}
.read-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  flex: 1;
}
.read-card .link-arrow {
  font-size: var(--text-sm);
  color: var(--color-primary);
}
.read-card[hidden] {
  display: none;
}
.feature {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--space-8);
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  overflow: hidden;
  color: var(--color-text);
}
.feature:hover {
  border-color: var(--color-primary);
}
.feature__art {
  display: block;
  height: 100%;
  min-height: 280px;
  background: var(--color-surface-2);
}
.feature > div {
  padding: var(--space-8) var(--space-8) var(--space-8) 0;
}
.feature small {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-text-faint);
  text-transform: uppercase;
}
.feature h2 {
  font-size: var(--text-xl);
  margin: var(--space-3) 0;
}
.feature p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}
.brief {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-10);
  align-items: center;
}
.brief h2 {
  margin: var(--space-3) 0;
}
.brief p {
  color: var(--color-text-muted);
}

/* ---------- Guides & articles ---------- */
.guide-hero {
  position: relative;
  overflow: hidden;
}
.guide-hero .container {
  position: relative;
  z-index: 1;
}
.guide-hero__art {
  position: absolute;
  right: -40px;
  top: 0;
  bottom: 0;
  width: 46%;
  opacity: 0.55;
  mask-image: linear-gradient(90deg, transparent, #000 50%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 50%);
  pointer-events: none;
}
.guide-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-6);
}
.byline {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.two-col > aside {
  position: sticky;
  top: 110px;
  display: flex;
  gap: var(--space-4);
}
.two-col > aside .toc {
  position: static;
  flex: 1;
}
.toc a.active {
  color: var(--color-primary);
}
.read-progress {
  width: 2px;
  background: var(--color-border);
  border-radius: 2px;
  position: relative;
  order: -1;
}
.read-progress i {
  position: absolute;
  inset: 0 0 auto 0;
  height: 0;
  background: var(--color-primary);
  border-radius: 2px;
}
.prose--guide h2,
.prose--article h2 {
  scroll-margin-top: 110px;
}
.prose--guide h2:first-child {
  margin-top: 0;
}
.prose a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.prose .tip {
  border-left: 2px solid var(--color-accent2);
  padding: var(--space-2) var(--space-4);
  background: var(--color-accent2-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: var(--text-sm);
}
.prose .tip b {
  color: var(--color-text);
}
.callout {
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  margin: var(--space-6) 0;
  background: var(--color-surface);
}
.callout b {
  display: block;
  margin-bottom: var(--space-1);
  color: var(--color-text);
}
.callout p {
  margin: 0 !important;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.callout--warn {
  border-color: color-mix(in srgb, var(--color-primary) 45%, transparent);
  background: var(--color-primary-soft);
}
.related {
  margin-top: var(--space-12);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
}
.related h2 {
  margin-top: 0 !important;
  font-size: var(--text-lg) !important;
}
.related ul {
  list-style: none;
  padding: 0 !important;
}
.related a {
  text-decoration: none !important;
}
.narrow {
  max-width: 820px;
}
.article-hero h1 {
  font-size: var(--text-2xl);
  margin: var(--space-3) 0 var(--space-4);
}
.article-meta {
  font-size: 11px;
  color: var(--color-text-faint);
  letter-spacing: 0.06em;
}
.article-dek {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
}
.article-art {
  display: block;
  height: 220px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  overflow: hidden;
}
.prose--article {
  max-width: none;
}
.prose--article p,
.prose--article li {
  font-size: 1.06rem;
  line-height: 1.75;
}
.rate {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-8);
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.rate > div {
  display: flex;
  gap: var(--space-2);
}
.rate .chip[aria-pressed='true'] {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.rate span {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.cycle-diagram {
  margin: var(--space-6) 0;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}
.cycle-diagram svg {
  width: 100%;
  height: auto;
}
.cycle-path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 2.4s 0.3s ease forwards;
}
@keyframes draw {
  to { stroke-dashoffset: 0; }
}
.faq-group {
  font-size: var(--text-lg);
  margin: var(--space-10) 0 var(--space-4);
  scroll-margin-top: 110px;
}
.faq-group:first-child {
  margin-top: 0;
}
.faq a {
  color: var(--color-primary);
}

/* ---------- Learn: chakra detail, glossary, history teaser ---------- */
.deep {
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-md);
  margin: var(--space-4) 0;
}
.deep summary {
  cursor: pointer;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-primary);
  font-weight: 700;
  list-style: none;
}
.deep summary::-webkit-details-marker {
  display: none;
}
.deep summary::after {
  content: ' +';
}
.deep[open] summary::after {
  content: ' −';
}
.deep__body {
  padding: 0 var(--space-4) var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.deep__body p {
  margin-top: var(--space-3);
}
.deep__meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}
.deep__meta dt {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-text-faint);
  text-transform: uppercase;
}
.deep__meta dd {
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.swatch--0 { background: #e5484d; }
.swatch--1 { background: #f76b15; }
.swatch--2 { background: #f5d90a; }
.swatch--3 { background: #30a46c; }
.swatch--4 { background: #3e63dd; }
.swatch--5 { background: #6e56cf; }
.swatch--6 { background: #ab4aba; }
.deep .tip {
  border-left: 2px solid var(--color-accent2);
  padding-left: var(--space-3);
}
.deep .tip b {
  color: var(--color-text);
}
.gloss-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
  flex-wrap: wrap;
}
.gloss-count {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.term small {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-text-faint);
  text-transform: uppercase;
  margin-left: 0.4rem;
}
.term[hidden] {
  display: none;
}
.history-teaser {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  align-items: center;
  gap: var(--space-6);
  margin-top: var(--space-6);
  padding: var(--space-5) var(--space-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  color: var(--color-text);
}
.history-teaser:hover {
  border-color: var(--color-primary);
}
.history-teaser small {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-text-faint);
  text-transform: uppercase;
}
.history-teaser b {
  font-family: var(--font-display);
  font-size: var(--text-lg);
}
.history-teaser .link-arrow {
  color: var(--color-primary);
}
.history-teaser__rail {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 40px;
  position: relative;
}
.history-teaser__rail::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--color-border-strong);
}
.history-teaser__rail i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-primary);
  opacity: calc(0.25 + var(--i) * 0.035);
  position: relative;
  animation: bob 3s calc(var(--i) * 0.12s) ease-in-out infinite;
}
@keyframes bob {
  50% { transform: translateY(-6px); }
}

/* ---------- Situations matrix ---------- */
.matrix__card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  padding: var(--space-8);
  max-width: 860px;
}
.matrix__q {
  font-size: var(--text-xl);
  margin: var(--space-5) 0;
}
.matrix__opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
.matrix__opts button {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  text-align: left;
  padding: var(--space-4);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  color: var(--color-text);
  min-height: 64px;
  transition: border-color 0.15s;
}
.matrix__opts button span {
  color: var(--color-primary);
  font-size: 12px;
  padding-top: 2px;
}
.matrix__opts button:hover:not(:disabled) {
  border-color: var(--color-primary);
}
.matrix__opts button:disabled {
  opacity: 0.45;
  cursor: default;
}
.matrix__opts button.picked {
  opacity: 1;
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
}
.matrix__fb {
  margin-top: var(--space-5);
}
.matrix__fb p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}
.matrix__fb b {
  color: var(--color-text);
}

/* ---------- Heatmap ---------- */
.heatmap-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}
.hm-scale {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-text-faint);
}
.hm-scale i {
  width: 160px;
  height: 8px;
  border-radius: 4px;
}
.heatmap {
  position: relative;
  height: clamp(460px, 56vw, 640px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}
.hm-tile {
  position: absolute;
  background: var(--bg);
  border: 1px solid var(--color-bg);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 2px;
  transition: filter 0.15s;
  animation: tilein 0.5s ease both;
}
@keyframes tilein {
  from { opacity: 0; transform: scale(0.96); }
}
.hm-tile:hover {
  filter: brightness(1.18);
  z-index: 2;
  outline: 2px solid var(--color-text);
}
.hm-tile b {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 11px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.hm-tile--m b { font-size: 14px; }
.hm-tile--l b { font-size: clamp(18px, 2vw, 28px); }
.hm-tile span {
  font-family: var(--font-mono);
  font-size: 12px;
  opacity: 0.92;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.hm-tile--l span { font-size: 15px; }
.hm-tile small {
  font-size: 11px;
  opacity: 0.8;
  margin-top: 2px;
}
[data-theme='light'] .hm-tile { color: #0e1118; }
[data-theme='light'] .hm-tile b,
[data-theme='light'] .hm-tile span { text-shadow: none; }

/* ---------- Crash scenarios ---------- */
.crash {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: var(--space-4);
  align-items: start;
}
.crash__controls {
  position: sticky;
  top: 110px;
  display: grid;
  gap: var(--space-4);
}
.crash__shock {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.crash__shock span {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.crash__shock b {
  font-size: var(--text-2xl);
  font-weight: 500;
  color: var(--color-down);
}
.crash__sum {
  display: grid;
  gap: var(--space-2);
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-4);
}
.crash__sum div {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.crash__sum b {
  color: var(--color-text);
  font-weight: 500;
}
.crash__table {
  padding: 0 !important;
  overflow: hidden;
}
.crash__head,
.crash__row {
  display: grid;
  grid-template-columns: minmax(150px, 1.1fr) 80px minmax(140px, 1.6fr) 70px 110px;
  gap: var(--space-3);
  align-items: center;
  padding: 0.6rem var(--space-5);
}
.crash__head {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-text-faint);
  text-transform: uppercase;
  border-bottom: 1px solid var(--color-border);
}
.crash__row {
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  font-size: var(--text-sm);
}
.crash__row:hover {
  background: var(--color-surface-2);
}
.crash__row .num,
.crash__head .num {
  text-align: right;
}
.crash__bar {
  position: relative;
  height: 22px;
}
.crash__bar::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--color-border-strong);
}
.crash__bar i {
  position: absolute;
  top: 5px;
  height: 12px;
  border-radius: 3px;
  opacity: 0.75;
  transition: width 0.3s ease;
}
.crash__row > b {
  font-weight: 500;
  text-align: right;
}

/* ---------- Coin: how it works / ecosystem ---------- */
.whatif-vol {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
  display: grid;
  gap: var(--space-2);
  max-width: 560px;
}
.how-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: var(--space-8);
}
.how-desc {
  color: var(--color-text-muted);
  margin: var(--space-3) 0;
}
.how-side {
  display: grid;
  gap: var(--space-5);
  align-content: start;
}
.facts {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0 var(--space-4);
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: var(--space-4) 0;
}
.supply small {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.supply span {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.sentiment {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  display: grid;
  gap: var(--space-3);
}
.sentiment h3 {
  font-size: var(--text-base);
}
.sentiment__bar {
  height: 10px;
  border-radius: 5px;
  background: var(--color-down);
  overflow: hidden;
}
.sentiment__bar i {
  display: block;
  height: 100%;
  background: var(--color-up);
}
.sentiment__lbl {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
}
.eco {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-5);
}
.eco__cell {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  background: var(--color-surface-2);
  animation: tilein 0.4s calc(var(--i) * 0.06s) ease both;
}
.eco__cell small {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-text-faint);
  text-transform: uppercase;
  margin-bottom: var(--space-1);
}

/* ---------- Timeline ---------- */
.timeline {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  padding: var(--space-6);
  outline: none;
}
.timeline:focus-visible {
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}
.timeline__eras {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: var(--space-5);
}
.timeline__eras .chip[aria-pressed='true'] {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.timeline__rail {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  cursor: grab;
  padding-bottom: var(--space-3);
  user-select: none;
}
.timeline__rail svg {
  position: absolute;
  left: 0;
  top: 0;
  height: 120px;
  color: var(--color-primary);
  pointer-events: none;
}
.tl-path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0.5;
}
.timeline.ready .tl-path {
  animation: draw 2.6s ease forwards;
}
.timeline__track {
  position: relative;
  display: flex;
  gap: 0;
  width: max-content;
  padding: 0 var(--space-4);
}
.tl-node {
  width: 130px;
  height: 124px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: calc(28px + var(--y, 0px));
  color: var(--color-text-muted);
  animation: tilein 0.4s calc(var(--i) * 0.05s + 0.2s) ease both;
}
.tl-node i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 2px solid var(--color-primary);
  margin-bottom: var(--space-2);
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}
.tl-node b {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  color: var(--color-text);
}
.tl-node span {
  font-size: 11px;
  line-height: 1.3;
  max-width: 110px;
}
.tl-node:hover i,
.tl-node[aria-current='true'] i {
  background: var(--color-primary);
  transform: scale(1.35);
  box-shadow: 0 0 0 6px var(--color-primary-soft);
}
.tl-node[aria-current='true'] span {
  color: var(--color-text);
}
.timeline__card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-8);
  align-items: start;
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-6);
  margin-top: var(--space-2);
  min-height: 170px;
}
.timeline__card.flash > * {
  animation: tilein 0.35s ease both;
}
.tl-year {
  font-size: clamp(3rem, 7vw, 5.5rem);
  line-height: 0.9;
  color: var(--color-primary);
}
.timeline__card small {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-text-faint);
}
.timeline__card h2 {
  font-size: var(--text-xl);
  margin: var(--space-2) 0;
}
.timeline__card p {
  color: var(--color-text-muted);
  max-width: 62ch;
}
.timeline__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-5);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* ---------- Responsive (additions) ---------- */
@media (max-width: 1080px) {
  .pulse-wrap,
  .crash,
  .how-grid,
  .brief,
  .feature {
    grid-template-columns: 1fr;
  }
  .feature > div {
    padding: 0 var(--space-6) var(--space-6);
  }
  .feature__art {
    min-height: 180px;
  }
  .read-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .crash__controls {
    position: static;
  }
  .two-col > aside {
    position: static;
  }
}
@media (max-width: 760px) {
  .read-grid,
  .read-grid--4,
  .matrix__opts,
  .eco {
    grid-template-columns: 1fr;
  }
  .hero-stats {
    gap: var(--space-5);
  }
  .deep__meta {
    grid-template-columns: 1fr 1fr;
  }
  .history-teaser {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
  .crash__head,
  .crash__row {
    grid-template-columns: minmax(100px, 1fr) minmax(70px, 1fr) 52px 80px;
    padding: 0.55rem var(--space-3);
  }
  .timeline__card {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }
  .odds-caption {
    display: none;
  }
  .odds-hint {
    right: 50px;
    bottom: 36px;
  }
  .odds-card__foot {
    flex-direction: column;
    align-items: stretch;
  }
  .scam-strip span {
    font-size: 11px;
  }
  .matrix__card {
    padding: var(--space-5);
  }
  .guide-hero__art {
    width: 80%;
    opacity: 0.25;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cycle-path,
  .tl-path {
    stroke-dashoffset: 0;
    animation: none !important;
  }
  .tl-node,
  .hm-tile,
  .eco__cell {
    animation: none;
    opacity: 1;
  }
  .live-dot,
  .history-teaser__rail i {
    animation: none;
  }
}
@media (max-width: 760px) {
  .crash .hide-sm { display: none; }
  .tl-node { width: 112px; }
}
