/* UV Tracker site — hand-written, no build step, no JS. Tokens mirror the app (spec §2.3). */

:root {
  --ink: #2b2018;
  --ink-soft: #5d5048;
  --ink-faint: #7a6a5e;
  --surface: #fdf9f5;
  --surface-raised: #ffffff;
  --cream: #fbf3ec;
  --line: #e8d9cf;
  --accent: #b4610f;
  --accent-soft: #f7e3cf;
  --uv-a: #f2b23c;
  --uv-b: #e0562f;
  --sky-a: #4a90c4;
  --sky-b: #ebcfa4;
  --on-sky: #10202e;
  --frame: #1b1512;
  --max: 68rem;
  --measure: 66ch;
  --display: Outfit, "Segoe UI", system-ui, sans-serif;
  --body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --radius: .9rem;
  --shadow: 0 1px 2px rgba(43,32,24,.06), 0 18px 40px -24px rgba(43,32,24,.35);
}

/* Outfit's font files have no Vietnamese glyphs (checked against Google's own font metadata:
   subsets = menu/latin/latin-ext only) — every precomposed tone-mark letter (U+1EA0-1EF1: ạ, ố,
   ộ, ơ-with-tone...) silently fell back to the system font, mid-headline. vi/ pages load Be
   Vietnam Pro instead (full Vietnamese coverage, designed for it); English is unaffected. */
:root:lang(vi) { --display: "Be Vietnam Pro", "Segoe UI", system-ui, sans-serif; }

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f2e9e3;
    --ink-soft: #c3b4aa;
    --ink-faint: #8f8078;
    --surface: #17120f;
    --surface-raised: #221a16;
    --cream: #2a201a;
    --line: #3a2e27;
    --accent: #f0a860;
    --accent-soft: #3a2a1a;
    --sky-a: #2c4869;
    --sky-b: #7a6a58;
    --on-sky: #f2e9e3;
    --frame: #0d0a08;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 18px 40px -24px rgba(0,0,0,.7);
  }
}

* { 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(--surface);
  color: var(--ink);
  font: 1.0625rem/1.6 var(--body);
}

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.15; letter-spacing: -.015em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }
p, li { max-width: var(--measure); }
p { margin: 0 0 1rem; }
a { color: var(--accent); text-underline-offset: .15em; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: .25rem; }
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 46rem; }
.eyebrow { font: 600 .78rem/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }

/* header + footer */
.site-header { position: relative; z-index: 2; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: .4rem .8rem; padding-top: .7rem; padding-bottom: .7rem; }
@media (min-width: 37.5rem) { .site-header .wrap { padding-top: 1.1rem; padding-bottom: 1.1rem; } }
@media (max-width: 37.5rem) { .site-header .wrap { flex-direction: column; align-items: flex-start; } }
.brand { display: inline-flex; align-items: center; gap: .6rem; font: 700 1.2rem/1 var(--display); letter-spacing: -.01em; color: inherit; text-decoration: none; }
.brand img { width: 1.9rem; height: 1.9rem; }
.site-nav { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; font-size: .95rem; }
.site-nav a { color: inherit; text-decoration: none; opacity: .85; }
.site-nav a:hover, .site-nav a[aria-current="page"] { opacity: 1; text-decoration: underline; }
.lang { font-weight: 600; }

.site-footer { border-top: 1px solid var(--line); padding: 2.5rem 0 3.5rem; color: var(--ink-soft); font-size: .95rem; }
.site-footer .wrap { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 48rem) { .site-footer .wrap { grid-template-columns: 1fr auto; align-items: start; } }
.site-footer .brand { font-size: 1.05rem; color: var(--ink); }
.site-footer p { margin: .5rem 0 0; }
.site-footer .fine { font-size: .85rem; opacity: .8; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; position: fixed; z-index: 10; background: var(--surface-raised); padding: .6rem 1rem; border-radius: .5rem; border: 1px solid var(--line); }

/* shared blocks */
.card { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.4rem; box-shadow: var(--shadow); }
.card > :last-child { margin-bottom: 0; }
.pill { display: inline-block; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: .35rem .95rem; font-size: .85rem; font-weight: 600; }
.updated { color: var(--ink-soft); font-size: .95rem; }
.section { padding: 2.25rem 0; }
@media (min-width: 44rem) { .section { padding: 3.5rem 0; } }
.section h2 { margin-bottom: 1rem; }

/* components — later tasks append below this line */

/* landing: hero */
.hero {
  /* mobile is a single stacked column, so the glow sits low, behind the phone, clear of the copy */
  --glow-x: 55%; --glow-y: 78%; --glow-r0: 3.5rem; --glow-r1: 4rem;
  /* how far the background bleeds up under the header — must be >= the header's real height, or
     the gap shows the body background through (near-black in dark mode; found 2026-09-01). Below
     37.5rem the header stacks to two rows (measured up to 112px for the longer vi/ nav), so this
     offset needs far more headroom than the ~66px single-row desktop header. */
  --header-offset: 7.5rem;
  position: relative; overflow: hidden; color: var(--on-sky);
  background:
    radial-gradient(circle at var(--glow-x) var(--glow-y), rgba(255,242,214,.95) 0 var(--glow-r0), transparent var(--glow-r1)),
    linear-gradient(160deg, var(--sky-a), var(--sky-b));
  margin-top: calc(-1 * var(--header-offset)); padding-top: var(--header-offset);
}
@media (min-width: 37.5rem) {
  /* header is back to one row here (see .site-header .wrap's own breakpoint) */
  .hero { --header-offset: 4.2rem; }
}
@media (min-width: 52rem) {
  /* two-column layout: the glow sits behind the phone in the right-hand column */
  .hero { --glow-x: 78%; --glow-y: 18%; --glow-r0: 5rem; --glow-r1: 5.5rem; }
}
.hero::after {
  /* the mark, faint and large, anchors the composition without competing with the copy */
  content: ""; position: absolute; right: -8rem; bottom: -10rem; width: 30rem; height: 30rem; opacity: .12;
  background: url("brand/mark-mono.svg") no-repeat center / contain; pointer-events: none;
}
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; padding-top: 2rem; padding-bottom: 2.25rem; align-items: center; }
@media (min-width: 52rem) { .hero .wrap { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 2.5rem; padding-top: 4.5rem; padding-bottom: 5.5rem; } }
.hero-copy, .hero .device { min-width: 0; }
/* mobile: centered, matching the always-centered device below it; desktop reverts to left-aligned two-column */
.hero-copy { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.1rem; justify-items: center; text-align: center; }
@media (min-width: 52rem) { .hero-copy { justify-items: start; text-align: left; } }
.hero-copy h1 { max-width: 20ch; }
@media (min-width: 52rem) { .hero-copy h1 { max-width: 14ch; } }
.hero-copy .lede { font-size: 1.2rem; max-width: 34ch; margin: 0; }
.hero-copy .pill { background: rgba(255,255,255,.75); color: var(--accent); }
@media (prefers-color-scheme: dark) { .hero-copy .pill { background: rgba(0,0,0,.35); } }
/* The official Play badge PNG carries its own transparent margin, so no padding here. */
.store-badge { display: inline-block; line-height: 0; border-radius: .6rem; }
.store-badge img { display: block; height: 4.7rem; width: auto; }
.store-badge:hover img, .store-badge:focus-visible img { opacity: .88; }

.device {
  width: min(58%, 15.5rem); aspect-ratio: 9 / 20; margin: 0 auto; padding: .5rem;
  background: var(--frame); border-radius: 2.4rem; box-shadow: 0 40px 70px -35px rgba(0,0,0,.6);
}
@media (min-width: 52rem) { .device { width: min(100%, 15.5rem); } }
.device img { width: 100%; height: 100%; object-fit: cover; border-radius: 1.95rem; }

/* landing: three steps. Mobile: thumbnail beside text, one row per step, not a full mockup above it. */
.steps { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 44rem) { .steps { gap: 1.5rem; grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.step {
  display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); grid-template-rows: auto auto;
  column-gap: 1rem; row-gap: .2rem; align-items: start;
}
@media (min-width: 44rem) { .step { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; justify-items: start; } }
.step .device {
  grid-row: 1 / span 2; width: 100%; aspect-ratio: 9 / 13; margin: 0; min-width: 0;
}
@media (min-width: 44rem) { .step .device { grid-row: auto; width: min(100%, 11rem); aspect-ratio: 9 / 20; margin: 0 0 .5rem; } }
.step .device img { object-position: top; }
@media (min-width: 44rem) { .step .device img { object-position: center; } }
.step h3, .step p { min-width: 0; }
.step h3 { margin-top: 0; }
@media (min-width: 44rem) { .step h3 { margin-top: .25rem; } }
.step p { margin: 0; color: var(--ink-soft); }

/* landing: trust row */
.trust { display: grid; gap: 1.25rem; }
@media (min-width: 44rem) { .trust { grid-template-columns: 1fr 1fr; } }
.trust .card h3 { margin-bottom: .5rem; }
.section.alt { background: var(--cream); }

.site-header.on-hero { color: var(--on-sky); }
.site-header.on-hero .brand img { filter: drop-shadow(0 1px 1px rgba(0,0,0,.15)); }

/* legal pages */
.legal-head { padding: 3rem 0 1.5rem; }
.legal-head h1 { margin-bottom: .5rem; }
.legal { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; padding-bottom: 4rem; }
@media (min-width: 62rem) { .legal { grid-template-columns: 15rem minmax(0, 1fr); align-items: start; } }
.toc, .legal-body { min-width: 0; }
.toc { font-size: .95rem; }
@media (min-width: 62rem) { .toc { position: sticky; top: 1.5rem; } }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; border-left: 2px solid var(--line); }
.toc a { display: block; padding: .15rem 0 .15rem .9rem; color: var(--ink-soft); text-decoration: none; margin-left: -2px; border-left: 2px solid transparent; }
.toc a:hover { color: var(--ink); border-left-color: var(--accent); }
.legal-body h2 { font-size: 1.35rem; margin: 2.5rem 0 .75rem; scroll-margin-top: 1.5rem; }
.legal-body h2:first-of-type { margin-top: 0; }
.glance { margin-bottom: 2rem; }
.glance ul { margin: .5rem 0 0; padding-left: 1.2rem; }
.data-table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 1rem 0 1.5rem; }
.table-scroll { overflow-x: auto; max-width: 100%; }
.data-table th, .data-table td { text-align: left; padding: .65rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table th { font-weight: 600; background: var(--cream); }
.data-table td:nth-child(2), .data-table td:nth-child(3) { font-weight: 600; }

/* privacy page: the Data Safety table as progressive disclosure instead of a wide scrolling table
   — collapsed to name + a Collected/Not collected pill, tap for Shared/Purpose/Where. Chosen over
   the scrolling table on mobile (2026-09-01): five text-heavy columns had no way to signal there
   was more off-screen. Zero JS — native <details>/<summary>. Own class names, not .data-table, so
   the other pages still using a plain scrolling table (learn/*) are unaffected. */
.data-disclosure { display: grid; gap: .6rem; margin: 1rem 0 1.5rem; }
.data-row { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface-raised); }
.data-row summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  gap: .75rem; padding: .85rem 1rem; font-weight: 600;
}
.data-row summary::-webkit-details-marker { display: none; }
.data-row summary .data-label { min-width: 0; }
.data-chev { color: var(--ink-faint); flex: none; transition: transform .15s; }
.data-row[open] .data-chev { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { .data-chev { transition: none; } }
.data-pill {
  font: 700 .68rem/1 var(--body); letter-spacing: .03em; text-transform: uppercase;
  border: 1px solid var(--line); color: var(--ink-soft); border-radius: .4rem; padding: .3rem .55rem; flex: none;
}
.data-row[data-collected="yes"] .data-pill { border-color: var(--accent); color: var(--accent); }
.data-fields { padding: 0 1rem .9rem; display: grid; gap: .55rem; }
.data-field { display: grid; grid-template-columns: 6.5rem minmax(0,1fr); gap: .1rem .8rem; padding-top: .5rem; border-top: 1px solid var(--line); }
.data-field dt { font: 700 .72rem/1.3 var(--body); letter-spacing: .03em; text-transform: uppercase; color: var(--ink-faint); margin: 0; }
.data-field dd { margin: 0; }

.history { border-left: 3px solid var(--accent); padding-left: 1rem; }
.history dt { font-weight: 600; }
.history dd { margin: 0 0 .75rem; color: var(--ink-soft); }

/* learn hub + articles */
.hub-intro { padding: 3rem 0 1rem; }
.hub-intro h1 { margin-bottom: .75rem; }
.cards { list-style: none; margin: 0; padding: 2rem 0 4rem; display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 44rem) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cards .card h3 { margin-bottom: .4rem; }
.cards .card h3 a { color: inherit; text-decoration: none; }
.cards .card h3 a:hover { text-decoration: underline; }
.cards .card p { color: var(--ink-soft); margin-bottom: 0; }

.breadcrumb { font-size: .9rem; color: var(--ink-faint); padding: 1.5rem 0 0; }
.breadcrumb a { color: inherit; }
article { padding-bottom: 4rem; }
article h1 { margin: .75rem 0 .5rem; }
.byline { color: var(--ink-soft); font-size: .95rem; margin-bottom: 2rem; }
article h2 { font-size: 1.35rem; margin: 2.5rem 0 .75rem; scroll-margin-top: 1.5rem; }
article h2:first-of-type { margin-top: 1.5rem; }
article h3 { margin: 1.5rem 0 .5rem; }

/* Copy carries a source + install link with it (spec §4). Not display:none — browsers exclude
   that from copied selections; sr-only clip keeps it out of layout and out of screen readers
   (aria-hidden on the element itself). */
.copy-attribution { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.get-app { background: var(--accent-soft); border-radius: var(--radius); padding: 1.5rem; margin: 2.5rem 0; display: grid; gap: 1rem; justify-items: start; }
.get-app p { margin: 0; max-width: 40ch; }

.references { border-top: 1px solid var(--line); margin-top: 2.5rem; padding-top: 1.5rem; font-size: .95rem; color: var(--ink-soft); }
.references h2 { font-size: 1.1rem; margin: 0 0 .75rem; }
.references ol { padding-left: 1.2rem; margin: 0 0 1rem; }
.references li { margin-bottom: .4rem; }
.references .credits { font-size: .9rem; }
.references .disclaimer { font-size: .9rem; background: var(--cream); border-radius: .6rem; padding: .9rem 1rem; margin-top: 1rem; }

.calculator { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; margin: 1.5rem 0 2.5rem; display: grid; gap: 1rem; max-width: 28rem; }
.calculator label { font-weight: 600; font-size: .9rem; }
.calculator select { font: inherit; padding: .5rem .6rem; border-radius: .5rem; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.calculator .result { font-weight: 600; font-size: 1.05rem; margin: .5rem 0 0; min-height: 1.6rem; }

/* support FAQ */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: .9rem 0; font: 600 1.05rem/1.35 var(--body); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-weight: 700; }
.faq details[open] summary::after { content: "\2013"; }
.faq details > p { margin: 0 0 1rem; color: var(--ink-soft); }
