:root {
  color-scheme: dark;
  --background: #0b0e15;
  --surface: #151925;
  --foreground: #f4f0e8;
  --muted: #aaa49b;
  --outline: #303541;
  --coral: #e76443;
  --gold: #e2b84e;
  --green: #67b994;
  --cream: #f2ecde;
  --content-width: 760px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

a {
  color: var(--gold);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--foreground);
}

a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

.site-header {
  border-bottom: 1px solid var(--outline);
}

.header-inner,
.page-shell,
.site-footer {
  width: min(calc(100% - 40px), var(--content-width));
  margin-inline: auto;
}

.header-inner {
  width: min(calc(100% - 40px), 1120px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--foreground);
  font-weight: 750;
  text-decoration: none;
}

.brand-mark {
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
}

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

.site-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--foreground);
}

.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--coral);
  text-underline-offset: 8px;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--outline);
  border-radius: 12px;
  white-space: nowrap;
}

.language-switch a,
.language-switch .language-current {
  display: inline-flex;
  min-width: 42px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding-inline: 8px;
  border-radius: 9px;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.language-switch .language-current {
  background: var(--surface);
  color: var(--foreground);
}

.page-shell {
  padding-block: 64px 88px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--coral);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--foreground);
  line-height: 1.2;
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  font-weight: 600;
  letter-spacing: -0.035em;
}

h2 {
  margin: 0 0 14px;
  font-size: 1.45rem;
}

h3 {
  margin: 26px 0 8px;
  font-size: 1rem;
}

p,
ul,
ol {
  margin-block: 0 18px;
}

ul,
ol {
  padding-left: 1.25rem;
}

li + li {
  margin-top: 7px;
}

.lede {
  margin-top: 22px;
  color: var(--muted);
  font-size: 1.1rem;
}

.meta {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.page-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.page-link {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  padding: 0 18px;
  border: 1px solid var(--outline);
  border-radius: 14px;
  background: var(--surface);
  color: var(--foreground);
  font-weight: 700;
  text-decoration: none;
}

.page-link-primary {
  border-color: var(--coral);
  background: var(--coral);
  color: white;
}

.page-link-primary:hover {
  color: white;
}

.notice {
  margin-top: 30px;
  padding: 16px 18px;
  border-left: 3px solid var(--green);
  background: var(--surface);
  color: var(--muted);
}

.privacy-action {
  margin: 16px 0 0;
  color: var(--muted);
}

.policy-content,
.changelog {
  margin-top: 50px;
}

.policy-section,
.release {
  padding-block: 30px;
  border-top: 1px solid var(--outline);
}

.policy-section > :last-child,
.release > :last-child {
  margin-bottom: 0;
}

.release-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.release-header h2,
.release-header p {
  margin: 0;
}

.release-header p {
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-block: 28px 42px;
  border-top: 1px solid var(--outline);
  color: var(--muted);
  font-size: 0.88rem;
}

.landing-shell,
.landing-footer {
  width: min(calc(100% - 40px), 1120px);
  margin-inline: auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(32px, 7vw, 96px);
  padding-block: 96px 112px;
}

.hero h1 {
  max-width: 680px;
  font-size: clamp(3rem, 5.4vw, 5.4rem);
  line-height: 1.07;
}

.hero h1 em {
  color: var(--gold);
  font-style: normal;
}

.hero-lede {
  max-width: 510px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.65;
}

.store-links {
  align-items: center;
  margin-top: 36px;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
}

.store-badge img {
  display: block;
  width: auto;
  height: 48px;
}

.study-preview {
  min-width: 0;
  margin: 0;
  padding: 28px;
  border: 1px solid var(--outline);
  border-radius: 28px;
  background: var(--surface);
}

.preview-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--outline);
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.preview-divider {
  padding-inline: 8px;
  color: var(--gold);
}

.preview-step {
  white-space: nowrap;
}

.preview-intro {
  padding-top: 32px;
}

.preview-kicker,
.feature-number {
  color: var(--gold);
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.17em;
}

.preview-intro h2 {
  margin: 14px 0 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.9rem, 3vw, 2.7rem);
  font-weight: 500;
  line-height: 1.2;
}

.preview-intro h2 span {
  color: var(--gold);
}

.preview-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.tree-diagram {
  max-width: 320px;
  margin: 30px auto 0;
  text-align: center;
}

.tree-node {
  position: relative;
  display: flex;
  width: 106px;
  min-height: 104px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--outline);
  border-radius: 18px;
  background: var(--background);
}

.tree-root {
  margin-inline: auto;
  border-color: var(--gold);
}

.node-character {
  color: var(--foreground);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.2rem;
  line-height: 1.25;
}

.tree-root .node-character {
  color: var(--gold);
}

.node-meaning {
  color: var(--muted);
  font-size: 0.73rem;
}

.tree-children {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 52px;
}

.tree-root::after,
.tree-children::before,
.tree-children .tree-node::before {
  position: absolute;
  background: var(--outline);
  content: "";
}

.tree-root::after {
  top: 100%;
  left: 50%;
  width: 1px;
  height: 26px;
}

.tree-children::before {
  top: -26px;
  right: 53px;
  left: 53px;
  height: 1px;
}

.tree-children .tree-node::before {
  bottom: 100%;
  left: 50%;
  width: 1px;
  height: 26px;
}

.study-preview figcaption {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--outline);
  color: var(--muted);
  font-size: 0.76rem;
}

.features {
  padding-block: 76px 96px;
  border-top: 1px solid var(--outline);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  align-items: end;
  gap: 48px;
  margin-bottom: 44px;
}

.section-heading h2,
.offline-section h2,
.download-section h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.section-heading > p,
.offline-section > p {
  margin: 0;
  color: var(--muted);
}

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

.feature {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--outline);
  border-radius: 24px;
  background: var(--surface);
}

.feature-glyph {
  display: block;
  margin-block: 24px 12px;
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.4rem;
  line-height: 1;
}

.feature:nth-child(2) .feature-glyph {
  color: var(--coral);
}

.feature:nth-child(3) .feature-glyph {
  color: var(--green);
}

.feature h3 {
  margin: 0 0 8px;
  font-size: 1.16rem;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.offline-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 64px;
  padding-block: 60px;
  border-top: 1px solid var(--outline);
}

.download-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 48px;
  margin-block: 36px 96px;
  padding: 48px;
  border-radius: 28px;
  background: var(--cream);
  color: var(--background);
}

.download-section .eyebrow {
  color: #a3331d;
}

.download-section h2 {
  color: var(--background);
}

.download-section p:not(.eyebrow) {
  margin: 12px 0 0;
  color: #43434a;
}

.download-section .app-languages {
  font-size: 0.9rem;
}

.app-languages span {
  white-space: nowrap;
}

.download-section .store-links {
  margin-top: 0;
}


@media (max-width: 880px) {
  .hero {
    gap: 32px;
  }

  .hero h1 {
    font-size: clamp(2.9rem, 6vw, 4rem);
  }

  .study-preview {
    padding: 20px;
  }

  .feature {
    padding: 20px;
  }

  .download-section {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 700px) {
  .hero,
  .section-heading,
  .offline-section {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-block: 64px 80px;
  }

  .study-preview {
    max-width: 460px;
    width: 100%;
    margin-inline: auto;
  }

  .section-heading,
  .offline-section {
    gap: 16px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature-glyph {
    margin-block: 16px 8px;
  }

  .features {
    padding-block: 64px;
  }
}

@media (max-width: 620px) {
  .header-inner,
  .page-shell,
  .site-footer,
  .landing-shell,
  .landing-footer {
    width: min(calc(100% - 32px), var(--content-width));
  }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    padding-block: 14px;
  }

  .site-nav {
    width: 100%;
    justify-content: flex-start;
    gap: 12px;
  }

  .page-shell {
    padding-block: 48px 68px;
  }

  .hero h1 {
    font-size: clamp(2.8rem, 11vw, 3.7rem);
  }

  .download-section {
    margin-bottom: 68px;
    padding: 28px 22px;
  }

  .release-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
