/* Jarbou3i design-system kernel (UIX-1, ADR-0002).
   Tokens, themes, accessibility foundations and base controls. The world is
   a transit diagram: platform-white ground, enamel panels, ink, and one
   colour per line of the model; the dark theme is the same map on midnight
   enamel. Every token is --j-* and every class .j-*. Foundations apply only
   inside .j-root. One typeface, Readex Pro, served from assets/fonts
   (ADR-0003); no remote fonts. The contract for each control is in
   src/ui/contracts.js. */

/* Readex Pro (OFL-1.1, assets/fonts/OFL.txt), variable weight 160–700. Each
   file loads only when its script is on the page. */
@font-face {
  font-family: "Readex Pro"; font-style: normal; font-weight: 160 700; font-display: swap;
  src: url("../../assets/fonts/readex-pro-arabic-wght-normal.woff2") format("woff2-variations"), url("../../assets/fonts/readex-pro-arabic-wght-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Readex Pro"; font-style: normal; font-weight: 160 700; font-display: swap;
  src: url("../../assets/fonts/readex-pro-latin-ext-wght-normal.woff2") format("woff2-variations"), url("../../assets/fonts/readex-pro-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Readex Pro"; font-style: normal; font-weight: 160 700; font-display: swap;
  src: url("../../assets/fonts/readex-pro-latin-wght-normal.woff2") format("woff2-variations"), url("../../assets/fonts/readex-pro-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Surfaces: midnight enamel, porcelain ink */
  --j-bg: #0f1b30;
  --j-panel: #142440;
  --j-panel-2: #1a2b48;
  --j-raise: #203457;
  --j-line: #2a3e62;
  --j-line-strong: #6f82a6;
  --j-fg: #f2f0ea;
  --j-fg-muted: #bbc4d4;
  --j-fg-faint: #9ca9bf;
  /* One colour for interaction; ink carries the primary action */
  --j-signal: #8db2f5;
  --j-signal-strong: #b3ccf8;
  --j-on-signal: #0f1b30;
  --j-signal-wash: rgba(141, 178, 245, .14);
  --j-ink: #f2f0ea;
  --j-on-ink: #0f1b30;
  --j-ink-hover: #d9dce4;
  --j-ok: #4cc383;
  --j-warn: #f2b33d;
  --j-crit: #ff7a70;
  --j-ok-wash: rgba(76, 195, 131, .14);
  --j-warn-wash: rgba(242, 179, 61, .14);
  --j-crit-wash: rgba(255, 122, 112, .14);
  --j-scrim: rgba(5, 10, 20, .66);
  /* Focus thickens an edge; it is not a halo */
  --j-glow: 0 0 0 1px var(--j-signal);
  --j-shadow: 0 16px 40px rgba(3, 8, 18, .5), 0 2px 6px rgba(3, 8, 18, .3);
  /* The lines of the model: one colour per layer, its name always beside it */
  --j-l1: #ee5248; --j-l2: #5e8fea; --j-l3: #f2b33d; --j-l4: #3db06e; --j-l5: #b37fe0;
  --j-l6: #f2f0ea; --j-l7: #f08a4b; --j-l8: #36b9bf; --j-l9: #c49561;

  /* Type: one family, eight sizes; hierarchy by size and weight */
  --j-font-ui: "Readex Pro", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", "Noto Sans Arabic", "Geeza Pro", Tahoma, sans-serif;
  --j-font-display: "Readex Pro", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", "Noto Sans Arabic", "Geeza Pro", sans-serif;
  --j-font-data: var(--j-font-ui);
  /* Only for what is code: JSON, prompts, paths and ids */
  --j-font-code: ui-monospace, "Cascadia Code", "SF Mono", "JetBrains Mono", Consolas, "Noto Sans Arabic", monospace;
  --j-t-12: 12px; --j-t-13: 13px; --j-t-14: 14px; --j-t-16: 16px;
  --j-t-18: 18px; --j-t-22: 22px; --j-t-28: 28px; --j-t-36: 36px;

  /* Space, radius, line weights, motion, layers */
  --j-s-1: 4px; --j-s-2: 8px; --j-s-3: 12px; --j-s-4: 16px; --j-s-5: 24px; --j-s-6: 32px; --j-s-7: 48px;
  --j-r-1: 4px; --j-r-2: 10px; --j-r-3: 16px; --j-r-pill: 999px;
  --j-rule: 3px; --j-track: 6px; --j-station: 4px;
  --j-dur-1: 120ms; --j-dur-2: 200ms; --j-dur-3: 320ms;
  --j-ease-out: cubic-bezier(.16, 1, .3, 1);
  --j-ease-in: cubic-bezier(.4, 0, 1, 1);
  --j-z-rail: 10; --j-z-top: 20; --j-z-drawer: 40; --j-z-dialog: 100; --j-z-toast: 200;

  /* Density: comfortable by default. Controls keep a 44px target in both. */
  --j-control: 44px;
  --j-card-pad: var(--j-s-6);
  --j-card-gap: var(--j-s-5);
}
[data-density="compact"] {
  --j-card-pad: var(--j-s-4);
  --j-card-gap: var(--j-s-3);
}
/* A phone keeps its width for content: cards take the compact padding. */
@media (max-width: 620px) {
  :root { --j-card-pad: var(--j-s-4); --j-card-gap: var(--j-s-3); }
}
/* The light theme is the daylight map, not an inversion. It follows the
   system unless a theme is chosen; both selectors carry the same values. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --j-bg: #f8f8f6; --j-panel: #ffffff; --j-panel-2: #efefeb; --j-raise: #e8e8e3;
    --j-line: #dcdcd6; --j-line-strong: #7c8088;
    --j-fg: #15171b; --j-fg-muted: #4a4f57; --j-fg-faint: #5e636b;
    --j-signal: #1f5bc4; --j-signal-strong: #174a9f; --j-on-signal: #ffffff; --j-signal-wash: rgba(31, 91, 196, .09);
    --j-ink: #15171b; --j-on-ink: #f8f8f6; --j-ink-hover: #33363d;
    --j-ok: #17733f; --j-warn: #8a5300; --j-crit: #c8262a;
    --j-ok-wash: rgba(23, 115, 63, .09); --j-warn-wash: rgba(233, 162, 26, .14); --j-crit-wash: rgba(200, 38, 42, .08);
    --j-scrim: rgba(21, 23, 27, .45);
    --j-shadow: 0 12px 32px rgba(21, 23, 27, .14), 0 2px 6px rgba(21, 23, 27, .08);
    --j-l1: #d62b2b; --j-l2: #1f5bc4; --j-l3: #e9a21a; --j-l4: #1d8a4e; --j-l5: #7a3f9e;
    --j-l6: #15171b; --j-l7: #d9621c; --j-l8: #0f8a8f; --j-l9: #8b5e34;
  }
}
:root[data-theme="light"] {
  --j-bg: #f8f8f6; --j-panel: #ffffff; --j-panel-2: #efefeb; --j-raise: #e8e8e3;
  --j-line: #dcdcd6; --j-line-strong: #7c8088;
  --j-fg: #15171b; --j-fg-muted: #4a4f57; --j-fg-faint: #5e636b;
  --j-signal: #1f5bc4; --j-signal-strong: #174a9f; --j-on-signal: #ffffff; --j-signal-wash: rgba(31, 91, 196, .09);
  --j-ink: #15171b; --j-on-ink: #f8f8f6; --j-ink-hover: #33363d;
  --j-ok: #17733f; --j-warn: #8a5300; --j-crit: #c8262a;
  --j-ok-wash: rgba(23, 115, 63, .09); --j-warn-wash: rgba(233, 162, 26, .14); --j-crit-wash: rgba(200, 38, 42, .08);
  --j-scrim: rgba(21, 23, 27, .45);
  --j-shadow: 0 12px 32px rgba(21, 23, 27, .14), 0 2px 6px rgba(21, 23, 27, .08);
  --j-l1: #d62b2b; --j-l2: #1f5bc4; --j-l3: #e9a21a; --j-l4: #1d8a4e; --j-l5: #7a3f9e;
  --j-l6: #15171b; --j-l7: #d9621c; --j-l8: #0f8a8f; --j-l9: #8b5e34;
}

/* ---------- Foundations (inside .j-root only) ---------- */
/* The colour scheme (form controls, scrollbars) is set on .j-root, not the
   page, so the kernel does not restyle the current app around it. */
.j-root { color-scheme: dark; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .j-root { color-scheme: light; } }
:root[data-theme="light"] .j-root { color-scheme: light; }
.j-root, .j-root *, .j-root *::before, .j-root *::after { box-sizing: border-box; }
.j-root {
  background: var(--j-bg);
  color: var(--j-fg);
  font: 400 var(--j-t-14)/1.55 var(--j-font-ui);
  /* Counts line up in every list and table. */
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--j-signal);
  scrollbar-color: var(--j-line-strong) transparent;
}
.j-root ::selection { background: color-mix(in srgb, var(--j-signal) 28%, transparent); color: var(--j-fg); }
.j-root :is(button, input, select, textarea) { font: inherit; color: inherit; }
.j-root button:not(:disabled) { cursor: pointer; }
.j-root :focus-visible { outline: 3px solid var(--j-signal); outline-offset: 2px; }
.j-root :is(h1, h2, h3, h4) { margin: 0; font-family: var(--j-font-display); text-wrap: balance; }
.j-root p { margin: 0; }
.j-root a { color: var(--j-signal); text-underline-offset: .2em; text-decoration-thickness: 1px; }
.j-root a:hover { text-decoration-thickness: 2px; }
/* Components set display; the hidden attribute still wins. */
.j-root [hidden] { display: none !important; }
.j-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.j-mono { font-family: var(--j-font-data); font-variant-numeric: tabular-nums; }
/* A small name for a value or a group: the same family, set smaller and bolder. */
.j-label { font: 700 var(--j-t-13)/1.3 var(--j-font-ui); color: var(--j-fg-muted); }
.j-icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
:root[dir="rtl"] .j-icon[data-flip] { transform: scaleX(-1); }

/* ---------- Button ---------- */
.j-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--j-s-2);
  min-height: var(--j-control); padding: 0 var(--j-s-4);
  border: 2px solid var(--j-line-strong); border-radius: var(--j-r-pill);
  background: var(--j-panel); color: var(--j-fg);
  font-weight: 700; text-decoration: none;
  transition: background-color var(--j-dur-1) var(--j-ease-out), border-color var(--j-dur-1) var(--j-ease-out), color var(--j-dur-1) var(--j-ease-out), transform var(--j-dur-1) var(--j-ease-out);
}
.j-btn:hover:not(:disabled) { border-color: var(--j-ink); background: var(--j-raise); }
.j-btn:active:not(:disabled) { transform: scale(.98); }
.j-btn:disabled { opacity: .45; cursor: not-allowed; }
/* The one primary action: an ink pill, like the line's own name plate. */
.j-btn[data-variant="primary"] { background: var(--j-ink); border-color: var(--j-ink); color: var(--j-on-ink); }
.j-btn[data-variant="primary"]:hover:not(:disabled) { background: var(--j-ink-hover); border-color: var(--j-ink-hover); }
.j-btn[data-variant="ghost"] { background: transparent; border-color: transparent; color: var(--j-fg-muted); }
.j-btn[data-variant="ghost"]:hover:not(:disabled) { color: var(--j-fg); background: var(--j-raise); border-color: transparent; }
.j-btn[data-size="lg"] { min-height: 52px; padding: 0 var(--j-s-5); font-size: var(--j-t-16); }
.j-btn[data-size="icon"] { width: var(--j-control); padding: 0; flex: none; }
/* Deletes or resets: said in the critical colour, filled only on hover. */
.j-btn[data-variant="danger"] { color: var(--j-crit); border-color: color-mix(in srgb, var(--j-crit) 55%, transparent); }
.j-btn[data-variant="danger"]:hover:not(:disabled) { background: var(--j-crit-wash); border-color: var(--j-crit); }
.j-kbd {
  white-space: nowrap;
  font: 500 var(--j-t-12) var(--j-font-code); padding: 1px 6px;
  border: 1px solid var(--j-line-strong); border-bottom-width: 2px; border-radius: var(--j-r-1);
  color: var(--j-fg-muted); background: var(--j-panel);
}

/* ---------- Segmented control (one choice of a few) ---------- */
.j-seg { flex: none; display: inline-flex; padding: 2px; gap: 2px; border: 1px solid var(--j-line-strong); border-radius: var(--j-r-pill); background: var(--j-panel); }
.j-seg > button {
  position: relative;
  min-height: 38px; min-width: 44px; padding: 0 var(--j-s-3); border: 0; border-radius: var(--j-r-pill);
  background: transparent; color: var(--j-fg-muted); font: 700 var(--j-t-13) var(--j-font-ui);
}
.j-seg > button:hover:not([aria-checked="true"]) { color: var(--j-fg); background: var(--j-raise); }
/* The hit area spans the track's padding: 44px tall, like every other target. */
.j-seg > button::after { content: ""; position: absolute; inset: -3px -1px; }
.j-seg > button[aria-checked="true"] { background: var(--j-ink); color: var(--j-on-ink); }

/* ---------- Status: shape + colour + text, never colour alone ---------- */
.j-status { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; font: 700 var(--j-t-13)/1.2 var(--j-font-ui); }
.j-status::before { content: ""; width: 8px; height: 8px; flex: none; }
.j-status[data-tone="ok"] { color: var(--j-ok); }
.j-status[data-tone="ok"]::before { border-radius: 50%; background: var(--j-ok); }
.j-status[data-tone="warn"] { color: var(--j-warn); }
.j-status[data-tone="warn"]::before { width: 0; height: 0; border-inline: 5px solid transparent; border-bottom: 9px solid var(--j-warn); }
.j-status[data-tone="crit"] { color: var(--j-crit); }
.j-status[data-tone="crit"]::before { background: var(--j-crit); }
.j-status[data-tone="idle"] { color: var(--j-fg-faint); }
.j-status[data-tone="idle"]::before { border-radius: 50%; border: 1.5px solid var(--j-fg-faint); }

/* ---------- Chip (a short qualifier, e.g. confidence) ---------- */
.j-chip {
  width: fit-content;
  display: inline-flex; align-items: center; gap: 4px; min-height: 22px; padding: 0 8px;
  border: 1px solid var(--j-line-strong); border-radius: 999px;
  font: 600 var(--j-t-12)/1 var(--j-font-ui); color: var(--j-fg-muted); white-space: nowrap;
}
.j-chip[data-tone="ok"] { color: var(--j-ok); border-color: color-mix(in srgb, var(--j-ok) 45%, transparent); }
.j-chip[data-tone="warn"] { color: var(--j-warn); border-color: color-mix(in srgb, var(--j-warn) 45%, transparent); }
.j-chip[data-tone="crit"] { color: var(--j-crit); border-color: color-mix(in srgb, var(--j-crit) 45%, transparent); }

/* A sentence that says a state: the tone is an edge and a wash, the words say it. */
.j-note {
  margin: 0; padding: var(--j-s-2) var(--j-s-3); border: 1px solid var(--j-line);
  border-radius: var(--j-r-2); color: var(--j-fg); font-size: var(--j-t-13);
}
.j-note:empty { display: none; }
.j-note[data-tone="ok"] { border-color: color-mix(in srgb, var(--j-ok) 55%, transparent); background: var(--j-ok-wash); }
.j-note[data-tone="warn"] { border-color: color-mix(in srgb, var(--j-warn) 60%, transparent); background: var(--j-warn-wash); }
.j-note[data-tone="crit"] { border-color: color-mix(in srgb, var(--j-crit) 55%, transparent); background: var(--j-crit-wash); }

/* A disclosure: a <details> whose summary is a 44px control. */
.j-disclosure { border: 1px solid var(--j-line); border-radius: var(--j-r-2); background: var(--j-panel); color: var(--j-fg); }
.j-disclosure > summary { display: flex; align-items: center; gap: var(--j-s-2); min-height: 44px; padding: 0 var(--j-s-3); font-weight: 600; font-size: var(--j-t-13); cursor: pointer; }
/* Its chevron at the end, drawn from two borders: down when closed, up when open. */
.j-disclosure > summary::after {
  content: ""; flex: none; inline-size: 8px; block-size: 8px; margin-inline: auto var(--j-s-1);
  border-right: 2px solid var(--j-fg-muted); border-bottom: 2px solid var(--j-fg-muted); transform: translateY(-2px) rotate(45deg);
}
.j-disclosure[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.j-disclosure > summary:focus-visible { outline: 3px solid var(--j-signal); outline-offset: 2px; }

/* ---------- Card ---------- */
/* Not a box: a section of the line, opened by a thick ink rule like the band
   across the top of a station sign. */
.j-card {
  background: var(--j-panel); border: 0; border-block-start: var(--j-rule) solid var(--j-ink); border-radius: 0 0 var(--j-r-2) var(--j-r-2);
  padding: var(--j-card-pad); display: grid; gap: var(--j-card-gap); min-width: 0;
}
/* A card that is a part of the page, which the shell's nav scrolls to. */
section.j-card { scroll-margin-top: var(--j-s-4); }
/* A card's heading: its title and the line under it, a status beside them
   (under them when they need the width). */
.j-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--j-s-3) var(--j-s-5); }
.j-card-head > div { display: grid; gap: var(--j-s-2); flex: 1 1 32ch; min-width: 0; }
.j-card-head h2 { margin: 0; color: var(--j-fg); font: 700 var(--j-t-28)/1.15 var(--j-font-display); letter-spacing: -.015em; }
@media (max-width: 720px) { .j-card-head h2 { font-size: var(--j-t-22); } }
.j-card-head p { max-width: 72ch; margin: 0; color: var(--j-fg-muted); font-size: var(--j-t-14); line-height: 1.55; }

/* ---------- Field ---------- */
.j-field { display: grid; gap: var(--j-s-2); min-width: 0; }
.j-field > label { font-weight: 700; font-size: var(--j-t-14); }
.j-help { color: var(--j-fg-faint); font-size: var(--j-t-13); }
.j-input {
  width: 100%; min-height: var(--j-control); padding: var(--j-s-3);
  border: 2px solid var(--j-ink); border-radius: var(--j-r-2);
  background: var(--j-panel); color: var(--j-fg);
  transition: border-color var(--j-dur-1) var(--j-ease-out), box-shadow var(--j-dur-1) var(--j-ease-out);
}
textarea.j-input { resize: vertical; line-height: 1.5; }
.j-input:focus { outline: none; border-color: var(--j-signal); box-shadow: var(--j-glow); }
.j-input[aria-invalid="true"] { border-color: var(--j-crit); }
.j-input::placeholder { color: var(--j-fg-faint); opacity: 1; }

/* ---------- Toast ---------- */
.j-toast {
  position: fixed; z-index: var(--j-z-toast); bottom: calc(var(--j-s-5) + env(safe-area-inset-bottom, 0px));
  inset-inline-start: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: var(--j-s-2);
  /* Its own width up to a readable measure: centred from 50%, it would
     otherwise wrap at half the view. */
  width: max-content; max-width: min(560px, calc(100vw - 2 * var(--j-s-4)));
  padding: var(--j-s-3) var(--j-s-4); border-radius: var(--j-r-2); border: 1px solid var(--j-line-strong);
  background: var(--j-raise); color: var(--j-fg); box-shadow: var(--j-shadow); font-weight: 600;
  animation: j-toast-in var(--j-dur-2) var(--j-ease-out);
}
:root[dir="rtl"] .j-toast { transform: translateX(50%); }
@keyframes j-toast-in { from { opacity: 0; translate: 0 8px; } }
/* A toast that stays in the page (data-open) is a live region read while it
   waits, so closed it slides below the view instead of leaving the tree; it
   leaves faster than it comes. */
.j-toast[data-open] { animation: none; transition: translate var(--j-dur-2) var(--j-ease-out), opacity var(--j-dur-2) var(--j-ease-out); }
.j-toast[data-open="false"] {
  translate: 0 calc(100% + var(--j-s-5) + var(--j-s-4) + env(safe-area-inset-bottom, 0px));
  opacity: 0; pointer-events: none; transition-duration: var(--j-dur-1);
}
/* A failure or a warning: an edge, and the words say it. */
.j-toast[data-tone="crit"] { border: 2px solid var(--j-crit); }
.j-toast[data-tone="warn"] { border: 2px solid var(--j-warn); }

/* ---------- Skip link ---------- */
/* The keyboard's first stop: above the view until it takes focus. */
.j-skip {
  position: fixed; z-index: var(--j-z-dialog); inset-block-start: var(--j-s-2); inset-inline-start: var(--j-s-3);
  display: inline-flex; align-items: center; min-height: var(--j-control); padding: 0 var(--j-s-4);
  border: 1px solid var(--j-line-strong); border-radius: var(--j-r-2); background: var(--j-raise); color: var(--j-fg);
  font-weight: 700; text-decoration: none;
  translate: 0 calc(-100% - var(--j-s-4)); transition: translate var(--j-dur-2) var(--j-ease-out);
}
/* Its shadow only once shown: above the view it would show under the edge. */
.j-skip:focus { translate: 0 0; box-shadow: var(--j-shadow); outline: 3px solid var(--j-signal); outline-offset: 2px; }

/* ---------- Dialog (native <dialog>, opened with showModal) ---------- */
.j-dialog {
  width: min(560px, calc(100vw - 2 * var(--j-s-4))); max-height: min(70vh, 560px);
  padding: 0; border: 1px solid var(--j-line-strong); border-block-start: var(--j-rule) solid var(--j-ink); border-radius: 0 0 var(--j-r-3) var(--j-r-3);
  background: var(--j-panel); color: var(--j-fg); box-shadow: var(--j-shadow);
  animation: j-dialog-in var(--j-dur-2) var(--j-ease-out);
}
.j-dialog[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.j-dialog::backdrop { background: var(--j-scrim); }
.j-dialog > .j-field { padding: var(--j-s-3) var(--j-s-3) 0; }
.j-dialog > p { margin: 0; padding: 0 var(--j-s-4) var(--j-s-4); color: var(--j-fg-faint); }
@keyframes j-dialog-in { from { opacity: 0; translate: 0 -8px; } }

/* ---------- Listbox (one choice of many, e.g. palette results) ---------- */
.j-listbox { list-style: none; margin: 0; padding: var(--j-s-2); overflow-y: auto; display: grid; align-content: start; gap: 2px; }
.j-option {
  display: flex; align-items: center; min-height: var(--j-control); padding: 0 var(--j-s-3);
  border-radius: var(--j-r-2); color: var(--j-fg-muted); cursor: pointer;
}
.j-option:hover { background: var(--j-raise); color: var(--j-fg); }
/* The option you are on: tinted and ringed like the current station. */
.j-option[aria-selected="true"] { background: var(--j-signal-wash); color: var(--j-fg); font-weight: 600; }
.j-option[aria-selected="true"]::before {
  content: ""; flex: none; inline-size: 12px; block-size: 12px; margin-inline-end: var(--j-s-2);
  border: var(--j-station) solid var(--j-signal); border-radius: 50%;
}

/* ---------- Motion and forced colours ---------- */
@media (prefers-reduced-motion: reduce) {
  .j-root *, .j-root *::before, .j-root *::after,
  .j-toast, .j-skip { animation: none !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .j-status::before { forced-color-adjust: none; background: CanvasText; border-color: CanvasText; }
  /* An ink plate stays a filled plate in system colours. Set, not left to the
     browser: Chromium keeps the light ink colour as the text's fill colour. */
  .j-btn[data-variant="primary"] { forced-color-adjust: none; background: ButtonText; border: 2px solid ButtonText; color: ButtonFace; }
  .j-btn[data-variant="primary"]:disabled { background: ButtonFace; border-color: GrayText; color: GrayText; }
  .j-option[aria-selected="true"] { outline: 2px solid Highlight; }
}
/* Page furniture does not print. */
@media print {
  .j-toast, .j-skip { display: none !important; }
}
