/*
 * ELEKTRONICS - Front page
 *
 * Every colour and face comes from the site's role tokens (--accent,
 * --fg-*, --font-*), with today's values as fallbacks, so the page follows
 * whatever identity style.css carries: green and Roboto Mono today, and
 * the Elektron Energy purple / Literata / Roboto Mono identity when that
 * lands, with no change here.
 */

.home {
    --home-mono: var(--font-mono, 'Roboto Mono', 'SF Mono', Menlo, Consolas, monospace);
    --home-display: var(--font-serif, 'Roboto Mono', 'SF Mono', Menlo, Consolas, monospace);
    --home-sans: var(--font-sans, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
    --home-accent: var(--accent, #9A81E6);
    --home-accent-wash: var(--accent-dim, rgba(154, 129, 230, 0.15));
    --home-on-accent: var(--on-accent, #0b0b0b);
    --home-surface: rgba(11, 11, 11, 0.86);
    --home-surface-raised: rgba(19, 19, 19, 0.94);
    --home-hair: rgba(255, 255, 255, 0.07);
    --home-hair-strong: rgba(255, 255, 255, 0.12);
    --home-max: 1240px;
    --home-gutter: clamp(16px, 4vw, 40px);
    --home-radius: 12px;

    position: relative;
    isolation: isolate;
    max-width: calc(var(--home-max) + 2 * var(--home-gutter));
    margin: 0 auto;
    padding: 0 var(--home-gutter) 1.5rem;
    font-family: var(--home-sans);
}

/* A faint engineering grid, fading out down the page (the glow is .home-glow) */
.home-backdrop {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 64px 64px,
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 64px 64px;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 35%, transparent 90%);
    mask-image: linear-gradient(to bottom, #000 0%, #000 35%, transparent 90%);
}

.home a {
    text-decoration: none;
}

/* ═══════════════════════════════════════════════════════════════
   SHARED BITS
   ═══════════════════════════════════════════════════════════════ */

.live-dot {
    display: inline-block;
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--home-accent, var(--accent));
    animation: live-pulse 2s ease-in-out infinite;
}

@keyframes live-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--home-accent-wash, rgba(154, 129, 230, 0.15)); }
    50% { opacity: 0.6; box-shadow: 0 0 0 5px transparent; }
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes rise-in {
    from { opacity: 0; transform: translateY(28px); }
    to { opacity: 1; transform: none; }
}

/* ═══════════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════════ */

.home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 3rem;
    align-items: center;
    padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(2rem, 4vw, 3rem);
}

/* home.js lifts and fades these as the hero scrolls away */
.hero-copy {
    transform-origin: left top;
}

.hero-copy,
.hero-aside {
    will-change: transform, opacity;
}

.live-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    max-width: 100%;
    padding: 0.4rem 0.9rem 0.4rem 0.75rem;
    border: 1px solid var(--home-hair-strong);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    font-family: var(--home-mono);
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    color: var(--fg-secondary);
    transition: border-color 0.2s ease, color 0.2s ease;
}

.live-pill:hover {
    border-color: var(--home-accent);
    color: var(--fg-primary);
}

#live-pill-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* style.css gives .hero-title display:flex for older pages; this one is prose */
.hero-title {
    display: block;
    margin: 1.5rem 0 1.4rem;
    max-width: 15ch;
    font-family: var(--home-display);
    font-size: clamp(2.6rem, 5.4vw, 4.6rem);
    font-weight: 500;
    line-height: 1.04;
    letter-spacing: -0.035em;
    color: var(--fg-primary);
    text-wrap: balance;
}

.hero-accent {
    color: var(--home-accent);
}

.hero-lead {
    max-width: 44ch;
    margin: 0 0 2.1rem;
    font-size: clamp(1.15rem, 1.5vw, 1.35rem);
    line-height: 1.55;
    color: var(--fg-secondary);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.home .btn-home {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.8rem 1.25rem;
    border: 1px solid var(--home-hair-strong);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    font-family: var(--home-mono);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--fg-primary);
    transition: background 0.2s ease, border-color 0.2s ease, filter 0.2s ease;
}

.home .btn-home:hover {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.06);
    color: var(--fg-primary);
}

.home .btn-home--primary,
.home .btn-home--primary:hover {
    border-color: var(--home-accent);
    background: var(--home-accent);
    color: var(--home-on-accent);
}

.home .btn-home--primary:hover {
    filter: brightness(1.08);
}

.btn-home i {
    font-size: 0.8em;
    transition: transform 0.2s ease;
}

.btn-home:hover i {
    transform: translateX(3px);
}

.home .btn-home:focus-visible,
.home .live-pill:focus-visible,
.home .explore-link:focus-visible,
.home .section-link:focus-visible {
    outline: 2px solid var(--home-accent);
    outline-offset: 3px;
}

/* ── Halving card ─────────────────────────────────────────────── */

.hero-aside {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
}

.halving-card {
    position: relative;
    overflow: hidden;
    padding: 1.35rem 1.4rem 1.2rem;
    border: 1px solid var(--home-hair-strong);
    border-radius: var(--home-radius);
    background:
        linear-gradient(160deg, var(--home-accent-wash), transparent 60%),
        var(--home-surface);
}

.halving-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--home-accent), transparent);
    opacity: 0.6;
}

.halving-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    font-family: var(--home-mono);
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--fg-dim);
}

.halving-era {
    color: var(--home-accent);
}

.halving-body {
    display: flex;
    align-items: center;
    gap: 1.15rem;
    margin: 1.1rem 0 1rem;
}

.halving-ring {
    position: relative;
    flex-shrink: 0;
    width: 78px;
    height: 78px;
}

.halving-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.halving-ring-track {
    fill: none;
    stroke: var(--home-accent-wash);
    stroke-width: 2.5;
}

.halving-ring-fill {
    fill: none;
    stroke: var(--home-accent);
    stroke-width: 2.5;
    stroke-linecap: round;
    transition: stroke-dashoffset 1.2s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.halving-ring-text {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-family: var(--home-mono);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--fg-primary);
}

.halving-days {
    font-family: var(--home-mono);
    font-size: 2.5rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--fg-primary);
}

.halving-unit {
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0;
    color: var(--fg-muted);
}

.halving-meta {
    margin-top: 0.5rem;
    font-family: var(--home-mono);
    font-size: 0.75rem;
    color: var(--fg-dim);
}

.halving-subsidy {
    padding-top: 0.85rem;
    border-top: 1px solid var(--home-hair);
    font-family: var(--home-mono);
    font-size: 0.75rem;
    color: var(--fg-muted);
}

/* ── Node status (admins only) ───────────────────────────────── */

.node-status {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    align-self: flex-end;
    padding: 0.45rem 0.85rem;
    border: 1px solid var(--home-hair-strong);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    font-family: var(--home-mono);
    transition: border-color 0.2s ease;
}

.node-status:hover {
    border-color: rgba(255, 255, 255, 0.24);
}

.node-status-text {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--fg-dim);
}

.node-status-count {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--fg-primary);
}

.node-status-count.all-online { color: var(--home-accent); }
.node-status-count.some-offline { color: var(--warning, #E0A84E); }
.node-status-count.all-offline { color: var(--danger, #E66767); }

.node-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--fg-dim);
}

.node-dot.online { background: var(--home-accent); box-shadow: 0 0 6px var(--home-accent); }
.node-dot.partial { background: var(--warning, #E0A84E); }
.node-dot.offline { background: var(--danger, #E66767); }
.node-dot.checking { animation: live-pulse 1.5s ease-in-out infinite; }

/* ═══════════════════════════════════════════════════════════════
   SECTIONS
   ═══════════════════════════════════════════════════════════════ */

.home-section {
    padding-top: clamp(2.75rem, 6vw, 4.5rem);
}

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 3rem;
    margin-bottom: 1.4rem;
}

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.6rem;
    font-family: var(--home-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--home-accent);
}

/* The brand's step glyph leads each eyebrow, as it leads every page subtitle
   (the live one keeps its pulsing dot instead) */
.section-eyebrow:not(:has(.live-dot))::before {
    content: '';
    display: inline-block;
    width: 13px;
    height: 5px;
    background: var(--ee-step) no-repeat center / contain;
}

.home .section-title {
    margin: 0;
    font-family: var(--home-display);
    font-size: clamp(1.7rem, 2.8vw, 2.4rem);
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: -0.028em;
    color: var(--fg-primary);
}

.section-note {
    max-width: 48ch;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--fg-dim);
}

.section-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.25rem;
}

.section-tools .section-note {
    font-family: var(--home-mono);
    font-size: 0.78rem;
}

.home .section-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    font-family: var(--home-mono);
    font-size: 0.78rem;
    color: var(--fg-muted);
    transition: color 0.2s ease;
}

.home .section-link:hover {
    color: var(--home-accent);
}

.section-link i {
    font-size: 0.8em;
    transition: transform 0.2s ease;
}

.section-link:hover i {
    transform: translateX(3px);
}

/* Segmented toggle (the pools' 24H / 1W) */
.seg-toggle {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--home-hair-strong);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
}

.seg-toggle-btn {
    padding: 0.35rem 0.8rem;
    border: 0;
    border-radius: 5px;
    background: transparent;
    font-family: var(--home-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--fg-dim);
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.seg-toggle-btn:hover {
    color: var(--fg-secondary);
}

.seg-toggle-btn.active {
    background: var(--home-accent-wash);
    color: var(--home-accent);
}

.seg-toggle-btn:focus-visible {
    outline: 2px solid var(--home-accent);
    outline-offset: 1px;
}

/* ═══════════════════════════════════════════════════════════════
   STATS PANEL
   ═══════════════════════════════════════════════════════════════ */

.stats-panel {
    overflow: hidden;
    border: 1px solid var(--home-hair-strong);
    border-radius: var(--home-radius);
    background: var(--home-hair);
    box-shadow: 0 28px 60px -32px rgba(0, 0, 0, 0.7);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1px;
    margin: 0;              /* resets style.css's generic .stats-grid frame */
    border: 0;
    background: transparent;
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
    padding: 1.2rem 1.3rem;
    border: 0;
    background: var(--home-surface);
    transition: background 0.2s ease, opacity 0.25s ease;
}

.stat-card:hover {
    background: var(--home-surface-raised);
}

.stat-label {
    margin: 0;
    font-family: var(--home-mono);
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--fg-dim);
}

.stat-value {
    margin: 0;
    font-family: var(--home-mono);
    font-size: 1.95rem;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--fg-primary);
}

.stat-value .unit {
    margin-left: 0.25rem;
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0;
    color: var(--fg-muted);
}

.stat-value .currency {
    margin-right: 0.1rem;
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--fg-muted);
}

.stat-subtext {
    min-height: 1rem;
    font-family: var(--home-mono);
    font-size: 0.7rem;
    color: var(--fg-dim);
}

.stat-subtext.live {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--home-accent);
}

.stat-card--compact {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.stat-card--compact .stat-value {
    font-size: 1.45rem;
}

.stat-value.loading,
.loading-text {
    min-width: 80px;
    border-radius: 4px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.03) 75%);
    background-size: 200% 100%;
    color: transparent;
    animation: shimmer 1.5s infinite;
}

.stat-value.loading {
    height: 2.1rem;
}

.stat-card--compact .stat-value.loading {
    height: 1.6rem;
}

/* Block-time / epoch status chips */
.block-status {
    display: inline-flex;
    align-items: center;
    padding: 0.14rem 0.5rem;
    border-radius: 4px;
    font-family: var(--home-mono);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* "Fast" is good news in the accent (green today, purple in the Elektron
   Energy identity); "slow" stays the danger red */
.block-status.fast {
    border: 1px solid color-mix(in srgb, var(--home-accent) 32%, transparent);
    background: var(--home-accent-wash);
    color: var(--home-accent);
}

.block-status.slow {
    border: 1px solid color-mix(in srgb, var(--danger, #E66767) 32%, transparent);
    background: color-mix(in srgb, var(--danger, #E66767) 12%, transparent);
    color: var(--danger, #E66767);
}

.block-status.normal {
    border: 1px solid var(--home-hair-strong);
    background: rgba(255, 255, 255, 0.05);
    color: var(--fg-muted);
}

.epoch-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.55rem;
}

.epoch-prev {
    font-family: var(--home-mono);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--fg-muted);
    cursor: help;
}

.epoch-progress {
    margin-top: auto;
    padding-top: 0.35rem;
}

.epoch-progress-bar {
    height: 4px;
    overflow: hidden;
    border-radius: 2px;
    background: var(--home-accent-wash);
}

.epoch-progress-fill {
    height: 100%;
    border-radius: 2px;
    background: var(--home-accent);
    transition: width 0.6s ease;
}

.epoch-progress-text {
    display: flex;
    justify-content: space-between;
    margin-top: 0.3rem;
    font-family: var(--home-mono);
    font-size: 0.62rem;
    color: var(--fg-dim);
}

#epoch-eta {
    color: var(--fg-muted);
}

/* ═══════════════════════════════════════════════════════════════
   WHO IS MINING - share bar + sparkline tiles
   ═══════════════════════════════════════════════════════════════ */

.pools-panel {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.pools-bar-wrap {
    padding: 1.35rem 1.3rem 1rem;
    background: var(--home-surface);
}

.pools-bar {
    display: flex;
    gap: 2px;
    height: 26px;
}

.pools-seg {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-basis: 0;
    min-width: 3px;
    transition: opacity 0.2s ease;
    outline: none;
}

.pools-seg:first-child { border-radius: 4px 0 0 4px; }
.pools-seg:last-child { border-radius: 0 4px 4px 0; }

.pools-seg--pool {
    background: var(--home-accent);
    color: var(--home-on-accent);
}

.pools-seg--other {
    background: #4a4a47;
    color: var(--fg-primary);
}

.pools-seg--unidentified {
    background: #2e2e2c;
    color: var(--fg-muted);
}

.pools-seg.dimmed {
    opacity: 0.3;
}

.pools-seg:focus-visible {
    box-shadow: 0 0 0 2px var(--fg-primary);
}

.pools-seg-label {
    font-family: var(--home-mono);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
    pointer-events: none;
}

.pools-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.4rem;
    margin-top: 0.9rem;
    font-family: var(--home-mono);
    font-size: 0.7rem;
    color: var(--fg-dim);
}

.pools-key {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.pools-key--trend {
    margin-left: auto;
}

.pools-swatch {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.pools-swatch--pool { background: var(--home-accent); }
.pools-swatch--other { background: #4a4a47; }
.pools-swatch--unidentified { background: #2e2e2c; box-shadow: inset 0 0 0 1px var(--home-hair-strong); }

.pools-tiles {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1px;
}

.pool-card {
    gap: 0.45rem;
}

.pool-card.dimmed {
    opacity: 0.45;
}

.pool-name {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.pool-card .stat-value {
    font-size: 1.55rem;
}

.pool-card .stat-value.loading {
    height: 1.7rem;
}

.pool-spark {
    display: block;
    width: 100%;
    height: 36px;
    overflow: visible;
    cursor: crosshair;
}

.pool-spark-base {
    stroke: var(--home-hair-strong);
    stroke-width: 1;
}

.pool-spark-area {
    fill: var(--fg-dim);
    opacity: 0.1;
}

.pool-spark-line {
    fill: none;
    stroke: var(--fg-dim);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pool-spark-dot {
    fill: var(--home-accent);
    stroke: #0b0b0b;
    stroke-width: 2;
}

.pool-spark-cross {
    stroke: var(--fg-muted);
    stroke-width: 1;
}

/* One tooltip for every chart mark; it lives on <body>, outside .home */
.viz-tooltip {
    position: fixed;
    z-index: 1000;
    max-width: 300px;
    padding: 0.5rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    background: rgba(18, 18, 18, 0.97);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
    font-family: var(--font-mono, 'Roboto Mono', monospace);
    pointer-events: none;
}

.viz-tooltip[hidden] {
    display: none;
}

.viz-tooltip-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--fg-primary);
}

.viz-tooltip-label {
    margin-top: 0.15rem;
    font-size: 0.7rem;
    color: var(--fg-muted);
}

/* ═══════════════════════════════════════════════════════════════
   WHAT'S INSIDE
   ═══════════════════════════════════════════════════════════════ */

.explore-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.explore-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 1.4rem 1.3rem 0.8rem;
    border: 1px solid var(--home-hair-strong);
    border-radius: var(--home-radius);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.008));
    transition: border-color 0.25s ease;
}

.explore-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

/* A soft light that follows the cursor (home.js sets --mx / --my) */
.explore-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 0%), var(--home-accent-wash), transparent 65%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.explore-card:hover::before {
    opacity: 1;
}

.explore-card > * {
    position: relative;
}

.explore-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    column-gap: 0.85rem;
    margin-bottom: 0.4rem;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid var(--home-hair);
}

.explore-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: var(--home-accent-wash);
    font-size: 0.95rem;
    color: var(--home-accent);
}

.home .explore-name {
    margin: 0;
    font-family: var(--home-display);
    font-size: 1.3rem;
    font-weight: 500;
    letter-spacing: -0.015em;
    color: var(--fg-primary);
}

.explore-count {
    font-family: var(--home-mono);
    font-size: 0.72rem;
    color: var(--fg-dim);
}

.explore-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.home .explore-link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.75rem;
    margin: 0 -0.6rem;
    padding: 0.65rem 0.6rem;
    border-radius: 8px;
    color: inherit;
    transition: background 0.2s ease;
}

.home .explore-link:hover {
    background: rgba(255, 255, 255, 0.045);
}

.explore-tool {
    grid-column: 1;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--fg-primary);
}

.explore-arrow {
    grid-column: 2;
    grid-row: 1;
    font-size: 0.75rem;
    color: var(--home-accent);
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.explore-link:hover .explore-arrow,
.explore-link:focus-visible .explore-arrow {
    opacity: 1;
    transform: none;
}

/* ═══════════════════════════════════════════════════════════════
   FROM THE SOURCE
   ═══════════════════════════════════════════════════════════════ */

.quote {
    max-width: 72ch;
    margin: 0.4rem 0 0;
    padding: 0.2rem 0 0.2rem 1.6rem;
    border-left: 2px solid var(--home-accent);
}

.quote-text {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    font-family: var(--home-display);
    font-size: clamp(1.15rem, 1.9vw, 1.45rem);
    line-height: 1.55;
    letter-spacing: -0.01em;
    color: var(--fg-secondary);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.quote-text.visible {
    opacity: 1;
}

.quote-text.expanded {
    display: block;
    -webkit-line-clamp: unset;
}

.quote-expand-btn {
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.7rem;
    padding: 0;
    border: 0;
    background: none;
    font-family: var(--home-mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--fg-dim);
    cursor: pointer;
}

.quote-expand-btn:hover {
    color: var(--home-accent);
}

.expand-icon {
    width: 13px;
    height: 13px;
    transition: transform 0.25s ease;
}

.quote-expand-btn.expanded .expand-icon {
    transform: rotate(180deg);
}

.quote-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem 1rem;
    margin: 1.1rem 0 0 1.8rem;
    font-family: var(--home-mono);
    font-size: 0.75rem;
}

.quote-author {
    font-weight: 600;
    color: var(--home-accent);
}

.quote-date {
    color: var(--fg-dim);
}

.quote-categories {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.quote-category {
    padding: 0.15rem 0.5rem;
    border: 1px solid var(--home-hair-strong);
    border-radius: 3px;
    font-size: 0.62rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--fg-muted);
}

.quote-actions {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding-left: 1rem;
    border-left: 1px solid var(--home-hair-strong);
}

.home .quote-actions a,
.quote-next {
    padding: 0;
    border: 0;
    background: none;
    font-family: var(--home-mono);
    font-size: 0.72rem;
    color: var(--fg-dim);
    cursor: pointer;
    transition: color 0.2s ease;
}

.home .quote-actions a:hover,
.quote-next:hover {
    color: var(--home-accent);
}

/* ═══════════════════════════════════════════════════════════════
   SIGN-OFF
   ═══════════════════════════════════════════════════════════════ */

.home-footer {
    margin-top: clamp(3.5rem, 8vw, 6rem);
    padding: 2.5rem 0 1rem;
    border-top: 1px solid var(--home-hair);
}

.home-manifesto {
    margin: 0 0 1.75rem;
    font-family: var(--home-display);
    font-size: clamp(1.6rem, 3.2vw, 2.6rem);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--fg-primary);
}

.home-footer-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 2rem;
    font-family: var(--home-mono);
    font-size: 0.75rem;
    color: var(--fg-dim);
}

.home-footer-brand {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem 0.75rem;
}

.home-footer-links {
    display: flex;
    gap: 1.5rem;
}

.home .home-footer-links a {
    color: var(--fg-muted);
    transition: color 0.2s ease;
}

.home .home-footer-links a:hover {
    color: var(--home-accent);
}

/* ═══════════════════════════════════════════════════════════════
   GLOW - a slow parallax light behind the hero (home.js moves it)
   ═══════════════════════════════════════════════════════════════ */

.home-glow {
    position: fixed;
    top: -30vh;
    right: -20vw;
    z-index: -1;
    width: 70vw;
    height: 80vh;
    border-radius: 50%;
    background: radial-gradient(closest-side, var(--home-accent-wash), transparent);
    pointer-events: none;
    will-change: transform;
}

/* ═══════════════════════════════════════════════════════════════
   TICKER - the headline numbers, drifting by
   ═══════════════════════════════════════════════════════════════ */

.ticker {
    margin: 0 calc(-1 * var(--home-gutter));
    padding: 1rem 0;
    overflow: hidden;
    border-block: 1px solid var(--home-hair);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.ticker-track {
    display: flex;
    width: max-content;
}

.ticker-group {
    display: flex;
}

.ticker-item {
    display: inline-flex;
    align-items: baseline;
    gap: 0.6rem;
    padding: 0 1.6rem;
    white-space: nowrap;
    font-family: var(--home-mono);
}

.ticker-item::after {
    content: '';
    align-self: center;
    width: 4px;
    height: 4px;
    margin-left: 1.6rem;
    margin-right: -1.6rem;
    border-radius: 50%;
    background: var(--home-accent);
    opacity: 0.55;
}

.ticker-label {
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--fg-dim);
}

.ticker-value {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--fg-primary);
}

/* Without motion the second copy is redundant */
.home:not(.motion) .ticker-group + .ticker-group {
    display: none;
}

.home.motion .ticker-track {
    animation: ticker-loop 70s linear infinite;
}

.home.motion .ticker:hover .ticker-track {
    animation-play-state: paused;
}

@keyframes ticker-loop {
    to { transform: translateX(-50%); }
}

/* ═══════════════════════════════════════════════════════════════
   MOTION - scroll reveals. home.js adds .motion, and never under
   prefers-reduced-motion, so nothing here can hide content then.
   ═══════════════════════════════════════════════════════════════ */

.home.motion [data-reveal]:not(.is-in),
.home.motion [data-stagger]:not(.is-in) > * {
    opacity: 0;
}

.home.motion [data-reveal].is-in {
    animation: rise-in 0.95s cubic-bezier(0.2, 0.7, 0.1, 1) backwards;
    animation-delay: calc(var(--i, 0) * 90ms);
}

.home.motion [data-stagger].is-in > * {
    animation: rise-in 0.85s cubic-bezier(0.2, 0.7, 0.1, 1) backwards;
    animation-delay: calc(var(--i, 0) * 60ms);
}

/* Words rise out of a mask, one after another */
.home.motion .word {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
    padding-bottom: 0.12em;
    margin-bottom: -0.12em;
}

.home.motion .word-inner {
    display: inline-block;
}

.home.motion [data-words] .word-inner {
    transform: translateY(110%);
    transition: transform 1.05s cubic-bezier(0.2, 0.7, 0.1, 1);
    transition-delay: calc(var(--w, 0) * 65ms + 80ms);
}

.home.motion [data-words].is-in .word-inner {
    transform: none;
}

/* The manifesto lights up as you scroll to it */
.home.motion [data-scrub] .word-inner {
    opacity: 0.14;
    transition: opacity 0.35s ease;
}

.home.motion [data-scrub] .word-inner.lit {
    opacity: 1;
}

/* The share bar wipes in left to right; the sparklines draw themselves */
.home.motion .pools-bar {
    clip-path: inset(0 100% 0 0);
}

.home.motion .pools-panel.is-in .pools-bar {
    clip-path: inset(0 0 0 0);
    transition: clip-path 1.4s cubic-bezier(0.65, 0, 0.35, 1) 0.25s;
}

.home.motion .pool-spark-line {
    stroke-dasharray: var(--len, 0);
    stroke-dashoffset: var(--len, 0);
}

.home.motion .pool-spark-area,
.home.motion .pool-spark-dot {
    opacity: 0;
}

.home.motion .pools-panel.is-in .pool-spark-line.drawn {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
}

.home.motion .pools-panel.is-in .pool-spark-area.drawn {
    opacity: 0.1;
    transition: opacity 0.8s ease 1.1s;
}

.home.motion .pools-panel.is-in .pool-spark-dot.drawn {
    opacity: 1;
    transition: opacity 0.4s ease 1.5s;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 1180px) {
    .explore-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .home-hero {
        grid-template-columns: minmax(0, 1fr);
        gap: 2rem;
    }
    .hero-aside {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
    }
    .halving-card {
        flex: 1 1 320px;
        max-width: 420px;
    }
    .node-status {
        align-self: flex-start;
    }
    .pools-tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .pool-card:last-child {
        grid-column: 1 / -1;
    }
    .pools-key--trend {
        margin-left: 0;
    }
}

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .stat-card {
        padding: 1rem;
    }
    .stat-value {
        font-size: 1.6rem;
    }
    .explore-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .quote {
        padding-left: 1.1rem;
    }
    .quote-meta {
        margin-left: 1.3rem;
    }
    .quote-actions {
        padding-left: 0;
        border-left: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home *,
    .home *::before,
    .home *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
