/* Agent HQ (Phase A) — phone-first, dark. Tokens follow the landing page (CLAUDE.md "Design Tokens"). */
/* Fonts are served from this site (hq/fonts, SIL Open Font License, see hq/fonts/OFL.txt): the private page asks no
   third party for anything. */
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 800; font-display: swap; src: url("/hq/fonts/archivo-800.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/hq/fonts/plex-sans-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/hq/fonts/plex-sans-600.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/hq/fonts/plex-mono-500.woff2") format("woff2"); }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: #070c1a; color: #ffffff; font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
.hq { max-width: 560px; margin: 0 auto; padding: 16px 14px 48px; }
.hq-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.hq-brand { font-family: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; font-size: 18px; font-weight: 800; letter-spacing: 0.01em; white-space: nowrap; }
.hq-brand span { color: #fbbf24; }
.hq-sub { font-size: 11px; color: rgba(255,255,255,0.75); margin-top: 2px; }
.hq-h2 { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.75); margin: 22px 0 10px; }
.hq-card { background: linear-gradient(145deg,#1e2f52 0%,#172444 100%); border: 1px solid rgba(255,255,255,0.22); border-radius: 16px; padding: 14px; margin-bottom: 12px; }
.hq-card h3 { margin: 6px 0 6px; font-size: 16px; line-height: 1.3; }
.hq-body { white-space: pre-wrap; word-break: break-word; font-size: 14px; line-height: 1.5; color: rgba(255,255,255,0.9); margin: 0; }
.hq-meta { font-size: 11px; color: rgba(255,255,255,0.75); margin-top: 8px; }
.hq-chip { display: inline-block; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,0.1); color: #ffffff; }
.hq-chip.pending, .hq-chip.needs-you { background: rgba(251,191,36,0.2); color: #fbbf24; }
.hq-chip.approved, .hq-chip.done { background: rgba(34,197,94,0.2); color: #4ade80; }
.hq-chip.rewrite { background: rgba(99,102,241,0.25); color: #a5b4fc; }
.hq-chip.skip { background: rgba(148,163,184,0.2); color: #cbd5e1; }
.hq-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.hq-actions .hq-btn { flex: 1 1 auto; }
.hq-btn { flex: none; min-height: 44px; padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.22); background: rgba(255,255,255,0.08); color: #ffffff; font-size: 14px; font-weight: 800; cursor: pointer; }
.hq-btn.primary { background: #4f46e5; border-color: #4f46e5; }
.hq-btn.good { background: #16a34a; border-color: #16a34a; }
.hq-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.hq-btn.link { flex: 0 0 auto; min-height: 0; padding: 6px 10px; font-size: 12px; }
.hq-input, .hq-text { width: 100%; padding: 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.22); background: rgba(7,12,26,0.6); color: #ffffff; font-size: 16px; margin-bottom: 10px; }
.hq-text { min-height: 90px; resize: vertical; font-family: inherit; }
.hq-msg { font-size: 13px; color: #fbbf24; margin: 8px 0; }
.hq-empty { font-size: 13px; color: rgba(255,255,255,0.75); padding: 14px; border: 1px dashed rgba(255,255,255,0.22); border-radius: 16px; }
.hq-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.hq-row b { font-size: 14px; }
.hq-center { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; }
.hq-or { text-align: center; font-size: 11px; color: rgba(255,255,255,0.75); margin: 12px 0; }
/* ── Phase 1 redesign: live pill, command core, the floor, rooms and live agent cards ── */
.hq-top-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.hq-live { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: #cbd5e1; background: #0c2433; border: 1px solid #164257; border-radius: 999px; padding: 5px 10px; }
.hq-live.stale { color: #fbbf24; background: rgba(251,191,36,0.12); border-color: rgba(251,191,36,0.4); }
.hq-dot { width: 7px; height: 7px; border-radius: 50%; background: #7dd3fc; flex: none; animation: hq-pulse 1.4s ease-in-out infinite; }
.hq-live.stale .hq-dot { background: #fbbf24; }
.hq-label { font-family: "IBM Plex Mono", ui-monospace, monospace; font-weight: 500; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: #bfdbfe; }
.hq-core { background: #0b1224; border: 1px solid #1e3a8a; border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.hq-core-head { display: flex; align-items: center; gap: 12px; }
.hq-orb-mini { width: 40px; height: 40px; border-radius: 50%; flex: none; background: radial-gradient(circle at 50% 40%, #ffffff 0%, #bfdbfe 45%, #2563eb 100%); box-shadow: 0 0 0 4px rgba(245,158,11,0.35), 0 0 22px rgba(59,130,246,0.6); animation: hq-orb 2.8s ease-in-out infinite; }
.hq-core-count { font-family: "Archivo", sans-serif; font-weight: 800; font-size: 20px; color: #ffffff; }
.hq-core-count.needs { color: #fbbf24; }
.hq-need { background: #1a1608; border: 1px solid #5c4a1e; border-radius: 12px; padding: 9px 12px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: #cbd5e1; }
.hq-need b { color: #fcd58a; font-weight: 600; }
.hq-core-link { align-self: flex-start; display: inline-flex; align-items: center; min-height: 44px; color: #7dd3fc; font-size: 13px; font-weight: 600; text-decoration: none; background: none; border: 0; padding: 0; font-family: inherit; cursor: pointer; }
.hq-floor { display: none; }
.hq-floor a { cursor: pointer; }
.hq-floor a:focus-visible { outline: 2px solid #fbbf24; outline-offset: 4px; }
.hq-plate-name { font-family: "IBM Plex Sans", sans-serif; font-weight: 600; font-size: 16px; fill: #ffffff; }
.hq-plate-sub { font-family: "IBM Plex Sans", sans-serif; font-size: 12.5px; fill: #a9b4c8; }
.hq-core-label { font-family: "IBM Plex Mono", monospace; font-weight: 500; font-size: 13px; letter-spacing: 0.18em; fill: #bfdbfe; }
.hq-core-state { font-family: "IBM Plex Sans", sans-serif; font-weight: 600; font-size: 15px; fill: #4ade80; }
.hq-core-state.needs { fill: #fbbf24; }
.hq-room { margin-bottom: 18px; }
.hq-room-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.hq-room-head h3 { margin: 0; font-family: "Archivo", sans-serif; font-weight: 800; font-size: 16px; }
.hq-room-mark { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.hq-room-sub { font-size: 12px; color: rgba(255,255,255,0.75); }
.hq-room-art { display: block; width: 100%; max-width: 220px; height: auto; margin: 0 auto 10px; }
.hq-agent { position: relative; overflow: hidden; background: linear-gradient(160deg, rgba(45,212,191,0.14) 0%, rgba(10,20,38,0.96) 55%); border-color: rgba(45,212,191,0.45); box-shadow: 0 0 20px rgba(45,212,191,0.10); }
.hq-agent.hq-alert { border-color: #f59e0b; box-shadow: 0 0 22px rgba(245,158,11,0.22); }
.hq-scan { position: absolute; left: 0; right: 0; top: 0; height: 30px; pointer-events: none; background: linear-gradient(180deg, rgba(94,234,212,0) 0%, rgba(94,234,212,0.07) 75%, rgba(94,234,212,0.25) 100%); animation: hq-scan 3.2s linear infinite; }
.hq-when { display: flex; align-items: center; gap: 7px; margin-top: 6px; font-family: "IBM Plex Mono", ui-monospace, monospace; font-weight: 500; font-size: 11px; letter-spacing: 0.06em; color: #5eead4; }
.hq-when .hq-dot { background: #5eead4; }
/* Phase 1b: the view tabs (a bar fixed to the bottom on phones, in the header on wide screens), the status
   lamps on the room labels, the latest-post card and the legend (wide screens, with the floor). */
.hq-board { padding-bottom: 96px; }
.hq-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; gap: 6px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: rgba(7,12,26,0.96); border-top: 1px solid #1c2740; }
.hq-tab { flex: 1 1 0; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; border-radius: 12px; border: 1px solid transparent; background: transparent; color: rgba(255,255,255,0.75); font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.hq-tab.on { color: #ffffff; background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.22); }
.hq-tab:focus-visible { outline: 2px solid #fbbf24; outline-offset: 2px; }
.hq-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #f59e0b; color: #1a1205; font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
/* Phones: no floor drawing (.hq-floor stays hidden), but the latest-post card and the legend show, in the page flow. */
.hq-floor-wrap { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.hq-latest { background: rgba(8,14,30,0.92); border: 1px solid #1f4f4a; border-radius: 12px; padding: 9px 12px; font-size: 12px; line-height: 1.4; color: #cbd5e1; }
.hq-latest-head { display: flex; align-items: center; gap: 7px; white-space: nowrap; overflow: hidden; }
.hq-latest-head b { color: #ffffff; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.hq-latest-text { margin-top: 4px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.hq-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 4px 4px 0; font-size: 12px; color: rgba(255,255,255,0.75); }
.hq-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.hq-legend-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
/* Motion. Decoration only; all of it stops when the system asks for reduced motion. */
@keyframes hq-pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
@keyframes hq-breathe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-0.4px); } }
@keyframes hq-type { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-0.8px); } }
@keyframes hq-ripple { 0% { transform: scale(0.85); opacity: 0.9; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes hq-bar { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }
@keyframes hq-draw { 0% { stroke-dashoffset: 30; } 55%, 100% { stroke-dashoffset: 0; } }
@keyframes hq-flow { to { stroke-dashoffset: -48; } }
@keyframes hq-orb { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes hq-scan { 0% { transform: translateY(-30px); } 100% { transform: translateY(240px); } }
@keyframes hq-scanl { 0% { transform: translateY(0); } 100% { transform: translateY(15.4px); } }
.hq-pulse { animation: hq-pulse 1.4s ease-in-out infinite; }
.hq-breathe { animation: hq-breathe 3.4s ease-in-out infinite; }
.hq-type-a { animation: hq-type 0.34s ease-in-out infinite; }
.hq-type-b { animation: hq-type 0.34s ease-in-out infinite; animation-delay: -0.17s; }
.hq-ripple { transform-box: fill-box; transform-origin: center; animation: hq-ripple 1.8s ease-out infinite; }
.hq-bar { transform-box: fill-box; transform-origin: 50% 100%; animation: hq-bar 1.6s ease-in-out infinite; }
.hq-b1 { animation-delay: -0.4s; } .hq-b2 { animation-delay: -0.8s; } .hq-b3 { animation-delay: -1.2s; }
.hq-spark { stroke-dasharray: 30; animation: hq-draw 2.6s linear infinite; }
.hq-flow { animation: hq-flow 3s linear infinite; }
.hq-orb { transform-box: fill-box; transform-origin: center; animation: hq-orb 2.8s ease-in-out infinite; }
.hq-scanl { animation: hq-scanl 2.4s linear infinite; }
@media (prefers-reduced-motion: reduce) {
    .hq-dot, .hq-orb-mini, .hq-scan, .hq-pulse, .hq-breathe, .hq-type-a, .hq-type-b, .hq-ripple, .hq-bar, .hq-spark, .hq-flow, .hq-orb, .hq-scanl { animation: none; }
}
/* Wider screens: the board (not the sign-in or notice screens) widens and its cards sit in a grid. Below
   900px nothing here applies, so phones keep the single 560px column. */
@media (min-width: 900px) {
    .hq-board { max-width: 1100px; padding-bottom: 48px; }
    .hq-tabs { position: static; padding: 0; background: none; border: 0; flex: 0 0 auto; }
    .hq-tab { flex: 0 0 auto; }
    .hq-floor-wrap { display: block; position: relative; margin-top: 0; }
    .hq-latest { position: absolute; top: 26px; right: 16px; max-width: 260px; }
    .hq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
    .hq-grid .hq-card { margin-bottom: 0; }
    .hq-floor { display: block; width: 100%; height: auto; margin: 18px 0 6px; border: 1px solid #1c2740; border-radius: 20px; background-color: #080e1e; background-image: radial-gradient(rgba(148,163,184,0.10) 1px, transparent 1px); background-size: 22px 22px; }
    .hq-room-body { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; align-items: start; }
    .hq-room-art { margin: 0; max-width: none; }
}
