:root {
  --purple: #6B3FA0; --lav: #A78BFA; --tint: #EDE9FE; --pale: #F7F3FF; --deep: #2E1F5E;
  --ink: #191227; --body: #3D3549; --sub: #54475B; --line: #E7E1F5; --bg: #FCFBF9; --card: #FFFFFF; --gold: #D4A017; /* the app's plum-tinted neutrals */
  --serif: "Newsreader", Georgia, serif; --sans: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #F5F3FF; --body: #D6D3D1; --sub: #A8A29E; --line: #3B2F5C; --bg: #191227; --card: #231A38; --tint: #2E1F5E; --pale: #231A38; --purple: #A78BFA; }
  .btn { color: #191227; } .btn.ghost { color: var(--purple); }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--body); font: 16px/1.65 var(--sans); }
a { color: var(--purple); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }
header.top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; padding: 20px 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 700 22px var(--serif); }
.brand img { height: 28.4px; width: auto; display: block; } /* the golden lockup, mark 28 px (docs/brand/make_lockups.py) */
.brand img[src$="bettrmind-mark.png"] { width: 32px; height: 32px; border-radius: 8px; }
@media (prefers-color-scheme: dark) { .brand img[src$="bettrmind-lockup.png"] { filter: brightness(0) invert(1); } } /* on dark, the all-white lockup */
nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 20px; }
nav a { color: var(--sub); text-decoration: none; font-size: 14px; }
nav a:hover { color: var(--purple); }
h1, h2, h3 { font-family: var(--serif); color: var(--ink); line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(34px, 6vw, 58px); margin: 0 0 16px; }
h2 { font-size: clamp(24px, 3.5vw, 34px); margin: 48px 0 12px; }
h3 { font-size: 20px; margin: 28px 0 8px; }
.lede { font-size: clamp(17px, 2.2vw, 20px); color: var(--sub); max-width: 34em; }
.hero { padding: 56px 0 40px; display: grid; gap: 40px; grid-template-columns: 1.2fr 1fr; align-items: center; }
.hero .art { background: linear-gradient(160deg, var(--deep), #191227); border-radius: 28px; padding: 36px; color: #fff; min-height: 340px; display: flex; flex-direction: column; justify-content: flex-end; }
.art .big { font: 700 clamp(40px, 11vw, 64px) var(--serif); line-height: 1; }
.art small { color: #C4B5FD; }
.stores { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border-radius: 12px; background: var(--purple); color: #fff; text-decoration: none; font-weight: 600; border: 0; font-size: 15px; cursor: pointer; font-family: inherit; }
.btn.ghost { background: transparent; color: var(--purple); border: 1.5px solid var(--purple); }
.btn[disabled] { opacity: .5; cursor: default; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.card h3 { margin-top: 0; }
.muted { color: var(--sub); font-size: 14px; }
footer { border-top: 1px solid var(--line); margin-top: 72px; padding: 28px 0 48px; font-size: 14px; color: var(--sub); }
footer a { color: var(--sub); margin-right: 18px; display: inline-block; line-height: 2; } /* inline-block so links wrap on narrow screens (the markup has no spaces between them) */
footer .rights { margin-top: 10px; font-size: 12px; line-height: 1.5; max-width: 62ch; }
.center { text-align: center; }
.panel { max-width: 440px; margin: 48px auto; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 32px 28px; }
.panel h1 { font-size: 30px; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--sub); margin: 16px 0 6px; }
input { width: 100%; min-height: 48px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); padding: 10px 14px; font: 16px var(--sans); }
input:focus { outline: none; border-color: var(--purple); }
.msg { margin-top: 14px; font-size: 14px; }
.msg.err { color: #DC2626; }
.code { font: 700 32px var(--sans); letter-spacing: 6px; color: var(--ink); background: var(--pale); border-radius: 14px; padding: 14px; text-align: center; margin: 16px 0; }
.legal h2 { font-size: 22px; margin-top: 36px; }
.legal li { margin-bottom: 6px; }
.note { background: var(--pale); border-radius: 14px; padding: 14px 16px; font-size: 14px; }
@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; padding-top: 24px; }
  .hero .art { min-height: 220px; padding: 28px; }
  .grid { grid-template-columns: 1fr; }
  nav { gap: 4px 14px; }
  nav a.hide-sm { display: none; }
}

/* Tagline locked up with the wordmark. Hidden on narrow screens, where the header
   only has room for the name itself. */
.brand .tag {
  font: 500 12px var(--sans); color: var(--sub); letter-spacing: .01em;
  padding-left: 10px; border-left: 1px solid var(--line); white-space: nowrap;
}
@media (max-width: 640px) { .brand .tag { display: none; } }
/* long legal pages: numbered clauses, forms and the highlighted [placeholders] in draft agreements */
.legal h3 { font-size: 17px; margin: 26px 0 6px; }
.legal p.clause { padding-left: 2.6em; text-indent: -2.6em; margin: 0 0 8px; }
.legal p.clause b:first-child { display: inline-block; width: 2.6em; text-indent: 0; color: var(--purple); }
.legal table { width: 100%; border-collapse: collapse; margin: 14px 0 22px; font-size: 15px; }
.legal th { text-align: left; font-size: 13px; color: var(--sub); border-bottom: 1.5px solid var(--line); padding: 8px 10px; }
.legal td { border: 1px solid var(--line); padding: 9px 10px; vertical-align: top; }
.legal table.form td:first-child { width: 34%; background: var(--pale); }
.legal table.sign td { width: 50%; }
.legal .ph { background: #FFF1B8; color: #191227; border-radius: 4px; padding: 0 3px; }
@media (max-width: 640px) { .legal table { font-size: 14px; } .legal td, .legal th { padding: 7px 8px; } }

/* Accessibility (WCAG 2.2 AA): skip link, visible focus, enough contrast in dark mode, and no motion for people who ask for none */
.skip { position: absolute; left: 12px; top: -64px; z-index: 5000; padding: 12px 18px; border-radius: 10px; background: var(--ink); color: var(--bg); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; }
main:focus { outline: none; }
@media (prefers-color-scheme: dark) {
  .btn { color: #191227; } .btn.ghost { color: var(--purple); }  /* repeated here because the earlier rule is overridden by the base .btn colour */
  .msg.err { color: #F87171; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
