:root {
    /* --bg and --primary follow the open model (theme.css). */
    --bg: var(--model-page);
    --card: #ffffff;
    --surface: #eaf1f8;
    --text: #1e2a3a;
    --muted: #61708b;
    --primary: var(--model-accent);
    --accent-soft: #d7f1e8;
    --danger: #db2b39;
    --radius: 16px;
    --shadow: 0 14px 30px rgba(30, 44, 65, 0.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: 'Schibsted Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); }
a { text-decoration: none; color: inherit; }

.app-container { max-width: 1320px; margin: 0 auto; padding: 0 16px 26px; }

/* The mode selector is the main page header; the portal menu fills the viewport. */
.workspace-header { display: flex; align-items: center; gap: 20px; padding: 18px 0; border-bottom: 1px solid #d5e1ed; }
.menu-toggle, .menu-close { flex-shrink: 0; display: grid; place-content: center; width: 46px; height: 46px; padding: 12px; border: 1px solid #d5e1ed; border-radius: 12px; background: white; color: var(--primary); cursor: pointer; }
.menu-toggle { gap: 5px; }
.menu-toggle span { display: block; width: 21px; height: 2px; background: currentColor; border-radius: 2px; }
.menu-toggle:hover, .menu-close:hover { background: #eaf1f8; }
.mode-navigation { min-width: 0; flex: 1; }
.div-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.control { border-radius: 10px; padding: 10px 12px; font-size: 0.83rem; font-weight: 600; border: 1px solid transparent; background: transparent; color: var(--muted); transition: background 0.18s ease, color 0.18s ease; }
.control:hover { background: var(--model-soft); color: var(--primary); }
.control.active { background: var(--primary); color: white; }
.navigation-open { overflow: hidden; }
.site-navigation { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: clamp(24px, 5vw, 72px); border: 0; background: #f4f7fb; color: var(--text); overflow-y: auto; }
.site-navigation::backdrop { background: #f4f7fb; }
.navigation-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; max-width: 1100px; margin: 0 auto; }
.navigation-top p { margin: 0; color: var(--primary); font-weight: 600; }
.menu-close { font-size: 30px; line-height: 1; }
.navigation-options { max-width: 850px; margin: clamp(32px, 7vh, 80px) auto; }
.navigation-options > a, .navigation-options > details { display: block; padding: 22px 0; border-bottom: 1px solid #d5e1ed; }
.navigation-options > a, .navigation-options summary { font-size: clamp(28px, 4vw, 52px); font-weight: 600; letter-spacing: -0.04em; }
.navigation-options > a { display: flex; justify-content: space-between; align-items: center; }
.navigation-options > a span { color: var(--primary); font-size: 0.7em; }
.navigation-options a:hover, .navigation-options summary:hover { color: var(--primary); }
.navigation-options summary { cursor: pointer; }
.model-options { display: grid; gap: 18px; padding: 24px 0 8px; font-size: 1.05rem; }
.model-options > span { color: var(--muted); }
.model-options small { display: inline-block; margin-left: 10px; font-size: 0.7rem; }
.model-options a { color: var(--primary); font-weight: 600; }
.navigation-about { max-width: 600px; margin: 20px 0 0; color: var(--muted); line-height: 1.7; }
.navigation-footnote { max-width: 850px; margin: 0 auto; color: var(--muted); font-size: 0.85rem; }
@media (max-width: 600px) {
    .workspace-header { gap: 12px; align-items: flex-start; padding: 14px 0; }
    .mode-navigation { overflow-x: auto; padding-bottom: 4px; }
    .mode-navigation .div-buttons { flex-wrap: nowrap; }
    .control { white-space: nowrap; min-height: 46px; }
    .navigation-top p { font-size: 0.85rem; }
}

.carousel { margin-top: 18px; overflow: hidden; border-radius: var(--radius); }
.slides { width: 100%; }
.slide { width: 100%; min-height: 65vh; padding: 18px; }
.slide[hidden] { display: none; }

.card, .box-style, .shock-sidebar, .left-panel, .right-panel, .country, .details-div, .visual-wrapper, .graph-box { background: var(--card); border: 1px solid #dde8f3; border-radius: var(--radius); box-shadow: 0 9px 22px rgba(14, 36, 75, 0.08); }

.section .box-style, .box-style { background: var(--card); border: none; box-shadow: none; }

.shock { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 14px; position: relative; }
.shock-sidebar { padding: 20px; }
.shock-graph-div {
    height: 520px;
    border-radius: var(--radius);
    padding: 10px;

}

.sidebar-title { font-size: 1.25rem; margin-bottom: 14px; color: #0f2646; }
.sidebar-section { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.sidebar-section label { font-size: 14px; color: #3b4f69; }
.sidebar-input, .country-select, .series-select, .compare-select, select, input { width: 100%; }
.sidebar-input, select, input[type="range"], .country-select { height: 38px; padding: 8px 10px; border: 1px solid #b8c9dc; border-radius: 8px; background: #fff; color: #1f3560; }

.sidebar-btn { border-radius: 8px; padding: 10px 12px; font-weight: 600; }
.primary-btn { background: var(--primary); color: #fff; border: 1px solid var(--primary); }
.primary-btn:hover { background: var(--model-accent-hover); border-color: var(--model-accent-hover); }
.primary-btn:active { background: var(--model-accent-pressed); border-color: var(--model-accent-pressed); }
.secondary-btn { background: #1f3660; color: #fff; border: 1px solid #1f3660; }
.secondary-btn:hover { background: #0d2544; }

.params-box { padding: 14px; border: 1px solid rgba(184, 201, 220, 0.72); border-radius: 12px; background: rgba(255, 255, 255, 0.74); box-shadow: 0 10px 22px rgba(30, 44, 65, 0.06); }
.params-box h3 { margin: 0 0 10px; color: #3b4f69; font-size: 0.76rem; letter-spacing: 0.08em; text-transform: uppercase; }
.param-row { display: flex; justify-content: space-between; gap: 12px; color: #556a87; font-size: 14px; margin-bottom: 7px; }
.param-row strong { width: auto; color: #173d70; text-align: right; }

.convergence { display: grid; grid-template-columns: 340px minmax(0, 1fr); grid-template-rows: 1fr 120px; gap: 14px; }
.left-panel, .right-panel { padding: 16px;}
.time-box{
    padding: 16px;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}
.time-box_div { background: #fcfefc; border: 2px solid #c6f1d0; color: #18542f; text-align: center; font-weight: 700; padding: 14px; border-radius: 12px; width: 100% }
.time-box_div span { color: #4d7660; font-size: 0.73rem; letter-spacing: 0.06em; text-transform: uppercase; }
.time-box_div h1 { margin: 4px 0 0; }

/*.country { display: grid; grid-template-columns: repeat(3, minmax(160px, 1fr)); gap: 10px; padding: 16px; align-items: end; }*/
.country {padding: 15px; background: var(--card); border: 1px solid #dde8f3; border-radius: var(--radius); box-shadow: 0 9px 22px rgba(14, 36, 75, 0.08);}
.country_item { display: flex; flex-direction: column; }
.country_item label { font-weight: 600; margin-bottom: 5px; }
/*.country_section.buttons { grid-column: span 3; text-align: right; }*/

.run-model .graph-container { margin-top: 12px; display: grid; gap: 14px; }
.graph-box { overflow: hidden; border-radius: var(--radius); }
.model-chart-wrapper, .comparison-chart-wrapper { position: relative; }
.comparison-chart-wrapper { min-width: 0; }

.details { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 14px; }
.details1-inputs { display: grid; gap: 12px; padding: 0; }


.visual-wrapper { display: grid; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); gap: 14px; }

.input-board { padding: 22px; background: linear-gradient(135deg, #ffffff 0%, var(--model-page) 100%); }
.input-board-heading { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.input-board-heading > div { min-width: 0; order: 1; }
.input-board-heading h2, .input-board-heading h3 { margin: 0; color: #172b48; }
.input-board .sidebar-title { margin: 0; }
.input-board-intro { margin: 7px 0 0; color: var(--muted); font-size: 0.85rem; line-height: 1.5; }
.info-toggle { display: grid; flex: 0 0 auto; order: 2; width: 30px; height: 30px; margin-left: auto; padding: 0; place-items: center; border: 1px solid var(--model-border); border-radius: 50%; background: rgba(255, 255, 255, 0.9); color: var(--primary); font-family: Georgia, serif; font-size: 1rem; font-weight: 700; line-height: 1; cursor: pointer; transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease; }
.info-toggle:hover { transform: translateY(-1px); box-shadow: 0 5px 12px rgba(12, 74, 148, 0.16); }
.input-field { display: grid; gap: 6px; }
.input-field label, .country_item label { color: #3b4f69; font-size: 0.8rem; font-weight: 600; }
.range-value { margin: 0; color: var(--muted); font-size: 0.82rem; }
.range-value strong { color: #173d70; }
.input-board .sidebar-btn { min-height: 42px; }

.summary { display: grid; gap: 16px; }
.summary-header { display: grid; gap: 18px; }
.summary-header h2, .summary-section-heading h3, .summary-diagnosis h3, .summary-context h3, .summary-limitations h3 { margin: 0; }
.eyebrow { margin: 0 0 6px; color: var(--primary); font-size: 0.73rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.summary-controls { display: grid; width: 100%; min-width: 0; grid-template-columns: minmax(110px, 1.45fr) repeat(2, minmax(88px, 0.8fr)) minmax(145px, auto); gap: 10px; align-items: end; }
.summary-control-field { display: grid; gap: 6px; }
.summary-control-field select { min-width: 0; }
.summary-control-field label { color: var(--muted); font-size: 0.75rem; font-weight: 600; }
.summary-controls button { white-space: nowrap; }
.summary-empty { min-height: 420px; display: grid; place-content: center; justify-items: center; padding: 32px; text-align: center; }
.summary-empty[hidden], .summary-results[hidden] { display: none; }
.summary-empty span { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 18px; background: var(--model-soft); color: var(--model-strong); font-size: 1.8rem; }
.summary-empty h3 { margin: 16px 0 6px; }
.summary-empty p { margin: 0; max-width: 480px; color: var(--muted); }
.summary-results { display: grid; gap: 22px; }
.summary-diagnosis { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 0.85fr); gap: 24px; padding: 24px; align-items: center; }
.summary-title-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.summary-conclusion { max-width: 700px; margin: 14px 0 0; color: #3f526d; font-size: 1.02rem; line-height: 1.7; }
.status-pill { display: inline-flex; padding: 6px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; }
.status-below { background: #e7f0ff; color: #174b91; }
.status-above { background: #fff0e1; color: #96500b; }
.status-near { background: var(--accent-soft); color: #08745b; }
.summary-chart-title { margin: 0; color: #263d5e; font-weight: 700; }
.summary-chart-unit { margin: 3px 0 0; color: var(--muted); font-size: 0.78rem; }
.summary-position-chart { width: 100%; min-height: 225px; }
.summary-section-heading { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 12px; }
.summary-section-heading > p { max-width: 430px; margin: 0; color: var(--muted); font-size: 0.85rem; text-align: right; }
.summary-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.metric-card { display: flex; min-height: 138px; padding: 18px; flex-direction: column; justify-content: space-between; }
.metric-card span { color: var(--muted); font-size: 0.82rem; font-weight: 600; }
.metric-card strong { margin: 8px 0; color: #102d55; font-size: clamp(1.45rem, 2.5vw, 2rem); }
.metric-card small { color: #7a879a; }
.summary-explanation, .summary-context, .summary-limitations { padding: 22px; }
.driver-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.driver-card { padding: 15px; border: 1px solid #dce7f2; border-radius: 12px; background: #fbfdff; }
.driver-card > div { display: grid; grid-template-columns: auto 1fr; gap: 2px 9px; align-items: center; }
.driver-card strong { grid-row: span 2; display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; background: #e9f1ff; color: var(--primary); font-size: 1.05rem; }
.driver-card span { color: var(--muted); font-size: 0.75rem; }
.driver-card b { color: #173760; }
.driver-card p { margin: 12px 0 0; color: #52647c; font-size: 0.82rem; line-height: 1.55; }
.summary-context-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 14px; }
.summary-context dl { margin: 16px 0 0; }
.summary-context dl div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid #e7edf5; }
.summary-context dl div:last-child { border-bottom: 0; }
.summary-context dt { color: var(--muted); font-weight: 500; }
.summary-context dd { margin: 0; color: #173760; font-weight: 700; text-align: right; }
.summary-limitations ul { margin: 14px 0 0; padding-left: 1.2rem; color: #52647c; }
.summary-limitations li { margin-bottom: 9px; line-height: 1.5; }

.app-footer { margin-top: 20px; background: #ffffff; border-radius: var(--radius); padding: 14px 18px; text-align: center; color: #5f6d85; border: 1px solid #e2eaf3; }

@media (max-width: 1024px) {

    .shock, .convergence, .details { grid-template-columns: 1fr; }
    .carousel { padding: 14px; }


    .country { grid-template-columns: 1fr; }
    .summary-diagnosis { grid-template-columns: 1fr; }
    .driver-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .app-container { padding: 0 10px 16px; }
    .shock-sidebar, .left-panel, .right-panel, .country, .details1, .visual-wrapper { padding: 16px; }
    .summary-controls { grid-template-columns: 1fr 1fr; }
    .summary-control-field:first-child, .summary-controls button { grid-column: 1 / -1; }
    .summary-metrics, .driver-grid, .summary-context-grid { grid-template-columns: 1fr; }
    .summary-section-heading { align-items: start; flex-direction: column; }
    .summary-section-heading > p { text-align: left; }
}


/* Shared page layout keeps controls available while results scroll. */
.app-container { width: 100%; max-width: none; padding: 0 24px 24px; }
.workspace-header { position: sticky; top: 0; z-index: 30; height: 82px; background: var(--bg); }
.mode-navigation { overflow-x: auto; padding: 4px; }
.mode-navigation .div-buttons { flex-wrap: nowrap; }
.mode-navigation .control { flex-shrink: 0; white-space: nowrap; }
.carousel { margin-top: 24px; overflow: visible; border: 0; border-radius: 0; background: transparent; box-shadow: none; padding: 0; }
.slide { padding: 0; min-height: calc(100dvh - 130px); }
.model-workspace { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 24px; align-items: start; }
.workspace-sidebar { position: sticky; top: 106px; align-self: start; max-height: calc(100dvh - 130px); overflow-y: auto; scrollbar-width: thin; scrollbar-gutter: stable; padding: 22px; }
.summary-output { min-width: 0; }
.summary-controls { grid-template-columns: 1fr 1fr; gap: 12px; }
.summary-control-field:first-child, .summary-controls button { grid-column: 1 / -1; }
.summary-control-field select { width: 100%; }
.summary-controls button { margin-top: 4px; }
.summary-header .input-board-heading h2 { font-size: 1.25rem; }
.summary-diagnosis { grid-template-columns: minmax(0, 1fr) minmax(250px, .85fr); }
.driver-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.details .visual-wrapper { min-width: 0; padding: 0; border: 0; box-shadow: none; background: transparent; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto; }
@media (max-width: 1100px) {
    .summary-diagnosis, .summary-context-grid { grid-template-columns: 1fr; }
    .details .visual-wrapper { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .app-container { padding: 0 16px 20px; }
    .model-workspace { grid-template-columns: 1fr; gap: 20px; }
    .workspace-sidebar { position: static; max-height: none; overflow: visible; }
}
@media (max-width: 600px) {
    .app-container { padding: 0 12px 16px; }
    .workspace-header { align-items: center; height: 76px; gap: 10px; }
    .carousel { margin-top: 16px; }
    .workspace-sidebar { padding: 18px; }
    .summary-metrics { grid-template-columns: 1fr; }
}


/* A centered navigation rail echoes the soft surfaces of the model boards. */
.workspace-header {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) 46px;
    gap: 16px;
    background: linear-gradient(180deg, var(--model-page) 65%, color-mix(in srgb, var(--model-page) 92%, transparent));
    border-bottom-color: #dce6f0;
}
.mode-navigation { justify-self: center; max-width: 100%; border-radius: 18px; padding: 5px; background: #e8eef6; border: 1px solid #dce5f0; box-shadow: inset 0 1px 2px #16375b08; scrollbar-width: none; }
.mode-navigation::-webkit-scrollbar { display: none; }
.mode-navigation .div-buttons { gap: 3px; }
.mode-navigation .control { position: relative; border-radius: 13px; padding: 11px 15px; transition: color 220ms ease, background 220ms ease, box-shadow 220ms ease, transform 220ms ease; }
.mode-navigation .control:hover { background: #ffffffb0; transform: translateY(-1px); }
.mode-navigation .control.active { background: linear-gradient(135deg, var(--model-accent), var(--model-accent-pressed)); color: white; box-shadow: 0 4px 10px #173f7226, inset 0 1px 0 #ffffff26; }
.mode-navigation .control:active { transform: scale(.96); box-shadow: 0 1px 3px #173f721a; }
.menu-toggle { box-shadow: 0 3px 9px #173f720a; transition: background 220ms ease, transform 220ms ease, box-shadow 220ms ease; }
.menu-toggle:hover { transform: translateY(-1px); box-shadow: 0 5px 12px #173f7215; }
.menu-toggle:active { transform: scale(.94); }
.site-navigation[open] { animation: navigation-fall 560ms cubic-bezier(.16, 1, .3, 1) both; box-shadow: 0 20px 80px #16375b30; }
.site-navigation::backdrop { background: #17345245; }
@keyframes navigation-fall {
    from { transform: translateY(-100%); opacity: .8; }
    to { transform: translateY(0); opacity: 1; }
}
@media (max-width: 900px) {
    .workspace-header { grid-template-columns: 46px minmax(0, 1fr); }
    .mode-navigation { justify-self: stretch; }
    .mode-navigation .control { padding: 11px 12px; }
    /* Scrollable room after the last tab, so its focus ring is not cut at the end. */
    .mode-navigation .div-buttons::after { content: ""; flex: 0 0 6px; }
}
@media (prefers-reduced-motion: reduce) {
    .site-navigation[open] { animation: none; }
    .mode-navigation .control, .menu-toggle { transition: none; }
}
.summary-period-rule { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 0.75rem; line-height: 1.5; }


/* Warnings from Solow/report_common.py, shown the same way in every panel. */
.caution-box { margin-top: 14px; padding: 12px 14px; border: 1px solid #ecd9a8; border-left: 4px solid #c58a12; border-radius: 10px; background: #fff9e9; color: #5c4508; font-size: 0.84rem; line-height: 1.55; text-align: left; }
.caution-box[hidden] { display: none; }
.caution-box ul { margin: 6px 0 0; padding-left: 18px; }
.caution-box li + li { margin-top: 6px; }
/* Cautions fold behind a small disclaimer button (renderCautions in common.js). */
.caution-box.caution-collapsible { padding: 0; border: 0; background: none; }
.caution-collapsible .caution-panel { margin-top: 8px; padding: 12px 14px; border: 1px solid #ecd9a8; border-left: 4px solid #c58a12; border-radius: 10px; background: #fff9e9; }
.caution-collapsible .caution-panel[hidden] { display: none; }
.caution-toggle { display: inline-flex; gap: 7px; align-items: center; padding: 2px 10px 2px 2px; border: 1px solid #ecd9a8; border-radius: 999px; background: #fff9e9; color: #5c4508; font-size: .74rem; font-weight: 600; cursor: pointer; transition: background .2s ease, box-shadow .2s ease; }
.caution-toggle:hover { box-shadow: 0 3px 8px rgba(197, 138, 18, 0.18); }
.caution-toggle[aria-expanded="true"] { background: #c58a12; border-color: #c58a12; color: #fff; }
.caution-icon { display: grid; width: 20px; height: 20px; place-items: center; border-radius: 50%; background: #c58a12; color: #fff; font-family: Georgia, serif; font-size: .8rem; font-weight: 700; line-height: 1; }
.caution-toggle[aria-expanded="true"] .caution-icon { background: #fff; color: #c58a12; }
.consumption-golden-note { color: var(--muted); font-size: 0.84rem; }

/* Summary after the 2026-10-16 redesign: shared tiles plus larger parameter cards. */
.summary-results { gap: 18px; }
.metric-tiles.summary-metric-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.driver-card .driver-value { display: block; margin: 12px 0 0; color: #173760; font-size: 1.9rem; font-weight: 750; letter-spacing: -.03em; }
.driver-card p { font-size: 0.98rem; line-height: 1.6; color: #43566f; }
.driver-card span { font-size: 0.85rem; }
.summary-context h3 { color: #172b48; font-size: 1.25rem; font-weight: 650; }
.summary-context dl > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; padding: 12px 0; border-bottom: 1px solid #e7edf5; }
.summary-context dl > div:last-child { border-bottom: 0; }
.summary-context dt { color: #3b4f69; font-size: 1rem; font-weight: 600; }
.summary-context dd { margin: 0; color: #173760; font-size: 1rem; font-weight: 700; text-align: right; }
.summary-context dl .eco-help { grid-column: 1 / -1; }
.summary-steps-title { margin: 22px 0 0; color: #1d3554; font-size: 1.05rem; font-weight: 700; }
.summary-steps { list-style: decimal; }
@media (max-width: 900px) { .metric-tiles.summary-metric-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .metric-tiles.summary-metric-tiles { grid-template-columns: 1fr; } }

/* Country details: a changing quote above charts that each name their country. */
.details-output { display: grid; gap: 16px; min-width: 0; align-content: start; }
.details-quote { position: relative; margin: 0; padding: 26px 30px 22px 72px; border-left: 4px solid var(--model-accent); background: linear-gradient(120deg, var(--model-page), #fff 72%); }
.details-quote-mark { position: absolute; top: 4px; left: 22px; color: var(--model-border); font-family: Georgia, serif; font-size: 4.6rem; line-height: 1; }
.details-quote blockquote { margin: 0; }
.details-quote-text { min-height: 3.1em; margin: 0; color: #1f3556; font-size: clamp(1.12rem, 1.7vw, 1.4rem); font-weight: 500; line-height: 1.55; }
.details-quote-text.is-typing::after { content: ""; display: inline-block; width: 2px; height: 1.05em; margin-left: 3px; background: var(--model-accent); vertical-align: -0.15em; animation: caret-blink 0.9s steps(1) infinite; }
.details-quote-source { margin: 12px 0 0; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.details-quote-source:empty { display: none; }
@keyframes caret-blink { 50% { opacity: 0; } }
.details .visual-wrapper { gap: 16px; }
.comparison-chart-wrapper { position: relative; min-width: 0; padding: 18px 18px 8px; overflow: hidden; border: 1px solid #dde8f3; border-top: 3px solid var(--model-accent); border-radius: var(--radius); background: linear-gradient(180deg, #ffffff 0%, #f6f9fd 100%); box-shadow: 0 9px 22px rgba(14, 36, 75, 0.08); }
.comparison-chart-header { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.comparison-chart-header > div { min-width: 0; }
.comparison-country { margin: 0 0 4px; color: var(--primary); font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.comparison-chart-header h3 { margin: 0; color: #172b48; font-size: 1.08rem; font-weight: 650; }
.comparison-subtitle { margin: 3px 0 0; color: var(--muted); font-size: .84rem; }
.js-comparison-chart { width: 100%; height: 320px; }
.comparison-note { margin: 6px 2px 8px; color: #52647c; font-size: .86rem; line-height: 1.5; }
@media (prefers-reduced-motion: reduce) { .details-quote-text.is-typing::after { animation: none; } }
@media (max-width: 600px) { .details-quote { padding: 22px 18px 18px 52px; } .details-quote-mark { left: 12px; font-size: 3.6rem; } }

/* Country Details: merge compatible country series without editing their data. */
.details-merge-controls { margin-top: 22px; padding-top: 18px; border-top: 1px solid #d7e4e1; }
.details-merge-actions { display: flex; align-items: center; gap: 12px; }
.details-merge-actions > .primary-btn { flex: 1; }
#mergeDetails { background: var(--model-soft); color: var(--model-strong); border: 1px solid var(--model-border); box-shadow: none; }
#mergeDetails:hover:not(:disabled) { background: color-mix(in srgb, var(--model-soft) 70%, var(--model-border)); border-color: var(--model-accent); }
#mergeDetails:disabled { background: #edf1ef; color: #89978f; border-color: #d5ded9; cursor: not-allowed; }
.details-merge-controls .lab-helper { margin-bottom: 12px; }
.merge-chart-select { border: 1px solid var(--model-accent); border-radius: 10px; padding: 8px 12px; background: #fff; color: var(--model-accent); font-weight: 650; cursor: pointer; flex-shrink: 0; }
.merge-chart-select[hidden] { display: none; }
.merge-chart-select:disabled { opacity: .45; cursor: not-allowed; }
.merge-chart-select[aria-pressed="true"] { background: var(--model-accent); color: var(--model-on-accent); }
.details-merge-mode .workspace-header,
.details-merge-mode #solowSelection,
.details-merge-mode #panel-details .input-board-heading,
.details-merge-mode #panel-details .details1-inputs,
.details-merge-mode #panel-details .details-quote { filter: blur(4px); opacity: .5; pointer-events: none; user-select: none; }
.details-merge-mode .comparison-chart-wrapper { cursor: pointer; transition: border-color 160ms ease, box-shadow 160ms ease; }
.details-merge-mode .comparison-chart-wrapper .js-comparison-chart { pointer-events: none; }
.details-merge-mode .comparison-chart-wrapper .remove-button { display: none; }
.details-merge-mode .comparison-chart-wrapper.merge-selected { border-color: var(--model-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--model-accent) 21%, transparent); }
.details-merge-mode .comparison-chart-wrapper.merge-ineligible { cursor: not-allowed; border-color: #c7ced4; }
@media (max-width: 600px) {
    .details-merge-mode .comparison-chart-header { flex-wrap: wrap; }
    .details-merge-mode .comparison-chart-header > div { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .details-merge-mode .comparison-chart-wrapper { transition: none; }
}

/* The site menu is shared, so it keeps the fallback blue; each model entry shows
   its own colour, whichever model is open (docs/design/model-color-system.md, section 4). */
.site-navigation { --primary: var(--theme-fallback-accent); }
.model-options a[data-model-link] { display: inline-flex; gap: 8px; align-items: center; }
.model-options a[data-model-link]::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.model-options a[data-model-link="solow"] { color: var(--theme-solow-strong); }
.model-options a[data-model-link="new-keynesian"] { color: var(--theme-new-keynesian-strong); }
.model-options a[data-model-link="intertemporal"] { color: var(--theme-intertemporal-strong); }
.model-options a[data-model-link="portfolio"] { color: var(--theme-portfolio-strong); }
/* The tab track has 5px of padding; a 1px gap keeps the 3px focus ring inside it.
   On narrow screens the track scrolls sideways: the scroll margin stops a focused tab
   from being scrolled flush against the edge, where its ring would be cut off. */
.mode-navigation .control:focus-visible { outline-offset: 1px; }
.mode-navigation { scroll-padding-inline: 10px; }

