/*
 * Aquillus UI kit - one stylesheet for the desk web UI, Aquillus Cloud and the simulators.
 *
 * Design idea: the chrome is quiet so the content can speak. On a camera desk the content is colour -
 * the light of the keys, red for "on air", green for "preview". So every surface is a neutral grey, there
 * is one accent that marks what can be acted on, and nothing glows or fades for decoration.
 * Hierarchy comes from type (size, weight and leading as a set), from grouping and from the depth of a
 * surface - not from borders around everything.
 *
 * The rules behind it (see docs/de/entwicklung/06-oberflaechen.md):
 *   - Feedback on press, not on release: every control reacts at pointer-down.
 *   - Things you drag follow the finger 1:1; when you let go they settle like a spring.
 *   - Floating chrome (toolbar, sheets, menus) is a translucent material; content scrolls beneath it.
 *   - Grouped lists instead of cards in cards; a hairline separates rows.
 *   - Tracking follows size: large type is set tighter, small type a little wider.
 *   - Reduced motion, reduced transparency and increased contrast are honoured.
 *
 * Two looks share these rules and every component:
 *
 *   The first look (default; Aquillus Cloud and the simulators until they move over): Apple-grey surfaces,
 *   a calm cyan accent, the system typeface with Inter as its stand-in, a translucent sidebar, round
 *   status dots.
 *
 *   "Wabe" (honeycomb), the direction Aquillus has chosen for itself - opt in with
 *   <html data-aq-look="wabe">. What it changes:
 *     - Cameras stand as a honeycomb: pointy-top hexagons with slightly rounded corners in straight rows,
 *       every second row shifted by half a cell (.aq-comb, built by honeycomb.js). The shape comes from the
 *       logo. Small status marks are hexagons as well (.aq-hex; .aq-dot takes the same shape).
 *     - A camera's state never uses a brand colour: the selected camera is the inverted cell (--aq-inverse),
 *       programme a red ring with "PGM" (--aq-pgm), preview a green ring with "PVW" (--aq-pvw), a switched-off
 *       camera a dashed outline, recording a small red dot.
 *     - Brand: the navigation is Dark Teal #00414B in both themes (--aq-nav-*). Light Sea Green #20A8A4
 *       (--aq-fill) stands only for what can be operated or is switched on: fader fill, switch, primary
 *       button, focus ring. On white it is too light for text and thin icons, so the accent as text
 *       (--aq-signal: links, quiet buttons) is Dark Teal in the light theme and sea green in the dark one.
 *     - Typeface Poppins (400/500/600; 700 is declared for bold text that asks for it). It runs wider than
 *       Inter: the type scale is one step smaller, large type is tracked tighter, and text is at least
 *       11 px - only what stands inside a cell (its name, its tags) or on a scaled-down key cap is smaller.
 *       This Poppins has no tabular figures: a number that changes while one watches needs a slot of its own.
 *     - Dark surfaces are a deep graphite with a little of the navigation's hue (page #131a1d, group #1a2226,
 *       control #222c31), so that the Dark Teal rail and the page belong together; light surfaces are neutral.
 *       Groups carry no outline in the dark theme; controls and groups are rounded 14-16 px.
 *     - Motion: what changes shows how it changed. Transitions settle like a critically damped spring
 *       (--aq-spring; aquillus.js has the same curve and the helpers glide, pop, arrive, swap): the highlight of
 *       a choice glides to the new choice, a sheet grows from what opened it and leaves the same way (on a
 *       phone it comes from the bottom edge and can be pulled down), a status mark cross-fades its colour and
 *       gives one pulse. Only transform and opacity move; nothing loops for decoration; what is operating truth
 *       (programme, preview, recording, the light of a key) is there in the first frame.
 *   Still not part of either look: glow, decorative gradients, borders around everything, coloured side
 *   stripes, all-caps eyebrow labels.
 *
 * Usage: <link rel="stylesheet" href="/ui/aquillus.css"> and put class="aq" on <body>.
 * Theme: follows the system. Force one with <html data-theme="dark"> or <html data-theme="light">.
 * Next to this file: aquillus.js (helpers), honeycomb.js (the camera field and a cell on its own), gamepad.js
 * (game controllers as drawings with parts to choose, .aq-pad, from gamepads.json), aquillus-mark.svg (the
 * mark of the logo as in /brand; colour it with a mask, in Light Sea Green or white only). fonts/ holds Inter
 * and Poppins, each with its OFL text (OFL.txt, OFL-Poppins.txt).
 */

@font-face { font-family: "Inter"; src: url("fonts/Inter-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
/* Poppins is only fetched by pages that use it (the look "Wabe"). */
@font-face { font-family: "Poppins"; src: url("fonts/Poppins-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("fonts/Poppins-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("fonts/Poppins-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("fonts/Poppins-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  /* surfaces, from the back to the front */
  --aq-ink: #000000;        /* page */
  --aq-deck: #1c1c1e;       /* grouped surface: lists, panels */
  --aq-rail: #2c2c2e;       /* control fill: buttons, inputs, key caps */
  --aq-rail-2: #3a3a3c;     /* control fill while pressed or hovered */
  --aq-line: #38383a;       /* separator */
  --aq-petrol: #0f4c5c;     /* brand */
  --aq-signal: #40c8e0;     /* accent: what can be acted on, focus, links */
  --aq-on-signal: #00252d;  /* text on accent */
  --aq-text: #f5f5f7;
  --aq-muted: #98989f;      /* secondary text */
  --aq-faint: #636366;      /* tertiary text, placeholder, disabled */
  --aq-red: #ff453a;        /* on air / destructive */
  --aq-green: #30d158;      /* preview / on / ok */
  --aq-amber: #ff9f0a;      /* attention */
  --aq-on-red: #ffffff;
  --aq-on-green: #00210a;
  --aq-on-amber: #2b1900;
  --aq-thumb: #636366;      /* selected segment */
  --aq-knob: #ffffff;       /* switch and slider knob */
  --aq-green-fill: #30d158; /* "on" as a filled shape (switch, dot) - never as text */
  --aq-red-fill: #ff453a;
  --aq-amber-fill: #ff9f0a;
  --aq-onair-fill: #e0271b; /* solid red under white text: "on air", destructive buttons */
  --aq-desk: #1c1c1e;       /* the desk itself: surface under keys, faders and joystick - dark in every theme */
  --aq-key-cap: #2c2c2e;    /* a key that is not lit */
  --aq-key-ink: #f5f5f7;    /* legend of a key that is not lit */
  --aq-material: rgba(28, 28, 30, 0.72);   /* translucent chrome */
  --aq-hairline: rgba(255, 255, 255, 0.08);
  --aq-scrim: rgba(0, 0, 0, 0.5);
  --aq-shadow: 0 24px 64px rgba(0, 0, 0, 0.56), 0 2px 10px rgba(0, 0, 0, 0.32);

  /* type: one family, hierarchy from size + weight + leading */
  --aq-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
  --aq-font-legend: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", system-ui, sans-serif;
  --aq-font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  --aq-fs-xs: 0.75rem;      /* 12 caption */
  --aq-fs-sm: 0.8125rem;    /* 13 footnote */
  --aq-fs: 0.9375rem;       /* 15 body */
  --aq-fs-lg: 1.0625rem;    /* 17 headline */
  --aq-fs-xl: 1.375rem;     /* 22 title */
  --aq-fs-2xl: 1.75rem;     /* 28 large title */
  --aq-fs-3xl: 2.125rem;    /* 34 display */

  /* shape and space */
  --aq-r-sm: 6px;
  --aq-r: 10px;
  --aq-r-lg: 14px;
  --aq-r-xl: 22px;
  --aq-gap: 12px;
  --aq-touch: 44px;         /* minimum touch target */
  color-scheme: dark;
}

:root[data-theme="light"] {
  --aq-ink: #f5f5f7;
  --aq-deck: #ffffff;
  --aq-rail: #ececee;
  --aq-rail-2: #dedee2;
  --aq-line: #d2d2d7;
  --aq-signal: #00758c;
  --aq-on-signal: #ffffff;
  --aq-text: #1d1d1f;
  --aq-muted: #6e6e73;
  --aq-faint: #aeaeb2;
  --aq-red: #d70015;
  --aq-green: #1b7f35;
  --aq-amber: #b25000;
  --aq-on-red: #ffffff;
  --aq-on-green: #ffffff;
  --aq-on-amber: #ffffff;
  --aq-thumb: #ffffff;
  --aq-knob: #ffffff;
  --aq-green-fill: #34c759;
  --aq-red-fill: #ff3b30;
  --aq-amber-fill: #ff9500;
  --aq-onair-fill: #d70015;
  --aq-desk: #1d1d1f;
  --aq-material: rgba(250, 250, 252, 0.76);
  --aq-hairline: rgba(0, 0, 0, 0.08);
  --aq-scrim: rgba(0, 0, 0, 0.28);
  --aq-shadow: 0 24px 64px rgba(0, 0, 0, 0.16), 0 2px 10px rgba(0, 0, 0, 0.08);
  color-scheme: light;
}

/* Without a forced theme the kit follows the system. Same values as the block above. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --aq-ink: #f5f5f7;
    --aq-deck: #ffffff;
    --aq-rail: #ececee;
    --aq-rail-2: #dedee2;
    --aq-line: #d2d2d7;
    --aq-signal: #00758c;
    --aq-on-signal: #ffffff;
    --aq-text: #1d1d1f;
    --aq-muted: #6e6e73;
    --aq-faint: #aeaeb2;
    --aq-red: #d70015;
    --aq-green: #1b7f35;
    --aq-amber: #b25000;
    --aq-on-red: #ffffff;
    --aq-on-green: #ffffff;
    --aq-on-amber: #ffffff;
    --aq-thumb: #ffffff;
    --aq-knob: #ffffff;
    --aq-green-fill: #34c759;
    --aq-red-fill: #ff3b30;
    --aq-amber-fill: #ff9500;
    --aq-onair-fill: #d70015;
    --aq-desk: #1d1d1f;
    --aq-material: rgba(250, 250, 252, 0.76);
    --aq-hairline: rgba(0, 0, 0, 0.08);
    --aq-scrim: rgba(0, 0, 0, 0.28);
    --aq-shadow: 0 24px 64px rgba(0, 0, 0, 0.16), 0 2px 10px rgba(0, 0, 0, 0.08);
    color-scheme: light;
  }
}

/* ---------- the look "Wabe": tokens ----------
 * Opt in with <html data-aq-look="wabe">. The blocks below replace every value of the first look; the rules that
 * change shape (navigation, status marks, type) are in the section "the look Wabe: components" further down.
 * As above, the light values stand twice: for a forced light theme and for the light system theme. */
:root[data-aq-look="wabe"] {
  /* Deep graphite that carries a little of the Dark Teal of the navigation (hue about 195 deg): on pure black the
     rail and the page fought each other. Each step up is about a tenth lighter in contrast, as before. */
  --aq-ink: #131a1d;        /* page */
  --aq-deck: #1a2226;       /* group */
  --aq-rail: #222c31;       /* control */
  --aq-rail-2: #2c383e;     /* control while pressed, secondary fill */
  --aq-rail-up: #2c383e;    /* control that stands on a group */
  --aq-rail-up-2: #37454c;
  --aq-cell: #222c31;       /* a cell of the honeycomb */
  --aq-cell-up: #2c383e;    /* ... that stands on a group */
  --aq-line: #2c383e;
  --aq-petrol: #00414b;     /* brand: Dark Teal */
  --aq-signal: #20a8a4;     /* the accent as text: links, quiet buttons, thin icons */
  --aq-on-signal: #00313a;
  --aq-fill: #20a8a4;       /* brand: Light Sea Green as a fill - what can be operated or is switched on */
  --aq-on-fill: #00313a;    /* Dark Teal, a shade deeper so that text on the fill reaches 4.5:1 */
  --aq-focus: #20a8a4;      /* focus ring */
  --aq-text: #f4f5f6;
  --aq-muted: #9aa6ab;      /* 4.8:1 and more on every surface up to "pressed" */
  --aq-faint: #647177;
  --aq-pgm: #e5352b;        /* tally: programme (ring, tag, solid mark) */
  --aq-pvw: #2fb344;        /* tally: preview */
  --aq-on-pvw: #04230c;
  --aq-red: #f4574d;        /* red as text: errors, destructive actions */
  --aq-green: #2fb344;
  --aq-amber: #f5a524;
  --aq-on-red: #ffffff;
  --aq-on-green: #04230c;
  --aq-on-amber: #2b1900;
  --aq-thumb: #48565d;
  --aq-knob: #ffffff;
  --aq-green-fill: #2fb344;
  --aq-red-fill: #e5352b;
  --aq-amber-fill: #f5a524;
  --aq-onair-fill: #e5352b;
  --aq-inverse: #f4f5f6;    /* the selected camera: the cell inverted */
  --aq-on-inverse: #0d1316;
  --aq-on-inverse-muted: #46525a;
  --aq-red-on-inverse: #c9261d;
  --aq-green-on-inverse: #1b7a33;
  --aq-desk: #1a2226;
  --aq-key-cap: #28343a;
  --aq-key-ink: #f4f5f6;
  --aq-material: rgba(26, 34, 38, 0.86);
  --aq-hairline: rgba(255, 255, 255, 0.07);
  --aq-edge: transparent;   /* outline of a group: none on near-black, a breath on white */
  --aq-scrim: rgba(0, 0, 0, 0.56);
  --aq-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 0 2px 10px rgba(0, 0, 0, 0.36);
  --aq-nav: #00414b;        /* navigation: Dark Teal in both themes */
  --aq-nav-text: rgba(255, 255, 255, 0.62);
  --aq-nav-text-on: #ffffff;
  --aq-nav-on: rgba(255, 255, 255, 0.14);
  --aq-nav-hover: rgba(255, 255, 255, 0.07);

  --aq-font: "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;
  --aq-font-legend: "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;
  --aq-fs-xs: 0.71875rem;   /* 11.5 caption */
  --aq-fs-sm: 0.78125rem;   /* 12.5 footnote */
  --aq-fs: 0.875rem;        /* 14 body */
  --aq-fs-lg: 1rem;         /* 16 headline */
  --aq-fs-xl: 1.25rem;      /* 20 title */
  --aq-fs-2xl: 1.625rem;    /* 26 large title */
  --aq-fs-3xl: 2rem;        /* 32 display */

  --aq-r-sm: 8px;
  --aq-r: 14px;
  --aq-r-lg: 16px;
  --aq-r-xl: 24px;
  color-scheme: dark;
}

:root[data-aq-look="wabe"][data-theme="light"] {
  --aq-ink: #f3f4f5;
  --aq-deck: #ffffff;
  --aq-rail: #e6e8eb;
  --aq-rail-2: #d8dbdf;
  --aq-rail-up: #eceef0;
  --aq-rail-up-2: #dfe2e5;
  --aq-cell: #e2e5e9;
  --aq-cell-up: #e2e5e9;
  --aq-line: #d5d8dc;
  --aq-signal: #00414b;
  --aq-on-signal: #ffffff;
  --aq-focus: #12908d;
  --aq-text: #101214;
  --aq-muted: #5b6268;
  --aq-faint: #a0a6ad;
  --aq-red: #c9261d;
  --aq-green: #1b7a33;
  --aq-amber: #9a5b00;
  --aq-on-green: #ffffff;
  --aq-on-amber: #ffffff;
  --aq-thumb: #ffffff;
  --aq-inverse: #101214;
  --aq-on-inverse: #ffffff;
  --aq-on-inverse-muted: #b4bac1;
  --aq-red-on-inverse: #f4574d;
  --aq-green-on-inverse: #2fb344;
  --aq-desk: #121416;
  --aq-key-cap: #24282c;
  --aq-material: rgba(255, 255, 255, 0.84);
  --aq-hairline: rgba(0, 0, 0, 0.08);
  --aq-edge: rgba(0, 0, 0, 0.06);
  --aq-scrim: rgba(10, 12, 14, 0.32);
  --aq-shadow: 0 24px 64px rgba(16, 18, 20, 0.16), 0 2px 10px rgba(16, 18, 20, 0.08);
  color-scheme: light;
}

@media (prefers-color-scheme: light) {
  :root[data-aq-look="wabe"]:not([data-theme="dark"]) {
    --aq-ink: #f3f4f5;
    --aq-deck: #ffffff;
    --aq-rail: #e6e8eb;
    --aq-rail-2: #d8dbdf;
    --aq-rail-up: #eceef0;
    --aq-rail-up-2: #dfe2e5;
    --aq-cell: #e2e5e9;
    --aq-cell-up: #e2e5e9;
    --aq-line: #d5d8dc;
    --aq-signal: #00414b;
    --aq-on-signal: #ffffff;
    --aq-focus: #12908d;
    --aq-text: #101214;
    --aq-muted: #5b6268;
    --aq-faint: #a0a6ad;
    --aq-red: #c9261d;
    --aq-green: #1b7a33;
    --aq-amber: #9a5b00;
    --aq-on-green: #ffffff;
    --aq-on-amber: #ffffff;
    --aq-thumb: #ffffff;
    --aq-inverse: #101214;
    --aq-on-inverse: #ffffff;
    --aq-on-inverse-muted: #b4bac1;
    --aq-red-on-inverse: #f4574d;
    --aq-green-on-inverse: #2fb344;
    --aq-desk: #121416;
    --aq-key-cap: #24282c;
    --aq-material: rgba(255, 255, 255, 0.84);
    --aq-hairline: rgba(0, 0, 0, 0.08);
    --aq-edge: rgba(0, 0, 0, 0.06);
    --aq-scrim: rgba(10, 12, 14, 0.32);
    --aq-shadow: 0 24px 64px rgba(16, 18, 20, 0.16), 0 2px 10px rgba(16, 18, 20, 0.08);
    color-scheme: light;
  }
}

.aq {
  /* motion: a critically damped settle - no overshoot unless a gesture carried momentum */
  --aq-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --aq-t-press: 90ms;
  --aq-t: 240ms;
  --aq-t-sheet: 380ms;
}

*, *::before, *::after { box-sizing: border-box; }

body.aq {
  margin: 0;
  background: var(--aq-ink);
  color: var(--aq-text);
  font: 400 var(--aq-fs)/1.47 var(--aq-font);
  letter-spacing: -0.006em;
  font-optical-sizing: auto;
  /* No contextual alternates: Inter would turn "0x40" into "0×40" and "->" into an arrow - addresses, versions
     and hex values must read exactly as they are. */
  font-feature-settings: "calt" 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}

/* Type: the larger, the tighter the tracking and the leading. */
.aq h1, .aq h2, .aq h3 { font-family: var(--aq-font-legend); margin: 0; text-wrap: balance; }
.aq h1 { font-size: var(--aq-fs-2xl); font-weight: 700; line-height: 1.14; letter-spacing: -0.022em; }
.aq h2 { font-size: var(--aq-fs-xl); font-weight: 600; line-height: 1.22; letter-spacing: -0.018em; }
.aq h3 { font-size: var(--aq-fs-lg); font-weight: 600; line-height: 1.3; letter-spacing: -0.012em; }
.aq p { margin: 0; max-width: 68ch; text-wrap: pretty; }
.aq small, .aq-small { font-size: var(--aq-fs-sm); letter-spacing: 0; }
.aq a { color: var(--aq-signal); text-decoration: none; }
.aq a:hover { text-decoration: underline; text-underline-offset: 3px; }
.aq code, .aq kbd, .aq pre { font-family: var(--aq-font-mono); font-size: 0.9em; letter-spacing: 0; }
.aq pre { background: var(--aq-deck); border-radius: var(--aq-r-lg); padding: 14px 16px; overflow: auto; margin: 0; line-height: 1.5; }
.aq :focus { outline: none; }
.aq :focus-visible { outline: 3px solid var(--aq-focus, color-mix(in srgb, var(--aq-signal) 60%, transparent)); outline-offset: 2px; }
.aq ::selection { background: color-mix(in srgb, var(--aq-fill, var(--aq-signal)) 34%, transparent); }
.aq-muted { color: var(--aq-muted); }
.aq-faint { color: var(--aq-faint); }
.aq-num { font-variant-numeric: tabular-nums; }
.aq-hidden { display: none !important; }
.aq-title-large { font: 700 var(--aq-fs-3xl)/1.1 var(--aq-font-legend); letter-spacing: -0.026em; }
.aq-caption { font-size: var(--aq-fs-xs); line-height: 1.35; letter-spacing: 0.005em; color: var(--aq-muted); }
/* The line above a group, as in a settings list. Sentence case, never capitals. */
.aq .aq-group-title, .aq-group-title { font: 500 var(--aq-fs-sm)/1.4 var(--aq-font); color: var(--aq-muted); letter-spacing: 0; margin: 0 0 8px 16px; }
.aq .aq-group-foot, .aq-group-foot { font-size: var(--aq-fs-sm); color: var(--aq-muted); letter-spacing: 0; margin: 8px 16px 0; max-width: 68ch; }

/* ---------- layout ---------- */
.aq-app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.aq-nav {
  position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; z-index: 20;
  display: flex; flex-direction: column; gap: 2px; padding: 16px 10px;
  background: var(--aq-material);
  -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  box-shadow: 1px 0 0 var(--aq-hairline);
}
.aq-brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 18px; font: 600 var(--aq-fs-lg)/1.2 var(--aq-font-legend); letter-spacing: -0.014em; }
.aq-brand small { display: block; font: 400 var(--aq-fs-xs)/1.35 var(--aq-font); letter-spacing: 0; color: var(--aq-muted); }
.aq-nav a {
  display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 6px 10px; border-radius: 8px;
  color: var(--aq-text); text-decoration: none; font-weight: 500; font-size: var(--aq-fs-sm); letter-spacing: 0;
  transition: background-color var(--aq-t-press) linear;
}
.aq-nav a:hover { background: color-mix(in srgb, var(--aq-text) 6%, transparent); text-decoration: none; }
.aq-nav a:active { background: color-mix(in srgb, var(--aq-text) 12%, transparent); }
.aq-nav a svg { color: var(--aq-muted); flex: none; }
.aq-nav a[aria-current="page"] { background: color-mix(in srgb, var(--aq-text) 10%, transparent); }
.aq-nav a[aria-current="page"] svg { color: var(--aq-signal); }
.aq-nav hr { border: 0; height: 1px; background: var(--aq-hairline); margin: 8px 10px; }
.aq-nav .aq-nav-end { margin-top: auto; }
.aq-main { padding: 28px 32px 72px; min-width: 0; }
.aq-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--aq-gap); margin-bottom: 22px; }
.aq-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--aq-gap); }
.aq-stack { display: flex; flex-direction: column; gap: var(--aq-gap); }
.aq-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.aq-spacer { flex: 1; }

/* A bar that floats over scrolling content: material instead of a border. */
.aq-toolbar {
  position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: var(--aq-gap); min-height: 52px; padding: 8px 32px;
  background: var(--aq-material);
  -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  box-shadow: 0 1px 0 var(--aq-hairline);
}

@media (max-width: 860px) {
  .aq-app { grid-template-columns: 1fr; }
  .aq-nav { position: sticky; height: auto; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; padding: 8px 10px; box-shadow: 0 1px 0 var(--aq-hairline); scrollbar-width: none; }
  .aq-nav::-webkit-scrollbar { display: none; }
  .aq-brand { padding: 4px 10px 4px 4px; }
  .aq-brand small { display: none; }
  .aq-nav a { white-space: nowrap; }
  .aq-nav hr { display: none; }
  .aq-nav .aq-nav-end { margin-top: 0; margin-left: auto; }
  .aq-main { padding: 20px 16px 56px; }
  .aq-toolbar { padding: 8px 16px; }
}

/* ---------- surfaces ---------- */
.aq-panel { background: var(--aq-deck); border-radius: var(--aq-r-lg); padding: 18px 20px; box-shadow: 0 0 0 1px var(--aq-hairline); }
.aq-panel > h3 { margin-bottom: 12px; }
.aq-stat { font: 600 var(--aq-fs-2xl)/1.1 var(--aq-font-legend); letter-spacing: -0.022em; font-variant-numeric: tabular-nums; }
.aq-stat + .aq-muted { margin-top: 2px; font-size: var(--aq-fs-sm); }

/* A grouped list: rows on one surface, separated by a hairline that starts at the text. */
.aq-list { background: var(--aq-deck); border-radius: var(--aq-r-lg); box-shadow: 0 0 0 1px var(--aq-hairline); overflow: hidden; }
.aq-item { position: relative; display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 8px 16px; }
.aq-item + .aq-item::before { content: ""; position: absolute; left: 16px; right: 0; top: 0; height: 1px; background: var(--aq-hairline); }
.aq-item > .aq-item-label { flex: 1; min-width: 0; }
.aq-item > .aq-item-label small { display: block; color: var(--aq-muted); line-height: 1.35; }
.aq-item > .aq-item-value { color: var(--aq-muted); text-align: right; font-variant-numeric: tabular-nums; }
a.aq-item, button.aq-item { width: 100%; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-align: left; cursor: pointer; text-decoration: none; }
label.aq-item { cursor: pointer; }
a.aq-item:hover { text-decoration: none; }
a.aq-item:active, button.aq-item:active { background: var(--aq-rail); }

/* ---------- buttons ---------- */
.aq-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 36px; padding: 6px 15px; border-radius: var(--aq-r); border: 0;
  background: var(--aq-rail); color: var(--aq-text);
  font: 500 var(--aq-fs)/1.2 var(--aq-font); letter-spacing: -0.006em;
  cursor: pointer; text-decoration: none; user-select: none; -webkit-user-select: none; touch-action: manipulation;
  transition: transform var(--aq-t) var(--aq-ease), background-color var(--aq-t) var(--aq-ease), opacity var(--aq-t) linear;
}
.aq-btn:hover { background: var(--aq-rail-2); text-decoration: none; }
/* Pressed: at once, without a transition - the way back is the spring. */
.aq-btn:active { transform: scale(0.97); background: var(--aq-rail-2); transition-duration: var(--aq-t-press); }
.aq-btn[disabled], .aq-btn[aria-disabled="true"] { opacity: 0.4; cursor: default; pointer-events: none; }
.aq-btn.primary { background: var(--aq-fill, var(--aq-signal)); color: var(--aq-on-fill, var(--aq-on-signal)); font-weight: 600; }
.aq-btn.primary:hover { background: color-mix(in srgb, var(--aq-fill, var(--aq-signal)) 90%, var(--aq-text)); }
/* Red text on a control fill: mixed a little towards the text colour so it stays readable in both themes. */
.aq-btn.danger { color: color-mix(in srgb, var(--aq-red) 80%, var(--aq-text)); }
.aq-btn.danger.solid { background: var(--aq-onair-fill); color: var(--aq-on-red); font-weight: 600; }
.aq-btn.quiet { background: transparent; color: var(--aq-signal); }
.aq-btn.quiet:hover, .aq-btn.quiet:active { background: color-mix(in srgb, var(--aq-signal) 12%, transparent); }
.aq-btn.quiet.danger { color: var(--aq-red); }
.aq-btn.quiet.danger:hover, .aq-btn.quiet.danger:active { background: color-mix(in srgb, var(--aq-red) 12%, transparent); }
.aq-btn.touch { min-height: var(--aq-touch); min-width: var(--aq-touch); }
.aq-btn.small { min-height: 28px; padding: 3px 11px; border-radius: 8px; font-size: var(--aq-fs-sm); letter-spacing: 0; }
.aq-btn.large { min-height: 50px; padding: 12px 22px; border-radius: var(--aq-r-lg); font-size: var(--aq-fs-lg); font-weight: 600; letter-spacing: -0.012em; }
.aq-btn svg { flex: none; }

/* One of several: the choice sits on a raised thumb. */
.aq-seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: 9px; background: var(--aq-rail); }
.aq-seg > button {
  min-height: 30px; padding: 4px 14px; border: 0; border-radius: 7px; background: transparent; color: var(--aq-text);
  font: 500 var(--aq-fs-sm)/1.2 var(--aq-font); letter-spacing: 0; cursor: pointer; white-space: nowrap; touch-action: manipulation;
  transition: background-color var(--aq-t) var(--aq-ease), transform var(--aq-t) var(--aq-ease);
}
.aq-seg > button:active { transform: scale(0.97); transition-duration: var(--aq-t-press); }
.aq-seg > button[aria-pressed="true"], .aq-seg > button[aria-selected="true"] { background: var(--aq-thumb); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18), 0 0 0 0.5px rgba(0, 0, 0, 0.06); font-weight: 600; }
.aq-seg.touch > button { min-height: 40px; padding: 6px 18px; font-size: var(--aq-fs); }

/* ---------- forms ---------- */
.aq-field { display: flex; flex-direction: column; gap: 6px; }
.aq-field > span { font-size: var(--aq-fs-sm); font-weight: 500; letter-spacing: 0; color: var(--aq-muted); }
.aq-field > small { color: var(--aq-muted); font-size: var(--aq-fs-xs); line-height: 1.4; letter-spacing: 0.005em; }
.aq-input, .aq-select, .aq-textarea {
  min-height: 36px; padding: 6px 12px; border-radius: var(--aq-r); border: 0;
  background: var(--aq-rail); color: var(--aq-text); font: inherit; letter-spacing: inherit; width: 100%;
  transition: box-shadow var(--aq-t) var(--aq-ease), background-color var(--aq-t) var(--aq-ease);
}
.aq-input::placeholder, .aq-textarea::placeholder { color: var(--aq-faint); }
.aq-select { appearance: none; -webkit-appearance: none; padding-right: 32px; background-image: linear-gradient(45deg, transparent 50%, var(--aq-muted) 50%), linear-gradient(135deg, var(--aq-muted) 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.aq-textarea { min-height: 120px; resize: vertical; line-height: 1.45; padding: 10px 12px; }
.aq-input:focus-visible, .aq-select:focus-visible, .aq-textarea:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--aq-focus, var(--aq-signal)) 45%, transparent); }
.aq-input[aria-invalid="true"] { box-shadow: 0 0 0 2px var(--aq-red); }
.aq-check { display: inline-flex; align-items: center; gap: 9px; min-height: 32px; cursor: pointer; }
.aq-check input { width: 18px; height: 18px; accent-color: var(--aq-fill, var(--aq-signal)); }

/* On is green: the state reads without the label. */
.aq-switch { appearance: none; -webkit-appearance: none; width: 46px; height: 28px; margin: 0; border-radius: 14px; background: var(--aq-rail-2); position: relative; cursor: pointer; flex: none; transition: background-color var(--aq-t) var(--aq-ease); touch-action: manipulation; }
.aq-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 12px; background: var(--aq-knob); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.22), 0 0 0 0.5px rgba(0, 0, 0, 0.05); transition: transform var(--aq-t) var(--aq-ease), width var(--aq-t) var(--aq-ease); }
.aq-switch:active::after { width: 29px; }
.aq-switch:checked { background: var(--aq-green-fill); }
.aq-switch:checked::after { transform: translateX(18px); }
.aq-switch:checked:active::after { transform: translateX(13px); }

/* A slider: thin track, the travelled part filled (set --aq-p from 0 to 1; aquillus.js keeps it up to date). */
.aq-range { appearance: none; -webkit-appearance: none; width: 100%; height: 28px; margin: 0; background: transparent; cursor: pointer; touch-action: none; --aq-p: 0.5; }
.aq-range::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--aq-fill, var(--aq-signal)) calc(var(--aq-p) * 100%), var(--aq-rail-2) calc(var(--aq-p) * 100%)); }
.aq-range::-moz-range-track { height: 4px; border-radius: 2px; background: var(--aq-rail-2); }
.aq-range::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--aq-fill, var(--aq-signal)); }
.aq-range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -10px; border-radius: 12px; border: 0; background: var(--aq-knob); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.24), 0 0 0 0.5px rgba(0, 0, 0, 0.08); transition: transform var(--aq-t) var(--aq-ease); }
.aq-range::-moz-range-thumb { width: 24px; height: 24px; border-radius: 12px; border: 0; background: var(--aq-knob); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.24), 0 0 0 0.5px rgba(0, 0, 0, 0.08); }
.aq-range:active::-webkit-slider-thumb { transform: scale(1.12); }
.aq-form { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.aq-form .wide { grid-column: 1 / -1; }

/* ---------- tables ---------- */
.aq-table-wrap { overflow-x: auto; border-radius: var(--aq-r-lg); background: var(--aq-deck); box-shadow: 0 0 0 1px var(--aq-hairline); }
.aq-table { width: 100%; border-collapse: collapse; font-size: var(--aq-fs-sm); letter-spacing: 0; }
.aq-table th { text-align: left; font-weight: 500; font-size: var(--aq-fs-xs); color: var(--aq-muted); padding: 10px 16px; border-bottom: 1px solid var(--aq-hairline); white-space: nowrap; }
.aq-table td { padding: 11px 16px; border-bottom: 1px solid var(--aq-hairline); vertical-align: middle; }
.aq-table tr:last-child td { border-bottom: 0; }
.aq-table tbody tr[data-href] { cursor: pointer; }
.aq-table tbody tr[data-href]:hover { background: color-mix(in srgb, var(--aq-text) 4%, transparent); }
.aq-table tbody tr[data-href]:active { background: color-mix(in srgb, var(--aq-text) 8%, transparent); }
.aq-empty { padding: 44px 20px; text-align: center; color: var(--aq-muted); }
.aq-empty strong { display: block; color: var(--aq-text); font: 600 var(--aq-fs-lg)/1.3 var(--aq-font-legend); letter-spacing: -0.012em; margin-bottom: 4px; }

/* ---------- status ---------- */
.aq-badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 6px; font-size: var(--aq-fs-xs); font-weight: 500; letter-spacing: 0.005em; background: var(--aq-rail); color: color-mix(in srgb, var(--aq-muted) 70%, var(--aq-text)); white-space: nowrap; }
.aq-badge.ok { color: color-mix(in srgb, var(--aq-green) 78%, var(--aq-text)); background: color-mix(in srgb, var(--aq-green) 16%, transparent); }
.aq-badge.warn { color: color-mix(in srgb, var(--aq-amber) 78%, var(--aq-text)); background: color-mix(in srgb, var(--aq-amber) 16%, transparent); }
.aq-badge.bad { color: color-mix(in srgb, var(--aq-red) 78%, var(--aq-text)); background: color-mix(in srgb, var(--aq-red) 16%, transparent); }
.aq-badge.accent { color: color-mix(in srgb, var(--aq-signal) 78%, var(--aq-text)); background: color-mix(in srgb, var(--aq-signal) 16%, transparent); }
/* The two states that must be read across a room are solid. */
.aq-badge.onair { color: var(--aq-on-red); background: var(--aq-onair-fill); font-weight: 600; }
.aq-badge.preview { color: var(--aq-on-green); background: var(--aq-green); font-weight: 600; }
.aq-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--aq-faint); flex: none; }
.aq-dot.ok { background: var(--aq-green-fill); }
.aq-dot.bad { background: var(--aq-red-fill); }
.aq-dot.warn { background: var(--aq-amber-fill); }
.aq-note { background: var(--aq-rail); padding: 12px 16px; border-radius: var(--aq-r-lg); font-size: var(--aq-fs-sm); letter-spacing: 0; line-height: 1.45; }
.aq-note.warn { background: color-mix(in srgb, var(--aq-amber) 14%, var(--aq-deck)); }
.aq-note.bad { background: color-mix(in srgb, var(--aq-red) 14%, var(--aq-deck)); }
.aq-meter { height: 6px; border-radius: 3px; background: var(--aq-rail-2); overflow: hidden; }
.aq-meter > i { display: block; height: 100%; border-radius: 3px; background: var(--aq-fill, var(--aq-signal)); width: var(--v, 0%); transition: width var(--aq-t) var(--aq-ease); }

/* ---------- tabs, sheet, toast ---------- */
.aq-tabs { display: inline-flex; gap: 2px; padding: 2px; border-radius: 9px; background: var(--aq-rail); margin-bottom: 20px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.aq-tabs::-webkit-scrollbar { display: none; }
.aq-tabs button { min-height: 30px; padding: 4px 14px; border: 0; border-radius: 7px; background: transparent; color: var(--aq-text); font: 500 var(--aq-fs-sm)/1.2 var(--aq-font); letter-spacing: 0; cursor: pointer; white-space: nowrap; transition: background-color var(--aq-t) var(--aq-ease); }
.aq-tabs button[aria-selected="true"] { background: var(--aq-thumb); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18), 0 0 0 0.5px rgba(0, 0, 0, 0.06); font-weight: 600; }

/* A sheet arrives as a material: it grows a little and sharpens, and leaves the same way. */
dialog.aq-dialog {
  border: 0; border-radius: var(--aq-r-xl); padding: 0; width: min(560px, calc(100vw - 28px)); max-height: calc(100dvh - 40px);
  background: var(--aq-deck); color: var(--aq-text); box-shadow: var(--aq-shadow), 0 0 0 1px var(--aq-hairline);
  opacity: 0; transform: scale(0.96) translateY(8px);
  transition: opacity var(--aq-t) linear, transform var(--aq-t-sheet) var(--aq-ease), overlay var(--aq-t-sheet) allow-discrete, display var(--aq-t-sheet) allow-discrete;
}
dialog.aq-dialog[open] { opacity: 1; transform: none; }
@starting-style { dialog.aq-dialog[open] { opacity: 0; transform: scale(0.96) translateY(8px); } }
dialog.aq-dialog::backdrop { background: var(--aq-scrim); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity var(--aq-t) linear, overlay var(--aq-t-sheet) allow-discrete, display var(--aq-t-sheet) allow-discrete; }
dialog.aq-dialog[open]::backdrop { opacity: 1; }
@starting-style { dialog.aq-dialog[open]::backdrop { opacity: 0; } }
.aq-dialog > header { padding: 22px 24px 0; }
.aq-dialog > .body { padding: 12px 24px 8px; display: flex; flex-direction: column; gap: 14px; max-height: 68vh; overflow-y: auto; }
.aq-dialog > footer { padding: 14px 24px 22px; display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.aq-toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 50; pointer-events: none; }
.aq-toast {
  display: flex; align-items: center; gap: 10px; max-width: min(440px, calc(100vw - 32px)); padding: 11px 18px; border-radius: 999px; pointer-events: auto;
  background: var(--aq-material); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  box-shadow: var(--aq-shadow), 0 0 0 1px var(--aq-hairline); font-size: var(--aq-fs-sm); font-weight: 500; letter-spacing: 0;
  animation: aq-toast-in var(--aq-t-sheet) var(--aq-ease) both;
}
.aq-toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--aq-green-fill); flex: none; }
.aq-toast.bad::before { background: var(--aq-red-fill); }
.aq-toast.leaving { opacity: 0; transform: translateY(8px) scale(0.98); transition: opacity var(--aq-t) linear, transform var(--aq-t) var(--aq-ease); }
@keyframes aq-toast-in { from { opacity: 0; transform: translateY(14px) scale(0.96); } }

/* ---------- the key field: the desk's 4 x 10 illuminated keys ----------
 * A key is its lamp: lit, the whole cap takes the colour of its light; dark, it is a neutral cap.
 * Set --led to the colour and --glow to the brightness (0..1). aquillus.js -> ledStyle() does both and
 * picks a legend colour that stays readable on the light (--ink).
 * Keys are a picture of the hardware: the caps are dark in the light theme as well. Put the key field, the
 * faders and the joystick on .aq-desk so they sit on the desk and not on the page. */
.aq-desk {
  background: var(--aq-desk); color: var(--aq-key-ink); border-radius: var(--aq-r-xl); padding: 16px; color-scheme: dark;
  --aq-deck: #1c1c1e; --aq-rail: #2c2c2e; --aq-rail-2: #3a3a3c; --aq-line: #38383a; --aq-hairline: rgba(255, 255, 255, 0.08);
  --aq-text: #f5f5f7; --aq-muted: #98989f; --aq-faint: #636366; --aq-signal: #40c8e0; --aq-on-signal: #00252d;
  --aq-red: #ff453a; --aq-green: #30d158; --aq-amber: #ff9f0a; --aq-red-fill: #ff453a; --aq-green-fill: #30d158; --aq-amber-fill: #ff9f0a;
  --aq-onair-fill: #e0271b; --aq-knob: #ffffff; --aq-thumb: #636366;
}
.aq-keys { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 8px; }
.aq-key {
  --led: transparent;
  --glow: 0;
  --ink: var(--aq-key-ink);
  position: relative; aspect-ratio: 1.15; min-height: 44px; padding: 6px 4px; border: 0; border-radius: 12px;
  background: color-mix(in srgb, var(--led) calc(var(--glow) * 100%), var(--aq-key-cap));
  color: var(--ink); font: 600 var(--aq-fs-sm)/1.12 var(--aq-font); letter-spacing: -0.004em;
  display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; overflow-wrap: break-word; hyphens: auto;
  cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: none;
  transition: transform var(--aq-t) var(--aq-ease), background-color 120ms linear, color 120ms linear;
}
.aq-key[data-pressed="true"], .aq-key:active { transform: scale(0.95); filter: brightness(1.18); transition-duration: var(--aq-t-press); }
.aq-key[data-selected="true"] { box-shadow: 0 0 0 2px var(--aq-desk), 0 0 0 4px var(--aq-signal); }
.aq-key small { position: absolute; top: 5px; left: 7px; font: 500 10px/1 var(--aq-font); letter-spacing: 0.01em; color: color-mix(in srgb, var(--ink) 55%, transparent); }
/* Blinking the way the desk does it: on, dark, on. paintKey() in aquillus.js animates the real on/off ratio and
   keeps all keys in step; this rule is the plain fallback (even split) for a key marked by hand. Set --on and --off (ms). */
.aq-key[data-blink="true"] { animation: aq-key-blink calc((var(--on, 400) + var(--off, 400)) * 1ms) steps(1, end) infinite; }
@keyframes aq-key-blink { 0% { background: color-mix(in srgb, var(--led) calc(var(--glow) * 100%), var(--aq-key-cap)); color: var(--ink); } 50% { background: var(--aq-key-cap); color: var(--aq-key-ink); } }
.aq-swatch { width: 28px; height: 28px; border-radius: 50%; border: 0; box-shadow: inset 0 0 0 1px var(--aq-hairline); cursor: pointer; padding: 0; transition: transform var(--aq-t) var(--aq-ease); }
.aq-swatch:active { transform: scale(0.9); transition-duration: var(--aq-t-press); }
.aq-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--aq-deck), 0 0 0 4px var(--aq-text); }

/* A fader of the desk: tall, with the knob on a slot. Value through --aq-p (0 at the bottom, 1 at the top). */
.aq-fader { position: relative; width: 44px; height: 168px; touch-action: none; cursor: grab; --aq-p: 0.5; --aq-fader-knob: 20px; }
.aq-fader::before { content: ""; position: absolute; left: 50%; top: 10px; bottom: 10px; width: 4px; margin-left: -2px; border-radius: 2px; background: linear-gradient(to top, var(--aq-fill, var(--aq-signal)) calc(var(--aq-p) * 100%), var(--aq-rail-2) calc(var(--aq-p) * 100%)); }
.aq-fader > i { position: absolute; left: 4px; right: 4px; height: var(--aq-fader-knob); border-radius: 6px; bottom: calc(var(--aq-p) * (100% - var(--aq-fader-knob))); background: var(--aq-knob); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 0 0 0.5px rgba(0, 0, 0, 0.1); }
.aq-fader > i::after { content: ""; position: absolute; left: 8px; right: 8px; top: 9px; height: 2px; border-radius: 1px; background: rgba(0, 0, 0, 0.28); }
.aq-fader:active { cursor: grabbing; }

/* ---------- status mark: a small hexagon ----------
 * <i class="aq-hex ok"></i>. Tones as for .aq-dot: ok, warn, bad; without a tone it is neutral. */
.aq-hex { display: inline-block; width: 9px; height: 10px; flex: none; background: var(--aq-faint); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.aq-hex.ok { background: var(--aq-green-fill); }
.aq-hex.bad { background: var(--aq-red-fill); }
.aq-hex.warn { background: var(--aq-amber-fill); }
.aq-hex.large { width: 13px; height: 15px; }

/* ---------- the honeycomb: cameras to choose from ----------
 * Built by honeycomb.js. Pointy-top hexagons with slightly rounded corners in straight rows, every second row
 * shifted by half a cell. Everything follows the cell width (--aq-cell-w, set by the script from the room
 * there is): reference 74 x 86 px on a pitch of 78 px, rows 66 px apart, number 22 px.
 * A cell is a button. Its state never uses a brand colour:
 *   aria-pressed="true"      the selected camera: the cell inverted (data-selected="true" on a cell that is no button)
 *   data-tally="program"     red ring and the tag "PGM";  data-tally="preview": green ring and "PVW"
 *   data-off="true"          switched off: dashed outline, faint text
 * The foot of a cell holds what is said about it in passing: who drives it (.aq-cell-by, e.g. "C1"), a red
 * dot while it records (.aq-cell-rec), an amber mark when it needs attention (.aq-cell-warn).
 * With more cells than fit on one page the field pages sideways and shows .aq-comb-pager; otherwise there
 * is no pager and nothing else around the cells. */
.aq-comb {
  --aq-cell-w: 74px;
  --aq-cell-h: calc(var(--aq-cell-w) * 86 / 74);
  --aq-cell-dx: calc(var(--aq-cell-w) * 78 / 74);
  --aq-cell-dy: calc(var(--aq-cell-w) * 66 / 74);
  --aq-comb-gap: 24px;      /* between two pages */
  display: flex; flex-direction: column; gap: 10px; min-width: 0;
}
.aq-comb [hidden] { display: none; }
/* a little room all round: the focus ring lies outside the cell */
.aq-comb-view { margin: -6px; padding: 6px; overflow: hidden; }
.aq-comb[data-paged="true"] .aq-comb-view { touch-action: pan-y; }
.aq-comb-track { display: flex; gap: var(--aq-comb-gap); }
.aq-comb-page { position: relative; flex: none; width: 100%; height: calc((var(--aq-comb-rows, 1) - 1) * var(--aq-cell-dy) + var(--aq-cell-h)); }
/* a page that is neither shown nor next to the one shown keeps its place and is not rendered (honeycomb.js) */
.aq-comb-page[data-far="true"] { content-visibility: hidden; }
.aq-cell {
  position: absolute; left: calc((var(--c, 0) + var(--o, 0)) * var(--aq-cell-dx)); top: calc(var(--r, 0) * var(--aq-cell-dy));
  width: var(--aq-cell-w); height: var(--aq-cell-h); margin: 0; padding: 0; border: 0; background: none;
  color: var(--aq-text); font: inherit; letter-spacing: 0; cursor: pointer;
  /* The box of a cell overlaps its neighbours' corners: only the hexagon itself takes the pointer. */
  pointer-events: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; touch-action: manipulation;
  transition: transform var(--aq-t) var(--aq-ease);
}
/* A cell on its own, as the picture of one camera (cellMark() in honeycomb.js): not a button, no position in a field. */
/* The width is a default any class may replace: <span class="aq-cell alone my-mark"> with .my-mark { --aq-cell-w: 36px }. */
:where(.aq-cell.alone) { --aq-cell-w: 74px; }
.aq-cell.alone {
  --aq-cell-h: calc(var(--aq-cell-w) * 86 / 74);
  position: relative; left: auto; top: auto; display: block; flex: none; cursor: default;
}
.aq-cell.alone .hex { pointer-events: none; }
.aq-cell.alone[hidden] { display: none; }
.aq-cell-shape { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.aq-cell-shape .hex {
  fill: var(--aq-cell, var(--aq-rail)); stroke: var(--aq-cell, var(--aq-rail)); stroke-width: 8; stroke-linejoin: round; pointer-events: all;
  transition: fill 120ms linear, stroke 120ms linear;
}
.aq-cell-shape .ring, .aq-cell-shape .focus { fill: none; stroke: transparent; stroke-linejoin: round; pointer-events: none; }
.aq-cell-shape .ring { stroke-width: 3; }
.aq-cell-shape .focus { stroke-width: 2.5; }
@media (hover: hover) {
  .aq-cell:not([aria-disabled="true"]):not([aria-pressed="true"]):hover .hex { fill: var(--aq-rail-2); stroke: var(--aq-rail-2); }
}
/* Pressed: at once, without a transition - the way back is the settle. */
.aq-cell:not([aria-disabled="true"]):active { transform: scale(0.95); transition-duration: var(--aq-t-press); }
.aq-comb[data-swiping="true"] .aq-cell:active { transform: none; }
.aq-cell[aria-disabled="true"] { cursor: default; }
.aq-cell:focus-visible { outline: none; z-index: 1; }
.aq-cell:focus-visible .focus { stroke: var(--aq-focus, var(--aq-signal)); }

.aq-cell > span { position: absolute; left: 50%; transform: translate(-50%, -50%); line-height: 1; white-space: nowrap; pointer-events: none; }
.aq-cell.alone > .aq-cell-no { top: 50%; }
.aq-cell-no { top: 42.5%; font: 600 calc(var(--aq-cell-w) * 22 / 74)/1 var(--aq-font-legend); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.aq-cell > .aq-cell-name {
  top: 64.5%; max-width: 78%; overflow: hidden; text-overflow: ellipsis; line-height: 1.3;
  font-size: clamp(10px, calc(var(--aq-cell-w) * 0.142), 12px); font-weight: 500; color: var(--aq-cell-soft, var(--aq-muted));
}
.aq-cell-tag, .aq-cell-by { font-size: max(9px, calc(var(--aq-cell-w) * 9 / 74)); font-weight: 600; letter-spacing: 0.04em; }
.aq-cell-tag { top: 24%; }
.aq-cell > .aq-cell-foot { top: 83%; display: flex; align-items: center; gap: 4px; }
.aq-cell-by { color: var(--aq-signal); }
.aq-cell-rec { width: calc(var(--aq-cell-w) * 6.5 / 74); aspect-ratio: 1; border-radius: 50%; background: var(--aq-pgm, var(--aq-red-fill)); }
.aq-cell-warn { width: calc(var(--aq-cell-w) * 7 / 74); aspect-ratio: 9 / 10; background: var(--aq-amber-fill); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
/* with a tally tag above, number and name move down a little; the foot moves up, into the ring */
.aq-cell:not(.alone)[data-tally] .aq-cell-no { top: 45%; }
.aq-cell[data-tally] > .aq-cell-name { top: 65.5%; }
.aq-cell[data-tally] > .aq-cell-foot { top: 79.5%; }
.aq-cell[data-tally="program"] .ring { stroke: var(--aq-pgm, var(--aq-red-fill)); }
.aq-cell[data-tally="preview"] .ring { stroke: var(--aq-pvw, var(--aq-green-fill)); }
.aq-cell[data-tally="program"] .aq-cell-tag { color: var(--aq-red); }
.aq-cell[data-tally="preview"] .aq-cell-tag { color: var(--aq-green); }
.aq-cell[data-off="true"] { color: var(--aq-faint); --aq-cell-soft: var(--aq-faint); }
.aq-cell[data-off="true"] .hex { fill: transparent; stroke: transparent; }
.aq-cell[data-off="true"]:not([data-tally]) .ring { stroke: var(--aq-rail-2); stroke-width: 1.5; stroke-dasharray: 4 4; }
.aq-cell:is([aria-pressed="true"], [data-selected="true"]) { color: var(--aq-on-inverse, var(--aq-ink)); --aq-cell-soft: var(--aq-on-inverse-muted, var(--aq-faint)); }
.aq-cell:is([aria-pressed="true"], [data-selected="true"]) .hex { fill: var(--aq-inverse, var(--aq-text)); stroke: var(--aq-inverse, var(--aq-text)); }
.aq-cell[aria-pressed="true"] .aq-cell-by { color: inherit; }
.aq-cell[aria-pressed="true"][data-tally="program"] .aq-cell-tag { color: var(--aq-red-on-inverse, var(--aq-red)); }
.aq-cell[aria-pressed="true"][data-tally="preview"] .aq-cell-tag { color: var(--aq-green-on-inverse, var(--aq-green)); }

.aq-comb-pager { display: flex; align-items: center; gap: 12px; min-height: 36px; color: var(--aq-muted); font-size: var(--aq-fs-sm); letter-spacing: 0; }
.aq-comb-range { font-variant-numeric: tabular-nums; }
/* One dot per page; the long mark (b) lies on the page shown. It slides there and the dots after it make room -
   by transform only, so the row keeps its width (the padding is the room the mark needs beyond a dot). */
.aq-comb-dots { position: relative; display: flex; align-items: center; gap: 5px; margin-left: auto; padding-right: 10px; }
.aq-comb-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--aq-faint); transition: transform var(--aq-t) var(--aq-ease), opacity 120ms linear; }
.aq-comb-dots i[data-on="true"] { opacity: 0; }
.aq-comb-dots i[data-on="true"] ~ i { transform: translateX(10px); }
.aq-comb-dots b { position: absolute; left: 0; top: calc(50% - 3px); width: 16px; height: 6px; border-radius: 3px; background: var(--aq-text); transform: translateX(calc(var(--aq-comb-at, 0) * 11px)); transition: transform var(--aq-t) var(--aq-ease); }
.aq-comb-steps { display: flex; gap: 6px; }
.aq-comb-dots[hidden] + .aq-comb-steps { margin-left: auto; }
.aq-comb-step {
  display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: var(--aq-r); background: var(--aq-rail); color: var(--aq-text);
  cursor: pointer; touch-action: manipulation; transition: transform var(--aq-t) var(--aq-ease), background-color var(--aq-t) var(--aq-ease), opacity var(--aq-t) linear;
}
.aq-comb-step:hover { background: var(--aq-rail-2); }
.aq-comb-step:active { transform: scale(0.94); background: var(--aq-rail-2); transition-duration: var(--aq-t-press); }
.aq-comb-step:disabled { opacity: 0.35; cursor: default; pointer-events: none; }
.aq-comb-step svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (pointer: coarse) { .aq-comb-step { width: var(--aq-touch); height: var(--aq-touch); } }

/* ---------- a game controller as a drawing ----------
 * Built by gamepad.js from gamepads.json. Every control is a part that can be chosen:
 *   aria-pressed="true"   the chosen part: inverted, like the selected camera
 *   data-down="true"      held down on the real controller right now: filled with the accent */
.aq-pad { display: block; width: 100%; height: auto; overflow: visible; user-select: none; -webkit-user-select: none; }
.aq-pad .shell { fill: var(--aq-rail); }
.aq-pad .back { fill: var(--aq-rail-2); }
.aq-pad .btn { fill: color-mix(in srgb, var(--aq-rail-2) 88%, var(--aq-text)); }
.aq-pad .well { fill: color-mix(in srgb, var(--aq-rail) 55%, var(--aq-ink)); }
.aq-pad .gl { fill: none; stroke: var(--aq-muted); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.aq-pad .lb { font: 600 11px var(--aq-font); letter-spacing: 0; fill: var(--aq-muted); text-anchor: middle; pointer-events: none; }
.aq-pad-part { cursor: pointer; outline: none; }
.aq-pad-part > .shape { transition: fill 120ms linear; }
.aq-pad-part[aria-pressed="true"] > .shape { fill: var(--aq-inverse, var(--aq-text)); }
.aq-pad-part[aria-pressed="true"] > .gl { stroke: var(--aq-on-inverse, var(--aq-ink)); }
.aq-pad-part[aria-pressed="true"] > .lb { fill: var(--aq-on-inverse, var(--aq-ink)); }
.aq-pad-part[data-down="true"] > .shape { fill: var(--aq-fill, var(--aq-signal)); }
.aq-pad-part[data-down="true"] > .gl { stroke: var(--aq-on-fill, var(--aq-on-signal)); }
.aq-pad-part[data-down="true"] > .lb { fill: var(--aq-on-fill, var(--aq-on-signal)); }
.aq-pad-part:focus-visible > .shape { stroke: var(--aq-focus, var(--aq-signal)); stroke-width: 3; paint-order: stroke; }
/* how far an analogue trigger is pulled: the accent over the part, as strong as the pull (gamepad.js depth()) */
.aq-pad-part > .level { fill: var(--aq-fill, var(--aq-signal)); opacity: 0; pointer-events: none; }
.aq-pad-part[data-down="true"] > .level { opacity: 0 !important; }
/* a part this controller cannot report: in the picture, but not to be chosen */
.aq-pad-part[aria-disabled="true"] { cursor: default; opacity: 0.38; }
.aq-pad[aria-disabled="true"] .aq-pad-part { cursor: default; }

/* ---------- the look "Wabe": components ----------
 * Everything above takes its colours, type and radii from the tokens; here is what changes shape. */
[data-aq-look="wabe"] body.aq { line-height: 1.5; letter-spacing: 0; }
[data-aq-look="wabe"] .aq h1 { font-weight: 600; line-height: 1.16; letter-spacing: -0.024em; }
[data-aq-look="wabe"] .aq h2 { line-height: 1.25; letter-spacing: -0.018em; }
[data-aq-look="wabe"] .aq h3 { letter-spacing: -0.01em; }
[data-aq-look="wabe"] .aq b, [data-aq-look="wabe"] .aq strong { font-weight: 600; }
[data-aq-look="wabe"] .aq small, [data-aq-look="wabe"] .aq-small { letter-spacing: 0.004em; }
[data-aq-look="wabe"] .aq-title-large { font-weight: 600; line-height: 1.12; letter-spacing: -0.028em; }
[data-aq-look="wabe"] .aq-caption { letter-spacing: 0.006em; }
[data-aq-look="wabe"] .aq-stat { letter-spacing: -0.024em; }
[data-aq-look="wabe"] .aq :focus-visible { outline-width: 2.5px; }

/* navigation: Dark Teal in both themes, the current page on a light rounded rectangle */
[data-aq-look="wabe"] .aq-nav { background: var(--aq-nav); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; color: var(--aq-nav-text-on); }
[data-aq-look="wabe"] .aq-nav :focus-visible { outline-color: #ffffff; }
[data-aq-look="wabe"] .aq-brand small { color: var(--aq-nav-text); }
[data-aq-look="wabe"] .aq-nav a { min-height: 38px; border-radius: 12px; color: var(--aq-nav-text); }
[data-aq-look="wabe"] .aq-nav a svg, [data-aq-look="wabe"] .aq-nav a[aria-current="page"] svg { color: inherit; }
[data-aq-look="wabe"] .aq-nav a:hover { background: var(--aq-nav-hover); color: var(--aq-nav-text-on); }
[data-aq-look="wabe"] .aq-nav a:active, [data-aq-look="wabe"] .aq-nav a[aria-current="page"] { background: var(--aq-nav-on); color: var(--aq-nav-text-on); }
[data-aq-look="wabe"] .aq-nav hr { background: rgba(255, 255, 255, 0.12); }
/* the toolbar is the page itself, made translucent: no bar until something scrolls beneath it */
[data-aq-look="wabe"] .aq-toolbar { background: color-mix(in srgb, var(--aq-ink) 80%, transparent); }

/* surfaces: no outline on near-black; a control that stands on a group is one step lighter than on the page */
[data-aq-look="wabe"] :is(.aq-panel, .aq-list, .aq-table-wrap) { box-shadow: 0 0 0 1px var(--aq-edge); }
[data-aq-look="wabe"] :is(.aq-panel, .aq-list, .aq-table-wrap, dialog.aq-dialog) { --aq-rail: var(--aq-rail-up); --aq-rail-2: var(--aq-rail-up-2); --aq-cell: var(--aq-cell-up); }

/* controls */
[data-aq-look="wabe"] .aq-btn { letter-spacing: 0; }
[data-aq-look="wabe"] .aq-btn.small { border-radius: 10px; }
[data-aq-look="wabe"] .aq-btn.large { letter-spacing: -0.008em; }
[data-aq-look="wabe"] .aq-seg, [data-aq-look="wabe"] .aq-tabs { padding: 3px; border-radius: 12px; }
[data-aq-look="wabe"] .aq-seg > button, [data-aq-look="wabe"] .aq-tabs button { border-radius: 9px; }
[data-aq-look="wabe"] .aq-input:focus-visible, [data-aq-look="wabe"] .aq-select:focus-visible, [data-aq-look="wabe"] .aq-textarea:focus-visible { box-shadow: 0 0 0 2px var(--aq-focus); }
/* On is the accent: sea green stands for what is switched on. */
[data-aq-look="wabe"] .aq-switch:checked { background: var(--aq-fill); }
[data-aq-look="wabe"] .aq-range::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; }
[data-aq-look="wabe"] .aq-range::-webkit-slider-thumb { margin-top: -9px; }
[data-aq-look="wabe"] .aq-range::-moz-range-track, [data-aq-look="wabe"] .aq-range::-moz-range-progress { height: 6px; border-radius: 3px; }

/* status: hexagons instead of round dots; the two tally colours are the same in both themes */
[data-aq-look="wabe"] .aq-dot, [data-aq-look="wabe"] .aq-toast::before { width: 9px; height: 10px; border-radius: 0; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
[data-aq-look="wabe"] .aq-badge { border-radius: 7px; letter-spacing: 0.004em; }
[data-aq-look="wabe"] .aq-badge.onair { background: var(--aq-pgm); }
[data-aq-look="wabe"] .aq-badge.preview { background: var(--aq-pvw); color: var(--aq-on-pvw); }

/* ---------- the look "Wabe": motion ----------
 * See the head of this file. Durations are those of a spring that is nearly at rest after a third of the time. */
[data-aq-look="wabe"] .aq {
  --aq-spring: linear(0, 0.0512 4%, 0.1628 8%, 0.2936 12%, 0.4219 16%, 0.5372 20%, 0.6575 25%, 0.7513 30%, 0.8222 35%, 0.8743 40%, 0.912 45%, 0.9389 50%, 0.9711 60%, 0.9866 70%, 0.9939 80%, 0.9972 90%, 1);
  --aq-ease: var(--aq-spring);
  --aq-t: 340ms;
  --aq-t-sheet: 460ms;
}
/* a digit in a slot of its own (setDigits() in aquillus.js): numbers that count keep their width */
.aq-digit { display: inline-block; width: 1ch; text-align: center; }

/* the thumb of a segmented control glides to the choice (placed by aquillus.js; without it the button itself is the thumb) */
[data-aq-look="wabe"] .aq-seg, [data-aq-look="wabe"] .aq-tabs { position: relative; z-index: 0; }
.aq-seg-thumb { position: absolute; left: 0; top: 0; z-index: -1; border-radius: 9px; background: var(--aq-thumb); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18), 0 0 0 0.5px rgba(0, 0, 0, 0.06); pointer-events: none; }
.aq-seg-thumb[hidden] { display: none; }
[data-aq-look="wabe"] [data-thumb] > button[aria-pressed="true"], [data-aq-look="wabe"] [data-thumb] > button[aria-selected="true"] { background: transparent; box-shadow: none; }
/* the choice does not change the weight of its label: the segments keep their widths while the thumb travels */
[data-aq-look="wabe"] .aq-seg > button[aria-pressed="true"], [data-aq-look="wabe"] .aq-seg > button[aria-selected="true"], [data-aq-look="wabe"] .aq-tabs button[aria-selected="true"] { font-weight: 500; }

/* a status mark cross-fades its colour (and gives one pulse, aquillus.js) */
[data-aq-look="wabe"] .aq-dot, [data-aq-look="wabe"] .aq-hex { transition: background-color 200ms linear; }

/* A button that has started something says so in place (during() in aquillus.js): the progress takes the place
   of its icon - or, where it has none, of its label - and the button keeps its size. It is at work, not
   unavailable: it does not fade like a disabled one. */
[data-aq-look="wabe"] .aq-btn[aria-busy="true"] { pointer-events: none; }
[data-aq-look="wabe"] .aq-btn[aria-busy="true"][disabled] { opacity: 1; }
[data-aq-look="wabe"] .aq-btn[aria-busy="true"] > svg { display: none; }
[data-aq-look="wabe"] .aq-btn[aria-busy="true"]::before {
  content: ""; width: 18px; height: 18px; flex: none; border-radius: 50%;
  border: 2px solid color-mix(in srgb, currentColor 28%, transparent); border-top-color: currentColor; animation: aq-busy 0.8s linear infinite;
}
[data-aq-look="wabe"] .aq-btn[aria-busy="true"]:not(:has(> svg)) { position: relative; -webkit-text-fill-color: transparent; }
[data-aq-look="wabe"] .aq-btn[aria-busy="true"]:not(:has(> svg))::before { position: absolute; left: calc(50% - 9px); top: calc(50% - 9px); }
@keyframes aq-busy { to { transform: rotate(360deg); } }

/* a sheet grows from the control that opened it (showSheet() sets the origin) and leaves towards it */
[data-aq-look="wabe"] dialog.aq-dialog { transform: scale(0.9); }
[data-aq-look="wabe"] dialog.aq-dialog[open] { transform: none; }
@starting-style { [data-aq-look="wabe"] dialog.aq-dialog[open] { transform: scale(0.9); } }
/* on a phone it is a sheet from the bottom edge; its top edge is the grip to pull it down by */
@media (max-width: 600px) {
  [data-aq-look="wabe"] dialog.aq-dialog {
    width: 100%; max-width: 100%; max-height: calc(100dvh - 28px); margin: auto 0 0; border-radius: var(--aq-r-xl) var(--aq-r-xl) 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px); opacity: 1; transform: translateY(100%);
    transition: transform var(--aq-t-sheet) var(--aq-ease), overlay var(--aq-t-sheet) allow-discrete, display var(--aq-t-sheet) allow-discrete;
  }
  [data-aq-look="wabe"] dialog.aq-dialog[open] { opacity: 1; transform: none; }
  @starting-style { [data-aq-look="wabe"] dialog.aq-dialog[open] { opacity: 1; transform: translateY(100%); } }
  [data-aq-look="wabe"] dialog.aq-dialog::before { content: ""; display: block; width: 36px; height: 4px; margin: 8px auto -4px; border-radius: 2px; background: var(--aq-rail-up-2); }
  [data-aq-look="wabe"] dialog.aq-dialog > header { touch-action: none; }
}

/* the honeycomb: the tally is operating truth - ring and tag are fully there within 80 ms */
[data-aq-look="wabe"] .aq-cell-shape .ring { transition: stroke 80ms linear; }
[data-aq-look="wabe"] .aq-cell-tag:not([hidden]) { animation: aq-appear 80ms linear both; }
[data-aq-look="wabe"] .aq-cell-foot > :not([hidden]) { animation: aq-appear 120ms linear both; }
@keyframes aq-appear { from { opacity: 0; } }

/* the drawing of a controller: a pressed part lights at once and fades out when it is let go */
[data-aq-look="wabe"] .aq-pad-part > .gl { transition: stroke 120ms linear; }
[data-aq-look="wabe"] .aq-pad-part > .lb { transition: fill 120ms linear; }
[data-aq-look="wabe"] .aq-pad-part[data-down="true"] > * { transition-duration: 0s; }

/* the desk: dark in both themes. In the dark theme it stands on the graphite of the page and takes its values;
   in the light theme it keeps the neutral dark it always had (a picture of the hardware on a white page). */
[data-aq-look="wabe"] .aq-desk {
  --aq-ink: #131a1d; --aq-deck: #1a2226; --aq-rail: #28343a; --aq-rail-2: #33414a; --aq-line: #2c383e; --aq-hairline: rgba(255, 255, 255, 0.07);
  --aq-text: #f4f5f6; --aq-muted: #9aa6ab; --aq-faint: #647177; --aq-signal: #20a8a4; --aq-on-signal: #00313a;
  --aq-fill: #20a8a4; --aq-on-fill: #00313a; --aq-focus: #20a8a4; --aq-inverse: #f4f5f6; --aq-on-inverse: #0d1316; --aq-on-inverse-muted: #46525a;
  --aq-red: #f4574d; --aq-green: #2fb344; --aq-amber: #f5a524; --aq-red-fill: #e5352b; --aq-green-fill: #2fb344; --aq-amber-fill: #f5a524;
  --aq-onair-fill: #e5352b; --aq-on-green: #04230c; --aq-on-amber: #2b1900; --aq-knob: #ffffff; --aq-thumb: #48565d;
}
:root[data-aq-look="wabe"][data-theme="light"] .aq-desk {
  --aq-ink: #0a0b0c; --aq-deck: #15171a; --aq-rail: #24282c; --aq-rail-2: #30353b; --aq-line: #2a2e33; --aq-hairline: rgba(255, 255, 255, 0.07);
  --aq-text: #f4f5f6; --aq-muted: #9ba1a8; --aq-faint: #5e646b; --aq-signal: #20a8a4; --aq-on-signal: #00313a;
  --aq-fill: #20a8a4; --aq-on-fill: #00313a; --aq-focus: #20a8a4; --aq-inverse: #f4f5f6; --aq-on-inverse: #0a0b0c; --aq-on-inverse-muted: #4a5057;
  --aq-red: #f4574d; --aq-green: #2fb344; --aq-amber: #f5a524; --aq-red-fill: #e5352b; --aq-green-fill: #2fb344; --aq-amber-fill: #f5a524;
  --aq-onair-fill: #e5352b; --aq-on-green: #04230c; --aq-on-amber: #2b1900; --aq-knob: #ffffff; --aq-thumb: #454a51;
  --aq-key-cap: #24282c;
}
@media (prefers-color-scheme: light) {
  :root[data-aq-look="wabe"]:not([data-theme="dark"]) .aq-desk {
    --aq-ink: #0a0b0c; --aq-deck: #15171a; --aq-rail: #24282c; --aq-rail-2: #30353b; --aq-line: #2a2e33; --aq-hairline: rgba(255, 255, 255, 0.07);
    --aq-text: #f4f5f6; --aq-muted: #9ba1a8; --aq-faint: #5e646b; --aq-signal: #20a8a4; --aq-on-signal: #00313a;
    --aq-fill: #20a8a4; --aq-on-fill: #00313a; --aq-focus: #20a8a4; --aq-inverse: #f4f5f6; --aq-on-inverse: #0a0b0c; --aq-on-inverse-muted: #4a5057;
    --aq-red: #f4574d; --aq-green: #2fb344; --aq-amber: #f5a524; --aq-red-fill: #e5352b; --aq-green-fill: #2fb344; --aq-amber-fill: #f5a524;
    --aq-onair-fill: #e5352b; --aq-on-green: #04230c; --aq-on-amber: #2b1900; --aq-knob: #ffffff; --aq-thumb: #454a51;
    --aq-key-cap: #24282c;
  }
}
/* The key that is being worked on is "selected", and selected is white - as for a camera. */
[data-aq-look="wabe"] .aq-key[data-selected="true"] { box-shadow: 0 0 0 2px var(--aq-desk), 0 0 0 4px var(--aq-inverse); }
[data-aq-look="wabe"] .aq-key small { font-size: 11px; letter-spacing: 0; }
/* A key's light mirrors the hardware: it is there at once, like the LED. Only the press of the cap is eased. */
[data-aq-look="wabe"] .aq-key { transition: transform var(--aq-t) var(--aq-ease); }
[data-aq-look="wabe"] .aq-fader { --aq-fader-knob: 14px; }
[data-aq-look="wabe"] .aq-fader::before { top: 7px; bottom: 7px; width: 6px; margin-left: -3px; border-radius: 3px; }
[data-aq-look="wabe"] .aq-fader > i { left: 6px; right: 6px; border-radius: 7px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); }
[data-aq-look="wabe"] .aq-fader > i::after { content: none; }

/* ---------- people who asked for less ---------- */
@media (prefers-reduced-motion: reduce) {
  .aq *, .aq *::before, .aq *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  /* A blinking key carries meaning: it stays, as a calm change of state without the hard flash. */
  .aq .aq-key[data-blink="true"] { animation: none; box-shadow: inset 0 0 0 3px var(--aq-key-cap), inset 0 0 0 5px var(--ink); }
  dialog.aq-dialog, dialog.aq-dialog[open] { transform: none; }
  /* the look "Wabe": a sheet neither grows nor slides, it cross-fades - short, but not a hard cut */
  [data-aq-look="wabe"] dialog.aq-dialog { transform: none; opacity: 0; transition-property: opacity, overlay, display; transition-timing-function: linear; transition-behavior: allow-discrete; transition-duration: 150ms !important; }
  [data-aq-look="wabe"] dialog.aq-dialog[open] { transform: none; opacity: 1; }
  @starting-style { [data-aq-look="wabe"] dialog.aq-dialog[open] { transform: none; opacity: 0; } }
  [data-aq-look="wabe"] dialog.aq-dialog::backdrop { transition: opacity 150ms linear, overlay 150ms allow-discrete, display 150ms allow-discrete; }
  [data-aq-look="wabe"] .aq-btn[aria-busy="true"]::before { animation-duration: 1.6s !important; animation-iteration-count: infinite !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .aq-nav, .aq-toolbar, .aq-toast { background: var(--aq-deck); -webkit-backdrop-filter: none; backdrop-filter: none; }
  dialog.aq-dialog::backdrop { -webkit-backdrop-filter: none; backdrop-filter: none; }
  [data-aq-look="wabe"] .aq-toolbar { background: var(--aq-ink); }
}
@media (prefers-contrast: more) {
  :root { --aq-hairline: color-mix(in srgb, var(--aq-text) 46%, transparent); --aq-muted: color-mix(in srgb, var(--aq-text) 82%, var(--aq-ink)); }
  .aq-nav, .aq-toolbar, .aq-toast { background: var(--aq-deck); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .aq-btn, .aq-input, .aq-select, .aq-textarea, .aq-key, .aq-seg, .aq-tabs { box-shadow: inset 0 0 0 1px var(--aq-hairline); }
  /* every cell of the honeycomb gets an outline; a tally ring and the dashed outline stay as they are */
  .aq-cell:not([data-tally]):not([data-off="true"]) .ring { stroke: var(--aq-muted); stroke-width: 1.5; }
  /* listed three times so the values also outrank the light blocks of the look */
  :root[data-aq-look="wabe"], :root[data-aq-look="wabe"][data-theme="light"], :root[data-aq-look="wabe"]:not([data-theme="dark"]) {
    --aq-hairline: color-mix(in srgb, var(--aq-text) 46%, transparent); --aq-muted: color-mix(in srgb, var(--aq-text) 82%, var(--aq-ink));
    --aq-edge: var(--aq-hairline); --aq-nav-text: rgba(255, 255, 255, 0.9);
  }
  [data-aq-look="wabe"] .aq-toolbar { background: var(--aq-ink); box-shadow: 0 1px 0 var(--aq-hairline); }
  [data-aq-look="wabe"] .aq-nav a[aria-current="page"] { box-shadow: inset 0 0 0 1px #ffffff; }
}
