/* Yep, I'm Okay website: one shared stylesheet. System fonts, no external requests. */
:root {
  /* Light theme: the same tokens as the app (src/lib/ui.tsx `colors`). design/check-sync.mjs
     fails the website check if they drift apart. */
  --bg: #f6f8f5;            /* app: bg */
  --bg-soft: #e3f1eb;       /* app: brandSoft */
  --bg-mint: #e3f1eb;       /* app: brandSoft */
  --surface: #ffffff;       /* app: card */
  --text: #14221e;          /* app: ink */
  --muted: #5b6b65;         /* app: muted */
  --border: #dce4df;        /* app: line */
  --brand: #1d6b57;         /* app: brand */
  --brand-strong: #14513f;  /* app: brandDark */
  --on-brand: #ffffff;      /* app: brandInk */
  --link: #14513f;          /* app: brandDark */
  --ok: #1f7a55;            /* app: ok */
  --ok-bg: #e5f4ec;         /* app: okBg */
  --focus: #b3530f;
  --note-bg: #fff4dc;       /* app: warnBg */
  --note-border: #8a5a00;   /* app: warn */
  --draft-bg: #fce8e6;      /* app: badBg */
  --draft-border: #b3261e;  /* app: bad */
  --shadow: 0 1px 2px rgba(20, 34, 30, 0.06), 0 4px 16px rgba(20, 34, 30, 0.06);
  --radius: 20px;           /* app: cards */
  --max: 70rem;
  --measure: 42rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1816;
    --bg-soft: #13221f;
    --bg-mint: #142420;
    --surface: #17231f;
    --text: #e7efec;
    --muted: #b3c3bd;
    --border: #2d403a;
    --brand: #7fd8bc;
    --brand-strong: #a6e6d2;
    --on-brand: #06231b;
    --link: #8fe0c6;
    --focus: #ffb37a;
    --note-bg: #2a2212;
    --note-border: #d9a441;
    --draft-bg: #2e1515;
    --draft-border: #f08a80;
    --ok: #7fd8a8;
    --ok-bg: #12291f;
    --shadow: none;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

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

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.6em; color: var(--text); font-weight: 800; letter-spacing: -0.015em; }
h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2rem); margin-top: 0; }
h3 { font-size: 1.2rem; }
p, ul, ol { margin: 0 0 1em; }
li + li { margin-top: 0.35em; }

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -10rem;
  background: var(--surface);
  color: var(--text);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  z-index: 10;
}
.skip-link:focus { top: 0.5rem; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1rem; }
@media (min-width: 48rem) { .wrap { padding: 0 1.5rem; } }
.prose { max-width: var(--measure); }
.wrap.prose { max-width: var(--max); }
.wrap.prose > * { max-width: var(--measure); }

/* Header */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg); }
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
  text-decoration: none;
}
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
}
.site-nav li + li { margin-top: 0; }
.site-nav a { color: var(--text); text-decoration: none; padding: 0.3rem 0; display: inline-block; font-weight: 500; }
.site-nav a:hover { text-decoration: underline; }
.site-nav a[aria-current="page"] { color: var(--link); text-decoration: underline; text-decoration-thickness: 2px; }

/* Breadcrumbs */
.breadcrumbs { font-size: 0.9rem; color: var(--muted); padding-top: 1rem; }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.25rem; }
.breadcrumbs li + li { margin-top: 0; }
.breadcrumbs li + li::before { content: "›"; margin: 0 0.4rem 0 0.15rem; color: var(--muted); }
.breadcrumbs a { color: var(--muted); }

/* Sections */
main { display: block; }
.section { padding: 2.75rem 0; }
.section-soft { background: var(--bg-mint); }
.page-head { padding-top: 1.5rem; padding-bottom: 1rem; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: var(--measure); }

/* Hero */
.hero { background: var(--bg-soft); padding: 2.5rem 0 3rem; }
.hero-grid { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 56rem) { .hero-grid { grid-template-columns: 1.3fr 1fr; gap: 3rem; } }
.hero .lede { color: var(--text); }
.hero-art { max-width: 13rem; margin: 0 auto; }
@media (min-width: 56rem) { .hero-art { max-width: 20rem; } }
.eyebrow { font-weight: 600; color: var(--link); margin-bottom: 0.5rem; }

/* Buttons and store badges */
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin: 1.25rem 0 0.5rem; }
.button {
  display: inline-block;
  background: var(--brand);
  color: var(--on-brand);
  text-decoration: none;
  font-weight: 600;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  border: 2px solid var(--brand);
}
.button:hover { background: var(--brand-strong); border-color: var(--brand-strong); text-decoration: none; }
.button.secondary { background: transparent; color: var(--link); }
.button.secondary:hover { background: var(--surface); }
.store-note {
  display: inline-block;
  border: 2px dashed var(--brand);
  color: var(--text);
  border-radius: 999px;
  padding: 0.6rem 1.1rem;
  font-weight: 600;
  background: var(--surface);
}

/* Cards and grids */
.grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 40rem) { .grid-2, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 60rem) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 0.4rem; }
.card p:last-child { margin-bottom: 0; }
.card-link { display: block; text-decoration: none; color: inherit; height: 100%; }
.card-link:hover h3 { text-decoration: underline; }
.card-link h3 { color: var(--link); }
.card .meta { font-size: 0.95rem; color: var(--muted); }
.tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text);
  border: 1px solid var(--border);
}

/* Steps / timeline */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 1.25rem 3.25rem;
  margin: 0;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 700;
  display: grid;
  place-items: center;
}
.steps > li::after {
  content: "";
  position: absolute;
  left: calc(1.125rem - 1px);
  top: 2.5rem;
  bottom: 0.25rem;
  width: 2px;
  background: var(--border);
}
.steps > li:last-child::after { display: none; }
.steps h3,
.steps h4 { margin: 0 0 0.25rem; padding-top: 0.25rem; font-size: 1.15rem; line-height: 1.3; }
.example-title { margin-top: 2rem; }
.steps p { margin-bottom: 0; }

.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: 1.9rem; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.45em;
  width: 0.9rem;
  height: 0.5rem;
  border-left: 3px solid var(--brand);
  border-bottom: 3px solid var(--brand);
  transform: rotate(-45deg);
}

/* Notes */
.note {
  border-left: 5px solid var(--note-border);
  background: var(--note-bg);
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin: 1.5rem 0;
  max-width: var(--measure);
}
.note p:last-child { margin-bottom: 0; }

.frequency {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  max-width: var(--measure);
}
.frequency p:last-child { margin-bottom: 0; }
.frequency .big { font-size: 1.35rem; font-weight: 700; margin-bottom: 0.25rem; }

/* FAQ */
.faq-list { max-width: var(--measure); }
.faq-item { border-bottom: 1px solid var(--border); padding: 1rem 0; }
.faq-item h3 { margin-bottom: 0.4rem; }
.faq-item p:last-child { margin-bottom: 0; }

/* Tables */
.table-wrap { overflow-x: auto; max-width: var(--measure); }
table { border-collapse: collapse; width: 100%; font-size: 0.98rem; }
th, td { text-align: left; padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-weight: 700; }

/* Legal */
.legal h2 { font-size: 1.4rem; margin-top: 2rem; }
.legal h3 { margin-top: 1.25rem; }

/* Join page */
.join-code {
  font-size: clamp(2.5rem, 1.5rem + 6vw, 4rem);
  font-weight: 800;
  letter-spacing: 0.15em;
  font-variant-numeric: tabular-nums;
  background: var(--bg-soft);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  text-align: center;
  margin: 1rem 0;
  max-width: 24rem;
}
[hidden] { display: none !important; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-mint);
  padding: 2rem 0 2.5rem;
  margin-top: 0;
  font-size: 0.95rem;
}
.footer-emergency {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}
.footer-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; margin-top: 1.5rem; }
@media (min-width: 40rem) { .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.footer-grid h2 { font-size: 1rem; margin-bottom: 0.5rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li + li { margin-top: 0.3rem; }
.site-footer .small { color: var(--muted); margin-top: 1.5rem; margin-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* The 'Proudly Canadian' card on the home page: a thin red edge, like the flag. */
.card-canada { border-left: 4px solid #D52B1E; margin-top: 1rem; }
.page-art { width: 100%; max-width: 22rem; margin: 1rem 0 0; }

/* Quoted text (consent wording, sample messages) and captioned screenshots. */
blockquote {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--brand);
  background: var(--surface);
  border-radius: 0 12px 12px 0;
}
blockquote p { margin: 0; }
figure.card { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
figure.card img { width: 100%; max-width: 360px; border-radius: 16px; border: 1px solid var(--border); }
figcaption { font-weight: 600; text-align: center; }
