/* Munim Books: cream ledger paper, ink brown, khata red and mustard. Young Serif for headings, IBM Plex Sans for text,
   IBM Plex Mono for figures. Change the colours and fonts here; base.css reads these variables. */
:root {
  --bg: #F6EFE0;
  --surface: #FFFCF4;
  --soft: #EFE4CC;
  --ink: #2B2118;
  --muted: #6A5A49;
  --line: #E0D2B4;
  --line-strong: #C9B48C;
  --brand: #B83A2E;
  --brand-hover: #9C2F24;
  --brand-ink: #FFFFFF;
  --brand-text: #A33328;
  --mustard: #D9A21B;
  --badge-bg: #D9A21B;
  --badge-ink: #2B2118;
  --out-bg: #2B2118;
  --out-ink: #F6EFE0;
  --out-accent: #F2C34E;
  --out-btn: #D9A21B;
  --out-btn-ink: #2B2118;
  --cta-bg: #B83A2E;
  --cta-ink: #FFFFFF;
  --head: "Young Serif", Georgia, serif;
  --body: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 6px;
  --radius-lg: 10px;
  --btn-radius: 6px;
  --wrap: 1160px;
  --gap: 20px;
  --rule: repeating-linear-gradient(180deg, transparent 0 31px, rgba(47,93,138,.14) 31px 32px);
}
body { background-color: var(--bg); }
h1, h2, h3 { font-weight: 400; letter-spacing: -.01em; }
.eyebrow { color: var(--brand-text); font-family: var(--mono); letter-spacing: .08em; }
.btn { font-weight: 600; }
.btn-ghost { border-color: var(--ink); }
.ic { color: var(--brand); }
.out-total, .numbers b, .s-facts dd, .out-lines dd { font-family: var(--mono); }

.header { background: var(--bg); border-bottom: 3px double var(--ink); }
.header > .wrap { min-height: 74px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark { width: 40px; height: 40px; }
.logo span { display: grid; line-height: 1.05; }
.logo b { font: 400 1.45rem var(--head); }
.logo small { font: 500 .72rem var(--mono); color: var(--muted); }
.nav a { font-weight: 500; }
.nav a[aria-current="page"], .nav a:hover { background: var(--soft); }

.hero { padding-block: clamp(36px, 6vw, 88px); background: var(--rule); background-color: var(--bg); position: relative; }
.hero::before { content: ""; position: absolute; top: 0; bottom: 0; left: clamp(8px, 4vw, 48px); width: 2px; background: rgba(184,58,46,.5); box-shadow: 5px 0 0 rgba(184,58,46,.5); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; position: relative; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }
.hero h1 { font-size: clamp(2.4rem, 5.6vw, 4rem); margin: 16px 0 18px; line-height: 1.05; }
.hero h1 em { font-style: normal; color: var(--brand); text-decoration: line-through; text-decoration-thickness: 3px; }
.hero .t-actions { margin-top: 26px; }
.khata { position: relative; margin: 0; padding: 22px 20px 26px; background: var(--surface); border: 1px solid var(--line-strong); border-left: 10px solid var(--brand); border-radius: 4px 10px 10px 4px; box-shadow: 0 30px 50px -30px rgba(43,33,24,.5); transform: rotate(1.2deg); }
.khata figcaption { font: 400 1.3rem var(--head); margin-bottom: 10px; }
.khata figcaption span { font: 500 .78rem var(--mono); color: var(--muted); }
.khata table { width: 100%; border-collapse: collapse; font: 500 .84rem var(--mono); }
.khata th { text-align: left; font-weight: 600; color: var(--brand-text); border-bottom: 2px solid var(--brand); padding: 6px 4px; }
.khata td { padding: 9px 4px; border-bottom: 1px solid rgba(47,93,138,.2); }
.khata .num { text-align: right; white-space: nowrap; }
.khata th:nth-child(n+3) { text-align: right; }
.khata-stamp { position: absolute; right: 16px; bottom: -14px; padding: 6px 14px; border: 3px solid #2E7D4F; border-radius: 6px; color: #2E7D4F; font: 600 .9rem var(--mono); text-transform: uppercase; letter-spacing: .1em; background: var(--surface); transform: rotate(-8deg); }
@media (max-width: 480px) { .khata { transform: none; padding: 16px 12px 24px; } .khata table { font-size: .74rem; } .khata td:first-child, .khata th:first-child { display: none; } }

.rhythm { background: var(--surface); border-block: 1px solid var(--line); }
.cal-row { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); overflow: hidden; }
.cal-row li { display: grid; gap: 4px; align-content: start; padding: 18px; border-left: 1px solid var(--line-strong); background: var(--rule); }
.cal-row li:first-child { border-left: 0; }
.cal-row b { font: 600 .9rem var(--mono); color: var(--brand); }
.cal-row h3 { font-size: 1.2rem; }
.cal-row p { color: var(--muted); font-size: .92rem; }
@media (max-width: 860px) { .cal-row { grid-template-columns: minmax(0, 1fr); } .cal-row li { border-left: 0; border-top: 1px solid var(--line-strong); } .cal-row li:first-child { border-top: 0; } }

.s-card { border-color: var(--line-strong); border-top: 4px solid var(--ink); }
.s-cat { color: var(--brand-text); font-family: var(--mono); }
.page-head { background: var(--rule); border-bottom: 3px double var(--ink); margin-bottom: clamp(32px, 5vw, 56px); }
.quotes li { background: var(--surface); border-left: 6px solid var(--mustard); }
.quotes blockquote { font-family: var(--head); font-size: 1.12rem; }
.values li { border-top: 3px double var(--ink); }
.numbers-band { background: var(--surface); }
.footer { background: var(--ink); color: #E8DCC2; }
.footer .logo small { color: #BFAF92; }
.cta-band .btn-primary { background: var(--mustard); color: var(--ink); }

.ledger-card { background: var(--surface); background-image: var(--rule); }
.ledger-card output { font-family: var(--mono); color: var(--brand); font-weight: 600; }
.tool-in .hint { color: var(--muted); font-size: .86rem; }
.choice label { background: var(--surface); }
.tool-out { border-left: 10px solid var(--brand); }
.tool-out .out-total { font-size: clamp(1.8rem, 4.4vw, 2.5rem); }
.tool-out .disclaimer { color: #E8DCC2; }
@media (max-width: 640px) { .hero::before { display: none; } }
