/* Tape Floor v3 — CSS pixel trading floor */
:root {
  color-scheme: dark;
  --bg: #0b0d10;
  --fg: #e8eaed;
  --muted: #9aa0a6;
  --line: #2a2f36;
  --accent: #7dd3a7;
  --floor: #1a1520;
  --desk: #3d2b1f;
  --desk-top: #5c4033;
  --wood: #2a1c14;
  --screen: #1e3a2f;
  --screen-glow: #7dd3a7;
  --idle-glow: #4a5560;
  --halt-on: #e85d5d;
  --halt-off: #3a4048;
  --tape-bg: #0e1014;
  --pixel: 4px;
  --skin: #d4b896;
  --lamp-off: #3a4048;
  --lamp-on: #f4d06f;
  --board: #e8e0c8;
  --board-ink: #2a2418;
  image-rendering: pixelated;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 15px/1.45 ui-sans-serif, system-ui, sans-serif;
  background: var(--bg);
  color: var(--fg);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
}

header.site {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .5rem 1rem;
  margin-bottom: 1rem;
}

header.site h1 {
  font-size: 1.1rem;
  letter-spacing: .08em;
  margin: 0;
}

.links { color: var(--muted); font-size: .9rem; }
.links a + a::before { content: " · "; color: var(--muted); margin: 0 .15rem; }

.disclaimer-bar {
  color: var(--muted);
  font-size: .85rem;
  margin: 0 0 1rem;
  letter-spacing: .02em;
}

/* ——— Floor stage ——— */
.floor-stage {
  border: 2px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--floor);
  margin-bottom: 1.25rem;
  position: relative;
  image-rendering: pixelated;
}

.tape-strip {
  background: var(--tape-bg);
  border-bottom: 3px solid #222830;
  min-height: 48px;
  height: 48px;
  overflow: hidden;
  position: relative;
}

.tape-strip::before,
.tape-strip::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 12px;
  z-index: 2;
  pointer-events: none;
}
.tape-strip::before {
  left: 0;
  background: linear-gradient(90deg, var(--tape-bg), transparent);
}
.tape-strip::after {
  right: 0;
  background: linear-gradient(270deg, var(--tape-bg), transparent);
}

.tape-track {
  display: flex;
  width: max-content;
  will-change: transform;
  animation: scroll-tape 36s linear infinite;
}

.tape-copy {
  display: inline-block;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  font-family: ui-monospace, "Cascadia Mono", Menlo, monospace;
  font-size: 14px;
  line-height: 48px; /* >= font-size; fills strip height */
  letter-spacing: .06em;
  color: var(--accent);
  text-transform: uppercase;
  padding: 0 2.5rem 0 0;
  box-sizing: content-box;
}

@keyframes scroll-tape {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.floor-room {
  position: relative;
  min-height: 340px;
  overflow: visible;
  padding: 12px 12px 20px 52px;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 7px,
      rgba(0,0,0,.12) 7px,
      rgba(0,0,0,.12) 8px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 7px,
      rgba(0,0,0,.08) 7px,
      rgba(0,0,0,.08) 8px
    ),
    linear-gradient(180deg, #22182a 0%, #1a1520 40%, #141018 100%);
}

/* Pixel door on the left wall / floor */
.room-door {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-42%);
  width: 34px;
  height: 78px;
  z-index: 2;
  image-rendering: pixelated;
  pointer-events: none;
}

.door-frame {
  position: absolute;
  inset: 0;
  background: #1a100c;
  box-shadow:
    2px 2px 0 #0a0806,
    inset 0 0 0 3px #2a1c14;
}

.door-leaf {
  position: absolute;
  inset: 5px 4px 3px 4px;
  background:
    repeating-linear-gradient(
      90deg,
      #6a4a36 0 7px,
      #5c4033 7px 8px
    );
  box-shadow: inset 0 0 0 1px #3d2b1f;
}

.door-panel {
  position: absolute;
  left: 3px;
  right: 3px;
  height: 22px;
  border: 2px solid #3d2b1f;
  background: rgba(26, 16, 12, .18);
}
.door-panel.top { top: 4px; }
.door-panel.bot { bottom: 8px; }

.door-knob {
  position: absolute;
  right: 3px;
  top: 36px;
  width: 5px;
  height: 5px;
  background: #c9a227;
  box-shadow: 0 0 0 1px #1a100c, 1px 1px 0 #8a7018;
}

.halt-lamp {
  position: absolute;
  top: 10px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 3;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 10px;
  letter-spacing: .08em;
  color: var(--muted);
  text-transform: uppercase;
}

.halt-bulb {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  border: 2px solid #111;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.15),
    0 0 0 2px #2a2f36;
  background: var(--halt-off);
  image-rendering: pixelated;
}

.halt-lamp.on .halt-bulb {
  background: var(--halt-on);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.25),
    0 0 0 2px #2a2f36,
    0 0 12px 2px rgba(232, 93, 93, .55);
  animation: halt-blink 1.2s steps(2, end) infinite;
}

.halt-lamp.on { color: #f0a0a0; }

@keyframes halt-blink {
  50% { opacity: .55; }
}

/* Wall row: TV | whiteboard | clock — equal panels */
.wall-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 8px;
  margin: 4px auto 12px;
  max-width: 560px;
  width: 100%;
  z-index: 3;
  image-rendering: pixelated;
}

.wall-tv,
.wall-clock,
.whiteboard {
  min-width: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  image-rendering: pixelated;
}

.wall-clickable {
  cursor: pointer;
}

.wall-clickable:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.wall-clickable:hover .tv-bezel,
.wall-clickable:hover .clock-bezel,
.wall-clickable:hover .wb-frame {
  border-color: #4a5560;
}

.wall-clickable:hover .wb-frame {
  border-color: #6a4a38;
}

.tv-bezel,
.clock-bezel,
.wb-frame {
  height: 100%;
  min-height: 112px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding: 5px;
  border: 3px solid #2a2f36;
  box-shadow:
    3px 3px 0 #0a0806,
    inset 0 0 0 2px #111418;
  background: #1a1e24;
}

.wb-frame {
  border-color: #3d2b1f;
  box-shadow:
    3px 3px 0 #1a100c,
    inset 0 0 0 2px #c4b896;
  background: var(--board);
  color: var(--board-ink);
}

.tv-screen,
.clock-face {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 2px;
  background: #0e1412;
  border: 2px solid #0a0a0a;
  box-shadow:
    inset 0 0 0 1px #1e3a2f,
    inset 0 0 12px rgba(125, 211, 167, .12);
  padding: 6px 7px;
  color: var(--accent);
  min-height: 0;
}

.clock-face {
  background: #12151a;
  box-shadow: inset 0 0 0 1px #2a2f36;
  color: var(--fg);
}

.wb-frame .wb-title,
.tv-title,
.clock-title {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 8px;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 4px;
  flex: 0 0 auto;
}

.tv-title { color: #4a7a5a; }
.clock-title { color: #6a7080; }
.wb-title { color: #5c4033; }

.tv-line,
.clock-line {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 9px;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
  white-space: normal;
  overflow-wrap: anywhere;
}

.tv-line { color: var(--accent); }
.clock-line { color: var(--fg); }

.clock-line[hidden] {
  display: none;
}

.wb-lines {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 9px;
  line-height: 1.35;
  flex: 1;
}

.wb-lines li {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  border-bottom: 1px solid rgba(61, 43, 31, .16);
  padding: 1px 0;
}

.wb-k { color: #5c4033; }
.wb-v { color: var(--board-ink); font-variant-numeric: tabular-nums; }

.desks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem 0.7rem;
  max-width: 560px;
  margin: 0.35rem auto 0;
}

@media (max-width: 560px) {
  .wrap { padding: 1rem 0.6rem 3rem; }
  .floor-room { padding: 10px 8px 16px 40px; }
  .room-door { width: 26px; height: 60px; left: 6px; }
  .wall-row { gap: 6px; max-width: 100%; }
  .tv-bezel, .clock-bezel, .wb-frame { min-height: 108px; padding: 4px; }
  .tv-line, .clock-line, .wb-lines { font-size: 8px; }
  .desk-art {
    transform: scale(0.78);
    transform-origin: top center;
    margin-bottom: -18px;
  }
  .desks { gap: 0.55rem 0.25rem; max-width: 100%; }
  /* Keep walking on mobile; shorter path so it stays on-screen */
  .desk.walking .worker {
    animation-duration: 4.2s;
  }
  @keyframes walk-to-tape-right {
    0%   { transform: translate(0, 0); }
    22%  { transform: translate(6px, -36px); }
    45%  { transform: translate(8px, -88px); }
    55%  { transform: translate(10px, -88px); }
    78%  { transform: translate(5px, -36px); }
    100% { transform: translate(0, 0); }
  }
  @keyframes walk-to-tape-left {
    0%   { transform: translate(0, 0); }
    22%  { transform: translate(-6px, -36px); }
    45%  { transform: translate(-8px, -88px); }
    55%  { transform: translate(-10px, -88px); }
    78%  { transform: translate(-5px, -36px); }
    100% { transform: translate(0, 0); }
  }
  @keyframes walk-to-tape-from-back {
    0%   { transform: translate(0, 0); }
    22%  { transform: translate(6px, -52px); }
    45%  { transform: translate(8px, -124px); }
    55%  { transform: translate(10px, -124px); }
    78%  { transform: translate(5px, -52px); }
    100% { transform: translate(0, 0); }
  }
}

.desk {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  text-align: center;
  color: inherit;
  font: inherit;
}

.desk:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.desk-art {
  width: 120px;
  height: 96px;
  margin: 0 auto 6px;
  position: relative;
  image-rendering: pixelated;
  overflow: visible;
}

/* Pixel desk silhouette via box shadows / layered divs */
.desk-body {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 8px;
  height: 28px;
  background: var(--desk);
  box-shadow:
    0 4px 0 var(--wood),
    8px 4px 0 var(--wood),
    -8px 4px 0 var(--wood);
  border: 2px solid #1a100c;
  z-index: 1;
}

.desk-top {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 34px;
  height: 10px;
  background: var(--desk-top);
  border: 2px solid #1a100c;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
  z-index: 2;
}

.monitor {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 44px;
  width: 40px;
  height: 28px;
  background: #111;
  border: 2px solid #2a2f36;
  box-shadow: 0 0 0 2px #0a0a0a;
  z-index: 3;
}

.monitor::before {
  content: "";
  position: absolute;
  inset: 3px;
  background: var(--idle-glow);
  opacity: .35;
}

.monitor::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -6px;
  width: 10px;
  height: 6px;
  background: #2a2f36;
}

.desk.working .monitor::before {
  background: var(--screen-glow);
  opacity: .85;
  box-shadow: 0 0 10px 2px rgba(125, 211, 167, .45);
  animation: screen-flicker 2.4s steps(3, end) infinite;
}

.desk.empty .monitor::before {
  opacity: .12;
}

@keyframes screen-flicker {
  0%, 100% { opacity: .85; }
  40% { opacity: .55; }
  70% { opacity: .95; }
}

.chair {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 22px;
  height: 14px;
  background: #2a3340;
  border: 2px solid #111;
  border-radius: 2px 2px 0 0;
  z-index: 0;
}

/* Desk lamp — ON only when .working (updated < 2h and not night-away) */
.desk-lamp {
  position: absolute;
  right: 14px;
  bottom: 42px;
  width: 16px;
  height: 24px;
  z-index: 5;
  pointer-events: none;
  image-rendering: pixelated;
}

.lamp-stem {
  position: absolute;
  left: 6px;
  bottom: 0;
  width: 3px;
  height: 13px;
  background: #2a2f36;
  box-shadow: 0 0 0 1px #111;
}

.lamp-shade {
  position: absolute;
  left: 1px;
  top: 0;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 9px solid var(--lamp-off);
}

.lamp-glow {
  position: absolute;
  left: 2px;
  top: 9px;
  width: 12px;
  height: 8px;
  background: transparent;
  opacity: 0;
}

.desk.working .lamp-shade {
  border-top-color: var(--lamp-on);
}

.desk.working .lamp-glow {
  opacity: .7;
  background: rgba(244, 208, 111, .45);
  box-shadow: 0 4px 10px 3px rgba(244, 208, 111, .4);
}

.desk.away .lamp-shade {
  border-top-color: var(--lamp-off);
}

.desk.away .lamp-glow {
  opacity: 0;
  background: transparent;
  box-shadow: none;
}

/* Tiny pixel worker — always sitting; arms type, stronger when working */
.worker {
  position: absolute;
  left: 28px;
  bottom: 30px;
  width: 22px;
  height: 34px;
  z-index: 4;
  pointer-events: none;
  image-rendering: pixelated;
}

.worker .head {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  width: 8px;
  height: 8px;
  background: var(--skin);
  box-shadow: 0 0 0 1px #1a100c;
}

.worker .body {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 8px;
  width: 12px;
  height: 14px;
  background: #3a5a7a;
  box-shadow: 0 0 0 1px #1a100c;
}

.worker .arm {
  position: absolute;
  top: 9px;
  width: 3px;
  height: 11px;
  background: var(--skin);
  box-shadow: 0 0 0 1px #1a100c;
  transform-origin: top center;
}

.worker .arm.left { left: 1px; animation: type-l 1.8s steps(2, end) infinite; }
.worker .arm.right { right: 1px; animation: type-r 2s steps(2, end) infinite; }

.desk[data-seat="scout"] .worker .body { background: #4a7a5a; }
.desk[data-seat="chief"] .worker .body { background: #7a5a3a; }
.desk[data-seat="steno"] .worker .body { background: #5a4a7a; }
.desk[data-seat="dev"] .worker .body { background: #3a6a7a; }

@keyframes type-l {
  0%, 100% { transform: rotate(18deg); }
  50% { transform: rotate(-8deg); }
}

@keyframes type-r {
  0%, 100% { transform: rotate(-14deg); }
  50% { transform: rotate(10deg); }
}

@keyframes type-l-work {
  0%, 100% { transform: rotate(42deg) translateY(1px); }
  50% { transform: rotate(-30deg) translateY(3px); }
}

@keyframes type-r-work {
  0%, 100% { transform: rotate(-40deg) translateY(2px); }
  50% { transform: rotate(28deg) translateY(3px); }
}

.desk.working .worker .arm.left { animation: type-l-work 0.22s steps(2, end) infinite; }
.desk.working .worker .arm.right { animation: type-r-work 0.26s steps(2, end) infinite; }

.desk-label {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fg);
}

.desk-status {
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

.desk.working .desk-status {
  color: var(--accent);
}

.desk.empty .desk-status {
  opacity: .7;
}

/* Away (night empty chair) + walk desk → tape → desk */
.desk.away .worker {
  visibility: hidden;
}

.desk.walking .worker {
  z-index: 12;
  animation: walk-to-tape-right 5s ease-in-out forwards;
}

.desk.walking .worker .arm.left,
.desk.walking .worker .arm.right {
  animation: none;
  transform: rotate(0deg);
}

/* Right-column Steno walks left toward tape; back-row Dev walks farther up */
.desk[data-seat="steno"].walking .worker {
  animation-name: walk-to-tape-left;
}

.desk[data-seat="dev"].walking .worker {
  animation-name: walk-to-tape-from-back;
}

@keyframes walk-to-tape-right {
  0%   { transform: translate(0, 0); }
  22%  { transform: translate(10px, -48px); }
  45%  { transform: translate(14px, -118px); }
  55%  { transform: translate(16px, -118px); }
  78%  { transform: translate(8px, -48px); }
  100% { transform: translate(0, 0); }
}

@keyframes walk-to-tape-left {
  0%   { transform: translate(0, 0); }
  22%  { transform: translate(-10px, -48px); }
  45%  { transform: translate(-14px, -118px); }
  55%  { transform: translate(-16px, -118px); }
  78%  { transform: translate(-8px, -48px); }
  100% { transform: translate(0, 0); }
}

@keyframes walk-to-tape-from-back {
  0%   { transform: translate(0, 0); }
  22%  { transform: translate(8px, -70px); }
  45%  { transform: translate(12px, -168px); }
  55%  { transform: translate(14px, -168px); }
  78%  { transform: translate(6px, -70px); }
  100% { transform: translate(0, 0); }
}

/* ——— Detail panel ——— */
.panel {
  display: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #12151a;
  margin-bottom: 1.25rem;
  overflow: hidden;
}

.panel.open { display: block; }

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--line);
  background: #161a20;
}

.panel-head h2 {
  margin: 0;
  font-size: .95rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.panel-close {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: .8rem;
  padding: .2rem .55rem;
  border-radius: 4px;
  cursor: pointer;
}
.panel-close:hover { color: var(--fg); border-color: var(--muted); }

.panel-body {
  padding: 1rem;
  font-size: .9rem;
}

.panel-body dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .35rem .85rem;
  margin: 0 0 1rem;
}

.panel-body dt { color: var(--muted); }
.panel-body dd { margin: 0; font-variant-numeric: tabular-nums; }

.panel-status {
  margin: 0 0 .65rem;
  font-size: .8rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

.panel-line {
  margin: 0 0 .4rem;
}

.panel-section {
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px solid var(--line);
}

.panel-section h3 {
  margin: 0 0 .5rem;
  font-size: .75rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

.panel-names {
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: ui-monospace, Menlo, monospace;
  font-size: .8rem;
}

.panel-names li {
  padding: .2rem 0;
  border-bottom: 1px solid rgba(42,47,54,.5);
}

.panel-names .flag { color: var(--accent); }

pre.xcard {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, Menlo, monospace;
  font-size: .8rem;
  line-height: 1.5;
  color: var(--fg);
  overflow: visible;
}

/* ——— Wall zoom overlay ——— */
.wall-zoom {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1200;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  box-sizing: border-box;
}

.wall-zoom.open {
  display: flex;
}

.wall-zoom-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 10, .72);
  cursor: pointer;
}

.wall-zoom-panel {
  position: relative;
  z-index: 1;
  display: block;
  width: min(520px, 100%);
  max-height: min(80vh, 640px);
  margin: 0;
  overflow: auto;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .55);
}

.wall-zoom-body {
  font-size: 15px;
  line-height: 1.45;
}

.wall-zoom-line {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 15px;
  margin: 0 0 .55rem;
  font-variant-numeric: tabular-nums;
}

.wall-zoom-wb {
  font-size: 15px;
  line-height: 1.5;
}

.wall-zoom-wb li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(42, 47, 54, .55);
  padding: .35rem 0;
}

.wall-zoom-wb .wb-k { color: var(--muted); }
.wall-zoom-wb .wb-v { color: var(--fg); font-variant-numeric: tabular-nums; }

/* ——— v1 watch card ——— */
.card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.1rem 1.15rem;
}

.meta { color: var(--muted); font-size: .9rem; margin-bottom: .75rem; }
.tape { margin: 0 0 1rem; }

table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
th, td {
  text-align: left;
  padding: .4rem 0;
  border-bottom: 1px solid var(--line);
}
th {
  color: var(--muted);
  font-weight: 500;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.flag { color: var(--accent); }
.disclaimer {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: .9rem;
}
.stand {
  display: inline-block;
  margin-top: .5rem;
  padding: .25rem .6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .8rem;
  color: var(--muted);
}
.err { color: #f0a0a0; }

.v1-label {
  color: var(--muted);
  font-size: .75rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin: 0 0 .5rem;
}

.card table a { color: var(--accent); text-decoration: none; }
.card table a:hover { text-decoration: underline; }
