/* Read Later: the shared look, as CSS variables (docs/design/LOOK.md, revision 3).
   Names are kept from Descant's "Typewell" theme (the owner's own code, Apache-2.0) so both apps can share this file.
   Values since LOOK revision 3 come from Castor's live site (castor-site src/styles/tokens.css): its warm paper and
   ink, its terracotta (--human) deepened one step to carry white words as the one accent, and its teal kept for the
   assistant (--machine). Nothing here selects an element other than the root. The five hl colours are the default
   highlight palette (Keep, Idea to use, Example, Disagree, Look up), each with a strong hue for dots and edge rules;
   they stay away from terracotta and teal, which mean a person and the agent. Springs are damped springs sampled
   into linear() easings. */

@font-face {
  font-family: 'Source Serif 4';
  src: url('./fonts/sourceserif4.woff2') format('woff2');
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('./fonts/sourceserif4-italic.woff2') format('woff2');
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Newsreader';
  src: url('./fonts/newsreader.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Martian Mono';
  src: url('./fonts/martianmono.woff2') format('woff2');
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ground: #f3f1ea;
  --paper: #faf9f4;
  --eink-paper: #ffffff;
  --eink-ink: #000000;
  --chrome: rgb(250 249 244 / 0.8);
  --field: #edece6;
  --ink: #14130f;
  --ink-2: #54534e;
  --ink-3: #666460;
  --ink-dim: #a8a7a2;
  --accent: #b84d24;
  --accent-ink: #ffffff;
  --accent-text: #ae4920;
  --rule: #e6e4dd;
  --edge: #cfcdc6;
  --pane: #efeee8;
  --pane-solid: #f3f1ea;
  --pane-hot: #e6e4dd;
  --surface-raised: #ffffff;
  --wash: #eae9e3;
  --sel: #dddbd2;
  --highlight: #f9dc82;
  --scrim: rgb(20 19 15 / 0.18);
  --shadow: 0 1px 3px rgb(20 19 15 / 0.07), 0 10px 28px rgb(20 19 15 / 0.1);
  --shadow-1: 0 1px 2px rgb(20 19 15 / 0.06), 0 2px 8px rgb(20 19 15 / 0.05);
  --shadow-2: 0 1px 3px rgb(20 19 15 / 0.07), 0 10px 28px rgb(20 19 15 / 0.1);
  --shadow-3: 0 4px 12px rgb(20 19 15 / 0.08), 0 24px 64px rgb(20 19 15 / 0.16);
  --ring: 0 0 0 0.5px rgb(20 19 15 / 0.12);
  --machine: #006770;
  --machine-text: #00727c;
  --font-reading: 'Source Serif 4', ui-serif, Georgia, 'Times New Roman', serif;
  --font-ui: system-ui, -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
  --font-ui-heading: 'Newsreader', ui-serif, Georgia, serif;
  --font-heading: 'Source Serif 4', ui-serif, Georgia, serif;
  --font-mono: 'Martian Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --reading-size: 20px;
  --reading-size-narrow: 18px;
  --reading-line: 1.62;
  --ui-caption: 11px;
  --ui-size-sm: 13px;
  --ui-size: 15px;
  --ui-title: 16px;
  --ui-heading: 22px;
  --ui-large: 30px;
  --ui-line: 1.34;
  --ui-track: 0;
  --note-size: 14px;
  --size-mono-key: 10.5px;
  --heading-weight: 600;
  --heading-track: -0.018em;
  --radius-sm: 6px;
  --radius-mark: 3px;
  --radius-check: 5px;
  --radius-field: 8px;
  --radius-button: 8px;
  --radius-row: 8px;
  --radius-card: 12px;
  --radius-pane: 12px;
  --radius-sheet: 20px;
  --radius-toast: 20px;
  --radius-chip: 999px;
  --measure: 60ch;
  --measure-narrow: 52ch;
  --measure-wide: 68ch;
  --bar-h: 44px;
  --notice-h: 44px;
  --toast-line: 18px;
  --rail-l: 15rem;
  --rail-r: 25rem;
  --rail-drawer-max: 346px;
  --notebook-drawer-max: 416px;
  --rail-tool-size: 14px;
  --rail-count-size: 12px;
  --lead: 40px;
  --glyph: 20px;
  --row-h: 84px;
  --row-h-compact: 64px;
  --outline-row: 34px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --spring-snap: linear(
    0,
    0.057,
    0.173,
    0.306,
    0.434,
    0.548,
    0.644,
    0.716,
    0.781,
    0.832,
    0.872,
    0.903,
    0.927,
    0.945,
    0.959,
    0.969,
    0.977,
    0.983,
    0.987,
    0.991,
    0.993,
    0.995,
    0.996,
    0.997,
    0.998,
    0.998,
    0.999,
    0.999,
    1
  );
  --spring-glide: linear(
    0,
    0.046,
    0.146,
    0.272,
    0.391,
    0.5,
    0.595,
    0.676,
    0.743,
    0.801,
    0.844,
    0.879,
    0.906,
    0.928,
    0.944,
    0.958,
    0.968,
    0.975,
    0.981,
    0.986,
    0.989,
    0.992,
    0.994,
    0.995,
    0.996,
    0.997,
    0.998,
    0.999,
    1
  );
  --spring-settle: linear(
    0,
    0.061,
    0.198,
    0.375,
    0.543,
    0.692,
    0.815,
    0.908,
    0.977,
    1.018,
    1.041,
    1.05,
    1.05,
    1.045,
    1.037,
    1.028,
    1.02,
    1.012,
    1.007,
    1.003,
    1,
    0.998,
    0.998,
    0.997,
    0.998,
    0.998,
    0.998,
    0.999,
    1
  );
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-exit: cubic-bezier(0.4, 0, 1, 1);
  --ease-paint: cubic-bezier(0.33, 0, 0.15, 1);
  --t-none: 0ms;
  --t-press: 80ms;
  --t-exit: 120ms;
  --t-fade: 150ms;
  --t-paint: 260ms;
  --t-snap: 280ms;
  --t-glide: 450ms;
  --t-settle: 510ms;
  --t-drag-settle: 200ms;
  --t-flash: 900ms;
  --page-sepia: #f6efdf;
  --page-sepia-ink: #3a332a;
  --page-sepia-ink-2: #6b6152;
  --page-night: #0b0a08;
  --page-night-ink: #e2d8c4;
  --page-night-ink-2: #a99f8c;
  --meter-w: 56px;
  --radius-meter: 1.5px;
  --page-sepia-raised: #fcf8ee;
  --page-sepia-hot: #ece3cf;
  --page-sepia-rule: #e3d8c2;
  --page-sepia-ring: 0 0 0 0.5px rgb(58 51 42 / 0.16);
  --page-sepia-shadow: 0 1px 3px rgb(58 51 42 / 0.08), 0 10px 28px rgb(58 51 42 / 0.1);
  --page-sepia-tint: rgb(58 51 42 / 0.06);
  --page-sepia-danger: #a3283f;
  --page-night-raised: #1b1915;
  --page-night-hot: #2c2924;
  --page-night-rule: #2c2924;
  --page-night-ring: 0 0 0 0.5px rgb(226 216 196 / 0.12);
  --page-night-shadow: 0 1px 3px rgb(0 0 0 / 0.5), 0 10px 28px rgb(0 0 0 / 0.5);
  --page-night-tint: rgb(226 216 196 / 0.07);
  --page-night-danger: #f08a9a;
  --hl-yellow-strong-sepia: #a37800;
  --hl-blue-strong-sepia: #3c7aab;
  --hl-green-strong-sepia: #4f8444;
  --hl-pink-strong-sepia: #ad536b;
  --hl-purple-strong-sepia: #7761b0;
  --hl-yellow-strong-night: #deba50;
  --hl-blue-strong-night: #7db4e4;
  --hl-green-strong-night: #8fc184;
  --hl-pink-strong-night: #e493a5;
  --hl-purple-strong-night: #af9ee4;
  --hl-yellow-sepia: #edcf6f;
  --hl-blue-sepia: #b4d6f3;
  --hl-green-sepia: #bedcae;
  --hl-pink-sepia: #f5c1cc;
  --hl-purple-sepia: #d3c9f8;
  --hl-yellow-night: #4e3d10;
  --hl-blue-night: #273e52;
  --hl-green-night: #2f442a;
  --hl-pink-night: #523038;
  --hl-purple-night: #3e3656;
  --spring-bar: linear(0, 0.047, 0.156, 0.292, 0.432, 0.561, 0.674, 0.767, 0.841, 0.897, 0.939, 0.968, 0.987, 1);
  --spring-sheet: linear(
    0,
    0.029,
    0.098,
    0.189,
    0.288,
    0.388,
    0.483,
    0.569,
    0.645,
    0.712,
    0.768,
    0.816,
    0.855,
    0.887,
    0.913,
    0.934,
    0.95,
    0.963,
    0.973,
    0.981,
    0.987,
    0.991,
    0.994,
    0.996,
    1
  );
  --spring-rail: linear(
    0,
    0.049,
    0.157,
    0.285,
    0.411,
    0.525,
    0.624,
    0.705,
    0.772,
    0.825,
    0.866,
    0.899,
    0.924,
    0.943,
    0.957,
    0.968,
    0.976,
    0.982,
    0.987,
    0.99,
    0.993,
    0.995,
    0.996,
    0.997,
    1
  );
  --ease-swipe-reset: cubic-bezier(0.11, 0, 0.5, 0);
  --ease-highlight: ease-in-out;
  --t-swipe-reset: 100ms;
  --t-highlight: 200ms;
  --t-bar: 290ms;
  --t-toast: 300ms;
  --t-sheet: 410ms;
  --t-toast-replace: 450ms;
  --t-rail: 500ms;
  --t-toast-dwell: 5000ms;
  --level-1: #3b3a36;
  --level-2: #46453f;
  --level-3: #4f4e49;
  --level-4: #54534e;
  --level-5: #54534e;
  --level-6: #54534e;
  --hl-yellow: #f9dc82;
  --hl-blue: #c2e1fc;
  --hl-green: #cce8bd;
  --hl-pink: #feced7;
  --hl-purple: #ddd4ff;

  --accent-hover: #b04a22;
  --accent-press: #a8441e;
  --accent-wash: #f5e6dd;
  --danger: #a3283f;
  --human: #c4552a;
  --sel-provisional: #f9e4a1;
  --segment-thumb: #ffffff;
  --knob: #ffffff;
  --tint: rgb(20 19 15 / 0.06);
  --hl-yellow-strong: #a37800;
  --hl-blue-strong: #3c7aab;
  --hl-green-strong: #4f8444;
  --hl-pink-strong: #ad536b;
  --hl-purple-strong: #7761b0;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --ground: #1c1b18;
    --paper: #141311;
    --chrome: rgb(20 19 17 / 0.8);
    --field: #24231f;
    --ink: #e9e6df;
    --ink-2: #a29f9a;
    --ink-3: #93918b;
    --ink-dim: #585652;
    --accent: #d9683b;
    --accent-ink: #14130f;
    --accent-text: #e58357;
    --rule: #24231f;
    --edge: #3a3834;
    --pane: #1e1d1b;
    --pane-solid: #1c1b18;
    --pane-hot: #292825;
    --surface-raised: #282622;
    --wash: #22211e;
    --sel: #3b3934;
    --highlight: #4e3d10;
    --scrim: rgb(0 0 0 / 0.55);
    --shadow: 0 1px 3px rgb(0 0 0 / 0.45), 0 10px 28px rgb(0 0 0 / 0.45);
    --shadow-1: 0 1px 2px rgb(0 0 0 / 0.5), 0 2px 8px rgb(0 0 0 / 0.3);
    --shadow-2: 0 1px 3px rgb(0 0 0 / 0.45), 0 10px 28px rgb(0 0 0 / 0.45);
    --shadow-3: 0 4px 12px rgb(0 0 0 / 0.5), 0 24px 64px rgb(0 0 0 / 0.6);
    --ring: 0 0 0 0.5px rgb(233 230 223 / 0.1);
    --machine: #00858f;
    --machine-text: #0097a2;
    --level-1: #c4c1bb;
    --level-2: #b7b4ae;
    --level-3: #aba8a2;
    --level-4: #a29f9a;
    --level-5: #a29f9a;
    --level-6: #a29f9a;
    --hl-yellow: #4e3d10;
    --hl-blue: #273e52;
    --hl-green: #2f442a;
    --hl-pink: #523038;
    --hl-purple: #3e3656;

    --accent-hover: #e07a4e;
    --accent-press: #d06034;
    --accent-wash: #2e1f18;
    --danger: #f08a9a;
    --human: #c4552a;
    --sel-provisional: #362c14;
    --segment-thumb: #2e2c29;
    --knob: #e9e6df;
    --tint: rgb(233 230 223 / 0.07);
    --hl-yellow-strong: #deba50;
    --hl-blue-strong: #7db4e4;
    --hl-green-strong: #8fc184;
    --hl-pink-strong: #e493a5;
    --hl-purple-strong: #af9ee4;
  }
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --ground: #1c1b18;
  --paper: #141311;
  --chrome: rgb(20 19 17 / 0.8);
  --field: #24231f;
  --ink: #e9e6df;
  --ink-2: #a29f9a;
  --ink-3: #93918b;
  --ink-dim: #585652;
  --accent: #d9683b;
  --accent-ink: #14130f;
  --accent-text: #e58357;
  --rule: #24231f;
  --edge: #3a3834;
  --pane: #1e1d1b;
  --pane-solid: #1c1b18;
  --pane-hot: #292825;
  --surface-raised: #282622;
  --wash: #22211e;
  --sel: #3b3934;
  --highlight: #4e3d10;
  --scrim: rgb(0 0 0 / 0.55);
  --shadow: 0 1px 3px rgb(0 0 0 / 0.45), 0 10px 28px rgb(0 0 0 / 0.45);
  --shadow-1: 0 1px 2px rgb(0 0 0 / 0.5), 0 2px 8px rgb(0 0 0 / 0.3);
  --shadow-2: 0 1px 3px rgb(0 0 0 / 0.45), 0 10px 28px rgb(0 0 0 / 0.45);
  --shadow-3: 0 4px 12px rgb(0 0 0 / 0.5), 0 24px 64px rgb(0 0 0 / 0.6);
  --ring: 0 0 0 0.5px rgb(233 230 223 / 0.1);
  --machine: #00858f;
  --machine-text: #0097a2;
  --level-1: #c4c1bb;
  --level-2: #b7b4ae;
  --level-3: #aba8a2;
  --level-4: #a29f9a;
  --level-5: #a29f9a;
  --level-6: #a29f9a;
  --hl-yellow: #4e3d10;
  --hl-blue: #273e52;
  --hl-green: #2f442a;
  --hl-pink: #523038;
  --hl-purple: #3e3656;

  --accent-hover: #e07a4e;
  --accent-press: #d06034;
  --accent-wash: #2e1f18;
  --danger: #f08a9a;
  --human: #c4552a;
  --sel-provisional: #362c14;
  --segment-thumb: #2e2c29;
  --knob: #e9e6df;
  --tint: rgb(233 230 223 / 0.07);
  --hl-yellow-strong: #deba50;
  --hl-blue-strong: #7db4e4;
  --hl-green-strong: #8fc184;
  --hl-pink-strong: #e493a5;
  --hl-purple-strong: #af9ee4;
}
