/* Rollbook guides, blog hub and privacy page. Same "Passbook" palette and faces as site.css
   (apps/rollbook ui/theme/RollbookTokens.kt): ink on paper, the green cover only for the answer
   band and the call to action, Plex Mono for every count and date. */

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/plex-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #F5F3EC;
  --card: #FFFFFF;
  --ink: #1B1F1C;
  --ink2: #555B55;
  --rule: #C9CFC4;
  --cover: #1E4B3B;
  --on-cover: #FFFFFF;
  --action: #1E4B3B;
  --on-action: #FFFFFF;
  --today: #E8EEE6;
  --debit: #8E2F1F;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #151916;
    --card: #1C211D;
    --ink: #E7EAE4;
    --ink2: #A6ADA5;
    --rule: #2E352F;
    --cover: #0F2A20;
    --on-cover: #F0EEE6;
    --action: #A8D5BF;
    --on-action: #102019;
    --today: #1D2620;
    --debit: #F08A73;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.22; font-weight: 600; }
code, .mono, .n { font-family: var(--mono); }
code { font-size: 0.92em; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

.site-head { border-bottom: 1px solid var(--rule); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; text-decoration: none; }
.head-nav { display: flex; align-items: center; gap: 6px; }
.head-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; text-decoration: none; font-weight: 600; font-size: 15px; border-radius: 4px; }
.head-nav a.get { background: var(--action); color: var(--on-action); }
.head-nav a[aria-current] { text-decoration: underline; }

.sheet { max-width: 740px; margin: 0 auto; padding: 32px 0 64px; }
.crumbs { font-size: 14px; color: var(--ink2); }
.sheet h1 { font-size: clamp(30px, 5vw, 42px); font-weight: 700; margin: 18px 0 0; letter-spacing: -0.01em; }
.standfirst { font-size: 19px; margin: 14px 0 0; }
.byline, .meta { font-size: 14px; color: var(--ink2); margin: 14px 0 0; padding-bottom: 18px; border-bottom: 1px solid var(--rule); }
.sheet h2 { font-size: 25px; margin: 40px 0 10px; }
.sheet h3 { font-size: 19px; margin: 26px 0 6px; }
.sheet p, .sheet ul, .sheet ol { margin: 12px 0 0; }
.sheet li { margin-top: 6px; }

.answer { background: var(--cover); color: var(--on-cover); border-radius: 12px; padding: 18px 22px 20px; margin-top: 26px; }
.answer h2 { font-size: 15px; margin: 0; letter-spacing: 0.04em; text-transform: uppercase; }
.answer p { margin-top: 8px; }
.inline-cta { font-size: 15px; color: var(--ink2); margin-top: 14px; }
.inline-cta a { display: inline-block; margin-right: 8px; padding: 6px 12px; border: 1px solid var(--action); border-radius: 4px; text-decoration: none; font-weight: 600; color: var(--ink); }

.note { background: var(--card); border: 1px solid var(--rule); border-left: 3px solid var(--cover); border-radius: 4px; padding: 12px 16px; margin-top: 18px; font-size: 16px; }
@media (prefers-color-scheme: dark) { .note { border-left-color: var(--action); } }

/* Worked examples: a ledger, rows divided by rules */
.ledger { width: 100%; border-collapse: collapse; font-size: 15px; margin-top: 16px; background: var(--card); }
.ledger caption { text-align: left; font-size: 14px; color: var(--ink2); padding-bottom: 6px; }
.ledger th { text-align: left; font-size: 13px; font-weight: 600; color: var(--ink2); padding: 8px 10px; border-bottom: 2px solid var(--ink); }
.ledger td { padding: 9px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.ledger .n { text-align: right; white-space: nowrap; }
.ledger th.n { font-family: var(--sans); }
.ledger .date { font-family: var(--mono); font-size: 14px; white-space: nowrap; }
.ledger .debit { color: var(--debit); }
.ledger tr.total td { font-weight: 600; border-bottom: 2px solid var(--ink); background: var(--today); }
.ledger tr.over td { color: var(--debit); font-weight: 600; }
@media (max-width: 560px) {
  .ledger.stack thead { display: none; }
  .ledger.stack tr { display: block; border-bottom: 1px solid var(--rule); padding: 6px 0; }
  .ledger.stack td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 4px 10px; text-align: right; }
  .ledger.stack td::before { content: attr(data-label); font-family: var(--sans); font-weight: 600; color: var(--ink2); text-align: left; }
  .ledger.stack tr.total { background: var(--today); border-bottom: 2px solid var(--ink); }
  .ledger.stack tr.total td { border: 0; background: none; }
}

.cta { background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 20px 22px; margin-top: 44px; }
.cta-top { display: flex; align-items: center; gap: 12px; }
.cta-top strong { font-size: 18px; }
.cta p { margin-top: 10px; }
.button { display: inline-flex; align-items: center; min-height: 48px; margin-top: 14px; padding: 0 18px; border-radius: 4px; background: var(--action); color: var(--on-action); font-weight: 600; text-decoration: none; }

.more { margin-top: 40px; }
.more h2 { font-size: 20px; margin: 0; }
.more ul, .posts { list-style: none; padding: 0; margin: 10px 0 0; border-top: 2px solid var(--ink); }
.more li, .posts li { margin: 0; border-bottom: 1px solid var(--rule); }
.more a { display: block; padding: 12px 0; font-weight: 600; text-decoration: none; }
.more a:hover, .posts a:hover strong { text-decoration: underline; }

.post-group { margin-top: 32px; }
.post-group h2 { font-size: 15px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink2); margin: 0 0 6px; }
.posts a { display: block; padding: 14px 0; text-decoration: none; }
.posts strong { display: block; font-size: 18px; }
.posts span { display: block; color: var(--ink2); font-size: 15px; margin-top: 2px; }

.site-foot { border-top: 1px solid var(--rule); padding: 32px 0 48px; font-size: 14px; color: var(--ink2); }
.site-foot p { margin: 0; }
.site-foot p + p { margin-top: 8px; }
