/* ============================================================
   Kuki Research Bench
   The bench's default colours: the custom properties below. The
   colour themes chosen in ⚙ Settings are bench-kit's
   kit/themes.css, and the styles every bench shares its
   kit/bench.css, both loaded before this file; to change a theme,
   repeat its selector here with the tokens to change.
   ============================================================ */

/* The colours are Kuki's own. In 「いき」の構造 (The Structure of Iki, 1930) he finds the colours of iki
   in three lines: grey (鼠色), brown (黄柄茶, 媚茶) and blue (紺, 御納戸). Iki, the default: a grey-toned
   paper, ink with some 紺 in it, 紺 for the accent and the top bar, 御納戸 and 媚茶 beside it. The hex
   values are approximations of those traditional colours. Gold (--kin) is kept for what is added. */
:root {
  --code-bg: #f9f7f2;   /* the ground of the texts: Read, Compare */
  --noted-bg: rgba(35, 55, 100, 0.05);
  --bg: #eceae4;
  --bg-2: #e3e1da;
  --surface: #f9f7f2;
  --surface-2: #e8e6df;
  --line: #c6c5be;      /* 銀鼠 */
  --line-soft: #dcdbd4;
  --text: #24272e;
  --text-dim: #555a60;  /* 藍鼠 */
  --text-faint: #80848a;
  --beam: #2d5a68;      /* 御納戸 */
  /* the bench's accent (annotations, titles, numbers, the current line): kept off yellow,
     so that gold (--kin) stands apart */
  --amber: #233764;     /* 紺 */
  --green: #4f6a55;     /* 深川鼠, deepened */
  --red: #8d3f2c;
  --violet: #574a78;
  --hl: rgba(35, 55, 100, 0.09);
  --sel: rgba(45, 90, 104, 0.14);
  --add-bg: rgba(79, 106, 85, 0.14);
  --del-bg: rgba(141, 63, 44, 0.11);
  --dec-blue: #233764;
  --dec-blue-dark: #dfe3ea;
  --dec-cream: #24272e;
  --g-retained: #2d5a68;
  --g-moved: #574a78;
  --g-edited: #716246;  /* 媚茶 */
  --g-rewritten: #8d5a2c;
  --g-added: #4f6a55;
  --g-removed: #8d3f2c;
  --g-text: #24272e; --g-muted: #666a70; --g-stroke: #a4a5a0; --g-box: #e3e1da; --g-heat: #2d5a68; --g-line: #80848a; --g-cell-dark: #ffffff;
  /* the frame: top bar, version picker, figure plates */
  --bar-1: #27396a; --bar-2: #1f2e56; --bar-fg: #f1efe8; --bar-line: #152040;
  --pick-bg: rgba(255, 255, 255, 0.12); --pick-fg: #f1efe8; --pick-line: rgba(241, 239, 232, 0.3);
  --plate: #f9f7f2; --plate-line: #c6c5be; --pick-stroke: #24272e; --hl-filter: brightness(0.92) saturate(1.2);
  --on-amber: #ffffff; --tape-paper: #ffffff; --tape-hole: #1f2e56;
  --menu-bg: #ffffff; --menu-line: rgba(0, 0, 0, 0.12);
  --kin: #93700a; --kin-bg: rgba(170, 128, 0, 0.12);
  color-scheme: light;
}

:root[data-theme="night"] {
  /* Kon, the dark theme: the same three lines at night, 紺 for the ground, 媚茶 lightened for the accent */
  --code-bg: #0e1320;
  --noted-bg: rgba(196, 170, 125, 0.07);
  --bg: #111728;
  --bg-2: #161d31;
  --surface: #1b2339;
  --surface-2: #212a42;
  --line: #333b52;
  --line-soft: #252d44;
  --text: #e6e4dc;
  --text-dim: #a6a8a8;
  --text-faint: #797d84;
  --beam: #7fb0bd;
  --amber: #c4aa7d;
  --green: #8fae97;
  --red: #d08a72;
  --violet: #a39bc6;
  --hl: rgba(196, 170, 125, 0.14);
  --sel: rgba(127, 176, 189, 0.16);
  --add-bg: rgba(143, 174, 151, 0.14);
  --del-bg: rgba(208, 138, 114, 0.14);
  --dec-blue: #7fb0bd;
  --dec-blue-dark: #1a3038;
  --dec-cream: #e6e4dc;
  --g-retained: #7fb0bd;
  --g-moved: #a39bc6;
  --g-edited: #c4aa7d;
  --g-rewritten: #d0a06f;
  --g-added: #a9c9b0;
  --g-removed: #d08a72;
  --g-text: #e6e4dc; --g-muted: #8b8e90; --g-stroke: #3d4660; --g-box: #1b2339; --g-heat: #7fb0bd; --g-line: #a6a8a8; --g-cell-dark: #0e1320;
  --bar-1: #161d31; --bar-2: #111728; --bar-fg: #e6e4dc; --bar-line: #090d18;
  --pick-bg: rgba(0, 0, 0, 0.3); --pick-fg: #e6e4dc; --pick-line: rgba(230, 228, 220, 0.22);
  --plate: #0e1320; --plate-line: #252d44; --pick-stroke: #e6e4dc; --hl-filter: brightness(1.4);
  --on-amber: #1a1408; --tape-paper: #e6e4dc; --tape-hole: #111728;
  --menu-bg: #1b2339; --menu-line: rgba(255, 255, 255, 0.1);
  --kin: #e6b422; --kin-bg: rgba(230, 180, 34, 0.14);
  color-scheme: dark;
}

h2 .swref { font-size: 11.5px; vertical-align: middle; }

/* ---------- the welcome tour ---------- */

@media (max-width: 640px) { .tab-menu[data-w="graphics"] { grid-template-columns: 1fr; } }

/* assembly errors, explained */
button.badge.err { cursor: pointer; font: inherit; }

.mc-where button:focus-visible, .frag-q button:focus-visible, .card-fold:focus-visible, .lncols .ann-cyc:focus-visible { outline: 2px solid var(--beam); outline-offset: 1px; border-radius: 2px; }

.legend span[title] { cursor: help; }

/* ---------- top bar ---------- */

.bar-right { margin-left: auto; }

/* ---------- the language, beside the picker ---------- */
.vlang { font: 10px var(--mono); letter-spacing: 0.5px; color: var(--text-faint); margin-left: 8px; white-space: nowrap; }
@media (max-width: 900px) { .vlang { display: none; } }
