:root {
  --paper: #f4f1eb;
  --paper-2: #ece8df;
  --ink: #171715;
  --muted: #6d6b64;
  --line: #d8d3c9;
  --line-dark: #b9b4aa;
  --red: #d62f2f;
  --red-dark: #a91919;
  --red-soft: #f6dfdc;
  --white: #fffefa;
  --green: #2f7954;
  --shadow: 0 18px 50px rgba(38, 32, 24, 0.07);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); }
button, input, select { font: inherit; }
button, select, input[type="range"] { cursor: pointer; }
a { color: inherit; }

.page-shell { max-width: 1500px; margin: 0 auto; padding: 0 34px; }
.site-header { height: 84px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line-dark); }
.brand { display: inline-flex; align-items: center; gap: 13px; text-decoration: none; }
.brand-mark { width: 33px; height: 33px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; transform: rotate(45deg); overflow: hidden; }
.brand-mark i { background: var(--red); }
.brand-mark i:nth-child(2) { background: var(--white); }
.brand strong { display: block; font-size: 17px; line-height: 1.1; letter-spacing: -0.02em; }
.brand small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.header-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.status-dot { width: 7px; height: 7px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 4px rgba(47,121,84,.12); }
.site-nav { align-self: stretch; display: flex; align-items: stretch; gap: 4px; }
.site-nav a { display: flex; align-items: center; border-bottom: 2px solid transparent; padding: 2px 14px 0; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; transition: color .2s, border-color .2s; }
.site-nav a:hover { color: var(--ink); }
.site-nav a.active { border-bottom-color: var(--red); color: var(--ink); }

.hero { padding: 82px 0 58px; }
.eyebrow, .section-index { color: var(--red); font-size: 11px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.hero-grid { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 50px; }
.hero h1 { max-width: 920px; margin: 13px 0 18px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(54px, 7vw, 105px); font-weight: 400; line-height: .9; letter-spacing: -.055em; }
.hero p { max-width: 720px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.6; }
.hero-number { min-width: 170px; padding: 20px 0 4px; border-top: 2px solid var(--ink); text-align: right; }
.hero-number strong { display: block; font-family: Georgia, serif; font-size: 58px; font-weight: 400; line-height: 1; }
.hero-number span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }

.filter-panel { padding: 27px 30px 0; background: var(--ink); color: var(--white); box-shadow: var(--shadow); }
.filter-head, .panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.filter-head h2, .panel-head h2, .method-grid h2 { margin: 4px 0 0; font-size: 22px; letter-spacing: -.025em; }
.filter-panel .section-index { color: #ff6c62; }
.text-button { border: 0; border-bottom: 1px solid #77746d; padding: 3px 0; color: #bdb9b0; background: transparent; font-size: 12px; }
.text-button:hover { color: white; border-color: white; }
.filter-grid { display: grid; grid-template-columns: 1.3fr 1.3fr .8fr .9fr 1fr; gap: 24px; padding: 30px 0 25px; }
.field { min-width: 0; margin: 0; padding: 0; border: 0; }
.field > span, .field legend, .cause-picker span { display: block; margin: 0 0 9px; color: #aaa69e; font-size: 10px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.field select, .cause-picker select { width: 100%; height: 43px; border: 0; border-bottom: 1px solid #625f59; border-radius: 0; outline: 0; color: var(--white); background: var(--ink); }
.field select:focus, .cause-picker select:focus { border-bottom-color: white; }
.field select:disabled { cursor: not-allowed; color: #77736d; }
.field option, .cause-picker option { color: var(--ink); background: white; }
.field small { display: block; min-height: 15px; margin-top: 7px; color: #7e7b74; font-size: 10px; }
.timeline-field { display: block; padding: 20px 0 25px; border-top: 1px solid #393733; }
.timeline-head { min-height: 47px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.timeline-hint { color: #77736d; font-size: 10px; }
.year-display { height: 43px; display: flex; align-items: center; gap: 13px; }
.year-display output { font-family: Georgia, serif; font-size: 38px; line-height: 1; }
.mini-badge { padding: 5px 7px; color: #f7c3bd; background: rgba(214,47,47,.2); border: 1px solid rgba(255,137,126,.25); font-size: 9px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.hidden, .mini-badge.hidden { display: none !important; }
.hidden-column { display: none !important; }
input[type="range"] { width: 100%; height: 3px; margin: 17px 0 0; appearance: none; background: linear-gradient(to right, var(--red) 0%, var(--red) var(--range-progress, 100%), #57544f var(--range-progress, 100%), #57544f 100%); }
input[type="range"]::-webkit-slider-thumb { width: 18px; height: 18px; appearance: none; border: 4px solid var(--white); border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(214,47,47,.18); }
input[type="range"]:focus-visible { outline: 2px solid #ff8d84; outline-offset: 8px; }
.range-labels { position: relative; height: 31px; margin-top: 7px; color: #77736d; font-size: 9px; }
.year-tick { position: absolute; top: 0; width: 1px; height: 5px; background: #504d48; transform: translateX(-.5px); }
.year-tick.major { height: 9px; background: #77736d; }
.year-tick.active { width: 2px; height: 12px; background: var(--red); }
.year-tick i { position: absolute; top: 14px; left: 50%; font-style: normal; font-variant-numeric: tabular-nums; transform: translateX(-50%); }
.year-tick:first-child i { left: 0; transform: none; }
.year-tick:last-child i { right: 0; left: auto; transform: none; }
.segmented { display: grid; grid-template-columns: .65fr 1.25fr 1fr; gap: 3px; padding: 3px; background: #2a2926; }
.segmented button { min-height: 36px; border: 0; padding: 8px 10px; color: #aaa69e; background: transparent; font-size: 11px; }
.segmented button.active { color: var(--ink); background: var(--white); }
.segmented button:disabled { opacity: .35; cursor: not-allowed; }
.yll-mode-control { grid-template-columns: .7fr 1fr 1.55fr; margin-top: 5px; background: #35332f; }
.yll-mode-control button { min-height: 31px; padding-block: 6px; font-size: 10px; }
.coverage-note { margin: 0 -30px; padding: 13px 30px; color: #a9a59d; background: #22211f; border-top: 1px solid #33312e; font-size: 11px; line-height: 1.45; }
.coverage-note strong { color: #e5e2da; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-top: 0; background: var(--white); }
.kpi-grid.yll-mode { grid-template-columns: repeat(5, 1fr); }
.kpi-grid:not(.yll-mode) .kpi-card:nth-child(4) { border-right: 0; }
.kpi-card { min-height: 160px; padding: 24px 27px; border-right: 1px solid var(--line); }
.kpi-card:last-child { border-right: 0; }
.kpi-card > span { display: block; min-height: 32px; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.kpi-card strong { display: block; max-width: 260px; margin: 11px 0 9px; font-family: Georgia, serif; font-size: 35px; font-weight: 400; line-height: 1.02; letter-spacing: -.025em; }
.kpi-card small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.kpi-card.accent-card { background: var(--red-soft); }
.kpi-card.accent-card strong { font-family: inherit; font-size: 21px; font-weight: 650; }

.content-grid { display: grid; grid-template-columns: .93fr 1.07fr; gap: 18px; margin-top: 18px; }
.panel { background: var(--white); border: 1px solid var(--line); box-shadow: 0 8px 30px rgba(35,28,20,.035); }
.ranking-panel, .trend-panel { min-height: 610px; padding: 28px; }
.panel-head p { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.segmented.compact { flex: 0 0 auto; grid-template-columns: 1fr 1fr; background: var(--paper-2); }
.segmented.compact button { min-height: 31px; padding: 6px 9px; color: var(--muted); }
.segmented.compact button.active { color: var(--white); background: var(--ink); }
.ranking-chart { margin-top: 29px; }
.rank-row { display: grid; grid-template-columns: minmax(110px, 1.2fr) minmax(120px, 1fr) 66px; align-items: center; gap: 12px; width: 100%; min-height: 40px; border: 0; padding: 0; color: var(--ink); background: transparent; text-align: left; }
.rank-row:hover .rank-label, .rank-row.selected .rank-label { color: var(--red); }
.rank-label { overflow: hidden; font-size: 11px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; transition: color .15s; }
.rank-bar-track { height: 8px; background: var(--paper-2); }
.rank-bar { height: 100%; min-width: 2px; background: #272724; transform-origin: left; transition: width .35s ease, background .15s; }
.rank-row:hover .rank-bar, .rank-row.selected .rank-bar { background: var(--red); }
.rank-value { font-variant-numeric: tabular-nums; font-size: 11px; font-weight: 700; text-align: right; }
.chart-footnote { margin: 20px 0 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; line-height: 1.45; }

.trend-head { align-items: flex-end; }
.selection-summary { max-width: 280px; padding: 10px 13px; border-left: 2px solid var(--red); background: var(--paper); text-align: right; }
.selection-summary strong, .selection-summary small { display: block; }
.selection-summary strong { font-size: 11px; line-height: 1.3; }
.selection-summary small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.trend-chart { position: relative; min-height: 360px; margin-top: 25px; }
.trend-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-axis-label { fill: var(--muted); font-size: 10px; }
.chart-line { fill: none; stroke: var(--red); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart-area { fill: url(#area-gradient); }
.chart-point { fill: var(--white); stroke: var(--red); stroke-width: 2; }
.chart-selected { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 4; }
.chart-break { stroke: #a49f95; stroke-width: 1.5; stroke-dasharray: 5 5; }
.chart-label-box { fill: var(--ink); }
.chart-label-text { fill: var(--white); font-size: 10px; font-weight: 700; }
.chart-empty { display: grid; place-items: center; min-height: 300px; color: var(--muted); font-size: 12px; }
.trend-legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 12px; color: var(--muted); font-size: 10px; }
.trend-legend span { display: flex; align-items: center; gap: 7px; }
.legend-line, .legend-break { display: inline-block; width: 22px; border-top: 2px solid var(--red); }
.legend-break { border-top: 1px dashed #9b968d; }

.weekly-panel { margin-top: 18px; padding: 28px; }
.weekly-head { align-items: flex-end; }
.weekly-controls { display: grid; grid-template-columns: 92px 150px 220px; align-items: end; gap: 14px; }
.weekly-controls label, .weekly-controls fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.weekly-controls label > span, .weekly-controls legend { display: block; margin-bottom: 7px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.weekly-controls select { width: 100%; height: 37px; border: 0; border-bottom: 1px solid var(--line-dark); outline: 0; color: var(--ink); background: var(--white); font-size: 11px; }
.weekly-controls select:focus { border-bottom-color: var(--ink); }
#weekly-age-control { grid-template-columns: repeat(3, 1fr); }
.weekly-kpis { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 25px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.weekly-kpis > div { min-height: 91px; padding: 18px 20px; border-right: 1px solid var(--line); }
.weekly-kpis > div:last-child { border-right: 0; }
.weekly-kpis span, .weekly-kpis strong { display: block; }
.weekly-kpis span { min-height: 24px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.weekly-kpis strong { margin-top: 8px; font-family: Georgia, serif; font-size: 26px; font-weight: 400; font-variant-numeric: tabular-nums; }
.weekly-chart { position: relative; min-height: 300px; margin-top: 20px; }
.weekly-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.weekly-area { fill: url(#weekly-area-gradient); }
.weekly-note { margin-top: 8px; }

.weekly-page .weekly-hero { padding-bottom: 48px; }
.weekly-page .weekly-hero h1 { max-width: 1050px; font-size: clamp(50px, 6.3vw, 94px); }
.weekly-filter-panel { padding-bottom: 0; }
.weekly-filter-grid { display: grid; grid-template-columns: .62fr .95fr 1.15fr 1.65fr; gap: 30px; padding: 30px 0 25px; }
.weekly-age-segment { grid-template-columns: repeat(3, 1fr); }
.week-output-row { min-height: 43px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.week-output-row output { flex: 0 0 auto; font-family: Georgia, serif; font-size: 31px; line-height: 1; }
.week-output-row small { max-width: 245px; margin: 0; color: #8f8b83; text-align: right; }
.weekly-kpi-grid .kpi-card strong { font-variant-numeric: tabular-nums; }
.weekly-analysis-panel { margin-top: 18px; padding: 28px; }
.weekly-deaths-chart { min-height: 350px; margin-top: 22px; }
.weekly-deaths-chart svg, .weekly-weather-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-key { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 16px; color: var(--muted); font-size: 10px; }
.chart-key span { display: flex; align-items: center; gap: 7px; }
.chart-key i { display: inline-block; width: 24px; border-top: 2px solid var(--red); }
.chart-key .key-reference { border-top: 1.5px dashed #716d66; }
.chart-key .key-reference-band { height: 10px; border: 1px solid #c8c1b5; background: #e7e1d7; }
.week-reference-band { fill: #e7e1d7; opacity: .88; }
.week-reference-line { fill: none; stroke: #716d66; stroke-width: 1.6; stroke-dasharray: 5 4; stroke-linecap: round; stroke-linejoin: round; }
.week-data-point { fill: var(--white); stroke: var(--red); stroke-width: 1.7; pointer-events: none; transition: fill .15s, stroke-width .15s; }
.week-data-point:hover, .week-data-point:focus, .week-data-point.selected { fill: var(--red); stroke: var(--ink); stroke-width: 2.5; outline: none; }
.week-hit-target { fill: transparent; cursor: crosshair; pointer-events: all; }
.week-hit-target:focus-visible { fill: rgba(214,47,47,.055); outline: none; }
.shared-week-cursor { pointer-events: none; transition: x1 .12s ease, x2 .12s ease; }
.reference-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 12px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.reference-summary > div { min-height: 112px; padding: 18px 21px 17px; border-right: 1px solid var(--line); }
.reference-summary > div:last-child { border-right: 0; }
.reference-summary span, .reference-summary strong, .reference-summary small { display: block; }
.reference-summary span { color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.reference-summary strong { margin: 9px 0 7px; font-family: Georgia, serif; font-size: 27px; font-weight: 400; font-variant-numeric: tabular-nums; line-height: 1; }
.reference-summary small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.reference-summary strong.positive, .weather-detail dd.positive { color: var(--red-dark); }
.reference-summary strong.negative, .weather-detail dd.negative { color: var(--green); }
.reference-method { max-width: 790px; margin: 14px 0 0; padding-left: 13px; border-left: 2px solid var(--line-dark); color: var(--muted); font-size: 10px; line-height: 1.55; }
.weather-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); gap: 18px; margin-top: 18px; }
.weather-panel { padding: 28px; }
.weekly-weather-chart { min-height: 430px; margin-top: 20px; }
.temperature-band { fill: #e5e0d6; opacity: .85; }
.temperature-line { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.temperature-point { fill: var(--white); stroke: var(--ink); stroke-width: 1.3; pointer-events: none; }
.temperature-point.selected { fill: var(--red); stroke: var(--red); }
.weather-divider { stroke: var(--line-dark); stroke-width: 1; }
.rain-bar { fill: #aaa59c; opacity: .62; pointer-events: none; }
.rain-bar.selected { fill: var(--red); opacity: .9; }
.weather-detail { padding: 34px 30px; color: var(--ink); background: var(--red-soft); border-top: 3px solid var(--red); }
.weather-detail h2 { margin: 9px 0 5px; font-family: Georgia, serif; font-size: 37px; font-weight: 400; letter-spacing: -.03em; }
.weather-detail > p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.weather-detail dl { margin: 30px 0 0; }
.weather-detail dl div { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 16px; padding: 15px 0; border-top: 1px solid rgba(169,25,25,.16); }
.weather-detail dt { color: var(--muted); font-size: 10px; }
.weather-detail dd { margin: 0; font-family: Georgia, serif; font-size: 21px; font-variant-numeric: tabular-nums; }
.weather-detail .weather-method { margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(169,25,25,.24); font-size: 10px; }
.weekly-table-panel { margin-top: 18px; padding: 28px; }
.weekly-table-panel th:nth-child(n+3), .weekly-table-panel td:nth-child(n+3) { text-align: right; }
.weekly-table-panel tbody tr.selected { background: var(--red-soft); }
.weekly-table-panel td:first-child strong { font-variant-numeric: tabular-nums; }
.weekly-source-strip { margin-top: 54px; }

.table-panel { margin-top: 18px; padding: 28px; }
.table-head { align-items: flex-end; }
.search-field { position: relative; width: min(360px, 45%); }
.search-field svg { position: absolute; left: 12px; top: 12px; width: 17px; fill: none; stroke: var(--muted); stroke-width: 1.5; }
.search-field input { width: 100%; height: 42px; border: 1px solid var(--line); padding: 0 14px 0 40px; outline: none; background: var(--paper); font-size: 12px; }
.search-field input:focus { border-color: var(--ink); }
.table-wrap { overflow-x: auto; margin-top: 27px; }
table { width: 100%; border-collapse: collapse; }
th { padding: 10px 13px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line-dark); color: var(--muted); font-size: 9px; letter-spacing: .1em; text-align: left; text-transform: uppercase; }
.numeric-header, td.numeric { text-align: right; }
.sort-button { display: inline-flex; align-items: center; gap: 6px; border: 0; padding: 0; color: inherit; background: transparent; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.numeric-header .sort-button { margin-left: auto; }
.sort-button::after { content: "↕"; color: var(--line-dark); font-size: 9px; }
.sort-button.active::after { content: "↓"; color: var(--red); }
th[aria-sort="ascending"] .sort-button.active::after { content: "↑"; }
.sort-button:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }
td { padding: 13px; border-bottom: 1px solid var(--line); font-size: 11px; vertical-align: middle; }
tbody tr { cursor: pointer; transition: background .12s; }
tbody tr:hover, tbody tr.selected { background: var(--red-soft); }
.cause-name-cell strong { display: block; font-weight: 600; }
.cause-name-cell small { display: none; color: var(--muted); }
.numeric { font-variant-numeric: tabular-nums; font-weight: 700; }
.type-pill { display: inline-block; padding: 4px 7px; border: 1px solid var(--line-dark); color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.type-pill.broad { border-color: #e7b0aa; color: var(--red-dark); background: var(--red-soft); }
.table-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 18px; color: var(--muted); font-size: 10px; }
.outline-button { border: 1px solid var(--line-dark); padding: 9px 13px; color: var(--ink); background: transparent; font-size: 10px; }
.outline-button:hover { color: var(--white); background: var(--ink); border-color: var(--ink); }
.outline-button.hidden { display: none; }

.method-grid { display: grid; grid-template-columns: .65fr 1.35fr; gap: 80px; margin: 72px 0 58px; padding: 50px 0; border-top: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark); }
.method-grid h2 { margin: 10px 0 14px; font-family: Georgia, serif; font-size: 31px; font-weight: 400; }
.method-grid article p { max-width: 510px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.method-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 0 35px; }
.method-note { display: grid; grid-template-columns: 27px 1fr; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.method-note span { color: var(--red); font-family: Georgia, serif; font-size: 18px; }
.method-note p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.source-strip { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 23px 26px; color: var(--white); background: var(--red); }
.source-strip strong, .source-strip span { display: block; }
.source-strip strong { margin-bottom: 3px; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.source-strip span { font-size: 12px; }
.source-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 15px; }
.source-links a { font-size: 10px; text-underline-offset: 3px; }
footer { display: flex; justify-content: space-between; padding: 30px 0 40px; color: var(--muted); font-size: 9px; letter-spacing: .04em; text-transform: uppercase; }

.sr-only, .sr-only-focusable:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.error-state { max-width: 720px; margin: 80px auto; padding: 30px; border: 1px solid #e0a5a0; color: var(--red-dark); background: var(--red-soft); }

.sticky-selection { position: sticky; top: 0; z-index: 20; min-height: 43px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid #35332f; padding: 8px 14px; color: #d8d4cb; background: rgba(23,23,21,.96); box-shadow: 0 10px 30px rgba(38,32,24,.08); backdrop-filter: blur(12px); }
.sticky-selection > span { overflow: hidden; font-size: 10px; font-weight: 650; letter-spacing: .015em; text-overflow: ellipsis; white-space: nowrap; }
.sticky-selection > div { position: relative; flex: 0 0 auto; display: flex; align-items: center; gap: 13px; }
.sticky-selection button { border: 0; border-bottom: 1px solid #5c5953; padding: 3px 0; color: #aaa69e; background: transparent; font-size: 9px; transition: color .2s, border-color .2s; }
.sticky-selection button:hover, .sticky-selection button:focus-visible { color: var(--white); border-color: var(--white); outline: none; }
.sticky-selection small { position: absolute; top: 26px; right: 0; min-width: 80px; color: var(--ink); background: var(--white); font-size: 9px; text-align: right; }

.comparison-config { display: grid; grid-template-columns: 1fr auto minmax(360px, .9fr); align-items: center; gap: 24px; padding: 20px 0 22px; border-top: 1px solid #393733; }
.comparison-label { color: #aaa69e; font-size: 10px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.comparison-config p { margin: 5px 0 0; color: #77736d; font-size: 10px; }
.compare-toggle { min-width: 138px; border: 1px solid #625f59; padding: 10px 12px; color: #d4d0c7; background: transparent; font-size: 10px; transition: color .2s, background .2s, border-color .2s; }
.compare-toggle:hover, .compare-toggle[aria-pressed="true"] { color: var(--ink); background: var(--white); border-color: var(--white); }
.compare-toggle:active { transform: translateY(1px); }
.compare-toggle:focus-visible { outline: 2px solid #ff8d84; outline-offset: 3px; }
.compare-controls { display: grid; grid-template-columns: .75fr 1.25fr; gap: 16px; }
.compare-controls label > span { display: block; margin-bottom: 6px; color: #8d8981; font-size: 8px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.compare-controls select { width: 100%; height: 36px; border: 0; border-bottom: 1px solid #625f59; outline: 0; color: var(--white); background: var(--ink); font-size: 10px; }
.compare-controls select:focus { border-bottom-color: var(--white); }
.compare-controls option { color: var(--ink); background: var(--white); }

.insight-strip { display: grid; grid-template-columns: 105px minmax(210px, .42fr) minmax(0, 1fr); align-items: baseline; gap: 28px; margin: 18px 0 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); padding: 22px 25px 25px; background: var(--paper-2); }
.insight-strip h2 { margin: 0; font-family: Georgia, serif; font-size: 25px; font-weight: 400; letter-spacing: -.025em; }
.insight-strip p { max-width: 820px; margin: 0; color: #4e4b45; font-size: 13px; line-height: 1.62; text-wrap: pretty; }

.trend-actions { max-width: 355px; display: grid; justify-items: end; gap: 10px; }
.trend-mode-control { width: 260px; grid-template-columns: repeat(3, 1fr); }
.trend-mode-control button { font-size: 9px; }
.chart-compare-line { fill: none; stroke: #716d66; stroke-width: 2.2; stroke-dasharray: 6 4; stroke-linecap: round; stroke-linejoin: round; }
.chart-compare-point { fill: var(--white); stroke: #716d66; stroke-width: 1.4; pointer-events: none; }
.chart-compare-point.selected { fill: #716d66; }
.chart-compare-selected { fill: #716d66; stroke: var(--white); stroke-width: 2; pointer-events: none; }
.chart-point { pointer-events: none; }
.chart-point.selected { fill: var(--red); }
.trend-hit-target { fill: transparent; cursor: crosshair; pointer-events: all; }
.trend-hit-target:focus-visible { fill: rgba(214,47,47,.045); outline: none; }
.legend-compare { display: inline-block; width: 22px; border-top: 2px dashed #716d66; }
.trend-legend b { font-weight: 500; }

.analysis-grid { display: grid; grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr); gap: 18px; margin-top: 18px; }
.age-profile-panel, .composition-panel { min-height: 650px; padding: 28px; }
.age-profile-key { display: flex; flex-wrap: wrap; gap: 15px; color: var(--muted); font-size: 9px; }
.age-profile-key span { display: flex; align-items: center; gap: 6px; }
.age-profile-key i { display: inline-block; width: 17px; height: 7px; }
.age-key-male { background: var(--ink); }
.age-key-female { background: var(--red); }
.age-profile-chart { margin-top: 23px; }
.age-profile-axis { display: grid; grid-template-columns: 1fr 72px 1fr; gap: 8px; margin-bottom: 7px; color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.age-profile-row { width: 100%; min-height: 28px; display: grid; grid-template-columns: 1fr 72px 1fr; align-items: center; gap: 8px; border: 0; border-top: 1px solid var(--line); padding: 4px 0; color: var(--ink); background: transparent; transition: background .15s; }
.age-profile-row:hover, .age-profile-row:focus-visible, .age-profile-row.selected { background: var(--red-soft); outline: none; }
.age-profile-row > strong { font-size: 9px; font-weight: 650; text-align: center; }
.age-side { display: grid; align-items: center; gap: 7px; }
.age-side b { color: var(--muted); font-size: 8px; font-weight: 600; font-variant-numeric: tabular-nums; }
.age-side i { display: block; width: var(--bar-size); height: 7px; transition: width .25s ease; }
.male-side { grid-template-columns: 50px 1fr; text-align: right; }
.male-side i { justify-self: end; background: var(--ink); }
.female-side { grid-template-columns: 1fr 50px; text-align: left; }
.female-side i { background: var(--red); }

.composition-chart { min-height: 340px; margin-top: 27px; }
.composition-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.composition-layer { opacity: .94; transition: opacity .2s; }
.composition-chart:hover .composition-layer { opacity: .68; }
.composition-chart .composition-layer:hover { opacity: 1; }
.composition-accent { fill: #d62f2f; background: #d62f2f; }
.composition-tone-1 { fill: #2e2d2a; background: #2e2d2a; }
.composition-tone-2 { fill: #585650; background: #585650; }
.composition-tone-3 { fill: #7e7a72; background: #7e7a72; }
.composition-tone-4 { fill: #9d988f; background: #9d988f; }
.composition-tone-5 { fill: #b9b3a9; background: #b9b3a9; }
.composition-tone-6 { fill: #cec8be; background: #cec8be; }
.composition-remainder { fill: #e5e0d6; background: #e5e0d6; }
.composition-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 18px; margin-top: 17px; }
.composition-legend span { min-width: 0; display: grid; grid-template-columns: 11px 1fr auto; align-items: center; gap: 7px; }
.composition-legend i { width: 11px; height: 11px; }
.composition-legend b { overflow: hidden; font-size: 8px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.composition-legend small { color: var(--muted); font-size: 8px; font-variant-numeric: tabular-nums; }

@media (max-width: 1100px) {
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-field { grid-column: span 2; }
  .metric-field .segmented { max-width: 420px; }
  .content-grid { grid-template-columns: 1fr; }
  .ranking-panel, .trend-panel { min-height: 0; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .kpi-grid.yll-mode { grid-template-columns: repeat(2, 1fr); }
  .kpi-card:nth-child(2) { border-right: 0; }
  .kpi-card:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .kpi-grid.yll-mode .kpi-card:nth-child(even) { border-right: 0; }
  .kpi-grid.yll-mode .kpi-card:nth-child(-n+4) { border-bottom: 1px solid var(--line); }
  .weekly-head { align-items: stretch; flex-direction: column; }
  .weekly-controls { width: 100%; grid-template-columns: .7fr 1fr 1.4fr; }
  .site-header { flex-wrap: wrap; }
  .weekly-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .weather-layout { grid-template-columns: 1fr; }
  .comparison-config { grid-template-columns: 1fr auto; }
  .compare-controls { grid-column: 1 / -1; }
  .analysis-grid { grid-template-columns: 1fr; }
  .age-profile-panel, .composition-panel { min-height: 0; }
}

@media (max-width: 720px) {
  .page-shell { padding: 0 16px; }
  .site-header { height: 70px; }
  .header-meta { display: none; }
  .brand small { display: none; }
  .site-nav { margin-left: auto; }
  .site-nav a { padding-inline: 8px; font-size: 9px; }
  .sticky-selection { margin-inline: -16px; padding-inline: 16px; }
  .sticky-selection > span { font-size: 9px; }
  .sticky-selection button:first-child { display: none; }
  .hero { padding: 58px 0 42px; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero h1 { font-size: clamp(50px, 17vw, 78px); }
  .hero p { font-size: 14px; }
  .hero-number { width: 140px; min-width: 0; text-align: left; }
  .filter-panel { padding: 24px 20px 0; }
  .filter-grid { grid-template-columns: 1fr; gap: 22px; }
  .metric-field { grid-column: auto; }
  .timeline-field { padding-top: 18px; }
  .timeline-hint { display: none; }
  .coverage-note { margin: 0 -20px; padding: 13px 20px; }
  .comparison-config { grid-template-columns: 1fr; gap: 14px; }
  .compare-toggle { width: 100%; }
  .compare-controls { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr; }
  .kpi-card { min-height: 135px; border-right: 0; border-bottom: 1px solid var(--line); }
  .kpi-card:last-child { border-bottom: 0; }
  .panel, .ranking-panel, .trend-panel, .table-panel { padding: 22px 18px; }
  .panel-head { align-items: stretch; flex-direction: column; }
  .insight-strip { grid-template-columns: 1fr; gap: 9px; padding: 20px 18px 23px; }
  .insight-strip h2 { font-size: 23px; }
  .insight-strip p { font-size: 12px; }
  .segmented.compact { width: 100%; }
  .rank-row { grid-template-columns: minmax(105px, 1fr) minmax(75px, .8fr) 56px; gap: 8px; }
  .trend-head { align-items: stretch; }
  .trend-actions { max-width: none; justify-items: stretch; }
  .trend-mode-control { width: 100%; }
  .selection-summary { max-width: none; text-align: left; }
  .search-field { width: 100%; }
  .weekly-controls { grid-template-columns: 1fr; }
  .weekly-kpis { grid-template-columns: repeat(2, 1fr); }
  .weekly-kpis > div:nth-child(2) { border-right: 0; }
  .weekly-kpis > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .weekly-chart { min-height: 220px; }
  .weekly-page .weekly-hero h1 { font-size: clamp(48px, 15vw, 70px); }
  .weekly-filter-grid { grid-template-columns: 1fr; gap: 22px; }
  .week-output-row { align-items: flex-start; flex-direction: column; gap: 6px; }
  .week-output-row small { max-width: none; text-align: left; }
  .weekly-analysis-panel, .weather-panel, .weekly-table-panel { padding: 22px 18px; }
  .weekly-deaths-chart { min-height: 270px; }
  .weekly-weather-chart { min-height: 320px; }
  .chart-key { justify-content: flex-start; }
  .reference-summary { grid-template-columns: 1fr; }
  .reference-summary > div { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .reference-summary > div:last-child { border-bottom: 0; }
  .age-profile-panel, .composition-panel { padding: 22px 18px; }
  .age-profile-key { justify-content: flex-start; }
  .age-profile-axis, .age-profile-row { grid-template-columns: 1fr 58px 1fr; gap: 5px; }
  .male-side { grid-template-columns: 38px 1fr; }
  .female-side { grid-template-columns: 1fr 38px; }
  .composition-legend { grid-template-columns: 1fr; }
  .weekly-table-panel th:nth-child(2), .weekly-table-panel td:nth-child(2),
  .weekly-table-panel th:nth-child(5), .weekly-table-panel td:nth-child(5),
  .weekly-table-panel th:nth-child(7), .weekly-table-panel td:nth-child(7) { display: none; }
  .trend-chart { min-height: 280px; }
  .table-wrap { margin-left: -18px; margin-right: -18px; }
  th, td { padding: 11px 9px; }
  .table-panel th:nth-child(2), .table-panel td:nth-child(2),
  .table-panel th:nth-child(5), .table-panel td:nth-child(5),
  .table-panel th:nth-child(6), .table-panel td:nth-child(6) { display: none; }
  .method-grid { grid-template-columns: 1fr; gap: 30px; margin: 50px 0 38px; }
  .method-notes { grid-template-columns: 1fr; }
  .source-strip { align-items: flex-start; flex-direction: column; }
  .source-links { justify-content: flex-start; }
  footer { gap: 15px; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
