/*! Relay design system 1.0.0 (2026-11-07). Tokens: every value the components read.
   Light on :root. Dark follows the visitor's system preference unless the page sets
   data-theme="light" or data-theme="dark" on <html>. Accent presets: data-accent="ocean" or
   data-accent="clay" on <html>; they change the accent and button tokens only. */

:root {
  color-scheme: light;

  /* Surfaces: warm white canvas, white cards, a warm sunk tone for user turns and wells */
  --ry-canvas: #faf9f6;
  --ry-surface: #ffffff;
  --ry-sunk: #f2f0eb;
  --ry-raised: #ffffff;
  --ry-scrim: rgba(26, 25, 21, 0.42);

  /* Text */
  --ry-ink: #1a1915;
  --ry-body: #36332d;
  --ry-muted: #4f4b43;

  /* Lines */
  --ry-hair: #e7e3db;
  --ry-hair-strong: #d4cfc4;
  --ry-line-control: #8b8577;

  /* The gutter mark (wick) beside assistant turns and answer sections */
  --ry-wick: #d4cfc4;
  --ry-wick-head: #1a1915;

  /* Accent: ink teal, for links, focus and selection */
  --ry-accent: #0d5c53;
  --ry-accent-strong: #0a4c45;
  --ry-accent-soft: #e2efeb;
  --ry-accent-ink: #ffffff;

  /* Primary button */
  --ry-btn: #0d5c53;
  --ry-btn-hover: #0a4a43;
  --ry-btn-ink: #ffffff;

  /* Working mark: chartreuse, only for "the model is working" and new content. Always a fill
     behind --ry-lime-ink, never a text color. */
  --ry-lime: #d4ef4f;
  --ry-lime-soft: #eef8c4;
  --ry-lime-ink: #1a1915;
  --ry-lime-glow: 0 0 0 3px rgba(212, 239, 79, 0.45);

  /* Status */
  --ry-ok: #1b6b34;
  --ry-ok-soft: #e3f1e6;
  --ry-warn: #8a5200;
  --ry-warn-soft: #fbefd8;
  --ry-danger: #b3261e;
  --ry-danger-soft: #fcebe9;

  /* Code, tool input and output */
  --ry-code-bg: #f5f3ee;
  --ry-code-ink: #2a2823;
  --ry-code-comment: #4f4b43;
  --ry-code-string: #17552d;
  --ry-code-keyword: #0a4c45;
  --ry-code-number: #774300;

  /* Focus */
  --ry-focus: #0d5c53;

  /* Data viz: categorical (6), sequential (5), diverging (5). Labels always ride along. */
  --ry-viz-1: #0d6b60;
  --ry-viz-2: #c76a12;
  --ry-viz-3: #2b62a0;
  --ry-viz-4: #74850f;
  --ry-viz-5: #b0384a;
  --ry-viz-6: #48433a;
  --ry-seq-1: #e2efeb;
  --ry-seq-2: #a9d3c9;
  --ry-seq-3: #5fa99b;
  --ry-seq-4: #1f7a6c;
  --ry-seq-5: #0b4a42;
  --ry-div-1: #b35a0e;
  --ry-div-2: #e8b07a;
  --ry-div-3: #ece8df;
  --ry-div-4: #6fb3a6;
  --ry-div-5: #0d5c53;

  /* Elevation: floating things only (composer, menus, panels, dialogs). Cards stay flat. */
  --ry-shadow-float: 0 1px 2px rgba(26, 25, 21, 0.05), 0 18px 40px -26px rgba(26, 25, 21, 0.34);
  --ry-shadow-pop: 0 2px 4px rgba(26, 25, 21, 0.04), 0 16px 36px -14px rgba(26, 25, 21, 0.28);
  --ry-shadow-panel: 0 24px 64px -28px rgba(26, 25, 21, 0.42);

  /* Type */
  --ry-font-sans: "Onest", ui-sans-serif, system-ui, sans-serif;
  --ry-font-mono: "Spline Sans Mono", ui-monospace, Consolas, "Liberation Mono", monospace;
  --ry-fs-display: clamp(2.5rem, 1.75rem + 3vw, 4rem);         /* 40 to 64: page title */
  --ry-fs-title: clamp(1.875rem, 1.45rem + 1.7vw, 2.625rem);   /* 30 to 42: section title */
  --ry-fs-headline: clamp(1.375rem, 1.25rem + 0.5vw, 1.625rem); /* 22 to 26: panel title, price */
  --ry-fs-card: 1.1875rem;                                     /* 19: card and feature title */
  --ry-fs-lede: 1.1875rem;                                     /* 19: lede, section intro */
  --ry-fs-reading: 1.0625rem;                                  /* 17: assistant turns, article prose */
  --ry-fs-body: 1rem;                                          /* 16: body, buttons, inputs */
  --ry-fs-meta: 0.875rem;                                      /* 14: meta, tables, chips (never on <p>) */
  --ry-fs-note: 0.875rem;                                      /* 14: supporting <p>; 16 on phones */
  --ry-fs-caption: 0.75rem;                                    /* 12: mono labels, counters */
  --ry-lh-display: 1.04;
  --ry-lh-title: 1.1;
  --ry-lh-snug: 1.3;
  --ry-lh-body: 1.6;
  --ry-lh-reading: 1.7;
  --ry-track-display: -0.034em;
  --ry-track-title: -0.024em;
  --ry-track-headline: -0.012em;
  --ry-weight-regular: 400;
  --ry-weight-medium: 500;
  --ry-weight-semibold: 600;
  --ry-weight-bold: 700;

  /* Space: 4px base */
  --ry-space-1: 4px;
  --ry-space-2: 8px;
  --ry-space-3: 12px;
  --ry-space-4: 16px;
  --ry-space-5: 20px;
  --ry-space-6: 24px;
  --ry-space-7: 32px;
  --ry-space-8: 40px;
  --ry-space-9: 48px;
  --ry-space-10: 64px;
  --ry-space-11: 80px;
  --ry-space-12: 96px;
  --ry-space-13: 128px;
  --ry-section-pad: clamp(4rem, 2.9rem + 4.4vw, 7rem);        /* 64 to 112 */

  /* Shape */
  --ry-radius-xs: 4px;
  --ry-radius-tag: 6px;
  --ry-radius-mark: 7px;
  --ry-radius-btn: 10px;
  --ry-radius-input: 10px;
  --ry-radius-card: 14px;
  --ry-radius-composer: 14px;
  --ry-radius-pill: 999px;

  /* Layout */
  --ry-content: 1180px;
  --ry-reading: 44rem;
  --ry-narrow: 36rem;
  --ry-gutter: clamp(1.25rem, 0.6rem + 2.6vw, 2.5rem);         /* 20 to 40 page side padding */
  --ry-wick-gap: 2.5rem;                                       /* 40: room for the gutter mark */
  --ry-nav-h: 64px;
  --ry-side-w: 280px;
  --ry-panel-w: 460px;

  /* Motion */
  --ry-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ry-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ry-dur-fast: 140ms;
  --ry-dur: 220ms;
  --ry-dur-slow: 380ms;
  --ry-dur-sweep: 1800ms;
}

@media (max-width: 640px) {
  :root {
    --ry-fs-note: 1rem;
    --ry-wick-gap: 1.625rem;
  }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ry-canvas: #141311;
    --ry-surface: #1b1a17;
    --ry-sunk: #24221e;
    --ry-raised: #22201c;
    --ry-scrim: rgba(0, 0, 0, 0.6);
    --ry-ink: #f3f0e9;
    --ry-body: #d8d3c8;
    --ry-muted: #b8b2a5;
    --ry-hair: #2d2b27;
    --ry-hair-strong: #3e3b35;
    --ry-line-control: #7d776b;
    --ry-wick: #3e3b35;
    --ry-wick-head: #f3f0e9;
    --ry-accent: #6fcab8;
    --ry-accent-strong: #8fd8c9;
    --ry-accent-soft: #1a2d29;
    --ry-accent-ink: #0f1a17;
    --ry-btn: #6fcab8;
    --ry-btn-hover: #8fd8c9;
    --ry-btn-ink: #0f1a17;
    --ry-lime: #c6e352;
    --ry-lime-soft: #2a3115;
    --ry-lime-ink: #151410;
    --ry-lime-glow: 0 0 14px rgba(198, 227, 82, 0.38);
    --ry-ok: #6ccf8a;
    --ry-ok-soft: #14261a;
    --ry-warn: #f0b45a;
    --ry-warn-soft: #2b210f;
    --ry-danger: #ff8a7e;
    --ry-danger-soft: #311715;
    --ry-code-bg: #1f1d1a;
    --ry-code-ink: #e6e1d6;
    --ry-code-comment: #b8b2a5;
    --ry-code-string: #9bd88a;
    --ry-code-keyword: #8fd8c9;
    --ry-code-number: #f0b45a;
    --ry-focus: #8fd8c9;
    --ry-viz-1: #4fb3a3;
    --ry-viz-2: #f2b25e;
    --ry-viz-3: #5f93d6;
    --ry-viz-4: #cfe868;
    --ry-viz-5: #e8737f;
    --ry-viz-6: #e3dccd;
    --ry-seq-1: #1a2d29;
    --ry-seq-2: #23574e;
    --ry-seq-3: #2f8576;
    --ry-seq-4: #5cc2b2;
    --ry-seq-5: #a8e6da;
    --ry-div-1: #f0a24a;
    --ry-div-2: #8a5a2a;
    --ry-div-3: #3a3732;
    --ry-div-4: #2f8576;
    --ry-div-5: #8fd8c9;
    --ry-shadow-float: 0 1px 2px rgba(0, 0, 0, 0.4), 0 18px 40px -24px rgba(0, 0, 0, 0.8);
    --ry-shadow-pop: 0 2px 4px rgba(0, 0, 0, 0.3), 0 16px 36px -14px rgba(0, 0, 0, 0.75);
    --ry-shadow-panel: 0 24px 64px -28px rgba(0, 0, 0, 0.85);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ry-canvas: #141311;
  --ry-surface: #1b1a17;
  --ry-sunk: #24221e;
  --ry-raised: #22201c;
  --ry-scrim: rgba(0, 0, 0, 0.6);
  --ry-ink: #f3f0e9;
  --ry-body: #d8d3c8;
  --ry-muted: #b8b2a5;
  --ry-hair: #2d2b27;
  --ry-hair-strong: #3e3b35;
  --ry-line-control: #7d776b;
  --ry-wick: #3e3b35;
  --ry-wick-head: #f3f0e9;
  --ry-accent: #6fcab8;
  --ry-accent-strong: #8fd8c9;
  --ry-accent-soft: #1a2d29;
  --ry-accent-ink: #0f1a17;
  --ry-btn: #6fcab8;
  --ry-btn-hover: #8fd8c9;
  --ry-btn-ink: #0f1a17;
  --ry-lime: #c6e352;
  --ry-lime-soft: #2a3115;
  --ry-lime-ink: #151410;
  --ry-lime-glow: 0 0 14px rgba(198, 227, 82, 0.38);
  --ry-ok: #6ccf8a;
  --ry-ok-soft: #14261a;
  --ry-warn: #f0b45a;
  --ry-warn-soft: #2b210f;
  --ry-danger: #ff8a7e;
  --ry-danger-soft: #311715;
  --ry-code-bg: #1f1d1a;
  --ry-code-ink: #e6e1d6;
  --ry-code-comment: #b8b2a5;
  --ry-code-string: #9bd88a;
  --ry-code-keyword: #8fd8c9;
  --ry-code-number: #f0b45a;
  --ry-focus: #8fd8c9;
  --ry-viz-1: #4fb3a3;
  --ry-viz-2: #f2b25e;
  --ry-viz-3: #5f93d6;
  --ry-viz-4: #cfe868;
  --ry-viz-5: #e8737f;
  --ry-viz-6: #e3dccd;
  --ry-seq-1: #1a2d29;
  --ry-seq-2: #23574e;
  --ry-seq-3: #2f8576;
  --ry-seq-4: #5cc2b2;
  --ry-seq-5: #a8e6da;
  --ry-div-1: #f0a24a;
  --ry-div-2: #8a5a2a;
  --ry-div-3: #3a3732;
  --ry-div-4: #2f8576;
  --ry-div-5: #8fd8c9;
  --ry-shadow-float: 0 1px 2px rgba(0, 0, 0, 0.4), 0 18px 40px -24px rgba(0, 0, 0, 0.8);
  --ry-shadow-pop: 0 2px 4px rgba(0, 0, 0, 0.3), 0 16px 36px -14px rgba(0, 0, 0, 0.75);
  --ry-shadow-panel: 0 24px 64px -28px rgba(0, 0, 0, 0.85);
}

/* Accent preset: ocean (deep teal-blue). The lime working mark stays. */
:root[data-accent="ocean"] {
  --ry-accent: #0b4f6e;
  --ry-accent-strong: #0a4560;
  --ry-accent-soft: #e1eef4;
  --ry-accent-ink: #ffffff;
  --ry-btn: #0b4f6e;
  --ry-btn-hover: #083d56;
  --ry-btn-ink: #ffffff;
  --ry-focus: #0b4f6e;
}

@media (prefers-color-scheme: dark) {
  :root[data-accent="ocean"]:not([data-theme="light"]) {
    --ry-accent: #7cc3e0;
    --ry-accent-strong: #a3d6ea;
    --ry-accent-soft: #142a33;
    --ry-accent-ink: #0c171c;
    --ry-btn: #7cc3e0;
    --ry-btn-hover: #9fd4ea;
    --ry-btn-ink: #0c171c;
    --ry-focus: #a3d6ea;
  }
}

:root[data-accent="ocean"][data-theme="dark"] {
  --ry-accent: #7cc3e0;
  --ry-accent-strong: #a3d6ea;
  --ry-accent-soft: #142a33;
  --ry-accent-ink: #0c171c;
  --ry-btn: #7cc3e0;
  --ry-btn-hover: #9fd4ea;
  --ry-btn-ink: #0c171c;
  --ry-focus: #a3d6ea;
}

/* Accent preset: clay (warm terracotta). The lime working mark stays. */
:root[data-accent="clay"] {
  --ry-accent: #9c3f22;
  --ry-accent-strong: #7f321a;
  --ry-accent-soft: #f8e8e1;
  --ry-accent-ink: #ffffff;
  --ry-btn: #9c3f22;
  --ry-btn-hover: #7f321a;
  --ry-btn-ink: #ffffff;
  --ry-focus: #9c3f22;
}

@media (prefers-color-scheme: dark) {
  :root[data-accent="clay"]:not([data-theme="light"]) {
    --ry-accent: #ee9a78;
    --ry-accent-strong: #f4b399;
    --ry-accent-soft: #34201a;
    --ry-accent-ink: #1c120e;
    --ry-btn: #ee9a78;
    --ry-btn-hover: #f4b399;
    --ry-btn-ink: #1c120e;
    --ry-focus: #f4b399;
  }
}

:root[data-accent="clay"][data-theme="dark"] {
  --ry-accent: #ee9a78;
  --ry-accent-strong: #f4b399;
  --ry-accent-soft: #34201a;
  --ry-accent-ink: #1c120e;
  --ry-btn: #ee9a78;
  --ry-btn-hover: #f4b399;
  --ry-btn-ink: #1c120e;
  --ry-focus: #f4b399;
}
