/* Greyledger — paper-and-ink document system */

:root {
  --paper: oklch(0.972 0.006 95);
  --paper-deep: oklch(0.945 0.008 95);
  --ink: oklch(0.24 0.012 130);
  --ink-soft: oklch(0.42 0.015 130);
  --rule: oklch(0.86 0.012 110);
  --ledger: oklch(0.40 0.07 155);
  --ledger-deep: oklch(0.33 0.065 155);
  --ledger-wash: oklch(0.93 0.02 155);
  --measure: 38rem;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

:root { color-scheme: light; }
body { overflow-x: clip; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  font-family: "Spectral", Georgia, serif;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

/* ---- type ---- */

.label {
  font-family: "Archivo", sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

h1 {
  font-family: "Spectral", Georgia, serif;
  font-weight: 500;
  font-size: clamp(2.125rem, 1.4rem + 3.2vw, 3.5rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  max-width: 24ch;
}

h2 {
  font-family: "Spectral", Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
  line-height: 1.25;
  max-width: var(--measure);
}

p { max-width: var(--measure); }

a { color: var(--ledger-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ledger); }

strong { font-weight: 600; }

::selection { background: var(--ledger-wash); }

/* ---- structure ---- */

.sheet {
  max-width: 66rem;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: clamp(1.25rem, 3vw, 2rem) 0 1rem;
  border-bottom: 2px solid var(--ink);
}

.masthead .wordmark {
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

.masthead .honesty {
  font-family: "Archivo", sans-serif;
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  text-align: right;
  max-width: 22rem;
}

.hero { padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4rem); }

.hero .kicker { margin-bottom: 1.25rem; color: var(--ledger-deep); }

.hero .standfirst {
  margin-top: 1.75rem;
  font-size: clamp(1.125rem, 1.05rem + 0.4vw, 1.3125rem);
  color: var(--ink-soft);
}

/* staggered load — the only entrance motion on the page */
@media (prefers-reduced-motion: no-preference) {
  .rise { opacity: 0; transform: translateY(14px); animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
  .rise:nth-child(2) { animation-delay: 0.08s; }
  .rise:nth-child(3) { animation-delay: 0.16s; }
  .rise:nth-child(4) { animation-delay: 0.24s; }
  @keyframes rise { to { opacity: 1; transform: none; } }
}

/* ---- evidence strip: facts with footnoted sources ---- */

.evidence {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: clamp(1.5rem, 3vw, 2.25rem) 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
}

.evidence .fact .figure {
  font-family: "Spectral", Georgia, serif;
  font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem);
  font-weight: 500;
  line-height: 1.1;
  color: var(--ledger-deep);
}

.evidence .fact .figure sup { font-size: 0.45em; color: var(--ink-soft); }

.evidence .fact p { font-size: 0.9375rem; color: var(--ink-soft); margin-top: 0.375rem; }

/* ---- numbered schedule (clauses, not cards) ---- */

.schedule { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }

.schedule > .label { display: block; margin-bottom: 2rem; }

.clause {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 0.5rem clamp(1rem, 3vw, 2.5rem);
  padding: 1.375rem 0;
  border-top: 1px solid var(--rule);
}

.clause:last-of-type { border-bottom: 1px solid var(--rule); }

.clause .num {
  font-family: "Archivo", sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ledger-deep);
  padding-top: 0.3rem;
}

.clause h3 { font-weight: 600; font-size: 1.0625rem; }

.clause p { font-size: 0.9375rem; color: var(--ink-soft); margin-top: 0.25rem; }

.clause .cite {
  font-family: "Archivo", sans-serif;
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
  color: var(--ledger-deep);
  white-space: nowrap;
}

/* ---- fee schedule ---- */

.fees {
  background: var(--paper-deep);
  border-top: 2px solid var(--ink);
  padding: clamp(2.5rem, 6vw, 4rem) 0;
}

.fee-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--measure);
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}

.fee-row .amount {
  font-size: clamp(1.75rem, 1.5rem + 1vw, 2.25rem);
  font-weight: 500;
  color: var(--ink);
}

.fee-row .terms { font-size: 0.9375rem; color: var(--ink-soft); }

.nots { margin-top: 1.5rem; max-width: var(--measure); }
.nots li {
  list-style: none;
  font-size: 0.9375rem;
  color: var(--ink-soft);
  padding: 0.375rem 0 0.375rem 1.375rem;
  position: relative;
}
.nots li::before { content: "—"; position: absolute; left: 0; color: var(--ledger-deep); }

/* ---- disclosure block: the honesty is the brand ---- */

.disclosure {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: clamp(1.5rem, 4vw, 4rem);
}

@media (max-width: 44rem) { .disclosure { grid-template-columns: 1fr; } }

.disclosure .side { border-top: 2px solid var(--ledger-deep); padding-top: 1rem; }
.disclosure .side .label { color: var(--ledger-deep); }

.disclosure .body p + p { margin-top: 1rem; }

/* ---- actions ---- */

.actions { padding: clamp(2.5rem, 6vw, 4.5rem) 0; border-top: 1px solid var(--rule); }

.btn {
  display: inline-block;
  cursor: pointer;
  border: none;
  background: none;
  font-family: "Archivo", sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1rem 1.75rem;
  transition: background 0.18s ease-out, color 0.18s ease-out;
}

.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--ledger-deep); color: var(--paper); }

.btn-line { border: 1px solid var(--ink); color: var(--ink); }
.btn-line:hover { border-color: var(--ledger-deep); color: var(--ledger-deep); }

.capture { margin-top: 2.5rem; max-width: var(--measure); }
.capture form { display: flex; flex-wrap: wrap; gap: 0.625rem; margin-top: 0.875rem; }
.capture input[type="email"] {
  flex: 1 1 16rem;
  font-family: "Spectral", Georgia, serif;
  font-size: 1rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--ink-soft);
  background: var(--paper);
  color: var(--ink);
}
.capture input[type="email"]:focus { outline: 2px solid var(--ledger); outline-offset: 1px; border-color: var(--ledger); }
a:focus-visible, .btn:focus-visible, button:focus-visible { outline: 2px solid var(--ledger); outline-offset: 3px; border-radius: 1px; }
.capture button { border: none; cursor: pointer; }
.capture .small { font-size: 0.8125rem; color: var(--ink-soft); margin-top: 0.625rem; }

/* ---- footnotes & footer ---- */

.footnotes {
  padding: clamp(2rem, 5vw, 3rem) 0;
  border-top: 1px solid var(--rule);
  font-size: 0.8125rem;
  color: var(--ink-soft);
}
.footnotes ol { padding-left: 1.25rem; max-width: 44rem; }
.footnotes li { margin-top: 0.375rem; overflow-wrap: break-word; }

footer.colophon {
  border-top: 2px solid var(--ink);
  padding: clamp(1.75rem, 4vw, 2.5rem) 0 clamp(2.5rem, 6vw, 4rem);
  font-size: 0.8125rem;
  color: var(--ink-soft);
}
footer.colophon p { max-width: 44rem; }
footer.colophon p + p { margin-top: 0.75rem; }
footer.colophon .wordmark {
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--ink);
  display: block;
  margin-bottom: 1rem;
}

sup a { text-decoration: none; font-family: "Archivo", sans-serif; font-size: 0.7em; }

/* ---- long-form article pages (free packs) ---- */

.article { padding: clamp(2rem, 5vw, 3.5rem) 0; max-width: 44rem; }
.article h2 { margin: 2.25rem 0 0.75rem; }
.article h3 { font-weight: 600; font-size: 1.0625rem; margin: 1.5rem 0 0.375rem; }
.article p { margin: 0.75rem 0; }
.article ul, .article ol { margin: 0.75rem 0 0.75rem 1.375rem; max-width: var(--measure); }
.article li { margin: 0.375rem 0; }
.article .intro { color: var(--ink-soft); font-style: italic; }
.article blockquote {
  margin: 1.5rem 0;
  padding: 1.25rem clamp(1rem, 3vw, 1.75rem);
  background: var(--paper-deep);
  border-left: 2px solid var(--ledger-deep);
  font-size: 0.9375rem;
}
.article blockquote p { margin: 0.625rem 0; }
.article hr { border: none; border-top: 1px solid var(--rule); margin: 2rem 0; }
.article .checkpoint { border-top: 1px solid var(--rule); padding-top: 1.25rem; margin-top: 1.5rem; }


/* ---- audit/polish/delight pass ---- */

.skip {
  position: absolute; left: -999px; top: 0;
  font-family: "Archivo", sans-serif; font-size: 0.8125rem;
  background: var(--ink); color: var(--paper); padding: 0.75rem 1.25rem; z-index: 10;
}
.skip:focus { left: 0; color: var(--paper); }

/* fee schedule: full-bleed band + accounting double-rule under the total */
.fees { margin-inline: calc(50% - 50vw); padding-inline: calc(50vw - 50%); }
.fee-row { border-top: 1px solid var(--rule); border-bottom: 3px double var(--ink); }
.figure, .amount, .fee-row .amount { font-variant-numeric: lining-nums tabular-nums; }

.btn { transition: background 0.18s ease-out, color 0.18s ease-out, transform 0.1s ease-out, border-color 0.18s ease-out; }
.btn:active { transform: translateY(1px); }
.btn-line { border: 1px solid var(--ink); }

.clause .num { transition: color 0.18s ease-out; }
.clause:hover .num { color: var(--ledger); }
.masthead .wordmark { transition: color 0.18s ease-out; }
.masthead .wordmark:hover { color: var(--ledger-deep); }

.stack-s { margin-top: 0.875rem; }
.tools { display: flex; gap: 0.625rem; flex-wrap: wrap; margin: 1.25rem 0; }

@media (max-width: 40rem) {
  .masthead { flex-direction: column; align-items: flex-start; gap: 0.375rem; }
  .masthead .honesty { text-align: left; max-width: none; }
}

@media print {
  .masthead .honesty, .btn, .tools, .skip, .no-print, footer.colophon .wordmark { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .article blockquote { background: none; border-left: 2px solid #000; }
  a { color: #000; text-decoration: none; }
  .masthead { border-bottom: 1px solid #000; }
}
