/**
 * rasathane-istatistik.css
 *
 * Page-scoped Modern Rasathane skin for /istatistik. The shared v4 tokens are
 * provided by rasathane.css; this file only maps those tokens onto the stats
 * page DOM contract.
 */

body.rasathane-stats {
    --stats-band-fill: color-mix(in srgb, var(--rule) 42%, transparent);
    --stats-soft-fill: color-mix(in srgb, var(--bg) 68%, var(--surface));
    --stats-soft-hover: color-mix(in srgb, var(--surface-hover) 72%, var(--surface));
    --stats-accent-soft: color-mix(in srgb, var(--accent) 14%, var(--surface));
    --stats-comp-soft: color-mix(in srgb, var(--accent-comp) 14%, var(--surface));
    --stats-good-soft: color-mix(in srgb, var(--hazard-micro) 14%, var(--surface));
    --status-normal: var(--text);
    --status-elevated: var(--hazard-minor);
    --status-quiet: var(--accent-sec);
    --status-unknown: var(--muted);

    min-height: 100vh;
    height: auto;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-ui);
    font-size: var(--text-base);
    line-height: 1.5;
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.rasathane-stats *,
body.rasathane-stats *::before,
body.rasathane-stats *::after {
    box-sizing: border-box;
    letter-spacing: 0;
}

body.rasathane-stats [hidden] {
    display: none !important;
}

body.rasathane-stats a {
    color: inherit;
}

body.rasathane-stats button {
    font-family: var(--font-ui);
}

body.rasathane-stats .detail-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    max-width: 1440px;
    min-height: 100vh;
    margin: 0 auto;
}

body.rasathane-stats .sticky-sidebar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 24px 20px;
    overflow-y: auto;
    background: var(--surface);
    border-right: 1px solid var(--rule);
}

body.rasathane-stats .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    margin-bottom: 24px;
    padding: 0 8px;
    color: var(--text);
    font-size: var(--text-base);
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: background 150ms ease-out, color 150ms ease-out;
}

body.rasathane-stats .sidebar-brand:hover {
    background: var(--stats-soft-fill);
}

body.rasathane-stats .sidebar-brand:focus-visible {
    outline: 2px solid var(--accent-comp);
    outline-offset: 2px;
}

body.rasathane-stats .sidebar-brand img {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
}

body.rasathane-stats .nav-menu {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 4px;
}

body.rasathane-stats .nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 12px 10px 14px;
    color: var(--muted);
    font-size: var(--text-sm);
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: background 150ms ease-out, color 150ms ease-out;
}

body.rasathane-stats .nav-item::before {
    content: "";
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 0;
    width: 2px;
    border-radius: var(--radius-pill);
    background: transparent;
}

body.rasathane-stats .nav-item:hover {
    color: var(--text);
    background: var(--stats-soft-fill);
}

body.rasathane-stats .nav-item.active {
    color: var(--text);
    font-weight: 600;
    background: var(--stats-accent-soft);
}

body.rasathane-stats .nav-item.active::before {
    background: var(--accent);
}

body.rasathane-stats .nav-item:focus-visible {
    outline: 2px solid var(--accent-comp);
    outline-offset: 2px;
}

body.rasathane-stats .nav-item i {
    width: 18px;
    color: currentColor;
    font-size: 16px;
    text-align: center;
    flex-shrink: 0;
}

body.rasathane-stats .nav-back {
    margin-top: auto;
}

body.rasathane-stats .content-main {
    min-width: 0;
    padding: 40px 48px 88px;
}

body.rasathane-stats .stats-masthead {
    max-width: 780px;
    margin-bottom: 24px;
}

body.rasathane-stats .page-kicker {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: var(--text-sm);
    font-weight: 600;
}

body.rasathane-stats .page-title {
    margin: 0;
    color: var(--text);
    font-size: var(--text-3xl);
    line-height: 1.2;
    font-weight: 600;
}

body.rasathane-stats .page-intro {
    max-width: 64ch;
    margin: 10px 0 0;
    color: var(--muted);
    font-size: var(--text-base);
}

body.rasathane-stats .global-controls {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 24px;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--radius-md);
}

body.rasathane-stats .controls-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    min-width: 0;
}

body.rasathane-stats .controls-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

body.rasathane-stats .segmented-control,
body.rasathane-stats .sec-controls {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    background: var(--stats-soft-fill);
    border: 1px solid var(--rule);
    border-radius: var(--radius-pill);
}

body.rasathane-stats .segmented-control button,
body.rasathane-stats .sec-controls button {
    min-height: 36px;
    padding: 6px 16px;
    color: var(--muted);
    font-size: var(--text-sm);
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    transition: background 150ms ease-out, border-color 150ms ease-out, color 150ms ease-out;
}

body.rasathane-stats .segmented-control button:hover,
body.rasathane-stats .sec-controls button:hover {
    color: var(--text);
    background: var(--stats-soft-hover);
}

body.rasathane-stats .segmented-control button.active,
body.rasathane-stats .sec-controls button.active {
    color: var(--accent-comp-text);
    background: var(--accent-comp);
    border-color: var(--accent-comp);
}

body.rasathane-stats .segmented-control button:focus-visible,
body.rasathane-stats .sec-controls button:focus-visible {
    outline: 2px solid var(--accent-comp);
    outline-offset: 2px;
}

body.rasathane-stats .date-presets {
    display: flex;
    gap: 8px;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
}

body.rasathane-stats .date-presets::-webkit-scrollbar {
    display: none;
}

body.rasathane-stats .date-presets button {
    min-height: 36px;
    padding: 6px 14px;
    color: var(--muted);
    font-size: var(--text-sm);
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    background: transparent;
    border: 1px solid var(--rule);
    border-radius: var(--radius-pill);
    transition: background 150ms ease-out, border-color 150ms ease-out, color 150ms ease-out;
}

body.rasathane-stats .date-presets button:hover {
    color: var(--text);
    background: var(--stats-soft-fill);
}

body.rasathane-stats .date-presets button.active {
    color: var(--text);
    background: var(--surface);
    border-color: var(--accent);
}

body.rasathane-stats .date-presets button:focus-visible {
    outline: 2px solid var(--accent-comp);
    outline-offset: 2px;
}

body.rasathane-stats .live-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 6px 8px 6px 14px;
    user-select: none;
    cursor: pointer;
    background: var(--stats-soft-fill);
    border: 1px solid var(--rule);
    border-radius: var(--radius-pill);
    transition: background 150ms ease-out, border-color 150ms ease-out;
}

body.rasathane-stats .live-toggle.on {
    background: var(--stats-comp-soft);
    border-color: var(--accent-comp);
}

body.rasathane-stats .pulse-dot {
    width: 8px;
    height: 8px;
    flex-shrink: 0;
    background: var(--muted);
    border-radius: 50%;
    transition: background 150ms ease-out;
}

body.rasathane-stats .live-toggle.on .pulse-dot {
    background: var(--hazard-micro);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--hazard-micro) 24%, transparent);
    animation: statsLivePulse 2200ms ease-in-out infinite;
}

body.rasathane-stats .live-status {
    color: var(--muted);
    font-size: var(--text-xs);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

body.rasathane-stats .live-toggle.on .live-status {
    color: var(--text);
}

body.rasathane-stats .switch {
    position: relative;
    width: 38px;
    height: 24px;
    padding: 0;
    flex-shrink: 0;
    cursor: pointer;
    background: var(--rule);
    border: 1px solid var(--rule);
    border-radius: var(--radius-pill);
    transition: background 150ms ease-out, border-color 150ms ease-out;
}

body.rasathane-stats .switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: var(--surface);
    border-radius: 50%;
    transition: transform 150ms ease-out, background 150ms ease-out;
}

body.rasathane-stats .live-toggle.on .switch {
    background: var(--accent-comp);
    border-color: var(--accent-comp);
}

body.rasathane-stats .live-toggle.on .switch::after {
    background: var(--accent-comp-text);
    transform: translateX(14px);
}

body.rasathane-stats .live-toggle:focus-visible,
body.rasathane-stats .switch:focus-visible {
    outline: 2px solid var(--accent-comp);
    outline-offset: 2px;
}

body.rasathane-stats .obs-section,
body.rasathane-stats .live-feed {
    margin-bottom: 24px;
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--radius-md);
}

body.rasathane-stats .sec-header,
body.rasathane-stats .live-feed-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--rule);
}

body.rasathane-stats .sec-title-group {
    min-width: 0;
}

body.rasathane-stats .sec-header h2,
body.rasathane-stats .live-feed-head h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--text);
    font-size: var(--text-xl);
    line-height: 1.3;
    font-weight: 600;
}

body.rasathane-stats .sec-header h2 i,
body.rasathane-stats .live-feed-head h2 i {
    color: var(--accent);
    font-size: 20px;
}

body.rasathane-stats .live-feed[data-live="on"] .live-feed-head h2 i {
    color: var(--hazard-micro);
}

body.rasathane-stats .sec-subtitle {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: var(--text-sm);
}

body.rasathane-stats .sec-body {
    min-width: 0;
}

body.rasathane-stats .narration-strip {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
    padding: 14px 16px;
    background: var(--stats-soft-fill);
    border: 1px solid var(--rule);
    border-radius: var(--radius-md);
}

body.rasathane-stats .narration-head {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: var(--text-xs);
    font-weight: 600;
}

body.rasathane-stats .narration-dot {
    width: 8px;
    height: 8px;
    flex-shrink: 0;
    background: var(--accent);
    border-radius: 50%;
}

body.rasathane-stats .narration-text {
    margin: 0;
    color: var(--text);
    font-size: var(--text-sm);
    line-height: 1.55;
}

body.rasathane-stats .narration-strip[data-status="elevated"] {
    background: color-mix(in srgb, var(--hazard-minor) 12%, var(--surface));
    border-color: color-mix(in srgb, var(--hazard-minor) 42%, var(--rule));
}

body.rasathane-stats .narration-strip[data-status="elevated"] .narration-head {
    color: var(--hazard-minor);
}

body.rasathane-stats .narration-strip[data-status="elevated"] .narration-dot {
    background: var(--hazard-minor);
}

body.rasathane-stats .narration-strip[data-status="quiet"] {
    background: color-mix(in srgb, var(--accent-sec) 12%, var(--surface));
    border-color: color-mix(in srgb, var(--accent-sec) 36%, var(--rule));
}

body.rasathane-stats .narration-strip[data-status="quiet"] .narration-head {
    color: var(--accent-sec);
}

body.rasathane-stats .narration-strip[data-status="quiet"] .narration-dot {
    background: var(--accent-sec);
}

body.rasathane-stats .narration-strip[data-status="unknown"] .narration-head {
    color: var(--status-unknown);
}

body.rasathane-stats .narration-strip[data-status="unknown"] .narration-dot {
    background: var(--status-unknown);
}

body.rasathane-stats .anomaly-hero {
    margin-bottom: 20px;
    padding: 28px 12px;
    text-align: center;
}

body.rasathane-stats .anomaly-label {
    margin-bottom: 8px;
    color: var(--muted);
    font-size: var(--text-sm);
    font-weight: 600;
}

body.rasathane-stats .anomaly-value {
    color: var(--status-normal);
    font-size: 48px;
    line-height: 1.1;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    transition: color 150ms ease-out;
}

body.rasathane-stats .anomaly-hero[data-status="elevated"] .anomaly-value {
    color: var(--status-elevated);
}

body.rasathane-stats .anomaly-hero[data-status="quiet"] .anomaly-value {
    color: var(--status-quiet);
}

body.rasathane-stats .anomaly-hero[data-status="unknown"] .anomaly-value {
    color: var(--status-unknown);
    font-size: 32px;
}

body.rasathane-stats .anomaly-context {
    margin-top: 12px;
    color: var(--muted);
    font-size: var(--text-base);
}

body.rasathane-stats .anomaly-context strong {
    color: var(--text);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

body.rasathane-stats .anomaly-caveat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    margin-top: 20px;
    padding: 6px 14px;
    color: var(--muted);
    font-size: var(--text-sm);
    background: var(--stats-soft-fill);
    border: 1px solid var(--rule);
    border-radius: var(--radius-pill);
}

body.rasathane-stats .kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 28px;
}

body.rasathane-stats .kpi-card {
    min-width: 0;
    padding: 16px;
    background: var(--stats-soft-fill);
    border: 1px solid var(--rule);
    border-radius: var(--radius-md);
}

body.rasathane-stats .kpi-label {
    margin-bottom: 6px;
    color: var(--muted);
    font-size: var(--text-sm);
    font-weight: 500;
}

body.rasathane-stats .kpi-val {
    display: flex;
    align-items: baseline;
    gap: 8px;
    color: var(--text);
    font-size: var(--text-2xl);
    line-height: 1.25;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

body.rasathane-stats .kpi-delta {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 7px;
    color: var(--muted);
    font-size: var(--text-xs);
    font-weight: 600;
    vertical-align: middle;
    background: var(--stats-band-fill);
    border: 1px solid var(--rule);
    border-radius: var(--radius-sm);
}

body.rasathane-stats .chart-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
}

body.rasathane-stats .chart-title {
    margin: 0 0 12px;
    color: var(--text);
    font-size: var(--text-base);
    line-height: 1.4;
    font-weight: 600;
}

body.rasathane-stats .chart-wrap {
    position: relative;
    height: 310px;
    min-width: 0;
}

body.rasathane-stats .lf-scatter {
    height: 220px;
}

body.rasathane-stats .gr-caption,
body.rasathane-stats .sec-footnote {
    color: var(--muted);
    font-size: var(--text-sm);
    line-height: 1.55;
}

body.rasathane-stats .gr-caption {
    margin-top: 10px;
    font-variant-numeric: tabular-nums;
}

body.rasathane-stats .gr-caption strong,
body.rasathane-stats .sec-footnote strong {
    color: var(--text);
    font-weight: 600;
}

body.rasathane-stats .gr-caption.insufficient {
    color: var(--muted);
}

body.rasathane-stats .sec-footnote {
    max-width: 80ch;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--rule);
}

body.rasathane-stats .sec-empty {
    padding: 32px 16px;
    color: var(--muted);
    font-size: var(--text-sm);
    text-align: center;
    background: var(--stats-soft-fill);
    border: 1px dashed var(--rule);
    border-radius: var(--radius-md);
}

body.rasathane-stats .map-layout {
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    align-items: stretch;
}

body.rasathane-stats .map-wrap {
    position: relative;
    height: 360px;
    overflow: hidden;
    background: var(--bg);
    border: 1px solid var(--rule);
    border-radius: var(--radius-md);
}

body.rasathane-stats .map-wrap--tall {
    height: 420px;
}

body.rasathane-stats .map-canvas {
    width: 100%;
    height: 100%;
}

body.rasathane-stats .bb-marker {
    cursor: pointer;
    filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.35));
}

body.rasathane-stats .fault-list {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
}

body.rasathane-stats .fault-item {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

body.rasathane-stats .fault-glyph {
    width: 32px;
    height: 32px;
}

body.rasathane-stats .fault-info {
    min-width: 0;
}

body.rasathane-stats .fault-name,
body.rasathane-stats .fault-pct {
    color: var(--text);
    font-size: var(--text-sm);
    font-weight: 600;
}

body.rasathane-stats .fault-pct {
    font-variant-numeric: tabular-nums;
}

body.rasathane-stats .fault-desc,
body.rasathane-stats .fault-note {
    color: var(--muted);
    font-size: var(--text-xs);
}

body.rasathane-stats .fault-bar {
    grid-column: 2 / 4;
    height: 4px;
    margin-top: 2px;
    overflow: hidden;
    background: var(--rule);
    border-radius: var(--radius-pill);
}

body.rasathane-stats .fault-bar > span {
    display: block;
    height: 100%;
    background: var(--accent);
    border-radius: var(--radius-pill);
    transition: width 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

body.rasathane-stats .live-feed-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

body.rasathane-stats .lf-window {
    display: flex;
    gap: 8px;
}

body.rasathane-stats .lf-window button {
    min-height: 34px;
    padding: 5px 12px;
    color: var(--muted);
    font-size: var(--text-xs);
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    border: 1px solid var(--rule);
    border-radius: var(--radius-pill);
}

body.rasathane-stats .lf-window button.active {
    color: var(--accent-comp-text);
    background: var(--accent-comp);
    border-color: var(--accent-comp);
}

body.rasathane-stats .lf-status {
    color: var(--text);
    font-size: var(--text-sm);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

body.rasathane-stats .lf-body {
    margin-top: 16px;
}

body.rasathane-stats .lf-idle {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 12px;
    padding: 28px 16px;
    color: var(--muted);
    font-size: var(--text-sm);
    text-align: center;
    background: var(--stats-soft-fill);
    border: 1px dashed var(--rule);
    border-radius: var(--radius-md);
}

body.rasathane-stats .lf-idle i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--accent);
    font-size: 18px;
    background: var(--stats-accent-soft);
    border-radius: 50%;
}

body.rasathane-stats .lf-idle strong {
    color: var(--text);
}

body.rasathane-stats .lf-cta {
    min-height: 40px;
    padding: 8px 16px;
    color: var(--accent-comp-text);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    background: var(--accent-comp);
    border: 1px solid var(--accent-comp);
    border-radius: var(--radius-md);
}

body.rasathane-stats .lf-cta:hover {
    opacity: 0.9;
}

body.rasathane-stats .s5-grid {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(240px, 2fr);
    gap: 18px;
}

body.rasathane-stats .felt-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

body.rasathane-stats .felt-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-height: 58px;
    padding: 10px 12px;
    background: var(--stats-soft-fill);
    border: 1px solid var(--rule);
    border-left-width: 3px;
    border-radius: var(--radius-md);
}

body.rasathane-stats .felt-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--accent-comp-text);
    font-size: var(--text-sm);
    font-weight: 700;
    border-radius: var(--radius-sm);
}

body.rasathane-stats .felt-badge.empty {
    color: var(--muted);
    background: transparent;
    border: 1px solid var(--rule);
}

body.rasathane-stats .felt-main {
    min-width: 0;
}

body.rasathane-stats .felt-loc {
    overflow: hidden;
    color: var(--text);
    font-size: var(--text-sm);
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.rasathane-stats .felt-loc a {
    color: inherit;
    text-decoration: none;
}

body.rasathane-stats .felt-loc a:hover {
    color: var(--accent);
}

body.rasathane-stats .felt-sub {
    color: var(--muted);
    font-size: var(--text-xs);
}

body.rasathane-stats .felt-meta {
    text-align: right;
    white-space: nowrap;
}

body.rasathane-stats .felt-mag {
    font-size: var(--text-base);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

body.rasathane-stats .pager-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-left: 6px;
    vertical-align: middle;
    border-radius: 50%;
}

body.rasathane-stats .intensity-legend {
    align-self: start;
    padding: 14px;
    background: var(--stats-soft-fill);
    border: 1px solid var(--rule);
    border-radius: var(--radius-md);
}

body.rasathane-stats .intensity-legend h4 {
    margin: 0 0 10px;
    color: var(--text);
    font-size: var(--text-sm);
    font-weight: 600;
}

body.rasathane-stats .il-row {
    display: grid;
    grid-template-columns: 24px 24px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    padding: 4px 0;
    color: var(--muted);
    font-size: var(--text-xs);
}

body.rasathane-stats .il-swatch {
    width: 24px;
    height: 14px;
    border-radius: var(--radius-sm);
}

body.rasathane-stats .il-level {
    color: var(--text);
    font-weight: 600;
}

body.rasathane-stats .mythbuster-callout {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--stats-accent-soft);
    border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--rule));
    border-radius: var(--radius-md);
}

body.rasathane-stats .mythbuster-callout i {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--accent);
    font-size: 22px;
}

body.rasathane-stats .mythbuster-callout strong {
    color: var(--text);
}

body.rasathane-stats .mythbuster-callout > div {
    color: var(--muted);
    font-size: var(--text-sm);
    line-height: 1.55;
}

body.rasathane-stats .choro-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    color: var(--muted);
    font-size: var(--text-xs);
}

body.rasathane-stats .choro-legend .legend-sw {
    display: inline-block;
    width: 18px;
    height: 9px;
    border-radius: var(--radius-sm);
}

body.rasathane-stats .choro-legend .legend-note {
    margin-left: auto;
    color: var(--muted);
}

body.rasathane-stats .top-quake {
    position: relative;
    display: flex;
    align-items: center;
    cursor: help;
}

body.rasathane-stats .tq-ring {
    width: 12px;
    height: 12px;
    background: color-mix(in srgb, var(--surface) 18%, transparent);
    border: 2px solid var(--text);
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgb(0 0 0 / 0.35);
}

body.rasathane-stats .tq-label {
    position: absolute;
    left: 15px;
    color: var(--text);
    font: 600 11px var(--font-ui);
    text-shadow: 0 1px 3px rgb(0 0 0 / 0.45);
    white-space: nowrap;
    pointer-events: none;
}

body.rasathane-stats .choro-tip {
    max-width: 280px !important;
    padding: 0 !important;
    color: var(--text) !important;
    font-family: var(--font-ui) !important;
    font-size: var(--text-xs) !important;
    background: var(--surface) !important;
    border: 1px solid var(--rule) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-float) !important;
}

body.rasathane-stats .choro-tip .maplibregl-popup-content {
    padding: 0;
    background: transparent;
    box-shadow: none;
}

body.rasathane-stats .choro-tip .maplibregl-popup-tip {
    display: none;
}

body.rasathane-stats .choro-hdr {
    padding: 10px 14px 8px;
    color: var(--text);
    font-size: var(--text-sm);
    font-weight: 700;
    border-bottom: 1px solid var(--rule);
}

body.rasathane-stats .choro-body {
    padding: 8px 14px;
}

body.rasathane-stats .choro-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 3px 0;
}

body.rasathane-stats .choro-row span {
    color: var(--muted);
}

body.rasathane-stats .choro-row strong {
    color: var(--text);
}

body.rasathane-stats .skeleton {
    color: transparent !important;
    background: linear-gradient(90deg, var(--stats-soft-fill) 25%, var(--stats-soft-hover) 37%, var(--stats-soft-fill) 63%);
    background-size: 400% 100%;
    border-radius: var(--radius-sm);
    animation: statsShimmer 1400ms ease infinite;
}

body.rasathane-stats.is-loading .hide-until-load {
    visibility: hidden;
}

body.rasathane-stats .stat-footer {
    padding: 28px 0 8px;
    color: var(--muted);
    font-size: var(--text-xs);
    text-align: center;
}

body.rasathane-stats .stat-footer a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

body.rasathane-stats .stat-footer a:hover {
    text-decoration: underline;
}

body.rasathane-stats .maplibregl-ctrl-group {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-float);
}

body.rasathane-stats .maplibregl-ctrl-group button {
    width: 32px;
    height: 32px;
}

body.rasathane-stats .mobile-nav-pills {
    position: fixed;
    right: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 100;
    display: none;
    gap: 6px;
    max-width: calc(100vw - 24px);
    padding: 6px;
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-float);
    scrollbar-width: none;
}

body.rasathane-stats .mobile-nav-pills::-webkit-scrollbar {
    display: none;
}

body.rasathane-stats .pill-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 18px;
    text-decoration: none;
    border-radius: var(--radius-pill);
    transition: background 150ms ease-out, color 150ms ease-out;
}

body.rasathane-stats .pill-item:hover,
body.rasathane-stats .pill-item.active {
    color: var(--accent-comp-text);
    background: var(--accent-comp);
}

body.rasathane-stats .pill-item:focus-visible {
    outline: 2px solid var(--accent-comp);
    outline-offset: 2px;
}

@keyframes statsLivePulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.45);
        opacity: 0.55;
    }
}

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

@media (min-width: 1024px) {
    body.rasathane-stats .chart-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    body.rasathane-stats .chart-wrap {
        height: 340px;
    }
}

@media (max-width: 1180px) {
    body.rasathane-stats .detail-layout {
        grid-template-columns: 72px minmax(0, 1fr);
    }

    body.rasathane-stats .sticky-sidebar {
        padding: 20px 8px;
    }

    body.rasathane-stats .sidebar-brand {
        justify-content: center;
        padding: 0;
    }

    body.rasathane-stats .sidebar-brand span,
    body.rasathane-stats .nav-item span {
        display: none;
    }

    body.rasathane-stats .nav-item {
        justify-content: center;
        padding: 10px;
    }

    body.rasathane-stats .nav-item::before {
        left: 6px;
    }
}

@media (max-width: 860px) {
    body.rasathane-stats .detail-layout {
        display: block;
    }

    body.rasathane-stats .sticky-sidebar {
        display: none;
    }

    body.rasathane-stats .mobile-nav-pills {
        display: flex;
    }

    body.rasathane-stats .content-main {
        padding: 24px 16px 92px;
    }

    body.rasathane-stats .global-controls,
    body.rasathane-stats .sec-header,
    body.rasathane-stats .live-feed-head {
        flex-direction: column;
        align-items: stretch;
    }

    body.rasathane-stats .controls-filters,
    body.rasathane-stats .date-presets {
        width: 100%;
    }

    body.rasathane-stats .segmented-control,
    body.rasathane-stats .controls-actions,
    body.rasathane-stats .live-toggle {
        width: 100%;
    }

    body.rasathane-stats .segmented-control button {
        flex: 1 1 0;
        min-height: 44px;
    }

    body.rasathane-stats .date-presets button,
    body.rasathane-stats .sec-controls button,
    body.rasathane-stats .lf-window button {
        min-height: 44px;
    }

    body.rasathane-stats .live-toggle {
        justify-content: space-between;
    }

    body.rasathane-stats .kpi-grid,
    body.rasathane-stats .s5-grid,
    body.rasathane-stats .map-layout {
        grid-template-columns: 1fr;
    }

    body.rasathane-stats .chart-wrap {
        height: 300px;
    }

    body.rasathane-stats .map-wrap,
    body.rasathane-stats .map-wrap--tall {
        height: 340px;
    }

    body.rasathane-stats .maplibregl-ctrl-group button {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 520px) {
    body.rasathane-stats .page-title {
        font-size: var(--text-2xl);
    }

    body.rasathane-stats .page-intro {
        font-size: var(--text-sm);
    }

    body.rasathane-stats .obs-section,
    body.rasathane-stats .live-feed {
        padding: 18px 14px;
    }

    body.rasathane-stats .anomaly-value {
        font-size: 38px;
    }

    body.rasathane-stats .felt-card {
        grid-template-columns: 40px minmax(0, 1fr);
    }

    body.rasathane-stats .felt-meta {
        grid-column: 2;
        text-align: left;
    }
}

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