/* Soft Margin — scrap-yard dossier stylesheet.
   One file, no imports, no web fonts, no external requests. */

:root {
  --bg: #20242a;
  --text: #e8e4da;
  --accent: #d98e32;
  --accent-2: #7d8b99;
  --label: #9aa7b4;
  --card: #2b3038;
  --rule: #3a4049;
  --deep: #17191b;
  --display: "Arial Narrow", "Roboto Condensed", "Helvetica Neue", sans-serif;
  --body: Georgia, "Times New Roman", serif;
  --mono: "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
}

img, svg, table { max-width: 100%; }

a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

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

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--deep);
  padding: 10px 16px;
  font-family: var(--mono);
  font-size: 13px;
  z-index: 50;
}
.skip:focus { left: 0; }

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

.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: 2px solid var(--rule);
}

.head-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  margin-right: auto;
}

.brand-mark {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  border: 2px solid var(--accent);
  color: var(--accent);
  padding: 2px 6px;
}

.brand-name {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 19px;
}

.menu-btn {
  display: none;
  font-family: var(--mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: transparent;
  color: var(--text);
  border: 2px solid var(--rule);
  padding: 6px 12px;
  border-radius: 0;
  cursor: pointer;
}

.site-nav {
  display: flex;
  gap: 22px;
}

.site-nav a {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 15px;
  color: var(--text);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}

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

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

.shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 20px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 36px;
  padding-top: 32px;
  padding-bottom: 48px;
}

main { min-width: 0; }

.reading { max-width: 640px; }

.rail {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--label);
  border-top: 2px solid var(--rule);
  padding-top: 14px;
}

.rail-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 8px;
}

.rail-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}

.rail-list li {
  padding: 6px 0;
  border-bottom: 1px solid var(--accent-2);
}

.rail-list .pn {
  display: block;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.rail-list a { color: var(--label); text-decoration: none; }
.rail-list a:hover { color: var(--text); text-decoration: underline; }
.rail-list li[aria-current="true"] a { color: var(--text); }
.rail-list li[aria-current="true"] { border-left: 4px solid var(--accent); padding-left: 8px; }

.rail-note { margin: 0 0 10px; }

@media (min-width: 960px) {
  .layout {
    grid-template-columns: minmax(0, 640px) 200px;
    gap: 40px;
  }
  .rail {
    position: sticky;
    top: 86px;
    align-self: start;
  }
}

/* ---------- type ---------- */

h1, h2, h3, h4 {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  line-height: 1.25;
  margin: 1.8em 0 0.5em;
}

h1 {
  font-size: 30px;
  margin-top: 0;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--accent);
}

h2 { font-size: 21px; }
h3 { font-size: 16.5px; color: var(--text); }
h4 { font-size: 14px; letter-spacing: 0.16em; color: var(--label); }

h2 .glyph, h3 .glyph {
  width: 15px;
  height: 15px;
  fill: var(--accent);
  color: var(--accent);
  margin-right: 8px;
  vertical-align: -1px;
}

p { margin: 0 0 1.05em; }

.kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}

.lede { font-size: 18.5px; }

.step-of {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--label);
  border: 2px solid var(--rule);
  padding: 4px 9px;
  display: inline-block;
  margin: 0 0 18px;
}

hr {
  border: 0;
  border-top: 2px solid var(--rule);
  margin: 34px 0;
}

/* ---------- blocks ---------- */

.card,
.callout,
.checklist,
.disclosure,
.example {
  background: var(--card);
  border: 2px solid var(--rule);
  padding: 18px 20px;
  margin: 26px 0;
}

.callout,
.checklist,
.disclosure,
.example {
  border-left: 4px solid var(--accent);
}

.callout > :first-child,
.checklist > :first-child,
.disclosure > :first-child,
.example > :first-child,
.card > :first-child { margin-top: 0; }

.callout > :last-child,
.checklist > :last-child,
.disclosure > :last-child,
.example > :last-child,
.card > :last-child { margin-bottom: 0; }

.block-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 8px;
}

.disclosure p { margin-bottom: 0.7em; }

.contents {
  border: 2px solid var(--rule);
  padding: 16px 20px;
  margin: 26px 0;
}
.contents ol { margin: 0; padding-left: 20px; }
.contents li { margin-bottom: 4px; }

/* checklists: printed boxes, no state */

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

.checklist li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 11px;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 14px;
  height: 14px;
  border: 2px solid var(--accent-2);
}

/* spec table and general tables */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-family: var(--mono);
  font-size: 13px;
}

caption {
  text-align: left;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  padding-bottom: 8px;
}

th, td {
  border: 1px solid var(--accent-2);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

th { color: var(--label); font-weight: 400; letter-spacing: 0.06em; }

.spec th { width: 38%; }

ol.procedure { padding-left: 22px; }
ol.procedure li { margin-bottom: 10px; }

ul.plain { padding-left: 22px; }
ul.plain li { margin-bottom: 8px; }

.glossary { margin: 24px 0; }
.glossary dt {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-top: 12px;
}
.glossary dd { margin: 4px 0 0; }

/* affiliate links */

.aff { margin: 24px 0; }

.aff-link {
  display: inline-block;
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 15px;
  color: var(--accent);
  border: 2px solid var(--accent);
  padding: 9px 16px;
  text-decoration: none;
}
.aff-link:hover { background: var(--accent); color: var(--deep); }

.aff-note {
  display: block;
  margin-top: 9px;
  font-size: 15px;
  color: var(--label);
}
.aff-note a { color: var(--accent); }

/* step navigation */

.stepnav {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 2px solid var(--rule);
  padding-top: 18px;
  margin-top: 36px;
  font-family: var(--mono);
  font-size: 13px;
  flex-wrap: wrap;
}

.print-btn {
  font-family: var(--mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  padding: 9px 15px;
  border-radius: 0;
  cursor: pointer;
}
.print-btn:hover { background: var(--accent); color: var(--deep); }

/* hero and homepage */

.hero { padding-top: 34px; }
.hero h1 { font-size: 33px; }

.steplist { counter-reset: s; list-style: none; padding: 0; margin: 26px 0; }
.steplist li {
  border-top: 2px solid var(--rule);
  padding: 14px 0 14px 64px;
  position: relative;
}
.steplist li:last-child { border-bottom: 2px solid var(--rule); }
.steplist .pn {
  position: absolute;
  left: 0;
  top: 16px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--accent);
}
.steplist a {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 16px;
  text-decoration: none;
  color: var(--text);
  border-bottom: 2px solid var(--accent);
}
.steplist p { margin: 5px 0 0; font-size: 16px; color: var(--label); }

/* ---------- hazard band and footer ---------- */

.hazard {
  height: 14px;
  background: repeating-linear-gradient(135deg,
    var(--accent) 0 14px,
    var(--deep) 14px 28px);
}

.site-foot {
  background: var(--deep);
  border-top: 2px solid var(--rule);
  font-size: 15px;
}

.foot-inner { padding-top: 26px; padding-bottom: 32px; }

.pub {
  font-style: normal;
  line-height: 1.75;
  margin-bottom: 14px;
}

.pub-name {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 17px;
}

.foot-links { margin-bottom: 14px; }
.foot-links a { color: var(--accent); }

.foot-tm, .foot-rev { color: var(--label); margin-bottom: 10px; }

.foot-rev {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  margin-bottom: 0;
}

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

@media (max-width: 719px) {
  body { font-size: 16.5px; }
  .menu-btn { display: inline-block; }
  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0;
    border-top: 2px solid var(--rule);
    margin-top: 10px;
  }
  .site-nav.open { display: flex; }
  .site-nav a {
    padding: 11px 0;
    border-bottom: 1px solid var(--rule);
  }
  h1 { font-size: 25px; }
  .hero h1 { font-size: 26px; }
  h2 { font-size: 19px; }
  table { font-size: 12px; }
  th, td { padding: 6px 7px; }
  .spec th { width: 42%; }
}

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

@media print {
  body {
    background: #fff;
    color: #000;
    font-size: 11.5pt;
  }
  .site-head, .rail, .hazard, .site-foot, .print-btn, .skip, .stepnav, .aff { display: none !important; }
  .layout { display: block; padding: 0; }
  .reading { max-width: none; }
  a { color: #000; text-decoration: none; }
  h1 { border-bottom: 2px solid #000; }
  h2 .glyph, h3 .glyph { fill: #000; color: #000; }
  .card, .callout, .checklist, .disclosure, .example, .contents {
    background: #fff;
    border: 1pt solid #000;
    border-left: 3pt solid #000;
    break-inside: avoid;
  }
  .checklist li::before { border-color: #000; }
  th, td { border: 0.5pt solid #000; }
  .kicker, .block-label, caption, .rail-title { color: #000; }
  .checklist { break-inside: avoid; }
}

.mono { font-family: var(--mono); font-size: 0.92em; color: var(--accent); }
