@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500..800&family=Instrument+Sans:wght@400..700&display=swap');

:root {
  color-scheme: light;
  --paper: #f7f4eb;
  --card: #fffcf4;
  --stone: #ebe7d9;
  --ink: #182a23;
  --muted: #4d5b52;
  --line: #d3d2c3;
  --forest: #1d392d;
  --forest-deep: #172c24;
  --orange: #f69b62;
  --rust: #a34119;
  --display: 'Bricolage Grotesque', 'Instrument Sans', system-ui, sans-serif;
  --text: 'Instrument 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.6 var(--text);
}

a { color: inherit; text-underline-offset: .2em; }
a:focus-visible, summary:focus-visible, .table-scroll:focus-visible {
  outline: 3px solid var(--rust);
  outline-offset: 4px;
}
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; min-width: 0; }
figcaption { margin-top: .65rem; color: var(--muted); font-size: .875rem; }

.wrap { width: min(1200px, calc(100% - 96px)); margin-inline: auto; }
.skip {
  position: absolute;
  inset: .75rem auto auto 1rem;
  z-index: 10;
  padding: .7rem 1rem;
  background: var(--card);
  color: var(--ink);
  transform: translateY(calc(-100% - 1rem));
}
.skip:focus { transform: none; }

.header {
  position: relative;
  z-index: 2;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.bar {
  display: flex;
  min-height: 76px;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font: 800 1.2rem/1.1 var(--display);
  letter-spacing: -.035em;
  text-decoration: none;
  white-space: nowrap;
}
.brand img { width: 36px; height: 36px; flex: none; }
.nav { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2rem); }
.nav > a, .menu > summary {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-height: 44px;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.15;
  text-decoration: none;
}
.nav > a:hover, .menu > summary:hover { color: var(--rust); }
.menu { position: relative; }
.menu > summary, .faq-list summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker, .faq-list summary::-webkit-details-marker { display: none; }
.chevron {
  display: inline-block;
  width: .48rem;
  height: .48rem;
  flex: none;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(-.13rem) rotate(45deg);
}
.menu[open] .chevron { transform: translateY(.08rem) rotate(225deg); }
.menu-list {
  position: absolute;
  z-index: 3;
  top: calc(100% + .25rem);
  right: 0;
  width: max-content;
  min-width: 13rem;
  max-width: calc(100vw - 2rem);
  max-height: min(65vh, 30rem);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: .45rem;
  padding: .375rem;
  background: var(--card);
  box-shadow: 0 .75rem 2.5rem #172c2429;
}
.menu-list a {
  display: block;
  border-radius: .2rem;
  padding: .6rem .8rem;
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
}
.menu-list a:hover, .menu-list a[aria-current] { background: #f9dbc6; color: var(--forest-deep); }
.menu-list a:focus-visible { outline-offset: -2px; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.14fr);
  align-items: center;
  gap: clamp(1.75rem, 5vw, 5.5rem);
  padding-block: clamp(3.1rem, 7vw, 6.75rem);
}
.hero h1, .section h2, .article h1 {
  margin: 0;
  color: var(--forest-deep);
  font: 800 clamp(2.6rem, 5.25vw, 5.05rem)/.99 var(--display);
  letter-spacing: -.052em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.hero h1 .accent { color: var(--rust); }
.hero p {
  max-width: 43ch;
  margin: 1.35rem 0 1.65rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
}
.hero-photo img {
  width: 100%;
  aspect-ratio: 1.32;
  border-radius: .55rem;
  background: #e1c9aa;
  object-fit: cover;
  object-position: center;
}
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
  border: 1px solid var(--forest);
  border-radius: .35rem;
  padding: .6rem .95rem;
  background: var(--forest);
  color: var(--card);
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
}
.button:hover { border-color: var(--forest-deep); background: var(--forest-deep); }
.button.secondary { background: transparent; color: var(--forest); }
.button.secondary:hover { background: var(--stone); }
.arrow { flex: none; font: 1.1rem/1 system-ui, sans-serif; }

.section {
  border-top: 1px solid var(--line);
  padding-block: clamp(3rem, 6vw, 5.75rem);
  scroll-margin-top: 1rem;
}
.section h2 {
  font-size: clamp(2.15rem, 4.2vw, 3.85rem);
  line-height: 1.02;
}
.section-lede {
  max-width: 65ch;
  margin: .85rem 0 1.55rem;
  color: var(--muted);
  font-size: 1.04rem;
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .625rem;
}
.category {
  display: flex;
  min-width: 0;
  min-height: 8rem;
  flex-direction: column;
  gap: .55rem;
  border: 1px solid var(--line);
  border-radius: .375rem;
  padding: 1rem 1.05rem;
  background: var(--card);
  text-decoration: none;
  transition: background .15s, border-color .15s;
}
.category:hover { border-color: #b96a43; background: #fce6d7; }
.category-name {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .4rem;
  font: 750 1.2rem/1.16 var(--display);
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}
.category-name .arrow { margin-top: .08rem; color: var(--rust); }
.category-note { color: var(--muted); font-size: .875rem; line-height: 1.48; }

.feature-section { background: var(--stone); }
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 5vw, 4.75rem);
}
.feature img {
  width: 100%;
  aspect-ratio: 3/2;
  border-radius: .5rem;
  background: #d5bd9d;
  object-fit: cover;
}
.feature p { color: var(--muted); }
.checks { display: grid; gap: .55rem; margin: 1rem 0 1.4rem; padding-left: 1.4rem; }
.checks li { padding-left: .2rem; }
.checks li::marker { color: var(--rust); font-weight: 700; }

.field-example { margin-top: 2.25rem; }
.field-example h3 {
  margin: 0 0 .75rem;
  font: 750 1.35rem/1.2 var(--display);
  letter-spacing: -.03em;
}
.field-example table { width: 100%; min-width: 32rem; border-collapse: collapse; background: var(--card); }
.field-example th, .field-example td {
  border: 1px solid var(--line);
  padding: .65rem .85rem;
  text-align: start;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.field-example thead th { background: var(--forest); color: var(--card); }
.field-example p { margin: .65rem 0 0; color: var(--muted); font-size: .9rem; }
.table-scroll { overflow-x: auto; }

.guides { border-color: var(--forest-deep); background: var(--forest-deep); color: var(--card); }
#guides h2 { color: var(--card); }
#guides .section-lede { color: #d5ded5; }
#guides a:focus-visible { outline-color: var(--orange); }
.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.guide-card {
  display: flex;
  min-height: 13rem;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid #577266;
  border-radius: .375rem;
  padding: clamp(1rem, 2.4vw, 1.55rem);
  background: var(--forest);
  color: var(--card);
  text-decoration: none;
  transition: background .15s, border-color .15s;
}
.guide-card:hover { border-color: var(--orange); background: #26473a; }
.guide-card h3 {
  margin: 0;
  font: 750 clamp(1.2rem, 2vw, 1.55rem)/1.14 var(--display);
  letter-spacing: -.025em;
}
.guide-card p { margin: .7rem 0 1.05rem; color: #d5ded5; font-size: .93rem; }
.guide-card > span { margin-top: auto; color: var(--orange); font-size: .9rem; font-weight: 700; }

.faq-list { margin-top: 1.4rem; border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  position: relative;
  padding: 1rem 2rem 1rem 0;
  font-weight: 700;
}
.faq-list summary::after {
  position: absolute;
  top: 50%;
  right: .3rem;
  color: var(--rust);
  font: 1.35rem/1 system-ui, sans-serif;
  content: '+';
  transform: translateY(-50%);
}
.faq-list details[open] summary::after { content: '−'; }
.faq-list p { max-width: 73ch; margin: 0 1.5rem 1.05rem 0; color: var(--muted); }

.footer { border-top: 1px solid var(--line); padding: 2.35rem 0 2.6rem; background: var(--stone); }
.foot-wrap { display: flex; justify-content: space-between; gap: 1.25rem 3rem; }
.footer p { max-width: 52ch; margin: .7rem 0 0; color: var(--muted); font-size: .9rem; }
.foot-links {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: .5rem 1.15rem;
  font-size: .9rem;
  font-weight: 700;
}
.foot-links a:hover, .article a:not(.button):hover { color: var(--rust); }

.article { max-width: 760px; padding-block: clamp(2.8rem, 6vw, 5.5rem); }
.article h1 {
  margin: 1.1rem 0;
  font-size: clamp(2.55rem, 6vw, 4.8rem);
}
.article .lead { margin-bottom: 1.8rem; color: var(--muted); font-size: clamp(1.15rem, 2vw, 1.3rem); }
.article h2 {
  margin: 2rem 0 .45rem;
  font: 750 clamp(1.5rem, 2.5vw, 1.85rem)/1.13 var(--display);
  letter-spacing: -.035em;
}
.article p { margin: 0 0 1rem; }
.article figure { margin: 1.65rem 0; }
.article figure img { width: 100%; border-radius: .45rem; }
.article .sources, .article .actions { margin-top: 1.75rem; }
.article .other { margin-top: 2.5rem; border-top: 1px solid var(--line); }
.article .back { font-size: .9rem; font-weight: 700; }

@media (max-width: 990px) {
  .wrap { width: calc(100% - 64px); }
  .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 750px) {
  .wrap { width: calc(100% - 40px); }
  .bar { min-height: 65px; gap: .75rem; }
  .brand { font-size: 1rem; gap: .45rem; }
  .brand img { width: 30px; height: 30px; }
  .nav { gap: .75rem; }
  .nav > a, .menu > summary { font-size: .81rem; gap: .36rem; }
  .hero { grid-template-columns: 1fr; gap: 1.4rem; padding-top: 2.7rem; }
  .hero h1 { max-width: 18ch; font-size: clamp(2.5rem, 8.1vw, 4.75rem); }
  .hero p { margin-block: .95rem 1.15rem; }
  .hero-photo img { aspect-ratio: 1.55; }
  .feature { grid-template-columns: 1fr; gap: 1.4rem; }
  .guide-grid { grid-template-columns: 1fr; }
  .guide-card { min-height: auto; }
  .foot-wrap { flex-direction: column; }
}
@media (max-width: 530px) {
  .wrap { width: calc(100% - 32px); }
  .bar { flex-wrap: wrap; gap: 0 .6rem; padding-block: .6rem .25rem; }
  .bar .brand { flex-basis: 100%; }
  .nav { width: 100%; justify-content: space-between; gap: .75rem; }
  .menu:first-child .menu-list { right: auto; left: 0; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; }
  .category { padding: .7rem; }
  .category-name { font-size: 1.02rem; }
  .category-note { font-size: .8rem; }
}
@media (max-width: 340px) {
  .category-grid { grid-template-columns: 1fr; }
  .category { min-height: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::after { transition: none !important; }
}
