:root {
  --bg: #f4f7f5;
  --surface: #ffffff;
  --surface-soft: #eef3f0;
  --surface-strong: #e3ebe6;
  --text: #14231a;
  --text-soft: #5f6f65;
  --text-faint: #859188;
  --line: #dce6df;
  --line-strong: #c8d7cd;
  --brand: #168a54;
  --brand-dark: #0f6f42;
  --brand-soft: #dff4e8;
  --accent: #255c7a;
  --warning: #a96013;
  --danger: #a63c3c;
  --sidebar: #10251b;
  --sidebar-text: #dce9e1;
  --sidebar-muted: #8fa99a;
  --shadow-sm: 0 1px 2px rgba(17, 35, 25, .05), 0 8px 24px rgba(17, 35, 25, .05);
  --shadow-md: 0 20px 60px rgba(17, 35, 25, .12);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-xl: 34px;
  --sidebar-width: 272px;
  --topbar-height: 76px;
  --font-scale: 1;
}

html[data-theme="dark"] {
  --bg: #0c1510;
  --surface: #142019;
  --surface-soft: #18271e;
  --surface-strong: #203329;
  --text: #edf5f0;
  --text-soft: #b1c0b6;
  --text-faint: #819188;
  --line: #2b3d32;
  --line-strong: #3a5042;
  --brand: #4bc484;
  --brand-dark: #6ed69a;
  --brand-soft: #163827;
  --accent: #78b8d6;
  --warning: #efac5c;
  --danger: #ef8585;
  --sidebar: #08110c;
  --sidebar-text: #e4eee8;
  --sidebar-muted: #8da294;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .15), 0 12px 30px rgba(0, 0, 0, .16);
  --shadow-md: 0 24px 70px rgba(0, 0, 0, .28);
}

html[data-font-size="small"] { --font-scale: .92; }
html[data-font-size="medium"] { --font-scale: 1; }
html[data-font-size="large"] { --font-scale: 1.14; }

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

html { color-scheme: light; scroll-behavior: smooth; }
html[data-theme="dark"] { color-scheme: dark; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: calc(16px * var(--font-scale));
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

button, input { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent);
  outline-offset: 3px;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

[hidden] { display: none !important; }

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 999;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  transform: translateY(-150%);
  box-shadow: var(--shadow-md);
}
.skip-link:focus { transform: translateY(0); }

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  height: 100vh;
  padding: 26px 20px 20px;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 30% -10%, rgba(84, 198, 133, .15), transparent 35%),
    var(--sidebar);
  color: var(--sidebar-text);
  z-index: 80;
  border-right: 1px solid rgba(255,255,255,.06);
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 34px;
}

.brand {
  border: 0;
  padding: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #32b26f, #117345);
  color: white;
  box-shadow: 0 10px 25px rgba(29, 158, 91, .25);
}
.brand-mark svg { width: 31px; height: 31px; stroke-width: 2.2; }
.brand strong { display: block; font-size: 1.18rem; letter-spacing: -.02em; }
.brand small {
  display: block;
  color: #64d69a;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .66rem;
  font-weight: 800;
  margin-top: 2px;
}

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
}
.icon-button svg { width: 22px; height: 22px; }
.sidebar-close { display: none; border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: white; }

.main-nav { display: grid; gap: 8px; }

.nav-item {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--sidebar-muted);
  padding: 13px 14px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 13px;
  font-weight: 760;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.nav-item svg { width: 22px; height: 22px; }
.nav-item { position: relative; }
.nav-item::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 4px; height: 0; transform: translateY(-50%);
  border-radius: 0 3px 3px 0; background: #4bc484; opacity: 0;
  transition: height .16s ease, opacity .16s ease;
}
.nav-item:hover { background: rgba(255,255,255,.10); color: white; transform: translateX(2px); }
.nav-item:hover::before { height: 42%; opacity: 1; }
.nav-item.is-active {
  background: rgba(75, 196, 132, .24);
  border-color: rgba(75, 196, 132, .62);
  color: #a6f2c9;
}
.nav-item.is-active::before { height: 62%; opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .nav-item, .nav-item::before { transition: none; }
  .nav-item:hover { transform: none; }
}

.sidebar-note {
  margin-top: auto;
  display: flex;
  gap: 12px;
  padding: 15px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  border-radius: 16px;
}
.note-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(75,196,132,.14);
  color: #75dfa5;
  font-size: 1.15rem;
}
.sidebar-note strong { display: block; font-size: .82rem; }
.sidebar-note span:last-child { display: block; color: var(--sidebar-muted); font-size: .75rem; margin-top: 2px; }

.sidebar-tools {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding-top: 14px;
}
.tool-button {
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  color: var(--sidebar-muted);
  border-radius: 12px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-size: .78rem;
  font-weight: 750;
}
.tool-button:hover { color: white; background: rgba(255,255,255,.07); }
.tool-button svg { width: 19px; height: 19px; }
.theme-sun { display: none; }
html[data-theme="dark"] .theme-moon { display: none; }
html[data-theme="dark"] .theme-sun { display: block; }
.font-size-control {
  min-height: 52px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 7px 8px 7px 13px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  border-radius: 12px;
  color: var(--sidebar-muted);
}
.font-size-label { font-size: .78rem; font-weight: 750; }
.font-size-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(36px, 1fr));
  gap: 4px;
}
.font-size-button {
  min-width: 0;
  min-height: 36px;
  padding: 5px 7px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--sidebar-muted);
  cursor: pointer;
  font-weight: 900;
  line-height: 1;
}
.font-size-button:hover { color: white; background: rgba(255,255,255,.07); }
.font-size-button[aria-pressed="true"],
.font-size-button.is-active {
  color: white;
  background: rgba(75,196,132,.17);
  border-color: rgba(110,214,154,.34);
}
.font-size-button[data-font-size="small"] { font-size: .82rem; }
.font-size-button[data-font-size="medium"] { font-size: .98rem; }
.font-size-button[data-font-size="large"] { font-size: 1.12rem; }

.content-shell { margin-left: var(--sidebar-width); min-height: 100vh; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 clamp(22px, 4vw, 58px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.mobile-menu { display: none; }
.topbar-copy { display: grid; line-height: 1.15; }
.topbar-copy .eyebrow {
  color: var(--text-faint);
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .62rem;
}
.topbar-copy strong { font-size: 1rem; margin-top: 4px; }
.location-chip {
  margin-left: auto;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-soft);
  border-radius: 999px;
  min-height: 42px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 750;
  box-shadow: var(--shadow-sm);
}
.location-chip svg { width: 18px; height: 18px; color: var(--brand); }

main { min-height: calc(100vh - var(--topbar-height)); }
.view {
  display: none;
  animation: viewIn .28s ease both;
}
.view.is-visible { display: block; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

#view-home,
#view-knowledge {
  width: min(1220px, 100%);
  margin: 0 auto;
  padding: clamp(34px, 5vw, 68px) clamp(22px, 4vw, 58px) 90px;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr);
  gap: clamp(34px, 5vw, 72px);
  align-items: center;
}

.section-kicker {
  display: inline-block;
  color: var(--brand-dark);
  text-transform: uppercase;
  letter-spacing: .13em;
  font-size: .72rem;
  font-weight: 850;
}

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { text-wrap: balance; }

.hero-copy h1,
.wizard-header h1,
.knowledge-hero h1 {
  margin: 14px 0 20px;
  font-size: clamp(2.55rem, 5vw, 4.85rem);
  line-height: .98;
  letter-spacing: -.055em;
  max-width: 780px;
}
.hero-lead,
.wizard-header p,
.knowledge-hero p {
  margin-bottom: 30px;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  line-height: 1.7;
  max-width: 760px;
}

.search-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.search-panel:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent), var(--shadow-md);
}
.search-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  color: var(--brand);
  flex: 0 0 auto;
}
.search-icon svg { width: 25px; height: 25px; stroke-width: 2.2; }
.search-panel input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 680;
  padding: 17px 4px;
}
.search-panel input::placeholder { color: var(--text-faint); font-weight: 560; }

.primary-button,
.secondary-button {
  border-radius: 14px;
  padding: 14px 20px;
  min-height: 48px;
  font-weight: 820;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.primary-button {
  border: 1px solid var(--brand);
  background: var(--brand);
  color: white;
  box-shadow: 0 10px 22px color-mix(in srgb, var(--brand) 22%, transparent);
}
.primary-button:hover { background: var(--brand-dark); border-color: var(--brand-dark); transform: translateY(-1px); }
.secondary-button { border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); }
.secondary-button:hover { border-color: var(--brand); color: var(--brand-dark); transform: translateY(-1px); }
.primary-button.large, .secondary-button.large { min-height: 58px; padding: 16px 24px; font-size: 1rem; }
.primary-button svg { width: 21px; height: 21px; }
.primary-button.full { width: 100%; }
.search-button { min-width: 122px; }

.search-hint {
  margin: 12px 5px 0;
  color: var(--text-faint);
  font-size: .82rem;
}
.popular-searches {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  color: var(--text-soft);
  font-size: .82rem;
  font-weight: 700;
}
.popular-searches button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-soft);
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.popular-searches button:hover { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-soft); }

.impact-card {
  position: relative;
  min-height: 470px;
  padding: 30px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 80% 12%, rgba(255,255,255,.16), transparent 30%),
    linear-gradient(150deg, #174b31, #0e2b1c 68%);
  color: white;
  box-shadow: var(--shadow-md);
}
html[data-theme="dark"] .impact-card { background: linear-gradient(150deg, #1a5a39, #0b2417 72%); }
.impact-visual { position: absolute; inset: 20px 12px auto auto; width: 240px; height: 240px; }
.impact-ring { position: absolute; border-radius: 50%; border: 2px solid rgba(117,223,165,.25); }
.ring-one { inset: 18px; animation: slowSpin 18s linear infinite; border-style: dashed; }
.ring-two { inset: 55px; border-color: rgba(255,255,255,.16); }
.impact-core {
  position: absolute;
  inset: 89px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(117,223,165,.17);
  color: #75dfa5;
  font-size: 2.2rem;
}
@keyframes slowSpin { to { transform: rotate(360deg); } }
.impact-copy { position: relative; z-index: 2; }
.impact-label { color: #75dfa5; text-transform: uppercase; letter-spacing: .12em; font-size: .7rem; font-weight: 850; }
.impact-copy strong { display: block; margin: 10px 0 12px; font-size: clamp(1.65rem, 3vw, 2.45rem); line-height: 1.08; letter-spacing: -.035em; }
.impact-copy p { margin-bottom: 22px; color: rgba(255,255,255,.68); font-size: .93rem; line-height: 1.6; }
.impact-stats { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.impact-stats div { padding: 13px; border-radius: 14px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.08); }
.impact-stats strong { display: block; font-size: 1.15rem; color: #75dfa5; }
.impact-stats span { color: rgba(255,255,255,.62); font-size: .72rem; }

.section-block { margin-top: clamp(60px, 8vw, 96px); }
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.section-heading.compact { align-items: center; }
.section-heading h2 { margin: 7px 0 0; font-size: clamp(1.65rem, 3vw, 2.35rem); line-height: 1.1; letter-spacing: -.035em; }
.section-heading > p { margin: 0; color: var(--text-soft); max-width: 360px; text-align: right; font-size: .9rem; }

.category-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.category-card,
.choice-card {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 17px;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.category-card:hover,
.choice-card:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.category-icon {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.category-icon svg { width: 27px; height: 27px; stroke-width: 1.9; }
.icon-blue { color: #216588; background: #e2f1f8; }
.icon-violet { color: #6e4d92; background: #f0e8f8; }
.icon-amber { color: #9b611e; background: #f8edda; }
.icon-green { color: #16744a; background: var(--brand-soft); }
html[data-theme="dark"] .icon-blue { background: #173244; color: #8cc8e6; }
html[data-theme="dark"] .icon-violet { background: #30253d; color: #c4a7e6; }
html[data-theme="dark"] .icon-amber { background: #3b2c1a; color: #efbd77; }
.category-text { min-width: 0; flex: 1; }
.category-text strong { display: block; font-size: 1rem; line-height: 1.25; }
.category-text small { display: block; color: var(--text-soft); margin-top: 4px; font-size: .8rem; }
.card-arrow { width: 20px; height: 20px; flex: 0 0 auto; color: var(--text-faint); transition: transform .18s ease; }
.category-card:hover .card-arrow,
.choice-card:hover .card-arrow { transform: translateX(3px); color: var(--brand); }

.text-link {
  border: 0;
  background: transparent;
  padding: 5px 0;
  color: var(--brand-dark);
  font-weight: 820;
  cursor: pointer;
}
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.service-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.service-card {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 16px;
  padding: 18px;
  min-height: 145px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.service-card:hover { transform: translateY(-2px); border-color: var(--brand); background: var(--brand-soft); }
.service-card > span { font-size: 1.65rem; margin-bottom: auto; }
.service-card strong { font-size: .95rem; }
.service-card small { color: var(--text-soft); margin-top: 3px; }

.narrow-layout { width: min(850px, 100%); margin: 0 auto; padding: clamp(32px, 5vw, 64px) clamp(22px, 4vw, 48px) 90px; }
.back-link {
  border: 0;
  padding: 8px 0;
  background: transparent;
  color: var(--text-soft);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 760;
  cursor: pointer;
}
.back-link:hover { color: var(--brand-dark); }
.back-link svg { width: 19px; height: 19px; }

.progress-card { margin: 30px 0 44px; display: grid; grid-template-columns: auto minmax(160px, 280px); gap: 24px; align-items: center; }
.progress-copy { display: grid; }
.progress-copy span { color: var(--text-faint); font-size: .73rem; font-weight: 820; text-transform: uppercase; letter-spacing: .1em; }
.progress-copy strong { margin-top: 3px; }
.progress-track { height: 7px; border-radius: 999px; background: var(--surface-strong); overflow: hidden; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.wizard-header h1 { max-width: 650px; font-size: clamp(2.4rem, 5vw, 4.15rem); }
.choice-list { display: grid; gap: 13px; margin-top: 32px; }
.choice-card { padding: 22px; }
.choice-icon {
  width: 60px;
  height: 60px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: 1.4rem;
  font-weight: 900;
}
.choice-icon.repair { background: #e2f1f8; }
.choice-icon.reuse { background: #f5e8ef; color: #9b3f6c; }
.choice-icon.recycle { background: var(--brand-soft); color: var(--brand-dark); }
html[data-theme="dark"] .choice-icon.repair { background: #173244; }
html[data-theme="dark"] .choice-icon.reuse { background: #3d2430; color: #e7a5c3; }
.choice-copy { flex: 1; min-width: 0; }
.choice-copy strong { display: block; font-size: 1rem; line-height: 1.35; }
.choice-copy small { display: block; color: var(--text-soft); margin-top: 4px; }

.result-layout { width: min(920px, 100%); }
.result-card {
  margin-top: 26px;
  padding: clamp(28px, 6vw, 58px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  text-align: center;
}
.result-topline { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; }
.result-status,
.result-item { padding: 7px 11px; border-radius: 999px; font-size: .7rem; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
.result-status { color: var(--brand-dark); background: var(--brand-soft); }
.result-item { color: var(--text-soft); background: var(--surface-soft); }
.result-icon { width: 102px; height: 102px; margin: 28px auto 22px; border-radius: 29px; display: grid; place-items: center; background: var(--brand-soft); font-size: 2.7rem; }
.result-card h1 { margin: 0 auto 17px; font-size: clamp(2.25rem, 5vw, 4rem); line-height: 1.02; letter-spacing: -.045em; max-width: 560px; }
.result-card > p { color: var(--text-soft); font-size: 1.08rem; line-height: 1.7; max-width: 680px; margin: 0 auto 34px; }
.result-reasons { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 0 0 34px; text-align: left; }
.result-reasons > div { padding: 17px; border-radius: 16px; background: var(--surface-soft); display: flex; gap: 12px; }
.result-reasons > div > span { width: 28px; height: 28px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--surface); color: var(--brand-dark); font-size: .75rem; font-weight: 900; }
.result-reasons p { margin: 0; font-size: .77rem; color: var(--text-soft); line-height: 1.45; }
.result-reasons strong { display: block; color: var(--text); font-size: .84rem; margin-bottom: 3px; }
.result-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

.map-view.is-visible { display: block; }
.map-layout { min-height: calc(100vh - var(--topbar-height)); display: grid; grid-template-columns: minmax(410px, 40%) 1fr; overflow: visible; }
.map-list-panel { min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: visible; background: var(--bg); border-right: 1px solid var(--line); }
.location-gate { flex: none; min-height: calc(100vh - var(--topbar-height)); display: grid; justify-items: center; align-items: start; padding: clamp(40px, 8vh, 78px) 28px 42px; overflow: visible; background: var(--bg); }
.location-gate-inner { width: min(330px, 100%); text-align: center; }
.location-gate-icon { width: 60px; height: 60px; margin: 0 auto 24px; display: grid; place-items: center; border-radius: 18px; background: var(--surface-soft); color: var(--text-soft); }
.location-gate-icon svg { width: 28px; height: 28px; }
.location-gate h1 { margin: 12px 0 14px; font-size: clamp(1.45rem, 2.4vw, 1.85rem); line-height: 1.12; letter-spacing: -.04em; }
.location-gate p { margin: 0 0 22px; color: var(--text-soft); font-size: .86rem; line-height: 1.65; }
.location-gps-button { width: 100%; min-height: 48px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--text); font-weight: 850; cursor: pointer; box-shadow: var(--shadow-sm); }
.location-gps-button:hover { border-color: var(--brand); color: var(--brand-dark); }
.location-gps-button:disabled { opacity: .7; cursor: wait; }
.location-divider { display: flex; align-items: center; gap: 10px; margin: 18px 0; color: var(--text-faint); font-size: .75rem; }
.location-divider::before, .location-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.manual-location-form { text-align: left; }
.manual-location-form label { display: block; margin-bottom: 8px; color: var(--text-soft); font-size: .78rem; font-weight: 850; }
.manual-location-row { display: flex; gap: 8px; }
.manual-location-row input { min-width: 0; flex: 1; border: 1px solid var(--line-strong); border-radius: 13px; background: var(--surface-soft); color: var(--text); padding: 13px; outline: 0; }
.manual-location-row input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent); }
.manual-location-row button { flex: 0 0 auto; border: 1px solid var(--brand); border-radius: 12px; background: var(--brand); color: #fff; padding: 0 17px; font-weight: 850; cursor: pointer; }
.manual-location-row button:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.location-gate .quiet-button { width: 100%; margin-top: 18px; text-align: center; }
.map-results-content { min-height: 0; flex: none; display: flex; flex-direction: column; overflow: visible; }
.map-list-header { padding: 28px 28px 18px; background: var(--surface); border-bottom: 1px solid var(--line); }
.map-list-header h1 { margin: 7px 0 20px; font-size: clamp(1.8rem, 3vw, 2.65rem); line-height: 1.05; letter-spacing: -.04em; }
.map-search { display: flex; align-items: center; gap: 8px; padding: 6px; border: 1px solid var(--line-strong); background: var(--surface-soft); border-radius: 14px; }
.map-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb,var(--brand) 12%,transparent); }
.map-search svg { width: 20px; height: 20px; margin-left: 9px; color: var(--text-faint); }
.map-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); padding: 10px 2px; font-weight: 650; }
.map-search button { border: 0; border-radius: 10px; padding: 10px 13px; background: var(--brand); color: white; font-weight: 800; cursor: pointer; }
.filter-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.filter-chip { border: 1px solid var(--line); background: transparent; color: var(--text-soft); border-radius: 999px; padding: 7px 10px; font-size: .75rem; font-weight: 800; cursor: pointer; }
.filter-chip:hover, .filter-chip.is-active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.map-results-meta { padding: 16px 28px 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.map-results-meta strong { font-size: .82rem; }
.map-results-meta button { border: 0; background: transparent; color: var(--text-soft); font-size: .75rem; font-weight: 780; cursor: pointer; }
.place-list { flex: none; min-height: 0; padding: 6px 18px 30px 28px; overflow: visible; display: grid; align-content: start; gap: 10px; }
.place-card { width: 100%; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 16px; padding: 15px; display: grid; grid-template-columns: 46px minmax(0,1fr) auto; gap: 12px; align-items: center; text-align: left; cursor: pointer; box-shadow: var(--shadow-sm); }
.place-card:hover, .place-card.is-selected { border-color: var(--brand); }
.place-card.is-selected { box-shadow: 0 0 0 3px color-mix(in srgb,var(--brand) 12%, transparent); }
.place-type-icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--surface-soft); font-size: 1.2rem; }
.place-copy { min-width: 0; }
.place-copy strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .9rem; }
.place-copy span { display: block; color: var(--text-soft); font-size: .72rem; margin-top: 3px; }
.place-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.place-tags em { font-style: normal; font-size: .62rem; font-weight: 800; padding: 4px 6px; border-radius: 999px; color: var(--brand-dark); background: var(--brand-soft); }
.place-distance { text-align: right; }
.place-distance strong { display: block; font-size: .78rem; color: var(--brand-dark); }
.place-distance span { display: block; color: var(--text-faint); font-size: .65rem; margin-top: 3px; }
.empty-results { padding: 35px 18px; color: var(--text-soft); text-align: center; border: 1px dashed var(--line-strong); border-radius: 16px; }

.map-canvas { position: sticky; top: var(--topbar-height); align-self: start; min-height: calc(100vh - var(--topbar-height)); overflow: hidden; background: #dce8df; }
html[data-theme="dark"] .map-canvas { background: #14261b; }
.map-grid { position: absolute; inset: 0; opacity: .38; background-image: linear-gradient(rgba(78,111,90,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(78,111,90,.18) 1px, transparent 1px); background-size: 46px 46px; transition: background-size .2s ease, opacity .2s ease; }
.map-road { position: absolute; height: 38px; background: #f8faf8; border: 1px solid rgba(90,113,97,.15); box-shadow: inset 0 0 0 8px #edf2ee; transform-origin: center; transition: box-shadow .2s ease; }
html[data-theme="dark"] .map-road { background: #293b30; border-color: #334c3c; box-shadow: inset 0 0 0 8px #203127; }
.road-one { width: 130%; left: -10%; top: 35%; transform: rotate(-12deg); }
.road-two { width: 115%; left: -8%; top: 68%; transform: rotate(18deg); }
.road-three { width: 90%; left: 28%; top: 15%; transform: rotate(72deg); }
.map-river { position: absolute; width: 120%; height: 85px; left: -15%; top: 82%; border-radius: 50%; background: #b9dce8; transform: rotate(-7deg); opacity: .8; }
html[data-theme="dark"] .map-river { background: #234a59; }
.district { position: absolute; color: rgba(40,70,51,.38); text-transform: uppercase; letter-spacing: .14em; font-size: .68rem; font-weight: 900; transition: color .2s ease, opacity .2s ease; }
html[data-theme="dark"] .district { color: rgba(200,225,209,.28); }
.district-one { top: 29%; left: 35%; }
.district-two { top: 12%; left: 16%; }
.district-three { top: 56%; left: 66%; }
.map-marker { position: absolute; width: 42px; height: 42px; border: 0; border-radius: 50% 50% 50% 12px; transform: translate(-50%,-50%) rotate(-45deg); background: var(--brand); color: white; box-shadow: 0 10px 20px rgba(20,75,45,.28); cursor: pointer; display: grid; place-items: center; transition: width .18s ease, height .18s ease, background .18s ease, box-shadow .18s ease, scale .18s ease; }
.map-marker span { transform: rotate(45deg); font-size: .8rem; font-weight: 900; }
.map-marker:hover, .map-marker.is-selected { background: var(--brand-dark); z-index: 5; scale: 1.08; }
.map-marker.is-selected::after { content: ""; position: absolute; inset: -7px; border: 2px solid color-mix(in srgb, var(--brand) 36%, transparent); border-radius: inherit; }
.map-marker.user-marker { width: 22px; height: 22px; background: var(--accent); border: 3px solid var(--surface); border-radius: 50%; transform: translate(-50%,-50%); box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 16%, transparent), 0 10px 20px rgba(37,92,122,.25); z-index: 4; }
.map-marker.user-marker span { transform: none; }
.map-toolbar { position: absolute; top: 20px; right: 20px; display: grid; gap: 7px; }
.map-toolbar button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); cursor: pointer; font-size: 1.2rem; font-weight: 800; display: grid; place-items: center; }
.map-toolbar button:hover,
.map-toolbar button[aria-pressed="true"] { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-soft); }
.map-toolbar svg { width: 20px; height: 20px; }
.selected-place { position: absolute; left: 20px; right: 20px; bottom: 20px; max-width: 430px; padding: 17px; border: 1px solid var(--line); background: color-mix(in srgb,var(--surface) 94%,transparent); backdrop-filter: blur(14px); border-radius: 18px; box-shadow: var(--shadow-md); }
.selected-place-type { display: inline-flex; margin-bottom: 7px; padding: 4px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-size: .68rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.selected-place strong { display: block; font-size: 1rem; }
.selected-place p { margin: 4px 0 11px; color: var(--text-soft); font-size: .8rem; }
.selected-place a { color: var(--brand-dark); font-size: .78rem; font-weight: 800; text-decoration: none; }
.map-canvas.is-zoomed .map-grid { background-size: 34px 34px; opacity: .52; }
.map-canvas.is-zoomed .map-road { box-shadow: inset 0 0 0 6px #edf2ee; }
html[data-theme="dark"] .map-canvas.is-zoomed .map-road { box-shadow: inset 0 0 0 6px #203127; }
.map-canvas.is-zoomed .map-marker:not(.user-marker) { width: 48px; height: 48px; }
.map-canvas.is-zoomed .district { opacity: .72; }
.map-results-meta button:disabled,
.map-toolbar button:disabled { opacity: .68; cursor: wait; }
.place-list .place-card.is-selected .place-type-icon { background: var(--brand-soft); color: var(--brand-dark); }

.knowledge-layout { display: grid; gap: 34px; }
.knowledge-hero { max-width: 800px; }
.knowledge-hero h1 { font-size: clamp(2.8rem, 5vw, 4.7rem); }
.knowledge-featured { margin-top: 4px; }
.featured-article { min-height: 300px; padding: clamp(26px, 4vw, 46px); border-radius: var(--radius-lg); background: linear-gradient(140deg, #184d32, #0d2d1c); color: white; display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 30px; position: relative; overflow: hidden; box-shadow: var(--shadow-md); }
.featured-article::after { content:""; position:absolute; width:260px; height:260px; border-radius:50%; right:-70px; top:-90px; border: 45px solid rgba(117,223,165,.08); }
.article-tag { position: absolute; top: 22px; right: 22px; padding: 6px 10px; border-radius: 999px; background: rgba(117,223,165,.14); color: #75dfa5; text-transform: uppercase; letter-spacing: .08em; font-size: .66rem; font-weight: 900; }
.featured-icon { width: 110px; height: 110px; display: grid; place-items: center; border-radius: 27px; background: rgba(255,255,255,.08); font-size: 3.3rem; }
.article-meta { color: #75dfa5; font-size: .72rem; font-weight: 850; text-transform: uppercase; letter-spacing: .09em; }
.featured-article h2 { margin: 8px 0 12px; font-size: clamp(1.6rem,3vw,2.6rem); line-height: 1.08; letter-spacing: -.035em; max-width: 760px; }
.featured-article p { color: rgba(255,255,255,.68); max-width: 680px; }
.featured-article .text-link { color: #75dfa5; }
.article-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.article-card { min-height: 285px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; align-items: flex-start; }
.article-icon { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 14px; background: var(--surface-soft); font-size: 1.4rem; margin-bottom: auto; }
.article-card .article-meta { margin-top: 30px; color: var(--brand-dark); }
.article-card h2 { margin: 8px 0 10px; font-size: 1.2rem; line-height: 1.2; }
.article-card p { color: var(--text-soft); font-size: .86rem; line-height: 1.6; }
.article-card .text-link { margin-top: auto; }

.modal-backdrop { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; background: rgba(5,14,8,.68); backdrop-filter: blur(8px); }
.modal { position: relative; width: min(520px,100%); max-height: calc(100vh - 40px); overflow: auto; padding: 36px; border: 1px solid var(--line); border-radius: 28px; background: var(--surface); box-shadow: 0 30px 100px rgba(0,0,0,.35); text-align: center; animation: modalIn .22s ease both; }
@keyframes modalIn { from { opacity:0; transform:translateY(10px) scale(.98); } to { opacity:1; transform:none; } }
.modal-close { position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; border: 1px solid var(--line); background: var(--surface-soft); border-radius: 11px; cursor: pointer; display: grid; place-items: center; }
.modal-close svg { width: 19px; height: 19px; }
.modal-icon { width: 76px; height: 76px; margin: 0 auto 20px; border-radius: 22px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-dark); }
.modal-icon svg { width: 34px; height: 34px; }
.modal h2 { margin: 8px 0 12px; font-size: 2rem; letter-spacing: -.04em; }
.modal > p { color: var(--text-soft); line-height: 1.65; margin-bottom: 24px; }
.modal-divider { display: flex; align-items: center; gap: 10px; margin: 18px 0; color: var(--text-faint); font-size: .75rem; }
.modal-divider::before, .modal-divider::after { content:""; height:1px; flex:1; background:var(--line); }
.address-form { text-align: left; }
.address-form label { display: block; margin-bottom: 7px; color: var(--text-soft); font-size: .78rem; font-weight: 800; }
.address-form > div { display: flex; gap: 8px; }
.address-form input { min-width: 0; flex: 1; border: 1px solid var(--line-strong); border-radius: 13px; background: var(--surface-soft); color: var(--text); padding: 13px; outline: 0; }
.quiet-button { margin-top: 18px; border: 0; background: transparent; color: var(--text-soft); font-weight: 760; cursor: pointer; }
.quiet-button:hover { color: var(--brand-dark); }

.toast { position: fixed; z-index: 300; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: min(440px, calc(100% - 30px)); padding: 12px 18px; border-radius: 12px; background: var(--text); color: var(--surface); box-shadow: var(--shadow-md); font-size: .85rem; font-weight: 700; text-align: center; }

.mobile-scrim { position: fixed; inset: 0; z-index: 70; background: rgba(3,10,6,.55); }

@media (max-width: 1100px) {
  :root { --sidebar-width: 238px; }
  .sidebar { padding-inline: 15px; }
  .home-grid { grid-template-columns: 1fr; }
  .impact-card { min-height: 340px; }
  .impact-visual { right: 30px; top: 20px; }
  .service-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .map-layout { grid-template-columns: minmax(360px, 44%) 1fr; }
  .article-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .article-card:last-child { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  :root { --sidebar-width: 286px; --topbar-height: 68px; }
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; box-shadow: 20px 0 60px rgba(0,0,0,.25); }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-close, .mobile-menu { display: grid; }
  .content-shell { margin-left: 0; }
  .topbar { padding-inline: 16px; }
  #view-home, #view-knowledge { padding-inline: 18px; }
  .map-layout { min-height: calc(100vh - var(--topbar-height)); grid-template-columns: 1fr; }
  .map-view,
  .map-layout,
  .map-list-panel,
  .map-results-content,
  .location-gate,
  .map-canvas {
    width: 100%;
    max-width: 100vw;
    min-width: 0;
  }
  .map-list-panel { min-height: 58vh; border-right: 0; }
  .location-gate { min-height: 58vh; }
  .map-canvas { position: relative; top: auto; min-height: 420px; }
  .place-list { max-height: none; }
  .featured-article { grid-template-columns: 80px 1fr; }
  .featured-icon { width: 80px; height: 80px; font-size: 2.4rem; }
}

@media (max-width: 620px) {
  .topbar-copy .eyebrow { display: none; }
  .location-chip { min-height: 40px; padding-inline: 12px; }
  .location-chip span { max-width: 110px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .hero-copy h1, .wizard-header h1, .knowledge-hero h1 { letter-spacing: -.045em; }
  .search-panel { display: grid; grid-template-columns: 42px 1fr; padding: 7px; }
  .search-icon { width: 42px; height: 48px; }
  .search-button { grid-column: 1 / -1; width: 100%; }
  .category-grid, .service-grid, .article-grid { grid-template-columns: 1fr; }
  .article-card:last-child { grid-column: auto; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .section-heading > p { text-align: left; }
  .impact-card { min-height: 390px; padding: 24px; }
  .impact-visual { width: 180px; height: 180px; right: -10px; }
  .impact-core { inset: 66px; }
  .progress-card { grid-template-columns: 1fr; gap: 11px; }
  .choice-card { align-items: flex-start; padding: 17px; }
  .choice-icon { width: 48px; height: 48px; border-radius: 14px; }
  .result-card { padding-inline: 20px; border-radius: 24px; }
  .result-reasons { grid-template-columns: 1fr; }
  .result-actions { display: grid; }
  .map-list-header { padding-inline: 18px; }
  .map-results-meta { padding-inline: 18px; }
  .place-list { padding-inline: 18px 12px; }
  .location-gate { padding: 34px 18px 40px; }
  .location-gate-inner { width: min(280px, 100%); }
  .manual-location-row { display: grid; grid-template-columns: 1fr; }
  .manual-location-row input,
  .manual-location-row button { width: 100%; min-height: 48px; }
  .place-card { grid-template-columns: 42px minmax(0,1fr); }
  .place-distance { grid-column: 2; text-align: left; display: flex; gap: 7px; align-items: center; }
  .map-toolbar { top: 14px; right: 14px; }
  .map-marker { width: 38px; height: 38px; }
  .map-canvas.is-zoomed .map-marker:not(.user-marker) { width: 43px; height: 43px; }
  .selected-place { left: 12px; right: 12px; bottom: 12px; max-height: 48%; overflow: auto; border-radius: 16px; }
  .featured-article { grid-template-columns: 1fr; }
  .featured-icon { margin-top: 32px; }
  .article-tag { top: 17px; right: 17px; }
  .modal { padding: 30px 20px; }
  .address-form > div { flex-direction: column; }
}

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

:root {
  --base-font-size: 17px;
}

html {
  font-size: calc(var(--base-font-size) * var(--font-scale));
}

html[data-font-size="small"] { --font-scale: .92; }
html[data-font-size="medium"] { --font-scale: 1; }
html[data-font-size="large"] { --font-scale: 1.14; }

body {
  font-size: 1rem;
  line-height: 1.6;
}

button, input, a { line-height: 1.35; }
.brand small { font-size: .72rem; }
.nav-item { font-size: .96rem; line-height: 1.35; }
.sidebar-note strong { font-size: .88rem; }
.sidebar-note span:last-child { font-size: .8rem; line-height: 1.45; }
.tool-button { font-size: .82rem; }
.topbar-copy .eyebrow { font-size: .7rem; }
.topbar-copy strong { font-size: 1.02rem; }
.location-chip { font-size: .94rem; }
.section-kicker { font-size: .78rem; }
.hero-copy h1 { font-size: clamp(2.6rem, calc(5vw * var(--font-scale)), 4.55rem); line-height: 1.02; }
.wizard-header h1 { font-size: clamp(2.4rem, calc(5vw * var(--font-scale)), 4.15rem); line-height: 1.02; }
.knowledge-hero h1 { font-size: clamp(2.7rem, calc(5vw * var(--font-scale)), 4.55rem); line-height: 1.02; }
.hero-lead, .wizard-header p, .knowledge-hero p { font-size: clamp(1.05rem, calc(1.4vw * var(--font-scale)), 1.18rem); line-height: 1.65; }
.search-panel input { font-size: 1.08rem; }
.primary-button, .secondary-button { font-size: .98rem; }
.primary-button.large, .secondary-button.large { font-size: 1.05rem; }
.search-hint, .popular-searches { font-size: .88rem; line-height: 1.5; }
.impact-label { font-size: .76rem; }
.impact-copy strong { font-size: clamp(1.65rem, calc(3vw * var(--font-scale)), 2.45rem); line-height: 1.12; }
.impact-copy p { font-size: 1rem; line-height: 1.65; }
.impact-stats span { font-size: .78rem; line-height: 1.4; }
.section-heading h2 { font-size: clamp(1.65rem, calc(3vw * var(--font-scale)), 2.35rem); line-height: 1.15; }
.section-heading > p { font-size: .96rem; line-height: 1.55; }
.category-text strong { font-size: 1.04rem; }
.category-text small { font-size: .86rem; line-height: 1.45; }
.service-card strong { font-size: 1rem; }
.service-card small { font-size: .86rem; line-height: 1.4; }
.progress-copy span { font-size: .78rem; }
.progress-copy strong { font-size: 1.02rem; }
.choice-copy strong { font-size: 1.05rem; }
.choice-copy small { font-size: .9rem; line-height: 1.5; }
.result-status, .result-item { font-size: .76rem; }
.result-card h1 { font-size: clamp(2.25rem, calc(5vw * var(--font-scale)), 4rem); }
.result-card > p { font-size: 1.1rem; line-height: 1.65; }
.result-reasons p { font-size: .86rem; line-height: 1.55; }
.result-reasons strong { font-size: .94rem; }
.map-list-header h1 { font-size: clamp(1.8rem, calc(3vw * var(--font-scale)), 2.65rem); }
.filter-chip { font-size: .82rem; }
.map-results-meta strong { font-size: .9rem; }
.map-results-meta button { font-size: .82rem; }
.place-copy strong { font-size: .96rem; }
.place-copy span { font-size: .82rem; line-height: 1.45; }
.place-tags em { font-size: .72rem; }
.place-distance strong { font-size: .86rem; }
.place-distance span { font-size: .75rem; }
.district { font-size: .74rem; }
.map-marker span { font-size: .86rem; }
.selected-place strong { font-size: 1.04rem; }
.selected-place p { font-size: .88rem; line-height: 1.5; }
.selected-place a { font-size: .86rem; }
.featured-article h2 { font-size: clamp(1.6rem, calc(3vw * var(--font-scale)), 2.6rem); }
.article-tag { font-size: .72rem; }
.article-meta { font-size: .78rem; }
.featured-article p { font-size: 1rem; line-height: 1.6; }
.article-card h2 { font-size: 1.25rem; line-height: 1.25; }
.article-card p { font-size: .92rem; line-height: 1.65; }
.modal h2 { line-height: 1.15; }
.modal > p { font-size: 1rem; }
.modal-divider { font-size: .82rem; }
.address-form label { font-size: .86rem; }
.address-form input { font-size: 1rem; }
.toast { font-size: .92rem; line-height: 1.45; }

@media (max-width: 620px) {
  :root { --base-font-size: 16.5px; }
  .hero-copy h1, .wizard-header h1, .knowledge-hero h1 { font-size: clamp(2.35rem, 12vw, 3.35rem); line-height: 1.04; }
  .category-card, .choice-card { gap: 14px; }
}

/* Django integration layer: keeps dynamic pages aligned with makieta_final. */
.site-footer { display: none; }

.messages,
.page-shell > .content-page,
.page-shell > .detail-page,
.page-shell > .advisor-shell {
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: clamp(34px, 5vw, 68px) clamp(22px, 4vw, 58px) 90px;
}

.page-shell > .detail-page { width: min(1160px, 100%); }
.page-shell > .advisor-shell { width: min(900px, 100%); }

.eyebrow {
  display: inline-block;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .72rem;
  font-weight: 850;
}

.button,
.button-primary,
.button-secondary {
  border-radius: 14px;
  min-height: 48px;
  padding: 14px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  font-weight: 820;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.button:hover,
.button-primary:hover,
.button-secondary:hover { transform: translateY(-1px); }
.button-primary,
.button.button-primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 10px 22px color-mix(in srgb, var(--brand) 22%, transparent); }
.button-primary:hover,
.button.button-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.button-secondary,
.button.button-secondary { background: var(--surface); border-color: var(--line-strong); color: var(--text); }
.button-secondary:hover,
.button.button-secondary:hover { border-color: var(--brand); color: var(--brand-dark); }
.button-large { min-height: 58px; padding: 16px 24px; font-size: 1.05rem; }

select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--text);
  padding: 13px 14px;
  font: inherit;
}
textarea { min-height: 160px; resize: vertical; }
.field { margin-bottom: 20px; }
.field label,
.contact-form label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-soft);
  font-size: .82rem;
  font-weight: 850;
}
.help-text,
.privacy-hint { color: var(--text-faint); font-size: .86rem; }
.field-error { color: var(--danger); font-size: .84rem; font-weight: 800; }

.page-header { max-width: 860px; margin: 0 0 36px; }
.page-header h1 { margin: 12px 0 16px; font-size: clamp(2.55rem, 5vw, 4.2rem); line-height: 1.02; letter-spacing: -.05em; }
.page-header > p { color: var(--text-soft); font-size: 1.08rem; line-height: 1.7; }
.content-page.narrow { width: min(760px, 100%); }
.prose { display: grid; gap: 18px; color: var(--text-soft); font-size: 1.02rem; line-height: 1.75; }
.prose h2 { margin: 28px 0 0; color: var(--text); font-size: 1.55rem; line-height: 1.16; }
.contact-form,
.success-panel,
.faq-list details {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.contact-form,
.success-panel { padding: 28px; }
.faq-list { display: grid; gap: 12px; }
.faq-list details { padding: 20px 22px; }
.faq-list details[open] { border-color: var(--brand); }
.faq-list summary { cursor: pointer; font-weight: 850; }
.faq-list p { margin: 12px 0 0; color: var(--text-soft); }

.advisor-heading h1 {
  margin: 14px 0 18px;
  font-size: clamp(2.4rem, 5vw, 4.15rem);
  line-height: 1.02;
  letter-spacing: -.05em;
}
.advisor-heading p,
.manual-choice-heading p,
.recognition-panel p,
.unknown-panel p { color: var(--text-soft); line-height: 1.65; }
.progress-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--text-faint);
  font-size: .82rem;
  font-weight: 800;
}
.advisor-query-form,
.recognition-panel,
.unknown-panel,
.item-groups details,
.provider-escape {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.advisor-query-form,
.recognition-panel,
.unknown-panel { padding: 24px; }
.query-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--surface-soft);
}
.query-control svg { width: 24px; height: 24px; margin-left: 8px; color: var(--brand); }
.query-control input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  padding: 13px 4px;
  font-weight: 700;
}
.live-suggestions {
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.live-suggestions button,
.live-suggestions a,
.recognition-option {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.live-suggestions button:last-child,
.live-suggestions a:last-child { border-bottom: 0; }
.live-suggestions small,
.recognition-option small { display: block; color: var(--text-soft); margin-top: 3px; }
.recognition-options { display: grid; gap: 10px; }
.recognition-options form { margin: 0; }
.recognition-option {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}
.recognition-option:hover,
.item-choice-grid button:hover { border-color: var(--brand); color: var(--brand-dark); }
.unknown-panel {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 18px;
  align-items: start;
}
.unknown-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 2rem;
  font-weight: 900;
}
.unknown-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.manual-choice { margin-top: 42px; }
.manual-choice-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.manual-choice-heading h2 { margin: 8px 0 0; }
.item-groups { display: grid; gap: 12px; }
.item-groups details { padding: 0; overflow: hidden; }
.item-groups summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  cursor: pointer;
  font-weight: 850;
}
.item-groups summary small { color: var(--text-soft); }
.item-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 18px 18px;
}
.item-choice-grid form { margin: 0; }
.item-choice-grid button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
  color: var(--text);
  padding: 11px 12px;
  text-align: left;
  cursor: pointer;
}
.provider-escape {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 20px;
  background: linear-gradient(135deg, #184d32, #0d2d1c);
  color: #fff;
}
.provider-escape p { margin: 4px 0 0; color: rgba(255,255,255,.68); }
.provider-escape .text-link { color: #75dfa5; }

.choice-fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 13px; }
.choice-card { position: relative; text-decoration: none; }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.choice-icon.unknown { background: var(--surface-soft); color: var(--text-soft); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span,
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: .72rem;
  font-weight: 850;
}
.tags span { padding: 6px 10px; }
.badge { padding: 6px 9px; }
.badge-demo { background: color-mix(in srgb, var(--warning) 18%, var(--surface)); color: var(--warning); }

.place-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.place-grid .place-card {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  padding: 18px;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}
.place-grid .place-card:hover { border-color: var(--brand); box-shadow: var(--shadow-md); }
.place-card-media {
  display: block;
  height: 88px;
  margin: -4px -4px 16px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-soft);
}
.place-card-media img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.place-card-top,
.place-meta { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.place-type { color: var(--brand-dark); font-size: .7rem; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; }
.place-grid .place-card h3 { margin: 16px 0 9px; font-size: 1.2rem; }
.place-grid .place-card h3 a { color: inherit; text-decoration: none; }
.place-grid .place-card h3 a:hover { color: var(--brand-dark); }
.place-grid .place-card p { color: var(--text-soft); font-size: .9rem; }
.place-meta { margin-top: auto; padding-top: 14px; color: var(--text-soft); font-size: .8rem; }
.place-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.place-meta svg { width: 15px; height: 15px; }
.place-meta a { color: var(--brand-dark); font-weight: 850; text-decoration: none; }

.detail-header,
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .42fr);
  gap: 24px;
}
.detail-header { align-items: start; margin: 24px 0; }
.detail-header h1 { margin: 12px 0 14px; font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.03; }
.detail-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.detail-address,
.detail-sidebar section,
.detail-main section,
.location-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.detail-address { display: grid; gap: 10px; }
.detail-address .button { width: 100%; margin-top: 8px; }
.detail-main { display: grid; gap: 16px; }
.detail-main section h2,
.detail-sidebar h2 { margin: 0 0 12px; font-size: 1.25rem; }
.detail-main section p,
.detail-sidebar p { color: var(--text-soft); }
.detail-sidebar { display: grid; gap: 16px; align-content: start; }
.detail-sidebar dl { display: grid; gap: 13px; margin: 0; }
.detail-sidebar dt { color: var(--text-faint); font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; }
.detail-sidebar dd { margin: 2px 0 0; }
.detail-sidebar a { color: var(--brand-dark); font-weight: 800; }
.hours { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hours li { display: flex; justify-content: space-between; gap: 14px; color: var(--text-soft); }
.location-list { display: grid; gap: 12px; }
.location-card { display: grid; gap: 5px; }
.location-card a { color: var(--brand-dark); font-weight: 800; }
.place-detail-logo {
  max-width: 160px;
  max-height: 92px;
  object-fit: contain;
  margin-bottom: 16px;
}

.map-search label { margin: 0; }
.filter-chip { text-decoration: none; }
.place-list .place-card { text-decoration: none; }
.map-view + .site-footer { display: none; }
.result-places .section-heading { align-items: flex-end; }

@media (max-width: 820px) {
  .page-shell > .content-page,
  .page-shell > .detail-page,
  .page-shell > .advisor-shell {
    padding: 32px 18px 70px;
  }
  .detail-header,
  .detail-grid,
  .unknown-panel { grid-template-columns: 1fr; }
  .item-choice-grid,
  .place-grid { grid-template-columns: 1fr; }
  .manual-choice-heading,
  .provider-escape { align-items: flex-start; flex-direction: column; }
  .query-control { grid-template-columns: auto minmax(0, 1fr); }
  .query-control .button { grid-column: 1 / -1; width: 100%; }
  .map-search {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }
  .map-search input {
    min-width: 0;
  }
  .map-search button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 620px) {
  #view-home,
  #view-knowledge,
  .narrow-layout {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
  .content-shell,
  .page-shell,
  .home-grid,
  .hero-copy,
  .search-panel,
  .impact-card {
    min-width: 0;
    max-width: 100%;
  }
  .search-panel {
    width: 100%;
  }
  #view-home .home-grid,
  #view-home .hero-copy,
  #view-home .search-panel,
  #view-home .impact-card,
  #view-home .section-block {
    width: calc(100vw - 56px);
    max-width: calc(100vw - 56px);
  }
  .search-panel input,
  .hero-lead {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: break-word;
  }
  .hero-lead {
    max-width: 31ch;
  }
  .hero-copy h1,
  .wizard-header h1,
  .knowledge-hero h1 {
    font-size: 2.45rem;
    line-height: 1.06;
    text-wrap: normal;
    overflow-wrap: break-word;
  }
  .impact-card { width: 100%; max-width: 100%; }
  .impact-copy strong {
    max-width: 11ch;
    font-size: 1.85rem;
  }
}
