/*
 * Generous Machine design tokens: Direction A "Ledger" (with the gear mark, headlines in Young Serif)
 * Light-first: warm paper ground, deep navy ink, one rust accent, serif headlines.
 * Fonts (Google Fonts):
 *   Young Serif 400 (only weight) · Inter 400,500,600 · JetBrains Mono 400,500
 *   https://fonts.googleapis.com/css2?family=Young+Serif&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap
 */
:root {
  /* Color: core */
  --gm-paper:      #F6F1E7; /* ground on light, text on dark */
  --gm-paper-2:    #EFE8D8; /* panels on paper */
  --gm-rule:       #D9CFBD; /* rules and borders on paper */
  --gm-ink:        #16233B; /* text on light, ground on dark */
  --gm-ink-2:      #232F47; /* panels on ink */
  --gm-ink-rule:   #4A5878; /* rules on ink */
  --gm-rust:       #B5471F; /* the one accent, on paper (4.5:1+ as text) */
  --gm-rust-hover: #8F3817;
  --gm-rust-light: #E58A5F; /* the accent on ink backgrounds */
  --gm-done:       #3F6B4A; /* "done" / success, on paper */
  --gm-done-light: #7FBF93; /* "done" on ink */

  /* Color: text */
  --gm-text-on-light:       #16233B;
  --gm-text-muted-on-light: #3C465A;
  --gm-text-on-dark:        #F6F1E7;
  --gm-text-muted-on-dark:  #D9CFBD;

  /* Type: families */
  --gm-font-display: "Young Serif", Georgia, serif;
  --gm-font-body:    "Inter", system-ui, sans-serif;
  --gm-font-mono:    "JetBrains Mono", ui-monospace, Menlo, monospace;

  /* Type: weights */
  --gm-weight-display: 400; /* Young Serif ships one weight; never fake bold */

  /* Type: scale (px) */
  --gm-text-xs:   12px; /* mono labels, caps */
  --gm-text-sm:   14px;
  --gm-text-base: 16px;
  --gm-text-lg:   18px; /* lead paragraph */
  --gm-text-xl:   24px;
  --gm-text-2xl:  34px;
  --gm-text-3xl:  48px;
  --gm-text-4xl:  60px; /* hero */
  --gm-text-num:  64px; /* big numbers on slides */

  --gm-leading-tight: 1.05;
  --gm-leading-body:  1.5;
  --gm-tracking-display: -0.01em; /* big serif headlines */
  --gm-tracking-label:   0.1em;   /* mono labels, caps */

  /* Spacing (4px base) */
  --gm-space-1: 4px;
  --gm-space-2: 8px;
  --gm-space-3: 12px;
  --gm-space-4: 16px;
  --gm-space-5: 24px;
  --gm-space-6: 32px;
  --gm-space-7: 48px;
  --gm-space-8: 64px;
  --gm-space-9: 96px;

  /* Shape */
  --gm-radius: 2px;     /* squared off */
  --gm-rule-width: 1px;
  --gm-rule-heavy: 4px; /* rust rule on slides */
  --gm-tap-min: 44px;
}

/* Semantic defaults: light first */
.gm-light { background: var(--gm-paper); color: var(--gm-text-on-light); }
.gm-dark  { background: var(--gm-ink);   color: var(--gm-text-on-dark); }

.gm-display { font-family: var(--gm-font-display); font-weight: var(--gm-weight-display); line-height: var(--gm-leading-tight); letter-spacing: var(--gm-tracking-display); }
.gm-body    { font-family: var(--gm-font-body); line-height: var(--gm-leading-body); }
.gm-label   { font-family: var(--gm-font-mono); font-size: var(--gm-text-xs); letter-spacing: var(--gm-tracking-label); text-transform: uppercase; color: var(--gm-rust); }
.gm-dark .gm-label { color: var(--gm-rust-light); }

.gm-button {
  background: var(--gm-rust); color: #fff;
  font: 600 var(--gm-text-base) var(--gm-font-body);
  padding: 14px 24px; min-height: var(--gm-tap-min);
  border: 0; border-radius: var(--gm-radius);
}
.gm-button:hover { background: var(--gm-rust-hover); }
.gm-dark .gm-button { background: var(--gm-rust-light); color: var(--gm-ink); }
