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

:root {
  --paper: #faf7f0;
  --oat: #efe7d7;
  --oat-deep: #e3d8c3;
  --charcoal: #22262b;
  --charcoal-soft: #41474e;
  --steel: #2a567a;
  --steel-deep: #1d3e59;
  --rule: #cfc5b1;
  --radius: 8px;
  --measure: 660px;
  --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 {
  font-size: 100%;
  -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;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--charcoal);
  color: var(--paper);
  padding: 0.6rem 1rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  z-index: 100;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  left: 0;
}

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

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

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

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

.site-mark:hover,
.site-mark:focus { color: var(--steel-deep); }

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

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

.site-nav a {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--charcoal);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

.site-nav a:hover,
.site-nav a:focus,
.site-nav a[aria-current="page"] {
  color: var(--steel-deep);
  border-bottom-color: var(--steel);
}

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

main {
  display: block;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.2rem 1.1rem 3rem;
}

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

/* On wide screens the side margin carries the step number. */
.step-aside {
  display: none;
}

@media (min-width: 1100px) {
  .has-step-aside { position: relative; }
  .step-aside {
    display: block;
    position: absolute;
    left: calc(50% - 560px);
    top: 2.4rem;
    width: 160px;
    font-family: var(--sans);
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--charcoal-soft);
    text-transform: uppercase;
    letter-spacing: 0.09em;
  }
  .step-aside strong {
    display: block;
    font-size: 2.4rem;
    line-height: 1;
    letter-spacing: 0;
    color: var(--oat-deep);
    margin-bottom: 0.3rem;
  }
}

/* ---------- typography ---------- */

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

h1 {
  font-size: 1.85rem;
  margin-top: 0.4rem;
  letter-spacing: -0.01em;
}

h2 { font-size: 1.3rem; margin-top: 2.4rem; }
h3 { font-size: 1.08rem; margin-top: 1.8rem; }
h4 { font-size: 0.98rem; margin-top: 1.4rem; }

p { margin: 0 0 1.1rem; }

a {
  color: var(--steel-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

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

.lede {
  font-size: 1.13rem;
  color: var(--charcoal);
}

.muted {
  color: var(--charcoal-soft);
  font-size: 0.95rem;
}

ul, ol { margin: 0 0 1.1rem; padding-left: 1.35rem; }
li { margin-bottom: 0.5rem; }

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

code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: var(--oat);
  padding: 0.05em 0.3em;
  border-radius: 4px;
}

/* ---------- step indicator ---------- */

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

/* ---------- blocks with a coloured left rule ---------- */

.callout,
.checklist,
.disclosure,
.example,
.procedure,
.before-you-move-on,
.timeline,
.glossary {
  border-left: 4px solid var(--steel);
  background: #fffdf8;
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem 0.6rem;
  margin: 1.8rem 0;
}

.checklist { border-left-color: var(--charcoal); }
.example { border-left-color: var(--oat-deep); background: var(--oat); }
.before-you-move-on { border-left-color: var(--steel-deep); background: var(--oat); }
.glossary { border-left-color: var(--charcoal-soft); }

.callout h2, .callout h3,
.checklist h2, .checklist h3,
.example h2, .example h3,
.procedure h2, .procedure h3,
.before-you-move-on h2, .before-you-move-on h3,
.timeline h2, .timeline h3,
.glossary h2, .glossary h3 {
  margin-top: 0;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
}

.disclosure {
  border-left-color: var(--steel-deep);
  background: var(--oat);
  font-size: 1rem;
}

.disclosure p:last-child { margin-bottom: 0.5rem; }

/* ---------- printed checklist boxes (static, no state) ---------- */

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

.checklist ul li,
.print-list li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.7rem;
}

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

/* ---------- affiliate note beside every affiliate link ---------- */

.aff-note {
  display: block;
  font-family: var(--sans);
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--charcoal-soft);
  margin-top: 0.35rem;
}

/* ---------- tables ---------- */

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

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

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

th {
  font-family: var(--sans);
  font-size: 0.9rem;
  background: var(--oat);
}

/* ---------- definition lists ---------- */

dl.checked dt {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.97rem;
  margin-top: 1rem;
}

dl.checked dd {
  margin: 0.25rem 0 0;
}

/* ---------- contents list ---------- */

.contents {
  background: var(--oat);
  border-radius: var(--radius);
  padding: 1rem 1.2rem 0.6rem;
  margin: 1.6rem 0 2.2rem;
}

.contents h2 {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--charcoal-soft);
}

.contents ol { margin-bottom: 0.6rem; }

/* ---------- step list on the homepage ---------- */

.step-list {
  counter-reset: none;
  padding-left: 1.4rem;
}

.step-list li { margin-bottom: 0.9rem; }

.step-list a {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
}

.step-list span {
  display: block;
  font-size: 0.98rem;
  color: var(--charcoal-soft);
}

/* ---------- previous / next ---------- */

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

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

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

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

/* ---------- inline illustration ---------- */

.figure {
  margin: 2rem 0;
}

.figure svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--rule);
  background: #fffdf8;
}

.figure figcaption {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--charcoal-soft);
  margin-top: 0.5rem;
}

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

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

.footer-inner {
  max-width: 920px;
  margin: 0 auto;
  padding: 1.8rem 1.1rem 2.4rem;
}

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

.footer-links {
  margin: 0 0 0.9rem;
}

.footer-links a { white-space: nowrap; }

.footer-notice {
  margin: 0 0 0.9rem;
  max-width: 62ch;
}

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

/* ---------- responsive ---------- */

@media (max-width: 640px) {
  body { font-size: 1.02rem; }
  h1 { font-size: 1.55rem; }
  .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.2rem;
    padding: 0.6rem 0 0.2rem;
  }
  .site-nav a {
    display: block;
    padding: 0.5rem 0;
  }
}

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

@media print {
  :root { --paper: #ffffff; }
  body {
    background: #ffffff;
    color: #000000;
    font-size: 11.5pt;
    line-height: 1.5;
  }
  .site-header,
  .site-nav,
  .skip-link,
  .print-button,
  .no-print,
  .step-nav { display: none !important; }
  .wrap, .wrap-wide { max-width: none; padding: 0; }
  a { color: #000000; text-decoration: none; }
  .checklist a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
  .checklist,
  .callout,
  .example,
  .procedure {
    border-left: 2px solid #000000;
    background: #ffffff;
    break-inside: avoid;
    page-break-inside: avoid;
    padding: 0.5rem 0.7rem;
  }
  .checklist ul li::before,
  .print-list li::before {
    border-color: #000000;
    background: #ffffff;
  }
  h2 { page-break-after: avoid; }
  .site-footer {
    background: #ffffff;
    border-top: 1px solid #000000;
    font-size: 9pt;
  }
}
