/* Avalon Base — single stylesheet, first-party, no external resources. */

:root {
  --paper: #fbf8f1;
  --surface: #ffffff;
  --tint: #f1ede1;
  --ink: #16281d;
  --body: #2b382f;
  --muted: #55655a;
  --line: #d9d1bf;
  --line-strong: #bdb29a;
  --forest: #1d4d35;
  --forest-dark: #143725;
  --amber: #8a4a12;
  --amber-tint: #fdf2e2;
  --radius: 4px;
  --gap: 1.25rem;
  --measure: 44rem;
  --sans: "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.68;
  overflow-wrap: break-word;
}

.wrap {
  width: 100%;
  max-width: 62rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.prose { max-width: var(--measure); }

a { color: var(--amber); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--forest-dark); }
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--forest);
  outline-offset: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  line-height: 1.24;
  margin: 0 0 0.6em;
  font-weight: 700;
}

h1 { font-size: 2.05rem; letter-spacing: -0.01em; }
h2 { font-size: 1.5rem; margin-top: 2.4rem; }
h3 { font-size: 1.18rem; margin-top: 1.9rem; }
h4 { font-size: 1.03rem; margin-top: 1.4rem; font-family: var(--sans); }

p, ul, ol, dl, table { margin: 0 0 1.15rem; }
li { margin-bottom: 0.45rem; }

/* ---------- skip link ---------- */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--forest);
  color: #fff;
  padding: 0.7rem 1rem;
  z-index: 50;
}
.skip:focus { left: 0; }

/* ---------- header ---------- */

.site-header {
  background: var(--forest-dark);
  border-bottom: 4px solid var(--amber);
}

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #fdfbf5;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-right: auto;
}
.brand:hover { color: #fff; }

.mark {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 2px solid var(--amber);
  border-radius: var(--radius);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  font-family: var(--sans);
  font-weight: 700;
  color: #fdfbf5;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid #6f8e7c;
  color: #fdfbf5;
  font: inherit;
  font-size: 0.95rem;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius);
  cursor: pointer;
}

#sitenav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.05rem;
  margin: 0;
  padding: 0;
}

#sitenav a {
  color: #e8efe9;
  text-decoration: none;
  font-size: 0.93rem;
  padding: 0.3rem 0;
  display: inline-block;
  border-bottom: 2px solid transparent;
}
#sitenav a:hover { color: #fff; border-bottom-color: var(--amber); }
#sitenav a[aria-current="page"] { color: #fff; border-bottom-color: var(--amber); }

/* ---------- main ---------- */

main { display: block; padding: 2.2rem 0 3rem; }

.lede {
  font-size: 1.16rem;
  color: var(--ink);
  line-height: 1.6;
}

.page-head { border-bottom: 1px solid var(--line); padding-bottom: 1.3rem; margin-bottom: 1.6rem; }

.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.5rem;
  font-weight: 600;
}

/* ---------- hero ---------- */

.hero {
  background: var(--tint);
  border-bottom: 1px solid var(--line);
  padding: 2.6rem 0 2.3rem;
}
.hero h1 { font-size: 2.25rem; max-width: 22ch; }
.hero .lede { max-width: 54ch; }
.hero-answer {
  margin-top: 1.4rem;
  border-left: 4px solid var(--forest);
  padding-left: 1rem;
  max-width: 54ch;
}

/* ---------- boxes ---------- */

.disclosure {
  background: var(--amber-tint);
  border: 2px solid var(--amber);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  margin: 1.8rem 0;
}
.disclosure h2, .disclosure h3 { margin-top: 0; font-size: 1.1rem; }
.disclosure p:last-child { margin-bottom: 0; }

.link-note {
  font-size: 0.97rem;
  color: var(--muted);
  margin: 0.5rem 0 1.2rem;
  max-width: 60ch;
}

.callout {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--forest);
  border-radius: var(--radius);
  padding: 1.05rem 1.15rem;
  margin: 1.7rem 0;
}
.callout h3 { margin-top: 0; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }

.watch {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-top: 4px solid var(--amber);
  border-radius: var(--radius);
  padding: 1.05rem 1.15rem;
  margin: 1.7rem 0;
}
.watch h3 { margin-top: 0; }
.watch p:last-child, .watch ul:last-child { margin-bottom: 0; }

.method {
  background: var(--tint);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  margin: 1.7rem 0;
}
.method h3 { margin-top: 0; }
.method p:last-child { margin-bottom: 0; }

.quick {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.1rem 1.2rem;
  margin: 1.7rem 0;
}
.quick h2, .quick h3 { margin-top: 0; }
.quick dt { font-weight: 700; color: var(--ink); margin-top: 0.9rem; }
.quick dt:first-of-type { margin-top: 0; }
.quick dd { margin: 0.2rem 0 0; }

/* ---------- lists ---------- */

.checklist { list-style: none; padding-left: 0; }
.checklist li {
  position: relative;
  padding-left: 1.85rem;
  margin-bottom: 0.7rem;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 0.85rem;
  height: 0.85rem;
  border: 2px solid var(--forest);
  border-radius: 2px;
}

.steps { counter-reset: step; list-style: none; padding-left: 0; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 2.6rem;
  margin-bottom: 1.1rem;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.9rem;
  height: 1.9rem;
  display: grid;
  place-items: center;
  background: var(--forest);
  color: #fff;
  border-radius: 50%;
  font-size: 0.9rem;
  font-weight: 700;
}
.steps h3 { margin-top: 0; font-size: 1.05rem; }

.terms dt { font-weight: 700; color: var(--ink); margin-top: 1.2rem; font-size: 1.02rem; }
.terms dd { margin: 0.25rem 0 0; }

.cards {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}
.cards li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.05rem;
  margin: 0;
}
.cards h3 { margin-top: 0; font-size: 1.05rem; }
.cards p { margin-bottom: 0; font-size: 0.98rem; }

/* ---------- table ---------- */

.table-wrap { overflow-x: auto; margin: 1.6rem 0; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; margin: 0; font-size: 0.97rem; background: var(--surface); }
caption { text-align: left; padding: 0.85rem 0.9rem; color: var(--muted); font-size: 0.93rem; }
th, td { text-align: left; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--tint); color: var(--ink); font-family: var(--sans); font-size: 0.92rem; }
tbody th { font-weight: 700; color: var(--ink); min-width: 11rem; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }

/* ---------- accordion ---------- */

.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 0.7rem;
}
.faq summary {
  cursor: pointer;
  padding: 0.85rem 1rem;
  font-weight: 700;
  color: var(--ink);
  list-style-position: inside;
}
.faq summary:hover { background: var(--tint); }
.faq .answer { padding: 0 1rem 0.3rem; }

/* ---------- buttons ---------- */

.visit {
  display: inline-block;
  background: var(--forest);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 0.75rem 1.2rem;
  border-radius: var(--radius);
  border: 2px solid var(--forest-dark);
}
.visit:hover { background: var(--forest-dark); color: #fff; }

/* ---------- footer ---------- */

.site-footer {
  background: var(--forest-dark);
  color: #e3ece5;
  padding: 2.2rem 0 2.6rem;
  font-size: 0.95rem;
  border-top: 4px solid var(--amber);
}
.site-footer a { color: #f6dcbb; }
.site-footer a:hover { color: #fff; }
.site-footer p { margin: 0 0 0.35rem; max-width: 70ch; }
.pub-name { font-family: var(--serif); font-size: 1.15rem; font-weight: 700; color: #fff; }
.footer-links { margin: 1rem 0 1.1rem; }
.tm, .reviewed { color: #c5d3c8; font-size: 0.9rem; }
.tm { margin-top: 1rem; }

/* ---------- utility ---------- */

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.section { margin-top: 2.8rem; }
hr.rule { border: 0; border-top: 1px solid var(--line); margin: 2.4rem 0; }
.figure { margin: 1.8rem 0; }
.figure svg { max-width: 100%; height: auto; display: block; }
figcaption { font-size: 0.92rem; color: var(--muted); margin-top: 0.5rem; }

@media (max-width: 46rem) {
  h1 { font-size: 1.72rem; }
  .hero h1 { font-size: 1.82rem; }
  .nav-toggle { display: block; }
  #sitenav { display: none; width: 100%; }
  #sitenav.open { display: block; }
  #sitenav ul { flex-direction: column; gap: 0; padding-bottom: 0.6rem; }
  #sitenav a { padding: 0.55rem 0; border-bottom: 1px solid #2c5941; width: 100%; }
}
