/* ============================================================
   FORECAST CENTER PAGE
   Extracted from known-good harper.css during modular migration.
   Do not merge page-specific rules back into harper-core.css.
   ============================================================ */

/* ============================================================
   FORECAST CENTER — CORE LAYOUT
   ============================================================ */

.forecast-center-intro,
.geek-page-intro {
    margin: 0 0 22px 0;
    padding: 12px 15px;
    background: #f5f7f9;
    border: 1px solid #d9dee3;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.forecast-center-heading {
    margin-top: 28px;
    margin-left: 16px;
}

.forecast-center-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
    gap: 14px;
    margin-left: 16px;
    margin-right: 16px;
}

/* ------------------------------------------------------------
   AREA FORECAST DISCUSSION
   ------------------------------------------------------------ */

.afd-card {
    margin-top: 16px;
    border: 1px solid #d9dee3;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
}

.afd-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 18px;
    background: #f5f7f9;
    border-bottom: 1px solid #d9dee3;
}

.afd-issued {
    font-size: 0.9rem;
    color: #555555;
    text-align: right;
}

.afd-text {
    margin: 0;
    padding: 16px 18px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: normal;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
                 "Liberation Mono", monospace;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.45;
    color: #17212b;
    background: #ffffff;
    overflow-x: auto;
}

/* ------------------------------------------------------------
   NATIONAL FORECAST CHARTS
   ------------------------------------------------------------ */

.national-chart-card {
    margin-top: 16px;
    padding: 14px;
    border: 1px solid #d9dee3;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.national-chart-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.national-chart-button {
    padding: 9px 18px;
    border: 1px solid #aab2bb;
    border-radius: 6px;
    background: #f5f7f9;
    cursor: pointer;
    font: inherit;
}

.national-chart-button:hover { background: #e9edf1; }
.national-chart-button.active { font-weight: bold; background: #dfe7ee; }
.national-chart-display { text-align: center; }

.national-chart-image {
    display: none;
    width: 100%;
    max-width: 1000px;
    height: auto;
    margin: 0 auto;
}

.national-chart-image.active { display: block; }

@media (max-width: 700px) {
    .forecast-center-grid { grid-template-columns: 1fr; }
    .afd-header { flex-direction: column; gap: 5px; }
    .afd-issued { text-align: left; }
    .afd-text { padding: 14px; font-size: 0.82rem; }
    .national-chart-card { padding: 12px; }
}

/* ============================================================
   FORECAST CENTER — LONG-RANGE OUTLOOK TEASER
   ============================================================ */

.forecast-outlook-teaser {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;

    margin: 14px 16px 18px;
    padding: 13px 16px;

    background: #eef5f9;
    border: 1px solid #c9d9e4;
    border-left: 5px solid #367da9;
    border-radius: 10px;

    color: inherit;
    text-decoration: none;
}

.forecast-outlook-teaser:hover {
    background: #e7f1f7;
    border-color: #aac8da;
}

.forecast-outlook-icon {
    width: 48px;
    height: 48px;
}

.forecast-outlook-icon svg {
    display: block;
    width: 48px;
    height: 48px;
}

.outlook-icon-bg {
    fill: #dcecf5;
}

.outlook-icon-sun {
    fill: #d79a43;
}

.outlook-icon-rays {
    fill: none;
    stroke: #d79a43;
    stroke-width: 2.3;
    stroke-linecap: round;
}

.outlook-icon-cloud {
    fill: #4f8db4;
}

.forecast-outlook-copy {
    min-width: 0;
}

.forecast-outlook-kicker {
    color: #60798a;
    font-size: 0.67rem;
    font-weight: 900;
    letter-spacing: 0.06em;
}

.forecast-outlook-title {
    color: var(--blue-dark);
    font-size: 1.04rem;
    font-weight: 900;
}

.forecast-outlook-question {
    margin-top: 2px;
    color: #415f72;
    font-size: 0.84rem;
    font-weight: 700;
}

.forecast-outlook-status {
    margin-top: 4px;
    color: #667b89;
    font-size: 0.74rem;
    font-weight: 700;
}

.forecast-outlook-arrow {
    color: #246b98;
    font-size: 1.7rem;
    font-weight: 900;
}

@media (max-width: 620px) {
    .forecast-outlook-teaser {
        grid-template-columns: auto minmax(0, 1fr);
        margin-left: 10px;
        margin-right: 10px;
    }

    .forecast-outlook-arrow {
        display: none;
    }
}


/* Forecast outlook teaser — desktop arrow placement */
@media (min-width: 621px) {
    .forecast-outlook-teaser {
        grid-template-columns: auto max-content auto 1fr;
        column-gap: 14px;
    }

    .forecast-outlook-arrow {
        justify-self: start;
        margin-left: 4px;
        font-size: 4rem;
        line-height: 0.8;
        font-weight: 900;
    }
}

/* ============================================================
   FORECAST CENTER — SHARED TEXT / SOURCE UTILITIES
   ============================================================ */

.section-heading { margin-bottom: 13px; }
.section-heading h2 {
    margin: 0;
    color: var(--blue-dark);
    font-size: 1.15rem;
}
.section-subtitle {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.82rem;
}
.forecast-source {
    margin-top: 16px;
    color: var(--muted);
    font-size: 0.74rem;
}
.forecast-jump-links {
    margin-top: 16px;
    font-size: 0.92rem;
}
.forecast-jump-links a {
    font-weight: 700;
    text-decoration: none;
}
.forecast-jump-links a:hover { text-decoration: underline; }
.forecast-update-separator {
    padding: 0 0.16em;
    color: var(--muted, #667788);
}

/* ==========================================================
   HARPER FORECAST CENTER — CANONICAL CARD RULES
   ========================================================== */

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

.forecast-center-card {
    position: relative !important;

    display: flex !important;
    flex-direction: column !important;

    min-width: 0 !important;

    padding: 11px !important;

    background: #f3f8fb !important;

    border:
        1px solid rgba(80, 115, 140, 0.18) !important;

    border-top:
        4px solid #67acd5 !important;

    border-radius: 12px !important;

    box-shadow:
        0 2px 7px rgba(20, 45, 65, 0.09) !important;

    overflow: hidden !important;

    font-size: 0.92rem;
    text-align: center;
}


/* ---------- Period ---------- */

.forecast-center-card .forecast-period {
    margin: 0 0 8px !important;

    color: #164f7c !important;

    font-size: 0.95rem !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;

    text-align: center !important;
    min-height: 1.3em;
}


/* ==========================================================
   IMAGES
   ========================================================== */

/*
 * Default NWS icon.
 *
 * If no approved Harper asset exists, this remains untouched.
 */

.forecast-center-card .forecast-icon {
    display: block;

    width: auto;
    height: auto;

    max-width: 86px;

    margin: 0 auto 8px;

    border-radius: 7px;
    visibility: hidden;
}

.forecast-center-card .forecast-icon.harper-scene-ready {
    visibility: visible;
}


/*
 * Harper scene.
 *
 * True 16:9.
 * No vertical crop.
 */

.forecast-center-card
img.harper-fc-scene-active {

    display: block !important;

    width: 100% !important;
    max-width: none !important;

    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;

    aspect-ratio: 16 / 9 !important;

    object-fit: contain !important;
    object-position: center center !important;

    margin: 0 0 8px !important;

    border-radius: 8px !important;

    box-shadow:
        0 2px 6px rgba(20, 45, 65, 0.14) !important;
}


/* ==========================================================
   CONDITION
   ========================================================== */

.forecast-center-card .forecast-condition {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;

    height: 2.40em !important;
    min-height: 2.40em !important;
    max-height: 2.40em !important;
    overflow: clip !important;
    contain: paint !important;

    margin: 0 3px 7px !important;

    color: #314b5e !important;

    font-size: 0.85rem !important;
    font-weight: 500 !important;
    line-height: 1.20 !important;

    text-align: center !important;
}


/* ==========================================================
   TEMPERATURE
   ========================================================== */

.forecast-center-card .forecast-temperature {
    margin: 3px 0 5px !important;

    color: #17547e !important;

    font-size: 1.43rem !important;
    font-weight: 600 !important;
    line-height: 1.1 !important;

    text-align: center !important;
}


/* ==========================================================
   WIND / PRECIP
   ========================================================== */

.forecast-center-card .forecast-wind,
.forecast-center-card .forecast-rain {
    margin: 1px 0 !important;

    color: #697e8d !important;

    font-size: 0.76rem !important;
    font-weight: 400 !important;
    line-height: 1.25 !important;

    text-align: center !important;
}


/* ==========================================================
   NATIVE FORECAST DETAILS
   ========================================================== */

.forecast-details {
    margin: 9px 0 0 !important;

    border-top:
        1px solid rgba(65, 100, 125, 0.20) !important;
}


/*
 * Native browser summary.
 *
 * No JS. No measuring. No duplicate teaser.
 */

.forecast-details > summary {
    position: relative;

    display: block;

    padding: 8px 20px 2px 2px;

    color: #176398;

    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.2;

    cursor: pointer;

    list-style: none;

    user-select: none;
}


.forecast-details > summary::-webkit-details-marker {
    display: none;
}


.forecast-details > summary::after {
    content: "▾";

    position: absolute;

    right: 2px;
    top: 7px;

    font-size: 0.78rem;
}


.forecast-details[open] > summary::after {
    content: "▴";
}


/*
 * Full official NWS forecast appears only when opened.
 */

.forecast-details .forecast-detail {
    display: block !important;

    margin: 7px 0 2px !important;
    padding: 8px 2px 2px !important;

    border-top:
        1px solid rgba(70, 105, 125, 0.13) !important;

    color: #3f5666 !important;

    font-size: 0.78rem !important;
    font-weight: 400 !important;
    line-height: 1.38 !important;

    text-align: left !important;

    white-space: normal !important;
    overflow: visible !important;

    max-height: none !important;
}


/* ==========================================================
   FORECAST CENTER - BOTTOM RESOURCE REDESIGN
   ========================================================== */

.forecast-resource-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 18px;

    margin: 24px 12px 20px;
}


.forecast-resource-card {
    min-width: 0;

    padding: 18px;

    background: #f3f8fb;

    border:
        1px solid rgba(80, 115, 140, 0.20);

    border-top:
        4px solid #67acd5;

    border-radius: 12px;

    box-shadow:
        0 2px 7px rgba(20, 45, 65, 0.09);
}


.forecast-resource-eyebrow {
    margin-bottom: 4px;

    color: #668092;

    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}


.forecast-resource-title {
    margin: 0 0 6px;

    color: #174f7a;

    font-size: 1.12rem;
    font-weight: 650;
    line-height: 1.2;
}


.forecast-resource-purpose {
    margin: 0 0 5px;

    color: #30495a;

    font-size: 0.91rem;
    font-weight: 600;
    line-height: 1.35;
}


.forecast-resource-description {
    margin: 0 0 12px;

    color: #647986;

    font-size: 0.80rem;
    font-weight: 400;
    line-height: 1.42;
}


.forecast-resource-preview {
    margin: 12px 0 14px;

    padding: 10px 12px;

    background:
        rgba(255, 255, 255, 0.62);

    border-left:
        3px solid rgba(103, 172, 213, 0.75);

    border-radius: 5px;

    color: #455c6a;

    font-size: 0.80rem;
    font-weight: 400;
    line-height: 1.48;
}


.forecast-resource-chart-thumb {
    display: block;

    box-sizing: border-box;

    width: 100%;
    height: 180px;

    margin: 8px 0 14px;
    padding: 8px;

    object-fit: contain;
    object-position: center;

    background: #e9f1f5;

    border:
        1px solid rgba(70, 105, 125, 0.22);

    border-radius: 8px;
}


.forecast-resource-details {
    margin-top: 10px;

    border-top:
        1px solid rgba(65, 100, 125, 0.20);
}


.forecast-resource-details > summary {
    position: relative;

    display: block;

    padding: 10px 24px 2px 0;

    color: #176398;

    font-size: 0.80rem;
    font-weight: 650;

    cursor: pointer;

    list-style: none;

    user-select: none;
}


.forecast-resource-details > summary::-webkit-details-marker {
    display: none;
}


.forecast-resource-details > summary::after {
    content: "▾";

    position: absolute;

    right: 2px;
    top: 9px;
}


.forecast-resource-details[open] > summary::after {
    content: "▴";
}


.forecast-resource-expanded {
    margin-top: 10px;

    padding-top: 12px;

    border-top:
        1px solid rgba(70, 105, 125, 0.13);
}


/* ----------------------------------------------------------
   AFD typography
   ---------------------------------------------------------- */

.forecast-resource-afd-source,
.forecast-resource-expanded pre,
.forecast-resource-expanded code {
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif !important;

    font-size: 0.82rem !important;
    font-weight: 400 !important;
    line-height: 1.52 !important;

    color: #334b5b !important;
}


.forecast-resource-expanded pre {
    white-space: pre-wrap !important;
    overflow-wrap: anywhere !important;

    margin: 0 !important;

    padding: 0 12px 6px !important;

    background: transparent !important;

    border: 0 !important;
}


/*
 * Preserve NWS section headings visually without turning the
 * entire discussion bold.
 */

.forecast-resource-expanded strong,
.forecast-resource-expanded b {
    font-weight: 650;
    color: #243f53;
}


/* Full chart should remain responsive when expanded. */

.forecast-resource-expanded img {
    max-width: 100%;
    height: auto;
}


@media (max-width: 760px) {

    .forecast-resource-grid {
        grid-template-columns: 1fr;
    }

    .forecast-resource-chart-thumb {
        height: auto;
        max-height: 240px;
    }

}

/* ==========================================================
   HARPER FORECAST CENTER - COMPACT HEADER
   ========================================================== */

.forecast-center-compact-header {
    box-sizing: border-box;

    margin: 8px 12px 12px !important;
    padding: 11px 14px 10px !important;

    background: #f3f8fb !important;

    border:
        1px solid rgba(80, 115, 140, 0.18) !important;

    border-radius: 9px !important;
}


/* ---------- concise description ---------- */

.forecast-center-compact-lead {
    margin: 0 0 3px;

    color: #3d5362;

    font-size: 0.84rem;
    font-weight: 400;
    line-height: 1.35;
}


/* ---------- Harper vs. issuing office ---------- */

.forecast-center-office-line {
    margin: 0 0 8px;

    color: #607684;

    font-size: 0.77rem;
    line-height: 1.30;
}


.forecast-center-office-line strong {
    color: #304b5e;
    font-weight: 650;
}


.forecast-center-office-line em {
    color: #607684;
    font-style: italic;
    font-weight: 400;
}


.forecast-center-office-dot {
    margin: 0 3px;
    color: #8ba0ad;
}


/* ---------- update/status row ---------- */

.forecast-center-status-row {
    display: flex !important;

    flex-wrap: wrap;

    align-items: center;

    gap: 5px 8px;

    margin: 0 0 8px !important;

    color: #677c8a !important;

    font-size: 0.73rem !important;
    font-weight: 500 !important;
    line-height: 1.25 !important;
}


.forecast-center-status-row
.forecast-update-separator {
    color: #9aabb6;
}


/* ---------- page navigation ---------- */

.forecast-center-subnav {
    display: flex;

    flex-wrap: wrap;

    gap: 6px;

    margin: 0 !important;
}


.forecast-center-nav-link {
    display: inline-block;

    padding: 5px 9px;

    color: #175f91 !important;

    background:
        rgba(103, 172, 213, 0.10);

    border:
        1px solid rgba(103, 172, 213, 0.23);

    border-radius: 6px;

    font-size: 0.75rem;
    font-weight: 600;

    line-height: 1.15;

    text-decoration: none !important;
}


.forecast-center-nav-link:hover {
    background:
        rgba(103, 172, 213, 0.18);
}


/* ==========================================================
   LONG-RANGE OUTLOOK - COMPACT VERSION
   ========================================================== */

.forecast-outlook-teaser.forecast-outlook-compact {
    box-sizing: border-box;

    min-height: 0 !important;

    margin:
        0 12px 16px !important;

    padding:
        8px 13px !important;

    border-radius:
        9px !important;

    align-items:
        center !important;
}


/* smaller icon */

.forecast-outlook-compact
.forecast-outlook-icon {
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
}


/* tighten copy */

.forecast-outlook-compact
.forecast-outlook-copy {
    padding: 0 !important;
}


.forecast-outlook-compact
.forecast-outlook-kicker {
    margin-bottom: 1px !important;

    font-size: 0.60rem !important;
    letter-spacing: 0.05em !important;
}


.forecast-outlook-compact
.forecast-outlook-title {
    margin: 0 !important;

    font-size: 0.92rem !important;
    line-height: 1.15 !important;
}


/*
 * This question duplicates the meaning of the title/status
 * and is the main source of unnecessary vertical height.
 */

.forecast-outlook-compact
.forecast-outlook-question {
    display: none !important;
}


.forecast-outlook-compact
.forecast-outlook-status {
    margin-top: 2px !important;

    font-size: 0.68rem !important;
    line-height: 1.20 !important;
}


/* smaller arrow */

.forecast-outlook-compact
.forecast-outlook-arrow {
    font-size: 1.25rem !important;
}


/* ==========================================================
   BRING 7-DAY FORECAST CLOSER TO HEADER
   ========================================================== */

#seven-day-forecast {
    scroll-margin-top: 12px;
}


.forecast-outlook-compact
+ .section-heading {
    margin-top: 8px !important;
}


/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 620px) {

    .forecast-center-compact-header {
        margin-left: 8px !important;
        margin-right: 8px !important;
    }

    .forecast-outlook-teaser.forecast-outlook-compact {
        margin-left: 8px !important;
        margin-right: 8px !important;
    }

    .forecast-center-status-row {
        display: block !important;
    }

    .forecast-center-status-row > span {
        display: block;
        margin: 2px 0;
    }

    .forecast-center-status-row
    .forecast-update-separator {
        display: none;
    }

}

/* Forecast Center lead sentence emphasis */
.forecast-center-compact-lead {
    font-weight: 700 !important;
}

/* ============================================================
   AFD DESKTOP FLYOUT V3 — 2026-11-10
   AFD FLYOUT TEXT REFLOW V4 — 2026-11-10

   Desktop >= 901px:
     The existing Forecast resources control remains visually
     unchanged. When "Read full discussion" is activated, JS
     intercepts that action and displays a clone of .afd-card
     in this wide reading panel.

   <= 900px:
     No interception; existing inline behavior remains intact.
   ============================================================ */

@media (min-width: 901px) {

    body.afd-flyout-open {
        overflow: hidden;
    }

    .afd-flyout-backdrop-v3 {
        position: fixed;
        inset: 0;

        z-index: 9000;

        background:
            rgba(18, 38, 52, .38);
    }

    .afd-flyout-panel-v3 {
        position: fixed;

        left: 50%;
        top: 64px;

        z-index: 9001;

        width:
            min(1120px, calc(100vw - 52px));

        max-height:
            calc(100vh - 104px);

        box-sizing: border-box;

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

        overscroll-behavior: contain;

        padding: 14px 18px 20px;

        transform:
            translateX(-50%);

        background: #f7fafc;

        border:
            1px solid rgba(46, 86, 113, .28);

        border-radius: 12px;

        box-shadow:
            0 18px 55px rgba(17, 38, 53, .32);
    }

    .afd-flyout-toolbar-v3 {
        position: sticky;
        top: -14px;

        z-index: 5;

        display: flex;
        align-items: center;
        justify-content: space-between;

        gap: 18px;

        margin:
            -14px -18px 12px;

        padding:
            12px 16px 10px;

        background:
            rgba(247,250,252,.97);

        border-bottom:
            1px solid rgba(46,86,113,.16);

        backdrop-filter:
            blur(4px);
    }

    .afd-flyout-title-v3 {
        color: #173f65;

        font-size: 1rem;
        font-weight: 850;
    }

    .afd-flyout-close-v3 {
        flex: 0 0 auto;

        padding: 7px 12px;

        border:
            1px solid rgba(31, 82, 119, .26);

        border-radius: 999px;

        background: #eef5f9;

        color: #174f7b;

        font: inherit;
        font-size: .78rem;
        font-weight: 800;

        cursor: pointer;
    }

    .afd-flyout-close-v3:hover {
        background: #e2eef5;
    }

    .afd-flyout-close-v3:focus-visible {
        outline:
            3px solid rgba(30,104,155,.30);

        outline-offset: 2px;
    }

    .afd-flyout-panel-v3 .afd-card {
        width: 100% !important;
        max-width: none !important;

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

        box-sizing: border-box !important;

        margin: 0 !important;

        overflow: visible !important;

        background: #ffffff !important;

        border:
            1px solid rgba(60,91,111,.18) !important;

        border-radius: 10px !important;

        box-shadow: none !important;
    }

    .afd-flyout-panel-v3 .afd-header {
        padding:
            12px 16px !important;
    }

    .afd-flyout-panel-v3 .afd-text {
        width: auto !important;
        max-width: 96ch !important;

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

        margin: 0 auto !important;

        padding:
            16px 20px 22px !important;

        overflow: visible !important;

        white-space: pre-wrap !important;

        overflow-wrap: normal !important;
        word-break: normal !important;

        font-family:
            system-ui,
            -apple-system,
            BlinkMacSystemFont,
            "Segoe UI",
            sans-serif !important;

        font-size: .90rem !important;
        font-weight: 400 !important;
        line-height: 1.55 !important;

        color: #2c4658 !important;
    }
}


@media (max-width: 900px) {

    .afd-flyout-backdrop-v3,
    .afd-flyout-panel-v3 {
        display: none !important;
    }
}

/* === END AFD DESKTOP FLYOUT V3 — 2026-11-10 === */

