:root {
  /*
    Warm Workshop palette — documentary / craft-paper direction.
    NOTE: variable NAMES are kept from the old dark theme so existing JS
    inline styles keep working; the ROLES have changed:
      --color-bg-dark      -> page paper
      --color-bg-panel     -> card / paper-white surface
      --color-brand-purple -> warm bronze/walnut (technical / machine accent)
      --shadow-*-glow      -> soft physical paper-lift shadows
  */
  --color-bg-dark: #f5f2e9;        /* smooth light-cream beige */
  --color-bg-panel: #fffcf5;       /* creamy off-white card surface */
  --color-bg-panel-hover: #fbf4e4;

  --color-brand-pink: #c2417a;     /* Hachi pink, inked down for paper */
  --color-brand-pink-light: #db6d9e;
  --color-brand-purple: #8a5a2b;   /* warm bronze/walnut — machine/B2B accent */
  --color-brand-purple-light: #b07d3a;

  --color-accent-pink: #b3422c;    /* rust red — rubber stamps, alerts */
  --color-accent-pink-hover: #9c3220;

  /* Soft tinted fills */
  --color-bg-soft: #fbe3ee;
  --color-bg-soft-purple: #f1e6d4;

  /* Ink — warm near-black text */
  --color-text-primary: #2a1f16;
  --color-text-secondary: #51402f;
  --color-text-muted: #6e5a45; /* AA-contrast on paper/cream */

  /* Physical material tones */
  --color-ink: #2a1f16;
  --color-kraft: #33271a;          /* dark kraft (footer) */
  --color-plywood: #d9b98a;
  --color-tape: rgba(229, 213, 176, 0.85);

  /* Typography — editorial serif + handwriting + typewriter */
  --font-headings: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-handwritten: 'Caveat', cursive;
  --font-mono: 'Courier Prime', 'Courier New', monospace;

  /* Grid & Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 0.75rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-xxl: 3.5rem;

  /* Paper corners — crisper than the old bubble look */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-round: 9999px;
  /* Hand-drawn wobble radius (comic bubbles, sketchy buttons) */
  --radius-wobble: 255px 18px 225px 18px / 18px 225px 18px 255px;

  /* Gentle physical transitions (no bounce overshoot) */
  --transition-fast: 0.15s ease-out;
  --transition-normal: 0.25s ease-out;
  --transition-slow: 0.45s ease-out;

  /* Paper-lift shadows (old glow names repurposed) */
  --shadow-sm: 0 1px 2px rgba(58, 38, 20, 0.08);
  --shadow-md: 0 1px 2px rgba(58, 38, 20, 0.07), 0 6px 16px rgba(58, 38, 20, 0.08);
  --shadow-lg: 0 2px 4px rgba(58, 38, 20, 0.08), 0 14px 30px rgba(58, 38, 20, 0.12);
  --shadow-pink-glow: 0 1px 2px rgba(58, 38, 20, 0.10), 0 5px 14px rgba(58, 38, 20, 0.10);
  --shadow-purple-glow: 0 1px 2px rgba(58, 38, 20, 0.10), 0 5px 14px rgba(58, 38, 20, 0.10);
  --shadow-neon-button: 0 2px 0 #8e2c57, 0 4px 10px rgba(58, 38, 20, 0.18);

  /* ---- Texture plates (inline SVG, no image requests) ---- */

  /* Ultra-fine 'Newsprint' grain — high definition, low opacity */
  --tx-grain: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='100'%20height='100'%3E%3Cfilter%20id='n'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='0.9'%20numOctaves='2'%20stitchTiles='stitch'/%3E%3CfeColorMatrix%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.15%200'/%3E%3C/filter%3E%3Crect%20width='100'%20height='100'%20filter='url(%23n)'/%3E%3C/svg%3E");

  /* Soft paper fibre mottle — large warm blotches at low alpha. The main
     craft surface that replaced the dev-looking grid on the page background. */
  --tx-fiber: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='520'%20height='520'%3E%3Cfilter%20id='p'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='0.012%200.017'%20numOctaves='4'%20stitchTiles='stitch'/%3E%3CfeColorMatrix%20type='matrix'%20values='0%200%200%200%200.32%200%200%200%200%200.22%200%200%200%200%200.11%200%200%200%200.07%200'/%3E%3C/filter%3E%3Crect%20width='520'%20height='520'%20filter='url(%23p)'/%3E%3C/svg%3E");

  /* Recycled-paper flecks — sparse warm-dark specks, like pulp in kraft/
     cartridge paper. Sits on light surfaces (body, cards) for tactile grit. */
  --tx-fleck: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='220'%20height='220'%3E%3Cfilter%20id='s'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='0.45'%20numOctaves='1'%20seed='8'%20stitchTiles='stitch'/%3E%3CfeColorMatrix%20type='matrix'%20values='0%200%200%200%200.18%200%200%200%200%200.12%200%200%200%200%200.05%200%200%200%200.9%200'/%3E%3CfeComponentTransfer%3E%3CfeFuncA%20type='discrete'%20tableValues='0%200%200%200%200%200%200%200%200%200%200%200%200%200.55'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect%20width='220'%20height='220'%20filter='url(%23s)'/%3E%3C/svg%3E");

  /* Light grain — warm-white newsprint noise for DARK surfaces (manifesto,
     footer) where the dark --tx-grain is invisible. Reads as cardboard fibre. */
  --tx-grain-light: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='110'%20height='110'%3E%3Cfilter%20id='nl'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='0.85'%20numOctaves='2'%20stitchTiles='stitch'/%3E%3CfeColorMatrix%20type='matrix'%20values='0%200%200%200%201%200%200%200%200%200.95%200%200%200%200%200.85%200%200%200%200.3%200'/%3E%3C/filter%3E%3Crect%20width='110'%20height='110'%20filter='url(%23nl)'/%3E%3C/svg%3E");

  /* Graph-paper grids — reserved for the Machine Hub blueprint sections,
     no longer stacked on the global page background. */
  /* Precision 'Graph Paper' texture — unmissable grid lines */
  --tx-grid: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='25'%20height='25'%3E%3Cpath%20d='M%2025%200%20L%200%200%200%2025'%20fill='none'%20stroke='rgba(122,82,40,0.08)'%20stroke-width='0.75'/%3E%3C/svg%3E");

  /* Primary Graph Grid — larger major divisions */
  --tx-grid-major: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='125'%20height='125'%3E%3Cpath%20d='M%20125%200%20L%200%200%200%20125'%20fill='none'%20stroke='rgba(122,82,40,0.12)'%20stroke-width='1.5'/%3E%3C/svg%3E");

  /* Cinematic 'Momentum' timing — fast start, long smooth settle (no overshoot) */
  --transition-momentum: cubic-bezier(0.22, 1, 0.36, 1);

  /* Torn paper edge tile (fill = page paper) */
  --tx-torn: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='120'%20height='22'%3E%3Cpath%20d='M0%2022%20L0%2012%20Q6%204%2014%2010%20Q20%2015%2028%209%20Q36%203%2044%2011%20Q52%2017%2060%2010%20Q66%205%2074%2012%20Q82%2018%2090%2011%20Q98%204%20108%2010%20Q114%2014%20120%209%20L120%2022%20Z'%20fill='%23f4ecdd'/%3E%3C/svg%3E");

  /* Hand-drawn squiggle underline (Hachi pink) */
  --tx-squiggle: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='88'%20height='9'%3E%3Cpath%20d='M2%206%20Q12%201%2022%206%20T42%206%20T62%206%20T82%206'%20stroke='%23c2417a'%20stroke-width='2.5'%20fill='none'%20stroke-linecap='round'/%3E%3C/svg%3E");
}
