/* Nexaline stylesheet — system fonts only, no external requests. */
:root {
  --bg: #faf6ef;
  --surface: #ffffff;
  --tint: #f3eadc;
  --ink: #2b2420;
  --muted: #5c5049;
  --accent: #8a3a1c;
  --accent-dark: #6e2d14;
  --green: #2e5b4e;
  --green-tint: #e6efe9;
  --line: #ddd0bd;
  --focus: #1f5fa8;
  --radius: 3px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.25rem;
  --space-5: 3.5rem;
}

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

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

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

img, svg { max-width: 100%; }

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { color: var(--accent-dark); }

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

h1, h2, h3 {
  font-family: var(--serif);
  line-height: 1.25;
  color: var(--ink);
  font-weight: 700;
}
h1 { font-size: clamp(1.85rem, 1.3rem + 2.4vw, 2.75rem); margin: 0 0 var(--space-2); }
h2 { font-size: clamp(1.4rem, 1.2rem + 0.9vw, 1.75rem); margin: var(--space-4) 0 var(--space-2); }
h3 { font-size: 1.2rem; margin: var(--space-3) 0 var(--space-1); }

p, ul, ol, dl { margin: 0 0 var(--space-2); }
li { margin-bottom: 0.35rem; }

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

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 10;
  border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; color: #fff; }

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1) var(--space-3);
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark { flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-family: var(--serif); font-size: 1.35rem; font-weight: 700; }
.brand-tag { font-size: 0.82rem; color: var(--muted); }

.nav-toggle {
  display: none;
  font: inherit;
  font-weight: 600;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 0.4rem 0.9rem;
  cursor: pointer;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.15rem 1.1rem;
}
.site-nav li { margin: 0; }
.site-nav a {
  display: inline-block;
  padding: 0.3rem 0;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.97rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--line); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--accent); font-weight: 600; }

@media (max-width: 52rem) {
  .nav-toggle { display: inline-block; }
  .site-nav { display: none; width: 100%; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: 0.4rem 0 0.6rem; }
  .site-nav a { display: block; padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--line); color: var(--accent); }
}

/* Home */
.hero {
  background: var(--tint);
  border-bottom: 1px solid var(--line);
  padding: var(--space-4) 0 var(--space-3);
}
.hero h1 { max-width: 46rem; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--green);
  margin-bottom: var(--space-1);
}
.lede { font-size: 1.15rem; color: var(--ink); max-width: 44rem; }

.home-grid { max-width: 50rem; padding-bottom: var(--space-5); }
.home-grid > section { margin-top: var(--space-4); }
.home-grid > section > h2:first-child { margin-top: 0; }

/* Disclosure */
.disclosure {
  background: var(--green-tint);
  border: 1px solid #b9d0c3;
  border-left: 5px solid var(--green);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  margin: var(--space-3) 0;
}
.disclosure h2 { font-size: 1.2rem; margin: 0 0 var(--space-1); }
.disclosure p:last-child { margin-bottom: 0; }

/* Quick answer */
.quick-answer {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  margin: var(--space-3) 0;
}
.quick-answer ul { padding-left: 1.2rem; margin-bottom: 0; }
.qa-label {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 0.3rem;
}
.quick-answer p:last-child { margin-bottom: 0; }

/* Checklist */
.checklist { list-style: none; padding: 0; }
.checklist li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.6rem;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3em;
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid var(--green);
  border-radius: 2px;
}
.checklist li::after {
  content: "";
  position: absolute;
  left: 0.36rem;
  top: 0.45em;
  width: 0.4rem;
  height: 0.65rem;
  border: solid var(--green);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Numbered steps */
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 2.6rem;
  margin-bottom: 0.85rem;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.05em;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 0 var(--space-3); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
caption { text-align: left; font-weight: 600; padding: 0.7rem 0.9rem; color: var(--muted); border-bottom: 1px solid var(--line); }
th, td { text-align: left; vertical-align: top; padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--line); }
thead th { background: var(--tint); font-size: 0.88rem; }
tbody th { font-weight: 600; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }

@media (max-width: 40rem) {
  .table-wrap { border: 0; background: none; }
  table, thead, tbody, tr, th, td, caption { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  caption { padding: 0 0 0.5rem; border: 0; }
  tbody tr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 0.75rem; }
  tbody th { background: var(--tint); }
  td { border-bottom: 1px solid var(--line); }
  td::before { content: attr(data-label); display: block; font-weight: 600; font-size: 0.82rem; color: var(--muted); }
}

/* Panels */
.watch-out {
  background: #fbf0e8;
  border: 1px solid #e7c9b6;
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  margin: var(--space-3) 0;
}
.watch-out h2 { margin-top: 0; }
.watch-out ul { padding-left: 1.2rem; margin-bottom: var(--space-2); }
.watch-out > :last-child { margin-bottom: 0; }

.callout {
  border: 1px solid var(--line);
  background: var(--tint);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  margin: var(--space-3) 0;
}
.callout p:last-child { margin-bottom: 0; }

.method-box {
  border: 2px solid var(--green);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  background: var(--surface);
  margin: var(--space-2) 0 var(--space-3);
}
.method-title { font-weight: 700; color: var(--green); margin-bottom: 0.4rem; }
.method-box ol { padding-left: 1.3rem; margin-bottom: 0; }

.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); margin-bottom: var(--space-2); }
.pros-cons > div { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-2); background: var(--surface); }
.pros-cons h3 { margin-top: 0; font-size: 1.05rem; }
.pros-cons ul { padding-left: 1.2rem; margin-bottom: 0; }
@media (max-width: 40rem) { .pros-cons { grid-template-columns: 1fr; } }

/* Definition lists */
.term-list dt, .resource-list dt { font-weight: 700; margin-top: var(--space-2); }
.term-list dd, .resource-list dd { margin: 0.2rem 0 0; padding-left: 1rem; border-left: 3px solid var(--line); }

/* Related reading */
.related { list-style: none; padding: 0; }
.related li { padding: 0.7rem 0; border-bottom: 1px solid var(--line); margin: 0; }
.related li:first-child { border-top: 1px solid var(--line); }
.related a { display: block; font-weight: 600; font-family: var(--serif); font-size: 1.08rem; }

/* FAQ */
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 0.6rem; }
.faq summary { cursor: pointer; padding: 0.8rem 1rem; font-weight: 600; list-style-position: outside; margin-left: 1rem; }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq details p { padding: 0.8rem 1rem 0.2rem; }

/* Affiliate block */
.product-note { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: var(--space-3); }
.aff-block { margin: var(--space-3) 0; padding: var(--space-2) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.product-note .aff-block { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius);
  border: 2px solid var(--accent);
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--accent); }
.btn-outline:hover { background: var(--tint); color: var(--accent-dark); }
.aff-note { margin: 0.6rem 0 0; font-size: 1rem; color: var(--ink); }

/* Content pages */
.page { padding-top: var(--space-4); padding-bottom: var(--space-5); }
.page.with-toc { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: var(--space-4); align-items: start; }
.page.no-toc .content { max-width: 46rem; }
.content { max-width: 46rem; min-width: 0; }
.page-head { border-bottom: 1px solid var(--line); padding-bottom: var(--space-2); margin-bottom: var(--space-3); }
.content > h2:first-of-type { margin-top: var(--space-3); }

.toc {
  position: sticky;
  top: 1rem;
  border-left: 3px solid var(--line);
  padding-left: var(--space-2);
  font-size: 0.93rem;
}
.toc-title { font-weight: 700; margin-bottom: 0.4rem; }
.toc ol { list-style: none; padding: 0; margin: 0; }
.toc li { margin-bottom: 0.4rem; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; }

@media (max-width: 60rem) {
  .page.with-toc { display: block; }
  .toc { position: static; margin-bottom: var(--space-3); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-2); }
}

.effective { font-weight: 600; color: var(--muted); margin: 0; }

.publisher-card {
  font-style: normal;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-2);
}
.contact-email { font-size: 1.3rem; font-weight: 600; }

/* Footer */
.site-footer {
  background: #2b2420;
  color: #f1e9de;
  padding: var(--space-4) 0;
  font-size: 0.95rem;
}
.site-footer a { color: #f6c9a8; }
.site-footer a:hover { color: #fff; }
.footer-inner { max-width: 50rem; }
.footer-name { font-family: var(--serif); font-size: 1.3rem; font-weight: 700; margin-bottom: var(--space-1); }
.footer-publisher { line-height: 1.7; }
.footer-tm, .footer-reviewed { color: #dcd1c3; }

/* Content page grid: heading across the top, contents list beside the article */
.page.with-toc { grid-template-areas: "head head" "toc content"; }
.page.with-toc > .page-head { grid-area: head; margin-bottom: 0; }
.page.with-toc > .toc { grid-area: toc; }
.page.with-toc > .content { grid-area: content; }
.page > .page-head { max-width: 50rem; }
