/*
 * Meny: the public site.
 *
 * The palette is lifted from app/src/theme.ts on purpose: the site and the app
 * should read as one thing, and a person arriving from the Play listing should
 * recognise the room. Dark is home here for the same reason it is there. This
 * gets opened at 1am by someone who feels alone. But light is honoured,
 * because a legal page is a reading surface and forcing dark on it outdoors is
 * glare, not atmosphere.
 *
 * Tokens only. If a colour is needed twice it becomes a variable; nothing in
 * the markup names a hex.
 */

:root {
  --bg: #faf9f7;
  --bg-elevated: #ffffff;
  --bg-card: #f2f0ec;
  --surface-sheet: #ffffff;
  --border: #e6e2dc;
  --hairline: rgba(26, 24, 21, 0.07);

  --text: #1a1815;
  --text-muted: #5c5750;
  --text-faint: #5c5750;

  --friend: #0e7a70;
  --friend-deep: #0a5a53;
  --friend-soft: rgba(14, 122, 112, 0.10);
  --friend-glow: rgba(14, 122, 112, 0.22);
  --tutor: #0e7a70;
  --tutor-deep: #0a5a53;
  --tutor-soft: rgba(14, 122, 112, 0.10);
  --tutor-glow: rgba(14, 122, 112, 0.22);
  --coach: #0e7a70;
  --coach-deep: #0a5a53;
  --coach-soft: rgba(14, 122, 112, 0.10);
  --coach-glow: rgba(14, 122, 112, 0.22);
  --girlfriend: #0e7a70;
  --girlfriend-deep: #0a5a53;
  --girlfriend-soft: rgba(14, 122, 112, 0.10);
  --girlfriend-glow: rgba(14, 122, 112, 0.22);

  --danger: #b3273a;
  --danger-soft: rgba(179, 39, 58, 0.1);
  --success: #12694f;
  --success-soft: rgba(27, 110, 69, 0.1);
  --on-accent: #ffffff;
  --on-image: #ffffff;
  --on-image-muted: rgba(255, 255, 255, 0.82);
  --on-accent-muted: rgba(255, 255, 255, 0.92);

  --focus-ring: rgba(20, 22, 29, 0.24);
  --skeleton: #e8e5ed;
  --skeleton-highlight: #f7f6f9;
  --overlay-blur-tint: rgba(246, 245, 249, 0.68);

  --aurora-rose: rgba(176, 58, 115, 0.12);
  --aurora-blue: rgba(31, 95, 143, 0.09);
  --aurora-amber: rgba(166, 90, 33, 0.07);

  --shadow: rgba(0, 0, 0, 0.1);

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-xxl: 48px;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  /* The chat bubble's own pair, from theme.ts. The corner that meets the
     thread edge stays tight so the bubble reads as anchored to its side —
     the tail, without drawing one. */
  --radius-bubble: 18px;
  --radius-bubble-tail: 5px;
  --radius-pill: 999px;

  --motion-instant: 90ms;
  --motion-fast: 140ms;
  --motion-base: 200ms;
  --motion-slow: 320ms;
  --motion-deliberate: 520ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ease-decelerate: cubic-bezier(0, 0, 0, 1);
  --ease-accelerate: cubic-bezier(0.3, 0, 1, 1);
  --ease-emphasis: cubic-bezier(0.2, 0, 0, 1);

  --measure: 68ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121114;
    --bg-elevated: #1a181d;
    --bg-card: #201d24;
    --surface-sheet: #242128;
    --border: #2b2830;
    --hairline: rgba(237, 234, 230, 0.07);

    --text: #edeae6;
    --text-muted: #a09a93;
    --text-faint: #a09a93;

    --friend: #16a79a;
    --friend-deep: #12867c;
    --friend-soft: rgba(22, 167, 154, 0.14);
    --friend-glow: rgba(22, 167, 154, 0.30);
    --tutor: #16a79a;
    --tutor-deep: #12867c;
    --tutor-soft: rgba(22, 167, 154, 0.14);
    --tutor-glow: rgba(22, 167, 154, 0.30);
    --coach: #16a79a;
    --coach-deep: #12867c;
    --coach-soft: rgba(22, 167, 154, 0.14);
    --coach-glow: rgba(22, 167, 154, 0.30);
    --girlfriend: #16a79a;
    --girlfriend-deep: #12867c;
    --girlfriend-soft: rgba(22, 167, 154, 0.14);
    --girlfriend-glow: rgba(22, 167, 154, 0.30);

    --danger: #e8857f;
    --danger-soft: rgba(232, 124, 138, 0.12);
    --success: #5fc79b;
    --success-soft: rgba(124, 232, 168, 0.12);
    --on-accent: #0b0e14;
    --on-image: #ffffff;
  --on-image-muted: rgba(255, 255, 255, 0.82);
  --on-accent-muted: rgba(11, 14, 20, 0.72);

    --focus-ring: rgba(232, 234, 240, 0.36);
    --skeleton: #1e2534;
    --skeleton-highlight: #2a3345;
    --overlay-blur-tint: rgba(11, 14, 20, 0.62);

    --aurora-rose: rgba(232, 124, 184, 0.2);
    --aurora-blue: rgba(124, 184, 232, 0.14);
    --aurora-amber: rgba(232, 168, 124, 0.1);

    --shadow: rgba(0, 0, 0, 0.4);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Keep section headings clear of the sticky header. */
  scroll-padding-top: 80px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
/*
 * Brand faces, served from this origin.
 *
 * These were on fonts.googleapis.com. That put a third-party request on every
 * page — including, of all things, the privacy policy, which is the one page
 * whose whole job is to be checkable. The site previously made no external
 * requests at all and now makes none again.
 *
 * Both files are subsets of the variable TTFs in `app/assets/fonts/`, so the
 * site and the app are literally the same typeface. `wght` is preserved, so
 * one file covers 400 through 700 and `font-weight` interpolates.
 *
 * Devanagari is subset to the only Devanagari on the site — `अनेक` in the hero
 * eyebrow. That is 4.8 kB instead of 722 kB for the full block. If you add
 * Devanagari anywhere on this site you must regenerate it; `web/README.md`
 * carries the exact command.
 */
@font-face {
  font-family: 'Anek Latin';
  src: url('/fonts/anek-latin-var.woff2') format('woff2-variations');
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Anek Devanagari';
  src: url('/fonts/anek-devanagari-var.woff2') format('woff2-variations');
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0900-097F, U+200C-200D, U+A830-A839, U+A8E0-A8FF;
}


body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Anek Latin', 'Anek Devanagari', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

:lang(hi),
:lang(mr) {
  font-family: 'Anek Devanagari', 'Anek Latin', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    sans-serif;
}

/* The one decorative element on the site: a soft persona-coloured wash behind
   the top of the page, echoing the app's aurora. Fixed and non-interactive so
   it never fights the text. */
.aurora {
  position: fixed;
  inset: 0 0 auto 0;
  height: 70vh;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(60% 60% at 20% 0%, var(--aurora-rose), transparent 70%),
    radial-gradient(50% 50% at 80% 5%, var(--aurora-blue), transparent 70%),
    radial-gradient(45% 45% at 50% 20%, var(--aurora-amber), transparent 70%);
}

.page {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 var(--space-lg) var(--space-xxl);
}

/*
 * The landing page only.
 *
 * 860px is a reading measure and it is the right one for the Terms — but a
 * six-row comparison table and a row of four companions both want more room
 * than a paragraph does. Prose stays narrow regardless, because `p` and `li`
 * are capped at `--measure` independently of the container.
 */
.page-wide {
  max-width: 1060px;
}

/* ---------- header ---------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) 0;
}

/*
 * Two headers, one class.
 *
 * The legal pages keep theirs inside `.page`, static, at the reading measure —
 * a document's masthead. The landing page moves its own out to be a direct
 * child of <body> so it can span the viewport and stick while you scroll five
 * sections of it. Selecting on the parent rather than adding a modifier class
 * means neither page has to spell out which kind it wants.
 */
body > .site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: block;
  padding: 0 var(--space-lg);
  background: var(--overlay-blur-tint);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--hairline);
}

/* The fallback nav wraps; keep its variable height out of the anchor path. */
body > .site-header:not([data-nav-ready]) {
  position: relative;
}

body > .site-header .header-inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: center;
  justify-content: space-between;
  max-width: 1060px;
  margin: 0 auto;
  padding: 10px 0;
}

/* Wrap links if enhancement is unavailable; never hide navigation off-screen. */
body > .site-header .site-nav {
  max-width: 100%;
  flex-wrap: wrap;
  gap: 4px 16px;
}

body > .site-header .site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 80px;
  }

  body > .site-header .header-inner {
    gap: 8px;
  }

  body > .site-header .wordmark {
    min-height: 44px;
  }

  body > .site-header .site-nav {
    flex-basis: 100%;
  }

  body > .site-header[data-nav-ready] .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--bg-elevated);
    color: var(--text);
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
  }

  .nav-toggle-icon {
    position: relative;
    width: 16px;
    height: 12px;
  }

  .nav-toggle-icon::before,
  .nav-toggle-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 16px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
  }

  .nav-toggle-icon::before { top: 2px; }
  .nav-toggle-icon::after { bottom: 2px; }

  [aria-expanded='true'] .nav-toggle-icon::before {
    top: 5px;
    transform: rotate(45deg);
  }

  [aria-expanded='true'] .nav-toggle-icon::after {
    bottom: 5px;
    transform: rotate(-45deg);
  }

  body > .site-header[data-nav-ready] .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100svh - 76px);
    overflow-y: auto;
    padding: 12px 16px 16px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 16px 24px var(--shadow);
  }

  body > .site-header[data-nav-open='true'] .site-nav {
    display: grid;
    gap: 4px;
  }

  body > .site-header[data-nav-ready] .site-nav a {
    min-height: 48px;
    padding: 8px 12px;
    color: var(--text);
    border: 0;
    border-radius: var(--radius-sm);
  }

  body > .site-header[data-nav-ready] .site-nav a:hover,
  body > .site-header[data-nav-ready] .site-nav a:focus-visible {
    background: var(--bg-card);
  }
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text);
  text-decoration: none;
}

/*
 * The mark is `/logo.svg`, four dots shaped as a speech bubble, with the
 * lowercase wordmark beside it and never inside it. It is drawn from the same
 * geometry as `tools/make_brand_assets.py`, so the header, the favicon and the
 * app icon are one drawing at three sizes.
 *
 * It is an <img> rather than inline SVG on purpose: the mark carries the same
 * colours in both themes (an amber core is legible on either ground), so there
 * is nothing for `currentColor` to do, and one cacheable same-origin file beats
 * repeating a filtered SVG — with its document-global filter ids — in the
 * header and the footer of three pages.
 */
.wordmark .mark {
  display: block;
  flex: none;
  /* Sized by width; the height follows from the file's own 65:23 ratio, which
     the width/height attributes on the <img> also declare so the box is
     reserved correctly before the SVG loads. */
  width: 36px;
  height: auto;
}

/* The name's own joke, set once and reused: the letter that went missing. */
.name-note {
  color: var(--text-muted);
  font-size: 17px;
}

.name-note b {
  color: var(--text);
  font-weight: 600;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  font-size: 15px;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
  border-bottom-color: var(--border);
}

.site-nav a[aria-current='page'] {
  color: var(--text);
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(310px, 0.92fr);
  gap: var(--space-xl);
  align-items: center;
  min-height: min(610px, calc(100svh - 150px));
  padding: var(--space-xl) 0 var(--space-xxl);
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero h1 {
  max-width: 18ch;
  font-size: clamp(40px, 8vw, 64px);
  line-height: 1.05;
  letter-spacing: -2px;
  margin: 0 0 var(--space-lg);
  font-weight: 700;
}

.hero p {
  max-width: 44ch;
  font-size: 20px;
  color: var(--text-muted);
  margin: 0 0 var(--space-lg);
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: var(--space-md);
}

.hero p.badge,
.badge {
  max-width: none;
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 14px;
  color: var(--text-muted);
  background: var(--bg-elevated);
}

.hero .hero-disclosure {
  margin: 0;
  max-width: 48ch;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: var(--space-lg);
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--friend);
  color: var(--on-accent);
  text-decoration: none;
  font-weight: 600;
  line-height: 1.4;
}

.primary-action:hover,
.primary-action:focus-visible {
  background: var(--friend-deep);
  color: var(--on-accent);
  text-decoration: none;
}

.hero .availability {
  margin: 0;
  max-width: none;
  color: var(--text-faint);
  font-size: 14px;
  line-height: 1.5;
}

/*
 * The arc's offsets are absolute, so the figures spread as its column does.
 * They were tuned against the 860px page's ~390px right column; the wider
 * landing container pulled them into two vertical pairs instead of a ring. The
 * cap holds the composition at the width it was drawn for and the auto margin
 * keeps it against the right edge, so the hero copy still gets the extra room.
 */
.portrait-arc {
  position: relative;
  min-height: 430px;
  /*
   * An explicit width, not `max-width`. Every figure inside is absolutely
   * positioned, so the box has no content to size itself from: as a stretched
   * grid item it took the column's width, but the moment `margin-left: auto`
   * removed the stretch it shrank to zero and the figures hung off the right
   * of the page.
   */
  width: min(100%, 400px);
  margin-left: auto;
  isolation: isolate;
}

.arc-person {
  --arc-accent: var(--friend);
  --arc-glow: var(--friend-glow);
  position: absolute;
  width: 150px;
  margin: 0;
  text-align: center;

}

/*
 * The arc deliberately overlaps, so paint order decides whose name survives.
 *
 * Left to itself that order is the DOM's, and the DOM's is the roster's:
 * friend, tutor, coach, girlfriend. Zoya's circle therefore landed on top of
 * Naina's caption and Meera's on top of Arjun's — two of the four companions
 * had their names half-covered on the front page. These four values put each
 * figure above the one whose circle reaches its caption, and nothing else
 * about the arc depends on them.
 */
.arc-friend {
  z-index: 4;
}
.arc-tutor {
  z-index: 3;
}
.arc-coach {
  z-index: 2;
}
.arc-girlfriend {
  z-index: 1;
}

.arc-person img {
  display: block;
  width: 132px;
  height: 132px;
  margin: 0 auto;
  border: 2px solid var(--arc-accent);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  object-fit: cover;
  box-shadow: 0 0 0 10px var(--bg), 0 0 44px var(--arc-glow), 0 14px 34px var(--shadow);
}

.arc-person figcaption {
  position: relative;
  display: inline-block;
  margin-top: 12px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 2px 10px var(--shadow);
}

.arc-friend {
  top: 16px;
  left: 4px;
}

.arc-tutor {
  top: 116px;
  right: -4px;
  --arc-accent: var(--tutor);
  --arc-glow: var(--tutor-glow);
}

.arc-coach {
  bottom: 8px;
  right: 38px;
  --arc-accent: var(--coach);
  --arc-glow: var(--coach-glow);
}

.arc-girlfriend {
  bottom: 74px;
  left: -16px;
  --arc-accent: var(--girlfriend);
  --arc-glow: var(--girlfriend-glow);
}


@media (max-width: 760px) {
  html {
    scroll-padding-top: 80px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .portrait-arc {
    min-height: 270px;
    /* One column from here down, so the arc centres instead of hugging the
       right edge it was pinned to beside the copy. */
    width: min(100%, 420px);
    margin: var(--space-sm) auto 0;
  }

  .arc-person {
    width: 112px;
  }

  .arc-person img {
    width: 96px;
    height: 96px;
    box-shadow: 0 0 0 7px var(--bg), 0 0 28px var(--arc-glow), 0 10px 24px var(--shadow);
  }

  .arc-friend {
    top: 10px;
    left: 0;
  }

  .arc-tutor {
    top: 72px;
    right: 0;
  }

  .arc-coach {
    right: 21%;
    bottom: 0;
  }

  .arc-girlfriend {
    left: 20%;
    bottom: 12px;
  }
}

/*
 * Small screens: get the four faces above the fold.
 *
 * The hero's whole job is to land three things — the name's idea, four faces,
 * one action — and on a phone the copy alone was pushing the arc to a 598px
 * offset. That fits a 812px viewport on paper and does not fit a real one,
 * where browser chrome leaves roughly 700px and the captions sat under it.
 *
 * Nothing here is a redesign; it is the same hero with the air taken out of
 * the header, the display size and the lede measure. Verified at 375x812.
 */
@media (max-width: 560px) {
  .site-header {
    gap: var(--space-sm);
    padding: var(--space-md) 0 var(--space-sm);
  }

  body > .site-header {
    padding: 0 var(--space-md);
  }

  body > .site-header .header-inner {
    gap: var(--space-sm);
    padding: 8px 0;
  }

  .steps li {
    padding-left: 46px;
  }

  .steps li::before {
    width: 30px;
    height: 30px;
  }

  .hero {
    gap: var(--space-md);
    padding: var(--space-md) 0 var(--space-xl);
  }

  .hero h1 {
    font-size: 34px;
    line-height: 1.08;
  }

  .hero-copy > p {
    font-size: 17px;
    line-height: 1.45;
    max-width: 34ch;
  }

  .portrait-arc {
    min-height: 250px;
    margin-top: 0;
  }
}

/* ---------- sections ---------- */

section {
  padding: var(--space-xl) 0;
}

h2 {
  font-size: 28px;
  letter-spacing: -0.5px;
  margin: 0 0 var(--space-md);
  font-weight: 600;
}

/* A section heading on the front page is a piece of signage; the same element
   in the Terms is a clause label. Only the wide container gets the display
   size, which keeps the legal pages reading as documents. */
.page-wide h2 {
  font-size: clamp(28px, 3.6vw, 38px);
  letter-spacing: -1px;
}

.page-wide section > .eyebrow {
  margin-bottom: var(--space-sm);
}

/* The paragraph directly under a section heading. Larger than body copy and
   held to a shorter measure than `--measure`, because it is read as a subtitle
   rather than as prose. */
.section-lede {
  font-size: 19px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 60ch;
  margin-bottom: var(--space-lg);
}

h3 {
  font-size: 19px;
  margin: var(--space-xl) 0 var(--space-sm);
  font-weight: 600;
}

p,
li {
  max-width: var(--measure);
}

p {
  margin: 0 0 var(--space-md);
}

ul,
ol {
  padding-left: 1.2em;
  margin: 0 0 var(--space-md);
}

li {
  margin-bottom: var(--space-sm);
}

a {
  color: var(--text);
  text-decoration-color: var(--text-faint);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: currentColor;
}

strong {
  font-weight: 600;
}

/* ---------- companions ---------- */

.companions {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: var(--space-lg);
}

@media (max-width: 900px) {
  .companions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .companions {
    grid-template-columns: 1fr;
  }
}

.companion {
  --accent: var(--friend);
  --accent-soft: var(--friend-soft);
  --accent-glow: var(--friend-glow);
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  box-shadow: 0 1px 3px var(--shadow);
  transition:
    transform var(--motion-base) var(--ease-standard),
    border-color var(--motion-base) var(--ease-standard),
    box-shadow var(--motion-base) var(--ease-standard);
}

.companion::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 52%;
  pointer-events: none;
  background: linear-gradient(to top, var(--accent-soft), transparent);
}

.companion:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 16px 38px var(--accent-glow);
}

/* Consistent circular frames use the same optimised source as the avatars. */
.companion .portrait {
  display: block;
  width: calc(100% - 40px);
  margin: 20px 20px 0;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--accent-glow);
  background: var(--bg-card);
}

.companion .who {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  z-index: 1;
  min-width: 0;
  padding: var(--space-lg);
}

.companion .name {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 var(--space-xs);
}

.companion .tagline {
  color: var(--text-muted);
  font-size: 15px;
  margin: 0;
}

.companion .companion-kind {
  display: inline-block;
  margin: 0 0 12px;
  padding: 3px 9px;
  border: 1px solid var(--accent-glow);
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}

.companion .companion-preview-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  margin-top: auto;
  padding: 0 12px;
  border: 1px solid var(--accent-glow);
  border-radius: var(--radius-pill);
  color: var(--text);
  background: var(--accent-soft);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.companion .companion-preview-link:hover {
  border-color: var(--accent);
}

/* One line on when you would actually reach for this one. The tagline says
   what they are; this says what they are for. */
.companion .note {
  color: var(--text-faint);
  font-size: 14px;
  line-height: 1.5;
  margin: var(--space-sm) 0 20px;
}

.companion[data-persona='friend'] {
  --accent: var(--friend);
  --accent-soft: var(--friend-soft);
  --accent-glow: var(--friend-glow);
}
.companion[data-persona='tutor'] {
  --accent: var(--tutor);
  --accent-soft: var(--tutor-soft);
  --accent-glow: var(--tutor-glow);
}
.companion[data-persona='coach'] {
  --accent: var(--coach);
  --accent-soft: var(--coach-soft);
  --accent-glow: var(--coach-glow);
}
.companion[data-persona='girlfriend'] {
  --accent: var(--girlfriend);
  --accent-soft: var(--girlfriend-soft);
  --accent-glow: var(--girlfriend-glow);
}

@media (max-width: 560px) {
  .companion {
    grid-template-columns: 72px minmax(0, 1fr);
    grid-template-rows: auto;
    align-items: start;
    gap: 14px;
    padding: 16px;
  }

  .companion .portrait {
    width: 72px;
    margin: 0;
  }

  .companion .who { padding: 0; }
  .companion .name { font-size: 17px; }
  .companion .companion-kind { margin-bottom: 10px; }
  .companion .note { margin-bottom: 14px; }
}

.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
  padding: 0;
  margin-top: var(--space-lg);
  list-style: none;
}

.principles li {
  min-height: 150px;
  margin: 0;
  padding: var(--space-lg);
  border-top: 3px solid var(--friend);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  box-shadow: 0 3px 18px var(--shadow);
}

.principles li[data-principle='wellbeing'] {
  border-top-color: var(--tutor);
}

.principles li[data-principle='crisis'] {
  border-top-color: var(--danger);
}

.principles li[data-principle='adults'] {
  border-top-color: var(--coach);
}

@media (max-width: 560px) {
  .principles {
    grid-template-columns: 1fr;
  }

  .principles li {
    min-height: auto;
  }
}

/* ---------- how it works: a sample thread, and the three steps ---------- */

.talk-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: var(--space-xl);
  align-items: start;
  margin-top: var(--space-lg);
}

/* A single, scripted preview. Persona colours follow the active companion. */
.companion-preview {
  --preview-accent: var(--friend);
  --preview-soft: var(--friend-soft);
  --preview-border: var(--friend-glow);
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  box-shadow: 0 18px 44px var(--shadow);
  overflow: hidden;
}

.companion-preview[data-persona='tutor'] {
  --preview-accent: var(--tutor);
  --preview-soft: var(--tutor-soft);
  --preview-border: var(--tutor-glow);
}

.companion-preview[data-persona='coach'] {
  --preview-accent: var(--coach);
  --preview-soft: var(--coach-soft);
  --preview-border: var(--coach-glow);
}

.companion-preview[data-persona='girlfriend'] {
  --preview-accent: var(--girlfriend);
  --preview-soft: var(--girlfriend-soft);
  --preview-border: var(--girlfriend-glow);
}

.preview-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px 20px 12px;
}

.preview-kicker {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.preview-badge {
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.5;
}

.preview-tabs:not([hidden]) {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 0 16px 16px;
  border-bottom: 1px solid var(--border);
}

.preview-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 76px;
  padding: 9px 4px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
}

.preview-tab img {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 50%;
}

.preview-tab:hover {
  background: var(--bg-card);
  color: var(--text);
}

.preview-tab[aria-selected='true'] {
  background: var(--preview-soft);
  color: var(--text);
  border-color: var(--preview-accent);
}

#preview-panel {
  padding: 20px;
  outline-offset: -3px;
}

.preview-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.preview-profile img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--preview-border);
}

.preview-profile h3 {
  margin: 0;
  color: var(--text);
  font-size: 21px;
  line-height: 1.3;
}

.preview-profile p {
  margin: 3px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
}

.companion-preview .preview-description {
  margin: 14px 0 20px;
  font-size: 16px;
  line-height: 1.4;
  color: var(--text);
}

.preview-starters > p {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.preview-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preview-prompt {
  min-height: 44px;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
}

.preview-prompt:hover {
  border-color: var(--preview-accent);
}

.preview-prompt[aria-pressed='true'] {
  border-color: var(--preview-accent);
  background: var(--preview-soft);
  box-shadow: inset 0 0 0 1px var(--preview-accent);
}

.preview-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 320px;
  margin: 20px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--border);
  list-style: none;
}

.preview-message {
  max-width: 88%;
  margin: 0;
  padding: 11px 14px;
  font-size: 15px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.preview-message.from-you {
  align-self: flex-end;
  background: var(--preview-accent);
  color: var(--on-accent);
  border-radius: 18px 18px 5px 18px;
}

.preview-message.from-companion {
  align-self: flex-start;
  background: var(--bg-card);
  color: var(--text);
  border-radius: 18px 18px 18px 5px;
}

.companion-preview .preview-footnote {
  max-width: none;
  margin: 0;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 560px) {
  .preview-topline { padding: 14px 12px 12px; }
  .preview-tabs:not([hidden]) { padding: 0 10px 12px; gap: 3px; }
  #preview-panel { padding: 16px 12px; }
  .preview-profile img { width: 44px; height: 44px; }
  .preview-message { max-width: 92%; padding: 10px 12px; }
  .companion-preview .preview-footnote { padding: 12px; }
}

@media (max-width: 860px) {
  .talk-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
}

.steps {
  display: grid;
  gap: var(--space-lg);
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
}

.steps li {
  position: relative;
  counter-increment: step;
  max-width: none;
  margin: 0;
  padding-left: 54px;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.steps h3 {
  margin: 0 0 var(--space-xs);
  font-size: 18px;
}

.steps p {
  margin: 0;
  color: var(--text-muted);
  font-size: 16px;
}

/* ---------- benefits and data ---------- */
.benefits {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.benefit {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
}

.benefit-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  border-radius: 50%;
  background: var(--friend-soft);
  color: var(--friend);
  font-size: 13px;
  font-weight: 600;
}

.benefit h3 {
  margin: 18px 0 10px;
  font-size: 20px;
  line-height: 1.3;
}

.benefit p {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-muted);
}

.data-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.data-summary > div {
  padding-left: 18px;
  border-left: 2px solid var(--friend-glow);
}

.data-summary dt {
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 600;
}

.data-summary dd {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-muted);
}

.privacy-detail {
  color: var(--text-muted);
  font-size: 15px;
}

.closing-invite {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  margin-top: 32px;
  border: 1px solid var(--friend-glow);
  border-radius: var(--radius-lg);
  background: var(--friend-soft);
}

.page-wide .closing-invite h2 {
  max-width: 22ch;
  margin-bottom: 10px;
  font-size: 30px;
  line-height: 1.2;
}

.closing-invite p { margin: 0; color: var(--text-muted); }

@media (max-width: 900px) {
  .benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .benefits, .data-summary, .principles { grid-template-columns: 1fr; }
  .benefit { padding: 20px; }
  .data-summary { gap: 24px; }
  .closing-invite { padding: 22px; }
}

/* ---------- FAQ ---------- */

/*
 * Native <details> keeps the FAQs usable independently of the navigation
 * enhancement, including keyboard, screen reader and find-in-page support.
 */
.faq {
  display: grid;
  gap: var(--space-sm);
  max-width: var(--measure);
  margin-top: var(--space-lg);
}

.faq details {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '';
  flex: none;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--text-faint);
  border-bottom: 2px solid var(--text-faint);
  transform: translateY(-3px) rotate(45deg);
  transition: transform var(--motion-fast) var(--ease-standard);
}

.faq details[open] summary::after {
  transform: translateY(2px) rotate(225deg);
}

.faq details[open] summary {
  border-bottom: 1px solid var(--hairline);
}

.faq details p {
  max-width: none;
  margin: 0;
  padding: var(--space-md) var(--space-lg) var(--space-lg);
  color: var(--text-muted);
}

/* ---------- callouts ---------- */

.callout {
  border: 1px solid var(--border);
  border-left: 3px solid var(--girlfriend);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  padding: var(--space-lg);
  margin: var(--space-lg) 0;
}

.callout > :last-child {
  margin-bottom: 0;
}

.callout.crisis {
  border-left-color: var(--danger);
}

.callout h3 {
  margin-top: 0;
}

/* ---------- legal pages ---------- */

.legal-head {
  padding: var(--space-xl) 0 var(--space-lg);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-lg);
}

.legal-head h1 {
  font-size: clamp(30px, 5vw, 40px);
  letter-spacing: -1px;
  margin: 0 0 var(--space-sm);
}

.legal-head .meta {
  color: var(--text-faint);
  font-size: 14px;
  margin: 0;
}

.summary {
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
  background: var(--bg-elevated);
}

.summary h2 {
  font-size: 17px;
  margin-bottom: var(--space-sm);
}

.summary ul {
  margin-bottom: 0;
}

.toc {
  margin-bottom: var(--space-xl);
  font-size: 15px;
}

.toc ol {
  columns: 2;
  column-gap: var(--space-xl);
}

@media (max-width: 560px) {
  .toc ol {
    columns: 1;
  }
}

.clause {
  scroll-margin-top: var(--space-lg);
}

.clause h2 {
  font-size: 21px;
  margin-top: var(--space-xl);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  padding: 1px 5px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
}

/* Every unresolved business fact is marked, so a placeholder can never ship
   unnoticed as if it were the real thing. */
.todo {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  background: var(--aurora-rose);
  color: var(--text);
  border: 1px solid var(--border);
  white-space: nowrap;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-md) 0 var(--space-lg);
  font-size: 15px;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: var(--space-sm) var(--space-md) var(--space-sm) 0;
  border-bottom: 1px solid var(--border);
}

th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- helplines ---------- */

.helplines {
  list-style: none;
  padding: 0;
}

.helplines li {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: baseline;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border);
}

.helplines .number {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-decoration-thickness: 1px;
}

.helplines .note {
  color: var(--text-muted);
  font-size: 15px;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: var(--space-xxl);
  padding-top: var(--space-lg);
  color: var(--text-faint);
  font-size: 14px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.site-footer a {
  color: var(--text-muted);
}

/*
 * The landing page's footer is a sitemap; the legal pages' is one row of links.
 * The selectors below carry two classes each so they outrank the `.site-footer
 * nav` flex rule above, which the legal pages still use unchanged.
 */
.site-footer .footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: var(--space-xl);
}

.site-footer .footer-brand .wordmark {
  font-size: 18px;
  margin-bottom: var(--space-sm);
}

.site-footer .footer-brand .mark {
  width: 32px;
  height: auto;
}

.site-footer .footer-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-lg);
  margin-bottom: 0;
}

.site-footer .footer-nav div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
}

/* A column label, not a section heading — it is an h2 so the footer's links
   sit under a named group in the document outline. */
.site-footer .footer-nav h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.site-footer .footer-nav a {
  text-decoration: none;
}

.site-footer .footer-nav a:hover,
.site-footer .footer-nav a:focus-visible {
  color: var(--text);
  text-decoration: underline;
}

.site-footer .name-note {
  font-size: 14px;
  max-width: 34ch;
  margin: 0;
}

.site-footer .colophon {
  margin: var(--space-lg) 0 0;
  padding-top: var(--space-md);
  border-top: 1px solid var(--hairline);
}

@media (max-width: 760px) {
  .site-footer .footer-top {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .site-footer .footer-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Present to a screen reader, absent on screen — used for the comparison
   table's <caption>, which a sighted reader gets from the heading above it. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  position: static;
  display: inline-block;
  margin: var(--space-md);
}

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

@media print {
  :root {
    --bg: white;
    --bg-elevated: white;
    --bg-card: white;
    --surface-sheet: white;
    --border: darkgray;
    --text: black;
    --text-muted: #252525;
    --text-faint: #454545;
  }

  @page {
    margin: 18mm;
  }

  body {
    background: var(--bg);
    color: var(--text);
    font-size: 11pt;
    line-height: 1.45;
  }

  .page {
    max-width: none;
    padding: 0;
  }

  .aurora,
  .skip-link,
  .site-header,
  .site-footer nav {
    display: none !important;
  }

  .legal-head {
    padding-top: 0;
  }

  .summary,
  .callout {
    box-shadow: none;
    break-inside: avoid;
  }

  .clause {
    break-inside: auto;
  }

  .clause h2,
  .clause h3 {
    break-after: avoid;
  }

  a {
    color: var(--text);
    text-decoration: none;
  }

  .clause a[href^='http']::after,
  .clause a[href^='mailto']::after {
    content: ' (' attr(href) ')';
    font-size: 0.85em;
    overflow-wrap: anywhere;
  }
}

.companion-preview:focus-visible,
.companion-preview :focus-visible { outline-color: var(--preview-accent); }

.site-footer .footer-nav a { min-height: 44px; display: inline-flex; align-items: center; }
