/* The installable app at app.suprsuit.ai/app: install steps, Inbox, Notification settings and the tab bar on top of signin.css, brand.css and router.css.
   Colors from tokens.css and brand.css only. */

.ap-steps { margin: 0; padding: 0; list-style: none; counter-reset: ap; display: flex; flex-direction: column; gap: 12px; text-align: left; }
.ap-steps li { counter-increment: ap; position: relative; padding-left: 40px; min-height: 28px; line-height: 1.45; }
.ap-steps li::before { content: counter(ap); position: absolute; left: 0; top: -2px; width: 28px; height: 28px; border-radius: 50%; background: var(--tint-2);
  color: var(--fg); font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.ap-ic { width: 18px; height: 18px; vertical-align: -3px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ap-note { margin: 0; padding: 10px 14px; border-radius: var(--r-m); background: var(--ok-bg); color: var(--ok-t); text-align: left; }
.ap-devices { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; text-align: left; color: var(--muted); font-size: 14px; }
.ap-devices:not(:empty)::before { content: "Devices getting notifications"; display: block; margin-bottom: 2px; font-weight: 600; color: var(--fg); }
.ap-devices li { padding: 8px 12px; border: 1px solid var(--sep); border-radius: var(--r-m); background: var(--card); }
#sign-out, .si-foot a { color: inherit; }

/* Inbox and Settings: wider than the sign-in card, with a tab bar under the thumb (a rail on wide screens). */
.ap-count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--warn-bg); color: var(--warn-t); font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; }
.ap-count[hidden], .ap-tabs[hidden], .ap-group[hidden], .ap-note[hidden], .ap-banner[hidden] { display: none; }
/* The installed app fills the screen: iOS paints the status bar in theme-color (app.html: the page color in each scheme), so the
   page under it is that same flat color, without the sign-in pages' glow, and keeps clear of the notch and home bar. */
@media (display-mode: standalone) {
  html.si-brand, .si-brand body { background: var(--page); }
}
.si { padding-top: max(24px, env(safe-area-inset-top)); padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.si[data-view="inbox"], .si[data-view="settings"], .si[data-view="computer"] { place-items: start center; padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
.si[data-view="inbox"] .si-card, .si[data-view="settings"] .si-card, .si[data-view="computer"] .si-card { width: min(640px, 100%); padding: 0; background: none; border: 0; box-shadow: none; text-align: left; }
.si[data-view="inbox"] .brand-logo, .si[data-view="settings"] .brand-logo, .si[data-view="computer"] .brand-logo { display: none; }
.si[data-view="inbox"] .si-foot, .si[data-view="settings"] .si-foot, .si[data-view="computer"] .si-foot { margin-top: 20px; }
.ap-page { gap: 14px; }
.ap-head { display: flex; align-items: center; gap: 12px; }
.ap-head h1 { flex: 1; }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.ap-saved { color: var(--muted); font-size: 14px; }
.ap-note.warn { background: var(--warn-bg); color: var(--warn-t); }
.ap-banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--sep); border-radius: var(--r-m); background: var(--card); }
.ap-banner p { flex: 1; font-size: 14px; }

.ap-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--sep); background: var(--page);
  padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.ap-tabs-brand { display: none; }
.ap-tab { position: relative; min-height: 56px; padding: 8px 0; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 12px; font-weight: 600;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; }
.ap-tab[aria-current="page"] { color: var(--fg); }
.ap-tab .ap-count { position: absolute; top: 4px; left: calc(50% + 8px); }
.ap-tab .ap-ic { width: 22px; height: 22px; stroke-width: 1.5; }

.ap-seg { display: inline-flex; align-self: flex-start; padding: 3px; border-radius: 999px; background: var(--tint); }
.ap-seg-b { min-height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.ap-seg-b[aria-pressed="true"] { background: var(--card); color: var(--fg); box-shadow: 0 0 0 1px var(--sep); }

.ap-day { margin: 10px 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.ap-group { list-style: none; margin: 0; padding: 0; border: 1px solid var(--sep); border-radius: var(--r-m); background: var(--card); overflow: hidden; }
.ap-pad { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.ap-pad[hidden] { display: none; }
.ap-group > li + li { border-top: 1px solid var(--sep); }
.ap-row { position: relative; width: 100%; min-height: 64px; padding: 12px 14px 12px 20px; border: 0; background: transparent; color: var(--fg); font: inherit; text-align: left; cursor: pointer;
  display: flex; align-items: flex-start; gap: 12px; }
.ap-row:hover:not(:disabled) { background: var(--tint); }
.ap-row:disabled { cursor: default; }
.ap-dot { position: absolute; left: 7px; top: 28px; width: 6px; height: 6px; border-radius: 50%; background: var(--fg); }
.ap-mark { flex: none; width: 32px; height: 32px; margin-top: 2px; border-radius: var(--r-s); background: var(--tint-2); color: var(--muted); font-weight: 700; display: grid; place-items: center; }
.ap-row-t { flex: 1; min-width: 0; }
.ap-row-t strong { display: block; font-weight: 700; }
.ap-row.read .ap-row-t strong { font-weight: 500; color: var(--muted); }
.ap-meta { display: block; margin-top: 2px; color: var(--muted); font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.ap-badge { display: inline-block; margin-left: 4px; padding: 0 8px; border-radius: 999px; background: var(--tint-2); color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.ap-badge.warn { background: var(--warn-bg); color: var(--warn-t); }
.ap-badge.ok { background: var(--ok-bg); color: var(--ok-t); }
.ap-time { flex: none; margin-top: 2px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ap-empty { padding: 28px 8px; color: var(--muted); text-align: center; }
.ap-empty[hidden] { display: none; }

.ap-sec { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.ap-sec h2 { margin: 0; font-size: 17px; font-weight: 700; }
.ap-sub { color: var(--muted); font-size: 14px; }
.ap-set { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px 10px 16px; flex-wrap: wrap; }
.ap-set-t { flex: 1; min-width: 0; }
.ap-set-t p { margin: 0; }
.ap-set-t .ap-meta { margin-top: 0; }
.ap-switch { position: relative; flex: none; width: 52px; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.ap-switch i { position: absolute; left: 0; top: 8px; width: 52px; height: 28px; border-radius: 999px; background: var(--tint-2); transition: background-color .15s; }
.ap-switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--muted); transition: transform .15s, background-color .15s; }
.ap-switch[aria-checked="true"] i { background: var(--btn); }
.ap-switch[aria-checked="true"] i::after { transform: translateX(24px); background: var(--btn-fg); }
.ap-switch:disabled { opacity: .5; cursor: default; }
.ap-choices { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 4px; }
.ap-times { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.ap-times select, .ap-times input { min-height: 40px; max-width: 100%; padding: 0 10px; border: 1px solid var(--sep); border-radius: var(--r-s); background: var(--card); color: var(--fg); font: inherit; font-size: 16px; }
.ap-times select { flex: 1 1 100%; }

/* Getting the app: a picture of where the button is, the steps, and on a phone an arrow at the screen's edge toward the browser's own
   button (install.js). */
.in-view { gap: 14px; }
.in-fig { display: flex; justify-content: center; padding: 6px 0 10px; }
.in-diagram { width: 120px; height: auto; overflow: visible; }
.in-diagram[viewBox^="0 0 220"] { width: 220px; }
.in-frame { fill: var(--card); stroke: var(--sep); stroke-width: 1.5; }
.in-bar { fill: var(--tint); }
.in-addr, .in-line { fill: var(--tint-2); }
.in-hit { fill: var(--btn); transform-box: fill-box; transform-origin: center; animation: in-pulse 1.6s ease-in-out infinite; }
.in-glyph { fill: none; stroke: var(--btn-fg); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.in-glyph .in-dot { fill: var(--btn-fg); stroke: none; }
.in-label { fill: var(--btn-fg); font: 700 10px var(--font); text-anchor: middle; }
.in-steps strong { white-space: nowrap; }
.in-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; padding: 10px 14px; border: 1px solid var(--sep); border-radius: var(--r-m);
  background: var(--card); color: var(--fg); font-weight: 600; box-shadow: 0 0 0 3px var(--focus); }
.in-row-ic { width: 22px; height: 22px; flex: none; }
.in-row-ic .in-glyph { stroke: var(--fg); stroke-width: 1.8; }
.in-alt { margin: 0; padding-top: 10px; border-top: 1px solid var(--sep); text-align: left; }
.in-after { margin: 0; padding-left: 40px; text-align: left; }
/* Room under the card for the arrow that points at the browser's bar. */
.si[data-view="install"]:has(~ .in-point-bottom, ~ .in-point-bottom-right) { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
.in-link { display: flex; flex-direction: column; gap: 10px; }
.in-link[hidden], #in-done[hidden], #in-go[hidden] { display: none; }
.in-link a.btn { text-decoration: none; }
.in-point { position: fixed; z-index: 20; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--btn); color: var(--btn-fg);
  box-shadow: var(--shadow-pop); pointer-events: none; animation: in-nudge 1.2s ease-in-out infinite; }
.in-point svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.in-point-bottom { left: calc(50% - 22px); bottom: calc(10px + env(safe-area-inset-bottom)); }
.in-point-bottom-right { right: max(14px, env(safe-area-inset-right)); bottom: calc(10px + env(safe-area-inset-bottom)); }
.in-point-top-right { right: max(14px, env(safe-area-inset-right)); top: calc(10px + env(safe-area-inset-top)); --dir: -1; }
.in-point-top-right svg { transform: rotate(180deg); }
@keyframes in-nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(calc(8px * var(--dir, 1))); } }
@keyframes in-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }

/* The Computer tab */
.cp-state { align-items: center; text-align: center; padding: 28px 16px; }
.cp-state[hidden], .rt-list[hidden] { display: none; }
.cp-state .si-spin[hidden] { display: none; }
.cp-t { margin: 0; font-weight: 700; font-size: 17px; }
.cp-state .muted { margin: 0; }
.cp-tips { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; color: var(--muted); font-size: 14px; }
.cp-tips strong { color: var(--fg); font-weight: 600; }
@media (pointer: fine) { .cp-tips { display: none; } }

/* The computer, full screen inside the app: an iframe on the computer's own address, inset by the safe areas (a frame gets 0 for env()
   inside, so this page does it). The loading and error states cover it until the computer says it's ready. */
/* The computer's own page colour (#f5f5f5 / #171717, remote/index.html), so the notch and home-bar bands match it. */
.cp-embed { --cp-page: #f5f5f5; position: fixed; inset: 0; z-index: 50; background: var(--cp-page); overscroll-behavior: none; }
@media (prefers-color-scheme: dark) { .cp-embed { --cp-page: #171717; } }
.cp-embed[hidden], .cp-embed-state[hidden] { display: none; }
.cp-embed iframe { position: absolute; top: env(safe-area-inset-top); left: env(safe-area-inset-left); border: 0; background: var(--cp-page);
  width: calc(100% - env(safe-area-inset-left) - env(safe-area-inset-right)); height: calc(100% - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
.cp-embed-state { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  background: var(--page); color: var(--fg); text-align: center; }
.cp-embed-state .muted { margin: 0; max-width: 28rem; }
.cp-embed-state .btn { min-width: 160px; min-height: 44px; }
html.cp-lock, html.cp-lock body { overflow: hidden; overscroll-behavior: none; }

@media (min-width: 900px) {
  .si[data-view="inbox"], .si[data-view="settings"], .si[data-view="computer"] { padding: 48px 32px 48px calc(232px + 32px); }
  .ap-tabs { top: 0; right: auto; width: 232px; display: flex; flex-direction: column; gap: 4px; padding: 20px 12px; border-top: 0; border-right: 1px solid var(--sep); }
  .ap-tabs-brand { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 0 8px; font-weight: 800; }
  .ap-tab { min-height: 44px; padding: 0 12px; flex-direction: row; justify-content: flex-start; gap: 12px; border-radius: var(--r-s); font-size: 15px; }
  .ap-tab[aria-current="page"] { background: var(--tint-2); }
  .ap-tab .ap-count { position: static; margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) { .ap-switch i, .ap-switch i::after { transition: none; } .in-point, .in-hit { animation: none; } }
