/*
 * Yonder's website (docs/site). One stylesheet for every page; no inline styles (the pages' Content-Security-Policy allows
 * styles from this file only). Colours are the app's own (designsystem Theme.kt, Night, 0.0.86): every text pair at 4.5:1
 * or more on what it sits on (tests/site-check.py checks the pairs listed there).
 */

@font-face { font-family: "IBM Plex Sans"; src: url("fonts/IBMPlexSans-Regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("fonts/IBMPlexSans-SemiBold.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans Condensed"; src: url("fonts/IBMPlexSansCondensed-SemiBold.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #11161F; --surface: #171E2A; --surface2: #1F2837; --line: #2C3648;
  --text: #E4E8EF; --text2: #C4CCDA; --muted: #99A3B4;
  --accent: #8EAEDC; --on-accent: #0E1522; --out: #2B3B57; --on-out: #EEF2F8; --read: #9CC4F0;
  --teal: #3FC7BE; --amber: #F0B54A; --green: #34C77B; --warn: #E0A526; --fast: #5B85C6;
  --wrap: 1160px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
img, svg { max-width: 100%; }
a { color: var(--accent); }
a:hover { color: #B4CAEA; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; line-height: 1.15; font-weight: 600; }
p { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 10; padding: 10px 16px; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
/* Top and bottom only: a .wrap.section keeps .wrap's side padding (the shorthand would set it to 0). */
.section { padding-top: 72px; padding-bottom: 72px; }
.lead { margin-top: 14px; font-size: 18px; color: var(--text2); max-width: 40em; }
.h2 { font-size: clamp(30px, 4.2vw, 44px); }
.display { font-family: "IBM Plex Sans Condensed", "IBM Plex Sans", sans-serif; font-weight: 600; letter-spacing: -0.01em; line-height: 1.02; }

/* Header and footer */
.site-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; padding-top: 18px; padding-bottom: 18px; }
.brand { margin-right: auto; display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 20px; min-height: 44px; }
.brand:hover { color: var(--text); }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; font-size: 15px; }
.nav a { color: var(--text2); text-decoration: none; padding: 10px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }
.btn-small { color: var(--on-accent); background: var(--accent); font-weight: 600; font-size: 15px; padding: 10px 18px; border-radius: 12px; text-decoration: none; }
.btn-small:hover { color: var(--on-accent); background: #A3BDE3; }
.btn-small[aria-current="page"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
/* On a phone: the name and Get Yonder on the first line, the links under them */
@media (max-width: 640px) { .site-head .nav { order: 3; flex-basis: 100%; } }
.site-foot { border-top: 1px solid var(--line); margin-top: 0; }
.site-foot .wrap { padding-top: 32px; padding-bottom: 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 32px; font-size: 15px; color: var(--muted); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.site-foot a { color: var(--text2); }
.site-foot .full { flex-basis: 100%; }

/* Buttons */
.actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 24px; border-radius: 14px; font-weight: 600; font-size: 17px; text-decoration: none; }
.btn-main { background: var(--accent); color: var(--on-accent); }
.btn-main:hover { background: #A3BDE3; color: var(--on-accent); }
.btn-line { border: 1px solid var(--line); color: var(--text); font-weight: 400; }
.btn-line:hover { border-color: var(--muted); color: var(--text); }
.note { margin-top: 16px; font-size: 14px; color: var(--muted); }

/* Home: the first screen */
.hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 48px; padding-top: 32px; padding-bottom: 72px; }
.hero-text { flex: 1 1 440px; min-width: 0; }
.hero h1 { font-size: clamp(44px, 7vw, 84px); }
.hero .lead { font-size: 19px; max-width: 34em; margin-top: 24px; }

/* The phone with the app on it, and the buttons that change its screen (radio buttons: no script) */
.showcase { flex: 0 1 344px; min-width: 0; margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.phone { position: relative; width: 344px; height: 704px; padding: 12px; border-radius: 46px; background: #07090D; border: 1px solid var(--line); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.85); flex: 0 0 auto; }
.phone::before { content: ""; position: absolute; top: 22px; left: 50%; width: 11px; height: 11px; margin-left: -5.5px; border-radius: 50%; background: #000; border: 1px solid var(--surface2); z-index: 2; }
.phone .glass { width: 320px; height: 680px; border-radius: 34px; overflow: hidden; background: var(--bg); }
/* Each screen is laid out 360 px wide (most Android phones, in dp) and scaled to the 320 px glass, so the app's words fit as on a phone. */
.glass .screen { transform: scale(0.888889); transform-origin: 0 0; }
.showcase .screen { display: none; }
#sc-chats:checked ~ .phone .screen-chats, #sc-nearby:checked ~ .phone .screen-nearby, #sc-chat:checked ~ .phone .screen-chat { display: flex; }
.switch { display: flex; gap: 6px; padding: 5px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.switch label { min-height: 44px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--text2); cursor: pointer; }
.switch label:hover { color: var(--text); }
#sc-chats:checked ~ .switch [for="sc-chats"], #sc-nearby:checked ~ .switch [for="sc-nearby"], #sc-chat:checked ~ .switch [for="sc-chat"] { background: var(--accent); color: var(--on-accent); }
#sc-chats:focus-visible ~ .switch [for="sc-chats"], #sc-nearby:focus-visible ~ .switch [for="sc-nearby"], #sc-chat:focus-visible ~ .switch [for="sc-chat"] { outline: 3px solid var(--accent); outline-offset: 2px; }
.showcase-note { font-size: 13px; color: var(--muted); text-align: center; max-width: 30em; }

/* The gallery: three phones side by side, swiped sideways on a phone */
.gallery { margin-top: 36px; padding: 8px 24px 24px; display: flex; gap: 32px; overflow-x: auto; scroll-snap-type: x mandatory; }
.gallery figure { margin: 0; flex: 0 0 auto; scroll-snap-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.gallery figure:first-child { margin-left: auto; }
.gallery figure:last-child { margin-right: auto; } /* centred when it fits, and still scrolls from the first phone when it doesn't */
.gallery .screen { display: flex; }
.gallery figcaption { font-size: 16px; color: var(--text2); }
@media (max-width: 380px) { .phone { zoom: 0.86; } }

/* Steps, features, lists */
.steps { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 32px; }
.steps li { display: flex; flex-direction: column; gap: 10px; }
.steps .n { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid; display: grid; place-items: center; font-weight: 600; }
.steps .n1 { border-color: var(--teal); color: var(--teal); }
.steps .n2 { border-color: var(--accent); color: var(--accent); }
.steps .n3 { border-color: var(--amber); color: var(--amber); }
.steps .n4 { border-color: var(--muted); color: var(--text2); }
.steps h3 { margin-top: 6px; font-size: 20px; }
.steps p { color: var(--text2); }
.features { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 0 48px; }
.features li { display: flex; gap: 16px; padding: 22px 0; border-top: 1px solid var(--line); }
.features svg { flex: 0 0 auto; width: 26px; height: 26px; margin-top: 3px; }
.features h3 { font-size: 18px; }
.features p { margin-top: 6px; color: var(--text2); }
.split { display: flex; flex-wrap: wrap; gap: 32px 64px; }
.split > * { flex: 1 1 380px; min-width: 0; }
.statement { font-size: clamp(40px, 6vw, 72px); }
.prose { font-size: 18px; color: var(--text2); }
.prose p + p { margin-top: 16px; }
.prose .h2 { font-size: clamp(24px, 3vw, 30px); }
.prose * + .h2 { margin-top: 40px; }
.prose .h2 + p { margin-top: 12px; }
.page-head + .section { padding-top: 32px; }
.cant { margin: 0; padding: 0 0 0 20px; font-size: 17px; color: var(--text2); display: flex; flex-direction: column; gap: 14px; }

/* Download */
.get { display: flex; flex-direction: column; gap: 12px; }
.get .btn { justify-content: space-between; min-height: 60px; border-radius: 16px; }
.get .small { font-weight: 400; font-size: 14px; }
.get .btn-line .small { color: var(--muted); }
.btn.disabled { background: var(--surface2); color: var(--text2); border: 1px dashed var(--line); cursor: default; }
.btn.disabled:hover { background: var(--surface2); color: var(--text2); }
.hash { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.hash code { color: var(--text2); font-size: 13px; }
.steps-plain { margin: 16px 0 0; padding-left: 22px; color: var(--text2); display: flex; flex-direction: column; gap: 8px; }

/* Text pages: questions, privacy, terms */
.page-head { padding-top: 40px; padding-bottom: 12px; }
.page-head h1 { font-size: clamp(36px, 5.4vw, 60px); }
.page-head .meta { margin-top: 12px; font-size: 15px; color: var(--muted); }
/* .doc is also a .wrap: it keeps the page's left edge, and its lines stay short for reading */
.doc { padding-bottom: 72px; }
.doc > * { max-width: 720px; }
.doc h2 { margin-top: 40px; font-size: 24px; }
.doc h3 { margin-top: 28px; font-size: 19px; }
.doc p { margin-top: 10px; color: var(--text2); }
.toc { margin: 24px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.toc a { display: inline-flex; min-height: 44px; align-items: center; padding: 0 14px; border-radius: 22px; border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: 15px; }
.toc a:hover { border-color: var(--muted); }
.qa { border-top: 1px solid var(--line); }
.doc h2 + .qa { margin-top: 14px; }
.qa summary { cursor: pointer; padding: 16px 0; font-weight: 600; font-size: 18px; list-style-position: outside; margin-left: 20px; }
.qa p { margin: 0 0 18px; color: var(--text2); }
.qa[open] summary { color: var(--text); }
.qa p { scroll-margin-top: 72px; } /* a link to an answer keeps its question in view above it */
.qa:has(p:target) summary { color: var(--accent); }

/* ---- The app's screens, drawn as in 0.0.86 (Night): 360 x 765, shown at 320 x 680 ---- */
.screen { position: relative; width: 360px; height: 765px; overflow: hidden; background: var(--bg); color: var(--text); flex-direction: column; line-height: 1.35; font-size: 15px; text-align: left; }
.s-gap { flex: 0 0 30px; }
.s-top { flex: 0 0 52px; padding: 0 12px 0 16px; display: flex; align-items: center; justify-content: space-between; }
.s-title { font-size: 21px; font-weight: 600; }
.s-bar { flex: 0 0 56px; padding: 0 8px 0 4px; display: flex; align-items: center; gap: 4px; }
.s-bar.border { border-bottom: 1px solid var(--line); flex-basis: 60px; }
.s-icon { width: 44px; height: 44px; display: grid; place-items: center; flex: 0 0 auto; }
.s-icon svg { width: 22px; height: 22px; }
.s-grow { flex: 1; min-width: 0; }
.s-h { font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 2px; }
.s-chev { width: 18px; height: 18px; flex: 0 0 auto; }
.s-link { flex: 0 0 auto; margin: 6px 12px 0; padding: 8px 12px; border-radius: 14px; background: var(--surface2); border: 1px solid var(--line); display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.s-link svg { width: 16px; height: 16px; }
.s-radio { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; }
.s-radio svg { width: 14px; height: 14px; }
.s-radio.wd { background: rgba(142, 174, 220, 0.16); }
.s-radio.bt { background: rgba(63, 199, 190, 0.16); }
.s-row .s-bars { margin-left: 4px; }
.s-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-sub.green { color: var(--green); font-size: 12px; }
.s-qr { display: flex; align-items: center; gap: 5px; padding: 0 8px; height: 36px; font-size: 13px; font-weight: 600; color: var(--accent); }
.s-qr svg { width: 16px; height: 16px; }
.s-panel { margin: 2px 10px 8px; padding: 12px 14px 10px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.s-reads { display: flex; }
.s-reads > div { flex: 1; }
.s-reads > div + div { border-left: 1px solid var(--line); padding-left: 12px; }
.s-num { font-family: "IBM Plex Sans Condensed", sans-serif; font-weight: 600; font-size: 27px; line-height: 1; }
.s-num.green { color: var(--green); }
.s-num.amber { color: var(--amber); }
.s-word { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.s-radios { display: flex; gap: 14px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }
.s-radios span { display: flex; align-items: center; gap: 4px; }
.s-radios svg { width: 13px; height: 13px; }
.s-row { display: flex; align-items: center; gap: 12px; padding: 8px 14px; }
.s-row.tight { padding: 7px 16px; }
.s-av { position: relative; flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 16px; }
.s-av.small { width: 42px; height: 42px; font-size: 15px; }
.s-av.me { width: 34px; height: 34px; font-size: 14px; }
.s-av.head { width: 40px; height: 40px; font-size: 15px; margin-left: 2px; }
.s-av svg { width: 22px; height: 22px; }
.h-blue { background: rgba(110, 150, 212, 0.18); color: #6E96D4; }
.h-green { background: rgba(52, 199, 123, 0.18); color: #34C77B; }
.h-purple { background: rgba(155, 123, 255, 0.18); color: #A588FF; }
.h-orange { background: rgba(240, 138, 75, 0.18); color: #F08A4B; }
.h-cyan { background: rgba(45, 184, 197, 0.18); color: #2DB8C5; }
.s-badge { position: absolute; right: -3px; bottom: -2px; width: 18px; height: 18px; border-radius: 50%; background: var(--bg); border: 1.5px solid; display: grid; place-items: center; }
.s-badge svg { width: 10px; height: 10px; }
.s-badge.wd { border-color: var(--accent); }
.s-badge.bt { border-color: var(--teal); }
.s-badge.mesh { border-color: var(--amber); }
.s-line { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.s-line + .s-line { margin-top: 2px; }
.s-line > svg { width: 15px; height: 15px; flex: 0 0 auto; } /* ticks after your own last message, as the app's row */
.s-name { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-time { font-size: 11.5px; color: var(--muted); flex: 0 0 auto; }
.s-time.new { color: var(--accent); font-weight: 600; }
.s-prev { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 4px; }
.s-prev svg { width: 15px; height: 15px; flex: 0 0 auto; }
.s-prev.accent { color: var(--accent); }
.s-pill { flex: 0 0 auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 600; display: grid; place-items: center; }
.s-fab { position: absolute; right: 16px; bottom: 22px; width: 56px; height: 56px; border-radius: 18px; background: var(--accent); display: grid; place-items: center; }
.s-fab svg { width: 24px; height: 24px; }
.s-radar { display: block; width: 320px; height: 320px; margin: 4px 20px; flex: 0 0 auto; }
.s-label { padding: 8px 16px 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.s-label.more { padding-top: 10px; }
.s-bars { display: flex; align-items: flex-end; gap: 2px; height: 13px; }
.s-bars i { width: 3.5px; border-radius: 1.5px; background: #2F394B; }
.s-bars i:nth-child(1) { height: 4px; } .s-bars i:nth-child(2) { height: 7px; } .s-bars i:nth-child(3) { height: 10px; } .s-bars i:nth-child(4) { height: 13px; }
.s-bars.fast i { background: var(--fast); }
.s-bars.fair i:nth-child(-n+2) { background: var(--warn); }
.s-msgs { flex: 1; min-height: 0; padding: 10px 12px 8px; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; font-size: 14.5px; line-height: 1.38; }
.s-in, .s-out { max-width: 84%; padding: 8px 12px 6px; }
.s-in { align-self: flex-start; border-radius: 18px 18px 18px 6px; background: var(--surface); }
.s-out { align-self: flex-end; border-radius: 18px 18px 6px 18px; background: var(--out); color: var(--on-out); }
.s-meta { display: flex; justify-content: flex-end; align-items: center; gap: 4px; font-size: 11px; color: rgba(228, 232, 239, 0.75); margin-top: 2px; }
.s-out .s-meta { color: rgba(238, 242, 248, 0.75); }
.s-meta svg { width: 15px; height: 15px; }
.s-voice { width: 210px; padding-top: 9px; }
.s-voice .row { display: flex; align-items: center; gap: 10px; }
.s-play { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; }
.s-play svg { width: 14px; height: 14px; }
.s-wave { flex: 1; height: 24px; }
.s-voice .s-meta { justify-content: space-between; margin-top: 3px; }
.s-compose { flex: 0 0 auto; padding: 6px 10px 20px; display: flex; align-items: center; gap: 8px; }
.s-field { flex: 1; min-width: 0; height: 44px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 12px 0 16px; font-size: 14.5px; color: var(--muted); }
.s-field svg { width: 20px; height: 20px; }
.s-mic { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; }
.s-mic svg { width: 20px; height: 20px; }

/* ---- yonder_serverapk: what each kind of device sees ---- */
/* Android phones: Download stays at the bottom of the screen on every page (the download page has it in the page). */
.getbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(17, 22, 31, 0.94); border-top: 1px solid var(--line); display: flex; justify-content: center; }
.getbar .btn { width: 100%; max-width: 520px; justify-content: center; }
body.has-getbar { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .getbar { display: none; } body.has-getbar { padding-bottom: 0; } }
/* iPhone and iPad: a plain note in place of the download. */
.ios-note { border: 1px solid var(--line); background: var(--surface2); border-radius: 16px; padding: 16px 18px; max-width: 34em; }
.ios-note h3 { font-size: 18px; margin-bottom: 6px; }
.ios-note p { color: var(--text2); }
.desk-note { margin-bottom: 14px; }
/* The admin's notice, at the top of every page. */
.notice { background: rgba(240, 181, 74, 0.12); border-bottom: 1px solid var(--line); color: #F7E0B5; font-size: 15px; }
.notice .wrap { padding-top: 10px; padding-bottom: 10px; }
.official strong { color: var(--text); }
.official-note { margin-top: 28px; font-size: 15px; color: var(--text2); }
details.check { margin-top: 18px; color: var(--text2); font-size: 15px; }
details.check summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--accent); }
details.check p { margin-top: 8px; }
details.check code { word-break: break-all; font-size: 13px; }
/* On a phone the hero's first screen holds the headline, the line under it and Download. */
@media (max-width: 640px) {
  .hero .display { font-size: clamp(38px, 11vw, 52px); }
  .hero .lead { font-size: 17px; }
  .hero .actions { margin-top: 20px; }
  .hero .actions .btn { width: 100%; justify-content: center; }
}

/* A button with a second line (version and size) under its label. */
.btn.stack { flex-direction: column; align-items: center; gap: 1px; padding-top: 8px; padding-bottom: 8px; min-height: 58px; line-height: 1.25; }
.btn.stack .small { display: block; font-weight: 400; font-size: 13px; opacity: 0.9; }
.getbar .small { font-weight: 400; font-size: 14px; margin-left: 8px; opacity: 0.9; }
