/* ARC Pocket. One column, full screen, one card at a time. Colours and the violet come from ARC on the Mac. */
:root {
  --bg: #0e1017;
  --surface: #151826;
  --surface-2: #1c2033;
  --text: rgba(255, 255, 255, 0.96);
  --muted: rgba(255, 255, 255, 0.74);
  --faint: rgba(255, 255, 255, 0.56);
  --line: rgba(255, 255, 255, 0.13);
  --accent: #8e7bff;
  --accent-2: #b3a5ff;
  --good: #4ade80;
  --warn: #fbbf24;
  --bad: #f87171;
  --info: #7dd3fc;
  --neutral: rgba(255, 255, 255, 0.5);
  --top: env(safe-area-inset-top, 0px);
  --bottom: env(safe-area-inset-bottom, 0px);
  --spring: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; background: var(--bg); color: var(--text); overscroll-behavior: none;
  font: 16px/1.45 system-ui, -apple-system, Roboto, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; text-size-adjust: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 10px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- the glass the controls are made of ------------------------------------------------------------------------- */
.glass { background: rgba(18, 20, 32, 0.52); backdrop-filter: blur(18px) saturate(170%); -webkit-backdrop-filter: blur(18px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.14); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28); }
@media (prefers-reduced-transparency: reduce) { .glass { background: #1a1d2e; backdrop-filter: none; -webkit-backdrop-filter: none; } }

/* ---- the pager ---------------------------------------------------------------------------------------------------- */
#feed { position: fixed; inset: 0; overflow-y: scroll; overflow-x: hidden; scroll-snap-type: y mandatory; overscroll-behavior-y: contain;
  scrollbar-width: none; outline: none; }
#feed::-webkit-scrollbar { display: none; }
.card { position: relative; height: 100vh; height: 100dvh; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; background: var(--bg);
  contain: layout paint; isolation: isolate; }

/* ---- the top bar -------------------------------------------------------------------------------------------------- */
.top { position: fixed; z-index: 20; top: 0; left: 0; right: 0; padding: calc(var(--top) + 10px) 12px 22px; pointer-events: none;
  background: linear-gradient(rgba(10, 11, 17, 0.82), rgba(10, 11, 17, 0.45) 60%, transparent); }
.top > * { pointer-events: auto; }
.top-row { display: flex; align-items: center; gap: 8px; }
.brand { display: flex; align-items: center; gap: 7px; font-weight: 650; letter-spacing: -0.01em; font-size: 15px; padding: 0 4px; flex: none; }
.brand svg { width: 18px; height: 18px; color: var(--accent-2); }
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1; padding: 2px; margin: -2px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; font-size: 13.5px; font-weight: 560; padding: 7px 13px; border-radius: 999px; color: var(--muted); transition: background 0.18s, color 0.18s; }
.tab[aria-selected="true"] { background: rgba(255, 255, 255, 0.92); color: #11131d; }
.tab .n { font-variant-numeric: tabular-nums; margin-left: 5px; color: var(--warn); font-weight: 700; }
.tab[aria-selected="true"] .n { color: #9a5b00; }
.icon-btn { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; }
.icon-btn svg, .rail button svg { width: 19px; height: 19px; }
.status-pill { display: none; margin-top: 8px; font-size: 12px; padding: 4px 10px; border-radius: 999px; color: var(--warn); width: fit-content; }
.status-pill[data-on] { display: block; }

/* ---- media behind a card ------------------------------------------------------------------------------------------ */
.bg { position: absolute; inset: 0; z-index: -1; background: #090a10; }
.bg img, .bg video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bg video { opacity: 0; transition: opacity 0.35s ease; }
.bg video.ready { opacity: 1; }
.scrim { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 9, 14, 0.5) 0%, rgba(8, 9, 14, 0) 22%, rgba(8, 9, 14, 0) 42%, rgba(8, 9, 14, 0.86) 82%, rgba(8, 9, 14, 0.96) 100%); }

/* ---- the words on a card ------------------------------------------------------------------------------------------ */
.info { position: absolute; left: 0; right: 64px; bottom: 0; padding: 0 16px calc(var(--bottom) + 22px) 16px; display: flex; flex-direction: column; gap: 9px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 640; letter-spacing: 0.045em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.16); color: var(--text); }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--neutral); }
.pill[data-tone="good"] i { background: var(--good); } .pill[data-tone="warn"] i { background: var(--warn); }
.pill[data-tone="bad"] i { background: var(--bad); } .pill[data-tone="info"] i { background: var(--info); }
.pill.plain { text-transform: none; letter-spacing: 0; font-weight: 560; }
.title { margin: 0; font-size: clamp(28px, 8.4vw, 38px); line-height: 1.04; letter-spacing: -0.028em; font-weight: 740; text-wrap: balance; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5); }
.sub { margin: 0; font-size: 15px; color: var(--muted); font-weight: 520; }
.blurb { margin: 0; font-size: 14.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.blurb[data-open] { -webkit-line-clamp: unset; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.chip { font-size: 12.5px; padding: 5px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.09); color: var(--muted); border: 1px solid var(--line); }
.chip b { color: var(--text); font-weight: 650; }

/* ---- the buttons down the right side of a demo ------------------------------------------------------------------- */
.rail { position: absolute; right: 10px; bottom: calc(var(--bottom) + 26px); display: flex; flex-direction: column; gap: 12px; align-items: center; z-index: 3; }
.rail button, .rail a { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; text-decoration: none; }
.rail .label { font-size: 10.5px; font-weight: 600; color: var(--muted); text-align: center; margin-top: -8px; }
.rail > div { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rail button:active, .tab:active, .btn:active, .icon-btn:active { transform: scale(0.95); }
.sound { position: absolute; top: calc(var(--top) + 64px); right: 12px; z-index: 3; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; }
.sound svg { width: 18px; height: 18px; }

/* ---- a decision --------------------------------------------------------------------------------------------------- */
.decide { background: radial-gradient(120% 70% at 20% 0%, rgba(142, 123, 255, 0.28), transparent 60%), radial-gradient(90% 60% at 100% 100%, rgba(251, 191, 36, 0.12), transparent 60%), var(--bg); }
.decide[data-tone="good"] { background-color: #0d1a14; }
.swipe { position: absolute; inset: 0; touch-action: pan-y; will-change: transform; display: flex; flex-direction: column; justify-content: flex-end; padding: calc(var(--top) + 84px) 18px calc(var(--bottom) + 20px); }
.q { margin: 10px 0 12px; font-size: clamp(26px, 7.6vw, 34px); line-height: 1.1; letter-spacing: -0.026em; font-weight: 720; text-wrap: balance; }
.why { margin: 0 0 8px; font-size: 16px; color: var(--muted); line-height: 1.45; }
.cost { margin: 0 0 4px; font-size: 14px; color: var(--faint); }
.options { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.btn { min-height: 56px; border-radius: 18px; padding: 12px 18px; font-size: 17px; font-weight: 640; letter-spacing: -0.01em; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.07); text-align: left; transition: transform 0.12s var(--spring), background 0.18s; }
.btn.primary { background: linear-gradient(135deg, #9a89ff, #7a63f5); border-color: rgba(255, 255, 255, 0.28); color: #fff; box-shadow: 0 10px 30px rgba(122, 99, 245, 0.35); }
.btn small { font-size: 12px; font-weight: 640; letter-spacing: 0.05em; text-transform: uppercase; opacity: 0.85; }
.hints { display: flex; justify-content: space-between; margin-top: 14px; font-size: 12.5px; color: var(--faint); letter-spacing: 0.01em; }
.stamp { position: absolute; top: calc(var(--top) + 130px); padding: 8px 16px; border-radius: 14px; font-size: 19px; font-weight: 760; letter-spacing: -0.01em; border: 2.5px solid; opacity: 0; pointer-events: none; max-width: 46%; text-align: center; }
.stamp.right { right: 18px; color: var(--good); border-color: var(--good); transform: rotate(6deg); }
.stamp.left { left: 18px; color: var(--bad); border-color: var(--bad); transform: rotate(-6deg); }

/* ---- a company ---------------------------------------------------------------------------------------------------- */
.company .bg { background: linear-gradient(155deg, hsl(var(--h) 52% 30%), hsl(calc(var(--h) + 30) 55% 13%) 65%, #0a0b12); }
.mono { position: absolute; top: calc(var(--top) + 78px); left: 18px; font-size: clamp(110px, 38vw, 170px); line-height: 0.9; font-weight: 800; letter-spacing: -0.06em; color: rgba(255, 255, 255, 0.16); user-select: none; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 4px; }
.stat { padding: 10px 11px; border-radius: 14px; background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line); }
.stat b { display: block; font-size: 21px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 11.5px; color: var(--faint); }
.facts { display: grid; gap: 7px; margin: 10px 0 0; }
.fact { display: flex; justify-content: space-between; gap: 14px; font-size: 13.5px; padding-bottom: 7px; border-bottom: 1px solid var(--line); }
.fact span:first-child { color: var(--faint); flex: none; } .fact span:last-child { text-align: right; color: var(--muted); }
.row-btns { display: flex; gap: 8px; margin-top: 14px; }
.row-btns .btn { flex: 1; justify-content: center; min-height: 52px; font-size: 16px; padding: 10px 8px; }

/* ---- an update ---------------------------------------------------------------------------------------------------- */
.update { background: var(--bg); }
.update .bg img { filter: blur(26px) brightness(0.55) saturate(1.2); transform: scale(1.15); }
.update .bar { width: 46px; height: 5px; border-radius: 4px; background: var(--neutral); margin-bottom: 4px; }
.update[data-tone="good"] .bar { background: var(--good); } .update[data-tone="bad"] .bar { background: var(--bad); } .update[data-tone="info"] .bar { background: var(--info); }

/* ---- the end of the feed, toasts, sheets and the gallery --------------------------------------------------------- */
.end { display: grid; place-content: center; text-align: center; gap: 10px; padding: 24px; }
.end h2 { margin: 0; font-size: 30px; letter-spacing: -0.025em; } .end p { margin: 0; color: var(--muted); }
.end .btn { justify-content: center; margin-top: 14px; }
.toast { position: fixed; z-index: 40; left: 12px; right: 12px; bottom: calc(var(--bottom) + 18px); border-radius: 18px; padding: 12px 14px 12px 16px; display: flex; align-items: center; gap: 12px;
  transform: translateY(calc(100% + 60px)); visibility: hidden; transition: transform 0.38s var(--spring), visibility 0s 0.38s; }
.toast[data-open] { transform: none; visibility: visible; transition: transform 0.38s var(--spring), visibility 0s; }
.toast p { margin: 0; flex: 1; font-size: 14.5px; line-height: 1.3; } .toast p b { display: block; font-size: 15.5px; }
.toast button { font-weight: 700; color: var(--accent-2); padding: 8px 10px; border-radius: 10px; }
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(6, 7, 11, 0.9); display: flex; flex-direction: column; opacity: 0; pointer-events: none; transition: opacity 0.22s; }
.overlay[data-open] { opacity: 1; pointer-events: auto; }
.overlay .close { position: absolute; top: calc(var(--top) + 12px); right: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; }
.overlay .close svg { width: 18px; height: 18px; }
.gallery { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery figure { flex: none; width: 100%; height: 100%; margin: 0; scroll-snap-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: calc(var(--top) + 56px) 14px calc(var(--bottom) + 18px); }
.gallery img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 22px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); }
.gallery figcaption { color: var(--muted); font-size: 13.5px; font-weight: 560; flex: none; }
.sheet { margin-top: auto; background: var(--surface); border-radius: 26px 26px 0 0; padding: 20px 18px calc(var(--bottom) + 24px); max-height: 78vh; overflow-y: auto; transform: translateY(100%); transition: transform 0.4s var(--spring); }
.overlay[data-open] .sheet { transform: none; }
.sheet h3 { margin: 0 0 4px; font-size: 22px; letter-spacing: -0.02em; } .sheet .sub { margin-bottom: 12px; }
.sheet .link { display: inline-flex; margin-top: 14px; text-decoration: none; }

/* ---- pairing and empty states ------------------------------------------------------------------------------------ */
.screen { position: fixed; inset: 0; display: grid; place-content: center; gap: 12px; padding: 28px; text-align: center; background: radial-gradient(100% 60% at 50% 0%, rgba(142, 123, 255, 0.25), transparent 65%), var(--bg); z-index: 30; }
.screen[hidden] { display: none; }
.screen svg.glyph { width: 56px; height: 56px; color: var(--accent-2); margin: 0 auto; }
.screen h1 { margin: 0; font-size: 30px; letter-spacing: -0.028em; } .screen p { margin: 0 auto; color: var(--muted); max-width: 30ch; }
.screen input { width: min(100%, 360px); margin: 6px auto 0; font: inherit; padding: 15px 16px; border-radius: 16px; color: var(--text); background: var(--surface); border: 1px solid var(--line); }
.screen .btn { justify-content: center; width: min(100%, 360px); margin: 4px auto 0; }
.screen .err { color: var(--bad); min-height: 1.4em; font-size: 14px; }

/* ---- motion ------------------------------------------------------------------------------------------------------- */
.card:not(.in) .info, .card:not(.in) .swipe > :not(.stamp), .card:not(.in) .mono { opacity: 0; transform: translateY(14px); }
.info, .swipe > :not(.stamp), .mono { transition: opacity 0.42s var(--spring), transform 0.55s var(--spring); }
@media (prefers-reduced-motion: reduce) {
  .card:not(.in) .info, .card:not(.in) .swipe > :not(.stamp), .card:not(.in) .mono { transform: none; }
  .info, .swipe > :not(.stamp), .mono, .toast, .sheet, .overlay, .bg video { transition-duration: 0.01s; }
  .stamp { transform: none !important; }
}
@media (min-width: 640px) { .card { max-width: 520px; margin: 0 auto; } #feed { background: #07080c; } .top-row, .status-pill { max-width: 520px; margin: 0 auto; } }
