/* ==========================================================================
   Chatgram landing page
   Two themes driven by [data-theme] on <html>, set in index.html before paint.
   ========================================================================== */

:root {
  --brand: #008069;
  --brand-strong: #006b58;
  --green: #25d366;
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1140px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* ------------------------------------------------------------------ light */
[data-theme='light'] {
  --bg: #ffffff;
  --bg-alt: #f3f6f5;
  --surface: #ffffff;
  --surface-2: #f7f9f8;
  --text: #0f1c1a;
  --text-soft: #3b4a54;
  --muted: #63757d;
  --line: #e3e9e7;
  --line-strong: #cfd9d6;
  --brand: #008069;
  --brand-strong: #006b58;
  --brand-tint: rgba(0, 128, 105, 0.09);
  --hero-bg: linear-gradient(165deg, #eaf6f2 0%, #dff0ea 45%, #f6fbf9 100%);
  --hero-text: #0f1c1a;
  --hero-muted: #3d5c55;
  --header-bg: rgba(255, 255, 255, 0.88);
  --shadow: 0 8px 28px rgba(12, 40, 34, 0.08);
  --shadow-lg: 0 22px 48px rgba(12, 40, 34, 0.14);
  --footer-bg: #0f1c1a;
  --footer-text: #a8b6b3;
  --footer-heading: #ffffff;
  --pill-next-bg: rgba(0, 128, 105, 0.12);
  --pill-next-fg: #006b58;
  --pill-plan-bg: rgba(99, 117, 125, 0.14);
  --pill-plan-fg: #46585f;
}

/* ------------------------------------------------------------------- dark */
[data-theme='dark'] {
  --bg: #0b141a;
  --bg-alt: #111b21;
  --surface: #111b21;
  --surface-2: #1a262d;
  --text: #e9edef;
  --text-soft: #d1d7db;
  --muted: #8696a0;
  --line: #22303a;
  --line-strong: #2e3d47;
  --brand: #00a884;
  --brand-strong: #02c698;
  --brand-tint: rgba(0, 168, 132, 0.14);
  --hero-bg: radial-gradient(120% 120% at 20% 0%, #0f3d36 0%, #0b2622 45%, #0b141a 100%);
  --hero-text: #ffffff;
  --hero-muted: #b7c7c3;
  --header-bg: rgba(11, 20, 26, 0.86);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 26px 60px rgba(0, 0, 0, 0.5);
  --footer-bg: #070f13;
  --footer-text: #8696a0;
  --footer-heading: #e9edef;
  --pill-next-bg: rgba(0, 168, 132, 0.16);
  --pill-next-fg: #4dd9b4;
  --pill-plan-bg: rgba(134, 150, 160, 0.16);
  --pill-plan-fg: #a9b7bf;
}

/* ------------------------------------------------------------------- base */
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
}
h1,
h2,
h3,
h4 {
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px;
}
.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;
}
svg {
  width: 22px;
  height: 22px;
  display: block;
}

/* ----------------------------------------------------------------- header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 68px;
}
.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19.5px;
  letter-spacing: -0.02em;
  color: var(--text);
}
.brand-link .logo {
  width: 30px;
  height: 30px;
}
.nav-links {
  display: flex;
  gap: 26px;
  margin-left: 26px;
}
.nav-links a {
  font-size: 15px;
  font-weight: 550;
  color: var(--text-soft);
  transition: color 0.15s ease;
}
.nav-links a:hover {
  color: var(--brand);
}
.nav-spacer {
  flex: 1;
}
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 9px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 4px 0;
  border-radius: 2px;
}

/* ---------------------------------------------------------- theme switch */
.theme-switch {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
}
.theme-opt {
  display: grid;
  place-items: center;
  width: 34px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}
.theme-opt svg {
  width: 17px;
  height: 17px;
}
.theme-opt:hover {
  color: var(--text);
}
.theme-opt.active {
  background: var(--brand);
  color: #fff;
}

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 999px;
  font-weight: 650;
  font-size: 15px;
  padding: 12px 22px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease,
    transform 0.12s ease;
  white-space: nowrap;
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--brand);
  color: #fff;
}
.btn-primary:hover {
  background: var(--brand-strong);
}
.btn-ghost {
  border-color: var(--brand);
  color: var(--brand);
  background: transparent;
}
.btn-ghost:hover {
  background: var(--brand-tint);
}
.btn-light {
  background: var(--surface);
  color: var(--brand-strong);
  border-color: var(--surface);
}
[data-theme='dark'] .btn-light {
  background: #ffffff;
  color: #0b3b33;
}
.btn-lg {
  padding: 15px 28px;
  font-size: 16px;
}
.btn.full {
  width: 100%;
  margin-top: auto;
}

/* ------------------------------------------------------------------ hero */
.hero {
  background: var(--hero-bg);
  color: var(--hero-text);
  padding: 74px 0 82px;
  overflow: hidden;
  position: relative;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: 56px;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--brand-tint);
  color: var(--brand-strong);
  margin-bottom: 20px;
}
[data-theme='dark'] .hero-badge {
  color: #6ee7c3;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.18);
}
.hero h1 {
  font-size: clamp(36px, 4.8vw, 58px);
  font-weight: 800;
  margin: 0 0 20px;
  letter-spacing: -0.03em;
}
.hero h1 em {
  font-style: normal;
  color: var(--brand);
}
[data-theme='dark'] .hero h1 em {
  color: #4dd9b4;
}
.hero .lead {
  font-size: clamp(16px, 1.55vw, 19px);
  color: var(--hero-muted);
  margin: 0 0 30px;
  max-width: 54ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}
.hero-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 13.5px;
  color: var(--hero-muted);
}
.hero-platforms span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.hero-platforms svg {
  width: 17px;
  height: 17px;
  opacity: 0.85;
}
.hero-art {
  display: flex;
  justify-content: center;
}

.phone {
  width: 262px;
  border-radius: 36px;
  padding: 9px;
  background: linear-gradient(#243238, #131c21);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.07);
  position: relative;
  transform: rotate(-1.2deg);
}
.phone img {
  border-radius: 28px;
  width: 100%;
}
.phone::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 16px;
  transform: translateX(-50%);
  width: 66px;
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.2);
}

/* ----------------------------------------------------------------- facts */
.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: -38px 0 0;
  position: relative;
  z-index: 5;
}
.fact {
  display: flex;
  align-items: center;
  gap: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.fact-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 11px;
  background: var(--brand-tint);
  color: var(--brand);
}
.fact-icon svg {
  width: 20px;
  height: 20px;
}
.fact strong {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
}
.fact span:last-child {
  font-size: 12.8px;
  color: var(--muted);
}

/* --------------------------------------------------------------- section */
.section {
  padding: 84px 0;
}
.section-alt {
  background: var(--bg-alt);
}
.section-head {
  max-width: 660px;
  margin-bottom: 44px;
}
.eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 12px;
}
.section h2 {
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 800;
  margin: 0 0 14px;
}
.section-head p {
  color: var(--muted);
  font-size: 16.5px;
  margin: 0;
}

/* ------------------------------------------------------------------ grid */
.grid {
  display: grid;
  gap: 18px;
}
.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--line-strong);
}
.card-row {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 13px;
  background: var(--brand-tint);
  color: var(--brand);
  margin-bottom: 16px;
}
.card-row .icon {
  margin-bottom: 0;
}
.icon svg {
  width: 22px;
  height: 22px;
}
.card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 750;
}
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 14.8px;
}

/* ----------------------------------------------------------- screenshots */
.shots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  align-items: start;
}
.shot {
  margin: 0;
  text-align: center;
}
.shot-frame {
  border-radius: 26px;
  padding: 7px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.18s ease;
}
.shot:hover .shot-frame {
  transform: translateY(-4px);
}
.shot-frame img {
  border-radius: 20px;
  width: 100%;
}
.shot figcaption {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

/* -------------------------------------------------------------- download */
.dl-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}
.dl-top {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 14px;
}
.dl-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--brand-tint);
  color: var(--brand);
}
.dl-icon svg {
  width: 22px;
  height: 22px;
}
.plat {
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.dl-card h3 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 800;
}
.dl-card .meta {
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 4px;
}
.dl-card .req {
  font-size: 12.8px;
  color: var(--muted);
  padding: 9px 0 20px;
  border-bottom: 1px dashed var(--line);
  margin-bottom: 20px;
}
.dl-card .alt {
  font-size: 12.6px;
  color: var(--muted);
  text-align: center;
  margin-top: 12px;
}
.dl-card code {
  background: var(--surface-2);
  padding: 1px 5px;
  border-radius: 5px;
  font-size: 12px;
}

/* ----------------------------------------------------------------- steps */
.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
}
.num {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 16px;
}
.step h3 {
  margin: 0 0 7px;
  font-size: 16.5px;
}
.step p {
  margin: 0;
  color: var(--muted);
  font-size: 14.8px;
}

/* ------------------------------------------------------------- changelog */
.changelog {
  max-width: 780px;
}
.release {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
}
.release-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.tag {
  font-size: 13px;
  font-weight: 800;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
}
.release-date {
  font-size: 13.5px;
  color: var(--muted);
}
.release ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}
.release li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  font-size: 15px;
  color: var(--text-soft);
}
.tick {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border-radius: 50%;
  background: var(--brand-tint);
  color: var(--brand);
  margin-top: 2px;
}
.tick svg {
  width: 13px;
  height: 13px;
}

/* --------------------------------------------------------------- roadmap */
.roadmap {
  display: grid;
  gap: 14px;
  max-width: 820px;
}
.road-item {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.road-item h3 {
  margin: 0 0 5px;
  font-size: 16px;
}
.road-item p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
}
.pill {
  flex: 0 0 auto;
  font-size: 11.5px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
  margin-top: 2px;
}
.pill-next {
  background: var(--pill-next-bg);
  color: var(--pill-next-fg);
}
.pill-plan {
  background: var(--pill-plan-bg);
  color: var(--pill-plan-fg);
}

/* ------------------------------------------------------------------- faq */
.faq {
  display: grid;
  gap: 11px;
  max-width: 840px;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
  transition: border-color 0.16s ease;
}
.faq-item.open {
  border-color: var(--brand);
}
.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  font-size: 15.8px;
  font-weight: 650;
  color: var(--text);
}
.faq-sign {
  color: var(--brand);
  font-size: 22px;
  line-height: 1;
  font-weight: 400;
}
.faq-a {
  padding: 0 22px 20px;
  color: var(--muted);
  font-size: 15px;
}

/* ---------------------------------------------------------------- footer */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 56px 0 34px;
  font-size: 14px;
}
.site-footer .brand-link {
  color: var(--footer-heading);
  margin-bottom: 12px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 34px;
}
.foot-tag {
  margin: 0;
  max-width: 34ch;
}
.site-footer h4 {
  color: var(--footer-heading);
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 14px;
}
.site-footer a {
  display: block;
  margin-bottom: 9px;
  color: var(--footer-text);
  transition: color 0.15s ease;
}
.site-footer a:hover {
  color: var(--green);
}
.foot-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
}

/* -------------------------------------------------------------- responsive */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .facts {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 44px;
    text-align: center;
  }
  .hero .lead {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-actions,
  .hero-platforms {
    justify-content: center;
  }
  .hero-art {
    order: 2;
  }
  .phone {
    width: 236px;
    transform: none;
  }
  .nav-links {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 68px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    padding: 6px 22px 14px;
    margin: 0;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links a {
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
  }
  .nav-toggle {
    display: block;
  }
  .nav-cta {
    display: none;
  }
  .grid-2,
  .grid-3,
  .shots,
  .foot-grid {
    grid-template-columns: 1fr;
  }
  .section {
    padding: 62px 0;
  }
  .facts {
    margin-top: -26px;
  }
}

@media (max-width: 520px) {
  .facts {
    grid-template-columns: 1fr;
  }
  .grid-4 {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 52px 0 66px;
  }
  .road-item {
    flex-direction: column;
    gap: 10px;
  }
}

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

/* ==========================================================================
   /docs — Terms & Privacy
   ========================================================================== */
.docs-page { min-height: 100vh; background: var(--bg); color: var(--text); }
.docs-head {
  background: var(--hero-bg);
  padding: 48px 0 32px;
  margin-bottom: 40px;
}
.docs-back { font-size: 13px; font-weight: 650; color: var(--brand); }
.docs-head h1 { font-size: clamp(26px, 3.4vw, 38px); margin: 14px 0 6px; font-weight: 800; letter-spacing: -0.03em; }
.docs-updated { color: var(--hero-muted); font-size: 13.5px; margin: 0 0 18px; }
.docs-toc { display: flex; flex-wrap: wrap; gap: 10px; }
.docs-toc a {
  font-size: 13px; font-weight: 650; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--text-soft);
}
.docs-toc a:hover { border-color: var(--brand); color: var(--brand); }

.docs-body { max-width: 780px; padding-bottom: 60px; }
.docs-body section { margin-bottom: 56px; scroll-margin-top: 90px; }
.docs-body h2 {
  font-size: 26px; font-weight: 800; margin: 0 0 20px;
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.docs-body h3 { font-size: 16.5px; font-weight: 750; margin: 26px 0 8px; }
.docs-body p, .docs-body li { font-size: 15px; line-height: 1.7; color: var(--text-soft); }
.docs-body p { margin: 0 0 12px; }
.docs-body ul { margin: 0 0 14px; padding-left: 22px; }
.docs-body li { margin-bottom: 7px; }
.docs-body a { color: var(--brand); text-decoration: underline; }

.docs-foot { border-top: 1px solid var(--line); padding: 26px 0; font-size: 13px; color: var(--muted); }
.docs-foot a { color: var(--text-soft); }
.docs-foot a:hover { color: var(--brand); }

/* --------------------------------------------------- preview / screenshots */
/* Two phone shots side by side, then one full-width desktop shot underneath. */
.shots-phones {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 620px;
  margin: 0 auto 36px;
}
.shots-phones .shot-frame { border-radius: 30px; }
.shot-wide { margin: 0; }
.shot-wide .shot-frame { padding: 9px; border-radius: 20px; }
.shot-wide .shot-frame img { border-radius: 13px; display: block; }
.shot-wide figcaption { margin-top: 16px; }

@media (max-width: 640px) {
  .shots-phones {
    grid-template-columns: 1fr;
    max-width: 300px;
    gap: 22px;
    margin-bottom: 26px;
  }
  .shot-wide .shot-frame { padding: 6px; border-radius: 14px; }
  .shot-wide .shot-frame img { border-radius: 9px; }
}

/* ---------------------------------------------------- downloads (data-driven) */
.dl-notice {
  margin: 0 0 18px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(240, 180, 41, 0.12);
  border: 1px solid rgba(240, 180, 41, 0.35);
  font-size: 13px;
}
.dl-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
  margin: 14px 0;
  font-size: 12.5px;
}
.dl-meta > div.wide { grid-column: 1 / -1; }
.dl-meta dt {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.dl-meta dd { margin: 2px 0 0; word-break: break-all; }
.dl-android { display: grid; gap: 6px; align-items: start; }
.dl-qr { margin: 4px 0 10px; text-align: center; justify-self: center; }
.dl-qr img { width: 96px; height: 96px; border-radius: 8px; background: #fff; padding: 4px; }
.dl-qr figcaption { margin-top: 4px; font-size: 10.5px; color: var(--muted); }
.sha { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sha code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.sha-copy {
  border: 1px solid var(--line);
  background: transparent;
  color: inherit;
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 10.5px;
  cursor: pointer;
}
.sha-copy:hover { background: var(--surface-2); }
.install-steps { margin: 12px 0 16px; padding-left: 18px; font-size: 12.5px; color: var(--muted); }
.install-steps li { margin: 4px 0; }
.dl-body { font-size: 13px; color: var(--muted); margin: 10px 0; }
.muted { color: var(--muted); }

/* ==========================================================================
   Static landing page additions (loaded after styles.css, so tokens/components
   from the existing design system are reused unchanged).
   ========================================================================== */

/* Keep intrinsic image ratios when width/height attributes are present. */
img {
  height: auto;
}

/* White text on the dark-theme brand teal (#00a884) is only 3.0:1. Use the
   darker brand teal for solid buttons/badges so every label stays >=4.5:1. */
[data-theme='dark'] .btn-primary,
[data-theme='dark'] .num,
[data-theme='dark'] .tag,
[data-theme='dark'] .dl-version,
[data-theme='dark'] .release-chip strong {
  background: #008069;
}
[data-theme='dark'] .btn-primary:hover {
  background: #006b58;
}

/* ------------------------------------------------------------ accessibility */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 200;
  background: var(--brand);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
}
.skip-link:focus {
  left: 16px;
}
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}
[data-theme='dark'] .skip-link {
  color: #06231c;
}
[data-theme='dark'] .theme-opt {
  color: var(--muted);
}
[data-theme='dark'] .theme-opt.active {
  color: #06231c;
}

/* -------------------------------------------------------------------- logos */
.brand-link .logo {
  border-radius: 8px;
  flex: 0 0 auto;
}

/* ----------------------------------------------------- real app screenshots */
.app-shot {
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-lg);
}
.app-shot-frame,
.app-shot picture,
.app-shot img {
  display: block;
  width: 100%;
  height: auto;
}
.app-shot-messaging {
  width: 100%;
  max-width: 430px;
}

/* ---------------------------------------------------- hero phone mockup */
.hero-phone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 292px;
}
.hero-phone-frame {
  position: relative;
  width: 100%;
  max-width: 292px;
  padding: 9px;
  border-radius: 44px;
  background: linear-gradient(160deg, #2c373d, #101a1f);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.hero-phone-speaker {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 58px;
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.22);
  z-index: 3;
}
.hero-phone-screen {
  position: relative;
  aspect-ratio: 1290 / 2796;
  border-radius: 36px;
  overflow: hidden;
  background: #0b141a;
}
.hero-screen {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transform: translateY(12%);
  transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.22, 0.9, 0.28, 1);
}
.hero-screen.is-active {
  opacity: 1;
  transform: none;
}
.hero-screen picture,
.hero-screen img {
  display: block;
  width: 100%;
  height: 100%;
}
.hero-screen img {
  object-fit: cover;
}
.hero-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.hero-dot {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.hero-dot::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
  transition: background 0.2s ease, transform 0.2s ease;
}
.hero-dot.is-active::before {
  background: var(--brand);
  transform: scale(1.3);
}
[data-theme='dark'] .hero-dot::before {
  background: rgba(255, 255, 255, 0.32);
}
[data-theme='dark'] .hero-dot.is-active::before {
  background: #4dd9b4;
}

/* No auto-advance animation under reduced motion: only the active screen shows. */
@media (prefers-reduced-motion: reduce) {
  .hero-screen {
    transition: none;
    transform: none;
  }
}

/* ------------------------------------------------------- split text / media */
.split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 54px;
  align-items: center;
}
.split-copy .eyebrow {
  margin-bottom: 10px;
}
.split h2 {
  font-size: clamp(24px, 2.7vw, 34px);
  font-weight: 800;
  margin: 0 0 14px;
}
.split-lead {
  color: var(--muted);
  font-size: 16.5px;
  margin: 0 0 22px;
}
.split-media {
  display: flex;
  justify-content: center;
}
.tick-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  gap: 13px;
}
.tick-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15px;
  color: var(--text-soft);
  line-height: 1.6;
}
.tick-list .tick {
  margin-top: 3px;
}
.tick-list strong {
  color: var(--text);
}

/* --------------------------------------------------------------- calls grid */
.calls-grid > .card {
  margin: 0;
}
.calls-grid > .card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

/* ------------------------------------------------------------- FAQ details */
.faq-item > summary {
  list-style: none;
  user-select: none;
}
.faq-item > summary::-webkit-details-marker,
.faq-item > summary::marker {
  display: none;
  content: '';
}
.faq-item .faq-sign::before {
  content: '+';
}
.faq-item[open] .faq-sign::before {
  content: '–';
}
.faq-item .faq-a p {
  margin: 0;
}
.faq-item .faq-a {
  padding-bottom: 20px;
}

.privacy-note {
  max-width: 820px;
  margin: 26px 0 0;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
}

/* --------------------------------------------------------- related guides */
.related-guides {
  max-width: 840px;
  margin-top: 40px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.related-guides h3 {
  margin: 0 0 14px;
  font-size: 17px;
}
.related-guides ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.related-guides a {
  display: inline-block;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-soft);
  background: var(--surface);
}
.related-guides a:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* --------------------------------------------------------------- downloads */
.dl-checksum-note {
  margin: 16px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}
.dl-card .dl-meta {
  grid-template-columns: 1fr;
}
.dl-card .dl-meta > div.wide {
  grid-column: auto;
}
.sha code {
  word-break: break-all;
}

/* Current published builds, derived from content/site.mjs RELEASES. */
.release-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin: 0 0 20px;
}
.release-strip-label {
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 3px;
}
.release-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-size: 12.5px;
  color: var(--text-soft);
}
.release-chip strong {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
}
.dl-version {
  margin-left: auto;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
}

/* ------------------------------------------------------------------ footer */
.foot-grid {
  grid-template-columns: 1.5fr 1fr 1fr 1.1fr 1.1fr;
}
.site-footer .foot-bottom a {
  display: inline;
  margin: 0;
}

/* ------------------------------------------------------------- guide pages */
.guide-head {
  background: var(--hero-bg);
  color: var(--hero-text);
  padding: 44px 0 34px;
  border-bottom: 1px solid var(--line);
}
.guide-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}
.guide-breadcrumb a {
  color: var(--brand);
  font-weight: 650;
}
[data-theme='dark'] .guide-breadcrumb a {
  color: #4dd9b4;
}
.guide-head h1 {
  font-size: clamp(27px, 3.8vw, 42px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin: 16px 0 12px;
  max-width: 26ch;
}
.guide-meta {
  margin: 0;
  font-size: 13.5px;
  color: var(--hero-muted);
}
.guide-body {
  max-width: 760px;
  padding: 44px 0 70px;
}
.guide-body h2 {
  font-size: clamp(20px, 2.4vw, 27px);
  font-weight: 800;
  margin: 40px 0 12px;
  letter-spacing: -0.02em;
}
.guide-intro {
  font-size: 18px;
  color: var(--text-soft);
  margin: 0 0 8px;
}
.guide-body p,
.guide-body li {
  font-size: 16px;
  line-height: 1.72;
  color: var(--text-soft);
}
.guide-body p {
  margin: 0 0 14px;
}
.guide-body ul,
.guide-body ol {
  margin: 0 0 18px;
  padding-left: 22px;
}
.guide-body li {
  margin-bottom: 8px;
}
.guide-body a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.guide-body code {
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 1px 5px;
  border-radius: 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  word-break: break-all;
}
.guide-body strong {
  color: var(--text);
}
.guide-related {
  margin-top: 52px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.guide-related h2 {
  margin-top: 0;
}
.guide-related ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 10px;
}
.guide-related a {
  font-weight: 650;
}

/* ------------------------------------------------------------------- 404 */
.error-page {
  min-height: 62vh;
  display: flex;
  align-items: center;
  padding: 70px 0;
  background: var(--hero-bg);
  color: var(--hero-text);
}
.error-inner h1 {
  font-size: clamp(30px, 4.2vw, 46px);
  margin: 12px 0 12px;
  letter-spacing: -0.03em;
}
.error-inner .lead {
  color: var(--hero-muted);
  font-size: 17px;
  margin: 0 0 22px;
}
.error-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  max-width: 640px;
}
.error-links a {
  display: inline-block;
  font-weight: 650;
  color: var(--brand);
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}
[data-theme='dark'] .error-links a {
  color: #4dd9b4;
}

/* ------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .foot-grid {
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
  }
}
@media (max-width: 980px) {
  .foot-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 900px) {
  .hero-art {
    justify-content: center;
  }
  .nav {
    gap: 8px;
  }
  .split {
    grid-template-columns: 1fr;
    gap: 34px;
  }
  .split-media {
    order: -1;
  }
}
@media (max-width: 720px) {
  .site-header .theme-switch {
    display: none;
  }
  .brand-link {
    font-size: 18px;
  }
  .calls-grid > .card:last-child:nth-child(odd) {
    grid-column: auto;
  }
}
@media (max-width: 560px) {
  .foot-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .guide-body {
    padding-top: 30px;
  }
}

/* -------------------------------------------------- hero download buttons */
.hero-download {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
}
.hero-download .btn {
  padding: 11px 14px;
  font-size: 14px;
  gap: 7px;
}
.hero-download .btn svg {
  width: 16px;
  height: 16px;
}

/* ------------------------------------------------------ sticky download bar */
.quick-bar {
  position: fixed;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(12px);
  box-shadow: var(--shadow-lg);
}
.quick-bar[hidden] {
  display: none;
}
.quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--text-soft);
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.quick-btn svg {
  width: 17px;
  height: 17px;
}
.quick-btn:hover,
.quick-btn:focus-visible {
  background: var(--brand-tint);
  color: var(--brand-strong);
}
[data-theme='dark'] .quick-btn:hover {
  color: #6ee7c3;
}

/* ---------------------------------------------------- install guide dialog */
html.guide-open {
  overflow: hidden;
}
.install-guide {
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  width: min(560px, calc(100vw - 24px));
  max-width: 560px;
  max-height: min(92vh, 800px);
}
.install-guide::backdrop {
  background: rgba(4, 12, 15, 0.62);
  backdrop-filter: blur(3px);
}
.install-guide-panel {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  padding: 22px 24px 18px;
  max-height: inherit;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.install-guide-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.install-guide-close:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.install-guide-kicker {
  margin-bottom: 6px;
}
.install-guide h2 {
  font-size: clamp(21px, 3.4vw, 27px);
  margin: 0 0 6px;
  padding-right: 42px;
  letter-spacing: -0.02em;
}
.install-guide-file {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--muted);
}
.install-guide-lead {
  margin: 0 0 14px;
  font-size: 14.5px;
  color: var(--text-soft);
}
.install-guide-steps {
  margin: 0 0 12px;
  padding-left: 20px;
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: var(--text-soft);
}
.install-guide-steps li {
  line-height: 1.5;
}
.install-guide-verify {
  margin: 0 0 8px;
  font-size: 12px;
}
.install-guide-verify code,
.install-guide-sha code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  word-break: break-all;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
}
.install-guide-sha {
  margin: 0 0 12px;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  gap: 7px;
  align-items: baseline;
  flex-wrap: wrap;
}
.install-guide-sha > span {
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.install-guide-start {
  width: 100%;
}
.install-guide-web-instead {
  display: inline-block;
  margin: 10px 0 0;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.install-guide h3 {
  margin: 16px 0 8px;
  font-size: 15px;
}
.install-guide-what {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.install-guide-what li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-soft);
}
.install-guide-what .tick {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}
.install-guide-what .tick svg {
  width: 12px;
  height: 12px;
}
.install-guide-meta {
  margin: 12px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}
.install-guide-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.install-guide-secondary .btn {
  flex: 1 1 190px;
  font-size: 14px;
  padding: 11px 14px;
  gap: 8px;
}
.install-guide-secondary .btn svg {
  width: 16px;
  height: 16px;
}

/* Keep the hero download buttons above the fold on short desktop viewports. */
@media (min-width: 901px) and (max-height: 840px) {
  .hero {
    padding: 46px 0 58px;
  }
  .hero h1 {
    font-size: clamp(34px, 3.9vw, 50px);
  }
  .hero .lead {
    font-size: 16.5px;
    margin-bottom: 22px;
  }
  .hero-download {
    margin-bottom: 18px;
  }
}
@media (max-width: 900px) {
  .hero-download {
    justify-content: center;
  }
}
@media (max-width: 420px) {
  .quick-btn {
    padding: 9px 11px;
    font-size: 12.5px;
  }
  .install-guide-panel {
    padding: 22px 18px 20px;
  }
}
@media (max-width: 360px) {
  .quick-btn span {
    display: none;
  }
  .quick-btn {
    padding: 11px;
  }
}

/* Language row on the long-form content pages (one link per language, same topic). */
.guide-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0.85rem 0 0;
  font-size: 0.92rem;
}
.guide-langs a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.guide-langs a[aria-current='page'] {
  font-weight: 700;
  text-decoration: none;
}
.guide-faq {
  display: grid;
  gap: 0.6rem;
  margin: 1rem 0 1.5rem;
}
