:root {
  --bone: #eceae3;
  --bench: #f7f5ef;
  --slip: #fffefb;
  --ink: #171a19;
  --ink-soft: #4a504c;
  --ink-faint: #7d857f;
  --rule: #c9c6bb;
  --rule-hard: #171a19;
  --give: #0d6b60;
  --give-wash: #e2efec;
  --receive: #8d2c3a;
  --receive-wash: #f6e7e8;
  --returned: #a26f0d;
  --returned-wash: #f7eed8;
  --sans: 'Inter var', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  --mono: ui-monospace, 'SFMono-Regular', 'Cascadia Mono', Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --step: 8px;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--ink); text-decoration-color: var(--give); text-underline-offset: 3px; }
a:hover { color: var(--give); }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--slip); padding: 10px 14px; z-index: 20;
}
.skip:focus { left: 8px; top: 8px; }

/* ---------- masthead ---------- */

.top {
  background: var(--ink);
  border-bottom: 4px solid var(--give);
}
.bar {
  max-width: 1180px; margin: 0 auto; padding: 12px 20px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-weight: 700; font-size: 15px;
  letter-spacing: 0.02em; text-transform: uppercase;
  color: var(--slip); text-decoration: none;
}
.brand:hover { color: var(--slip); }
.brand .mark {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; background: var(--give);
  color: var(--slip); font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em;
}
.menu {
  display: flex; flex-wrap: wrap; gap: 2px 4px; margin-left: auto;
}
.menu a {
  font-family: var(--sans); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase;
  color: #d8d9d3; text-decoration: none; padding: 6px 9px; border-bottom: 2px solid transparent;
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}
.menu a:hover { color: var(--slip); border-bottom-color: var(--give); }
.menu a[aria-current="page"] { color: var(--slip); border-bottom-color: var(--returned); }

.btn {
  display: inline-block; font-family: var(--sans); font-weight: 650; font-size: 14px;
  letter-spacing: 0.04em; text-transform: uppercase; text-decoration: none;
  background: var(--give); color: var(--slip); padding: 10px 16px;
  border: 2px solid var(--give);
  transition: background 180ms var(--ease), color 180ms var(--ease), transform 180ms var(--ease);
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--slip); transform: translateY(-1px); }
.top .btn { border-color: var(--give); }
.ghost {
  display: inline-block; font-family: var(--sans); font-weight: 600; font-size: 14px;
  letter-spacing: 0.04em; text-transform: uppercase; text-decoration: none;
  padding: 10px 14px; border: 2px solid var(--ink); color: var(--ink);
  transition: background 180ms var(--ease), color 180ms var(--ease);
}
.ghost:hover { background: var(--ink); color: var(--slip); }

/* ---------- shell with the ruler spine ---------- */

.shell {
  max-width: 1180px; margin: 0 auto; padding: 0 20px 0 44px;
  position: relative;
  background-image: repeating-linear-gradient(
    to bottom,
    var(--rule) 0, var(--rule) 1px,
    transparent 1px, transparent 22px
  );
  background-size: 7px 100%;
  background-position: 20px 0;
  background-repeat: repeat-y;
}
.shell::before {
  content: ""; position: absolute; left: 28px; top: 0; bottom: 0; width: 1px; background: var(--rule-hard);
}

main { display: block; padding: 34px 0 56px; }

/* ---------- page hero ---------- */

.crumb-line {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 16px;
}
.hero-grid { display: grid; gap: 30px; grid-template-columns: 1fr; align-items: start; }
.eyebrow {
  font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--receive); margin-bottom: 10px;
}
h1 {
  font-family: var(--sans); font-weight: 800; text-transform: uppercase;
  font-size: clamp(30px, 5vw, 52px); line-height: 1.02; letter-spacing: -0.01em;
  margin: 0 0 14px; max-width: 26ch;
}
.lede { font-size: 20px; color: var(--ink-soft); max-width: 62ch; margin: 0 0 20px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }

/* ---------- the increment ruler card ---------- */

.rulercard {
  background: var(--slip); border: 1px solid var(--rule-hard);
  padding: 16px 16px 12px;
}
.fig-cap {
  display: block; font-family: var(--sans); font-size: 11px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint);
  margin-bottom: 12px;
}
.increments { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.increments li {
  display: grid; grid-template-columns: 74px 1fr; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 13px;
}
.increments .line {
  border: 1px solid var(--rule-hard); padding: 5px 8px; text-align: center;
  background: var(--bench);
}
.increments .bar {
  height: 12px; background: var(--give-wash); border: 1px solid var(--rule);
  position: relative;
}
.increments li.recv .bar { background: var(--receive-wash); }
.increments li.recv .line { background: var(--receive-wash); }
.increments li.push .bar { background: var(--returned-wash); }
.increments li.push .line { background: var(--returned-wash); }
.increments .bar i { position: absolute; top: 0; bottom: 0; background: var(--give); }
.increments li.recv .bar i { background: var(--receive); }
.increments li.push .bar i { background: var(--returned); }
.rulerrule {
  height: 14px; margin: 14px 0 4px;
  background-image: repeating-linear-gradient(to right, var(--ink) 0, var(--ink) 1px, transparent 1px, transparent 14px);
  border-bottom: 2px solid var(--ink);
}
.book-foot, .card-foot {
  font-family: var(--sans); font-size: 12.5px; line-height: 1.5; color: var(--ink-faint); margin: 12px 0 0;
}

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

section { margin: 40px 0; }
h2 {
  font-family: var(--sans); font-weight: 800; text-transform: uppercase;
  font-size: clamp(21px, 2.6vw, 29px); line-height: 1.12; letter-spacing: -0.005em;
  margin: 0 0 6px; padding-bottom: 8px; border-bottom: 3px solid var(--ink);
}
h2 .n {
  display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 10px;
  background: var(--ink); color: var(--slip); font-family: var(--mono); font-size: 13px;
  vertical-align: 4px;
}
h3 {
  font-family: var(--sans); font-weight: 700; font-size: 17px; letter-spacing: 0.01em;
  margin: 26px 0 6px;
}
p { margin: 0 0 14px; }
ul.plain, ol.plain { padding-left: 22px; margin: 0 0 16px; }
ul.plain li, ol.plain li { margin-bottom: 8px; }

.grid2 { display: grid; gap: 18px; grid-template-columns: 1fr; }
.card {
  background: var(--slip); border: 1px solid var(--rule-hard); border-left: 6px solid var(--ink);
  padding: 18px;
}
.card.give { border-left-color: var(--give); }
.card.receive { border-left-color: var(--receive); }
.card.returned { border-left-color: var(--returned); }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

/* verdict chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.chips li {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase;
  border: 1px solid var(--rule-hard); padding: 5px 9px; background: var(--slip);
}
.chips li.win { background: var(--give-wash); border-color: var(--give); color: var(--give); }
.chips li.loss { background: var(--receive-wash); border-color: var(--receive); color: var(--receive); }
.chips li.push { background: var(--returned-wash); border-color: var(--returned); color: var(--returned); }

/* tables */
.tablewrap { overflow-x: auto; border: 1px solid var(--rule-hard); background: var(--slip); }
table { border-collapse: collapse; width: 100%; font-family: var(--sans); font-size: 14px; }
caption {
  caption-side: top; text-align: left; padding: 12px 14px 8px;
  font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-faint);
}
th, td { text-align: left; padding: 10px 14px; border-top: 1px solid var(--rule); }
thead th {
  background: var(--bench); border-top: 2px solid var(--ink);
  font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft);
}
tbody tr:hover td { background: var(--bench); }
td.num, th.num { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
td.give { color: var(--give); font-weight: 600; }
td.receive { color: var(--receive); font-weight: 600; }
td.push { color: var(--returned); font-weight: 600; }

/* rail of steps */
.rail { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 0; }
.rail li {
  position: relative; padding: 14px 0 14px 54px; border-bottom: 1px dashed var(--rule-hard);
}
.rail li::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 14px;
  width: 36px; height: 36px; display: grid; place-items: center;
  background: var(--ink); color: var(--slip); font-family: var(--mono); font-size: 13px;
}
.rail li strong { display: block; font-family: var(--sans); font-size: 16px; margin-bottom: 2px; }
.rail li span { color: var(--ink-soft); }

/* worked slip */
.slip {
  background: var(--slip); border: 1px solid var(--rule-hard); padding: 0;
  font-family: var(--mono); font-size: 13.5px;
}
.slip dl { margin: 0; display: grid; grid-template-columns: 1fr auto; }
.slip dt, .slip dd { margin: 0; padding: 9px 14px; border-top: 1px solid var(--rule); }
.slip dt { color: var(--ink-soft); font-family: var(--sans); font-size: 13px; }
.slip dd { text-align: right; font-variant-numeric: tabular-nums; }
.slip .total dt, .slip .total dd { background: var(--give-wash); border-top: 2px solid var(--ink); color: var(--give); font-weight: 700; }

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li {
  padding: 11px 0 11px 30px; border-bottom: 1px solid var(--rule); position: relative;
}
.checklist li::before {
  content: ""; position: absolute; left: 6px; top: 18px;
  width: 11px; height: 11px; border: 2px solid var(--give);
  transition: background 160ms var(--ease);
}
.checklist li:hover::before { background: var(--give); }
.checklist li strong { font-family: var(--sans); font-size: 15.5px; }

.callout {
  border: 1px solid var(--returned); background: var(--returned-wash);
  padding: 16px 18px; margin: 22px 0;
}
.callout strong { font-family: var(--sans); text-transform: uppercase; font-size: 13px; letter-spacing: 0.08em; }
.callout p:last-child { margin-bottom: 0; }

/* concept band with the persistent affiliate button */
.band {
  border: 2px solid var(--ink); background: var(--slip); padding: 18px;
  display: grid; gap: 14px; margin: 34px 0;
}
.band h3 { margin: 0; }

/* faq */
.faq { border-top: 3px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--rule-hard); padding: 4px 0; }
.faq summary {
  cursor: pointer; font-family: var(--sans); font-weight: 700; font-size: 16.5px;
  padding: 14px 26px 14px 0; position: relative; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 12px;
  font-family: var(--mono); font-size: 20px; color: var(--give);
}
.faq details[open] summary::after { content: "-"; }
.faq details p { margin: 0 0 16px; color: var(--ink-soft); }

/* footer */
.footer { background: var(--ink); color: #cfd2cb; margin-top: 40px; padding: 34px 20px 40px; }
.foot-grid {
  max-width: 1180px; margin: 0 auto 22px; display: grid; gap: 26px; grid-template-columns: 1fr;
}
.footer .brand { margin-bottom: 10px; }
.footer strong {
  display: block; font-family: var(--sans); font-size: 12px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--slip); margin-bottom: 10px;
}
.footer a { display: block; color: #cfd2cb; text-decoration: none; font-size: 15px; padding: 3px 0; }
.footer a:hover { color: var(--slip); text-decoration: underline; }
.footer p { font-size: 14.5px; line-height: 1.6; color: #b9bdb6; max-width: 74ch; }
.fine { max-width: 1180px; margin: 0 auto; font-size: 12.5px; line-height: 1.65; color: #9aa09a; border-top: 1px solid #3a3f3b; padding-top: 18px; }

@media (min-width: 760px) {
  .hero-grid { grid-template-columns: 1.45fr 1fr; }
  .grid2 { grid-template-columns: 1fr 1fr; }
  .grid2.wide-first { grid-template-columns: 1.3fr 1fr; }
  .band { grid-template-columns: 1fr auto; align-items: center; }
  .foot-grid { grid-template-columns: 1.5fr 1fr 1fr; }
}

@media (min-width: 1020px) {
  .grid2.thirds { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
  .top, .band, .footer, .hero-cta { display: none; }
  body { background: #fff; }
}
