/*
  Mild Conduit — shared stylesheet
  Visual direction: plume-drift sheet.
  Palette: drift white, plume ink, drift violet, ash gray (card tint #fbfafc as given).
  System fonts only. No images, no shadows, no gradients, no rounded corners.
*/

:root {
  --bg: #f4f3f6;
  --text: #232229;
  --accent: #6a4d8c;
  --accent-2: #78757e;
  --card: #fbfafc;
  --display: "Palatino Linotype", "Iowan Old Style", Georgia, serif;
  --body: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "Courier New", "SF Mono", Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  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: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

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

a:hover {
  text-decoration-thickness: 2px;
}

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

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: normal;
  font-style: normal;
  line-height: 1.25;
}

h1 {
  font-size: 2rem;
  margin: 1.25rem 0 1rem;
}

h2 {
  font-size: 1.45rem;
  margin: 0.25rem 0 0.75rem;
}

h3 {
  font-size: 1.15rem;
  margin: 1.5rem 0 0.5rem;
}

p,
ul,
ol,
dl {
  margin: 0 0 1rem;
}

code,
.mono {
  font-family: var(--mono);
}

/* ---------- Skip link ---------- */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--text);
  color: var(--bg);
  padding: 0.5rem 1rem;
  z-index: 30;
}

.skip:focus {
  left: 0;
}

/* ---------- Layout ---------- */

.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 1rem 2rem;
}

/* ---------- Header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--text);
}

.head-inner {
  max-width: 680px;
  margin: 0 auto;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.brand {
  font-family: var(--display);
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  color: var(--accent);
}

.menu-toggle {
  display: none;
  font-family: var(--mono);
  font-size: 0.9rem;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--text);
  border-radius: 0;
  padding: 0.3rem 0.75rem;
  cursor: pointer;
}

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

.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
}

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

@media (max-width: 560px) {
  .js .menu-toggle {
    display: inline-block;
  }

  .js .site-nav {
    display: none;
    width: 100%;
  }

  .js .site-nav.open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem 0 0.25rem;
  }
}

/* ---------- Hero ---------- */

.hero {
  padding-top: 1rem;
}

.hero h1 {
  font-size: 2.1rem;
}

.hero .lede {
  font-size: 1.1rem;
}

/* ---------- Disclosure box ---------- */

.disclosure {
  background: var(--card);
  border: 1px solid var(--text);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 1.0625rem;
}

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

.label {
  display: block;
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

/* ---------- Plume rows (section cards) ---------- */

.plume-row {
  position: relative;
  background: var(--card);
  border: 1px solid var(--text);
  border-top: 2px solid var(--text);
  margin: 2rem 0;
  padding: 0 1.25rem 0.5rem;
}

.row-edge {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 0.4rem 0;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--accent-2);
}

.row-edge .pn {
  color: var(--accent);
}

.row-edge .dr {
  color: var(--accent-2);
}

/* Motif 4: one short drift-violet tick in the left margin, used once. */
.ticked::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 2.6rem;
  width: 3px;
  height: 2.4rem;
  background: var(--accent);
}

/* ---------- Plume bullet (inline SVG via data URI, no request) ---------- */

ul.plume {
  list-style: none;
  padding-left: 0;
}

ul.plume > li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.45rem;
}

ul.plume > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 1rem;
  height: 0.75rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 12'%3E%3Cg fill='none' stroke='%236a4d8c' stroke-width='1'%3E%3Cpath d='M1 6 Q8 1 15 1.5'/%3E%3Cpath d='M1 6 Q8 5 15 6'/%3E%3Cpath d='M1 6 Q8 11 15 10.5'/%3E%3C/g%3E%3C/svg%3E") no-repeat 0 0 / 1rem 0.75rem;
}

/* ---------- Step list on the homepage ---------- */

ol.steps {
  padding-left: 0;
  list-style: none;
  counter-reset: stepn;
  border-top: 1px solid var(--text);
}

ol.steps > li {
  counter-increment: stepn;
  padding: 0.6rem 0 0.6rem 3rem;
  position: relative;
  border-bottom: 1px solid var(--accent-2);
}

ol.steps > li::before {
  content: "S-" counter(stepn);
  position: absolute;
  left: 0;
  top: 0.65rem;
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--accent);
}

/* ---------- Step pages ---------- */

.wind {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  border-top: 1px solid var(--text);
  border-bottom: 1px solid var(--text);
  padding: 0.35rem 0;
  margin: 1.25rem 0 0;
}

.wind .stepno {
  color: var(--accent);
}

.toc {
  border: 1px solid var(--text);
  background: var(--card);
  padding: 0.75rem 1.25rem 0.25rem;
  margin: 1.5rem 0;
}

.toc .toc-h {
  font-family: var(--mono);
  font-size: 0.85rem;
  margin: 0 0 0.4rem;
  color: var(--accent);
}

.toc ol {
  padding-left: 1.4rem;
}

.pager {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  border-top: 1px solid var(--text);
  padding-top: 1rem;
  margin-top: 2rem;
}

.pager a {
  max-width: 48%;
}

.pager .next {
  margin-left: auto;
  text-align: right;
}

@media (max-width: 480px) {
  .pager a {
    max-width: 100%;
  }
}

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

.callout {
  border: 1px solid var(--text);
  padding: 0.9rem 1.1rem;
  margin: 1.25rem 0;
  background: var(--bg);
}

.callout p:last-child {
  margin-bottom: 0;
}

.example {
  border-left: 1px solid var(--accent);
  padding: 0.25rem 0 0.25rem 1rem;
  margin: 1.25rem 0;
}

.before-move {
  border: 1px dashed var(--accent-2);
  padding: 0.9rem 1.1rem 0.25rem;
  margin: 1.25rem 0;
}

dl.glossary {
  border-top: 1px solid var(--text);
}

dl.glossary dt {
  font-family: var(--mono);
  color: var(--accent);
  margin-top: 0.6rem;
}

dl.glossary dd {
  margin: 0 0 0.6rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--accent-2);
}

ol.procedure {
  padding-left: 1.5rem;
}

ol.procedure > li {
  margin-bottom: 0.6rem;
}

/* Static checklist with printed boxes: nothing is stored. */
ol.checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  border-top: 1px solid var(--text);
}

ol.checklist > li {
  position: relative;
  padding: 0.55rem 0 0.55rem 2.25rem;
  border-bottom: 1px solid var(--accent-2);
}

ol.checklist > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75rem;
  width: 1.05rem;
  height: 1.05rem;
  border: 1px solid var(--text);
  background: var(--card);
}

.pull {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.2rem;
  border-top: 1px solid var(--accent-2);
  border-bottom: 1px solid var(--accent-2);
  padding: 0.75rem 0;
  margin: 1.25rem 0;
}

/* Motif 3: the single SETTLE box. */
.settle {
  border: 2px solid var(--accent);
  background: var(--card);
  padding: 0.9rem 1.2rem 0.25rem;
  margin: 1.5rem 0;
}

.settle .settle-head {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.settle .settle-head .pn {
  color: var(--accent);
}

.settle .settle-head .dr {
  color: var(--accent-2);
}

/* Affiliate link and its note */
.aff {
  border: 1px solid var(--text);
  background: var(--bg);
  padding: 0.75rem 1rem;
}

.aff-note {
  display: block;
  font-size: 0.95rem;
  margin-top: 0.3rem;
}

.print-btn {
  display: none;
  font-family: var(--mono);
  font-size: 0.9rem;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--text);
  border-radius: 0;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
  margin: 0 0 1rem;
}

.js .print-btn {
  display: inline-block;
}

.print-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

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

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

th {
  font-family: var(--mono);
  font-weight: normal;
  color: var(--accent);
}

.effective {
  font-family: var(--mono);
  font-size: 0.95rem;
}

dl.checked dt {
  font-family: var(--mono);
  color: var(--accent);
  margin-top: 0.75rem;
}

dl.checked dd {
  margin: 0.2rem 0 0.5rem;
}

/* ---------- Footer ---------- */

.site-foot {
  border-top: 1px solid var(--text);
  margin-top: 3rem;
  font-size: 0.92rem;
}

.foot-inner {
  max-width: 680px;
  margin: 0 auto;
  padding: 1.25rem 1rem 2rem;
}

.site-foot address {
  font-style: normal;
  line-height: 1.5;
  margin-bottom: 0.9rem;
}

.site-foot .foot-name {
  font-family: var(--display);
  font-size: 1.05rem;
}

.foot-links {
  margin-bottom: 0.75rem;
}

/* ---------- Print ---------- */

@media print {
  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .site-head,
  .skip,
  .print-btn,
  .pager,
  .toc,
  .site-foot,
  .no-print {
    display: none !important;
  }

  .wrap {
    max-width: none;
    padding: 0;
  }

  a {
    color: #000;
    text-decoration: none;
  }

  .plume-row,
  .settle,
  .callout {
    background: #fff;
    border-color: #000;
    break-inside: avoid;
  }

  .row-edge,
  .row-edge .pn,
  .row-edge .dr,
  .label,
  .settle .settle-head .pn,
  .settle .settle-head .dr {
    color: #000;
    border-color: #000;
  }

  ol.checklist,
  ol.checklist > li {
    border-color: #000;
  }

  ol.checklist > li {
    break-inside: avoid;
  }

  ol.checklist > li::before {
    border: 1px solid #000;
    background: #fff;
  }

  .ticked::before {
    display: none;
  }
}
