/* The site's colours, type, spacing and control sizes (docs/interface-design.md), in a light
   and a dark theme. light-dark() takes the theme from color-scheme, which the root sets from
   the person's choice (shell.py), or from the system. */
@property --scale {
  syntax: "<number>";
  inherits: true;
  initial-value: 1;
}
:root {
  color-scheme: light dark;
  --font-ui:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  /* 1 at 1920 px, rising by 0.3 over the next 1920 px to 1.3 at 3840 px and staying there;
     tan(atan2()) is how CSS divides one length by another. */
  --scale: clamp(1, 1 + tan(atan2(100vw - 1920px, 6400px)), 1.3);
  --fs-1: calc(12px * var(--scale));
  --lh-1: calc(18px * var(--scale));
  --fs-2: calc(14px * var(--scale));
  --lh-2: calc(20px * var(--scale));
  --fs-3: calc(15px * var(--scale));
  --lh-3: calc(24px * var(--scale));
  --fs-4: calc(17px * var(--scale));
  --fs-5: calc(20px * var(--scale));
  --lh-5: calc(28px * var(--scale));
  --fs-title: calc(28px * var(--scale));
  --lh-title: calc(36px * var(--scale));
  --weight-text: 400;
  --weight-medium: 500;
  --weight-strong: 600;
  --weight-heading: 650;
  --tracking-heading: -0.02em;
  --tracking-label: 0.08em;
  /* Monospace, a little smaller than the text around it. */
  --fs-mono: 0.94em;

  /* The gap between a list's entries, a hairline at every scale. */
  --sp-0: 2px;
  --sp-1: calc(4px * var(--scale));
  --sp-2: calc(8px * var(--scale));
  --sp-3: calc(12px * var(--scale));
  --sp-4: calc(16px * var(--scale));
  --sp-6: calc(24px * var(--scale));
  --row: calc(40px * var(--scale));
  --ctl: calc(40px * var(--scale));
  --ctl-md: calc(44px * var(--scale));
  --icon: calc(18px * var(--scale));
  --avatar: calc(28px * var(--scale));
  --topbar: calc(56px * var(--scale));
  --rail: calc(260px * var(--scale));
  --page: calc(880px * var(--scale));
  --panel: calc(400px * var(--scale));
  --radius: 6px;
  --radius-lg: 10px;
  --rule: 1px;
  --mark: 3px;
  --ring: 2px;

  /* Cool paper, navy text, an indigo accent: Immora's own, not the staff site's green. */
  --bg-app: light-dark(#f4f5f9, #171a22);
  --bg-panel: light-dark(#ffffff, #20242e);
  --bg-inset: light-dark(#eceef4, #2a2f3b);
  --bg-hover: light-dark(#e4e7f0, #313745);
  --bg-selected: light-dark(#e0e4f5, #2d3450);
  --text-1: light-dark(#1e2334, #eef0f6);
  --text-2: light-dark(#4f566b, #c3c8d6);
  --text-3: light-dark(#5f6679, #a2a9bb);
  --border-1: light-dark(#c9cdda, #525a6c);
  --border-2: light-dark(#e1e4ec, #363c4a);
  --border-control: light-dark(#7e8599, #7a8296);
  --accent: light-dark(#3a4db0, #aab6ff);
  --accent-text-on: light-dark(#ffffff, #121a4a);
  --danger-quiet: light-dark(#a0414f, #e09aa3);
  --focus: var(--accent);
  /* The page behind the open drawer. */
  --backdrop: light-dark(rgb(30 35 52 / 40%), rgb(0 0 0 / 55%));
}
:root[data-theme="light"] {
  color-scheme: light;
}
:root[data-theme="dark"] {
  color-scheme: dark;
}
