/*
  Hasu — the single shared stylesheet for every page.

  Everything is driven by the custom properties in :root. Dark mode overrides
  those properties in one block rather than restyling components, so adding a
  colour means adding a token in both places and nothing else.

  The palette is the app's own: the teal ramp is the signature accent, warm grey
  carries backgrounds and text. The dark values are the ones
  lotus/scripts/generate-palette.py derives in OKLCH — hue preserved, chroma
  reduced, lightness retargeted to the role each stop plays. Do not hand-pick a
  dark value here; take it from the generator's output so the page and the app
  stay the same colour.
*/

:root {
  /* Warm grey — backgrounds, rules, body text */
  --bg: #F1EFE8;          /* grey 50 */
  --surface: #FFFFFF;
  --surface-sunken: #EAE7DE;
  --text: #2C2C2A;        /* grey 900 */
  --muted: #5F5E5A;       /* grey 600 */
  --faint: #888780;       /* grey 400 */
  --rule: #D3D1C7;        /* grey 100 */

  /* Teal — the identity stop and its tint */
  --accent: #0F6E56;      /* teal 600 */
  --accent-strong: #085041; /* teal 800 */
  --accent-deep: #04342C; /* teal 900 */
  --accent-soft: #E1F5EE; /* teal 50 */
  --accent-edge: #9FE1CB; /* teal 100 */

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --space-9: 7rem;

  /* Radii */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* Type */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
          Arial, "Helvetica Neue", sans-serif;
  --measure: 44rem;

  --shadow-card: 0 1px 2px rgba(44, 44, 42, 0.05),
                 0 8px 24px rgba(44, 44, 42, 0.05);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161614;
    --surface: #252421;
    --surface-sunken: #1D1C1A;
    --text: #E8E8E7;
    --muted: #9E9E9D;
    --faint: #727170;
    --rule: #363533;

    --accent: #7ABAA4;
    --accent-strong: #BBDDD2;
    --accent-deep: #DEF0EB;
    --accent-soft: #182E27;
    --accent-edge: #19634D;

    /* Elevation in dark mode comes from the lighter --surface token, not from a
       shadow, so the shadow is dropped to almost nothing rather than inverted. */
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4);
  }
}

/* ── Base ────────────────────────────────────────────────────────────────── */

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
}

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0; }
p { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-strong); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

img, svg { max-width: 100%; }

.wrap {
  width: 100%;
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 var(--space-5);
}

.wrap--narrow { max-width: var(--measure); }

/* Screen-reader-only, for the skip link */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: fixed; top: var(--space-3); left: var(--space-3);
  width: auto; height: auto; clip: auto; z-index: 10;
  padding: var(--space-2) var(--space-4);
  background: var(--surface); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
}

/* ── Site header ─────────────────────────────────────────────────────────── */

.site-header {
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--rule);
}

.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4);
}

.logo {
  display: inline-flex; align-items: center; gap: var(--space-3);
  font-weight: 650; font-size: 1.05rem; letter-spacing: -0.01em;
  color: var(--text); text-decoration: none;
}
.logo:hover { color: var(--text); }
.logo__mark { width: 30px; height: 30px; flex: none; }

.site-nav { display: flex; gap: var(--space-5); font-size: 0.95rem; }
.site-nav__link { color: var(--muted); text-decoration: none; }
.site-nav__link:hover,
.site-nav__link[aria-current="page"] { color: var(--accent); }

/* ── Hero ────────────────────────────────────────────────────────────────── */

.hero { padding: var(--space-9) 0 var(--space-8); text-align: center; }

.hero__mark { width: 108px; height: 108px; margin: 0 auto var(--space-6); }

.hero__title {
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  margin-bottom: var(--space-4);
}

.hero__lede {
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  color: var(--muted);
  max-width: 34rem;
  margin: 0 auto var(--space-6);
}

.badge {
  display: inline-block;
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
}

/* ── Principles ──────────────────────────────────────────────────────────── */

.section { padding: var(--space-8) 0; }
.section--sunken { background: var(--surface-sunken); }

.section__title {
  font-size: 1.5rem;
  margin-bottom: var(--space-6);
  text-align: center;
}

.principles {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.principle {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-card);
}

.principle__title {
  font-size: 1.05rem; font-weight: 650;
  margin-bottom: var(--space-2);
  color: var(--accent-deep);
}

.principle__body { color: var(--muted); font-size: 0.97rem; margin: 0; }

/* A plain list of things the app deliberately has not got. */
.nots { list-style: none; margin: 0 auto; padding: 0; max-width: 34rem; }
.nots li {
  display: flex; align-items: flex-start; gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--rule);
  color: var(--muted);
}
.nots li:last-child { border-bottom: 0; }
.nots__mark { color: var(--accent); flex: none; font-weight: 700; }

/* ── Long-form pages (privacy) ───────────────────────────────────────────── */

.page { padding: var(--space-7) 0 var(--space-8); }

.page__header { margin-bottom: var(--space-6); }
.page__title { font-size: clamp(1.85rem, 4vw, 2.4rem); margin-bottom: var(--space-2); }
.page__meta { color: var(--muted); font-size: 0.95rem; margin: 0; }

.lede {
  background: var(--accent-soft);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-6);
}

.prose h2 {
  font-size: 1.3rem;
  margin: var(--space-7) 0 var(--space-3);
  padding-top: var(--space-5);
  border-top: 1px solid var(--rule);
}
.prose h3 { font-size: 1.05rem; margin: var(--space-5) 0 var(--space-2); }
.prose ul { padding-left: var(--space-5); }
.prose li { margin: var(--space-1) 0; }
.prose strong { font-weight: 650; }

/* Wide tables scroll inside their own box; the page itself never scrolls
   sideways. */
.table-wrap { overflow-x: auto; margin: var(--space-4) 0; }

table {
  width: 100%; min-width: 34rem;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
th, td {
  text-align: left; vertical-align: top;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--rule);
}
th { font-weight: 650; }
tr:last-child td { border-bottom: 0; }

/* ── Footer ──────────────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: var(--space-6) 0 var(--space-7);
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer__inner {
  display: flex; flex-wrap: wrap; gap: var(--space-4);
  align-items: center; justify-content: space-between;
}
.site-footer__links { display: flex; gap: var(--space-5); }
.site-footer__links a { color: var(--muted); text-decoration: none; }
.site-footer__links a:hover { color: var(--accent); }
.site-footer p { margin: 0; }
