/* Lucid Margin — shared stylesheet. No web fonts, no external requests. */

:root {
  --ink: #23262b;          /* charcoal */
  --ink-soft: #4a505a;
  --paper: #fbf7ef;        /* oat */
  --paper-deep: #f2ebdd;
  --steel: #2f5571;        /* steel blue */
  --steel-deep: #1f3b50;
  --line: #d9cfbc;
  --white: #ffffff;
  --radius: 8px;
  --column: 660px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-size: 1.0625rem;
  line-height: 1.7;
}

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

h1 { font-size: 1.9rem; line-height: 1.25; margin: 0 0 .6rem; letter-spacing: -.01em; }
h2 { font-size: 1.3rem; line-height: 1.3; margin: 2.4rem 0 .6rem; }
h3 { font-size: 1.08rem; line-height: 1.35; margin: 1.8rem 0 .4rem; }
h4 { font-size: 1rem; margin: 1.4rem 0 .3rem; }

p, li { max-width: 100%; }
p { margin: 0 0 1.05rem; }

a { color: var(--steel-deep); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--ink); }
a:focus-visible,
button:focus-visible { outline: 3px solid var(--steel); outline-offset: 2px; border-radius: 3px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--steel-deep); color: var(--white);
  padding: .6rem 1rem; z-index: 50; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

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

.site-header {
  position: sticky; top: 0; z-index: 30;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 940px; margin: 0 auto;
  padding: .55rem 1.1rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.wordmark {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 700; font-size: 1.02rem; letter-spacing: .01em;
  color: var(--ink); text-decoration: none;
}
.wordmark span { color: var(--steel); }
.menu-button {
  display: none;
  background: var(--white); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: .4rem .7rem; font-size: .9rem; cursor: pointer;
}
.site-nav ul {
  list-style: none; display: flex; gap: 1.2rem; margin: 0; padding: 0;
}
.site-nav a {
  text-decoration: none; color: var(--ink-soft); font-size: .95rem;
  padding: .25rem 0; border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current="page"] {
  color: var(--ink); border-bottom-color: var(--steel);
}

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

main { display: block; }

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

.step-indicator {
  font-size: .82rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--steel-deep); margin: 0 0 .5rem;
}

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

/* step number in the side margin on wide screens */
@media (min-width: 1100px) {
  .wrap { position: relative; }
  .margin-number {
    position: absolute; left: -7.5rem; top: 2.4rem;
    width: 6rem; text-align: right;
    font-family: system-ui, -apple-system, Arial, sans-serif;
    font-size: 3.2rem; line-height: 1; font-weight: 700;
    color: var(--line);
  }
}
@media (max-width: 1099px) { .margin-number { display: none; } }

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

.disclosure {
  border-left: 4px solid var(--steel);
  background: var(--white);
  border-radius: var(--radius);
  padding: .95rem 1.1rem;
  margin: 1.6rem 0;
}
.disclosure p:last-child { margin-bottom: 0; }
.disclosure .label {
  display: block; font-size: .78rem; letter-spacing: .09em;
  text-transform: uppercase; color: var(--steel-deep); margin-bottom: .35rem;
}

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

.checklist {
  border-left: 4px solid var(--steel);
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem; margin: 1.8rem 0;
}
.checklist h2, .checklist h3 { margin-top: 0; }
.checklist ul { list-style: none; margin: 0; padding: 0; }
.checklist li {
  position: relative; padding-left: 2rem; margin-bottom: .75rem;
}
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .42em;
  width: 1rem; height: 1rem;
  border: 1.5px solid var(--steel); border-radius: 2px;
  background: var(--paper);
}

.example {
  border-left: 4px solid var(--line);
  background: var(--white);
  border-radius: var(--radius);
  padding: .95rem 1.1rem; margin: 1.6rem 0;
}
.example h3 { margin-top: 0; }

.summary-box {
  border-left: 4px solid var(--steel-deep);
  background: var(--white);
  border-radius: var(--radius);
  padding: .95rem 1.1rem; margin: 1.8rem 0;
}
.summary-box h3 { margin-top: 0; }

.glossary {
  background: var(--paper-deep);
  border-radius: var(--radius);
  padding: 1rem 1.1rem; margin: 1.6rem 0;
}
.glossary dl { margin: 0; }
.glossary dt { font-weight: 700; margin-top: .7rem; }
.glossary dt:first-child { margin-top: 0; }
.glossary dd { margin: 0 0 .2rem; color: var(--ink-soft); }

table {
  width: 100%; border-collapse: collapse; margin: 1.4rem 0;
  font-size: .97rem;
}
caption { text-align: left; font-size: .88rem; color: var(--ink-soft); margin-bottom: .4rem; }
th, td { border: 1px solid var(--line); padding: .55rem .6rem; text-align: left; vertical-align: top; }
th { background: var(--paper-deep); font-family: system-ui, -apple-system, Arial, sans-serif; font-size: .9rem; }

ol.procedure { padding-left: 1.3rem; }
ol.procedure li { margin-bottom: .7rem; }

ul.plain { list-style: none; padding: 0; }
ul.plain li { margin-bottom: .6rem; }

.steps-list { padding-left: 1.3rem; }
.steps-list li { margin-bottom: .8rem; }
.steps-list a { font-weight: 700; }

.affiliate-note {
  display: block; font-size: .88rem; color: var(--ink-soft); margin-top: .3rem;
}

.pager {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  border-top: 1px solid var(--line); margin-top: 2.6rem; padding-top: 1.1rem;
  font-family: system-ui, -apple-system, Arial, sans-serif; font-size: .95rem;
}

.contents {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: .9rem 1.1rem; margin: 1.6rem 0 2rem;
}
.contents h2 { font-size: .82rem; letter-spacing: .09em; text-transform: uppercase; margin: 0 0 .5rem; color: var(--steel-deep); }
.contents ol { margin: 0; padding-left: 1.2rem; }
.contents li { margin-bottom: .3rem; }

.print-button {
  background: var(--steel-deep); color: var(--white);
  border: 0; border-radius: var(--radius);
  padding: .6rem 1rem; font-size: .95rem; cursor: pointer;
}
.print-button:hover { background: var(--steel); }

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

.figure { margin: 1.8rem 0; text-align: center; }
.figure figcaption { font-size: .88rem; color: var(--ink-soft); margin-top: .5rem; }

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

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--white);
  margin-top: 2rem;
}
.footer-inner {
  max-width: 940px; margin: 0 auto; padding: 1.8rem 1.1rem 2.4rem;
  font-family: system-ui, -apple-system, Arial, sans-serif;
  font-size: .9rem; color: var(--ink-soft);
}
.footer-inner address {
  font-style: normal; line-height: 1.55; margin: 0 0 .9rem;
}
.footer-inner .pub-name { font-weight: 700; color: var(--ink); }
.footer-links { margin: 0 0 .9rem; }
.footer-links a { color: var(--steel-deep); }
.footer-notice { margin: 0 0 .9rem; max-width: 62ch; }
.footer-reviewed { margin: 0; }

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

@media (max-width: 640px) {
  .menu-button { 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: .2rem; padding: .6rem 0 .3rem; }
  .site-nav a { display: block; padding: .5rem 0; border-bottom: 1px solid var(--line); }
  h1 { font-size: 1.6rem; }
}

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

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