/* ══════════════════════════════════════════════════════════════
   TC Climatology — page-specific layout
   ══════════════════════════════════════════════════════════════
   Page-specific layout only. Shared chrome (topbar, basin chips,
   .ace-modal-*, .clim-grid, .clim-panel) lives in tc_radar_styles
   and global_archive_styles, which are loaded before this file.
   ══════════════════════════════════════════════════════════════ */

.tc-clim-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 32px 64px;
}

@media (max-width: 720px) {
    .tc-clim-main { padding: 16px 12px 32px; }
}

/* ── Header + sub-nav strip ────────────────────────────────── */
.tc-clim-header {
    margin-bottom: 18px;
}
.tc-clim-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.tc-clim-h1 {
    margin: 0 0 4px 0;
    font-size: 1.5rem;
    color: var(--text);
    font-weight: 600;
}
.tc-clim-subtitle {
    margin: 0;
    color: var(--text-dim, #8a93a3);
    font-size: 0.86rem;
    line-height: 1.5;
    max-width: 720px;
}

.tc-clim-subnav {
    display: inline-flex;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(15, 22, 35,0.02);
}
.tc-clim-subnav-btn {
    padding: 9px 18px;
    background: transparent;
    color: var(--text-dim, #8a93a3);
    border: none;
    border-right: 1px solid var(--border);
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.tc-clim-subnav-btn:last-child { border-right: none; }
.tc-clim-subnav-btn:hover { color: var(--text); background: rgba(15, 22, 35,0.04); }
.tc-clim-subnav-btn.active {
    background: var(--um-green-tint);
    color: var(--um-green);
    font-weight: 600;
}

/* ── Sub-views ─────────────────────────────────────────────── */
.tc-clim-subview { display: block; }
.tc-clim-subview[hidden] { display: none; }

/* The .clim-layout / .clim-grid / .clim-panel rules from
   global_archive_styles.css apply directly on the Stats sub-view —
   no duplication here. Just ensure the layout breathes when
   embedded directly in <main> instead of inside a tab section. */
#tc-clim-stats .clim-layout {
    margin: 0;
}
#tc-clim-stats .clim-header {
    margin-bottom: 14px;
}

/* ── Reanalysis Globe sub-view: hybrid split-panel banner ─── */
/* Compact banner that sits above the featured-views gallery: icon +
   description on the left, prominent launch button on the right.
   Replaces the older full-card launcher with its 5-bullet list —
   the bullets' content is now demonstrated by the gallery tiles. */
.tc-clim-globe-banner {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 22px;
    margin: 12px 0 22px;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-left: 3px solid var(--um-green);
    border-radius: 10px;
}
.tc-clim-globe-banner-icon {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* SVG wireframe strokes inherit this via currentColor — flips with
       theme so the green is readable on both light + dark backgrounds.
       In dark mode --um-green resolves to the brightened emerald. */
    color: var(--um-green);
}
.tc-clim-globe-banner-icon svg {
    width: 56px;
    height: 56px;
}
.tc-clim-globe-banner-text {
    flex: 1 1 auto;
    min-width: 0;
}
.tc-clim-globe-banner-title {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}
.tc-clim-globe-banner-lede {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--text-dim, #8a93a3);
}
.tc-clim-globe-banner-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    background: var(--um-green);
    color: #ffffff;
    text-decoration: none;
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.01em;
    border-radius: 8px;
    transition: background 0.15s, transform 0.15s;
    white-space: nowrap;
}
.tc-clim-globe-banner-btn:hover {
    background: var(--um-green-deep);
    transform: translateY(-1px);
}
.tc-clim-globe-banner-btn:focus {
    outline: 2px solid var(--um-green);
    outline-offset: 3px;
}
.tc-clim-globe-banner-btn .tc-clim-cta-arrow {
    font-size: 1rem;
    line-height: 1;
    transition: transform 0.15s;
}
.tc-clim-globe-banner-btn:hover .tc-clim-cta-arrow {
    transform: translateX(3px);
}

@media (max-width: 720px) {
    .tc-clim-globe-banner {
        flex-wrap: wrap;
        gap: 12px;
        padding: 14px 16px;
    }
    .tc-clim-globe-banner-icon { display: none; }
    .tc-clim-globe-banner-btn  { width: 100%; justify-content: center; }
}

/* "Featured views" heading directly under the banner — no extra
   top margin needed since the banner already provides spacing. */
#tc-clim-globe > .tc-clim-gallery-heading {
    margin-top: 16px;
}

/* ── Featured-views gallery (2×3 tile grid) ──────────────── */
.tc-clim-gallery-heading {
    margin: 36px 0 4px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    text-align: center;
}
.tc-clim-gallery-sub {
    margin: 0 0 18px 0;
    text-align: center;
    color: var(--text-dim, #8a93a3);
    font-size: 0.84rem;
}
.tc-clim-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 32px;
}
@media (max-width: 1100px) {
    .tc-clim-gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .tc-clim-gallery { grid-template-columns: 1fr; }
}

.tc-clim-tile {
    display: flex;
    flex-direction: column;
    background: var(--surface-raised, rgba(15, 22, 35,0.03));
    border: 1px solid var(--border, var(--border));
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
}
.tc-clim-tile:hover {
    border-color: rgba(244, 115, 33,0.45);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0,0,0,0.1);
}

.tc-clim-tile-thumb {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #0d1318, #1a2230);
    overflow: hidden;
    position: relative;
}
.tc-clim-tile-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Placeholder gradients for tiles whose thumbnails haven't been
   captured yet. <img onerror> hides itself, leaving the gradient
   visible underneath. data-grad swaps palettes per tile so the
   wall-of-tiles doesn't look flat while screenshots are pending. */
.tc-clim-tile-thumb-placeholder[data-grad="mpi"]   { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.tc-clim-tile-thumb-placeholder[data-grad="corr"]  { background: linear-gradient(135deg, #4a9b6e, #ef4444); }
.tc-clim-tile-thumb-placeholder[data-grad="shear"] { background: linear-gradient(135deg, #34d399, #fb923c); }
.tc-clim-tile-thumb-placeholder::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 25%, rgba(15, 22, 35,0.18) 0%, rgba(0,0,0,0) 55%);
}

.tc-clim-tile-body {
    padding: 12px 14px 14px;
}
.tc-clim-tile-title {
    font-weight: 600;
    color: var(--text);
    font-size: 0.92rem;
    margin-bottom: 4px;
}
.tc-clim-tile-desc {
    color: var(--text-dim, #8a93a3);
    font-size: 0.78rem;
    line-height: 1.45;
}
.tc-clim-tile-desc strong { color: var(--text); }
