:root {
  --teal: #008080;
  --teal-deep: #006066;
  --teal-soft: #e3f3f2;
  --ink: #10262a;
  --muted: #55696d;
  --line: #dbe6e6;
  --bg: #ffffff;
  --card: #f5f9f9;
  --coral: #ff8a5c;
  --brand: #006066;      /* hero and closing band, same in both schemes, as in the App Store screenshots */
  --on-brand: #ffffff;
  --on-brand-muted: #d3ecea;
  --on-brand-accent: #8ee3de;
  --device: #0d1b1d;
  --radius: 18px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --teal: #40c4c4;
    --teal-deep: #1d9a9c;
    --teal-soft: #12302f;
    --ink: #eef5f5;
    --muted: #9db2b4;
    --line: #223b3d;
    --bg: #0b1718;
    --card: #11201f;
    --device: #000000;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; }
figure { margin: 0; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }

header.site { padding: 18px 0; }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 20px; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
nav a { margin-left: 20px; color: var(--muted); text-decoration: none; font-size: 15px; }
nav a:hover { color: var(--teal); }

/* Home: the header sits on the brand band */
body.home header.site { background: var(--brand); }
body.home header.site .brand { color: var(--on-brand); }
body.home header.site nav a { color: var(--on-brand-muted); }
body.home header.site nav a:hover { color: var(--on-brand); }
body.home header.site a:focus-visible { outline-color: #ffffff; }

h1 { font-size: clamp(36px, 6vw, 60px); line-height: 1.05; letter-spacing: -0.025em; margin: 0 0 18px; text-wrap: balance; }
h1 em { font-style: normal; color: var(--teal); }
h2 { font-size: clamp(26px, 4vw, 36px); line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 10px; text-wrap: balance; }
.lead { font-size: 20px; color: var(--muted); margin: 0 0 28px; max-width: 30em; }
.small { font-size: 14px; color: var(--muted); margin-top: 14px; }
.sub { color: var(--muted); margin: 0 0 30px; }

.badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--bg);
  padding: 13px 20px; border-radius: 14px; font-weight: 600; text-decoration: none;
}
.badge.soon { background: var(--teal-soft); color: var(--teal-deep); }
@media (prefers-color-scheme: dark) { .badge.soon { color: var(--teal); } }

/* "Coming soon" is a status, not a button, until the app is live */
.status {
  display: inline-flex; align-items: center; gap: 10px; margin: 0;
  padding: 9px 16px; border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.55); color: var(--on-brand);
  font-weight: 600; font-size: 16px;
}
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--on-brand-accent); flex: none; }

/* Hero */
.hero {
  background: var(--brand); color: var(--on-brand);
  padding: 28px 0 0; border-top: 0; overflow: hidden;
}
.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 32px; align-items: center; }
.hero-copy { padding: 24px 0 64px; }
.hero h1 em { color: var(--on-brand-accent); }
.hero .lead { color: var(--on-brand-muted); }
.hero .small { color: var(--on-brand-muted); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 13px; font-weight: 700; color: var(--on-brand-accent); margin: 0 0 14px; }

.hero-art { position: relative; height: 600px; align-self: end; }
.device {
  background: var(--device); padding: 9px; border-radius: 44px;
  box-shadow: 0 30px 60px rgba(0, 20, 22, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}
.device img { display: block; width: 100%; height: auto; aspect-ratio: 390 / 847; border-radius: 36px; background: var(--card); }
.hero-art .device { position: absolute; }
.device-front { width: 270px; left: 50%; bottom: -24px; transform: translateX(-18%); z-index: 2; }
.device-back { width: 220px; left: 50%; bottom: -30px; transform: translateX(-96%) rotate(-6deg); }

/* Facts strip */
.facts { border-bottom: 1px solid var(--line); background: var(--bg); }
.facts ul { list-style: none; margin: 0 auto; padding-top: 22px; padding-bottom: 22px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.facts li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--muted); line-height: 1.4; }
.facts strong { display: block; color: var(--ink); font-size: 16px; }
.facts svg { flex: none; width: 26px; height: 26px; fill: none; stroke: var(--teal); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-top: 2px; }

section { padding: 64px 0; border-top: 1px solid var(--line); }
.facts + section { border-top: 0; }

/* Feature rows */
.features { padding-top: 40px; }
.feature { display: grid; grid-template-columns: 240px 1fr; gap: 64px; align-items: center; padding: 28px 0; }
.feature.flip { grid-template-columns: 1fr 240px; }
.feature.flip .device { order: 2; }
.feature .device { width: 240px; justify-self: center; }
.feature-copy { max-width: 32em; }
.feature-copy p, .panel p { color: var(--muted); margin: 0 0 14px; }
.kicker { text-transform: uppercase; letter-spacing: 0.12em; font-size: 13px; font-weight: 700; color: var(--teal) !important; margin: 0 0 8px !important; }
.fine { font-size: 14px; margin-top: 16px !important; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 36px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.panel h2 { font-size: clamp(22px, 3vw, 26px); }
ul.ticks { list-style: none; padding: 0; margin: 14px 0 0; }
ul.ticks li { position: relative; padding-left: 30px; margin: 8px 0; }
ul.ticks li::before {
  content: ""; position: absolute; left: 0; top: 0.3em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--teal-soft);
}
ul.ticks li::after {
  content: ""; position: absolute; left: 6px; top: calc(0.3em + 4px); width: 5px; height: 9px;
  border: solid var(--teal); border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* Steps */
ol.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
ol.steps li, .card, .plan { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
ol.steps h3, .card h3, .plan h3 { margin: 0 0 6px; font-size: 18px; }
ol.steps p, .card p { margin: 0; color: var(--muted); font-size: 16px; }
.step { display: inline-flex; width: 34px; height: 34px; border-radius: 50%; background: var(--teal); color: #fff; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 12px; }
@media (prefers-color-scheme: dark) { .step { color: #06201f; } }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
.grid.four { grid-template-columns: repeat(4, 1fr); gap: 28px; }
.audience .card { background: transparent; border: 0; border-top: 2px solid var(--teal); border-radius: 0; padding: 16px 0 0; }

/* Pricing */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.plan { padding: 26px; }
.plan h3 { font-size: 22px; }
.plan-line { color: var(--muted); margin: 0; }
.plan.pro { background: var(--teal-soft); border-color: transparent; }
.plan.pro h3 { color: var(--teal-deep); }
@media (prefers-color-scheme: dark) { .plan.pro h3 { color: var(--teal); } }
.pricing .small { margin-top: 18px; }

.note { background: var(--teal-soft); border-radius: var(--radius); padding: 22px 24px; }
.note strong { color: var(--teal-deep); }
@media (prefers-color-scheme: dark) { .note strong { color: var(--teal); } }
ul.tips { margin: 12px 0 0; padding-left: 20px; }
ul.tips li { margin: 4px 0; }
.faq { max-width: 720px; }
details { border-bottom: 1px solid var(--line); padding: 14px 0; }
summary { cursor: pointer; font-weight: 600; }
details p { color: var(--muted); margin: 10px 0 0; }

/* Closing band */
.final { background: var(--brand); color: var(--on-brand); text-align: center; border-top: 0; padding: 72px 0; }
.final img { border-radius: 16px; display: block; margin: 0 auto 18px; }
.final p { color: var(--on-brand-muted); margin: 0 0 24px; }
.final .status { color: var(--on-brand); margin: 0; }

footer.site { border-top: 1px solid var(--line); padding: 30px 0 46px; color: var(--muted); font-size: 14px; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: space-between; }
footer.site a { color: var(--muted); margin-right: 18px; }
footer.site .tm { flex-basis: 100%; margin: 6px 0 0; font-size: 12px; }
footer.site .langs { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; margin-top: 8px; }
footer.site .langs a { margin: 0; text-decoration: none; padding: 8px 0; display: inline-block; }
footer.site .langs a:hover { color: var(--teal); }
footer.site .langs a[aria-current] { color: var(--ink); font-weight: 600; }

.skip { position: absolute; left: -9999px; top: 10px; z-index: 10; background: var(--bg); color: var(--ink); padding: 10px 16px; border-radius: 10px; font-weight: 600; }
.skip:focus { left: 16px; }
a.status { text-decoration: none; }
a.status:hover { background: rgba(255, 255, 255, 0.12); }

/* Right-to-left pages (Arabic) */
[dir="rtl"] nav a { margin-left: 0; margin-right: 20px; }
[dir="rtl"] footer.site a { margin-right: 0; margin-left: 18px; }
[dir="rtl"] ul.ticks li { padding-left: 0; padding-right: 30px; }
[dir="rtl"] ul.ticks li::before { left: auto; right: 0; }
[dir="rtl"] ul.ticks li::after { left: auto; right: 7px; }
[dir="rtl"] ul.tips { padding-left: 0; padding-right: 20px; }
[dir="rtl"] .hero-art { direction: ltr; } /* the screenshots are left-to-right; keep the phones as in the English layout */
[dir="rtl"] .skip:focus { left: auto; right: 16px; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] .eyebrow, [dir="rtl"] .kicker,
:lang(th) h1, :lang(th) h2, :lang(th) .eyebrow, :lang(th) .kicker { letter-spacing: 0; }

/* Text pages */
main.doc { padding: 26px 0 60px; }
main.doc h1 { font-size: clamp(30px, 5vw, 42px); margin-bottom: 6px; }
main.doc h2 { font-size: 22px; margin: 34px 0 8px; }
main.doc p, main.doc li { color: var(--ink); }
main.doc .meta { color: var(--muted); margin: 0 0 22px; }
main.doc table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: 16px; }
main.doc th, main.doc td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
main.doc th { background: var(--card); }

@media (max-width: 920px) {
  .grid.four { grid-template-columns: 1fr 1fr; }
  .facts ul { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 0; }
  .hero-copy { padding: 16px 0 32px; }
  .hero-art { height: calc(min(62vw, 270px) * 2.1); }
  .device-front { width: 62vw; max-width: 270px; bottom: -40px; }
  .device-back { width: 48vw; max-width: 210px; bottom: -30px; }
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 28px; padding: 28px 0; }
  .feature.flip .device { order: 0; }
  .feature .device { width: 56vw; max-width: 240px; }
  .duo { grid-template-columns: 1fr; }
  ol.steps, .grid, .plans { grid-template-columns: 1fr; }
  nav a { margin-left: 14px; }
  section { padding: 52px 0; }
}
@media (max-width: 520px) {
  .grid.four, .facts ul { grid-template-columns: 1fr; }
  nav a[href="#features"] { display: none; }
  .lead { font-size: 18px; }
}
main.doc caption { text-align: start; font-weight: 600; color: var(--muted); padding: 0 0 8px; }

/* Line breaking for CJK headings: keep words and phrases together */
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3 { word-break: auto-phrase; }
:lang(ko) { word-break: keep-all; }
