/* Tera Chat — marketing site.
   Tokens mirror the Mac app's MercuryDesign (Views/MercuryDesignSystem.swift):
   near-black canvas, warm ink, Tera blue, monospaced section labels, and
   theme-constant platform tints. No web fonts and no third-party requests:
   Mac visitors get SF / New York / SF Mono from the system. */

:root {
  --canvas: #030304;
  --canvas-raised: #050507;
  --pane: #07080a;
  --pane-raised: #0b0c10;
  --ink: #f6f4ec;
  --muted: #b0b4bf;
  --faint: #7a7f8f;
  --hairline: rgba(255, 255, 255, 0.105);
  --hairline-strong: rgba(255, 255, 255, 0.18);
  --blue: #71a7ff;
  --blue-deep: #13254a;
  --blue-wash: rgba(113, 167, 255, 0.1);
  --success: #38d97a;

  --imessage: #38d97a;
  --whatsapp: #47d685;
  --instagram: #c778ff;
  --telegram: #4fb0ff;
  --tinder: #ff6b4f;
  --bumble: #ffbd36;
  --hinge: #f285b0;

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", system-ui, sans-serif;
  --serif: "New York", ui-serif, "Iowan Old Style", "Palatino", Georgia, serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --radius: 14px;
  --radius-lg: 22px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1180px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

p {
  margin: 0;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.04;
  text-wrap: balance;
}

em.serif,
.serif {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
}

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

.label {
  font: 600 11px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.label.blue {
  color: var(--blue);
}

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

.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--canvas);
}

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

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font: 600 15px/1 var(--sans);
  letter-spacing: -0.01em;
  transition: transform 160ms var(--ease), background 160ms var(--ease), border-color 160ms var(--ease), box-shadow 160ms var(--ease);
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--ink);
  color: var(--canvas);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3) inset, 0 10px 40px -10px rgba(113, 167, 255, 0.55);
}

.btn-primary:hover {
  background: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4) inset, 0 14px 50px -10px rgba(113, 167, 255, 0.75);
}

.btn-ghost {
  border: 1px solid var(--hairline-strong);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.02);
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.05);
}

.btn-sm {
  height: 36px;
  padding: 0 15px;
  font-size: 14px;
}

.btn svg {
  width: 17px;
  height: 17px;
  flex: none;
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background 200ms var(--ease), border-color 200ms var(--ease), backdrop-filter 200ms var(--ease);
}

.nav.scrolled {
  background: rgba(3, 3, 4, 0.72);
  border-bottom-color: var(--hairline);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 650 17px/1 var(--display);
  letter-spacing: -0.02em;
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--muted);
}

.nav-links a {
  transition: color 140ms var(--ease);
}

.nav-links a:hover {
  color: var(--ink);
}

@media (max-width: 760px) {
  .nav-links {
    display: none;
  }
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-signin {
  font-size: 14px;
  color: var(--muted);
  transition: color 140ms var(--ease);
}

.nav-signin:hover {
  color: var(--ink);
}

/* ---------- "Email me the link for my Mac" (site.js, away from a Mac) ---------- */

.link-dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 24px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-lg);
  background: var(--pane-raised);
  color: var(--ink);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8);
}

.link-dialog::backdrop {
  background: rgba(3, 3, 4, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.link-dialog h2 {
  margin: 0 0 8px;
  font: 650 22px/1.2 var(--display);
  letter-spacing: -0.01em;
}

.link-dialog p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.link-form {
  display: grid;
  gap: 8px;
  margin: 18px 0 12px;
}

.link-form label {
  color: var(--muted);
  font-size: 14px;
}

.link-form input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--hairline-strong);
  border-radius: 12px;
  background: var(--canvas);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

.link-form input:focus {
  border-color: var(--blue);
  outline: 2px solid rgba(113, 167, 255, 0.35);
  outline-offset: 1px;
}

.link-form .btn {
  justify-content: center;
  width: 100%;
  margin-top: 4px;
}

.link-status {
  min-height: 1.4em;
  font-size: 14px;
}

.link-dialog .link-status,
.waitlist .link-status {
  margin: 0;
  color: var(--muted);
}

.link-dialog .link-status.ok,
.waitlist .link-status.ok {
  color: var(--success);
}

/* The phone waitlist on /download/on-your-mac/ (site.js shows it on phones). */
.waitlist {
  width: min(440px, 100%);
  margin: 40px auto 0;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
  text-align: left;
}

.doc .waitlist h2 {
  margin: 0 0 8px;
  font: 650 22px/1.2 var(--display);
  letter-spacing: -0.01em;
  text-align: center;
}

.waitlist p {
  text-align: center;
}

.link-dialog .link-note {
  font-size: 13px;
  color: var(--faint);
}

.link-dialog .link-note a {
  color: var(--blue);
}

.link-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px !important;
}

/* Close stays on the right when it's alone (on a phone, with no "Download anyway"). */
.link-actions .btn {
  margin-left: auto;
}

.link-anyway {
  color: var(--muted);
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Backdrop (port of MercuryCinematicBackdrop) ---------- */

.backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.backdrop svg {
  position: absolute;
  left: 50%;
  top: 0;
  width: 1800px;
  max-width: none;
  height: 100%;
  transform: translateX(-50%);
}

.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 45% at 50% 42%, rgba(113, 167, 255, 0.16), transparent 70%),
    linear-gradient(to bottom, rgba(3, 3, 4, 0.05), rgba(3, 3, 4, 0.4) 55%, var(--canvas));
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: clamp(56px, 10vw, 112px) 0 0;
  text-align: center;
}

.hero > .wrap {
  position: relative;
  z-index: 1;
}

.hero-glyph {
  width: 84px;
  height: 84px;
  margin: 0 auto 28px;
  border-radius: 20px;
  box-shadow: 0 24px 60px -18px rgba(113, 167, 255, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px 7px 10px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  font: 500 13px/1 var(--sans);
  color: var(--muted);
}

.pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(113, 167, 255, 0.16);
}

.hero h1 {
  margin: 22px auto 0;
  max-width: 15ch;
  font-size: clamp(44px, 7.4vw, 88px);
}

.hero h1 .serif {
  color: var(--blue);
}

.hero-sub {
  max-width: 620px;
  margin: 24px auto 0;
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.55;
  color: var(--muted);
  text-wrap: pretty;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
}

.fine {
  margin-top: 16px;
  font: 500 12px/1.5 var(--mono);
  color: var(--faint);
  letter-spacing: 0.02em;
}

/* ---------- App window mockup ---------- */

.stage {
  position: relative;
  margin: clamp(56px, 8vw, 88px) auto 0;
  max-width: 1120px;
  perspective: 2400px;
}

.window {
  position: relative;
  border-radius: 16px;
  background: var(--canvas-raised);
  border: 1px solid var(--hairline-strong);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.6),
    0 40px 120px -30px rgba(0, 0, 0, 0.9),
    0 30px 140px -40px rgba(113, 167, 255, 0.45);
  overflow: hidden;
  text-align: left;
  transform: rotateX(8deg);
  transform-origin: 50% 0;
  transition: transform 900ms var(--ease);
}

.stage.in .window {
  transform: rotateX(0deg);
}

.titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border-bottom: 1px solid var(--hairline);
  background: var(--canvas);
}

.lights {
  display: flex;
  gap: 8px;
}

.lights i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #3a3b40;
}

.lights i:nth-child(1) {
  background: #ff5f57;
}

.lights i:nth-child(2) {
  background: #febc2e;
}

.lights i:nth-child(3) {
  background: #28c840;
}

.titlebar .title {
  flex: 1;
  text-align: center;
  font: 600 12px/1 var(--sans);
  color: var(--faint);
  margin-right: 52px;
}

.app {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 280px;
  height: 560px;
}

.app-list {
  border-right: 1px solid var(--hairline);
  background: var(--canvas-raised);
  padding: 14px 10px;
  overflow: hidden;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 10px;
  margin: 0 4px 12px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--faint);
  font-size: 13px;
}

.search kbd {
  margin-left: auto;
  font: 500 11px/1 var(--mono);
  color: var(--faint);
  padding: 3px 5px;
  border-radius: 5px;
  border: 1px solid var(--hairline);
}

.filters {
  display: flex;
  gap: 6px;
  margin: 0 4px 10px;
  flex-wrap: wrap;
}

.filters span {
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  font-size: 11.5px;
  color: var(--muted);
}

.filters span.on {
  border-color: var(--ink);
  color: var(--ink);
}

.row {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 9px 8px;
  border-radius: 10px;
}

.row.sel {
  background: rgba(113, 167, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(113, 167, 255, 0.28);
}

.av {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 650 14px/1 var(--sans);
  color: var(--ink);
  background: linear-gradient(145deg, #2a2d36, #15171c);
}

.av::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--p, var(--faint));
  border: 2px solid var(--canvas-raised);
}

.row b {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row small {
  display: block;
  font-size: 12.5px;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row time {
  align-self: start;
  margin-top: 3px;
  font: 500 11px/1 var(--mono);
  color: var(--faint);
}

.row .unread {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  margin: 6px 0 0 auto;
}

.app-thread {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--canvas);
}

.thread-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--hairline);
}

.thread-head b {
  font-size: 14px;
}

.thread-head small {
  display: block;
  font: 500 11px/1.3 var(--mono);
  color: var(--faint);
}

.bubbles {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 22px;
  overflow: hidden;
}

.b {
  max-width: 72%;
  padding: 9px 13px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.45;
  background: var(--pane-raised);
  border: 1px solid var(--hairline);
  color: var(--ink);
}

.b.me {
  align-self: flex-end;
  background: var(--blue);
  border-color: transparent;
  color: #06101f;
}

.day {
  align-self: center;
  font: 500 10.5px/1 var(--mono);
  letter-spacing: 0.1em;
  color: var(--faint);
  text-transform: uppercase;
  margin: 6px 0;
}

.composer {
  margin: 0 18px 16px;
  border: 1px solid var(--hairline-strong);
  border-radius: 14px;
  background: var(--pane);
  padding: 10px 12px;
}

.drafts {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.drafts span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(113, 167, 255, 0.35);
  background: var(--blue-wash);
  color: #cfe0ff;
  font-size: 12px;
}

.drafts span:first-child::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
}

.composer p {
  font-size: 13.5px;
  color: var(--ink);
}

.composer p .caret {
  display: inline-block;
  width: 1.5px;
  height: 15px;
  margin-left: 1px;
  vertical-align: -2px;
  background: var(--blue);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.app-dossier {
  border-left: 1px solid var(--hairline);
  background: var(--canvas-raised);
  padding: 18px 16px;
  overflow: hidden;
}

.app-dossier .label {
  display: block;
  margin-bottom: 12px;
}

.score {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
}

.score b {
  font: 650 34px/1 var(--display);
  letter-spacing: -0.03em;
}

.score small {
  font-size: 12px;
  color: var(--success);
}

.meter {
  margin-bottom: 12px;
}

.meter div {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 5px;
}

.meter div span:last-child {
  font-family: var(--mono);
  color: var(--ink);
}

.meter i {
  display: block;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.meter i::after {
  content: "";
  display: block;
  height: 100%;
  width: var(--v);
  border-radius: inherit;
  background: var(--ink);
}

.card {
  margin-top: 16px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--hairline);
  background: var(--pane);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

.card strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 12.5px;
}

@media (max-width: 1080px) {
  .app {
    grid-template-columns: 260px minmax(0, 1fr);
  }
  .app-dossier {
    display: none;
  }
}

@media (max-width: 720px) {
  .app {
    grid-template-columns: minmax(0, 1fr);
    height: 470px;
  }
  .app-list {
    display: none;
  }
  .titlebar .title {
    margin-right: 0;
  }
}

/* ---------- Platforms ---------- */

.platforms {
  padding: clamp(64px, 9vw, 104px) 0 0;
  text-align: center;
}

.platform-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

.platform {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.02);
  font-size: 15px;
  font-weight: 550;
}

.platform small {
  font: 600 10px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 4px 6px;
  border-radius: 5px;
  border: 1px solid var(--hairline);
}

.platform i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--p);
  box-shadow: 0 0 14px var(--p);
}

/* ---------- Sections ---------- */

section {
  position: relative;
}

.section {
  padding: clamp(88px, 12vw, 148px) 0 0;
}

.section-head {
  max-width: 760px;
}

.section-head.center {
  margin: 0 auto;
  text-align: center;
}

.section-head h2 {
  margin-top: 16px;
  font-size: clamp(34px, 5vw, 58px);
}

.section-head p {
  margin-top: 18px;
  font-size: 18px;
  color: var(--muted);
  text-wrap: pretty;
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
  padding-top: clamp(72px, 9vw, 112px);
}

.feature.flip .feature-copy {
  order: 2;
}

.feature-copy h3 {
  margin-top: 14px;
  font-size: clamp(28px, 3.4vw, 40px);
}

.feature-copy > p {
  margin-top: 16px;
  font-size: 17px;
  color: var(--muted);
  text-wrap: pretty;
}

.ticks {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.ticks li {
  position: relative;
  padding-left: 28px;
  font-size: 15px;
  color: var(--ink);
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--blue-wash);
  box-shadow: inset 0 0 0 1px rgba(113, 167, 255, 0.45);
}

.ticks li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  width: 6px;
  height: 3.5px;
  border-left: 1.6px solid var(--blue);
  border-bottom: 1.6px solid var(--blue);
  transform: rotate(-45deg);
}

.ticks li span {
  color: var(--muted);
}

.vignette {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--hairline);
  background:
    radial-gradient(ellipse 80% 60% at 70% 0%, rgba(113, 167, 255, 0.12), transparent 70%),
    var(--canvas-raised);
  padding: clamp(18px, 3vw, 32px);
  overflow: hidden;
}

@media (max-width: 880px) {
  .feature {
    grid-template-columns: minmax(0, 1fr);
  }
  .feature.flip .feature-copy {
    order: 0;
  }
}

/* Vignette internals */

.v-stack {
  display: grid;
  gap: 10px;
}

.v-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--hairline);
  background: var(--pane);
}

.v-row .av {
  width: 34px;
  height: 34px;
  font-size: 13px;
}

.v-row .av::after {
  border-color: var(--pane);
}

.v-row b {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.v-row small {
  display: block;
  font-size: 12.5px;
  color: var(--faint);
}

.tag {
  font: 600 10.5px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid var(--hairline-strong);
  color: var(--muted);
  white-space: nowrap;
}

.tag.blue {
  border-color: rgba(113, 167, 255, 0.45);
  color: var(--blue);
}

.v-bubble {
  max-width: 85%;
  padding: 11px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  border: 1px solid var(--hairline);
  background: var(--pane-raised);
}

.v-bubble.me {
  margin-left: auto;
  background: var(--blue);
  border-color: transparent;
  color: #06101f;
}

.v-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--blue-wash);
  border: 1px solid rgba(113, 167, 255, 0.3);
  font-size: 13.5px;
  color: #d6e4ff;
}

.v-note .label {
  flex: none;
  margin-top: 3px;
  color: var(--blue);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.stat {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--hairline);
  background: var(--pane);
}

.stat b {
  display: block;
  margin-top: 8px;
  font: 650 26px/1 var(--display);
  letter-spacing: -0.03em;
}

.stat small {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--faint);
}

.bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 110px;
  margin-top: 14px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--hairline);
  background: var(--pane);
}

.bars i {
  flex: 1;
  height: var(--h);
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(to top, rgba(113, 167, 255, 0.25), var(--blue));
  transform-origin: bottom;
  transform: scaleY(0.05);
  transition: transform 900ms var(--ease);
}

.in .bars i {
  transform: scaleY(1);
}

.bars i:nth-child(odd) {
  background: linear-gradient(to top, rgba(246, 244, 236, 0.12), rgba(246, 244, 236, 0.7));
}

@media (max-width: 520px) {
  .stat-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Grid of smaller features ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 56px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--hairline);
  background: var(--hairline);
}

.cell {
  padding: 28px 26px 30px;
  background: var(--canvas-raised);
  transition: background 200ms var(--ease);
}

.cell:hover {
  background: var(--pane);
}

.cell svg {
  width: 22px;
  height: 22px;
  color: var(--blue);
}

.cell h3 {
  margin-top: 18px;
  font-size: 18px;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.cell p {
  margin-top: 8px;
  font-size: 14.5px;
  color: var(--muted);
}

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

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

/* ---------- Privacy ---------- */

.privacy {
  margin-top: clamp(88px, 12vw, 148px);
  padding: clamp(64px, 9vw, 112px) 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  background:
    radial-gradient(ellipse 50% 70% at 50% 100%, rgba(113, 167, 255, 0.12), transparent 70%),
    var(--canvas-raised);
  overflow: hidden;
}

.privacy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 56px;
}

.p-card {
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--hairline);
  background: rgba(3, 3, 4, 0.6);
}

.p-card .num {
  font: 650 40px/1 var(--display);
  letter-spacing: -0.04em;
}

.p-card h3 {
  margin-top: 12px;
  font-size: 17px;
  letter-spacing: -0.015em;
}

.p-card p {
  margin-top: 8px;
  font-size: 14.5px;
  color: var(--muted);
}

@media (max-width: 860px) {
  .privacy-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Pricing ---------- */

.plans {
  display: grid;
  grid-template-columns: 1.15fr repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 56px;
}

.plan {
  display: flex;
  flex-direction: column;
  padding: 26px 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--hairline);
  background: var(--canvas-raised);
}

/* The plan we lead with (AI Pro): the glow and a tag. The free app stays quiet. */
.plan.featured {
  position: relative;
  border-color: rgba(113, 167, 255, 0.55);
  background:
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(113, 167, 255, 0.18), transparent 70%),
    var(--canvas-raised);
  box-shadow: 0 18px 50px -24px rgba(113, 167, 255, 0.55);
}

/* Sits on the card's top edge, so the featured card's price lines up with the others. */
.plan-badge {
  position: absolute;
  top: -11px;
  left: 22px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--blue);
  color: #06101f;
  font: 650 11px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.plan h3 {
  font-size: 18px;
  letter-spacing: -0.015em;
}

.plan .price {
  margin-top: 16px;
  font: 650 42px/1 var(--display);
  letter-spacing: -0.04em;
}

.plan .price small {
  font: 500 14px/1 var(--sans);
  letter-spacing: 0;
  color: var(--faint);
}

.plan > p {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
  min-height: 3em;
}

.plan ul {
  list-style: none;
  margin: 20px 0 24px;
  padding: 18px 0 0;
  border-top: 1px solid var(--hairline);
  display: grid;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
}

.plan ul li::before {
  content: "—";
  margin-right: 8px;
  color: var(--faint);
}

.plan .btn {
  margin-top: auto;
  justify-content: center;
}

.plan .soon {
  margin-top: auto;
  text-align: center;
  font: 600 11px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 14px 0;
  border-radius: 999px;
  border: 1px dashed var(--hairline-strong);
}

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

@media (max-width: 560px) {
  .plans {
    grid-template-columns: minmax(0, 1fr);
  }
}

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

.faq {
  max-width: 820px;
  margin: 48px auto 0;
  border-top: 1px solid var(--hairline);
}

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

.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 22px 2px;
  cursor: pointer;
  list-style: none;
  font: 600 17px/1.35 var(--sans);
  letter-spacing: -0.01em;
}

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

.faq summary::after {
  content: "+";
  flex: none;
  font: 400 22px/1 var(--mono);
  color: var(--faint);
  transition: transform 200ms var(--ease);
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  padding: 0 2px 22px;
  color: var(--muted);
  font-size: 15.5px;
  max-width: 70ch;
}

/* ---------- Final CTA ---------- */

.final {
  position: relative;
  margin-top: clamp(96px, 13vw, 160px);
  padding: clamp(80px, 11vw, 140px) 0;
  text-align: center;
  overflow: hidden;
  border-top: 1px solid var(--hairline);
}

.final > .wrap {
  position: relative;
  z-index: 1;
}

.final h2 {
  font-size: clamp(40px, 6.4vw, 76px);
  max-width: 14ch;
  margin: 22px auto 0;
}

.final p {
  margin: 20px auto 0;
  max-width: 520px;
  font-size: 18px;
  color: var(--muted);
}

.final p.fine {
  margin-top: 16px;
  font-size: 12px;
  color: var(--faint);
}

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--hairline);
  padding: 40px 0 56px;
  font-size: 14px;
  color: var(--faint);
}

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.foot a:hover {
  color: var(--ink);
}

/* ---------- Plain document pages (privacy, 404) ---------- */

.doc {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) var(--gutter) 96px;
}

.doc h1 {
  font-size: clamp(36px, 5vw, 52px);
  margin-top: 14px;
}

.doc h2 {
  margin-top: 48px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.doc p,
.doc li {
  margin-top: 14px;
  font-size: 16.5px;
  color: var(--muted);
}

.doc ul {
  padding-left: 20px;
}

.doc strong {
  color: var(--ink);
  font-weight: 600;
}

.doc a:not(.btn) {
  color: var(--blue);
}

.doc-center {
  min-height: 80vh;
  display: grid;
  place-content: center;
  text-align: center;
}

.doc-icon {
  margin: 0 auto 24px;
  border-radius: 16px;
}

.doc-cta {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* ---------- Motion ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.no-js .reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal,
  .window,
  .bars i {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
  .composer p .caret {
    animation: none;
  }
}

/* ---------- Data hooks (strict CSP: no inline style attributes) ---------- */

.p-imessage { --p: var(--imessage); }
.p-whatsapp { --p: var(--whatsapp); }
.p-instagram { --p: var(--instagram); }
.p-telegram { --p: var(--telegram); }
.p-tinder { --p: var(--tinder); }
.p-bumble { --p: var(--bumble); }
.p-hinge { --p: var(--hinge); }

.v-92 { --v: 92%; }
.v-78 { --v: 78%; }
.v-64 { --v: 64%; }
.v-41 { --v: 41%; }

.bars i:nth-child(1) { --h: 38%; }
.bars i:nth-child(2) { --h: 52%; }
.bars i:nth-child(3) { --h: 44%; }
.bars i:nth-child(4) { --h: 70%; }
.bars i:nth-child(5) { --h: 58%; }
.bars i:nth-child(6) { --h: 82%; }
.bars i:nth-child(7) { --h: 66%; }
.bars i:nth-child(8) { --h: 90%; }
.bars i:nth-child(9) { --h: 74%; }
.bars i:nth-child(10) { --h: 96%; }
.bars i:nth-child(11) { --h: 80%; }
.bars i:nth-child(12) { --h: 100%; }

.card-gap {
  margin-top: 14px;
}

/* ---------- Sales site additions (2026-10-07) ---------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.shot {
  margin: 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--hairline-strong);
  background: var(--canvas-raised);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.6),
    0 40px 120px -30px rgba(0, 0, 0, 0.9),
    0 30px 140px -40px rgba(113, 167, 255, 0.35);
}

.shot picture,
.walkthrough picture {
  display: block;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
}

.stage .shot {
  max-width: 1120px;
  margin: 0 auto;
}

.walkthrough {
  display: grid;
  max-width: 1120px;
  margin: 40px auto 0;
}

.walkthrough figure {
  grid-area: 1 / 1;
  margin: 0;
  opacity: 0;
  transition: opacity 600ms var(--ease);
}

.walkthrough figure.on {
  opacity: 1;
}

.walkthrough img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--hairline-strong);
  background: var(--canvas-raised);
}

.walkthrough figcaption {
  margin-top: 14px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.walkthrough-toggle {
  grid-area: 2 / 1;
  justify-self: center;
  margin-top: 14px;
  padding: 8px 18px;
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font: 500 13px/1 var(--sans);
  cursor: pointer;
  transition: color 160ms var(--ease), background-color 160ms var(--ease), border-color 160ms var(--ease);
}

.walkthrough-toggle:hover {
  color: var(--ink);
  background: var(--blue-wash);
}

.walkthrough-toggle[data-paused="true"] {
  color: var(--blue);
  border-color: var(--blue);
}

.walkthrough-toggle:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

/* Nothing rotates without JS, or with reduced motion (site.js sets hidden),
   so there is nothing to pause. */
.walkthrough-toggle[hidden],
.no-js .walkthrough-toggle {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .walkthrough figure,
  .walkthrough-toggle {
    transition: none;
  }
}

.link-arrow {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
}

.link-arrow::after {
  content: " →";
}

.early-access {
  margin-top: 14px;
}

.ea-row {
  display: flex;
  gap: 8px;
}

.ea-row input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--hairline-strong);
  background: var(--canvas);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}

.ea-row input:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.ea-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.ea-status {
  min-height: 1.4em;
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.ea-status.ok {
  color: var(--success);
}

.plan .soon + .early-access {
  margin-top: 12px;
}

.plans-single {
  grid-template-columns: minmax(0, 520px);
  justify-content: center;
}

@media (max-width: 520px) {
  .ea-row {
    flex-direction: column;
  }
}

/* In a plan card with an early-access form, the "Coming soon" pill sits under
   the feature list and the form takes the bottom of the card. */
.plan:has(.early-access) .soon {
  margin-top: 20px;
}

.plan:has(.early-access) .early-access {
  margin-top: auto;
}

/* Plan cards are narrow in the four-column grid: stack the email field and button. */
.plan .ea-row {
  flex-direction: column;
}

.plan .ea-row .btn {
  justify-content: center;
}

/* ---------- Paid plans ---------- */

/* Elements with the hidden attribute stay hidden even when a class (like .btn)
   sets display. */
[hidden] {
  display: none !important;
}

/* Fine print under a plan's button. */
.plan > p.trial-fine {
  min-height: 0;
  margin-top: 10px;
  text-align: center;
  font-size: 12px;
  color: var(--faint);
}

/* A link inside that fine print ("Or pay yearly") has to read as a link. The
   site is dark only, and --blue is well above 4.5:1 on the card background. */
.plan > p.trial-fine a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Welcome page: the new Tera Chat AI key. */
.welcome-key {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin: 18px auto 6px;
}

.welcome-key code {
  font: 600 14px/1.4 var(--mono);
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--hairline-strong);
  background: var(--canvas-raised);
  word-break: break-all;
  user-select: all;
}

/* Without JavaScript the key never arrives, so don't promise it (the page has a
   <noscript> note instead). */
.no-js [data-welcome-status] {
  display: none;
}

.welcome-hint,
.welcome-note {
  font-size: 13px;
  color: var(--faint);
}

.welcome-note {
  margin-top: 18px;
}

/* ---------- Blog: index, topic pages and cards ---------- */

.blog {
  padding-bottom: 40px;
}

.blog-head {
  padding-top: clamp(40px, 7vw, 88px);
  max-width: 860px;
}

.blog-head h1 {
  margin-top: 16px;
  font-size: clamp(38px, 6vw, 66px);
}

.blog-head > p {
  margin-top: 18px;
  font-size: 18px;
  color: var(--muted);
  max-width: 640px;
  text-wrap: pretty;
}

.topic-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.topic-pills a {
  padding: 8px 14px;
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted);
  transition: color 140ms var(--ease), border-color 140ms var(--ease);
}

.topic-pills a:hover {
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.32);
}

.blog-section {
  margin-top: clamp(56px, 8vw, 88px);
}

.blog-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.blog-section-title {
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.025em;
}

.blog-section-intro {
  margin-top: 10px;
  color: var(--muted);
  max-width: 680px;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--canvas-raised);
  transition: border-color 160ms var(--ease), transform 160ms var(--ease), background 160ms var(--ease);
}

.post-card:hover {
  border-color: var(--hairline-strong);
  background: var(--pane);
  transform: translateY(-2px);
}

.post-card h3 {
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.post-card p {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.5;
}

.post-meta {
  margin-top: auto;
  font: 500 12px/1 var(--mono);
  color: var(--faint);
}

.guides-more {
  margin-top: 28px;
  text-align: center;
}

/* ---------- Blog: article ---------- */

.article-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px) var(--gutter) 40px;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--faint);
}

.crumbs a:hover {
  color: var(--ink);
}

.blog-head .crumbs {
  margin-bottom: 18px;
}

.article-head {
  margin-top: 28px;
}

.article-head h1 {
  margin-top: 14px;
  font-size: clamp(34px, 5.2vw, 54px);
  line-height: 1.06;
}

.article-dek {
  margin-top: 18px;
  font-size: 19px;
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}

.article-meta {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13.5px;
  color: var(--faint);
}

.article-meta a {
  color: var(--muted);
}

.takeaways {
  margin-top: 32px;
  padding: 22px 24px;
  border: 1px solid rgba(113, 167, 255, 0.28);
  border-radius: var(--radius);
  background: var(--blue-wash);
}

.takeaways h2,
.toc h2 {
  font: 600 11px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}

.takeaways ul {
  margin: 14px 0 0;
  padding-left: 20px;
}

.takeaways li {
  margin-top: 8px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
}

.toc {
  margin-top: 24px;
  padding: 20px 24px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}

.toc h2 {
  color: var(--faint);
}

.toc ol {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--faint);
}

.toc li {
  margin-top: 6px;
  font-size: 15px;
}

.toc a {
  color: var(--muted);
}

.toc a:hover {
  color: var(--ink);
}

.prose {
  margin-top: 40px;
  font-size: 17.5px;
  line-height: 1.72;
  color: #dcdde3;
}

.prose > * + * {
  margin-top: 1.1em;
}

.prose h2 {
  margin-top: 2.2em;
  font-size: clamp(26px, 3.4vw, 32px);
  line-height: 1.15;
  color: var(--ink);
  scroll-margin-top: 88px;
}

.prose h3 {
  margin-top: 1.8em;
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ink);
  scroll-margin-top: 88px;
}

.prose h4 {
  margin: 1.6em 0 0;
  font: 650 17px/1.3 var(--sans);
  color: var(--ink);
}

.prose p {
  text-wrap: pretty;
}

.prose a {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-color: rgba(113, 167, 255, 0.35);
  text-underline-offset: 3px;
}

.prose a:hover {
  text-decoration-color: var(--blue);
}

.prose strong {
  color: var(--ink);
  font-weight: 650;
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

.prose li + li {
  margin-top: 0.45em;
}

.prose li > ul,
.prose li > ol {
  margin-top: 0.45em;
}

.prose blockquote {
  margin-left: 0;
  margin-right: 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--blue);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  font-style: italic;
}

.prose code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--pane-raised);
  border: 1px solid var(--hairline);
  font: 500 0.86em/1.4 var(--mono);
  color: var(--ink);
}

.prose pre {
  padding: 16px 18px;
  overflow-x: auto;
  border-radius: var(--radius);
  background: var(--pane-raised);
  border: 1px solid var(--hairline);
}

.prose pre code {
  padding: 0;
  border: 0;
  background: none;
}

.prose hr {
  margin: 2.4em 0;
  border: 0;
  border-top: 1px solid var(--hairline);
}

.prose img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--hairline-strong);
}

.prose kbd {
  padding: 1px 6px;
  border: 1px solid var(--hairline-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  font: 500 0.82em/1.4 var(--mono);
}

/* A wide table scrolls sideways on a phone instead of widening the page. */
.prose table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  font-size: 15px;
  line-height: 1.5;
}

.prose th,
.prose td {
  padding: 11px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--hairline);
}

.prose th {
  background: var(--pane);
  color: var(--ink);
  font-weight: 650;
  white-space: nowrap;
}

.prose tr:last-child td {
  border-bottom: 0;
}

.article-faq {
  margin-top: 64px;
}

.article-faq > h2 {
  font-size: clamp(26px, 3.4vw, 32px);
}

.article-faq .faq {
  margin-top: 20px;
  max-width: none;
}

.article-cta {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  margin-top: 64px;
  padding: 28px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(113, 167, 255, 0.16), transparent 60%),
    var(--canvas-raised);
}

.article-cta img {
  border-radius: 14px;
}

.article-cta h2 {
  font-size: clamp(24px, 3vw, 30px);
}

.article-cta p {
  margin-top: 10px;
  color: var(--muted);
}

.article-cta .cta-row {
  margin-top: 20px;
  justify-content: flex-start;
}

.article-cta .fine {
  margin-top: 12px;
  text-align: left;
}

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

.article-foot {
  margin-top: 28px;
  font-size: 13.5px;
  color: var(--faint);
}

.article-foot a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.related {
  margin-top: 72px;
}

.related > h2 {
  font-size: clamp(24px, 3vw, 30px);
}

/* ---------- About page ---------- */

.facts {
  margin: 20px 0 0;
  border-top: 1px solid var(--hairline);
}

.facts > div {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline);
}

.facts dt {
  font-weight: 600;
  color: var(--ink);
}

.facts dd {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 560px) {
  .facts > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

.about-cta {
  justify-content: flex-start;
  margin-top: 32px;
}

/* ---------- Footer guide topics ---------- */

.foot-guides {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 14px 22px;
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--hairline);
}

.foot-guides nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}

.foot-guides a:hover {
  color: var(--ink);
}

/* Screenshots inside articles: <figure class="shot"><img …><figcaption>…</figcaption></figure> */
.prose figure {
  margin: 2em 0;
}

.prose .shot img {
  border: 0;
  border-radius: 0;
}

.prose figcaption {
  padding: 12px 16px;
  border-top: 1px solid var(--hairline);
  font-size: 13.5px;
  color: var(--faint);
}

.foot-legal {
  margin-top: 20px;
  font-size: 12px;
  color: var(--faint);
}

/* ---------- Free tools (/tools/, public/chat-tools.js) ---------- */

.tool-page .crumbs {
  margin-bottom: 18px;
}

.tool-lede {
  font-size: 18px;
  color: var(--muted);
}

.tool-list {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: grid;
  gap: 14px;
}

.doc .tool-list li {
  margin: 0;
  padding: 20px 22px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--pane);
}

.tool-list p {
  margin: 6px 0 0;
}

.chat-tool {
  margin-top: 32px;
}

.drop {
  position: relative;
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
  padding: 36px 24px;
  border: 1.5px dashed var(--hairline-strong);
  border-radius: var(--radius-lg);
  background: var(--pane);
  cursor: pointer;
  transition: border-color 160ms var(--ease), background 160ms var(--ease);
}

.drop:hover,
.drop.over,
.drop:focus-within {
  border-color: var(--blue);
  background: var(--blue-wash);
}

.drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.drop strong {
  font-size: 18px;
  color: var(--ink);
}

.drop span {
  max-width: 520px;
  color: var(--muted);
  font-size: 14.5px;
}

.drop small {
  font: 500 12px/1.5 var(--mono);
  color: var(--success);
}

.tool-status {
  min-height: 1.5em;
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.tool-status.error {
  color: #ff8a80;
}

.picker {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}

.chat-tool select,
.chat-tool input[type="search"],
.date-filters select {
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--pane-raised);
  border: 1px solid var(--hairline-strong);
  border-radius: 10px;
  padding: 8px 10px;
  max-width: 100%;
}

.results {
  margin-top: 28px;
}

.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--pane);
}

.tabs button {
  font: inherit;
  font-size: 14px;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 9px;
  padding: 8px 14px;
  cursor: pointer;
}

.tabs button[aria-selected="true"] {
  color: var(--ink);
  background: var(--pane-raised);
  box-shadow: 0 0 0 1px var(--hairline-strong);
}

.result-head {
  margin-top: 24px;
}

.doc .result-head h3 {
  margin: 0;
  font-size: 24px;
}

.doc .result-head p {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--faint);
}

.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.stat-cards > div {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--pane);
}

.stat-cards span {
  font: 500 11px/1.4 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
}

.stat-cards strong {
  font-size: 22px;
  color: var(--ink);
}

.stat-cards small {
  font-size: 12.5px;
  color: var(--muted);
}

.period {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--muted);
}

/* Wrapped: the year-in-review card on /tools/whatsapp-wrapped/. Its picture
   (wrappedCanvas in chat-tools.js) uses the same colors. */
.wrapped {
  margin-top: 24px;
  padding: 28px clamp(18px, 4vw, 32px);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--canvas) 0%, var(--blue-deep) 100%);
}

.doc .wrapped-kicker {
  margin: 0;
  font: 600 13px/1.4 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
}

.doc .wrapped h3 {
  margin: 6px 0 0;
  font-size: clamp(24px, 5vw, 34px);
  overflow-wrap: anywhere;
}

.wrapped-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.wrapped-tiles > div {
  display: grid;
  gap: 2px;
  align-content: start;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
}

.wrapped-tiles > .wide {
  grid-column: 1 / -1;
}

.wrapped-tiles span {
  font: 500 11px/1.4 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
}

.wrapped-tiles strong {
  font-size: 21px;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.wrapped-tiles .wide strong {
  font-size: 40px;
}

.wrapped-tiles small {
  font-size: 12.5px;
  color: var(--muted);
}

.doc .wrapped-foot {
  margin: 18px 0 0;
  font: 500 12px/1.5 var(--mono);
  color: var(--faint);
}

.doc .wrapped-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  margin: 14px 0 0;
}

.wrapped-actions small {
  font-size: 13px;
  color: var(--muted);
}

.doc .findings {
  margin: 20px 0 0;
  padding: 16px 20px 16px 36px;
  border-radius: var(--radius);
  background: var(--blue-wash);
}

.doc .findings li {
  margin: 4px 0;
  color: var(--ink);
}

.doc .chat-tool h4 {
  margin: 32px 0 10px;
  font-size: 16px;
  color: var(--ink);
}

.table-scroll {
  overflow-x: auto;
}

.people {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  white-space: nowrap;
}

.people th,
.people td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--hairline);
  text-align: left;
}

.people thead th {
  font: 500 11px/1.4 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
}

.people tbody th {
  color: var(--ink);
  font-weight: 600;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.people td {
  color: var(--muted);
}

.share {
  display: inline-block;
  width: 56px;
  height: 6px;
  border-radius: 3px;
  background: var(--hairline);
  vertical-align: middle;
}

.share i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--blue);
}

.heat {
  border-collapse: separate;
  border-spacing: 3px;
  font: 500 10px/1 var(--mono);
  color: var(--faint);
}

.heat th {
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
  padding-right: 4px;
}

.heat thead th {
  height: 14px;
  vertical-align: bottom;
}

.heat td {
  width: 18px;
  min-width: 14px;
  height: 18px;
  border-radius: 4px;
}

.heat .h0 { background: rgba(255, 255, 255, 0.04); }
.heat .h1 { background: rgba(113, 167, 255, 0.18); }
.heat .h2 { background: rgba(113, 167, 255, 0.34); }
.heat .h3 { background: rgba(113, 167, 255, 0.52); }
.heat .h4 { background: rgba(113, 167, 255, 0.72); }
.heat .h5 { background: var(--blue); }

.months {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 120px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--hairline);
}

.months span {
  flex: 1 1 0;
  min-width: 2px;
  height: 100%;
  display: flex;
  align-items: flex-end;
}

.months i {
  display: block;
  width: 100%;
  border-radius: 2px 2px 0 0;
  background: var(--blue);
}

.doc .months-axis {
  display: flex;
  justify-content: space-between;
  margin: 6px 0 0;
  font: 500 11px/1.4 var(--mono);
  color: var(--faint);
}

.tops {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0 32px;
}

.doc .tops ol {
  margin: 0;
  padding-left: 22px;
}

.doc .tops li {
  margin: 3px 0;
}

.tops li span {
  color: var(--ink);
}

.tops li small {
  margin-left: 8px;
  color: var(--faint);
}

.tops ol.emoji span {
  font-size: 18px;
}

.chat-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  margin: 24px 0 14px;
  font-size: 14px;
  color: var(--muted);
}

.chat-controls input[type="search"] {
  flex: 1 1 180px;
}

.print-head,
.print-foot {
  display: none;
}

.bubbles {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.bubbles .day {
  align-self: center;
  margin: 14px 0 4px;
  font: 500 11px/1.4 var(--mono);
  color: var(--faint);
}

.bubble {
  align-self: flex-start;
  max-width: 80%;
  padding: 8px 12px 6px;
  border: 1px solid var(--hairline);
  border-radius: 16px 16px 16px 6px;
  background: var(--pane-raised);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.bubble.me {
  align-self: flex-end;
  border-radius: 16px 16px 6px 16px;
  background: var(--blue-deep);
  border-color: rgba(113, 167, 255, 0.3);
}

.bubble b {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
}

.bubble em {
  color: var(--muted);
}

.bubble time {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--faint);
  text-align: right;
}

.bubble mark {
  background: rgba(255, 214, 102, 0.35);
  color: inherit;
  border-radius: 3px;
}

.results > .btn,
[data-panel="chat"] > .btn {
  margin-top: 16px;
}

.tool-guide {
  margin-top: 64px;
}

.doc .tool-guide h3 {
  margin-top: 28px;
  font-size: 18px;
}

.doc .tool-guide code {
  font: 500 0.9em var(--mono);
}

.tool-cta {
  margin-top: 56px;
  padding: 28px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--pane);
  text-align: center;
}

.doc .tool-cta h2 {
  margin-top: 0;
}

.tool-cta .cta-row {
  margin-top: 20px;
}

/* One page per network (/whatsapp/, /imessage/…: src/pages/[network].astro) */
.net-page .crumbs {
  margin-bottom: 18px;
}

.net-cta {
  justify-content: flex-start;
  margin-top: 24px;
}

.net-shot {
  margin-top: 36px;
}

.net-steps {
  padding-left: 22px;
}

/* Date idea generator (/tools/date-ideas/) */
.date-tool {
  margin-top: 28px;
}

.date-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 12px;
  align-items: end;
  padding: 18px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--pane);
}

.date-filters label {
  display: grid;
  gap: 6px;
  font: 500 11px/1.4 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
}

.date-filters select {
  width: 100%;
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--sans);
}

.date-filters .btn {
  justify-content: center;
}

@media (max-width: 600px) {
  .date-filters .btn {
    grid-column: 1 / -1;
  }
}

.date-pick {
  margin-top: 16px;
  padding: 22px;
  border: 1px solid rgba(113, 167, 255, 0.35);
  border-radius: var(--radius-lg);
  background: var(--blue-wash);
}

.doc .date-pick-label {
  margin: 0;
  font: 500 11px/1.4 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--blue);
}

.doc .date-pick h2 {
  margin-top: 6px;
  font-size: 24px;
}

.doc .date-pick p {
  margin-top: 8px;
}

.date-invite {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
}

.doc .date-invite p {
  margin: 0;
  flex: 1 1 260px;
  color: var(--ink);
}

.date-invite span {
  display: block;
  font-size: 13px;
  color: var(--faint);
}

.date-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
  margin-top: 18px;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.doc .date-list li {
  margin: 0;
  padding: 16px 18px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--pane);
  scroll-margin-top: 90px;
}

.date-list li[hidden] {
  display: none;
}

.date-list li.picked {
  border-color: rgba(113, 167, 255, 0.6);
}

.doc .date-list h3 {
  margin: 0;
  font-size: 16px;
  color: var(--ink);
}

.doc .date-list p {
  margin-top: 6px;
  font-size: 14.5px;
}

.doc .date-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: var(--faint);
}

.date-list .date-tags span {
  padding: 2px 8px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
}

@media print {
  .nav,
  footer,
  .skip {
    display: none !important;
  }

  html.print-chat,
  html.print-chat body {
    background: #fff !important;
    color: #111;
  }

  html.print-chat main > :not(.chat-tool),
  html.print-chat .no-print,
  html.print-chat .results > .tabs {
    display: none !important;
  }

  html.print-chat .doc {
    padding: 0;
    max-width: none;
  }

  html.print-chat .print-head,
  html.print-chat .print-foot {
    display: block;
    color: #111;
  }

  html.print-chat .print-head h3 {
    margin: 0;
    font-size: 18pt;
    color: #111;
  }

  html.print-chat .print-head p,
  html.print-chat .print-foot,
  html.print-chat .chat-print > .fine {
    font-size: 9pt;
    color: #555;
  }

  html.print-chat .bubbles .day {
    color: #555;
  }

  html.print-chat .bubble {
    break-inside: avoid;
    background: #f1f1f3;
    border-color: #ddd;
    color: #111;
  }

  html.print-chat .bubble.me {
    background: #dbe8ff;
    border-color: #b9cff5;
  }

  html.print-chat .bubble b {
    color: #1f5fc2;
  }

  html.print-chat .bubble time,
  html.print-chat .bubble em {
    color: #555;
  }
}
