/* ---------------------------------------------------------------------------
   GFX EXP tokens — shared by the control console and the projector screens.
   Same kit as the documentation site, trimmed to what the console uses.
--------------------------------------------------------------------------- */

:root {
  --font-display: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-ui: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --ink: #000000;
  --paper: #efefec;
  --paper-pure: #ffffff;
  --paper-dim: #dededa;
  --paper-shade: #c9c9c4;

  --grey-900: #1c1c1c;
  --grey-800: #2b2b2b;
  --grey-700: #3d3d3d;
  --grey-600: #565656;
  --grey-500: #6e6e6e;
  --grey-400: #8c8c8c;
  --grey-300: #a8a8a8;
  --grey-200: #c4c4c4;

  --blue-a5: #37599c;
  --yellow: #f3d200;
  --red: #dc1e14;
  --green: #1f7a4d;

  --text-primary: var(--ink);
  --text-muted: var(--grey-600);
  --text-invert: var(--paper-pure);
  --text-invert-muted: var(--grey-400);
  --border: var(--ink);
  --border-soft: var(--grey-200);
  --border-invert: var(--grey-700);
  --accent: var(--blue-a5);

  --scale: 1.1;

  --text-nano: calc(7px * var(--scale));
  --text-micro: calc(8px * var(--scale));
  --text-label: calc(9px * var(--scale));
  --text-caption: calc(10px * var(--scale));
  --text-body: calc(11px * var(--scale));
  --text-body-lg: calc(13px * var(--scale));
  --text-h3: calc(20px * var(--scale));
  --text-h1: calc(46px * var(--scale));

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-bold: 700;
  --weight-black: 800;

  --track-heading: -0.02em;
  --track-label: 0.06em;
  --track-micro: 0.1em;
  --leading-body: 1.35;
  --leading-label: 1.2;

  --type-body: var(--weight-regular) var(--text-body) / var(--leading-body) var(--font-ui);
  --type-label: var(--weight-bold) var(--text-label) / var(--leading-label) var(--font-ui);
  --type-data: var(--weight-medium) var(--text-caption) / var(--leading-label) var(--font-mono);

  --space-1: calc(2px * var(--scale));
  --space-2: calc(4px * var(--scale));
  --space-3: calc(6px * var(--scale));
  --space-4: calc(8px * var(--scale));
  --space-5: calc(10px * var(--scale));
  --space-6: calc(14px * var(--scale));
  --space-7: calc(20px * var(--scale));
  --space-8: calc(28px * var(--scale));
  --space-9: calc(40px * var(--scale));

  --gutter: calc(4px * var(--scale));
  --row-h: calc(18px * var(--scale));
  --row-h-lg: calc(24px * var(--scale));
  --control-h: calc(22px * var(--scale));
  --control-h-lg: calc(28px * var(--scale));

  --hairline: 1px solid var(--border);
  --hairline-soft: 1px solid var(--border-soft);
  --hairline-invert: 1px solid var(--border-invert);
  --frame: 2px solid var(--border);

  --focus-ring: 2px solid var(--accent);
  --hazard-yellow: repeating-linear-gradient(-45deg, var(--ink) 0 8px, var(--yellow) 8px 16px);
  --grid-4: repeating-linear-gradient(0deg, var(--border-soft) 0 1px, transparent 1px 4px),
            repeating-linear-gradient(90deg, var(--border-soft) 0 1px, transparent 1px 4px);

  --dur-fast: 80ms;
  --transition-invert: background-color var(--dur-fast) linear,
                       color var(--dur-fast) linear,
                       border-color var(--dur-fast) linear;
}

* { box-sizing: border-box; }

html { font-size: calc(100% * var(--scale)); background: var(--ink); }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text-invert);
  font: var(--type-body);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--yellow); color: var(--ink); }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); letter-spacing: var(--track-heading); }
p { margin: 0; }
:focus-visible { outline: var(--focus-ring); outline-offset: 1px; }
canvas, img, svg { display: block; max-width: 100%; }

/* --- Type roles --- */

.label {
  font: var(--type-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}
.micro {
  font-family: var(--font-ui);
  font-size: var(--text-micro);
  font-weight: var(--weight-bold);
  letter-spacing: var(--track-micro);
  line-height: var(--leading-label);
  text-transform: uppercase;
}
.data { font: var(--type-data); letter-spacing: var(--track-label); }
.body { font-family: var(--font-ui); font-size: var(--text-body-lg); line-height: var(--leading-body); }
.muted { color: var(--text-muted); }
.muted-inv { color: var(--text-invert-muted); }

/* --- Surfaces --- */

.panel { background: var(--paper); color: var(--text-primary); border: var(--hairline); }
.panel-pure { background: var(--paper-pure); color: var(--text-primary); border: var(--hairline); }
.panel-invert { background: var(--ink); color: var(--text-invert); border: var(--hairline-invert); }

.bar {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: var(--row-h-lg);
  padding: var(--space-2) var(--space-3);
  background: var(--ink);
  color: var(--text-invert);
}
.bar .spacer { flex: 1; }
.hazard { background: var(--hazard-yellow); background-size: 22.7px 22.7px; }
.grid-lines { background-image: var(--grid-4); }

.mark { width: 6px; height: 6px; flex: 0 0 auto; background: var(--grey-700); }
.bar .mark { background: var(--paper-pure); }

/* --- Controls --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--control-h-lg);
  padding: var(--space-2) var(--space-5);
  border: var(--hairline);
  background: var(--ink);
  color: var(--text-invert);
  font: var(--type-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition-invert);
}
.btn:hover { background: var(--yellow); color: var(--ink); }
.btn:disabled { opacity: .35; cursor: not-allowed; }
.btn:disabled:hover { background: var(--ink); color: var(--text-invert); }

.btn-accent { background: var(--accent); color: var(--paper-pure); border-color: var(--accent); }
.btn-accent:hover { background: var(--yellow); border-color: var(--ink); color: var(--ink); }

.btn-ghost { background: transparent; color: var(--text-primary); }
.btn-ghost:hover { background: var(--ink); color: var(--text-invert); }

.btn-sm { min-height: var(--control-h); padding: var(--space-1) var(--space-3); }

.tag {
  display: inline-flex;
  align-items: center;
  min-height: var(--row-h);
  padding: var(--space-1) var(--space-3);
  border: var(--hairline);
  font: var(--type-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}
.tag-inv { border-color: var(--border-invert); color: var(--text-invert); }

select, input[type="text"], input[type="number"] {
  width: 100%;
  min-height: var(--control-h);
  padding: var(--space-2) var(--space-3);
  border: var(--hairline);
  border-radius: 0;
  background: var(--paper-pure);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: var(--text-caption);
}

input[type="range"] {
  width: 100%;
  height: 14px;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 2px;
  background: var(--ink);
}
input[type="range"]::-moz-range-track { height: 2px; background: var(--ink); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 14px;
  margin-top: -6px;
  border: 0;
  border-radius: 0;
  background: var(--ink);
}
input[type="range"]::-moz-range-thumb {
  width: 10px;
  height: 14px;
  border: 0;
  border-radius: 0;
  background: var(--ink);
}
input[type="range"]:focus-visible::-webkit-slider-thumb { background: var(--accent); }

input[type="checkbox"] {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: var(--ink);
  border-radius: 0;
}

label.field-row {
  display: grid;
  grid-template-columns: 8.5rem 1fr 3.6rem;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-bottom: var(--hairline-soft);
}
label.field-row:last-child { border-bottom: 0; }
label.field-row > .n {
  font: var(--type-data);
  text-align: right;
  color: var(--text-muted);
}
label.field-row > span:first-child {
  font: var(--type-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}
label.field-row.wide { grid-template-columns: 8.5rem 1fr; }
label.field-row.check { grid-template-columns: 8.5rem auto 1fr; }
