/* Astral Base — shared stylesheet. System fonts only; no external requests. */
:root {
  --paper: #faf6ee;
  --paper-2: #f2ebdd;
  --ink: #221e1a;
  --ink-soft: #4a433b;
  --plum: #6b2d5c;
  --plum-dark: #4f1f44;
  --ochre: #8a5212;
  --rule: #d9cdb8;
  --note: #fff9ec;
  --radius: 3px;
  --s1: 0.25rem; --s2: 0.5rem; --s3: 0.875rem; --s4: 1.375rem; --s5: 2.25rem; --s6: 3.5rem;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 1.0625rem/1.65 var(--sans); overflow-wrap: break-word;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--plum); text-underline-offset: 0.15em; }
a:hover { color: var(--plum-dark); }
:focus-visible { outline: 3px solid var(--ochre); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: var(--s2) var(--s3); z-index: 10; }
.skip:focus { left: var(--s2); top: var(--s2); color: #fff; }

h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 4.2vw, 2.7rem); margin: 0 0 var(--s3); font-weight: 600; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); margin: var(--s5) 0 var(--s3); font-weight: 600; border-bottom: 1px solid var(--rule); padding-bottom: var(--s2); }
h3 { font-size: 1.2rem; margin: var(--s4) 0 var(--s2); font-weight: 600; }
p, ul, ol, dl, table { margin: 0 0 var(--s3); }
li { margin-bottom: var(--s1); }

/* Header */
.masthead { background: var(--paper-2); border-bottom: 2px solid var(--ink); }
.masthead-inner { max-width: 72rem; margin: 0 auto; padding: var(--s3) 1rem; display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: var(--s2); text-decoration: none; color: var(--ink); font-family: var(--serif); font-size: 1.35rem; font-weight: 600; }
.brand-mark { width: 2rem; height: 2rem; }
.brand small { display: block; font-family: var(--sans); font-size: 0.78rem; font-weight: 400; color: var(--ink-soft); }
.nav-toggle { display: none; font: inherit; font-size: 0.95rem; background: var(--paper); color: var(--ink); border: 1px solid var(--ink); border-radius: var(--radius); padding: var(--s1) var(--s3); cursor: pointer; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); }
.site-nav a { text-decoration: none; color: var(--ink); font-size: 0.95rem; padding: var(--s1) 0; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--plum); color: var(--plum); }
@media (max-width: 52rem) {
  .nav-toggle { display: inline-block; }
  .site-nav { width: 100%; display: none; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { display: block; padding: var(--s2) 0; border-bottom: 1px solid var(--rule); }
}

/* Layout */
.page { max-width: 72rem; margin: 0 auto; padding: var(--s5) 1rem var(--s6); }
.page--with-aside { display: grid; grid-template-columns: minmax(0, 1fr) 17rem; gap: var(--s5); align-items: start; }
.page--with-aside .aside { position: sticky; top: var(--s3); }
@media (max-width: 60rem) {
  .page--with-aside { grid-template-columns: minmax(0, 1fr); }
  .page--with-aside .aside { position: static; order: -1; }
}
article { min-width: 0; }
.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 44rem; }
.meta-line { font-size: 0.9rem; color: var(--ink-soft); }

.aside { border: 1px solid var(--rule); border-left: 4px solid var(--plum); background: var(--paper-2); padding: var(--s3) var(--s4); font-size: 0.95rem; border-radius: var(--radius); }
.aside h2 { font-size: 1.05rem; margin: 0 0 var(--s2); border: 0; padding: 0; }
.aside ol, .aside ul { padding-left: 1.1rem; margin-bottom: var(--s3); }
.aside dl { margin: 0; }
.aside dt { font-weight: 600; margin-top: var(--s2); }
.aside dd { margin: 0; }

/* Key-points strip (homepage hero) */
.keypoints { list-style: none; padding: 0; margin: var(--s4) 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.keypoints li { margin: 0; padding: var(--s3); border-right: 1px solid var(--rule); }
.keypoints li:last-child { border-right: 0; }
.keypoints strong { display: block; font-family: var(--serif); font-size: 1.05rem; }

/* Disclosure and affiliate */
.disclosure { background: var(--note); border: 1px solid var(--ochre); border-radius: var(--radius); padding: var(--s3) var(--s4); margin: var(--s4) 0; font-size: 1.0625rem; }
.disclosure h2 { font-size: 1.15rem; margin: 0 0 var(--s2); border: 0; padding: 0; }
.disclosure p:last-child { margin-bottom: 0; }
.offer { border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--s3) var(--s4); background: #fff; margin: var(--s4) 0; }
.aff { display: inline-block; background: var(--plum); color: #fff; text-decoration: none; padding: var(--s2) var(--s4); border-radius: var(--radius); font-weight: 600; }
.aff:hover, .aff:focus-visible { background: var(--plum-dark); color: #fff; }
.aff-note { font-size: 0.95rem; color: var(--ink-soft); margin: var(--s2) 0 0; }

/* Body units */
.callout { border-left: 4px solid var(--ochre); background: var(--paper-2); padding: var(--s3) var(--s4); margin: var(--s4) 0; border-radius: 0 var(--radius) var(--radius) 0; }
.callout > :last-child { margin-bottom: 0; }
.callout-title { font-weight: 700; margin-bottom: var(--s1); }
.worked { border: 1px dashed var(--ink-soft); padding: var(--s3) var(--s4); margin: var(--s4) 0; border-radius: var(--radius); background: #fff; }
.worked > :last-child { margin-bottom: 0; }
.worked .label { font-family: var(--mono); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ochre); }
.spec { font-family: var(--mono); font-size: 0.9rem; background: var(--paper-2); padding: var(--s3); border-radius: var(--radius); overflow-x: auto; white-space: pre-wrap; }

dl.terms dt { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; margin-top: var(--s4); scroll-margin-top: var(--s3); }
dl.terms dd { margin: var(--s1) 0 0; padding-left: var(--s3); border-left: 2px solid var(--rule); }
dl.terms dd p:last-child { margin-bottom: 0; }
.see { font-size: 0.92rem; color: var(--ink-soft); }
.letters { display: flex; flex-wrap: wrap; gap: var(--s1); list-style: none; padding: 0; }
.letters a { display: inline-block; min-width: 2.2rem; text-align: center; border: 1px solid var(--rule); padding: var(--s1); text-decoration: none; border-radius: var(--radius); background: #fff; }

.strip { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0; border: 1px solid var(--rule); border-radius: var(--radius); background: #fff; }
.strip li { margin: 0; padding: var(--s3); border-bottom: 1px solid var(--rule); border-right: 1px solid var(--rule); }
.strip strong { display: block; font-family: var(--serif); }

.table-wrap { overflow-x: auto; margin: var(--s4) 0; }
table { border-collapse: collapse; width: 100%; font-size: 0.97rem; background: #fff; }
caption { text-align: left; font-weight: 600; padding-bottom: var(--s2); }
th, td { border: 1px solid var(--rule); padding: var(--s2) var(--s3); text-align: left; vertical-align: top; }
thead th { background: var(--paper-2); }

ul.checklist { list-style: none; padding-left: 0; }
ul.checklist li { padding-left: 1.8rem; position: relative; }
ul.checklist li::before { content: ""; position: absolute; left: 0; top: 0.3em; width: 1rem; height: 1rem; border: 2px solid var(--plum); border-radius: 2px; }

details { border: 1px solid var(--rule); border-radius: var(--radius); margin-bottom: var(--s2); background: #fff; }
summary { cursor: pointer; padding: var(--s3); font-weight: 600; }
details > div { padding: 0 var(--s3) var(--s3); }
details > div > :last-child { margin-bottom: 0; }

.related { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: var(--s3); }
.related li { margin: 0; border-top: 3px solid var(--plum); background: #fff; padding: var(--s3); border-left: 1px solid var(--rule); border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.related a { font-family: var(--serif); font-weight: 600; font-size: 1.08rem; }
.related p { margin: var(--s1) 0 0; font-size: 0.95rem; color: var(--ink-soft); }

/* Footer */
.site-footer { background: var(--ink); color: #f1ebe0; font-size: 0.95rem; }
.site-footer a { color: #f3d9a4; }
.site-footer a:hover { color: #fff; }
.footer-inner { max-width: 72rem; margin: 0 auto; padding: var(--s5) 1rem; }
.footer-inner p { margin: 0 0 var(--s2); }
.footer-name { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; }
.footer-publisher { font-style: normal; margin-bottom: var(--s3); }
.footer-publisher span { display: block; }
.footer-links a { white-space: nowrap; }
.footer-tm { max-width: 52rem; color: #d9d0c2; }
