:root {
  --bg: #ffffff;
  --bg-soft: #f6f5f9;
  --surface: #ffffff;
  --ink: #1d1a29;
  --ink-2: #4a4659;
  --ink-3: #7c778b;
  --line: #e8e6ef;
  --accent: #f23d62;
  --accent-2: #ff7a59;
  --accent-ink: #ffffff;
  --accent-soft: #fff0f3;
  --shadow: 0 1px 2px rgba(29, 26, 41, .04), 0 8px 24px rgba(29, 26, 41, .06);
  --radius: 20px;
  --maxw: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0e14;
    --bg-soft: #17151f;
    --surface: #1b1924;
    --ink: #f3f1f8;
    --ink-2: #c3bfd0;
    --ink-3: #8f8a9f;
    --line: #2a2735;
    --accent: #ff5577;
    --accent-2: #ff8a66;
    --accent-soft: #2a1520;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
  .logo img { filter: invert(1) hue-rotate(180deg); }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 750; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { margin-top: clamp(64px, 9vw, 112px); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-head h2 { margin: 0; }
.more { font-weight: 600; white-space: nowrap; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 700; color: var(--accent); margin: 0 0 14px; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--ink-2); max-width: 36em; margin: 0; }
.accent { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--surface); padding: 8px 12px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo { display: flex; align-items: center; }
.logo img { width: 116px; height: 24px; display: block; }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a { color: var(--ink-2); font-weight: 550; font-size: .95rem; padding: 8px 12px; border-radius: 999px; }
.nav a:hover { color: var(--ink); background: var(--bg-soft); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--ink); background: var(--bg-soft); }
.menu-toggle { display: none; }
@media (max-width: 720px) {
  .menu-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line);
    background: var(--surface); color: var(--ink); cursor: pointer; font-size: 18px;
  }
  .nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; padding: 8px 16px 16px;
    background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; font-size: 1rem; }
}

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button, a.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 14px;
  background: var(--ink); color: var(--bg); font-weight: 650; font-size: .98rem;
  border: 1px solid var(--ink); text-decoration: none; transition: transform .15s ease, opacity .15s ease;
}
.button:hover { transform: translateY(-1px); text-decoration: none; opacity: .92; }
.button.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.button.accent-btn { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.button svg { width: 20px; height: 20px; flex: none; }
.store { padding: 0 20px 0 16px; }
.store span { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.store small { font-size: .68rem; font-weight: 500; opacity: .75; }

/* Hero */
.hero { padding: clamp(40px, 8vw, 96px) 0 clamp(32px, 5vw, 64px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero-art { position: relative; aspect-ratio: 1; max-width: 460px; justify-self: center; width: 100%; }
.orb {
  position: absolute; inset: 8%; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--accent-2), var(--accent) 55%, #8a3ffc 100%);
  filter: blur(4px); opacity: .9;
}
.float {
  position: absolute; width: 30%; border-radius: 24%;
  box-shadow: 0 18px 40px rgba(29, 26, 41, .25);
  animation: bob 6s ease-in-out infinite;
}
.f1 { left: 4%; top: 12%; }
.f2 { right: 6%; top: 4%; animation-delay: -1.5s; }
.f3 { left: 36%; bottom: 2%; animation-delay: -3s; }
@keyframes bob { 50% { transform: translateY(-12px) rotate(-2deg); } }
@media (prefers-reduced-motion: reduce) { .float { animation: none; } html { scroll-behavior: auto; } }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 260px; order: -1; }
}

/* Stats */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat { background: var(--bg-soft); border-radius: var(--radius); padding: 24px; }
.stat strong { display: block; font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.stat span { color: var(--ink-3); font-weight: 550; }
@media (max-width: 560px) { .stats { grid-template-columns: 1fr; } .stat { display: flex; align-items: baseline; justify-content: space-between; padding: 18px 20px; } }

/* App cards */
.apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 760px) { .apps { grid-template-columns: 1fr; } }
.app-card {
  display: flex; flex-direction: column; gap: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease;
}
.app-card:hover { transform: translateY(-3px); }
.app-card img { width: 64px; height: 64px; border-radius: 22%; box-shadow: 0 4px 12px rgba(29, 26, 41, .12); }
.app-card h3 { margin: 0; font-size: 1.15rem; }
.app-card h3 a { color: var(--ink); }
.app-card .rating { color: #f5a524; font-weight: 700; font-size: .9rem; margin-top: -8px; }
.app-card .rating small { color: var(--ink-3); font-weight: 500; font-size: .85rem; }
.app-card p { margin: 0; color: var(--ink-2); font-size: .95rem; flex: 1; }
.app-card .links { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: .9rem; font-weight: 600; }

/* Quotes */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.quote { margin: 0; background: var(--bg-soft); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.quote blockquote { margin: 0; font-size: 1.02rem; color: var(--ink); flex: 1; }
.quote blockquote::before { content: "★★★★★"; display: block; color: #f5a524; letter-spacing: 2px; font-size: .9rem; margin-bottom: 10px; }
.quote figcaption { display: flex; align-items: center; gap: 12px; font-size: .9rem; color: var(--ink-3); }
.quote figcaption img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.quote figcaption strong { display: block; color: var(--ink); }

/* Guides list */
.guide-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; padding: 0; margin: 0; list-style: none; }
.guide-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line);
  color: var(--ink); font-weight: 600; background: var(--surface);
}
.guide-list a::after { content: "→"; color: var(--ink-3); }
.guide-list a:hover { border-color: var(--accent); text-decoration: none; }

/* Directory */
.directory { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.dir-item { border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; background: var(--surface); }
.dir-item strong { display: block; margin-bottom: 6px; }
.dir-item nav { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .92rem; }

/* CTA */
.cta {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; border-radius: 28px; padding: clamp(28px, 5vw, 56px);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
}
.cta h2 { margin: 0 0 6px; color: #fff; }
.cta p { margin: 0; opacity: .92; max-width: 34em; }
.cta .button { background: #fff; color: #1d1a29; border-color: #fff; }

/* Page head & about */
.page-head { padding: clamp(40px, 7vw, 80px) 20px clamp(24px, 4vw, 40px); }
.page-head h1 { max-width: 16em; }
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; }
.founder { margin: 0; background: var(--bg-soft); border-radius: var(--radius); padding: clamp(24px, 4vw, 40px); }
.founder blockquote { margin: 0 0 20px; font-size: clamp(1.2rem, 2.2vw, 1.5rem); font-weight: 600; line-height: 1.4; letter-spacing: -0.01em; }
.founder figcaption { color: var(--ink-3); }
.founder figcaption strong { display: block; color: var(--ink); }
.icon-row { display: flex; gap: 12px; flex-wrap: wrap; }
.icon-row img { width: 64px; height: 64px; border-radius: 22%; box-shadow: var(--shadow); }
@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr; } }

/* Articles (policies, support, guides) */
.article { max-width: 760px; margin: 0 auto; padding: clamp(32px, 6vw, 64px) 20px 0; }
.crumbs { font-size: .88rem; color: var(--ink-3); margin-bottom: 14px; }
.crumbs a { color: var(--ink-3); }
.article h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.article-meta { color: var(--ink-3); font-size: .9rem; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-bottom: 28px; }
.app-hero { display: flex; gap: 20px; align-items: center; margin-bottom: 24px; }
.app-hero img { width: 96px; height: 96px; border-radius: 22%; box-shadow: var(--shadow); flex: none; object-fit: cover; }
.app-hero h1 { margin: 0; }
.prose { font-size: 1.04rem; color: var(--ink-2); overflow-wrap: anywhere; }
.prose h2 { font-size: 1.45rem; margin-top: 2em; color: var(--ink); }
.prose h3 { font-size: 1.2rem; margin-top: 1.6em; color: var(--ink); }
.prose h4 { font-size: 1.05rem; margin-top: 1.4em; color: var(--ink); }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: .35em 0; }
.prose figure { margin: 1.6em 0; text-align: center; }
.prose figure img { border-radius: 18px; box-shadow: var(--shadow); max-height: 560px; width: auto; }
.prose .gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.prose .gallery figure { margin: 0; }
.prose .embed { position: relative; aspect-ratio: 16 / 9; }
.prose .embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 16px; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose blockquote { border-left: 3px solid var(--accent); margin: 1.4em 0; padding: .2em 1.2em; color: var(--ink); }
.prose details { border: 1px solid var(--line); border-radius: 14px; padding: 0 18px; margin: 10px 0; background: var(--surface); }
.prose details[open] { padding-bottom: 8px; }
.prose summary { cursor: pointer; padding: 14px 0; font-weight: 650; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.prose summary::-webkit-details-marker { display: none; }
.prose summary::after { content: "+"; font-weight: 400; font-size: 1.3rem; line-height: 1; color: var(--ink-3); }
.prose details[open] summary::after { content: "–"; }
.prose a.button { color: var(--bg); margin: .4em 0; }
.related { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 999px; background: var(--bg-soft); color: var(--ink); font-weight: 600; font-size: .9rem; }
.chip:hover { text-decoration: none; background: var(--accent-soft); color: var(--accent); }
.promo {
  display: flex; gap: 16px; align-items: center; margin: 32px 0; padding: 18px 20px;
  background: var(--bg-soft); border-radius: var(--radius);
}
.promo img { width: 56px; height: 56px; border-radius: 22%; flex: none; }
.promo div { flex: 1; min-width: 0; }
.promo strong { display: block; color: var(--ink); }
.promo span { color: var(--ink-3); font-size: .92rem; }
@media (max-width: 520px) { .promo { flex-wrap: wrap; } .promo .button { width: 100%; } }
.translate { display: inline-flex; align-items: center; gap: 8px; }
.translate select {
  font: inherit; font-size: .88rem; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px;
}

/* Footer */
.site-footer { margin-top: clamp(64px, 9vw, 112px); border-top: 1px solid var(--line); background: var(--bg-soft); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding: 48px 20px 32px; }
.footer-grid h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); margin-bottom: 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--ink-2); }
.footer-grid p { color: var(--ink-3); font-size: .92rem; margin: 12px 0 0; max-width: 22em; }
.footer-bottom { border-top: 1px solid var(--line); padding: 20px; color: var(--ink-3); font-size: .85rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* 404 */
.not-found { text-align: center; padding: clamp(64px, 12vw, 140px) 20px 0; }
.not-found .actions { justify-content: center; }
