/* main.css — the Tonaut website, dark (design handoff v2, 2026-10-06).
   Shared by the home page, support, privacy and terms. The testers' page keeps site.css.

   Type: Archivo (variable, wdth 62–125) for everything, Martian Mono for readouts and numbers.
   Both SIL Open Font License 1.1, self-hosted in assets/fonts/. Red is the only accent.

   NOTE: never put overflow-x: hidden on an ancestor of a sticky element (it stops sticking).
   The page wrapper uses overflow-x: clip, which doesn't. */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/Archivo-Variable.ttf") format("truetype-variations");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Martian Mono";
  src: url("../fonts/MartianMono-Variable.ttf") format("truetype-variations");
  font-weight: 100 800;
  font-stretch: 75% 112.5%;
  font-display: swap;
}

:root {
  --bg: #0A0A0B;
  --raise: #0E0F11;
  --surface: #121315;
  --bezel: #050506;
  --hair: #1E2023;
  --rule: #26282C;
  --ring: #2E3035;
  --line: #34373C;
  --line-2: #3A3D42;
  --ink: #F3F4F6;
  --ink-hi: #E2E4E7;
  --ink-2: #C9CDD2;
  --ink-3: #B4B8BE;
  --ink-4: #8C9198;
  /* The one red: the app's own (Theme.swift, record #D8261C). Buttons, type, dots and rules use it; a glow on one of
     those (a hover ring, the sweep line) is this red with transparency, never a lighter or more orange red. */
  --red: #D8261C;
  --red-rgb: 216, 38, 28;
  /* The background light (Richard, 2026-10-24): neutral gray, no colour tint, the same grays as the App Store art
     (tonaut_bg.py: glow #5A5B5D, mid #2C2D2F, edge #101112). Page and section glows use these with transparency
     over --bg; red is for accents only (buttons, kickers, numbers, the price), never a background. */
  --glow-rgb: 90, 91, 93;
  --mid-rgb: 44, 45, 47;
  --rim-rgb: 168, 170, 174;
  /* One soft glow for every section that has one; each section sets only its shape and place. */
  --glow: rgba(var(--glow-rgb), .30) 0%, rgba(var(--mid-rgb), .30) 38%, rgba(var(--mid-rgb), 0) 72%;
  /* The soft light a device's top edge throws (it was red until 2026-10-24). */
  --halo: rgba(var(--rim-rgb), .16);

  --measure: 1320px;
  --gutter: clamp(18px, 4vw, 56px);
  --out: cubic-bezier(.16, .84, .24, 1);
  --sans: "Archivo", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* Same-page jump links glide, switched on by menu.js at the first tap, so a link from another page lands at once. */
html.glide { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html.glide { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--red); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--red); color: #fff; }
h1, h2, h3, p, figure, dl, dd, ul, ol { margin: 0; }
b, strong { color: var(--ink); font-weight: 600; }
button { font: inherit; color: inherit; }

.page { overflow-x: clip; background: var(--bg); }
.wrap { max-width: var(--measure); margin: 0 auto; padding-inline: var(--gutter); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.mono { font-family: var(--mono); }

/* ---------- small shared type ---------- */
.label {
  font-variation-settings: 'wdth' 118;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.eyebrow__t {
  font-variation-settings: 'wdth' 118; font-weight: 600; font-size: 11px;
  letter-spacing: .24em; text-transform: uppercase; color: var(--red);
}
.dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }

/* the red pill */
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  height: 52px; padding: 0 26px; border: 0; border-radius: 999px;
  background: var(--red); color: #fff;
  font-family: var(--sans); font-variation-settings: 'wdth' 118; font-weight: 600;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap;
  cursor: pointer; transition: background .2s, box-shadow .2s;
}
.pill:hover { background: var(--red); color: #fff; box-shadow: 0 0 0 4px rgba(var(--red-rgb), .28); }
.pill--sm { height: 38px; padding: 0 18px; font-size: 11px; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50; height: 60px;
  background: var(--bg); border-bottom: 1px solid var(--hair);
}
.site-head__in {
  max-width: var(--measure); margin: 0 auto; height: 60px; padding-inline: var(--gutter);
  display: flex; align-items: center; gap: 20px;
}
.brand {
  flex: none; font-variation-settings: 'wdth' 125; font-weight: 600; font-size: 13px;
  letter-spacing: .28em; text-transform: uppercase; color: var(--ink);
}
/* Links that don't fit wrap onto a second line that the bar hides. On a phone only the CTA shows;
   the footer carries every page, which keeps the privacy policy reachable. */
.site-nav {
  flex: 1 1 auto; min-width: 0; height: 60px; overflow: hidden;
  display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; column-gap: 4px;
}
.site-nav a {
  height: 60px; display: flex; align-items: center; gap: 8px; padding: 0 12px;
  font-variation-settings: 'wdth' 118; font-weight: 600; font-size: 11px;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"]::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--red);
}
.site-head .pill { flex: none; }
.pill__short { display: none; }
/* A phone held upright: the header keeps the brand and a smaller CTA. */
@media (max-width: 480px) {
  .site-head__in { gap: 12px; justify-content: space-between; }
  .site-nav { display: none; }
  .site-head .pill { height: 34px; padding: 0 14px; font-size: 10px; letter-spacing: .1em; }
}
@media (max-width: 359px) {
  .site-head .pill .pill__long { display: none; }
  .site-head .pill .pill__short { display: inline; }
}

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--hair); }
.site-foot__in {
  max-width: var(--measure); margin: 0 auto;
  padding: clamp(28px, 3vw, 44px) var(--gutter) clamp(36px, 4vw, 56px);
  display: flex; flex-direction: column; gap: 22px;
}
.site-foot__top { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.site-foot__mark {
  font-variation-settings: 'wdth' 125; font-weight: 600; font-size: 12px;
  letter-spacing: .28em; text-transform: uppercase;
}
.site-foot__top nav { margin-left: auto; display: flex; gap: 6px 20px; flex-wrap: wrap; }
.site-foot__top nav a {
  font-variation-settings: 'wdth' 118; font-weight: 600; font-size: 11px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3);
  padding: 6px 0;
}
.site-foot__top nav a:hover { color: var(--red); }
.site-foot__notes { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; line-height: 1.6; color: var(--ink-4); }
.site-foot__notes a { color: var(--ink-2); }
.site-foot__notes a:hover { color: var(--red); }

/* ---------- one-shot reveals (data-rv) ----------
   html.motion is added in <head> before the first paint, only when IntersectionObserver exists and
   reduced motion is off; the page script adds .is-in as each element arrives. If the script never
   starts, the head script takes .motion off again after 3 s, so nothing can stay hidden. */
.motion [data-rv] { opacity: 0; transform: translateY(var(--rv-y, 36px)); }
.motion [data-rv].is-in {
  opacity: 1; transform: none;
  transition: opacity 1s var(--out) var(--rv-d, 0s), transform 1.1s var(--out) var(--rv-d, 0s);
}
[data-rv="1"] { --rv-d: .09s; }
[data-rv="2"] { --rv-d: .18s; }
[data-rv="3"] { --rv-d: .27s; }
[data-rv="4"] { --rv-d: .36s; }
[data-rv="5"] { --rv-d: .45s; }

/* ================= support, privacy and terms ================= */
.doc-hero { position: relative; padding: clamp(70px, 9vw, 140px) 0 clamp(36px, 4vw, 56px); overflow: hidden; }
.doc-hero::before {
  content: ""; position: absolute; left: 50%; top: 0; width: min(1500px, 150vw); height: 100%;
  transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(40% 60% at 50% 0%, var(--glow));
}
.doc-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle, #1C1E21 1.1px, transparent 1.6px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(60% 70% at 50% 0%, #000, transparent 75%);
  mask-image: radial-gradient(60% 70% at 50% 0%, #000, transparent 75%);
}
.doc-hero__in {
  position: relative; z-index: 1; max-width: var(--measure); margin: 0 auto; padding-inline: var(--gutter);
  display: flex; flex-direction: column; align-items: flex-start; gap: clamp(20px, 2.4vw, 30px);
}
.doc-hero h1 {
  font-variation-settings: 'wdth' 125; font-weight: 600;
  font-size: clamp(44px, 8vw, 132px); line-height: .92; letter-spacing: .035em;
  text-transform: uppercase; text-wrap: balance; max-width: 14ch;
}
.doc-meta { font-family: var(--mono); font-weight: 500; font-size: 12px; color: var(--ink-3); }
.doc-lede {
  margin-top: 6px; max-width: 62ch; font-size: clamp(18px, 1.6vw, 23px); line-height: 1.55;
  color: var(--ink-hi); text-wrap: pretty;
}
.doc-lede a, .doc-note a { border-bottom: 1px solid var(--red); }
.doc-note { max-width: 70ch; font-size: 15px; line-height: 1.6; color: var(--ink-3); text-wrap: pretty; }

/* support hero extras */
.doc-mail {
  font-variation-settings: 'wdth' 125; font-weight: 600; font-size: clamp(22px, 3.4vw, 48px);
  letter-spacing: .02em; line-height: 1.1; color: var(--ink);
  border-bottom: 2px solid var(--red); overflow-wrap: anywhere;
}
.doc-mail:hover { color: var(--red); }
.doc-intro { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; max-width: 780px; padding-top: 6px; }
.doc-intro p:first-of-type { font-size: clamp(18px, 1.5vw, 22px); line-height: 1.55; color: var(--ink-hi); text-wrap: pretty; }
.doc-intro p + p { font-size: 16px; line-height: 1.6; color: var(--ink-3); text-wrap: pretty; }
.guides {
  scroll-margin-top: 90px; width: 100%; max-width: 900px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(12px, 1.6vw, 20px); padding-top: clamp(10px, 1.4vw, 18px);
}
.guide {
  display: flex; flex-direction: column; gap: 18px; padding: clamp(20px, 2.4vw, 30px);
  border-radius: 28px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule);
  color: var(--ink); transition: box-shadow .3s, transform .5s var(--out);
}
.guide:hover { box-shadow: inset 0 0 0 1px var(--red); transform: translateY(-4px); color: var(--ink); }
.guide__k { font-variation-settings: 'wdth' 118; font-weight: 600; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--red); }
.guide__t { font-variation-settings: 'wdth' 125; font-weight: 600; font-size: clamp(22px, 2.2vw, 32px); letter-spacing: .04em; text-transform: uppercase; line-height: 1; }
.guide__m { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.guides-note { font-size: 14px; color: var(--ink-4); }
/* the contact form card at the top of support (feedback.html): the one card with a red ring, so it reads first */
.ask-wrap { width: 100%; max-width: 900px; padding-top: clamp(4px, .8vw, 10px); }
.ask {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px 28px;
  padding: clamp(22px, 2.6vw, 34px); border-radius: 28px; color: var(--ink);
  background: radial-gradient(90% 140% at 0% 0%, rgba(var(--glow-rgb), .22), rgba(var(--mid-rgb), 0) 70%), var(--surface);
  box-shadow: inset 0 0 0 1px var(--red);
  transition: box-shadow .3s, transform .5s var(--out);
}
.ask:hover { color: var(--ink); box-shadow: inset 0 0 0 2px var(--red); transform: translateY(-4px); }
.ask__k, .ask__t, .ask__m { grid-column: 1; }
.ask__k { font-variation-settings: 'wdth' 118; font-weight: 600; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--red); }
.ask__t {
  font-variation-settings: 'wdth' 125; font-weight: 600; font-size: clamp(22px, 2.6vw, 36px);
  letter-spacing: .03em; text-transform: uppercase; line-height: 1.02; text-wrap: balance;
}
.ask__m { font-size: 15px; line-height: 1.55; color: var(--ink-3); text-wrap: pretty; }
.ask .pill { grid-column: 2; grid-row: 1 / span 3; }
.ask:hover .pill { box-shadow: 0 0 0 4px rgba(var(--red-rgb), .28); }
@media (max-width: 640px) {
  .ask { grid-template-columns: minmax(0, 1fr); }
  .ask .pill { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 6px; }
}

/* the section index, sticky under the header */
.toc { position: sticky; top: 60px; z-index: 40; background: var(--bg); border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.toc__in {
  max-width: var(--measure); margin: 0 auto; padding: 10px var(--gutter);
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
}
.toc__in::-webkit-scrollbar { display: none; }
.toc a {
  flex: none; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule);
  font-variation-settings: 'wdth' 118; font-weight: 600; font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-2); white-space: nowrap;
  transition: background .3s, color .3s;
}
.toc a span { font-family: var(--mono); font-size: 10px; color: var(--red); }
.toc a:hover { color: var(--ink); }
.toc a.is-on { background: var(--ink); color: var(--bg); }
.toc a.is-on span { color: var(--red); }

/* the reading column */
.doc { max-width: var(--measure); margin: 0 auto; padding-inline: var(--gutter); }
/* The reading column runs the full width of the header, hero and footer (Richard, 2026-10-06). */
.doc__col { max-width: none; }
.doc-sec { scroll-margin-top: 130px; padding-top: clamp(56px, 6vw, 88px); }
.doc-sec__head {
  display: flex; align-items: center; gap: 14px; padding-bottom: 16px;
  border-bottom: 1px solid var(--rule); margin-bottom: clamp(20px, 2.4vw, 32px);
}
.doc-sec__no { font-family: var(--mono); font-weight: 600; font-size: 13px; color: var(--red); }
.doc-sec__k { font-variation-settings: 'wdth' 118; font-weight: 600; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }
.doc h2 {
  margin: 0 0 clamp(18px, 2vw, 28px);
  font-variation-settings: 'wdth' 125; font-weight: 600; font-size: clamp(28px, 3.6vw, 52px);
  line-height: .98; letter-spacing: .035em; text-transform: uppercase; text-wrap: balance;
}
.doc h3 {
  margin: 40px 0 14px; font-variation-settings: 'wdth' 112; font-weight: 600;
  font-size: clamp(19px, 1.6vw, 23px); line-height: 1.3; letter-spacing: .01em; color: var(--ink); text-wrap: balance;
}
.doc p { margin: 0 0 16px; font-size: clamp(16px, 1.15vw, 17.5px); line-height: 1.66; color: var(--ink-2); text-wrap: pretty; }
.doc p a, .doc li a { color: var(--ink); border-bottom: 1px solid var(--red); }
.doc p a:hover, .doc li a:hover { color: var(--red); }
.doc ul { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.doc li {
  position: relative; padding-left: 20px;
  font-size: clamp(16px, 1.15vw, 17.5px); line-height: 1.66; color: var(--ink-2);
}
.doc li::before {
  content: ""; position: absolute; left: 0; top: .78em; width: 6px; height: 6px; margin-top: -3px;
  border-radius: 50%; background: var(--red);
}
.doc .readout { font-family: var(--mono); font-size: .85em; color: var(--ink); }

/* the screen-size cells on support */
.sizes {
  margin: 6px 0 14px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px;
  border-radius: 22px; overflow: hidden; background: var(--rule);
}
.sizes div { background: var(--surface); padding: clamp(12px, 1.6vw, 20px); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sizes dt { font-variation-settings: 'wdth' 118; font-weight: 600; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.sizes dd { font-family: var(--mono); font-weight: 600; font-size: clamp(12px, 1.3vw, 17px); color: var(--ink); white-space: nowrap; }
@media (max-width: 640px) {
  .sizes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sizes div:last-child { grid-column: 1 / -1; }
}

/* ---------- the FAQ accordion (support) ----------
   Each question is a <details name="faq">: one open at a time, and every answer is still in the page
   for Find on Page and search engines. faq.js adds the rest. */
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-group .faq-item:first-of-type { border-top: 0; }
.faq-item summary {
  list-style: none; cursor: pointer; display: flex; align-items: flex-start; gap: 18px;
  padding: 20px 0; scroll-margin-top: 130px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { margin: 0; flex: 1; transition: color .2s; }
.faq-item summary:hover h3 { color: var(--red); }
.faq-item summary::after {
  content: ""; flex: none; width: 28px; height: 28px; margin-top: 1px; border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--line);
  background:
    linear-gradient(var(--ink), var(--ink)) center / 10px 1.5px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 1.5px 10px no-repeat;
  transition: transform .35s var(--out), background-color .25s, box-shadow .25s;
}
.faq-item[open] summary::after {
  transform: rotate(45deg); background-color: var(--red); box-shadow: inset 0 0 0 1px var(--red);
}
.faq-item[open] summary h3 { color: var(--ink); }
.faq-a { padding: 0 46px 14px 0; }
.faq-item[open] .faq-a { animation: faq-open .45s var(--out); }
@keyframes faq-open { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.faq-a .pill { margin: 4px 0 16px; border-bottom: 0; color: #fff; }
.faq-a .pill:hover { color: #fff; }
@media (max-width: 560px) { .faq-a { padding-right: 0; } }

/* the closing figure */
.doc-fig { max-width: var(--measure); margin: 0 auto; padding: clamp(70px, 8vw, 120px) var(--gutter) 0; }
.doc-fig figure { display: flex; flex-direction: column; gap: 18px; }
.doc-fig figcaption { font-size: 15px; line-height: 1.55; color: var(--ink-3); max-width: 70ch; text-wrap: pretty; font-style: italic; }
.device {
  background: var(--bezel); border-radius: clamp(14px, 2vw, 28px); padding: clamp(5px, .7vw, 10px);
  box-shadow: 0 0 0 1px var(--ring), 0 -30px 90px -40px var(--halo);
}
.device img { width: 100%; height: auto; aspect-ratio: 2752 / 2064; object-fit: cover; border-radius: clamp(9px, 1.4vw, 20px); }
.doc-end { margin-top: clamp(80px, 10vw, 150px); }

@media (prefers-reduced-motion: reduce) {
  .faq-item[open] .faq-a { animation: none; }
  .guide, .guide:hover, .ask, .ask:hover { transform: none; }
}

.skip { position: absolute; left: 12px; top: -60px; z-index: 60; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 14px; }
.skip:focus { top: 10px; color: var(--bg); }
