:root {
  --ink: #102033;
  --navy: #17324a;
  --teal: #0e6b66;
  --teal-dark: #0a4e4a;
  --brass: #8d6a3b;
  --paper: #f4f1ea;
  --paper-2: #fffdf8;
  --line: #e3dcd0;
  --muted: #3e4a56;
  --shadow: 0 18px 40px rgba(16, 32, 51, 0.08);
  --serif: "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Segoe UI", system-ui, sans-serif;
  --wrap: 1120px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: clip;
}

body.nav-open { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--teal-dark); }

a:hover { color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
  z-index: 50;
}

.skip:focus { top: 12px; }

.wrap {
  width: min(var(--wrap), calc(100% - 32px));
  margin-inline: auto;
}

.topbar {
  background: var(--ink);
  color: #f7f4ee;
  font-size: 0.92rem;
}

.topbar-inner,
.header-inner,
.footer-grid,
.hero,
.split,
.grid-3,
.grid-2,
.answers,
.gallery,
.districts {
  display: grid;
  gap: 18px;
}

.topbar-inner {
  min-height: 42px;
  align-items: center;
  grid-template-columns: 1fr auto;
}

.topbar a { color: #fff; text-decoration: none; font-weight: 700; }

.topbar-links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0; justify-content: flex-end; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(244, 241, 234, 0.96);
  border-bottom: 1px solid var(--line);
}

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

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  background: #05080d;
  border-radius: 12px;
  padding: 5px 10px;
  line-height: 0;
}

.logo .brand {
  height: 46px;
  width: auto;
  max-width: none;
}

.header-tools { display: contents; }

.nav-toggle,
.header-call {
  display: none;
}

.menu,
.sub { list-style: none; margin: 0; padding: 0; }

.menu a,
.menu button {
  color: var(--ink);
  text-decoration: none;
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
}

.menu a.is-active { box-shadow: inset 0 -2px 0 var(--teal); }

.menu-cta { margin-left: 8px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid transparent;
  line-height: 1.2;
  text-align: center;
}

.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); color: #fff; }
.btn-navy { background: var(--ink); color: #fff; }
.btn-navy:hover { background: var(--navy); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-wa { background: #14715c; color: #fff; }
.btn-wa:hover { background: #0e5646; color: #fff; }

.hero { grid-template-columns: 1.15fr 0.85fr; align-items: center; padding: 42px 0 18px; }

.kicker {
  margin: 0 0 8px;
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0;
}

h1 { font-size: clamp(2.05rem, 4.4vw, 3.7rem); }

h2 { font-size: clamp(1.65rem, 3vw, 2.35rem); }

h3 { font-size: 1.28rem; }

.lead { font-size: 1.12rem; color: var(--navy); }

.mini { display: grid; gap: 8px; margin: 18px 0; }
.mini div { display: grid; grid-template-columns: 92px 1fr; gap: 10px; }
.mini dt { font-weight: 700; color: var(--teal-dark); }
.mini dd { margin: 0; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; }

.hero-media {
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #ddd6c8;
}

.hero-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.section { padding: 28px 0 56px; }

.section-head { max-width: 720px; margin-bottom: 22px; }

.section-head p:last-child { margin-bottom: 0; }

.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.answers { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

.card, .answer, .panel, .step, .district, .ref-group {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.card { overflow: hidden; display: flex; flex-direction: column; }
.card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card-body, .answer, .panel, .district, .ref-group { padding: 18px; }
.card-body { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card p, .answer p, .district p { margin: 0; }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a:hover { color: var(--teal-dark); }

.answer h2, .answer h3 { font-size: 1.05rem; margin-bottom: 8px; }

.band {
  background: var(--ink);
  color: #f7f4ee;
  padding: 48px 0;
  border-radius: 22px;
}

.band a { color: #d7f3f0; }

.band .btn-primary { background: #f4f1ea; color: var(--ink); }
.band .btn-primary:hover { background: #fff; color: var(--ink); }

.split { grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 28px; }
.split img, .frame img { width: 100%; border-radius: 18px; object-fit: cover; }
.frame { margin: 0; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.steps li {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: start;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}
.steps li span {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}

.prose > * + * { margin-top: 0.9rem; }
.prose h2 { margin-top: 2.2rem; }
.prose h3 { margin-top: 1.4rem; }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose li + li { margin-top: 0.35rem; }

.toc {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  margin: 18px 0 8px;
}
.toc ol { margin: 8px 0 0; padding-left: 1.2rem; }

.gallery { grid-template-columns: 1fr 1fr; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 16px; background: #ddd6c8; }
.gallery figcaption { margin-top: 8px; color: var(--muted); font-size: 0.95rem; }

.districts { grid-template-columns: 1fr 1fr; }
.spec { display: grid; gap: 10px; margin: 0; }
.spec div { display: grid; gap: 2px; }
.spec dt { font-weight: 700; }
.spec dd { margin: 0; }

.faq-item {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 4px 14px;
  margin-top: 10px;
}
.faq-item summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.faq-item p { margin: 0 0 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
}

.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 16px 0 0; margin: 0; color: var(--muted); font-size: 0.92rem; }
.crumbs li:not(:last-child)::after { content: "/"; margin-left: 6px; color: #8a8174; }
.crumbs a { color: var(--muted); }

.panel { display: grid; gap: 12px; }
.related { display: flex; flex-wrap: wrap; gap: 8px 14px; }

.site-footer { background: var(--ink); color: #efeae2; padding: 42px 0 28px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { grid-template-columns: 1.3fr 1fr 1fr; gap: 28px; }
.site-footer h2 { font-size: 1.15rem; margin-bottom: 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li + li { margin-top: 6px; }
.legal { border-top: 1px solid rgba(255,255,255,.12); margin-top: 26px; padding-top: 14px; color: #c9c2b6; font-size: 0.92rem; }

.dock { display: none; }

@media (max-width: 1023px) {
  .nav-toggle, .header-call { display: inline-flex; flex: none; width: 58px; min-width: 58px; padding: 0; font-size: 0.92rem; }
  .header-tools { display: flex; gap: 8px; flex: none; margin-left: 8px; }
  .logo { flex: 0 0 auto; width: 140px; max-width: 140px; min-width: 0; overflow: hidden; }
  .logo .brand { display: block; height: 40px; width: 120px; max-width: 120px; object-fit: contain; object-position: left center; }
  .header-inner { display: flex; align-items: center; min-width: 0; }
  .header-call, .nav-toggle {
    min-width: 48px;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    text-decoration: none;
    border: 1px solid var(--line);
    background: var(--paper-2);
    color: var(--ink);
    font: inherit;
    font-weight: 700;
  }
  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--paper-2);
    border-bottom: 1px solid var(--line);
    max-height: calc(100dvh - 120px);
    overflow: auto;
    padding: 8px 8px 16px;
    grid-column: 1 / -1;
  }
  .nav.is-open { display: block; }
  .site-header { position: sticky; }
  .header-inner { position: relative; }
  .menu { display: flex; flex-direction: column; }
  .sub { display: none; padding-left: 10px; }
  .has-sub.is-open > .sub { display: block; }
  .menu-cta { display: none; }
  .dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--ink);
  }
  .dock a {
    color: #fff;
    text-decoration: none;
    text-align: center;
    padding: 14px 8px;
    min-height: 52px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .dock a:last-child { background: var(--teal); }
  body { padding-bottom: 52px; }
}

@media (min-width: 1024px) {
  .logo .brand { height: 54px; }
  .menu { display: flex; justify-content: flex-end; align-items: center; gap: 2px; }
  .has-sub { position: relative; }
  .sub {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 8px;
    box-shadow: var(--shadow);
  }
  .has-sub:hover > .sub,
  .has-sub:focus-within > .sub,
  .has-sub.is-open > .sub { display: block; }
}

@media (max-width: 980px) {
  .hero, .split, .footer-grid, .answers, .grid-3 { grid-template-columns: 1fr 1fr; }
  .answers { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .topbar .wrap { width: auto; max-width: none; padding: 6px 12px; }
  .topbar-inner { display: block; }
  .topbar .tagline { display: none; }
  .topbar-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 12px;
    font-size: 0.84rem;
  }
  .hero, .split, .grid-3, .grid-2, .answers, .gallery, .districts, .footer-grid, .mini div {
    grid-template-columns: 1fr;
  }
  .actions .btn { width: 100%; }
  h1 { font-size: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media print {
  .topbar, .site-header, .dock, .actions { display: none !important; }
  body { padding: 0; background: #fff; }
}
