/* Tanda: shared styles for the site and the app.
   Paper, ink and one pink. Young Serif for display, Libre Franklin (an American newspaper gothic)
   for text and amounts, Atkinson Hyperlegible Mono only for addresses, Kalam for pencil notes. */

@font-face { font-family: "Young Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/young-serif-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Young Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/young-serif-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Libre Franklin"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/libre-franklin-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Libre Franklin"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/libre-franklin-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Libre Franklin"; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url(fonts/libre-franklin-italic-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Libre Franklin"; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url(fonts/libre-franklin-italic-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Atkinson Mono"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(fonts/atkinson-mono-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Atkinson Mono"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(fonts/atkinson-mono-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Kalam"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/kalam-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Kalam"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/kalam-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --paper: #f4eee2;
  --paper-deep: #ece3d1;
  --card: #fbf8f2;
  --rule: #d8ccb5;
  --rule-soft: #e5dbc9;
  --ink: #1d2130;
  --ink-soft: #444a59;
  --pencil: #787162;
  --rosa: #c22d6a;
  --rosa-text: #b02560;
  --rosa-ink: #ffffff;
  --rosa-soft: #f3d9e3;
  --paid: #2d6a4d;
  --late: #9c6410;
  --owed: #a3392a;
  --focus: #2a5bd7;

  --serif: "Young Serif", Georgia, "Times New Roman", serif;
  --sans: "Libre Franklin", "Franklin Gothic Book", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Atkinson Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --hand: "Kalam", "Segoe Print", "Bradley Hand", cursive;

  --maxw: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #16181e; --paper-deep: #1c1f26; --card: #1f222a; --rule: #363a46; --rule-soft: #2a2e38;
    --ink: #ede6d8; --ink-soft: #c3bcad; --pencil: #958e80; --rosa: #e0558e; --rosa-text: #ec7aa6;
    --rosa-ink: #16181e; --rosa-soft: #3b2231; --paid: #6fc197; --late: #e2a852; --owed: #ef8069;
    --focus: #8fb0ff; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #16181e; --paper-deep: #1c1f26; --card: #1f222a; --rule: #363a46; --rule-soft: #2a2e38;
  --ink: #ede6d8; --ink-soft: #c3bcad; --pencil: #958e80; --rosa: #e0558e; --rosa-text: #ec7aa6;
  --rosa-ink: #16181e; --rosa-soft: #3b2231; --paid: #6fc197; --late: #e2a852; --owed: #ef8069;
  --focus: #8fb0ff; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--paper);
  /* Paper grain, baked into a small tile so it costs nothing to paint. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .4 0 0 0 0 .32 0 0 0 .045 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  overflow-x: hidden;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-color: var(--rosa); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 3px; }
img, svg { max-width: 100%; }
p { margin: 0 0 1em; }
strong { font-weight: 700; }
em { font-style: italic; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.hand { font-family: var(--hand); }

/* Header */
.site-head { padding: 22px 0 0; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand b { font: 400 1.65rem/1 var(--serif); letter-spacing: -.01em; }
.nav { display: flex; align-items: center; gap: 22px; font-size: .95rem; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--ink-soft); }
.nav a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--rosa); }
.nav a.btn-ink { color: var(--paper); text-decoration: none; }
.nav .lang { font-family: var(--mono); font-size: .85rem; border: 1px solid var(--rule); padding: 3px 8px; border-radius: 4px; }
@media (max-width: 760px) { .nav .hide-sm { display: none; } .nav { gap: 14px; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .78em 1.2em; border-radius: 6px; border: 1.5px solid var(--ink);
  background: transparent; color: var(--ink); font: 700 1rem/1.1 var(--sans);
  text-decoration: none; cursor: pointer; transition: transform .12s ease, background .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--rosa); border-color: var(--rosa); color: var(--rosa-ink); }
.btn-ink { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-quiet { border-color: var(--rule); }
.btn[disabled], .btn.is-busy { opacity: .5; pointer-events: none; }
.btn-sm { padding: .5em .8em; font-size: .9rem; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: clamp(28px, 5vw, 64px); align-items: center; padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 7vw, 96px); }
.eyebrow { font: 700 .78rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--pencil); margin: 0 0 18px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
h1 { font-size: clamp(2.7rem, 6.4vw, 4.9rem); line-height: 1; margin: 0 0 26px; }
h1 .second { display: block; color: var(--rosa-text); }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.25rem); line-height: 1.55; color: var(--ink-soft); max-width: 33em; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 30px 0 18px; }
.fineprint { font-size: .9rem; color: var(--pencil); }
.fineprint span + span::before { content: "·"; margin: 0 .55em; color: var(--rule); }
.ring-figure { margin: 0; }
.ring-figure svg { display: block; width: 100%; height: auto; }
@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .ring-figure { max-width: 520px; margin: 8px auto 0; }
}

/* Ring (shared with the app) */
.ring-track { fill: none; stroke: var(--rule); stroke-width: 2; }
.ring-arc { fill: none; stroke: var(--rosa); stroke-width: 7; stroke-linecap: round; }
.seat circle { fill: var(--card); stroke: var(--ink); stroke-width: 1.6; }
.seat text { font-family: var(--sans); font-weight: 600; font-variant-numeric: tabular-nums; font-size: 15px; fill: var(--ink); text-anchor: middle; dominant-baseline: central; }
.seat.done circle { fill: var(--ink); }
.seat.done text { fill: var(--paper); }
.seat.now circle { fill: var(--rosa); stroke: var(--rosa); }
.seat.now text { fill: var(--rosa-ink); font-weight: 700; }
.seat.empty circle { fill: transparent; stroke-dasharray: 3 4; stroke: var(--pencil); }
.seat.empty text { fill: var(--pencil); }
.seat-name { font-family: var(--sans); font-size: 15px; fill: var(--ink-soft); }
.pot-amount { font-family: var(--serif); font-size: 58px; fill: var(--ink); text-anchor: middle; }
.pot-label { font-family: var(--sans); font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; fill: var(--pencil); text-anchor: middle; }
.pot-sub { font-family: var(--sans); font-size: 13.5px; fill: var(--pencil); text-anchor: middle; }
.note-hand { font-family: var(--hand); font-size: 19px; fill: var(--rosa-text); }
.note-line { fill: none; stroke: var(--rosa-text); stroke-width: 1.6; stroke-linecap: round; }
@media (prefers-reduced-motion: no-preference) {
  .ring-arc.draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.6s .3s cubic-bezier(.3,.1,.2,1) forwards; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
}

/* Sections */
.section { padding: clamp(56px, 8vw, 96px) 0; border-top: 1px solid var(--rule); }
.section h2 { font-size: clamp(2rem, 3.8vw, 2.9rem); line-height: 1.08; margin: 0 0 22px; max-width: 18em; }
.section .intro { font-size: 1.15rem; color: var(--ink-soft); max-width: 38em; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); }
.split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 860px) { .two-col, .split { grid-template-columns: minmax(0, 1fr); } }
.kicker { font: 700 .78rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--rosa-text); margin: 0 0 14px; }

/* The hundred names */
.names { font-family: var(--serif); font-size: clamp(1.3rem, 2.5vw, 1.85rem); line-height: 1.55; margin: 34px 0 30px; max-width: 58em; }
.names span { white-space: nowrap; }
.names small { font: 700 .7rem/1 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--pencil); margin-left: .4em; position: relative; top: -.35em; }
.names i { font-style: normal; color: var(--rule); margin: 0 .5em; }
.source { font-size: .85rem; color: var(--pencil); }

/* The notebook */
.notebook {
  position: relative; background: var(--card); border: 1px solid var(--rule); border-radius: 3px;
  padding: 18px 18px 12px 58px; box-shadow: 0 1px 0 var(--rule-soft), 0 12px 30px -22px rgba(40, 30, 10, .35);
}
.notebook::before { content: ""; position: absolute; top: 0; bottom: 0; left: 40px; width: 1.5px; background: var(--rosa); opacity: .55; }
@media (max-width: 560px) { .notebook { padding-left: 38px; padding-right: 10px; } .notebook::before { left: 24px; } }
.notebook .title { font-family: var(--hand); font-size: 1.2rem; color: var(--ink-soft); margin: 0 0 6px; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ledger { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; min-width: 380px; }
.ledger th { font: 700 .72rem/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--pencil); text-align: center; padding: 8px 4px 10px; }
.ledger th:first-child, .ledger td:first-child { text-align: left; }
.ledger td { border-top: 1px solid var(--rule-soft); height: 50px; text-align: center; padding: 0 4px; }
.ledger th.who { font: 400 1.12rem/1.2 var(--serif); letter-spacing: 0; text-transform: none; color: var(--ink); white-space: nowrap; padding: 0 8px 0 0; }
.ledger .who .n { font: 600 .8rem/1 var(--sans); font-variant-numeric: tabular-nums; color: var(--pencil); display: inline-block; width: 1.5em; }
.tick { width: 24px; height: 24px; color: var(--paid); vertical-align: middle; }
.collects { position: relative; display: inline-block; font-family: var(--hand); font-size: 1.15rem; color: var(--rosa-text); padding: 0 6px; white-space: nowrap; }
.collects svg { position: absolute; left: -8px; top: -7px; width: calc(100% + 16px); height: calc(100% + 14px); overflow: visible; }
.collects svg path { fill: none; stroke: var(--rosa-text); stroke-width: 1.4; stroke-linecap: round; }
@media (max-width: 560px) {
  .ledger { min-width: 0; }
  .ledger th { font-size: .62rem; letter-spacing: .04em; padding: 6px 2px 8px; }
  .ledger th.who { font-size: 1rem; padding-right: 4px; }
  .ledger .who .n { width: 1.2em; }
  .ledger td { height: 44px; padding: 0 2px; }
  .tick { width: 20px; height: 20px; }
  .collects { font-size: .92rem; padding: 0 3px; }
  .collects svg { left: -5px; width: calc(100% + 10px); }
}
.after-ledger { font-size: 1.15rem; color: var(--ink-soft); max-width: 30em; margin: 0; }
.after-ledger + .after-ledger { margin-top: 1em; }
.how-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(28px, 5vw, 56px); align-items: center; }
@media (max-width: 860px) { .how-grid { grid-template-columns: minmax(0, 1fr); } }
.how-grid > *, .split > *, .two-col > *, .hero > * { min-width: 0; }

.steps { list-style: none; padding: 0; margin: 48px 0 0; counter-reset: step; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.steps li { counter-increment: step; border-top: 1.5px solid var(--ink); padding-top: 14px; }
.steps li::before { content: counter(step); display: block; font: 400 2.1rem/1 var(--serif); color: var(--rosa-text); margin-bottom: 10px; }
.steps b { display: block; font-size: 1.08rem; margin-bottom: 2px; }
.steps p { margin: 0; color: var(--ink-soft); }

/* What's different */
.diffs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px clamp(28px, 5vw, 64px); margin-top: 36px; }
.diffs h3 { font-size: 1.45rem; margin: 0 0 10px; line-height: 1.2; }
.diffs h3::after { content: ""; display: block; width: 38px; height: 3px; background: var(--rosa); margin-top: 12px; border-radius: 2px; }
.diffs p { color: var(--ink-soft); margin: 0; }
@media (max-width: 760px) { .diffs { grid-template-columns: minmax(0, 1fr); } }

/* Protection demo */
.demo { background: var(--card); border: 1px solid var(--rule); border-radius: 4px; padding: 22px; }
.demo-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.demo-head b { font-family: var(--serif); font-weight: 400; font-size: 1.25rem; }
.demo-head span { color: var(--pencil); font-size: .9rem; }
.slider { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; margin: 6px 0 18px; font-size: .9rem; color: var(--pencil); }
.slider output { font-family: var(--sans); font-weight: 600; font-variant-numeric: tabular-nums; font-size: 1.05rem; color: var(--ink); min-width: 4ch; text-align: right; }
input[type="range"] { width: 100%; accent-color: var(--rosa); }
.bars { display: grid; gap: 7px; }
.bar { display: grid; grid-template-columns: 2.6em minmax(0, 1fr) 5em; gap: 12px; align-items: center; font-size: .92rem; font-variant-numeric: tabular-nums; }
.bar .lbl { color: var(--pencil); }
.bar .track { height: 12px; border-radius: 2px; background: var(--rule-soft); overflow: hidden; }
.bar .fill { display: block; height: 100%; width: var(--w, 0%); background: var(--ink); transition: width .25s ease; }
.bar .amt { text-align: right; }
.demo-note { margin: 16px 0 0; font-size: .95rem; color: var(--ink-soft); min-height: 3em; }

/* Token */
.token-card { border: 1.5px solid var(--ink); border-radius: 4px; padding: 26px; background: var(--card); position: relative; }
.stamp {
  position: absolute; top: -14px; right: 22px; transform: rotate(4deg);
  font: 700 .8rem/1 var(--mono); letter-spacing: .12em; color: var(--rosa-text);
  border: 1.5px solid var(--rosa-text); padding: 6px 10px; border-radius: 3px; background: var(--paper);
}
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 18px 0 0; }
.facts dt { color: var(--pencil); font-size: .9rem; }
.facts dd { margin: 0; font-size: .98rem; }
.facts dd.addr, .facts dd .addr { font-family: var(--mono); font-size: .9rem; overflow-wrap: anywhere; }

/* FAQ */
.faq { max-width: 50em; }
.faq details { border-top: 1px solid var(--rule); padding: 18px 0; }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; font-family: var(--serif); font-size: 1.28rem; line-height: 1.3; display: flex; justify-content: space-between; gap: 18px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--rosa-text); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 12px 0 0; color: var(--ink-soft); max-width: 42em; }

/* Footer */
.site-foot { border-top: 1px solid var(--rule); padding: 36px 0 48px; font-size: .9rem; color: var(--pencil); }
.site-foot .wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; }
.site-foot a { color: var(--ink-soft); }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 760px) { .site-foot .wrap { grid-template-columns: 1fr; } .foot-links { justify-content: flex-start; } }
