/* Starship.financial — design system
   Neutral black, system font, hairline surfaces, one type scale. */

/* ---------- Tokens ---------- */
:root {
    color-scheme: dark;

    --bg: #000;
    --surface: #111113;
    --surface-2: #1c1c1e;
    --surface-3: #2c2c2e;
    --hairline: rgba(255, 255, 255, 0.08);

    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --text-3: #8e8e93;

    --accent: #0a84ff;
    --up: #30d158;
    --down: #ff453a;
    --warn: #ffd60a;

    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    --fs-caption: 0.75rem;
    --fs-footnote: 0.8125rem;
    --fs-body: 0.9375rem;
    --fs-headline: 1.0625rem;
    --fs-title: 1.375rem;
    --fs-section: clamp(1.5rem, 2.4vw, 1.875rem);
    --fs-hero: clamp(2.125rem, 5vw, 3.5rem);

    --r-lg: 22px;
    --r-md: 16px;
    --r-sm: 12px;

    --container: 1440px;
    --gutter: clamp(16px, 3vw, 28px);
    --side: 360px;

    --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    background: var(--bg);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 72px;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: var(--fs-body);
    line-height: 1.47;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p {
    margin: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

img {
    max-width: 100%;
}

[hidden] {
    display: none !important;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 200;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--text);
    color: #000;
    font-size: var(--fs-footnote);
    font-weight: 600;
    transition: top 0.2s var(--ease);
}

.skip-link:focus {
    top: 12px;
}

.is-positive,
.percent-up {
    color: var(--up);
}

.is-negative,
.percent-down {
    color: var(--down);
}

/* ---------- Header ---------- */
.modern-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    height: 56px;
    padding: 0 max(var(--gutter), calc((100% - var(--container)) / 2));
    background: rgba(0, 0, 0, 0.72);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.modern-header.is-scrolled {
    border-bottom-color: var(--hairline);
    background: rgba(0, 0, 0, 0.8);
}

.header-nav {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

.header-nav a {
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--text-2);
    font-size: var(--fs-footnote);
    font-weight: 500;
    transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.header-nav a:hover {
    color: var(--text);
    background: var(--surface-2);
}

.header-nav a.is-current {
    color: var(--text);
}

.header-text-group {
    display: flex;
    align-items: center;
}

.logo-title {
    font-size: var(--fs-title);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1;
}

.logo-link {
    color: var(--text);
    display: inline-flex;
    align-items: center;
}

.logo-mark {
    width: 1.35em;
    height: 1.35em;
    flex: none;
}

.logo-suffix {
    color: var(--text-2);
    font-weight: 400;
}

/* ---------- Layout ---------- */
.page-main {
    width: 100%;
    max-width: calc(var(--container) + var(--gutter) * 2);
    margin: 0 auto;
    padding: 0 var(--gutter) 96px;
}

.app-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--side);
    gap: 28px;
    align-items: start;
    padding-top: 40px;
}

.app-main-column {
    display: grid;
    gap: 40px;
    min-width: 0;
}

.app-main-column {
    grid-column: 1;
    grid-row: 1;
}

.app-side-column {
    grid-column: 2;
    grid-row: 1;
    margin-bottom: var(--rail-offset, 0px);
    position: sticky;
    top: 80px;
    display: grid;
    gap: 16px;
    min-width: 0;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.section-title {
    font-size: var(--fs-section);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.15;
}

.seo-content,
.faq-content {
    margin-top: 72px;
}

/* ---------- Hero ---------- */
body {
    position: relative;
    isolation: isolate;
}

body::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 0;
    left: 0;
    right: 0;
    height: 760px;
    pointer-events: none;
    background:
        radial-gradient(50% 60% at 22% 0%, rgba(10, 132, 255, 0.20), transparent 70%),
        radial-gradient(40% 50% at 80% 0%, rgba(48, 209, 88, 0.09), transparent 70%),
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px) 0 0 / 56px 56px,
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px) 0 0 / 56px 56px;
    -webkit-mask-image: linear-gradient(#000 20%, transparent);
    mask-image: linear-gradient(#000 20%, transparent);
}

.market-hero-inner {
    display: grid;
    gap: 32px;
}

.market-hero-title {
    max-width: 17ch;
    font-size: var(--fs-hero);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.market-hero-copy {
    display: grid;
    gap: 16px;
}

.market-hero-text {
    max-width: 58ch;
    font-size: clamp(1rem, 1.5vw, 1.1875rem);
    line-height: 1.5;
    color: var(--text-2);
}

.market-hero-text span {
    color: var(--text);
}

.market-hero-text-skeleton {
    display: block;
}

.market-hero-text-skeleton .market-skeleton-block {
    display: none;
}

.market-hero-text-skeleton-measure {
    margin: 0;
    color: transparent;
    pointer-events: none;
    user-select: none;
    background-image: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent calc((1.5em - 14px) / 2),
        var(--surface-3) calc((1.5em - 14px) / 2),
        var(--surface-3) calc((1.5em - 14px) / 2 + 14px),
        transparent calc((1.5em - 14px) / 2 + 14px),
        transparent 1.5em
    );
    animation: sk-pulse 1.4s ease-in-out infinite;
}

/* ---------- Snapshot cards ---------- */
.snapshot-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.snapshot-card,
.market-skeleton-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    padding: 16px 18px;
    border-radius: var(--r-md);
    background: var(--surface);
}

.snapshot-label {
    font-size: var(--fs-caption);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-2);
}

.snapshot-price-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.snapshot-summary-row {
    flex-direction: row;
    align-items: baseline;
}

.snapshot-value {
    font-size: var(--fs-title);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.snapshot-score-suffix {
    font-size: var(--fs-body);
    font-weight: 400;
    letter-spacing: 0;
    color: var(--text-3);
}

.percentage {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--fs-footnote);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.percentage i {
    font-size: 0.75em;
}

.snapshot-copy,
.snapshot-meta {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.gauge-wrapper {
    position: relative;
    display: flex;
    gap: 4px;
    height: 8px;
    margin-top: auto;
}

.gauge-seg {
    position: relative;
    flex: 1;
    overflow: hidden;
    border-radius: 4px;
    background: var(--surface-3);
}

.gauge-seg:nth-child(1) { --c: #ff453a; }
.gauge-seg:nth-child(2) { --c: #f2a02e; }
.gauge-seg:nth-child(3) { --c: #c4d935; }
.gauge-seg:nth-child(4) { --c: #30d158; }
.altseason-gauge .gauge-seg:nth-child(1) { --c: #f7931a; }
.altseason-gauge .gauge-seg:nth-child(2) { --c: #e8806a; }
.altseason-gauge .gauge-seg:nth-child(3) { --c: #8f7ae6; }
.altseason-gauge .gauge-seg:nth-child(4) { --c: #3861fb; }

.gauge-seg::after {
    content: "";
    position: absolute;
    inset: 0;
    right: clamp(0%, calc(100% - (var(--n, 50) - 25 * var(--i)) * 4%), 100%);
    border-radius: inherit;
    background: var(--c);
    transition: right 0.5s var(--ease);
}

.gauge-pointer {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 2px #111113, 0 1px 4px rgba(0, 0, 0, 0.5);
    transform: translate(-50%, -50%);
    transition: left 0.5s var(--ease);
}

/* ---------- Assets toolbar ---------- */
.assets-head {
    margin-bottom: 16px;
}

.performance-controls {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border-radius: 999px;
    background: var(--surface-2);
}

.performance-btn {
    height: 30px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text-2);
    font-size: var(--fs-footnote);
    font-weight: 600;
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.performance-btn:hover {
    color: var(--text);
}

.performance-btn.is-active {
    background: var(--text);
    color: #000;
}

.assets-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.asset-search-input {
    width: 200px;
    max-width: 100%;
    height: 36px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: var(--surface-2);
    font-size: var(--fs-body);
    transition: box-shadow 0.2s var(--ease);
}

.asset-search-input::placeholder {
    color: var(--text-3);
}

.asset-search-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--accent);
}

.watchlist-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text-2);
    font-size: var(--fs-footnote);
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.watchlist-toggle-btn:hover {
    color: var(--text);
}

.watchlist-toggle-btn.is-active {
    background: var(--text);
    color: #000;
}

.watchlist-toggle-btn i {
    font-size: 0.875rem;
}

/* ---------- Coin cards ---------- */
.dashboard-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    transition: opacity 0.2s var(--ease);
}

.dashboard-container.is-loading {
    opacity: 0.6;
}

.stat-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    padding: 14px 18px 12px;
    border-radius: var(--r-lg);
    background: var(--surface);
    transition: background 0.2s var(--ease);
}

.stat-box.is-hidden-by-watchlist,
.dashboard-container .is-hidden-by-watchlist {
    display: none;
}

.box-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--fs-headline);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.coin-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    flex: none;
}

.coin-site-link,
.coin-buy-link {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text);
    font-size: var(--fs-caption);
    font-weight: 600;
    transition: background 0.2s var(--ease);
}

.coin-site-link {
    margin-left: auto;
}

.coin-site-link:hover {
    background: var(--surface-3);
}

.coin-buy-link {
    background: rgba(10, 132, 255, 0.16);
    color: var(--accent);
}

.coin-buy-link:hover {
    background: rgba(10, 132, 255, 0.26);
}

.box-pin {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text-3);
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.box-pin:hover {
    background: var(--surface-2);
    color: var(--text);
}

.box-pin.is-active {
    color: var(--warn);
}

.coin-card-data {
    display: grid;
    gap: 8px;
}

.coin-name-marketcap-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.coin-full-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: var(--fs-footnote);
    font-weight: 600;
    color: var(--text-2);
}

.price-row-market-cap,
.price-row-volume {
    font-size: var(--fs-caption);
    font-weight: 500;
    color: #98989d;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.stat-box .price-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
}

.main-value {
    font-size: var(--fs-title);
    font-weight: 600;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.price-row-volume {
    margin-left: auto;
}

.coin-meta-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-top: 10px;
    border-top: 1px solid var(--hairline);
}

.coin-meta-range {
    flex: 0 0 50%;
    min-width: 0;
    max-width: 50%;
}

.coin-meta-rsi {
    display: flex;
    align-items: baseline;
    line-height: 1.3;
    justify-content: flex-end;
    gap: 6px;
    white-space: nowrap;
}

.coin-range-ends {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
    line-height: 1.3;
    font-size: var(--fs-caption);
    font-weight: 600;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.coin-range-ends i {
    margin-right: 2px;
    font-size: 0.8em;
    color: #98989d;
}

.coin-range-progress {
    height: 4px;
    border-radius: 2px;
    background: var(--surface-3);
    overflow: hidden;
}

.coin-range-progress-fill {
    display: block;
    height: 100%;
    border-radius: 2px;
    background: var(--text-2);
}

.coin-rsi-reading {
    font-size: var(--fs-caption);
    font-weight: 500;
    color: var(--text-2);
}

.coin-rsi-value {
    font-weight: 600;
    color: #9575cd;
}

.coin-rsi-state {
    font-size: var(--fs-caption);
    font-weight: 500;
    color: #98989d;
}

.chart-container {
    position: relative;
    height: 84px;
    margin: 2px 0 0;
}

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

.stat-txt {
    padding: 24px;
    text-align: center;
    color: var(--text-2);
    font-size: var(--fs-body);
}

.state-panel {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 48px 24px;
    border-radius: var(--r-lg);
    background: var(--surface);
    text-align: center;
    animation: fade-up 0.3s var(--ease) both;
}

.state-panel-icon {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 8px;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--text-2);
    font-size: 1.125rem;
}

.state-panel-icon.is-error {
    background: rgba(255, 69, 58, 0.14);
    color: var(--down);
}

.state-panel-title {
    font-size: var(--fs-headline);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.state-panel-text {
    max-width: 36ch;
    font-size: var(--fs-footnote);
    line-height: 1.45;
    color: var(--text-2);
}

.state-panel-action {
    margin-top: 12px;
    padding: 9px 20px;
    border: 0;
    border-radius: 999px;
    background: var(--text);
    color: #000;
    font: inherit;
    font-size: var(--fs-footnote);
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s var(--ease);
}

.state-panel-action:hover {
    opacity: 0.85;
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.stat-box.is-entering {
    animation: fade-up 0.35s var(--ease) backwards;
}

.stat-box.is-entering .chart-container {
    animation: fade-in 0.6s var(--ease) 0.15s backwards;
}

[data-market-data]:not([hidden]) {
    animation: fade-in 0.3s var(--ease) both;
}

.market-pagination {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    justify-content: center;
}

.market-pagination[hidden] {
    display: none;
}

body.market-data-loading .market-pagination[hidden] {
    display: flex !important;
    visibility: hidden;
}

.market-pagination-button {
    height: 40px;
    padding: 0 24px;
    border: 0;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text);
    font-size: var(--fs-footnote);
    font-weight: 600;
    transition: background 0.2s var(--ease);
}

.market-pagination-button:hover {
    background: var(--surface-3);
}

.market-pagination-button:disabled {
    opacity: 0.5;
    cursor: default;
}

/* ---------- Side column ---------- */
.market-pulse-sub {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.market-pulse-grid {
    display: grid;
    gap: 14px;
}

.pulse-card {
    padding: 18px 20px 8px;
    border-radius: var(--r-lg);
    background: var(--surface);
}

.pulse-title {
    margin-bottom: 2px;
    font-size: var(--fs-headline);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.pulse-list {
    display: grid;
}

.pulse-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--hairline);
}

.pulse-row:last-child {
    border-bottom: 0;
}

.pulse-coin {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.pulse-coin-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pulse-icon-wrap {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    overflow: hidden;
    flex: none;
}

.pulse-icon {
    display: block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.pulse-symbol {
    font-size: var(--fs-body);
    font-weight: 600;
}

.pulse-name {
    padding-left: 28px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: var(--fs-caption);
    color: var(--text-3);
}

.pulse-change {
    font-size: var(--fs-body);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.pulse-change-up {
    color: var(--up);
}

.pulse-change-down {
    color: var(--down);
}

.pulse-empty {
    padding: 16px 0;
    color: var(--text-3);
    font-size: var(--fs-footnote);
}

/* Market bias */
.pulse-card-regime {
    display: grid;
    gap: 12px;
    padding: 18px 20px 20px;
}

.pulse-card-regime .pulse-title {
    margin-bottom: 0;
}

.market-regime-overview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--r-sm);
    background: var(--surface-2);
}

.market-regime-icon {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface-3);
    color: var(--text-2);
}

.market-regime-icon.is-bullish {
    background: rgba(48, 209, 88, 0.16);
    color: var(--up);
}

.market-regime-icon.is-bearish {
    background: rgba(255, 69, 58, 0.16);
    color: var(--down);
}

.market-regime-icon.is-neutral {
    background: rgba(255, 214, 10, 0.14);
    color: var(--warn);
}

.market-regime-score {
    display: grid;
    gap: 0;
    flex: none;
}

.market-regime-score > span {
    font-size: var(--fs-body);
    font-weight: 600;
    line-height: 1.3;
}

.market-regime-score strong {
    font-size: var(--fs-caption);
    font-weight: 500;
    color: var(--text-2);
    font-variant-numeric: tabular-nums;
}

.market-regime-score-suffix {
    font-size: inherit;
    color: var(--text-3);
}

.market-regime-strength {
    flex: 1;
    min-width: 0;
    text-align: right;
    font-size: var(--fs-caption);
    line-height: 1.35;
    color: var(--text-2);
}

.market-regime-scale {
    position: relative;
    display: flex;
    gap: 4px;
    height: 8px;
}

.market-regime-scale-labels {
    display: flex;
    justify-content: space-between;
    margin-top: -6px;
    font-size: var(--fs-caption);
    color: var(--text-2);
}

.market-regime-scale-labels span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.market-regime-scale-icon.is-bearish {
    color: var(--down);
}

.market-regime-scale-icon.is-bullish {
    color: var(--up);
}

.market-regime-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.market-regime-metric {
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 10px 12px;
    border-radius: var(--r-sm);
    background: var(--surface-2);
}

.market-regime-metric > span {
    font-size: var(--fs-caption);
    color: var(--text-2);
}

.market-regime-metric strong {
    font-size: var(--fs-footnote);
    font-weight: 600;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.market-regime-detail {
    font-size: var(--fs-footnote);
    line-height: 1.45;
    color: var(--text-2);
}

/* ---------- Guide + FAQ ---------- */
.seo-grid,
.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.seo-card {
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 22px 24px;
    border-radius: var(--r-lg);
    background: var(--surface);
}

.seo-card h3 {
    font-size: var(--fs-headline);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.seo-article-body {
    color: var(--text-2);
    line-height: 1.55;
}

.seo-data-value {
    font-weight: 600;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.seo-data-positive {
    color: var(--up);
}

.seo-data-negative {
    color: var(--down);
}

.faq-card {
    border-radius: var(--r-md);
    background: var(--surface);
    overflow: hidden;
    transition: background 0.2s var(--ease);
}

.faq-card:hover {
    background: #161618;
}

.faq-card summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    cursor: pointer;
    list-style: none;
}

.faq-card summary::-webkit-details-marker {
    display: none;
}

.faq-card summary::after {
    content: "+";
    flex: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--text-2);
    font-size: 1.125rem;
    line-height: 24px;
    text-align: center;
}

.faq-card[open] summary::after {
    content: "\2212";
}

.faq-card summary h3 {
    font-size: var(--fs-body);
    font-weight: 600;
    line-height: 1.35;
}

.faq-card > p {
    padding: 0 22px 20px;
    color: var(--text-2);
    line-height: 1.55;
}

/* ---------- Footer ---------- */
.modern-footer {
    width: 100%;
    max-width: calc(var(--container) + var(--gutter) * 2);
    margin: 0 auto;
    padding: 48px var(--gutter) 40px;
    border-top: 1px solid var(--hairline);
}

.footer-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    gap: 40px;
}

.brand-tagline {
    max-width: 34ch;
    font-size: var(--fs-footnote);
    line-height: 1.5;
    color: var(--text-2);
}

.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.footer-column {
    display: grid;
    align-content: start;
    gap: 10px;
}

.footer-column h4 {
    margin-bottom: 4px;
    font-size: var(--fs-caption);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-3);
}

.footer-column a {
    font-size: var(--fs-footnote);
    color: var(--text-2);
    transition: color 0.2s var(--ease);
}

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

.footer-legal {
    display: grid;
    gap: 14px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--hairline);
}

.disclaimer-text {
    max-width: 84ch;
    font-size: var(--fs-caption);
    line-height: 1.6;
    color: #98989d;
}

.disclaimer-text strong {
    color: var(--text-2);
    font-weight: 600;
}

.copyright-row {
    font-size: var(--fs-caption);
    color: #98989d;
}

.scroll-top-btn {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 90;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--hairline);
    border-radius: 50%;
    background: rgba(28, 28, 30, 0.8);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    color: var(--text);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
}

.scroll-top-btn i {
    transform: rotate(-45deg);
}

.scroll-top-btn.is-visible {
    opacity: 1;
    visibility: visible;
    transform: none;
}

/* ---------- Skeletons ---------- */
@keyframes sk-pulse {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}

.market-skeleton-block,
.skeleton-line,
.skeleton-dot {
    display: block;
    height: 12px;
    border-radius: 6px;
    background: var(--surface-3);
    animation: sk-pulse 1.4s ease-in-out infinite;
}

.market-skeleton-line-short { width: 40%; }
.market-skeleton-line-medium { width: 65%; }
.market-skeleton-line-wide { width: 90%; }
.market-skeleton-line-value { height: 22px; width: 70%; }

.market-skeleton-card {
    min-height: 105px;
}

@media (max-width: 720px) {
    .market-skeleton-card {
        min-height: 100px;
    }

    .market-skeleton-card:nth-child(-n+2) {
        min-height: 105px;
    }
}

.market-pulse-skeleton-card {
    min-height: 237px;
}

.market-regime-skeleton-panel {
    min-height: 297px;
}

.market-skeleton-panel,
.market-pulse-skeleton-card,
.market-regime-skeleton-panel {
    display: grid;
    gap: 12px;
    padding: 20px 24px;
    border-radius: var(--r-lg);
    background: var(--surface);
}

.market-pulse-skeleton-grid,
.market-guide-skeleton-grid {
    display: grid;
    gap: 16px;
}

.market-pulse-skeleton-grid {
    gap: 14px;
}

.market-guide-skeleton-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.market-guide-skeleton {
    min-height: 382px;
}

.market-skeleton-row {
    height: 44px;
    border-radius: var(--r-sm);
}

.market-regime-skeleton-overview { height: 64px; border-radius: var(--r-sm); }
.market-regime-skeleton-scale { height: 6px; border-radius: 3px; }
.market-regime-skeleton-title { height: 16px; }

.market-regime-skeleton-labels {
    display: flex;
    justify-content: space-between;
}

.market-regime-skeleton-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.market-regime-skeleton-metric {
    display: grid;
    gap: 8px;
    padding: 10px 12px;
    border-radius: var(--r-sm);
    background: var(--surface-2);
}

.market-regime-skeleton-detail {
    display: grid;
    gap: 8px;
}

.stat-box-skeleton {
    min-height: 264px;
    gap: 10px;
}

.stat-box-skeleton:hover {
    background: var(--surface);
}

.skeleton-header {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 30px;
}

.skeleton-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    flex: none;
}

.skeleton-data {
    display: grid;
    align-content: space-between;
    height: 104px;
}

.skeleton-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.skeleton-row-meta {
    height: 37px;
}

.skeleton-line-title { width: 22%; height: 14px; }
.skeleton-line-tag { width: 12%; height: 14px; margin-left: auto; }
.skeleton-line-name { width: 40%; height: 14px; }
.skeleton-line-mcap { width: 28%; height: 14px; }
.skeleton-line-main { width: 42%; height: 28px; }
.skeleton-line-pct { width: 18%; height: 18px; }
.skeleton-line-range { width: 55%; height: 22px; }
.skeleton-line-rsi { width: 28%; height: 14px; }
.skeleton-line-chart { height: 84px; width: 100%; border-radius: var(--r-sm); margin-top: auto; }

/* ---------- Legal pages ---------- */
.legal-wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 56px 0 24px;
}

.legal-title {
    font-size: clamp(2rem, 4.5vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.1;
}

.legal-updated {
    margin: 10px 0 40px;
    font-size: var(--fs-footnote);
    color: var(--text-3);
}

.legal-wrap h2 {
    margin: 40px 0 10px;
    font-size: var(--fs-title);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.legal-wrap p,
.legal-wrap li {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text-2);
}

.legal-wrap p + p {
    margin-top: 12px;
}

.legal-wrap ul,
.legal-wrap ol {
    margin: 10px 0 0;
    padding-left: 22px;
}

.legal-wrap li + li {
    margin-top: 6px;
}

.legal-wrap a {
    color: var(--accent);
}

.legal-wrap a:hover {
    text-decoration: underline;
}

.legal-wrap strong {
    color: var(--text);
    font-weight: 600;
}

/* ---------- Auth + error pages ---------- */
.auth-page,
.error-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.auth-toolbar {
    display: flex;
    align-items: center;
    height: 56px;
    padding: 0 var(--gutter);
    border-bottom: 1px solid var(--hairline);
}

.auth-brand,
.error-brand {
    font-size: var(--fs-title);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.auth-shell,
.error-shell {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 40px var(--gutter);
}

.auth-panel,
.error-panel {
    display: grid;
    gap: 12px;
    width: 100%;
    max-width: 420px;
    padding: 32px;
    border-radius: 24px;
    background: var(--surface);
}

.error-panel {
    text-align: center;
    justify-items: center;
}

.auth-eyebrow {
    font-size: var(--fs-caption);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-3);
}

.auth-panel h1,
.error-panel h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.auth-intro,
.error-panel p:not(.auth-eyebrow) {
    color: var(--text-2);
    line-height: 1.5;
}

.error-code {
    font-size: 4.5rem;
    font-weight: 700;
    letter-spacing: -0.05em;
    line-height: 1;
    color: var(--surface-3);
}

.auth-form {
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

.auth-form label {
    font-size: var(--fs-footnote);
    font-weight: 500;
    color: var(--text-2);
}

.auth-form input:not([type="hidden"]) {
    width: 100%;
    height: 46px;
    padding: 0 16px;
    border: 1px solid var(--hairline);
    border-radius: var(--r-sm);
    background: var(--surface-2);
    transition: box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.3);
}

.auth-submit,
.error-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    margin-top: 8px;
    padding: 0 24px;
    border: 0;
    border-radius: 999px;
    background: var(--text);
    color: #000;
    font-size: var(--fs-body);
    font-weight: 600;
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

.auth-submit:hover,
.error-action:hover {
    opacity: 0.88;
}

.auth-submit:active,
.error-action:active {
    transform: scale(0.98);
}

.auth-success,
.auth-error {
    padding: 12px 14px;
    border-radius: var(--r-sm);
    font-size: var(--fs-footnote);
    line-height: 1.45;
}

.auth-success {
    background: rgba(48, 209, 88, 0.12);
    color: var(--up);
}

.auth-error {
    background: rgba(255, 69, 58, 0.12);
    color: var(--down);
}

.auth-back {
    justify-self: center;
    margin-top: 4px;
    font-size: var(--fs-footnote);
    color: var(--text-2);
}

.auth-back:hover {
    color: var(--text);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .app-layout {
        grid-template-columns: minmax(0, 1fr);
        padding-top: 28px;
    }

    .app-main-column,
    .market-pagination,
    .app-side-column {
        grid-column: 1;
        grid-row: auto;
    }

    .app-side-column {
        margin-bottom: 0;
        position: static;
    }

    .market-pulse-grid,
    .market-pulse-skeleton-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .market-regime-skeleton-panel {
        height: 278px;
        min-height: 0;
        overflow: hidden;
    }

    .market-guide-skeleton {
        min-height: 422px;
    }

    .footer-main {
        grid-template-columns: minmax(0, 1fr);
    }
}

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

    .seo-grid,
    .faq-grid,
    .market-guide-skeleton-grid,
    .market-pulse-skeleton-grid,
    .market-pulse-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .market-regime-skeleton-panel {
        height: auto;
        min-height: 297px;
    }

    .market-guide-skeleton {
        min-height: 812px;
    }
}

@media (min-width: 721px) and (max-width: 849px) {
    .market-guide-skeleton {
        min-height: 468px;
    }
}

@media (max-width: 640px) {
    .app-main-column {
        gap: 32px;
    }

    .dashboard-container {
        grid-template-columns: minmax(0, 1fr);
    }

    .assets-head {
        flex-direction: column;
        align-items: stretch;
    }

    .performance-controls {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .assets-controls {
        flex-wrap: nowrap;
    }

    .asset-search-input {
        flex: 1;
        width: auto;
        min-width: 0;
    }

    .footer-links-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .seo-content,
    .faq-content {
        margin-top: 56px;
    }

    .auth-panel,
    .error-panel {
        padding: 24px;
    }
}

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

.card-shot {
    margin-left: 0;
}

.card-shot i.fa-spin {
    animation-duration: 0.8s;
}

.card-shot i {
    display: block;
    width: 1em;
    height: 1em;
    line-height: 1;
    text-align: center;
    transform-origin: 50% 50%;
}

.card-shot i.fa-spin {
    animation-duration: 0.8s;
}

.card-shot i.fa-spin {
    animation: card-shot-spin 0.9s linear infinite;
    will-change: transform;
}

@keyframes card-shot-spin {
    to { transform: rotate(360deg); }
}

.card-shot i.fa-spin {
    width: 16px;
    height: 16px;
    margin: 0;
    animation: card-shot-spin 0.8s linear infinite;
}

.card-shot i.fa-spin::before {
    content: "";
    display: block;
    box-sizing: border-box;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    font-size: 0;
}

.coin-meta-rsi,
.coin-rsi-value,
.coin-full-name,
.pulse-symbol,
.pulse-name,
.snapshot-meta,
.snapshot-copy,
.market-regime-detail,
.market-regime-scale-labels,
.chart-tooltip,
.stat-box .percentage,
.stat-box .price-row {
    font-variant-numeric: tabular-nums;
}

.fng-delta-up,
.dominance-delta-up {
    color: var(--up);
}

.fng-delta-down,
.dominance-delta-down {
    color: var(--down);
}

.fng-delta-flat,
.dominance-delta-flat {
    color: var(--text-3);
}

.pulse-change,
#fng-delta,
.dominance-item-top2delta,
.dominance-item-gap {
    font-size: var(--fs-footnote);
    font-weight: 600;
}

.stat-box .box-pin {
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.stat-box .box-pin:hover {
    border-color: rgba(255, 255, 255, 0.28);
}

.stat-box .box-pin.is-active {
    border-color: rgba(255, 214, 10, 0.55);
}

.stat-box .box-pin {
    border: 0;
    background: var(--surface-2);
    color: var(--text-2);
}

.stat-box .box-pin:hover {
    background: var(--surface-3);
    color: var(--text);
}

.stat-box .box-pin.is-active {
    color: var(--warn);
}

/* Stat card header actions: uniform 28px controls */
.stat-box .coin-site-link,
.stat-box .coin-buy-link {
    height: 28px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.stat-box .box-pin {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    line-height: 1;
}

/* Header action grouping: pills 8px apart, icons grouped with a wider break */
.stat-box .coin-site-link { margin-left: -2px; }
.stat-box .coin-buy-link { margin-left: -2px; }
.stat-box .card-shot { margin-left: auto; }
.stat-box .watch-toggle { margin-left: -2px; }

/* Let cards shrink on very narrow screens instead of forcing horizontal scroll */
.app-main-column { grid-template-columns: minmax(0, 1fr); }
.performance-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.watchlist-toggle-btn { flex-shrink: 1; min-width: 0; padding-inline: 12px; }
.assets-head > * { min-width: 0; max-width: 100%; }
.asset-search-input { flex: 1 1 0; width: 0; min-width: 0; }
@media (min-width: 721px) { .asset-search-input { flex: none; width: 200px; } }

@media (min-width: 521px) and (max-width: 720px) {
    .market-regime-skeleton-panel {
        height: 278px;
        min-height: 0;
    }
}

/* Sliding segmented control */
.performance-controls {
    position: relative;
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    isolation: isolate;
}
.performance-controls::before {
    content: "";
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 3px;
    width: calc((100% - 6px) / 2);
    border-radius: 999px;
    background: var(--text);
    transform: translateX(0);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    z-index: -1;
}
.performance-controls:has(.performance-btn[data-performance-window="7d"].is-active)::before {
    transform: translateX(100%);
}
.performance-btn { min-width: 64px; position: relative; }
.performance-btn.is-active { background: transparent; color: #000; }
@media (prefers-reduced-motion: reduce) {
    .performance-controls::before { transition: none; }
}

#assets-title { scroll-margin-top: 16px; }

/* Semicircle gauges (Fear & Greed, Altseason) */
.semi-gauge {
    position: relative;
    width: 100%;
    height: 96px;
    margin: 0 auto;
}
.semi-svg { display: block; width: 100%; height: 100%; overflow: visible; }
@media (max-width: 420px) { .semi-readout .snapshot-value { font-size: 24px; } }
.semi-track,
.semi-fill {
    fill: none;
    stroke-width: 10;
    stroke-linecap: round;
}
.semi-track { stroke: var(--surface-3); }
.semi-fill { stroke: var(--c); transition: stroke-dasharray 0.5s var(--ease); }
.semi-fill-0 { --c: #ff453a; }
.semi-fill-1 { --c: #f2a02e; }
.semi-fill-2 { --c: #c4d935; }
.semi-fill-3 { --c: #30d158; }
.altseason-gauge .semi-fill-0 { --c: #f7931a; }
.altseason-gauge .semi-fill-1 { --c: #e8806a; }
.altseason-gauge .semi-fill-2 { --c: #8f7ae6; }
.altseason-gauge .semi-fill-3 { --c: #3861fb; }
.semi-dot { fill: #fff; stroke: #111113; stroke-width: 3; transition: cx 0.5s var(--ease), cy 0.5s var(--ease); }
.semi-readout {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
}
.semi-readout .snapshot-value { font-size: 28px; line-height: 1; }
.semi-readout .snapshot-score-suffix { display: none; }

.market-skeleton-card { min-height: 116px; }
@media (max-width: 720px) {
    .market-skeleton-card:nth-child(-n+2) { min-height: 105px; }
    .market-skeleton-card:nth-child(n+3) { min-height: 116px; }
}

.semi-gauge { height: 70px; }
.semi-readout .snapshot-value,
.semi-readout .snapshot-value { font-size: 22px; }
@media (max-width: 420px) { .semi-readout .snapshot-value { font-size: 22px; } }

.semi-gauge { height: 72px; }
.semi-readout .snapshot-value,
.semi-readout .snapshot-value { font-size: 24px; letter-spacing: -0.02em; }
@media (max-width: 420px) { .semi-readout .snapshot-value { font-size: 24px; } }

.semi-gauge { height: 58px; }
.semi-readout .snapshot-value { font-size: 22px; }

/* Uniform snapshot cards */
.snapshot-card,
.market-skeleton-card,
.market-skeleton-card:nth-child(n) {
    min-height: 116px;
    box-sizing: border-box;
}
.snapshot-card { justify-content: space-between; }

/* Market Bias bar matches the semicircle gauge thickness (~6px) */
.market-regime-scale { height: 6px; }
.market-regime-scale .gauge-seg { border-radius: 3px; }
.market-regime-scale .gauge-pointer { width: 10px; height: 10px; box-shadow: 0 0 0 2px #111113, 0 1px 3px rgba(0, 0, 0, 0.5); }

/* Market Guide refinement */
.seo-card {
    grid-template-columns: 28px minmax(0, 1fr);
    align-content: start;
    column-gap: 12px;
    row-gap: 10px;
    align-items: center;
    padding: 20px 22px;
    border: 1px solid transparent;
    transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}
.seo-card h3 { font-size: var(--fs-headline); line-height: 1.25; }
.seo-card .seo-article-body {
    grid-column: 1 / -1;
    font-size: var(--fs-subhead, 15px);
    line-height: 1.55;
    color: var(--text-2);
}
.seo-icon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--ic, var(--accent));
    background: color-mix(in srgb, var(--ic, var(--accent)) 16%, transparent);
}
.seo-icon-market { --ic: #0a84ff; }
.seo-icon-liquidity { --ic: #64d2ff; }
.seo-icon-dominance { --ic: #ff9f0a; }
.seo-icon-sentiment { --ic: #bf5af2; }

/* Market Guide refinement 2 */
.seo-card {
    grid-template-columns: 36px minmax(0, 1fr);
    grid-template-areas:
        "icon eyebrow"
        "icon title"
        "body body";
    column-gap: 14px;
    row-gap: 0;
    padding: 20px 22px 22px;
}
.seo-card .seo-icon { grid-area: icon; width: 36px; height: 36px; border-radius: 10px; font-size: 15px; align-self: center; }
.seo-eyebrow {
    grid-area: eyebrow;
    align-self: end;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.3;
    color: var(--ic, var(--text-3));
}
.seo-card h3 { grid-area: title; align-self: start; font-size: 17px; letter-spacing: -0.015em; }
.seo-card .seo-article-body {
    grid-area: body;
    grid-column: 1 / -1;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    color: var(--text-2);
}
.seo-card[data-guide="market"] { --ic: #0a84ff; }
.seo-card[data-guide="liquidity"] { --ic: #64d2ff; }
.seo-card[data-guide="dominance"] { --ic: #ff9f0a; }
.seo-card[data-guide="sentiment"] { --ic: #bf5af2; }

/* Market Bias icon follows the progress bar segment the pointer sits in */
.market-regime-icon[data-seg] { background: color-mix(in srgb, var(--seg) 16%, transparent); color: var(--seg); }
.market-regime-icon[data-seg="0"] { --seg: #ff453a; }
.market-regime-icon[data-seg="1"] { --seg: #f2a02e; }
.market-regime-icon[data-seg="2"] { --seg: #c4d935; }
.market-regime-icon[data-seg="3"] { --seg: #30d158; }

/* Segmented control: springy slide with a soft lift */
.performance-controls::before {
    transition: transform 0.42s cubic-bezier(0.3, 1.18, 0.4, 1), box-shadow 0.3s var(--ease);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
    will-change: transform;
}
.performance-controls:active::before { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); }
.performance-btn {
    transition: color 0.25s var(--ease);
}
@media (prefers-reduced-motion: reduce) {
    .performance-controls::before, .performance-btn { transition: none; }
}
