/*
 * 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: #f6f5f9;
  --bg-elevated: #ffffff;
  --bg-card: #f0eef4;
  --surface-sheet: #ffffff;
  --border: #e2dfe8;
  --hairline: rgba(20, 22, 29, 0.06);

  --text: #14161d;
  --text-muted: #5b6072;
  --text-faint: #6b7082;

  --friend: #a65a21;
  --friend-deep: #7e3f13;
  --friend-soft: rgba(166, 90, 33, 0.1);
  --friend-glow: rgba(166, 90, 33, 0.22);
  --tutor: #1f5f8f;
  --tutor-deep: #14405f;
  --tutor-soft: rgba(31, 95, 143, 0.1);
  --tutor-glow: rgba(31, 95, 143, 0.22);
  --coach: #1b6e45;
  --coach-deep: #114a2e;
  --coach-soft: rgba(27, 110, 69, 0.1);
  --coach-glow: rgba(27, 110, 69, 0.22);
  --girlfriend: #b03a73;
  --girlfriend-deep: #7b2650;
  --girlfriend-soft: rgba(176, 58, 115, 0.1);
  --girlfriend-glow: rgba(176, 58, 115, 0.22);

  --danger: #b3273a;
  --danger-soft: rgba(179, 39, 58, 0.1);
  --success: #1b6e45;
  --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: #0b0e14;
    --bg-elevated: #141924;
    --bg-card: #1a2030;
    --surface-sheet: #202738;
    --border: #252d3d;
    --hairline: rgba(232, 234, 240, 0.06);

    --text: #e8eaf0;
    --text-muted: #8b93a7;
    --text-faint: #868ea2;

    --friend: #e8a87c;
    --friend-deep: #c97f4e;
    --friend-soft: rgba(232, 168, 124, 0.12);
    --friend-glow: rgba(232, 168, 124, 0.28);
    --tutor: #7cb8e8;
    --tutor-deep: #4a8fc7;
    --tutor-soft: rgba(124, 184, 232, 0.12);
    --tutor-glow: rgba(124, 184, 232, 0.28);
    --coach: #7ce8a8;
    --coach-deep: #4cc17e;
    --coach-soft: rgba(124, 232, 168, 0.12);
    --coach-glow: rgba(124, 232, 168, 0.28);
    --girlfriend: #e87cb8;
    --girlfriend-deep: #c74e91;
    --girlfriend-soft: rgba(232, 124, 184, 0.12);
    --girlfriend-glow: rgba(232, 124, 184, 0.28);

    --danger: #e87c8a;
    --danger-soft: rgba(232, 124, 138, 0.12);
    --success: #7ce8a8;
    --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;
  /* The landing page's header sticks, so an anchor landing at y=0 would land
     underneath it. Measured: 54px on a desktop viewport, and 86px on a phone
     where the nav drops to its own row. Both plus a little air. */
  scroll-padding-top: 66px;
}

@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);
}

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;
}

/* Five items plus a wordmark do not fit a 360px phone. Rather than collapse
   them behind a button — which would need JavaScript this site does not
   have — the nav scrolls sideways, with the bar itself hidden. */
body > .site-header .site-nav {
  max-width: 100%;
  /* `nowrap` is what makes the overflow rule mean anything: the base nav wraps,
     and a wrapping flex row never overflows, so it would silently grow the
     sticky header to two and then three lines instead of scrolling. */
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

body > .site-header .site-nav a {
  white-space: nowrap;
}

body > .site-header .site-nav::-webkit-scrollbar {
  display: none;
}

.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 the orb, and only the orb.
 *
 * ADR 0008 made it the single standalone mark; ADR 0011 gave its halo the four
 * persona accents and put the lowercase wordmark beside it, never inside it.
 * The same ADR lists a four-dot cluster among the rejected directions, which is
 * exactly what used to sit here — so the header and the favicon in the same
 * browser tab were showing two different logos.
 *
 * `/logo.svg` is the orb rebuilt as vector from the geometry in
 * `tools/make_brand_assets.py`, so the header, the favicon and the app icon are
 * now 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 82:49 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);
}

.store-slot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.store-button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  color: var(--text-muted);
  font-weight: 600;
  cursor: not-allowed;
}

.availability {
  color: var(--text-faint);
  font-size: 14px;
}

/*
 * 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;
  animation: portrait-float 5.5s var(--ease-standard) infinite alternate;
}

/*
 * 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;
  animation-delay: -1.2s;
}

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

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

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

@keyframes portrait-float {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-10px);
  }
}

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

  .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;
  }

  .bubbles {
    padding: var(--space-md);
  }

  .thread-caption {
    padding: 0 var(--space-md) var(--space-md);
  }

  .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;
  }

  .store-slot {
    gap: var(--space-sm);
    margin-top: var(--space-lg);
  }

  .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);
}

/*
 * The portraits are 1:1 and arrive in two shapes: two are already circular
 * crops sitting on black, two are full-bleed squares. Clipping to a circle is
 * the one treatment that suits both, because it lands exactly on the existing
 * crop for the first pair and trims corners off the second. No zoom: a square
 * source scaled into a same-ratio box has no overflow for object-position to
 * act on, so a crop would have to be a transform, and that would eat into the
 * black ring the first pair depends on.
 */
.companion .portrait {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
  background: var(--bg-card);
}

.companion .who {
  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;
}

/* 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 0;
}

.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);
}

.principles {
  display: grid;
  grid-template-columns: repeat(2, 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, 0.9fr) minmax(0, 1.1fr);
  gap: var(--space-xl);
  align-items: start;
  margin-top: var(--space-lg);
}

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

/*
 * A chat thread, restated in CSS.
 *
 * Claiming Hinglish support in a paragraph asks the reader to take it on
 * trust; four bubbles show it. The tokens are the app's own — `--radius-bubble`
 * and its tight tail corner, the persona accent for a sent bubble with
 * `--on-accent` ink on top — so this is the real surface at rest, not an
 * artist's impression of it.
 *
 * It is marked up as an ordered list and carries a single `role="img"` with
 * the whole exchange in its label: a screen reader should hear one illustration
 * read out in order, not navigate four list items of untranslated Hinglish.
 */
.thread {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  box-shadow: 0 18px 44px var(--shadow);
  overflow: hidden;
}

.thread-head {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 12px var(--space-lg);
  background: var(--bg-card);
  border-bottom: 1px solid var(--hairline);
}

.thread-head .avatar {
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: var(--radius-pill);
  background: var(--friend);
}

.thread-head[data-persona='tutor'] .avatar {
  background: var(--tutor);
}

.thread-head[data-persona='coach'] .avatar {
  background: var(--coach);
}

.thread-head[data-persona='girlfriend'] .avatar {
  background: var(--girlfriend);
}

.thread-name {
  font-weight: 600;
  font-size: 15px;
}

.bubbles {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
  padding: var(--space-lg);
  margin: 0;
}

.msg {
  max-width: 86%;
  margin: 0;
  padding: 9px 14px;
  font-size: 15px;
  line-height: 1.45;
}

/* Sent. The persona accent, with the ink token that flips with the scheme —
   the accents are pastel on dark and deepened on light, so neither near-black
   nor white is right in both. */
.msg.out {
  align-self: flex-end;
  background: var(--friend);
  color: var(--on-accent);
  border-radius: var(--radius-bubble) var(--radius-bubble) var(--radius-bubble-tail)
    var(--radius-bubble);
}

.msg.in {
  align-self: flex-start;
  background: var(--bg-card);
  color: var(--text);
  border-radius: var(--radius-bubble) var(--radius-bubble) var(--radius-bubble)
    var(--radius-bubble-tail);
}

.thread-caption {
  margin: 0;
  padding: 0 var(--space-lg) var(--space-lg);
  color: var(--text-faint);
  font-size: 13px;
}

.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;
}

/* ---------- the comparison ---------- */

/*
 * Six rows against "the usual approach".
 *
 * Every row has to be a claim this repo can actually stand behind — the
 * Hinglish column is the code-mixed STT model, the voice column is the latency
 * budget the pipeline is measured against, the last column is a rule the
 * persona tests enforce. A comparison table is the easiest place on a site to
 * write something that quietly stops being true, so treat these the way
 * `privacy.html` is treated: if the behaviour changes, this changes with it.
 */
.compare {
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  margin: var(--space-lg) 0 0;
  font-size: 15px;
}

.compare th,
.compare td {
  padding: var(--space-md);
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.compare thead th {
  padding-bottom: var(--space-sm);
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-muted);
  border-bottom-color: transparent;
}

.compare tbody th {
  width: 21%;
  font-size: 16px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
}

/* The second line of a row label: what the row is actually asking. */
.compare tbody th span {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--text-faint);
}

.compare td {
  width: 39.5%;
  color: var(--text-muted);
}

/*
 * Our column is tinted amber, and amber specifically.
 *
 * ADR 0011 reserves the four-colour spectrum for the orb halo and forbids a
 * global brand gradient, so a column that means "Meny" cannot wear all four
 * accents. The orb's core is amber and singular — many people, one product —
 * which makes the warm accent the one honest choice here. It is a flat tint,
 * not a gradient.
 */
.compare .mine {
  background: var(--friend-soft);
  border-left: 1px solid var(--friend-glow);
  border-right: 1px solid var(--friend-glow);
  color: var(--text);
}

.compare thead th.mine {
  color: var(--text);
  font-weight: 600;
  border-top: 1px solid var(--friend-glow);
  border-bottom-color: transparent;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.compare tbody tr:last-child td.mine {
  border-bottom-color: var(--friend-glow);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.fineprint {
  margin-top: var(--space-md);
  color: var(--text-faint);
  font-size: 14px;
}

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

/*
 * <details> rather than a scripted accordion. The site has no JavaScript and
 * this is the one interactive pattern on it, so the element that ships the
 * behaviour in the browser — keyboard, screen reader and find-in-page included
 * — is the whole implementation.
 */
.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;
  }
}
