/* ==========================================================
   Kaizen City — Editorial / News-Dense Stylesheet
   Premium newspaper aesthetic: black typography, tight grids,
   colorful live-data panels, information-dense layout.
   Colors/fonts via :root { {{ theme_css }} }
   ========================================================== */

/* --- Keyframes --- */

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes subtleSlideIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes grainShift {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-2%, -2%); }
    30% { transform: translate(1%, -1%); }
    50% { transform: translate(-1%, 2%); }
    70% { transform: translate(2%, 1%); }
    90% { transform: translate(-2%, 1%); }
}

/* --- Reset & Base --- */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 15px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
    color: #1a1a1a;
    background: #ffffff;
    line-height: 1.45;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

main { flex: 1; }

img { max-width: 100%; height: auto; display: block; }

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-secondary, var(--color-primary));
    text-decoration: underline;
}


/* --- Screen Reader Only (accessibility) --- */

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


/* --- Skip Link (accessibility) --- */

.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 999;
    background: var(--color-primary, #1a5276);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 0 0 6px 6px;
    font-weight: 700;
    font-size: 0.875rem;
    text-decoration: none;
    transition: top 0.15s ease;
}

.skip-link:focus {
    top: 0;
    outline: none;
    color: #fff;
    text-decoration: none;
}


/* --- Focus Indicators (WCAG AA) --- */

*:focus-visible {
    outline: 2px solid var(--color-primary, #1a5276);
    outline-offset: 2px;
}

a:focus-visible {
    outline: 2px solid var(--color-primary, #1a5276);
    outline-offset: 2px;
    border-radius: 2px;
    text-decoration: none;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--color-primary, #1a5276);
    outline-offset: 2px;
}

.nav-link:focus-visible {
    outline: 2px solid var(--color-primary, #1a5276);
    outline-offset: -2px;
    border-radius: 2px;
}

.nav-toggle:focus-visible {
    outline: 2px solid var(--color-primary, #1a5276);
    outline-offset: 2px;
    border-radius: 4px;
}

.scope-tab:focus-visible {
    outline: 2px solid var(--color-primary, #1a5276);
    outline-offset: -2px;
}

.site-footer a:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
    border-radius: 2px;
}

.alert-bar a:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

.wx-panel a:focus-visible,
.wx-panel button:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}


::selection {
    background: var(--color-primary);
    color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}


/* --- Alert Bar --- */

.alert-bar {
    background: #d32f2f;
    color: #fff;
    padding: 0.5rem 0;
    font-size: 0.8125rem;
    text-align: center;
    letter-spacing: 0.02em;
    line-height: 1.5;
    animation: subtleSlideIn 0.4s ease-out;
    position: relative;
    z-index: 200;
}

.alert-bar--emergency {
    background: #b71c1c;
    padding: 0.75rem 0;
    font-size: 0.875rem;
    box-shadow: 0 2px 8px rgba(183, 28, 28, 0.35);
}

.alert-bar--warning {
    background: #e65100;
    box-shadow: 0 2px 6px rgba(230, 81, 0, 0.25);
}

.alert-bar--watch {
    background: #f57f17;
    color: #1a1a1a;
}

.alert-bar--advisory,
.alert-bar--info {
    background: var(--color-primary, #3a7a8a);
}

.alert--emergency { background: transparent; }
.alert--warning { background: transparent; }
.alert--watch { background: transparent; }
.alert--advisory { background: transparent; }
.alert--info { background: transparent; }

.alert {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.1rem 0;
}

.alert__icon {
    font-size: 1rem;
    line-height: 1;
    flex-shrink: 0;
}

.alert__text {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.7rem;
}

.alert-bar--emergency .alert__text {
    font-size: 0.8rem;
    letter-spacing: 0.08em;
}

.alert-bar__link {
    display: inline-block;
    margin-top: 0.2rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    text-decoration: underline;
}

.alert-bar__link:hover {
    color: #fff;
}

.alert-bar--watch .alert-bar__link {
    color: rgba(0,0,0,0.6);
}

.alert-bar--watch .alert-bar__link:hover {
    color: #1a1a1a;
}

.nav-link--emergency {
    color: #c62828;
    font-weight: 700;
}


/* --- Site Header --- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-top: 3px solid var(--season-accent, #111);
    border-bottom: 1px solid #e8e8e8;
}

.site-header--compact {
    /* inherits */
}

.site-header--compact .site-header__city {
    font-size: 0.9rem;
}

.nav-link--sm {
    font-size: 0.6rem;
    padding: 0.15rem 0.45rem;
}

.site-header .container {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 0;
    height: 36px;
    padding-top: 0;
    padding-bottom: 0;
}

.site-header__brand {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    padding-right: 0.875rem;
    margin-right: 0.125rem;
    border-right: 1px solid #ddd;
    flex-shrink: 0;
    line-height: 1;
    height: 100%;
}

.site-header__brand:hover {
    text-decoration: none;
}

.site-header__logo {
    display: block;
    height: 26px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
}

.site-header__city {
    font-family: var(--font-heading, Georgia, "Times New Roman", serif);
    font-size: 1.375rem;
    font-weight: 900;
    color: #111;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.site-header__tagline {
    font-size: 0.625rem;
    color: #696969;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 500;
    line-height: 1.4;
}

.site-header__nav {
    display: flex;
    gap: 0;
    align-items: stretch;
    flex: 1;
}

.nav-link {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #666;
    padding: 0 0.5rem;
    border-radius: 0;
    transition: color 0.12s ease;
    position: relative;
    display: flex;
    align-items: center;
    text-decoration: none;
    white-space: nowrap;
}

.nav-link:hover {
    color: #111;
    text-decoration: none;
}

.nav-link--active {
    color: #111;
    font-weight: 700;
}

.nav-link--active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0.5rem;
    right: 0.5rem;
    height: 2px;
    background: var(--season-accent, #111);
}

.nav-link--active:hover {
    color: #111;
}

/* Primary nav: Today, News, Weather, Events */
.nav-link--primary {
    color: #333;
    font-weight: 600;
}

.nav-link--featured {
    color: var(--color-primary);
    font-weight: 600;
}

.nav-link--featured:hover {
    color: var(--color-primary);
}

/* Emergency — distinct, muted red */
.nav-link--emergency {
    color: #8b2020;
    letter-spacing: 0.06em;
}

.nav-link--emergency:hover {
    color: #b33;
}


/* --- Nav Toggle (hamburger) --- */

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border-radius: 4px;
    transition: background 0.15s ease;
}

.nav-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

.nav-toggle__bar {
    display: block;
    width: 20px;
    height: 2px;
    background: #111;
    border-radius: 1px;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-toggle--open .nav-toggle__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle--open .nav-toggle__bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle--open .nav-toggle__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* --- Site Search --- */

.site-search {
    position: relative;
    display: flex;
    align-items: center;
    padding-left: 0.75rem;
    margin-left: 0.25rem;
    border-left: 1px solid #e0e0e0;
}

.site-search__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: #777;
    transition: color 0.12s ease;
    padding: 0;
    flex-shrink: 0;
}

.site-search__toggle:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--color-primary, #1a5276);
}

.site-search__toggle:focus-visible {
    outline: 2px solid var(--color-primary, #1a5276);
    outline-offset: 2px;
}

.site-search__panel {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(420px, calc(100vw - 2rem));
    background: #fff;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    z-index: 200;
    overflow: hidden;
}

.site-search__panel--open {
    display: block;
    animation: fadeIn 0.15s ease;
}

.site-search__form {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding: 0.5rem;
    gap: 0.35rem;
}

.site-search__input {
    flex: 1;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 0.92rem;
    padding: 0.5rem 0.5rem;
    background: transparent;
    color: #111;
    min-width: 0;
}

.site-search__input::placeholder {
    color: #999;
}

.site-search__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    color: #777;
    border-radius: 6px;
    transition: background 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
    padding: 0;
}

.site-search__submit:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--color-primary, #1a5276);
}

/* Search results dropdown */
.search-results {
    max-height: 400px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.search-results__count {
    font-size: 0.7rem;
    font-weight: 600;
    color: #999;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.6rem 0.85rem 0.3rem;
}

.search-results__group-label {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-primary, #1a5276);
    padding: 0.5rem 0.85rem 0.2rem;
    border-top: 1px solid #f0f0f0;
}

.search-results__group-label:first-of-type {
    border-top: none;
}

.search-result {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.85rem;
    text-decoration: none;
    color: #111;
    transition: background 0.1s ease;
    cursor: pointer;
}

.search-result:hover {
    background: #f5f5f5;
    text-decoration: none;
}

.search-result__type {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.85rem;
    background: #f0f0f0;
    color: #666;
}

.search-result__type--news { background: #e8f0fe; color: #1a5276; }
.search-result__type--event { background: #e8f5e9; color: #2e7d32; }
.search-result__type--business { background: #fff3e0; color: #e65100; }
.search-result__type--civic { background: #f3e5f5; color: #6a1b9a; }

.search-result__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.search-result__title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result__meta {
    font-size: 0.72rem;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result__ext {
    flex-shrink: 0;
    font-size: 0.75rem;
    color: #bbb;
}

.search-results__all {
    display: block;
    text-align: center;
    padding: 0.6rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-primary, #1a5276);
    text-decoration: none;
    border-top: 1px solid #eee;
}

.search-results__all:hover {
    background: #f5f5f5;
    text-decoration: none;
}

.search-results__empty {
    text-align: center;
    padding: 1.25rem 0.85rem;
    font-size: 0.85rem;
    color: #999;
}

/* Search full page styles */
.search-page {
    padding: 1.5rem 1rem 3rem;
}

.search-page__title {
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0 0 1.25rem;
}

.search-page__spinner {
    text-align: center;
    padding: 0;
    height: 0;
    overflow: hidden;
    color: #999;
    font-size: 0.875rem;
    transition: height 0.15s;
}

.search-page__results {
    margin-top: 1.25rem;
}

.search-page__count {
    font-size: 0.875rem;
    color: #636363;
    margin-bottom: 1rem;
}

.search-page-form {
    display: flex;
    gap: 0.5rem;
    max-width: 600px;
}

.search-page-form__input {
    flex: 1;
    padding: 0.7rem 1rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    min-height: 48px;
    transition: border-color 0.15s ease;
}

.search-page-form__input:focus {
    outline: none;
    border-color: var(--color-primary, #1a5276);
}

.search-page-form__btn {
    padding: 0.7rem 1.5rem;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    min-height: 48px;
    transition: background 0.15s ease;
}

.search-page-form__btn:hover {
    background: var(--color-primary, #1a5276);
}

.search-page-group {
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-size: 0.9375rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--color-primary, #1a5276);
    padding: 1rem 0 0.4rem;
    border-top: 1px solid #eee;
    margin-top: 0.5rem;
}

.search-page-group:first-of-type {
    border-top: none;
    margin-top: 0;
}

.search-page-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: #111;
    transition: background 0.1s ease;
}

.search-page-item:hover {
    background: #f9f9f9;
    text-decoration: none;
}

.search-page-item__badge {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-top: 0.1rem;
}

.search-page-item__badge--news { background: #e8f0fe; color: #1a5276; }
.search-page-item__badge--event { background: #e8f5e9; color: #2e7d32; }
.search-page-item__badge--business { background: #fff3e0; color: #e65100; }
.search-page-item__badge--civic { background: #f3e5f5; color: #6a1b9a; }

.search-page-item__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.search-page-item__title {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.35;
}

.search-page-item__ext {
    font-size: 0.75em;
    color: #999;
}

.search-page-item__meta {
    font-size: 0.875rem;
    color: #888;
}

.search-page__empty {
    text-align: center;
    padding: 2rem 1rem;
    color: #636363;
}

.search-page__empty-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.search-page__empty-hint {
    font-size: 0.9375rem;
}

.search-page__empty-hint a {
    color: var(--color-primary, #1a5276);
}


/* --- Hero --- */

.hero {
    background-color: var(--color-primary);
    background-size: cover;
    background-position: center;
    min-height: 38vh;
    max-height: 40vh;
    display: flex;
    align-items: flex-end;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: -50%;
    width: 300%;
    height: 300%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
    pointer-events: none;
    z-index: 1;
    animation: grainShift 8s steps(6) infinite;
    mix-blend-mode: overlay;
}

.hero__overlay {
    width: 100%;
    padding: 3rem 0 2rem;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.4) 40%,
        rgba(0, 0, 0, 0.1) 75%,
        transparent 100%
    );
    position: relative;
    z-index: 2;
}

.hero__welcome {
    font-family: var(--font-heading, Georgia, "Times New Roman", serif);
    font-size: clamp(2rem, 5vw, 3.25rem);
    color: #fff;
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero__weather {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.95);
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.hero__temp {
    font-size: 2rem;
    font-weight: 300;
    font-family: var(--font-heading, Georgia, serif);
    letter-spacing: -0.02em;
    line-height: 1;
}

.hero__conditions {
    font-size: 0.9375rem;
    opacity: 0.85;
    font-weight: 400;
}


/* --- Sections --- */

.section {
    padding: 2.5rem 0;
    animation: fadeIn 0.5s ease both;
    border-bottom: 1px solid #e0e0e0;
}

.section:last-of-type {
    border-bottom: none;
}

.section--alt {
    background: #f8f8f7;
}

.section--editorial {
    padding: 2rem 0;
}

.section__heading {
    font-family: var(--font-heading, Georgia, "Times New Roman", serif);
    font-size: 1.125rem;
    font-weight: 900;
    color: #111;
    margin-bottom: 1.25rem;
    letter-spacing: 0.06em;
    line-height: 1.3;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 0.6rem;
    border-bottom: 3px solid #111;
}

.section__heading::after {
    content: none;
}

.section__empty {
    color: #636363;
    font-style: italic;
    font-size: 0.875rem;
    line-height: 1.45;
}


/* --- Grid --- */

.grid { display: grid; gap: 1.5rem; }
.grid--2col { grid-template-columns: 1fr 1fr; }

.stack { display: flex; flex-direction: column; gap: 1rem; }


/* --- Cards (generic) --- */

.card {
    background: #fff;
    border-radius: 0;
    padding: 1.25rem;
    box-shadow: none;
    border: 1px solid #e0e0e0;
    transition: border-color 0.2s ease;
    animation: subtleSlideIn 0.4s ease both;
}

.card:hover {
    transform: none;
    border-color: #bbb;
    box-shadow: none;
}

.card__heading {
    font-family: var(--font-heading, Georgia, serif);
    font-size: 0.6875rem;
    font-weight: 800;
    color: #111;
    margin-bottom: 0.875rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e0e0e0;
    letter-spacing: 0.1em;
    line-height: 1.4;
    text-transform: uppercase;
}

.card__empty {
    color: #636363;
    font-size: 0.8125rem;
    font-style: italic;
    line-height: 1.45;
}

.card__link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.875rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition: gap 0.2s ease;
}

.card__link::after {
    content: "\2192";
    transition: transform 0.2s ease;
}

.card__link:hover {
    text-decoration: none;
}

.card__link:hover::after {
    transform: translateX(3px);
}


/* --- Editorial Card --- */

.editorial-card {
    background: #fff;
    border-radius: 0;
    padding: 1.5rem;
    border-left: 4px solid #111;
    box-shadow: none;
    border-top: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    transition: border-left-color 0.2s ease;
    animation: subtleSlideIn 0.4s ease both;
}

.editorial-card:hover {
    transform: none;
    border-left-color: var(--color-primary);
    box-shadow: none;
}

.editorial-card__heading {
    font-family: var(--font-heading, Georgia, "Times New Roman", serif);
    font-size: 1.5rem;
    color: #111;
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
    font-weight: 900;
}

.editorial-card__date {
    font-size: 0.6875rem;
    color: #636363;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 500;
    line-height: 1.4;
}

.editorial-card__body {
    font-size: 0.9375rem;
    line-height: 1.55;
    color: #1a1a1a;
}

.editorial-card__body p {
    margin-bottom: 1rem;
}

.editorial-card__body p:last-child {
    margin-bottom: 0;
}

.editorial-card__body p + p {
    margin-top: 0;
}


/* --- Event List (sidebar) --- */

.event-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.event-list__item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    transition: background 0.15s ease;
}

.event-list__item:first-child { padding-top: 0; }
.event-list__item:last-child { border-bottom: none; padding-bottom: 0; }

.event-list__item:hover {
    background: #f8f8f7;
    margin: 0 -0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.event-list__date {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--color-accent, var(--color-primary));
    white-space: nowrap;
    min-width: 4.5rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.45;
}

.event-list__detail strong {
    display: block;
    font-size: 0.8125rem;
    line-height: 1.4;
    font-weight: 700;
    color: #1a1a1a;
}

.event-list__location {
    font-size: 0.6875rem;
    color: #636363;
    line-height: 1.4;
}


/* --- Event Grid (full page) --- */

.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0;
}

.event-card {
    background: #fff;
    border-radius: 0;
    padding: 1rem 1.25rem;
    box-shadow: none;
    border-bottom: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    transition: background 0.15s ease;
    animation: subtleSlideIn 0.4s ease both;
}

.event-card:hover {
    transform: none;
    background: #fafaf9;
    box-shadow: none;
}

.event-card__date {
    font-size: 0.625rem;
    font-weight: 700;
    color: var(--color-accent, var(--color-primary));
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1.4;
}

.event-card__title {
    font-family: var(--font-heading, Georgia, serif);
    font-size: 1rem;
    margin: 0.2rem 0 0.4rem;
    color: #111;
    letter-spacing: -0.01em;
    line-height: 1.3;
    font-weight: 700;
}

.event-card__desc {
    font-size: 0.8125rem;
    color: #555;
    margin-bottom: 0.4rem;
    line-height: 1.45;
}

.event-card__location {
    font-size: 0.75rem;
    color: #636363;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.event-card__location::before {
    content: "";
    width: 3px;
    height: 3px;
    background: #aaa;
    border-radius: 50%;
    flex-shrink: 0;
}

.event-card__time {
    font-size: 0.75rem;
    color: #636363;
    line-height: 1.4;
}


/* --- Weather Panel --- */

.weather-detail__current {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 0;
    padding: 1.25rem;
    border-bottom: none;
    background: linear-gradient(135deg, #0077b6, #00b4d8, #48cae4);
    border-radius: 8px;
    color: #fff;
    margin-bottom: 1rem;
}

.weather-detail__temp {
    font-family: var(--font-heading, Georgia, serif);
    font-size: 3.25rem;
    font-weight: 200;
    color: #fff;
    line-height: 1;
    letter-spacing: -0.04em;
}

.weather-detail__desc {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    line-height: 1.4;
}

.weather-detail__stats {
    display: flex;
    gap: 1.25rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
    font-weight: 500;
    padding: 0 1.25rem 0;
    margin-top: -0.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #0077b6, #00b4d8);
    border-radius: 0 0 8px 8px;
    padding: 0.5rem 1.25rem 0.75rem;
    margin-top: -1rem;
}

.weather-detail__stats span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: rgba(255, 255, 255, 0.85);
}


/* --- Forecast Strip --- */

.forecast-strip {
    display: flex;
    gap: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #f0f7fa;
    border: 1px solid #d0e4ec;
}

.forecast-day {
    flex: 1;
    text-align: center;
    padding: 0.75rem 0.4rem;
    border-right: 1px solid #d0e4ec;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    transition: background 0.15s ease;
    position: relative;
}

.forecast-day:last-child { border-right: none; }

.forecast-day:hover {
    background: #e4f0f5;
}

.forecast-day__name {
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #0077b6;
    line-height: 1.4;
}

.forecast-day__high {
    font-size: 1.125rem;
    font-weight: 800;
    color: #111;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.forecast-day__low {
    font-size: 0.75rem;
    color: #696969;
    font-weight: 500;
    line-height: 1.3;
}

.forecast-day__desc {
    font-size: 0.625rem;
    color: #636363;
    line-height: 1.3;
    font-style: italic;
}


/* --- Tides Panel --- */

.tide-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: linear-gradient(135deg, #1b4965, #277da1);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: #fff;
}

.tide-entry {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    transition: background 0.15s ease;
}

.tide-entry:last-child { border-bottom: none; }

.tide-entry:hover {
    background: rgba(255, 255, 255, 0.06);
    margin: 0 -0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    border-radius: 4px;
}

.tide-entry__type {
    font-size: 0.5625rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    min-width: 3rem;
    text-align: center;
    line-height: 1.5;
}

.tide-entry__type--high {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.tide-entry__type--low {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
}

.tide-entry__time {
    font-weight: 700;
    font-size: 0.8125rem;
    line-height: 1.4;
    font-variant-numeric: tabular-nums;
    color: #fff;
}

.tide-entry__height {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    font-variant-numeric: tabular-nums;
}


/* --- News --- */

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

.news-card {
    background: #fff;
    border-radius: 0;
    padding: 1rem 1.25rem;
    box-shadow: none;
    border-bottom: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    transition: background 0.15s ease;
    animation: subtleSlideIn 0.4s ease both;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: none;
    background: #fafaf9;
    box-shadow: none;
}

/* --- News Scope Tabs --- */

.scope-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    padding: 0;
    background: none;
    border-radius: 0;
    border-bottom: 2px solid #e0e0e0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.scope-tabs::-webkit-scrollbar { display: none; }

.scope-tab {
    background: none;
    border: none;
    font-family: var(--font-body, sans-serif);
    font-size: 0.8125rem;
    font-weight: 600;
    color: #696969;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: color 0.15s ease, border-color 0.15s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border-radius: 0;
    line-height: 1.4;
    min-height: 2.75rem;
}

.scope-tab:hover {
    color: #1a1a1a;
    background: none;
}

.scope-tab--active {
    color: #111;
    background: none;
    box-shadow: none;
    border-bottom: 2px solid #111;
    font-weight: 700;
}

.scope-tab--active:hover {
    background: none;
}

.scope-tab__count {
    font-size: 0.625rem;
    background: #eee;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-weight: 700;
    line-height: 1.4;
    font-variant-numeric: tabular-nums;
    color: #555;
}

.scope-tab--active .scope-tab__count {
    background: #111;
    color: #fff;
}

.scope-panel { display: none; }
.scope-panel--active {
    display: block;
    animation: fadeIn 0.25s ease;
}


.news-card__meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.news-card__date {
    font-size: 0.625rem;
    color: #696969;
    line-height: 1.4;
    font-variant-numeric: tabular-nums;
}

.news-card__source-name {
    font-size: 0.5625rem;
    font-weight: 700;
    color: #636363;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: #f0f0f0;
    padding: 0.1rem 0.375rem;
    border-radius: 2px;
    line-height: 1.4;
}

.news-card__title {
    font-family: var(--font-heading, Georgia, "Times New Roman", serif);
    font-size: 1.0625rem;
    color: #111;
    line-height: 1.25;
    margin-bottom: 0.4rem;
    letter-spacing: -0.02em;
    font-weight: 700;
}

.news-card__summary {
    font-size: 0.8125rem;
    color: #444;
    line-height: 1.45;
    flex: 1;
}

.news-card__source {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.75rem;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--color-primary);
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: gap 0.2s ease;
}

.news-card__source::after {
    content: "\2192";
    font-size: 0.8125rem;
    transition: transform 0.2s ease;
}

.news-card__source:hover {
    text-decoration: none;
}

.news-card__source:hover::after {
    transform: translateX(3px);
}

/* --- News Page (dedicated /news layout) --- */

.news-page .section__heading {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.news-scope-section {
    margin-bottom: 2rem;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 1rem;
}

.news-scope-section:last-child {
    border-bottom: none;
}

.news-scope-section__heading {
    font-family: var(--font-heading, Georgia, "Times New Roman", serif);
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-primary, #1a5276);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.news-article {
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.news-article:last-child {
    border-bottom: none;
}

.news-article--lead {
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 0.25rem;
}

.news-article--lead .news-article__title {
    font-size: 1.375rem;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.news-article--lead .news-article__summary {
    font-size: 0.9375rem;
    line-height: 1.5;
    color: #333;
}

.news-article--lead .news-article__image {
    margin-bottom: 0.75rem;
    border-radius: 4px;
    overflow: hidden;
    max-height: 320px;
}

.news-article--lead .news-article__image img {
    width: 100%;
    height: 100%;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* Lead article: side-by-side on desktop */
@media (min-width: 769px) {
    .news-article--lead {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        align-items: start;
    }

    .news-article--lead .news-article__image {
        margin-bottom: 0;
        max-height: 260px;
    }

    .news-article--lead .news-article__title {
        font-size: 1.5rem;
    }

    /* Non-lead articles: 2-column grid on desktop */
    .news-scope-section__articles {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0 2rem;
    }
}

.news-article__body {
    display: flex;
    flex-direction: column;
}

.news-article__meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}

.news-article__source {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--color-primary, #1a5276);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.4;
}

.news-article__date {
    font-size: 0.75rem;
    color: #767676;
    line-height: 1.4;
}

.news-article__meta .news-article__source + .news-article__date::before {
    content: "\00b7";
    margin-right: 0.5rem;
    color: #aaa;
}

.news-article__title {
    font-family: var(--font-heading, Georgia, "Times New Roman", serif);
    font-size: 1.0625rem;
    color: #111;
    line-height: 1.25;
    margin-bottom: 0.3rem;
    letter-spacing: -0.02em;
    font-weight: 700;
}

.news-article__title a {
    color: inherit;
    text-decoration: none;
}

.news-article__title a:hover {
    color: var(--color-primary, #1a5276);
}

.news-article__summary {
    font-size: 0.875rem;
    color: #444;
    line-height: 1.5;
    margin-bottom: 0.25rem;
}

.news-article__link {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-primary, #1a5276);
    text-decoration: none;
    padding: 0.25rem 0;
    margin-top: 0.25rem;
    min-height: 44px;
    line-height: 44px;
}

.news-article__link:hover {
    text-decoration: underline;
}

/* News article with thumbnail (non-lead, articles 2-4) */
.news-article--with-thumb {
    display: grid;
    grid-template-columns: 1fr 100px;
    gap: 0.75rem;
    align-items: start;
}

.news-article__thumb {
    border-radius: 4px;
    overflow: hidden;
    order: 1;
}

.news-article__thumb img {
    width: 100%;
    display: block;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

/* "View all N stories" link (All view) */
.news-scope-section__more {
    display: inline-block;
    font-family: var(--font-body, sans-serif);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-primary, #1a5276);
    padding: 0.75rem 0;
    text-decoration: none;
    transition: color 0.15s ease;
}

.news-scope-section__more:hover {
    color: #111;
    text-decoration: underline;
}

/* "Show more" button (scope view) */
.news-load-more {
    display: block;
    width: 100%;
    padding: 0.875rem 1rem;
    margin: 0.5rem 0 0;
    font-family: var(--font-body, sans-serif);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-primary, #1a5276);
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s ease, border-color 0.15s ease;
    min-height: 48px;
}

.news-load-more:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

.news-load-more__count {
    font-weight: 400;
    color: #696969;
    font-size: 0.8125rem;
}

/* --- Business Directory --- */

/* Directory page header */
.dir-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dir-header__title {
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    color: var(--color-text, #111);
}

.dir-header__count {
    color: var(--color-muted, #7f8c8d);
    font-size: 0.9rem;
    margin: 0;
}

.dir-header__cta {
    display: inline-block;
    background-color: var(--color-primary, #1a5276);
    color: #fff;
    padding: 0.65rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: opacity 0.2s;
}

.dir-header__cta:hover {
    opacity: 0.85;
}

/* Category filter bar */
.dir-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    align-items: center;
}

.dir-filters__pill {
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    background-color: rgba(0,0,0,0.05);
    color: var(--color-text, #111);
    white-space: nowrap;
}

.dir-filters__pill--active {
    background-color: var(--color-primary, #1a5276);
    color: #fff;
}

.dir-filters__sep {
    width: 1px;
    height: 1.2rem;
    background-color: rgba(0,0,0,0.15);
    margin: 0 0.15rem;
}

/* Category section */
.dir-category {
    margin-bottom: 2.5rem;
}

.dir-category__heading {
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-primary, #1a5276);
    color: var(--color-primary, #1a5276);
}

.dir-category__count {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--color-muted, #7f8c8d);
    margin-left: 0.5rem;
}

/* Business card grid */
.biz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0;
}

.biz-card {
    background-color: #fff;
    border-radius: 0;
    padding: 1rem 1.25rem;
    box-shadow: none;
    border-bottom: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    transition: background 0.15s ease;
    animation: subtleSlideIn 0.4s ease both;
}

.biz-card:hover {
    transform: none;
    background-color: #fafaf9;
    box-shadow: none;
}

.biz-card__link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.biz-card__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.15rem;
}

.biz-card__name {
    font-family: var(--font-heading, Georgia, serif);
    font-size: 0.9375rem;
    color: #111;
    margin-bottom: 0;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.biz-card__category {
    display: inline-block;
    font-size: 0.5625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #636363;
    margin-bottom: 0.5rem;
    background-color: #f0f0f0;
    padding: 0.1rem 0.375rem;
    border-radius: 2px;
    line-height: 1.4;
}

.biz-card__address,
.biz-card__phone,
.biz-card__hours {
    font-size: 0.75rem;
    color: #555;
    margin-top: 0.2rem;
    line-height: 1.45;
}

.biz-card__desc {
    font-size: 0.85rem;
    color: var(--color-muted, #7f8c8d);
    margin-top: 0.5rem;
    line-height: 1.4;
}

/* Open/closed status badges */
.biz-status {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    line-height: 1.4;
    white-space: nowrap;
}
.biz-status--open {
    background-color: #e8f5e9;
    color: #2e7d32;
}
.biz-status--closed {
    background-color: #fce4ec;
    color: #c62828;
}
.biz-status__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.biz-status--open .biz-status__dot {
    background-color: #2e7d32;
}
.biz-status--closed .biz-status__dot {
    background-color: #c62828;
}
.biz-status__detail {
    font-weight: 400;
    font-size: 0.625rem;
    color: #636363;
    margin-left: 0.15rem;
}

/* Open Now filter toggle */
.dir-filter-open {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: 2px solid #2e7d32;
    white-space: nowrap;
}
.dir-filter-open--inactive {
    background-color: transparent;
    color: #2e7d32;
}
.dir-filter-open--active {
    background-color: #2e7d32;
    color: #fff;
}

.dir-filter-open__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    background-color: #2e7d32;
}

.dir-filter-open__dot--active {
    background-color: #fff;
}

/* Detail page status */
.biz-detail-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    margin-top: 0.5rem;
}
.biz-detail-status--open {
    background-color: #e8f5e9;
    color: #2e7d32;
}
.biz-detail-status--closed {
    background-color: #fce4ec;
    color: #c62828;
}
.biz-detail-status__text {
    font-weight: 400;
    font-size: 0.8rem;
}


/* --- Footer --- */

.site-footer {
    background: #111;
    color: rgba(255, 255, 255, 0.6);
    padding: 2.5rem 0 1.5rem;
    margin-top: 0;
    position: relative;
    border-top: 3px solid var(--season-accent, #111);
}

.site-footer::before {
    content: none;
}

.site-footer__grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 2rem;
}

.site-footer__brand {
    font-family: var(--font-heading, Georgia, serif);
    font-size: 1.125rem;
    color: #fff;
    margin-bottom: 0.4rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.site-footer__desc {
    font-size: 0.8125rem;
    max-width: 320px;
    line-height: 1.5;
}

.site-footer__links {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
}

.site-footer__links a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.35rem 0.6rem;
    border-radius: 0;
    transition: color 0.15s ease;
    line-height: 1.4;
    text-decoration: none;
}

.site-footer__links a:hover {
    color: #fff;
    text-decoration: none;
}

.site-footer__copy {
    font-size: 0.6875rem;
    opacity: 0.7;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.25rem;
    line-height: 1.4;
    letter-spacing: 0.02em;
}


/* --- Responsive: Tablet --- */

@media (max-width: 768px) {
    .grid--2col { grid-template-columns: 1fr; }

    .nav-toggle {
        display: flex;
        order: -1;  /* hamburger left of logo */
    }

    .site-header__logo {
        height: 20px;
    }

    /* Header stays one row — nav is an absolute overlay, not in flex flow */
    .site-header {
        position: relative;
    }

    .site-header .container {
        flex-wrap: nowrap;
        height: 44px;
        padding: 0 1rem;
        gap: 0;
        align-items: center;
    }

    .site-search {
        margin-left: auto;
        margin-right: 0;
        border-left: none;
        padding-left: 0;
    }

    .site-header__brand {
        border-right: none;
        padding-right: 0;
    }

    .site-search__panel {
        position: fixed;
        top: 45px;
        right: 0.75rem;
        left: 0.75rem;
        width: auto;
    }

    /* Nav drops down as absolute overlay — no flex reflow */
    .site-header__nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: #fff;
        border-top: none;
        border-bottom: 2px solid #111;
        box-shadow: 0 8px 24px rgba(0,0,0,0.12);
        z-index: 200;
        padding: 0.25rem 1rem;
    }

    .site-header__nav--open {
        display: flex;
    }

    .site-header__nav .nav-link {
        width: 100%;
        padding: 0.75rem 0;
        font-size: 0.9rem;
        min-height: 48px;
        display: flex;
        align-items: center;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        border-radius: 0;
    }

    .site-header__nav .nav-link::after {
        display: none; /* remove desktop underline indicator in mobile dropdown */
    }

    .site-header__nav .nav-link:last-child {
        border-bottom: none;
    }

    .hero {
        min-height: 30vh;
        max-height: 35vh;
    }

    .hero__welcome { font-size: 1.75rem; }
    .hero__temp { font-size: 1.75rem; }

    .hero__overlay {
        padding: 2.5rem 0 1.5rem;
    }

    .section {
        padding: 2rem 0;
    }

    .forecast-strip {
        flex-wrap: wrap;
        border-radius: 6px;
    }

    .forecast-day {
        min-width: calc(33.333% - 0.5rem);
        flex: unset;
    }

    .site-footer__grid {
        flex-direction: column;
        gap: 1.5rem;
    }

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

    .news-grid {
        grid-template-columns: 1fr 1fr;
    }

    .event-grid {
        grid-template-columns: 1fr;
    }

    .biz-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* Directory page mobile (768px) */
    .dir-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .dir-header__title {
        font-size: 1.25rem;
    }

    .dir-header__cta {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .dir-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin-bottom: 1.25rem;
        padding-bottom: 0.75rem;
        gap: 0.375rem;
    }

    .dir-filters::-webkit-scrollbar {
        display: none;
    }

    .dir-filters__pill {
        flex-shrink: 0;
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: 0.5rem 0.875rem;
        font-size: 0.875rem;
    }

    .dir-filter-open {
        flex-shrink: 0;
        min-height: 44px;
        padding: 0.5rem 0.875rem;
        font-size: 0.875rem;
    }

    .dir-filters__sep {
        flex-shrink: 0;
    }

    .dir-category {
        margin-bottom: 1.75rem;
    }

    .dir-category__heading {
        font-size: 1.0625rem;
    }
}

/* --- Responsive: Small Phone (390px) --- */

@media (max-width: 480px) {
    html {
        font-size: 15px;
    }

    .container {
        padding: 0 0.875rem;
    }

    .site-header {
        padding: 0.4rem 0;
    }

    .site-header__city {
        font-size: 1.125rem;
    }

    .hero {
        min-height: 25vh;
        max-height: 32vh;
    }

    .hero__overlay {
        padding: 2rem 0 1.25rem;
    }

    .hero__welcome {
        font-size: 1.5rem;
        line-height: 1.1;
    }

    .hero__weather {
        flex-direction: column;
        gap: 0.2rem;
    }

    .hero__temp {
        font-size: 1.5rem;
    }

    .section {
        padding: 1.5rem 0;
    }

    .section__heading {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .card {
        padding: 1rem;
    }

    .editorial-card {
        padding: 1rem;
    }

    .editorial-card__heading {
        font-size: 1.25rem;
    }

    .news-card {
        padding: 0.875rem 1rem;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .event-card {
        padding: 0.875rem 1rem;
    }

    .biz-card {
        padding: 0.875rem 1rem;
        border-right: none;
    }

    .biz-grid {
        grid-template-columns: 1fr;
    }

    /* Directory page — 480px font bumps & touch targets */
    .dir-header__title {
        font-size: 1.125rem;
    }

    .dir-header__count {
        font-size: 0.875rem;
    }

    .dir-category__heading {
        font-size: 1rem;
        margin-bottom: 0.75rem;
        padding-bottom: 0.375rem;
    }

    .dir-category__count {
        font-size: 0.8125rem;
    }

    .dir-category {
        margin-bottom: 1.25rem;
    }

    .biz-card__name {
        font-size: 1rem;
        line-height: 1.25;
    }

    .biz-card__category {
        font-size: 0.6875rem;
        padding: 0.15rem 0.4rem;
        margin-bottom: 0.35rem;
    }

    .biz-card__address,
    .biz-card__phone,
    .biz-card__hours {
        font-size: 0.875rem;
    }

    .biz-card__desc {
        font-size: 0.875rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .biz-status {
        font-size: 0.75rem;
        padding: 0.2rem 0.5rem;
    }

    .biz-status__detail {
        font-size: 0.75rem;
    }

    /* Search page — 480px mobile */
    .search-page {
        padding: 1rem 0.875rem 2rem;
    }

    .search-page__title {
        font-size: 1.125rem;
        margin-bottom: 1rem;
    }

    .search-page-form__btn {
        padding: 0.7rem 1rem;
    }

    .search-page-item__badge {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .search-page-item__title {
        font-size: 1rem;
    }

    .search-page-group {
        font-size: 0.875rem;
    }

    .scope-tabs {
        margin-bottom: 1rem;
    }

    .scope-tab {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
        min-height: 48px;
    }

    /* News page mobile */
    .news-page .section__heading {
        font-size: 1.25rem;
    }

    .news-scope-section__heading {
        font-size: 0.75rem;
    }

    .news-article {
        padding: 0.875rem 0;
    }

    .news-article__source {
        font-size: 0.75rem;
    }

    .news-article__date {
        font-size: 0.75rem;
    }

    .news-article__title {
        font-size: 1rem;
    }

    .news-article--lead .news-article__title {
        font-size: 1.1875rem;
    }

    .news-article__summary {
        font-size: 0.875rem;
        /* Hide summaries on non-lead articles to reduce scroll on mobile */
    }

    .news-article:not(.news-article--lead) .news-article__summary {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .news-article__link {
        font-size: 0.8125rem;
    }

    .news-article--with-thumb {
        grid-template-columns: 1fr 80px;
        gap: 0.5rem;
    }

    .news-scope-section__more {
        font-size: 0.875rem;
        padding: 0.625rem 0;
    }

    .news-load-more {
        font-size: 0.875rem;
        min-height: 48px;
    }

    .forecast-day {
        min-width: calc(33.333% - 0.25rem);
        padding: 0.5rem 0.2rem;
    }

    .weather-detail__temp {
        font-size: 2.5rem;
    }

    .site-footer {
        padding: 2rem 0 1.25rem;
    }

    .site-footer__grid {
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    .site-footer__links {
        gap: 0;
    }

    .site-footer__links a {
        padding: 0.4rem 0.5rem;
        min-height: 48px;
        display: flex;
        align-items: center;
    }
}

/* --- Dark Mode (System Preference) --- */

@media (prefers-color-scheme: dark) {
    :root {
        --color-bg: #121212;
        --color-surface: #1a1a1a;
        --color-text: #d4d4d4;
        --color-muted: #8b8b8b;
        color-scheme: dark;
    }

    body {
        background: #121212;
        color: #d4d4d4;
    }

    ::selection { background: var(--color-primary); color: #fff; }

    /* --- Header --- */
    .site-header { background: #1a1a1a; border-bottom-color: #2d2d2d; }
    .site-header__brand { border-right-color: #333; }
    .site-header__city { color: #e0e0e0; }
    .site-header__tagline { color: #8b8b8b; }
    .site-header__logo { filter: brightness(1.15); }
    .nav-link { color: #9a9a9a; }
    .nav-link:hover { color: #e0e0e0; }
    .nav-link--active { color: #e0e0e0; }
    .nav-link--primary { color: #b0b0b0; }
    .nav-link--emergency { color: #ef5350; }
    .nav-link--emergency:hover { color: #f44336; }
    .nav-toggle__bar { background: #d4d4d4; }
    .nav-toggle:hover { background: rgba(255,255,255,0.08); }

    /* --- Search --- */
    .site-search { border-left-color: #333; }
    .site-search__toggle { color: #9a9a9a; }
    .site-search__toggle:hover { background: rgba(255,255,255,0.08); }
    .site-search__panel { background: #1e1e1e; border-color: #333; box-shadow: 0 8px 32px rgba(0,0,0,0.6); }
    .site-search__form { border-bottom-color: #333; }
    .site-search__input { color: #e0e0e0; }
    .site-search__input::placeholder { color: #666; }
    .site-search__submit { color: #9a9a9a; }
    .site-search__submit:hover { background: rgba(255,255,255,0.08); }
    .search-results__count { color: #777; }
    .search-results__group-label { border-top-color: #333; }
    .search-result { color: #e0e0e0; }
    .search-result:hover { background: #252525; }
    .search-result__type { background: #252525; color: #9a9a9a; }
    .search-result__type--news { background: #1a2740; color: #5fa0d6; }
    .search-result__type--event { background: #1a3320; color: #66bb6a; }
    .search-result__type--business { background: #332211; color: #ffab40; }
    .search-result__type--civic { background: #2a1a33; color: #ce93d8; }
    .search-result__title { color: #e0e0e0; }
    .search-result__date { color: #777; }

    /* --- Sections --- */
    .section { border-bottom-color: #2d2d2d; }
    .section--alt { background: #161616; }
    .section__heading { color: #e0e0e0; border-bottom-color: #e0e0e0; }
    .section__empty { color: #8b8b8b; }

    /* --- Cards --- */
    .card { background: #1a1a1a; border-color: #2d2d2d; }
    .card:hover { border-color: #444; }
    .card__heading { color: #e0e0e0; border-bottom-color: #2d2d2d; }
    .card__empty { color: #8b8b8b; }

    /* --- Editorial Card --- */
    .editorial-card { background: #1a1a1a; border-left-color: #e0e0e0; border-top-color: #2d2d2d; border-right-color: #2d2d2d; border-bottom-color: #2d2d2d; }
    .editorial-card:hover { border-left-color: var(--color-primary); }
    .editorial-card__heading { color: #e0e0e0; }
    .editorial-card__date { color: #8b8b8b; }
    .editorial-card__body { color: #c8c8c8; }

    /* --- Event Cards --- */
    .event-card { background: #1a1a1a; border-bottom-color: #2d2d2d; border-right-color: #2d2d2d; }
    .event-card:hover { background: #222; }
    .event-card__title { color: #e0e0e0; }
    .event-card__desc { color: #9a9a9a; }
    .event-card__location { color: #8b8b8b; }
    .event-card__location::before { background: #666; }
    .event-card__time { color: #8b8b8b; }

    /* --- Event List (sidebar) --- */
    .event-list__item { border-bottom-color: #2d2d2d; }
    .event-list__item:hover { background: #222; }
    .event-list__detail strong { color: #e0e0e0; }
    .event-list__location { color: #8b8b8b; }

    /* --- Forecast Strip (weather page) --- */
    .forecast-strip { background: #1a2535; border-color: #2a3a4d; }
    .forecast-day { border-right-color: #2a3a4d; }
    .forecast-day:hover { background: #1e2d42; }
    .forecast-day__name { color: #5fa0d6; }
    .forecast-day__high { color: #e0e0e0; }
    .forecast-day__low { color: #8b8b8b; }
    .forecast-day__desc { color: #8b8b8b; }

    /* --- News Page --- */
    .news-scope-section { border-bottom-color: #2d2d2d; }
    .news-scope-section__heading { border-bottom-color: #2d2d2d; }
    .news-article { border-bottom-color: #222; }
    .news-article--lead { border-bottom-color: #2d2d2d; }
    .news-article--lead .news-article__summary { color: #b0b0b0; }
    .news-article--lead .news-article__image { background: #222; }
    .news-article__title { color: #e0e0e0; }
    .news-article__date { color: #8b8b8b; }

    /* --- Search Page --- */
    .search-page-item { border-bottom-color: #2d2d2d; }
    .search-page-item:hover { background: #1a1a1a; }
    .search-page-item__badge--news { background: #1a2740; color: #5fa0d6; }
    .search-page-item__badge--event { background: #1a3320; color: #66bb6a; }
    .search-page-item__badge--business { background: #332211; color: #ffab40; }
    .search-page-item__badge--civic { background: #2a1a33; color: #ce93d8; }
    .search-page-item__title { color: #e0e0e0; }
    .search-page-item__summary { color: #8b8b8b; }

    /* --- News Card (homepage) --- */
    .news-card__title { color: #e0e0e0; }
    .news-card__summary { color: #9a9a9a; }
    .news-card__scope { background: #252525; color: #8b8b8b; }

    /* --- Directory --- */
    .dir-filters { border-bottom-color: rgba(255,255,255,0.08); }
    .dir-filters__pill { background-color: rgba(255,255,255,0.08); }
    .dir-filters__sep { background-color: rgba(255,255,255,0.12); }
    .biz-card { background-color: #1a1a1a; border-bottom-color: #2d2d2d; border-right-color: #2d2d2d; }
    .biz-card:hover { background-color: #222; }
    .biz-card__name { color: #e0e0e0; }
    .biz-card__category { color: #8b8b8b; background-color: #252525; }
    .biz-card__address, .biz-card__phone, .biz-card__hours { color: #9a9a9a; }
    .biz-status--open { background-color: #1a3320; color: #66bb6a; }
    .biz-status--closed { background-color: #331a1a; color: #ef5350; }
    .biz-detail-status--open { background: #1a3320; color: #66bb6a; }
    .biz-detail-status--closed { background: #331a1a; color: #ef5350; }

    /* --- Footer (already dark — minor tweaks) --- */
    .site-footer { background: #0a0a0a; }

    /* --- Forms --- */
    input, textarea, select {
        background-color: #1e1e1e;
        color: #e0e0e0;
        border-color: #444;
    }
    input::placeholder, textarea::placeholder { color: #666; }

    /* --- Mobile Nav Dropdown --- */
    @media (max-width: 768px) {
        .site-header__nav { background: #1a1a1a; border-bottom-color: #d4d4d4; box-shadow: 0 8px 24px rgba(0,0,0,0.5); }
        .site-header__nav .nav-link { border-bottom-color: rgba(255,255,255,0.06); }
    }
}


/* --- Reduced Motion --- */

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

    .hero::before {
        animation: none;
    }
}

/* --- Print --- */

@media print {
    .site-header,
    .site-footer,
    .alert-bar,
    .scope-tabs,
    .site-search {
        display: none;
    }

    .hero {
        min-height: auto;
        max-height: auto;
        background: none !important;
    }

    .hero__overlay {
        background: none;
        padding: 1rem 0;
    }

    .hero__welcome {
        color: #000;
        text-shadow: none;
    }

    .card,
    .news-card,
    .event-card,
    .biz-card,
    .editorial-card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }

    body {
        background: #fff;
        color: #000;
    }
}
