/* Bell — design tokens. The one place a colour, size or face is decided.
   Everything else in app/assets/stylesheets uses these names; nothing else
   writes a hex. The same tokens are published as Bell's design system
   (docs/design/style-guide.md names the artifact), so a change here is a
   change there.

   The palette is Merit America's (meritamerica.org: navy #001846, mint
   #2dd7b9, sky #71c8ff, blue #3661e3) with darker variants where white
   text or a lone icon has to meet contrast. Colour has three voices:
     ink/muted/faint        what things say (navy)
     action (navy, blue)    something you can do: buttons, links, Save, Review
     go (mint)              a message leaves Bell for a person: Send, sent
     brand (sky)            Bell's own: the mark, the Sandbox, the row you were sent to
   plus warn (amber) for time pressure and danger for undoing and failure. Brand is never body text: use
   brand-ink for words. */

:root, [data-theme="light"] {
  --ground: #f3f5f9;
  --panel: #ffffff;
  --panel-2: #f0f3f8;
  --ink: #001846;
  --muted: #4a5a78;
  --faint: #5f6e8a;
  --line: #e5e8ed;
  --line-strong: #c7cfdb;
  --hover: rgba(0, 24, 70, 0.05);

  --brand: #1f95d6;
  --brand-ink: #0f6aa0;
  --brand-wash: #e9f5fd;

  --action: #001846;
  --action-ink: #2a52d9;
  --action-wash: #e8edfb;
  --on-action: #ffffff;

  --go: #0b826d;
  --go-ink: #0a6b5a;
  --go-wash: #e3f9f4;
  --on-go: #ffffff;

  --warn: #a35400;
  --warn-wash: #fdf0dc;

  --danger: #c0392b;
  --danger-wash: #fdeceb;
  --on-danger: #ffffff;

  --focus: #2a52d9;
  --shadow-lift: 0 1px 2px rgba(0, 24, 70, 0.08), 0 4px 12px rgba(0, 24, 70, 0.06);

  /* The Activity rings: three series, validated together (every pair, for
     colour-blind readers too) on the panel. Chart colours, not meanings:
     never use them for state. */
  --ring-reached: #0a9468;
  --ring-replied: #257de0;
  --ring-answered: #e2601c;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #071331;
    --panel: #0f1f45;
    --panel-2: #142755;
    --ink: #e8edf5;
    --muted: #a9b6cc;
    --faint: #8a99b5;
    --line: #233663;
    --line-strong: #34497a;
    --hover: rgba(232, 237, 245, 0.06);

    --brand: #71c8ff;
    --brand-ink: #9ad8ff;
    --brand-wash: #11304f;

    --action: #7ea0ff;
    --action-ink: #9db7ff;
    --action-wash: #16306b;
    --on-action: #071331;

    --go: #2dd7b9;
    --go-ink: #5fe6cc;
    --go-wash: #0f3d35;
    --on-go: #071331;

    --warn: #f6b35c;
    --warn-wash: #3d2a0c;

    --danger: #ff8a80;
    --danger-wash: #4a1d1a;
    --on-danger: #071331;

    --focus: #7ea0ff;
    --shadow-lift: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);

    --ring-reached: #00a888;
    --ring-replied: #338ced;
    --ring-answered: #e76624;
  }
}

:root[data-theme="dark"] {
    --ground: #071331;
    --panel: #0f1f45;
    --panel-2: #142755;
    --ink: #e8edf5;
    --muted: #a9b6cc;
    --faint: #8a99b5;
    --line: #233663;
    --line-strong: #34497a;
    --hover: rgba(232, 237, 245, 0.06);

    --brand: #71c8ff;
    --brand-ink: #9ad8ff;
    --brand-wash: #11304f;

    --action: #7ea0ff;
    --action-ink: #9db7ff;
    --action-wash: #16306b;
    --on-action: #071331;

    --go: #2dd7b9;
    --go-ink: #5fe6cc;
    --go-wash: #0f3d35;
    --on-go: #071331;

    --warn: #f6b35c;
    --warn-wash: #3d2a0c;

    --danger: #ff8a80;
    --danger-wash: #4a1d1a;
    --on-danger: #071331;

    --focus: #7ea0ff;
    --shadow-lift: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);

    --ring-reached: #00a888;
    --ring-replied: #338ced;
    --ring-answered: #e76624;
}

:root {
  /* Type: one family, Public Sans (SIL OFL, self-hosted), at a dense UI
     scale. Numbers that line up (phones, times, counts) ask for tabular
     figures by class, not by face. */
  --font-sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --text-display: 700 28px/34px var(--font-sans);
  --text-title: 600 22px/28px var(--font-sans);
  --text-heading: 600 17px/24px var(--font-sans);
  --text-reading: 400 15px/23px var(--font-sans);
  --text-body: 400 14px/20px var(--font-sans);
  --text-small: 400 13px/18px var(--font-sans);
  --text-label: 500 12px/16px var(--font-sans);

  /* Space: a 4px rhythm. Rows breathe at 2 and 3, panels at 4, pages at 6. */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  /* Radius: controls and chips are tight, buttons a step softer, panels soft. */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;

  /* Layout */
  --rail-width: 236px;
  --rail-closed-width: 56px;
  --inbox-list-width: 420px;
  --page-wide: 1240px;
  --page-narrow: 760px;

  /* Touch: on a phone (a coarse pointer) every control is at least a
     fingertip square, and a field's text is never under 16px, below which
     iOS Safari zooms the page when the field takes focus. */
  --tap: 44px;
  --text-input-touch: 16px;
}

/* The Conversations page wears Material, Gmail's own design language, as
   Swatch redesigned it (bell#192): Google's blue, Roboto, round cards and
   pill controls. The same names, so conversations.css stays tokens only;
   the rest of Bell is unchanged. */
.inbox-page {
  --ground: #f6f8fc;
  --panel: #ffffff;
  --panel-2: #eaf1fb;
  --ink: #1f1f1f;
  --muted: #5f6368;
  --faint: #80868b;
  --line: #edf0f2;
  --line-strong: #dadce0;
  --hover: rgba(32, 33, 36, 0.05);
  --brand: #1a73e8;
  --brand-ink: #0b57d0;
  --brand-wash: #d3e3fd;
  --action: #0b57d0;
  --action-ink: #0b57d0;
  --action-wash: #e8f0fe;
  --on-action: #ffffff;
  --go: #188038;
  --go-ink: #146c2e;
  --go-wash: #e1f1e5;
  --on-go: #ffffff;
  --warn: #b06000;
  --warn-wash: #feefc3;
  --danger: #d93025;
  --danger-wash: #fce8e6;
  --on-danger: #ffffff;
  --focus: #1a73e8;
  --shadow-lift: 0 3px 8px rgba(60, 64, 67, 0.18);
  --shadow-card: 0 1px 2px rgba(60, 64, 67, 0.15);
  --font-sans: Roboto, "Public Sans", system-ui, sans-serif;
  --text-title: 400 22px/28px var(--font-sans);
  --text-heading: 500 18px/24px var(--font-sans);
  --text-display: 400 28px/36px var(--font-sans);
  --text-reading: 400 15px/22px var(--font-sans);
  --text-body: 400 14px/20px var(--font-sans);
  --text-small: 400 13px/18px var(--font-sans);
  --text-label: 500 12px/16px var(--font-sans);
  --radius-sm: 4px;
  --radius-md: 12px;
  --radius-lg: 24px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .inbox-page {
    --ground: #131314; --panel: #1e1f20; --panel-2: #282a2c; --ink: #e3e3e3; --muted: #c4c7c5; --faint: #8e918f;
    --line: #2d2f31; --line-strong: #444746; --hover: rgba(227, 227, 227, 0.08);
    --brand: #a8c7fa; --brand-ink: #a8c7fa; --brand-wash: #004a77;
    --action: #a8c7fa; --action-ink: #a8c7fa; --action-wash: #0f2c4f; --on-action: #062e6f;
    --go: #6dd58c; --go-ink: #6dd58c; --go-wash: #0f3a1e; --on-go: #0a3818;
    --warn: #fdc969; --warn-wash: #3f2e00; --danger: #f2b8b5; --danger-wash: #4c1d1b; --on-danger: #601410;
    --focus: #a8c7fa; --shadow-lift: 0 3px 8px rgba(0, 0, 0, 0.5); --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4);
  }
}
:root[data-theme="dark"] .inbox-page {
  --ground: #131314; --panel: #1e1f20; --panel-2: #282a2c; --ink: #e3e3e3; --muted: #c4c7c5; --faint: #8e918f;
  --line: #2d2f31; --line-strong: #444746; --hover: rgba(227, 227, 227, 0.08);
  --brand: #a8c7fa; --brand-ink: #a8c7fa; --brand-wash: #004a77;
  --action: #a8c7fa; --action-ink: #a8c7fa; --action-wash: #0f2c4f; --on-action: #062e6f;
  --go: #6dd58c; --go-ink: #6dd58c; --go-wash: #0f3a1e; --on-go: #0a3818;
  --warn: #fdc969; --warn-wash: #3f2e00; --danger: #f2b8b5; --danger-wash: #4c1d1b; --on-danger: #601410;
  --focus: #a8c7fa; --shadow-lift: 0 3px 8px rgba(0, 0, 0, 0.5); --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* Roboto (SIL OFL 1.1, self-hosted, Latin, variable weight), for the
   Conversations page's Material theme only. */
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/Roboto-754c1b6a.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/PublicSans-dca702d4.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/PublicSans-Italic-8f970dc3.woff2") format("woff2");
}
