/* ==========================================================================
   Shared stylesheet for the two legal pages (privacy.html, terms.html).

   Deliberately NOT inlined the way index.html is. The landing page inlines its
   CSS because it is a single high-traffic entry point where one saved request
   matters; these two are low-traffic, rarely-read, and identical to each
   other, so a shared file means a legal wording or token change is edited in
   one place and the second page picks it up for free.

   Tokens are copied verbatim from index.html, which mirrors
   GlowDesignSystem/Tokens/GlowColor.swift. Keep the three in step.
   ========================================================================== */

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/geist-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/geist-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --paper:      #FFFFFF;
  --paper-sunk: #F8F8FA;
  --ink:        #1C1C1E;
  --ink-2:      #6C6C70;
  --ink-3:      #8E8E96;
  --hairline:   #E6E6E9;
  --focus:      #5B4B9E;
  --accent-a:   #FFC3A0;
  --accent-b:   #BCA9FF;

  --pad:  clamp(20px, 5vw, 56px);
  --maxw: 1120px;

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }

/* Visible focus ring. The landing page gets away with the default because it
   is almost entirely non-interactive; these pages are mostly links, so
   keyboard users need to be able to see where they are. */
a:focus-visible, :focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Lets a keyboard or screen-reader user jump straight past the header.
   Off-screen until focused. */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #FFF;
  padding: 12px 18px; border-radius: 0 0 10px 0;
  font-size: 14px; font-weight: 600; text-decoration: none; z-index: 100;
}
.skip:focus { left: 0; }

/* ============================== HEADER ============================== */
/* Static, not fixed. The landing page's header is fixed because it sits over
   a hero wash; here it would just eat vertical space on a long text page. */
.site-header {
  border-bottom: 1px solid var(--hairline);
  padding-block: 16px;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
  font-weight: 800; font-size: 18px; letter-spacing: -0.02em;
}
.logo img { width: 30px; height: 30px; border-radius: 8px; display: block; }
.back {
  font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  text-decoration: none; white-space: nowrap;
}
.back:hover { color: var(--ink); }

/* =============================== DOC =============================== */
.doc {
  max-width: 760px;
  margin: 0 auto;
  padding-block: clamp(40px, 7vw, 72px) clamp(56px, 9vw, 96px);
}

.doc .eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-3);
  margin: 0 0 14px;
}
.doc h1 {
  font-size: clamp(30px, 5.2vw, 42px);
  font-weight: 800; letter-spacing: -0.035em; line-height: 1.12;
  margin: 0 0 18px;
}
.doc .updated {
  font-size: 14px; color: var(--ink-3); margin: 0;
}

/* The one-line "this covers the website, not the app" statement that both
   pages open with. It is the single most misread thing on a page like this,
   so it is pulled out of the prose rather than buried in paragraph one. */
.callout {
  margin: 30px 0 0;
  padding: 18px 20px;
  background: var(--paper-sunk);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  font-size: 15px; line-height: 1.65; color: var(--ink-2);
}
.callout strong { color: var(--ink); font-weight: 600; }

.doc h2 {
  font-size: 20px; font-weight: 700; letter-spacing: -0.02em;
  line-height: 1.3;
  margin: 46px 0 0;
  scroll-margin-top: 20px;
}
.doc h3 {
  font-size: 16px; font-weight: 600; letter-spacing: -0.01em;
  margin: 28px 0 0;
}
.doc p  { margin: 14px 0 0; color: var(--ink-2); }
.doc ul { margin: 14px 0 0; padding-left: 22px; color: var(--ink-2); }
.doc li { margin-top: 8px; }
.doc li::marker { color: var(--ink-3); }
.doc strong { color: var(--ink); font-weight: 600; }

.doc a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.doc a:hover { color: var(--focus); }

.doc hr {
  border: 0; border-top: 1px solid var(--hairline);
  margin: 48px 0 0;
}

/* Contact block at the foot of each document. */
.contact {
  margin-top: 28px;
  padding: 22px 24px;
  border: 1px solid var(--hairline);
  border-radius: 16px;
}
.contact p { margin: 6px 0 0; }
.contact p:first-child { margin-top: 0; }

/* ============================= SUPPORT ==============================
   Only support.html uses the rules below.

   The support page deliberately does NOT link a `mailto:`. A mailto does
   nothing at all on a desktop with no mail client configured — the click just
   silently fails, which is indistinguishable from a broken button. The address
   is shown as selectable text with a copy button instead, so the visitor
   always ends up holding the address no matter what their machine has
   installed.
   ==================================================================== */

.mail-card {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  background: var(--paper-sunk);
}
.mail-label {
  font-size: 12px; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-3); margin: 0 0 12px;
}
.mail-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.mail-addr {
  font-size: clamp(16px, 3.4vw, 19px); font-weight: 600; color: var(--ink);
  letter-spacing: -0.01em;
  /* Long address must never push the card wider than the phone. */
  overflow-wrap: anywhere;
  /* Double-click / long-press selects the whole address, not one word. */
  user-select: all; -webkit-user-select: all;
}
.copy-btn {
  appearance: none; border: 1px solid var(--hairline);
  background: var(--paper); color: var(--ink);
  font: inherit; font-size: 14px; font-weight: 600;
  padding: 10px 18px; border-radius: 999px; cursor: pointer;
  /* 44px minimum touch target (accessibility floor). */
  min-height: 44px;
  transition: transform .2s cubic-bezier(.2,.7,.3,1), border-color .2s, background .2s;
  white-space: nowrap;
}
.copy-btn:hover { border-color: var(--ink-3); }
.copy-btn:active { transform: scale(.97); }
.copy-btn.is-done { background: var(--ink); color: #FFF; border-color: var(--ink); }
.mail-hint { margin: 14px 0 0; font-size: 13.5px; color: var(--ink-3); }

/* ------------------------------- FAQ -------------------------------- */
.faq { margin-top: 18px; border-top: 1px solid var(--hairline); }
.faq details {
  border-bottom: 1px solid var(--hairline);
}
.faq summary {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 18px 0;
  cursor: pointer;
  font-size: 16px; font-weight: 600; color: var(--ink);
  line-height: 1.5;
  list-style: none;
  min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
/* Chevron drawn in CSS so the page still needs no icon font or SVG sprite. */
.faq summary::after {
  content: ''; flex: 0 0 auto; margin-left: auto;
  width: 9px; height: 9px; margin-top: 6px;
  border-right: 2px solid var(--ink-3);
  border-bottom: 2px solid var(--ink-3);
  transform: rotate(45deg);
  transition: transform .25s cubic-bezier(.2,.7,.3,1);
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: 10px; }
.faq summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.faq .answer { padding: 0 0 20px; }
.faq .answer p:first-child,
.faq .answer ul:first-child { margin-top: 0; }
.faq .answer ol { margin: 14px 0 0; padding-left: 22px; color: var(--ink-2); }
.faq .answer ol li { margin-top: 8px; }

/* Ordered steps read better numbered than bulleted, and the marker colour
   matches the unordered list markers above. */
.faq .answer ol li::marker { color: var(--ink-3); }

@media (prefers-reduced-motion: reduce) {
  .faq summary::after, .copy-btn { transition: none; }
}

/* ============================== FOOTER ============================== */
.site-footer { border-top: 1px solid var(--hairline); padding-block: 30px 40px; }
.site-footer .wrap {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 16px;
}
.site-footer .links {
  display: flex; flex-wrap: wrap; gap: 20px;
  list-style: none; margin: 0; padding: 0;
}
.site-footer a { font-size: 13.5px; color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.site-footer .copy { font-size: 12.5px; color: var(--ink-3); }
/* Marks the page you are already on, so the footer nav is not a dead link. */
.site-footer a[aria-current="page"] { color: var(--ink); font-weight: 600; }

@media (max-width: 720px) {
  .site-footer .wrap { flex-direction: column; text-align: center; }
}
