/* One dark theme in the app icon's colours, mirroring the app's theme.dart:
   brand purple fills buttons (white on it is 6.4:1), the lighter accent draws
   text and icons on the dark surfaces. Sizes are in rem so text zoom scales
   the whole layout. */
:root {
  --brand: #7142c2;
  --brand-hover: #8456d6;
  --accent: #b79cf0;
  --accent-hover: #d2c0f7;
  --on-brand: #ffffff;
  --brand-container: #3a2566;
  --on-brand-container: #e9ddff;

  --bg: #0f0e13;
  --surface-low: #15131a;
  --surface: #1a1820;
  --surface-high: #221f29;
  --text: #f2f0f7;
  --muted: #c9c4d4;
  --line: #3a3644;
  --outline: #8e8899;

  --radius: 1rem;
  --radius-sm: 0.625rem;
  --gutter: 1rem;
  --ease: 180ms ease-out;
  color-scheme: dark;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: break-word;
}

main { flex: 1 0 auto; }

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

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

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

.wrap { width: 100%; max-width: 68rem; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

.skip { position: absolute; left: -9999px; top: 0.5rem; }
.skip:focus { left: var(--gutter); background: var(--brand); color: var(--on-brand); padding: 0.625rem 1rem; border-radius: var(--radius-sm); z-index: 10; }

/* Header */
.site-header { background: var(--surface-low); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 0.25rem 1rem; flex-wrap: wrap; padding-top: 0.5rem; padding-bottom: 0.5rem; }
.brand { display: inline-flex; align-items: center; gap: 0.75rem; min-height: 2.75rem; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.25rem; letter-spacing: -0.01em; }
.brand:hover { color: var(--text); }
.brand img { border-radius: 0.625rem; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 0.125rem; margin-left: -0.5rem; margin-right: -0.5rem; }
.site-header nav a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 0.75rem; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 0.9375rem; font-weight: 500; transition: background-color var(--ease), color var(--ease); }
.site-header nav a:hover { color: var(--text); background: var(--surface-high); }
.site-header nav a[aria-current="page"] { color: var(--on-brand-container); background: var(--brand-container); }

/* Home: hero */
.hero { background: radial-gradient(60rem 28rem at 80% -10%, rgb(113 66 194 / 38%), transparent 70%), radial-gradient(40rem 24rem at 0% 100%, rgb(113 66 194 / 16%), transparent 70%), var(--bg); padding: 2.5rem 0 3rem; }
.hero-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.75rem; }
.hero-art { flex: none; }
.hero-icon { display: block; width: 7rem; height: 7rem; border-radius: 1.75rem; box-shadow: 0 0 0 1px rgb(255 255 255 / 10%), 0 1.25rem 3rem rgb(113 66 194 / 55%); }
.hero h1 { font-size: clamp(2.125rem, 8vw, 3.5rem); line-height: 1.1; margin: 0 0 1rem; letter-spacing: -0.025em; text-wrap: balance; }
.lede { font-size: 1.1875rem; color: var(--muted); margin: 0 auto 1.75rem; max-width: 34rem; text-wrap: pretty; }
.stores { display: flex; flex-direction: column; gap: 0.75rem; }
.store { display: flex; align-items: center; justify-content: center; min-height: 3.5rem; padding: 0.625rem 1.5rem; border-radius: var(--radius-sm); background: var(--brand); color: var(--on-brand); text-decoration: none; font-weight: 600; font-size: 1.125rem; line-height: 1.2; box-shadow: 0 0.5rem 1.5rem rgb(113 66 194 / 30%); transition: background-color var(--ease), transform var(--ease); }
.store:hover { color: var(--on-brand); background: var(--brand-hover); }
.store:active { transform: scale(0.98); }
.store:focus-visible { outline-color: var(--on-brand); }
.store span { text-align: left; }
.store small { display: block; font-size: 0.75rem; font-weight: 400; letter-spacing: 0.02em; }
.adults { display: inline-block; margin: 1.25rem 0 0; padding: 0.25rem 0.875rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-low); color: var(--muted); font-size: 0.875rem; }

/* Home: help */

.help { padding-top: 2rem; padding-bottom: 3.5rem; }
.help h2, .help p { max-width: 44rem; }
.help h2 { font-size: 1.5rem; line-height: 1.25; margin: 0 0 0.5rem; letter-spacing: -0.01em; }
.help p { margin: 0; color: var(--muted); }

/* Policy and help pages */
.prose { max-width: 46rem; padding-top: 2rem; padding-bottom: 4rem; font-size: 1.0625rem; line-height: 1.7; }
.prose h1 { font-size: clamp(1.875rem, 6vw, 2.5rem); line-height: 1.15; margin: 0 0 1.25rem; letter-spacing: -0.02em; text-wrap: balance; }
.prose h2 { font-size: 1.5rem; line-height: 1.25; margin: 3rem 0 0.75rem; padding-top: 1.5rem; border-top: 1px solid var(--line); letter-spacing: -0.01em; text-wrap: balance; }
.prose h3 { font-size: 1.1875rem; line-height: 1.35; margin: 2rem 0 0.5rem; color: var(--on-brand-container); }
.prose h2, .prose h3 { scroll-margin-top: 1rem; }
.prose p { margin: 0 0 1rem; }
.prose strong { font-weight: 650; }
.prose ul, .prose ol { margin: 0 0 1.25rem; padding-left: 1.5rem; }
.prose li { margin: 0.375rem 0; padding-left: 0.25rem; }
.prose li::marker { color: var(--accent); }
.prose li > ul, .prose li > ol { margin: 0.375rem 0 0; }
.prose a { text-decoration-thickness: 1px; text-underline-offset: 0.2em; overflow-wrap: anywhere; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
.prose blockquote { margin: 1.25rem 0; padding: 0.75rem 1.25rem; border-left: 4px solid var(--brand); background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--muted); }
.prose blockquote > :last-child { margin-bottom: 0; }
.prose code { background: var(--surface-high); border: 1px solid var(--line); border-radius: 0.375rem; padding: 0.0625rem 0.375rem; font-size: 0.9em; }
.prose pre { overflow-x: auto; padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.prose pre code { background: none; border: 0; padding: 0; }
.prose table { display: block; overflow-x: auto; max-width: 100%; border-collapse: collapse; margin: 0 0 1.5rem; font-size: 0.9375rem; }
.prose th, .prose td { padding: 0.625rem 0.875rem; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: var(--surface); }

/* On-page contents for long policies */
.toc { margin: 2rem 0 0.5rem; padding: 0.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0; padding: 0; }
.toc a { display: block; padding: 0.5rem 0.75rem; border-radius: 0.5rem; color: var(--text); text-decoration: none; font-size: 0.9375rem; line-height: 1.35; transition: background-color var(--ease), color var(--ease); }
.toc a:hover { background: var(--brand-container); color: var(--on-brand-container); }

/* Footer */
.site-footer { margin-top: auto; background: var(--surface-low); border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9375rem; }
.footer-inner { padding-top: 1.5rem; padding-bottom: 2rem; }
.footer-inner p { margin: 0 0 0.5rem; }
.footer-links { line-height: 1; }
.site-footer a { display: inline-block; max-width: 100%; padding: 0.5rem 0.25rem; color: var(--accent); overflow-wrap: anywhere; }
.site-footer a:hover { color: var(--accent-hover); }

@media (min-width: 40rem) {
  :root { --gutter: 1.5rem; }
  .toc ul { columns: 2; column-gap: 0.5rem; }
  .toc li { break-inside: avoid; }
  .stores { flex-direction: row; justify-content: center; }
  .store { justify-content: flex-start; min-width: 12.5rem; }
  .prose { padding-top: 3rem; }
  .footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
  .footer-inner p { margin: 0; }
}

@media (min-width: 52rem) {
  .hero { padding: 4.5rem 0 5rem; }
  .hero-inner { flex-direction: row-reverse; justify-content: space-between; text-align: left; gap: 3rem; }
  .hero-copy { max-width: 36rem; }
  .hero-icon { width: 12rem; height: 12rem; border-radius: 2.75rem; }
  .lede { margin-left: 0; margin-right: 0; font-size: 1.3125rem; }
  .stores { justify-content: flex-start; }
  .help { padding-top: 3rem; padding-bottom: 5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .store:active { transform: none; }
}
