/* Airwave on the web (DR-046). The site's type and greys; monochrome like the apps. Light and dark follow the system. */
:root {
  color-scheme: light dark;
  --bg: #ffffff; --panel: #f5f5f7; --panel-2: #ebebef; --fg: #1d1d1f; --fg-2: #6e6e73; --line: #d2d2d7;
  --ink: #1d1d1f; --ink-fg: #ffffff; --scrim: rgba(0,0,0,.32); --glass: rgba(250,250,252,.78); --shadow: rgba(0,0,0,.18);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --round: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #000000; --panel: #131315; --panel-2: #1d1d20; --fg: #f5f5f7; --fg-2: #a1a1a6; --line: #38383d;
    --ink: #f5f5f7; --ink-fg: #000000; --scrim: rgba(0,0,0,.55); --glass: rgba(28,28,30,.78); --shadow: rgba(0,0,0,.6); }
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 17px/1.47 var(--font); letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased; }
h1, h2, p { margin: 0; text-wrap: balance; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }

.screen { min-height: 100%; }
.centred { display: grid; place-items: center; padding: 32px 16px; }
#loading { display: grid; place-items: center; }
.card { width: min(440px, 100%); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; }
.wordmark img { height: 48px; width: auto; display: block; }
.wordmark.small img { height: 22px; }
.card h1 { font-size: clamp(30px, 6vw, 40px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 700; margin-top: 12px; }
.sub { color: var(--fg-2); font-size: 17px; }
.fine { color: var(--fg-2); font-size: 13px; }
.device { width: 56px; height: 56px; }

.buttons { display: flex; flex-direction: column; gap: 10px; width: 100%; margin-top: 8px; }
.buttons.row { flex-direction: row; justify-content: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border-radius: 12px; border: 1px solid transparent; font-size: 17px; font-weight: 500; cursor: pointer; }
.btn svg { width: 17px; height: 17px; }
.btn.apple { background: var(--ink); color: var(--ink-fg); }
.btn.google { background: var(--bg); color: var(--fg); border-color: var(--line); }
.btn.plain { background: transparent; color: var(--fg); border-color: var(--line); }
.btn.small { min-height: 32px; padding: 0 14px; font-size: 14px; border-radius: 999px; }
.btn.primary { background: var(--ink); color: var(--ink-fg); }
.btn:hover { filter: brightness(1.06); }
.btn:focus-visible, .tool:focus-visible, .computer button:focus-visible { outline: 2px solid var(--fg-2); outline-offset: 2px; }
.btn[disabled] { opacity: .45; cursor: default; }

.match { font: 700 84px/1 var(--round); letter-spacing: 0.02em; font-variant-numeric: tabular-nums; margin: 8px 0 4px; }

/* Home */
.bar { position: sticky; top: 0; display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 max(20px, env(safe-area-inset-left));
  background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent); z-index: 5; }
.spacer { flex: 1; }
.home-body { width: min(980px, 100% - 32px); margin: 40px auto 64px; }
.title { font-size: clamp(32px, 5vw, 48px); letter-spacing: -0.03em; font-weight: 700; }
.home-body .sub { margin-top: 6px; }
.computers { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.computer { background: var(--panel); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 14px; min-height: 176px; }
.computer .top { display: flex; align-items: flex-start; gap: 12px; }
.computer .glyph { width: 40px; height: 40px; flex: none; color: var(--fg); }
.computer .glyph svg { width: 40px; height: 40px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.computer h2 { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; overflow-wrap: anywhere; }
.computer .model { color: var(--fg-2); font-size: 14px; }
.computer .state { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--fg-2); }
.computer .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.computer .dot.on { background: var(--fg); }
.computer .actions { margin-top: auto; display: flex; gap: 8px; }
.computer .actions .btn { flex: 1; min-height: 40px; font-size: 15px; }
.empty { color: var(--fg-2); background: var(--panel); border-radius: 18px; padding: 28px; }

/* Session */
.session { position: fixed; inset: 0; background: #000; }
.stage { position: absolute; inset: 0; outline: none; overflow: hidden; }
.stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.stage.control video { cursor: default; }
.keys { position: absolute; left: -9999px; top: 0; width: 1px; height: 1px; opacity: 0; }
.status { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 12px;
  color: #f5f5f7; font-size: 15px; background: rgba(28,28,30,.72); padding: 12px 18px; border-radius: 999px;
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.toolbar { position: absolute; top: 12px; left: 50%; transform: translate(-50%, 0); display: flex; align-items: center; gap: 4px;
  padding: 6px 6px 6px 16px; border-radius: 999px; background: rgba(28,28,30,.72); color: #f5f5f7;
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 6px 24px rgba(0,0,0,.35); transition: opacity .25s ease, transform .25s ease; z-index: 3; }
.toolbar.away { opacity: 0; transform: translate(-50%, -16px); pointer-events: none; }
.toolbar .name { font-size: 14px; font-weight: 600; margin-right: 8px; max-width: 28vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool { width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: inherit; display: grid; place-items: center; cursor: pointer; }
.tool:hover { background: rgba(255,255,255,.12); }
.tool svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tool[aria-pressed="true"] .mute, .tool[aria-pressed="false"] .wave { display: none; }
.tool.end { background: rgba(255,255,255,.14); }

/* Sheet: errors, menus and confirmations */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 40; }
.sheet { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: min(520px, 100%); z-index: 41;
  background: var(--bg); color: var(--fg); border-radius: 22px 22px 0 0; padding: 26px 24px calc(20px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 40px var(--shadow); animation: up .28s cubic-bezier(.2,.8,.2,1); }
@media (min-width: 700px) { .sheet { bottom: 50%; transform: translate(-50%, 50%); border-radius: 22px; animation: none; } }
@keyframes up { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }
.sheet h2 { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.sheet p { color: var(--fg-2); margin-top: 6px; font-size: 15px; }
.sheet .buttons { margin-top: 18px; }
.sheet-body { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 14px; }
.sheet-body:empty { display: none; }
.sheet-body .btn { min-height: 44px; font-size: 15px; justify-content: space-between; background: var(--panel); }
.sheet-body .btn kbd { font: 13px var(--font); color: var(--fg-2); }

.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid color-mix(in srgb, currentColor 25%, transparent);
  border-top-color: currentColor; animation: spin .9s linear infinite; }
#loading .spinner { color: var(--fg-2); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } .sheet { animation: none; } .toolbar { transition: none; } }
