/*
 * The page outside the call, and the floor every screen stands on: visible
 * focus, 24 px targets (44 px under a coarse pointer), motion only when it
 * is wanted. System fonts only: a web font is a download before any words.
 */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--text); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-text-size-adjust: 100%; }
[data-page="embed"] body, [data-page="call"] body { background: var(--call-bg); color: var(--call-text); }
h1 { font-size: 1.5rem; line-height: 1.25; margin: 0; }
h2 { font-size: 1.15rem; margin: 0; }
h3, p { font-size: inherit; margin: 0; }
a { color: var(--accent); }
.boot { padding: 2rem 1rem; text-align: center; color: var(--muted); }
.muted { color: var(--muted); }
.sr-only, [data-layout="dock"] .banner, [data-layout="dock"] .ctl-text, [data-layout="dock"] .toasts { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.i-leave, .i-phone { fill: currentColor; stroke-width: 1; }
.i-more { stroke-width: 3.5; }
.i-signal { stroke: none; }
.i-signal .on { fill: var(--signal-on); }
.i-signal .off { fill: var(--signal-off); }

.btn, .toggle { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 40px; padding: .45rem 1rem; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover, .toggle:hover, .btn.ghost:hover { background: var(--surface-2); }
.btn.primary, .toggle[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.ghost { background: none; border-color: transparent; }
.btn:disabled { opacity: .65; cursor: progress; }
input, select { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; min-height: 40px; padding: .4rem .6rem; }
input[type="checkbox"], input[type="radio"] { flex: none; min-height: 0; width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.field { display: grid; gap: .3rem; font-weight: 600; }
.field input, .field select { font-weight: 400; width: 100%; }
.check { display: flex; align-items: center; gap: .6rem; min-height: 32px; cursor: pointer; }

.top { display: flex; align-items: center; gap: 1rem; padding: .4rem 1rem; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: .4rem; min-height: 32px; color: var(--text); font-weight: 700; text-decoration: none; }
.brand .i, .brand-big .i { color: var(--accent); }
.brand-big .i { width: 40px; height: 40px; }
.top-nav { margin-left: auto; display: flex; align-items: center; gap: .75rem; min-width: 0; }
.top-nav a { display: inline-flex; align-items: center; min-height: 32px; }
.top-me { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 12rem; }
.page { width: 100%; max-width: 960px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.page.center { display: grid; place-items: start center; padding-top: 12vh; }
.card { width: 100%; max-width: 440px; padding: 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 3px var(--shadow); }
.stack { display: grid; gap: .9rem; }
.card p:empty { display: none; }
.signin-err { padding: .6rem .75rem; border-radius: 8px; border: 1px solid var(--danger); color: var(--danger); }
.dev { border-top: 1px solid var(--line); padding-top: 1rem; }

.toasts { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 50; display: grid; gap: .5rem; width: min(28rem, calc(100% - 2rem)); }
[data-page="call"] .toasts, [data-page="embed"] .toasts { bottom: 5rem; }
.toast { display: flex; align-items: flex-start; gap: .5rem; padding: .7rem 1rem; border-radius: 10px; background: var(--text); color: var(--bg); box-shadow: 0 4px 16px var(--shadow); }
.toast-error { background: var(--danger); color: var(--on-danger); }
.toast-x { margin-left: auto; display: inline-grid; place-items: center; min-width: 28px; min-height: 28px; padding: 0; border: 0; border-radius: 6px; background: none; color: inherit; cursor: pointer; }
.toast :focus-visible { outline-color: currentColor; }

@media (max-width: 480px) {
  .top { gap: .5rem; padding: .3rem .75rem; }
  .top-me { display: none; }
  .page.center { padding-top: 1.5rem; }
  .card { padding: 1.1rem; }
}
@media (pointer: coarse) {
  .btn, .toggle, input:not([type="checkbox"]):not([type="radio"]), select, .check, .brand, .top-nav a, .toast-x { min-height: 44px; }
  .toast-x { min-width: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
