/* ================================================================
   dashboard.css — Clean Light Theme
   Biosurveillance Monitoring Dashboard
   ================================================================ */

/* ── CSS Variables ──────────────────────────────────────────── */
:root {
    --bg-primary: #dce8f5;
    --bg-secondary: #c8daf0;
    --bg-card: #ffffff;
    --bg-card-hover: #f6f9fd;
    --bg-header: #ffffff;
    --border-color: #dae2ed;
    --border-light: #eaf0f7;
    --text-primary: #1a2332;
    --text-secondary: #5a6d82;
    --text-muted: #8b9db5;
    --accent-blue: #3568d4;
    --accent-cyan: #0596b4;
    --accent-green: #0d9e6c;
    --accent-red: #dc3838;
    --accent-orange: #e68a00;
    --accent-purple: #7248c4;
    --accent-teal: #0fa896;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-card-hover: 0 4px 14px rgba(53, 104, 212, 0.08), 0 0 1px rgba(0,0,0,0.04);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --font-mono: "SF Mono", "Fira Code", "JetBrains Mono", "Cascadia Code", monospace;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Microsoft YaHei", "Helvetica Neue", sans-serif;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
}

/* Scientific map views and government-report layout (v1.3) */
.risk-workspace {
    grid-template-columns: minmax(0, 2.75fr) minmax(320px, .75fr);
    gap: 16px;
    align-items: stretch;
}
.risk-map-header.risk-panel-header {
    min-height: 112px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px 20px;
    padding: 16px 20px 13px;
}
.risk-map-title { min-width: 0; }
.risk-map-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}
.risk-map-view-switch {
    display: inline-flex;
    height: 34px;
    padding: 2px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: #f5f7fa;
}
.risk-map-view-switch button {
    min-width: 76px;
    padding: 0 10px;
    color: var(--text-muted);
    border: 0;
    border-radius: 4px;
    background: transparent;
    font: 600 11px/1 var(--font-sans);
    cursor: pointer;
}
.risk-map-view-switch button:hover { color: var(--text-primary); }
.risk-map-view-switch button.active {
    color: #fff;
    background: #162d5a;
    box-shadow: 0 1px 2px rgba(22,45,90,.15);
}
.risk-map-action {
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 11px;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: #fff;
    font: 600 11px/1 var(--font-sans);
    cursor: pointer;
}
.risk-map-action:hover,
.risk-map-action[aria-pressed="true"] {
    color: #162d5a;
    border-color: #aab9cc;
    background: #f3f6fa;
}
.risk-map-action svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.risk-map-header .risk-map-meta {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 4px 14px;
    min-width: 0;
}
.risk-map-header .risk-resolution-meta {
    margin-left: auto;
    text-align: right;
}
.risk-science-strip {
    min-height: 65px;
    display: grid;
    grid-template-columns: 1.15fr repeat(4, .8fr) 1.15fr;
    align-items: stretch;
    padding: 0 12px;
    border-bottom: 1px solid var(--border-light);
    background: #fbfcfe;
}
.risk-science-strip > div {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 10px 12px;
    border-right: 1px solid var(--border-light);
}
.risk-science-strip > div:last-child { border-right: 0; }
.risk-science-strip span {
    color: var(--text-muted);
    font-size: 9px;
    line-height: 1.2;
}
.risk-science-strip strong {
    overflow: hidden;
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.risk-science-strip .risk-validation-state strong { color: #9a681f; }
.risk-map-stage { height: 640px; }
.risk-map-legend .legend-evidence {
    width: 34px;
    height: 8px;
    border-radius: 5px;
    background: linear-gradient(90deg, #edf2f7 0%, #97bddb 48%, #257f85 100%);
    box-shadow: inset 0 0 0 1px rgba(22,45,90,.09);
}
.risk-map-legend [hidden] { display: none !important; }
.risk-north-arrow {
    position: absolute;
    z-index: 3;
    top: 18px;
    right: 20px;
    width: 34px;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #1d334d;
    pointer-events: none;
}
.risk-north-arrow strong {
    font: 750 11px/1 var(--font-sans);
    letter-spacing: .12em;
}
.risk-north-arrow svg {
    width: 21px;
    height: 29px;
    margin-top: 2px;
    fill: #162d5a;
    stroke: #fff;
    stroke-width: .8;
}
.risk-priority-panel {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
}
.risk-priority-panel .risk-priority-list {
    height: 100%;
    display: grid;
    grid-template-rows: repeat(8, minmax(60px, 1fr));
}
.risk-priority-panel .risk-priority-row { min-height: 0; }
.risk-priority-panel .risk-priority-head,
.risk-priority-panel .risk-priority-row {
    grid-template-columns: minmax(118px, 1fr) 72px 46px;
    padding-left: 12px;
    padding-right: 12px;
}
.risk-workspace.is-report-mode { grid-template-columns: minmax(0, 1fr); }
.risk-workspace.is-report-mode .risk-priority-panel { display: none; }
.risk-workspace.is-report-mode .risk-map-stage {
    height: min(74vh, 780px);
    min-height: 660px;
}
.risk-workspace.is-report-mode .risk-map-header.risk-panel-header {
    grid-template-columns: minmax(0, 1fr) auto;
}

@media (max-width: 1320px) {
    .risk-workspace { grid-template-columns: minmax(0, 2.2fr) minmax(320px, .8fr); }
    .risk-map-toolbar { flex-wrap: wrap; }
    .risk-map-header.risk-panel-header { min-height: 124px; }
    .risk-science-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .risk-science-strip > div:nth-child(3) { border-right: 0; }
    .risk-science-strip > div:nth-child(-n+3) { border-bottom: 1px solid var(--border-light); }
    .risk-map-stage { height: 620px; }
}

@media (max-width: 980px) {
    .risk-workspace { grid-template-columns: 1fr; }
    .risk-map-header.risk-panel-header {
        grid-template-columns: 1fr;
        min-height: 0;
    }
    .risk-map-toolbar { justify-content: flex-start; }
    .risk-map-header .risk-map-meta { grid-column: 1; }
    .risk-map-header .risk-resolution-meta { margin-left: 0; text-align: left; }
    .risk-priority-panel { display: block; }
    .risk-priority-panel .risk-priority-list {
        height: auto;
        display: grid;
        grid-template-rows: none;
    }
    .risk-workspace.is-report-mode .risk-map-stage { min-height: 600px; }
}

@media (max-width: 680px) {
    .risk-map-header.risk-panel-header { gap: 10px; padding: 14px; }
    .risk-map-toolbar {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .risk-map-view-switch { grid-column: 1 / -1; width: 100%; }
    .risk-map-view-switch button { flex: 1; min-width: 0; padding: 0 5px; font-size: 10px; }
    .risk-map-action { width: 100%; padding: 0 8px; font-size: 10px; }
    .risk-map-header .risk-map-meta { gap: 3px 10px; }
    .risk-map-header .risk-direction-summary { display: inline; }
    .risk-science-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 0;
    }
    .risk-science-strip > div,
    .risk-science-strip > div:nth-child(3) {
        padding: 9px 12px;
        border-right: 1px solid var(--border-light);
        border-bottom: 1px solid var(--border-light);
    }
    .risk-science-strip > div:nth-child(even) { border-right: 0; }
    .risk-science-strip > div:nth-last-child(-n+2) { border-bottom: 0; }
    .risk-science-strip strong { font-size: 10px; }
    .risk-map-stage { height: 500px; }
    .risk-workspace.is-report-mode .risk-map-stage { min-height: 520px; height: 66vh; }
    .risk-north-arrow { top: 9px; right: 11px; transform: scale(.84); transform-origin: top right; }
    .risk-map-legend { max-width: 152px; }
}

/* Coordinate-only province trend and 2 km risk surface (v1.7). */
.risk-workspace {
    grid-template-columns: minmax(0, 1fr) 330px;
}
.risk-map-stage {
    height: 610px;
}
.risk-priority-panel .risk-priority-list {
    min-height: 542px;
}
.risk-coordinate-empty {
    display: grid;
    place-content: center;
    min-height: 542px;
    padding: 44px 30px;
    text-align: center;
}
.risk-coordinate-empty::before {
    content: "⌖";
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin: 0 auto 18px;
    color: #396b9d;
    border: 1px solid #bfd0e0;
    border-radius: 50%;
    background: #f4f8fc;
    font: 500 28px/1 Georgia, serif;
}
.risk-coordinate-empty strong {
    color: var(--text-primary);
    font-size: 15px;
}
.risk-coordinate-empty p {
    max-width: 250px;
    margin: 9px auto 18px;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.65;
}
.risk-coordinate-empty a {
    justify-self: center;
    padding: 8px 13px;
    color: #234f7f;
    border: 1px solid #b9cada;
    border-radius: 5px;
    background: #fff;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}
.risk-coordinate-empty a:hover {
    color: #173b66;
    border-color: #8ea8c0;
    background: #f7fafd;
}
.risk-coordinate-table-empty {
    height: 92px;
    color: var(--text-muted) !important;
    text-align: center;
}
.risk-map-canvas canvas {
    image-rendering: auto;
}
.risk-map-stage::after {
    content: none;
    position: absolute;
    right: 16px;
    top: 16px;
    z-index: 2;
    padding: 5px 8px;
    color: #788a9e;
    border: 1px solid #dbe3eb;
    border-radius: 4px;
    background: rgba(255,255,255,.92);
    font-size: 9px;
    pointer-events: none;
}
.risk-table-panel .risk-data-table {
    min-width: 1020px;
}

@media (max-width: 1180px) {
    .risk-workspace {
        grid-template-columns: minmax(0, 1fr) 310px;
    }
}

@media (max-width: 980px) {
    .risk-workspace {
        grid-template-columns: 1fr;
    }
    .risk-map-stage {
        height: 540px;
    }
    .risk-priority-panel .risk-priority-list {
        min-height: 0;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .risk-coordinate-empty {
        grid-column: 1 / -1;
        min-height: 220px;
    }
}

@media (max-width: 680px) {
    .risk-map-stage {
        height: 440px;
    }
    .risk-priority-panel .risk-priority-list {
        grid-template-columns: 1fr;
    }
    .risk-coordinate-empty {
        min-height: 205px;
        padding: 30px 22px;
    }
    .risk-map-stage::after {
        right: 8px;
        top: auto;
        bottom: 48px;
    }
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 14px; overflow-y: scroll; }
body {
    font-family: var(--font-sans);
    background-color: #f0f2f7;
    background-image: url("../data/hubei-bg.svg");
    background-repeat: no-repeat;
    background-position: center 280px;
    background-size: 50% auto;
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-blue); text-decoration: none; }

/* ── Header ─────────────────────────────────────────────────── */
.header {
    background: linear-gradient(180deg, #0c1f40 0%, #0a1f3f 100%);
    border-bottom: 2px solid #c9a84c;
    padding: 0 28px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 16px rgba(0,0,0,0.3), 0 1px 3px rgba(201,168,76,0.08);
}
.header-logo { display: flex; align-items: center; gap: 10px; }
.header-logo .logo-icon {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, #c9a84c, #e0c878);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; font-weight: 700; color: #0a1f3f;
}
.header-logo .logo-text {
    font-size: 16px; font-weight: 800; color: #ffffff; letter-spacing: 2px;
}
.header-logo .logo-sub {
    font-size: 10px; color: #8a9fc0;
    margin-left: 12px; padding-left: 12px; border-left: 1px solid #2a4570;
}
.header-nav { display: flex; gap: 2px; }
.header-nav a {
    display: block; padding: 7px 15px; border-radius: var(--radius-sm);
    color: #b8c8e0; font-size: 14px; font-weight: 600;
    transition: all var(--transition-fast); white-space: nowrap;
}
.header-nav a:hover { color: #ffffff; background: rgba(255,255,255,0.08); }
.header-nav a.active { color: #c9a84c; background: rgba(201,168,76,0.12); font-weight: 700; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-time { font-size: 12px; color: #8a9fc0; font-family: var(--font-mono); }
.refresh-btn {
    background: transparent; border: 1px solid #2a4570;
    color: #b8c8e0; padding: 6px 14px; border-radius: var(--radius-sm);
    cursor: pointer; font-size: 12px; transition: all var(--transition-fast);
    display: flex; align-items: center; gap: 5px; font-family: inherit;
}
.refresh-btn:hover { background: rgba(255,255,255,0.06); border-color: #4a6590; color: #fff; }
/* ── Date Filter Bar ────────────────────────────────────────── */
.date-filter-bar {
    background: #fff;
    border-bottom: 1px solid #e0e4ec;
    padding: 10px 28px;
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.date-filter-label { font-size: 14px; font-weight: 700; color: var(--text-secondary); white-space: nowrap; }
.date-input {
    height: 34px; padding: 0 10px;
    border: 1px solid var(--border-color); border-radius: var(--radius-sm);
    background: #fff; color: var(--text-primary); font-size: 14px;
    font-family: inherit; outline: none; transition: border-color var(--transition-fast);
}
.date-input:focus { border-color: var(--accent-blue); box-shadow: 0 0 0 3px rgba(79,110,246,0.08); }
.date-filter-sep { font-size: 13px; color: var(--text-muted); }
.date-apply-btn {
    height: 34px; padding: 0 16px;
    background: #162d5a; color: #fff; border: none;
    border-radius: var(--radius-sm); font-size: 13px; font-weight: 500;
    cursor: pointer; font-family: inherit; white-space: nowrap;
    transition: background var(--transition-fast);
}
.date-apply-btn:hover { background: #0f2348; }
.date-reset-btn {
    height: 34px; padding: 0 14px;
    background: #fff; color: var(--text-muted);
    border: 1px solid var(--border-color); border-radius: var(--radius-sm);
    font-size: 13px; cursor: pointer; font-family: inherit; white-space: nowrap;
    transition: all var(--transition-fast);
}
.date-reset-btn:hover { color: var(--text-primary); border-color: #c0c5d0; }
.date-filter-info { font-size: 12px; color: var(--text-muted); margin-left: auto; white-space: nowrap; }

/* ── Hero Banner ───────────────────────────────────────────── */
.hero-banner {
    background: linear-gradient(175deg, #060f24 0%, #0a1f3f 15%, #112852 35%, #162d5a 55%, #1a3368 75%, #0f2348 100%);
    border-bottom: 3px solid #c9a84c;
    padding: 56px 32px 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero-banner::before {
    content: "";
    position: absolute; inset: 0;
    background-image: url("../data/hubei-bg.svg");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 40% auto;
    opacity: 0.08;
    pointer-events: none;
}
/* gold decorative lines top */
.hero-banner::after {
    content: "";
    position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 120px; height: 3px;
    background: linear-gradient(90deg, transparent, #c9a84c, #e0c878, #c9a84c, transparent);
}
/* gold corner decorations */
.hero-corner-tl,
.hero-corner-tr,
.hero-corner-bl,
.hero-corner-br {
    position: absolute; width: 40px; height: 40px; opacity: 0.3;
    pointer-events: none;
}
.hero-corner-tl { top: 16px; left: 16px; border-top: 2px solid #c9a84c; border-left: 2px solid #c9a84c; }
.hero-corner-tr { top: 16px; right: 16px; border-top: 2px solid #c9a84c; border-right: 2px solid #c9a84c; }
.hero-corner-bl { bottom: 16px; left: 16px; border-bottom: 2px solid #c9a84c; border-left: 2px solid #c9a84c; }
.hero-corner-br { bottom: 16px; right: 16px; border-bottom: 2px solid #c9a84c; border-right: 2px solid #c9a84c; }

/* floating particles */
.hero-particle {
    position: absolute; border-radius: 50%; pointer-events: none;
    background: radial-gradient(circle, rgba(201,168,76,0.3) 0%, transparent 70%);
}
.hero-particle:nth-child(1) { width: 120px; height: 120px; top: 10%; left: 5%; animation: heroFloat 8s ease-in-out infinite; }
.hero-particle:nth-child(2) { width: 80px; height: 80px; top: 60%; right: 8%; animation: heroFloat 10s ease-in-out infinite 2s; }
.hero-particle:nth-child(3) { width: 60px; height: 60px; bottom: 20%; left: 15%; animation: heroFloat 7s ease-in-out infinite 1s; }
.hero-particle:nth-child(4) { width: 100px; height: 100px; top: 20%; right: 20%; animation: heroFloat 9s ease-in-out infinite 3s; }
@keyframes heroFloat {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.3; }
    50% { transform: translateY(-15px) scale(1.1); opacity: 0.5; }
}

.hero-title {
    font-size: 38px; font-weight: 900; color: #ffffff;
    letter-spacing: 8px; margin-bottom: 16px; position: relative;
    text-shadow: 0 2px 8px rgba(0,0,0,0.35);
    -webkit-text-stroke: 1.5px #c9a84c;
    paint-order: stroke fill;
    font-family: "STSong", "SimSun", "Noto Serif CJK SC", "Songti SC", var(--font-sans);
}
.hero-title::after {
    content: "";
    display: block;
    width: 60px; height: 2px;
    background: linear-gradient(90deg, transparent, #c9a84c, transparent);
    margin: 14px auto 0;
}
.hero-desc {
    font-size: 15px; color: #c8d6f0; max-width: 800px;
    margin: 0 auto; line-height: 2.0; position: relative;
    letter-spacing: 1.5px;
    font-weight: 500;
}
.hero-num {
    color: #c9a84c; font-weight: 800;
    font-family: "Georgia", "Times New Roman", var(--font-mono);
    font-size: 17px;
    letter-spacing: 1px;
}

/* ── Main Container ─────────────────────────────────────────── */
.main-container { max-width: 1440px; margin: 0 auto; padding: 20px 28px; }

/* ── Breadcrumb ─────────────────────────────────────────────── */
.breadcrumb {
    display: flex; align-items: center; gap: 8px;
    font-size: 14px; color: var(--text-muted); margin-bottom: 20px;
}
.breadcrumb a { color: var(--accent-blue); }
.breadcrumb .sep { color: var(--text-muted); }
.breadcrumb .current { color: var(--text-primary); font-weight: 600; }

/* ── Stat Cards ─────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}
.stat-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px 22px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
    cursor: default;
    display: block;
    color: inherit;
    text-decoration: none;
    box-shadow: var(--shadow-card);
}
.stat-card::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, #c9a84c, var(--card-accent, #4361ee));
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(53,104,212,0.1), 0 0 1px rgba(0,0,0,0.06);
    border-color: #c8d0e0;
}
.stat-card:active { transform: translateY(0); }
.stat-card .card-icon {
    width: 42px; height: 42px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; margin-bottom: 14px;
}
.stat-card .card-label {
    font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; font-weight: 600;
}
.stat-card .card-value {
    font-size: 32px; font-weight: 800; font-family: var(--font-mono);
    color: var(--text-primary); letter-spacing: -1px; line-height: 1.1;
}
.stat-card .card-unit {
    font-size: 13px; color: var(--text-muted); margin-left: 3px; font-weight: 500;
}
.stat-card .card-trend {
    display: inline-flex; align-items: center; gap: 4px;
    margin-top: 10px; font-size: 13px; font-weight: 600;
}
.stat-card .card-trend.up { color: var(--accent-red); }
.stat-card .card-trend.down { color: var(--accent-green); }
.stat-card .click-hint {
    position: absolute; right: 16px; bottom: 14px;
    font-size: 11px; color: var(--text-muted);
    opacity: 0; transform: translateX(-4px); transition: all var(--transition-normal);
}
.stat-card:hover .click-hint { opacity: 1; transform: translateX(0); }

/* ── Map Section ────────────────────────────────────────────── */
.map-section {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-card);
}
.map-section .section-header {
    display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px;
}
.map-section .section-title {
    font-size: 16px; font-weight: 700; color: var(--text-primary);
    display: flex; align-items: center; gap: 8px;
}
.map-section .section-title::before {
    content: ""; display: inline-block; width: 4px; height: 18px;
    background: linear-gradient(180deg, #c9a84c, #e0c878); border-radius: 2px;
}
.map-chart-container { width: 100%; height: 620px; }
.map-stats-row {
    display: flex; gap: 24px; margin-top: 16px; padding-top: 16px;
    border-top: 1px solid var(--border-color);
}
.map-stat-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); }
.map-stat-item .dot { width: 8px; height: 8px; border-radius: 50%; }
.map-stat-item strong { color: var(--text-primary); font-family: var(--font-mono); }

/* ── Table Sections ─────────────────────────────────────────── */
.table-section {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}
.table-section .section-header {
    display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px;
}
.table-section .section-title {
    font-size: 16px; font-weight: 700; color: var(--text-primary);
    display: flex; align-items: center; gap: 8px;
}
.table-section .section-title::before {
    content: ""; display: inline-block; width: 4px; height: 18px;
    background: linear-gradient(180deg, #c9a84c, #e0c878); border-radius: 2px;
}
.table-wrapper { overflow-x: auto; }

.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table thead th {
    background: linear-gradient(180deg, #f8f9fb, #f0f2f7);
    color: #1a2332; font-weight: 700;
    padding: 12px 16px; text-align: left; white-space: nowrap;
    border-bottom: 2px solid #c9a84c; font-size: 13px;
    letter-spacing: 0.5px;
}
.data-table tbody td {
    padding: 10px 16px; border-bottom: 1px solid var(--border-color);
    color: var(--text-primary); white-space: nowrap;
}
.data-table tbody tr { transition: background var(--transition-fast); }
.data-table tbody tr:nth-child(even) { background: #fafbfd; }
.data-table tbody tr:hover { background: #f0f4fa; }

.risk-badge {
    display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 600;
}
.risk-badge.low  { background: #ecfdf5; color: #059669; }
.risk-badge.mid  { background: #fffbeb; color: #d97706; }
.risk-badge.high { background: #fef2f2; color: #dc2626; }

/* ── Charts ─────────────────────────────────────────────────── */
.charts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 20px; }
.chart-panel {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
}
.chart-panel .chart-title {
    font-size: 15px; font-weight: 700; color: var(--text-primary);
    margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.chart-panel .chart-title::before {
    content: ""; display: inline-block; width: 4px; height: 16px;
    background: linear-gradient(180deg, #c9a84c, #e0c878); border-radius: 2px;
}
.chart-container { width: 100%; height: 350px; }

/* ── Detail Page ────────────────────────────────────────────── */
.detail-header {
    background: #fff; border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); padding: 24px; margin-bottom: 20px;
    box-shadow: var(--shadow-card); display: flex; align-items: center; gap: 16px;
}
.detail-header .detail-icon {
    width: 52px; height: 52px; border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center; font-size: 28px; flex-shrink: 0;
}
.detail-header .detail-title { font-size: 22px; font-weight: 800; color: var(--text-primary); }
.detail-header .detail-subtitle { font-size: 14px; color: var(--text-muted); margin-top: 4px; font-weight: 500; }
.detail-table-section {
    background: #fff; border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); padding: 24px; margin-bottom: 20px; box-shadow: var(--shadow-card);
}
.detail-table-section .section-title {
    font-size: 16px; font-weight: 700; margin-bottom: 16px;
    display: flex; align-items: center; gap: 8px;
}
.detail-table-section .section-title::before {
    content: ""; display: inline-block; width: 4px; height: 18px;
    background: linear-gradient(180deg, #c9a84c, #e0c878); border-radius: 2px;
}
.detail-chart-panel {
    background: #fff; border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-card);
    margin-bottom: 20px;
}
.detail-chart-panel .chart-title {
    font-size: 16px; font-weight: 700; margin-bottom: 16px;
    display: flex; align-items: center; gap: 8px;
}
.detail-chart-panel .chart-title::before {
    content: ""; display: inline-block; width: 4px; height: 18px;
    background: linear-gradient(180deg, #c9a84c, #e0c878); border-radius: 2px;
}

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
    background: #fff; border: 1px solid var(--border-color);
    border-top: 2px solid #c9a84c;
    border-radius: var(--radius-md); padding: 14px 24px;
    display: flex; align-items: center; justify-content: space-between;
    font-size: 13px; color: var(--text-muted); box-shadow: var(--shadow-card);
}
.footer .data-status { display: flex; align-items: center; gap: 8px; }
.footer .status-dot {
    width: 7px; height: 7px; border-radius: 50%; background: #0d9e6c;
    box-shadow: 0 0 6px rgba(201,168,76,0.5);
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
    0%,100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.4); }
    50% { box-shadow: 0 0 0 6px rgba(16,185,129,0); }
}

/* ── Loading ────────────────────────────────────────────────── */
.loading-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(240,242,245,0.7); z-index: 9999;
    align-items: center; justify-content: center;
}
.loading-overlay.active { display: flex; }
.loading-spinner {
    width: 40px; height: 40px;
    border: 3px solid var(--border-color); border-top-color: var(--accent-blue);
    border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ──────────────────────────────────────────────────── */
.toast {
    position: fixed; top: 72px; right: 28px;
    background: #fff; border: 1px solid var(--border-color);
    border-radius: var(--radius-md); padding: 12px 20px;
    font-size: 13px; color: var(--text-primary); z-index: 10000;
    opacity: 0; transform: translateY(-10px);
    transition: all var(--transition-normal); pointer-events: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { border-color: rgba(16,185,129,0.3); }
.toast.error { border-color: rgba(239,68,68,0.3); }

/* ── Form Styles ────────────────────────────────────────────── */
.form-panel {
    background: #fff; border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); padding: 32px; margin-bottom: 20px; box-shadow: var(--shadow-card);
}
.form-header { margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--border-color); }
.form-header h2 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.form-header p { font-size: 13px; color: var(--text-muted); }
.form-message { padding: 14px 20px; border-radius: var(--radius-md); margin-bottom: 20px; font-size: 14px; font-weight: 500; }
.form-msg-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #059669; }
.form-msg-error { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; }

/* ── Excel Batch Import ────────────────────────────────────── */
.batch-import-panel {
    background: #fff; border: 1px solid var(--border-color); border-radius: var(--radius-lg);
    margin-bottom: 20px; overflow: hidden; box-shadow: var(--shadow-card);
}
.batch-import-heading {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 28px;
    padding: 28px 32px 24px; border-bottom: 1px solid #dfe7ef;
    background: linear-gradient(115deg, #f8fbfd 0%, #eef5fa 100%);
}
.section-kicker {
    display: inline-block; margin-bottom: 7px; color: #9a6b13; font-size: 11px;
    font-weight: 700; letter-spacing: .08em;
}
.batch-import-heading > div { min-width: 0; }
.batch-import-heading h1 { margin: 0 0 8px; color: #12355b; font-size: 23px; line-height: 1.25; }
.batch-import-heading p { max-width: 760px; margin: 0; color: var(--text-muted); font-size: 13px; line-height: 1.7; }
.template-download-btn {
    flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 42px; padding: 0 18px; color: #fff; background: #12355b;
    border: 1px solid #12355b; border-radius: var(--radius-sm); text-decoration: none;
    font-size: 13px; font-weight: 700; transition: all var(--transition-fast);
}
.template-download-btn span { color: #e0bd5d; font-size: 18px; line-height: 1; }
.template-download-btn:hover { background: #0d2948; box-shadow: 0 4px 12px rgba(18,53,91,.18); transform: translateY(-1px); }
.batch-flow {
    display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center;
    gap: 14px; padding: 22px 32px 18px;
}
.batch-flow-step { display: flex; align-items: center; gap: 12px; min-width: 0; }
.batch-step-number {
    flex: none; display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center;
    color: #12355b; background: #f8e7ac; border: 1px solid #dfbd59; border-radius: 50%;
    font-size: 13px; font-weight: 800;
}
.batch-flow-step div { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.batch-flow-step strong { color: var(--text-primary); font-size: 13px; }
.batch-flow-step small { overflow: hidden; color: var(--text-muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.batch-flow-arrow { color: #9bb0c3; font-size: 18px; }
.batch-upload-form { margin: 0 32px 28px; }
.file-drop-zone {
    display: flex; align-items: center; gap: 14px; padding: 18px 20px;
    border: 1.5px dashed #9bb0c3; border-radius: var(--radius-md); background: #fbfcfd;
    cursor: pointer; transition: border-color var(--transition-fast), background var(--transition-fast);
}
.file-drop-zone:hover, .file-drop-zone:focus-within { border-color: #456e92; background: #f4f8fb; }
.file-drop-icon {
    flex: none; display: inline-flex; width: 50px; height: 42px; align-items: center; justify-content: center;
    color: #146c43; background: #e5f5ec; border: 1px solid #b7ddc8; border-radius: 6px;
    font-family: var(--font-mono); font-size: 11px; font-weight: 800;
}
.file-drop-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 5px; }
.file-drop-copy strong { overflow: hidden; color: var(--text-primary); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.file-drop-copy small { color: var(--text-muted); font-size: 11px; }
.batch-file-input {
    flex: none; max-width: 280px; color: var(--text-muted); font-family: inherit; font-size: 11px;
}
.batch-file-input::file-selector-button {
    margin-right: 10px; padding: 8px 14px; color: #234d70; background: #fff;
    border: 1px solid #b9c9d7; border-radius: var(--radius-sm); font-family: inherit;
    font-size: 12px; font-weight: 600; cursor: pointer;
}
.batch-file-input:focus-visible { outline: 3px solid rgba(53,104,212,.18); outline-offset: 4px; }
.batch-upload-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 14px; }
.batch-upload-footer p { margin: 0; color: var(--text-muted); font-size: 11px; line-height: 1.6; }
.batch-upload-footer p span { color: #456e92; }
.batch-submit-btn { min-width: 168px; background: #315f84; }
.batch-submit-btn:hover { background: #234d70; }
.batch-submit-btn:disabled { opacity: .65; cursor: wait; box-shadow: none; }
.import-summary {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
    margin: 0 32px 28px; overflow: hidden; border: 1px solid #a7d8bf;
    border-radius: var(--radius-md); background: #cce8d9;
}
.import-summary > div { display: flex; align-items: baseline; gap: 4px; padding: 16px 18px; background: #f0faf5; }
.import-summary span { margin-right: auto; color: #4b6b5b; font-size: 11px; }
.import-summary strong { color: #08734c; font-size: 22px; }
.import-summary small { color: #4b6b5b; font-size: 11px; }
.import-summary > p { grid-column: 1 / -1; margin: 0; padding: 10px 14px; color: #476457; background: #e7f6ee; font-size: 11px; }
.import-error-panel { margin: 0 32px 28px; overflow: hidden; border: 1px solid #f2b8b5; border-radius: var(--radius-md); }
.import-error-heading {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
    padding: 14px 16px; color: #9f201d; background: #fff1f0;
}
.import-error-heading strong { font-size: 14px; }
.import-error-heading p { margin: 4px 0 0; color: #9b4e4b; font-size: 11px; }
.import-error-heading > span { flex: none; padding: 3px 8px; background: #fff; border-radius: 10px; font-size: 10px; }
.import-error-table-wrap { overflow-x: auto; }
.import-error-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.import-error-table th, .import-error-table td { padding: 9px 12px; border-top: 1px solid #f4d4d2; text-align: left; white-space: nowrap; }
.import-error-table th { color: #7f3431; background: #fffafa; font-size: 11px; }
.import-error-table td:nth-child(1) { width: 74px; color: #9f201d; font-weight: 700; }
.import-error-table td:nth-child(4) { max-width: 260px; overflow: hidden; color: var(--text-muted); text-overflow: ellipsis; }
.submission-divider { display: flex; align-items: center; gap: 16px; margin: 22px 0; color: var(--text-muted); font-size: 12px; }
.submission-divider::before, .submission-divider::after { content: ""; height: 1px; flex: 1; background: var(--border-color); }
.submit-form fieldset.form-section {
    border: 1px solid var(--border-color); border-radius: var(--radius-md);
    padding: 20px 24px; margin-bottom: 18px;
}
.submit-form fieldset.form-section legend {
    font-size: 14px; font-weight: 600; color: var(--text-primary); padding: 0 10px;
}
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.required label::after { content: " *"; color: var(--accent-red); }
.form-group.span-2 { grid-column: span 2; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.form-group-span-2 { grid-column: span 2; }
@media (max-width: 768px) {
    .form-grid-3 { grid-template-columns: 1fr; }
    .form-group-span-2 { grid-column: span 1; }
}
.form-group label { font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.form-group input, .form-group select {
    height: 40px; padding: 0 12px;
    border: 1px solid var(--border-color); border-radius: var(--radius-sm);
    background: #fff; color: var(--text-primary); font-size: 14px;
    font-family: inherit; outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.form-group input:focus, .form-group select:focus {
    border-color: var(--accent-blue); box-shadow: 0 0 0 3px rgba(79,110,246,0.08);
}
.form-group input::placeholder { color: var(--text-muted); font-size: 13px; }
.form-field-hint { color: var(--text-muted); font-size: 11px; line-height: 1.45; }
.form-group select {
    cursor: pointer; appearance: none;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23687083' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
    padding-right: 36px;
}
.form-actions { display: flex; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border-color); }
.btn-primary {
    padding: 10px 24px; background: var(--accent-blue); color: #fff; border: none;
    border-radius: var(--radius-sm); font-size: 14px; font-weight: 600;
    cursor: pointer; font-family: inherit; transition: all var(--transition-fast);
}
.btn-primary:hover { background: #3d5ce5; box-shadow: 0 2px 8px rgba(79,110,246,0.25); }
.btn-secondary {
    padding: 10px 24px; background: #fff; color: var(--text-secondary);
    border: 1px solid var(--border-color); border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 500; cursor: pointer; font-family: inherit;
    transition: all var(--transition-fast);
}
.btn-secondary:hover { background: #f5f6f8; }
.btn-link { padding: 10px 24px; color: var(--text-muted); font-size: 14px; text-decoration: none; display: inline-flex; align-items: center; }
.btn-link:hover { color: var(--text-primary); }
.btn-delete-sm {
    padding: 3px 10px; background: transparent; color: var(--accent-red);
    border: 1px solid #fecaca; border-radius: 4px; font-size: 11px;
    cursor: pointer; font-family: inherit; transition: all var(--transition-fast);
}
.btn-delete-sm:hover { background: #fef2f2; }
code { font-family: var(--font-mono); background: #f5f6f8; padding: 2px 6px; border-radius: 4px; font-size: 12px; color: var(--accent-blue); }

/* ── Animation ──────────────────────────────────────────────── */
@keyframes countIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.stat-card { animation: countIn 0.5s ease forwards; }
.stat-card:nth-child(1) { animation-delay: 0s; }
.stat-card:nth-child(2) { animation-delay: 0.05s; }
.stat-card:nth-child(3) { animation-delay: 0.10s; }
.stat-card:nth-child(4) { animation-delay: 0.15s; }
.stat-card:nth-child(5) { animation-delay: 0.20s; }
.stat-card:nth-child(6) { animation-delay: 0.25s; }

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d8dde5; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #b0b8c5; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
    .charts-grid { grid-template-columns: 1fr; }
    .map-chart-container { height: 480px; }
    .header { padding: 0 18px; }
    .header-logo .logo-sub { display: none; }
    .header-nav a { padding: 7px 10px; }
    .refresh-btn { padding: 6px 10px; }
}
@media (max-width: 900px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .header-nav { display: none; }
}
@media (max-width: 600px) {
    .stats-grid { grid-template-columns: 1fr; }
    .main-container { padding: 12px; }
    .stat-card .card-value { font-size: 26px; }
    .map-chart-container { height: 360px; }
    .header { min-height: 56px; height: auto; padding: 8px 12px; }
    .header-logo { min-width: 0; }
    .header-logo .logo-text { display: block; max-width: 210px; font-size: 13px; line-height: 1.35; letter-spacing: 1px; }
    .header-logo .logo-sub { display: none; }
    .header-actions { flex: none; margin-left: auto; }
    .header-actions > * { display: none !important; }
    .header-actions > :last-child { display: flex !important; padding: 6px 9px; font-size: 11px; }
    .header-time { display: none; }
    .footer { flex-direction: column; gap: 8px; text-align: center; }
    .form-grid-3 { grid-template-columns: 1fr; }
    .form-group.span-2 { grid-column: span 1; }
    .form-panel { padding: 20px; }
    .form-actions { flex-wrap: wrap; }
    .date-filter-bar { padding: 8px 12px; gap: 6px; }
    .date-filter-info { display: none; }
    .batch-import-heading { flex-direction: column; gap: 18px; padding: 22px 20px; }
    .template-download-btn { width: 100%; }
    .batch-flow { grid-template-columns: 1fr; gap: 10px; padding: 18px 20px; }
    .batch-flow-arrow { margin-left: 8px; transform: rotate(90deg); transform-origin: left center; }
    .batch-flow-step small { white-space: normal; }
    .batch-upload-form { margin: 0 20px 22px; }
    .file-drop-zone { align-items: flex-start; flex-wrap: wrap; padding: 16px; }
    .file-drop-copy { flex-basis: calc(100% - 68px); }
    .file-drop-copy strong { white-space: normal; }
    .batch-file-input { width: 100%; max-width: none; }
    .batch-file-input::file-selector-button { width: 100%; margin: 0 0 8px; }
    .batch-upload-footer { align-items: stretch; flex-direction: column; }
    .batch-submit-btn { width: 100%; }
    .import-summary { grid-template-columns: repeat(2, 1fr); margin: 0 20px 22px; }
    .import-error-panel { margin: 0 20px 22px; }
    .import-error-heading { flex-direction: column; }
}

/* ═══════════════════════════════════════════════════════════════
   Prediction Page Styles
   ═══════════════════════════════════════════════════════════════ */

/* ── City Selector Bar ──────────────────────────────────────── */
.city-selector-bar {
    background: #fff;
    border-bottom: 1px solid #e0e4ec;
    padding: 12px 28px;
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.city-selector-label {
    font-size: 14px; font-weight: 700; color: var(--text-secondary); white-space: nowrap;
}
.city-select {
    height: 36px; padding: 0 34px 0 14px;
    font-size: 14px; font-weight: 600;
    border: 1px solid var(--border-color); border-radius: var(--radius-sm);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23687083' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
    color: var(--text-primary); font-size: 14px; font-weight: 500;
    font-family: inherit; cursor: pointer; outline: none;
    appearance: none; min-width: 220px;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.city-select:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(79,110,246,0.08);
}
.city-selector-info {
    font-size: 13px; color: var(--text-muted); margin-left: 8px; white-space: nowrap;
}
.city-selector-info strong { color: var(--text-primary); }
.city-selector-coords {
    font-size: 12px; color: var(--text-muted); margin-left: auto;
    font-family: var(--font-mono); white-space: nowrap;
}

/* ── Prediction Chart Section ──────────────────────────────── */
.pred-chart-section {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-card);
}
.pred-chart-section .section-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px; flex-wrap: wrap; gap: 8px;
    font-size: 14px; font-weight: 700; color: var(--text-primary);
}
.pred-chart-container {
    width: 100%; height: 480px;
}
.pred-legend-row {
    display: flex; gap: 20px; margin-top: 14px;
    padding-top: 14px; border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
}
.pred-legend-row .legend-item {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; color: var(--text-secondary);
}
.pred-legend-row .legend-dot {
    display: inline-block;
    width: 10px; height: 10px; border-radius: 50%;
}

/* ── Prediction Result Bar ─────────────────────────────────── */
.pred-result-bar {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-card);
    animation: countIn 0.3s ease;
}
.pred-result-bar .section-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 14px; flex-wrap: wrap; gap: 8px;
}
.pred-result-bar .section-title {
    font-size: 16px; font-weight: 600; color: var(--text-primary);
    display: flex; align-items: center; gap: 8px;
}
.pred-result-bar .section-title::before {
    content: ""; display: inline-block; width: 4px; height: 18px;
    background: linear-gradient(180deg, #c9a84c, #e0c878); border-radius: 2px;
}
.result-cards-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}
.rc-card {
    background: #f8f9fd;
    border: 1px solid var(--border-color);
    border-top: 2px solid #c9a84c;
    border-radius: var(--radius-md);
    padding: 12px 10px;
    text-align: center;
    transition: all var(--transition-fast);
}
.rc-card.highlight {
    background: #fffdf5;
    border-color: #c9a84c;
    border-top: 2px solid #c9a84c;
}
.rc-card .rc-icon { font-size: 18px; display: block; margin-bottom: 4px; }
.rc-card .rc-label { font-size: 11px; color: var(--text-muted); font-weight: 500; display: block; }
.rc-card .rc-value {
    font-size: 18px; font-weight: 800; color: var(--text-primary);
    font-family: var(--font-mono); display: block; line-height: 1.3;
    margin-top: 2px;
}
@media (max-width: 1200px) {
    .result-cards-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .result-cards-row { grid-template-columns: repeat(2, 1fr); }
    .rc-card .rc-value { font-size: 16px; }
}

/* ── Weather Map Section (Full Width) ──────────────────────── */
.weather-map-section {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-card);
}
.weather-map-section .section-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 14px; flex-wrap: wrap; gap: 10px;
}
.weather-map-section .section-title {
    font-size: 16px; font-weight: 600; color: var(--text-primary);
    display: flex; align-items: center; gap: 8px; white-space: nowrap;
}
.weather-map-section .section-title::before {
    content: ""; display: inline-block; width: 4px; height: 18px;
    background: linear-gradient(180deg, #c9a84c, #e0c878); border-radius: 2px;
}
.weather-date-picker {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.weather-date-label {
    font-size: 13px; color: var(--text-secondary); font-weight: 500; white-space: nowrap;
}
.weather-date-input {
    height: 34px; padding: 0 10px;
    border: 1px solid var(--border-color); border-radius: var(--radius-sm);
    background: #fff; color: var(--text-primary); font-size: 13px;
    font-family: inherit; outline: none;
    transition: border-color var(--transition-fast);
}
.weather-date-input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(79,110,246,0.08);
}
.weather-date-today {
    height: 34px; padding: 0 14px;
    background: #fff; color: var(--accent-blue);
    border: 1px solid var(--accent-blue); border-radius: var(--radius-sm);
    font-size: 12px; font-weight: 500; font-family: inherit;
    cursor: pointer; white-space: nowrap;
    transition: all var(--transition-fast);
}
.weather-date-today:hover { background: #eef1ff; }
.weather-date-info {
    font-size: 12px; color: var(--text-muted); white-space: nowrap;
}
.weather-map-container {
    width: 100%; height: 620px;
}
.weather-map-legend {
    display: flex; gap: 24px; align-items: center;
    margin-top: 12px; padding-top: 12px;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
}
.map-legend-row {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; color: var(--text-secondary);
}
.map-legend-label { font-weight: 500; white-space: nowrap; }
.map-legend-gradient {
    display: inline-block; width: 80px; height: 10px;
    border-radius: 5px;
}
.map-legend-gradient.temp-gradient {
    background: linear-gradient(to right, #4285d5, #06b6d4, #fbb928, #dc3838);
}
.map-legend-size {
    display: flex; align-items: center; gap: 6px;
}
.map-legend-size .size-dot {
    display: inline-block; border-radius: 50%; background: #f72585;
}
.map-legend-size .size-dot.sm { width: 8px; height: 8px; opacity: 0.5; }
.map-legend-size .size-dot.md { width: 14px; height: 14px; opacity: 0.65; }
.map-legend-size .size-dot.lg { width: 22px; height: 22px; opacity: 0.8; }
.map-legend-range {
    font-size: 11px; color: var(--text-muted);
    font-family: var(--font-mono);
}

/* ── Weather Detail Bar (below map, clicked city) ──────────── */
.weather-detail-bar {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-card);
    animation: countIn 0.3s ease;
}
.weather-detail-header {
    display: flex; align-items: center; gap: 16px;
    margin-bottom: 14px; padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}
.weather-detail-city {
    font-size: 16px; font-weight: 700; color: var(--text-primary);
}
.weather-detail-date {
    font-size: 13px; color: var(--text-secondary);
}
.weather-detail-condition {
    font-size: 13px; color: var(--accent-teal); font-weight: 500;
}
.weather-detail-cards {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}
.wd-card {
    background: #f8f9fd;
    border: 1px solid var(--border-color);
    border-top: 2px solid #c9a84c;
    border-radius: var(--radius-md);
    padding: 12px 10px;
    text-align: center;
    transition: all var(--transition-fast);
}
.wd-card:hover { background: #fffdf5; border-color: #c9a84c; }
.wd-card-icon { font-size: 20px; display: block; margin-bottom: 4px; }
.wd-card-label { font-size: 11px; color: var(--text-muted); font-weight: 500; display: block; }
.wd-card-value {
    font-size: 20px; font-weight: 800; color: var(--text-primary);
    font-family: var(--font-mono); display: block; line-height: 1.3;
}
.wd-card-unit { font-size: 11px; color: var(--text-muted); }

/* ── Prediction Responsive ─────────────────────────────────── */
@media (max-width: 1200px) {
    .pred-chart-container { height: 380px; }
    .weather-map-container { height: 480px; }
    .weather-detail-cards { grid-template-columns: repeat(3, 1fr); }
    .weather-map-section .section-header { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 768px) {
    .city-selector-bar { padding: 8px 12px; gap: 8px; }
    .city-selector-info { margin-left: 0; width: 100%; }
    .city-selector-coords { margin-left: 0; }
    .weather-map-container { height: 380px; }
    .weather-detail-cards { grid-template-columns: repeat(2, 1fr); }
    .pred-chart-container { height: 320px; }
    .wd-card-value { font-size: 17px; }
    .weather-detail-header { gap: 8px; }
    .weather-date-picker { gap: 4px; }
}

/* ═══════════════════════════════════════════════════════════════════
   Organization Page Styles
   ═══════════════════════════════════════════════════════════════════ */

/* ── Tab Bar ────────────────────────────────────────────────── */
.org-tab-bar {
    background: #fff;
    border-bottom: 1px solid #e0e4ec;
    padding: 14px 28px;
    display: flex; align-items: center; gap: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.org-tab-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}
.org-tab-btn:hover {
    color: var(--text-primary);
    background: #f5f6f8;
}
.org-tab-btn.active {
    color: #c9a84c;
    background: rgba(201,168,76,0.10);
    border-color: rgba(201,168,76,0.30);
    font-weight: 700;
}

/* ── Leader Grid ───────────────────────────────────────────── */
.leader-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}
.leader-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex; gap: 16px; align-items: flex-start;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-card);
}
.leader-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
    border-color: #d8dde5;
}
.leader-avatar {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0a1f3f, #162d5a);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}
.leader-info { flex: 1; min-width: 0; }
.leader-name {
    font-size: 17px; font-weight: 700; color: var(--text-primary);
    margin-bottom: 2px;
}
.leader-title {
    font-size: 13px; font-weight: 600; color: #c9a84c;
    margin-bottom: 8px;
}
.leader-duty {
    font-size: 12px; color: var(--text-muted);
    line-height: 1.7;
}

/* ── Department Sections ───────────────────────────────────── */
.dept-section {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-card);
}
.dept-section-header {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 16px; padding-bottom: 14px;
    border-bottom: 2px solid #f0f2f7;
}
.dept-section-icon { font-size: 22px; }
.dept-section-title {
    font-size: 16px; font-weight: 700; color: var(--text-primary);
}
.dept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}
.dept-card {
    background: #f8f9fd;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    transition: all var(--transition-fast);
    border-left: 3px solid #c9a84c;
}
.dept-card:hover {
    background: #eef1ff;
    border-color: #c8d4f8;
}
.dept-card-name {
    font-size: 14px; font-weight: 700; color: var(--text-primary);
    margin-bottom: 6px;
}
.dept-card-desc {
    font-size: 12px; color: var(--text-muted);
    line-height: 1.6;
}

/* ── Section Header (generic, used on org page) ─────────── */
.org-content-area .section-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px;
}
.org-content-area .section-title {
    font-size: 16px; font-weight: 700; color: var(--text-primary);
    display: flex; align-items: center; gap: 8px;
}
.org-content-area .section-title::before {
    content: ""; display: inline-block; width: 4px; height: 18px;
    background: #c9a84c; border-radius: 2px;
}

/* ── Org Page Responsive ──────────────────────────────────── */
@media (max-width: 1200px) {
    .leader-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .leader-grid { grid-template-columns: 1fr; }
    .dept-grid { grid-template-columns: 1fr; }
    .org-tab-bar { padding: 10px 12px; }
    .leader-card { padding: 16px; }
    .leader-avatar { width: 44px; height: 44px; font-size: 22px; }
}

/* ═══════════════════════════════════════════════════════════════════
   Risk Heatmap Page Styles
   ═══════════════════════════════════════════════════════════════════ */

.risk-gradient {
    background: linear-gradient(to right, #407ac4, #7daad8, #d4e5f9, #f0d040, #f09040, #e04030);
}

.risk-table-toggle {
    padding: 6px 14px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    transition: all var(--transition-fast);
    white-space: nowrap;
}
.risk-table-toggle:hover {
    background: #f5f6f8;
    border-color: #c0c5d0;
    color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════════════════
   Auth Pages — Login / Register / User Management
   ═══════════════════════════════════════════════════════════════════ */

.auth-body {
    background: #f0f2f7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-top: 3px solid #c9a84c;
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.auth-card-wide {
    max-width: 560px;
}

.auth-title {
    font-size: 24px; font-weight: 800; color: #0a1f3f;
    text-align: center; margin-bottom: 24px;
}

.auth-form .form-group {
    margin-bottom: 16px;
}
.auth-form .form-group label {
    display: block;
    font-size: 13px; font-weight: 600; color: var(--text-secondary);
    margin-bottom: 6px;
}
.auth-form .form-group input,
.auth-form .form-group select {
    width: 100%; height: 42px; padding: 0 14px;
    border: 1px solid var(--border-color); border-radius: var(--radius-sm);
    background: #fff; color: var(--text-primary); font-size: 14px;
    font-family: inherit; outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.auth-form .form-group input:focus {
    border-color: #c9a84c; box-shadow: 0 0 0 3px rgba(201,168,76,0.1);
}
.auth-form .form-group input::placeholder { color: var(--text-muted); font-size: 13px; }

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}
.form-group-span-2 { grid-column: span 2; }

.auth-btn {
    width: 100%; height: 44px; font-size: 15px; font-weight: 700;
    margin-top: 8px; cursor: pointer;
    background: #0a1f3f; color: #fff; border: none;
    border-radius: var(--radius-sm); letter-spacing: 2px;
    transition: background var(--transition-fast);
}
.auth-btn:hover { background: #162d5a; }

.auth-links {
    text-align: center; margin-top: 20px; padding-top: 16px;
    border-top: 1px solid var(--border-color);
    display: flex; gap: 20px; justify-content: center;
}
.auth-links a {
    color: var(--text-muted); font-size: 13px;
    text-decoration: none; transition: color var(--transition-fast);
}
.auth-links a:hover { color: #c9a84c; }

.auth-footer {
    text-align: center; padding: 16px;
    font-size: 12px; color: var(--text-muted);
}

.form-message {
    padding: 12px 16px; border-radius: var(--radius-sm);
    margin-bottom: 16px; font-size: 13px; font-weight: 500;
    text-align: center;
}
.form-msg-error { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; }
.form-msg-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #059669; }

/* ── Role Badges ─────────────────────────────────────────── */
.role-badge {
    display: inline-block; padding: 2px 10px; border-radius: 12px;
    font-size: 11px; font-weight: 600;
}
.role-super_admin { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.role-admin { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.role-user { background: #f0f4fa; color: #1e40af; border: 1px solid #c8d4f8; }

/* ── User Management Buttons ─────────────────────────────── */
.btn-approve-sm {
    padding: 3px 10px; background: #059669; color: #fff;
    border: none; border-radius: 4px; font-size: 11px;
    cursor: pointer; font-family: inherit; transition: all var(--transition-fast);
}
.btn-approve-sm:hover { background: #047857; }
.btn-reject-sm {
    padding: 3px 10px; background: transparent; color: #d97706;
    border: 1px solid #fde68a; border-radius: 4px; font-size: 11px;
    cursor: pointer; font-family: inherit; transition: all var(--transition-fast);
}
.btn-reject-sm:hover { background: #fffbeb; }
.role-select-sm {
    padding: 2px 6px; border: 1px solid var(--border-color);
    border-radius: 4px; font-size: 11px; font-family: inherit;
    cursor: pointer; background: #fff;
}

/* ── Header User Menu ────────────────────────────────────── */
.header-login-link {
    color: #c9a84c; font-size: 13px; font-weight: 600;
    text-decoration: none; padding: 6px 12px;
    border: 1px solid rgba(201,168,76,0.3); border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}
.header-login-link:hover { background: rgba(201,168,76,0.1); }

.header-user-info {
    display: flex; align-items: center; gap: 8px;
    color: #c8d6f0; font-size: 13px;
}
.header-user-info strong { color: #c9a84c; }

/* ═══════════════════════════════════════════════════════════════════
   Predictive Risk Early-warning Command Screen
   ═══════════════════════════════════════════════════════════════════ */

.risk-page {
    --risk-bg: #07182c;
    --risk-surface: #0b203b;
    --risk-surface-strong: #0d2747;
    --risk-line: #244260;
    --risk-line-soft: rgba(96, 133, 168, 0.24);
    --risk-text: #edf4fc;
    --risk-muted: #9fb2c9;
    --risk-subtle: #7189a5;
    --risk-gold: #c7a64b;
    --risk-red: #e25549;
    --risk-orange: #e69b3f;
    --risk-blue: #5d91d3;
    --risk-teal: #2fa6a2;
    background: var(--risk-bg);
    background-image: none;
    color: var(--risk-text);
}

.risk-page .header {
    background: #07182c;
    border-bottom-color: rgba(199, 166, 75, 0.8);
    box-shadow: 0 8px 24px rgba(0, 7, 18, 0.28);
}

.risk-page .header-nav a.active {
    background: rgba(199, 166, 75, 0.11);
    box-shadow: inset 0 -2px 0 var(--risk-gold);
}

.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;
}

.risk-command-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 20px 28px 18px;
    border-bottom: 1px solid var(--risk-line-soft);
    background:
        radial-gradient(circle at 75% -40%, rgba(61, 104, 153, 0.18), transparent 45%),
        #081b32;
}

.risk-command-copy { min-width: 0; }
.risk-title-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.risk-title-row h1 {
    color: #f7f9fc;
    font-size: 25px;
    line-height: 1.25;
    letter-spacing: 1px;
    font-weight: 760;
}
.risk-model-version {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 2px 9px;
    border: 1px solid rgba(199, 166, 75, 0.62);
    border-radius: 5px;
    color: #dfc672;
    background: rgba(199, 166, 75, 0.07);
    font-size: 12px;
    font-weight: 650;
    letter-spacing: 0.3px;
}
.risk-command-copy > p {
    margin-top: 7px;
    color: var(--risk-muted);
    font-size: 13px;
}
.risk-command-actions { display: flex; align-items: center; gap: 22px; flex: none; }
.risk-horizon-switch {
    display: inline-grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid #54708d;
    border-radius: 7px;
    overflow: hidden;
}
.risk-horizon-switch button {
    min-width: 104px;
    height: 38px;
    padding: 0 16px;
    border: 0;
    border-right: 1px solid #54708d;
    background: transparent;
    color: #b6c7db;
    font-family: inherit;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
    transition: background .18s ease, color .18s ease;
}
.risk-horizon-switch button:last-child { border-right: 0; }
.risk-horizon-switch button:hover { background: rgba(255,255,255,.055); color: #fff; }
.risk-horizon-switch button.active {
    color: #f0d277;
    background: rgba(199, 166, 75, 0.16);
    box-shadow: inset 0 0 0 1px rgba(199, 166, 75, 0.42);
}
.risk-caveat {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--risk-muted);
    font-size: 12px;
    white-space: nowrap;
}
.risk-caveat svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
}

.risk-filter-strip {
    min-height: 53px;
    padding: 8px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: #0a1e37;
    border-bottom: 1px solid var(--risk-line-soft);
}
.risk-date-fields, .risk-model-meta { display: flex; align-items: center; gap: 9px; }
.risk-filter-title { color: #cbd7e5; font-size: 12px; font-weight: 650; white-space: nowrap; }
.risk-date-input {
    width: 136px;
    height: 34px;
    padding: 0 9px;
    color: #dbe6f2;
    background: #0b223e;
    border: 1px solid #294a69;
    border-radius: 5px;
    font: 12px var(--font-sans);
    color-scheme: dark;
    outline: none;
}
.risk-date-input:focus { border-color: var(--risk-gold); box-shadow: 0 0 0 2px rgba(199,166,75,.12); }
.risk-date-separator { color: var(--risk-subtle); font-size: 12px; }
.risk-filter-primary, .risk-filter-secondary {
    height: 34px;
    padding: 0 14px;
    border-radius: 5px;
    font: 650 12px var(--font-sans);
    cursor: pointer;
}
.risk-filter-primary { border: 1px solid #637fa0; color: #fff; background: #24456c; }
.risk-filter-primary:hover { background: #2b527f; }
.risk-filter-secondary { border: 1px solid #294a69; color: var(--risk-muted); background: transparent; }
.risk-filter-secondary:hover { color: #fff; border-color: #54708d; }
.risk-model-meta { color: var(--risk-subtle); font-size: 11px; white-space: nowrap; }
.risk-model-meta strong { color: #becde0; font-weight: 650; }
.risk-model-status { color: #aebed1; }
.risk-live-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 6px;
    border-radius: 50%;
    background: #2db47d;
    box-shadow: 0 0 0 3px rgba(45,180,125,.11);
}

.risk-dashboard {
    width: 100%;
    max-width: 1680px;
    margin: 0 auto;
    padding: 14px 22px 0;
}
.risk-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}
.risk-kpi {
    min-height: 102px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 15px 18px;
    border: 1px solid var(--risk-line);
    border-radius: 8px;
    background: linear-gradient(145deg, rgba(17, 48, 82, .88), rgba(10, 31, 56, .96));
}
.risk-kpi p { color: #c5d1df; font-size: 12px; font-weight: 650; }
.risk-kpi strong {
    display: inline-block;
    margin-top: 5px;
    color: #f5f8fc;
    font: 760 29px/1 var(--font-mono);
}
.risk-kpi > div > span { margin-left: 5px; color: var(--risk-muted); font-size: 12px; }
.risk-kpi small { display: block; margin-top: 8px; color: var(--risk-subtle); font-size: 10px; line-height: 1.35; }
.risk-kpi > svg {
    flex: none;
    width: 38px;
    height: 38px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: .88;
}
.risk-kpi-alert strong, .risk-kpi-alert > svg { color: var(--risk-red); }
.risk-kpi-rise strong, .risk-kpi-rise > svg { color: var(--risk-orange); }
.risk-kpi-province strong, .risk-kpi-province > svg { color: #71a6e6; }
.risk-kpi-confidence strong, .risk-kpi-confidence > svg { color: var(--risk-teal); }

.risk-panel {
    border: 1px solid var(--risk-line);
    border-radius: 8px;
    background: rgba(10, 31, 56, .96);
    box-shadow: 0 10px 28px rgba(0, 8, 20, .15);
}
.risk-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(355px, .92fr);
    gap: 10px;
    align-items: stretch;
}
.risk-panel-header {
    min-height: 63px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--risk-line-soft);
}
.risk-panel-header h2 { color: #edf3fa; font-size: 14px; font-weight: 720; letter-spacing: .2px; }
.risk-panel-header h2 span { color: #c8d5e4; font-weight: 550; }
.risk-panel-header p { margin-top: 3px; color: var(--risk-subtle); font-size: 10px; }
.risk-panel-meta { color: #8fa5bd; font-size: 10px; white-space: nowrap; }
.risk-map-stage { position: relative; height: 482px; overflow: hidden; }
.risk-map-canvas { width: 100%; height: 100%; }
.risk-map-legend {
    position: absolute;
    z-index: 2;
    left: 16px;
    top: 18px;
    display: grid;
    gap: 8px;
    padding: 10px 11px;
    border: 1px solid rgba(75, 111, 146, .36);
    border-radius: 6px;
    background: rgba(7, 24, 44, .82);
    backdrop-filter: blur(5px);
    pointer-events: none;
}
.risk-map-legend span { display: flex; align-items: center; gap: 7px; color: #b7c6d8; font-size: 10px; }
.risk-map-legend i { width: 10px; height: 10px; border-radius: 2px; }
.risk-map-legend b { color: #718aa7; font-size: 9px; font-weight: 500; }
.risk-map-legend .legend-high { background: #bd3f38; }
.risk-map-legend .legend-elevated { background: #cf7c36; }
.risk-map-legend .legend-medium { background: #557fac; }
.risk-map-legend .legend-low { background: #315679; }
.risk-map-legend .legend-direction {
    position: relative;
    width: 24px;
    height: 0;
    border-top: 2px dashed #d79a49;
    border-radius: 0;
}
.risk-map-legend .legend-direction::after {
    content: "";
    position: absolute;
    right: -1px;
    top: -5px;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 6px solid #d79a49;
}
.risk-map-legend .legend-pulse {
    position: relative;
    width: 10px;
    height: 10px;
    border: 2px solid #ef5a4d;
    border-radius: 50%;
    background: #761f24;
    animation: riskLegendPulse 2.4s ease-out infinite;
}
.risk-map-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}
.risk-hotspot-summary {
    color: #d6e1ed;
    font-size: 10px;
    font-weight: 650;
    white-space: nowrap;
}
.risk-direction-summary {
    color: #d7b06d;
    font-size: 9px;
    font-weight: 580;
    white-space: nowrap;
}
.risk-direction-summary.is-weak { color: #93a6bb; }
.risk-direction-note {
    position: absolute;
    z-index: 3;
    right: 12px;
    bottom: 11px;
    max-width: 340px;
    margin: 0;
    padding: 7px 9px;
    border: 1px solid rgba(95, 123, 151, .32);
    border-left: 3px solid #bd7431;
    border-radius: 5px;
    color: #aebfd0;
    background: rgba(7, 24, 44, .84);
    font-size: 9px;
    line-height: 1.45;
    pointer-events: none;
}
.risk-map-legend .legend-hotspot-scale { gap: 5px; }
.risk-map-legend .legend-hotspot-high,
.risk-map-legend .legend-hotspot-elevated,
.risk-map-legend .legend-hotspot-medium {
    flex: 0 0 auto;
    border-radius: 50%;
}
.risk-map-legend .legend-hotspot-high {
    width: 12px;
    height: 12px;
    border: 2px solid #ffd5ce;
    background: #e84b43;
    box-shadow: 0 0 0 3px rgba(232,75,67,.18);
}
.risk-map-legend .legend-hotspot-elevated {
    width: 10px;
    height: 10px;
    border: 1px solid #ffe9bf;
    background: #e99b35;
    box-shadow: 0 0 0 2px rgba(233,155,53,.16);
}
.risk-map-legend .legend-hotspot-medium {
    width: 8px;
    height: 8px;
    border: 1px solid #dceeff;
    background: #4f8fc9;
}
@keyframes riskLegendPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239,90,77,.42); }
    55% { box-shadow: 0 0 0 6px rgba(239,90,77,0); }
}

.risk-priority-panel { min-width: 0; overflow: hidden; }
.risk-priority-head {
    height: 29px;
    display: grid;
    grid-template-columns: minmax(140px, 1fr) 82px 65px;
    align-items: center;
    padding: 0 13px;
    color: #6f88a4;
    background: rgba(17, 48, 82, .44);
    border-bottom: 1px solid var(--risk-line-soft);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.risk-priority-head span:not(:first-child) { text-align: right; }
.risk-priority-list { display: grid; }
.risk-priority-row {
    width: 100%;
    min-height: 56px;
    display: grid;
    grid-template-columns: minmax(140px, 1fr) 82px 65px;
    align-items: center;
    gap: 5px;
    padding: 7px 13px;
    border: 0;
    border-bottom: 1px solid rgba(68, 100, 133, .23);
    color: inherit;
    background: transparent;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    transition: background .16s ease, box-shadow .16s ease;
}
.risk-priority-row:last-child { border-bottom: 0; }
.risk-priority-row:hover { background: rgba(83, 125, 167, .09); }
.risk-priority-row.active { background: rgba(199, 166, 75, .08); box-shadow: inset 3px 0 0 var(--risk-gold); }
.risk-priority-city { min-width: 0; display: flex; align-items: center; gap: 9px; }
.risk-priority-rank {
    flex: none;
    width: 22px;
    color: #6e87a4;
    font: 600 11px var(--font-mono);
    text-align: center;
}
.risk-priority-row:nth-child(-n+3) .risk-priority-rank { color: #e0be65; }
.risk-priority-name { min-width: 0; }
.risk-priority-name strong { display: block; overflow: hidden; color: #e7eef7; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.risk-priority-name small { display: block; margin-top: 2px; color: #758daa; font-size: 9px; }
.risk-priority-score { text-align: right; }
.risk-priority-score strong { display: block; font: 720 17px var(--font-mono); }
.risk-priority-score small { display: block; margin-top: 2px; font-size: 9px; }
.risk-priority-delta { text-align: right; font: 650 11px var(--font-mono); }
.risk-high-text { color: #ef6558 !important; }
.risk-elevated-text { color: #e6a04b !important; }
.risk-medium-text { color: #76a5dd !important; }
.risk-low-text { color: #69a7b0 !important; }
.risk-delta-up { color: #ef796c; }
.risk-delta-down { color: #4db88e; }
.risk-delta-flat { color: #8298b1; }

.risk-detail-panel { margin-top: 10px; overflow: hidden; }
.risk-detail-heading {
    min-height: 75px;
    display: grid;
    grid-template-columns: minmax(210px, .8fr) 130px 155px minmax(300px, 1.35fr);
    align-items: center;
    gap: 22px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--risk-line-soft);
    background: rgba(14, 42, 74, .52);
}
.risk-detail-heading > div:first-child > p,
.risk-detail-score > span,
.risk-detail-confidence > span { color: var(--risk-subtle); font-size: 9px; }
.risk-detail-heading h2 { display: flex; align-items: center; gap: 9px; margin-top: 3px; color: #f1f5fa; font-size: 17px; }
.risk-level-badge {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 650;
}
.risk-level-badge.high { color: #ff9b91; background: rgba(178, 48, 42, .24); border: 1px solid rgba(226,85,73,.42); }
.risk-level-badge.elevated { color: #f1bd6d; background: rgba(192,111,38,.2); border: 1px solid rgba(230,155,63,.34); }
.risk-level-badge.medium { color: #a5c8ef; background: rgba(77,128,181,.2); border: 1px solid rgba(93,145,211,.32); }
.risk-level-badge.low { color: #83c8c5; background: rgba(47,166,162,.17); border: 1px solid rgba(47,166,162,.3); }
.risk-level-badge.unknown { color: #a2b2c4; background: rgba(113,137,165,.13); border: 1px solid rgba(113,137,165,.28); }
.risk-detail-score strong, .risk-detail-confidence strong { display: block; margin-top: 2px; color: #ecf3fa; font: 720 22px var(--font-mono); }
.risk-detail-score small, .risk-detail-confidence small { color: #7e95ae; font-size: 9px; }
.risk-recommended-action {
    padding: 9px 12px;
    border-left: 2px solid var(--risk-gold);
    color: #b9c8d9;
    background: rgba(199, 166, 75, .055);
    font-size: 11px;
    line-height: 1.55;
}
.risk-detail-grid {
    display: grid;
    grid-template-columns: minmax(270px, 1.25fr) minmax(245px, .95fr) minmax(255px, 1fr) minmax(285px, 1fr);
}
.risk-detail-block {
    min-width: 0;
    min-height: 225px;
    padding: 13px 16px 15px;
    border-right: 1px solid var(--risk-line-soft);
}
.risk-detail-block:last-child { border-right: 0; }
.risk-detail-block-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.risk-detail-block-title h3 { color: #dce7f3; font-size: 11px; font-weight: 680; }
.risk-detail-block-title span { color: #7089a5; font-size: 9px; white-space: nowrap; }
.risk-trend-chart { width: 100%; height: 178px; }
.risk-factor-list { display: grid; gap: 10px; margin-top: 18px; }
.risk-factor-item { display: grid; grid-template-columns: 62px minmax(0,1fr) 30px; align-items: center; gap: 8px; }
.risk-factor-item span { color: #aebed0; font-size: 10px; }
.risk-factor-item strong { color: #d9e5f1; font: 650 10px var(--font-mono); text-align: right; }
.risk-factor-track { height: 7px; overflow: hidden; border-radius: 2px; background: #142f4c; }
.risk-factor-fill { display: block; height: 100%; border-radius: 2px; background: #5d91d3; transition: width .35s ease; }
.risk-factor-item:nth-child(1) .risk-factor-fill { background: #dd574b; }
.risk-factor-item:nth-child(2) .risk-factor-fill { background: #e49a3d; }
.risk-factor-item:nth-child(3) .risk-factor-fill { background: #d7aa43; }
.risk-factor-item:nth-child(4) .risk-factor-fill { background: #5d91d3; }
.risk-factor-item:nth-child(5) .risk-factor-fill { background: #3d9ca3; }
.risk-trigger-list { display: grid; gap: 10px; margin: 18px 0 0; list-style: none; counter-reset: risk-trigger; }
.risk-trigger-list li {
    position: relative;
    padding-left: 24px;
    color: #b7c6d7;
    font-size: 10px;
    line-height: 1.55;
    counter-increment: risk-trigger;
}
.risk-trigger-list li::before {
    content: counter(risk-trigger);
    position: absolute;
    left: 0;
    top: 0;
    width: 16px;
    height: 16px;
    border: 1px solid #45627f;
    border-radius: 50%;
    color: #93a8be;
    font: 600 8px/14px var(--font-mono);
    text-align: center;
}
.risk-model-explain > p { margin-top: 15px; color: #9db0c5; font-size: 10px; line-height: 1.7; }
.risk-model-explain dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px 16px; margin-top: 11px; }
.risk-model-explain dl div { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 4px; border-bottom: 1px solid rgba(61, 91, 121, .28); }
.risk-model-explain dt { color: #8ea4bc; font-size: 9px; }
.risk-model-explain dd { color: #d3dfeb; font: 650 9px var(--font-mono); }
.risk-model-explain > small { display: block; margin-top: 12px; color: #d3b760; font-size: 9px; }

.risk-table-panel { margin-top: 10px; overflow: hidden; }
.risk-page .risk-table-toggle {
    height: 30px;
    padding: 0 11px;
    border: 1px solid #355572;
    border-radius: 5px;
    color: #9eb1c7;
    background: transparent;
    font: 600 10px var(--font-sans);
}
.risk-page .risk-table-toggle:hover { color: #fff; border-color: #5a7693; background: rgba(255,255,255,.04); }
.risk-table-wrapper { overflow-x: auto; }
.risk-data-table { width: 100%; border-collapse: collapse; }
.risk-data-table th, .risk-data-table td { padding: 10px 14px; border-bottom: 1px solid rgba(59, 88, 118, .24); text-align: left; white-space: nowrap; }
.risk-data-table th { color: #718aa6; background: rgba(16, 45, 76, .5); font-size: 9px; font-weight: 650; }
.risk-data-table td { color: #aebed0; font-size: 10px; }
.risk-data-table tbody tr { cursor: pointer; transition: background .15s ease; }
.risk-data-table tbody tr:hover, .risk-data-table tbody tr.active { background: rgba(87, 128, 169, .08); }
.risk-city-link { border: 0; padding: 0; color: #e2ebf5; background: none; font: 650 11px var(--font-sans); cursor: pointer; }
.risk-city-link:hover { color: #e3c874; }

.risk-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 48px;
    padding: 10px 2px;
    color: #637d9a;
    font-size: 9px;
}
.risk-footer strong { color: #8ea4bd; font-weight: 550; }
.risk-page .loading-overlay { background: rgba(4, 16, 30, .72); }

@media (max-width: 1250px) {
    .risk-command-actions { gap: 12px; }
    .risk-caveat { display: none; }
    .risk-model-meta span:last-child { display: none; }
    .risk-workspace { grid-template-columns: minmax(0, 1.55fr) minmax(330px, .9fr); }
    .risk-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .risk-detail-block:nth-child(2) { border-right: 0; }
    .risk-detail-block:nth-child(-n+2) { border-bottom: 1px solid var(--risk-line-soft); }
}

@media (max-width: 980px) {
    .risk-command-header { align-items: flex-start; flex-direction: column; gap: 14px; }
    .risk-command-actions { width: 100%; }
    .risk-filter-strip { align-items: flex-start; flex-direction: column; gap: 9px; }
    .risk-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .risk-workspace { grid-template-columns: 1fr; }
    .risk-map-stage { height: 500px; }
    .risk-priority-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .risk-priority-row:nth-child(odd) { border-right: 1px solid rgba(68, 100, 133, .23); }
    .risk-detail-heading { grid-template-columns: minmax(190px,1fr) 110px 135px; }
    .risk-recommended-action { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
    .risk-command-header { padding: 16px 14px; }
    .risk-title-row h1 { font-size: 21px; }
    .risk-command-copy > p { font-size: 11px; }
    .risk-command-actions, .risk-horizon-switch { width: 100%; }
    .risk-horizon-switch button { min-width: 0; width: 100%; }
    .risk-filter-strip { padding: 10px 14px; }
    .risk-date-fields { width: 100%; display: grid; grid-template-columns: 1fr auto 1fr; }
    .risk-filter-title { grid-column: 1 / -1; }
    .risk-date-input { width: 100%; min-width: 0; }
    .risk-filter-primary, .risk-filter-secondary { width: 100%; }
    .risk-model-meta { width: 100%; flex-wrap: wrap; white-space: normal; }
    .risk-model-meta span:last-child { display: inline; }
    .risk-dashboard { padding: 10px 10px 0; }
    .risk-kpi-grid { grid-template-columns: 1fr; }
    .risk-kpi { min-height: 92px; }
    .risk-map-stage { height: 430px; }
    .risk-map-legend { left: 9px; top: 9px; gap: 5px; padding: 8px; }
    .risk-map-legend b { display: none; }
    .risk-priority-list { grid-template-columns: 1fr; }
    .risk-priority-row:nth-child(odd) { border-right: 0; }
    .risk-detail-heading { grid-template-columns: 1fr 1fr; gap: 14px; }
    .risk-detail-heading > div:first-child { grid-column: 1 / -1; }
    .risk-detail-grid { grid-template-columns: 1fr; }
    .risk-detail-block { border-right: 0; border-bottom: 1px solid var(--risk-line-soft); }
    .risk-detail-block:last-child { border-bottom: 0; }
    .risk-footer { align-items: flex-start; flex-direction: column; gap: 5px; padding: 14px 2px; }
}

@media (prefers-reduced-motion: reduce) {
    .risk-map-legend .legend-pulse { animation: none; }
    .risk-factor-fill { transition: none; }
}

/* ── Risk page light-theme and proportion correction ─────────────
   Keeps the predictive model and interaction hierarchy intact while
   returning the page to the site's established light institutional system. */
.risk-page {
    --risk-bg: #f3f6fa;
    --risk-surface: #ffffff;
    --risk-surface-strong: #f7f9fc;
    --risk-line: #d7e0ea;
    --risk-line-soft: #e6ecf3;
    --risk-text: #17283e;
    --risk-muted: #64758a;
    --risk-subtle: #8a9aab;
    background: var(--risk-bg);
    color: var(--risk-text);
}
.risk-page .header { background: #0a1f3f; }
.risk-command-header {
    min-height: 88px;
    padding: 15px 28px 14px;
    border-bottom-color: #dde5ee;
    background: #ffffff;
}
.risk-title-row h1 { color: #142a46; font-size: 24px; }
.risk-model-version {
    color: #9b7116;
    border-color: #e1c36f;
    background: #fffaf0;
}
.risk-command-copy > p { color: #68798d; }
.risk-horizon-switch { border-color: #aebdcd; background: #fff; }
.risk-horizon-switch button { color: #52677f; border-right-color: #aebdcd; }
.risk-horizon-switch button:hover { color: #173455; background: #f6f8fb; }
.risk-horizon-switch button.active {
    color: #8d6813;
    background: #fffaf0;
    box-shadow: inset 0 0 0 1px #d8b654;
}
.risk-caveat { color: #75869a; }

.risk-filter-strip {
    min-height: 49px;
    padding: 7px 28px;
    background: #fbfcfe;
    border-bottom-color: #dce4ed;
}
.risk-filter-title { color: #4a5d73; }
.risk-date-input {
    color: #2a3b4f;
    background: #fff;
    border-color: #ced8e3;
    color-scheme: light;
}
.risk-date-input:focus { border-color: #3568d4; box-shadow: 0 0 0 2px rgba(53,104,212,.10); }
.risk-date-separator { color: #8c9bac; }
.risk-filter-primary { color: #fff; background: #25568f; border-color: #25568f; }
.risk-filter-primary:hover { background: #1d487c; }
.risk-filter-secondary { color: #697a8d; border-color: #ccd6e1; background: #fff; }
.risk-filter-secondary:hover { color: #24384f; border-color: #aebdcd; }
.risk-model-meta { color: #7d8da0; }
.risk-model-meta strong { color: #40556d; }
.risk-model-status { color: #5e7186; }

.risk-dashboard { max-width: 1680px; padding: 12px 20px 0; }
.risk-kpi-grid { gap: 10px; margin-bottom: 10px; }
.risk-kpi {
    min-height: 88px;
    padding: 12px 16px;
    border-color: #d8e1eb;
    border-radius: 9px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(21, 45, 72, .045);
}
.risk-kpi p { color: #41556d; }
.risk-kpi strong { margin-top: 3px; color: #18314f; font-size: 27px; }
.risk-kpi > div > span { color: #718196; }
.risk-kpi small { margin-top: 6px; color: #8796a7; }
.risk-kpi > svg { width: 34px; height: 34px; }
.risk-kpi-alert strong, .risk-kpi-alert > svg { color: #d9453e; }
.risk-kpi-rise strong, .risk-kpi-rise > svg { color: #dc861c; }
.risk-kpi-province strong, .risk-kpi-province > svg { color: #3976bc; }
.risk-kpi-confidence strong, .risk-kpi-confidence > svg { color: #269c83; }

.risk-panel {
    border-color: #d7e0ea;
    border-radius: 9px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(21, 45, 72, .045);
}
.risk-workspace { grid-template-columns: minmax(0, 2.15fr) minmax(330px, .85fr); gap: 10px; }
.risk-panel-header { min-height: 59px; padding: 10px 16px; border-bottom-color: #e4eaf1; }
.risk-panel-header h2 { color: #21364f; font-size: 14px; }
.risk-panel-header h2 span { color: #5f7186; }
.risk-panel-header p { color: #8493a4; }
.risk-panel-meta { color: #718297; }
.risk-hotspot-summary { color: #3f5873; }
.risk-direction-summary { color: #956520; }
.risk-direction-summary.is-weak { color: #7d8da0; }
.risk-map-stage { height: 472px; background: #ffffff; }
.risk-map-legend {
    border-color: #dce4ec;
    background: rgba(255,255,255,.94);
    box-shadow: 0 2px 8px rgba(30, 55, 82, .06);
    backdrop-filter: none;
}
.risk-map-legend span { color: #53667c; }
.risk-map-legend b { color: #8796a7; }
.risk-map-legend .legend-high { background: #c94b45; }
.risk-map-legend .legend-elevated { background: #df9131; }
.risk-map-legend .legend-medium { background: #7fa9d5; }
.risk-map-legend .legend-low { background: #c5d9ed; }
.risk-map-legend .legend-direction { border-top-color: #bd7431; }
.risk-map-legend .legend-direction::after { border-left-color: #bd7431; }
.risk-direction-note {
    color: #66788c;
    border-color: #dce4ec;
    border-left-color: #bd7431;
    background: rgba(255,255,255,.94);
    box-shadow: 0 2px 8px rgba(30,55,82,.05);
}

.risk-priority-head {
    color: #8291a2;
    background: #f7f9fc;
    border-bottom-color: #e4eaf1;
}
.risk-priority-row { min-height: 54px; border-bottom-color: #e8edf3; }
.risk-priority-row:hover { background: #f7f9fc; }
.risk-priority-row.active { background: #fffaf0; box-shadow: inset 3px 0 0 #d3aa3d; }
.risk-priority-rank { color: #8998a8; }
.risk-priority-row:nth-child(-n+3) .risk-priority-rank { color: #9d761e; }
.risk-priority-name strong { color: #24384f; }
.risk-priority-name small { color: #8796a6; }
.risk-priority-score small { color: inherit; }
.risk-high-text { color: #d9453e !important; }
.risk-elevated-text { color: #d6811a !important; }
.risk-medium-text { color: #3675b8 !important; }
.risk-low-text { color: #438c94 !important; }
.risk-delta-up { color: #d9534f; }
.risk-delta-down { color: #218a66; }
.risk-delta-flat { color: #728398; }

.risk-detail-panel { margin-top: 10px; }
.risk-detail-heading {
    min-height: 72px;
    padding: 10px 16px;
    border-bottom-color: #e4eaf1;
    background: #fbfcfe;
}
.risk-detail-heading > div:first-child > p,
.risk-detail-score > span,
.risk-detail-confidence > span { color: #8695a6; }
.risk-detail-heading h2 { color: #1b314c; }
.risk-detail-score strong, .risk-detail-confidence strong { color: #1f3652; }
.risk-detail-score small, .risk-detail-confidence small { color: #8190a1; }
.risk-recommended-action { color: #53677f; background: #fffaf1; border-left-color: #d7ad3d; }
.risk-detail-block { min-height: 216px; border-right-color: #e6ebf1; }
.risk-detail-block-title h3 { color: #344a63; }
.risk-detail-block-title span { color: #8998a8; }
.risk-factor-item span { color: #5f7186; }
.risk-factor-item strong { color: #334a63; }
.risk-factor-track { background: #edf1f5; }
.risk-trigger-list li { color: #596d84; }
.risk-trigger-list li::before { color: #60758c; border-color: #bac7d4; }
.risk-model-explain > p { color: #64768a; }
.risk-model-explain dl div { border-bottom-color: #e7ecf2; }
.risk-model-explain dt { color: #718297; }
.risk-model-explain dd { color: #354b63; }
.risk-model-explain > small { color: #9b761d; }

.risk-data-table th { color: #728397; background: #f7f9fc; }
.risk-data-table th, .risk-data-table td { border-bottom-color: #e8edf3; }
.risk-data-table td { color: #566a81; }
.risk-data-table tbody tr:hover, .risk-data-table tbody tr.active { background: #f7f9fc; }
.risk-city-link { color: #243a54; }
.risk-city-link:hover { color: #9a741d; }
.risk-page .risk-table-toggle { color: #66798f; border-color: #cbd6e1; background: #fff; }
.risk-page .risk-table-toggle:hover { color: #243a54; border-color: #aebdcd; background: #f7f9fc; }
.risk-footer { color: #8493a4; }
.risk-footer strong { color: #5e7187; }
.risk-page .loading-overlay { background: rgba(244,247,251,.76); }

@media (max-width: 1250px) {
    .risk-workspace { grid-template-columns: minmax(0, 1.9fr) minmax(325px, .9fr); }
}

@media (max-width: 980px) {
    .risk-workspace { grid-template-columns: 1fr; }
    .risk-map-stage { height: 470px; }
}

@media (max-width: 680px) {
    .risk-command-header { min-height: 0; padding: 15px 14px; }
    .risk-title-row h1 { font-size: 21px; }
    .risk-filter-strip { padding: 9px 14px; }
    .risk-dashboard { padding: 9px 10px 0; }
    .risk-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .risk-kpi { min-height: 96px; padding: 11px 12px; }
    .risk-kpi p { font-size: 11px; }
    .risk-kpi strong { font-size: 24px; }
    .risk-kpi small { display: none; }
    .risk-kpi > svg { width: 28px; height: 28px; }
    .risk-map-stage { height: 410px; }
    .risk-map-legend { left: 8px; top: 8px; }
    .risk-map-meta { gap: 1px; }
    .risk-hotspot-summary { font-size: 9px; }
    .risk-direction-summary { font-size: 8px; }
    .risk-map-panel .risk-panel-header {
        display: grid;
        grid-template-columns: 1fr;
        align-items: start;
        gap: 6px;
        padding: 9px 11px;
    }
    .risk-map-panel .risk-map-meta {
        width: 100%;
        align-items: flex-start;
        gap: 2px;
    }
    .risk-map-panel .risk-panel-meta { display: none; }
    .risk-direction-note {
        right: 8px;
        bottom: 8px;
        max-width: calc(100% - 16px);
        padding: 6px 8px;
        font-size: 8px;
    }
}

/* ── Risk page alignment with the shared site visual system ────── */
.risk-page {
    --risk-bg: #f0f2f7;
    --risk-surface: #ffffff;
    --risk-surface-strong: #f8f9fb;
    --risk-line: var(--border-color);
    --risk-line-soft: var(--border-light);
    --risk-text: var(--text-primary);
    --risk-muted: var(--text-secondary);
    --risk-subtle: var(--text-muted);
    background-color: #f0f2f7;
    background-image: url("../data/hubei-bg.svg");
    background-repeat: no-repeat;
    background-position: center 280px;
    background-size: 50% auto;
    background-attachment: fixed;
    color: var(--text-primary);
}
.risk-page .header {
    background: linear-gradient(180deg, #0c1f40 0%, #0a1f3f 100%);
    border-bottom: 2px solid #c9a84c;
    box-shadow: 0 2px 16px rgba(0,0,0,.3), 0 1px 3px rgba(201,168,76,.08);
}
.risk-page .header-nav a.active {
    color: #c9a84c;
    background: rgba(201,168,76,.12);
    box-shadow: none;
}

.risk-dashboard.main-container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 20px 28px;
}
.risk-dashboard .breadcrumb { margin-bottom: 20px; }

.risk-command-header.detail-header {
    min-height: 122px;
    margin-bottom: 20px;
    padding: 24px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow-card);
}
.risk-command-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 16px;
}
.risk-page-icon {
    flex: none;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eadcae;
    border-radius: var(--radius-md);
    color: #9a741d;
    background: #fffaf0;
}
.risk-page-icon svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.risk-title-row { gap: 12px; }
.risk-title-row h1 {
    color: var(--text-primary);
    font-size: 22px;
    line-height: 1.35;
    letter-spacing: 0;
    font-weight: 800;
}
.risk-model-version {
    min-height: 25px;
    padding: 2px 9px;
    border-color: #dfc878;
    border-radius: 12px;
    color: #8d6813;
    background: #fffaf0;
    font-size: 11px;
}
.risk-command-copy > p {
    max-width: 720px;
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
}
.risk-command-actions {
    max-width: 430px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 9px;
}
.risk-horizon-switch {
    border-color: var(--border-color);
    border-radius: var(--radius-sm);
    background: #fff;
}
.risk-horizon-switch button {
    min-width: 104px;
    height: 36px;
    padding: 0 16px;
    color: var(--text-secondary);
    border-right-color: var(--border-color);
    font-size: 13px;
}
.risk-horizon-switch button:hover { color: var(--text-primary); background: #f5f7fa; }
.risk-horizon-switch button.active {
    color: #fff;
    background: #162d5a;
    box-shadow: none;
}
.risk-caveat {
    color: var(--text-muted);
    font-size: 11px;
    white-space: normal;
    text-align: right;
}

.risk-filter-strip {
    min-height: 58px;
    margin-bottom: 20px;
    padding: 11px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow-card);
}
.risk-date-fields { gap: 9px; }
.risk-filter-title { color: var(--text-secondary); font-size: 13px; }
.risk-date-input.date-input {
    width: 140px;
    height: 34px;
    color: var(--text-primary);
    border-color: var(--border-color);
    border-radius: var(--radius-sm);
    background: #fff;
    color-scheme: light;
    font-size: 13px;
}
.risk-date-input.date-input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(53,104,212,.08);
}
.risk-date-separator { color: var(--text-muted); font-size: 13px; }
.risk-filter-primary.date-apply-btn,
.risk-filter-secondary.date-reset-btn {
    height: 34px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
}
.risk-filter-primary.date-apply-btn {
    color: #fff;
    border-color: #162d5a;
    background: #162d5a;
}
.risk-filter-primary.date-apply-btn:hover { background: #0f2348; }
.risk-filter-secondary.date-reset-btn {
    color: var(--text-muted);
    border-color: var(--border-color);
    background: #fff;
}
.risk-filter-secondary.date-reset-btn:hover {
    color: var(--text-primary);
    border-color: #c0c5d0;
}
.risk-model-meta {
    gap: 14px;
    color: var(--text-muted);
    font-size: 11px;
}
.risk-model-meta strong { color: var(--text-secondary); }
.risk-model-status { color: var(--text-secondary); }

.risk-kpi-grid {
    gap: 14px;
    margin-bottom: 20px;
}
.risk-kpi.stat-card {
    min-height: 122px;
    padding: 20px 22px;
    border-color: var(--border-color);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow-card);
}
.risk-kpi-alert { --card-accent: #dc3838; }
.risk-kpi-rise { --card-accent: #e68a00; }
.risk-kpi-province { --card-accent: #3568d4; }
.risk-kpi-confidence { --card-accent: #0fa896; }
.risk-kpi p { color: var(--text-secondary); font-size: 13px; font-weight: 600; }
.risk-kpi strong {
    margin-top: 6px;
    color: var(--text-primary);
    font-size: 32px;
}
.risk-kpi > div > span { color: var(--text-muted); font-size: 13px; }
.risk-kpi small { margin-top: 9px; color: var(--text-muted); font-size: 11px; }
.risk-kpi > svg { width: 42px; height: 42px; }
.risk-kpi-alert strong, .risk-kpi-alert > svg { color: var(--accent-red); }
.risk-kpi-rise strong, .risk-kpi-rise > svg { color: var(--accent-orange); }
.risk-kpi-province strong, .risk-kpi-province > svg { color: var(--accent-blue); }
.risk-kpi-confidence strong, .risk-kpi-confidence > svg { color: var(--accent-teal); }

.risk-panel {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow-card);
}
.risk-workspace {
    grid-template-columns: minmax(0, 2fr) minmax(390px, .9fr);
    gap: 20px;
}
.risk-panel-header {
    min-height: 76px;
    padding: 16px 20px;
    border-bottom-color: var(--border-light);
}
.risk-panel-header h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0;
}
.risk-panel-header h2::before {
    content: "";
    flex: none;
    width: 4px;
    height: 18px;
    border-radius: 2px;
    background: linear-gradient(180deg, #c9a84c, #e0c878);
}
.risk-panel-header h2 span { color: var(--text-secondary); font-weight: 600; }
.risk-panel-header p { margin: 4px 0 0 12px; color: var(--text-muted); font-size: 12px; }
.risk-panel-meta { color: var(--text-muted); font-size: 11px; }
.risk-hotspot-summary { color: var(--text-secondary); font-size: 11px; }
.risk-direction-summary { color: #9a681f; font-size: 10px; }
.risk-direction-summary.is-weak { color: var(--text-muted); }
.risk-resolution-meta {
    max-width: 100%;
    color: #8a6419;
    font-size: 10px;
    line-height: 1.35;
    text-align: right;
}
.risk-resolution-meta.is-coordinate { color: #247a76; }
.risk-resolution-meta.is-fallback { color: #8a6419; }
.risk-map-stage { height: 536px; background: #fff; }
.risk-map-legend {
    left: 18px;
    top: 18px;
    gap: 8px;
    padding: 11px 12px;
    border-color: var(--border-color);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,.95);
    box-shadow: var(--shadow-card);
    backdrop-filter: none;
}
.risk-map-legend span { color: var(--text-secondary); font-size: 11px; }
.risk-map-legend b { color: var(--text-muted); font-size: 10px; }
.risk-map-legend .legend-high { background: #c94b45; }
.risk-map-legend .legend-elevated { background: #df9131; }
.risk-map-legend .legend-medium { background: #7fa9d5; }
.risk-map-legend .legend-low { background: #c5d9ed; }
.risk-map-legend .risk-surface-legend { gap: 6px; }
.risk-map-legend .risk-surface-legend em {
    color: inherit;
    font-style: normal;
    white-space: nowrap;
}
.risk-map-legend .legend-surface {
    width: 28px;
    height: 8px;
    border-radius: 5px;
    background: linear-gradient(90deg, #7fa9d5 0%, #f0c160 52%, #c94b45 100%);
    box-shadow: inset 0 0 0 1px rgba(22,45,90,.08);
}
.risk-map-legend .risk-surface-legend.is-fallback .legend-surface {
    opacity: .72;
    filter: saturate(.68);
}
.risk-map-legend .legend-direction { border-top-color: #bd7431; }
.risk-map-legend .legend-direction::after { border-left-color: #bd7431; }
.risk-direction-note {
    right: 14px;
    bottom: 13px;
    max-width: 390px;
    padding: 8px 10px;
    color: var(--text-secondary);
    border-color: var(--border-color);
    border-left-color: #bd7431;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,.95);
    box-shadow: var(--shadow-card);
    font-size: 10px;
}

.risk-priority-head {
    height: 34px;
    grid-template-columns: minmax(145px, 1fr) 86px 62px;
    padding: 0 16px;
    color: var(--text-muted);
    border-bottom-color: var(--border-light);
    background: #f8f9fb;
    font-size: 10px;
    text-transform: none;
}
.risk-priority-row {
    min-height: 62px;
    grid-template-columns: minmax(145px, 1fr) 86px 62px;
    padding: 9px 16px;
    border-bottom-color: var(--border-light);
}
.risk-priority-row:hover { background: #f6f9fd; }
.risk-priority-row.active { background: #fffaf0; box-shadow: inset 3px 0 0 #c9a84c; }
.risk-priority-rank { color: var(--text-muted); font-size: 12px; }
.risk-priority-row:nth-child(-n+3) .risk-priority-rank { color: #9a741d; }
.risk-priority-name strong { color: var(--text-primary); font-size: 13px; }
.risk-priority-name small { margin-top: 3px; color: var(--text-muted); font-size: 10px; }
.risk-priority-score strong { font-size: 18px; }
.risk-priority-score small { font-size: 10px; }
.risk-priority-delta { font-size: 12px; }
.risk-high-text { color: #d9453e !important; }
.risk-elevated-text { color: #d6811a !important; }
.risk-medium-text { color: #3675b8 !important; }
.risk-low-text { color: #438c94 !important; }
.risk-delta-up { color: #d9534f; }
.risk-delta-down { color: #218a66; }
.risk-delta-flat { color: var(--text-muted); }

.risk-detail-panel { margin-top: 20px; }
.risk-detail-heading {
    min-height: 96px;
    grid-template-columns: minmax(210px, .85fr) 140px 170px minmax(320px, 1.35fr);
    gap: 24px;
    padding: 16px 20px;
    border-bottom-color: var(--border-light);
    background: #fbfcfe;
}
.risk-detail-heading > div:first-child > p,
.risk-detail-score > span,
.risk-detail-confidence > span { color: var(--text-muted); font-size: 11px; }
.risk-detail-heading h2 { margin-top: 4px; color: var(--text-primary); font-size: 20px; }
.risk-level-badge {
    height: 24px;
    padding: 0 9px;
    border-radius: 12px;
    font-size: 11px;
}
.risk-level-badge.high { color: #b92f2a; background: #fef2f2; border-color: #fecaca; }
.risk-level-badge.elevated { color: #b36a10; background: #fff7e8; border-color: #f6d39e; }
.risk-level-badge.medium { color: #2d68a7; background: #eef6ff; border-color: #c9def4; }
.risk-level-badge.low { color: #247a76; background: #edf9f7; border-color: #bfe3dd; }
.risk-level-badge.unknown { color: var(--text-secondary); background: #f5f7fa; border-color: var(--border-color); }
.risk-detail-score strong,
.risk-detail-confidence strong { margin-top: 3px; color: var(--text-primary); font-size: 24px; }
.risk-detail-score small,
.risk-detail-confidence small { color: var(--text-muted); font-size: 10px; }
.risk-recommended-action {
    padding: 11px 14px;
    color: var(--text-secondary);
    border-left-color: #c9a84c;
    background: #fffaf0;
    font-size: 12px;
}
.risk-detail-block {
    min-height: 260px;
    padding: 18px 20px 20px;
    border-right-color: var(--border-light);
}
.risk-detail-block-title h3 { color: var(--text-primary); font-size: 14px; font-weight: 700; }
.risk-detail-block-title span { color: var(--text-muted); font-size: 11px; }
.risk-trend-chart { height: 210px; }
.risk-factor-list { gap: 12px; margin-top: 20px; }
.risk-factor-item { grid-template-columns: 70px minmax(0,1fr) 34px; gap: 9px; }
.risk-factor-item span { color: var(--text-secondary); font-size: 11px; }
.risk-factor-item strong { color: var(--text-primary); font-size: 11px; }
.risk-factor-track { height: 8px; background: #edf1f5; }
.risk-trigger-list { gap: 12px; margin-top: 20px; }
.risk-trigger-list li { padding-left: 26px; color: var(--text-secondary); font-size: 11px; line-height: 1.6; }
.risk-trigger-list li::before { color: var(--text-secondary); border-color: #bac7d4; font-size: 9px; }
.risk-model-explain > p { margin-top: 17px; color: var(--text-secondary); font-size: 11px; line-height: 1.75; }
.risk-model-explain dl { gap: 7px 16px; margin-top: 13px; }
.risk-model-explain dl div { border-bottom-color: var(--border-light); }
.risk-model-explain dt { color: var(--text-muted); font-size: 10px; }
.risk-model-explain dd { color: var(--text-primary); font-size: 10px; }
.risk-model-explain > small { margin-top: 13px; color: #9a741d; font-size: 10px; }

.risk-table-panel { margin-top: 20px; }
.risk-data-table th,
.risk-data-table td {
    padding: 12px 16px;
    border-bottom-color: var(--border-color);
}
.risk-data-table th {
    color: var(--text-primary);
    background: linear-gradient(180deg, #f8f9fb, #f0f2f7);
    border-bottom: 2px solid #c9a84c;
    font-size: 13px;
    font-weight: 700;
}
.risk-data-table td { color: var(--text-primary); font-size: 13px; }
.risk-data-table tbody tr:nth-child(even) { background: #fafbfd; }
.risk-data-table tbody tr:hover,
.risk-data-table tbody tr.active { background: #f0f4fa; }
.risk-city-link { color: var(--text-primary); font-size: 13px; }
.risk-city-link:hover { color: var(--accent-blue); }
.risk-page .risk-table-toggle {
    height: 34px;
    padding: 0 14px;
    color: var(--text-secondary);
    border-color: var(--border-color);
    border-radius: var(--radius-sm);
    background: #fff;
    font-size: 12px;
}
.risk-page .risk-table-toggle:hover {
    color: var(--text-primary);
    border-color: #c0c5d0;
    background: #f5f7fa;
}

.risk-footer.footer {
    min-height: auto;
    margin-top: 20px;
    padding: 14px 24px;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    border-top: 2px solid #c9a84c;
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow-card);
    font-size: 13px;
}
.risk-footer strong { color: var(--text-secondary); font-weight: 600; }
.risk-footer > span:first-child { display: flex; align-items: center; }
.risk-page .loading-overlay { background: rgba(240,242,245,.72); }

@media (max-width: 1250px) {
    .risk-command-header.detail-header { align-items: flex-start; }
    .risk-command-actions { gap: 10px; }
    .risk-caveat { display: none; }
    .risk-model-meta span:last-child { display: none; }
    .risk-workspace { grid-template-columns: minmax(0, 1.65fr) minmax(350px, .9fr); }
    .risk-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .risk-detail-block:nth-child(2) { border-right: 0; }
    .risk-detail-block:nth-child(-n+2) { border-bottom: 1px solid var(--border-light); }
}

@media (max-width: 980px) {
    .risk-command-header.detail-header { flex-direction: column; gap: 18px; }
    .risk-command-actions { width: 100%; max-width: none; align-items: flex-start; }
    .risk-filter-strip { align-items: flex-start; flex-direction: column; gap: 10px; }
    .risk-model-meta { width: 100%; flex-wrap: wrap; white-space: normal; }
    .risk-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .risk-workspace { grid-template-columns: 1fr; }
    .risk-map-stage { height: 500px; }
    .risk-priority-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .risk-priority-row:nth-child(odd) { border-right: 1px solid var(--border-light); }
    .risk-detail-heading { grid-template-columns: minmax(190px,1fr) 120px 150px; }
    .risk-recommended-action { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
    .risk-dashboard.main-container { padding: 12px; }
    .risk-dashboard .breadcrumb { margin-bottom: 12px; }
    .risk-command-header.detail-header { min-height: 0; padding: 18px; margin-bottom: 14px; }
    .risk-command-main { align-items: flex-start; gap: 12px; }
    .risk-page-icon { width: 46px; height: 46px; }
    .risk-page-icon svg { width: 26px; height: 26px; }
    .risk-title-row { align-items: flex-start; gap: 7px; }
    .risk-title-row h1 { font-size: 20px; }
    .risk-model-version { font-size: 10px; }
    .risk-command-copy > p { font-size: 11px; line-height: 1.6; }
    .risk-command-actions,
    .risk-horizon-switch { width: 100%; }
    .risk-horizon-switch button { width: 100%; min-width: 0; }
    .risk-filter-strip { margin-bottom: 14px; padding: 14px; }
    .risk-date-fields { width: 100%; display: grid; grid-template-columns: 1fr auto 1fr; }
    .risk-filter-title { grid-column: 1 / -1; }
    .risk-date-input.date-input { width: 100%; min-width: 0; }
    .risk-filter-primary.date-apply-btn { grid-column: 1; width: 100%; }
    .risk-filter-secondary.date-reset-btn { grid-column: 3; width: 100%; }
    .risk-model-meta { gap: 5px 12px; }
    .risk-model-meta span:last-child { display: inline; }
    .risk-kpi-grid { gap: 10px; margin-bottom: 14px; }
    .risk-kpi.stat-card { min-height: 108px; padding: 16px; }
    .risk-kpi p { font-size: 11px; }
    .risk-kpi strong { font-size: 27px; }
    .risk-kpi small { display: none; }
    .risk-kpi > svg { width: 32px; height: 32px; }
    .risk-workspace { gap: 14px; }
    .risk-panel { border-radius: var(--radius-md); }
    .risk-panel-header { min-height: 68px; padding: 14px 16px; }
    .risk-panel-header h2 { font-size: 15px; }
    .risk-panel-header p { margin-left: 12px; font-size: 10px; }
    .risk-map-panel .risk-panel-header { display: grid; grid-template-columns: 1fr; gap: 8px; }
    .risk-map-panel .risk-map-meta { width: 100%; align-items: flex-start; gap: 3px; }
    .risk-map-panel .risk-panel-meta { display: none; }
    .risk-resolution-meta { text-align: left; white-space: normal; }
    .risk-map-stage { height: 420px; }
    .risk-map-legend { left: 9px; top: 9px; gap: 5px; padding: 8px; }
    .risk-map-legend span { font-size: 9px; }
    .risk-map-legend b { display: none; }
    .risk-direction-note { right: 8px; bottom: 8px; max-width: calc(100% - 16px); padding: 6px 8px; font-size: 8px; }
    .risk-priority-list { grid-template-columns: 1fr; }
    .risk-priority-row:nth-child(odd) { border-right: 0; }
    .risk-detail-panel,
    .risk-table-panel { margin-top: 14px; }
    .risk-detail-heading { grid-template-columns: 1fr 1fr; gap: 14px; padding: 16px; }
    .risk-detail-heading > div:first-child { grid-column: 1 / -1; }
    .risk-detail-grid { grid-template-columns: 1fr; }
    .risk-detail-block { min-height: 0; padding: 16px; border-right: 0; border-bottom: 1px solid var(--border-light); }
    .risk-detail-block:last-child { border-bottom: 0; }
    .risk-trend-chart { height: 220px; }
    .risk-footer.footer { align-items: center; gap: 8px; margin-top: 14px; padding: 14px; text-align: center; }
}

/* Final v1.3 cascade: keep the established light theme while enlarging the map. */
.risk-workspace {
    grid-template-columns: minmax(0, 2.75fr) minmax(320px, .75fr);
    gap: 16px;
    align-items: stretch;
}
.risk-map-stage { height: 640px; }
.risk-map-legend .risk-surface-legend.is-evidence .legend-surface {
    background: linear-gradient(90deg, #edf2f7 0%, #97bddb 48%, #257f85 100%);
    opacity: 1;
    filter: none;
}
.risk-priority-panel {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
}
.risk-priority-panel .risk-priority-list {
    height: 100%;
    display: grid;
    grid-template-rows: repeat(8, minmax(60px, 1fr));
}
.risk-priority-panel .risk-priority-row { min-height: 0; }
.risk-workspace.is-report-mode { grid-template-columns: minmax(0, 1fr); }
.risk-workspace.is-report-mode .risk-priority-panel { display: none; }
.risk-workspace.is-report-mode .risk-map-stage {
    height: min(74vh, 780px);
    min-height: 660px;
}

@media (max-width: 1320px) {
    .risk-workspace { grid-template-columns: minmax(0, 2.2fr) minmax(320px, .8fr); }
    .risk-map-stage { height: 620px; }
}

@media (max-width: 980px) {
    .risk-workspace { grid-template-columns: 1fr; }
    .risk-priority-panel { display: block; }
    .risk-priority-panel .risk-priority-list {
        height: auto;
        grid-template-rows: none;
    }
    .risk-workspace.is-report-mode .risk-map-stage { min-height: 600px; }
}

@media (max-width: 680px) {
    .risk-map-stage { height: 500px; }
    .risk-workspace.is-report-mode .risk-map-stage { height: 66vh; min-height: 520px; }
}

/* Live meteorological context and conservative weather modifier (v1.4). */
.risk-weather-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #247a76;
    font-weight: 650;
    white-space: nowrap;
}
.risk-weather-live-dot {
    flex: none;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #18a685;
    box-shadow: 0 0 0 3px rgba(24,166,133,.12);
    animation: risk-weather-pulse 2.4s ease-out infinite;
}
.risk-weather-status[data-state="monitoring_data_stale"],
.risk-weather-status[data-state="unsupported_pathogen"],
.risk-weather-status[data-state="no_surveillance_data"] { color: #9a681f; }
.risk-weather-status[data-state="monitoring_data_stale"] .risk-weather-live-dot,
.risk-weather-status[data-state="unsupported_pathogen"] .risk-weather-live-dot,
.risk-weather-status[data-state="no_surveillance_data"] .risk-weather-live-dot {
    background: #d69a2d;
    box-shadow: 0 0 0 3px rgba(214,154,45,.13);
}
.risk-weather-status[data-state="unavailable"] { color: var(--text-muted); }
.risk-weather-status[data-state="unavailable"] .risk-weather-live-dot {
    background: #9aa9b8;
    box-shadow: none;
    animation: none;
}
@keyframes risk-weather-pulse {
    0% { box-shadow: 0 0 0 0 rgba(24,166,133,.28); }
    70%, 100% { box-shadow: 0 0 0 7px rgba(24,166,133,0); }
}
@media (prefers-reduced-motion: reduce) {
    .risk-weather-live-dot { animation: none; }
}

.risk-weather-meta {
    color: #26768b;
    font-size: 10px;
    font-weight: 600;
}
.risk-map-legend .legend-weather {
    width: 34px;
    height: 8px;
    border-radius: 5px;
    background: linear-gradient(90deg, #d9eaf3 0%, #6da9c1 48%, #dfa242 76%, #bd5548 100%);
    box-shadow: inset 0 0 0 1px rgba(22,45,90,.09);
}
.risk-map-legend .risk-weather-legend {
    align-items: center;
    gap: 6px;
}
.risk-weather-contribution-legend > i {
    width: 10px;
    height: 10px;
    border: 2px solid #fff4d7;
    border-radius: 50%;
    background: #d65d42;
    box-shadow: 0 0 0 3px rgba(214,93,66,.18);
    animation: risk-weather-pulse-contribution 2.2s ease-out infinite;
}
@keyframes risk-weather-pulse-contribution {
    0% { box-shadow: 0 0 0 0 rgba(214,93,66,.34); }
    70%, 100% { box-shadow: 0 0 0 7px rgba(214,93,66,0); }
}
@media (prefers-reduced-motion: reduce) {
    .risk-weather-contribution-legend > i { animation: none; }
}

.risk-weather-detail {
    display: grid;
    grid-template-columns: minmax(210px, .65fr) minmax(0, 2.35fr);
    gap: 9px 20px;
    padding: 13px 20px 11px;
    border-bottom: 1px solid var(--border-light);
    background: #f7fafc;
}
.risk-weather-detail-title {
    display: grid;
    grid-template-columns: auto 1fr;
    align-content: center;
    gap: 3px 8px;
    min-width: 0;
}
.risk-weather-detail-title > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 700;
}
.risk-weather-detail-title strong {
    align-self: center;
    color: #247a76;
    font-size: 11px;
    font-weight: 700;
    text-align: right;
}
.risk-weather-detail-title small {
    grid-column: 1 / -1;
    color: var(--text-muted);
    font-size: 9px;
}
.risk-weather-detail[data-state="context"] .risk-weather-detail-title strong { color: #9a681f; }
.risk-weather-detail[data-state="context"] .risk-weather-live-dot {
    background: #d69a2d;
}
.risk-weather-detail[data-state="unavailable"] .risk-weather-detail-title strong { color: var(--text-muted); }
.risk-weather-detail[data-state="unavailable"] .risk-weather-live-dot {
    background: #9aa9b8;
    box-shadow: none;
    animation: none;
}
.risk-weather-detail dl {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    min-width: 0;
}
.risk-weather-detail dl > div {
    min-width: 0;
    padding: 0 12px;
    border-left: 1px solid var(--border-light);
}
.risk-weather-detail dt {
    color: var(--text-muted);
    font-size: 9px;
    line-height: 1.3;
}
.risk-weather-detail dd {
    overflow: hidden;
    margin-top: 4px;
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.risk-weather-live-context {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px 13px;
    padding: 7px 10px;
    border: 1px solid #dce9ef;
    border-radius: 5px;
    background: #f1f7fa;
    color: #536980;
    font-size: 9px;
}
.risk-weather-live-context > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #26768b;
    font-weight: 700;
    white-space: nowrap;
}
.risk-weather-live-context > strong {
    overflow: hidden;
    color: #29445f;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.risk-weather-live-context > small {
    color: var(--text-muted);
    white-space: nowrap;
}
.risk-weather-live-context[data-state="unavailable"] { opacity: .6; }
.risk-weather-live-context[data-state="unavailable"] .risk-weather-live-dot {
    background: #9aa9b8;
    box-shadow: none;
    animation: none;
}
.risk-weather-detail > p {
    grid-column: 1 / -1;
    padding-top: 7px;
    color: #66798e;
    border-top: 1px dashed #d9e1e9;
    font-size: 9px;
    line-height: 1.45;
}
.risk-factor-item { grid-template-columns: 118px minmax(0,1fr) 38px; }
.risk-factor-item:nth-child(6) .risk-factor-fill { background: #2f8fa1; }
.risk-factor-item.is-context:nth-child(6) .risk-factor-fill { background: #c99a3d; }
.risk-factor-item.is-context span { color: #8a681f; }
.risk-factor-item.is-unavailable { opacity: .52; }
.risk-weather-table-state { color: #8a681f !important; font-size: 11px !important; }
.risk-weather-table-state.is-integrated { color: #247a76 !important; font-weight: 700; }

@media (max-width: 1320px) {
    .risk-weather-detail {
        grid-template-columns: 1fr;
    }
    .risk-weather-detail-title {
        grid-template-columns: auto 1fr auto;
    }
    .risk-weather-detail-title small { grid-column: auto; align-self: center; text-align: right; }
    .risk-weather-detail dl > div:first-child { border-left: 0; }
}

@media (max-width: 680px) {
    .risk-weather-status { width: 100%; white-space: normal; }
    .risk-map-view-switch button { font-size: 9px; }
    .risk-weather-meta { width: 100%; }
    .risk-weather-detail { gap: 11px; padding: 13px 12px 11px; }
    .risk-weather-detail-title { grid-template-columns: 1fr auto; }
    .risk-weather-detail-title small { grid-column: 1 / -1; text-align: left; }
    .risk-weather-detail dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .risk-weather-detail dl > div {
        padding: 8px 9px;
        border-left: 0;
        border-top: 1px solid var(--border-light);
    }
    .risk-weather-detail dl > div:nth-child(even) { border-left: 1px solid var(--border-light); }
    .risk-weather-detail dd { white-space: normal; }
    .risk-weather-live-context { grid-template-columns: auto 1fr; gap: 5px 9px; }
    .risk-weather-live-context > strong { text-align: right; white-space: normal; }
    .risk-weather-live-context > small { grid-column: 1 / -1; }
    .risk-factor-item { grid-template-columns: 110px minmax(0,1fr) 34px; }
}

/* Coordinate-first spatial analysis and county screening (v1.6). */
.risk-map-view-switch button:disabled {
    color: #aab5c1;
    background: #f4f6f8;
    cursor: not-allowed;
    opacity: .72;
}
.risk-spatial-notice {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 66px;
    padding: 11px 18px;
    border-bottom: 1px solid #e8dfc4;
    background: linear-gradient(90deg, #fffaf0 0%, #fffdf8 62%, #f8fbfd 100%);
}
.risk-spatial-notice[hidden] { display: none; }
.risk-spatial-notice-icon {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    color: #8b6719;
    border: 1px solid #d9bd6c;
    border-radius: 50%;
    font: 750 13px/1 Georgia, serif;
    background: #fff;
}
.risk-spatial-notice strong {
    color: #2b3e54;
    font-size: 12px;
}
.risk-spatial-notice p {
    margin-top: 3px;
    color: #65768a;
    font-size: 10px;
    line-height: 1.5;
}
.risk-spatial-notice > a {
    padding: 7px 11px;
    color: #294e80;
    border: 1px solid #b9c9db;
    border-radius: 4px;
    background: #fff;
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.risk-spatial-notice > a:hover {
    color: #173d70;
    border-color: #8fa8c3;
    background: #f7fafd;
}

.risk-priority-mode,
.risk-table-mode {
    display: inline-flex;
    overflow: hidden;
    flex: none;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background: #f6f8fa;
}
.risk-priority-mode button,
.risk-table-mode button {
    min-width: 48px;
    height: 28px;
    padding: 0 9px;
    color: var(--text-muted);
    border: 0;
    border-right: 1px solid var(--border-color);
    background: transparent;
    font-size: 10px;
    font-weight: 650;
    cursor: pointer;
}
.risk-priority-mode button:last-child,
.risk-table-mode button:last-child { border-right: 0; }
.risk-priority-mode button.active,
.risk-table-mode button.active {
    color: #fff;
    background: #233d63;
}
.risk-priority-panel .risk-panel-header {
    gap: 10px;
}
.risk-priority-panel .risk-panel-header > div:first-child {
    min-width: 0;
}
.risk-priority-name strong,
.risk-priority-name small {
    overflow: hidden;
    display: block;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.risk-table-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}
.risk-data-quality {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 7px;
    color: #537369;
    border: 1px solid #c8ddd5;
    border-radius: 11px;
    background: #f3faf7;
    font-size: 10px;
    font-weight: 650;
}
.risk-data-quality.is-normalized {
    color: #6c6287;
    border-color: #d9d2e7;
    background: #f8f6fb;
}
.risk-data-quality.is-warning {
    color: #93651e;
    border-color: #ead4a8;
    background: #fff9ec;
}
.risk-table-wrapper { overflow-x: auto; }
.risk-table-panel .risk-data-table { min-width: 900px; }

@media (max-width: 980px) {
    .risk-priority-panel .risk-panel-header { align-items: center; }
}

@media (max-width: 680px) {
    .risk-spatial-notice {
        grid-template-columns: 26px minmax(0, 1fr);
        padding: 10px 12px;
    }
    .risk-spatial-notice > a {
        grid-column: 2;
        justify-self: start;
    }
    .risk-priority-panel .risk-panel-header,
    .risk-table-panel .risk-panel-header {
        align-items: flex-start;
        flex-direction: column;
    }
    .risk-table-actions { width: 100%; justify-content: space-between; }
    .risk-priority-mode button,
    .risk-table-mode button { min-width: 56px; }
}

/* Risk-intensity and meteorology visualization refinements (v1.8). */
.risk-weather-visual-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border-bottom: 1px solid var(--border-light);
    background: linear-gradient(90deg, #f7fbfd 0%, #fffdf7 100%);
}
.risk-weather-visual-summary[hidden] { display: none !important; }
.risk-weather-visual-summary > div {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 9px;
    align-items: center;
    min-height: 62px;
    padding: 10px 14px;
    border-right: 1px solid var(--border-light);
}
.risk-weather-visual-summary > div:last-child { border-right: 0; }
.risk-weather-visual-summary span {
    align-self: end;
    color: var(--text-muted);
    font-size: 9px;
    line-height: 1.25;
}
.risk-weather-visual-summary strong {
    align-self: start;
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 750;
    white-space: nowrap;
}
.weather-summary-icon {
    grid-row: 1 / 3;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 1px solid transparent;
    border-radius: 50%;
    font-style: normal;
    font-size: 10px;
    font-weight: 800;
}
.weather-summary-icon.temperature { color: #b96135; border-color: #e9c8b6; background: #fff5ef; }
.weather-summary-icon.humidity { color: #397ead; border-color: #bfd8e8; background: #f0f8fc; }
.weather-summary-icon.rain { color: #2f759d; border-color: #bfd5e3; background: #eef7fb; }
.weather-summary-icon.wind { color: #397d78; border-color: #bddbd5; background: #eff9f7; }
.weather-summary-icon.effect { color: #95661e; border-color: #e2c98e; background: #fff9e9; }
.risk-weather-visual-summary[data-effect="positive"] > div:last-child strong { color: #bd6825; }
.risk-weather-visual-summary[data-effect="negative"] > div:last-child strong { color: #3479b4; }
.risk-weather-visual-summary[data-effect="negative"] .weather-summary-icon.effect {
    color: #3479b4;
    border-color: #bdd4e8;
    background: #f1f7fc;
}
.risk-map-legend .risk-weather-contribution-legend > i.weather-positive {
    background: #e8842e;
    box-shadow: 0 0 0 3px rgba(232,132,46,.16);
}
.risk-map-legend .risk-weather-contribution-legend > i.weather-negative {
    background: #3f88c5;
    box-shadow: 0 0 0 3px rgba(63,136,197,.16);
}
.risk-map-legend .risk-intensity-anchor-legend > i {
    width: 9px;
    height: 9px;
    border: 1.5px solid #fff;
    border-radius: 50%;
    background: #d95948;
    box-shadow: 0 0 0 1px #b6c4d2;
}

@media (max-width: 980px) {
    .risk-weather-visual-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .risk-weather-visual-summary > div:nth-child(3) { border-right: 0; }
    .risk-weather-visual-summary > div:nth-child(-n+3) { border-bottom: 1px solid var(--border-light); }
}

@media (max-width: 680px) {
    .risk-weather-visual-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .risk-weather-visual-summary > div,
    .risk-weather-visual-summary > div:nth-child(3) {
        min-height: 56px;
        padding: 8px 10px;
        border-right: 1px solid var(--border-light);
        border-bottom: 1px solid var(--border-light);
    }
    .risk-weather-visual-summary > div:nth-child(even) { border-right: 0; }
    .risk-weather-visual-summary > div:last-child { border-bottom: 0; }
    .risk-weather-visual-summary strong { font-size: 11px; }
}

/* Scientific model semantics and audit trail (v1.9). */
.risk-model-stage {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 8px;
    color: #9a5d2a;
    border: 1px solid #e6c8aa;
    border-radius: 12px;
    background: #fff7ef;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.risk-scientific-framework {
    display: grid;
    grid-template-columns: 208px minmax(0, 1fr);
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    border-left: 4px solid #c9a84c;
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow-card);
}
.risk-scientific-heading {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 15px 17px;
    border-right: 1px solid var(--border-light);
    background: linear-gradient(145deg, #fffdf7 0%, #f8fafc 100%);
}
.risk-scientific-heading p {
    margin: 0 0 3px;
    color: #9b7a2a;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 1.3px;
}
.risk-scientific-heading h2 {
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 750;
    line-height: 1.35;
}
.risk-scientific-heading > span {
    align-self: flex-start;
    padding: 3px 7px;
    color: #765e26;
    border: 1px solid #e7d9b7;
    border-radius: 10px;
    background: #fffaf0;
    font-size: 9px;
    font-weight: 700;
}
.risk-scientific-flow {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr) 16px) minmax(0, 1fr);
    align-items: stretch;
    min-height: 76px;
}
.risk-scientific-flow > div {
    position: relative;
    min-width: 0;
    padding: 11px 9px 9px 13px;
}
.risk-scientific-flow > div > b {
    position: absolute;
    right: 8px;
    top: 8px;
    color: #c6d1dd;
    font-size: 10px;
    font-variant-numeric: tabular-nums;
}
.risk-scientific-flow span {
    display: block;
    color: var(--text-muted);
    font-size: 9px;
}
.risk-scientific-flow strong {
    display: block;
    overflow: hidden;
    margin-top: 4px;
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.risk-scientific-flow small {
    display: block;
    margin-top: 4px;
    color: #8392a3;
    font-size: 8px;
    line-height: 1.35;
}
.risk-scientific-flow > i {
    align-self: center;
    color: #b3c0cd;
    font-size: 14px;
    font-style: normal;
    text-align: center;
}
.risk-scientific-boundary {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    min-height: 48px;
    padding: 8px 14px 8px 17px;
    border-top: 1px solid var(--border-light);
    background: #f8fafc;
}
.risk-scientific-boundary > p {
    max-width: 610px;
    color: var(--text-secondary);
    font-size: 9px;
    line-height: 1.5;
}
.risk-scientific-boundary > p strong { color: #7f6220; }
.risk-validation-gates {
    display: flex;
    justify-content: flex-end;
    gap: 5px;
    flex-wrap: wrap;
}
.risk-validation-gates span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 20px;
    padding: 2px 6px;
    color: #667789;
    border: 1px solid #d7dfe8;
    border-radius: 10px;
    background: #fff;
    font-size: 8px;
    white-space: nowrap;
}
.risk-validation-gates span > i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #d39333;
}
.risk-validation-gates span[data-state="ready"] > i { background: #2b9a78; }
.risk-validation-gates span[data-state="limited"] > i { background: #d39333; }
.risk-validation-gates span > b { color: inherit; font-weight: 750; }

.risk-backtest-summary {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    border-top: 1px solid var(--border-light);
    background: #fff;
}
.risk-backtest-summary > div {
    min-width: 0;
    min-height: 67px;
    padding: 10px 12px;
    border-right: 1px solid var(--border-light);
}
.risk-backtest-summary > div:nth-child(6) { border-right: 0; }
.risk-backtest-summary span,
.risk-backtest-summary small {
    display: block;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 8px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.risk-backtest-summary strong {
    display: block;
    overflow: hidden;
    margin: 4px 0 2px;
    color: #274a68;
    font: 750 12px var(--font-mono);
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.risk-backtest-summary > div:nth-child(2) strong {
    font-family: var(--font-sans);
    font-size: 10px;
}
.risk-backtest-summary > p {
    grid-column: 1 / -1;
    margin: 0;
    padding: 7px 12px;
    color: #65788b;
    border-top: 1px dashed #dfe6ed;
    background: #f8fbfd;
    font-size: 8px;
    line-height: 1.45;
}
.risk-backtest-summary[data-state="insufficient"] strong { color: #8b6a2a; }

.risk-weather-method-chain {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 7px 14px;
    border-bottom: 1px solid var(--border-light);
    background: #f8fbfd;
}
.risk-weather-method-chain[hidden] { display: none !important; }
.risk-weather-method-chain > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #38566f;
    font-size: 9px;
    font-weight: 700;
    white-space: nowrap;
}
.risk-weather-method-chain > span b {
    display: grid;
    place-items: center;
    width: 17px;
    height: 17px;
    color: #fff;
    border-radius: 50%;
    background: #477b9c;
    font-size: 8px;
}
.risk-weather-method-chain > i {
    color: #9cafbd;
    font-size: 11px;
    font-style: normal;
}
.risk-weather-method-chain > small {
    margin-left: auto;
    max-width: 300px;
    color: #8d6a2b;
    font-size: 8px;
    line-height: 1.4;
    text-align: right;
}

.risk-method-audit {
    margin-top: 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow-card);
}
.risk-method-audit summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    padding: 12px 18px;
    cursor: pointer;
    list-style: none;
}
.risk-method-audit summary::-webkit-details-marker { display: none; }
.risk-method-audit summary > span strong {
    display: block;
    color: var(--text-primary);
    font-size: 13px;
}
.risk-method-audit summary > span small {
    display: block;
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 10px;
}
.risk-method-audit summary > b {
    padding: 4px 8px;
    color: #496b76;
    border: 1px solid #c9dce0;
    border-radius: 11px;
    background: #f1f8f8;
    font-size: 9px;
}
.risk-method-audit summary::after {
    content: "+";
    margin-left: 9px;
    color: #738397;
    font-size: 18px;
}
.risk-method-audit[open] summary::after { content: "−"; }
.risk-method-audit-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--border-light);
}
.risk-method-audit-grid article {
    min-height: 118px;
    padding: 15px 17px;
    border-right: 1px solid var(--border-light);
}
.risk-method-audit-grid article:last-child { border-right: 0; }
.risk-method-audit-grid h3 {
    color: var(--text-primary);
    font-size: 11px;
}
.risk-method-audit-grid p {
    margin-top: 7px;
    color: var(--text-secondary);
    font-size: 9px;
    line-height: 1.65;
}
.risk-method-references p { display: flex; flex-direction: column; gap: 4px; }
.risk-method-references a { color: #315f89; text-decoration: none; }
.risk-method-references a:hover { text-decoration: underline; }

@media (max-width: 1180px) {
    .risk-scientific-framework { grid-template-columns: 180px minmax(0, 1fr); }
    .risk-scientific-boundary { align-items: flex-start; flex-direction: column; gap: 6px; }
    .risk-scientific-boundary > p { max-width: none; }
    .risk-validation-gates { justify-content: flex-start; }
    .risk-backtest-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .risk-backtest-summary > div:nth-child(3) { border-right: 0; }
    .risk-backtest-summary > div:nth-child(-n+3) { border-bottom: 1px solid var(--border-light); }
    .risk-weather-method-chain { flex-wrap: wrap; }
    .risk-weather-method-chain > small { width: 100%; max-width: none; margin-left: 0; text-align: left; }
}

@media (max-width: 980px) {
    .risk-scientific-framework { grid-template-columns: 1fr; }
    .risk-scientific-heading { flex-direction: row; align-items: center; justify-content: space-between; border-right: 0; border-bottom: 1px solid var(--border-light); }
    .risk-scientific-heading > span { align-self: center; }
    .risk-method-audit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .risk-method-audit-grid article:nth-child(2) { border-right: 0; }
    .risk-method-audit-grid article:nth-child(-n+2) { border-bottom: 1px solid var(--border-light); }
}

@media (max-width: 680px) {
    .risk-model-stage { min-height: 21px; font-size: 9px; }
    .risk-scientific-framework { margin-bottom: 14px; }
    .risk-scientific-heading { align-items: flex-start; flex-direction: column; padding: 12px 14px; }
    .risk-scientific-heading h2 { font-size: 14px; }
    .risk-scientific-flow {
        grid-template-columns: 1fr;
        padding: 4px 12px;
    }
    .risk-scientific-flow > div { min-height: 52px; padding: 9px 8px 8px 34px; border-bottom: 1px solid var(--border-light); }
    .risk-scientific-flow > div:last-child { border-bottom: 0; }
    .risk-scientific-flow > div > b { left: 7px; right: auto; top: 17px; }
    .risk-scientific-flow > i { display: none; }
    .risk-scientific-flow small { margin-top: 2px; }
    .risk-scientific-boundary { padding: 10px 13px; }
    .risk-validation-gates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
    .risk-validation-gates span { white-space: normal; }
    .risk-backtest-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .risk-backtest-summary > div,
    .risk-backtest-summary > div:nth-child(3) { min-height: 62px; border-right: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); }
    .risk-backtest-summary > div:nth-child(even) { border-right: 0; }
    .risk-backtest-summary > div:nth-child(n+5) { border-bottom: 0; }
    .risk-weather-method-chain { gap: 5px; padding: 8px 10px; }
    .risk-weather-method-chain > span { font-size: 8px; }
    .risk-weather-method-chain > i { display: none; }
    .risk-weather-method-chain > small { font-size: 8px; }
    .risk-method-audit { margin-top: 14px; }
    .risk-method-audit-grid { grid-template-columns: 1fr; }
    .risk-method-audit-grid article,
    .risk-method-audit-grid article:nth-child(2) { border-right: 0; border-bottom: 1px solid var(--border-light); }
    .risk-method-audit-grid article:last-child { border-bottom: 0; }
}

/* Map cartographic finish (v1.9): preserve the light government-report palette. */
.risk-map-stage {
    isolation: isolate;
    border-top: 1px solid rgba(211, 222, 232, .72);
    background:
        radial-gradient(circle at 53% 48%, rgba(255,255,255,.98) 0 25%, rgba(244,248,251,.9) 68%, rgba(237,243,248,.96) 100%),
        #f3f7fa;
    box-shadow: inset 0 0 0 1px rgba(204, 216, 227, .52);
}
.risk-map-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image:
        linear-gradient(rgba(93, 126, 154, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(93, 126, 154, .035) 1px, transparent 1px);
    background-size: 38px 38px;
    -webkit-mask-image: radial-gradient(circle at center, #000 15%, transparent 86%);
    mask-image: radial-gradient(circle at center, #000 15%, transparent 86%);
    pointer-events: none;
}
.risk-map-canvas {
    position: relative;
    z-index: 1;
}
.risk-map-stage::after {
    top: 15px;
    right: 65px;
    z-index: 4;
    padding: 5px 9px;
    color: #667b90;
    border-color: rgba(180, 196, 210, .86);
    border-radius: 14px;
    background: rgba(255,255,255,.9);
    box-shadow: 0 4px 12px rgba(42, 67, 91, .07);
    letter-spacing: .02em;
}
.risk-map-legend {
    z-index: 4;
    left: 16px;
    top: 16px;
    gap: 6px;
    max-width: 202px;
    padding: 11px 12px 10px;
    border: 1px solid rgba(175, 193, 209, .88);
    border-radius: 8px;
    background: rgba(255,255,255,.93);
    box-shadow: inset 0 2px 0 rgba(198, 166, 76, .78), 0 9px 24px rgba(35, 62, 87, .11);
    backdrop-filter: blur(8px);
}
.risk-map-legend span { line-height: 1.35; }
.risk-map-legend .legend-high,
.risk-map-legend .legend-elevated,
.risk-map-legend .legend-medium,
.risk-map-legend .legend-low {
    flex: 0 0 auto;
    border: 1px solid rgba(255,255,255,.9);
    box-shadow: 0 0 0 1px rgba(77, 99, 121, .1);
}
.risk-map-legend .legend-surface {
    width: 38px;
    height: 8px;
    background: linear-gradient(90deg, #e7f0f7 0%, #9bbbd6 31%, #f0d38e 57%, #e8a34b 72%, #b83b3b 100%);
}
.risk-map-legend .risk-surface-legend.is-evidence .legend-surface,
.risk-map-legend .legend-evidence {
    background: linear-gradient(90deg, #edf2f5 0%, #aacbd7 38%, #70a9bb 62%, #155e68 100%);
}
.risk-north-arrow {
    z-index: 4;
    top: 13px;
    right: 14px;
    width: 39px;
    padding: 7px 6px 6px;
    border: 1px solid rgba(175, 193, 209, .88);
    border-radius: 8px;
    background: rgba(255,255,255,.93);
    box-shadow: 0 7px 18px rgba(35, 62, 87, .1);
}
.risk-north-arrow strong { color: #294761; font-size: 10px; }
.risk-north-arrow svg {
    width: 18px;
    height: 24px;
    margin-top: 3px;
    fill: #244f78;
}
.risk-map-scale {
    position: absolute;
    z-index: 4;
    left: 17px;
    bottom: 17px;
    display: grid;
    grid-template-columns: auto auto;
    align-items: end;
    gap: 2px 8px;
    padding: 7px 9px 6px;
    color: #405a72;
    border: 1px solid rgba(175, 193, 209, .82);
    border-radius: 6px;
    background: rgba(255,255,255,.91);
    box-shadow: 0 6px 16px rgba(35, 62, 87, .09);
    pointer-events: none;
}
.risk-map-scale[hidden] { display: none !important; }
.risk-map-scale > span {
    position: relative;
    display: block;
    min-width: 42px;
    height: 8px;
    margin-bottom: 2px;
    border-bottom: 2px solid #405a72;
}
.risk-map-scale > span::before,
.risk-map-scale > span::after {
    content: "";
    position: absolute;
    bottom: -2px;
    width: 2px;
    height: 7px;
    background: #405a72;
}
.risk-map-scale > span::before { left: 0; }
.risk-map-scale > span::after { right: 0; }
.risk-map-scale > b {
    color: #344f68;
    font-size: 9px;
    font-weight: 750;
    line-height: 1.1;
    white-space: nowrap;
}
.risk-map-scale > small {
    grid-column: 1 / -1;
    color: #8292a2;
    font-size: 7px;
    letter-spacing: .02em;
}
.risk-direction-note {
    z-index: 4;
    border-radius: 6px;
    background: rgba(255,255,255,.93);
    box-shadow: 0 7px 18px rgba(35, 62, 87, .09);
    backdrop-filter: blur(6px);
}
.risk-workspace.is-report-mode .risk-map-legend {
    transform: scale(1.04);
    transform-origin: top left;
}
.risk-workspace.is-report-mode .risk-map-scale {
    transform: scale(1.04);
    transform-origin: bottom left;
}

@media (max-width: 680px) {
    .risk-map-stage::after { display: none; }
    .risk-map-legend {
        left: 8px;
        top: 8px;
        max-width: 158px;
        padding: 8px;
        border-radius: 6px;
    }
    .risk-north-arrow {
        top: 8px;
        right: 8px;
        width: 33px;
        padding: 5px 4px 4px;
        transform: none;
    }
    .risk-north-arrow svg { width: 15px; height: 21px; }
    .risk-map-scale {
        left: auto;
        right: 8px;
        bottom: 54px;
        padding: 5px 7px 4px;
    }
    .risk-map-scale > small { display: none; }
}

/* Leakage-safe final-block validation (model v1.9). */
.risk-holdout-validation {
    grid-column: 1 / -1;
    border-top: 1px solid var(--border-light);
    background: #fbfcfe;
}
.risk-holdout-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 62px;
    padding: 10px 14px 10px 17px;
    border-bottom: 1px solid var(--border-light);
    background: linear-gradient(90deg, #fffdf7 0, #fff 36%, #f8fbfd 100%);
}
.risk-holdout-header > div > span {
    display: block;
    color: #9b7a2a;
    font-size: 7px;
    font-weight: 800;
    letter-spacing: 1.1px;
}
.risk-holdout-header h3 {
    margin-top: 2px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 760;
}
.risk-holdout-header p {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 8px;
}
.risk-holdout-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: none;
    padding: 5px 9px;
    color: #25765f;
    border: 1px solid #bcded3;
    border-radius: 14px;
    background: #f0faf6;
    font-size: 9px;
    font-weight: 750;
}
.risk-holdout-status > i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #299679;
    box-shadow: 0 0 0 3px rgba(41,150,121,.11);
}
.risk-holdout-status[data-state="insufficient"] {
    color: #896a2f;
    border-color: #e3d4b0;
    background: #fffaf0;
}
.risk-holdout-status[data-state="insufficient"] > i {
    background: #c08c2f;
    box-shadow: 0 0 0 3px rgba(192,140,47,.1);
}
.risk-holdout-body {
    display: grid;
    grid-template-columns: minmax(225px, .72fr) minmax(330px, 1.12fr) minmax(310px, 1fr);
    min-height: 205px;
}
.risk-holdout-split,
.risk-holdout-metrics,
.risk-holdout-chart-wrap {
    min-width: 0;
    padding: 13px 15px;
    border-right: 1px solid var(--border-light);
}
.risk-holdout-chart-wrap { border-right: 0; }
.risk-holdout-split-title,
.risk-holdout-chart-wrap > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.risk-holdout-split-title span,
.risk-holdout-chart-wrap h4 {
    color: var(--text-primary);
    font-size: 10px;
    font-weight: 750;
}
.risk-holdout-split-title b,
.risk-holdout-chart-wrap > div:first-child > span {
    color: var(--text-muted);
    font-size: 8px;
    font-weight: 650;
}
.risk-holdout-split-bar {
    display: grid;
    grid-template-columns: 80fr 20fr;
    overflow: hidden;
    height: 9px;
    margin-top: 12px;
    border: 1px solid #cad6e1;
    border-radius: 5px;
    background: #edf2f6;
}
.risk-holdout-split-bar > span {
    background: linear-gradient(90deg, #bfd0df, #6f98b9);
}
.risk-holdout-split-bar > i {
    border-left: 2px solid #fff;
    background: linear-gradient(90deg, #e5c986, #c59631);
}
.risk-holdout-split-labels {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(76px, .28fr);
    gap: 9px;
    margin-top: 8px;
}
.risk-holdout-split-labels > span { min-width: 0; }
.risk-holdout-split-labels b,
.risk-holdout-split-labels strong,
.risk-holdout-split-labels small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.risk-holdout-split-labels b { color: var(--text-muted); font-size: 8px; }
.risk-holdout-split-labels strong { margin-top: 2px; color: #315f80; font: 750 12px var(--font-mono); }
.risk-holdout-split-labels > span:last-child strong { color: #9a6f1f; }
.risk-holdout-split-labels small { margin-top: 1px; color: #8897a6; font-size: 7px; }
.risk-holdout-volume {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: 7px;
    margin-top: 10px;
}
.risk-holdout-volume > div {
    min-width: 0;
    padding: 6px 7px;
    border: 1px solid #e0e7ee;
    border-radius: 5px;
    background: #fff;
}
.risk-holdout-volume dt { color: var(--text-muted); font-size: 7px; }
.risk-holdout-volume dd {
    overflow: hidden;
    margin-top: 2px;
    color: var(--text-secondary);
    font-size: 8px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.risk-holdout-split-note {
    display: block;
    margin-top: 8px;
    color: #7b8997;
    font-size: 7px;
    line-height: 1.45;
}
.risk-holdout-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    background: #f8fafc;
}
.risk-holdout-metrics > div {
    min-width: 0;
    padding: 7px 9px;
    border: 1px solid #e0e7ee;
    border-radius: 5px;
    background: #fff;
}
.risk-holdout-metrics span,
.risk-holdout-metrics small {
    display: block;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 7px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.risk-holdout-metrics strong {
    display: block;
    margin: 2px 0 1px;
    color: #294f70;
    font: 760 13px var(--font-mono);
}
.risk-holdout-metrics > div:nth-child(4) strong { color: #b4653e; }
.risk-holdout-metrics > div:nth-child(6) strong { color: #267c6d; }
.risk-holdout-chart-wrap { background: #fff; }
.risk-holdout-chart { width: 100%; height: 155px; margin-top: 5px; }
.risk-holdout-conclusion {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    min-height: 48px;
    padding: 9px 15px;
    border-top: 1px solid var(--border-light);
    border-left: 3px solid #c69a3b;
    background: #fffaf0;
}
.risk-holdout-conclusion > i {
    display: grid;
    place-items: center;
    flex: none;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    color: #8a641e;
    border: 1px solid #dbc792;
    border-radius: 50%;
    font: 700 10px/1 Georgia, serif;
}
.risk-holdout-conclusion strong { color: #6e5420; font-size: 9px; }
.risk-holdout-conclusion p { margin-top: 2px; color: #7a6b4e; font-size: 8px; line-height: 1.5; }
.risk-holdout-conclusion[data-state="positive"] { border-left-color: #299679; background: #f1faf7; }
.risk-holdout-conclusion[data-state="positive"] strong { color: #1f735c; }
.risk-holdout-conclusion[data-state="negative"] { border-left-color: #c85b53; background: #fff6f5; }
.risk-holdout-conclusion[data-state="negative"] strong { color: #a33e38; }
.risk-holdout-conclusion[data-state="pending"] { border-left-color: #9caaba; background: #f7f9fb; }

@media (max-width: 1080px) {
    .risk-holdout-body { grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr); }
    .risk-holdout-chart-wrap { grid-column: 1 / -1; border-top: 1px solid var(--border-light); }
    .risk-holdout-chart { height: 175px; }
}

@media (max-width: 680px) {
    .risk-holdout-header { align-items: flex-start; flex-direction: column; gap: 8px; padding: 11px 12px; }
    .risk-holdout-header p { line-height: 1.5; }
    .risk-holdout-body { grid-template-columns: 1fr; }
    .risk-holdout-split,
    .risk-holdout-metrics,
    .risk-holdout-chart-wrap { border-right: 0; border-bottom: 1px solid var(--border-light); }
    .risk-holdout-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .risk-holdout-chart-wrap { grid-column: auto; }
    .risk-holdout-chart { height: 190px; }
    .risk-holdout-conclusion { padding: 9px 11px; }
}

/* Report-ready information architecture (v2.0). */
.risk-page [hidden] { display: none !important; }

.risk-page .risk-app-header {
    height: 58px;
    gap: 18px;
    padding: 0 22px;
}
.risk-page .risk-app-header .header-logo {
    flex: 0 0 auto;
    gap: 9px;
}
.risk-page .risk-app-header .logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 7px;
    font-size: 15px;
}
.risk-page .risk-app-header .logo-text {
    font-size: 14px;
    letter-spacing: 1.2px;
    white-space: nowrap;
}
.risk-page .risk-app-header .logo-sub { display: none; }
.risk-page .risk-app-header .header-nav {
    min-width: 0;
    flex: 1 1 auto;
    justify-content: center;
}
.risk-page .risk-app-header .header-nav a {
    padding: 8px 10px;
    font-size: 12px;
}
.risk-header-actions {
    position: relative;
    flex: 0 0 auto;
    gap: 8px;
}
.risk-header-submit,
.risk-header-login,
.risk-account-menu > summary {
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 11px;
    border: 1px solid rgba(156, 181, 214, .3);
    border-radius: 7px;
    color: #d7e2f2;
    background: rgba(255, 255, 255, .035);
    font: 600 12px/1 var(--font-sans);
    white-space: nowrap;
}
.risk-header-submit:hover,
.risk-header-login:hover,
.risk-account-menu > summary:hover,
.risk-account-menu[open] > summary {
    color: #fff;
    border-color: rgba(201, 168, 76, .58);
    background: rgba(201, 168, 76, .1);
}
.risk-header-submit svg,
.risk-account-menu svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.risk-account-menu { position: relative; }
.risk-account-menu > summary {
    min-width: 98px;
    cursor: pointer;
    list-style: none;
}
.risk-account-menu > summary::-webkit-details-marker { display: none; }
.risk-account-menu .risk-account-chevron {
    width: 13px;
    transition: transform .16s ease;
}
.risk-account-menu[open] .risk-account-chevron { transform: rotate(180deg); }
.risk-account-popover {
    position: absolute;
    z-index: 120;
    top: calc(100% + 8px);
    right: 0;
    width: 150px;
    overflow: hidden;
    padding: 6px;
    border: 1px solid #d7e0ea;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 36px rgba(18, 38, 65, .18);
}
.risk-account-popover small {
    display: block;
    padding: 6px 9px 7px;
    color: #8a99aa;
    border-bottom: 1px solid #edf1f5;
    font-size: 10px;
}
.risk-account-popover a {
    display: block;
    padding: 8px 9px;
    color: #344b64;
    border-radius: 5px;
    font-size: 12px;
}
.risk-account-popover a:hover { color: #17345f; background: #f2f6fa; }

.risk-dashboard.main-container {
    max-width: 1440px;
    padding: 14px 26px 24px;
}
.risk-dashboard .breadcrumb {
    display: none;
    margin-bottom: 0;
    font-size: 12px;
}
.risk-command-header.detail-header {
    min-height: 88px;
    margin-bottom: 10px;
    padding: 12px 18px;
    border-radius: 9px;
    box-shadow: 0 1px 3px rgba(21, 45, 72, .045);
}
.risk-command-copy > p {
    max-width: 790px;
    font-size: 11px;
    line-height: 1.65;
}
.risk-title-row h1 { font-size: 21px; }
.risk-page-icon { width: 46px; height: 46px; }
.risk-page-icon svg { width: 27px; height: 27px; }
.risk-command-actions { max-width: 360px; }

.risk-view-nav-shell {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
    padding: 0 8px 0 4px;
    border: 1px solid #d7e0ea;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(21, 45, 72, .035);
}
.risk-view-tabs {
    align-self: stretch;
    display: flex;
    align-items: stretch;
    gap: 2px;
}
.risk-view-tabs button {
    position: relative;
    min-width: 112px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
    color: #64768a;
    border: 0;
    background: transparent;
    font: 650 13px/1 var(--font-sans);
    cursor: pointer;
}
.risk-view-tabs button::after {
    content: "";
    position: absolute;
    right: 14px;
    bottom: 0;
    left: 14px;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: transparent;
}
.risk-view-tabs button:hover { color: #213d62; background: #f8fafc; }
.risk-view-tabs button.active { color: #17345f; }
.risk-view-tabs button.active::after { background: #c8a33d; }
.risk-view-tabs button:focus-visible,
.risk-view-action:focus-visible,
.risk-priority-title-row button:focus-visible,
.risk-account-menu > summary:focus-visible {
    outline: 2px solid #3568d4;
    outline-offset: 2px;
}
.risk-view-tabs svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.risk-view-tabs button:first-child svg path { fill: currentColor; stroke: none; }
.risk-view-actions { display: flex; align-items: center; gap: 6px; }
.risk-view-action {
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 10px;
    color: #52677d;
    border: 1px solid #d1dbe5;
    border-radius: 6px;
    background: #fff;
    font: 600 11px/1 var(--font-sans);
    white-space: nowrap;
    cursor: pointer;
}
.risk-view-action:hover { color: #17345f; border-color: #aebdce; background: #f7f9fc; }
.risk-view-action svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.risk-view-report {
    color: #f0d881;
    border-color: #c39c30;
    background: #102b58;
}
.risk-view-report:hover,
.risk-view-report[aria-pressed="true"] {
    color: #fff0ad;
    border-color: #d6b758;
    background: #0b234b;
}

.risk-filter-strip {
    min-height: 50px;
    margin-bottom: 10px;
    padding: 7px 12px;
    border-radius: 8px;
    box-shadow: none;
}
.risk-filter-title { font-size: 12px; }
.risk-date-input.date-input { width: 126px; height: 32px; font-size: 12px; }
.risk-filter-primary.date-apply-btn,
.risk-filter-secondary.date-reset-btn { height: 32px; font-size: 12px; }
.risk-model-meta { min-width: 0; gap: 10px; font-size: 10px; }
.risk-weather-status { max-width: 285px; overflow: hidden; text-overflow: ellipsis; }

.risk-kpi-grid {
    gap: 0;
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid #d7e0ea;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(21, 45, 72, .035);
}
.risk-kpi.stat-card {
    min-height: 0;
    height: 102px;
    padding: 12px 16px;
    border: 0;
    border-right: 1px solid #e3e9ef;
    border-radius: 0;
    box-shadow: none;
}
.risk-kpi.stat-card:last-child { border-right: 0; }
.risk-kpi p { font-size: 12px; }
.risk-kpi strong { font-size: 29px; }
.risk-kpi small { max-width: 230px; margin-top: 5px; font-size: 9px; line-height: 1.4; }
.risk-kpi > svg { width: 36px; height: 36px; opacity: .9; }

.risk-workspace {
    grid-template-columns: minmax(0, 2.35fr) minmax(322px, .82fr);
    gap: 10px;
}
.risk-panel { box-shadow: 0 1px 4px rgba(21, 45, 72, .045); }
.risk-map-header.risk-panel-header {
    min-height: 84px;
    padding: 11px 16px 9px;
}
.risk-map-header .risk-map-meta { flex-wrap: nowrap; overflow: hidden; }
.risk-map-header .risk-panel-meta,
.risk-map-header .risk-weather-meta { display: none; }
.risk-map-header .risk-resolution-meta { flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.risk-map-view-switch { height: 32px; }
.risk-map-view-switch button { min-width: 70px; padding: 0 8px; font-size: 10px; }
.risk-workspace .risk-science-strip { display: none; }
.risk-science-strip { min-height: 54px; }
.risk-science-strip > div { padding: 8px 9px; }
.risk-map-stage { height: 570px; }

.risk-priority-panel {
    grid-template-rows: auto auto 32px minmax(0, 1fr);
    overflow: hidden;
}
.risk-briefing-summary {
    padding: 15px 16px 13px;
    border-bottom: 1px solid #e3e9ef;
    background: #fff;
}
.risk-briefing-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}
.risk-briefing-title h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #21364f;
    font-size: 15px;
}
.risk-briefing-title h2::before {
    content: "";
    width: 4px;
    height: 17px;
    border-radius: 2px;
    background: #c8a33d;
}
.risk-briefing-title small { color: #8b99a8; font-size: 9px; }
.risk-briefing-list {
    display: grid;
    gap: 9px;
    margin-top: 12px;
    list-style: none;
}
.risk-briefing-list li {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    color: #52667b;
    font-size: 10px;
    line-height: 1.55;
}
.risk-briefing-list li > i {
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    margin-top: 1px;
    border: 1px solid currentColor;
    border-radius: 50%;
    font: 700 9px/1 var(--font-mono);
    font-style: normal;
}
.risk-briefing-list li[data-tone="alert"] > i { color: #cf4a43; }
.risk-briefing-list li[data-tone="watch"] > i { color: #d48822; }
.risk-briefing-list li[data-tone="stable"] > i { color: #3979b9; }
.risk-priority-title-row {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 14px;
    border-bottom: 1px solid #e3e9ef;
}
.risk-priority-title-row h3 { color: #2b4058; font-size: 12px; }
.risk-priority-title-row h3 span { color: #78889a; font-size: 9px; font-weight: 600; }
.risk-priority-title-row p { margin-top: 2px; color: #8795a5; font-size: 9px; }
.risk-priority-title-row button {
    flex: none;
    padding: 4px 0;
    color: #2f68a7;
    border: 0;
    background: transparent;
    font: 650 10px/1 var(--font-sans);
    cursor: pointer;
}
.risk-priority-title-row button:hover { color: #17345f; }
.risk-priority-head {
    height: 32px;
    grid-template-columns: minmax(135px, 1fr) 70px 48px;
    padding: 0 13px;
}
.risk-priority-panel .risk-priority-list {
    height: auto;
    min-height: 0;
    display: grid;
    grid-template-rows: repeat(5, minmax(64px, 1fr));
}
.risk-priority-row {
    min-height: 0;
    grid-template-columns: minmax(135px, 1fr) 70px 48px;
    padding: 8px 13px;
}
.risk-priority-name strong { font-size: 11px; }
.risk-priority-name small { font-size: 8px; line-height: 1.4; }
.risk-priority-score strong { font-size: 16px; }

.risk-scientific-framework {
    display: block;
    overflow: visible;
    margin-bottom: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.risk-scientific-heading {
    min-height: 64px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 10px;
    padding: 12px 17px;
    border: 1px solid #cfdceb;
    border-left: 4px solid #3568d4;
    border-radius: 8px;
    background: #fff;
}
.risk-scientific-heading p {
    color: #76889c;
    font-size: 10px;
    font-weight: 650;
    letter-spacing: 0;
}
.risk-scientific-heading h2 { margin-top: 2px; color: #1f3858; font-size: 16px; }
.risk-scientific-heading > span {
    align-self: center;
    color: #526b86;
    border: 0;
    background: transparent;
    font-size: 11px;
}
.risk-validation-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 330px);
    align-items: stretch;
    gap: 10px;
}
.risk-holdout-validation {
    grid-column: auto;
    overflow: hidden;
    border: 1px solid #d7e0ea;
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
}
.risk-holdout-header {
    min-height: 65px;
    padding: 11px 15px;
    background: #fff;
}
.risk-holdout-header h3 { margin: 0; font-size: 14px; }
.risk-holdout-header p { font-size: 10px; }
.risk-holdout-body {
    grid-template-columns: minmax(230px, 285px) minmax(0, 1fr);
    min-height: 245px;
    border-bottom: 1px solid #e3e9ef;
}
.risk-holdout-split,
.risk-holdout-chart-wrap {
    padding: 14px 15px;
}
.risk-holdout-chart { height: 206px; margin-top: 4px; }
.risk-holdout-metrics {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0;
    padding: 0;
    border: 0;
    background: #fff;
}
.risk-holdout-metrics > div {
    min-height: 75px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10px 11px;
    border: 0;
    border-right: 1px solid #e3e9ef;
    border-radius: 0;
}
.risk-holdout-metrics > div:last-child { border-right: 0; }
.risk-holdout-metrics span,
.risk-holdout-metrics small { font-size: 9px; }
.risk-holdout-metrics strong { margin: 3px 0 2px; font-size: 16px; }
.risk-holdout-conclusion {
    min-height: 58px;
    padding: 10px 14px;
}
.risk-holdout-conclusion strong { font-size: 10px; }
.risk-holdout-conclusion p { font-size: 9px; }
.risk-validation-gate-panel {
    overflow: hidden;
    border: 1px solid #d7e0ea;
    border-radius: 8px;
    background: #fff;
}
.risk-validation-gate-heading {
    min-height: 65px;
    padding: 12px 15px;
    border-bottom: 1px solid #e3e9ef;
}
.risk-validation-gate-heading h3 { color: #253d59; font-size: 14px; }
.risk-validation-gate-heading p { margin-top: 3px; color: #8796a6; font-size: 9px; }
.risk-validation-gates {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    width: 100%;
}
.risk-validation-gates span {
    min-height: 46px;
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    color: #53687e;
    border: 0;
    border-bottom: 1px solid #edf1f5;
    border-radius: 0;
    background: #fff;
    font-size: 10px;
    white-space: normal;
}
.risk-validation-gates span:last-child { border-bottom: 0; }
.risk-validation-gates span > i {
    width: 9px;
    height: 9px;
    border: 2px solid #a5b2c0;
    background: #fff;
}
.risk-validation-gates span[data-state="ready"] > i { border-color: #299679; background: #299679; }
.risk-validation-gates span[data-state="limited"] > i { border-color: #d08a25; background: #fff4dd; }
.risk-validation-gates span > em {
    color: #334c66;
    font-style: normal;
    font-weight: 650;
}
.risk-validation-gates span > b {
    max-width: 126px;
    color: #74869a;
    font-size: 9px;
    text-align: right;
}
.risk-validation-gates span[data-state="ready"] > b { color: #278064; }
.risk-validation-gates span[data-state="limited"] > b { color: #b87518; }
.risk-validation-boundary {
    margin: 10px 13px 13px;
    padding: 10px 11px;
    color: #6f7f90;
    border-left: 3px solid #c8a33d;
    background: #fffbf1;
    font-size: 9px;
    line-height: 1.55;
}
.risk-validation-boundary strong { color: #765b1c; }
.risk-validation-more {
    overflow: hidden;
    margin-top: 10px;
    border: 1px solid #d7e0ea;
    border-radius: 8px;
    background: #fff;
}
.risk-validation-more > summary {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 15px;
    color: #344c66;
    cursor: pointer;
    list-style: none;
}
.risk-validation-more > summary::-webkit-details-marker { display: none; }
.risk-validation-more > summary small { display: block; margin-top: 2px; color: #8a99a8; font-size: 9px; }
.risk-validation-more > summary > b { color: #3269a6; font-size: 10px; }
.risk-validation-more[open] > summary { border-bottom: 1px solid #e3e9ef; }
.risk-validation-more[open] > summary > b { font-size: 0; }
.risk-validation-more[open] > summary > b::after { content: "收起"; font-size: 10px; }
.risk-validation-more .risk-scientific-flow { border-bottom: 1px solid #e3e9ef; }
.risk-validation-more .risk-backtest-summary { border-top: 0; }

.risk-detail-panel { margin-top: 0; }
.risk-detail-panel .risk-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.risk-detail-panel .risk-detail-block { min-height: 270px; }
.risk-table-panel { margin-top: 10px; }
.risk-table-wrapper {
    max-height: 540px;
    overflow: auto;
    overscroll-behavior: contain;
}
.risk-data-table { min-width: 1050px; }
.risk-data-table thead { position: sticky; top: 0; z-index: 2; }
.risk-method-audit { margin-top: 10px; }
.risk-footer.footer { margin-top: 10px; }

.risk-reporting {
    background-color: #fff;
    background-image: none;
}
.risk-reporting .risk-app-header,
.risk-reporting .risk-dashboard > .breadcrumb,
.risk-reporting .risk-filter-strip,
.risk-reporting .risk-footer { display: none !important; }
.risk-reporting .risk-dashboard.main-container {
    max-width: none;
    padding: 10px 14px 14px;
}
.risk-reporting .risk-command-header.detail-header {
    min-height: 66px;
    margin-bottom: 8px;
    padding: 9px 14px;
}
.risk-reporting .risk-page-icon { width: 40px; height: 40px; }
.risk-reporting .risk-page-icon svg { width: 24px; height: 24px; }
.risk-reporting .risk-command-copy > p,
.risk-reporting .risk-caveat { display: none; }
.risk-reporting .risk-title-row h1 { font-size: 20px; }
.risk-reporting .risk-view-nav-shell {
    min-height: 40px;
    justify-content: flex-end;
    margin-bottom: 8px;
    border: 0;
    box-shadow: none;
}
.risk-reporting .risk-view-tabs,
.risk-reporting .risk-view-refresh { display: none; }
.risk-reporting .risk-kpi-grid { margin-bottom: 8px; }
.risk-reporting .risk-kpi.stat-card { min-height: 76px; padding: 9px 15px; }
.risk-reporting .risk-kpi strong { font-size: 25px; }
.risk-reporting .risk-kpi small { margin-top: 3px; }
.risk-reporting .risk-map-header.risk-panel-header { min-height: 72px; }
.risk-reporting .risk-map-header .risk-panel-meta,
.risk-reporting .risk-map-header .risk-weather-meta,
.risk-reporting .risk-map-header .risk-resolution-meta,
.risk-reporting .risk-science-strip { display: none; }
.risk-reporting .risk-map-stage {
    height: max(360px, calc(100vh - 360px));
    min-height: 360px;
}
.risk-reporting .risk-briefing-summary { padding: 11px 13px 9px; }
.risk-reporting .risk-briefing-list { gap: 6px; margin-top: 8px; }
.risk-reporting .risk-briefing-list li { font-size: 9px; line-height: 1.4; }
.risk-reporting .risk-priority-title-row { min-height: 48px; padding: 6px 12px; }
.risk-reporting .risk-priority-head { height: 28px; }
.risk-reporting .risk-priority-panel .risk-priority-list { grid-template-rows: repeat(5, minmax(44px, 1fr)); }
.risk-reporting .risk-priority-row { padding: 5px 12px; }
.risk-reporting .risk-priority-name small { display: none; }

@media (max-width: 1250px) {
    .risk-page .risk-app-header { gap: 10px; padding: 0 14px; }
    .risk-page .risk-app-header .logo-text { font-size: 13px; letter-spacing: .8px; }
    .risk-page .risk-app-header .header-nav a { padding: 8px 7px; font-size: 11px; }
    .risk-header-submit,
    .risk-account-menu > summary { padding: 0 8px; }
    .risk-view-tabs button { min-width: 104px; padding: 0 10px; }
    .risk-view-action { padding: 0 8px; }
    .risk-view-refresh span { display: none; }
    .risk-view-refresh { width: 34px; padding: 0; }
    .risk-command-copy > p { max-width: 680px; }
    .risk-validation-layout { grid-template-columns: minmax(0, 1fr) 300px; }
    .risk-workspace { grid-template-columns: minmax(0, 2fr) minmax(310px, .8fr); }
}

@media (max-width: 980px) {
    .risk-page .risk-app-header .header-nav { display: none; }
    .risk-page .risk-app-header { justify-content: space-between; }
    .risk-view-nav-shell { align-items: stretch; flex-direction: column; gap: 0; padding: 0; }
    .risk-view-tabs { min-height: 48px; }
    .risk-view-tabs button { flex: 1; min-width: 0; }
    .risk-view-actions { padding: 8px; border-top: 1px solid #edf1f5; }
    .risk-view-refresh { width: auto; padding: 0 10px; }
    .risk-view-refresh span { display: inline; }
    .risk-validation-layout { grid-template-columns: 1fr; }
    .risk-validation-gates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .risk-validation-gates span:nth-child(odd) { border-right: 1px solid #edf1f5; }
    .risk-holdout-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .risk-holdout-metrics > div:nth-child(3) { border-right: 0; }
    .risk-holdout-metrics > div:nth-child(-n+3) { border-bottom: 1px solid #e3e9ef; }
    .risk-workspace { grid-template-columns: 1fr; }
    .risk-priority-panel .risk-priority-list { height: auto; }
    .risk-map-stage { height: 540px; }
    .risk-detail-panel .risk-detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
    .risk-dashboard.main-container { padding: 10px; }
    .risk-page .risk-app-header { height: 54px; padding: 0 10px; }
    .risk-page .risk-app-header .logo-text { max-width: 190px; font-size: 12px; }
    .risk-header-submit span { display: none; }
    .risk-header-submit { width: 34px; padding: 0; }
    .risk-account-menu > summary { min-width: 0; max-width: 104px; }
    .risk-command-header.detail-header { padding: 14px; }
    .risk-title-row h1 { font-size: 19px; }
    .risk-view-tabs button { gap: 5px; padding: 0 5px; font-size: 11px; }
    .risk-view-tabs svg { width: 15px; height: 15px; }
    .risk-view-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .risk-view-action,
    .risk-view-refresh { width: 100%; }
    .risk-filter-strip { padding: 11px; }
    .risk-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .risk-kpi.stat-card { min-height: 96px; border-right: 1px solid #e3e9ef; border-bottom: 1px solid #e3e9ef; }
    .risk-kpi.stat-card:nth-child(even) { border-right: 0; }
    .risk-kpi.stat-card:nth-last-child(-n+2) { border-bottom: 0; }
    .risk-kpi small { display: block; font-size: 8px; }
    .risk-scientific-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
    .risk-scientific-heading h2 { font-size: 14px; }
    .risk-validation-layout { grid-template-columns: 1fr; }
    .risk-holdout-body { grid-template-columns: 1fr; }
    .risk-holdout-chart-wrap { border-top: 1px solid #e3e9ef; }
    .risk-holdout-chart { height: 220px; }
    .risk-holdout-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .risk-holdout-metrics > div,
    .risk-holdout-metrics > div:nth-child(3) { border-right: 1px solid #e3e9ef; border-bottom: 1px solid #e3e9ef; }
    .risk-holdout-metrics > div:nth-child(even) { border-right: 0; }
    .risk-holdout-metrics > div:nth-last-child(-n+2) { border-bottom: 0; }
    .risk-validation-gates { grid-template-columns: 1fr; }
    .risk-validation-gates span:nth-child(odd) { border-right: 0; }
    .risk-map-stage { height: 500px; }
    .risk-briefing-title { align-items: flex-start; flex-direction: column; }
    .risk-priority-panel .risk-priority-list { grid-template-rows: none; }
}

/* Unified government-report visual system for the rest of the portal (v3.0). */
.portal-page {
    --portal-navy: #102b58;
    --portal-blue: #315f89;
    --portal-gold: #c8a33d;
    --portal-line: #d7e0ea;
    --portal-soft-line: #e8edf2;
    --portal-muted: #76889b;
    --portal-ink: #21364f;
    background-color: #f1f4f8;
    background-image: url("../data/hubei-bg.svg");
    background-position: 92% 210px;
    background-size: 46% auto;
    color: var(--portal-ink);
}
.portal-page [hidden] { display: none !important; }
.portal-app-header {
    height: 58px;
    gap: 18px;
    padding: 0 22px;
}
.portal-app-header .header-logo {
    flex: 0 0 auto;
    gap: 9px;
}
.portal-app-header .logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 7px;
    font-size: 15px;
}
.portal-app-header .logo-text {
    font-size: 14px;
    letter-spacing: 1.2px;
    white-space: nowrap;
}
.portal-app-header .logo-sub { display: none; }
.portal-brand-link { color: inherit; text-decoration: none; }
.portal-app-header .header-nav {
    min-width: 0;
    flex: 1 1 auto;
    justify-content: center;
}
.portal-app-header .header-nav a {
    padding: 8px 10px;
    font-size: 12px;
}
.portal-header-refresh {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #d7e2f2;
    border: 1px solid rgba(156, 181, 214, .3);
    border-radius: 7px;
    background: rgba(255, 255, 255, .035);
    cursor: pointer;
}
.portal-header-refresh span { display: none; }
.portal-header-refresh svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.portal-header-refresh:hover {
    color: #fff;
    border-color: rgba(201, 168, 76, .58);
    background: rgba(201, 168, 76, .1);
}
.portal-header-refresh:disabled { opacity: .55; cursor: wait; }
.portal-app-header .risk-header-submit.active {
    color: #fff0ad;
    border-color: rgba(201, 168, 76, .62);
    background: rgba(201, 168, 76, .13);
}

.portal-main.main-container {
    max-width: 1440px;
    padding: 14px 26px 28px;
}
.portal-main > .breadcrumb { display: none; }
.portal-page-head {
    min-height: 70px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
    padding: 10px 17px;
    border: 1px solid var(--portal-line);
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(21, 45, 72, .045);
}
.portal-page-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    flex: none;
    color: #a87f22;
    border: 1px solid #eadfbd;
    border-radius: 10px;
    background: linear-gradient(145deg, #fffdf6, #faf5e7);
}
.portal-page-icon svg {
    width: 27px;
    height: 27px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.portal-page-icon-text {
    color: var(--portal-accent, #315f89);
    border-color: #d9e1e9;
    background: #f7f9fb;
}
.portal-page-copy { min-width: 0; }
.portal-title-row {
    min-width: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}
.portal-title-row h1 {
    margin-right: 3px;
    color: #1d3149;
    font-size: 21px;
    font-weight: 800;
    line-height: 1.25;
}
.portal-title-row > span,
.portal-title-row > em {
    padding: 3px 7px;
    color: #82631d;
    border: 1px solid #e6d9ae;
    border-radius: 10px;
    background: #fffaf0;
    font-size: 9px;
    font-style: normal;
    font-weight: 700;
}
.portal-title-row > em {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #26745e;
    border-color: #c8e6dc;
    background: #f2faf7;
}
.portal-title-row > em i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #2b9b79;
}
.portal-title-row > em.is-caution {
    color: #9b5e22;
    border-color: #ead0b1;
    background: #fff7ed;
}
.portal-page-copy > p {
    max-width: 880px;
    margin-top: 4px;
    color: #718398;
    font-size: 11px;
    line-height: 1.55;
}
.portal-page-meta {
    min-width: 150px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    padding-left: 16px;
    border-left: 1px solid var(--portal-soft-line);
    text-align: right;
}
.portal-page-meta span { color: #8796a6; font-size: 9px; }
.portal-page-meta strong { color: #334b64; font-size: 11px; }
.portal-page-meta a { margin-top: 3px; color: #2f68a7; font-size: 10px; font-weight: 700; }

.portal-impact-strip {
    min-height: 112px;
    display: grid;
    grid-template-columns: minmax(370px, 1.35fr) minmax(390px, 1fr) 154px;
    align-items: stretch;
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid var(--portal-line);
    border-left: 4px solid var(--portal-gold);
    border-radius: 9px;
    background: linear-gradient(96deg, #fffdf7 0, #fff 58%);
    box-shadow: 0 3px 11px rgba(28, 51, 76, .065);
}
.portal-impact-primary { border-left-color: #315f89; background: linear-gradient(96deg, #f5f9fc 0, #fff 58%); }
.portal-impact-risk[data-level="高"] { border-left-color: #c44740; background: linear-gradient(96deg, #fff7f5 0, #fff 58%); }
.portal-impact-risk[data-level="中"] { border-left-color: #d08a25; background: linear-gradient(96deg, #fffaf2 0, #fff 58%); }
.portal-impact-risk[data-level="低"] { border-left-color: #34836d; background: linear-gradient(96deg, #f4fbf8 0, #fff 58%); }
.portal-impact-lead {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 13px 18px;
}
.portal-impact-lead > span {
    color: #776337;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: .08em;
}
.portal-impact-lead h2 {
    min-width: 0;
    margin-top: 3px;
    overflow: hidden;
    color: #21364f;
    font-size: 20px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.portal-impact-lead h2 strong {
    color: #234f7f;
    font: 800 31px/1 var(--font-mono);
    letter-spacing: -.04em;
}
.portal-impact-risk[data-level="高"] .portal-impact-lead h2 strong { color: #bd3935; }
.portal-impact-risk[data-level="中"] .portal-impact-lead h2 strong { color: #b56e20; }
.portal-impact-risk[data-level="低"] .portal-impact-lead h2 strong { color: #28755f; }
.portal-impact-lead h2 b { color: #273f59; font-weight: 800; }
.portal-impact-lead h2 small {
    margin: 0 4px;
    color: #75879a;
    font-size: 11px;
    font-weight: 650;
}
.portal-impact-lead > p {
    max-width: 650px;
    margin-top: 6px;
    overflow: hidden;
    color: #718296;
    font-size: 10px;
    line-height: 1.5;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.portal-impact-metrics {
    min-width: 0;
    display: flex;
    align-items: stretch;
    border-left: 1px solid var(--portal-soft-line);
    background: rgba(255, 255, 255, .72);
}
.portal-impact-metrics > div {
    min-width: 0;
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 12px 14px;
    border-right: 1px solid var(--portal-soft-line);
}
.portal-impact-metrics span { color: #8291a1; font-size: 9px; white-space: nowrap; }
.portal-impact-metrics strong {
    overflow: hidden;
    margin-top: 4px;
    color: #2d4967;
    font: 800 20px/1.15 var(--font-mono);
    text-overflow: ellipsis;
    white-space: nowrap;
}
.portal-impact-metrics small { margin-top: 2px; color: #8291a1; font-size: 9px; }
.portal-impact-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 15px;
    color: #fff;
    border-left: 1px solid #173d70;
    background: #173d70;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}
.portal-impact-action:hover { color: #fff; background: #24558f; }
.portal-impact-action span { color: #e8cf79; font-size: 16px; }
.portal-impact-compact { min-height: 94px; }
.portal-impact-compact .portal-impact-lead { padding-top: 10px; padding-bottom: 10px; }
.portal-impact-compact .portal-impact-lead h2 { font-size: 18px; }
.portal-impact-compact .portal-impact-lead h2 strong { font-size: 27px; }
.portal-submissions-page .portal-impact-strip {
    grid-template-columns: minmax(0, 1fr) 154px;
}
.portal-submissions-page .portal-impact-action { grid-column: auto; }
.portal-admin-page .portal-impact-strip {
    grid-template-columns: minmax(360px, 1.1fr) minmax(390px, .9fr);
}

.portal-page .portal-filter-strip {
    min-height: 50px;
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 10px;
    padding: 7px 12px;
    border: 1px solid var(--portal-line);
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
}
.portal-page .portal-filter-strip .date-filter-label,
.portal-page .portal-filter-strip .city-selector-label {
    color: #50657b;
    font-size: 11px;
    font-weight: 700;
}
.portal-page .portal-filter-strip .date-input,
.portal-page .portal-filter-strip .city-select,
.portal-page .portal-filter-strip .weather-date-input {
    height: 32px;
    color: #2f455d;
    border-color: #d5dee7;
    border-radius: 6px;
    font-size: 11px;
}
.portal-host-label { margin-left: 8px; }
.portal-host-select { width: auto; padding: 0 30px 0 10px; }
.portal-page .portal-filter-strip .date-filter-info,
.portal-page .portal-filter-strip .city-selector-info,
.portal-page .portal-filter-strip .city-selector-coords {
    color: #75869a;
    font-size: 10px;
}
.portal-page .portal-filter-strip .city-selector-coords { margin-left: auto; }

.portal-section-heading {
    min-height: 43px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 5px 2px 8px;
}
.portal-section-heading > div { min-width: 0; }
.portal-section-heading span { color: #8d9baa; font-size: 9px; font-weight: 700; letter-spacing: .08em; }
.portal-section-heading h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #283f58;
    font-size: 15px;
}
.portal-section-heading h2::before {
    content: "";
    width: 4px;
    height: 17px;
    border-radius: 2px;
    background: var(--portal-gold);
}
.portal-section-heading > p { color: #8997a6; font-size: 9px; }
.portal-section-heading-inset {
    margin: -5px 0 9px;
    padding: 0 0 10px;
    border-bottom: 1px solid var(--portal-soft-line);
}

.portal-dashboard-page .stats-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid var(--portal-line);
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(21, 45, 72, .035);
}
.portal-dashboard-page .stat-card {
    min-height: 103px;
    padding: 12px 14px;
    border: 0;
    border-right: 1px solid var(--portal-soft-line);
    border-radius: 0;
    box-shadow: none;
}
.portal-dashboard-page .stat-card:last-child { border-right: 0; }
.portal-dashboard-page .stat-card::before { height: 2px; }
.portal-dashboard-page .stat-card .card-icon {
    position: absolute;
    top: 13px;
    right: 13px;
    width: 31px;
    height: 31px;
    margin: 0;
    border-radius: 8px;
}
.portal-dashboard-page .stat-card .card-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.portal-dashboard-page .stat-card .card-label { padding-right: 35px; color: #5d7186; font-size: 11px; }
.portal-dashboard-page .stat-card .card-value { font-size: 25px; }
.portal-dashboard-page .stat-card .card-unit { font-size: 10px; }
.portal-dashboard-page .stat-card .card-trend { margin-top: 7px; font-size: 9px; }
.portal-dashboard-page .stat-card .click-hint { right: 12px; bottom: 10px; font-size: 8px; opacity: 1; transform: none; }

.portal-page .map-section,
.portal-page .table-section,
.portal-page .chart-panel,
.portal-page .detail-chart-panel,
.portal-page .detail-table-section,
.portal-page .pred-chart-section,
.portal-page .pred-result-bar,
.portal-page .weather-map-section,
.portal-page .weather-detail-bar,
.portal-page .form-panel,
.portal-page .batch-import-panel,
.portal-page .dept-section {
    border-color: var(--portal-line);
    border-radius: 9px;
    box-shadow: 0 1px 4px rgba(21, 45, 72, .045);
}
.portal-page .map-section,
.portal-page .table-section,
.portal-page .detail-chart-panel,
.portal-page .detail-table-section,
.portal-page .pred-chart-section,
.portal-page .weather-map-section {
    padding: 0;
    overflow: hidden;
    margin-bottom: 10px;
}
.portal-page .map-section .section-header,
.portal-page .table-section .section-header,
.portal-page .detail-chart-panel > .chart-title,
.portal-page .pred-chart-section > .section-header,
.portal-page .weather-map-section > .section-header {
    min-height: 58px;
    margin: 0;
    padding: 10px 16px;
    border-bottom: 1px solid var(--portal-soft-line);
}
.portal-page .detail-chart-panel > .chart-title { display: flex; align-items: center; }
.portal-page .map-chart-container { height: 520px; }
.portal-page .map-stats-row { margin: 0; padding: 11px 16px; }
.portal-page .table-wrapper { max-width: 100%; }
.portal-page .data-table { font-size: 12px; }
.portal-page .data-table thead th { padding: 9px 13px; font-size: 10px; border-bottom-width: 1px; }
.portal-page .data-table tbody td { padding: 8px 13px; font-size: 11px; }
.portal-page .charts-grid { gap: 10px; margin-bottom: 10px; }
.portal-page .chart-panel { padding: 15px 16px; }
.portal-page .chart-container { height: 310px; }
.portal-page .footer { margin-top: 10px; padding: 11px 16px; border-radius: 8px; font-size: 10px; }

.portal-detail-page .detail-chart-panel .chart-container { height: 380px !important; padding: 4px 10px 8px; }
.portal-detail-page .detail-table-section { padding: 15px 16px; }
.portal-detail-page .detail-table-section > .section-title { margin-bottom: 11px; }
.portal-detail-page .data-table tbody tr:first-child { background: #fffdf6; }

.portal-prediction-page .pred-chart-container { height: 425px; }
.portal-prediction-page.is-awaiting-data .pred-chart-container { height: 220px; }
.portal-prediction-page .pred-legend-row { margin: 0; padding: 10px 16px; border-top: 1px solid var(--portal-soft-line); }
.portal-prediction-page .weather-map-container { height: 520px; }
.portal-prediction-page .weather-map-legend { margin: 0; padding: 10px 16px; border-top: 1px solid var(--portal-soft-line); }
.portal-prediction-page .pred-result-bar { padding: 14px 16px; }
.portal-prediction-page .weather-detail-bar { padding: 15px 16px; }
.portal-prediction-page .city-selector-info { margin-left: 4px; }
.portal-prediction-page .pred-model-evaluation {
    background: #fff;
    border: 1px solid var(--portal-soft-line);
    border-radius: 8px;
    margin-bottom: 10px;
    padding: 16px 18px;
}
.portal-prediction-page .pred-model-evaluation .section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 12px;
}
.portal-prediction-page #modelSplitSummary {
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.6;
}
.portal-prediction-page .pred-model-table-wrap { overflow-x: auto; }
.portal-prediction-page .pred-model-table {
    border-collapse: collapse;
    width: 100%;
    min-width: 590px;
    font-size: 12px;
    color: var(--text-secondary);
}
.portal-prediction-page .pred-model-table th,
.portal-prediction-page .pred-model-table td {
    text-align: left;
    padding: 9px 12px;
    border-bottom: 1px solid var(--portal-soft-line);
}
.portal-prediction-page .pred-model-table th {
    background: #f5f8fa;
    color: #63768a;
    font-size: 11px;
    white-space: nowrap;
}
.portal-prediction-page .pred-model-table tr.is-selected { background: #f1f7fb; color: #244866; font-weight: 650; }
.portal-prediction-page .pred-model-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 6px;
    border-radius: 4px;
    background: #e5f0eb;
    color: #327557;
    font-size: 10px;
    white-space: nowrap;
}
.portal-prediction-page .pred-model-caption,
.portal-prediction-page .pred-model-test-note {
    margin: 10px 0 0;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.6;
}
.portal-prediction-page .pred-model-test-note { color: #94632a; }
@media (max-width: 768px) {
    .portal-prediction-page .weather-date-info {
        width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
        line-height: 1.5;
        margin-top: 4px;
    }
}
@media (max-width: 600px) {
    .portal-prediction-page .pred-model-evaluation { padding: 14px 12px; }
    .portal-prediction-page .pred-model-table { min-width: 0; table-layout: fixed; font-size: 10px; }
    .portal-prediction-page .pred-model-table th,
    .portal-prediction-page .pred-model-table td { padding: 7px 4px; overflow-wrap: anywhere; }
    .portal-prediction-page .pred-model-table th:nth-child(1) { width: 43%; }
    .portal-prediction-page .pred-model-table th:nth-child(2) { width: 18%; }
    .portal-prediction-page .pred-model-table th:nth-child(4) { width: 27%; }
    .portal-prediction-page .pred-model-table th:nth-child(5) { width: 12%; }
    .portal-prediction-page .pred-model-table th:nth-child(3),
    .portal-prediction-page .pred-model-table td:nth-child(3) { display: none; }
    .portal-prediction-page .pred-model-badge { display: block; width: fit-content; margin: 3px 0 0; }
}

.portal-submit-page .batch-import-heading { padding: 18px 20px 16px; }
.portal-submit-page .batch-import-heading h2 { margin: 0 0 5px; color: #183957; font-size: 20px; }
.portal-submit-page .batch-import-heading p { font-size: 11px; line-height: 1.65; }
.portal-submit-page .batch-flow { padding: 17px 22px 14px; }
.portal-submit-page .batch-upload-form { margin: 0 22px 21px; }
.portal-submit-page .file-drop-zone { padding: 15px 17px; }
.portal-submit-page .submission-divider { margin: 14px 0; }
.portal-submit-page .form-panel { padding: 22px; }
.portal-submit-page .form-header { margin-bottom: 18px; padding-bottom: 14px; }
.portal-submit-page .submit-form fieldset.form-section { padding: 16px 18px; margin-bottom: 12px; }

.portal-tabs.org-tab-bar {
    position: static;
    justify-content: flex-start;
    gap: 2px;
    max-width: none;
    margin: 0 0 10px;
    padding: 0 5px;
    border: 1px solid var(--portal-line);
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(21, 45, 72, .035);
}
.portal-tabs .org-tab-btn {
    position: relative;
    min-width: 120px;
    min-height: 46px;
    padding: 0 18px;
    color: #66788c;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 12px;
}
.portal-tabs .org-tab-btn::after {
    content: "";
    position: absolute;
    right: 16px;
    bottom: 0;
    left: 16px;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: transparent;
}
.portal-tabs .org-tab-btn.active { color: #17345f; background: transparent; box-shadow: none; }
.portal-tabs .org-tab-btn.active::after { background: var(--portal-gold); }
.portal-organization-page .section-header .section-title { color: #293f58; font-size: 16px; }
.portal-organization-page .leader-grid { gap: 10px; margin-bottom: 10px; }
.portal-organization-page .leader-card { border-radius: 9px; box-shadow: 0 1px 4px rgba(21, 45, 72, .045); }
.portal-organization-page .dept-section { margin-bottom: 10px; }

.portal-profile-form { max-width: 820px; }
.portal-profile-grid { gap: 14px; }
.portal-account-main { max-width: 1120px !important; }
.portal-account-summary .portal-impact-metrics strong { font-family: var(--font-sans); font-size: 13px; }
.portal-inline-auth.auth-container { max-width: 480px; margin: 14px auto 0; padding: 0; }
.portal-inline-auth .auth-card { max-width: 480px; }
.portal-empty-state { padding: 55px 20px; color: #8190a0; text-align: center; }
.portal-empty-state > div {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    margin: 0 auto 12px;
    color: #8190a0;
    border: 1px solid #d8e0e8;
    border-radius: 50%;
    background: #f7f9fb;
}
.portal-empty-state p { margin-bottom: 8px; color: #52667b; font-size: 14px; }
.portal-empty-state a { color: #2f68a7; font-size: 12px; font-weight: 700; }
.portal-pagination {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 12px 0;
    border-top: 1px solid var(--portal-soft-line);
}
.portal-pagination-summary { color: #78899b; font-size: 10px; }
.portal-pagination-summary strong { color: #2d4b68; }
.portal-pagination-actions { display: flex; gap: 5px; }
.portal-pagination-actions a,
.portal-pagination-actions span {
    min-width: 54px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    color: #315f89;
    border: 1px solid #d3dde7;
    border-radius: 5px;
    background: #fff;
    font-size: 10px;
    font-weight: 700;
}
.portal-pagination-actions a:hover { color: #fff; border-color: #315f89; background: #315f89; }
.portal-pagination-actions span { color: #a4afba; background: #f5f7f9; }

.portal-auth-page {
    --portal-gold: #c8a33d;
    background-color: #eef2f7;
    background-image: linear-gradient(120deg, rgba(16, 43, 88, .03), transparent 50%), url("../data/hubei-bg.svg");
    background-position: center, 76% 54%;
    background-size: auto, 52% auto;
}
.portal-auth-header { position: relative; }
.portal-auth-header .header-nav { flex: 0 0 auto; margin-left: auto; }
.portal-auth-page .auth-container { padding: 48px 20px 34px; }
.portal-auth-page .auth-card {
    overflow: hidden;
    border-color: #d7e0ea;
    border-top: 3px solid var(--portal-gold);
    border-radius: 10px;
    box-shadow: 0 16px 45px rgba(28, 51, 76, .11);
}
.auth-kicker {
    display: block;
    margin-bottom: 7px;
    color: #8b6d28;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: .12em;
    text-align: center;
}
.portal-auth-page .auth-title { font-size: 22px; }
.portal-auth-page .auth-btn { background: #173d70; }
.portal-auth-page .auth-btn:hover { background: #24558f; }

@media (max-width: 1250px) {
    .portal-app-header { gap: 10px; padding: 0 14px; }
    .portal-app-header .logo-text { font-size: 13px; letter-spacing: .8px; }
    .portal-app-header .header-nav a { padding: 8px 7px; font-size: 11px; }
    .portal-impact-strip { grid-template-columns: minmax(330px, 1.25fr) minmax(360px, 1fr) 140px; }
    .portal-dashboard-page .stat-card { padding-right: 11px; padding-left: 11px; }
}

@media (max-width: 1050px) {
    .portal-app-header .header-nav { display: none; }
    .portal-app-header { justify-content: space-between; }
    .portal-impact-strip { grid-template-columns: minmax(0, 1.2fr) minmax(330px, .8fr); }
    .portal-impact-action { grid-column: 1 / -1; min-height: 42px; border-top: 1px solid #173d70; border-left: 0; }
    .portal-dashboard-page .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .portal-dashboard-page .stat-card:nth-child(3n) { border-right: 0; }
    .portal-dashboard-page .stat-card:nth-child(-n+3) { border-bottom: 1px solid var(--portal-soft-line); }
}

@media (max-width: 760px) {
    .portal-main.main-container { padding: 10px; }
    .portal-page-head { grid-template-columns: auto minmax(0, 1fr); padding: 11px 12px; }
    .portal-page-meta { grid-column: 1 / -1; align-items: flex-start; padding: 8px 0 0; border-top: 1px solid var(--portal-soft-line); border-left: 0; text-align: left; }
    .portal-impact-strip { grid-template-columns: 1fr; }
    .portal-submissions-page .portal-impact-strip,
    .portal-admin-page .portal-impact-strip { grid-template-columns: 1fr; }
    .portal-submissions-page .portal-impact-action { grid-column: auto; }
    .portal-impact-metrics { border-top: 1px solid var(--portal-soft-line); border-left: 0; }
    .portal-impact-action { grid-column: auto; }
    .portal-page .portal-filter-strip { align-items: stretch; flex-wrap: wrap; }
    .portal-page .portal-filter-strip .date-filter-info,
    .portal-page .portal-filter-strip .city-selector-info,
    .portal-page .portal-filter-strip .city-selector-coords { width: 100%; margin: 0; }
    .portal-dashboard-page .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .portal-dashboard-page .stat-card,
    .portal-dashboard-page .stat-card:nth-child(3n) { border-right: 1px solid var(--portal-soft-line); border-bottom: 1px solid var(--portal-soft-line); }
    .portal-dashboard-page .stat-card:nth-child(even) { border-right: 0; }
    .portal-dashboard-page .stat-card:nth-last-child(-n+2) { border-bottom: 0; }
    .portal-page .map-chart-container,
    .portal-prediction-page .weather-map-container { height: 430px; }
    .portal-prediction-page .pred-chart-container { height: 360px; }
}

@media (max-width: 520px) {
    .portal-app-header .risk-header-submit span { display: none; }
    .portal-app-header .risk-header-submit { width: 34px; padding: 0; }
    .portal-app-header .risk-account-menu > summary { min-width: 0; max-width: 110px; }
    .portal-title-row h1 { font-size: 18px; }
    .portal-page-icon { width: 40px; height: 40px; }
    .portal-impact-lead h2 { white-space: normal; }
    .portal-impact-metrics { flex-wrap: wrap; }
    .portal-impact-metrics > div { min-width: 33.333%; }
    .portal-dashboard-page .stats-grid { grid-template-columns: 1fr; }
    .portal-dashboard-page .stat-card,
    .portal-dashboard-page .stat-card:nth-child(even),
    .portal-dashboard-page .stat-card:nth-last-child(-n+2) { border-right: 0; border-bottom: 1px solid var(--portal-soft-line); }
    .portal-dashboard-page .stat-card:last-child { border-bottom: 0; }
    .portal-tabs .org-tab-btn { flex: 1; min-width: 0; }
    .portal-auth-page .auth-card { padding: 30px 22px; }
    .portal-pagination { align-items: flex-start; flex-direction: column; }
    .portal-pagination-actions { width: 100%; }
    .portal-pagination-actions a,
    .portal-pagination-actions span { min-width: 0; flex: 1; }
}

/* Result-first briefing hierarchy: conclusion, action, then supporting evidence. */
.risk-command-header.detail-header {
    min-height: 78px;
    padding-top: 10px;
    padding-bottom: 10px;
}
.risk-command-copy > p { max-width: 860px; line-height: 1.55; }
.risk-impact-brief {
    position: relative;
    min-height: 116px;
    display: grid;
    grid-template-columns: minmax(360px, 1.35fr) minmax(270px, 1fr) minmax(220px, .75fr) 142px;
    align-items: stretch;
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid #d5dee8;
    border-left: 4px solid #c44740;
    border-radius: 9px;
    background: linear-gradient(96deg, #fff7f5 0, #fffdfa 31%, #fff 70%);
    box-shadow: 0 3px 11px rgba(28, 51, 76, .07);
}
.risk-impact-brief[hidden] { display: none !important; }
.risk-impact-brief::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 2px;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(196, 71, 64, .5), rgba(200, 163, 61, .32) 42%, transparent 82%);
}
.risk-impact-main,
.risk-impact-action,
.risk-impact-facts,
.risk-impact-next { min-width: 0; }
.risk-impact-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 12px 18px 11px;
}
.risk-impact-kicker {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #8b4a45;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .08em;
}
.risk-impact-kicker i {
    width: 7px;
    height: 7px;
    flex: none;
    border: 2px solid #f3c6c2;
    border-radius: 50%;
    background: #c44740;
    box-sizing: content-box;
}
.risk-impact-main h2 {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: 2px;
    color: #1d3149;
    font-size: 21px;
    line-height: 1.15;
    white-space: nowrap;
}
.risk-impact-main h2 strong {
    color: #bd3935;
    font: 800 38px/.95 var(--font-mono);
    letter-spacing: -.04em;
}
.risk-impact-lead {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 7px;
    color: #596c80;
    font-size: 10px;
    white-space: nowrap;
}
.risk-impact-lead span {
    flex: none;
    padding: 3px 6px;
    color: #a73d38;
    border: 1px solid #efc8c4;
    border-radius: 4px;
    background: rgba(255, 255, 255, .82);
    font-weight: 750;
}
.risk-impact-lead b {
    min-width: 0;
    overflow: hidden;
    color: #263d57;
    font-size: 12px;
    text-overflow: ellipsis;
}
.risk-impact-lead em {
    flex: none;
    color: #a33b37;
    font-style: normal;
    font-weight: 750;
}
.risk-impact-action {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 12px 16px;
    border-left: 1px solid #e2e7ed;
    background: rgba(255, 255, 255, .62);
}
.risk-impact-label,
.risk-impact-facts span {
    color: #7b8b9c;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .08em;
}
.risk-impact-action strong {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 6px;
    color: #2d435c;
    font-size: 12px;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.risk-impact-action small {
    overflow: hidden;
    margin-top: 6px;
    color: #8a98a7;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.risk-impact-facts {
    display: grid;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    padding: 7px 14px;
    border-left: 1px solid #e2e7ed;
    background: #fff;
}
.risk-impact-facts > div {
    min-width: 0;
    display: grid;
    align-content: center;
}
.risk-impact-facts > div:first-child { border-bottom: 1px solid #e8edf2; }
.risk-impact-facts strong {
    overflow: hidden;
    margin-top: 2px;
    color: #27425f;
    font-size: 13px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.risk-impact-facts strong b {
    color: #a96b24;
    font: 800 17px/1 var(--font-mono);
}
.risk-impact-facts small {
    overflow: hidden;
    margin-top: 2px;
    color: #8291a1;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.risk-impact-next {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 12px 13px;
    border-left: 1px solid #e2e7ed;
    background: #fbfcfd;
}
.risk-impact-next button {
    width: 100%;
    min-height: 39px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 10px;
    color: #fff;
    border: 1px solid #173d70;
    border-radius: 6px;
    background: #173d70;
    box-shadow: 0 3px 8px rgba(24, 60, 108, .16);
    font: 700 11px/1 var(--font-sans);
    cursor: pointer;
}
.risk-impact-next button:hover { border-color: #24558f; background: #24558f; }
.risk-impact-next button:focus-visible { outline: 2px solid #c9a43e; outline-offset: 2px; }
.risk-impact-next button:disabled { opacity: .5; cursor: not-allowed; }
.risk-impact-next svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.risk-impact-next > small {
    color: #8b98a6;
    font-size: 8px;
    line-height: 1.35;
    text-align: center;
}
.risk-impact-brief[data-state="stable"] { border-left-color: #34836d; background: linear-gradient(96deg, #f5fbf8 0, #fff 55%); }
.risk-impact-brief[data-state="stable"]::after { background: linear-gradient(90deg, rgba(52, 131, 109, .48), transparent 70%); }
.risk-impact-brief[data-state="stable"] .risk-impact-main h2 strong { color: #28755f; }
.risk-kpi.stat-card { height: 86px; padding-top: 9px; padding-bottom: 9px; }
.risk-kpi strong { font-size: 27px; }
.risk-kpi small { margin-top: 3px; line-height: 1.3; }

.risk-reporting .risk-impact-brief {
    min-height: 84px;
    grid-template-columns: minmax(350px, 1.45fr) minmax(270px, 1fr) minmax(220px, .76fr) 132px;
    margin-bottom: 8px;
}
.risk-reporting .risk-impact-main { padding: 8px 16px; }
.risk-reporting .risk-impact-main h2 { margin-top: 1px; font-size: 17px; }
.risk-reporting .risk-impact-main h2 strong { font-size: 29px; }
.risk-reporting .risk-impact-lead { margin-top: 4px; }
.risk-reporting .risk-impact-action { padding: 8px 14px; }
.risk-reporting .risk-impact-action strong { margin-top: 3px; font-size: 10px; line-height: 1.4; }
.risk-reporting .risk-impact-action small,
.risk-reporting .risk-impact-direction-note,
.risk-reporting .risk-impact-next > small { display: none; }
.risk-reporting .risk-impact-facts { padding: 4px 12px; }
.risk-reporting .risk-impact-next { padding: 8px 11px; }
.risk-reporting .risk-kpi-grid { display: none !important; }
.risk-reporting .risk-map-stage {
    height: max(340px, calc(100vh - 365px));
    min-height: 340px;
}

@media (max-width: 1250px) {
    .risk-impact-brief {
        grid-template-columns: minmax(300px, 1.3fr) minmax(230px, 1fr) minmax(190px, .78fr) 122px;
    }
    .risk-impact-main { padding-right: 13px; padding-left: 14px; }
    .risk-impact-main h2 { gap: 5px; font-size: 19px; }
    .risk-impact-main h2 strong { font-size: 34px; }
    .risk-impact-action { padding-right: 12px; padding-left: 12px; }
    .risk-impact-facts { padding-right: 10px; padding-left: 10px; }
    .risk-impact-next { padding-right: 9px; padding-left: 9px; }
}

@media (max-width: 980px) {
    .risk-impact-brief { grid-template-columns: minmax(0, 1.2fr) minmax(270px, .8fr); }
    .risk-impact-facts {
        grid-column: 1;
        grid-row: 2;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: 1fr;
        border-top: 1px solid #e2e7ed;
        border-left: 0;
    }
    .risk-impact-facts > div { padding: 5px 8px; }
    .risk-impact-facts > div:first-child { border-right: 1px solid #e8edf2; border-bottom: 0; }
    .risk-impact-next { grid-column: 2; grid-row: 2; border-top: 1px solid #e2e7ed; }
}

@media (max-width: 680px) {
    .risk-impact-brief { grid-template-columns: 1fr; }
    .risk-impact-main,
    .risk-impact-action,
    .risk-impact-facts,
    .risk-impact-next { grid-column: auto; grid-row: auto; }
    .risk-impact-main h2 { white-space: normal; }
    .risk-impact-action,
    .risk-impact-facts,
    .risk-impact-next { border-top: 1px solid #e2e7ed; border-left: 0; }
    .risk-impact-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: 1fr; }
    .risk-impact-next { align-items: flex-start; }
    .risk-impact-next button { width: auto; min-width: 150px; }
}

/* Map-first government briefing hierarchy (v4.0).
   The first screen answers where attention is needed; filters and evidence follow. */
.portal-dashboard-page .portal-main.main-container {
    max-width: 1480px;
    padding-top: 14px;
}
.portal-dashboard-page .portal-page-head {
    min-height: 64px;
    margin-bottom: 8px;
    padding: 7px 15px;
}
.portal-dashboard-page .portal-page-icon { width: 40px; height: 40px; }
.portal-dashboard-page .portal-page-icon svg { width: 24px; height: 24px; }
.portal-dashboard-page .portal-title-row h1 { font-size: 20px; }
.portal-dashboard-page .portal-page-copy > p { margin-top: 2px; }
.dashboard-map-section {
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid var(--portal-line);
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(28, 51, 76, .065);
}
.portal-page .dashboard-map-section .dashboard-map-header {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 8px 15px;
    border-bottom: 1px solid var(--portal-soft-line);
    background: linear-gradient(90deg, #f7fafd, #fff 62%);
}
.dashboard-map-header > div { min-width: 0; }
.dashboard-map-header .section-title {
    color: #1e3856;
    font-size: 15px;
}
.dashboard-map-header > div p {
    margin: 2px 0 0 12px;
    color: #7c8c9d;
    font-size: 9px;
}
.dashboard-map-layout {
    min-height: 514px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 270px;
}
.dashboard-map-visual {
    min-width: 0;
    border-right: 1px solid var(--portal-soft-line);
    background: #fff;
}
.portal-page .dashboard-map-section .map-chart-container {
    height: 470px;
    background: radial-gradient(circle at 50% 48%, #fff 0, #fbfcfe 72%, #f6f9fc 100%);
}
.portal-page .dashboard-map-section .map-stats-row {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 26px;
    margin: 0;
    padding: 8px 14px;
    border-top: 1px solid #edf1f5;
    background: #fbfcfe;
}
.dashboard-map-brief {
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 20px 18px 17px;
    background: linear-gradient(155deg, #f4f8fc 0, #fff 62%);
}
.dashboard-map-brief-kicker {
    color: #836720;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .1em;
}
.dashboard-map-brief h2 {
    display: flex;
    align-items: baseline;
    gap: 7px;
    margin-top: 7px;
    color: #21364f;
    font-size: 15px;
}
.dashboard-map-brief h2 strong {
    color: #234f7f;
    font: 800 36px/1 var(--font-mono);
    letter-spacing: -.05em;
}
.dashboard-map-brief h2 small { color: #5d7084; font-size: 11px; }
.dashboard-map-brief > p {
    margin-top: 10px;
    color: #67798c;
    font-size: 10px;
    line-height: 1.65;
}
.dashboard-map-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 16px;
    border: 1px solid #dde5ed;
    border-radius: 7px;
    background: #fff;
}
.dashboard-map-metrics > div {
    min-width: 0;
    padding: 11px 10px;
    border-right: 1px solid #e6ebf0;
    border-bottom: 1px solid #e6ebf0;
}
.dashboard-map-metrics > div:nth-child(2n) { border-right: 0; }
.dashboard-map-metrics > div:last-child {
    grid-column: 1 / -1;
    border-right: 0;
    border-bottom: 0;
}
.dashboard-map-metrics dt { color: #8493a3; font-size: 9px; }
.dashboard-map-metrics dd { margin-top: 3px; color: #314a64; }
.dashboard-map-metrics dd strong { font: 750 20px/1 var(--font-mono); }
.dashboard-map-metrics dd small { margin-left: 3px; color: #718397; font-size: 9px; }
.dashboard-map-action {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding: 0 12px;
    color: #fff;
    border-radius: 6px;
    background: #173f70;
    font-size: 11px;
    font-weight: 750;
    text-decoration: none;
}
.dashboard-map-action:hover { background: #102f59; }
.dashboard-map-action:focus-visible { outline: 2px solid #3568d4; outline-offset: 2px; }

.risk-dashboard.main-container {
    display: flex;
    flex-direction: column;
}
.risk-dashboard > .breadcrumb { order: 0; }
.risk-command-header.detail-header {
    order: 10;
    min-height: 64px;
    margin-bottom: 8px;
    padding: 7px 15px;
}
.risk-command-main { min-width: 0; }
.risk-page-icon { width: 40px; height: 40px; }
.risk-page-icon svg { width: 24px; height: 24px; }
.risk-title-row h1 { font-size: 20px; }
.risk-command-copy > p {
    max-width: 840px;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.risk-command-actions .risk-caveat { display: none; }
.risk-horizon-switch button {
    min-width: 92px;
    height: 32px;
    padding: 0 12px;
    font-size: 11px;
}
.risk-view-nav-shell {
    order: 20;
    min-height: 44px;
    margin-bottom: 8px;
}
.risk-view-tabs button { min-height: 42px; }
#riskRefreshButton,
#riskPrintReport,
#riskExportMap { width: 34px; padding: 0; }
#riskRefreshButton span,
#riskPrintReport span,
#riskExportMap span { display: none; }
.risk-workspace,
.risk-scientific-framework,
.risk-detail-panel { order: 30; }
.risk-workspace {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 314px);
    gap: 10px;
    margin-bottom: 10px;
}
.risk-filter-strip { order: 40; }
.risk-impact-brief { order: 50; }
.risk-kpi-grid { order: 60; }
.risk-method-audit { order: 70; }
.risk-table-panel { order: 80; }
.risk-footer { order: 90; }
.risk-map-header.risk-panel-header {
    min-height: 64px;
    gap: 4px 14px;
    padding: 8px 13px 7px;
}
.risk-map-title h2 { font-size: 14px; }
.risk-map-title p {
    max-width: 610px;
    margin-top: 2px;
    overflow: hidden;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.risk-map-view-switch { height: 30px; }
.risk-map-view-switch button { min-width: 64px; padding: 0 7px; font-size: 9px; }
.risk-map-header .risk-map-meta {
    gap: 2px 12px;
    line-height: 1.25;
}
.risk-map-header .risk-resolution-meta { display: none; }
.risk-hotspot-summary { font-size: 9px; }
.risk-direction-summary { font-size: 9px; }
.risk-map-stage { height: 448px; }
.risk-map-legend {
    left: 13px;
    top: 13px;
    max-width: 540px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 12px;
    padding: 8px 10px;
}
.risk-map-legend span { gap: 5px; font-size: 9px; }
.risk-map-legend b { font-size: 8px; }
.risk-direction-note {
    max-width: 300px;
    padding: 5px 7px;
    font-size: 8px;
    line-height: 1.4;
}
.risk-priority-panel {
    display: grid;
    grid-template-rows: auto auto 48px 28px minmax(0, 1fr);
    background: #fff;
}
.risk-focus-summary {
    position: relative;
    padding: 13px 14px 12px;
    overflow: hidden;
    border-bottom: 1px solid #e1e7ed;
    border-left: 4px solid #c44740;
    background: linear-gradient(135deg, #fff6f4 0, #fff 70%);
}
.risk-focus-summary::after {
    content: "";
    position: absolute;
    top: -28px;
    right: -28px;
    width: 88px;
    height: 88px;
    border: 1px solid rgba(196, 71, 64, .1);
    border-radius: 50%;
    box-shadow: 0 0 0 13px rgba(196, 71, 64, .035), 0 0 0 26px rgba(196, 71, 64, .02);
    pointer-events: none;
}
.risk-focus-summary[data-state="stable"] {
    border-left-color: #34836d;
    background: linear-gradient(135deg, #f4fbf8 0, #fff 70%);
}
.risk-focus-eyebrow {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.risk-focus-eyebrow span {
    color: #8e433e;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .08em;
}
.risk-focus-summary[data-state="stable"] .risk-focus-eyebrow span { color: #27735e; }
.risk-focus-eyebrow em {
    padding: 3px 5px;
    color: #75602d;
    border: 1px solid #e4d7ad;
    border-radius: 4px;
    background: #fffaf0;
    font-size: 8px;
    font-style: normal;
    font-weight: 700;
}
.risk-focus-summary h2 {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: 3px;
    color: #243a53;
    font-size: 14px;
}
.risk-focus-summary h2 strong {
    color: #bd3935;
    font: 800 31px/.95 var(--font-mono);
}
.risk-focus-summary[data-state="stable"] h2 strong { color: #28755f; }
.risk-focus-point {
    position: relative;
    z-index: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 7px;
}
.risk-focus-point span {
    flex: none;
    padding: 2px 5px;
    color: #a4413c;
    border: 1px solid #efcbc7;
    border-radius: 3px;
    background: #fff;
    font-size: 8px;
    font-weight: 750;
}
.risk-focus-point b {
    min-width: 0;
    overflow: hidden;
    color: #31485f;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.risk-focus-meta {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 6px;
    color: #6d7f91;
    font-size: 8px;
}
.risk-focus-meta span + span {
    min-width: 0;
    overflow: hidden;
    padding-left: 9px;
    border-left: 1px solid #dce3ea;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.risk-focus-summary button {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 9px;
    color: #fff;
    border: 0;
    border-radius: 5px;
    background: #173f70;
    font: 700 9px/1 var(--font-sans);
    cursor: pointer;
}
.risk-focus-summary button:hover { background: #102f59; }
.risk-focus-summary button:disabled { opacity: .5; cursor: not-allowed; }
.risk-focus-summary button:focus-visible { outline: 2px solid #3568d4; outline-offset: 2px; }
.risk-focus-summary button svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.risk-briefing-summary { padding: 10px 13px 9px; }
.risk-briefing-title h2 { font-size: 13px; }
.risk-briefing-title h2::before { height: 14px; }
.risk-briefing-list { gap: 5px; margin-top: 7px; }
.risk-briefing-list li {
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 6px;
    font-size: 8px;
    line-height: 1.4;
}
.risk-briefing-list li > i { width: 16px; height: 16px; font-size: 8px; }
.risk-priority-title-row { min-height: 48px; padding: 6px 12px; }
.risk-priority-head {
    height: 28px;
    grid-template-columns: minmax(118px, 1fr) 62px 42px;
    padding: 0 11px;
    font-size: 8px;
}
.risk-priority-panel .risk-priority-list {
    grid-template-rows: repeat(3, minmax(54px, 1fr));
}
.risk-priority-row {
    grid-template-columns: minmax(118px, 1fr) 62px 42px;
    padding: 6px 11px;
}
.risk-priority-name small { white-space: normal; }
.risk-reporting .risk-impact-brief { order: 25; }
.risk-reporting .risk-workspace { order: 30; }
.risk-reporting .risk-priority-panel .risk-priority-list { grid-template-rows: repeat(3, minmax(44px, 1fr)); }

@media (max-width: 1050px) {
    .dashboard-map-layout { grid-template-columns: minmax(0, 1fr) 245px; }
    .dashboard-map-brief { padding-right: 14px; padding-left: 14px; }
    .risk-workspace { grid-template-columns: minmax(0, 1fr) 286px; }
    .risk-map-view-switch button { min-width: 58px; padding: 0 5px; }
}

@media (max-width: 900px) {
    .dashboard-map-layout { grid-template-columns: 1fr; }
    .dashboard-map-visual { border-right: 0; border-bottom: 1px solid var(--portal-soft-line); }
    .dashboard-map-brief { min-height: 300px; }
    .risk-workspace { grid-template-columns: 1fr; }
    .risk-map-stage { height: 500px; }
    .risk-priority-panel { min-height: 520px; }
    .risk-command-copy > p { white-space: normal; }
}

@media (max-width: 680px) {
    .portal-dashboard-page .portal-page-head { grid-template-columns: auto minmax(0, 1fr); }
    .portal-dashboard-page .portal-page-meta { display: none; }
    .portal-page .dashboard-map-section .map-chart-container { height: 410px; }
    .portal-page .dashboard-map-section .map-stats-row { flex-wrap: wrap; gap: 6px 14px; }
    .dashboard-map-header > div p { display: none; }
    .risk-command-header.detail-header { align-items: flex-start; }
    .risk-command-copy > p { display: none; }
    .risk-view-nav-shell { overflow-x: auto; }
    .risk-view-tabs button { min-width: 96px; }
    .risk-view-actions { flex: none; }
    #riskReportMode span { display: none; }
    #riskReportMode { width: 34px; padding: 0; }
    .risk-map-header.risk-panel-header { grid-template-columns: 1fr; }
    .risk-map-toolbar { justify-content: flex-start; }
    .risk-map-stage { height: 430px; }
    .risk-map-legend { right: 13px; max-width: none; }
}

/* Risk page default is now the briefing view: no separate presentation mode. */
.risk-view-nav-shell {
    min-height: 40px;
    margin-bottom: 8px;
}
.risk-view-tabs button {
    min-height: 38px;
    min-width: 108px;
}
.risk-workspace {
    grid-template-columns: minmax(0, 1fr) 286px;
}
.risk-map-header.risk-panel-header {
    min-height: 52px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px 14px;
    padding: 7px 13px;
}
.risk-map-title p { max-width: 640px; }
.risk-map-header .risk-map-meta { display: none; }
.risk-map-stage { height: 470px; }
.risk-map-legend { max-width: 490px; }
.risk-map-legend .legend-direction {
    width: 28px;
    border-top: 3px solid #a43e35;
}
.risk-map-legend .legend-direction::after {
    top: -6px;
    border-left-color: #a43e35;
    border-left-width: 8px;
}
.risk-direction-callout {
    position: absolute;
    z-index: 8;
    top: 12px;
    right: 62px;
    width: 232px;
    min-height: 70px;
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    padding: 8px 10px 8px 8px;
    overflow: hidden;
    border: 1px solid #d8c48b;
    border-left: 4px solid #a43e35;
    border-radius: 7px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 5px 16px rgba(31, 57, 82, .13);
    backdrop-filter: blur(4px);
    pointer-events: none;
}
.risk-direction-callout[hidden] { display: none !important; }
.risk-direction-callout[data-state="weak"] {
    border-left-color: #c8872d;
}
.risk-direction-callout[data-state="unavailable"] {
    border-left-color: #8b9baa;
    opacity: .86;
}
.risk-direction-compass {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
}
.risk-direction-compass svg {
    width: 46px;
    height: 46px;
    overflow: visible;
    transform: rotate(var(--risk-direction-bearing, 0deg));
    filter: drop-shadow(0 2px 3px rgba(164, 62, 53, .18));
    transition: transform .45s ease;
}
.risk-direction-compass circle {
    fill: #fffaf5;
    stroke: #d8b46a;
    stroke-width: 1.5;
}
.risk-direction-compass path:first-of-type {
    fill: #a43e35;
    stroke: #fff;
    stroke-width: .8;
    stroke-linejoin: round;
}
.risk-direction-compass path:last-of-type {
    fill: none;
    stroke: #a43e35;
    stroke-width: 2.4;
    stroke-linecap: round;
}
.risk-direction-callout[data-state="weak"] .risk-direction-compass path:first-of-type { fill: #b87326; }
.risk-direction-callout[data-state="weak"] .risk-direction-compass path:last-of-type { stroke: #b87326; }
.risk-direction-callout[data-state="unavailable"] .risk-direction-compass {
    filter: grayscale(1);
}
.risk-direction-callout-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.risk-direction-callout-copy > span {
    color: #7d6b3e;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .08em;
}
.risk-direction-callout-copy > strong {
    margin-top: 1px;
    color: #8f352f;
    font-size: 17px;
    line-height: 1.15;
}
.risk-direction-callout[data-state="weak"] .risk-direction-callout-copy > strong { color: #a4611e; }
.risk-direction-callout[data-state="unavailable"] .risk-direction-callout-copy > strong { color: #607285; }
.risk-direction-callout-copy > small {
    margin-top: 3px;
    color: #475d73;
    font-size: 8px;
    font-weight: 700;
    white-space: nowrap;
}
.risk-direction-callout-copy > em {
    margin-top: 2px;
    overflow: hidden;
    color: #8794a1;
    font-size: 7px;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.risk-map-canvas {
    touch-action: pan-y;
}
.risk-map-level-control {
    position: absolute;
    z-index: 9;
    top: 76px;
    left: 13px;
    width: 250px;
    padding: 7px 8px 6px;
    border: 1px solid rgba(174, 191, 207, .9);
    border-radius: 7px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 5px 16px rgba(31, 57, 82, .1);
    backdrop-filter: blur(5px);
}
.risk-map-level-heading {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 5px;
    color: #405a72;
}
.risk-map-level-heading svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: #315f89;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.risk-map-level-heading strong {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .08em;
}
.risk-map-level-buttons {
    display: grid;
    grid-template-columns: .78fr 1.12fr 1.12fr;
    gap: 3px;
}
.risk-map-level-buttons button {
    min-width: 0;
    height: 25px;
    padding: 0 5px;
    color: #536980;
    border: 1px solid #d6e0e9;
    border-radius: 4px;
    background: #f7f9fb;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: border-color .16s ease, background-color .16s ease, color .16s ease;
}
.risk-map-level-buttons button:hover:not(:disabled) {
    color: #234f78;
    border-color: #9eb8cf;
    background: #edf4f9;
}
.risk-map-level-buttons button.active {
    color: #fff;
    border-color: #315f89;
    background: #315f89;
    box-shadow: 0 2px 5px rgba(49, 95, 137, .18);
}
.risk-map-level-buttons button:focus-visible {
    outline: 2px solid #c59631;
    outline-offset: 1px;
}
.risk-map-level-buttons button:disabled {
    color: #a1adb9;
    border-color: #e3e8ed;
    background: #f4f6f8;
    cursor: not-allowed;
}
.risk-map-level-control > small {
    display: block;
    margin-top: 5px;
    overflow: hidden;
    color: #7b8b9b;
    font-size: 8px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 1050px) {
    .risk-workspace { grid-template-columns: minmax(0, 1fr) 272px; }
    .risk-map-legend { max-width: 420px; }
    .risk-direction-callout { width: 210px; }
}

@media (max-width: 900px) {
    .risk-workspace { grid-template-columns: 1fr; }
    .risk-map-stage { height: 500px; }
    .risk-map-legend { max-width: 470px; }
    .risk-direction-callout { width: 226px; }
}

@media (max-width: 680px) {
    .risk-view-tabs button { min-width: 92px; }
    .risk-map-stage { height: 440px; }
    .risk-map-legend { right: 13px; max-width: none; }
    .risk-direction-callout {
        top: 96px;
        right: 12px;
        width: 205px;
        grid-template-columns: 42px minmax(0, 1fr);
    }
    .risk-direction-compass { width: 42px; height: 42px; }
    .risk-direction-compass svg { width: 40px; height: 40px; }
    .risk-direction-callout-copy > strong { font-size: 15px; }
    .risk-map-level-control {
        top: auto;
        right: 8px;
        bottom: 8px;
        left: 8px;
        width: auto;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        gap: 7px;
        padding: 6px 7px;
    }
    .risk-map-level-heading { margin: 0; }
    .risk-map-level-heading strong { font-size: 8px; }
    .risk-map-level-control > small { display: none; }
    .risk-direction-note { bottom: 55px; }
    .risk-map-scale { bottom: 104px; }
}

@page { size: A4 landscape; margin: 8mm; }
@media print {
    html, body { width: 100%; min-height: 0; overflow: visible; background: #fff !important; }
    .risk-page .risk-app-header,
    .risk-dashboard > .breadcrumb,
    .risk-view-nav-shell,
    .risk-filter-strip,
    .risk-footer,
    .loading-overlay,
    .toast,
    .risk-map-level-control { display: none !important; }
    .risk-dashboard.main-container { max-width: none; padding: 0; }
    .risk-command-header.detail-header { min-height: 54px; margin-bottom: 6px; padding: 8px 12px; box-shadow: none; }
    .risk-page-icon,
    .risk-command-copy > p,
    .risk-command-actions .risk-caveat { display: none; }
    .risk-title-row h1 { font-size: 18px; }
    .risk-impact-brief {
        min-height: 78px;
        grid-template-columns: minmax(330px, 1.45fr) minmax(240px, 1fr) minmax(190px, .75fr);
        margin-bottom: 6px;
        box-shadow: none;
    }
    .risk-impact-main,
    .risk-impact-action { padding: 7px 11px; }
    .risk-impact-main h2 { font-size: 15px; }
    .risk-impact-main h2 strong { font-size: 26px; }
    .risk-impact-action strong { margin-top: 2px; font-size: 9px; }
    .risk-impact-action small,
    .risk-impact-direction-note,
    .risk-impact-next { display: none; }
    .risk-impact-facts { padding: 3px 9px; }
    .risk-kpi-grid { display: none !important; }
    .risk-kpi.stat-card { min-height: 64px; padding: 7px 11px; }
    .risk-kpi strong { font-size: 22px; }
    .risk-kpi small { display: none; }
    .risk-panel,
    .risk-holdout-validation,
    .risk-validation-gate-panel { box-shadow: none; }
    .risk-map-header.risk-panel-header { min-height: 62px; padding: 8px 11px; }
    .risk-map-header .risk-panel-meta,
    .risk-map-header .risk-weather-meta,
    .risk-map-header .risk-resolution-meta,
    .risk-science-strip { display: none; }
    .risk-map-stage { height: 150mm; min-height: 0; }
    .risk-priority-row { break-inside: avoid; }
    .risk-table-wrapper { max-height: none; overflow: visible; }
    .risk-data-table { min-width: 0; }
}

/* Unobstructed briefing map: controls stay outside the geographic canvas. */
.risk-workspace {
    grid-template-columns: minmax(0, 1fr) 276px;
}
.risk-map-display-tools {
    min-height: 68px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(245px, 264px);
    align-items: center;
    gap: 12px;
    padding: 7px 12px;
    border-bottom: 1px solid #dce4ec;
    background: #fbfcfe;
}
.risk-map-display-tools .risk-map-legend {
    position: static;
    inset: auto;
    max-width: none;
    display: flex;
    align-items: center;
    align-content: center;
    flex-wrap: wrap;
    gap: 6px 12px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}
.risk-map-display-tools .risk-map-legend span {
    gap: 5px;
    color: #53667c;
    font-size: 9px;
}
.risk-map-display-tools .risk-map-legend b { font-size: 8px; }
.risk-map-display-tools .risk-map-level-control {
    position: static;
    inset: auto;
    width: auto;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 5px 8px;
    padding: 6px 7px;
    border-color: #d4dee8;
    background: #fff;
    box-shadow: 0 2px 7px rgba(31, 57, 82, .06);
    backdrop-filter: none;
}
.risk-map-display-tools .risk-map-level-heading { margin: 0; }
.risk-map-display-tools .risk-map-level-buttons button { height: 27px; }
.risk-map-display-tools .risk-map-level-control > small {
    grid-column: 1 / -1;
    margin-top: 0;
}
.risk-map-stage {
    height: 556px;
    overflow: hidden;
    border-top: 0;
    background:
        radial-gradient(circle at 51% 49%, rgba(255,255,255,.99) 0 28%, rgba(244,248,251,.92) 70%, rgba(237,243,248,.97) 100%),
        #f3f7fa;
}
.risk-map-stage .risk-map-canvas {
    width: 100%;
    height: 100%;
}
.risk-map-footer {
    min-height: 45px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 48px;
    align-items: center;
    gap: 12px;
    padding: 5px 11px;
    border-top: 1px solid #dce4ec;
    background: #fbfcfe;
}
.risk-map-footer .risk-map-scale {
    position: static;
    inset: auto;
    z-index: auto;
    min-width: 170px;
    padding: 3px 5px 2px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.risk-map-footer .risk-direction-note {
    position: static;
    inset: auto;
    z-index: auto;
    max-width: none;
    margin: 0;
    padding: 3px 10px;
    color: #66788c;
    border: 0;
    border-left: 3px solid #bd7431;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    font-size: 8px;
    line-height: 1.45;
}
.risk-map-footer .risk-north-arrow {
    position: static;
    inset: auto;
    z-index: auto;
    width: 48px;
    min-height: 30px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 3px 4px;
    border-color: #d4dee8;
    background: #fff;
    box-shadow: none;
}
.risk-map-footer .risk-north-arrow svg {
    width: 13px;
    height: 20px;
    margin: 0;
}
.risk-priority-panel {
    grid-template-rows: auto auto auto 48px 28px minmax(162px, 1fr);
}
.risk-priority-panel > .risk-focus-summary { grid-row: 1; }
.risk-priority-panel > .risk-direction-callout { grid-row: 2; }
.risk-priority-panel > .risk-briefing-summary { grid-row: 3; }
.risk-priority-panel > .risk-priority-title-row { grid-row: 4; }
.risk-priority-panel > .risk-priority-head { grid-row: 5; }
.risk-priority-panel > .risk-priority-list { grid-row: 6; }
.risk-priority-panel > .risk-direction-callout {
    position: relative;
    inset: auto;
    z-index: auto;
    width: auto;
    min-height: 0;
    display: block;
    margin: 8px 9px 0;
    padding: 10px;
    overflow: hidden;
    border: 1px solid #dbc98f;
    border-left: 4px solid #a43e35;
    border-radius: 7px;
    background: linear-gradient(155deg, #fffdf8 0%, #fff 68%);
    box-shadow: 0 4px 13px rgba(38, 58, 78, .08);
    backdrop-filter: none;
    pointer-events: none;
}
.risk-priority-panel > .risk-direction-callout[hidden] { display: none !important; }
.risk-direction-callout-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 7px;
}
.risk-direction-callout-heading > div {
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.risk-direction-callout-heading span {
    color: #9a671f;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .1em;
}
.risk-direction-callout-heading strong {
    margin-top: 2px;
    color: #2c435c;
    font-size: 11px;
}
.risk-direction-callout-heading > em {
    flex: none;
    padding: 3px 5px;
    color: #876421;
    border: 1px solid #e4d8ae;
    border-radius: 3px;
    background: #fffaf0;
    font-size: 7px;
    font-style: normal;
    font-weight: 750;
}
.risk-direction-magnifier {
    overflow: hidden;
    border: 1px solid #d9e2ea;
    border-radius: 6px;
    background:
        linear-gradient(rgba(74, 111, 143, .055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(74, 111, 143, .055) 1px, transparent 1px),
        linear-gradient(145deg, #f8fbfd, #eef4f8);
    background-size: 18px 18px, 18px 18px, auto;
}
.risk-direction-magnifier > svg {
    width: 100%;
    height: 94px;
    display: block;
}
.risk-direction-contour {
    fill: none;
    stroke: #a9bdcd;
    stroke-width: 1.15;
    stroke-dasharray: 3 3;
    opacity: .58;
}
#riskDirectionMagnifierLine {
    stroke: #a43e35;
    stroke-width: 3.4;
    stroke-linecap: round;
    filter: drop-shadow(0 2px 2px rgba(164, 62, 53, .2));
}
.risk-direction-magnifier marker path { fill: #a43e35; }
#riskDirectionMagnifierSource {
    fill: #fff;
    stroke: #315f89;
    stroke-width: 3;
}
#riskDirectionMagnifierTarget {
    fill: #a43e35;
    stroke: #fff;
    stroke-width: 1.5;
    filter: drop-shadow(0 2px 2px rgba(164, 62, 53, .24));
}
.risk-direction-bearing {
    fill: #8b5c1d;
    font: 800 9px var(--font-sans);
    letter-spacing: .03em;
}
.risk-direction-north {
    fill: #294761;
    font: 800 9px var(--font-sans);
    text-anchor: middle;
}
.risk-direction-north-mark { fill: #315f89; }
.risk-direction-magnifier-legend {
    min-height: 25px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 4px 7px;
    color: #5f7387;
    border-top: 1px solid #dce4eb;
    background: rgba(255,255,255,.82);
    font-size: 7px;
}
.risk-direction-magnifier-legend span {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.risk-direction-magnifier-legend span i {
    width: 7px;
    height: 7px;
    border: 2px solid #315f89;
    border-radius: 50%;
    background: #fff;
}
.risk-direction-magnifier-legend span:nth-child(2) i {
    border: 0;
    border-radius: 1px;
    background: #a43e35;
    transform: rotate(45deg);
}
.risk-direction-magnifier-legend small {
    min-width: 0;
    margin-left: auto;
    overflow: hidden;
    color: #8a97a3;
    font-size: 7px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.risk-direction-callout-summary {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}
.risk-direction-callout-summary .risk-direction-compass {
    width: 42px;
    height: 42px;
}
.risk-direction-callout-summary .risk-direction-compass svg {
    width: 40px;
    height: 40px;
}
.risk-priority-panel > .risk-direction-callout[data-state="weak"] {
    border-left-color: #c8872d;
}
.risk-priority-panel > .risk-direction-callout[data-state="weak"] #riskDirectionMagnifierLine {
    stroke: #b87326;
    stroke-dasharray: 5 3;
}
.risk-priority-panel > .risk-direction-callout[data-state="weak"] .risk-direction-magnifier marker path,
.risk-priority-panel > .risk-direction-callout[data-state="weak"] #riskDirectionMagnifierTarget {
    fill: #b87326;
}
.risk-priority-panel > .risk-direction-callout[data-state="unavailable"] .risk-direction-magnifier {
    filter: grayscale(1);
    opacity: .58;
}

@media (max-width: 1050px) {
    .risk-workspace { grid-template-columns: minmax(0, 1fr) 264px; }
    .risk-map-display-tools { grid-template-columns: minmax(0, 1fr) 245px; }
    .risk-priority-panel > .risk-direction-callout { width: auto; }
}

@media (max-width: 900px) {
    .risk-workspace { grid-template-columns: 1fr; }
    .risk-map-stage { height: 540px; }
    .risk-priority-panel > .risk-direction-callout {
        inset: auto;
        width: auto;
    }
}

@media (max-width: 680px) {
    .risk-map-display-tools {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 8px;
    }
    .risk-map-display-tools .risk-map-legend { right: auto; }
    .risk-map-display-tools .risk-map-level-control {
        position: static;
        inset: auto;
        width: auto;
    }
    .risk-map-display-tools .risk-map-level-control > small { display: block; }
    .risk-map-stage { height: 470px; }
    .risk-map-footer {
        grid-template-columns: minmax(0, 1fr) 48px;
        gap: 7px;
        padding: 5px 8px;
    }
    .risk-map-footer .risk-map-scale {
        position: static;
        inset: auto;
        min-width: 0;
    }
    .risk-map-footer .risk-direction-note {
        grid-column: 1 / -1;
        grid-row: 2;
        position: static;
        inset: auto;
    }
    .risk-priority-panel > .risk-direction-callout {
        position: relative;
        inset: auto;
        width: auto;
        grid-template-columns: none;
    }
}

@media print {
    .risk-map-display-tools { grid-template-columns: 1fr; min-height: 42px; }
    .risk-map-stage { height: 135mm; }
    .risk-map-footer { min-height: 10mm; }
}

/* Report-first risk overview: large map, selectable hotspots and readable hierarchy. */
.risk-page { overflow-y: auto; }
.risk-workspace {
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 12px;
}
.risk-map-header.risk-panel-header {
    min-height: 72px;
    padding: 10px 15px;
}
.risk-map-title h2 {
    font-size: 19px;
    line-height: 1.25;
}
.risk-map-title p {
    max-width: 720px;
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.45;
}
.risk-map-view-switch {
    height: 36px;
}
.risk-map-view-switch button {
    min-width: 78px;
    padding: 0 10px;
    font-size: 11px;
}
.risk-hotspot-summary,
.risk-direction-summary {
    font-size: 10px;
}
.risk-map-display-tools {
    min-height: 86px;
    grid-template-columns: minmax(0, 1fr) minmax(270px, 292px);
    gap: 16px;
    padding: 10px 14px;
}
.risk-map-display-tools .risk-map-legend {
    gap: 8px 16px;
}
.risk-map-display-tools .risk-map-legend span {
    gap: 7px;
    font-size: 12px;
    line-height: 1.4;
}
.risk-map-display-tools .risk-map-legend b {
    font-size: 11px;
}
.risk-map-display-tools .risk-map-legend i {
    width: 12px;
    height: 12px;
}
.risk-map-display-tools .risk-map-level-control {
    gap: 7px 9px;
    padding: 8px 9px;
}
.risk-map-display-tools .risk-map-level-heading strong {
    font-size: 10px;
}
.risk-map-display-tools .risk-map-level-buttons {
    gap: 5px;
}
.risk-map-display-tools .risk-map-level-buttons button {
    height: 30px;
    font-size: 10px;
}
.risk-map-display-tools .risk-map-level-control > small {
    font-size: 9px;
}
.risk-map-stage {
    height: 600px;
}
.risk-map-footer {
    min-height: 52px;
    grid-template-columns: auto minmax(0, 1fr) 52px;
    gap: 16px;
    padding: 7px 13px;
}
.risk-map-footer .risk-direction-note {
    font-size: 10px;
}
.risk-map-footer .risk-map-scale {
    font-size: 10px;
}
.risk-map-footer .risk-north-arrow {
    width: 52px;
    min-height: 34px;
    font-size: 11px;
}

.risk-priority-panel {
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
}
.risk-priority-panel > .risk-focus-summary,
.risk-priority-panel > .risk-direction-callout,
.risk-priority-panel > .risk-briefing-summary {
    grid-row: auto;
}
.risk-focus-summary {
    flex: none;
    padding: 16px 16px 15px;
}
.risk-focus-eyebrow span {
    font-size: 10px;
}
.risk-focus-eyebrow em {
    padding: 4px 6px;
    font-size: 9px;
}
.risk-focus-summary h2 {
    gap: 8px;
    margin-top: 6px;
    font-size: 15px;
}
.risk-focus-summary h2 strong {
    font-size: 38px;
}
.risk-focus-point-picker {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 6px;
    margin-top: 12px;
}
.risk-focus-point-picker > span {
    color: #7e4b46;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
}
.risk-focus-point-picker select {
    width: 100%;
    height: 38px;
    padding: 0 32px 0 10px;
    overflow: hidden;
    color: #263f59;
    border: 1px solid #c8d5e1;
    border-radius: 6px;
    outline: 0;
    background-color: #fff;
    font: 700 13px/1 var(--font-sans);
    text-overflow: ellipsis;
    cursor: pointer;
}
.risk-focus-point-picker select:hover {
    border-color: #8ea8c1;
}
.risk-focus-point-picker select:focus-visible {
    border-color: #3568d4;
    box-shadow: 0 0 0 3px rgba(53, 104, 212, .14);
}
.risk-focus-point-picker select:disabled {
    color: #8796a5;
    background: #f4f6f8;
    cursor: not-allowed;
}
.risk-focus-meta {
    display: grid;
    gap: 4px;
    margin-top: 9px;
    font-size: 11px;
    line-height: 1.4;
}
.risk-focus-meta span + span {
    padding-left: 0;
    border-left: 0;
    white-space: normal;
}
.risk-focus-summary button {
    height: 40px;
    margin-top: 11px;
    border-radius: 6px;
    font-size: 12px;
}
.risk-focus-summary button svg {
    width: 17px;
    height: 17px;
}

.risk-priority-panel > .risk-direction-callout {
    flex: none;
    margin: 10px 10px 0;
    padding: 12px;
}
.risk-direction-callout-heading {
    margin-bottom: 9px;
}
.risk-direction-callout-heading span {
    font-size: 9px;
}
.risk-direction-callout-heading strong {
    font-size: 15px;
}
.risk-direction-callout-heading > em {
    padding: 4px 6px;
    font-size: 9px;
}
.risk-direction-magnifier > svg {
    height: 124px;
}
#riskDirectionMagnifierLine {
    stroke-width: 2.5;
}
.risk-direction-bearing,
.risk-direction-north {
    font-size: 11px;
}
.risk-direction-magnifier-legend {
    min-height: 32px;
    gap: 12px;
    padding: 6px 8px;
    font-size: 10px;
}
.risk-direction-magnifier-legend small {
    font-size: 9px;
}
.risk-direction-callout-summary {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 10px;
    margin-top: 10px;
}
.risk-direction-callout-summary .risk-direction-compass {
    width: 48px;
    height: 48px;
}
.risk-direction-callout-summary .risk-direction-compass svg {
    width: 46px;
    height: 46px;
}
.risk-direction-callout-copy > span {
    font-size: 9px;
}
.risk-direction-callout-copy > strong {
    font-size: 22px;
}
.risk-direction-callout-copy > small {
    font-size: 11px;
}
.risk-direction-callout-copy > em {
    font-size: 10px;
}
.risk-priority-panel > .risk-briefing-summary {
    flex: 1 1 auto;
    padding: 16px 16px 14px;
}
.risk-briefing-title h2 {
    font-size: 17px;
}
.risk-briefing-title small {
    font-size: 10px;
}
.risk-briefing-list {
    gap: 11px;
    margin-top: 13px;
}
.risk-briefing-list li {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 9px;
    font-size: 12px;
    line-height: 1.55;
}
.risk-briefing-list li > i {
    width: 22px;
    height: 22px;
    font-size: 10px;
}

.risk-priority-below {
    order: 35;
    margin-bottom: 10px;
    overflow: hidden;
    background: #fff;
}
.risk-priority-below .risk-priority-title-row {
    min-height: 66px;
    padding: 11px 17px;
}
.risk-priority-below .risk-priority-title-row h3 {
    font-size: 18px;
}
.risk-priority-below .risk-priority-title-row h3 span {
    font-size: 11px;
}
.risk-priority-below .risk-priority-title-row p {
    margin-top: 4px;
    font-size: 12px;
}
.risk-priority-below .risk-priority-title-row button {
    padding: 8px 10px;
    border: 1px solid #cbd7e2;
    border-radius: 5px;
    font-size: 12px;
}
.risk-priority-below .risk-priority-head {
    display: none;
}
.risk-priority-below .risk-priority-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.risk-priority-below .risk-priority-row {
    min-height: 104px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 1fr 1fr;
    gap: 4px 12px;
    padding: 15px 17px;
    border-right: 1px solid #e3e9ef;
    border-bottom: 0;
}
.risk-priority-below .risk-priority-row:last-child {
    border-right: 0;
}
.risk-priority-below .risk-priority-city {
    grid-column: 1;
    grid-row: 1 / 3;
    gap: 11px;
}
.risk-priority-below .risk-priority-rank {
    width: 28px;
    font-size: 16px;
}
.risk-priority-below .risk-priority-name strong {
    font-size: 15px;
}
.risk-priority-below .risk-priority-name small {
    margin-top: 5px;
    font-size: 11px;
    line-height: 1.45;
    white-space: normal;
}
.risk-priority-below .risk-priority-score {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
}
.risk-priority-below .risk-priority-score strong {
    display: inline;
    font-size: 24px;
}
.risk-priority-below .risk-priority-score small {
    display: inline;
    font-size: 10px;
}
.risk-priority-below .risk-priority-delta {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    font-size: 13px;
}

@media (max-width: 1050px) {
    .risk-workspace { grid-template-columns: minmax(0, 1fr) 278px; }
    .risk-map-display-tools { grid-template-columns: minmax(0, 1fr) 260px; }
}

@media (max-width: 900px) {
    .risk-workspace { grid-template-columns: 1fr; }
    .risk-map-stage { height: 560px; }
    .risk-priority-panel { min-height: 0; }
    .risk-priority-below .risk-priority-list { grid-template-columns: 1fr; }
    .risk-priority-below .risk-priority-row {
        border-right: 0;
        border-bottom: 1px solid #e3e9ef;
    }
}

@media (max-width: 680px) {
    .risk-map-header.risk-panel-header { grid-template-columns: 1fr; }
    .risk-map-title p { white-space: normal; }
    .risk-map-display-tools { grid-template-columns: 1fr; }
    .risk-map-stage { height: 500px; }
    .risk-map-footer .risk-direction-note { font-size: 9px; }
    .risk-priority-below .risk-priority-title-row { align-items: flex-start; }
    .risk-priority-below .risk-priority-title-row button { font-size: 11px; }
}

@media print {
    .risk-priority-below { break-inside: avoid; }
    .risk-priority-below .risk-priority-row { min-height: 25mm; }
}

/* Keep information hierarchy without decorative yellow side accents. */
.map-section .section-title::before,
.table-section .section-title::before,
.chart-panel .chart-title::before,
.detail-table-section .section-title::before,
.detail-chart-panel .chart-title::before,
.pred-result-bar .section-title::before,
.weather-map-section .section-title::before,
.org-content-area .section-title::before,
.portal-section-heading h2::before { content: none; }

.dept-card { border-left-width: 1px; border-left-color: var(--border-light); }
.risk-scientific-framework { border-left: 1px solid var(--border-color); }
.risk-scientific-heading { background: #f7f9fc; }
.risk-holdout-conclusion { border-left: 0; background: #f7f9fb; }
.risk-holdout-conclusion > i { color: #53677f; border-color: #cbd7e3; }
.risk-holdout-conclusion strong { color: #435b72; }
.risk-holdout-conclusion p { color: #697b8d; }
.risk-validation-boundary { border-left: 0; background: transparent; }
.risk-validation-boundary strong { color: inherit; }
.risk-direction-note,
.risk-map-footer .risk-direction-note { border-left: 0; }
.risk-recommended-action { border-left: 0; background: transparent; }
.risk-priority-row.active { background: #eef5fb; box-shadow: none; }

/* Shared filing link stays in normal flow, independent of business footers. */
.icp-footer {
    width: 100%;
    padding: 12px 20px 18px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
    overflow-wrap: anywhere;
}
.icp-footer a { color: inherit; }
.icp-footer a:hover { color: #315f89; text-decoration: underline; }
.icp-footer a:focus-visible { outline: 2px solid #315f89; outline-offset: 4px; }
