/* PureScale Online — single stylesheet. No web fonts, no external requests. */

:root {
  --paper: #fbf9f5;
  --oat: #f1ece1;
  --oat-deep: #e4dccb;
  --charcoal: #26292d;
  --charcoal-soft: #4a5057;
  --steel: #2d5a78;
  --steel-deep: #1f4057;
  --rule: #d6cfc0;
  --radius: 8px;
  --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;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--charcoal);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.72;
  overflow-wrap: break-word;
}

/* ---------- Skip link ---------- */

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

.skip:focus { left: 0; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--oat);
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
}

.bar {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.6rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

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

.brand:hover { color: var(--steel-deep); }

.menu-toggle {
  display: none;
  font-family: var(--sans);
  font-size: 0.95rem;
  background: var(--paper);
  color: var(--charcoal);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.4rem 0.8rem;
  cursor: pointer;
}

#primary-nav ul {
  list-style: none;
  display: flex;
  gap: 1.2rem;
  margin: 0;
  padding: 0;
}

#primary-nav a {
  color: var(--charcoal);
  text-decoration: none;
  font-size: 0.97rem;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

#primary-nav a:hover,
#primary-nav a:focus { border-bottom-color: var(--steel); color: var(--steel-deep); }

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

main { display: block; }

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

.wrap-wide { max-width: 860px; }

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

h1 { font-size: 1.95rem; margin-top: 0.4rem; letter-spacing: -0.01em; }
h2 { font-size: 1.35rem; margin-top: 2.6rem; }
h3 { font-size: 1.1rem; margin-top: 1.8rem; }
h4 { font-size: 1rem; margin-top: 1.4rem; }

p { margin: 0 0 1.1rem; }

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

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

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

hr { border: 0; border-top: 1px solid var(--rule); margin: 2.4rem 0; }

/* ---------- Step indicator and hero ---------- */

.step-indicator {
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--charcoal-soft);
  margin: 0 0 0.5rem;
}

.lede { font-size: 1.12rem; }

/* ---------- Boxes ---------- */

.disclosure,
.callout,
.checklist,
.example,
.proscons,
.glossary,
.before-you-go {
  border-left: 4px solid var(--steel);
  background: var(--oat);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  margin: 1.8rem 0;
}

.callout { border-left-color: var(--charcoal-soft); }
.example { border-left-color: var(--oat-deep); background: #f7f4ec; }
.glossary { border-left-color: var(--steel-deep); background: #f7f4ec; }
.before-you-go { border-left-color: var(--charcoal); }

.disclosure p:last-child,
.callout p:last-child,
.checklist :last-child,
.example p:last-child,
.glossary dd:last-child,
.before-you-go :last-child { margin-bottom: 0; }

.box-title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--charcoal-soft);
  margin: 0 0 0.5rem;
}

/* ---------- Checklists with printed boxes ---------- */

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

.checklist li {
  position: relative;
  padding-left: 1.9rem;
  margin-bottom: 0.7rem;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 1rem;
  height: 1rem;
  border: 1.5px solid var(--charcoal-soft);
  border-radius: 2px;
  background: var(--paper);
}

/* ---------- Pros and cons ---------- */

.proscons ul { margin-bottom: 1rem; }
.proscons h4 { margin-top: 0.6rem; }

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

.glossary dt { font-family: var(--sans); font-weight: 700; font-size: 0.97rem; margin-top: 0.8rem; }
.glossary dd { margin: 0.2rem 0 0; }

/* ---------- Affiliate links ---------- */

.aff {
  font-family: var(--sans);
  font-size: 0.95rem;
  background: #f7f4ec;
  border-left: 4px solid var(--steel-deep);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  margin: 1.6rem 0;
}

.aff a { font-weight: 700; }

.aff-note { display: block; margin-top: 0.35rem; color: var(--charcoal-soft); font-size: 0.88rem; }

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

table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 0.95rem;
  margin: 1.4rem 0 1.8rem;
}

caption {
  text-align: left;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--charcoal-soft);
  padding-bottom: 0.5rem;
}

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

th { font-weight: 700; }

/* ---------- Contents list ---------- */

.contents {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin: 1.6rem 0 2rem;
  font-family: var(--sans);
  font-size: 0.95rem;
}

.contents ol { margin-bottom: 0; }

/* ---------- Step list on the homepage ---------- */

.step-list { counter-reset: none; }
.step-list li { margin-bottom: 0.9rem; }
.step-list a { font-family: var(--sans); font-weight: 700; }

/* ---------- Prev / next ---------- */

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

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

.print-button {
  font-family: var(--sans);
  font-size: 0.95rem;
  background: var(--steel-deep);
  color: #fff;
  border: 0;
  border-radius: var(--radius);
  padding: 0.6rem 1.1rem;
  cursor: pointer;
}

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

/* ---------- Decorative rule illustration ---------- */

.divider-art { display: block; margin: 2.2rem auto; }

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

.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--oat);
  font-family: var(--sans);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--charcoal);
}

.footer-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem 1.1rem 2.6rem;
}

.footer-inner address { font-style: normal; margin: 0 0 0.9rem; }

.footer-name { font-weight: 700; }

.footer-links { margin: 0 0 0.9rem; }
.footer-links a { color: var(--steel-deep); }

.footer-notice { margin: 0 0 0.9rem; color: var(--charcoal-soft); max-width: 62ch; }

.footer-reviewed { margin: 0; color: var(--charcoal-soft); }

/* ---------- Narrow screens ---------- */

@media (max-width: 720px) {
  .menu-toggle { display: inline-block; }
  #primary-nav { display: none; width: 100%; }
  #primary-nav.open { display: block; }
  #primary-nav ul { flex-direction: column; gap: 0.2rem; padding-bottom: 0.4rem; }
  #primary-nav a { display: block; padding: 0.5rem 0; }
  h1 { font-size: 1.6rem; }
}

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

@media (min-width: 1100px) {
  .margin-number {
    position: absolute;
    left: calc(50% - 560px);
    width: 180px;
    text-align: right;
    font-family: var(--sans);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--charcoal-soft);
  }
  .wrap { position: relative; }
}

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

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

@media print {
  body { background: #fff; color: #000; font-size: 11.5pt; }
  .site-header, .pager, .print-button, .skip, .contents, .aff { display: none; }
  .wrap { max-width: none; padding: 0; }
  .checklist, .callout, .example, .glossary, .disclosure, .before-you-go {
    background: #fff;
    border: 1px solid #666;
    border-left: 3px solid #000;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .checklist li::before { border-color: #000; }
  h2 { page-break-after: avoid; break-after: avoid; }
  .site-footer { border-top: 1px solid #000; font-size: 9pt; }
  a { color: #000; text-decoration: none; }
}
