/* ============================================
   LEDGER — Design Tokens (single source of truth)
   Linked by index.html and every subpage before
   their own sheet. Sheet-local values (--max, --col)
   stay in each sheet. Additions are phased in by
   DESIGN_ENHANCEMENT_PLAN.md (D1 foundations).
   ============================================ */
:root {
    /* color */
    --bg: #F4F1EB;
    --bg-alt: #EBE7DF;
    --text: #1B3F7A;
    --muted: #4F6384;
    --accent: #1B3F7A;
    --accent-muted: rgba(27, 63, 122, 0.08);
    --rule: rgba(27, 63, 122, 0.12);
    --rule-strong: rgba(27, 63, 122, 0.25);
    --green: #2D7A4F;
    --red: #B84233;
    --amber: #C47F17;
    --gold: #C5A059;
    --gold-ink: #7A5F1E;
    --gold-soft: rgba(197, 160, 89, 0.45);

    /* type faces */
    --display: 'Source Serif 4', 'Georgia', serif;
    --body: 'Inter', -apple-system, sans-serif;
    --mono: 'JetBrains Mono', 'SF Mono', monospace;

    /* letter-spacing (never applied to Arabic — rtl.css zeroes it) */
    --ls-1: 0.08em;
    --ls-2: 0.12em;
    --ls-3: 0.14em;

    /* motion */
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);
    --dur-1: 0.2s;
    --dur-2: 0.4s;
    --dur-3: 0.7s;
    --dur-4: 1.2s;
    --stagger: 0.07s;

    /* spacing scale (8px base) */
    --sp-1: 0.25rem;
    --sp-2: 0.5rem;
    --sp-3: 0.75rem;
    --sp-4: 1rem;
    --sp-5: 1.5rem;
    --sp-6: 2rem;
    --sp-7: 3rem;
    --sp-8: 4.5rem;
    --sp-9: 6.5rem;
    --sp-10: 9rem;

    /* section rhythm: dense / default / breathing */
    --sec-dense: clamp(3.5rem, 7vh, 5.5rem);
    --sec: clamp(4.5rem, 9vh, 7.5rem);
    --sec-air: clamp(6rem, 12vh, 10rem);

    /* type scale */
    --t-xs: 0.6875rem;
    --t-sm: 0.8125rem;
    --t-md: 1.0625rem;
    --t-lg: 1.25rem;
    --t-xl: 1.5rem;
    --t-h3: clamp(1.25rem, 2vw, 1.5rem);
    --t-h2: clamp(1.75rem, 3.5vw, 2.75rem);
    --t-h1: clamp(2.5rem, 5vw, 4.25rem);
    --t-display: clamp(3rem, 7vw, 6.5rem);
    --measure: 72ch;
    --measure-wide: 88ch;

    /* elevation & shape */
    --ring: 0 0 0 2px var(--gold);
    --shadow-1: 0 2px 8px rgba(27, 63, 122, 0.08);
    --shadow-2: 0 12px 32px rgba(27, 63, 122, 0.14);
    --radius: 2px;

    /* layout shared bits */
    --gutter: clamp(1.75rem, 5.5vw, 5.5rem);
}
