/* Piggy web pages (R-7): the landing page, Get, Privacy, Support.
   Dark tokens copied from docs/rebuild/design/prototype.html (:root). System fonts only:
   nothing is fetched from another site, so opening an invite tells nobody else. */
:root {
  --ground: #0F1D18; --card: #172722; --raise: #1E312B; --raise-2: #263B33;
  --ink: #EAF2ED; --ink-2: #C2D1C9; --muted: #93A79D; --faint: #6F8479;
  --hair: rgba(234, 242, 237, .10); --hair-2: rgba(234, 242, 237, .16);
  --coral: #FF6A55; --coral-press: #E8543F; --on-signal: #0F1D18;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s7: 32px; --s8: 40px; --s9: 56px;
  --r-s: 10px; --r-m: 14px; --r-l: 20px; --r-full: 999px;
  --btn: 56px;
  --display: ui-rounded, "SF Pro Rounded", "Avenir Next", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --text: system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--ground); color-scheme: dark; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--ground); color: var(--ink);
  font-family: var(--text); font-weight: 500; font-size: 16px; line-height: 1.45;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
a { color: var(--ink); }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }

/* ── the one-screen pages: landing (/n) and Get (/get) ── */
.page { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding: var(--s7) var(--s5) var(--s6); }
.page main { flex: 1 1 auto; display: flex; flex-direction: column; width: 100%; max-width: 440px; margin: 0 auto; }
.page .above { flex-grow: 3; }
.page .below { flex-grow: 2; }
.page .above, .page .below { flex-shrink: 1; min-height: var(--s5); }
.mark { display: block; width: 58px; height: 50px; }
h1 { font-family: var(--display); font-weight: 700; font-size: 28px; line-height: 1.14; letter-spacing: -.015em; margin: var(--s5) 0 0; }
h1 .muted { color: var(--muted); }
.lead { color: var(--ink-2); margin: var(--s4) 0 0; }
.actions { display: grid; gap: var(--s3); margin-top: var(--s7); padding-bottom: var(--s4); }
.group { display: grid; gap: var(--s3); }
.note { margin: 0; text-align: center; color: var(--ink-2); font-size: 14px; font-weight: 600; line-height: 1.42; }
.foot { text-align: center; font-size: 14px; font-weight: 600; color: var(--muted); padding-top: var(--s4); }
.foot a { color: var(--muted); }
.foot span { padding: 0 var(--s2); }

.btn {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: var(--btn);
  padding: var(--s3) var(--s5); border: 0; border-radius: var(--r-m); cursor: pointer; text-decoration: none; text-align: center;
  font-family: var(--text); font-weight: 800; font-size: 17px; line-height: 1.2;
  background: var(--raise); color: var(--ink); box-shadow: inset 0 0 0 1px var(--hair-2);
}
.btn:active { transform: scale(.98); background: var(--raise-2); }
.btn-primary { background: var(--coral); color: var(--on-signal); box-shadow: none; }
.btn-primary:active { background: var(--coral-press); }
.btn[aria-disabled="true"] { background: var(--raise); color: var(--faint); box-shadow: inset 0 0 0 1px var(--hair); cursor: default; transform: none; }

/* Which buttons show: chosen by the phone (script sets data-platform on <html>).
   With no script, the page shows the "both" view. */
.for-ios, .for-android, .for-other { display: none; }
html:not([data-platform]) .for-other, html[data-platform="other"] .for-other { display: grid; }
html[data-platform="ios"] .for-ios { display: grid; }
html[data-platform="android"] .for-android { display: grid; }
[hidden] { display: none !important; }

/* /get: both buttons always; the phone's own is the coral one and comes first */
.get-actions { display: grid; gap: var(--s3); }
html[data-platform="android"] .get-actions [data-get="android"] { order: -1; }
html[data-platform="android"] .get-actions [data-get="android"][data-live-on] { background: var(--coral); color: var(--on-signal); box-shadow: none; }
html:not([data-platform="android"]) .get-actions [data-get="ios"] { background: var(--coral); color: var(--on-signal); box-shadow: none; }

/* ── the reading pages: Privacy and Support ── */
.doc { max-width: 680px; margin: 0 auto; padding: var(--s6) var(--s5) var(--s9); }
.doc header { display: flex; align-items: center; gap: var(--s3); padding-bottom: var(--s5); border-bottom: 1px solid var(--hair); }
.doc header .mark { width: 36px; height: 31px; }
.doc header a { font-family: var(--display); font-weight: 700; font-size: 20px; text-decoration: none; }
.doc h1 { margin-top: var(--s7); font-size: 32px; }
.doc .updated { color: var(--muted); font-size: 14px; font-weight: 600; margin: var(--s2) 0 0; }
.doc .intro { color: var(--ink-2); font-size: 18px; margin: var(--s5) 0 0; }
.doc h2 { font-family: var(--display); font-weight: 700; font-size: 21px; line-height: 1.22; letter-spacing: -.01em; margin: var(--s8) 0 var(--s3); }
.doc p { margin: var(--s3) 0 0; color: var(--ink-2); }
.doc ul { margin: var(--s3) 0 0; padding-left: var(--s5); color: var(--ink-2); }
.doc li { margin: var(--s2) 0; }
.doc strong { color: var(--ink); font-weight: 700; }
.doc .card { background: var(--card); border-radius: var(--r-l); box-shadow: inset 0 0 0 1px var(--hair); padding: var(--s5); margin-top: var(--s4); }
.doc .card h3 { font-weight: 800; font-size: 17px; line-height: 1.3; margin: 0; }
.doc .card p { margin-top: var(--s2); }
.doc .contact { color: var(--ink); font-weight: 700; font-size: 18px; word-break: break-word; }
.doc table { width: 100%; border-collapse: collapse; margin-top: var(--s3); font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: var(--s3) var(--s3) var(--s3) 0; border-bottom: 1px solid var(--hair); color: var(--ink-2); }
.doc th { color: var(--ink); font-weight: 700; width: 38%; }
.doc footer { margin-top: var(--s9); padding-top: var(--s5); border-top: 1px solid var(--hair); color: var(--muted); font-size: 14px; font-weight: 600; }
.doc footer a { color: var(--muted); }
.doc footer span { padding: 0 var(--s2); }

@media (min-width: 720px) {
  .page main { max-width: 480px; }
  h1 { font-size: 32px; }
  .doc { padding-top: var(--s8); }
}
@media (max-width: 420px) {
  .doc th { width: 34%; }
}
@media (prefers-reduced-motion: reduce) { .btn:active { transform: none; } }
