/* Bare Canvas — shared stylesheet. No web fonts, no external requests. */

:root {
  --paper: #fbfaf7;
  --oat: #efe9dd;
  --oat-deep: #e3dbc9;
  --steel: #2d5a78;
  --steel-deep: #21445a;
  --charcoal: #22262b;
  --ink: #2b3036;
  --muted: #4d545c;
  --rule: #cfc8ba;
  --radius: 8px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.72;
}

.wrap {
  width: 100%;
  max-width: 660px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

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

a { color: var(--steel-deep); }
a:hover { color: var(--charcoal); }

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

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

.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 56px;
  flex-wrap: wrap;
}

.brand {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--charcoal);
}

.menu-btn {
  display: none;
  font-family: var(--sans);
  font-size: 0.92rem;
  background: var(--oat);
  color: var(--charcoal);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.35rem 0.75rem;
  cursor: pointer;
}

.site-nav ul {
  display: flex;
  gap: 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  font-family: var(--sans);
  font-size: 0.94rem;
  text-decoration: none;
  color: var(--muted);
}
.site-nav a:hover { color: var(--charcoal); text-decoration: underline; }

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

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

h1, h2, h3, h4 {
  font-family: var(--sans);
  color: var(--charcoal);
  line-height: 1.28;
  margin: 2rem 0 0.6rem;
}

h1 { font-size: 1.72rem; margin-top: 0.4rem; letter-spacing: -0.01em; }
h2 { font-size: 1.26rem; margin-top: 2.4rem; }
h3 { font-size: 1.06rem; margin-top: 1.7rem; }
h4 { font-size: 0.98rem; margin-top: 1.4rem; }

p { margin: 0 0 1.05rem; }

ul, ol { margin: 0 0 1.15rem; padding-left: 1.3rem; }
li { margin-bottom: 0.45rem; }

.lede { font-size: 1.14rem; color: var(--ink); }

.step-mark {
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.3rem;
}

/* ---------- blocks ---------- */

.disclosure,
.callout,
.checklist,
.example,
.procedure,
.recap,
.glossary {
  border-left: 4px solid var(--steel);
  background: var(--oat);
  border-radius: var(--radius);
  padding: 1rem 1.1rem 0.4rem;
  margin: 1.6rem 0;
}

.disclosure { border-left-color: var(--charcoal); }
.example { border-left-color: var(--oat-deep); background: #f6f3ec; }
.recap { border-left-color: var(--steel-deep); }
.glossary { border-left-color: var(--muted); }

.disclosure h2,
.callout h2,
.checklist h2,
.example h2,
.procedure h2,
.recap h2,
.glossary h2,
.disclosure h3,
.callout h3,
.checklist h3,
.example h3,
.procedure h3,
.recap h3,
.glossary h3 { margin-top: 0.2rem; }

.checklist ol, .checklist ul { padding-left: 0; list-style: none; }
.checklist li {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  margin-bottom: 0.6rem;
}
.checklist li::before {
  content: "";
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-top: 0.42rem;
  border: 1.5px solid var(--charcoal);
  border-radius: 2px;
  background: #fff;
}

.paid-note {
  font-family: var(--sans);
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0.3rem 0 1.1rem;
}

.steps-list { counter-reset: none; }
.steps-list li { margin-bottom: 0.8rem; }

.stepnav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--rule);
  margin-top: 2.5rem;
  padding-top: 1.1rem;
  font-family: var(--sans);
  font-size: 0.94rem;
}

.toc {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem 0.4rem;
  margin: 1.4rem 0 2rem;
}
.toc h2 {
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 0 0 0.5rem;
  color: var(--muted);
}
.toc ul { list-style: none; padding-left: 0; }
.toc li { margin-bottom: 0.35rem; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.3rem 0 1.6rem;
  font-size: 0.98rem;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid var(--rule);
}
th { font-family: var(--sans); font-size: 0.9rem; color: var(--charcoal); }

dl { margin: 0 0 1.2rem; }
dt { font-family: var(--sans); font-weight: 700; margin-top: 0.8rem; color: var(--charcoal); }
dd { margin: 0.2rem 0 0; }

.print-btn {
  font-family: var(--sans);
  font-size: 0.94rem;
  background: var(--steel);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 0.55rem 1rem;
  cursor: pointer;
}
.print-btn:hover { background: var(--steel-deep); }

.rule-art { display: block; margin: 2rem auto 0; }

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

.site-foot {
  border-top: 1px solid var(--rule);
  background: var(--oat);
  padding: 1.8rem 0 2.2rem;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--ink);
}
.site-foot .pub { line-height: 1.65; margin-bottom: 0.9rem; }
.site-foot .pub span:first-child { font-weight: 700; }
.site-foot .foot-links { margin-bottom: 0.9rem; }
.site-foot .tm { color: var(--muted); }
.site-foot .rev { color: var(--muted); margin-bottom: 0; }

/* ---------- small screens ---------- */

@media (max-width: 620px) {
  .menu-btn { display: inline-block; }
  .site-nav { display: none; width: 100%; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0.1rem; padding: 0.4rem 0 0.8rem; }
  .site-nav a { display: block; padding: 0.4rem 0; font-size: 1rem; }
  h1 { font-size: 1.5rem; }
}

/* ---------- wide screens: step numbers in the margin ---------- */

@media (min-width: 1040px) {
  .has-margin-mark { position: relative; }
  .margin-mark {
    position: absolute;
    left: -150px;
    top: 0.2rem;
    width: 120px;
    text-align: right;
    font-family: var(--sans);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
  }
}

@media (max-width: 1039px) {
  .margin-mark { display: none; }
}

/* ---------- print ---------- */

@media print {
  .site-head, .stepnav, .print-btn, .skip, .toc { display: none !important; }
  body { background: #fff; color: #000; font-size: 11.5pt; }
  .wrap { max-width: 100%; padding: 0; }
  .checklist, .callout, .example, .procedure, .recap, .glossary {
    background: #fff;
    border: 1px solid #000;
    border-left-width: 3px;
    page-break-inside: avoid;
  }
  .checklist li::before { border-color: #000; }
  a { color: #000; text-decoration: underline; }
  .site-foot { background: #fff; border-top: 1px solid #000; }
}
