/* Transit Alerts portal — "Liquid Glass" theme.
   Solid backgrounds (white light / black dark, no gradients); glass = frosted translucent panels
   (cards, sticky bars, modals, install UI) with blur, hairline borders, soft depth + inner highlight.
   Indigo-violet accent. Mobile-first; full light + dark. Token-driven so the look is central. */
:root {
  --bg:#ffffff; --fg:#15172b; --muted:#5b6275;
  --accent:#5b50f0; --accent-700:#4a3fe0; --accent-soft:rgba(91,80,240,.10);
  --ok:#1a8a3a; --warn:#b9610a;
  --line:rgba(20,18,45,.10);
  --glass:rgba(255,255,255,.66); --glass-bar:rgba(255,255,255,.72); --glass-border:rgba(20,18,45,.08);
  --hi:rgba(255,255,255,.65);          /* inner top highlight */
  --blur:saturate(1.6) blur(16px);
  --input:#ffffff; --input-fg:#15172b;
  --elev:0 1px 2px rgba(16,18,40,.06), 0 6px 20px rgba(16,18,40,.07);
  --elev-lg:0 10px 40px rgba(16,18,40,.16);
  --code-bg:#0e1426; --code-fg:#dbe4ff;
  --r:18px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) { --bg:#000000; --fg:#f3f4f8; --muted:#9aa3b8;
    --accent:#8a7dff; --accent-700:#7466ff; --accent-soft:rgba(138,125,255,.16);
    --ok:#34c759; --warn:#f0a020; --line:rgba(255,255,255,.12);
    --glass:rgba(255,255,255,.055); --glass-bar:rgba(22,22,28,.62); --glass-border:rgba(255,255,255,.12);
    --hi:rgba(255,255,255,.10); --input:rgba(255,255,255,.05); --input-fg:#f3f4f8;
    --elev:0 1px 2px rgba(0,0,0,.5), 0 8px 28px rgba(0,0,0,.55); --elev-lg:0 14px 48px rgba(0,0,0,.7);
    --code-bg:#0a0f1e; --code-fg:#dbe4ff; }
}
:root[data-theme="light"] {
  --bg:#ffffff; --fg:#15172b; --muted:#5b6275;
  --accent:#5b50f0; --accent-700:#4a3fe0; --accent-soft:rgba(91,80,240,.10);
  --ok:#1a8a3a; --warn:#b9610a; --line:rgba(20,18,45,.10);
  --glass:rgba(255,255,255,.66); --glass-bar:rgba(255,255,255,.72); --glass-border:rgba(20,18,45,.08);
  --hi:rgba(255,255,255,.65); --input:#ffffff; --input-fg:#15172b;
  --elev:0 1px 2px rgba(16,18,40,.06), 0 6px 20px rgba(16,18,40,.07); --elev-lg:0 10px 40px rgba(16,18,40,.16);
  --code-bg:#0e1426; --code-fg:#dbe4ff;
}
:root[data-theme="dark"] {
  --bg:#000000; --fg:#f3f4f8; --muted:#9aa3b8;
  --accent:#8a7dff; --accent-700:#7466ff; --accent-soft:rgba(138,125,255,.16);
  --ok:#34c759; --warn:#f0a020; --line:rgba(255,255,255,.12);
  --glass:rgba(255,255,255,.055); --glass-bar:rgba(22,22,28,.62); --glass-border:rgba(255,255,255,.12);
  --hi:rgba(255,255,255,.10); --input:rgba(255,255,255,.05); --input-fg:#f3f4f8;
  --elev:0 1px 2px rgba(0,0,0,.5), 0 8px 28px rgba(0,0,0,.55); --elev-lg:0 14px 48px rgba(0,0,0,.7);
  --code-bg:#0a0f1e; --code-fg:#dbe4ff;
}

* { box-sizing: border-box; }
html, body { margin:0; }
/* Full-viewport themed background floor so iOS standalone never exposes the white PWA canvas
   (manifest background_color) as a band below the fixed tab bar or at the page bottom. */
html { overflow-x: hidden; overflow-x: clip; max-width: 100%; background:var(--bg); min-height:100vh; min-height:100dvh; }
body { font-family:-apple-system, system-ui, "Segoe UI", Roboto, sans-serif; background:var(--bg); color:var(--fg);
  min-height:100vh; min-height:100dvh;
  -webkit-text-size-adjust:100%; overflow-wrap:break-word; line-height:1.45; letter-spacing:-.005em;
  /* Remove double-tap-to-zoom and the 300ms tap delay; scroll/pan and pinch-zoom stay available. */
  touch-action:manipulation; }
a { color: var(--accent); text-decoration: none; }
h1 { font-size:23px; margin:.2em 0 .4em; letter-spacing:-.02em; font-weight:800; }
h2 { font-size:18px; letter-spacing:-.01em; }
.muted { color:var(--muted); }
.row { display:flex; align-items:center; gap:10px; }

/* ---------- bold SVG icons ---------- */
.ic { display:inline-flex; align-items:center; justify-content:center; width:1.15em; height:1.15em;
  vertical-align:-.2em; flex:0 0 auto; color:inherit; }
.ic svg { width:100%; height:100%; display:block; stroke-width:2.1; }
.ic-lg { width:1.4em; height:1.4em; }

/* ---------- glass surface (shared) ---------- */
.glass { background:var(--glass); -webkit-backdrop-filter:var(--blur); backdrop-filter:var(--blur);
  border:1px solid var(--glass-border); box-shadow:var(--elev), inset 0 1px 0 var(--hi); }

/* Top bar — frosted, sticky */
.topbar { display:flex; align-items:center; gap:12px; flex-wrap:wrap; padding:11px 18px; padding-top:max(11px, env(safe-area-inset-top));
  background:var(--glass-bar); -webkit-backdrop-filter:var(--blur); backdrop-filter:var(--blur);
  border-bottom:1px solid var(--glass-border); position:sticky; top:0; z-index:30; }
.brand { font-weight:800; font-size:18px; margin-right:auto; letter-spacing:-.02em; display:flex; align-items:center; gap:8px;
  min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.brand .ic { color:var(--accent); width:1.35em; height:1.35em; }
nav { display:flex; align-items:center; gap:10px; min-width:0; }
.nav-link { color:var(--muted); font-weight:600; }
.nav-link:hover { color:var(--fg); }
.nav-link.active { color:var(--accent); }
#authBtn { max-width:46vw; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.theme-toggle { background:var(--glass); border:1px solid var(--glass-border); color:var(--fg); border-radius:999px;
  width:38px; height:38px; cursor:pointer; display:inline-flex; align-items:center; justify-content:center;
  -webkit-backdrop-filter:var(--blur); backdrop-filter:var(--blur); }
.theme-toggle .ic { width:18px; height:18px; }
.theme-toggle:hover { color:var(--accent); border-color:var(--accent); }

.container { max-width:820px; margin:0 auto; padding:20px 16px calc(96px + env(safe-area-inset-bottom)); }

/* ---------- buttons ---------- */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:7px;
  background:linear-gradient(180deg, var(--accent), var(--accent-700)); color:#fff; border:0; padding:10px 16px;
  border-radius:12px; cursor:pointer; font-size:14px; font-weight:650; min-height:42px;
  box-shadow:0 1px 1px rgba(0,0,0,.12), 0 6px 18px -6px var(--accent), inset 0 1px 0 rgba(255,255,255,.25);
  transition:transform .06s ease, box-shadow .15s ease, opacity .15s ease; }
.btn:hover { box-shadow:0 2px 4px rgba(0,0,0,.14), 0 10px 26px -8px var(--accent), inset 0 1px 0 rgba(255,255,255,.3); }
.btn:active { transform:scale(.985); }
.btn .ic { width:1.05em; height:1.05em; }
.btn.ghost { background:var(--glass); -webkit-backdrop-filter:var(--blur); backdrop-filter:var(--blur);
  border:1px solid var(--glass-border); color:var(--fg); box-shadow:var(--elev); }
.btn.ghost:hover { border-color:var(--accent); color:var(--accent); box-shadow:var(--elev); }
.btn.sm { padding:7px 12px; font-size:13px; min-height:34px; border-radius:10px; }
.btn.block { width:100%; }
.btn.danger { background:linear-gradient(180deg, #e5484d, #c22a2f);
  box-shadow:0 1px 1px rgba(0,0,0,.12), 0 6px 18px -6px rgba(229,72,77,.7), inset 0 1px 0 rgba(255,255,255,.25); }
.btn.danger:hover { box-shadow:0 2px 4px rgba(0,0,0,.14), 0 10px 26px -8px rgba(229,72,77,.8), inset 0 1px 0 rgba(255,255,255,.3); }
.btn.ghost.danger { background:var(--glass); color:#e5484d; }
.btn.ghost.danger:hover { border-color:#e5484d; color:#e5484d; }
.btn[disabled] { opacity:.5; cursor:default; box-shadow:none; }

/* ---------- danger zone (account deletion) ---------- */
.danger-zone { margin-top:28px; padding:16px 18px; border:1px solid rgba(229,72,77,.4); border-radius:var(--r);
  background:rgba(229,72,77,.06); }
.danger-zone h3 { margin:0 0 4px; font-size:15px; color:#e5484d; font-weight:700; }
.danger-zone p { margin:0 0 12px; font-size:13px; color:var(--muted); }

/* ---------- cards + inputs ---------- */
.card { background:var(--glass); -webkit-backdrop-filter:var(--blur); backdrop-filter:var(--blur);
  border:1px solid var(--glass-border); border-radius:var(--r); padding:18px; margin:14px 0;
  box-shadow:var(--elev), inset 0 1px 0 var(--hi); }
label.muted { display:block; margin:10px 0 4px; font-size:13px; font-weight:600; }
input[type=text], input[type=email], input[type=search], input[type=tel], input[type=number], input[type=time], input[type=password], select {
  width:100%; padding:11px 12px; border-radius:11px; border:1px solid var(--glass-border); background:var(--input);
  /* font-size must be >=16px so iOS Safari does not auto-zoom the page when a field is focused. */
  color:var(--input-fg); font-size:16px; }
input::placeholder { color:var(--muted); }
input:focus, select:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }

.result { padding:12px; border:1px solid var(--glass-border); border-radius:12px; margin:8px 0; display:flex; align-items:center;
  gap:10px; cursor:pointer; background:var(--glass); -webkit-backdrop-filter:var(--blur); backdrop-filter:var(--blur);
  box-shadow:var(--elev); transition:border-color .15s, transform .05s; }
.result:hover { border-color:var(--accent); }
.result:active { transform:scale(.995); }
.tag { font-size:11px; padding:2px 8px; border-radius:999px; border:1px solid var(--line); color:var(--muted); }
.tag.new { color:var(--ok); border-color:var(--ok); }
.pill { font-size:12px; color:var(--ok); display:inline-flex; align-items:center; gap:4px; }

.chips { display:flex; gap:8px; flex-wrap:wrap; margin:8px 0; }
.chip { display:inline-flex; align-items:center; gap:7px; padding:9px 14px; border:1px solid var(--glass-border);
  border-radius:999px; cursor:pointer; user-select:none; min-height:40px; background:var(--glass);
  -webkit-backdrop-filter:var(--blur); backdrop-filter:var(--blur); font-weight:600; transition:border-color .12s, background .12s, color .12s; }
.chip .ic { color:var(--muted); }
.chip.on { border-color:var(--accent); background:var(--accent-soft); color:var(--accent); }
.chip.on .ic { color:var(--accent); }

/* ---------- hero / landing ---------- */
.hero { text-align:center; padding:44px 8px 28px; }
.hero .ic { color:var(--accent); }
/* text-wrap:balance so a two-line headline splits evenly instead of orphaning its last word.
   Unsupported browsers ignore it and wrap as before. */
.hero h1 { font-size:31px; margin-bottom:10px; letter-spacing:-.03em; text-wrap:balance; }
.hero p { color:var(--muted); max-width:36ch; margin:0 auto 18px; }
.features { display:flex; flex-direction:column; gap:10px; max-width:380px; margin:22px auto 0; text-align:left; }
.feature { display:flex; gap:12px; align-items:flex-start; }
.feature .fi { font-size:20px; color:var(--accent); display:inline-flex; }
.feature .fi .ic { width:1.2em; height:1.2em; }

/* ---------- wizard ---------- */
.choices { display:flex; flex-direction:column; gap:12px; margin-top:10px; }
.choice { display:flex; align-items:center; gap:14px; padding:16px 18px; background:var(--glass);
  -webkit-backdrop-filter:var(--blur); backdrop-filter:var(--blur); border:1px solid var(--glass-border);
  border-radius:var(--r); cursor:pointer; transition:border-color .15s, transform .05s, box-shadow .15s;
  box-shadow:var(--elev), inset 0 1px 0 var(--hi); }
.choice:hover { border-color:var(--accent); }
.choice:active { transform:scale(.99); }
.choice-icon { font-size:24px; width:46px; height:46px; border-radius:13px; display:inline-flex; align-items:center;
  justify-content:center; color:var(--accent); background:var(--accent-soft); }
.choice-icon .ic { width:1.15em; height:1.15em; }
.choice-title { font-weight:700; font-size:16px; }
.chev { color:var(--muted); margin-left:auto; display:inline-flex; }
.chev .ic { width:20px; height:20px; }

.card.wiz { padding:20px; }
.stepper { display:flex; gap:6px; margin-bottom:14px; }
.stepper .dot { height:5px; flex:1; border-radius:999px; background:var(--line); transition:background .2s; }
.stepper .dot.on { background:linear-gradient(90deg, var(--accent), var(--accent-700)); }
.wiz-actions { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-top:18px; }

.picklist { display:flex; flex-direction:column; gap:8px; margin-top:10px; max-height:52vh; overflow:auto; }
.swatch { width:12px; height:14px; border-radius:3px; flex:0 0 auto; display:inline-block; border:1px solid rgba(128,128,128,.25); }

.bigchoices { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:10px; }
.bigbtn { text-align:left; padding:16px; border-radius:14px; border:1px solid var(--glass-border); background:var(--glass);
  -webkit-backdrop-filter:var(--blur); backdrop-filter:var(--blur); color:var(--fg); cursor:pointer; font-size:15px;
  font-weight:650; min-height:60px; box-shadow:var(--elev), inset 0 1px 0 var(--hi); transition:border-color .12s, background .12s; }
.bigbtn:hover { border-color:var(--accent); }
.bigbtn.on { border-color:var(--accent); background:var(--accent-soft); color:var(--accent); }
.bigbtn.ghost { font-weight:550; color:var(--muted); }

.timecol { font-variant-numeric:tabular-nums; font-weight:800; min-width:74px; color:var(--accent); }

/* ---------- subscription cards ---------- */
.subcard { position:relative; padding-left:20px; overflow:hidden; }
.subcard::before { content:""; position:absolute; left:0; top:0; bottom:0; width:5px;
  background:linear-gradient(180deg, var(--accent), var(--accent-700)); }
.subcard.paused { opacity:.6; }
.subcard-title { font-weight:750; font-size:16px; display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.chanrow { display:inline-flex; align-items:center; gap:8px; }
.chanrow .ic { color:var(--accent); width:1.1em; height:1.1em; }
.metarow { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.metarow .ic { color:var(--accent); }

/* ---------- bottom tab bar (mobile) ---------- */
.tabbar { display:none; }
@media (max-width: 720px) {
  nav .nav-link { display:none; }
  .tabbar { display:flex; position:fixed; left:0; right:0; bottom:0; z-index:40;
    background:var(--glass-bar); -webkit-backdrop-filter:var(--blur); backdrop-filter:var(--blur);
    border-top:1px solid var(--glass-border); padding:6px 0 calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { flex:1; text-align:center; color:var(--muted); font-size:11px; font-weight:650;
    display:flex; flex-direction:column; align-items:center; gap:3px; padding:4px 0; }
  .tabbar a .ti { font-size:21px; display:inline-flex; }
  .tabbar a .ti .ic { width:1em; height:1em; }
  .tabbar a.active { color:var(--accent); }
  .hero h1 { font-size:26px; }
  .bigchoices { grid-template-columns: 1fr; }
  h1 { font-size:21px; }
}

/* ---------- auth modal ---------- */
.modal-backdrop { position:fixed; inset:0; z-index:100; display:flex; align-items:center; justify-content:center;
  background:rgba(8,10,22,.5); -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px); padding:16px; animation:fade .15s ease; }
@keyframes fade { from { opacity:0 } to { opacity:1 } }
.modal { position:relative; width:100%; max-width:390px; background:var(--glass-bar); color:var(--fg);
  -webkit-backdrop-filter:var(--blur); backdrop-filter:var(--blur); border:1px solid var(--glass-border);
  border-radius:22px; box-shadow:var(--elev-lg), inset 0 1px 0 var(--hi); padding:24px 22px; animation:pop .16s ease; }
@keyframes pop { from { transform:translateY(8px) scale(.98); opacity:.6 } to { transform:none; opacity:1 } }
.modal-x { position:absolute; top:10px; right:12px; background:none; border:0; color:var(--muted);
  cursor:pointer; padding:6px; border-radius:9px; display:inline-flex; }
.modal-x .ic { width:20px; height:20px; }
.modal-x:hover { background:var(--accent-soft); color:var(--fg); }
.modal-brand { font-weight:700; font-size:15px; margin-bottom:14px; display:flex; align-items:center; gap:7px; }
.modal-brand .ic { color:var(--accent); }
.modal-title { font-size:20px; margin:0 0 14px; letter-spacing:-.02em; font-weight:800; }
.modal-field { display:block; margin:0 0 12px; }
.modal-field > span { display:block; font-size:12px; margin-bottom:4px; font-weight:600; }
.modal input { width:100%; box-sizing:border-box; background:var(--input); color:var(--input-fg);
  /* font-size >=16px → no iOS focus auto-zoom (matches the shared input rule). */
  border:1px solid var(--glass-border); border-radius:11px; padding:11px 12px; font-size:16px; min-height:44px; }
.modal input:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }
.field-error { color:var(--warn); font-size:13px; min-height:18px; margin:2px 0 8px; }
/* Success counterpart, for the webhook test-delivery result. */
.ok-text { color:var(--ok); font-size:13px; }
.modal-foot { text-align:center; color:var(--muted); font-size:13px; margin-top:12px; }
.linkbtn { background:none; border:0; color:var(--accent); font:inherit; font-weight:650; cursor:pointer; padding:0; }
.linkbtn:hover { text-decoration:underline; }

/* ---------- PWA install banner + iOS hint ---------- */
.install-banner { position:fixed; left:12px; right:12px; bottom:calc(12px + env(safe-area-inset-bottom)); z-index:60;
  display:flex; align-items:center; gap:12px; padding:12px 14px; border-radius:16px;
  background:var(--glass-bar); -webkit-backdrop-filter:var(--blur); backdrop-filter:var(--blur);
  border:1px solid var(--glass-border); box-shadow:var(--elev-lg), inset 0 1px 0 var(--hi); animation:rise .25s ease; }
@media (max-width: 720px) { .install-banner { bottom:calc(70px + env(safe-area-inset-bottom)); } } /* clear the tab bar */
@keyframes rise { from { transform:translateY(12px); opacity:0 } to { transform:none; opacity:1 } }
.install-banner .ic-app { width:38px; height:38px; border-radius:11px; background:var(--accent-soft); color:var(--accent);
  display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto; }
.install-banner .ic-app .ic { width:22px; height:22px; }
.install-banner .it { margin-right:auto; min-width:0; }
.install-banner .it b { font-weight:700; }
.install-banner .it div { font-size:12px; color:var(--muted); }
.install-card { border:1px solid var(--accent); background:var(--accent-soft); }
.install-steps { display:flex; flex-direction:column; gap:6px; margin:8px 0 0; font-size:13px; }
.install-steps .step { display:flex; align-items:center; gap:8px; }
.install-steps .ic { color:var(--accent); }
.why { background:none; border:0; color:var(--accent); font:inherit; font-weight:600; cursor:pointer; padding:0; text-decoration:underline; }

/* ---------- developer portal ---------- */
.sub { display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:10px 0; border-bottom:1px solid var(--line); }
.sub > span { word-break:break-all; }
pre { max-width:100%; white-space:pre-wrap; word-break:break-word; background:var(--code-bg); color:var(--code-fg);
  padding:12px; border-radius:12px; font-size:12px; line-height:1.5; }
code { background:var(--accent-soft); color:var(--accent); padding:1px 5px; border-radius:5px; word-break:break-all; }
pre code { background:none; color:inherit; padding:0; }
.flash { background:var(--accent-soft); border:1px solid var(--accent); border-radius:12px; padding:10px 12px; margin:10px 0; font-size:13px; }

/* ---------- accessibility fallbacks ---------- */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  /* No backdrop-filter → use solid opaque surfaces so text stays legible. */
  :root { --glass:var(--bg); --glass-bar:var(--bg); }
  .topbar, .tabbar, .card, .chip, .choice, .bigbtn, .result, .modal, .install-banner, .theme-toggle, .btn.ghost {
    background:var(--bg); }
  :root[data-theme="dark"] .card, :root[data-theme="dark"] .chip { background:#141414; }
}
@media (prefers-reduced-transparency: reduce) {
  .topbar, .tabbar, .card, .chip, .choice, .bigbtn, .result, .modal, .install-banner, .theme-toggle, .btn.ghost {
    -webkit-backdrop-filter:none; backdrop-filter:none; background:var(--bg); }
  :root[data-theme="dark"] .card, :root[data-theme="dark"] .chip, :root:not([data-theme]) .card { background:var(--bg); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation:none !important; transition:none !important; }
}

/* ---------- developer portal docs ---------- */
.doc-layout { display:grid; grid-template-columns:180px 1fr; gap:22px; align-items:start; margin-top:8px; }
.doc-nav { position:sticky; top:74px; display:flex; flex-direction:column; gap:2px; }
.doc-nav a { color:var(--muted); font-size:13px; font-weight:600; padding:6px 10px; border-radius:8px; border-left:2px solid transparent; }
.doc-nav a:hover { color:var(--fg); background:var(--glass); }
.doc-body { min-width:0; }
.doc-section { scroll-margin-top:74px; margin:0 0 26px; }
.doc-section h2 { font-size:18px; margin:0 0 8px; letter-spacing:-.01em; }

/* code block with language tabs + copy */
.code { background:var(--glass); -webkit-backdrop-filter:var(--blur); backdrop-filter:var(--blur);
  border:1px solid var(--glass-border); border-radius:14px; box-shadow:var(--elev), inset 0 1px 0 var(--hi);
  margin:10px 0; overflow:hidden; }
.code-head { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:7px 10px; border-bottom:1px solid var(--glass-border); }
.code-pre { margin:0; padding:14px; background:var(--code-bg); color:var(--code-fg); font-size:12.5px; line-height:1.55;
  white-space:pre; overflow-x:auto; font-family:ui-monospace, SFMono-Regular, Menlo, monospace; }
.lang-tabs { display:flex; gap:4px; flex-wrap:wrap; }
.lang-tab { background:transparent; border:1px solid var(--glass-border); color:var(--muted); font:inherit; font-size:12px; font-weight:600;
  padding:4px 10px; border-radius:999px; cursor:pointer; }
.lang-tab.on { border-color:var(--accent); background:var(--accent-soft); color:var(--accent); }
.copy-btn { display:inline-flex; align-items:center; gap:5px; background:transparent; border:1px solid var(--glass-border);
  color:var(--muted); font:inherit; font-size:12px; font-weight:600; padding:4px 10px; border-radius:8px; cursor:pointer; }
.copy-btn:hover { color:var(--accent); border-color:var(--accent); }
.copy-btn .ic { width:14px; height:14px; }

/* field / type / meaning reference tables. The webhook payload's field notes used to live inside
   the JSON sample as // comments, which made the sample unparseable; they live here instead. */
.field-table { width:100%; border-collapse:collapse; margin:10px 0; font-size:12.5px; }
.field-table th { text-align:left; font-size:11px; letter-spacing:.04em; text-transform:uppercase; color:var(--muted);
  padding:6px 10px 6px 0; border-bottom:1px solid var(--glass-border); font-weight:700; }
.field-table td { padding:7px 10px 7px 0; border-bottom:1px solid var(--glass-border); vertical-align:top; line-height:1.5; }
.field-table tr:last-child td { border-bottom:0; }
.field-table td:first-child { white-space:nowrap; }
.field-table code { font-size:12px; background:var(--accent-soft); padding:1px 5px; border-radius:5px; word-break:break-word; }
.field-table td:nth-child(2) { white-space:nowrap; font-size:12px; }
@media (max-width: 620px) {
  /* Three columns do not fit a phone; stack each row into a labelled block instead of scrolling. */
  .field-table, .field-table tbody, .field-table tr, .field-table td { display:block; width:100%; }
  .field-table thead { display:none; }
  .field-table tr { padding:8px 0; border-bottom:1px solid var(--glass-border); }
  .field-table td { border-bottom:0; padding:1px 0; }
  .field-table td:first-child, .field-table td:nth-child(2) { white-space:normal; }
  .field-table td:nth-child(2)::before { content:'type: '; color:var(--muted); }
}

/* endpoint rows + method badges */
.endpoint { display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:8px 0; border-bottom:1px solid var(--glass-border); }
.endpoint:last-child { border-bottom:0; }
.method { font-size:11px; font-weight:800; letter-spacing:.03em; padding:2px 7px; border-radius:6px; color:#fff; flex:0 0 auto; }
.method.get { background:var(--accent); } .method.post { background:var(--ok); }
.method.patch { background:var(--warn); } .method.delete { background:#e5484d; }
.ep-path { font-size:12.5px; color:var(--fg); background:var(--accent-soft); padding:2px 6px; border-radius:6px; word-break:break-all; }
.ep-desc { font-size:12px; }

@media (max-width: 880px) {
  .doc-layout { grid-template-columns:1fr; gap:10px; }
  .doc-nav { position:static; flex-direction:row; flex-wrap:nowrap; overflow-x:auto; gap:4px; padding-bottom:4px;
    border-bottom:1px solid var(--glass-border); }
  .doc-nav a { white-space:nowrap; border-left:0; }
}

/* ───────────────────────── Accessibility (Pass 3 / B2) ─────────────────────────
   .result, .choice and .chip became real <button>s so they can be reached and
   operated by keyboard and assistive tech. A button does not inherit font or
   colour and shrink-wraps to its content, so restate what the <div> got for
   free — otherwise the controls silently restyle themselves. */
.result, .choice, .chip {
  font: inherit;
  color: inherit;
  text-align: left;
  -webkit-appearance: none;
  appearance: none;
}
.result, .choice { width: 100%; }
.chip { color: var(--fg); }
.chip[disabled] { cursor: default; }

/* There was no focus-visible rule anywhere in the portal, and the only two outline
   rules removed one. Keyboard users had no way to tell where they were. */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}
/* #app itself takes focus from the skip link; a ring around the whole page is noise.
   Headings keep theirs — a keyboard user landing on a new view should see where they are. */
#app:focus, #app:focus-visible { outline: none; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--bg); color: var(--fg); padding: 10px 16px;
  border: 1px solid var(--accent); border-radius: 0 0 10px 0; font-weight: 650;
}
.skip-link:focus { left: 0; }

/* Group heading for a row of chips. Was a <label> pointing at nothing. */
.grouplabel { display: block; margin: 10px 0 4px; font-size: 13px; font-weight: 600; color: var(--muted); }

/* ───────────────────────── Legal pages + consent (B1/B3) ───────────────────────── */
.sitefoot {
  display: flex; flex-wrap: wrap; gap: 18px; justify-content: center;
  padding: 26px 16px calc(26px + env(safe-area-inset-bottom, 0px));
  font-size: 13px; color: var(--muted);
}
.sitefoot a { color: var(--muted); text-decoration: none; }
.sitefoot a:hover { color: var(--accent); text-decoration: underline; }

.legal { max-width: 720px; margin: 0 auto; line-height: 1.6; }
.legal h1 { margin-bottom: 4px; }
.legal h2 { margin: 22px 0 6px; font-size: 16px; }
.legal p, .legal li { color: var(--fg); font-size: 14px; }
.legal ul { padding-left: 20px; margin: 6px 0; }
.legal li { margin: 4px 0; }
.notice {
  border: 1px solid var(--warn); border-radius: 10px; padding: 10px 14px;
  margin: 10px 0 18px; font-size: 13px;
}
/* TCPA wants the consent disclosure next to the control that submits it. */
.consent { font-size: 12px; color: var(--muted); line-height: 1.5; margin: 14px 0 0; }
.consent a { color: var(--accent); }

/* Keep the new surfaces consistent with the existing no-backdrop-filter fallbacks. */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .notice { background: var(--bg); }
}

/* Mobile: the fixed tab bar would otherwise sit on top of the footer links. */
@media (max-width: 720px) { .sitefoot { padding-bottom: 96px; } }

/* Checkbox + label row, for the webhook event picker. A real <label> wrapping the input, so
   the text is part of the hit target and the association needs no for/id pairing. */
.checkrow { display: flex; align-items: center; gap: 8px; padding: 4px 0; cursor: pointer; font-size: 14px; }
.checkrow input { margin: 0; }
