/* onemilliondollars.org — design system
   Palette: banknote. Paper #F3F6F0 · Ink #16241C · Green #1C5A3C · Deep #0D3A24 · Brass #A07E2C · Line #D7DED3 */

:root {
  --paper: #F3F6F0;
  --card: #FCFDFB;
  --ink: #16241C;
  --muted: #51604F;
  --green: #1C5A3C;
  --deep: #0D3A24;
  --brass: #A07E2C;
  --line: #D7DED3;
  --display: "Didot", "Bodoni MT", "Bodoni 72", "Playfair Display", Georgia, "Times New Roman", serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max: 68rem;
  --text: 42rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Guilloché edge — banknote stripe along the top of every page */
.edge {
  height: 7px;
  background: repeating-linear-gradient(
    -45deg,
    var(--deep) 0 6px,
    var(--green) 6px 12px,
    var(--brass) 12px 14px,
    var(--green) 14px 20px
  );
}

a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--deep); }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; border-radius: 2px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }

/* Header */
.site-head { border-bottom: 1px solid var(--line); background: var(--card); }
.site-head .wrap {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1.5rem;
  padding-top: 1rem; padding-bottom: 1rem;
}
.brand { font-family: var(--display); font-size: 1.35rem; letter-spacing: .01em; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand .m { color: var(--green); }
.brand .org { color: var(--muted); font-size: .8em; }
.site-nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: .25rem .5rem; }
.site-nav a {
  text-decoration: none; color: var(--ink); font-size: .86rem; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase; padding: .35rem .6rem; border-radius: 3px;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--paper); color: var(--deep); }

/* Type */
h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.12; letter-spacing: .005em; margin: 0 0 .6em; }
h1 { font-size: clamp(2.1rem, 5.5vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); margin-top: 2.2em; }
h3 { font-size: 1.2rem; margin-top: 1.8em; }
p, ul, ol { max-width: var(--text); }
.eyebrow {
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brass); margin: 0 0 .9rem;
}
.lede { font-size: 1.2rem; color: var(--muted); max-width: var(--text); }
.num { font-variant-numeric: tabular-nums; }

/* Hero */
.hero { padding: 3.5rem 0 2.5rem; }
.hero h1 { max-width: 20ch; }
.hero .lede { margin-top: .4rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.6rem; }
.btn {
  display: inline-block; padding: .7rem 1.3rem; border-radius: 3px; text-decoration: none;
  font-weight: 700; font-size: .95rem; letter-spacing: .02em; border: 1.5px solid var(--deep);
}
.btn-solid { background: var(--deep); color: #fff; }
.btn-solid:hover { background: var(--green); color: #fff; }
.btn-ghost { color: var(--deep); background: transparent; }
.btn-ghost:hover { background: var(--card); }

/* Signature: the milestone ruler, $0 → $1,000,000 */
.ruler { margin: 3rem 0 1rem; }
.ruler-track {
  position: relative; height: 12px; border-radius: 6px;
  background: linear-gradient(90deg, var(--line) 0 35%, var(--green) 35% 82%, var(--brass) 82% 100%);
  background: repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 5%),
              linear-gradient(90deg, #CBD5C6, var(--green) 55%, var(--brass));
}
.ruler-stops { display: flex; justify-content: space-between; margin-top: .6rem; font-variant-numeric: tabular-nums; }
.ruler-stops a { font-size: .85rem; font-weight: 700; text-decoration: none; color: var(--ink); border-bottom: 2px solid var(--brass); }
.ruler-stops a:hover { color: var(--deep); border-color: var(--deep); }
.ruler-cap { font-size: .8rem; color: var(--muted); margin-top: .5rem; }

/* Figure strip */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 2.5rem 0; }
.figure { background: var(--card); padding: 1.4rem 1.5rem; }
.figure b { display: block; font-family: var(--display); font-size: 1.9rem; font-weight: 500; color: var(--deep); font-variant-numeric: tabular-nums; }
.figure span { font-size: .9rem; color: var(--muted); }

/* Ledger pillars */
.ledger { list-style: none; margin: 1.5rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.ledger li { display: grid; grid-template-columns: 4.5rem 1fr; gap: 1.25rem; padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.ledger .no { font-family: var(--display); font-size: 1.9rem; color: var(--brass); line-height: 1; }
.ledger h3 { margin: 0 0 .3rem; }
.ledger p { margin: 0 0 .5rem; color: var(--muted); }
.ledger .go { font-weight: 700; font-size: .95rem; }

/* Card grid of guides */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; margin: 1.5rem 0; padding: 0; list-style: none; }
.grid a {
  display: block; background: var(--card); border: 1px solid var(--line); border-radius: 4px;
  padding: 1.1rem 1.2rem; text-decoration: none; color: var(--ink); height: 100%;
}
.grid a:hover { border-color: var(--green); }
.grid b { font-family: var(--display); font-weight: 500; font-size: 1.15rem; display: block; margin-bottom: .3rem; color: var(--deep); }
.grid span { font-size: .9rem; color: var(--muted); }

/* Article layout */
.article { padding: 3rem 0 4rem; }
.article header { margin-bottom: 1.5rem; }
table { border-collapse: collapse; margin: 1.5rem 0; width: 100%; max-width: var(--text); font-variant-numeric: tabular-nums; font-size: .97rem; background: var(--card); }
th, td { text-align: left; padding: .6rem .8rem; border: 1px solid var(--line); }
th { background: var(--paper); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; }
.note { border-left: 3px solid var(--brass); background: var(--card); padding: .9rem 1.1rem; max-width: var(--text); font-size: .95rem; color: var(--muted); margin: 1.5rem 0; }

/* Calculator */
.calc { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 1.5rem; max-width: var(--text); margin: 1.5rem 0; }
.calc label { display: block; font-size: .85rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; margin: 1rem 0 .3rem; }
.calc input { width: 100%; max-width: 16rem; padding: .55rem .7rem; font-size: 1.05rem; border: 1.5px solid var(--line); border-radius: 3px; background: #fff; font-variant-numeric: tabular-nums; }
.calc input:focus { border-color: var(--green); }
.calc-out { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px dashed var(--line); }
.calc-out b { font-family: var(--display); font-size: 2rem; font-weight: 500; color: var(--deep); font-variant-numeric: tabular-nums; }
.calc-out p { margin: .3rem 0 0; color: var(--muted); }

/* Footer — full site index */
.site-foot { border-top: 1px solid var(--line); background: var(--card); margin-top: 4rem; }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 2rem 1.5rem; padding: 2.5rem 0 1.5rem; }
.foot-grid h2 { font-size: .8rem; font-family: var(--body); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brass); margin: 0 0 .8rem; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin: 0 0 .45rem; }
.foot-grid a { font-size: .92rem; text-decoration: none; color: var(--ink); }
.foot-grid a:hover { color: var(--green); text-decoration: underline; }
.foot-legal { border-top: 1px solid var(--line); padding: 1.2rem 0 2rem; font-size: .82rem; color: var(--muted); }
.foot-legal p { max-width: none; margin: .3rem 0; }

@media (max-width: 40rem) {
  .ledger li { grid-template-columns: 3rem 1fr; gap: .9rem; }
  .hero { padding-top: 2.5rem; }
  .ruler-stops a:nth-child(3), .ruler-stops a:nth-child(5) { display: none; } /* keep $0 and $1M on small screens */
}
