:root {
  color-scheme: light;
  --paper: #f8f6ee;
  --card: #fffdf7;
  --ink: #172c25;
  --muted: #48554d;
  --line: #dcdccf;
  --olive: #4e654b;
  --gold: #e6bb73;
  --forest: #203930;
  --serif: "Instrument Serif", "Noto Serif Display", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.65 var(--sans);
}

img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid #a15429; outline-offset: 4px; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.04;
  text-wrap: balance;
}

p { margin: 0; }
h1, h2, h3, figure { margin: 0; }

.wrap {
  width: min(100% - clamp(2rem, 7vw, 7rem), 76rem);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  z-index: 10;
  top: 1rem;
  left: 1rem;
  padding: .5rem .8rem;
  color: white;
  background: var(--forest);
  transform: translateY(-175%);
}

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

.site-header { border-bottom: 1px solid var(--line); }

.header-inner {
  min-height: 4.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .62rem;
  width: max-content;
  font: 400 2.1rem/.96 var(--serif);
  letter-spacing: -.02em;
  text-decoration: none;
}

.brand-icon {
  display: inline-grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--forest);
}

.brand-icon::before {
  content: "";
  width: .66rem;
  height: .66rem;
  border-radius: 0 65% 65% 65%;
  transform: translateY(.01rem) rotate(45deg);
  background: var(--gold);
}

.site-nav, .footer-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .15rem clamp(.85rem, 3.2vw, 2.55rem);
}

.site-nav a, .footer-nav a {
  padding-block: .55rem;
  font-size: .91rem;
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover, .footer-nav a:hover, .site-nav [aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: .34em;
  text-decoration-thickness: 1px;
}

.site-nav [aria-current="page"] { color: var(--olive); }

.home-hero {
  display: grid;
  align-items: center;
  grid-template-columns: .92fr 1.08fr;
  gap: clamp(2rem, 5vw, 5rem);
  padding-block: clamp(2.5rem, 5.1vw, 5.05rem) clamp(2.5rem, 4.8vw, 4.4rem);
}

.home-title {
  font-size: clamp(3.8rem, 6.45vw, 6.4rem);
  letter-spacing: -.027em;
  line-height: .92;
  text-wrap: initial;
}

.home-title em {
  display: block;
  color: var(--olive);
  font-weight: 400;
}

.hero-copy > p {
  max-width: 30rem;
  margin-top: 1.35rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.48vw, 1.15rem);
}

.home-photo, .guide-photo { overflow: hidden; }

.home-photo {
  aspect-ratio: 1.36;
  background: var(--forest);
  border-radius: .35rem;
}

.home-photo img, .guide-photo img, .section-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-photo img { object-position: center 53%; }

.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .85rem;
  min-height: 2.85rem;
  padding: .62rem 1.14rem;
  border: 1px solid transparent;
  border-radius: .25rem;
  background: var(--forest);
  color: white;
  font-size: .93rem;
  font-weight: 650;
  text-decoration: none;
}

.hero-copy .action { margin-top: 1.65rem; }
.action:hover { background: #315346; }
.action span { font-size: 1.16em; line-height: 1; }

.library {
  border-top: 1px solid var(--line);
  padding-block: 1.9rem 3.25rem;
  scroll-margin-top: 1rem;
}

.section-title {
  font-size: clamp(2.55rem, 4vw, 3.45rem);
  letter-spacing: -.01em;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.library-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .85rem 1.6rem;
  margin-bottom: 1.15rem;
}

.search-form {
  position: relative;
  width: min(100%, 17rem);
}

.search-form::before {
  content: "";
  position: absolute;
  top: .89rem;
  left: .9rem;
  width: .65rem;
  height: .65rem;
  border: 1.5px solid var(--olive);
  border-radius: 50%;
  pointer-events: none;
}

.search-form::after {
  content: "";
  position: absolute;
  top: 1.48rem;
  left: 1.42rem;
  width: .31rem;
  height: 1.5px;
  transform: rotate(45deg);
  background: var(--olive);
  pointer-events: none;
}

.search-form input {
  width: 100%;
  min-height: 2.55rem;
  padding: .48rem .7rem .48rem 2.05rem;
  border: 1px solid #a5aea0;
  border-radius: .3rem;
  background: var(--card);
  color: var(--ink);
  font: 500 .95rem/1.4 var(--sans);
}

.search-form input::placeholder { color: var(--muted); opacity: 1; }

.search-results {
  margin-bottom: 1.05rem;
  padding: .72rem 1rem;
  border: 1px solid var(--line);
  border-radius: .3rem;
  background: var(--card);
}

.search-results p { color: var(--muted); font-size: .9rem; }

.search-results ul {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.search-results ul:not(:empty) { margin-top: .26rem; }
.search-results a { font-weight: 650; text-underline-offset: .18em; }

.section-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(.95rem, 2vw, 1.65rem);
}

.section-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: .35rem;
  background: var(--card);
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease;
}

.section-card:hover {
  transform: translateY(-3px);
  border-color: var(--olive);
}

.card-image {
  aspect-ratio: 1.88;
  overflow: hidden;
  background: #dad9c7;
}

.card-content { padding: 1.18rem 1.25rem 1.35rem; }

.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .45rem;
  margin-bottom: .45rem;
}

.card-title h3 {
  font-size: clamp(1.95rem, 2.8vw, 2.55rem);
  text-wrap: initial;
}

.card-arrow {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  line-height: 1;
}

.section-card:hover .card-arrow {
  border-color: var(--forest);
  background: var(--forest);
  color: white;
}

.card-content p {
  max-width: 32ch;
  color: var(--muted);
  font-size: .96rem;
  line-height: 1.55;
}

.feature {
  display: grid;
  grid-template-columns: 1.28fr .72fr;
  align-items: center;
  gap: 2rem clamp(1.5rem, 6vw, 5.25rem);
  margin-block: .3rem 3.75rem;
  padding: clamp(1.5rem, 4.4vw, 3.35rem);
  border-radius: .4rem;
  background: var(--forest);
  color: #fffdf4;
}

.feature-label {
  margin-bottom: .5rem;
  color: var(--gold);
  font-size: .82rem;
  font-weight: 700;
}

.feature h2 { max-width: 20ch; }

.feature-copy > p:not(.feature-label) {
  max-width: 37ch;
  margin-block: .85rem 1.1rem;
  color: #dfe6d8;
}

.feature-link, .text-link {
  font-weight: 650;
  text-underline-offset: .2em;
}

.feature-link { color: #f0cb88; }

.feature dl {
  display: grid;
  gap: .95rem;
  margin: 0;
}

.feature dl > div {
  padding-block: .12rem .1rem;
  padding-left: 1.05rem;
  border-left: 1px solid #a8a88a;
}

.feature dt { font-size: 1.03rem; font-weight: 700; }

.feature dd {
  margin: .1rem 0 0;
  color: #dfe6d8;
  font-size: .94rem;
  line-height: 1.5;
}

.site-footer { border-top: 1px solid var(--line); }

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .55rem 2rem;
  flex-wrap: wrap;
  padding-block: 1.65rem 1.9rem;
}

.footer-inner .brand { font-size: 1.84rem; }

.crumbs {
  margin-top: 1.35rem;
  color: var(--muted);
  font-size: .88rem;
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.crumbs li + li::before {
  content: "/";
  margin-inline: .57rem;
  color: #65786d;
}

.crumbs a { text-underline-offset: .16em; }

.guide-hero {
  display: grid;
  grid-template-columns: 1fr .96fr;
  align-items: center;
  gap: clamp(1.4rem, 5vw, 4.5rem);
  padding-block: 1.65rem clamp(2.1rem, 4.8vw, 4rem);
}

.guide-title {
  font-size: clamp(3.3rem, 6.7vw, 6.1rem);
  letter-spacing: -.025em;
}

.guide-hero .lede {
  max-width: 38ch;
  margin-top: .85rem;
  color: var(--muted);
  font-size: clamp(1.03rem, 1.65vw, 1.25rem);
}

.guide-photo {
  aspect-ratio: 1.76;
  border-radius: .35rem;
  background: #dad9c7;
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(10.5rem, .3fr) minmax(0, 1fr);
  gap: clamp(1.7rem, 7vw, 6rem);
  align-items: start;
  margin-bottom: clamp(3rem, 6vw, 5.5rem);
  padding-top: 1.8rem;
  border-top: 1px solid var(--line);
}

.contents-nav {
  position: sticky;
  top: 1.25rem;
  margin-top: .1rem;
}

.contents-nav h2 {
  margin-bottom: .52rem;
  font: 700 .94rem/1.4 var(--sans);
}

.contents-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.contents-nav a {
  display: block;
  padding-block: .3rem;
  color: var(--muted);
  font-size: .91rem;
  text-decoration-color: #949c8f;
  text-underline-offset: .15em;
}

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

.guide-body {
  max-width: 74ch;
  min-width: 0;
}

.guide-body section + section { margin-top: 2.25rem; }
.guide-body section { scroll-margin-top: 1.3rem; }

.guide-body h2 {
  margin-bottom: .6rem;
  font-size: clamp(2.12rem, 3.45vw, 3rem);
  text-wrap: initial;
}

.guide-body p { color: var(--muted); }
.guide-body p + p { margin-top: .75rem; }
.guide-body ul { padding-inline-start: 1.25rem; }
.guide-body li + li { margin-top: .28rem; }

.fact-list {
  display: grid;
  gap: .2rem 1rem;
  margin: .9rem 0 0;
}

.fact-list > div {
  display: grid;
  grid-template-columns: minmax(6.4rem, .28fr) minmax(0, 1fr);
  align-items: baseline;
  gap: .15rem 1rem;
  padding: .6rem .15rem;
  border-top: 1px solid var(--line);
}

.fact-list > div:last-child { border-bottom: 1px solid var(--line); }
.fact-list dt { font-weight: 700; }
.fact-list dd { margin: 0; color: var(--muted); }

.guide-body .callout {
  margin-block: .95rem 0;
  padding: .85rem 1rem;
  border-left: 3px solid #a88b54;
  background: #efeee2;
}

.guide-body .sources {
  padding-top: 1.17rem;
  border-top: 1px solid var(--line);
}

.sources h2 { font-size: 1.8rem; }
.sources ul { margin-block: .2rem 0; font-size: .93rem; }
.sources a { text-underline-offset: .16em; }

@media (max-width: 850px) {
  .home-hero { gap: 1.7rem; }
  .card-content { padding-inline: .9rem; }
  .card-arrow { width: 1.7rem; height: 1.7rem; }
}

@media (max-width: 690px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding-block: .85rem .48rem;
  }

  .site-nav { gap: .03rem 1.12rem; }
  .site-nav a { padding-block: .34rem; }
  .home-hero, .guide-hero, .guide-layout { grid-template-columns: 1fr; }
  .home-title { font-size: clamp(3.65rem, 12vw, 5.2rem); }
  .home-hero { padding-top: 2.3rem; }
  .home-photo { aspect-ratio: 1.52; }
  .section-grid { grid-template-columns: 1fr; }
  .search-form { width: 100%; }
  .card-content { padding: 1rem 1.12rem 1.12rem; }
  .card-image { aspect-ratio: 2.05; }
  .feature { grid-template-columns: 1fr; }
  .guide-hero { padding-top: 1.25rem; }
  .guide-layout { gap: 1.55rem; }
  .contents-nav { position: static; }
  .contents-nav ul { display: flex; flex-wrap: wrap; gap: .24rem .85rem; }
  .contents-nav a { padding-block: .14rem; }
}

@media (max-width: 360px) {
  .site-nav { column-gap: .7rem; }
  .site-nav a { font-size: .85rem; }
  .fact-list > div { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .section-card { transition: none; }
}
