/* ============================================================
   CRS HOMEPAGE — studio-rack-demo.css
   LOCKED PALETTE: nettle green · mustard · off-white · signal red
   Analogue machine interface. Not a web app.
   Cowley Road Studios, Oxford
   ============================================================ */

/* ── PALETTE (THE ONLY COLOURS THAT EXIST) ──────────────── */
:root {
  /* Nettle green — machine identity */
  --nettle-deep:   #1A231A;   /* page background */
  --nettle:        #243024;   /* panel surface */
  --nettle-mid:    #2F3E2F;   /* raised element */
  --nettle-lift:   #3A4E3A;   /* borders, dividers */
  --nettle-border: rgba(58,78,58,0.70);
  --nettle-border-hi: rgba(80,108,80,0.85);

  /* Mustard — primary accent, the ONLY warm colour in CRS mode */
  --mustard:       #C2A43A;
  --mustard-hi:    #D8B94A;
  --mustard-lo:    rgba(194,164,58,0.18);
  --mustard-glow:  rgba(216,185,74,0.35);

  /* Off-white — all text + café mode background
     SOLID values — no low-opacity rgba for text on dark green backgrounds */
  --offwhite:      #F4F1E8;   /* full — headings, primary labels */
  --offwhite-dim:  #D8D4C8;   /* body copy — was rgba(0.62), now solid equiv */
  --offwhite-mute: #A8A498;   /* secondary/muted — was rgba(0.30), now solid equiv */

  /* Signal red — LEDs and recording-live ONLY */
  --red:           #B23A2B;
  --red-glow:      rgba(178,58,43,0.55);

  /* Café warm tones (used ONLY inside café panel)
     Text on cream bg needs DARKER values for contrast */
  --cafe-bg:       #F4F1E8;   /* cream page bg */
  --cafe-surface:  #E8E0C8;   /* card surface — slightly darker for depth */
  --cafe-deep:     #D8CBAA;   /* inset surface */
  --cafe-border:   #B89A50;   /* border tan */
  --cafe-border-hi:#8A7230;   /* stronger border for visibility on cream */
  --cafe-text:     #1E2A1E;   /* darker nettle — ~13:1 contrast on cream */
  --cafe-text-dim: #4A5E3A;   /* solid dark olive — was rgba(0.60), now solid */
  --cafe-text-mute:#7A7058;   /* quiet secondary on cream */
  --cafe-mustard:  #8A6A10;   /* DARKER mustard for text on cream — ~5:1 contrast */

  /* Typography */
  --font-mono: 'JetBrains Mono', 'Space Mono', 'Courier New', monospace;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;

  /* Geometry — tight, analogue corners */
  --r: 2px;
  --r-md: 4px;
  --r-lg: 6px;
}

/* ── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── BASE — override everything, no framework tokens ─────── */
html, body {
  background: var(--nettle-deep);
  color: var(--offwhite);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body {
  overflow-x: clip; /* Prevent horizontal scroll from rack ears without hiding them */
}

a { color: inherit; text-decoration: none; }
button { background: none; border: none; font: inherit; cursor: pointer; }

/* ── PAGE SHELL ─────────────────────────────────────────── */
.hp-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--nettle-deep);
}

/* ============================================================
   ACTION BAR — sticky top strip
   ============================================================ */
/* ═══════════════════════════════════════════════════════════════
   NAVIGATION MODULE — 1U rack unit (top of chassis)
   ═══════════════════════════════════════════════════════════════ */
.hp-action-bar {
  /* 1U rack module — physical edges */
  background-color: #1f1f1f;
  border-top: 2px solid #3a3a3a;       /* Overhead light catch */
  border-bottom: 3px solid #000;       /* Heavy bottom shadow */
  box-shadow:
    inset 0 8px 10px rgba(255,255,255,0.02),
    0 6px 10px rgba(0,0,0,0.4);
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;  /* Center the buttons */
  gap: 0.5rem;
  flex-wrap: wrap;  /* Allow wrapping on very small screens */
}

.hp-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 2px;
  white-space: nowrap;
  transition: color 0.1s, border-color 0.1s;
  border: 1px solid transparent;
}

/* All action buttons — flat hardware look, white text */
.hp-action-btn--primary {
  background: #1a1a1a;
  color: rgba(255,255,255,0.90);
  border-color: #404040;
}
.hp-action-btn--primary:hover {
  border-color: #B5A642;
  color: #E0E0E0;
}

.hp-action-btn--secondary {
  background: #1a1a1a;
  color: rgba(255,255,255,0.80);
  border-color: #404040;
}
.hp-action-btn--secondary:hover {
  border-color: #B5A642;
  color: #E0E0E0;
}

.hp-action-btn--ghost {
  background: #1a1a1a;
  color: rgba(255,255,255,0.65);
  border-color: #333;
}
.hp-action-btn--ghost:hover {
  border-color: #B5A642;
  color: #E0E0E0;
}

/* Workshop Café action button — WC brand: mustard fill + sage border */
.hp-action-btn--cafe {
  background: #C2A43A;       /* WC mustard */
  color: #1E2A1E;            /* dark nettle text — high contrast on mustard */
  border-color: #5a7a28;     /* sage green border */
  text-decoration: none;
  font-weight: 700;
}
.hp-action-btn--cafe:hover {
  background: #D8B94A;       /* mustard-hi */
  border-color: #7aaa38;
  color: #0f1a0f;
}

/* ═══════════════════════════════════════════════════════════════
   IDENTITY MODULE — 1U rack unit (below nav)
   ═══════════════════════════════════════════════════════════════ */
.hp-identity-rail {
  /* 1U rack module — physical edges */
  background-color: #1f1f1f;
  border-top: 2px solid #3a3a3a;       /* Overhead light catch */
  border-bottom: 3px solid #000;       /* Heavy bottom shadow */
  box-shadow:
    inset 0 8px 10px rgba(255,255,255,0.02),
    0 6px 10px rgba(0,0,0,0.4);
  padding: 0.6rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.hp-identity-logo-link {
  flex-shrink: 0;
  display: block;
  opacity: 0.88;
  transition: opacity 0.15s;
}
.hp-identity-logo-link:hover { opacity: 1; }

.hp-identity-address {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244,241,232,0.62);
}
.hp-identity-sep { opacity: 0.35; }

/* Right-side cluster: CRS Active + Contact stacked */
.hp-identity-right {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.28rem;
  flex-shrink: 0;
}

.hp-identity-status {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  font-family: var(--font-mono);
  font-size: 0.60rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(244,241,232,0.62);
}

/* Contact link — sits directly below CRS ACTIVE */
.hp-identity-contact {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(244,241,232,0.42);
  border-bottom: 1px solid rgba(244,241,232,0.18);
  padding-bottom: 1px;
  transition: color 0.12s, border-color 0.12s;
  white-space: nowrap;
}
.hp-identity-contact:hover {
  color: rgba(244,241,232,0.85);
  border-color: rgba(194,164,58,0.55);
}

/* ============================================================
   LOCATION LOGO BADGE
   ============================================================ */
.loc-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.loc-logo-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.loc-logo--crs    .loc-logo-img { transform: scale(1.0); }
.loc-logo--cricket .loc-logo-img { transform: scale(0.82); }

.loc-logo--btn  { width: 28px; height: 17px; padding: 1px 2px; }
.loc-logo--rail { width: 188px; height: 70px; padding: 2px 3px; }  /* 2× larger */

.loc-logo--card {
  width: 52px; height: 28px;
  padding: 2px 4px;
  background: rgba(244,241,232,0.04);
  border: 1px solid rgba(244,241,232,0.08);
  border-radius: var(--r);
}
.loc-logo--card.loc-logo--crs     { border-color: rgba(194,164,58,0.22); }
.loc-logo--card.loc-logo--cricket { border-color: rgba(58,78,58,0.50); }

.loc-logo--footer { width: 116px; height: 42px; padding: 3px 6px; }

@media (max-width: 640px) {
  .loc-logo--rail   { width: 74px;  height: 27px; }
  .loc-logo--footer { width: 92px;  height: 34px; }
}

/* ============================================================
   LED INDICATORS
   ============================================================ */
.hp-led {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Green — status only, no glow blur */
.hp-led--on.hp-led--green {
  background: #3CB84A;
  box-shadow: none;
}
/* Red — recording/live signal only */
.hp-led--on.hp-led--red {
  background: var(--red);
  box-shadow: none;
}
/* Mustard — active state feedback */
.hp-led--on.hp-led--mustard {
  background: var(--mustard);
  box-shadow: none;
}
.hp-led--off { background: rgba(244,241,232,0.08); box-shadow: none; }

@keyframes led-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}
.hp-led--pulse { animation: led-pulse 2.8s ease-in-out infinite; }

/* ============================================================
   SEGMENTED VU METERS — live signal-driven broadcast meters
   Vertical bar: green 0–60%, amber 60–85%, red 85–100%
   Peak hold marker. Driven by rAF signal engine.
   ============================================================ */

/* Outer wrapper — pair container */
.rack-vu-pair {
  display: flex;
  gap: 4px;
  align-items: flex-end;
  flex-shrink: 0;
}

/* Single meter */
.rack-vu {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 18px;
}

.rack-vu-body {
  width: 100%;
  background: #0a0a0a;
  border: 1px solid #2a2a2a;
  border-radius: 1px;
  padding: 3px 2px 2px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.rack-vu-segments {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

/* Individual segment */
.rack-vu-seg {
  width: 14px;
  height: 4px;
  border-radius: 1px;
  transition: opacity 0.04s linear;
}

/* Unlit — very dim */
.rack-vu-seg--green  { background: #006400; opacity: 1; }
.rack-vu-seg--amber  { background: #B45A00; opacity: 1; }
.rack-vu-seg--red    { background: #8C0000; opacity: 1; }

/* Lit segments */
.rack-vu-seg--green.rack-vu-seg--lit  { background: #00B400; opacity: 1; box-shadow: 0 0 4px #00B400; }
.rack-vu-seg--amber.rack-vu-seg--lit  { background: #FFA000; opacity: 1; box-shadow: 0 0 4px #FFA000; }
.rack-vu-seg--red.rack-vu-seg--lit    { background: #DC0000; opacity: 1; box-shadow: 0 0 4px #DC0000; }

/* Peak hold marker — brighter than lit */
.rack-vu-seg--green.rack-vu-seg--peak  { background: #00B400; opacity: 1; box-shadow: 0 0 6px #00B400; }
.rack-vu-seg--amber.rack-vu-seg--peak  { background: #FFA000; opacity: 1; box-shadow: 0 0 6px #FFA000; }
.rack-vu-seg--red.rack-vu-seg--peak    { background: #DC0000; opacity: 1; box-shadow: 0 0 6px #DC0000; }

/* Channel label below meter */
.rack-vu-label {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 900;
  color: #4a5a4a;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1;
  text-align: center;
}

/* Legacy VU (kept for café panel compat — maps to segmented now) */
.hp-vu { display: none; }
.hp-vu-body, .hp-vu-face, .hp-vu-scale, .hp-vu-needle,
.hp-vu-needle-tip, .hp-vu-pivot, .hp-vu-label { display: none; }

/* Idle meters — base colours; higher-specificity block below overrides lit/size */
.hp-idle-meters .rack-vu-body { border-color: #3a3a3a; background: #080808; }

/* ============================================================
   MACHINE SHELL
   ============================================================ */
/* ============================================================
   RACK RAILS — anodised aluminium extrusion with hex bolts
   ============================================================ */
/* ═══════════════════════════════════════════════════════════════
   STEEL RACK RAILS — thick metallic pillars holding modules
   Sit IN FRONT of gear, cast heavy shadow inward
   ═══════════════════════════════════════════════════════════════ */
.srd-rail {
  width: 45px;
  flex-shrink: 0;
  /* Dark metallic steel gradient */
  background: linear-gradient(90deg, #111 0%, #2a2a2a 30%, #1a1a1a 70%, #0a0a0a 100%);
  border-left: 1px solid #333;
  border-right: 2px solid #000;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem 6px;
  align-items: center;
  /* Pull rails to the very front */
  z-index: 50;
  position: relative;
  /* Left rail casts shadow to the right (over the gear) */
  box-shadow: 
    inset -4px 0 8px rgba(0,0,0,0.6),
    15px 0 20px -5px rgba(0, 0, 0, 0.9);
}
.srd-rail--right {
  /* Mirrors the lighting for the right rail */
  transform: scaleX(-1);
  border-left: 2px solid #000;
  border-right: 1px solid #333;
  /* Right rail casts shadow to the left (over the gear) */
  box-shadow: 
    inset -4px 0 8px rgba(0,0,0,0.6),
    -15px 0 20px -5px rgba(0, 0, 0, 0.9);
}
@media (min-width: 640px) {
  .srd-rail { width: 44px; padding: 1.5rem 6px; }
}

/* Hex bolt icons */
.srd-bolt {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  filter:
    drop-shadow(0 1px 0 rgba(255,255,255,0.10))
    drop-shadow(0 2px 4px rgba(0,0,0,0.95));
}
.srd-bolt polygon { fill: #3e3e3e; stroke: #0d0d0d; stroke-width: 4; }
.srd-bolt circle:first-of-type { fill: #1f1f1f; }
.srd-bolt circle:last-of-type  { fill: #0a0a0a; }
/* Slight random rotation for realism */
.srd-bolt:nth-of-type(2n)  { transform: rotate(12deg); }
.srd-bolt:nth-of-type(3n)  { transform: rotate(-8deg); }
.srd-bolt:nth-of-type(5n)  { transform: rotate(22deg); }
.srd-bolt:nth-of-type(7n)  { transform: rotate(-15deg); }
.srd-bolt:nth-of-type(11n) { transform: rotate(33deg); }
@media (min-width: 640px) {
  .srd-bolt { width: 22px; height: 22px; }
}

/* ═══════════════════════════════════════════════════════════════
   HEAVY RACK CHASSIS — physical steel frame, centered, shadowed
   ═══════════════════════════════════════════════════════════════ */
.hp-machine {
  flex: 1;
  max-width: 1000px;   /* Forces hardware width */
  width: 100%;
  margin: 2rem auto;   /* Centers the rack on screen */
  padding: 10px 14px 14px;  /* Walnut sleeve inset */
  display: flex;
  flex-direction: row;   /* rails left | content | rails right */
  gap: 0;
  background-color: #2a1a0e;  /* Walnut base fallback */
  background-image: url('/static/walnut-texture.jpg');
  background-size: 512px 512px;
  background-repeat: repeat;
  box-shadow:
    0 0 60px 12px rgba(0,0,0,0.85),
    inset 0 2px 4px rgba(255,200,120,0.08),  /* warm top-edge highlight */
    inset 0 -2px 6px rgba(0,0,0,0.5);       /* bottom shadow */
  border-radius: 10px;
  position: relative;
  overflow: visible; /* Allow rack ears to extend outside */
}

/* ═══════════════════════════════════════════════════════════════
   RACK EARS — flat steel mounting flanges, extend left & right
   Each ear has 2 mounting holes (top + bottom)
   ═══════════════════════════════════════════════════════════════ */
.hp-machine::before,
.hp-machine::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40px;          /* Wider ears — proper 19" rack flange */
  background: linear-gradient(180deg,
    #2e2e2e 0%,
    #3a3a3a 12%,
    #2a2a2a 30%,
    #222 50%,
    #1e1e1e 70%,
    #2a2a2a 88%,
    #333 100%
  );
  border-top: 1px solid #555;   /* Top catch-light */
  border-bottom: 1px solid #111;
  box-shadow:
    inset 2px 0 4px rgba(255,255,255,0.08),
    inset -2px 0 5px rgba(0,0,0,0.7),
    0 0 12px rgba(0,0,0,0.8);
  z-index: 60;
}
.hp-machine::before {
  right: 100%;
  border-radius: 4px 0 0 4px;
  border-right: 2px solid #0a0a0a;
  border-left: 1px solid #444;
  /* Four mounting holes — top pair + bottom pair */
  background-image:
    /* Top hole */
    radial-gradient(circle 5px at 20px 22px, #060606 55%, transparent 56%),
    radial-gradient(circle 4px at 20px 22px, #1a1a1a 35%, transparent 36%),
    radial-gradient(circle 2px at 20px 22px, #333 20%, transparent 21%),
    /* Bottom hole */
    radial-gradient(circle 5px at 20px calc(100% - 22px), #060606 55%, transparent 56%),
    radial-gradient(circle 4px at 20px calc(100% - 22px), #1a1a1a 35%, transparent 36%),
    radial-gradient(circle 2px at 20px calc(100% - 22px), #333 20%, transparent 21%),
    /* Vertical centre groove */
    linear-gradient(90deg, transparent 18px, rgba(0,0,0,0.3) 19px, transparent 20px),
    linear-gradient(180deg, #2e2e2e 0%, #3a3a3a 12%, #2a2a2a 30%, #222 50%, #1e1e1e 70%, #2a2a2a 88%, #333 100%);
}
.hp-machine::after {
  left: 100%;
  border-radius: 0 4px 4px 0;
  border-left: 2px solid #0a0a0a;
  border-right: 1px solid #444;
  background-image:
    radial-gradient(circle 5px at 20px 22px, #060606 55%, transparent 56%),
    radial-gradient(circle 4px at 20px 22px, #1a1a1a 35%, transparent 36%),
    radial-gradient(circle 2px at 20px 22px, #333 20%, transparent 21%),
    radial-gradient(circle 5px at 20px calc(100% - 22px), #060606 55%, transparent 56%),
    radial-gradient(circle 4px at 20px calc(100% - 22px), #1a1a1a 35%, transparent 36%),
    radial-gradient(circle 2px at 20px calc(100% - 22px), #333 20%, transparent 21%),
    linear-gradient(90deg, transparent 20px, rgba(0,0,0,0.3) 21px, transparent 22px),
    linear-gradient(180deg, #2e2e2e 0%, #3a3a3a 12%, #2a2a2a 30%, #222 50%, #1e1e1e 70%, #2a2a2a 88%, #333 100%);
}
@media (max-width: 640px) {
  .hp-machine::before,
  .hp-machine::after { width: 20px; }
  .hp-machine::before { background-image:
    radial-gradient(circle 3px at 10px 14px, #060606 55%, transparent 56%),
    radial-gradient(circle 3px at 10px calc(100% - 14px), #060606 55%, transparent 56%),
    linear-gradient(180deg, #2e2e2e 0%, #3a3a3a 12%, #222 50%, #2a2a2a 88%, #333 100%);
  }
  .hp-machine::after { background-image:
    radial-gradient(circle 3px at 10px 14px, #060606 55%, transparent 56%),
    radial-gradient(circle 3px at 10px calc(100% - 14px), #060606 55%, transparent 56%),
    linear-gradient(180deg, #2e2e2e 0%, #3a3a3a 12%, #222 50%, #2a2a2a 88%, #333 100%);
  }
}

/* Mobile: reduce chassis margins, thinner rails */
@media (max-width: 1088px) {
  .hp-machine {
    margin: 1rem 0.5rem;
    max-width: calc(100% - 1rem);
  }
}
@media (max-width: 640px) {
  .hp-machine {
    margin: 0.5rem 0.25rem;
  }
  .srd-rail {
    width: 28px;
    padding: 1rem 3px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   MODULE STACK — physical gaps between rack units
   Wider seams expose the black void behind the gear
   ═══════════════════════════════════════════════════════════════ */
.hp-machine-inner {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;              /* Zero gap — modules sit flush, no black lines */
  background-color: #000;
  padding: 0;
}

/* ============================================================
   SCREEN MODULE — 3U rack unit with physical edges
   ============================================================ */
.hp-screen {
  overflow: hidden;
  /* No min-height — shrinks to fit content (sign + display fill the slot) */
  background: transparent;  /* transparent when idle so no black bleed */
  position: relative;
  border-top: 2px solid #3a3a3a;
  border-bottom: 3px solid #000;
  box-shadow:
    inset 0 8px 10px rgba(255,255,255,0.02),
    0 6px 10px rgba(0,0,0,0.4),
    inset 0 0 38px rgba(0,0,0,0.38);
  transition: border-color 0.5s ease, background 0.5s ease;
}

/* When a service panel is open (powered + active), give the screen room + dark bg */
.hp-page--powered .hp-screen:has(.hp-display-panel),
.hp-page--powered .hp-screen:has(.hp-loc-selector) {
  min-height: 340px;
  background-color: #000000;
}

/* Screen shifts toward warm when café is active */
.hp-page--cafe .hp-screen {
  border-color: var(--cafe-border);
  background: var(--cafe-bg);
  box-shadow:
    inset 0 0 30px rgba(47,62,47,0.08),
    0 0 0 1px rgba(194,164,58,0.12);
}

/* ═══════════════════════════════════════════════════════════════
   IDLE STATE — rack-mounted display layout
   ═══════════════════════════════════════════════════════════════ */

/* Module background: transparent — nothing bleeds behind sign/display */
.hp-idle {
  background: transparent;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ═══════════════════════════════════════════════════════════════
   SIGN MODULE — physically mounted rack unit (1U–2U)
   Treated as real installed hardware, not content
   ═══════════════════════════════════════════════════════════════ */
.hp-idle-faceplate {
  /* Rack unit spans FULL WIDTH — covers rails and bolts like real hardware */
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  margin: 0 -45px;
  background: transparent;  /* No background — sign image is self-contained */
  position: relative;
  z-index: 60;
}
/* Rail widths by breakpoint:
   ≤640px mobile: rail = 28px  → margin -28px
   ≥640px desktop: rail = 44px → margin -44px
*/
@media (max-width: 639px) {
  .hp-idle-faceplate {
    margin: 0 -28px;
  }
}
@media (min-width: 640px) {
  .hp-idle-faceplate {
    margin: 0 -44px;
  }
}

/* Rack-mounted sign stack — CRS sign + WC banner stacked vertically, zero gap */
.hp-idle-signs {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  gap: 0;          /* No gap — signs sit flush against each other */
  line-height: 0;  /* Kill any inline baseline gap */
}

/* Workshop Café banner sign — sits below CRS rack sign */
.hp-wc-banner-link {
  display: block;
  line-height: 0;  /* Kill inline gap */
}
.hp-wc-banner {
  display: block;
  width: 100%;
  height: auto;
  object-fit: fill;
  vertical-align: top;
  filter: drop-shadow(0px 3px 5px rgba(0,0,0,0.7));
  transition: filter 0.2s ease;
}
.hp-wc-banner:hover {
  filter: drop-shadow(0px 3px 5px rgba(0,0,0,0.7)) brightness(1.08);
}

/* Rack-mounted sign — full width matching other rack modules */
.hp-idle-sign {
  display: block;
  max-width: 100%;  /* Full rack width */
  width: 100%;
  height: auto;
  /* object-fit: fill so the cropped PNG fills exactly the slot with no letterboxing */
  object-fit: fill;
  vertical-align: top;   /* kill the inline 4px gap browsers add below images */
  /* Subtle mounting shadow — feels bolted in */
  filter: drop-shadow(0px 4px 6px rgba(0,0,0,0.8));
}

/* ═══════════════════════════════════════════════════════════════
   SIGN VU OVERLAY — live animated meters over the baked-in PNG columns
   Image: 1014 × 343 px  (rendered at 972px on desktop)
   L column: x=837..854px in PNG = left=82.5%, width=1.7%
   R column: x=886..903px in PNG = left=87.4%, width=1.7%
   Both: y=35..270px in PNG = top=10.2%, height=68.5%
   ═══════════════════════════════════════════════════════════════ */
.hp-sign-vu-wrap {
  position: relative;
  display: block;
  line-height: 0;
  width: 100%;       /* fills the idle-signs flex column */
  /* overlay is inset:0 so it covers exactly the image area */
}

/* Overlay container — covers the full image, children positioned within */
.hp-sign-vu-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Individual meter column — positioned over each baked-in column */
.hp-sign-vu-col {
  position: absolute;
  top: 10.2%;
  height: 68.5%;
  display: flex;
  flex-direction: column;
}
.hp-sign-vu-col--L {
  left: 82.5%;
  width: 1.7%;
}
.hp-sign-vu-col--R {
  left: 87.4%;
  width: 1.7%;
}

/* Segment column — fills the column div */
.hp-sign-vu-segs {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  gap: 1px;
  /* Dark backing to cover the baked-in static segments */
  background: #0a0a0a;
  padding: 1px;
  box-sizing: border-box;
}

/* Individual segment */
.hp-sign-vu-seg {
  flex: 1;
  border-radius: 1px;
  background: #111;  /* dark backing */
  transition: none;  /* rAF drives this — no CSS transition needed */
}

/* Off states — dark versions of each colour */
.hp-sign-vu-seg--green { background: #006400; }
.hp-sign-vu-seg--amber { background: #B45A00; }
.hp-sign-vu-seg--red   { background: #8C0000; }

/* Lit states — bright versions */
.hp-sign-vu-seg--green.hp-sign-vu-seg--lit  { background: #00B400; box-shadow: 0 0 4px #00B400; }
.hp-sign-vu-seg--amber.hp-sign-vu-seg--lit  { background: #FFA000; box-shadow: 0 0 4px #FFA000; }
.hp-sign-vu-seg--red.hp-sign-vu-seg--lit    { background: #DC0000; box-shadow: 0 0 4px #DC0000; }

/* Peak hold */
.hp-sign-vu-seg--green.hp-sign-vu-seg--peak { background: #00B400; box-shadow: 0 0 6px #00B400; }
.hp-sign-vu-seg--amber.hp-sign-vu-seg--peak { background: #FFA000; box-shadow: 0 0 6px #FFA000; }
.hp-sign-vu-seg--red.hp-sign-vu-seg--peak   { background: #DC0000; box-shadow: 0 0 6px #DC0000; }

/* ═══════════════════════════════════════════════════════════════
   DISPLAY MODULE — shallow status screen (real hardware)
   Compressed height, fitted bezel, smoked glass, scanlines
   ═══════════════════════════════════════════════════════════════ */
.hp-idle-display {
  /* Shallow fitted display module — top of idle stack */
  padding: 0;
  margin: 0 -45px;  /* Extend over rails like sign module */
  background: 
    linear-gradient(180deg, #0a0a0a 0%, #121212 50%, #0a0a0a 100%);
  position: relative;
  z-index: 60;
  /* Bezel: heavier top edge (overhead light catch), lighter bottom (connects to sign) */
  border: 4px solid #1a1a1a;
  border-top-width: 8px;
  border-bottom-width: 4px;
  border-radius: 2px;
  /* Recessed screen — inset shadow heavier at top */
  box-shadow: 
    inset 0 0 40px rgba(0,0,0,0.95),
    inset 0 10px 22px rgba(0,0,0,0.9),
    inset 0 -4px 10px rgba(0,0,0,0.70),
    0 -2px 0 rgba(255,255,255,0.03),
    0 3px 0 rgba(0,0,0,0.6);
  overflow: hidden;
}
/* Rail widths by breakpoint:
   ≤640px mobile: rail = 28px  → margin -28px
   ≥640px desktop: rail = 44px → margin -44px
*/
@media (max-width: 639px) {
  .hp-idle-display {
    margin: 0 -28px;
  }
}
@media (min-width: 640px) {
  .hp-idle-display {
    margin: 0 -44px;
  }
}

/* Display face — shallow screen with tight fit */
.hp-idle-lcd {
  padding: 1rem 1.5rem;  /* Compressed 40% from 1.75rem/2rem */
  position: relative;
  /* Internal glow + edge vignette */
  background: 
    radial-gradient(ellipse at center, rgba(40,40,40,0.4) 0%, rgba(0,0,0,0.8) 100%);
}
/* Monitor scanlines (more visible) */
.hp-idle-lcd::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 2px,
    rgba(0,0,0,0.3) 2px,
    rgba(0,0,0,0.3) 3px
  );
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
}
/* Screen glass reflection (top-left highlight) */
.hp-idle-lcd::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 60%;
  bottom: 70%;
  background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 100%);
  pointer-events: none;
  z-index: 3;
}

/* Display lines — system node descriptor */
.hp-display-line {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  text-align: center;
  text-transform: uppercase;
  position: relative;
  z-index: 2;
  display: block;
}

/* Line 1 — OXFORD (smaller, tighter) */
.hp-display-line--location {
  font-size: 22px;  /* Reduced from 28px */
  font-weight: 600;
  letter-spacing: 0.16em;
  color: rgba(255,255,255,0.88);
  line-height: 1.2;  /* Tighter from 1.3 */
  margin-bottom: 0.6rem;  /* Reduced from 1.2rem */
  text-shadow: 0 0 12px rgba(255,255,255,0.12);
  /* Fade in first (system booting) */
  animation: display-fade-in 0.6s ease-out forwards;
}

/* Line 2 — Mission statement */
.hp-display-line--mission {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: rgba(255,220,120,0.75);  /* Warm amber — distinct from white lines */
  line-height: 1.2;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 8px rgba(255,180,60,0.15);
  animation: display-fade-in 0.6s ease-out 0.1s forwards;
  opacity: 0;
}

/* Line 3 — Core services (compact, brightest) */
.hp-display-line--primary {
  font-size: 16px;  /* Reduced from 20px */
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #FFFFFF;
  opacity: 1;
  line-height: 1.3;  /* Tighter from 1.4 */
  margin-bottom: 0.4rem;  /* Reduced from 0.65rem */
  text-shadow: 0 0 14px rgba(255,255,255,0.18);
  /* Fade in second (100ms delay) */
  animation: display-fade-in 0.6s ease-out 0.1s forwards;
  opacity: 0;
}

/* Line 3 — Secondary services (compact, dimmer) */
.hp-display-line--secondary {
  font-size: 13px;  /* Reduced from 16px */
  font-weight: 500;
  letter-spacing: 0.10em;
  color: rgba(255,255,255,0.70);  /* Dimmer from 0.8 */
  line-height: 1.3;  /* Tighter from 1.4 */
  text-shadow: 0 0 8px rgba(255,255,255,0.06);
  /* Fade in third (200ms delay) */
  animation: display-fade-in 0.6s ease-out 0.2s forwards;
  opacity: 0;
}

/* System boot fade-in animation */
@keyframes display-fade-in {
  from {
    opacity: 0;
    transform: translateY(-2px);
  }
  to {
    opacity: inherit;
    transform: translateY(0);
  }
}

/* Meters removed — terminal screen only */

/* Single analogue dial wrapper */
.avu-dial {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 88px;
}

/* SVG dial — 1.5× the base 60px → ~90px wide */
.avu-svg {
  width: 88px;
  height: auto;
  display: block;
  /* Subtle glass depth */
  filter:
    drop-shadow(0 1px 2px rgba(0,0,0,0.55))
    drop-shadow(0 0 1px rgba(0,0,0,0.4));
}

/* Channel label beneath dial */
.avu-label {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4a5a4a;
  line-height: 1;
  text-align: center;
}

@media (max-width: 600px) {
  /* Sign and display must keep zero padding — any re-added padding creates black space */
  .hp-idle-faceplate { padding: 0; }
  .hp-idle-sign      { max-width: 100%; width: 100%; }
  .hp-idle-display   { padding: 0; }
  .hp-idle-meters    { gap: 1rem; padding: 1rem 1.25rem; }
}

/* ============================================================
   DISPLAY PANEL — animates in on state change
   ============================================================ */
@keyframes panel-enter {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes panel-enter-warm {
  from { opacity: 0; transform: translateY(3px); filter: saturate(0.7); }
  to   { opacity: 1; transform: translateY(0);   filter: saturate(1); }
}

.hp-display-panel { display: flex; flex-direction: column; }

.hp-display-panel--dark.hp-display-panel--enter {
  animation: panel-enter 0.28s ease-out both;
}
.hp-display-panel--warm.hp-display-panel--enter {
  animation: panel-enter-warm 0.42s ease-out both;
}

/* ── Chrome strip (dark panels only) ───────────────────── */
.hp-display-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.38rem 1.25rem;
  background: var(--nettle-deep);
  border-bottom: 1px solid var(--nettle-border);
}

.hp-display-chrome-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.60rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--offwhite-mute);
}

.hp-display-service-id {
  color: var(--mustard);
  letter-spacing: 0.18em;
  font-weight: 700;
}

.hp-display-chrome-right {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  opacity: 0.65;
}

/* ── Dark panel body ────────────────────────────────────── */
.hp-panel-body {
  padding: 1.75rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background: var(--nettle);
}

.hp-panel-header { display: flex; flex-direction: column; gap: 0.32rem; }

.hp-panel-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mustard);
  opacity: 0.75;
}

.hp-panel-title {
  font-family: var(--font-mono);
  font-size: clamp(1.1rem, 2.7vw, 1.55rem);
  font-weight: 700;
  color: var(--offwhite);
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.hp-panel-desc {
  font-size: 0.94rem;
  color: var(--offwhite-dim);
  line-height: 1.68;
  max-width: 52ch;
}

/* ── Spec table ─────────────────────────────────────────── */
.hp-specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0 1.5rem;
}

.hp-spec-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.38rem 0;
  border-bottom: 1px solid var(--nettle-border);
}

.hp-spec-key {
  font-family: var(--font-mono);
  font-size: 0.60rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--offwhite-mute);
  flex-shrink: 0;
  min-width: 74px;
}

.hp-spec-val {
  font-size: 0.86rem;
  color: var(--offwhite);
  line-height: 1.4;
}

/* ── CTA buttons ────────────────────────────────────────── */
.hp-panel-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.hp-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.62rem 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--r);
  cursor: pointer;
  transition: filter 0.12s, transform 0.1s, box-shadow 0.12s;
  border: 1px solid transparent;
  white-space: nowrap;
}
.hp-cta:hover  { filter: brightness(1.10); transform: translateY(-1px); }
.hp-cta:active { transform: translateY(0);  filter: brightness(0.94); }

.hp-cta-arrow { opacity: 0.60; transition: transform 0.12s, opacity 0.12s; }
.hp-cta:hover .hp-cta-arrow { transform: translateX(3px); opacity: 1; }

/* Dark mode CTA — mustard fill */
.hp-cta--primary {
  background: var(--mustard);
  color: var(--nettle-deep);
  border-color: #9A8028;
  box-shadow: 0 1px 6px rgba(194,164,58,0.22);
}
.hp-cta--primary:hover {
  background: var(--mustard-hi);
  box-shadow: 0 3px 12px var(--mustard-glow);
}

.hp-cta--secondary {
  background: transparent;
  color: var(--mustard);
  border-color: rgba(194,164,58,0.35);
}
.hp-cta--secondary:hover {
  background: var(--mustard-lo);
  border-color: var(--mustard);
}

/* Warm mode CTA — same mustard, reads differently on light bg */
.hp-cta--warm-primary {
  background: var(--mustard);
  color: var(--nettle-deep);
  border-color: #9A8028;
  box-shadow: 0 1px 6px rgba(194,164,58,0.28);
}
.hp-cta--warm-primary:hover {
  background: var(--mustard-hi);
  box-shadow: 0 3px 12px var(--mustard-glow);
}

/* Page link CTA — quiet ghost link inside panel */
.hp-cta--page-link {
  background: transparent;
  color: var(--offwhite-dim);
  border-color: var(--nettle-border);
  font-size: 0.65rem;
  letter-spacing: 0.10em;
}
.hp-cta--page-link:hover {
  color: var(--offwhite);
  border-color: var(--nettle-border-hi);
}

/* Warm secondary — for café panel */
.hp-cta--warm-secondary {
  background: transparent;
  color: var(--cafe-text-dim);
  border-color: var(--cafe-border);
  font-size: 0.65rem;
  letter-spacing: 0.10em;
}
.hp-cta--warm-secondary:hover {
  color: var(--cafe-text);
  border-color: var(--cafe-mustard);
}

/* ============================================================
   LOCATION SELECTOR — hardware-style intermediate layer
   Appears between service selection and service detail.
   Matches rack panel language: dark surface, monospaced labels,
   mustard/nettle accent system, physical button feel.
   ============================================================ */
/* ═══════════════════════════════════════════════════════════════
   LOCATION SELECTOR — Rack-mounted routing panel
   ═══════════════════════════════════════════════════════════════ */
.hp-loc-selector {
  display: flex;
  flex-direction: column;
  background: var(--nettle);
  animation: panel-enter 0.28s ease-out both;
}

/* Instruction header */
.hp-loc-body {
  padding: 1.25rem 1.75rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.hp-loc-header { display: flex; flex-direction: column; gap: 0.25rem; }
.hp-loc-instruction {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--offwhite-mute);
  margin: 0;
}

/* Location option buttons — rack destination modules */
.hp-loc-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}
@media (max-width: 560px) {
  .hp-loc-options { grid-template-columns: 1fr; }
}

/* Base card — panel-mounted module */
.hp-loc-btn {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  background: var(--nettle-deep);
  border: 1px solid var(--nettle-lift);
  border-radius: var(--r-md);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s, transform 0.10s;
  position: relative;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 3px 10px rgba(0,0,0,0.55),
    0 1px 3px rgba(0,0,0,0.4);
}
.hp-loc-btn:hover {
  background: var(--nettle-mid);
  border-color: var(--mustard);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.07),
    0 0 0 1px rgba(194,164,58,0.22),
    0 5px 18px rgba(0,0,0,0.55),
    0 0 22px rgba(194,164,58,0.10);
  transform: translateY(-2px);
}
.hp-loc-btn:active,
.hp-loc-btn--focused {
  transform: translateY(0);
  background: var(--nettle-mid);
  border-color: var(--mustard-hi);
  box-shadow:
    inset 0 2px 8px rgba(0,0,0,0.45),
    0 0 0 1px rgba(194,164,58,0.35),
    0 0 28px rgba(194,164,58,0.15);
}

/* CRS — mustard accent */
.hp-loc-btn--crs {
  border-top: 2px solid var(--mustard);
}
.hp-loc-btn--crs:hover { border-top-color: var(--mustard-hi); }
.hp-loc-btn--crs.hp-loc-btn--focused {
  border-top-color: var(--mustard-hi);
  box-shadow:
    inset 0 2px 8px rgba(0,0,0,0.45),
    0 0 0 1px rgba(194,164,58,0.4),
    0 0 30px rgba(194,164,58,0.18);
}

/* Cricket Road — yellow accent */
.hp-loc-btn--cricket {
  border-top: 2px solid #c8a800;
}
.hp-loc-btn--cricket:hover { border-top-color: #f0cc00; }
.hp-loc-btn--cricket.hp-loc-btn--focused {
  border-top-color: #f0cc00;
  box-shadow:
    inset 0 2px 8px rgba(0,0,0,0.45),
    0 0 0 1px rgba(240,204,0,0.35),
    0 0 30px rgba(240,204,0,0.15);
}

/* ── Top chrome strip: node label + LED ── */
.hp-loc-btn-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0.75rem 0.3rem;
  background: rgba(0,0,0,0.25);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.hp-loc-btn-node-label {
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--offwhite-mute);
  opacity: 0.75;
}

/* LEDs per location */
.hp-loc-btn-led {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  transition: background 0.15s, box-shadow 0.15s;
}
.hp-loc-btn-led--crs {
  background: rgba(194,164,58,0.35);
  box-shadow: 0 0 3px rgba(0,0,0,0.5);
}
.hp-loc-btn-led--cricket {
  background: rgba(200,168,0,0.35);
  box-shadow: 0 0 3px rgba(0,0,0,0.5);
}
.hp-loc-btn--focused .hp-loc-btn-led--crs,
.hp-loc-btn:hover .hp-loc-btn-led--crs {
  background: var(--mustard);
  box-shadow: 0 0 8px var(--mustard-glow), 0 0 3px var(--mustard);
}
.hp-loc-btn--focused .hp-loc-btn-led--cricket,
.hp-loc-btn:hover .hp-loc-btn-led--cricket {
  background: #f0cc00;
  box-shadow: 0 0 8px rgba(240,204,0,0.7), 0 0 3px #f0cc00;
}

/* ── Badge zone ── */
.hp-loc-btn-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1rem 0.5rem;
  min-height: 64px;
}
.hp-loc-btn-badge-img--cricket {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
  transition: transform 0.15s, filter 0.15s;
}
.hp-loc-btn--cricket:hover .hp-loc-btn-badge-img--cricket,
.hp-loc-btn--cricket.hp-loc-btn--focused .hp-loc-btn-badge-img--cricket {
  transform: scale(1.06) rotate(-3deg);
  filter: drop-shadow(0 3px 10px rgba(240,204,0,0.4));
}

/* ── Info block ── */
.hp-loc-btn-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  padding: 0.5rem 0.85rem 0.75rem;
  min-width: 0;
}
.hp-loc-btn-name {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--offwhite);
  line-height: 1.2;
}
.hp-loc-btn-address {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mustard);
  opacity: 0.85;
  margin-bottom: 0.2rem;
}
.hp-loc-btn--cricket .hp-loc-btn-address {
  color: #c8a800;
}
.hp-loc-btn-desc {
  font-size: 0.80rem;
  color: var(--offwhite-dim);
  line-height: 1.5;
}

/* ── Feature tags ── */
.hp-loc-btn-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.55rem;
}
.hp-loc-tag {
  font-family: var(--font-mono);
  font-size: 0.50rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.18rem 0.45rem;
  border-radius: 2px;
  border: 1px solid;
  line-height: 1.4;
}
.hp-loc-tag--crs {
  color: var(--mustard);
  border-color: rgba(194,164,58,0.35);
  background: rgba(194,164,58,0.07);
}
.hp-loc-tag--cricket {
  color: #c8a800;
  border-color: rgba(200,168,0,0.35);
  background: rgba(200,168,0,0.07);
}
.hp-loc-btn:hover .hp-loc-tag--crs,
.hp-loc-btn--focused .hp-loc-tag--crs {
  border-color: rgba(194,164,58,0.6);
  background: rgba(194,164,58,0.12);
}
.hp-loc-btn:hover .hp-loc-tag--cricket,
.hp-loc-btn--focused .hp-loc-tag--cricket {
  border-color: rgba(200,168,0,0.6);
  background: rgba(200,168,0,0.12);
}

/* ── Routing indicator ── */
.hp-loc-btn-route {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.3rem;
  padding: 0.4rem 0.75rem 0.5rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  background: rgba(0,0,0,0.18);
}
.hp-loc-route-icon {
  width: 14px;
  height: 14px;
  color: var(--offwhite-mute);
  transition: color 0.12s, transform 0.12s;
}
.hp-loc-route-label {
  font-family: var(--font-mono);
  font-size: 0.50rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--offwhite-mute);
  transition: color 0.12s;
}
.hp-loc-btn:hover .hp-loc-route-icon,
.hp-loc-btn--focused .hp-loc-route-icon {
  color: var(--mustard);
  transform: translateX(3px);
}
.hp-loc-btn--cricket:hover .hp-loc-route-icon,
.hp-loc-btn--cricket.hp-loc-btn--focused .hp-loc-route-icon {
  color: #f0cc00;
}
.hp-loc-btn:hover .hp-loc-route-label,
.hp-loc-btn--focused .hp-loc-route-label {
  color: var(--mustard);
}
.hp-loc-btn--cricket:hover .hp-loc-route-label,
.hp-loc-btn--cricket.hp-loc-btn--focused .hp-loc-route-label {
  color: #f0cc00;
}

/* Back button — quiet ghost control */
.hp-loc-back {
  display: flex;
  align-items: center;
  padding-top: 0.25rem;
  border-top: 1px solid var(--nettle-border);
}
.hp-loc-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: none;
  color: var(--offwhite-mute);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0.3rem 0;
  transition: color 0.12s;
}
.hp-loc-back-btn:hover { color: var(--offwhite); }

/* ── Location nav strip inside service panel ── */
.hp-panel-location-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 1.25rem;
  background: var(--nettle-deep);
  border-bottom: 1px solid var(--nettle-border);
  flex-wrap: wrap;
}

.hp-panel-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: 1px solid var(--nettle-border);
  color: var(--offwhite-mute);
  font-family: var(--font-mono);
  font-size: 0.60rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0.28rem 0.65rem;
  border-radius: var(--r);
  transition: color 0.12s, border-color 0.12s;
}
.hp-panel-back-btn:hover {
  color: var(--offwhite);
  border-color: var(--mustard);
}

.hp-panel-location-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.60rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mustard);
  opacity: 0.85;
}

/* Single-location rehearsal layout */
.hp-rehearsal-split--single {
  grid-template-columns: 1fr;
  max-width: 380px;
}

/* Mobile loc body padding */
@media (max-width: 640px) {
  .hp-loc-body { padding: 1.2rem 1rem 1.5rem; }
  .hp-panel-location-nav { padding: 0.5rem 0.75rem; }
}

/* ============================================================
   REHEARSAL PANEL — two-location cards
   ============================================================ */
.hp-panel-body--rehearsal { gap: 1.2rem; }

.hp-rehearsal-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 620px) {
  .hp-rehearsal-split { grid-template-columns: 1fr; }
}

.hp-rehearsal-card {
  padding: 1.2rem;
  border-radius: var(--r-md);
  background: var(--nettle-mid);
  border: 1px solid var(--nettle-border);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
/* Mustard top accent for CRS; nettle-lift accent for Cricket */
.hp-rehearsal-card--crs     { border-top: 2px solid var(--mustard); }
.hp-rehearsal-card--cricket { border-top: 2px solid var(--nettle-lift); }

.hp-rehearsal-card-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.hp-rehearsal-name {
  font-family: var(--font-mono);
  font-size: 0.80rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--offwhite);
}
.hp-rehearsal-post {
  font-family: var(--font-mono);
  font-size: 0.60rem;
  letter-spacing: 0.10em;
  color: var(--mustard);
  opacity: 0.60;
  margin-top: 1px;
}

.hp-rehearsal-specs {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.26rem;
  flex: 1;
}
.hp-rehearsal-specs li {
  font-size: 0.83rem;
  color: var(--offwhite-dim);
  padding-left: 0.9rem;
  position: relative;
}
.hp-rehearsal-specs li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--mustard);
  opacity: 0.65;
}

/* ============================================================
   ████████████████████████████████████████████████████████
   WORKSHOP CAFÉ PANEL — the full warm mode
   "Stepping out of the control room into the café"
   ████████████████████████████████████████████████████████
   ============================================================ */

/* Entire display switches to off-white */
.hp-display-panel--warm {
  background: var(--cafe-bg);
}

/* ── Sign-shaped header ─────────────────────────────────── */
/*
   Borrows from the physical café sign language:
   a slight angled bottom, warm parchment field,
   thick mustard left rule, hand-printed feel
*/
.hp-cafe-sign-header {
  position: relative;
  padding: 1.4rem 2rem 1.2rem;
  background: var(--cafe-surface);
  border-bottom: 2px solid var(--cafe-border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;

  /* Angled bottom — signage motif */
  clip-path: polygon(
    0 0,
    100% 0,
    100% calc(100% - 10px),
    97% 100%,
    3%  100%,
    0   calc(100% - 10px)
  );

  /* Subtle horizontal line texture — aged paper */
  background-image: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 7px,
    rgba(47,62,47,0.030) 7px,
    rgba(47,62,47,0.030) 8px
  );
}

/* Thick mustard left rule — like a printed sign border */
.hp-cafe-sign-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 4px;
  background: var(--mustard);
}

.hp-cafe-sign-inner {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.hp-cafe-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--cafe-mustard);
  font-weight: 600;
}

.hp-cafe-logo-mark {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 2px;
  opacity: 0.80;
}

.hp-cafe-title {
  font-family: var(--font-mono);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 700;
  color: var(--cafe-text);
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.hp-cafe-subtitle {
  font-size: 0.87rem;
  color: var(--cafe-text-dim);
  font-style: italic;
}

.hp-cafe-meters {
  display: flex;
  gap: 0.4rem;
  align-self: flex-start;
  opacity: 0.55;
  margin-top: 2px;
}

/* ── Café body ──────────────────────────────────────────── */
.hp-cafe-body {
  padding: 1.5rem 2rem 2rem;
  background: var(--cafe-bg);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hp-cafe-desc {
  font-size: 0.96rem;
  color: var(--cafe-text);
  line-height: 1.72;
  max-width: 52ch;
  opacity: 0.82;
}

.hp-cafe-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 640px) {
  .hp-cafe-grid { grid-template-columns: 1fr; }
}

/* ── Spec cards (print-like, warm) ──────────────────────── */
.hp-cafe-spec-cards {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.hp-cafe-spec-card {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  padding: 0.48rem 0.7rem;
  background: var(--cafe-surface);
  border: 1px solid var(--cafe-border);
  border-left: 3px solid var(--cafe-mustard);
  border-radius: 0 var(--r) var(--r) 0;
  box-shadow: 0 1px 2px rgba(47,62,47,0.07);
}

.hp-cafe-spec-key {
  font-family: var(--font-mono);
  font-size: 0.60rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cafe-mustard);
  flex-shrink: 0;
  min-width: 58px;
  font-weight: 700;
}

.hp-cafe-spec-val {
  font-size: 0.86rem;
  color: var(--cafe-text);
  line-height: 1.4;
}

/* ── CTA block ──────────────────────────────────────────── */
.hp-cafe-cta-block {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.2rem;
  background: var(--cafe-deep);
  border: 1px solid var(--cafe-border);
  border-radius: var(--r-md);
  box-shadow:
    inset 0 1px 0 rgba(244,241,232,0.55),
    0 2px 6px rgba(47,62,47,0.09);
}

.hp-cafe-cta-lead {
  font-size: 0.87rem;
  color: var(--cafe-text-dim);
  line-height: 1.62;
}

.hp-cafe-social-link {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--cafe-text);
  opacity: 0.55;
  text-decoration: underline;
  text-decoration-color: rgba(47,62,47,0.25);
  text-underline-offset: 3px;
  transition: opacity 0.14s;
}
.hp-cafe-social-link:hover { opacity: 0.90; }

/* ============================================================
   ████████████████████████████████████████████████████████
   SERVICE CONTROLS — hardware button panel below screen
   ████████████████████████████████████████████████████████
   ============================================================ */
/* ═══════════════════════════════════════════════════════════════
   CONTROL MODULE — lower rack unit with physical edges
   ═══════════════════════════════════════════════════════════════ */
.hp-controls {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #0E0E0E;
  /* 3D module edges */
  background-color: #1f1f1f;
  border-top: 2px solid #3a3a3a;       /* Overhead light catch */
  border-bottom: 3px solid #000;       /* Heavy bottom shadow */
  box-shadow:
    inset 0 8px 10px rgba(255,255,255,0.02),
    0 6px 10px rgba(0,0,0,0.4);
}

/* Seam rail — flat divider line */
.hp-controls-rail {
  height: 1px;
  background: #2a2a2a;
}

/* Button grid — same columns/gap/padding as .hp-action-bar-grid for vertical alignment */
.hp-controls-buttons {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  padding: 0.5rem 1.5rem 1.5rem;
  background: transparent;
}

@media (max-width: 720px) {
  .hp-controls-buttons { grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 1rem 0.75rem 1.25rem; }
}
@media (max-width: 420px) {
  .hp-controls-buttons { grid-template-columns: repeat(2, 1fr); gap: 2px; padding: 0.75rem 0.5rem 1rem; }
}

/* ═══════════════════════════════════════════════════════════════
   RACK BUTTON — physical hardware switch
   States: idle | hover | press | active
   Physical: bevel, inset shadow, LED, translateY on press
   ═══════════════════════════════════════════════════════════════ */
.rack-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 1.4rem 1rem 1.45rem;
  margin: 4px;
  min-height: 110px;

  /* MUSTARD default state — warm neon standby */
  background:
    linear-gradient(180deg,
      #2a2208 0%,
      #1f1a06 40%,
      #151204 100%
    );
  border: 1px solid #5a4a15;
  border-bottom-color: #3a2a0a;
  border-radius: 2px;

  /* Machined bevel */
  box-shadow:
    inset 0 1px 0 rgba(200,170,66,0.08),
    inset 0 -1px 0 rgba(0,0,0,0.7),
    inset 1px 0 0 rgba(200,170,66,0.04),
    inset -1px 0 0 rgba(0,0,0,0.5),
    0 0 10px rgba(181,166,66,0.30);

  color: rgba(200,176,64,0.90);
  cursor: pointer;
  transition:
    border-color   0.08s ease,
    color          0.08s ease,
    transform      0.06s ease,
    box-shadow     0.08s ease,
    background     0.08s ease;
  will-change: transform;
  touch-action: manipulation;
  user-select: none;
}

/* Hover — brighter mustard neon glow */
.rack-btn:hover:not(.rack-btn--active) {
  color: #FFEBB0;
  border-color: #C9A227;
  border-bottom-color: #8A7830;
  background:
    linear-gradient(180deg,
      #3a2f08 0%,
      #2a2206 40%,
      #1a1604 100%
    );
  box-shadow:
    0 0 12px rgba(200,170,66,0.60),
    0 0 24px rgba(200,170,66,0.35),
    inset 0 1px 0 rgba(255,235,120,0.18),
    inset 0 -1px 0 rgba(0,0,0,0.7);
  /* Flicker animation — subtle strobe before settling */
  animation: btn-flicker 0.35s ease-out forwards;
}

@keyframes btn-flicker {
  0%   { box-shadow: 0 0 8px rgba(200,170,66,0.4), inset 0 1px 0 rgba(255,235,120,0.1); }
  15%  { box-shadow: 0 0 16px rgba(200,170,66,0.65), 0 0 28px rgba(200,170,66,0.40), inset 0 1px 0 rgba(255,235,120,0.2); }
  30%  { box-shadow: 0 0 6px rgba(200,170,66,0.35), inset 0 1px 0 rgba(255,235,120,0.08); }
  50%  { box-shadow: 0 0 14px rgba(200,170,66,0.60), 0 0 26px rgba(200,170,66,0.38), inset 0 1px 0 rgba(255,235,120,0.18); }
  100% { box-shadow: 0 0 12px rgba(200,170,66,0.60), 0 0 24px rgba(200,170,66,0.35), inset 0 1px 0 rgba(255,235,120,0.18), inset 0 -1px 0 rgba(0,0,0,0.7); }
}

/* Physical press — button depresses 1px */
.rack-btn--press {
  transform: translateY(1px);
  box-shadow:
    inset 0 2px 4px rgba(0,0,0,0.8),
    inset 0 -0px 0 rgba(0,0,0,0.2);
}

/* Active / selected — GREEN indicator, system ready */
.rack-btn--active {
  background:
    linear-gradient(180deg,
      #0a1f0a 0%,
      #061806 40%,
      #041004 100%
    );
  border-color: #2ECC40;
  border-bottom-color: #1a8028;
  color: #5FFF6A;
  box-shadow:
    inset 0 2px 6px rgba(0,0,0,0.90),
    inset 0 -1px 0 rgba(46,204,64,0.15),
    0 0 12px rgba(46,204,64,0.40),
    0 0 24px rgba(46,204,64,0.20);
}

/* Focus visible — keyboard nav */
.rack-btn:focus-visible {
  outline: 2px solid var(--mustard);
  outline-offset: 1px;
  z-index: 2;
}

/* Café rack button — WC brand: mustard + sage */
.rack-btn--cafe {
  border-color: rgba(90,122,40,0.45);  /* sage border at rest */
  color: rgba(194,164,58,0.65);        /* mustard text at rest */
}
.rack-btn--cafe:hover:not(.rack-btn--active) {
  background: rgba(194,164,58,0.10);   /* mustard wash on hover */
  border-color: #5a7a28;               /* sage green */
  color: #C2A43A;                      /* full mustard */
}
.rack-btn--cafe.rack-btn--active {
  background: rgba(194,164,58,0.18);   /* mustard fill when active */
  border-color: #7aaa38;               /* bright sage */
  color: #D8B94A;                      /* mustard-hi */
  box-shadow: 0 0 8px rgba(194,164,58,0.30);
}

/* ── Button label — brightens to orange on hover ─────────── */
.rack-btn-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.2;
  transition: color 0.08s ease;
}
.rack-btn:hover:not(.rack-btn--active) .rack-btn-label {
  color: #FFB870;
  pointer-events: none;
  color: inherit;
}

/* ── Per-button LED indicator ───────────────────────────── */
.rack-btn-led {
  display: block;
  width: 5px; height: 5px;
  border-radius: 50%;
  pointer-events: none;
  flex-shrink: 0;
  transition: background 0.12s ease, box-shadow 0.12s ease;
}

/* Off — nearly invisible housing indent */
.rack-btn-led--off {
  background: rgba(255,255,255,0.06);
  box-shadow: inset 0 1px 1px rgba(0,0,0,0.8);
}

/* Active — solid green, no soft glow, just clean LED */
.rack-btn-led--active {
  background: #2ECC40;
  box-shadow: none;
}

/* Bloom — brief bright flash on click, then fades to active */
@keyframes led-bloom {
  0%   { background: #7FFFA0; box-shadow: none; }
  30%  { background: #4EE860; }
  100% { background: #2ECC40; }
}
.rack-btn-led--bloom {
  animation: led-bloom 0.38s ease-out forwards;
}

/* Legacy selectors — kept for any residual refs */
.hp-ctrl-btn        { display: none; }
.hp-ctrl-label      { display: none; }
.hp-ctrl-led        { display: none; }

/* ═══════════════════════════════════════════════════════════════
   PER-SERVICE COLOUR-CODED RACK BUTTONS
   Each service has its own accent: border, glow, LED, active state.
   Idle state is still the shared dark mustard faceplate.
   ═══════════════════════════════════════════════════════════════ */

/* ── RECORDING — Emerald green ──────────────────────────────── */
.rack-btn--recording:hover:not(.rack-btn--active) {
  border-color: #2ECC71;
  border-bottom-color: #1a8048;
  color: #7DFFA0;
  background: linear-gradient(180deg, #0a2010 0%, #061808 40%, #041004 100%);
  box-shadow:
    0 0 12px rgba(46,204,113,0.55),
    0 0 24px rgba(46,204,113,0.30),
    inset 0 1px 0 rgba(100,255,150,0.14),
    inset 0 -1px 0 rgba(0,0,0,0.7);
  animation: btn-flicker-recording 0.35s ease-out forwards;
}
@keyframes btn-flicker-recording {
  0%   { box-shadow: 0 0 8px rgba(46,204,113,0.4); }
  15%  { box-shadow: 0 0 18px rgba(46,204,113,0.65), 0 0 30px rgba(46,204,113,0.35); }
  30%  { box-shadow: 0 0 6px rgba(46,204,113,0.3); }
  50%  { box-shadow: 0 0 14px rgba(46,204,113,0.55), 0 0 26px rgba(46,204,113,0.30); }
  100% { box-shadow: 0 0 12px rgba(46,204,113,0.55), 0 0 24px rgba(46,204,113,0.30), inset 0 1px 0 rgba(100,255,150,0.14), inset 0 -1px 0 rgba(0,0,0,0.7); }
}
.rack-btn--recording.rack-btn--active {
  border-color: #2ECC71;
  border-bottom-color: #1a8048;
  color: #7DFFA0;
  background: linear-gradient(180deg, #0a2010 0%, #061808 40%, #041004 100%);
  box-shadow:
    inset 0 2px 6px rgba(0,0,0,0.90),
    0 0 14px rgba(46,204,113,0.45),
    0 0 28px rgba(46,204,113,0.22);
}

/* ── REHEARSAL — Amber yellow ───────────────────────────────── */
.rack-btn--rehearsal:hover:not(.rack-btn--active) {
  border-color: #F0A500;
  border-bottom-color: #a06800;
  color: #FFD060;
  background: linear-gradient(180deg, #221600 0%, #181000 40%, #100a00 100%);
  box-shadow:
    0 0 12px rgba(240,165,0,0.55),
    0 0 24px rgba(240,165,0,0.30),
    inset 0 1px 0 rgba(255,210,80,0.14),
    inset 0 -1px 0 rgba(0,0,0,0.7);
  animation: btn-flicker-rehearsal 0.35s ease-out forwards;
}
@keyframes btn-flicker-rehearsal {
  0%   { box-shadow: 0 0 8px rgba(240,165,0,0.4); }
  15%  { box-shadow: 0 0 18px rgba(240,165,0,0.65), 0 0 30px rgba(240,165,0,0.35); }
  30%  { box-shadow: 0 0 6px rgba(240,165,0,0.3); }
  50%  { box-shadow: 0 0 14px rgba(240,165,0,0.55), 0 0 26px rgba(240,165,0,0.30); }
  100% { box-shadow: 0 0 12px rgba(240,165,0,0.55), 0 0 24px rgba(240,165,0,0.30), inset 0 1px 0 rgba(255,210,80,0.14), inset 0 -1px 0 rgba(0,0,0,0.7); }
}
.rack-btn--rehearsal.rack-btn--active {
  border-color: #F0A500;
  border-bottom-color: #a06800;
  color: #FFD060;
  background: linear-gradient(180deg, #221600 0%, #181000 40%, #100a00 100%);
  box-shadow:
    inset 0 2px 6px rgba(0,0,0,0.90),
    0 0 14px rgba(240,165,0,0.45),
    0 0 28px rgba(240,165,0,0.22);
}

/* ── CONTROL ROOM — Electric blue ──────────────────────────── */
.rack-btn--controlroom:hover:not(.rack-btn--active) {
  border-color: #4A9EFF;
  border-bottom-color: #2060b0;
  color: #90C8FF;
  background: linear-gradient(180deg, #060e1f 0%, #040c18 40%, #020810 100%);
  box-shadow:
    0 0 12px rgba(74,158,255,0.55),
    0 0 24px rgba(74,158,255,0.30),
    inset 0 1px 0 rgba(120,180,255,0.14),
    inset 0 -1px 0 rgba(0,0,0,0.7);
  animation: btn-flicker-controlroom 0.35s ease-out forwards;
}
@keyframes btn-flicker-controlroom {
  0%   { box-shadow: 0 0 8px rgba(74,158,255,0.4); }
  15%  { box-shadow: 0 0 18px rgba(74,158,255,0.65), 0 0 30px rgba(74,158,255,0.35); }
  30%  { box-shadow: 0 0 6px rgba(74,158,255,0.3); }
  50%  { box-shadow: 0 0 14px rgba(74,158,255,0.55), 0 0 26px rgba(74,158,255,0.30); }
  100% { box-shadow: 0 0 12px rgba(74,158,255,0.55), 0 0 24px rgba(74,158,255,0.30), inset 0 1px 0 rgba(120,180,255,0.14), inset 0 -1px 0 rgba(0,0,0,0.7); }
}
.rack-btn--controlroom.rack-btn--active {
  border-color: #4A9EFF;
  border-bottom-color: #2060b0;
  color: #90C8FF;
  background: linear-gradient(180deg, #060e1f 0%, #040c18 40%, #020810 100%);
  box-shadow:
    inset 0 2px 6px rgba(0,0,0,0.90),
    0 0 14px rgba(74,158,255,0.45),
    0 0 28px rgba(74,158,255,0.22);
}

/* ── REPAIRS — Burnt orange ─────────────────────────────────── */
.rack-btn--repairs:hover:not(.rack-btn--active) {
  border-color: #E8650A;
  border-bottom-color: #a04006;
  color: #FFAA60;
  background: linear-gradient(180deg, #1f0e02 0%, #160a01 40%, #0e0600 100%);
  box-shadow:
    0 0 12px rgba(232,101,10,0.55),
    0 0 24px rgba(232,101,10,0.30),
    inset 0 1px 0 rgba(255,160,80,0.14),
    inset 0 -1px 0 rgba(0,0,0,0.7);
  animation: btn-flicker-repairs 0.35s ease-out forwards;
}
@keyframes btn-flicker-repairs {
  0%   { box-shadow: 0 0 8px rgba(232,101,10,0.4); }
  15%  { box-shadow: 0 0 18px rgba(232,101,10,0.65), 0 0 30px rgba(232,101,10,0.35); }
  30%  { box-shadow: 0 0 6px rgba(232,101,10,0.3); }
  50%  { box-shadow: 0 0 14px rgba(232,101,10,0.55), 0 0 26px rgba(232,101,10,0.30); }
  100% { box-shadow: 0 0 12px rgba(232,101,10,0.55), 0 0 24px rgba(232,101,10,0.30), inset 0 1px 0 rgba(255,160,80,0.14), inset 0 -1px 0 rgba(0,0,0,0.7); }
}
.rack-btn--repairs.rack-btn--active {
  border-color: #E8650A;
  border-bottom-color: #a04006;
  color: #FFAA60;
  background: linear-gradient(180deg, #1f0e02 0%, #160a01 40%, #0e0600 100%);
  box-shadow:
    inset 0 2px 6px rgba(0,0,0,0.90),
    0 0 14px rgba(232,101,10,0.45),
    0 0 28px rgba(232,101,10,0.22);
}

/* ── Status strip at bottom ──────────────────────────────── */
.hp-controls-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.38rem;
  padding: 0.28rem 0.9rem;
  border-top: 1px solid rgba(0,0,0,0.45);
  background: rgba(0,0,0,0.20);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--offwhite-mute);
}

/* ============================================================
   TRUST / FOOTER STRIP
   ============================================================ */
/* ═══════════════════════════════════════════════
   SPEC MODULE — 1U rack-mounted system data plate
   Sits inside hp-machine-inner, below service controls
   ═══════════════════════════════════════════════ */
.hp-spec-plate {
  /* Rack module material — same dark faceplate as other modules */
  background: linear-gradient(180deg, #1a1a1a 0%, #141414 100%);
  border-top: 2px solid #2a2a2a;    /* Top edge catch-light */
  border-bottom: 3px solid #000;    /* Heavy bottom shadow seam */
  border-left: none;
  border-right: none;
  padding: 1rem 2rem 1.1rem;
  margin: 0;
  width: 100%;
  color: #4a4a4a;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow:
    inset 0 6px 12px rgba(0,0,0,0.6),
    inset 0 -2px 4px rgba(255,255,255,0.02);
  position: relative;
  /* Two-column grid: label rows side by side */
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 0 2rem;
  align-items: start;
}

/* Top edge screw-rail line */
.hp-spec-plate::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,255,255,0.07) 20%,
    rgba(255,255,255,0.04) 80%,
    transparent 100%
  );
}
.hp-spec-plate::after { content: none; }

.hp-spec-header {
  grid-column: 1 / -1;              /* Full width header row */
  color: #8c7322;
  border-bottom: 1px solid #222;
  padding-bottom: 0.5rem;
  margin-bottom: 0.6rem;
  font-weight: bold;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.hp-spec-header::before {
  content: '■';
  color: #3a3a3a;
  font-size: 6px;
}

.hp-spec-body {
  display: contents; /* Let p tags flow into grid columns */
}

.hp-spec-body p {
  margin: 0 0 0.35rem;
  line-height: 1.5;
  color: #4a4a4a;
}

.hp-spec-body strong {
  color: #5a5a5a;
}

.hp-spec-footer {
  grid-column: 1 / -1;              /* Full width footer row */
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 0.6rem;
  padding-top: 0.5rem;
  border-top: 1px solid #1e1e1e;
  color: #8c7322;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
}

@media (max-width: 640px) {
  .hp-spec-plate {
    grid-template-columns: 1fr;
    padding: 0.85rem 1rem 0.9rem;
  }
}

/* ═══════════════════════════════════════════════════════════════
   TRUST RAIL — bottom structural rim of the rack
   ═══════════════════════════════════════════════════════════════ */
.hp-trust-strip {
  background-color: #050505;
  border-top: 2px solid #111;
  margin-top: auto;
}

.hp-trust-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1.6rem 1.5rem 1.25rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.7rem;
}

@media (max-width: 768px) {
  .hp-trust-inner { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
}
@media (max-width: 480px) {
  .hp-trust-inner { grid-template-columns: 1fr; gap: 1rem; }
}

.hp-trust-brand {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
/* Workshop Café circular logo in footer */
.hp-trust-logos {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.hp-wc-footer-logo-link {
  display: block;
  flex-shrink: 0;
}
.hp-wc-footer-logo {
  display: block;
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 50%;
  transition: transform 0.2s ease, filter 0.2s ease;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
}
.hp-wc-footer-logo:hover {
  transform: scale(1.08);
  filter: drop-shadow(0 2px 6px rgba(194,164,58,0.5));
}

.hp-trust-tag {
  font-size: 0.80rem;
  color: var(--offwhite-mute);
  line-height: 1.5;
}

.hp-trust-links {
  display: flex;
  flex-direction: column;
  gap: 0.30rem;
}
.hp-trust-links a {
  font-size: 0.82rem;
  color: #555;
  text-decoration: none;
  transition: color 0.2s ease;
}
.hp-trust-links a:hover { color: #c9a227; /* Mustard hover */ }

.hp-trust-locations {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.hp-trust-address {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  font-size: 0.80rem;
  color: var(--offwhite-dim);
}
.hp-trust-address strong { color: var(--mustard); font-size: 0.82rem; }
.hp-trust-address a { color: var(--mustard); font-size: 0.78rem; transition: color 0.12s; }
.hp-trust-address a:hover { color: var(--mustard-hi); }

.hp-trust-base {
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
  padding: 0.62rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid #111;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.60rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #333;
}

/* ============================================================
   MOBILE POLISH
   ============================================================ */
@media (max-width: 640px) {
  .hp-machine { padding: 0; }
  .hp-machine-inner { padding: 0; }

  /* Identity rail: stack address on small screens */
  .hp-identity-rail { flex-wrap: wrap; gap: 0.5rem; padding: 0.5rem 0.75rem; }
  .hp-identity-address { font-size: 0.62rem; }
  .hp-identity-contact { font-size: 0.62rem; }

  /* Screen shrinks to fit content — no min-height set */

  .hp-panel-body { padding: 1rem 0.85rem 1.25rem; gap: 1rem; }
  .hp-specs { grid-template-columns: 1fr; }
  .hp-spec-key { font-size: 0.65rem; min-width: 80px; }
  .hp-spec-val { font-size: 0.90rem; }
  .hp-panel-desc { font-size: 0.90rem; }
  .hp-panel-title { font-size: clamp(1rem, 5vw, 1.3rem); }

  .hp-panel-ctas { flex-direction: column; }
  .hp-cta { justify-content: center; }

  /* Rack buttons — proper 44px touch targets, readable labels */
  .rack-btn { min-height: 60px; padding: 0.6rem 0.4rem 0.65rem; margin: 1px; }
  .rack-btn-label { font-size: 0.65rem; letter-spacing: 0.05em; }

  /* Action bar — compact on mobile, full-width stacked buttons */
  .hp-action-bar { padding: 0.5rem 0.75rem; gap: 0.3rem; flex-direction: column; align-items: stretch; }
  .hp-action-btn { padding: 0.7rem 1rem; font-size: 0.72rem; min-height: 44px; justify-content: center; width: 100%; }

  /* Display panel — more breathing room on mobile */
  .hp-display-chrome { padding: 0.38rem 0.85rem; }
  .hp-cta { min-height: 48px; font-size: 0.78rem; padding: 0.75rem 1rem; white-space: normal; text-align: center; }

  /* Idle LCD — tighter on mobile */
  .hp-idle-lcd { padding: 0.6rem 1rem; }
  .hp-display-line--location { font-size: 18px; }
  .hp-display-line--primary { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  .hp-cafe-sign-header {
    padding: 1.1rem 1rem 1rem;
    clip-path: none;
  }
  .hp-cafe-body { padding: 1.1rem 1rem 1.5rem; }
  .hp-cafe-grid { grid-template-columns: 1fr; }
  .hp-cafe-meters { display: none; }
}

/* ============================================================
   POWER-ON STATE — page starts off, fades in on mount
   ============================================================ */
@keyframes rack-power-on {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

/* Chrome right side — full opacity for live meters */
.hp-display-chrome-right {
  opacity: 1 !important;
}

/* ── Power-on LED sweep ─────────────────────────────────── */
/* Buttons fade in staggered — each rack-btn gets a short delay */
.hp-page--powered .rack-btn:nth-child(1) { animation: rack-power-on 0.25s 0.05s ease both; }
.hp-page--powered .rack-btn:nth-child(2) { animation: rack-power-on 0.25s 0.10s ease both; }
.hp-page--powered .rack-btn:nth-child(3) { animation: rack-power-on 0.25s 0.15s ease both; }
.hp-page--powered .rack-btn:nth-child(4) { animation: rack-power-on 0.25s 0.20s ease both; }
.hp-page--powered .rack-btn:nth-child(5) { animation: rack-power-on 0.25s 0.25s ease both; }
.hp-page--powered .rack-btn:nth-child(6) { animation: rack-power-on 0.25s 0.30s ease both; }

/* Before powered class — buttons invisible */
:not(.hp-page--powered) .rack-btn { opacity: 0; }

/* ── Segmented VU meter — display chrome size ───────────── */
/* In the panel chrome strip the meters are slightly smaller */
.hp-display-chrome-right .rack-vu {
  width: 14px;
}
.hp-display-chrome-right .rack-vu-seg {
  width: 10px;
  height: 3px;
}
.hp-display-chrome-right .rack-vu-body {
  padding: 2px 1px 1px;
}
.hp-display-chrome-right .rack-vu-label {
  font-size: 7px;
}

/* ── Idle meters — scaled 1.5× for readability, high contrast ─ */
.hp-idle-meters .rack-vu {
  width: 24px;
}
.hp-idle-meters .rack-vu-seg {
  width: 20px;
  height: 6px;
}
.hp-idle-meters .rack-vu-body {
  padding: 4px 2px 3px;
  border-color: #3a3a3a;
  background: #080808;
}
/* Override the earlier subtle-opacity block with full contrast */
.hp-idle-meters .rack-vu-seg--green     { background: #006400; opacity: 1; }
.hp-idle-meters .rack-vu-seg--amber     { background: #B45A00; opacity: 1; }
.hp-idle-meters .rack-vu-seg--red       { background: #8C0000; opacity: 1; }
.hp-idle-meters .rack-vu-seg--green.rack-vu-seg--lit { background: #00B400; opacity: 1; box-shadow: 0 0 4px #00B400; }
.hp-idle-meters .rack-vu-seg--amber.rack-vu-seg--lit { background: #FFA000; opacity: 1; box-shadow: 0 0 4px #FFA000; }
.hp-idle-meters .rack-vu-seg--red.rack-vu-seg--lit   { background: #DC0000; opacity: 1; box-shadow: 0 0 4px #DC0000; }
.hp-idle-meters .rack-vu-seg--green.rack-vu-seg--peak { background: #00B400; opacity: 1; box-shadow: 0 0 6px #00B400; }
.hp-idle-meters .rack-vu-label { color: #3a4a3a; font-size: 9px; }

/* ── Café panel meters ──────────────────────────────────── */
.hp-cafe-meters .rack-vu-pair {
  gap: 5px;
}
.hp-cafe-meters .rack-vu {
  width: 20px;
}
.hp-cafe-meters .rack-vu-body {
  background: #1a1208;
  border-color: #3a3020;
}
.hp-cafe-meters .rack-vu-seg--green { background: #006400; }
.hp-cafe-meters .rack-vu-seg--green.rack-vu-seg--lit { background: #00B400; box-shadow: 0 0 4px #00B400; }
.hp-cafe-meters .rack-vu-seg--amber { background: #B45A00; }
.hp-cafe-meters .rack-vu-seg--amber.rack-vu-seg--lit { background: #FFA000; box-shadow: 0 0 4px #FFA000; }

/* ── Idle sign responsive ───────────────────────────────── */
/* ============================================================
   PRINT / REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   OXFORD DREAMING SPIRES OSCILLOSCOPE
   Idle-state branded screen inside the main rack display.
   Sits inside .hp-idle-display, above the LCD text strip.
   ============================================================ */

.srd-oscilloscope-screen {
  background-color: #050705;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  height: 140px;
  width: 100%;
  /* Milled screen cutout — shadow simulates 4mm thick metal depth */
  box-shadow:
    inset 0 8px 16px rgba(0,0,0,0.9),
    inset 0 1px 4px rgba(0,0,0,1),
    0 1px 0 rgba(255,255,255,0.15); /* Bottom edge metal highlight */
}

.srd-crt-glass {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(18,16,16,0) 50%, rgba(0,0,0,0.22) 50%),
    radial-gradient(circle at center, rgba(0,255,0,0.04) 0%, rgba(0,0,0,0.45) 100%);
  background-size: 100% 4px, 100% 100%;
  z-index: 10;
  pointer-events: none;
}

.srd-osc-label {
  position: absolute;
  top: 5px;
  left: 10px;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(89,194,60,0.22);
  z-index: 11;
  pointer-events: none;
  user-select: none;
}

.srd-oscilloscope-svg {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 5;
  display: block;
}

/* ── Base shared rules for both trace layers ──────────────────── */
.srd-spire-line {
  fill: none;
  stroke-width: 1.25px; /* Pin-sharp digital line */
  transform-origin: bottom center;
  will-change: transform;
}

/* ── Dim base trace — always visible, gradient stroke at low opacity ──────── */
.srd-spire-line.dim-trace {
  stroke: #12240d; /* Low-power background trace */
  stroke-width: 1px;
  stroke-opacity: 1;
}

/* ── Active trace — precision digital line with phosphor glow ─────────── */
.srd-spire-line.active-trace {
  stroke: #59c23c;
  stroke-width: 1.25px; /* Pin-sharp digital line */
  stroke-opacity: 1;
  filter: drop-shadow(0 0 2px rgba(89,194,60,0.8));
}

/* ── Electron beam — the vertical sweep line ────────────────────────── */
.srd-electron-beam {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: rgba(89,194,60,0.8);
  box-shadow: 0 0 10px rgba(89,194,60,1);
  z-index: 6;
  will-change: transform;
  pointer-events: none;
}

.hp-idle-lcd--sub {
  padding: 0.6rem 1.5rem 0.8rem;
}

/* ── LCD header — above the oscilloscope screen ────────────────────────────── */
.hp-idle-lcd--header {
  padding: 0.5rem 1.5rem 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ── Oscilloscope frame bezel — Boutique Digital Rack Module V1.0 ─── */
.hp-osc-frame {
  position: relative;
  margin: 0 1rem 0.75rem;
  border-radius: 4px;
  padding: 18px 20px;
  /* Deep Anodized Red Faceplate — brushed metal simulation */
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05) 0%, transparent 50%, rgba(0,0,0,0.2) 100%),
    linear-gradient(90deg, #8b1c1c 0%, #7a1616 100%);
  border-top: 1px solid #bf3232;
  border-bottom: 2px solid #2a0505;
  border-left: 1px solid #5a1010;
  border-right: 1px solid #5a1010;
  box-shadow:
    inset 0 0 80px rgba(0,0,0,0.4),
    0 20px 40px rgba(0,0,0,0.6),
    0 2px 0 rgba(0,0,0,0.9);
  overflow: visible;
}

/* ── Glass sheen overlay ────────────────────────────────────────────── */
.hp-osc-glass {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  border-radius: 4px;
  /* Two-layer glass effect:
     1. Diagonal specular highlight (top-left corner catch)
     2. Subtle convex lens gradient (brighter centre, darker edges) */
  background:
    linear-gradient(
      135deg,
      rgba(255,255,255,0.10) 0%,
      rgba(255,255,255,0.03) 30%,
      rgba(255,255,255,0.00) 55%,
      rgba(0,0,0,0.08) 100%
    ),
    radial-gradient(
      ellipse at 40% 30%,
      rgba(255,255,255,0.06) 0%,
      rgba(0,0,0,0.00) 60%
    );
  /* Thin top-edge specular line */
  border-top: 1px solid rgba(255,255,255,0.12);
  border-left: 1px solid rgba(255,255,255,0.06);
}

@media (max-width: 639px) {
  .srd-oscilloscope-screen { height: 80px; }
  .hp-osc-frame { margin: 0 0.5rem 0.5rem; }
}

/* ============================================================
   MOBILE FIX PASS — Apr 2026
   P0: Prevent horizontal overflow on all mobile viewports
   P1: Service button grid reflow + action bar stacking
   P2: Footer single-column, font size bumps
   P3: VU meter hiding, trust tag size
   ============================================================ */

/* P0: Ensure machine never exceeds viewport */
@media (max-width: 1088px) {
  .hp-machine {
    width: calc(100% - 1rem) !important;
    max-width: calc(100% - 1rem) !important;
    box-sizing: border-box;
  }
}

@media (max-width: 640px) {
  .hp-machine {
    width: calc(100% - 0.5rem) !important;
    max-width: calc(100% - 0.5rem) !important;
    box-sizing: border-box;
  }
  .hp-machine-inner {
    min-width: 0;
    width: 100%;
    overflow: hidden;
  }
}

/* P1: Action bar — scrollable on very small screens */
@media (max-width: 480px) {
  .hp-action-bar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    padding: 0.4rem 0.5rem;
    gap: 0.2rem;
    justify-content: flex-start;
  }
  .hp-action-btn {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 0.65rem;
    padding: 0.55rem 0.7rem;
    min-height: 44px;
  }
}

/* P1: Service button labels — wrap cleanly in grid cells */
@media (max-width: 640px) {
  .rack-btn-label {
    white-space: normal;
    word-break: break-word;
    hyphens: auto;
    text-align: center;
    line-height: 1.2;
  }
  .rack-btn {
    min-height: 72px;
  }
}

/* P2: GRASSROOTS CREATIVE INFRASTRUCTURE — bump from 13px */
@media (max-width: 640px) {
  .hp-display-line--mission {
    font-size: 14px;
    letter-spacing: 0.12em;
  }
  .hp-display-line--location {
    font-size: 20px;
  }
}

/* P2: Footer — single-column stack at 480px */
@media (max-width: 480px) {
  .hp-trust-inner {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 1.25rem 1rem 1rem;
  }
  .hp-trust-logos {
    flex-wrap: wrap;
    gap: 0.6rem;
  }
  .hp-trust-links {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
  }
  .hp-trust-links a {
    font-size: 0.78rem;
  }
  .hp-trust-base {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    font-size: 0.58rem;
  }
}

/* P3: Trust tag font size bump */
.hp-trust-tag {
  font-size: 0.82rem;
}

/* P3: Hide VU meters on very small screens */
@media (max-width: 480px) {
  .hp-idle-meters,
  .srd-rail .rack-vu-pair,
  .srd-rail .rack-vu {
    display: none;
  }
}

/* P2: Identity rail — prevent overflow */
@media (max-width: 640px) {
  .hp-identity-rail {
    overflow: hidden;
  }
  .hp-identity-address {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 50vw;
  }
}

/* Oscilloscope frame — full width on mobile */
@media (max-width: 480px) {
  .hp-osc-frame {
    margin: 0 0.25rem 0.4rem;
  }
  .srd-oscilloscope-screen {
    height: 70px;
  }
}
