/* Calm Thesis — shared stylesheet. First-party only, no external requests. */

:root {
  --ink: #22262a;
  --ink-soft: #3d444b;
  --paper: #faf8f3;
  --oat: #f0eade;
  --oat-deep: #e3dbca;
  --steel: #2f5068;
  --steel-deep: #1b3346;
  --rule: #cfc7b6;
  --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: 18px;
  line-height: 1.75;
}

h1, h2, h3, h4, nav, .ui, footer, .step-indicator, table th {
  font-family: var(--sans);
}

h1 { font-size: 1.95rem; line-height: 1.25; margin: 0 0 1rem; letter-spacing: -0.01em; }
h2 { font-size: 1.35rem; line-height: 1.3; margin: 2.4rem 0 0.8rem; }
h3 { font-size: 1.08rem; line-height: 1.35; margin: 1.9rem 0 0.6rem; }

p, li { font-size: 1rem; }
p { margin: 0 0 1.1rem; }

a { color: var(--steel); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: #1b3346; }

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

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

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

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

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

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

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

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

.site-nav a {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink-soft);
  text-decoration: none;
}
.site-nav a:hover, .site-nav a[aria-current="page"] {
  color: var(--steel);
  text-decoration: underline;
}

@media (max-width: 680px) {
  .menu-button { display: block; }
  .site-nav {
    display: none;
    width: 100%;
    order: 3;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul {
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.5rem 0 0.3rem;
  }
  .site-nav li { border-top: 1px solid var(--rule); }
  .site-nav a { display: block; padding: 0.6rem 0.1rem; }
  .header-inner { flex-wrap: wrap; }
}

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

main {
  display: block;
  max-width: 660px;
  margin: 0 auto;
  padding: 1.8rem 1.1rem 3rem;
}

@media (min-width: 1040px) {
  main { max-width: 660px; }
  .step-indicator {
    position: relative;
  }
}

.step-indicator {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.6rem;
}

@media (min-width: 1100px) {
  body.step-page main { position: relative; }
  body.step-page .margin-number {
    position: absolute;
    left: -150px;
    top: 2.2rem;
    width: 120px;
    text-align: right;
    font-family: var(--sans);
    font-size: 3.4rem;
    line-height: 1;
    color: var(--oat-deep);
    font-weight: 700;
  }
}
.margin-number { display: none; }
@media (min-width: 1100px) { body.step-page .margin-number { display: block; } }

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

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

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

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

.link-note {
  font-size: 0.9rem;
  color: var(--ink-soft);
  font-family: var(--sans);
  margin: 0.2rem 0 1.1rem;
}

.checklist {
  border-left: 4px solid var(--steel);
  background: #fff;
  border-radius: var(--radius);
  padding: 1rem 1.2rem 1.1rem;
  margin: 1.6rem 0;
}
.checklist h2, .checklist h3 { margin-top: 0; }
.checklist ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.checklist li {
  position: relative;
  padding: 0.35rem 0 0.35rem 2.1rem;
  border-bottom: 1px solid var(--oat-deep);
}
.checklist li:last-child { border-bottom: 0; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75rem;
  width: 15px;
  height: 15px;
  border: 1.5px solid var(--steel);
  border-radius: 3px;
  background: var(--paper);
}

.contents {
  background: var(--oat);
  border-radius: var(--radius);
  padding: 0.9rem 1.2rem;
  margin: 1.4rem 0 2rem;
}
.contents h2 {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.contents ol { margin: 0; padding-left: 1.2rem; }
.contents li { margin: 0.15rem 0; }

.steps-list { padding-left: 1.3rem; }
.steps-list li { margin-bottom: 0.8rem; }
.steps-list strong { font-family: var(--sans); font-size: 0.98rem; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4rem 0;
  font-size: 0.95rem;
}
th, td {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
th { background: var(--oat); font-size: 0.9rem; }

dl.checked dt {
  font-family: var(--sans);
  font-weight: 600;
  margin-top: 1rem;
}
dl.checked dd { margin: 0.2rem 0 0; }

.glossary {
  background: var(--oat);
  border-radius: var(--radius);
  padding: 0.9rem 1.2rem;
  margin: 1.5rem 0;
}
.glossary dt { font-family: var(--sans); font-weight: 600; margin-top: 0.7rem; }
.glossary dt:first-child { margin-top: 0; }
.glossary dd { margin: 0.1rem 0 0; }

.prosandcons { display: grid; gap: 1rem; margin: 1.5rem 0; }
@media (min-width: 620px) { .prosandcons { grid-template-columns: 1fr 1fr; } }
.prosandcons section {
  border-left: 4px solid var(--steel);
  background: #fff;
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
}
.prosandcons h3 { margin-top: 0; }
.prosandcons ul { margin: 0; padding-left: 1.1rem; }

.timeline { list-style: none; margin: 1.5rem 0; padding: 0; }
.timeline li {
  border-left: 3px solid var(--oat-deep);
  padding: 0 0 1rem 1rem;
  margin: 0;
}
.timeline li strong { font-family: var(--sans); }

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

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

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

.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--oat);
  font-family: var(--sans);
  font-size: 0.88rem;
  color: var(--ink);
  line-height: 1.6;
}
.footer-inner {
  max-width: 660px;
  margin: 0 auto;
  padding: 1.6rem 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 { color: var(--steel); }
.footer-note { margin: 0 0 0.8rem; }
.footer-reviewed { margin: 0; color: var(--ink-soft); }

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

@media print {
  .site-header, .pager, .print-button, .skip-link, .contents { display: none !important; }
  body { background: #fff; font-size: 11.5pt; }
  main { max-width: 100%; padding: 0; }
  .checklist {
    border: 1px solid #666;
    border-left: 3px solid #000;
    break-inside: avoid;
    page-break-inside: avoid;
    margin: 0 0 14pt;
  }
  .checklist li::before { border-color: #000; }
  a { color: #000; text-decoration: none; }
  .site-footer { border-top: 1px solid #999; font-size: 9pt; }
  .footer-inner { padding: 8pt 0 0; }
}
