:root {
  --bg: #f0f4fb;
  --surface: #ffffff;
  --surface2: #e8eef8;
  --panel: var(--surface);
  --border: #c5d0e3;
  --text: #0c1526;
  --muted: #4a5a73;
  --brand: #1d4ed8;
  --brand-soft: #dbe7ff;
  --accent: #0e7490;
  --danger: #b91c1c;
  --radius: 12px;
  --font: "Figtree", system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
  --max: 1120px;
}

body.dark {
  --bg: #070b14;
  --surface: #101826;
  --surface2: #162033;
  --border: #2a3a52;
  --text: #eef3fb;
  --muted: #9aabc4;
  --brand: #7eb0ff;
  --brand-soft: #152a4d;
  --accent: #5ec8e0;
  --danger: #f87171;
}

body.light {
  --bg: #f0f4fb;
  --surface: #ffffff;
  --surface2: #e8eef8;
  --border: #c5d0e3;
  --text: #0c1526;
  --muted: #4a5a73;
  --brand: #1d4ed8;
  --brand-soft: #dbe7ff;
  --accent: #0e7490;
  --danger: #b91c1c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.55;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.skip {
  position: fixed;
  top: -60px;
  left: 12px;
  background: #fff;
  color: #111;
  padding: 10px;
  z-index: 20;
}
.skip:focus { top: 12px; }

.site-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  padding: 32px max(20px, calc((100% - var(--max)) / 2));
  background:
    radial-gradient(ellipse 80% 80% at 10% 0%, #1e3a8a 0%, transparent 55%),
    linear-gradient(180deg, #0b1730 0%, #0a1224 100%);
  color: #f8fafc;
  border-bottom: 1px solid #243553;
}

body:not(.dark) .site-header {
  background:
    radial-gradient(ellipse 70% 90% at 0% 0%, #1e40af 0%, transparent 50%),
    linear-gradient(180deg, #1e3a8a 0%, #1d4ed8 100%);
  border-bottom: none;
}

.brand-block { max-width: 720px; }
.eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  opacity: 0.85;
}
.site-header h1 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.lede {
  margin: 0;
  font-size: 1.05rem;
  max-width: 620px;
  color: #d7e3f7;
}

#theme {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 10px;
  padding: 9px 14px;
  font-weight: 600;
}

.notice {
  margin: 16px auto 0;
  max-width: var(--max);
  padding: 12px 16px;
  border-left: 4px solid #d97706;
  background: var(--surface);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.92rem;
}

main {
  max-width: var(--max);
  margin: auto;
  padding: 20px 20px 48px;
}

button, input, select { font: inherit; }
button { cursor: pointer; }

.primary-nav {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding-bottom: 14px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.primary-nav button,
.tools-nav button {
  white-space: nowrap;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--brand);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
}
.primary-nav button.active,
.tools-nav button.active {
  background: var(--brand);
  color: #061018;
}
body:not(.dark) .primary-nav button.active,
body:not(.dark) .tools-nav button.active {
  color: #fff;
}

.view { display: none; }
.view.active { display: block; }

.panel,
.path-card,
.article-card,
.video-card,
.research-card,
.item {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
}

.hero-search {
  padding: 20px;
  margin-bottom: 22px;
}
.hero-search label,
.section-intro h2,
h3 {
  color: var(--brand);
  font-weight: 800;
  margin: 0 0 8px;
}
.section-intro p { margin: 0 0 16px; color: var(--muted); max-width: 640px; }

input, select {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 8px 0;
}
.hint, .meta { color: var(--muted); font-size: 0.8rem; }

.autocomplete-shell {
  position: relative;
}

.smart-suggestions {
  position: absolute;
  z-index: 30;
  top: calc(100% - 4px);
  left: 0;
  right: 0;
  max-height: min(430px, 56vh);
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

body.dark .smart-suggestions { background: #101826; }
body:not(.dark) .smart-suggestions { background: #ffffff; }

.smart-suggestion {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  width: 100%;
  padding: 11px 13px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.smart-suggestion:last-child { border-bottom: 0; }
.smart-suggestion:hover,
.smart-suggestion.active,
.smart-suggestion:focus-visible {
  background: color-mix(in srgb, var(--brand) 11%, var(--surface));
  outline: none;
}
.smart-suggestion strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.smart-suggestion small { grid-column: 1 / -1; color: var(--muted); }
.smart-suggestion-kind {
  align-self: start;
  border-radius: 999px;
  padding: 2px 7px;
  background: var(--surface2);
  color: var(--brand);
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.resource-source-status {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.ai-resource-answer {
  margin-top: 14px;
  border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--border));
  border-radius: 14px;
  padding: 16px;
  background: color-mix(in srgb, var(--brand) 7%, var(--panel));
}
.ai-resource-answer h3 { margin-bottom: 8px; }
.ai-resource-answer-text { white-space: pre-wrap; }
.ai-resource-sources { margin: 10px 0 0; padding-left: 20px; }

.context-guide-hint {
  position: relative;
  margin: 14px 0;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--border));
  border-radius: 14px;
  background: color-mix(in srgb, var(--brand) 7%, var(--panel));
  color: var(--text);
}

.context-guide-hint strong,
.context-guide-hint p,
.context-guide-hint small {
  display: block;
}

.context-guide-hint p {
  margin: 6px 0 10px;
}

.context-guide-hint small {
  color: var(--muted);
  margin-top: 8px;
}

.context-guide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.context-recommendations {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin: 10px 0 12px;
}

.context-recommendation {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

button.context-recommendation:hover,
button.context-recommendation:focus-visible {
  border-color: var(--brand);
  background: var(--surface2);
  outline: none;
}

.context-recommendation strong { color: var(--text); }
.context-recommendation small { margin: 0; }

.section-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 520px;
}

.starter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.starter-chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 650;
  font-size: 0.9rem;
  text-align: left;
}

.starter-chip:hover,
.starter-chip:focus-visible {
  border-color: var(--brand);
  background: var(--surface2);
  outline: none;
  color: var(--brand);
}

.search-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 4px;
}

.search-chip {
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--muted);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
}

.search-chip.active {
  background: var(--brand);
  color: #061018;
  border-color: transparent;
}

body:not(.dark) .search-chip.active {
  color: #fff;
}

.search-group {
  margin-top: 16px;
}

.resource-search-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  padding: 16px;
  text-align: left;
}

.resource-search-card > strong { color: var(--text); }
.resource-search-card .source-actions { margin-top: auto; padding-top: 8px; }

.search-group h3 {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--text);
  margin: 0 0 8px;
}

.home-topics {
  margin-bottom: 28px;
}

.topic-journey {
  display: grid;
  gap: 18px;
  margin-top: 16px;
}

.topic-block h3 {
  font-family: var(--serif);
  color: var(--text);
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.tool-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.path-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}
.path-card {
  text-align: left;
  color: var(--text);
  padding: 18px 16px;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.path-card:hover,
.path-card:focus-visible {
  border-color: var(--brand);
  background: var(--surface2);
  outline: none;
}
.path-kicker {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.path-card strong {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--brand);
}
.path-card span:last-child {
  color: var(--muted);
  font-size: 0.9rem;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 12px;
}
.section-head h2,
.section-head h3 {
  margin: 0;
  font-family: var(--serif);
  color: var(--text);
  font-size: 1.35rem;
}
.text-btn {
  border: none;
  background: transparent;
  color: var(--brand);
  font-weight: 700;
  padding: 4px 0;
}
.text-btn:hover { text-decoration: underline; }

.carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 10px;
  margin-bottom: 28px;
  scrollbar-width: thin;
  scroll-behavior: smooth;
}
#home-carousel {
  mask-image: linear-gradient(90deg, #000 0%, #000 92%, transparent 100%);
}
@media (prefers-reduced-motion: reduce) {
  .carousel { scroll-behavior: auto; }
  #home-carousel { mask-image: none; }
}
.carousel-controls { display: flex; gap: 8px; }
.carousel-controls button {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 12px;
  font-weight: 600;
}

.video-card {
  flex: 0 0 min(280px, 78vw);
  scroll-snap-align: start;
  padding: 0;
  overflow: hidden;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}
.video-card .thumb {
  aspect-ratio: 16 / 9;
  background: var(--surface2);
  background-size: cover;
  background-position: center;
  display: block;
  position: relative;
}
.video-card .thumb::after {
  content: "Play";
  position: absolute;
  left: 12px;
  bottom: 10px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
}
.video-card .body { padding: 12px 14px 14px; }
.video-card strong {
  display: block;
  font-size: 0.98rem;
  margin-bottom: 4px;
  color: var(--brand);
}
.video-card .meta { margin: 0; }

.article-grid,
.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.article-card,
.research-card {
  padding: 16px;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}
.article-card:hover,
.research-card:hover {
  border-color: var(--brand);
  background: var(--surface2);
}
.article-card .kicker,
.research-card .kicker {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}
.article-card strong,
.research-card strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--brand);
  margin: 6px 0;
}
.article-card p,
.research-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}

.results { display: grid; gap: 10px; margin-top: 14px; }
.results.grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.item { padding: 16px; }
.item h3 {
  margin: 0 0 6px;
  color: var(--brand);
  font-size: 1.05rem;
  font-family: var(--serif);
}
.item p { margin: 6px 0; }
.item a { color: var(--brand); font-weight: 700; }

.tag {
  display: inline-block;
  padding: 3px 8px;
  margin: 4px 4px 0 0;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.7rem;
  font-weight: 700;
}

.detail { margin-top: 20px; padding: 22px; }
.detail[hidden] { display: none !important; }
.detail h2 {
  font-family: var(--serif);
  margin: 0 0 8px;
  color: var(--text);
  font-size: 1.7rem;
}
.detail .body-block p { margin: 0 0 12px; max-width: 68ch; }
.detail .related { margin-top: 18px; }
.back-btn {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--brand);
  border-radius: 8px;
  padding: 6px 12px;
  font-weight: 700;
  margin-bottom: 14px;
}

.video-player-wrap { padding: 16px; margin-bottom: 20px; }
.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-meta { margin-top: 14px; }
.video-meta h3 {
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--text);
  margin: 0 0 6px;
}

.video-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.video-list .video-card { flex: none; width: 100%; }

.viewer-shell {
  margin-top: 14px;
}

.viewer-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.viewer-tab {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--brand);
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 0.85rem;
}

.viewer-tab.active {
  background: var(--brand);
  color: #061018;
  border-color: transparent;
}

body:not(.dark) .viewer-tab.active {
  color: #fff;
}

.doc-viewer {
  margin-top: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface2);
  min-height: 480px;
}
.doc-viewer iframe,
.doc-viewer embed,
.doc-viewer object {
  width: 100%;
  height: 70vh;
  min-height: 480px;
  border: 0;
  background: #fff;
}

.slide-viewer {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface2);
}

.slide-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.slide-status {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.slide-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  padding: 16px;
  background: #0a0a0a;
}

.slide-stage img {
  max-width: 100%;
  max-height: 70vh;
  height: auto;
  display: block;
  border-radius: 4px;
}
.doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
}
.doc-actions a,
.doc-actions button {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  background: var(--brand);
  color: #061018;
  text-decoration: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: 700;
}
body:not(.dark) .doc-actions a,
body:not(.dark) .doc-actions button { color: #fff; }
.doc-actions .secondary {
  background: transparent;
  color: var(--brand);
}

.tools-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.tool-panel { display: none; }
.tool-panel.active { display: block; }
.tool-panel h3 {
  font-family: var(--serif);
  color: var(--text);
  margin: 0 0 8px;
}

details {
  margin: 12px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--surface);
}
details img {
  display: block;
  width: 100%;
  max-width: 900px;
  margin: 12px auto 0;
}
.prose { max-width: 720px; padding: 16px; }
.prose code {
  font-size: 0.9em;
  background: var(--surface2);
  padding: 2px 6px;
  border-radius: 4px;
}

.empty {
  padding: 28px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.placeholder-note {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--muted);
  font-size: 0.85rem;
}

.cite-block {
  display: block;
  margin: 10px 0 0;
  padding: 12px;
  background: var(--surface2);
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  white-space: pre-wrap;
}

.citation-toolbar {
  padding: 14px 16px;
  margin-bottom: 14px;
}

.sources-panel {
  margin: 16px 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface2);
}

.sources-head h3,
.related-heading {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--text);
}

.source-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.source-row {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.source-num {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 800;
}

.source-top {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 4px;
}

.source-title {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.92rem;
}

.source-supports {
  margin: 0 0 8px;
  font-size: 0.9rem;
}

.source-supports span {
  color: var(--accent);
  font-weight: 700;
}

.source-cite {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--bg);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  color: var(--text);
}

.source-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.source-btn {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--brand);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

a.source-btn.primary,
button.source-btn.primary {
  background: var(--brand);
  color: #061018;
  border-color: transparent;
}

body:not(.dark) a.source-btn.primary,
body:not(.dark) button.source-btn.primary {
  color: #fff;
}

.source-mark {
  display: inline-flex;
  align-items: center;
  margin: 0 0 0 4px;
  padding: 1px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  vertical-align: super;
  line-height: 1.2;
}

.citation-card .source-actions {
  margin-top: 10px;
}

.cite-style-block {
  margin-bottom: 12px;
}

.cite-style-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.copy-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  font-size: 0.88rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 40;
}

.copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

footer {
  text-align: center;
  color: var(--muted);
  padding: 28px 16px 40px;
  font-size: 0.88rem;
}

@media (max-width: 640px) {
  .site-header {
    flex-direction: column;
    padding-top: 24px;
  }
  main { padding: 14px 14px 40px; }
  .path-grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
}

/* Embedded inside Navigator #mode-resources — tighten chrome, use full width */
html.resources-kb-embed,
body.resources-kb-embed {
  min-height: 100%;
  --max: min(1600px, 100%);
}
body.resources-kb-embed {
  background: var(--bg);
}
body.resources-kb-embed .site-header {
  padding: 16px clamp(16px, 2.5vw, 32px) 8px;
}
body.resources-kb-embed .site-header .brand-block {
  max-width: none;
}
body.resources-kb-embed .site-header .lede {
  display: none;
}
body.resources-kb-embed .site-header h1 {
  font-size: 1.45rem;
}
body.resources-kb-embed .notice {
  margin: 0 clamp(16px, 2.5vw, 32px) 8px;
  max-width: none;
  font-size: 0.8rem;
}
body.resources-kb-embed #theme {
  display: none; /* host owns theme */
}
body.resources-kb-embed main {
  max-width: none;
  width: 100%;
  padding: 8px clamp(16px, 2.5vw, 32px) 24px;
}
body.resources-kb-embed .path-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
body.resources-kb-embed .results.grid,
body.resources-kb-embed .home-topics .path-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
body.resources-kb-embed footer {
  padding: 20px clamp(16px, 2.5vw, 32px) 16px;
  max-width: none;
}

/* Home section path cards — sit where the old pill nav was */
.home-section-nav {
  margin: 0 0 18px;
}
#primary-nav[hidden] {
  display: none !important;
}

/* Start Here path-card dropdown */
.path-card-menu {
  min-width: 0;
}
.path-card-trigger {
  height: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  position: relative;
  box-shadow: none;
}
.path-card-trigger .path-kicker {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
}
.path-card-trigger strong {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
}
.path-card-trigger > span:not(.path-kicker):not(.menu-dropdown-chevron) {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.4;
}
.path-card-trigger .menu-dropdown-chevron {
  position: absolute;
  right: 16px;
  top: 18px;
  margin: 0;
}
.path-card-menu.open .path-card-trigger {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--border));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}
.path-card-panel {
  min-width: min(360px, 86vw);
  width: max(100%, 300px);
}
.menu-option-kicker {
  display: block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 2px;
}
.menu-option-footer {
  margin-top: 4px;
  border-top: 1px solid var(--border);
  border-radius: 0 0 10px 10px;
  color: var(--brand);
  font-weight: 700;
}

/* Elegant home dropdown menus */
.home-menus {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 28px;
}
.menu-dropdown {
  position: relative;
}
.menu-dropdown-trigger {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "kicker chevron"
    "title chevron"
    "hint chevron";
  gap: 2px 12px;
  text-align: left;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--brand-soft) 55%, var(--surface)), var(--surface));
  color: var(--text);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.menu-dropdown-trigger:hover,
.menu-dropdown.open .menu-dropdown-trigger {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--border));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}
.menu-dropdown-kicker {
  grid-area: kicker;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
}
.menu-dropdown-title {
  grid-area: title;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
}
.menu-dropdown-hint {
  grid-area: hint;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.35;
}
.menu-dropdown-chevron {
  grid-area: chevron;
  align-self: center;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  margin-top: -4px;
  transition: transform 0.18s ease;
}
.menu-dropdown.open .menu-dropdown-chevron {
  transform: rotate(225deg);
  margin-top: 4px;
}
.menu-dropdown-panel {
  position: absolute;
  z-index: 40;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: min(360px, 50vh);
  overflow: auto;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}
.menu-dropdown-panel[hidden] {
  display: none !important;
}
.menu-option {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--text);
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  transition: background 0.12s ease;
}
.menu-option:hover,
.menu-option:focus-visible {
  background: var(--brand-soft);
  outline: none;
}
.menu-option-rich {
  display: grid;
  gap: 3px;
}
.menu-option-rich strong {
  font-size: 0.98rem;
}
.menu-option-rich span {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.4;
}
.menu-empty {
  margin: 0;
  padding: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}
@media (max-width: 720px) {
  .home-menus {
    grid-template-columns: 1fr;
  }
}

.shared-question-panel{padding:1rem;margin:1rem 0;border:1px solid var(--border,#475569);border-radius:12px;overflow-wrap:anywhere}.question-context-label{font-weight:600}.question-context-answer{white-space:pre-line}.question-context-followups,.question-context-choices{display:flex;flex-wrap:wrap;gap:.5rem;margin:.8rem 0}.shared-question-panel button{min-height:44px;white-space:normal;max-width:100%;padding:.6rem .8rem}.shared-question-panel p{margin:.7rem 0}.shared-question-panel summary{cursor:pointer;min-height:44px;padding:.6rem 0}

.county-support-picker{display:grid;grid-template-columns:repeat(auto-fit,minmax(125px,1fr));gap:.5rem}.county-support-picker button{min-height:44px}.county-support-results{display:grid;gap:1rem;margin:1rem 0}.county-support-card{padding:1.1rem;border:1px solid var(--border,#94a3b8);border-radius:12px;overflow-wrap:anywhere}.county-support-card h4{font-size:1.15rem;margin:.4rem 0}.county-support-card h5{font-size:1rem;margin:1rem 0 .4rem}.county-support-card summary,.legacy-directory>summary{cursor:pointer;padding:.8rem 0;min-height:44px;font-weight:700}.county-support-card li{margin:.5rem 0}.county-support-card .source-btn{white-space:normal;min-height:44px;max-width:100%}.county-support-card details[open]{margin-top:.7rem}.legacy-directory{margin-top:1.5rem}.county-support-card:target{outline:2px solid var(--brand,#2563eb)}@media(min-width:1100px){.county-support-results{grid-template-columns:repeat(2,minmax(0,1fr))}.county-support-picker{grid-column:1/-1}}

.legal-guide-filters label{display:flex;flex-direction:column;gap:.4rem;min-width:0;flex:1}.legal-guide-filters select{width:100%;max-width:100%;min-width:0}#legal-question-panel{margin:1.3rem 0}#legal-question-form{display:flex;flex-wrap:wrap;gap:.6rem;align-items:center}#legal-question-form input{flex:1;min-width:170px}.legal-guide-card h5{color:var(--text,#17316f)}.legal-guide-card dt{font-weight:700;margin-top:.7rem}.legal-guide-card dd{margin-left:0}.legal-guide-card ol{padding-left:1.4rem}@media(max-width:640px){.legal-guide-filters{flex-direction:column!important}.legal-guide-filters label{width:100%}}
