:root {
    --page-bg: #eaf4fb;
    --panel-bg: #f6fbff;
    --card-bg: #ffffff;
    --card-alt: #f4faff;
    --line: #d4e6f2;
    --line-strong: #bfd8e9;
    --text: #173042;
    --muted: #5e7788;
    --blue: #3d8fc2;
    --blue-dark: #2d688d;
    --blue-soft: #dff1fb;
    --shadow: 0 14px 30px rgba(26, 71, 102, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background: var(--page-bg);
}

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

.site-header {
    background: #d9edf9;
    border-bottom: 1px solid var(--line-strong);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 78px;
}

.page-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.brand {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #214d69;
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.main-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: #285673;
}

.main-nav a:hover {
    background: rgba(255,255,255,.7);
}

.site-search {
    position: relative;
    width: min(320px, 100%);
}

.site-search__label {
    display: none;
}

.site-search__input {
    width: 100%;
    height: 44px;
    border-radius: 14px;
    border: 1px solid var(--line-strong);
    background: #fff;
    padding: 0 14px;
    color: #214d69;
    font: inherit;
}

.site-search__input:focus {
    outline: 0;
    border-color: #7db5d7;
    box-shadow: 0 0 0 4px rgba(61, 143, 194, 0.12);
}

.site-search__results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 8px;
    z-index: 50;
}

.site-search__result,
.site-search__empty {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
}

.site-search__result:hover {
    background: #f1f8fd;
}

.site-search__empty {
    color: var(--muted);
}

.site-main { padding: 24px 0 32px; }

.hero {
    display: grid;
    grid-template-columns: 1.5fr 0.9fr;
    gap: 20px;
    background: #d9edf9;
    border: 1px solid var(--line-strong);
    border-radius: 28px;
    padding: 28px;
}

.hero h1 {
    margin: 0;
    font-size: clamp(2.1rem, 4vw, 4.2rem);
    line-height: .95;
    max-width: 12ch;
    color: #123247;
}

.eyebrow,
.section-kicker,
.current-card__label,
.hero-panel__title,
.metric-card__label,
.footer-title,
.sidebar-title,
.update-note {
    margin: 0 0 10px;
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #5d7b90;
}

.lead {
    margin: 16px 0 0;
    max-width: 62ch;
    color: #325164;
    font-size: 1.05rem;
    line-height: 1.7;
}

.hero-actions,
.hero-tags,
.tab-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.button,
.tag,
.tab-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 11px 15px;
    font-weight: 700;
}

.button--primary,
.tab-link.active {
    background: var(--blue);
    color: white;
}

.button--secondary,
.tab-link {
    background: white;
    border: 1px solid var(--line-strong);
    color: #24516d;
}

.tag {
    padding: 8px 12px;
    background: rgba(255,255,255,.82);
    border: 1px solid var(--line-strong);
    color: #29546f;
    font-weight: 600;
}

.hero-panel,
.current-card,
.content-card,
.feature-card,
.metric-card,
.table-card,
.city-card,
.soft-link,
.sidebar-card,
.page-panel,
.info-row {
    background: var(--card-bg);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.hero-panel,
.current-card,
.sidebar-card,
.page-panel,
.content-card,
.info-row,
.feature-card,
.metric-card,
.city-card,
.soft-link {
    border-radius: 22px;
    padding: 22px;
}

.hero-city-list,
.sidebar-list,
.info-stack,
.footer-links {
    display: grid;
    gap: 12px;
}

.hero-city-row,
.sidebar-list__item {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.hero-city-row:last-child,
.sidebar-list__item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.section { margin-top: 26px; }
.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}
.section-head h2,
.content-card h2,
.feature-card h3,
.page-panel__head h1 {
    margin: 0;
    color: #163549;
}
.section-head p,
.content-card p,
.feature-card p,
.footer-text,
.info-row p { margin: 0; color: var(--muted); line-height: 1.7; }

.card-grid,
.feature-grid,
.metric-grid,
.link-grid,
.two-col,
.footer-grid {
    display: grid;
    gap: 16px;
}

.card-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.feature-grid,
.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.link-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.city-card { background: #fafdff; }
.city-card__name { display: block; font-size: 1.25rem; font-weight: 800; color: #19394e; }
.city-card__meta { display: block; margin-top: 8px; color: var(--muted); }
.city-card__cta { display: inline-block; margin-top: 18px; color: var(--blue); font-weight: 700; }
.metric-card strong { font-size: 1.8rem; color: #16384d; }

.table-card {
    border-radius: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0;
    -webkit-overflow-scrolling: touch;
}
.weather-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}
.weather-table th,
.weather-table td {
    padding: 15px 16px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}
.weather-table th {
    background: #edf7fd;
    color: #28526d;
    font-size: .95rem;
}
.weather-table tbody tr:hover { background: #f7fbfe; }

.content-layout {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.content-layout--single {
    grid-template-columns: minmax(0, 1fr);
}

.content-layout--single .page-panel__head {
    margin-bottom: 8px;
}

.content-layout--single .page-panel__head .section-kicker {
    margin: 0 0 6px;
}

.content-layout--single .page-panel__head h1 {
    margin: 0;
    line-height: 1.08;
}

.sidebar,
.main-column {
    display: grid;
    gap: 18px;
}

.sidebar-card--current {
    background: #fbfeff;
}

.sidebar-title {
    color: #204761;
    font-weight: 800;
    margin-bottom: 16px;
}

.sidebar-title--small {
    font-size: .78rem;
}

.sidebar-current-city {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1e4259;
}

.sidebar-current-condition {
    margin-top: 10px;
    color: var(--muted);
}

.sidebar-current-temp {
    margin-top: 10px;
    font-size: 2.6rem;
    font-weight: 800;
    color: #13384d;
}

.sidebar-current-feels {
    margin-top: 6px;
    color: var(--muted);
}

.sidebar-stats {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.sidebar-stats div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--line);
}

.sidebar-stats span,
.sidebar-list__item span:last-child,
.update-note {
    color: var(--muted);
}

.sidebar-list__item span:first-child {
    color: #21465f;
    font-weight: 600;
}

.page-panel__head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin-bottom: 18px;
}

.breadcrumb-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--muted);
    font-size: .95rem;
}

.breadcrumb-bar strong,
.breadcrumb-bar a:hover {
    color: var(--blue-dark);
}

.info-stack { margin-top: 18px; }
.info-row h3 { margin: 0 0 8px; color: #1f4761; }
.content-card--article p + p { margin-top: 12px; }

.soft-link {
    color: #214a65;
    font-weight: 600;
    background: #fafdff;
}

.site-footer {
    margin-top: 36px;
    background: #d9edf9;
    border-top: 1px solid var(--line-strong);
}

.footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
    padding: 28px 0 32px;
}

@media (max-width: 980px) {
    .content-layout,
    .hero,
    .feature-grid,
    .two-col,
    .footer-grid,
    .metric-grid,
    .metric-grid--three {
        grid-template-columns: 1fr;
    }

    .section-head,
    .page-panel__head {
        display: block;
    }

    .site-header__inner {
        flex-wrap: wrap;
    }

    .site-search {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .page-shell { width: min(100% - 20px, 1180px); }
    .site-header__inner {
        align-items: flex-start;
        flex-direction: column;
        padding: 12px 0;
    }
    .hero { padding: 20px; border-radius: 22px; }
    .weather-table { font-size: .94rem; }
    .weather-table th,
    .weather-table td { padding: 12px; }
    .button { width: 100%; }
    .main-nav { width: 100%; }
}

.table-link {
    color: var(--blue-dark);
    font-weight: 700;
}

.home-layout .page-panel__head h1 {
    max-width: 16ch;
}

.page-panel .tab-links {
    margin-top: 18px;
    margin-bottom: 18px;
}

.page-panel .table-card {
    margin-top: 8px;
}

.page-panel__head {
    padding-bottom: 8px;
}
.section-head--simple {
    display: block;
}

.footer-grid--clean {
    grid-template-columns: 1.2fr 1fr 1fr;
}

.footer-bottom {
    border-top: 1px solid var(--line-strong);
    background: #d3e8f5;
}

.footer-source-row {
    padding: 6px 0 18px;
}

.footer-bottom__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 58px;
    color: var(--muted);
}

.footer-bottom__inner > span:first-child,
.footer-bottom__links {
    flex: 1 1 0;
}

.footer-source {
    margin: 0;
    text-align: center;
    color: #3e6f8d;
    font-size: 14px;
}

.footer-bottom__links {
    display: flex;
    gap: 16px;
}

.footer-bottom__links a {
    color: #2d5c78;
}
.brand--with-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
    border-radius: 10px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.brand-text__top {
    font-size: 1rem;
    font-weight: 800;
    color: #214d69;
}

.brand-text__bottom {
    margin-top: 3px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #4b7690;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-brand-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 10px;
}

.footer-brand-stack .footer-text {
    margin: 0;
}

.weather-table {
    min-width: 680px;
}

.footer-bottom__links {
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .tab-links {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        margin-right: -4px;
    }

    .tab-link {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .footer-bottom__inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px 0;
    }

    .footer-bottom__inner > span:first-child,
    .footer-bottom__links {
        flex: initial;
    }

    .footer-source {
        text-align: left;
    }

    .footer-bottom__links {
        gap: 10px 14px;
    }
}

.page-panel,
.content-card,
.info-row,
.table-card {
    min-width: 0;
    max-width: 100%;
}

.content-layout > *,
.sidebar,
.main-column {
    min-width: 0;
}

.static-copy--full {
    width: 100%;
    padding-top: 0;
}

.static-copy--full ul,
.static-copy--full ol {
    margin: 12px 0 0 20px;
    padding: 0;
}

.static-copy--full li + li {
    margin-top: 8px;
}

.static-copy--full h2 {
    margin-top: 22px;
}

.static-copy--full p + p,
.static-copy--full p + h2,
.static-copy--full ul + h2 {
    margin-top: 16px;
}
