/* =========================================================================
   FDT design tokens — canonical source.

   This file is the single source of truth for the --fdt-* token layer,
   consumed by every FDT web property as a Hugo Module (sites) or via
   go:embed (Go apps). Values are documented at
   design.frontierdefensetech.com. WebAwesome's wa-prefixed bridge
   mappings are deliberately NOT here — their scoping differs per site
   (see research-library's .wa-dark scoping) and they stay site-local.
   ========================================================================= */

:root,
.wa-dark {
  /* Navy surfaces (canvas → raised) */
  --fdt-navy-900: #0A1220;
  --fdt-navy-800: #0F1A2E;
  --fdt-navy-700: #16243D;
  --fdt-navy-600: #1E3050;

  /* Fog (text + light UI) */
  --fdt-fog-100: #E8EEF7;
  --fdt-fog-200: #C5D1E2;

  /* Steel (metadata + muted UI) */
  --fdt-steel-300: #8A9BB4;
  --fdt-steel-400: #5A6D8A;

  /* Electric (single accent) */
  --fdt-electric-300: #7BA9FF;
  --fdt-electric-400: #4A8DFF;
  --fdt-electric-500: #1D6EF5;
  --fdt-electric-600: #1456C7;

  /* Semantic */
  --fdt-hostile:     #E0322C;
  --fdt-hostile-400: #EE5050;
  --fdt-neutral:     #2FA85A;
  --fdt-caution:     #F2B535;

  /* Divider / border */
  --fdt-divider: #1F3352;

  /* Glow scale (xs/sm/md/lg/xl) */
  --fdt-glow-xs: 0 0   8px  2px rgb(29 110 245 / 20%);
  --fdt-glow-sm: 0 0  16px  2px rgb(29 110 245 / 30%);
  --fdt-glow-md: 0 0  32px  4px rgb(29 110 245 / 35%);
  --fdt-glow-lg: 0 0  64px  8px rgb(29 110 245 / 40%);
  --fdt-glow-xl: 0 0 128px 16px rgb(123 169 255 / 35%);

  /* Typography */
  --fdt-font-body:     'Inter', -apple-system, blinkmacsystemfont, 'Segoe UI', system-ui, sans-serif;
  --fdt-font-display:  'Inter Display', 'Inter', -apple-system, sans-serif;
  --fdt-font-wordmark: 'Barlow Condensed', 'Oswald', 'Arial Narrow', sans-serif;
  --fdt-font-mono:     'JetBrains Mono', ui-monospace, 'SF Mono', menlo, consolas, monospace;

  /* Spacing (4px base) */
  --fdt-space-1: 4px;
  --fdt-space-2: 8px;
  --fdt-space-3: 12px;
  --fdt-space-4: 16px;
  --fdt-space-5: 24px;
  --fdt-space-6: 32px;
  --fdt-space-7: 48px;
  --fdt-space-8: 64px;
  --fdt-space-9: 96px;

  /* Radii */
  --fdt-radius-sm: 2px;
  --fdt-radius-md: 4px;
  --fdt-radius-lg: 8px;

  /* Motion — tempo (design system § Motion).
     UI state change: 150–250ms · panel entrance/exit: 400–600ms · ambient signal: 1–2s. */
  --fdt-motion-fast:    150ms;   /* hover, focus ring, tab switch */
  --fdt-motion-base:    200ms;   /* signature "Acquire" — selection, commit */
  --fdt-motion-slow:    350ms;   /* signature "Panel slide" — drawer/sheet */
  --fdt-motion-panel:   500ms;   /* panel entrance/exit, modal in */
  --fdt-motion-ambient: 1200ms;  /* live pulse */
  --fdt-motion-sweep:   2000ms;  /* radar sweep, ambient signals */

  /* Motion — easing. UI motion uses fast-out gentle-settle; tactical is linear. */
  --fdt-ease-ui:     cubic-bezier(0.2, 0.8, 0.2, 1);
  --fdt-ease-linear: linear;
}
/* =========================================================================
   BULWARK OST stem console — media.frontierdefensetech.com

   Tokens follow the FDT design system contract: --fdt-* from the
   design-system module (bundled ahead of this file by head.html), --wa-*
   bridge mappings for WebAwesome, and --media-* for the few values the
   token module does not carry. No bare tokens, no --color-* generics.
   ========================================================================= */

/* Self-hosted Latin subsets (design system § Implementation). The version
   pin lives in each filename under static/fonts/; update the preload links
   in head.html with it. */

@font-face src URLs below (and preload links in
   head.html) when bumping versions. */

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/fonts/inter-v20-latin-300.woff2') format('woff2');
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/inter-v20-latin-regular.woff2') format('woff2');
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/inter-v20-latin-500.woff2') format('woff2');
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/inter-v20-latin-600.woff2') format('woff2');
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/inter-v20-latin-700.woff2') format('woff2');
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/fonts/inter-v20-latin-800.woff2') format('woff2');
}

@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/barlow-condensed-v13-latin-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/barlow-condensed-v13-latin-600.woff2') format('woff2');
}

@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/barlow-condensed-v13-latin-700.woff2') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-v24-latin-regular.woff2') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-v24-latin-500.woff2') format('woff2');
}

:root,
.wa-dark {
  /* Values the token module does not carry (design system static/colors_and_type.css). */
  --media-steel-500: #3A4A66;
  --media-white:     #FFF;
  --media-glow-friendly: 0 0 16px 2px rgb(29 110 245 / 30%);
  --media-glow-neutral:  0 0 16px 2px rgb(47 168 90 / 30%);
  --media-glow-hostile:  0 0 16px 2px rgb(224 50 44 / 30%);
  --media-sidebar-open:   320px;
  --media-sidebar-closed: 48px;

  /* WebAwesome mappings (for wa-dropdown). */
  --wa-color-surface-default:   var(--fdt-navy-800);
  --wa-color-surface-raised:    var(--fdt-navy-700);
  --wa-color-surface-lowered:   var(--fdt-navy-900);
  --wa-color-surface-border:    var(--media-steel-500);
  --wa-color-text-normal:       var(--fdt-fog-100);
  --wa-color-text-quiet:        var(--fdt-steel-300);
  --wa-color-brand-fill-loud:   var(--fdt-electric-500);
  --wa-color-danger-fill-loud:  var(--fdt-hostile);
  --wa-color-success-fill-loud: var(--fdt-neutral);
  --wa-color-warning-fill-loud: var(--fdt-caution);
  --wa-focus-ring:              2px solid var(--fdt-electric-500);
  --wa-font-family-body:        var(--fdt-font-body);
  --wa-font-family-code:        var(--fdt-font-mono);
  --wa-border-radius-m:         var(--fdt-radius-sm);
  --wa-border-radius-s:         var(--fdt-radius-sm);
}

/* ---- Base ------------------------------------------------------------- */

html,
body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--fdt-navy-900);
  color: var(--fdt-fog-100);
  font-family: var(--fdt-font-body);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--fdt-electric-500);
  color: var(--media-white);
}

a {
  color: var(--fdt-electric-400);
}

a:hover {
  color: var(--fdt-electric-300);
}

button {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--fdt-electric-500);
  outline-offset: 2px;
}

kbd,
.mono {
  font-family: var(--fdt-font-mono);
  font-feature-settings: "liga" 0, "calt" 0, "tnum" 1;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: 0;
  left: 18px;
  z-index: 50;
  padding: 8px 12px;
  background: var(--fdt-navy-700);
  border: 1px solid var(--fdt-electric-500);
  border-radius: var(--fdt-radius-sm);
  color: var(--fdt-fog-100);
}

.skip-link:not(:focus) {
  transform: translateY(-120%);
}

.skip-link:focus {
  top: 8px;
}

.fdt-eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  line-height: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;

  /* electric-500 is 4.1:1 on navy-900, below AA for 11px text. */
  color: var(--fdt-electric-400);
}

.fdt-micro {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  line-height: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fdt-steel-300);
}

/* ---- App frame -------------------------------------------------------- */

.console {
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.console-body {
  display: grid;
  min-height: 0;
  grid-template-columns: var(--media-sidebar-open) minmax(0, 1fr);
  transition: grid-template-columns 250ms var(--fdt-ease-ui);
}

.console-body[data-sidebar="closed"] {
  grid-template-columns: var(--media-sidebar-closed) minmax(0, 1fr);
}

/* ---- Top bar ---------------------------------------------------------- */

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--fdt-divider);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--fdt-fog-100);
  text-decoration: none;
}

.brand:hover {
  color: var(--fdt-fog-100);
}

.brand-mark {
  width: 22px;
  height: 26px;
}

.brand-name {
  font-family: var(--fdt-font-wordmark);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  letter-spacing: 0.08em;
}

.brand-rule {
  width: 1px;
  height: 22px;
  background: var(--media-steel-500);
}

.brand-label {
  font-family: var(--fdt-font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fdt-steel-300);
  white-space: nowrap;
}

.crossfade {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--fdt-font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--fdt-steel-300);
}

.crossfade-label {
  text-transform: uppercase;
}

.crossfade-range {
  width: 120px;
  margin: 0;
  accent-color: var(--fdt-electric-500);
  cursor: pointer;
}

.crossfade-value {
  min-width: 32px;
  font-weight: 500;
  color: var(--fdt-fog-100);
}

/* ---- Sidebar ---------------------------------------------------------- */

.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border-right: 1px solid var(--fdt-divider);
}

.sidebar-rail {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 14px 0;
  background: transparent;
  border: 0;
  color: var(--fdt-fog-200);
  cursor: pointer;
}

.sidebar-rail:hover {
  color: var(--fdt-fog-100);
}

.sidebar-rail span {
  font-family: var(--fdt-font-wordmark);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

.sidebar-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  min-width: var(--media-sidebar-open);
}

.console-body[data-sidebar="closed"] .sidebar-rail {
  display: flex;
}

.console-body[data-sidebar="closed"] .sidebar-panel {
  display: none;
}

.sidebar-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--fdt-divider);
}

.sidebar-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.album-select {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  background-color: var(--fdt-navy-700);
  border: 1px solid var(--media-steel-500);
  border-radius: var(--fdt-radius-sm);
  color: var(--fdt-fog-100);
  font-family: var(--fdt-font-wordmark);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.sidebar-count {
  margin: 0;
  font-family: var(--fdt-font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fdt-steel-300);
}

.track-list {
  flex: 1;
  overflow-y: auto;
}

.track-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px 18px;
  border-bottom: 1px solid var(--fdt-divider);
  color: inherit;
  text-decoration: none;
}

.track-row:hover {
  background: var(--fdt-navy-700);
  color: inherit;
}

.track-row[aria-current="page"] {
  background: var(--fdt-navy-700);
  box-shadow: inset 2px 0 0 var(--fdt-electric-500);
}

.track-code {
  font-family: var(--fdt-font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--fdt-electric-400);
}

.track-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.track-name {
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  color: var(--fdt-fog-100);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-meta,
.track-dur {
  font-family: var(--fdt-font-mono);
  letter-spacing: 0.04em;
  color: var(--fdt-steel-300);
}

.track-meta {
  font-size: 10px;
}

.track-dur {
  font-size: 13px;
  font-feature-settings: "tnum" 1;
}

/* ---- Buttons ---------------------------------------------------------- */

.icon-button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--media-steel-500);
  border-radius: var(--fdt-radius-sm);
  color: var(--fdt-fog-200);
  font-size: 12px;
  cursor: pointer;
}

.icon-button:hover:not(:disabled),
.icon-button[aria-expanded="true"] {
  border-color: var(--fdt-electric-500);
  color: var(--fdt-fog-100);
}

.icon-button[aria-expanded="true"] {
  color: var(--fdt-electric-400);
}

.icon-button-lg {
  width: 32px;
  height: 34px;
  background: var(--fdt-navy-700);
  font-size: 14px;
}

.icon-button-lg:hover:not(:disabled) {
  box-shadow: var(--fdt-glow-xs);
}

.icon-button:disabled {
  color: var(--fdt-steel-400);
  cursor: not-allowed;
}

.icon-button.is-copied {
  border-color: var(--fdt-neutral);
  color: var(--fdt-neutral);
}

.outline-button {
  padding: 8px 12px;
  background: transparent;
  border: 1px solid var(--media-steel-500);
  border-radius: var(--fdt-radius-sm);
  color: var(--fdt-fog-200);
  font-family: var(--fdt-font-wordmark);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

.outline-button:hover {
  color: var(--fdt-fog-100);
}

.outline-button[aria-pressed="true"] {
  border-color: var(--fdt-electric-500);
  color: var(--fdt-electric-400);
  box-shadow: var(--fdt-glow-xs);
}

/* ---- Main panel ------------------------------------------------------- */

.main-panel {
  overflow-y: auto;
  padding: 28px 36px;
}

.main-panel:focus {
  outline: none;
}

.track-panel,
.legal {
  max-width: 920px;
  margin: 0 auto;
}

.track-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.track-head {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.cover {
  flex-shrink: 0;
  width: 104px;
  height: 104px;
  border: 1px solid var(--fdt-navy-600);
  border-radius: var(--fdt-radius-md);
  object-fit: cover;
}

.cover-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--fdt-navy-800);
  color: var(--media-steel-500);
}

.cover-mark {
  width: 30px;
  height: 34px;
}

.cover-empty span {
  font-family: var(--fdt-font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fdt-steel-300);
}

.track-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding-top: 4px;
}

.track-info p {
  margin: 0;
}

.track-title {
  margin: 0;
  font-family: var(--fdt-font-display);
  font-weight: 800;
  font-size: 32px;
  line-height: 38px;
  letter-spacing: -0.01em;
  color: var(--fdt-fog-100);
}

.track-byline {
  font-size: 13px;
  color: var(--fdt-fog-200);
}

.track-data-row {
  margin-top: 2px !important;
  font-family: var(--fdt-font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--fdt-steel-300);
}

.track-note {
  max-width: 64ch;
  margin-top: 4px !important;
  font-size: 13px;
  line-height: 1.5;
  color: var(--fdt-fog-200);
  text-wrap: pretty;
}

.notice {
  margin: 0;
  padding: 10px 14px;
  border: 1px solid var(--fdt-caution);
  border-radius: var(--fdt-radius-sm);
  font-family: var(--fdt-font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--fdt-caution);
}

.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 24px;
  background: var(--fdt-navy-800);
  border: 1px solid var(--fdt-navy-600);
  border-radius: var(--fdt-radius-md);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.journey .card-head {
  margin-bottom: 2px;
}

.xfade-status {
  margin: 0;
  font-family: var(--fdt-font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--fdt-electric-400);
  animation: fdt-pulse 1s infinite;
}

@keyframes fdt-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ---- Journey graph ---------------------------------------------------- */

.journey-graph {
  display: grid;
  grid-template-columns: auto 90px auto;
  align-items: center;
  justify-content: start;
}

.journey-links {
  display: block;
}

.journey-links path {
  stroke: var(--media-steel-500);
  stroke-width: 1.5;
}

.journey[data-stem="peaceful"] .link-peaceful {
  stroke: var(--fdt-neutral);
}

.journey[data-stem="attack"] .link-attack {
  stroke: var(--fdt-hostile);
}

.journey-branches {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 120px;
  padding: 2px 0;
}

.state {
  --state-accent: var(--fdt-electric-500);
  --state-glow: var(--media-glow-friendly);

  min-width: 130px;
  padding: 13px 20px;
  background: var(--fdt-navy-900);
  border: 1px solid var(--fdt-navy-600);
  border-radius: var(--fdt-radius-sm);
  color: var(--fdt-steel-300);
  font-family: var(--fdt-font-wordmark);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.state-bed {
  min-width: 0;
}

.state-peaceful {
  --state-accent: var(--fdt-neutral);
  --state-glow: var(--media-glow-neutral);
}

.state-attack {
  --state-accent: var(--fdt-hostile);
  --state-glow: var(--media-glow-hostile);
}

.state:hover {
  color: var(--fdt-fog-100);
}

.state[aria-pressed="true"] {
  background: var(--fdt-navy-800);
  border-color: var(--state-accent);
  color: var(--fdt-fog-100);
  box-shadow: var(--state-glow);
}

/* ---- Waveform --------------------------------------------------------- */

.wave {
  --stem-accent: var(--fdt-electric-500);
  --stem-glow: var(--media-glow-friendly);
}

.wave[data-stem="peaceful"] {
  --stem-accent: var(--fdt-neutral);
  --stem-glow: var(--media-glow-neutral);
}

.wave[data-stem="attack"] {
  --stem-accent: var(--fdt-hostile);
  --stem-glow: var(--media-glow-hostile);
}

.wave-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.loop-readout {
  margin: 0;
  font-family: var(--fdt-font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--fdt-steel-300);
}

.stem-menu::part(menu) {
  min-width: 230px;
  padding: 0;
  background: var(--fdt-navy-700);
  border: 1px solid var(--media-steel-500);
  border-radius: var(--fdt-radius-sm);
  box-shadow: var(--fdt-glow-sm);
}

.stem-menu wa-dropdown-item {
  border-bottom: 1px solid var(--fdt-divider);
  color: var(--fdt-fog-100);
  font-family: var(--fdt-font-wordmark);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.stem-menu wa-dropdown-item [slot="details"] {
  font-family: var(--fdt-font-mono);
  font-weight: 400;
  font-size: 9px;
  letter-spacing: 0;
  color: var(--fdt-steel-300);
}

.stem-menu .stem-menu-all {
  border-bottom: 0;
  color: var(--fdt-electric-400);
  text-transform: uppercase;
}

.wave-canvas-wrap {
  position: relative;
}

.wave-canvas {
  display: block;
  width: 100%;
  height: 110px;
  cursor: pointer;
  touch-action: none;
}

.wave-hover {
  position: absolute;
  top: -26px;
  padding: 2px 7px;
  background: var(--fdt-navy-700);
  border: 1px solid var(--media-steel-500);
  border-radius: var(--fdt-radius-sm);
  font-family: var(--fdt-font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--fdt-fog-100);
  white-space: nowrap;
  transform: translateX(-50%);
  pointer-events: none;
}

.transport {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 14px;
}

.play {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--stem-accent);
  border: 0;
  border-radius: var(--fdt-radius-md);
  box-shadow: var(--stem-glow);
  color: var(--media-white);
  font-size: 16px;
  cursor: pointer;
}

.play:disabled {
  background: var(--media-steel-500);
  box-shadow: none;
  cursor: not-allowed;
}

.time {
  min-width: 104px;
  margin: 0;
  font-family: var(--fdt-font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--fdt-fog-100);
  font-feature-settings: "tnum" 1;
}

/* ---- Bottom bar ------------------------------------------------------- */

.bottom-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  padding: 7px 18px;
  border-top: 1px solid var(--fdt-divider);
  font-family: var(--fdt-font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--fdt-steel-300);
  text-transform: uppercase;
}

.bar-button {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  padding: 2px 0;
  background: transparent;
  border: 0;
  color: var(--fdt-steel-300);
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.bar-button:hover {
  color: var(--fdt-fog-100);
}

.bar-next {
  justify-self: end;
}

.bar-next b,
.hotkeys kbd {
  font-weight: 500;
  color: var(--fdt-fog-100);
}

.console-body[data-sidebar="closed"] ~ .bottom-bar .sidebar-chevron {
  transform: scaleX(-1);
}

.hotkeys {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hotkeys kbd {
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  font-size: inherit;
  text-transform: uppercase;
}

/* ---- Legal + toast ---------------------------------------------------- */

.legal {
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid var(--fdt-divider);
}

.legal p {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--fdt-steel-300);
}

.legal a {
  color: var(--fdt-fog-200);
}

.toast {
  position: fixed;
  bottom: 52px;
  left: 50%;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--fdt-navy-700);
  border: 1px solid var(--fdt-neutral);
  border-radius: var(--fdt-radius-sm);
  box-shadow: var(--fdt-glow-sm);
  font-family: var(--fdt-font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fdt-fog-100);
  transform: translateX(-50%);
}

.toast[hidden] {
  display: none;
}

.toast i {
  color: var(--fdt-neutral);
}

/* ---- Narrow + motion -------------------------------------------------- */

@media (width <= 900px) {
  .hotkeys {
    display: none;
  }

  .bottom-bar {
    grid-template-columns: 1fr 1fr;
  }

  .main-panel {
    padding: 20px 16px;
  }

  .console-body {
    --media-sidebar-open: 260px;
  }
}

/* Phones get a notice instead of the console; the player needs the width. */
.small-screen {
  display: none;
}

@media (width < 768px) {
  .console,
  .skip-link,
  .toast {
    display: none;
  }

  .small-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 24px 16px;
    text-align: center;
  }

  .small-screen .brand-mark {
    width: 44px;
    height: 52px;
  }

  .small-screen-title {
    margin: 0;
    font-family: var(--fdt-font-wordmark);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .small-screen-text {
    max-width: 32ch;
    margin: 0;
    font-family: var(--fdt-font-mono);
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--fdt-steel-300);
  }
}

@media (prefers-reduced-motion: reduce) {
  .console-body {
    transition: none;
  }

  .xfade-status {
    animation: none;
  }
}
