/* mumbly remote: always light, airy, one blue, sans. White and grey; the face is the only mark. Nothing loads from another site.
   Every size is a token or a rule here: the page has no inline style (CSP style-src 'self'). 44 px is the floor for anything tappable. */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --ink: #0b0b0f;
  --mid: #6e6e76;
  --rule: rgba(11, 11, 15, 0.08);
  --field: rgba(11, 11, 15, 0.05);
  --band: #f5f5f7;
  --blue: #2563ff;
  --blue-ink: #ffffff;
  --blue-text: #1d55e8;
  --shadow: 0 1px 2px rgba(11, 11, 15, 0.06), 0 24px 60px -24px rgba(11, 11, 15, 0.28);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --gut: 16px;
  --r: 14px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 var(--sans); -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
.hidden { display: none !important; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
a { color: var(--blue-text); }

.app { max-width: 560px; margin: 0 auto; min-height: 100dvh; padding: 0 var(--gut) env(safe-area-inset-bottom); }
.bar { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: env(safe-area-inset-top) 0 0; border-bottom: 1px solid var(--rule); background: var(--bg); }
.bar.plain { border-bottom: 0; }
.brand { font-size: 17px; letter-spacing: -0.01em; }
.face { color: var(--ink); flex: none; }
.who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub { color: var(--mid); font-size: 13px; }
.page { padding: 28px 0 40px; }
h1 { font-size: 28px; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 10px; font-weight: 650; }
h2 { font-size: 20px; letter-spacing: -0.01em; margin: 24px 0 8px; font-weight: 650; }
.lede { color: var(--mid); font-size: 17px; margin: 0 0 20px; }
.hint { color: var(--mid); font-size: 14px; margin: 12px 0; }
.stack { display: flex; flex-direction: column; gap: 12px; margin: 20px 0; }

/* buttons: one primary per row; no chips, no dots */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 0; border-radius: 12px; background: var(--field); color: var(--ink); font-weight: 600; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.btn.primary { background: var(--blue); color: var(--blue-ink); }
.btn.secondary { background: var(--field); }
.btn.quiet { background: transparent; color: var(--blue-text); padding: 0 12px; }
.btn.icon-only { width: 44px; padding: 0; flex: none; }
.btn.icon-only span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.btn:active { opacity: 0.7; }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn.hot { background: var(--blue); color: var(--blue-ink); }
.field { width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid transparent; border-radius: 12px; background: var(--field); font-size: 16px; }
.field:focus { background: var(--bg); border-color: var(--blue); outline: 0; }
textarea.field { resize: none; line-height: 1.35; }
.field.grow { flex: 1; min-width: 0; }
.check { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.check input { width: 22px; height: 22px; accent-color: var(--blue); }

.list { list-style: none; margin: 0; padding: 0; }
.row { display: flex; align-items: center; gap: 12px; min-height: 64px; border-bottom: 1px solid var(--rule); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.notice { margin: 12px 0; padding: 12px 14px; border-radius: 12px; background: var(--band); color: var(--mid); font-size: 15px; }
.sas { font: 600 44px/1.1 var(--mono); letter-spacing: 0.08em; text-align: center; padding: 28px 0; margin: 12px 0; border-radius: var(--r); background: var(--band); }

/* the open session */
.app.session { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100dvh; padding-bottom: 0; }
.panes { min-height: 0; position: relative; }
.pane { position: absolute; inset: 0; display: flex; flex-direction: column; min-height: 0; }
.scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px 0; }
.feed { display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 16px; overflow-wrap: anywhere; }
.msg.user { align-self: flex-end; background: var(--blue); color: var(--blue-ink); }
.msg.mac { align-self: flex-start; background: var(--band); }
.msg p { margin: 0 0 8px; } .msg p:last-child { margin: 0; }
.msg ul, .msg ol { margin: 0 0 8px; padding-left: 22px; }
.msg pre { margin: 0 0 8px; padding: 10px; overflow-x: auto; border-radius: 10px; background: var(--bg); font: 13px/1.4 var(--mono); }
.msg code { font: 14px var(--mono); }
.url { font: 14px var(--mono); color: var(--blue-text); overflow-wrap: anywhere; }
.copy { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin: -6px 0; border: 0; border-radius: 8px; background: transparent; color: var(--mid); vertical-align: middle; cursor: pointer; }
.steps { list-style: none; margin: 0; padding: 0; }
.step { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.step-line { display: flex; align-items: center; gap: 10px; min-height: 28px; }
.step-head { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.step-state { color: var(--mid); font-size: 13px; }
.step.pending .step-head { color: var(--mid); }
.step.failed .step-state { color: var(--ink); font-weight: 600; }
.step-obs { margin: 4px 0 0; color: var(--mid); font-size: 14px; overflow-wrap: anywhere; white-space: pre-wrap; }
.card { padding: 14px; border-radius: var(--r); background: var(--band); display: flex; flex-direction: column; gap: 10px; }
.card p { margin: 0; overflow-wrap: anywhere; }
.choices { display: flex; flex-direction: column; gap: 8px; }
.composer { display: flex; align-items: flex-end; gap: 8px; padding: 10px 0; border-top: 1px solid var(--rule); background: var(--bg); }
.row .btn, .stack .btn { width: auto; }
.stack .btn { width: 100%; }
.screen { display: block; width: 100%; height: auto; margin-top: 12px; border-radius: 10px; background: var(--band); aspect-ratio: 16 / 10; }
.screen.has { aspect-ratio: auto; box-shadow: var(--shadow); }
.screen.drive { touch-action: none; -webkit-user-select: none; user-select: none; }
.displays { display: flex; gap: 4px; margin-top: 8px; }
.fps { width: auto; flex: none; }
.drive-tools { margin-top: 12px; display: none; }
.pane.driving .drive-tools { display: block; }
.keybar { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.key { min-width: 44px; min-height: 44px; padding: 0 10px; border: 0; border-radius: 10px; background: var(--field); font-weight: 600; cursor: pointer; }
.key.wide { padding: 0 14px; }
.key[aria-pressed="true"] { background: var(--blue); color: var(--blue-ink); }
.jobs { list-style: none; margin: 0; padding: 0; }
.job { padding: 14px 0; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 8px; }
.job-line { display: flex; justify-content: space-between; gap: 12px; }
.empty { color: var(--mid); padding: 20px 0; }
.meter { height: 6px; border-radius: 3px; background: var(--field); overflow: hidden; }
.meter-fill { height: 100%; background: var(--blue); }
.p0 { width: 0 } .p1 { width: 10% } .p2 { width: 20% } .p3 { width: 30% } .p4 { width: 40% } .p5 { width: 50% } .p6 { width: 60% } .p7 { width: 70% } .p8 { width: 80% } .p9 { width: 90% } .p10 { width: 100% }
.tabs { display: flex; border-top: 1px solid var(--rule); background: var(--bg); padding-bottom: env(safe-area-inset-bottom); }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; border: 0; background: transparent; color: var(--mid); font-size: 11px; font-weight: 600; cursor: pointer; }
.tab[aria-selected="true"] { color: var(--blue-text); }

/* sheets (approvals, settings) */
.sheet-back { position: fixed; inset: 0; z-index: 10; display: flex; align-items: flex-end; justify-content: center; background: rgba(11, 11, 15, 0.38); }
.layer { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
.layer .sheet-back { pointer-events: auto; position: absolute; }
.sheet { width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; padding: 20px var(--gut) calc(20px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; background: var(--bg); box-shadow: var(--shadow); }
.sheet h2 { margin: 6px 0 12px; font-size: 24px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; color: var(--mid); font-size: 13px; }
.sheet-eyebrow { margin: 8px 0 0; color: var(--blue-text); font-weight: 600; font-size: 14px; }
.sheet-lines { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0 0 12px; }
.sheet-lines dt { color: var(--mid); } .sheet-lines dd { margin: 0; overflow-wrap: anywhere; }
.sheet-dest { margin: 0 0 12px; overflow-wrap: anywhere; }
.sheet-note { margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; background: var(--band); font-size: 15px; }
.sheet-note.loud { background: var(--ink); color: #fff; font-weight: 600; }
.sheet-status { min-height: 22px; margin: 8px 0; color: var(--mid); }
.sheet-actions { display: flex; gap: 10px; } .sheet-actions .btn { flex: 1; }
.setting { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.toast { position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 20; max-width: 88vw; padding: 10px 16px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.toast.on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
