/*
  ShipLoot litepaper. Builds on style.css tokens.
  Layout: sticky numbered chapter rail (desktop) / sticky chapter chips (mobile), reading-progress line,
  serif chapter titles with one italic red word, hairline-ruled components instead of nested cards.
*/

.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 20;
  pointer-events: none;
}
.read-progress span {
  display: block;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.lp {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 64px;
}

/* Rail */
.lp-rail {
  position: sticky;
  top: 64px;
  align-self: start;
  max-height: calc(100vh - 64px);
  overflow: auto;
  padding: 40px 0 24px;
}
.lp-rail-title {
  font: 500 11px var(--f-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}
.lp-rail nav {
  display: flex;
  flex-direction: column;
}
.lp-rail a {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 11px 0 11px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
  color: var(--ink-soft);
  transition:
    color 0.15s,
    padding 0.15s;
}
.lp-rail a span {
  font: 400 12px var(--f-mono);
  color: var(--muted);
  min-width: 1.6em;
}
.lp-rail a:hover {
  color: var(--ink);
}
.lp-rail a.active {
  color: var(--ink);
  padding-left: 12px;
  box-shadow: inset 2px 0 0 var(--accent);
}
.lp-rail a.active span {
  color: var(--accent);
}
.lp-rail-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 16px;
}
.lp-chips {
  display: none;
}

/* Main column */
.lp-main {
  min-width: 0;
  max-width: 720px;
  padding: 56px 0 96px;
}
.lp-hero {
  padding-bottom: 56px;
  border-bottom: 1px solid var(--rule);
}
.lp-hero h1 {
  font: 400 clamp(52px, 8vw, 96px) / 0.98 var(--f-display);
  letter-spacing: -0.015em;
  margin: 16px 0 20px;
}
.lp-hero h1 em {
  font-style: italic;
  color: var(--accent);
}
.lp-hero > p {
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 40ch;
}
.lp-continue {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
  font: 500 12px var(--f-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.lp-continue-line {
  width: 40px;
  height: 1px;
  background: currentColor;
  transition: width 0.2s;
}
.lp-continue:hover {
  color: var(--ink);
}
.lp-continue:hover .lp-continue-line {
  width: 56px;
}
.lp-status {
  margin-top: 36px;
  padding: 2px 0 2px 16px;
  border-left: 2px solid var(--accent);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 62ch;
}
.lp-status strong {
  color: var(--ink);
  font-weight: 600;
}

/* Chapters */
.ch {
  padding: 72px 0 8px;
  scroll-margin-top: 64px;
}
.ch-head {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 24px;
}
.ch-no {
  font: 400 15px var(--f-mono);
  color: var(--accent);
  flex: none;
}
.ch-head h2 {
  font: 400 clamp(42px, 6vw, 68px) / 1 var(--f-display);
  letter-spacing: -0.01em;
}
.ch-head h2 em {
  font-style: italic;
  color: var(--accent);
}
.ch-lead {
  font-size: 20px;
  line-height: 1.5;
  margin-bottom: 20px;
  max-width: 58ch;
}
.ch-lead a,
.refs a {
  border-bottom: 1px solid var(--rule-strong);
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
}
.ch-lead a:hover,
.refs a:hover {
  border-bottom-color: var(--ink);
}
.prose {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 64ch;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.7;
  margin: 20px 0;
}
.note {
  margin: 24px 0;
  padding: 2px 0 2px 16px;
  border-left: 2px solid var(--rule-strong);
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 64ch;
}
.note.warn {
  border-left-color: var(--accent);
}
.note strong {
  color: var(--ink);
  font-weight: 600;
}
.pull {
  margin: 36px 0 12px;
  padding: 4px 0 4px 22px;
  border-left: 2px solid var(--accent);
  font: 400 clamp(32px, 4.5vw, 44px) / 1.12 var(--f-display);
  letter-spacing: -0.01em;
}
.pull em {
  font-style: italic;
  color: var(--accent);
}
.col-label,
.tl-label {
  font: 500 11px var(--f-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Timeline (voyage + roadmap) */
.timeline {
  list-style: none;
  margin: 32px 0;
  padding: 0;
}
.timeline li {
  position: relative;
  padding: 0 0 36px 32px;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 10px;
  bottom: -6px;
  width: 1px;
  background: var(--rule-strong);
}
.timeline li:last-child::before {
  display: none;
}
.timeline li::after {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--accent);
}
.timeline li:first-child::after,
.timeline li.is-now::after {
  background: var(--accent);
}
.timeline.roadmap li:first-child::after {
  background: var(--paper);
}
.timeline.roadmap li.is-now::after {
  background: var(--accent);
}
.timeline h3 {
  font: 400 30px/1.1 var(--f-display);
  margin: 8px 0 8px;
}
.timeline p {
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.65;
  max-width: 60ch;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.tags span {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--rule));
  color: var(--accent);
}

/* Three columns (keep / send / claim) */
.cols3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule);
  margin: 28px 0;
}
.cols3 article {
  padding: 18px 20px 0 0;
}
.cols3 article + article {
  padding-left: 20px;
  border-left: 1px solid var(--rule);
}
.cols3 h3 {
  font: 400 26px/1.1 var(--f-display);
  margin: 8px 0 8px;
}
.cols3 p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* Worked example */
.example {
  margin: 32px 0 20px;
  border-top: 1px solid var(--accent);
  padding-top: 16px;
}
.example-flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--rule);
  margin-top: 12px;
}
.example-flow div {
  padding: 8px 0 18px;
}
.example-flow div + div {
  padding-left: 18px;
  border-left: 1px solid var(--rule);
}
.example-flow span {
  font-size: 13px;
  color: var(--ink-soft);
}
.example-flow b {
  display: block;
  font: 400 clamp(40px, 6vw, 56px) / 1.05 var(--f-display);
  margin-top: 4px;
}
mark {
  background: linear-gradient(transparent 58%, var(--lime) 58%, var(--lime) 92%, transparent 92%);
  color: inherit;
  padding: 0 0.04em;
}
.table-wrap {
  overflow-x: auto;
}
.example table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.example th {
  font: 500 11px var(--f-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: left;
  padding: 14px 12px 10px 0;
  white-space: nowrap;
}
.example td {
  padding: 12px 12px 12px 0;
  border-top: 1px solid var(--rule);
}
.example td.num {
  font-family: var(--f-mono);
  font-size: 14px;
}
.example td.muted {
  color: var(--muted);
}
.example-foot {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 12px;
  max-width: 64ch;
}
.loss-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin: 24px 0;
}
.loss-row span {
  display: block;
  font-size: 13px;
  color: var(--ink-soft);
}
.loss-row b {
  font: 400 44px/1 var(--f-display);
  color: var(--loss);
}
.loss-row p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* Stack (interface / wallet / execution) */
.stack {
  margin: 28px 0;
  border-top: 1px solid var(--ink);
}
.stack > div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
}
.stack dt {
  font: 500 11px var(--f-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-top: 6px;
}
.stack dd {
  margin: 0;
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.55;
}
.stack dd b {
  display: block;
  font: 400 26px/1.15 var(--f-display);
  color: var(--ink);
  margin-bottom: 2px;
}

/* Fees */
.fee {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 36px;
  align-items: end;
  padding: 24px 0 28px;
  margin: 28px 0 0;
  border-top: 1px solid var(--accent);
  border-bottom: 1px solid var(--rule);
}
.fee-big {
  font: 400 clamp(76px, 12vw, 128px) / 0.85 var(--f-display);
  letter-spacing: -0.02em;
}
.split-bar {
  display: flex;
  height: 10px;
  border-radius: 2px;
  overflow: hidden;
  margin: 12px 0 14px;
}
.split-bar i {
  flex: 1;
}
.split-bar i:first-child {
  background: var(--ink);
}
.split-bar i:last-child {
  background: var(--lime);
}
.split-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.split-legend b {
  display: block;
  font: 500 17px var(--f-mono);
}
.split-legend span {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.split-legend div:last-child {
  text-align: right;
}
.stats3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 28px;
}
.stats3 div {
  padding: 22px 20px 22px 0;
}
.stats3 div + div {
  padding-left: 20px;
  border-left: 1px solid var(--rule);
}
.stats3 b {
  display: block;
  font: 500 34px/1 var(--f-mono);
  letter-spacing: -0.04em;
  color: var(--accent);
  margin-bottom: 10px;
}
.stats3 span {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* Fund: is / is not */
.isnot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--rule);
  margin: 28px 0;
}
.isnot > div {
  padding: 18px 20px 0 0;
}
.isnot > div + div {
  padding-left: 20px;
  border-left: 1px solid var(--rule);
}
.isnot > div + div .col-label {
  color: var(--ink-soft);
}
.isnot ul {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.isnot li {
  position: relative;
  padding-left: 18px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.isnot li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 8px;
  height: 1px;
  background: var(--accent);
}
.isnot > div + div li::before {
  background: var(--muted);
}

.lp-cta {
  margin-top: 28px;
}

/* References */
.refs {
  margin-top: 88px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
.refs ul {
  list-style: none;
  padding: 0;
  margin: 14px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
}
.refs li {
  font-size: 14px;
}
.refs p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 64ch;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .lp {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .lp-rail {
    display: none;
  }
  .lp-chips {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    position: sticky;
    top: 64px;
    z-index: 5;
    margin: 0 calc(var(--gutter) * -1);
    padding: 10px var(--gutter);
    background: color-mix(in srgb, var(--paper) 94%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--rule);
    scrollbar-width: none;
  }
  .lp-chips::-webkit-scrollbar {
    display: none;
  }
  .lp-chips a {
    flex: none;
    font: 400 12px var(--f-mono);
    color: var(--ink-soft);
    border: 1px solid var(--rule-strong);
    border-radius: 99px;
    padding: 6px 11px;
    white-space: nowrap;
  }
  .lp-chips a.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--sheet);
  }
  .ch {
    scroll-margin-top: 112px;
  }
  .lp-main {
    max-width: none;
  }
}
@media (max-width: 720px) {
  .lp-chips {
    top: 56px;
  }
  .ch {
    padding-top: 56px;
    scroll-margin-top: 104px;
  }
  .lp-main {
    padding: 32px 0 64px;
  }
  .lp-hero {
    padding-bottom: 40px;
  }
  .lp-hero h1 {
    font-size: clamp(48px, 14vw, 64px);
  }
  .lp-hero > p {
    font-size: 17px;
  }
  .ch-head {
    gap: 12px;
    margin-bottom: 18px;
  }
  .ch-head h2 {
    font-size: clamp(38px, 11vw, 48px);
  }
  .ch-lead {
    font-size: 18px;
  }
  .prose {
    font-size: 15px;
  }
  .pull {
    font-size: 30px;
  }
  .timeline h3 {
    font-size: 26px;
  }
  .timeline p {
    font-size: 15px;
  }
  .cols3,
  .stats3,
  .isnot {
    grid-template-columns: 1fr;
  }
  .cols3 article,
  .cols3 article + article,
  .isnot > div,
  .isnot > div + div {
    padding: 16px 0 18px;
    border-left: 0;
    border-bottom: 1px solid var(--rule);
  }
  .stats3 div,
  .stats3 div + div {
    padding: 18px 0;
    border-left: 0;
    border-top: 1px solid var(--rule);
  }
  .stats3 div:first-child {
    border-top: 0;
  }
  .example-flow div + div {
    padding-left: 12px;
  }
  .example-flow span {
    font-size: 12px;
  }
  .example table {
    font-size: 14px;
  }
  .example th {
    font-size: 10px;
    white-space: normal;
  }
  .loss-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .stack > div {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .stack dt {
    padding-top: 0;
  }
  .fee {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .split-legend {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .split-legend div:last-child {
    text-align: left;
  }
  .refs {
    margin-top: 64px;
  }
}

/* ---------- Legal pages (/terms/, /privacy/, /risk/) ---------- */
.legal .prose h3 { font: 600 17px/1.35 var(--f-body); color: var(--ink); margin-top: 6px; }
.legal .prose ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.legal .prose li::marker { color: var(--muted); }
.legal .prose a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.legal mark.todo { background: var(--amber-soft); color: var(--ink); padding: 0 4px; border-radius: 3px; font-weight: 600; }
.legal .lp-hero h1 { font-size: clamp(44px, 7vw, 76px); }
.legal .lp-hero > p.legal-meta { font: 400 13px/1.5 var(--f-mono); color: var(--muted); margin: 4px 0 0; max-width: none; }
.legal .legal-index { margin-top: 14px; }
.legal-index { display: flex; flex-wrap: wrap; gap: 8px; }
.legal-index a { font: 500 13px var(--f-mono); border: 1px solid var(--rule-strong); border-radius: 99px; padding: 6px 12px; color: var(--ink); text-decoration: none; }
.legal-index a[aria-current="page"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
