:root {
  --blue-950: #061b4f;
  --blue-900: #003494;
  --blue-700: #0050c1;
  --blue-500: #1671ec;
  --cyan-500: #00a9df;
  --cyan-300: #65d7f7;
  --ink: #11254c;
  --muted: #52627d;
  --line: #d7e3f3;
  --surface: #ffffff;
  --surface-2: #f4f8fd;
  --surface-3: #eaf4ff;
  --violet: #6c3dc2;
  --green: #078860;
  --orange: #ed6c29;
  --shadow-sm: 0 10px 30px rgba(16, 48, 105, .08);
  --shadow-lg: 0 24px 70px rgba(4, 41, 108, .16);
  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-lg: 34px;
  --max-width: 1240px;
  --font-scale: 1;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 108px;
  font-size: calc(16px * var(--font-scale));
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: Qanelas, Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.58;
  text-rendering: optimizeLegibility;
}

body.high-contrast {
  --blue-950: #00072b;
  --blue-900: #001f78;
  --blue-700: #003fbc;
  --blue-500: #0057e7;
  --cyan-500: #006e92;
  --ink: #000b2b;
  --muted: #24334e;
  --line: #7f94b8;
  --surface-2: #edf3fb;
  --surface-3: #dcecff;
}

a { color: inherit; }
img { max-width: 100%; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

:focus-visible {
  outline: 3px solid var(--cyan-500);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 9999;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--blue-950);
  color: #fff;
  transform: translateY(-180%);
  transition: transform .2s ease;
}

.skip-link:focus { transform: translateY(0); }

.prototype-bar {
  position: relative;
  z-index: 90;
  padding: 8px 20px;
  color: #fff;
  background: linear-gradient(90deg, var(--blue-950), var(--blue-700));
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-align: center;
  text-transform: uppercase;
}

.site-header {
  position: sticky;
  z-index: 80;
  top: 0;
  border-bottom: 1px solid rgba(170, 194, 226, .64);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 8px 28px rgba(13, 46, 101, .06);
  backdrop-filter: blur(16px);
}

.header-inner,
.section-inner,
.footer-inner {
  width: min(calc(100% - 40px), var(--max-width));
  margin-inline: auto;
}

.header-inner {
  min-height: 82px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 26px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--blue-950);
  text-decoration: none;
}

.brand img { width: 48px; height: 48px; }
.brand-copy { display: grid; line-height: 1.06; }
.brand-copy strong { font-size: .92rem; letter-spacing: .025em; }
.brand-copy span { color: var(--blue-700); font-size: .78rem; font-weight: 800; }

.main-nav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  padding: 9px 11px;
  border-radius: 10px;
  color: #314563;
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--blue-700);
  background: var(--surface-3);
}

.header-actions { display: flex; align-items: center; gap: 6px; }
.icon-button,
.menu-button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--blue-900);
  background: #fff;
  cursor: pointer;
}

.icon-button:hover,
.menu-button:hover { background: var(--surface-3); }
.menu-button { display: none; }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
  color: #657590;
  font-size: .86rem;
}

.breadcrumb a { color: var(--blue-700); text-decoration: none; font-weight: 700; }
.breadcrumb span[aria-hidden="true"] { color: #9bb0ce; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--blue-700);
  font-size: .82rem;
  font-weight: 850;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 3px;
  border-radius: 99px;
  background: var(--cyan-500);
}

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.08; letter-spacing: -.032em; }
h1 { margin-bottom: 22px; font-size: clamp(2.55rem, 6vw, 5.35rem); color: var(--blue-950); }
h2 { margin-bottom: 18px; font-size: clamp(2rem, 4vw, 3.4rem); color: var(--blue-950); }
h3 { margin-bottom: 10px; font-size: 1.3rem; color: var(--blue-950); }
.lead { max-width: 720px; color: #425675; font-size: clamp(1.03rem, 1.5vw, 1.2rem); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 19px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button-primary { color: #fff; background: linear-gradient(135deg, var(--blue-900), var(--blue-500)); box-shadow: 0 12px 24px rgba(0, 80, 193, .22); }
.button-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 30px rgba(0, 80, 193, .3); }
.button-secondary { color: var(--blue-900); border-color: #b8cff1; background: rgba(255, 255, 255, .8); }
.button-secondary:hover { background: var(--surface-3); }

.home-hero {
  position: relative;
  min-height: 620px;
  display: grid;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(90deg, rgba(255,255,255,1) 0 43%, rgba(255,255,255,.9) 57%, rgba(238,248,255,.38) 100%);
}

.home-hero::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0 0 0 42%;
  background: url("museu-hero-reference.png") 73% 24% / 165% auto no-repeat;
  filter: saturate(.92) contrast(.98);
}

.home-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(90deg, #fff 0 41%, rgba(255,255,255,.92) 52%, rgba(255,255,255,.08) 80%),
    linear-gradient(0deg, rgba(255,255,255,.84), transparent 35%);
}

.hero-copy { max-width: 690px; padding: 76px 0 136px; }
.hero-copy h1 .serif { display: block; font-family: Georgia, "Times New Roman", serif; font-weight: 700; }
.hero-copy h1 .name { display: block; font-size: .54em; font-weight: 650; }
.hero-kicker { max-width: 590px; color: var(--blue-700); font-size: 1.08rem; font-weight: 800; }
.hero-description { max-width: 610px; color: #243d66; }

.portal-cards {
  position: relative;
  z-index: 4;
  margin-top: -94px;
  padding-bottom: 80px;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.portal-card {
  position: relative;
  min-height: 330px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 25px;
  border: 1px solid rgba(185, 207, 236, .7);
  border-radius: 24px;
  color: var(--ink);
  background: rgba(255, 255, 255, .95);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease;
}

.portal-card:hover { transform: translateY(-8px); box-shadow: 0 30px 76px rgba(4, 41, 108, .22); }
.portal-card::after { content: ""; width: 44px; height: 4px; margin-top: auto; border-radius: 99px; background: var(--accent, var(--blue-700)); }
.portal-card .card-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  margin-bottom: 28px;
  border-radius: 22px;
  color: var(--accent, var(--blue-700));
  background: color-mix(in srgb, var(--accent, var(--blue-700)) 10%, white);
  font-size: 2.15rem;
}

.portal-card h2 { margin-bottom: 12px; font-size: clamp(1.7rem, 2.3vw, 2.35rem); }
.portal-card p { color: var(--muted); }
.card-arrow {
  position: absolute;
  right: 22px;
  bottom: 20px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--blue-700);
  font-size: 1.35rem;
}

.accent-blue { --accent: var(--blue-700); }
.accent-green { --accent: var(--green); }
.accent-violet { --accent: var(--violet); }
.accent-orange { --accent: var(--orange); }

.content-section { padding: 92px 0; }
.content-section.soft { background: var(--surface-2); }
.section-head { display: flex; justify-content: space-between; gap: 30px; align-items: end; margin-bottom: 36px; }
.section-head > div { max-width: 760px; }
.section-head p { margin-bottom: 0; color: var(--muted); }

.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.feature-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.feature-card .number { color: var(--blue-500); font-size: 2.4rem; font-weight: 900; }
.feature-card p { margin-bottom: 0; color: var(--muted); }

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 70px;
  background: linear-gradient(135deg, #f7fbff 0%, #eaf5ff 54%, #fff 100%);
}

.page-hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -160px;
  width: 620px;
  height: 620px;
  border: 1px solid #c6dcf8;
  border-radius: 50%;
  box-shadow: inset 0 0 0 55px rgba(214, 235, 255, .42), inset 0 0 0 110px rgba(229, 243, 255, .42);
}

.page-hero .section-inner { position: relative; z-index: 1; }
.page-hero h1 { max-width: 960px; font-size: clamp(2.6rem, 6vw, 4.9rem); }
.page-hero .hero-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.tag { display: inline-flex; gap: 7px; align-items: center; padding: 7px 11px; border-radius: 999px; color: var(--blue-900); background: #fff; border: 1px solid #c8dcf6; font-size: .78rem; font-weight: 800; }

.notice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  border: 1px solid #bcd8f8;
  border-radius: 16px;
  color: #254266;
  background: #eef7ff;
}
.notice strong { color: var(--blue-950); }
.notice p { margin: 0; }

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin: 30px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.field { display: grid; gap: 7px; }
.field label { color: var(--blue-950); font-size: .76rem; font-weight: 850; letter-spacing: .055em; text-transform: uppercase; }
.field input,
.field select {
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid #bed0e8;
  border-radius: 11px;
  color: var(--ink);
  background: #fff;
}

.timeline-picker {
  margin: 34px 0 24px;
  padding: 24px 22px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  scrollbar-width: thin;
}

.timeline-track {
  position: relative;
  min-width: 910px;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 8px;
}

.timeline-track::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 4.5%;
  right: 4.5%;
  top: 48px;
  height: 3px;
  background: linear-gradient(90deg, #9abff4, var(--blue-500));
}

.timeline-button {
  position: relative;
  z-index: 1;
  min-width: 78px;
  display: grid;
  gap: 9px;
  justify-items: center;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}
.timeline-button strong { color: var(--ink); }
.timeline-button .dot { width: 17px; height: 17px; border: 3px solid #fff; border-radius: 50%; background: #5791e7; box-shadow: 0 0 0 1px #74a5ec; }
.timeline-button.active { color: var(--blue-700); }
.timeline-button.active strong { color: var(--blue-700); }
.timeline-button.active .dot { width: 26px; height: 26px; margin-top: -5px; background: #fff; box-shadow: inset 0 0 0 7px var(--blue-500), 0 0 0 3px #cfe1fb; }

.results-head { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin: 24px 0 18px; }
.result-count { font-weight: 850; color: var(--blue-950); }
.view-toggle { display: flex; gap: 6px; }
.view-toggle button { min-width: 42px; height: 40px; border: 1px solid var(--line); border-radius: 10px; color: var(--blue-900); background: #fff; cursor: pointer; }
.view-toggle button.active { color: #fff; background: var(--blue-700); }

.council-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.council-grid.list-view { grid-template-columns: 1fr; }
.council-card {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: inherit;
  background: #fff;
  box-shadow: var(--shadow-sm);
  text-align: left;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease;
}
.council-card:hover { transform: translateY(-5px); border-color: #76a8f0; }
.avatar {
  position: relative;
  min-height: 176px;
  display: grid;
  place-items: end center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 31%, #ffd2b7 0 17%, transparent 17.5%),
    radial-gradient(ellipse at 50% 100%, var(--avatar, #1b5fc5) 0 40%, transparent 40.5%),
    linear-gradient(145deg, #eef6ff, #dbeaff);
}
.avatar::before {
  content: "";
  position: absolute;
  top: 28px;
  width: 70px;
  height: 48px;
  border-radius: 50% 50% 44% 44%;
  background: var(--hair, #2e292b);
  transform: translateY(-10px);
}
.avatar-initials { position: relative; z-index: 2; margin-bottom: 22px; color: #fff; font-size: 1.4rem; font-weight: 900; letter-spacing: .05em; }
.council-card-body { display: grid; gap: 5px; align-content: start; padding: 16px; border-top: 3px solid var(--avatar, var(--blue-500)); }
.council-card-body strong { color: var(--blue-950); font-size: 1.04rem; line-height: 1.22; }
.party { color: var(--blue-700); font-size: .78rem; font-weight: 850; }
.council-grid.list-view .council-card { grid-template-columns: 98px 1fr; grid-template-rows: 1fr; }
.council-grid.list-view .avatar { min-height: 104px; }
.council-grid.list-view .avatar::before { top: 25px; width: 48px; height: 38px; }
.council-grid.list-view .avatar-initials { margin-bottom: 12px; font-size: 1rem; }
.council-grid.list-view .council-card-body { border-top: 0; border-left: 3px solid var(--avatar, var(--blue-500)); align-content: center; }

.empty-state { grid-column: 1 / -1; padding: 48px 24px; border: 1px dashed #a6c3e9; border-radius: 18px; text-align: center; color: var(--muted); background: #f8fbff; }
.data-fallback { columns: 3; padding-left: 22px; }
.council-enhanced .data-fallback { display: none; }

.profile-dialog {
  width: min(620px, calc(100% - 28px));
  padding: 0;
  border: 0;
  border-radius: 22px;
  color: var(--ink);
  box-shadow: 0 30px 100px rgba(0, 25, 76, .38);
}
.profile-dialog::backdrop { background: rgba(1, 19, 55, .7); backdrop-filter: blur(5px); }
.dialog-inner { padding: 28px; }
.dialog-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.dialog-close { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 12px; color: var(--blue-900); background: #fff; cursor: pointer; }
.dialog-grid { display: grid; grid-template-columns: 110px 1fr; gap: 22px; margin-top: 20px; }
.dialog-avatar { width: 110px; height: 130px; min-height: 0; border-radius: 16px; }
.dialog-note { margin-top: 22px; padding: 14px; border-radius: 12px; color: #5a4b12; background: #fff7d8; font-size: .85rem; }

.presidents-layout { display: grid; grid-template-columns: 280px 1fr; gap: 34px; align-items: start; }
.year-nav { position: sticky; top: 112px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow-sm); }
.year-nav strong { display: block; margin-bottom: 13px; }
.year-nav a { display: block; padding: 7px 9px; border-radius: 8px; color: var(--muted); text-decoration: none; }
.year-nav a:hover { color: var(--blue-700); background: var(--surface-3); }
.president-era { position: relative; margin-bottom: 34px; padding-left: 42px; }
.president-era::before { content: ""; position: absolute; left: 14px; top: 14px; bottom: -34px; width: 2px; background: #bdd5f5; }
.president-era:last-child::before { bottom: 20px; }
.president-era h2 { margin-bottom: 18px; font-size: 1.55rem; }
.president-era h2::before { content: ""; position: absolute; left: 6px; width: 18px; height: 18px; border: 4px solid #fff; border-radius: 50%; background: var(--blue-500); box-shadow: 0 0 0 2px #78a7ec; }
.president-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.president-item { padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow-sm); }
.president-item time { display: block; margin-bottom: 5px; color: var(--blue-700); font-size: .78rem; font-weight: 900; }
.president-item strong { line-height: 1.25; }

.story-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: 34px; align-items: center; }
.portrait-panel { min-height: 390px; display: grid; place-items: center; border-radius: 30px; background: linear-gradient(145deg, #f4edff, #e7dafe); box-shadow: var(--shadow-lg); }
.portrait-medallion { width: 220px; height: 220px; display: grid; place-items: center; border: 10px solid rgba(255,255,255,.75); border-radius: 50%; color: #fff; background: linear-gradient(145deg, #8a5bdd, #50249e); box-shadow: 0 20px 44px rgba(83, 34, 160, .28); font-family: Georgia, serif; font-size: 4.3rem; }
.quote { padding-left: 24px; border-left: 4px solid var(--violet); color: #3d3156; font-family: Georgia, serif; font-size: 1.35rem; }
.pathway { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.path-card { padding: 24px; border: 1px solid #dacdf2; border-radius: 20px; background: #fff; }
.path-card span { display: inline-grid; place-items: center; width: 42px; height: 42px; margin-bottom: 20px; border-radius: 13px; color: #fff; background: var(--violet); font-weight: 900; }

.art-map {
  position: relative;
  min-height: 470px;
  overflow: hidden;
  border: 1px solid #d7e3ef;
  border-radius: 30px;
  background:
    linear-gradient(35deg, transparent 47%, rgba(0,80,193,.11) 48% 51%, transparent 52%) 0 0/190px 145px,
    linear-gradient(-22deg, transparent 47%, rgba(7,136,96,.1) 48% 51%, transparent 52%) 0 0/240px 170px,
    #f5f9f5;
  box-shadow: var(--shadow-lg);
}
.art-map::after { content: "Mapa conceitual — pontos demonstrativos"; position: absolute; left: 18px; bottom: 16px; padding: 7px 11px; border-radius: 999px; color: #36516c; background: rgba(255,255,255,.92); font-size: .75rem; font-weight: 800; }
.map-pin { position: absolute; width: 48px; height: 48px; display: grid; place-items: center; border: 5px solid #fff; border-radius: 50% 50% 50% 10%; color: #fff; background: var(--pin, var(--orange)); box-shadow: 0 12px 26px rgba(19, 46, 74, .24); transform: rotate(-45deg); cursor: pointer; }
.map-pin span { transform: rotate(45deg); }
.map-pin:hover { scale: 1.12; }
.art-detail { min-height: 160px; margin-top: 18px; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.art-detail[aria-live="polite"] { scroll-margin-top: 120px; }

.site-footer { color: #dbe8ff; background: var(--blue-950); }
.footer-inner { display: grid; grid-template-columns: 1.3fr .9fr .9fr; gap: 48px; padding: 54px 0; }
.footer-brand { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.footer-brand img { width: 52px; height: 52px; filter: brightness(0) invert(1); }
.site-footer h2 { margin-bottom: 13px; color: #fff; font-size: 1rem; letter-spacing: .01em; }
.site-footer p { color: #b8c8e4; }
.site-footer a { display: block; margin: 6px 0; color: #dbe8ff; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,.12); color: #adc0df; font-size: .77rem; text-align: center; }

@media (max-width: 1080px) {
  .header-inner { grid-template-columns: auto 1fr auto; }
  .main-nav { position: fixed; top: 121px; left: 20px; right: 20px; display: none; align-items: stretch; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow-lg); }
  .main-nav.open { display: grid; }
  .main-nav a { padding: 13px; }
  .menu-button { display: inline-grid; }
  .portal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .council-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .home-hero { min-height: 580px; }
  .home-hero::before { left: 20%; opacity: .34; background-position: 76% 20%; }
  .home-hero::after { background: linear-gradient(90deg, #fff 0 18%, rgba(255,255,255,.94) 48%, rgba(255,255,255,.6) 100%); }
  .hero-copy { padding: 62px 0 125px; }
  .feature-grid, .pathway { grid-template-columns: 1fr; }
  .filter-panel { grid-template-columns: 1fr 1fr; }
  .filter-panel .button { grid-column: 1 / -1; }
  .council-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .presidents-layout { grid-template-columns: 1fr; }
  .year-nav { position: static; display: flex; gap: 4px; overflow-x: auto; }
  .year-nav strong { min-width: max-content; padding: 7px 9px; margin: 0; }
  .year-nav a { min-width: max-content; }
  .story-hero { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-inner > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 580px) {
  .prototype-bar { padding-inline: 12px; font-size: .68rem; }
  .header-inner, .section-inner, .footer-inner { width: min(calc(100% - 28px), var(--max-width)); }
  .header-inner { min-height: 72px; gap: 10px; }
  .brand img { width: 42px; height: 42px; }
  .brand-copy strong { font-size: .78rem; }
  .brand-copy span { font-size: .68rem; }
  .header-actions .font-control { display: none; }
  .main-nav { top: 112px; left: 14px; right: 14px; }
  .home-hero { min-height: 620px; }
  .hero-copy { padding: 52px 0 145px; }
  .portal-grid { grid-template-columns: 1fr; }
  .portal-card { min-height: 280px; }
  .portal-cards { margin-top: -116px; }
  .content-section { padding: 68px 0; }
  .section-head { display: block; }
  .section-head .button { margin-top: 16px; }
  .filter-panel { grid-template-columns: 1fr; }
  .filter-panel .button { grid-column: auto; }
  .council-grid { grid-template-columns: 1fr; }
  .council-card { grid-template-columns: 110px 1fr; grid-template-rows: 1fr; }
  .council-card .avatar { min-height: 126px; }
  .council-card .council-card-body { border-top: 0; border-left: 3px solid var(--avatar, var(--blue-500)); align-content: center; }
  .president-items { grid-template-columns: 1fr; }
  .president-era { padding-left: 32px; }
  .dialog-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-inner > :first-child { grid-column: auto; }
  .data-fallback { columns: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
  .prototype-bar, .site-header, .button-row, .filter-panel, .timeline-picker, .view-toggle, .site-footer { display: none !important; }
  body { color: #000; background: #fff; }
  .page-hero, .content-section { padding: 20px 0; background: #fff; }
  .council-grid { grid-template-columns: repeat(3, 1fr); }
  .council-card, .president-item { break-inside: avoid; box-shadow: none; }
}
