:root {
    /* IBM Design Language — dark dashboard shell + IBM blue accent */
    --bg: #030308;
    --bg-elevated: #0c0b14;
    --card: rgba(16, 14, 28, 0.92);
    --card-border: rgba(15, 98, 254, 0.14);
    --accent: #0f62fe;
    --accent-2: #4589ff;
    --accent-teal: #2dd4bf;
    --accent-teal-dim: #0d3d3a;
    --text: #f4f4f4;
    --text-muted: #a2a9b0;
    --text-dim: #6f7878;
    --green: #24a148;
    --green-dim: #166534;
    --red: #fa4d56;
    --nav-pill: rgba(22, 20, 38, 0.85);
    --radius: 14px;
    --radius-lg: 20px;
    --header-h: 56px;
    --ibm-blue: #0f62fe;
    --ibm-pink: #ee5396;
    --ibm-orange: #ff832b;
    --ibm-purple: #8a3ffc;
    /* Typography: IBM Plex — https://www.ibm.com/design/language/typography/typeface */
    --font-sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
    --font-serif: "IBM Plex Serif", "Georgia", "Times New Roman", serif;
    --font-mono: "IBM Plex Mono", ui-monospace, monospace;
    --font: var(--font-sans);
    --type-display: clamp(1.5rem, 2.5vw, 2rem);
    --type-title: 1.05rem;
    --type-body: 0.875rem;
    --type-caption: 0.75rem;
    --type-label: 0.625rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: var(--type-body);
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0.01em;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "kern" 1, "liga" 1;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-serif);
    font-weight: 500;
    letter-spacing: -0.015em;
    line-height: 1.25;
}

.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Header ── */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    gap: 1rem;
    background: linear-gradient(180deg, rgba(3, 3, 8, 0.95) 0%, rgba(3, 3, 8, 0.4) 100%);
    backdrop-filter: blur(12px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text);
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    font-size: 1rem;
    letter-spacing: -0.02em;
}

.brand-ibm {
    font-family: var(--font-sans);
    font-weight: 600;
    color: var(--text);
}

.brand-sub {
    font-family: var(--font-serif);
    font-weight: 500;
    font-style: italic;
    color: var(--text);
}

.nav-pill {
    display: none;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem;
    background: var(--nav-pill);
    border: 1px solid var(--card-border);
    border-radius: 999px;
    box-shadow: 0 0 24px rgba(125, 23, 244, 0.08);
}

@media (min-width: 640px) {
    .nav-pill {
        display: flex;
    }
}

.nav-link {
    padding: 0.4rem 1rem;
    border-radius: 999px;
    font-family: var(--font-sans);
    font-size: var(--type-caption);
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s, background 0.15s;
}

.nav-link:hover {
    color: var(--text);
}

.nav-link.active {
    color: var(--text);
    background: rgba(15, 98, 254, 0.18);
}

.nav-link-filled {
    background: rgba(30, 26, 50, 0.9);
    color: var(--text);
    border: 1px solid var(--card-border);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.network-btn {
    display: none;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    background: rgba(20, 18, 35, 0.9);
    color: var(--text);
    font-family: inherit;
    font-size: 0.75rem;
    cursor: pointer;
}

@media (min-width: 640px) {
    .network-btn {
        display: flex;
    }
}

.network-label {
    font-family: var(--font-sans);
    font-size: var(--type-label);
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.network-value {
    font-family: var(--font-sans);
    font-weight: 600;
}

.chevron {
    width: 14px;
    height: 14px;
    opacity: 0.6;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    background: rgba(20, 18, 35, 0.9);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.icon-btn svg {
    width: 20px;
    height: 20px;
}

/* ── Hero / Globe ── */
.hero {
    position: relative;
    height: min(62vh, 600px);
    min-height: 400px;
    margin-top: var(--header-h);
    overflow: hidden;
    flex-shrink: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% 40%, rgba(125, 23, 244, 0.08), transparent),
        var(--bg);
}

/* Floor reflection under the globe (glow preserved via globe.gl atmosphere) */
.hero::after {
    content: "";
    position: absolute;
    bottom: 4%;
    left: 50%;
    z-index: 1;
    width: min(72%, 520px);
    height: 22%;
    transform: translateX(-50%);
    background: radial-gradient(
        ellipse 100% 100% at 50% 0%,
        rgba(125, 23, 244, 0.12) 0%,
        rgba(27, 77, 140, 0.05) 45%,
        transparent 72%
    );
    pointer-events: none;
}

/* Starfield — behind Earth; sky shows through transparent WebGL clear */
.hero-stars {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background:
        url("data/night-sky.png") center / cover no-repeat,
        radial-gradient(ellipse 120% 80% at 50% 40%, rgba(40, 20, 70, 0.35), transparent 70%);
    opacity: 0.95;
}

.hero-stars::before,
.hero-stars::after {
    content: "";
    position: absolute;
    inset: 0;
    background-repeat: repeat;
    will-change: opacity;
}

.hero-stars::before {
    background-image:
        radial-gradient(1.5px 1.5px at 12% 18%, rgba(255, 255, 255, 0.95), transparent),
        radial-gradient(1.2px 1.2px at 38% 72%, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(2px 2px at 61% 34%, rgba(210, 220, 255, 0.85), transparent),
        radial-gradient(1.4px 1.4px at 84% 58%, rgba(255, 255, 255, 0.75), transparent),
        radial-gradient(1.2px 1.2px at 22% 91%, rgba(255, 255, 255, 0.65), transparent),
        radial-gradient(1.5px 1.5px at 93% 12%, rgba(255, 255, 255, 0.8), transparent);
    background-size: 220px 180px;
    animation: hero-stars-fade 8s ease-in-out infinite;
}

.hero-stars::after {
    background-image:
        radial-gradient(1.2px 1.2px at 8% 42%, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(2px 2px at 29% 11%, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(1.2px 1.2px at 52% 63%, rgba(255, 255, 255, 0.55), transparent),
        radial-gradient(1.5px 1.5px at 76% 27%, rgba(200, 210, 255, 0.75), transparent),
        radial-gradient(1.3px 1.3px at 88% 88%, rgba(255, 255, 255, 0.7), transparent);
    background-size: 280px 230px;
    animation: hero-stars-fade 11s ease-in-out infinite reverse;
    animation-delay: -3.5s;
}

@keyframes hero-stars-fade {
    0%,
    100% {
        opacity: 0.55;
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        opacity: 1;
        transform: translate3d(0, -2px, 0) scale(1.01);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-stars::before,
    .hero-stars::after {
        animation: none;
        opacity: 0.3;
    }
}

.globe-canvas {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100% !important;
    height: 100% !important;
    display: block;
    cursor: grab;
    touch-action: none;
    overflow: hidden;
    transition: opacity 0.45s ease;
    background: transparent;
}

.globe-canvas canvas,
.moon-canvas canvas {
    background: transparent !important;
}

/* Mini moon — own docked globe (same idea as Earth), not clipped through Earth canvas */
.moon-wrap {
    position: absolute;
    top: 10%;
    right: 14%;
    z-index: 5;
    width: 132px;
    height: 132px;
    min-width: 132px;
    min-height: 132px;
    max-width: 132px;
    max-height: 132px;
    pointer-events: auto;
    visibility: visible;
    opacity: 1;
    transition:
        opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0s linear 0s;
}

.hero.earth-zoomed .moon-wrap {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0s linear 0.55s;
}

.moon-dock {
    width: 132px;
    height: 132px;
    min-width: 132px;
    min-height: 132px;
    max-width: 132px;
    max-height: 132px;
    border-radius: 50%;
    overflow: hidden;
    background: transparent;
    border: none;
    box-shadow: none;
}

.moon-canvas {
    position: relative;
    width: 132px !important;
    height: 132px !important;
    min-width: 132px !important;
    min-height: 132px !important;
    max-width: 132px !important;
    max-height: 132px !important;
    display: block;
    cursor: pointer;
    touch-action: manipulation;
}

.moon-canvas canvas {
    display: block;
    width: 132px !important;
    height: 132px !important;
    max-width: 132px !important;
    max-height: 132px !important;
}

.globe-canvas canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.globe-canvas:active {
    cursor: grabbing;
}

.globe-loading {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    transform: translate(-50%, -50%);
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-muted, #8b8ca8);
    pointer-events: none;
    transition: opacity 0.25s;
}

.globe-loading[hidden] {
    display: none;
}

.globe-loading--error {
    color: #ffb4b4;
}

.file-warn {
    position: fixed;
    inset: 0 auto auto 0;
    z-index: 9999;
    width: 100%;
    margin: 0;
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    text-align: center;
    color: #f4f4f8;
    background: linear-gradient(90deg, #8a1c1c, #5c1010);
    border-bottom: 1px solid rgba(255, 120, 120, 0.4);
}

.file-warn code {
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.35);
}

.file-warn a {
    color: #7dd3fc;
}

.validator-panel {
    display: none;
    position: absolute;
    bottom: 1rem;
    left: 0.5rem;
    z-index: 20;
    max-width: 340px;
}

@media (min-width: 1024px) {
    .validator-panel {
        display: block;
    }
}

.validator-panel-inner {
    padding: 1rem 1.15rem;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
}

.validator-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.validator-id {
    display: flex;
    gap: 0.65rem;
    align-items: center;
}

.validator-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.9rem;
}

.validator-name {
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: var(--type-title);
}

.validator-city {
    font-family: var(--font-sans);
    font-size: var(--type-caption);
    font-weight: 400;
    color: var(--text-muted);
}

.validator-rank {
    text-align: right;
}

.rank-num {
    display: block;
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-bottom: 0.25rem;
}

.rank-ring {
    position: relative;
    width: 44px;
    height: 44px;
    margin-left: auto;
}

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

.ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 3;
}

.ring-fg {
    fill: none;
    stroke: var(--accent);
    stroke-width: 3;
    stroke-dasharray: 97.4;
    stroke-dashoffset: calc(97.4 - (97.4 * var(--pct) / 100));
    stroke-linecap: round;
}

.rank-ring span {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 600;
}

.validator-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--card-border);
}

.validator-stats strong {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.validator-stats span {
    font-family: var(--font-sans);
    font-size: var(--type-label);
    font-weight: 500;
    color: var(--text-muted);
    text-transform: lowercase;
    letter-spacing: 0.02em;
}

/* ── Dashboard ── */
.dashboard {
    position: relative;
    z-index: 10;
    margin-top: 0;
    padding: 0 0.75rem 1rem;
}

.dashboard-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.55rem 1.35rem;
    max-width: 1200px;
    margin: 0 auto 0.65rem;
    padding: 0.55rem 1.1rem;
    background: rgba(12, 10, 22, 0.92);
    border: 1px solid var(--card-border);
    border-radius: 999px;
    font-family: var(--font-sans);
    font-size: var(--type-label);
    font-weight: 500;
    color: var(--text-muted);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.dashboard-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.dashboard-disclaimer {
    max-width: 1200px;
    margin: 0 auto 0.7rem;
    padding: 0 0.3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-family: var(--font-serif);
    font-size: clamp(0.8rem, 1.15vw, 0.92rem);
    font-style: italic;
    letter-spacing: 0.01em;
    color: var(--text-dim);
}

.dashboard-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem;
    background: var(--bg-elevated);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 48px rgba(125, 23, 244, 0.06);
}

.row-duo {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
    .row-duo {
        grid-template-columns: 1fr 1fr;
    }
}

/* Legacy office list (removed from HTML; hide if cached page still has it) */
#offices-section,
#office-list,
.offices-row,
.offices-list-card {
    display: none !important;
}

/* Offices list + hover preview */
.offices-row {
    align-items: stretch;
}

@media (min-width: 900px) {
    .offices-row {
        grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    }
}

.offices-list-card {
    display: flex;
    flex-direction: column;
    min-height: 320px;
}

.card-head-min {
    justify-content: flex-end;
    margin-bottom: 0.35rem;
    padding-bottom: 0;
    border-bottom: none;
}

.badge-dim {
    font-size: 0.65rem;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
}

.office-list-scroll {
    max-height: min(52vh, 520px);
    overflow-y: auto;
    padding-right: 0.25rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(125, 23, 244, 0.35) transparent;
}

.office-list-scroll::-webkit-scrollbar {
    width: 5px;
}

.office-list-scroll::-webkit-scrollbar-thumb {
    background: rgba(125, 23, 244, 0.35);
    border-radius: 4px;
}

.block-item-compact {
    grid-template-columns: auto 1fr auto;
    cursor: default;
    border-radius: 10px;
    padding: 0.55rem 0.5rem;
    margin: 0 -0.35rem;
    border-bottom: none;
    transition: background 0.18s ease, box-shadow 0.18s ease;
}

.block-item-compact.is-hovered,
.block-item-compact:focus-visible {
    background: rgba(125, 23, 244, 0.1);
    box-shadow: inset 3px 0 0 var(--accent);
    outline: none;
}

.block-val-strong {
    font-weight: 600;
    font-size: 0.78rem;
}

.block-val-muted {
    color: var(--text-muted);
    font-size: 0.68rem;
}

.block-region {
    font-size: 0.6rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    align-self: center;
}

.office-preview {
    position: relative;
    min-height: 0;
}

.office-preview-hero {
    display: block;
    position: absolute;
    z-index: 22;
    width: min(320px, calc(100vw - 7.5rem));
    pointer-events: auto;
    top: auto;
    bottom: 5.5rem;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
}

@media (min-width: 768px) {
    .office-preview-hero {
        bottom: 6rem;
        width: min(300px, calc(100vw - 8.5rem));
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .office-preview-hero {
        width: min(420px, calc(100vw - 2.25rem));
        left: 50%;
        right: auto;
        bottom: 4.1rem;
        transform: translateX(-50%);
    }

    .office-preview-inner {
        min-height: 132px;
        max-height: 28vh;
        padding: 0.75rem 0.95rem;
        overflow: auto;
    }

    .office-preview-meta {
        gap: 0.4rem;
    }

    .office-preview-meta div {
        grid-template-columns: 66px 1fr;
        padding-top: 0.34rem;
    }
}

@media (min-width: 1024px) {
    .office-preview-hero {
        top: auto;
        bottom: 7rem;
        left: auto;
        right: max(1rem, 2vw);
        width: min(300px, 30vw);
        transform: none;
    }
}

.globe-canvas.globe-hovering {
    cursor: pointer;
}

.office-preview-inner {
    height: 100%;
    min-height: 280px;
    padding: 1.35rem 1.4rem;
    background: linear-gradient(145deg, rgba(22, 20, 38, 0.95), rgba(12, 11, 20, 0.92));
    border: 1px solid rgba(125, 23, 244, 0.18);
    border-radius: var(--radius);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(14px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    animation: preview-in 0.32s ease-out;
}

@keyframes preview-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.office-preview-inner.office-preview-empty {
    text-align: center;
    justify-content: center;
    gap: 0.35rem;
    border-style: dashed;
    border-color: rgba(125, 23, 244, 0.12);
    background: rgba(8, 8, 16, 0.5);
    animation: none;
}

.office-preview-hint {
    font-family: var(--font-serif);
    font-size: var(--type-body);
    color: var(--text-muted);
    font-weight: 400;
    font-style: italic;
}

.office-preview-sub {
    font-family: var(--font-sans);
    font-size: var(--type-caption);
    color: var(--text-dim);
}

.office-preview-top {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.office-preview-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(15, 98, 254, 0.35);
}

.office-preview-type {
    font-family: var(--font-sans);
    font-size: var(--type-label);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    margin-bottom: 0.2rem;
}

.office-preview-name {
    font-family: var(--font-serif);
    font-size: var(--type-title);
    font-weight: 500;
    line-height: 1.3;
    color: var(--text);
}

.office-preview-meta {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin: 0;
}

.office-preview-meta div {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 0.5rem;
    align-items: baseline;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(125, 23, 244, 0.1);
}

.office-preview-meta div:first-child {
    border-top: none;
    padding-top: 0;
}

.office-preview-meta dt {
    font-family: var(--font-sans);
    font-size: var(--type-label);
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.office-preview-meta dd {
    margin: 0;
    font-family: var(--font-sans);
    font-size: var(--type-caption);
    font-weight: 400;
    color: var(--text);
    line-height: 1.45;
}

.office-preview-link {
    margin: 1rem 0 0;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(125, 23, 244, 0.15);
}

.office-preview-link a {
    font-family: var(--font-sans);
    font-size: var(--type-caption);
    font-weight: 600;
    color: #ff4d4d;
    text-decoration: none;
}

.office-preview-link a:hover {
    color: #ff7a7a;
    text-decoration: underline;
}

.footer-link-btn {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-size: 0.8rem;
    color: var(--text-dim);
    font-family: ui-monospace, monospace;
    cursor: pointer;
    transition: color 0.15s;
}

.footer-link-btn:hover {
    color: var(--text-muted);
}

.row-trio {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

@media (min-width: 900px) {
    .row-trio {
        grid-template-columns: 1fr 1fr 1.4fr;
    }
}

.row-stake .card-metric:last-child {
    grid-column: span 1;
}

.card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    min-height: 120px;
    display: flex;
    flex-direction: column;
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.card-head h3 {
    font-family: var(--font-serif);
    font-size: var(--type-body);
    font-weight: 500;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.card-head h3 .sub {
    font-family: var(--font-sans);
    font-size: var(--type-caption);
    font-weight: 400;
    opacity: 0.75;
}

.gear-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.badge {
    font-family: var(--font-sans);
    font-size: var(--type-label);
    font-weight: 500;
    letter-spacing: 0.03em;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-dim);
    white-space: nowrap;
}

.badge-live {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--green);
    background: rgba(74, 222, 128, 0.08);
}

.live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Proposal history */
.card-proposal {
    min-height: 160px;
}

.region-stats {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    flex: 1;
    margin: 0.35rem 0;
}

.region-stat-row {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.72rem;
}

.region-stat-name {
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: var(--type-caption);
    color: var(--text);
    letter-spacing: 0.01em;
}

.region-stat-nums {
    font-family: var(--font-sans);
    font-size: var(--type-label);
    color: var(--text-muted);
}

.region-num-office { color: var(--ibm-blue); }
.region-num-client { color: var(--ibm-pink); }
.region-num-partner { color: var(--ibm-orange); }

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.dot-office { background: var(--ibm-blue); box-shadow: 0 0 6px var(--ibm-blue); }
.dot-client { background: var(--ibm-pink); box-shadow: 0 0 6px var(--ibm-pink); }
.dot-partner { background: var(--ibm-orange); box-shadow: 0 0 6px var(--ibm-orange); }
.dot-initiative { background: var(--ibm-purple); box-shadow: 0 0 6px var(--ibm-purple); }

.proposal-foot {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: auto;
}

.proposal-foot strong {
    color: var(--green);
}

/* Recent blocks */
.card-blocks {
    min-height: 200px;
}

.block-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    flex: 1;
}

.block-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.6rem 0.85rem;
    align-items: start;
    font-size: 0.7rem;
    padding: 0 0 0.65rem 0.55rem;
    border-bottom: 1px solid rgba(125, 23, 244, 0.06);
    border-left: 3px solid var(--block-accent, var(--accent));
}

.block-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.block-fields {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.block-row {
    display: flex;
    gap: 0.45rem;
    align-items: baseline;
}

.block-label {
    font-family: var(--font-sans);
    color: var(--text-dim);
    font-size: var(--type-label);
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    min-width: 76px;
}

.block-val {
    font-family: var(--font-sans);
    color: var(--text);
    font-weight: 400;
}

.block-txs {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.block-txs .block-label {
    min-width: 0;
}

.block-txs strong {
    font-family: var(--font-serif);
    color: var(--text);
    font-size: var(--type-body);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* Metric cards */
.card-metric {
    position: relative;
    min-height: 7rem;
}

.metric-value {
    font-family: var(--font-serif);
    font-size: clamp(1.65rem, 2.2vw, 2rem);
    font-weight: 400;
    letter-spacing: -0.03em;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    margin-top: auto;
    padding-top: 0.75rem;
}

.metric-value-lg {
    font-size: clamp(1.85rem, 2.5vw, 2.25rem);
    margin-top: auto;
    padding-top: 1rem;
}

.metric-value .unit,
.metric-value-lg .unit {
    font-family: var(--font-sans);
    font-size: var(--type-caption);
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 0;
}

.metric-value-pos {
    color: var(--green);
}

/* Block info card */
.card-block-info {
    min-height: 140px;
}

.block-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem 1rem;
    height: 100%;
}

.bi-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.bi-validator {
    grid-column: span 2;
}

.bi-label {
    font-family: var(--font-sans);
    font-size: var(--type-label);
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.bi-val {
    font-family: var(--font-sans);
    font-size: var(--type-caption);
    font-weight: 500;
    color: var(--text);
    line-height: 1.35;
}

.val-icon {
    color: var(--green);
    margin-right: 0.15rem;
}

/* Pending stake */
.card-pending .pending-bar {
    height: 4px;
    background: rgba(248, 113, 113, 0.3);
    border-radius: 2px;
    margin: 1rem 0 0.75rem;
    overflow: hidden;
}

.pending-fill {
    display: block;
    height: 100%;
    width: 88%;
    background: linear-gradient(90deg, var(--red) 0%, var(--green) 8%, var(--green) 100%);
    border-radius: 2px;
}

.ibm-fill {
    background: linear-gradient(90deg, var(--ibm-blue) 0%, #7d17f4 50%, var(--accent-teal) 100%);
}

/* ── Footer ── */
.footer {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 2rem 1.5rem 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    align-items: start;
    text-align: center;
}

@media (min-width: 768px) {
    .footer {
        grid-template-columns: 1fr 2fr 1fr;
        text-align: left;
    }

    .footer-center {
        text-align: center;
    }

    .footer-x {
        justify-self: end;
    }
}

.footer-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

@media (min-width: 768px) {
    .footer-links {
        justify-content: flex-start;
    }
}

.footer-links a {
    font-size: 0.8rem;
    color: var(--text-dim);
    text-decoration: none;
    font-family: ui-monospace, monospace;
}

.footer-links a:hover {
    color: var(--text-muted);
}

.footer-tagline {
    font-family: var(--font-sans);
    font-size: var(--type-body);
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.footer-tagline .hl {
    font-family: var(--font-serif);
    color: var(--text);
    font-weight: 500;
}

.footer-sub {
    font-family: var(--font-sans);
    font-size: var(--type-caption);
    font-weight: 400;
    color: var(--text-dim);
    line-height: 1.5;
}

.footer-sub a {
    color: var(--accent-2);
    text-decoration: none;
}

.footer-sub a:hover {
    text-decoration: underline;
}

.mascot {
    display: block;
    margin: 0.75rem auto 0;
}

.footer-badge {
    justify-self: center;
    font-family: var(--font-serif);
    font-size: var(--type-caption);
    font-weight: 500;
    font-style: italic;
    letter-spacing: 0.06em;
    color: var(--ibm-blue);
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--card-border);
    background: var(--card);
}

@media (min-width: 768px) {
    .footer-badge {
        justify-self: end;
    }
}

.nav-pill.nav-open {
    display: flex;
    position: fixed;
    top: var(--header-h);
    left: 1rem;
    right: 1rem;
    flex-direction: column;
    padding: 0.5rem;
    z-index: 200;
}

/* Hero layout on narrow screens — keep moon clear of preview */
@media (max-width: 767px) {
    .moon-wrap {
        top: 6%;
        right: 5%;
        width: 88px;
        height: 88px;
        min-width: 88px;
        min-height: 88px;
        max-width: 88px;
        max-height: 88px;
    }

    .moon-dock {
        width: 88px;
        height: 88px;
        min-width: 88px;
        min-height: 88px;
        max-width: 88px;
        max-height: 88px;
    }

    .moon-canvas {
        width: 88px !important;
        height: 88px !important;
        min-width: 88px !important;
        min-height: 88px !important;
        max-width: 88px !important;
        max-height: 88px !important;
    }

    .moon-canvas canvas {
        width: 88px !important;
        height: 88px !important;
        min-width: 88px !important;
        min-height: 88px !important;
        max-width: 88px !important;
        max-height: 88px !important;
    }

    .office-preview-hero {
        width: min(340px, calc(100vw - 1rem));
        right: auto;
        left: 50%;
        bottom: 2.9rem;
        transform: translateX(-50%);
    }

    .office-preview-inner {
        min-height: 96px;
        max-height: 22vh;
        overflow: auto;
        padding: 0.5rem 0.72rem;
    }

    .office-preview-hint {
        font-size: 0.9rem;
    }

    .office-preview-meta {
        gap: 0.28rem;
    }

    .office-preview-meta div {
        grid-template-columns: 58px 1fr;
        padding-top: 0.26rem;
    }

}

