/* Mini screen: agentview's palette and type (agentview-report.css), like Decide, so it reads as part of the desk */
:root {
  --bg: #0a0a0c; --s1: #161619; --s2: #202025; --s3: #2c2c32;
  --line: #26262b; --line-strong: #404048;
  --ink: #f4f4f5; --ink2: #cdd0d6; --muted: #71717a; --faint: #52525b;
  --accent: #2e8fff; --ok: #34c77b; --bad: #ff5c5c;
  --ease: .15s cubic-bezier(.2, 0, 0, 1);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: dark; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink2);
  font: 15px/1.45 Inter, -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
body { display: flex; flex-direction: column; height: 100vh; height: 100dvh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
button, input { font: inherit; color: inherit; }
button { touch-action: manipulation; cursor: pointer; }

/* one screen at a time: pair, list, view */
#app { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.screen { flex: 1; min-height: 0; display: flex; flex-direction: column; }

header { flex: none; display: flex; align-items: center; gap: 8px; padding: 10px 12px 8px; min-height: 48px; }
header h1 { margin: 0; font-size: 17px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
header .grow { flex: 1; min-width: 0; }
header .sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
header .ttl { font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }

.icon { flex: none; width: 36px; height: 36px; border-radius: 10px; border: 0; background: var(--s1);
  display: grid; place-items: center; font-size: 16px; color: var(--ink2); transition: background var(--ease); }
.icon:active { background: var(--s3); }
.icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pill { flex: none; height: 32px; padding: 0 11px; border-radius: 9px; border: 0; background: var(--s1);
  color: var(--ink2); font-size: 13px; font-weight: 500; }
.pill.on { background: var(--s3); color: var(--ink); }
.primary { height: 46px; border: 0; border-radius: 12px; background: var(--ink); color: #0a0a0c; font-weight: 600;
  font-size: 15px; padding: 0 18px; transition: opacity var(--ease); }
.primary:disabled { opacity: .45; }
.primary.done { background: var(--ok); color: #04130a; }

/* pair */
.pair { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 0 22px 12vh; max-width: 440px;
  width: 100%; margin: 0 auto; }
.pair h1 { margin: 0; font-size: 26px; color: var(--ink); letter-spacing: -.02em; font-weight: 600; }
.pair p { margin: 0; color: var(--muted); font-size: 14.5px; }
.code { height: 54px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--s1); color: var(--ink);
  font-size: 24px; letter-spacing: .32em; text-align: center; font-variant-numeric: tabular-nums; outline: none; }
.code:focus { border-color: var(--accent); }
.msg { min-height: 20px; font-size: 13.5px; color: var(--muted); }
.msg.bad { color: var(--bad); }

/* list */
.list { flex: 1; overflow-y: auto; padding: 4px 12px 24px; -webkit-overflow-scrolling: touch; }
.focus { background: var(--s1); border-radius: 14px; padding: 12px 14px; margin: 4px 0 14px; display: flex; gap: 12px; align-items: center; }
.focus .why { flex: 1; color: var(--ink); font-size: 14.5px; }
.focus .why small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.group { margin: 6px 0 16px; }
.group h2 { margin: 0 4px 6px; font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: .02em; }
.tab { width: 100%; text-align: left; border: 0; background: var(--s1); border-radius: 12px; padding: 11px 13px;
  margin-bottom: 6px; display: block; transition: background var(--ease); }
.tab:active { background: var(--s2); }
.tab .t { color: var(--ink); font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tab .u { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty { color: var(--muted); padding: 30px 6px; font-size: 14px; }

/* view */
.stage { flex: 1; min-height: 0; position: relative; overflow: hidden; background: #000; display: flex;
  align-items: center; justify-content: center; touch-action: none; }
.stage img { display: block; max-width: 100%; max-height: 100%; user-select: none; -webkit-user-select: none;
  -webkit-touch-callout: none; -webkit-user-drag: none; touch-action: none; transform-origin: 0 0; }
.stage.moving img { will-change: transform; }
.stage .wait { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 14px;
  pointer-events: none; text-align: center; padding: 20px; }
.ripple { position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
  border: 2px solid rgba(46, 143, 255, .95); background: rgba(46, 143, 255, .18); pointer-events: none;
  animation: rip .45s ease-out forwards; }
@keyframes rip { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
.ripple.hold { width: 46px; height: 46px; margin: -23px 0 0 -23px; animation: hold .22s ease-out forwards; }
@keyframes hold { from { transform: scale(.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.live { background: var(--ok); }
.dot.bad { background: var(--bad); }

.bar { flex: none; display: flex; gap: 6px; align-items: center; padding: 8px 10px 10px; background: var(--bg);
  border-top: 1px solid var(--line); }
.bar input { flex: 1; min-width: 0; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--s1);
  padding: 0 12px; color: var(--ink); outline: none; font-size: 16px; }
.bar input:focus { border-color: var(--accent); }
.bar .icon { width: 38px; height: 38px; }
/* the key row over the bar (11-10): mouse buttons, ⇧ ⌃ ⌥ ⌘, the keys a phone keyboard lacks */
.krow { flex: none; display: flex; gap: 4px; padding: 7px 10px 0; background: var(--bg); border-top: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none; touch-action: pan-x; }
.krow::-webkit-scrollbar { display: none; }
.krow[hidden] { display: none; }
.krow .k { flex: none; min-width: 38px; height: 36px; padding: 0 10px; border: 0; border-radius: 9px; background: var(--s1);
  color: var(--ink); font: inherit; font-size: 14px; display: inline-flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.krow .k svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.krow .k.on, .krow .k.lock { background: var(--ink); color: var(--bg); }
.krow .k.lock { box-shadow: inset 0 -3px 0 var(--accent); }
.bar .icon.on { background: var(--s2); color: var(--ink); }
.toast { position: fixed; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--s3); color: var(--ink); padding: 8px 14px; border-radius: 10px; font-size: 13.5px; z-index: 9;
  max-width: 86vw; text-align: center; transition: opacity .3s; }

/* 11-09 rework: Gregg's whole screen in the list, a JS dialog sheet, the #bench meter */
a.tab { color: inherit; text-decoration: none; }
.tab.desk .t { display: flex; align-items: center; gap: 8px; }
.tab.desk svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sheet { position: fixed; left: 12px; right: 12px; bottom: calc(70px + env(safe-area-inset-bottom)); background: var(--s2);
  border: 1px solid var(--line-strong); border-radius: 14px; padding: 14px; z-index: 8; }
.sheet .stext { color: var(--ink); font-size: 14.5px; margin-bottom: 10px; white-space: pre-wrap; max-height: 30vh; overflow: auto; }
.sheet .srow { display: flex; gap: 8px; justify-content: flex-end; }
.meter { position: absolute; left: 6px; top: 6px; background: rgba(0, 0, 0, .7); color: #9f9; font: 12px/1.35 ui-monospace, Menlo, monospace;
  padding: 4px 7px; border-radius: 6px; white-space: pre; pointer-events: none; z-index: 2; }
.boot { margin: auto; padding: 24px; text-align: center; color: var(--muted); }
.empty.tight { padding: 8px 4px; }
