/* Pale Matrix — shared stylesheet.
   Visual identity: stable morning round. Dawn cream, rosewood, paddock green.
   No web fonts, no external requests, no monospace. */

:root {
  --bg: #f7f2ec;
  --text: #3a3230;
  --accent: #b5766a;
  --accent-2: #8c9a7e;
  --card: #ffffff;
  --rule: #e5d9cf;
  --display: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --body: Georgia, "Iowan Old Style", serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.68;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--card);
  color: var(--text);
  padding: 10px 16px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  font-family: var(--display);
  z-index: 50;
}
.skip-link:focus { left: 12px; top: 12px; }

a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover { text-decoration-thickness: 3px; }
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}
.header-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.wordmark {
  font-family: var(--display);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-decoration: none;
}
.wordmark .wordmark-sub {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav-toggle {
  display: none;
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 7px 13px;
  cursor: pointer;
}
.site-nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}
.site-nav a {
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
}

/* ---------- Layout ---------- */

main { display: block; }

.band {
  background: var(--card);
  border-bottom: 1px solid var(--rule);
}
.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}
.hero { padding: 34px 20px 38px; }

h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 34px;
  line-height: 1.22;
  margin: 14px 0 16px;
}
h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.26;
  margin: 38px 0 12px;
}
h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.3;
  margin: 26px 0 8px;
}
p { margin: 0 0 16px; }

.lede { font-size: 19px; }

section { padding: 2px 0; }

/* ---------- Fence and gate motif ---------- */

.fence {
  display: block;
  width: 100%;
  height: 26px;
  color: var(--accent-2);
}
.fence--accent { color: var(--accent); }
.fence--rule { color: var(--rule); }

/* ---------- Step number ---------- */

.step-head {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}
.step-figure {
  font-family: var(--display);
  font-weight: 600;
  font-size: 52px;
  line-height: 1;
  color: var(--accent);
  flex: 0 0 auto;
  padding-top: 8px;
}
.step-indicator {
  font-family: var(--display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin: 0 0 4px;
}

/* ---------- Cards ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 20px 22px;
  margin: 22px 0;
  box-shadow: 0 2px 10px rgba(58, 50, 48, 0.06);
}
.card h2, .card h3 { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }

.callout {
  background: var(--card);
  border: 2px dashed var(--accent);
  border-radius: 10px;
  padding: 18px 22px;
  margin: 24px 0;
}
.callout > :last-child { margin-bottom: 0; }

.disclosure {
  background: var(--card);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 18px 22px;
  margin: 24px 0;
  font-size: 18px;
}
.disclosure > :last-child { margin-bottom: 0; }
.disclosure strong { font-family: var(--display); }

.link-note {
  font-size: 16px;
  color: var(--text);
  margin: -8px 0 18px;
}

/* ---------- Lists ---------- */

ul.plain, ol.plain { padding-left: 1.3em; }
li { margin: 0 0 9px; }

ul.shoe {
  list-style: none;
  padding-left: 0;
  margin: 0 0 18px;
}
ul.shoe > li {
  position: relative;
  padding-left: 34px;
  margin-bottom: 11px;
}
ul.shoe > li .shoe-mark {
  position: absolute;
  left: 0;
  top: 5px;
  width: 18px;
  height: 18px;
  color: var(--accent-2);
}

ol.steps-list {
  counter-reset: stepnum;
  list-style: none;
  padding-left: 0;
}
ol.steps-list > li {
  counter-increment: stepnum;
  position: relative;
  padding-left: 44px;
  margin-bottom: 16px;
}
ol.steps-list > li::before {
  content: counter(stepnum);
  position: absolute;
  left: 0;
  top: -2px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 22px;
  color: var(--accent);
}
ol.steps-list .steps-list-title {
  font-family: var(--display);
  font-weight: 600;
}

/* ---------- Checklist cards ---------- */

.checklist {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 22px 24px;
  margin: 26px 0;
  box-shadow: 0 2px 10px rgba(58, 50, 48, 0.06);
}
.checklist h2, .checklist h3 { margin-top: 0; }
.checklist .checklist-kicker {
  font-family: var(--display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin: 0 0 6px;
}
ul.ticks {
  list-style: none;
  padding-left: 0;
  margin: 0;
}
ul.ticks > li {
  position: relative;
  padding-left: 42px;
  margin-bottom: 14px;
}
ul.ticks > li .tick-box {
  position: absolute;
  left: 0;
  top: 2px;
  width: 24px;
  height: 24px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--bg);
}
ul.ticks > li .tick-box svg {
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  color: var(--accent-2);
}

/* ---------- Tables ---------- */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 17px;
}
caption {
  text-align: left;
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  color: var(--accent-2);
  padding-bottom: 8px;
}
th, td {
  border: 1px solid var(--rule);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
th {
  font-family: var(--display);
  font-weight: 600;
  background: var(--card);
}

/* ---------- Glossary strip ---------- */

dl.glossary { margin: 20px 0; }
dl.glossary dt {
  font-family: var(--display);
  font-weight: 600;
  margin-top: 14px;
}
dl.glossary dd { margin: 4px 0 0; }

/* ---------- Contents + pager ---------- */

.contents ol { padding-left: 1.2em; }
.contents li { margin-bottom: 6px; }

.pager {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  border-top: 1px solid var(--rule);
  padding-top: 18px;
  margin-top: 34px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 16px;
}

.print-button {
  font-family: var(--display);
  font-weight: 600;
  font-size: 16px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 10px 18px;
  cursor: pointer;
}
.print-button:hover { border-color: var(--accent); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--card);
  margin-top: 50px;
  padding: 28px 20px 40px;
  font-size: 16px;
  line-height: 1.6;
}
.footer-inner { max-width: 720px; margin: 0 auto; }
.footer-publisher {
  font-style: normal;
  margin: 0 0 14px;
}
.footer-publisher .footer-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 17px;
  display: block;
}
.footer-links { margin: 0 0 14px; }
.footer-notice { margin: 0 0 12px; }
.footer-reviewed { margin: 0; color: var(--text); }

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  body { font-size: 17px; }
  h1 { font-size: 28px; }
  h2 { font-size: 21px; }
  .step-figure { font-size: 40px; }
  .nav-toggle { display: inline-block; }
  .site-nav {
    display: none;
    width: 100%;
    flex-basis: 100%;
  }
  .site-nav.is-open { display: block; }
  .header-inner { flex-wrap: wrap; }
  .site-nav ul {
    flex-direction: column;
    gap: 2px;
    padding: 8px 0 4px;
  }
  .site-nav li { margin: 0; }
  .site-nav a { display: block; padding: 8px 0; }
}

/* ---------- Print ---------- */

@media print {
  body {
    background: #ffffff;
    color: #000000;
    font-size: 12pt;
  }
  .site-header,
  .site-nav,
  .nav-toggle,
  .skip-link,
  .print-button,
  .pager,
  .fence { display: none !important; }
  .band { background: #ffffff; border: 0; }
  a { text-decoration: none; color: #000000; }
  .card, .checklist, .callout, .disclosure {
    box-shadow: none;
    border: 1px solid #999999;
    break-inside: avoid;
    page-break-inside: avoid;
    background: #ffffff;
  }
  ul.ticks > li .tick-box { border: 1px solid #000000; background: #ffffff; }
  ul.ticks > li .tick-box svg { display: none; }
  h2 { page-break-after: avoid; }
  .site-footer { border-top: 1px solid #999999; background: #ffffff; }
}
