/* Valid Layer — shared stylesheet. Palette: steel blue, oat, charcoal. */

:root {
  --steel: #2f4f68;
  --steel-deep: #22394b;
  --oat: #f4efe4;
  --oat-soft: #faf7f0;
  --charcoal: #22262a;
  --charcoal-soft: #444a50;
  --rule: #d8d0bf;
  --radius: 8px;
  --column: 660px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--oat-soft);
  color: var(--charcoal);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  font-size: 1.0625rem;
  line-height: 1.7;
}

h1, h2, h3, h4, nav, .ui, footer, .step-indicator, .checklist h3 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

h1 {
  font-size: 1.85rem;
  line-height: 1.25;
  margin: 0 0 0.6em;
  color: var(--steel-deep);
}

h2 {
  font-size: 1.3rem;
  line-height: 1.3;
  margin: 2.2em 0 0.5em;
  color: var(--steel-deep);
}

h3 {
  font-size: 1.08rem;
  margin: 1.8em 0 0.4em;
  color: var(--charcoal);
}

p, li { max-width: 100%; }
p { margin: 0 0 1.1em; }

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

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

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

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

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

.header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0.55rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-mark {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
  color: var(--steel-deep);
  text-decoration: none;
}
.site-mark span { font-weight: 400; color: var(--charcoal-soft); }

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  color: var(--charcoal);
  font-size: 0.95rem;
  padding: 0.35em 0.7em;
  cursor: pointer;
}

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

.site-nav a {
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--charcoal-soft);
  padding: 0.2em 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--steel-deep);
  border-bottom-color: var(--steel);
}

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

main {
  max-width: var(--column);
  margin: 0 auto;
  padding: 1.6rem 1.1rem 3rem;
}

.wide {
  max-width: 900px;
}

.step-indicator {
  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;
  color: var(--charcoal);
}

/* ---------- disclosure ---------- */

.disclosure {
  border-left: 5px solid var(--steel);
  background: var(--oat);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  margin: 1.6rem 0;
}
.disclosure p { margin: 0 0 0.7em; }
.disclosure p:last-child { margin-bottom: 0; }

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

.aff-line {
  border-left: 5px solid var(--steel);
  background: var(--oat);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  margin: 1.4rem 0;
}
.aff-line p { margin: 0; }

/* ---------- callouts, checklists ---------- */

.callout {
  border-left: 5px solid var(--steel-deep);
  background: var(--oat);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  margin: 1.6rem 0;
}
.callout h3 { margin-top: 0; }
.callout p:last-child, .callout ul:last-child, .callout ol:last-child { margin-bottom: 0; }

.checklist {
  border-left: 5px solid var(--steel);
  background: #fff;
  border: 1px solid var(--rule);
  border-left: 5px solid var(--steel);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin: 1.8rem 0;
}
.checklist h2, .checklist h3 { margin-top: 0.2em; }

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

.checklist li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.8em;
}

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

.glossary {
  background: var(--oat);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  margin: 1.6rem 0;
  font-size: 0.98rem;
}
.glossary dt { font-weight: 700; margin-top: 0.7em; }
.glossary dd { margin: 0.1em 0 0; color: var(--charcoal-soft); }

dl.checked dt { font-weight: 700; margin-top: 0.9em; }
dl.checked dd { margin: 0.1em 0 0; }

table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.4rem 0;
  font-size: 0.97rem;
}
th, td {
  border: 1px solid var(--rule);
  padding: 0.5em 0.65em;
  text-align: left;
  vertical-align: top;
}
th { background: var(--oat); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }

.contents {
  background: var(--oat);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem 0.9rem 2rem;
  margin: 1.5rem 0;
  font-size: 0.98rem;
}
.contents li { margin-bottom: 0.3em; }

.steplist { padding-left: 1.3rem; }
.steplist li { margin-bottom: 0.75em; }

.pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--rule);
  margin-top: 2.4rem;
  padding-top: 1.1rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 0.95rem;
}

.print-button {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--steel);
  color: #fff;
  border: 0;
  border-radius: var(--radius);
  padding: 0.55em 1.1em;
  font-size: 0.95rem;
  cursor: pointer;
}
.print-button:hover { background: var(--steel-deep); }

figure.diagram {
  margin: 1.6rem 0;
  padding: 0;
}
figure.diagram figcaption {
  font-size: 0.92rem;
  color: var(--charcoal-soft);
  margin-top: 0.4em;
}

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

.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--oat);
  margin-top: 2rem;
}
.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 1.1rem 2.2rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 0.9rem;
  color: var(--charcoal-soft);
  line-height: 1.65;
}
.footer-inner .publisher { margin: 0 0 0.9rem; }
.footer-inner .publisher strong { color: var(--charcoal); }
.footer-inner .footer-links { margin: 0 0 0.9rem; }
.footer-inner a { color: var(--steel); }
.footer-inner .trademark { margin: 0 0 0.9rem; max-width: 60ch; }
.footer-inner .reviewed { margin: 0; }

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

@media (min-width: 1100px) {
  main.step-page { position: relative; }
  main.step-page::before {
    content: attr(data-step-number);
    position: absolute;
    left: -5.5rem;
    top: 1.9rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 3.4rem;
    font-weight: 700;
    color: var(--rule);
    line-height: 1;
  }
}

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

@media (max-width: 620px) {
  .menu-toggle { display: inline-block; }
  .site-nav { display: none; width: 100%; }
  .site-nav.open { display: block; }
  .header-inner { flex-wrap: wrap; }
  .site-nav ul { flex-direction: column; gap: 0.1rem; padding: 0.5rem 0 0.3rem; }
  .site-nav a { display: block; padding: 0.45em 0; }
  h1 { font-size: 1.55rem; }
}

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

@media print {
  .site-header, .pager, .print-button, .skip-link, .site-nav { display: none !important; }
  body { background: #fff; color: #000; font-size: 11.5pt; }
  main { max-width: 100%; padding: 0; }
  .checklist {
    border: 1px solid #000;
    border-left: 3px solid #000;
    break-inside: avoid;
    page-break-inside: avoid;
    margin: 0 0 14pt;
    background: #fff;
  }
  .checklist li::before { border-color: #000; }
  .disclosure, .callout, .glossary { background: #fff; border-left: 2px solid #000; }
  a { color: #000; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; word-break: break-all; }
  .site-footer { border-top: 1px solid #000; }
}
