:root {
  color-scheme: light;
  --paper: #fbfaf6;
  --paper-strong: #f2eee5;
  --ink: #202823;
  --muted: #5f6962;
  --line: #d8d1c2;
  --leaf: #315f43;
  --leaf-dark: #214832;
  --water: #356b86;
  --clay: #a95035;
  --gold: #bd8b2f;
  --focus: #0f6bdc;
  --shadow: 0 18px 44px rgba(30, 39, 34, 0.1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
}

a {
  color: var(--leaf-dark);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

button,
input,
summary {
  font: inherit;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 20;
  transform: translateY(-150%);
  background: var(--ink);
  color: white;
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
}

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

.masthead {
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(49, 95, 67, 0.12), rgba(53, 107, 134, 0.1), rgba(169, 80, 53, 0.08)),
    var(--paper);
}

.masthead__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4.6rem) 1.25rem 2rem;
}

.eyebrow {
  margin: 0 0 0.45rem;
  color: var(--clay);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 0.75rem;
  font-size: clamp(2.2rem, 5.6vw, 4.8rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0.25rem;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.45rem;
  font-size: 1.05rem;
  letter-spacing: 0;
}

.lede {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.12rem;
}

.summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.25rem;
}

.summary-strip span,
.pill,
.source-chip,
.type-pill {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  padding: 0.28rem 0.7rem;
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
}

.summary-strip span {
  gap: 0.25rem;
}

.layout {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: clamp(1rem, 4vw, 3.25rem);
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.4rem 1.25rem 3rem;
}

.side-nav {
  position: sticky;
  top: 0.75rem;
  display: flex;
  flex-direction: column;
  align-self: start;
  border-left: 3px solid var(--line);
  padding: 0.35rem 0 0.35rem 0.8rem;
}

.side-nav a {
  border-radius: 6px;
  color: var(--muted);
  padding: 0.45rem 0.55rem;
  text-decoration: none;
}

.side-nav a:hover,
.side-nav a:focus-visible {
  background: var(--paper-strong);
  color: var(--ink);
}

main {
  min-width: 0;
}

.band {
  padding: clamp(1.6rem, 4vw, 3rem) 0;
  border-bottom: 1px solid var(--line);
}

.band--muted {
  margin-inline: calc(clamp(0rem, 1vw, 0.5rem) * -1);
  padding-inline: clamp(0rem, 1vw, 0.5rem);
}

.section-heading {
  max-width: 840px;
  margin-bottom: 1.2rem;
}

.section-heading--with-actions {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  max-width: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.control-button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--leaf-dark);
  cursor: pointer;
  font-weight: 800;
  padding: 0.58rem 0.75rem;
}

.control-button:hover {
  border-color: var(--leaf);
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 1.25rem;
}

.overview-grid > div,
.recommendation,
.source-card,
.north-star-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

.overview-grid > div {
  padding: 1rem;
}

.filter-list,
.safeguards {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding-left: 1.2rem;
}

.recommendation-list,
.source-list {
  display: grid;
  gap: 0.9rem;
}

.recommendation {
  overflow: clip;
}

.recommendation summary,
.source-card summary,
.north-star-panel summary {
  cursor: pointer;
  list-style: none;
}

.recommendation summary::-webkit-details-marker,
.source-card summary::-webkit-details-marker,
.north-star-panel summary::-webkit-details-marker {
  display: none;
}

.rec-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.85rem;
  padding: 1rem;
}

.rank-badge {
  display: inline-grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border-radius: 8px;
  background: var(--leaf);
  color: white;
  font-weight: 900;
}

.rec-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.rec-title-row h3 {
  margin: 0;
  font-size: 1.2rem;
}

.question {
  margin-bottom: 0;
  color: var(--ink);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  font-weight: 760;
  line-height: 1.32;
}

.rec-body {
  display: grid;
  gap: 1rem;
  padding: 0 1rem 1rem 4.2rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.detail-block {
  border-top: 3px solid var(--paper-strong);
  padding-top: 0.65rem;
}

.detail-block strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--leaf-dark);
}

.tag-row,
.source-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.pill {
  background: #fbf4e4;
  color: #5f441a;
  font-weight: 760;
}

.source-chip {
  background: white;
  color: var(--water);
  text-decoration: none;
}

.source-chip:hover {
  border-color: var(--water);
}

.caution {
  border-left: 4px solid var(--clay);
  background: #fff5ef;
  padding: 0.8rem 0.9rem;
}

.search-label {
  display: grid;
  gap: 0.35rem;
  min-width: min(100%, 320px);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.search-label input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  padding: 0.65rem 0.75rem;
}

.source-note {
  max-width: 840px;
  color: var(--muted);
}

.source-card {
  scroll-margin-top: 1rem;
}

.source-card summary {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
}

.source-title {
  display: grid;
  gap: 0.2rem;
}

.source-title strong {
  color: var(--ink);
}

.source-meta {
  color: var(--muted);
  font-size: 0.88rem;
}

.source-body {
  display: grid;
  gap: 0.85rem;
  padding: 0 1rem 1rem;
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.text-button {
  display: inline-flex;
  align-items: center;
  min-height: 2.1rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--leaf-dark);
  padding: 0.38rem 0.65rem;
  font-weight: 800;
  text-decoration: none;
}

.lookup {
  overflow-wrap: anywhere;
  border-left: 3px solid var(--water);
  background: #eef6f9;
  padding: 0.75rem 0.85rem;
}

.note {
  border-left: 3px solid var(--clay);
  background: #fff4ef;
  padding: 0.75rem 0.85rem;
}

.north-star-panel {
  padding: 0;
}

.north-star-panel summary {
  display: flex;
  justify-content: space-between;
  padding: 1rem;
}

.north-star-panel img {
  display: block;
  width: 100%;
  height: auto;
  border-top: 1px solid var(--line);
}

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1rem 1.25rem 2.5rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer code {
  color: var(--ink);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.footer p {
  min-width: 0;
}

.is-hidden {
  display: none;
}

@media (max-width: 860px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .side-nav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    border-left: 0;
    border-bottom: 1px solid var(--line);
    padding: 0 0 0.8rem;
  }

  .overview-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .section-heading--with-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .rec-summary {
    grid-template-columns: 1fr;
  }

  .rec-body {
    padding-left: 1rem;
  }
}

@media (max-width: 520px) {
  .masthead__inner,
  .layout,
  .footer {
    padding-inline: 1rem;
  }

  h1 {
    font-size: 2.45rem;
  }

  .summary-strip span,
  .pill,
  .source-chip,
  .type-pill {
    white-space: normal;
  }

  .source-card summary {
    flex-direction: column;
  }
}
