/*
  Grain Rail: design tokens
  A late-night community look. Pages are a warm near-black covered in a fine film
  grain. The header is two rows of thin paper-colored boxes, like a ruled log sheet:
  a wordmark cell, the nav, a live clock, and a "now" rail with a play triangle.
  Headlines are a round geometric sans set in lowercase. Tiny credits and dates are
  mono. Archive tiles are soft rounded squares with mono credits above a medium
  title. Buttons are pills: one periwinkle, one bevelled grey pill with red text
  for anything live. Dashed rounded boxes hold asks. The footer ends on a huge
  lowercase wordmark.

  Fonts (free on Google Fonts):
  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  <link href="https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=DM+Mono:wght@400;500&display=swap" rel="stylesheet">
*/

:root {
  /* Surfaces */
  --gr-black: #0B0B0A;      /* the page */
  --gr-soot: #161614;       /* tiles, inputs, raised rows */
  --gr-ash: #24231F;        /* hover on soot, table stripes */
  --gr-paper: #EEEDE6;      /* text, hairlines, inverted cells */
  --gr-white: #FFFFFF;

  /* Text */
  --gr-text: #EEEDE6;
  --gr-mute: #8E8C84;       /* secondary text on black */
  --gr-dim: #5E5C55;        /* tertiary, placeholders */
  --gr-ink: #0B0B0A;        /* text on paper */

  /* Accents */
  --gr-peri: #8AA2FF;       /* the one action color: join, subscribe, links */
  --gr-peri-hover: #A3B6FF;
  --gr-flare: #FF4A3D;      /* live, now firing, errors */
  --gr-bevel-top: #D9D8D2;  /* bevelled live pill */
  --gr-bevel-low: #9F9E98;

  /* Glaze tints: only as backdrops for drawn tiles */
  --gr-glaze-celadon: #3F5B55;
  --gr-glaze-tenmoku: #6B3B2E;
  --gr-glaze-cobalt: #2F3A5E;
  --gr-glaze-ash: #7A7466;
  --gr-glaze-shino: #C98A5A;

  /* Lines */
  --gr-line: rgba(238, 237, 230, 0.9);      /* header boxes, the ruled log */
  --gr-line-soft: rgba(238, 237, 230, 0.18);/* dividers inside content */
  --gr-dash: rgba(238, 237, 230, 0.55);     /* dashed ask boxes */

  /* Grain: a tiny SVG noise laid over every surface */
  --gr-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  /* Fonts */
  --gr-font: "Outfit", "Helvetica Neue", Arial, sans-serif;
  --gr-mono: "DM Mono", ui-monospace, Menlo, monospace;

  /* Type scale (lowercase display, light to medium weights) */
  --gr-size-mark: clamp(72px, 17vw, 300px);  /* footer wordmark */
  --gr-size-hero: clamp(44px, 7.4vw, 104px);
  --gr-size-h1: clamp(36px, 5vw, 64px);
  --gr-size-h2: clamp(28px, 3.4vw, 42px);
  --gr-size-h3: 22px;
  --gr-size-lead: 20px;
  --gr-size-body: 17px;
  --gr-size-nav: 18px;
  --gr-size-small: 14px;
  --gr-size-meta: 11.5px;   /* mono credits and dates */

  --gr-weight-display: 500;
  --gr-weight-body: 400;
  --gr-leading-tight: 1.02;
  --gr-leading-body: 1.55;
  --gr-tracking-display: -0.03em;

  /* Shape */
  --gr-radius-tile: 16px;
  --gr-radius-card: 22px;
  --gr-radius-pill: 999px;
  --gr-border: 1px solid var(--gr-line);
  --gr-border-soft: 1px solid var(--gr-line-soft);
  --gr-border-dash: 1.5px dashed var(--gr-dash);
  --gr-shadow-bevel: inset 0 2px 0 rgba(255, 255, 255, 0.7), inset 0 -3px 0 rgba(0, 0, 0, 0.28), 0 1px 0 rgba(0, 0, 0, 0.6);
  --gr-shadow-tile: 0 0 0 1px rgba(238, 237, 230, 0.08);

  /* Space */
  --gr-space-1: 4px;
  --gr-space-2: 8px;
  --gr-space-3: 12px;
  --gr-space-4: 16px;
  --gr-space-5: 24px;
  --gr-space-6: 32px;
  --gr-space-7: 48px;
  --gr-space-8: 72px;
  --gr-space-9: 112px;
  --gr-gutter: clamp(16px, 3vw, 28px);
  --gr-max: 1320px;
  --gr-max-text: 680px;
}
