/* SwipeRemote site: shared styles (all pages).
   Dark-only, OLED black, mint is the only accent (matches the app's Tokens.swift). */

:root {
  color-scheme: dark;
  --bg: #000;
  --well: #121212;
  --raise: #0b0b0c;
  --key-top: #2a2a2d;
  --key-bot: #1b1b1d;
  --line: rgba(235, 235, 240, 0.1);
  --line-2: rgba(235, 235, 240, 0.17);
  --tx: #ebebf0;
  --tx-2: #9a9aa2;
  --tx-3: #7a7a82;
  --mint: #5ae3a6;
  --mint-ink: #03140c;
  --mint-soft: rgba(90, 227, 166, 0.12);
  --red: #ff453a;
  --amber: #ffd60a;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: 16px;
  --max: 1160px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
@media (min-width: 640px) { :root { --gutter: 28px; } }
@media (min-width: 1024px) { :root { --gutter: 40px; } }

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--tx);
  font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); color: var(--tx); text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
strong { font-weight: 600; color: var(--tx); }
::selection { background: var(--mint); color: var(--mint-ink); }

:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 6px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: var(--gutter); top: -80px; z-index: 100;
  background: var(--mint); color: var(--mint-ink); font-weight: 600;
  padding: 10px 16px; border-radius: 999px; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.i { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0, 0, 0, 0.78);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 8px; height: 60px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px; margin-right: auto;
  text-decoration: none; font: 650 17px/1 var(--display); letter-spacing: -0.01em;
}
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.nav a.link {
  color: var(--tx-2); text-decoration: none; font-size: 15px; font-weight: 500;
  padding: 10px 10px; border-radius: 10px; transition: color 0.2s;
}
.nav a.link:hover, .nav a.link[aria-current="page"] { color: var(--tx); }
@media (max-width: 559px) { .nav a.link.wide { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: 600 16px/1 var(--font); text-decoration: none; white-space: nowrap;
  transition: transform 0.25s var(--ease), background-color 0.2s, border-color 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--mint); color: var(--mint-ink); }
.btn.primary:hover { background: #74ecb7; }
.btn.ghost { color: var(--tx); border: 1px solid var(--line-2); }
.btn.ghost:hover { border-color: rgba(235, 235, 240, 0.34); }
.btn .i { width: 18px; height: 18px; }

.soon {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 15px; color: var(--tx-2);
}
.soon .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--mint);
  box-shadow: 0 0 0 4px var(--mint-soft);
}

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); margin-top: clamp(72px, 10vw, 128px); padding: 48px 0 56px; font-size: 15px; color: var(--tx-2); }
.foot .cols { display: grid; gap: 32px; }
@media (min-width: 760px) { .foot .cols { grid-template-columns: 1.3fr 1fr 1.6fr; gap: 48px; } }
.foot .brand { margin-bottom: 12px; }
.foot p { margin: 0 0 8px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot a { text-decoration: none; color: var(--tx); }
.foot a:hover { color: var(--mint); }
.foot .legal { font-size: 13px; line-height: 1.55; color: var(--tx-3); }
.foot .legal p { margin-bottom: 10px; }
.foot h2 { font: 600 13px/1 var(--font); color: var(--tx-3); margin-bottom: 14px; }

/* ---------- Document pages (privacy, support) ---------- */
.doc-head { padding: clamp(40px, 7vw, 88px) 0 clamp(24px, 4vw, 40px); }
.doc-head .kicker { color: var(--mint); font-weight: 600; font-size: 15px; margin-bottom: 14px; }
.doc-head h1 { font-size: clamp(2.2rem, 1.5rem + 3vw, 3.6rem); line-height: 1.04; letter-spacing: -0.025em; font-weight: 700; }
.doc-head .lede { font-size: clamp(1.06rem, 1rem + 0.4vw, 1.25rem); color: var(--tx-2); max-width: 40em; margin-top: 18px; }
.doc-head a { color: var(--mint); text-underline-offset: 3px; }
.doc-head .meta { margin-top: 18px; font-size: 14px; color: var(--tx-3); }

.doc-grid { display: grid; gap: 32px; }
@media (min-width: 980px) {
  .doc-grid { grid-template-columns: 220px minmax(0, 1fr); gap: 64px; align-items: start; }
  .toc { position: sticky; top: 92px; }
}
.toc { font-size: 14px; }
.toc h2 { font: 600 13px/1 var(--font); color: var(--tx-3); margin-bottom: 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.toc a { display: block; padding: 6px 0; color: var(--tx-2); text-decoration: none; line-height: 1.35; }
.toc a:hover { color: var(--tx); }
@media (max-width: 979px) {
  .toc { border: 1px solid var(--line); border-radius: 16px; padding: 18px 18px 12px; }
  .toc ol { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); column-gap: 16px; }
}

.prose { max-width: 70ch; }
.prose section { padding-top: 8px; }
.prose section + section { margin-top: 44px; }
.prose h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.85rem); line-height: 1.2; letter-spacing: -0.015em; font-weight: 700; margin-bottom: 14px; }
.prose h3 { font-size: 1.12rem; font-weight: 650; margin: 28px 0 8px; letter-spacing: -0.005em; }
.prose p, .prose li, .prose dd { color: #c9c9d0; }
.prose ul, .prose ol { padding-left: 1.25em; margin: 0 0 1em; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--tx-3); }
.prose a { color: var(--mint); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose a.btn, .prose a.btn:hover { text-decoration: none; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }

.summary {
  background: var(--well); border: 1px solid var(--line); border-radius: 20px;
  padding: 22px 22px 8px; margin-bottom: 44px;
}
.summary h2 { font-size: 1.15rem; margin-bottom: 12px; }
.summary ul { list-style: none; padding: 0; }
.summary li { position: relative; padding-left: 28px; color: var(--tx); }
.summary li::before {
  content: ""; position: absolute; left: 2px; top: 0.42em; width: 14px; height: 8px;
  border-left: 2px solid var(--mint); border-bottom: 2px solid var(--mint); transform: rotate(-45deg);
}

/* TV menu path, e.g. Settings › General › Network */
.path {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 4px;
  list-style: none; padding: 0 !important; margin: 8px 0 14px !important;
}
.path li {
  display: inline-flex; align-items: center; margin: 0 !important;
  color: var(--tx) !important; font-size: 15px; font-weight: 500; line-height: 1.2;
}
.path li span {
  padding: 6px 11px; border-radius: 9px;
  background: linear-gradient(var(--key-top), var(--key-bot));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
}
.path li + li::before { content: "›"; color: var(--tx-3); margin: 0 4px 0 2px; font-weight: 400; }
.path li:last-child span { background: var(--mint-soft); color: var(--mint); box-shadow: inset 0 0 0 1px rgba(90, 227, 166, 0.35); }

.years { display: grid; gap: 14px; margin: 16px 0 20px; }
@media (min-width: 720px) { .years { grid-template-columns: 1fr 1fr; } }
.year { border: 1px solid var(--line); border-radius: 18px; padding: 18px 18px 6px; }
.prose .year h3 { font: 650 15px/1.2 var(--font); color: var(--tx-2); margin: 0 0 4px; letter-spacing: 0; }
.year p { font-size: 15px; color: var(--tx-2) !important; }

.steps { counter-reset: step; list-style: none; padding: 0 !important; }
.steps > li { counter-increment: step; position: relative; padding-left: 48px; margin-bottom: 22px !important; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: -2px;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  font: 650 15px/1 var(--display); color: var(--mint);
  background: var(--mint-soft); box-shadow: inset 0 0 0 1px rgba(90, 227, 166, 0.3);
}
.steps > li > strong:first-child { display: block; color: var(--tx); margin-bottom: 2px; }

.note {
  background: var(--well); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px 18px; margin: 18px 0; font-size: 15.5px;
}
.note p:last-child { margin-bottom: 0; }
.note .tag { display: block; color: var(--mint); font-weight: 600; font-size: 13px; margin-bottom: 4px; }

.trouble { list-style: none; padding: 0 !important; margin: 0; border-top: 1px solid var(--line); }
.trouble > li { border-bottom: 1px solid var(--line); margin: 0 !important; }
.trouble details > summary {
  list-style: none; cursor: pointer; padding: 18px 40px 18px 0; position: relative;
  font: 600 17px/1.35 var(--font); color: var(--tx);
}
.trouble details > summary::-webkit-details-marker { display: none; }
.trouble details > summary::after,
.trouble details > summary::before {
  content: ""; position: absolute; right: 6px; top: 50%; width: 14px; height: 2px; border-radius: 2px;
  background: var(--tx-2); transition: transform 0.3s var(--ease);
}
.trouble details > summary::before { transform: rotate(90deg); }
.trouble details[open] > summary::before { transform: rotate(0deg); }
.trouble details > div { padding: 0 0 14px; }

.contact-card {
  display: grid; gap: 16px; align-items: center;
  border: 1px solid var(--line); border-radius: 22px; padding: 24px;
  background: radial-gradient(120% 140% at 0% 0%, rgba(90, 227, 166, 0.09), transparent 60%), var(--raise);
}
@media (min-width: 640px) { .contact-card { grid-template-columns: 1fr auto; } }
.contact-card h2 { margin-bottom: 6px !important; }
.contact-card p { margin: 0; }

dl.facts { display: grid; gap: 0; margin: 0 0 1em; border-top: 1px solid var(--line); }
dl.facts > div { display: grid; gap: 4px; padding: 14px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 640px) { dl.facts > div { grid-template-columns: 200px 1fr; gap: 24px; } }
dl.facts dt { font-weight: 600; color: var(--tx); }
dl.facts dd { margin: 0; }

/* ---------- 404 ---------- */
.nosignal { min-height: calc(100vh - 61px); min-height: calc(100svh - 61px); display: grid; place-items: center; text-align: center; padding: 48px var(--gutter); }
.nosignal .screen {
  width: min(420px, 100%); aspect-ratio: 16 / 9; margin: 0 auto 36px;
  border-radius: 14px; border: 1px solid var(--line-2); background: #050506;
  display: grid; place-items: center; position: relative; overflow: hidden;
}
.nosignal .box {
  border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 18px;
  font: 600 15px/1.2 var(--font); color: var(--tx-2);
  animation: drift 9s ease-in-out infinite alternate;
}
@keyframes drift {
  0% { transform: translate(-60px, -26px); }
  50% { transform: translate(50px, 18px); }
  100% { transform: translate(-30px, 30px); }
}
@media (prefers-reduced-motion: reduce) { .nosignal .box { animation: none; } }
.nosignal h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); line-height: 1.08; letter-spacing: -0.02em; margin-bottom: 14px; }
.nosignal p { color: var(--tx-2); max-width: 30em; margin: 0 auto 28px; }
.nosignal .row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
