/* The look: colours, type and sizes every other rule reads. Dark is the default; Light is the second set, chosen by the person or given by the browser. */

:root {
  color-scheme: dark light;
  --bg: #0f1115;
  --sb: #12141a;
  --pn: #16181d;
  --pn2: #1c1f26;
  --ln: #262a33;
  --ln2: #363c49;
  --ctl: #363c49;
  --tx: #e5e7eb;
  --dim: #9aa3b2;
  /* The accent as a fill under text (--acc), and as a ring, a line or a small mark (--accm): light needs the second darker to stay seen. */
  --acc: #f59e0b;
  --accm: #f59e0b;
  --acct: #fbbf24;
  --accbg: rgba(245, 158, 11, 0.13);
  --accln: rgba(245, 158, 11, 0.5);
  --ok: #4ade80;
  --wn: #fbbf24;
  --bd: #f87171;
  --no: #fb923c;
  --nobg: rgba(251, 146, 60, 0.12);
  --hov: #1b1e25;
  --inp: #12141a;
  --scrim: rgba(4, 5, 8, 0.66);
  --shd: 0 24px 60px rgba(0, 0, 0, 0.55);
  --site: #22d3ee;
  --int: #a99bff;
  --file: #f0e442;
  --filebg: rgba(240, 228, 66, 0.14);
  --on-acc: #1a1204;
  --web2: #f97316;
  --edge: #566072;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --side-width: 256px;
  --panel-width: 500px;
  /* The widest the docked panel may be: a list that has the panel open says what its columns need (ui/panel-room.js sets this), and without one the list keeps 420 px and the same 2 px
     of slack (SLACK_PX there), so that the panel's handle names the width the panel is drawn at. */
  --panel-fit: calc(100vw - var(--side-width) - 420px - 2px);
  /* The width the panel is drawn at: the one chosen, drawn smaller where the window leaves the list less than it needs, and never under 340 px (PANEL.min in ui/layout-store.js). */
  --panel-drawn: max(340px, min(var(--panel-width), var(--panel-fit)));
  --bar-height: 44px;
  /* The band under the page that the tasks tray stands in while a job is on the page (tasks.css): the tray's 34 px line and the 14 px under it, and 8 px over it. */
  --tray-room: 56px;
}

/* The light palette, for a person who chose Light and for a browser that gives the page a light scheme while the person chose nothing. CSS cannot share one
   block between a selector and a media query, so the list is written twice, side by side: change one, change the other (test/theme.test.ts checks they are the same). */
:root[data-theme="light"] {
  --bg: #f7f7f8;
  --sb: #f0f0f3;
  --pn: #ffffff;
  --pn2: #f1f1f4;
  --ln: #dcdde3;
  --ln2: #c3c6cf;
  --ctl: #7b8294;
  --tx: #16181d;
  --dim: #586070;
  --accm: #c76a04;
  --acct: #9a4a06;
  --accbg: rgba(245, 158, 11, 0.15);
  --accln: rgba(154, 74, 6, 0.8);
  --ok: #13733a;
  --wn: #9a4a06;
  --bd: #b91c1c;
  --no: #b53b0a;
  --nobg: rgba(194, 65, 12, 0.09);
  --hov: #efeff3;
  --inp: #ffffff;
  --scrim: rgba(22, 24, 29, 0.38);
  --shd: 0 24px 60px rgba(20, 22, 30, 0.25);
  --site: #0e7490;
  --int: #5b4bc4;
  --file: #6b5a00;
  --filebg: rgba(214, 190, 0, 0.2);
  --edge: #7f8695;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #f7f7f8;
    --sb: #f0f0f3;
    --pn: #ffffff;
    --pn2: #f1f1f4;
    --ln: #dcdde3;
    --ln2: #c3c6cf;
    --ctl: #7b8294;
    --tx: #16181d;
    --dim: #586070;
    --accm: #c76a04;
    --acct: #9a4a06;
    --accbg: rgba(245, 158, 11, 0.15);
    --accln: rgba(154, 74, 6, 0.8);
    --ok: #13733a;
    --wn: #9a4a06;
    --bd: #b91c1c;
    --no: #b53b0a;
    --nobg: rgba(194, 65, 12, 0.09);
    --hov: #efeff3;
    --inp: #ffffff;
    --scrim: rgba(22, 24, 29, 0.38);
    --shd: 0 24px 60px rgba(20, 22, 30, 0.25);
    --site: #0e7490;
    --int: #5b4bc4;
    --file: #6b5a00;
    --filebg: rgba(214, 190, 0, 0.2);
    --edge: #7f8695;
  }
}

@media (max-width: 1360px) { :root { --panel-width: 480px; } }
