/*
 * WORKSTATION
 * Golden reference: ../reference/workstation.png
 *
 * Physical Unix-GUI character:
 * cool petroleum desktop + warm gray applications,
 * Motif/CDE-like bevels, sans UI, mono data/terminal.
 */

:root,
:root[data-theme="workstation"],
[data-theme="workstation"] {
  color-scheme: light;

  /* Typography — deliberately NOT typewriter everywhere. */
  --font-ui: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-copy: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --font-terminal: var(--font-mono);
  --font-display: "IBM Plex Sans Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;

  --weight-normal: 400;
  --weight-medium: 500;
  --weight-strong: 600;

  --text-xxs: 10px;
  --text-xs: 11px;
  --text-sm: 13px;
  --text-md: 15px;
  --text-lg: 19px;
  --text-xl: 23px;

  --line-tight: 1.08;
  --line-ui: 1.20;
  --line-copy: 1.42;

  --tracking-ui: 0;
  --tracking-label: .055em;
  --tracking-display: .01em;

  /* Dense physical geometry. */
  --space-1: 2px;
  --space-2: 4px;
  --space-3: 6px;
  --space-4: 8px;
  --space-5: 10px;
  --space-6: 12px;
  --space-7: 16px;
  --space-8: 20px;

  --radius-window: 0;
  --radius-control: 0;
  --border-width: 1px;

  --titlebar-height: 30px;
  --titlebar-button-size: 19px;
  --menubar-height: 35px;
  --front-panel-height: 68px;
  --statusbar-height: 24px;
  --dockapp-size: 106px;
  --window-gap: 11px;
  --dockapp-gap: var(--window-gap);
  --scrollbar-size: 15px;
  --meter-height: 5px;

  /* Palette extracted conceptually from approved mockup. */
  --ws-desk-1: #34464e;
  --ws-desk-2: #2d3d44;

  --ws-gray-0: #f0efe9;
  --ws-gray-1: #deddd7;
  --ws-gray-2: #cbc9c3;
  --ws-gray-3: #b7b6b0;
  --ws-gray-4: #9d9d97;
  --ws-gray-5: #7d7e79;
  --ws-gray-6: #626560;

  --ws-ink-1: #171a1b;
  --ws-ink-2: #303536;
  --ws-ink-3: #545b5d;

  --ws-blue: #34596a;
  --ws-blue-dark: #294856;
  --ws-sage: #78926d;
  --ws-amber: #8f7545;
  --ws-red: #80524f;

  --desktop-bg: var(--ws-desk-1);
  --desktop-bg-alt: var(--ws-desk-2);

  --surface-window: var(--ws-gray-2);
  --surface-window-alt: var(--ws-gray-1);
  --surface-raised: var(--ws-gray-2);
  --surface-sunken: #b2b2ac;
  --surface-input: #e4e2dc;
  --surface-menubar: #d1d0ca;
  --surface-titlebar: var(--ws-gray-4);
  --surface-titlebar-inactive: var(--ws-gray-3);
  --surface-statusbar: #bdbcb6;
  --surface-dockapp: #b9b8b2;
  --surface-terminal: #243137;
  --surface-selection: #455d67;

  --text-primary: var(--ws-ink-1);
  --text-secondary: var(--ws-ink-2);
  --text-muted: var(--ws-ink-3);
  --text-disabled: #777c7c;

  --text-titlebar: #141718;
  --text-titlebar-inactive: #4e5556;
  --text-menubar: #171a1b;
  --text-statusbar: #252a2b;

  --text-terminal: #e3e4dd;
  --text-terminal-dim: #a8b0aa;

  --accent-primary: var(--ws-blue);
  --accent-secondary: var(--ws-sage);
  --accent-tertiary: var(--ws-amber);
  --accent-warning: #9a7430;
  --accent-danger: var(--ws-red);
  --accent-ok: #637f5c;

  --link: #244c5e;
  --link-hover: #133646;

  --selection-bg: #415963;
  --selection-fg: #f3f2ec;
  --focus-color: #294b59;

  --border-outer: #262c2e;
  --border-inner: #777873;
  --border-muted: #8a8b86;

  --bevel-highlight: #f4f3ed;
  --bevel-light: #dfded8;
  --bevel-dark: #686964;
  --bevel-shadow: #424543;

  --separator: #858681;
  --window-outline: #202628;
  --titlebar-rule: 1px solid #6c6d68;

  --shadow-window:
    1px 1px 0 #202628,
    3px 3px 0 rgb(20 27 29 / 24%);

  --shadow-raised:
    inset 1px 1px 0 var(--bevel-highlight),
    inset -1px -1px 0 var(--bevel-dark),
    inset 2px 2px 0 var(--bevel-light),
    inset -2px -2px 0 var(--bevel-shadow);

  --shadow-sunken:
    inset 1px 1px 0 var(--bevel-shadow),
    inset -1px -1px 0 var(--bevel-highlight),
    inset 2px 2px 0 var(--bevel-dark),
    inset -2px -2px 0 var(--bevel-light);

  --shadow-focus: inset 0 0 0 1px var(--focus-color);

  --glow-text: none;
  --glow-accent: none;
  --glow-terminal: none;

  --meter-track: #858782;
  --meter-fill: #365f70;
  --meter-fill-alt: #718b68;
  --meter-fill-warn: #99753a;

  --graph-grid: #747a79;
  --graph-line: #315b6b;
  --graph-line-alt: #6b835f;
  --graph-baseline: #767b77;

  --led-off: #7b807a;
  --led-on: #607c58;
  --led-warn: #94713b;

  --dock-label: #374246;
  --dock-value: #111617;

  --terminal-prompt: #afcaa7;
  --terminal-user: #b9d0ae;
  --terminal-path: #9cb9ad;
  --terminal-command: #d9ddd5;
  --terminal-cursor: #e2e4dc;
  --terminal-error: #c98b84;
  --terminal-warning: #cfb272;

  --workspace-active-bg: #344f5a;
  --workspace-active-fg: #f3f1eb;
  --workspace-inactive-bg: #c4c3bd;
  --workspace-inactive-fg: #24292a;
  --workspace-border: #666864;

  /* Optical effects nearly absent. */
  --scanline-color: #000;
  --scanline-opacity: 0;
  --scanline-size: 0px;
  --noise-opacity: .01;
  --vignette-opacity: 0;
  --phosphor-blur: 0px;
  --image-filter: grayscale(.76) contrast(.94) saturate(.48);
  --icon-opacity: .92;
  --avatar-bg: #d9d8d2;
  --avatar-filter: grayscale(1) contrast(1.35) brightness(.72);
  --avatar-opacity: 1;
}

/* Workstation-only: volume is a slider, not segmented blocks. */
[data-theme="workstation"] .audio-device__vol-blocks {
  display: none;
}
[data-theme="workstation"] .audio-device__vol-slider {
  display: inline-block;
}

/* Workstation-only: natural top-down rhythm with moderate gaps instead of
   the full-height spread (which pushed volume to the bottom). */
[data-theme="workstation"] .audio-device__body {
  justify-content: flex-start;
  gap: var(--space-7);
}
