/* Solid Theory — shared stylesheet.
   Palette: steel blue, oat, charcoal. No web fonts, no external requests. */

:root {
  --ink: #23262a;
  --ink-soft: #4a5057;
  --paper: #faf8f4;
  --oat: #ece5d8;
  --oat-deep: #ddd3c0;
  --steel: #2f5d7c;
  --steel-dark: #234961;
  --rule: #cfc6b4;
  --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: 19px;
  line-height: 1.72;
  overflow-wrap: break-word;
}

h1, h2, h3, h4, .nav, .brand, .menu-btn, .step-mark, .crumb, .kicker, table, .btn, .foot {
  font-family: var(--sans);
}

h1 {
  font-size: 2rem;
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin: 0 0 0.6rem;
}

h2 {
  font-size: 1.38rem;
  line-height: 1.3;
  margin: 2.6rem 0 0.7rem;
}

h3 {
  font-size: 1.1rem;
  line-height: 1.35;
  margin: 1.9rem 0 0.5rem;
}

p { margin: 0 0 1.1rem; }

a { color: var(--steel-dark); }

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--steel);
  outline-offset: 2px;
  border-radius: 3px;
}

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

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

.skip:focus {
  left: 0;
  color: #fff;
}

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

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

.head-in {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0.55rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}

.menu-btn {
  display: none;
  font-size: 0.9rem;
  padding: 0.35rem 0.7rem;
  background: var(--oat);
  color: var(--ink);
  border: 1px solid var(--oat-deep);
  border-radius: var(--radius);
  cursor: pointer;
}

.nav {
  display: flex;
  gap: 1.1rem;
}

.nav a {
  font-size: 0.93rem;
  text-decoration: none;
  color: var(--ink-soft);
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.nav a:hover { color: var(--steel-dark); border-bottom-color: var(--steel); }

/* ---------- layout ---------- */

.shell {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 1.1rem;
  position: relative;
}

main {
  max-width: 660px;
  margin: 0 auto;
  padding: 2.2rem 0 3rem;
}

.step-mark {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.5rem;
}

.lede { font-size: 1.07rem; }

/* side margin step numbers on wide screens */
.rail {
  display: none;
  position: absolute;
  left: 0;
  top: 2.4rem;
  width: 120px;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.rail ol { margin: 0; padding-left: 1.1rem; }
.rail li { margin-bottom: 0.5rem; line-height: 1.35; }
.rail .here { color: var(--steel-dark); font-weight: 700; }

@media (min-width: 1080px) {
  .rail { display: block; }
}

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

.disclose,
.callout,
.checklist,
.example,
.recap,
.procedure {
  border-left: 4px solid var(--steel);
  background: #fff;
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin: 1.8rem 0;
}

.disclose {
  border-left-color: #8a6f3a;
  background: var(--oat);
}

.disclose p { margin-bottom: 0.6rem; }
.disclose p:last-child { margin-bottom: 0; }

.callout { border-left-color: #8a6f3a; background: #fdfbf6; }
.example { border-left-color: var(--oat-deep); background: #fdfbf6; }
.recap { border-left-color: var(--ink-soft); background: #fdfbf6; }
.checklist { border-left-color: var(--steel); background: #fff; }

.box-head {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.5rem;
}

.callout h3, .checklist h3, .example h3, .recap h3, .procedure h3 { margin-top: 0.3rem; }

/* ---------- checklists ---------- */

.checklist ul { list-style: none; margin: 0; padding: 0; }

.checklist li {
  position: relative;
  padding-left: 2.1rem;
  margin-bottom: 0.85rem;
  line-height: 1.6;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 1.05rem;
  height: 1.05rem;
  border: 2px solid var(--steel);
  border-radius: 3px;
  background: #fff;
}

.checklist li:last-child { margin-bottom: 0; }

.print-btn {
  font-family: var(--sans);
  font-size: 0.9rem;
  padding: 0.5rem 0.95rem;
  background: var(--steel-dark);
  color: #fff;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
}

.print-btn:hover { background: var(--steel); }

/* ---------- misc units ---------- */

.glossary {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 1rem 0;
  margin: 1.8rem 0;
}

.glossary dt { font-family: var(--sans); font-weight: 700; font-size: 0.95rem; margin-top: 0.7rem; }
.glossary dd { margin: 0.15rem 0 0; }

.proscons { display: grid; gap: 1rem; margin: 1.8rem 0; }

@media (min-width: 640px) {
  .proscons { grid-template-columns: 1fr 1fr; }
}

.proscons > div {
  background: #fff;
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  border-left: 4px solid var(--oat-deep);
}

.proscons ul { margin: 0; padding-left: 1.1rem; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
  margin: 1.6rem 0;
}

th, td {
  text-align: left;
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

th { background: var(--oat); }

.toc {
  background: var(--oat);
  border-radius: var(--radius);
  padding: 0.9rem 1.2rem;
  margin: 1.6rem 0 2rem;
}

.toc p { font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 0.4rem; }
.toc ol { margin: 0; padding-left: 1.3rem; }
.toc li { margin-bottom: 0.25rem; }

.steplist { padding-left: 1.4rem; }
.steplist li { margin-bottom: 0.9rem; }
.steplist a { font-weight: 700; }

.aff-note {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin: 0.35rem 0 1.4rem;
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--rule);
  margin-top: 2.6rem;
  padding-top: 1.2rem;
  font-family: var(--sans);
  font-size: 0.93rem;
}

.figure {
  margin: 1.8rem 0;
  text-align: center;
}

.figure figcaption {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 0.4rem;
}

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

.foot {
  border-top: 1px solid var(--rule);
  background: var(--oat);
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--ink);
}

.foot-in {
  max-width: 1040px;
  margin: 0 auto;
  padding: 1.6rem 1.1rem 2.2rem;
}

.foot address {
  font-style: normal;
  margin: 0 0 0.8rem;
}

.foot-links { margin: 0 0 0.7rem; }
.foot-links a { margin-right: 0.3rem; }
.foot p { margin: 0 0 0.6rem; }
.foot p:last-child { margin-bottom: 0; }

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

@media (max-width: 719px) {
  body { font-size: 18px; }
  h1 { font-size: 1.6rem; }
  .menu-btn { display: inline-block; }
  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0;
    padding-bottom: 0.4rem;
  }
  .nav.open { display: flex; }
  .nav a { padding: 0.55rem 0; border-bottom: 1px solid var(--oat-deep); }
}

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

@media print {
  body { background: #fff; font-size: 12pt; }
  .site-head, .foot, .print-btn, .pager, .toc, .rail, .skip { display: none !important; }
  main { max-width: none; padding: 0; }
  .checklist, .callout, .example, .recap, .procedure {
    border: 1px solid #999;
    border-left: 3px solid #333;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .checklist li::before { border-color: #333; }
  h2 { page-break-after: avoid; }
  a[href]::after { content: ""; }
}
