/* Home page only. Uses system.css tokens. Every class here starts with h- */

/* ---- entrance: hero text only ---- */
.h-rise { animation: h-rise 0.24s var(--ease) both; }
.h-rise:nth-child(2) { animation-delay: 40ms; }
.h-rise:nth-child(3) { animation-delay: 80ms; }
.h-rise:nth-child(4) { animation-delay: 120ms; }
.h-rise:nth-child(5) { animation-delay: 160ms; }
@keyframes h-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---- 1. hero ---- */
.h-hero { padding: 80px 0 96px; }
.h-hero-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: center; }
.h-copy { grid-column: 1 / span 5; display: grid; gap: 24px; padding-right: 24px; }
.h-copy .h-display { font-size: 60px; line-height: 1.02; }
.h-copy .lede { max-width: 30em; }
.h-actions { display: flex; align-items: center; gap: 24px; margin-top: 8px; }
.h-how { height: 48px; padding: 0 4px; font-size: 15px; }
.h-note { font: 400 13px/1.5 var(--sans); color: var(--text-3); }

.h-frame { grid-column: 6 / span 7; background: var(--panel); border: 1px solid var(--hair-2); border-radius: var(--r-lg); }
.h-frame-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 52px; padding: 0 16px 0 20px; border-bottom: 1px solid var(--hair); }
.h-frame-title { font-size: 15px; font-weight: 500; color: var(--text); white-space: nowrap; }
.h-unit { margin-left: 12px; font: 400 13px/1 var(--sans); color: var(--text-3); }
.h-frame-right { display: flex; align-items: center; gap: 16px; }
.h-left { font-size: 15px; color: var(--text); min-width: 4.5em; text-align: right; white-space: nowrap; }
.h-left-label { font-family: var(--sans); color: var(--text-3); font-size: 13px; }
.h-canvas-wrap { position: relative; padding: 12px 8px 8px 4px; }
#h-race { width: 100%; height: 404px; touch-action: pan-y; }
.h-frame-msg { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--text-2); background: var(--panel); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.chip.is-live .dot { background: var(--up); animation: breathe 2s var(--ease) infinite; }
.chip.is-down { color: var(--down); }
.chip.is-down .dot { background: var(--down); }

.h-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 48px 0 0; border-top: 1px solid var(--hair); }
.h-facts > div { padding: 20px 24px 0; border-left: 1px solid var(--hair); min-width: 0; }
.h-facts > div:first-child { padding-left: 0; border-left: 0; }
.h-facts dt { font: 400 13px/1.4 var(--sans); color: var(--text-3); }
.h-facts dd { margin: 8px 0 0; display: grid; gap: 4px; }
.h-fact-v { font-size: 20px; line-height: 1.3; color: var(--text); white-space: nowrap; overflow-wrap: normal; }
.h-fact-v .tri { margin-right: 8px; vertical-align: 3px; }
.h-fact-s { font: 400 13px/1.5 var(--sans); color: var(--text-3); }

/* ---- shared section parts ---- */
.h-split { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: start; }
.h-split > :first-child { grid-column: 1 / span 5; }
.h-split > :last-child { grid-column: 7 / span 6; }
.h-split-flip > :first-child { grid-column: 1 / span 6; }
.h-split-flip > :last-child { grid-column: 8 / span 5; }
.h-figure { min-width: 0; }
.h-dia { width: 100%; min-height: 40px; }
.h-cap { margin-top: 16px; font: 400 13px/1.6 var(--sans); color: var(--ink-3); max-width: 72ch; }
.h-cap-wide { margin-top: 32px; max-width: 110ch; }
.light .h-cap { color: #6e6e76; }

/* SVG diagrams on light ground */
.h-svg { display: block; overflow: visible; }
.h-svg text { font: 400 13px/1 var(--sans); fill: var(--ink-2); }
.h-svg .t-sans { font: 500 15px/1 var(--sans); fill: var(--ink); letter-spacing: -0.005em; }
.h-svg .t-num { fill: var(--teal); font-weight: 500; }
.h-svg .t-mute { fill: #6e6e76; }
.h-svg .t-teal { fill: var(--teal); }
.h-svg .ln { stroke: var(--teal); stroke-width: 1; fill: none; }
.h-svg .ln-soft { stroke: var(--teal); stroke-opacity: 0.35; stroke-width: 1; fill: none; }
.h-svg .ln-rule { stroke: var(--rule); stroke-width: 1; fill: none; }
.h-svg .ln-dash { stroke: var(--teal); stroke-opacity: 0.45; stroke-width: 1; stroke-dasharray: 2 3; fill: none; }
.h-svg .ln-ink { stroke: var(--ink-3); stroke-opacity: 0.55; stroke-width: 1; fill: none; stroke-linejoin: round; stroke-linecap: round; }
.h-svg .ln-win { stroke: var(--teal); stroke-width: 1.75; fill: none; stroke-linejoin: round; stroke-linecap: round; }
.h-svg .box { stroke: var(--teal); stroke-width: 1; fill: rgba(20, 85, 101, 0.035); }
.h-svg .box-plain { stroke: var(--teal); stroke-width: 1; fill: var(--card); }
.h-svg .sq { stroke: var(--teal); stroke-opacity: 0.4; stroke-width: 1; fill: var(--card); }
.h-svg .sq-on { fill: var(--teal); stroke: var(--teal); stroke-width: 1; }
.h-svg .fill-teal { fill: var(--teal); }
.h-svg .bar { fill: rgba(20, 85, 101, 0.12); stroke: var(--teal); stroke-width: 1; }
.h-svg .bar-on { fill: var(--teal); stroke: var(--teal); stroke-width: 1; }
.h-svg .rib { fill: rgba(20, 85, 101, 0.06); stroke: none; }
.h-svg .rib-edge { stroke: var(--teal); stroke-opacity: 0.55; stroke-width: 1; fill: none; }

/* ---- 2. steps ---- */
.h-steps { border-top: 1px solid var(--rule); }
.h-steps li { display: grid; grid-template-columns: 40px minmax(0, 1fr); padding: 24px 0; border-bottom: 1px solid var(--rule); }
.h-step-n { font-size: 13px; line-height: 24px; color: var(--teal); }
.h-steps h3 { font: 500 17px/1.4 var(--sans); color: var(--ink); }
.h-steps p { margin-top: 8px; font-size: 15px; line-height: 1.55; color: var(--ink-2); }

/* ---- 3. charts ---- */
.h-usual { font-size: 15px; color: var(--ink-2); }
.h-usual .fig { color: var(--ink); white-space: nowrap; }
.h-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 64px; }
.h-chart { min-width: 0; }
.h-chart-head { display: grid; gap: 4px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--rule); }
.h-chart-head h3 { font: 500 17px/1.4 var(--sans); color: var(--ink); }
.h-chart-head p { font-size: 12px; letter-spacing: 0.02em; color: #6e6e76; }

/* ---- 4. terms ---- */
.h-terms { border-top: 1px solid var(--rule); }
.h-terms > div { padding: 16px 0; border-bottom: 1px solid var(--rule); display: grid; gap: 4px; }
.h-terms dt { font: 500 15px/1.4 var(--sans); color: var(--ink); }
.h-terms dd { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.h-terms .fig, .h-steps .fig, .qa .fig { font-family: inherit; }

/* ---- 5. recent ---- */
.h-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 48px; }
.h-head-row .band-head { margin-bottom: 0; }
.h-head-row > .link-arrow { flex: none; height: 44px; }
.h-log { padding: 4px 8px; }
.h-table td { font-size: 15px; }
.h-table th:nth-child(1) { width: 14%; }
.h-table th:nth-child(2) { width: 26%; }
.h-table td.coin { font-weight: 500; }
.h-table td.coin .lead { color: var(--accent); }
.h-table .num { text-align: right; }
.h-table td.dim { color: var(--text-2); }
.h-table tr.h-log-msg td { color: var(--text-2); height: 64px; font-size: 15px; }

/* ---- 6. trust ---- */
.h-trust { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 64px; border-top: 1px solid var(--rule); }
.h-trust article { display: grid; align-content: start; gap: 12px; padding: 32px 0; border-bottom: 1px solid var(--rule); }
.h-trust h3 { font: 500 20px/1.3 var(--sans); letter-spacing: -0.01em; color: var(--ink); }
.h-trust p { font-size: 17px; line-height: 1.55; color: var(--ink-2); max-width: 52ch; }
.h-trust .link-arrow { margin-top: -4px; justify-self: start; min-height: 44px; font-size: 15px; }
.h-inline { color: var(--teal); }

/* ---- 7. questions ---- */
.h-q-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: start; }
.h-q-grid > .band-head { grid-column: 1 / span 4; margin-bottom: 0; }
.h-q-grid > .qa { grid-column: 6 / span 7; }
.qa summary { color: var(--ink); }

/* ---- 8. closing ---- */
.h-close { padding: 96px 0; }
.h-close-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; }
.h-close-t { font: 500 44px/1.1 var(--sans); letter-spacing: -0.025em; }
.h-close-t .fig { font-family: var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.h-close .lede { margin-top: 12px; }

@media (hover: hover) {
  .h-inline:hover { text-decoration-thickness: 2px; }
}

/* ---- tablet ---- */
@media (max-width: 1080px) {
  .h-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .h-copy, .h-frame { grid-column: 1 / -1; }
  .h-copy { padding-right: 0; max-width: 640px; }
  .h-split, .h-split-flip { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .h-split > :first-child, .h-split > :last-child, .h-split-flip > :first-child, .h-split-flip > :last-child { grid-column: 1 / -1; }
  .h-split-flip > :last-child { order: -1; }
  .h-q-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .h-q-grid > .band-head, .h-q-grid > .qa { grid-column: 1 / -1; }
}

/* ---- phone ---- */
@media (max-width: 860px) {
  .h-hero { padding: 40px 0 56px; }
  .h-copy { gap: 20px; }
  .h-copy .h-display { font-size: 40px; line-height: 1.05; }
  .h-actions { flex-direction: column; align-items: stretch; gap: 8px; margin-top: 4px; }
  .h-actions .btn { width: 100%; }
  .h-how { justify-content: center; }
  .h-hero-grid { gap: 32px; }
  .h-frame-head { height: 48px; padding: 0 12px 0 16px; }
  .h-unit, .h-left-label { display: none; }
  #h-race { height: 216px; }
  .h-canvas-wrap { padding: 8px 4px 4px 8px; }
  .h-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 32px; }
  .h-facts > div { padding: 16px 0 16px 16px; border-left: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
  .h-facts > div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .h-facts > div:nth-child(n+3) { border-bottom: 0; }
  .h-fact-v { font-size: 17px; }
  .h-charts { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .h-head-row { flex-direction: column; align-items: flex-start; margin-bottom: 32px; gap: 12px; }
  .h-trust { grid-template-columns: minmax(0, 1fr); }
  .h-trust article { padding: 24px 0; }
  .h-trust p { font-size: 15px; }
  .h-close { padding: 64px 0; }
  .h-close-row { flex-direction: column; align-items: stretch; gap: 24px; }
  .h-close-t { font-size: 32px; }
  .h-close .btn { width: 100%; }

  /* the log becomes stacked rows */
  .h-log { padding: 0 16px; }
  .h-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .h-table, .h-table tbody { display: block; }
  .h-table tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 12px; row-gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--hair); }
  .h-table tr:last-child { border-bottom: 0; }
  .h-table td { height: auto; padding: 0; border: 0; white-space: nowrap; }
  .h-table td.time { grid-column: 1; grid-row: 1; }
  .h-table td.coin { grid-column: 2; grid-row: 1; }
  .h-table td.read { grid-column: 3; grid-row: 1; }
  .h-table td.move, .h-table td.usual { grid-row: 2; font-size: 12px; color: var(--text-3); text-align: left; }
  .h-table td.move { grid-column: 2; }
  .h-table td.usual { grid-column: 3; text-align: right; }
  .h-table td.move::before { content: "Move "; font-family: var(--sans); }
  .h-table td.usual::before { content: "Usual "; font-family: var(--sans); }
  .h-table tr.h-log-msg { display: block; }
  .h-table tr.h-log-msg td { display: block; height: auto; padding: 16px 0; }
}

/* The feed is only mentioned when it is not live. */
.chip.is-live { display: none; }
