/* Anlan — anlanmeditation.com
   No external resources: system fonts only, no scripts, no cookies.
   Colors follow the app's new UI (SitStyle): dark first, light via prefers-color-scheme. */

:root {
  color-scheme: dark light;
  --bg: #0c0e13;
  --card: #12141a;
  --card-line: #1f232c;
  --line: #1c1f27;
  --text: #e9e4da;
  --hero: #f2eee6;
  --text2: #9a9fab;
  --text3: #7d8290;
  --still: #e6dcc8;
  --notstill: #262a33;
  --button-bg: #e6dcc8;
  --button-text: #0c0e13;
  --link: #e6dcc8;
  --glow-core: #6e6656;
  --glow-mid: #2a2721;
  --focus: #e6dcc8;
  --wrap: 680px;
  --gutter: 20px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "PingFang SC",
    "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", Arial, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f2ec;
    --card: #fbf9f5;
    --card-line: #e2ddd3;
    --line: #e2ddd3;
    --text: #1b1a17;
    --hero: #1b1a17;
    --text2: #57544e;
    --text3: #6b6861;
    --still: #2a2622;
    --notstill: #e2ddd3;
    --button-bg: #1b1a17;
    --button-text: #f5f2ec;
    --link: #1b1a17;
    --glow-core: #d8cdb8;
    --glow-mid: #ebe4d6;
    --focus: #1b1a17;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

html[lang="zh-Hans"] body { line-height: 1.75; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.wrap {
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--button-bg);
  color: var(--button-text);
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 10;
}
.skip:focus { left: 12px; }

/* Header */
.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.01em;
  min-height: 44px;
}
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.nav ul {
  display: flex;
  gap: 4px 18px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav a {
  color: var(--text2);
  text-decoration: none;
  font-size: 15px;
  display: inline-block;
  padding: 10px 0;
}
.nav a:hover,
.nav a[aria-current="page"] { color: var(--text); }

/* Type */
h1, h2, h3 { color: var(--hero); line-height: 1.25; margin: 0; }
h1 {
  font-size: clamp(30px, 7.4vw, 44px);
  font-weight: 600;
  letter-spacing: -0.015em;
}
h2 { font-size: 23px; font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: 18px; font-weight: 600; }
p { margin: 0; }
.lead { font-size: 19px; color: var(--text2); margin-top: 18px; }
.muted { color: var(--text2); }
.small { font-size: 15px; }
.fine { font-size: 13px; color: var(--text3); }

main { display: block; }

section { padding: 56px 0; border-top: 1px solid var(--line); }
section:first-child { border-top: 0; }
section > .wrap > h2 + * { margin-top: 18px; }
.stack > * + * { margin-top: 14px; }

/* Hero */
.hero { padding: 40px 0 56px; }
.glow {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  margin: 0 0 20px -22px;
  background: radial-gradient(circle at 50% 50%, var(--glow-core) 0%, var(--glow-mid) 42%, transparent 70%);
  opacity: 0.85;
  animation: breathe 8s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.75; }
  50% { transform: scale(1.06); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .glow { animation: none; }
}

.cta { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--button-bg);
  color: var(--button-text);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
}
.button:hover { text-decoration: underline; }
.requires { font-size: 14px; color: var(--text2); max-width: 30em; }

/* Example result card (mirrors the app home screen) */
.example {
  margin-top: 40px;
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: 20px;
  padding: 22px 22px 20px;
}
.example-meta { font-size: 13px; color: var(--text3); letter-spacing: 0.02em; }
.example-hero { display: flex; align-items: baseline; gap: 10px; margin-top: 14px; color: var(--hero); }
.example-hero .num { font-size: 64px; font-weight: 300; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.example-hero .unit { font-size: 18px; color: var(--text2); }
.example-line { display: block; width: 100%; height: 10px; margin: 18px 0 14px; }
.example-line .s { fill: var(--still); }
.example-line .n { fill: var(--notstill); }
.example-grade { color: var(--text); }
.example-note { font-size: 13px; color: var(--text3); margin-top: 10px; }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 0 44px;
  min-height: 30px;
}
.steps li + li { margin-top: 18px; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--card-line);
  color: var(--text2);
  font-size: 14px;
  line-height: 28px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.steps strong { color: var(--hero); font-weight: 600; }
.steps p { color: var(--text2); }

.sub { margin-top: 36px; }
.sub h3 { margin-bottom: 12px; }

.list { margin: 0; padding: 0; list-style: none; }
.list li { position: relative; padding-left: 20px; }
.list li + li { margin-top: 10px; }
.list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.78em;
  width: 8px;
  height: 2px;
  border-radius: 1px;
  background: var(--still);
}

/* Screenshot slots */
.shots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 32px;
  align-items: end;
}
@media (min-width: 640px) {
  .shots { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.shot { margin: 0; }
.shot img,
.shot .slot {
  width: 100%;
  border-radius: 14px;
}
.shot--watch img,
.shot--watch .slot { border-radius: 28%/24%; }
.shot--phone img,
.shot--phone .slot { border-radius: 18px; }
/* Placeholders keep the intended shape; real screenshots keep their own proportions. */
.shot--watch .slot { aspect-ratio: 416 / 496; }
.shot--phone .slot { aspect-ratio: 1320 / 2868; }
.slot {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px;
  border: 1px dashed var(--card-line);
  background: var(--card);
  color: var(--text3);
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  word-break: break-all;
}
.shot figcaption { font-size: 13px; color: var(--text2); margin-top: 8px; }

/* Plans */
.plans {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 24px;
}
@media (min-width: 600px) {
  .plans { grid-template-columns: 1fr 1fr; }
}
.plan {
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: 18px;
  padding: 20px 20px 22px;
}
.plan h3 { margin-bottom: 14px; }
.prices { margin: 24px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.prices li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.prices .price { color: var(--hero); font-variant-numeric: tabular-nums; white-space: nowrap; }
.prices .what { min-width: 0; }
.prices .what small { display: block; color: var(--text2); font-size: 14px; }

.note {
  margin-top: 18px;
  font-size: 15px;
  color: var(--text2);
}

/* Document pages (privacy, support, terms) */
.doc { padding: 32px 0 64px; }
.doc h1 { font-size: clamp(28px, 6.6vw, 38px); }
.doc .meta { margin-top: 10px; font-size: 14px; color: var(--text3); }
.doc h2 { margin-top: 44px; font-size: 21px; }
.doc h3 { margin-top: 28px; font-size: 17px; }
.doc p,
.doc ul,
.doc ol,
.doc dl { margin-top: 12px; }
.doc ul,
.doc ol { padding-left: 1.3em; }
.doc li + li { margin-top: 6px; }
.doc .summary {
  margin-top: 24px;
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: 16px;
}
.defs { margin: 12px 0 0; }
.defs dt { color: var(--hero); font-weight: 600; margin-top: 14px; }
.defs dd { margin: 4px 0 0; color: var(--text2); }
.defs .tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text3);
  border: 1px solid var(--card-line);
  border-radius: 999px;
  padding: 0 8px;
  margin-left: 6px;
  vertical-align: 2px;
}
.path { white-space: nowrap; }

/* FAQ */
.faq { margin-top: 28px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 32px 16px 0;
  position: relative;
  color: var(--hero);
  font-weight: 600;
  min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--text3);
  border-bottom: 1.5px solid var(--text3);
  transform: translateY(-70%) rotate(45deg);
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq .answer { padding: 0 0 20px; color: var(--text2); }
.faq .answer > * + * { margin-top: 10px; }
.faq .answer ul { padding-left: 1.2em; margin-bottom: 0; }
.faq .answer strong { color: var(--text); font-weight: 600; }

.contact .small { margin-top: 8px; }
.contact {
  margin-top: 28px;
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: 16px;
}

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 48px; }
.site-footer nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}
.site-footer nav a { color: var(--text2); text-decoration: none; font-size: 15px; display: inline-block; padding: 8px 0; }
.site-footer nav a:hover { color: var(--text); }
.site-footer p { margin-top: 12px; }
.site-footer .mail { font-size: 15px; color: var(--text2); }

/* 404 */
.notfound { padding: 72px 0 96px; }
.notfound p { margin-top: 12px; color: var(--text2); }
.notfound .links { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* Keep short Chinese phrases together on narrow screens */
.nb { display: inline-block; }
html[lang="zh-Hans"] .hero h1 { font-size: clamp(28px, 7.4vw, 42px); }

/* Status line above the hero title */
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 14px;
  color: var(--text2);
  letter-spacing: 0.01em;
}
.status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--still); }
.lead2 { margin-top: 10px; color: var(--text2); }

/* Waitlist form (plain HTML; the Worker handles the POST) */
.waitlist { margin-top: 28px; max-width: 520px; }
.wl-label { display: block; color: var(--text); margin-bottom: 12px; }
.wl-row { display: flex; flex-wrap: wrap; gap: 10px; }
.wl-row input {
  flex: 1 1 220px;
  min-width: 0;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--card-line);
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 16px;
}
.wl-row input::placeholder { color: var(--text3); }
.wl-row input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.wl-row .button { flex: 0 0 auto; border: 0; cursor: pointer; font-family: inherit; }
.wl-fine { margin-top: 10px; font-size: 13px; color: var(--text3); }
.wl-fine a { color: var(--text2); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.hero .requires { margin-top: 18px; }

/* Definition paragraph and key facts */
.definition { font-size: 18px; color: var(--text); }
.facts { margin: 24px 0 0; display: grid; grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--text3); font-size: 14px; }
.facts dd { margin: 0; color: var(--text2); }
html[lang="zh-Hans"] .facts div { grid-template-columns: 64px minmax(0, 1fr); }

/* Three points */
.point + .point { margin-top: 44px; }
.point-n {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--card-line);
  color: var(--text2);
  font-size: 14px;
  line-height: 28px;
  text-align: center;
  margin-bottom: 12px;
}
.point h2 + p { margin-top: 12px; }
.point > p { color: var(--text2); }
.tiers { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 20px; }
@media (min-width: 600px) { .tiers { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tier {
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: 16px;
  padding: 16px 16px 18px;
}
.tier h3 { font-size: 15px; margin-bottom: 8px; }
.tier p { font-size: 15px; color: var(--text2); }
.tier:last-child h3 { color: var(--text2); }

/* Closing waitlist section on content pages */
.join { padding: 48px 0 8px; }
.join .muted { margin-top: 10px; }
.doc + .join, .doc .join { border-top: 1px solid var(--line); }

/* Accuracy headline */
.headline {
  margin-top: 24px;
  padding: 22px 22px 20px;
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: 20px;
}
.headline-num { font-size: 52px; font-weight: 300; line-height: 1.05; letter-spacing: -0.02em; color: var(--hero); }
.headline-text { margin-top: 12px; color: var(--text); font-size: 18px; }
.headline-sub { margin-top: 10px; color: var(--text2); font-size: 15px; }

/* Data tables */
.grid { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 15px; }
.grid th, .grid td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.grid th { color: var(--text3); font-weight: 500; font-size: 14px; }
.grid td { color: var(--text2); }
.grid td:first-child { color: var(--text); }
.grid strong { color: var(--hero); }
@media (max-width: 520px) { .grid { font-size: 14px; } .grid th, .grid td { padding-right: 8px; } }

/* FAQ page */
.qa h2 { font-size: 19px; }
.qa p { color: var(--text2); }
.doc .qa h2 { margin-top: 36px; }
.refs { padding-left: 1.2em; color: var(--text3); }
.refs li + li { margin-top: 8px; }
.doc .small { font-size: 14px; color: var(--text2); }
.doc .example { margin-top: 18px; }

/* Waitlist result page */
.joined .state p { margin-top: 12px; color: var(--text2); }
.joined .waitlist { margin-top: 24px; }
[hidden] { display: none !important; }

/* Footer language list */
.site-footer .langs ul { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 4px 16px; list-style: none; padding: 0; }
.site-footer .langs a { color: var(--text3); text-decoration: none; font-size: 14px; display: inline-block; padding: 6px 0; }
.site-footer .langs a:hover,
.site-footer .langs a[aria-current="true"] { color: var(--text); }
@media (max-width: 520px) {
  .nav ul { gap: 4px 14px; }
  .nav .lang-link { display: none; }
}

/* Korean breaks between words, not inside them; long menu paths may wrap on phones */
:lang(ko) { word-break: keep-all; }
@media (max-width: 520px) { .path { white-space: normal; } }

/* Space between a document page and its closing "coming soon" section */
.doc .join { margin-top: 48px; }

/* Home: highlight rows (text, and a real-data screenshot when there is one) */
.kicker { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text3); margin-bottom: 14px; }
html[lang^="zh"] .kicker, html[lang="ja"] .kicker, html[lang="ko"] .kicker { letter-spacing: 0.02em; text-transform: none; }
.feature { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: center; }
.feature + .feature { margin-top: 48px; }
.feature-text p { margin-top: 12px; color: var(--text2); }
.feature .shot { max-width: 220px; }
@media (min-width: 640px) {
  .feature:has(.shot) { grid-template-columns: minmax(0, 1fr) 200px; gap: 40px; }
  .feature .shot { max-width: none; }
}
.steps + .shots, .shots + .feature { margin-top: 36px; }
.shots:empty { display: none; }
.shots:empty + .feature { margin-top: 44px; }
#watch h2 + .steps { margin-top: 24px; }
#trust .headline { margin-top: 28px; }
#membership .muted { margin-top: 14px; }
#membership .plans { margin-top: 28px; }

/* Home: looping product video. Muted, no controls, self-hosted. Reduced motion shows the poster only. */
.film { margin: 36px 0 0; border-radius: 22px; overflow: hidden; background: var(--card); border: 1px solid var(--card-line); }
.film video, .film img { display: block; width: 100%; height: auto; }
.film video + .poster { display: none; }
@media (prefers-reduced-motion: reduce) {
  .film video { display: none; }
  .film video + .poster { display: block; }
}

/* App Store button (not on the App Store yet: opens the "coming soon" popup) */
.hero .cta { margin-top: 24px; }
.store { min-height: 48px; }

/* "Coming soon" popup: a modal <dialog> with site.js, a :target overlay without it */
.soon { border: 0; padding: 0; border-radius: 22px; background: var(--card); color: var(--text);
  width: min(360px, calc(100vw - 32px)); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35); }
.soon::backdrop { background: rgba(0, 0, 0, 0.55); }
.soon:target:not([open]) { display: block; position: fixed; inset: 0; margin: auto; height: fit-content; z-index: 20; }
.soon-card { padding: 28px 24px 24px; text-align: center; }
.soon img { margin: 0 auto 14px; border-radius: 13px; }
.soon h2 { font-size: 21px; }
.soon p { margin-top: 10px; color: var(--text2); }
.soon .button { margin-top: 22px; min-width: 120px; justify-content: center; }
