
/* =================================================================
   DIRECTION B — "CYBER OPS HUD"
   Dark UNIX/NeXT workstation aesthetic with classic-Mac menu bar
   on top and a Win95-flavored taskbar at the bottom.
   ================================================================= */
:root{
  --b-bg: #02100a;
  --b-fg: #c9ffd5;
  --b-accent: #34ff66;
  --b-amber: #ffb13a;
  --b-red:   #ff5e6c;
  --b-blue:  #3ad7ff;
  --b-grid:  rgba(52,255,102,0.07);
  --b-line:  rgba(52,255,102,0.22);
}
*{ box-sizing: border-box; }
html, body{
  margin: 0;
  background: var(--b-bg);
  color: var(--b-fg);
  font-family: "IBM Plex Mono", "JetBrains Mono", ui-monospace, monospace;
  overflow: hidden;
  height: 100%;
  width: 100%;
}
body{
  background-image:
    radial-gradient(ellipse at top, rgba(52,255,102,0.10), transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(58,215,255,0.08), transparent 50%),
    linear-gradient(180deg, #021008 0%, #010604 100%);
}
button{ font: inherit; cursor: pointer; }
a{ color: inherit; text-decoration: none; }

/* hex grid background */
.hex-bg{
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--b-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--b-grid) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1), rgba(0,0,0,0.4) 80%);
}

/* ============================================================
   Top menu bar — riff on classic Mac OS
   ============================================================ */
.b-topbar{
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 14px;
  height: 26px;
  background: linear-gradient(180deg, #051a10, #020a05);
  border-bottom: 1px solid var(--b-line);
  font-size: 11px;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}
.b-topbar-icon{ color: var(--b-accent); font-size: 14px; line-height: 1; text-shadow: 0 0 6px var(--b-accent); }
.b-topbar-menu{
  color: var(--b-fg);
  padding: 0 6px;
  height: 100%;
  display: flex; align-items: center;
  cursor: default;
  user-select: none;
  position: relative;
}
.b-topbar-menu:hover{
  background: var(--b-accent);
  color: var(--b-bg);
  text-shadow: none;
}
.b-topbar-right{
  margin-left: auto;
  display: flex; gap: 16px;
  font-variant-numeric: tabular-nums;
}
.b-topbar-right span{ color: var(--b-fg); opacity: 0.85; }
.b-topbar-right .b-blink{ color: var(--b-red); animation: b-blink 1.6s steps(2) infinite; }
@keyframes b-blink{ 50%{ opacity: 0; } }

/* ============================================================
   Main HUD grid
   ============================================================ */
.b-stage{
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  grid-template-rows: 1fr;
  gap: 12px;
  padding: 12px;
  height: calc(100vh - 26px - 32px);
}
.b-col{
  display: flex; flex-direction: column; gap: 12px;
  min-height: 0; min-width: 0;
}
.b-tile{
  position: relative;
  border: 1px solid var(--b-line);
  background: rgba(4,17,10,0.55);
  border-radius: 4px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  box-shadow:
    inset 0 0 0 1px rgba(0,0,0,0.5),
    0 0 0 1px rgba(52,255,102,0.06),
    0 20px 50px rgba(0,0,0,0.5);
}
.b-tile-head{
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px;
  background: linear-gradient(180deg, rgba(52,255,102,0.12), rgba(52,255,102,0.04));
  border-bottom: 1px solid var(--b-line);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--b-fg);
  flex-shrink: 0;
  user-select: none;
}
.b-tile-head .b-dot{ width: 7px; height: 7px; border-radius: 50%; background: var(--b-accent); box-shadow: 0 0 6px currentColor; }
.b-tile-head .b-spec{ margin-left: auto; opacity: 0.55; font-size: 9px; letter-spacing: 0.15em; }
.b-tile-body{ flex: 1; min-height: 0; overflow: hidden; position: relative; }

/* Hero header above terminal */
.b-hero{
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px;
  padding: 4px 4px 0;
  flex-shrink: 0;
}
.b-handle{
  display: flex; align-items: baseline; gap: 16px;
}
.b-handle h1{
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--b-fg);
  text-shadow: 0 0 12px rgba(52,255,102,0.4);
}
.b-handle h1 .b-acc{ color: var(--b-accent); }
.b-handle .b-tag{
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--b-amber);
  text-shadow: 0 0 6px rgba(255,177,58,0.5);
}
.b-hero-meta{
  display: flex; gap: 16px;
  font-size: 11px;
  color: rgba(201,255,213,0.7);
  letter-spacing: 0.1em;
}
.b-hero-meta b{ color: var(--b-accent); }

/* Globe tile body fits the ASCII globe perfectly */
.b-globe-tile{ flex: 1; min-height: 280px; }

/* Right column small panels */
.b-side-tile{ flex-shrink: 0; }
.b-side-tile.b-grow{ flex: 1; min-height: 0; }

/* Process list */
.b-proclist{
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  font-size: 11px;
  overflow: hidden;
}
.b-proc-head{
  display: grid;
  grid-template-columns: 48px 56px 44px 44px 1fr;
  gap: 8px;
  padding: 6px 12px;
  font-size: 9px;
  letter-spacing: 0.15em;
  color: rgba(201,255,213,0.5);
  border-bottom: 1px solid var(--b-line);
  flex-shrink: 0;
}
.b-proc-rows{
  flex: 1; min-height: 0;
  overflow-y: auto;
  font-variant-numeric: tabular-nums;
}
.b-proc-rows::-webkit-scrollbar{ width: 6px; }
.b-proc-rows::-webkit-scrollbar-thumb{ background: rgba(52,255,102,0.25); }
.b-proc-row{
  display: grid;
  grid-template-columns: 48px 56px 44px 44px 1fr;
  gap: 8px;
  padding: 3px 12px;
  align-items: center;
  line-height: 1.4;
}
.b-proc-row:nth-child(even){ background: rgba(255,255,255,0.015); }
.b-proc-pid{ color: rgba(201,255,213,0.55); font-size: 10px; }
.b-proc-user{ color: rgba(201,255,213,0.7); font-size: 10px; }
.b-proc-cpu{ color: var(--b-accent); font-weight: 600; }
.b-proc-mem{ color: var(--b-amber); font-weight: 500; }
.b-proc-cmd{
  color: var(--b-fg);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.b-proc-row.b-proc-warn .b-proc-cmd{ color: var(--b-red); }
.b-proc-row.b-proc-warn .b-proc-cpu{ color: var(--b-red); }

/* Broadcast intercept feed */
.b-broadcast{
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  padding: 6px 12px;
  font-size: 11px;
  overflow-y: auto;
  gap: 2px;
  font-variant-numeric: tabular-nums;
}
.b-broadcast::-webkit-scrollbar{ width: 6px; }
.b-broadcast::-webkit-scrollbar-thumb{ background: rgba(52,255,102,0.25); }
.b-bc-row{
  display: grid;
  grid-template-columns: 60px 78px 60px 1fr;
  gap: 8px;
  align-items: baseline;
  padding: 2px 0;
  line-height: 1.4;
}
.b-bc-ts{ color: rgba(201,255,213,0.45); font-size: 10px; }
.b-bc-freq{ color: var(--b-amber); font-size: 10px; letter-spacing: 0.04em; }
.b-bc-call{ color: var(--b-blue); font-size: 10px; letter-spacing: 0.04em; }
.b-bc-text{ color: var(--b-fg); font-size: 11px; opacity: 0.85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Stats / vitals */
.b-vitals{
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--b-line);
}
.b-vital{
  padding: 8px 12px;
  background: rgba(4,17,10,0.6);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: flex; flex-direction: column;
  gap: 2px;
}
.b-vital-label{ color: rgba(201,255,213,0.55); }
.b-vital-value{ color: var(--b-accent); font-size: 18px; font-weight: 600; letter-spacing: 0.04em; text-shadow: 0 0 8px currentColor; }
.b-vital-value.b-amber{ color: var(--b-amber); }
.b-vital-value.b-red{ color: var(--b-red); }

/* App overlays (game, matrix, contact) */
.b-overlay{
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 36px;
  animation: b-fade 200ms ease-out;
}
@keyframes b-fade{ from{ opacity: 0; } to{ opacity: 1; } }
.b-overlay-frame{
  position: relative;
  width: 100%;
  background: var(--b-bg);
  border: 1px solid var(--b-accent);
  box-shadow: 0 0 60px rgba(52,255,102,0.3), 0 30px 100px rgba(0,0,0,0.6);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.b-overlay-frame.b-overlay-amber{ border-color: var(--b-amber); box-shadow: 0 0 60px rgba(255,177,58,0.3), 0 30px 100px rgba(0,0,0,0.6); }
.b-overlay-head{
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: linear-gradient(180deg, rgba(52,255,102,0.14), rgba(52,255,102,0.02));
  border-bottom: 1px solid var(--b-line);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.b-overlay-amber .b-overlay-head{ background: linear-gradient(180deg, rgba(255,177,58,0.14), rgba(255,177,58,0.02)); }
.b-overlay-close{
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--b-line);
  color: var(--b-fg);
  padding: 3px 10px;
  font-size: 10px;
  letter-spacing: 0.15em;
}
.b-overlay-close:hover{ background: var(--b-red); color: #000; border-color: var(--b-red); }
.b-overlay-body{ flex: 1; min-height: 0; overflow: hidden; }

/* Contact overlay specific */
.b-contact-body{ padding: 22px 28px; max-width: 640px; margin: 0 auto; width: 100%; }
.b-contact-intro{
  margin-bottom: 18px;
  font-size: 12px;
  line-height: 1.7;
  color: rgba(201,255,213,0.75);
  letter-spacing: 0.04em;
}
.b-contact-intro b{ color: var(--b-accent); }

/* Bottom task bar — Win95 reference */
.b-taskbar{
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  height: 32px;
  background: linear-gradient(180deg, #062215 0%, #021008 100%);
  border-top: 1px solid var(--b-line);
  font-size: 11px;
  flex-shrink: 0;
}
.b-start{
  display: flex; align-items: center; gap: 8px;
  padding: 4px 12px;
  background: linear-gradient(180deg, var(--b-accent), #0db84a);
  color: #021008;
  font-weight: 700;
  letter-spacing: 0.1em;
  border: 1px solid var(--b-accent);
  cursor: pointer;
  text-shadow: none;
  user-select: none;
}
.b-start:hover{ filter: brightness(1.1); }
.b-start .b-start-glyph{ font-family: "VT323", monospace; font-size: 16px; line-height: 1; }
.b-procs{
  display: flex; gap: 4px;
  flex: 1;
  overflow: hidden;
}
.b-proc{
  padding: 4px 10px;
  background: rgba(52,255,102,0.06);
  border: 1px solid var(--b-line);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: rgba(201,255,213,0.75);
  display: flex; align-items: center; gap: 6px;
  cursor: default;
  white-space: nowrap;
}
.b-proc .b-proc-pid{ color: rgba(201,255,213,0.4); }
.b-proc.b-proc-warn{ color: var(--b-amber); border-color: rgba(255,177,58,0.4); }
.b-tray{
  display: flex; align-items: center; gap: 10px;
  padding: 0 8px;
  border-left: 1px solid var(--b-line);
  height: 100%;
  font-variant-numeric: tabular-nums;
}
.b-tray-clock{ color: var(--b-fg); }
.b-tray-stat{ color: rgba(201,255,213,0.6); font-size: 10px; }

/* Start menu pop */
.b-start-menu{
  position: absolute;
  left: 8px;
  bottom: 36px;
  width: 260px;
  background: var(--b-bg);
  border: 1px solid var(--b-accent);
  box-shadow: 0 0 30px rgba(52,255,102,0.25), 0 30px 60px rgba(0,0,0,0.6);
  padding: 10px;
  z-index: 50;
}
.b-start-menu-head{
  font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--b-accent); padding: 4px 8px 10px; border-bottom: 1px solid var(--b-line);
  margin-bottom: 8px;
}
.b-start-item{
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  font-size: 12px;
  cursor: pointer;
  letter-spacing: 0.05em;
  user-select: none;
}
.b-start-item:hover{ background: var(--b-accent); color: var(--b-bg); text-shadow: none; }
.b-start-item .b-start-glyph{ font-family: "VT323", monospace; font-size: 16px; line-height: 1; width: 18px; text-align: center; }

/* Boot screen */
.b-boot{
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #000;
  color: var(--b-accent);
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  padding: 30px;
  overflow: hidden;
  text-shadow: 0 0 6px currentColor;
}
.b-boot pre{ margin: 0; white-space: pre-wrap; }
.b-boot-line{ line-height: 1.5; }
.b-boot-line.dim{ opacity: 0.55; }
.b-boot-line.bright{ color: #c9ffd5; }
.b-boot-dismiss{
  position: absolute;
  bottom: 24px;
  right: 24px;
  font-size: 10px;
  opacity: 0.4;
  letter-spacing: 0.1em;
}

/* fake alerts */
.b-alert{
  position: fixed;
  z-index: 80;
  right: 16px;
  bottom: 48px;
  width: 320px;
  background: var(--b-bg);
  border: 1px solid var(--b-red);
  box-shadow: 0 0 30px rgba(255,94,108,0.4);
  padding: 10px 14px;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--b-red);
  text-shadow: 0 0 4px currentColor;
  animation: b-slide 240ms ease-out;
}
@keyframes b-slide{ from{ transform: translateX(20px); opacity: 0; } to{ transform: translateX(0); opacity: 1; } }
.b-alert-title{ font-weight: 700; letter-spacing: 0.15em; margin-bottom: 4px; }
.b-alert-body{ color: rgba(255,255,255,0.85); text-shadow: none; }

@media (max-width: 880px){
  .b-stage{ grid-template-columns: 1fr; }
  .b-side-tile.b-grow{ display: none; }
}

/* build.py: classes replacing removed inline style attrs */
.b-minw0{min-width:0}
.b-flex1minh0{flex:1;min-height:0}
