/* checktheapp.net: every page. The landing page (index.html), the /join page
   (code/functions/join-page.js), and the privacy policy, the terms and the help page
   (privacy.html, terms.html, support.html: the .doc section at the end).

   The look is the onboarding's "K", quoted from design/canvas/kit.js KP (which quotes
   lib/theme/onboarding_theme.dart): light on the sand ground, dark on the teal one, chosen by
   prefers-color-scheme. Entry colours are onboarding_theme.dart's entryColour. Bricolage
   Grotesque and JetBrains Mono come from Google Fonts; the icons are Material Symbols Rounded.
   No em dashes in anything a person reads. Every target is at least 44px. */

:root {
  color-scheme: light dark;
  --ground: #F6F1E7;
  --card: #FFFFFF;
  --line: #E4DCCE;
  --ink: #1B2A32;
  --ink-soft: #56656E;
  --ink-faint: #6F7A80;
  --rail-done: #1F4B57;
  --rail-ahead: #BCB29F;
  --primary: #1F4B57;
  --on-primary: #FFFFFF;
  --tint: #E4EEF0;
  --secondary-fill: #FFFFFF;
  --secondary-line: #E4DCCE;
  --danger: #B3261E;
  --centre: #1F4B57;
  --gold: #F2C879;
  --store: #000000;
  --on-store: #FFFFFF;
  --trip: #33702F; --trip-tint: #E8F1E4;
  --event: #7E3A6E; --event-tint: #F3E7F0;
  --schedule: #26409B; --schedule-tint: #E8EAF9;
  --t-flight: #26409B; --t-transfer: #5B4B8A; --t-stay: #33702F;
  --t-activity: #7E3A6E; --t-dinner: #6E2F07; --t-free-day: #4A535C;
  --lift: 0 6px 20px rgba(27, 42, 50, .08);
  --display: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #163A45;
    --card: #1F4B57;
    --line: #2C5B68;
    --ink: #FFFFFF;
    --ink-soft: #C9D8DC;
    --ink-faint: #8FAAB2;
    --rail-done: rgba(255, 255, 255, .851);
    --rail-ahead: rgba(255, 255, 255, .251);
    --primary: #F2C879;
    --on-primary: #1B2A32;
    --tint: #23596A;
    --secondary-fill: #1F4B57;
    --secondary-line: rgba(255, 255, 255, .4);
    --danger: #FFB4A8;
    --centre: #FFFFFF;
    --store: #FFFFFF;
    --on-store: #000000;
    --trip: #82C7A2; --trip-tint: #172C21;
    --event: #E3A8D4; --event-tint: #33202E;
    --schedule: #8CB4E6; --schedule-tint: #18293D;
    --t-flight: #8CB4E6; --t-transfer: #C4B8EA; --t-stay: #82C7A2;
    --t-activity: #6AC3CB; --t-dinner: #E8A972; --t-free-day: #A3AFB9;
    --lift: none;
  }
}

/* ------------------------------------------------------------------ base */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 16px/1.45 var(--display);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
p, h1, h2, h3, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
hr { border: 0; height: 1px; background: var(--line); margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.hl { font-weight: 800; line-height: 1.1; letter-spacing: -.6px; color: var(--ink); }
.kt { font-weight: 700; line-height: 1.25; letter-spacing: -.2px; color: var(--ink); }
.kb { font-size: 16px; line-height: 1.45; color: var(--ink-soft); }
.kb b { color: var(--ink); font-weight: 700; }
.klab {
  font-family: var(--mono); font-size: 13px; line-height: 1.3; font-weight: 600;
  letter-spacing: 1.6px; text-transform: uppercase; color: var(--ink-soft);
}

.ms {
  font-family: 'Material Symbols Rounded'; font-weight: 400; font-style: normal; font-size: 20px;
  line-height: 1; letter-spacing: normal; text-transform: none; white-space: nowrap; direction: ltr;
  display: inline-block; flex: none; font-feature-settings: 'liga';
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  overflow: hidden; width: 1em; height: 1em;
}
.ms.o { font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
.glyph { width: 22px; height: 22px; fill: currentColor; flex: none; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px calc(32px + env(safe-area-inset-bottom)); }

/* ------------------------------------------------------------------ parts */

/* The lockup: the three rail dots and the name. */
.lockup { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; }
.lockup .dots { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; }
.lockup .dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--centre); }
.lockup .dots .gold { background: var(--gold); }
.lockup .hl { font-size: 22px; letter-spacing: -.4px; }

/* Pills: the one filled action, the quieter one, and the stores (black, white in dark). */
.pill {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; width: 100%; padding: 6px 16px; border-radius: 28px; border: 0;
  font: 700 17px/1.2 var(--display); text-align: center; text-decoration: none; cursor: pointer;
  transition: opacity 130ms ease, transform 130ms ease;
}
.pill:active { transform: scale(.98); opacity: .9; }
.pill.pri { background: var(--primary); color: var(--on-primary); }
.pill.sec { background: var(--secondary-fill); border: 1.5px solid var(--secondary-line); color: var(--ink); }
.pill.store { background: var(--store); color: var(--on-store); }
.pill .ms { font-size: 22px; }
@media (prefers-reduced-motion: reduce) { .pill { transition: none; } .pill:active { transform: none; } }

/* A text button: ink colour, 44 tall, icon first. */
.tbtn {
  display: inline-flex; align-items: center; gap: 7px; min-height: 44px; min-width: 44px; padding: 0 8px;
  background: none; border: 0; border-radius: 12px; cursor: pointer;
  font: 700 16px/1.2 var(--display); color: var(--primary); white-space: nowrap;
}

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; }

/* Type chips: TRIP / EVENT / SCHEDULE, or Trips / Events / Schedules. */
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px 0 9px;
  border-radius: 16px; white-space: nowrap;
}
.chip .ms { font-size: 16px; }
.chip .u { font: 700 13px/1 var(--mono); letter-spacing: 1.6px; }
.chip .l { font-size: 15px; font-weight: 600; }
.chip.trip, .datetile.trip { background: var(--trip-tint); color: var(--trip); }
.chip.event, .datetile.event { background: var(--event-tint); color: var(--event); }
.chip.schedule, .datetile.schedule { background: var(--schedule-tint); color: var(--schedule); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* The rail: stops down a line, as the welcome draws them. */
.rail { display: flex; flex-direction: column; }
.stop { position: relative; display: flex; gap: 16px; padding-bottom: var(--gap, 20px); }
.stop::before, .stop::after { content: ''; position: absolute; left: 11px; width: 2px; }
.stop::before { top: 0; height: calc(var(--top, 4px) + 8px); background: var(--above, transparent); }
.stop::after { top: calc(var(--top, 4px) + 8px); bottom: 0; background: var(--below, transparent); }
.stop:first-child::before, .stop.last::after, .stop:last-child::after { display: none; }
.stop .mk {
  position: relative; z-index: 1; flex: none; width: 24px; display: flex; justify-content: center;
  padding-top: var(--top, 4px);
}
.stop .mk::after { content: ''; display: block; border-radius: 50%; }
.stop > :not(.mk) { flex: 1; min-width: 0; }
.stop.now .mk::after {
  width: 22px; height: 22px; background: var(--ground); border: 3.5px solid var(--gold);
  background-image: radial-gradient(circle, var(--centre) 0 4px, transparent 4.5px);
}
.stop.ahead .mk::after { width: 12px; height: 12px; background: var(--ground); border: 2px solid var(--rail-ahead); }
.stop.brand .mk::after { width: 16px; height: 16px; background: var(--centre); }
.stop.gold .mk::after { width: 16px; height: 16px; background: var(--gold); }

/* ------------------------------------------------------------------ the /join page (W1-W5) */

.top { padding: 14px 0 0; }
.join main { padding-top: 22px; }
.narrow { max-width: 480px; }
.join .lead { font-size: 16.5px; margin-bottom: 10px; }

.found { padding: 14px 16px 16px; box-shadow: var(--lift); border-radius: 18px; }
.found .head { display: flex; align-items: flex-start; gap: 14px; margin-top: 12px; }
.found .name { flex: 1; min-width: 0; }
.found h1 { font-size: 21px; overflow-wrap: anywhere; }
.found .place { display: flex; align-items: flex-start; gap: 4px; margin-top: 4px; font-size: 15px; color: var(--ink-soft); overflow-wrap: anywhere; }
.found .place .ms { font-size: 16px; margin-top: 2px; }
.found .when { margin-top: 12px; font-size: 15.5px; font-weight: 600; color: var(--ink); }
.found .who { font-size: 15px; color: var(--ink-soft); }
.found .when + .who { margin-top: 0; }
.found .head + .who { margin-top: 12px; }
.found hr { margin: 12px 0; }
.found .klab + .preview { margin-top: 10px; }
.datetile {
  width: 62px; flex: none; border-radius: 14px; padding: 8px 0; min-height: 68px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.datetile .klab { font-size: 12px; color: var(--ink-soft); }
.datetile .klab.m { color: inherit; }
.datetile .d { font-size: 26px; font-weight: 800; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.datetile .ms { font-size: 24px; }

/* The first day's lines: a dot on a thin line in the entry's colour, the time, the title. */
.preview li { position: relative; display: flex; gap: 10px; padding-bottom: 10px; }
.preview li.last { padding-bottom: 0; }
.preview .dotline { position: relative; width: 12px; flex: none; }
.preview .dotline::before { content: ''; position: absolute; left: 5px; top: 0; bottom: -10px; width: 2px; background: var(--line); }
.preview li.first .dotline::before { top: 10px; }
.preview li.last .dotline::before { bottom: auto; height: 10px; }
.preview li.first.last .dotline::before { display: none; }
.preview .dotline::after { content: ''; position: absolute; left: 1px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.preview .time { width: 52px; flex: none; font-size: 15px; line-height: 1.35; font-weight: 700; color: currentColor; }
.preview .what { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.preview .title { font-size: 15.5px; line-height: 1.3; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.preview .loc { font-size: 15px; line-height: 1.3; color: var(--ink-soft); overflow-wrap: anywhere; }
.t-flight { color: var(--t-flight); }
.t-transfer { color: var(--t-transfer); }
.t-stay { color: var(--t-stay); }
.t-activity { color: var(--t-activity); }
.t-dinner { color: var(--t-dinner); }
.t-free-day { color: var(--t-free-day); }

.narrow .stores { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.steps { margin-top: 18px; }
.steps .stop { --gap: 14px; --above: var(--rail-ahead); --below: var(--rail-ahead); }
.steps .stop.now { --top: 2px; }
.steps .stop:last-child { --gap: 0px; }
.steps .stop p { font-size: 16px; line-height: 1.4; color: var(--ink-soft); padding-top: 2px; }
.steps .stop.now p { font-size: 17px; color: var(--ink); padding-top: 1px; }

.codeline { display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 14px; margin-top: 16px; }
.codeline p { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.codeline .lbl { font-size: 15px; color: var(--ink-soft); }
.codeline .code { font-size: 22px; font-weight: 700; letter-spacing: 4px; color: var(--ink); }

/* W3 */
.gone h1 { font-size: 30px; margin-top: 18px; }
.gone h1 + .kb { margin-top: 10px; }
.gone .newcode { margin-top: 22px; }
.gone .newcode summary { list-style: none; }
.gone .newcode summary::-webkit-details-marker { display: none; }
.gone .newcode[open] summary { display: none; }
.gone hr { margin: 28px 0 18px; }
.gone hr + .kb { font-size: 15.5px; margin-bottom: 10px; }
.gone > a.pill.sec { margin-top: 22px; }
.gone .stores { margin-top: 0; }

/* W4: the invite on the left, the QR to carry it to a phone on the right. */
.split { display: flex; flex-direction: column; gap: 28px; }
.onphone { padding: 22px 26px; border-radius: 22px; }
.onphone h2 { font-size: 28px; }
.onphone .kb { margin-top: 8px; }
.qrrow { display: flex; flex-wrap: wrap; align-items: center; gap: 26px; margin-top: 20px; }
.qrbox { width: 220px; flex: none; }
.qr { display: block; width: 100%; height: auto; border-radius: 9px; }
.onphone .stores { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 12px; }
.typeit { font-size: 15px; color: var(--ink-soft); }
.typeit .code { font-weight: 700; color: var(--ink); letter-spacing: 2px; }

@media (min-width: 900px) {
  .wrap { padding-left: 64px; padding-right: 64px; }
  .join .top { padding-top: 28px; }
  .join .lockup .hl { font-size: 24px; }
  .join main { padding-top: 40px; }
  .split { flex-direction: row; align-items: flex-start; gap: 72px; }
  .split .left { width: 520px; flex: none; }
  .split .onphone { flex: 1; }
}

/* ------------------------------------------------------------------ the "Got a code?" box */

.codeform { padding: 16px; border-radius: 20px; }
.codeform label { display: block; font-size: 18px; }
.codeform .row { display: flex; gap: 10px; margin-top: 10px; }
.codeform input {
  flex: 1; min-width: 0; min-height: 52px; padding: 10px 14px;
  background: var(--card); border: 2px solid var(--line); border-radius: 14px;
  font-size: 20px; letter-spacing: 3px; text-transform: uppercase; color: var(--ink);
}
.codeform input::placeholder { color: var(--ink-faint); opacity: 1; text-transform: none; }
.codeform input:focus { outline: none; border-color: var(--primary); }
.codeform input[aria-invalid='true'] { border-color: var(--danger); }
.codeform .pill { width: 96px; flex: none; min-height: 52px; padding: 0; }
.codeform .err { color: var(--danger); font-size: 15px; line-height: 1.45; }
.codeform .err:not(:empty) { margin-top: 8px; }

/* ------------------------------------------------------------------ the landing page (LA) */

.home .top, .doc .top { display: flex; align-items: center; padding-top: 12px; }
.home .top .lockup .hl, .doc .top .lockup .hl { font-size: 20px; }
.home .top .jump, .doc .top .jump { display: none; margin-left: auto; min-height: 44px; align-items: center; padding: 0 4px; font-size: 16px; font-weight: 700; color: var(--ink); text-decoration: none; }
.hero { padding-top: 30px; }
.hero h1 { font-size: 40px; line-height: 1.05; }
.hero .intro { margin-top: 14px; font-size: 17px; }
.hero .chips { margin-top: 16px; }
.hero .ways { display: flex; flex-direction: column; gap: 12px; margin-top: 22px; }
.hero .stores { display: flex; flex-direction: column; gap: 12px; }
.hero .free { margin-top: 10px; font-size: 15px; color: var(--ink-soft); text-align: center; }
.shotwrap { display: flex; justify-content: center; margin-top: 30px; }

/* A phone drawn at a scale (--s), showing one day of a sample itinerary. */
.phone { --s: .92; width: calc(276px * var(--s)); height: calc(556px * var(--s)); flex: none; }
.phone .body {
  width: 276px; height: 556px; transform: scale(var(--s)); transform-origin: 0 0;
  border-radius: 44px; background: #111; padding: 8px;
}
.phone .screen {
  width: 260px; height: 540px; border-radius: 36px; background: var(--ground); overflow: hidden; padding: 44px 18px 0;
}
.phone .day { font-size: 22px; }
.phone .sub { margin-top: 2px; font-size: 13px; color: var(--ink-soft); }
.phone .list { margin-top: 14px; padding: 14px; border-radius: 16px; }
.phone .list li { display: flex; align-items: flex-start; gap: 10px; padding-top: 10px; }
.phone .list li:first-child { padding-top: 0; }
.phone .list .dot { width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; flex: none; background: currentColor; }
.phone .list .here .dot { box-shadow: 0 0 0 3px var(--gold); }
.phone .list .t { font: 700 14px/1.45 var(--mono); }
.phone .list .ti { font-size: 15px; font-weight: 700; line-height: 1.25; color: var(--ink); }
.phone .list .lo { font-size: 13px; color: var(--ink-soft); }
.phone .leave { margin-top: 12px; padding: 10px 12px; border-radius: 14px; background: var(--tint); font-size: 13px; font-weight: 700; color: var(--ink); }

.story { margin-top: 36px; }
.story .stop { --top: 6px; --gap: 30px; --above: var(--rail-done); --below: var(--rail-done); }
.story .stop:last-child { --gap: 0px; }
.story h2 { font-size: 22px; }
.story .kb { margin-top: 6px; }
.story .sample { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.story .sample .qr { width: 96px; }
.story .sample .mono { font-size: 20px; font-weight: 700; letter-spacing: 4px; }

.foot { margin-top: 30px; border-top: 1px solid var(--line); padding-top: 6px; display: flex; flex-wrap: wrap; align-items: center; column-gap: 22px; font-size: 15px; color: var(--ink-soft); }
.foot a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; }
.foot a[aria-current='page'] { color: var(--ink); font-weight: 700; text-decoration: none; }
.foot .by { margin-left: auto; min-height: 44px; display: inline-flex; align-items: center; }

@media (min-width: 900px) {
  .home .top, .doc .top { padding-top: 28px; padding-bottom: 4px; }
  .home .top .lockup .hl, .doc .top .lockup .hl { font-size: 24px; }
  .home .top .jump, .doc .top .jump { display: inline-flex; }
  .hero { display: flex; align-items: center; gap: 64px; padding-top: 24px; }
  .hero .text { flex: 1; min-width: 0; }
  .hero h1 { font-size: 64px; line-height: 1; }
  .hero .intro { margin-top: 20px; font-size: 20px; max-width: 560px; }
  .hero .chips { margin-top: 20px; }
  .hero .ways { flex-direction: row; align-items: stretch; gap: 20px; margin-top: 28px; }
  .hero .stores { width: 260px; flex: none; }
  .hero .codeform { width: 330px; flex: none; }
  .hero .free { margin-top: 12px; text-align: left; }
  .shotwrap { margin-top: 0; }
  .shotwrap .phone { --s: 1.05; }
  .story { margin-top: 64px; max-width: 820px; }
  .story h2 { font-size: 28px; }
  .foot { margin-top: 40px; }
}

/* ------------------------------------------------------------------ the policy, the terms, help (W3-W5) */

/* One column of reading, under the landing page's header and over its foot. The body is ink at
   17 on 1.6, the headings the landing page's 800 weight, and the short version a lifted card. */
.doc main { max-width: 680px; padding-top: 30px; }
.doc h1 { font-size: 40px; line-height: 1.05; }
.doc .updated { margin-top: 12px; }
.doc .lead { margin-top: 14px; font-size: 17px; }
.doc .body { margin-top: 26px; font-size: 17px; line-height: 1.6; color: var(--ink); }
.doc .body p, .doc .body ul, .doc .body ol { margin: 0 0 14px; }
.doc .body ul { padding-left: 22px; list-style: disc; }
.doc .body ol { padding-left: 24px; list-style: decimal; }
.doc .body li { margin-bottom: 8px; padding-left: 2px; }
.doc .body li::marker { color: var(--ink-faint); }
.doc .body h2 {
  font-size: 23px; font-weight: 800; line-height: 1.15; letter-spacing: -.5px; color: var(--ink);
  margin: 36px 0 12px; padding-top: 26px; border-top: 1px solid var(--line);
}
.doc .body strong { font-weight: 700; }
.doc .body a { color: var(--primary); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
.doc .body .summary { padding: 20px 22px 6px; margin: 0 0 8px; border-radius: 18px; box-shadow: var(--lift); }
.doc .body .summary h2 { font-size: 20px; margin: 0 0 12px; padding: 0; border: 0; }
.doc .body .summary + h2 { margin-top: 32px; border-top: 0; padding-top: 0; }
.doc .body .note { color: var(--ink-soft); font-size: 15px; }

/* Help: the way to reach us, before the questions. */
.doc .reach { display: flex; flex-direction: column; gap: 12px; padding: 18px; margin: 0 0 8px; border-radius: 18px; box-shadow: var(--lift); }
.doc .reach p { margin: 0; }
.doc .reach .kt { font-size: 18px; }
.doc .reach .kb { font-size: 16px; }
.doc .body .reach a.pill { color: var(--on-primary); text-decoration: none; }

@media (min-width: 900px) {
  .doc main { padding-top: 48px; }
  .doc h1 { font-size: 56px; line-height: 1; }
  .doc .body h2 { font-size: 26px; }
  .doc .reach { flex-direction: row; align-items: center; gap: 24px; }
  .doc .reach .say { flex: 1; min-width: 0; }
  .doc .reach .pill { width: auto; flex: none; padding: 6px 24px; }
}

/* The not-found page (404.html): the ways on, as quiet pills down the column. */
.doc .body ul.pages { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; max-width: 420px; }
.doc .body ul.pages li { margin: 0; padding: 0; }
.doc .body ul.pages a.pill { color: var(--ink); text-decoration: none; }
