/*
Theme Name: berandanegeri.id
Version: 3.0.3
Requires at least: 6.0
Requires PHP: 8.2
License: GPL-2.0-or-later
*/

/* ---------- Tokens (Axios Colors & Typography) ---------- */
:root {
    --brand-blue: #2257da;   /* Axios Blue */
    --ink:        #111111;   /* Primary text */
    --ink-light:  #333333;   /* Secondary text */
    --paper:      #ffffff;   /* Main background */
    --paper-2:    #f8f9fa;   /* Very light gray for cards/sections */
    --rule:       #e2e8f0;   /* Light borders */
    --rule-strong:#cbd5e1;   /* Slightly darker borders */
    --muted:      #64748b;   /* Captions, meta */
    --maxw:       1200px;
    --font-sans:  "Inter", "Libre Franklin", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Reset & Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; background: var(--paper); color: var(--ink);
    font-family: var(--font-sans); font-size: 18px; line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; border-radius: 8px; }
a { color: var(--brand-blue); text-decoration: none; transition: 0.2s; }
a:hover { text-decoration: underline; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Utility / Faces ---------- */
.kicker, .site-nav, .meta, .section-head, .tag { font-family: var(--font-sans); }

/* ---------- Masthead (Header Axios Style) ---------- */
.masthead {
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    position: sticky; top: 0; z-index: 100;
}
.masthead__top { display: none; } /* Axios keeps header ultra clean, hide top bar */
.masthead__brand {
    padding: 15px 0;
    display: flex; align-items: center; justify-content: space-between;
    max-width: var(--maxw); margin: 0 auto; padding-inline: 20px;
}
.masthead__brand a { color: var(--ink); text-decoration: none; display: flex; align-items: center; }
.masthead__logo {
    font-weight: 900; font-size: 32px; letter-spacing: -0.04em; margin: 0; line-height: 1;
}
.masthead__logo .dot { color: var(--brand-blue); }
.masthead__tagline { display: none; } /* Clean look */

/* ---------- Primary nav ---------- */
.site-nav {
    border-top: 1px solid var(--rule);
    background: var(--paper);
}
.site-nav ul {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-wrap: wrap; max-width: var(--maxw);
    margin-inline: auto; padding-inline: 10px;
}
.site-nav a {
    display: block; color: var(--ink-light); text-decoration: none;
    font-size: 15px; font-weight: 600; padding: 15px 12px;
}
.site-nav a:hover, .site-nav .current-menu-item > a { color: var(--brand-blue); }

/* ---------- Layout grid ---------- */
.layout {
    display: grid; grid-template-columns: 1fr 340px; gap: 0 48px;
    padding: 40px 0 60px;
}

/* ---------- Lead / hero story ---------- */
.lead {
    width: min(100%, 760px);
    margin: 0 auto 40px;
    border-bottom: 1px solid var(--rule);
    padding-bottom: 30px;
}
.lead__media {
    width: min(100%, 720px);
    aspect-ratio: 16 / 9;
    margin: 0 auto 16px;
    overflow: hidden;
    border-radius: 8px;
}
.lead__media a {
    display: block;
    width: 100%;
    height: 100%;
}
.lead__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 0;
}
.lead__body {
    width: 100%;
}
.lead__title {
    font-weight: 800; font-size: clamp(19px, 2.3vw, 27px);
    line-height: 1.15; letter-spacing: -0.02em; margin: 10px 0 12px;
}
.lead__title a { color: var(--ink); }
.lead__title a:hover { color: var(--brand-blue); text-decoration: none; }
.lead__standfirst {
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink-light);
    margin: 0 0 16px;
    font-weight: 400;
}

/* ---------- Kicker ---------- */
.kicker {
    display: inline-block; font-size: 13px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em; color: var(--brand-blue);
}

/* ---------- Story grid ---------- */
.story-grid { display: flex; flex-direction: column; gap: 24px; }
.card { display: grid; grid-template-columns: 1fr 140px; gap: 20px; align-items: center; padding-bottom: 24px; border-bottom: 1px solid var(--rule); }
.card:last-child { border-bottom: none; }
.card__media { order: 2; margin: 0; }
.card__title {
    font-weight: 700; font-size: 20px; line-height: 1.3;
    letter-spacing: -0.01em; margin: 6px 0 8px;
}
.card__title a { color: var(--ink); }
.card__title a:hover { color: var(--brand-blue); text-decoration: none; }
.card__excerpt { font-size: 16px; color: var(--ink-light); margin: 0; display: none; } /* Hide excerpt in feed for cleaner look */

/* ---------- Photo stand-ins ---------- */
.ph {
    position: relative; aspect-ratio: 16 / 9; border-radius: 8px;
    background: var(--rule); overflow: hidden;
}
.ph--tall { aspect-ratio: 4 / 5; }
.ph__label { display: none; } /* Remove label to match Axios minimalist images */

/* ---------- Meta line ---------- */
.meta { font-size: 14px; color: var(--muted); font-weight: 500; }
.meta a { color: var(--muted); }

/* ---------- Section heads ---------- */
.section-head { margin: 0 0 20px; }
.section-head h2 { font-weight: 800; font-size: 24px; margin: 0; color: var(--ink); }

/* ---------- Sidebar ---------- */
.sidebar { padding-top: 10px; }
.widget { margin-bottom: 40px; background: var(--paper-2); padding: 24px; border-radius: 12px; }
.widget__title {
    font-weight: 800; font-size: 18px; text-transform: uppercase;
    letter-spacing: 0.04em; margin: 0 0 20px; color: var(--ink);
}
.most-read { list-style: none; margin: 0; padding: 0; counter-reset: mr; }
.most-read li {
    display: grid; grid-template-columns: 30px 1fr; gap: 10px;
    padding: 16px 0; border-bottom: 1px solid var(--rule-strong);
}
.most-read li:last-child { border-bottom: none; padding-bottom: 0; }
.most-read__rank {
    counter-increment: mr; font-weight: 800; font-size: 20px;
    color: var(--brand-blue); line-height: 1.2;
}
.most-read__rank::before { content: counter(mr); }
.most-read a { font-weight: 700; font-size: 16px; line-height: 1.3; color: var(--ink); }
.most-read a:hover { color: var(--brand-blue); text-decoration: none; }

/* ---------- Single article (Axios Smart Brevity Style) ---------- */
.article { max-width: 100%; margin: 0; padding: 10px 0 60px; }
.article__title {
    font-weight: 800; font-size: clamp(32px, 5vw, 44px); line-height: 1.15;
    letter-spacing: -0.02em; margin: 12px 0 16px;
}
.article__standfirst { font-size: 22px; color: var(--ink-light); font-weight: 500; margin: 0 0 24px; line-height: 1.4; }
.article__meta { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 30px; }
.article__body p { margin: 0 0 1.4em; font-size: 19px; color: #222; }
.article__body strong { font-weight: 800; color: var(--ink); } /* Emphasis for Smart Brevity */
.article__body ul { margin: 0 0 1.4em; padding-left: 20px; font-size: 19px; }
.article__body li { margin-bottom: 8px; }
.article__body h2, .article__body h3 { font-weight: 800; letter-spacing: -0.01em; margin-top: 1.5em; }
.article__body blockquote {
    margin: 1.5em 0; padding: 0 0 0 20px; border-left: 4px solid var(--brand-blue);
    font-size: 22px; font-weight: 600; color: var(--ink-light);
}

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #ffffff; padding: 60px 0 40px; }
.footer-cols { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 40px; }
.footer-brand .masthead__logo { color: #fff; font-size: 36px; }
.footer-brand p { color: #a1a1aa; font-size: 15px; margin-top: 15px; }
.footer-cols h4 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.05em; color: #fff; margin: 0 0 16px; font-weight: 700; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; }
.footer-cols li { margin-bottom: 12px; }
.footer-cols a { color: #cbd5e1; font-size: 15px; font-weight: 500; }
.footer-cols a:hover { color: #fff; text-decoration: none; }
.site-footer__legal { border-top: 1px solid #334155; margin-top: 40px; padding-top: 24px; font-size: 14px; color: #94a3b8; }

/* ---------- Pagination ---------- */
.pagination { padding: 30px 0; display: flex; gap: 10px; }
.pagination a, .pagination .current {
    font-weight: 700; font-size: 15px; padding: 10px 16px;
    border-radius: 6px; background: var(--paper-2); color: var(--ink);
}
.pagination .current { background: var(--brand-blue); color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .layout { grid-template-columns: 1fr; gap: 40px; }
    .widget { margin-bottom: 20px; }
    .footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .lead__title { font-size: clamp(17px, 5vw, 23px); }
    .card { grid-template-columns: 1fr; gap: 12px; }
    .card__media { order: -1; }
    .footer-cols { grid-template-columns: 1fr; }
    .masthead__logo { font-size: 28px; }
}
/* ---------- Masthead search ---------- */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.masthead__search {
    width: min(100%, 390px);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 5px 5px 14px;
    background: var(--paper-2);
    border: 1px solid var(--rule);
    border-radius: 999px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.masthead__search:focus-within {
    background: var(--paper);
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 4px rgba(34, 87, 218, 0.12);
}

.masthead__search-icon {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    color: var(--muted);
}

.masthead__search-icon svg,
.search-submit svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.masthead__search .search-field {
    min-width: 0;
    flex: 1;
    height: 38px;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    appearance: none;
    -webkit-appearance: none;
}

.masthead__search .search-field::placeholder {
    color: var(--muted);
    opacity: 1;
}

.masthead__search .search-field::-webkit-search-cancel-button {
    cursor: pointer;
}

.search-submit {
    flex: 0 0 auto;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 15px;
    border: 0;
    border-radius: 999px;
    background: var(--brand-blue);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(34, 87, 218, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.search-submit svg {
    width: 15px;
    height: 15px;
    transition: transform 0.2s ease;
}

.search-submit:hover {
    filter: brightness(0.96);
    box-shadow: 0 6px 16px rgba(34, 87, 218, 0.28);
    transform: translateY(-1px);
}

.search-submit:hover svg {
    transform: translateX(2px);
}

.search-submit:active {
    transform: translateY(0);
}

.search-submit:focus-visible {
    outline: 3px solid rgba(34, 87, 218, 0.25);
    outline-offset: 2px;
}

@media (max-width: 760px) {
    .masthead__brand {
        flex-wrap: wrap;
        gap: 14px;
    }

    .masthead__search {
        width: 100%;
        order: 2;
    }
}

@media (max-width: 420px) {
    .search-submit {
        width: 38px;
        padding: 0;
    }

    .search-submit span {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
}

/* === Floating masthead brand only === */

.masthead {
    position: relative !important;
    top: auto !important;
}

/* Pertahankan tinggi posisi brand asli agar tidak layout-shift */
.masthead-brand-spacer {
    display: none;
    width: 100%;
}

.masthead-brand-spacer.is-active {
    display: block;
}

/* Full-width compact floating bar */
.masthead-brand-floating-shell {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    box-sizing: border-box;
    box-shadow: 0 2px 12px rgba(0,0,0,.10);
}

.masthead-brand-floating-shell.is-active {
    display: block;
}

.masthead-compact-inner {
    width: 100%;
    max-width: var(--maxw, 1200px);
    min-height: 58px;

    margin-left: auto;
    margin-right: auto;

    padding: 7px 20px;

    box-sizing: border-box;

    display: flex;
    align-items: center;
    gap: 28px;
}

/* Brand menjadi compact, jangan lagi full-width .wrap */
.masthead-compact-inner .masthead__brand {
    position: relative !important;

    top: auto !important;
    left: auto !important;
    right: auto !important;

    width: auto !important;
    max-width: none !important;

    min-width: 0;

    padding: 0 !important;
    margin: 0 !important;

    flex: 0 0 auto;

    display: flex !important;
    align-items: center !important;

    text-align: left !important;

    transform: none !important;
}

/* Logo compact */
.masthead-compact-inner .masthead__logo {
    font-size: clamp(20px, 2vw, 28px) !important;
    line-height: 1.05 !important;

    margin: 0 !important;
    padding: 0 !important;

    white-space: nowrap;
}

/* Handle theme yang memakai wrapper logo */
.masthead-compact-inner .masthead__logo-wrapper {
    transform: scale(.78) !important;
    transform-origin: left center;

    margin: 0 !important;
}

/* Compact mode hanya membutuhkan logo + menu */
.masthead-compact-inner .masthead__brand .masthead__tagline,
.masthead-compact-inner .masthead__brand .masthead__search {
    display: none !important;
}

/* Navigation */
.masthead-compact-nav {
    min-width: 0;
    flex: 1 1 auto;

    margin-left: auto !important;
}

.masthead-compact-nav ul.menu,
.masthead-compact-nav.menu {
    display: flex !important;
    align-items: center;

    justify-content: flex-end;

    gap: 22px;

    margin: 0 !important;
    padding: 0 !important;

    list-style: none !important;

    white-space: nowrap;

    overflow-x: auto;
    overflow-y: hidden;

    scrollbar-width: none;
}

.masthead-compact-nav ul.menu::-webkit-scrollbar,
.masthead-compact-nav.menu::-webkit-scrollbar {
    display: none;
}

.masthead-compact-nav li {
    margin: 0 !important;
    padding: 0 !important;

    flex: 0 0 auto;
}

.masthead-compact-nav a {
    display: block;

    color: var(--compact-menu-color, inherit) !important;

    text-decoration: none;

    white-space: nowrap;
}

/*
 * Logo asli berada di kanan:
 *
 * MENU ---------------- LOGO
 */
.masthead-compact-inner.origin-right {
    flex-direction: row;
}

.masthead-compact-inner.origin-right .masthead-compact-nav {
    order: 1;
    margin-left: 0 !important;
    margin-right: auto !important;
}

.masthead-compact-inner.origin-right .masthead__brand {
    order: 2;
    margin-left: auto !important;
}

.masthead-compact-inner.origin-right .masthead__brand {
    text-align: right !important;
}

.masthead-compact-inner.origin-right .masthead__logo-wrapper {
    transform-origin: right center;
}

.masthead-compact-inner.origin-right .masthead-compact-nav ul.menu,
.masthead-compact-inner.origin-right .masthead-compact-nav.menu {
    justify-content: flex-start;
}

/* Mobile */
@media (max-width: 760px) {

    .masthead-compact-inner {
        min-height: 52px;
        gap: 16px;
        padding: 6px 14px;
    }

    .masthead-compact-inner .masthead__logo {
        font-size: 20px !important;
    }

    .masthead-compact-inner .masthead__logo-wrapper {
        transform: scale(.68) !important;
    }

    .masthead-compact-nav ul.menu,
    .masthead-compact-nav.menu {
        gap: 16px;
        font-size: 13px;
    }
}

/* === /Floating masthead brand only === */

/* === Horizontal primary menu === */

/*
 * Primary navigation selalu satu baris.
 * Jika tidak muat, scroll horizontal.
 */
.site-nav,
.masthead nav {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.site-nav::-webkit-scrollbar,
.masthead nav::-webkit-scrollbar {
    display: none;
}

.site-nav ul.menu,
.masthead ul.menu,
#menu-primary,
#menu-primary-menu {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;

    width: max-content;
    min-width: 100%;

    margin-top: 0 !important;
    margin-bottom: 0 !important;

    white-space: nowrap !important;

    overflow-x: auto;
    overflow-y: hidden;

    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.site-nav ul.menu::-webkit-scrollbar,
.masthead ul.menu::-webkit-scrollbar,
#menu-primary::-webkit-scrollbar,
#menu-primary-menu::-webkit-scrollbar {
    display: none;
}

.site-nav ul.menu > li,
.masthead ul.menu > li,
#menu-primary > li,
#menu-primary-menu > li {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
}

.site-nav ul.menu > li > a,
.masthead ul.menu > li > a,
#menu-primary > li > a,
#menu-primary-menu > li > a {
    display: block;
    white-space: nowrap !important;
}

/* Compact floating navigation */
.masthead-compact-nav {
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;

    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.masthead-compact-nav::-webkit-scrollbar {
    display: none;
}

.masthead-compact-nav ul.menu,
.masthead-compact-nav.menu {
    display: flex !important;
    flex-wrap: nowrap !important;

    width: max-content !important;
    min-width: 100%;

    overflow-x: visible !important;
    overflow-y: hidden !important;

    white-space: nowrap !important;
}

/* === /Horizontal primary menu === */

/* === Center default primary menu === */

/*
 * Hanya posisi default / belum floating.
 * Menu compact saat scroll tetap mengikuti logic logo kiri/kanan.
 */
.masthead .site-nav ul.menu,
.masthead nav ul.menu,
.masthead #menu-primary,
.masthead #menu-primary-menu,
.masthead ul.menu:not(.masthead-compact-nav) {
    justify-content: center !important;

    margin-left: auto !important;
    margin-right: auto !important;
}

/*
 * Pastikan wrapper nav memenuhi lebar area header,
 * sehingga centering punya ruang yang benar.
 */
.masthead .site-nav,
.masthead nav {
    width: 100%;
    box-sizing: border-box;
}

/* === /Center default primary menu === */

/* === Homepage news filter UI === */

.news-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;

    width: 100%;
    box-sizing: border-box;

    margin: 0 0 28px;
    padding: 14px 0 20px;

    border-bottom: 1px solid var(--rule, #d8d8d8);
}

.news-filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.news-filter-label {
    font-size: 11px;
    line-height: 1.2;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted, #666);
}

.news-filter-field select {
    display: block;

    width: 100%;
    min-height: 42px;

    box-sizing: border-box;

    padding: 8px 12px;

    border: 1px solid var(--rule, #ccc);
    border-radius: 3px;

    background: var(--paper, #fff);
    color: var(--ink, #111);

    font: inherit;
    font-size: 14px;

    cursor: pointer;
}

.news-filter-field select:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

@media (max-width: 760px) {
    .news-filters {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 22px;
    }
}

/* === /Homepage news filter UI === */
.news-date-range{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.news-date-range input[type=date]{width:145px;box-sizing:border-box;padding:8px 10px;border:1px solid #bbb;border-radius:3px;background:#fff;font:inherit}
.news-date-range button{padding:8px 14px;border:1px solid #222;border-radius:3px;background:#222;color:#fff;font:inherit;cursor:pointer}
.news-date-range button:hover{opacity:.85}
.news-filter-field .news-date-range{
display:flex!important;align-items:center!important;gap:8px!important;flex-wrap:nowrap!important
}
.news-filter-field .news-date-range input[type=date]{
width:132px!important;height:38px!important;min-width:0!important;
padding:0 8px!important;margin:0!important;
font-size:14px!important;line-height:1!important;
border:1px solid #bbb!important;border-radius:4px!important;
background:#fff!important;box-sizing:border-box!important
}
.news-filter-field .news-date-range>span{
font-size:14px!important;margin:0!important
}
.news-filter-field .news-date-range button{
width:auto!important;height:38px!important;
padding:0 13px!important;margin:0!important;
font-size:14px!important;line-height:36px!important;
border-radius:4px!important;white-space:nowrap!important
}
@media(max-width:420px){
.news-filter-field .news-date-range{display:grid!important;grid-template-columns:1fr auto 1fr!important}
.news-filter-field .news-date-range input[type=date]{width:100%!important}
.news-filter-field .news-date-range button{grid-column:1/-1!important;width:100%!important}
}

/* ---------- Visitor weather ---------- */
.masthead > .masthead__brand {
    position: relative;
    padding-top: 42px;
}

/* ---------- Modern weather ---------- */
.masthead__weather {
    position: absolute;
    top: 8px;
    left: 20px;
    z-index: 120;
    max-width: calc(100% - 40px);
    color: var(--ink);
}

/* Main weather pill */
.masthead__weather-trigger {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: min(460px, calc(100vw - 40px));
    min-height: 28px;

    margin: 0;
    padding: 5px 10px 5px 9px;

    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 999px;

    background: rgba(255, 255, 255, .82);
    color: var(--ink);

    font: inherit;
    font-size: 11px;
    line-height: 1;
    font-weight: 650;

    cursor: pointer;
    white-space: nowrap;

    box-shadow:
        0 1px 2px rgba(0, 0, 0, .04),
        0 3px 10px rgba(0, 0, 0, .045);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    transition:
        border-color .18s ease,
        background-color .18s ease,
        box-shadow .18s ease,
        transform .18s ease;
}

/* Small location pin */
.masthead__weather-trigger::before {
    content: "";
    width: 6px;
    height: 6px;
    flex: 0 0 6px;

    border-radius: 50%;
    background: var(--brand-blue);

    box-shadow: 0 0 0 3px rgba(34, 87, 218, .10);
}

/* Chevron */
.masthead__weather-trigger::after {
    content: "";
    width: 6px;
    height: 6px;
    flex: 0 0 6px;

    margin-left: 2px;

    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;

    transform: rotate(45deg) translateY(-1px);
    opacity: .55;

    transition:
        transform .18s ease,
        opacity .18s ease;
}

.masthead__weather-trigger[aria-expanded="true"]::after {
    transform: rotate(225deg) translate(-1px, -1px);
}

.masthead__weather-trigger:hover {
    border-color: rgba(34, 87, 218, .22);
    background: #fff;

    box-shadow:
        0 2px 5px rgba(0, 0, 0, .05),
        0 6px 18px rgba(0, 0, 0, .07);

    transform: translateY(-1px);
}

.masthead__weather-trigger:hover::after {
    opacity: .85;
}

.masthead__weather-trigger:focus-visible {
    outline: none;
    border-color: var(--brand-blue);

    box-shadow:
        0 0 0 3px rgba(34, 87, 218, .13),
        0 6px 18px rgba(0, 0, 0, .07);
}

#masthead-weather-summary {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Dropdown */
.masthead__weather-picker {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;

    box-sizing: border-box;
    width: min(370px, calc(100vw - 40px));

    padding: 12px;

    background: rgba(255, 255, 255, .97);
    color: var(--ink);

    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 16px;

    box-shadow:
        0 18px 50px rgba(0, 0, 0, .14),
        0 4px 12px rgba(0, 0, 0, .06);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    white-space: normal;
}

.masthead__weather-picker[hidden] {
    display: none;
}

/* Search */
.masthead__weather-input {
    box-sizing: border-box;
    display: block;
    width: 100%;
    height: 42px;

    padding: 0 13px;

    border: 1px solid rgba(0, 0, 0, .10);
    border-radius: 11px;

    background: rgba(0, 0, 0, .025);
    color: var(--ink);

    font: inherit;
    font-size: 13px;
    font-weight: 500;

    outline: none;

    transition:
        background-color .18s ease,
        border-color .18s ease,
        box-shadow .18s ease;
}

.masthead__weather-input::placeholder {
    color: var(--ink-light);
    opacity: .7;
}

.masthead__weather-input:hover {
    background: rgba(0, 0, 0, .035);
}

.masthead__weather-input:focus {
    background: #fff;
    border-color: var(--brand-blue);

    box-shadow:
        0 0 0 3px rgba(34, 87, 218, .10);
}

/* Status */
.masthead__weather-status {
    min-height: 0;
    color: var(--ink-light);
    font-size: 11px;
    line-height: 1.4;
    font-weight: 500;
}

.masthead__weather-status:not(:empty) {
    padding: 9px 4px 5px;
}

/* Search results */
.masthead__weather-results {
    display: grid;
    gap: 3px;

    max-height: 280px;
    margin-top: 5px;

    overflow-y: auto;
    overscroll-behavior: contain;

    scrollbar-width: thin;
}

.masthead__weather-result {
    appearance: none;
    display: block;
    width: 100%;

    margin: 0;
    padding: 9px 10px;

    border: 1px solid transparent;
    border-radius: 10px;

    background: transparent;
    color: var(--ink);

    text-align: left;
    cursor: pointer;

    transition:
        background-color .15s ease,
        border-color .15s ease,
        transform .15s ease;
}

.masthead__weather-result:hover,
.masthead__weather-result:focus-visible {
    background: rgba(34, 87, 218, .055);
    border-color: rgba(34, 87, 218, .10);

    outline: none;
    transform: translateX(2px);
}

.masthead__weather-result-name {
    display: block;

    font-size: 13px;
    line-height: 1.35;
    font-weight: 750;

    letter-spacing: -.01em;
}

.masthead__weather-result-meta {
    display: block;

    margin-top: 3px;

    color: var(--ink-light);

    font-size: 11px;
    line-height: 1.35;
    font-weight: 450;
}

/* Automatic/IP location */
.masthead__weather-auto {
    appearance: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    width: 100%;

    margin-top: 10px;
    padding: 9px 11px;

    border: 1px solid rgba(34, 87, 218, .13);
    border-radius: 10px;

    background: rgba(34, 87, 218, .055);
    color: var(--brand-blue);

    font: inherit;
    font-size: 11px;
    line-height: 1.2;
    font-weight: 750;

    cursor: pointer;

    transition:
        background-color .16s ease,
        border-color .16s ease,
        transform .16s ease;
}

.masthead__weather-auto::before {
    content: "◎";
    font-size: 14px;
    line-height: 1;
    font-weight: 400;
}

.masthead__weather-auto:hover,
.masthead__weather-auto:focus-visible {
    background: rgba(34, 87, 218, .10);
    border-color: rgba(34, 87, 218, .22);

    outline: none;
    text-decoration: none;
    transform: translateY(-1px);
}

.masthead-brand-floating-shell .masthead__weather {
    display: none !important;
}

@media (max-width: 640px) {
    .masthead > .masthead__brand {
        padding-top: 40px;
    }

    .masthead__weather {
        top: 7px;
    }

    .masthead__weather-trigger {
        max-width: calc(100vw - 40px);
        min-height: 27px;
        font-size: 10.5px;
    }

    .masthead__weather-picker {
        width: min(360px, calc(100vw - 40px));
        padding: 11px;
        border-radius: 14px;
    }

    .masthead__weather-input {
        height: 42px;
        font-size: 16px;
    }
}

/* ---------- Trending bar ---------- */
.trending-bar {
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
}

.trending-bar__inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 8px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.trending-bar__label {
    flex: 0 0 auto;
    color: var(--brand-blue);
    font-size: 11px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.trending-bar__items {
    display: flex;
    align-items: center;
    min-width: 0;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}

.trending-bar__items::-webkit-scrollbar {
    display: none;
}

.trending-bar__items a {
    color: var(--ink);
    text-decoration: none;
    font-size: 13px;
    line-height: 1.4;
}

.trending-bar__items a:hover,
.trending-bar__items a:focus-visible {
    color: var(--brand-blue);
}

.trending-bar__items a + a::before {
    content: "•";
    color: var(--ink-light);
    margin: 0 10px;
}

@media (max-width: 640px) {
    .trending-bar__inner {
        padding-block: 7px;
        gap: 10px;
    }

    .trending-bar__items a {
        font-size: 12px;
    }
}
