:root {
  --bg: #f7f4ef;
  --surface: #ffffff;
  --surface-2: #efebe4;
  --ink: #16130f;
  --ink-2: #4a443c;
  --muted: #7a7268;
  --line: #ddd6cb;
  --accent: #b3122e;
  --accent-soft: #f6dfe2;
  --amber: #a15c00;
  --amber-soft: #f7ead6;
  --green: #2f6b3a;
  --green-soft: #e1eee2;
  --blue: #2b5c8a;
  --blue-soft: #e0eaf4;
  --chart-mark: #b3122e;
  --chart-neg: #8a8278;
  --chart-grid: #e6e0d6;
  --cat-1: #b3122e; --cat-2: #1f62a8; --cat-3: #a15c00;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12100e; --surface: #1c1916; --surface-2: #26221e; --ink: #f2ede6; --ink-2: #c9c1b6;
    --muted: #958c80; --line: #3a342e; --accent: #ef5a6f; --accent-soft: #3b1a1f; --amber: #e3a14a;
    --amber-soft: #3a2a14; --green: #7cc28a; --green-soft: #1b2e1f; --blue: #7fb0e0; --blue-soft: #18283a;
    --chart-mark: #ef5a6f; --chart-neg: #8f877c; --cat-1: #e0566b; --cat-2: #4a8cd6; --cat-3: #c0841f; --chart-grid: #2e2924; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12100e; --surface: #1c1916; --surface-2: #26221e; --ink: #f2ede6; --ink-2: #c9c1b6;
  --muted: #958c80; --line: #3a342e; --accent: #ef5a6f; --accent-soft: #3b1a1f; --amber: #e3a14a;
  --amber-soft: #3a2a14; --green: #7cc28a; --green-soft: #1b2e1f; --blue: #7fb0e0; --blue-soft: #18283a;
  --chart-mark: #ef5a6f; --chart-neg: #8f877c; --cat-1: #e0566b; --cat-2: #4a8cd6; --cat-3: #c0841f; --chart-grid: #2e2924; --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 "Inter", system-ui, sans-serif; -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
h1, h2, h3 { font-family: "Fraunces", Georgia, serif; line-height: 1.15; margin: 0; }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 4px; font-size: .9em; }
.muted { color: var(--muted); }

/* Topbar */
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 24px;
  padding: 12px max(16px, calc((100% - 1160px) / 2)); background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.brand { font: 800 22px "Fraunces", serif; color: var(--accent); text-decoration: none; letter-spacing: -.5px; }
.brand { white-space: nowrap; flex-shrink: 0; }
.brand span { color: var(--ink); font-weight: 600; margin-left: 2px; }
.brand .brand-long { margin-left: 0; }
@media (max-width: 700px) { .brand .brand-long { display: none; } }
.nav { display: flex; gap: 18px; overflow-x: auto; flex: 1; scrollbar-width: none; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap; }
.nav a:hover { color: var(--accent); }
.theme-toggle {
  background: none; border: 1px solid var(--line); color: var(--ink); width: 34px; height: 34px;
  border-radius: 50%; cursor: pointer; font-size: 16px; flex-shrink: 0;
}

main { max-width: 1160px; margin: 0 auto; padding: 0 16px; }

/* Hero */
.hero { padding: 72px 0 56px; border-bottom: 1px solid var(--line); }
.kicker { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 600; color: var(--accent); margin: 0 0 16px; }
.hero h1 { font-size: clamp(38px, 7vw, 76px); font-weight: 800; letter-spacing: -1.5px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lede { font-size: clamp(17px, 2vw, 20px); color: var(--ink-2); max-width: 720px; margin: 24px 0 36px; }
.counters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.counter { background: var(--surface); padding: 20px; }
.counter span { display: block; font: 800 clamp(28px, 4vw, 42px) "Fraunces", serif; color: var(--ink); font-variant-numeric: tabular-nums; }
.counter small { color: var(--muted); font-size: 13px; }
.hero-note { margin: 24px 0 0; padding: 14px 18px; background: var(--accent-soft); border-left: 3px solid var(--accent); border-radius: 6px; font-size: 15px; }

/* Sections */
.section { padding: 72px 0; border-bottom: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(28px, 4vw, 42px); letter-spacing: -.5px; margin-bottom: 10px; }
.section-head p { color: var(--ink-2); margin: 0; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; box-shadow: var(--shadow); border-top: 4px solid var(--accent); }
.kpi.mixed { border-top-color: var(--amber); }
.kpi.good { border-top-color: var(--green); }
.kpi h3 { font: 600 14px "Inter", sans-serif; color: var(--ink-2); margin-bottom: 14px; }
.kpi .vals { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.kpi .antes { color: var(--muted); font-size: 15px; text-decoration: line-through; text-decoration-color: var(--line); }
.kpi .arrow { color: var(--muted); }
.kpi .sufijo { font-size: 13px; color: var(--muted); }
.kpi .ahora { font: 800 30px "Fraunces", serif; font-variant-numeric: tabular-nums; }
.kpi p { margin: 10px 0 0; font-size: 14px; color: var(--ink-2); }
.kpi .src { font-size: 12px; color: var(--muted); margin-top: 8px; }

/* Tabs */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 24px; scrollbar-width: thin; }
.tab {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); padding: 9px 16px; border-radius: 999px;
  font: 500 14px "Inter", sans-serif; cursor: pointer; white-space: nowrap;
}
.tab[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.area-intro { font-size: 18px; color: var(--ink-2); max-width: 820px; margin: 0 0 28px; }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-bottom: 28px; }
.chart-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 18px 12px; box-shadow: var(--shadow); min-width: 0; }
.chart-card h4 { margin: 0 0 12px; font-size: 14px; font-weight: 600; }
.chart-wrap { position: relative; height: 240px; }
.chart-card .src { font-size: 12px; color: var(--muted); margin: 10px 0 0; }
.chart-card .src a { color: var(--muted); }
.chart-note { font-size: 12px; color: var(--ink-2); margin: 8px 0 0; }
.dossier { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; padding: 26px; margin-bottom: 28px; box-shadow: var(--shadow); }
.dossier-tag { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin-bottom: 6px; }
.dossier h3 { font-size: clamp(22px, 3vw, 30px); margin-bottom: 16px; }
.dossier-body { display: grid; grid-template-columns: 1.7fr 1fr; gap: 28px; }
.dossier-text p { margin: 0 0 14px; font-size: 15.5px; }
.dossier-figs { display: flex; flex-direction: column; gap: 14px; }
.dossier-figs div { background: var(--accent-soft); border-radius: 10px; padding: 16px; }
.dossier-figs b { display: block; font: 800 30px "Fraunces", serif; color: var(--accent); font-variant-numeric: tabular-nums; }
.dossier-figs span { font-size: 13.5px; color: var(--ink-2); }
.dossier-matiz { margin: 4px 0 0; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }
@media (max-width: 900px) { .dossier-body { grid-template-columns: 1fr; } .dossier { padding: 20px; } }
.promesas { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; padding: 26px; margin-bottom: 28px; box-shadow: var(--shadow); }
.promesas h3 { font-size: clamp(22px, 3vw, 30px); margin-bottom: 10px; }
.promesas-intro { color: var(--ink-2); font-size: 15.5px; margin: 0 0 20px; max-width: 820px; }
.promesas-resumen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 26px; }
.promesas-resumen div { background: var(--accent-soft); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.promesas-resumen b { font: 800 32px "Fraunces", serif; color: var(--accent); font-variant-numeric: tabular-nums; }
.promesas-resumen span { font-size: 14px; color: var(--ink); }
.promesas-resumen small { font-size: 12px; color: var(--muted); }
.promesas-lista { list-style: none; margin: 0; padding: 0; }
.promesas-lista li { display: grid; grid-template-columns: 96px 130px 1fr; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); }
.p-fecha { font-size: 13px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; padding-top: 4px; }
.p-cifra { font: 800 24px "Fraunces", serif; font-variant-numeric: tabular-nums; line-height: 1.1; }
.p-cifra small { display: block; font: 500 12px "Inter", sans-serif; color: var(--muted); margin-top: 2px; }
.p-quien { font-size: 13px; color: var(--muted); margin-bottom: 4px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.p-estado { font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.p-estado.bad { background: var(--accent-soft); color: var(--accent); }
.p-estado.bad::before { content: "✕ "; }
.p-estado.warn { background: var(--amber-soft); color: var(--amber); }
.p-estado.warn::before { content: "▼ "; }
.p-estado.neutral { background: var(--surface-2); color: var(--ink-2); }
.p-estado.neutral::before { content: "? "; }
.p-estado.info { background: var(--blue-soft); color: var(--blue); }
.p-estado.info::before { content: "… "; }
.p-anuncio { margin: 0 0 6px; font-weight: 600; font-size: 15px; }
.p-resultado { margin: 0; font-size: 14px; color: var(--ink-2); }
.p-resultado a { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
@media (max-width: 700px) {
  .promesas { padding: 20px; }
  .promesas-resumen { grid-template-columns: 1fr; }
  .promesas-lista li { grid-template-columns: 1fr; gap: 4px; }
  .p-cifra { font-size: 22px; }
}
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.stat b { display: block; font: 800 36px "Fraunces", serif; color: var(--accent); margin-bottom: 6px; }
.stat span { font-size: 14px; color: var(--ink-2); }
.versus { display: grid; grid-template-columns: 1fr 1.4fr; gap: 16px; }
.vs { border-radius: 12px; padding: 22px; }
.vs h4 { margin: 0 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.vs ul { margin: 0; padding-left: 18px; }
.vs li { margin-bottom: 10px; font-size: 15px; }
.vs.gov { background: var(--surface-2); }
.vs.gov h4 { color: var(--ink-2); }
.vs.real { background: var(--accent-soft); }
.vs.real h4 { color: var(--accent); }
.area-sources { margin-top: 18px; font-size: 13px; color: var(--muted); }
.area-sources a { color: var(--ink-2); }
.area-sources ul { margin: 6px 0 0; padding-left: 18px; }

/* Filters & cases */
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 24px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); padding: 7px 14px; border-radius: 999px; cursor: pointer; font: 500 13px "Inter", sans-serif; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .n { opacity: .6; margin-left: 4px; }
#caseSearch { flex: 1; min-width: 200px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 14px "Inter", sans-serif; }
.cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.case { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.case-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 10px; }
.badge { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.badge::before { margin-right: 5px; }
.badge.condenado { background: var(--accent-soft); color: var(--accent); }
.badge.condenado::before { content: "⚖"; }
.badge.juicio { background: var(--amber-soft); color: var(--amber); }
.badge.juicio::before { content: "▲"; }
.badge.investigado { background: var(--blue-soft); color: var(--blue); }
.badge.investigado::before { content: "●"; }
.badge.polemica { background: var(--surface-2); color: var(--ink-2); }
.badge.polemica::before { content: "◆"; }
.case .date { font-size: 12px; color: var(--muted); }
.case h3 { font-size: 22px; margin-bottom: 10px; }
.case .people { font-size: 13px; color: var(--ink-2); margin: 0 0 12px; padding: 0; list-style: none; }
.case .people li::before { content: "— "; color: var(--muted); }
.case p { font-size: 14.5px; margin: 0 0 12px; }
.case details { font-size: 13px; color: var(--ink-2); margin-top: auto; }
.case summary { cursor: pointer; color: var(--accent); font-weight: 600; padding: 4px 0; }
.case details ul { padding-left: 18px; margin: 6px 0; }
.case .srcs { font-size: 12px; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.case .srcs a { color: var(--muted); }
.empty { color: var(--muted); padding: 24px 0; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 24px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 28px 20px; max-width: 760px; }
.timeline li::before { content: ""; position: absolute; left: -32px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 3px solid var(--bg); }
.timeline .t-date { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.timeline h3 { font-size: 20px; margin: 4px 0 6px; }
.timeline p { margin: 0; color: var(--ink-2); font-size: 15px; }

/* Hemeroteca */
.hemero { display: flex; flex-direction: column; gap: 14px; }
.hemero-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px; box-shadow: var(--shadow); }
.hemero-card h3 { font-size: clamp(20px, 2.6vw, 24px); margin-bottom: 14px; display: flex; align-items: baseline; gap: 10px; }
.hemero-n { font: 800 14px "Inter", sans-serif; color: var(--accent); }
.hemero-cols { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: stretch; margin-bottom: 10px; }
.hemero-dijo, .hemero-hizo { border-radius: 10px; padding: 14px 16px; }
.hemero-dijo { background: var(--surface-2); }
.hemero-hizo { background: var(--accent-soft); }
.hemero-tag { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; margin-right: 8px; }
.hemero-dijo .hemero-tag { color: var(--ink-2); }
.hemero-hizo .hemero-tag { color: var(--accent); }
.hemero-cols small { font-size: 12px; color: var(--muted); }
.hemero-cols p { margin: 6px 0 0; font-size: 15px; }
.hemero-dijo p { font-family: "Fraunces", Georgia, serif; font-size: 16.5px; }
.hemero-arrow { align-self: center; font-size: 22px; color: var(--accent); font-weight: 700; }
.hemero-card .srcs { font-size: 12px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.hemero-card .srcs a { color: var(--muted); }
@media (max-width: 760px) { .hemero-cols { grid-template-columns: 1fr; } .hemero-arrow { transform: rotate(90deg); justify-self: center; } }

/* Emergencias */
.emerg { display: flex; flex-direction: column; gap: 16px; }
.emerg-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 24px; box-shadow: var(--shadow); }
.emerg-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 14px; flex-wrap: wrap; }
.emerg-head .date { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.emerg-head h3 { font-size: clamp(22px, 3vw, 28px); margin-top: 4px; }
.emerg-figs { display: flex; gap: 12px; flex-wrap: wrap; }
.emerg-figs div { background: var(--accent-soft); border-radius: 10px; padding: 12px 14px; width: 190px; }
.emerg-figs b { display: block; font: 800 26px "Fraunces", serif; color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1.1; }
.emerg-figs span { font-size: 12.5px; color: var(--ink-2); }
.emerg-card h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
.emerg-card ul { margin: 0 0 14px; padding-left: 18px; }
.emerg-card li { margin-bottom: 8px; font-size: 15px; }
.emerg-matiz { font-size: 13.5px; color: var(--ink-2); background: var(--surface-2); border-radius: 8px; padding: 10px 14px; margin: 0 0 12px; }
.emerg-card .srcs { font-size: 12px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.emerg-card .srcs a { color: var(--muted); }
@media (max-width: 600px) { .emerg-figs div { width: 100%; } .emerg-card { padding: 20px; } }

/* Exterior */
.diplo { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.diplo-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.diplo-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.diplo-pais { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.diplo-card .date { font-size: 12px; color: var(--muted); }
.diplo-card h3 { font-size: 21px; margin-bottom: 8px; }
.diplo-card p { font-size: 14.5px; color: var(--ink-2); margin: 0 0 12px; }
.diplo-card a { font-size: 12px; color: var(--muted); margin-top: auto; }
@media (max-width: 600px) { .diplo { grid-template-columns: 1fr; } }

/* Urnas */
.urnas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.urna { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.urna h3 { font-size: 20px; }
.urna .f { font-size: 12px; color: var(--muted); }
.seats { display: flex; align-items: baseline; gap: 8px; margin: 14px 0 6px; }
.seats .now { font: 800 40px "Fraunces", serif; }
.seats .delta { font-weight: 700; font-size: 15px; }
.seats .delta.down { color: var(--accent); }
.seats .delta.up { color: var(--green); }
.bar { height: 8px; background: var(--surface-2); border-radius: 4px; position: relative; margin-bottom: 12px; overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 4px; }
.bar s { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--ink); text-decoration: none; }
.urna p { font-size: 13px; color: var(--ink-2); margin: 0 0 8px; }
.urna a { font-size: 12px; color: var(--muted); }

/* Method */
.method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.method h3 { font-size: 20px; margin-bottom: 10px; }
.method li, .method p { color: var(--ink-2); font-size: 15px; }
.footer { text-align: center; padding: 40px 16px; color: var(--muted); font-size: 13px; }

/* Responsive */
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .urnas { grid-template-columns: repeat(2, 1fr); }
  .versus, .method-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .topbar { gap: 12px; }
  .counters { grid-template-columns: repeat(2, 1fr); }
  .kpis, .urnas { grid-template-columns: 1fr; }
  .cases { grid-template-columns: 1fr; }
  .charts { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 40px; }
  .section { padding: 52px 0; }
}

/* Logo */
.brand { display: inline-flex; align-items: center; gap: 6px; }
.brand-logo { width: 30px; height: 30px; }
.hero { position: relative; }
.hero-logo { position: absolute; right: 0; top: 56px; width: 180px; height: 180px; }
.hero .kicker, .hero h1 { padding-right: 200px; }
@media (max-width: 1199px) { .hero .kicker, .hero h1 { padding-right: 0; } .hero-logo { position: static; display: block; width: 96px; height: 96px; margin-bottom: 12px; } }

/* Solo para lectores de pantalla y buscadores */
.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; }

/* Menú desplegable en móvil y tableta */
.menu-toggle { touch-action: manipulation; -webkit-tap-highlight-color: transparent; display: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; flex-shrink: 0; padding: 0; }
.menu-toggle span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .2s, opacity .2s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 1100px) {
  .brand { flex: 1; }
  .menu-toggle { display: inline-flex; }
  .theme-toggle { width: 40px; height: 40px; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 4px 16px 12px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .12);
    max-height: calc(100vh - 64px); overflow-y: auto;
  }
  .nav.open { display: flex; }
  .nav a { font-size: 17px; font-weight: 600; color: var(--ink); padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: 0; }
  .nav a::after { content: "→"; float: right; color: var(--accent); font-weight: 400; }
}
@media (min-width: 701px) and (max-width: 1100px) {
  .nav { display: none; grid-template-columns: 1fr 1fr; column-gap: 24px; padding: 8px max(16px, calc((100% - 1160px) / 2)) 16px; }
  .nav.open { display: grid; }
  .nav a:nth-last-child(2) { border-bottom: 0; }
}
