/* Olima landing. Tokens follow docs/brandbook.md (Mediterranean Smart Notebook). */

/* Onest (OFL-1.1, ./fonts/onest/LICENSE), bundled: no request leaves for Google Fonts.
   Latin + Cyrillic subsets, the weights the page uses. */
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/onest/onest-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("./fonts/onest/onest-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./fonts/onest/onest-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/onest/onest-cyrillic-400-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("./fonts/onest/onest-cyrillic-500-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./fonts/onest/onest-cyrillic-600-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Orchidea Pro";
  src: url("./fonts/OrchideaPro-Medium.woff2") format("woff2"), url("./fonts/OrchideaPro-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Orchidea Pro";
  src: url("./fonts/OrchideaPro-MediumItalic.woff2") format("woff2"), url("./fonts/OrchideaPro-MediumItalic.otf") format("opentype");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: var(--o-canvas);
  --sheet: var(--o-card);
  --neutral: var(--o-subtle);
  --ink: var(--o-ink);
  --ink-soft: var(--o-ink-2);
  --muted: var(--o-muted);
  --line: var(--o-line);
  --olive: var(--o-olive);
  --olive-hover: var(--o-olive-hover);
  --on-olive: var(--o-on-olive);
  --matcha: var(--o-matcha);
  --matcha-line: var(--o-matcha-line);
  --good-ink: var(--o-sage-ink);
  --terra: var(--o-terra);
  --terra-bg: var(--o-terra-bg);
  --terra-line: var(--o-terra-line);
  --terra-ink: var(--o-terra-ink);
  --shadow-ui: 0 4px 20px -2px rgba(28, 25, 23, 0.06);
  --shadow-paper: 0 1px 2px rgba(28, 25, 23, 0.05), 0 24px 48px -28px rgba(28, 25, 23, 0.28);

  --font: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Orchidea Pro", "Iowan Old Style", "Palatino Linotype", Palatino, serif;

  /* Type scale (ratio ~1.25) */
  --t-sm: 0.875rem;
  --t-base: 1.0625rem;
  --t-md: 1.25rem;
  --t-lg: clamp(1.4rem, 2.2vw, 1.6rem);
  --t-xl: clamp(2rem, 4vw, 2.85rem);

  --pad: clamp(1rem, 4vw, 3rem);
  --max: 1140px;
  --gap-section: clamp(4.5rem, 11vw, 8.5rem);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --shadow-ui: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
    --shadow-paper: 0 1px 2px rgba(0, 0, 0, 0.3), 0 24px 48px -28px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --shadow-ui: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
  --shadow-paper: 0 1px 2px rgba(0, 0, 0, 0.3), 0 24px 48px -28px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--t-base);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  font-family: var(--display);
  font-weight: 500;
  margin: 0;
  text-wrap: balance;
}

h2 {
  font-size: var(--t-xl);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

h3 {
  font-size: var(--t-lg);
  line-height: 1.2;
  letter-spacing: -0.015em;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 3px;
  border-radius: 6px;
}

[hidden] {
  display: none !important;
}

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--olive);
  color: var(--on-olive);
  padding: 0.55rem 0.9rem;
  z-index: 100;
  border-radius: 8px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
}

.wordmark {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--olive);
}

/* —— Header —— */
.top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}

.top.is-scrolled {
  border-bottom-color: var(--line);
}

.top-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.8rem var(--pad);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
}

.brand-mark {
  display: block;
  flex-shrink: 0;
}

.brand .wordmark {
  font-size: 1.65rem;
  line-height: 1;
}

.top-nav {
  display: none;
  gap: 1.5rem;
  margin-left: auto;
  font-size: 0.925rem;
  color: var(--ink-soft);
}

.top-nav a {
  text-decoration: none;
}

.top-nav a:hover {
  color: var(--olive);
}

@media (min-width: 900px) {
  .top-nav {
    display: flex;
  }
}

/* —— Buttons —— */
.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1.4rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: background-color 150ms ease;
}

.btn-sm {
  min-height: 2.4rem;
  padding: 0.4rem 1rem;
  font-size: 0.9rem;
}

.btn-primary {
  background: var(--olive);
  color: var(--on-olive);
}

.btn-primary:hover {
  background: var(--olive-hover);
}

.cta-alt {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.cta-alt:hover {
  color: var(--olive);
}

/* —— Hero —— */
.hero {
  display: grid;
  gap: 3rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2.5rem, 7vh, 5rem) var(--pad) 0;
  align-items: center;
}

@media (min-width: 980px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 4rem;
    min-height: calc(100svh - 4.2rem);
    padding-bottom: 3rem;
  }
}

.hero-copy {
  min-width: 0;
  container-type: inline-size;
}

.hero-title {
  margin: 0;
  font-size: clamp(2.7rem, 6.4cqi + 1rem, 5.2rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.hero-line {
  display: block;
}

.hero-line-2 {
  margin-top: 0.06em;
  color: var(--olive);
}

.hero-terms {
  display: grid;
  gap: 0.5rem;
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
  font-size: var(--t-sm);
  color: var(--ink-soft);
}

.hero-terms li {
  position: relative;
  padding-left: 1.2rem;
}

.hero-terms li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.4em;
  width: 0.6rem;
  height: 0.32rem;
  border-left: 2px solid var(--olive);
  border-bottom: 2px solid var(--olive);
  transform: rotate(-45deg);
}

.hero-sub {
  margin-top: 1.6rem;
  max-width: 36ch;
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  line-height: 1.5;
  color: var(--ink-soft);
}

.hero-copy .cta {
  margin-top: 2rem;
}

/* —— Hero demo: student card + pre-lesson cheat sheet —— */
.demo {
  margin: 0;
  display: grid;
  min-width: 0;
}

.student {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.3rem 1.3rem 1.1rem;
  box-shadow: var(--shadow-paper);
}

.student-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.student-avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--matcha);
  color: var(--good-ink);
  font-family: var(--display);
  font-size: 1.35rem;
}

.student-name {
  font-size: 1.45rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.student-meta {
  font-size: 0.85rem;
  color: var(--muted);
}

.topics {
  list-style: none;
  margin: 1.15rem 0 0;
  padding: 0;
  display: grid;
}

.topic {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.15rem 1rem;
  padding: 0.7rem 0.2rem 0.7rem 1.65rem;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}

/* Status mark on the left: filled = mastered, terra = recurring mistake, ring = next */
.topic::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 1.02rem;
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  background: var(--olive);
  transition: background-color 300ms ease, box-shadow 300ms ease;
}

.topic-gap::before {
  background: var(--terra);
}

.topic-next::before {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--muted);
}

.topic-name {
  color: var(--ink);
}

.topic-state {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--good-ink);
}

.topic-gap .topic-state {
  color: var(--terra-ink);
}

.topic-next .topic-state,
.topic-next .topic-name {
  color: var(--muted);
}

.topic-live.is-changed {
  animation: settle 1.6s ease-out;
}

@keyframes settle {
  0% {
    background: var(--matcha);
  }
  100% {
    background: transparent;
  }
}

.demo.is-pending .topic-live::before {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--olive);
}

.demo.is-pending .topic-live .topic-state {
  color: var(--muted);
}

.student-update {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
  transition: opacity 400ms ease;
}

.update-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--olive);
}

.demo.is-pending .student-update {
  opacity: 0;
}

/* The cheat sheet overlaps the card's corner, like a note tucked into a notebook */
.prep {
  position: relative;
  margin: -0.75rem 0.6rem 0 1.4rem;
  padding: 1rem 1.15rem 1.05rem;
  background: var(--matcha);
  border: 1px solid var(--matcha-line);
  border-radius: 14px;
  box-shadow: var(--shadow-ui);
  transition: opacity 450ms ease, transform 450ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: 250ms;
}

.demo.is-pending .prep {
  opacity: 0;
  transform: translateY(10px);
}

.prep-when {
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--good-ink);
}

.prep-list {
  list-style: none;
  margin: 0.55rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.prep-list b {
  font-weight: 600;
  color: var(--ink);
}

.demo .note-margin {
  margin-top: 1.1rem;
  padding: 0 0.2rem;
  max-width: 44ch;
}

@media (min-width: 980px) {
  .prep {
    margin: -1.1rem -1rem 0 3rem;
  }
}

/* Margin notes: Orchidea italic, like a pencil note */
.note-margin {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.02rem;
  line-height: 1.35;
  color: var(--olive);
}

/* —— Pain —— */
.pain {
  margin-top: var(--gap-section);
  background: var(--neutral);
  border-block: 1px solid var(--line);
}

.pain-inner {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6rem) var(--pad);
}

@media (min-width: 900px) {
  .pain-inner {
    grid-template-columns: 1.1fr 1fr;
    gap: 5rem;
  }
}

.pain-copy {
  display: grid;
  gap: 1.1rem;
  max-width: 34rem;
}

.pain-copy p {
  color: var(--ink-soft);
}

.pain-copy p:last-child {
  font-family: var(--display);
  font-size: var(--t-md);
  color: var(--ink);
}

.chat {
  max-width: 400px;
  margin: 0 auto;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-ui);
  overflow: hidden;
  font-size: 0.92rem;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
}

.chat-head b {
  display: block;
  font-weight: 600;
}

.chat-head small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.chat-avatar {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--terra-bg);
  color: var(--terra-ink);
  font-weight: 600;
}

.chat-body {
  display: grid;
  gap: 0.6rem;
  padding: 1rem;
  background: var(--paper);
}

.bubble {
  position: relative;
  max-width: 85%;
  padding: 0.6rem 0.8rem 1.25rem;
  border-radius: 16px;
  line-height: 1.4;
}

.bubble small {
  position: absolute;
  right: 0.7rem;
  bottom: 0.3rem;
  font-size: 0.7rem;
  color: var(--muted);
}

.bubble-in {
  justify-self: start;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-bottom-left-radius: 6px;
}

.bubble-out {
  justify-self: end;
  background: var(--matcha);
  border-bottom-right-radius: 6px;
}

.chat-input {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.8rem;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
}

.chat-input small {
  font-size: 0.75rem;
  color: var(--terra-ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.caret {
  display: inline-block;
  width: 1.5px;
  height: 1.05em;
  vertical-align: -0.15em;
  background: var(--ink);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* —— How —— */
.how {
  max-width: var(--max);
  margin: var(--gap-section) auto 0;
  padding: 0 var(--pad);
}

.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 2.25rem;
  margin: 2.75rem 0 0;
  padding: 0;
}

@media (min-width: 860px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
  }
}

.steps li {
  counter-increment: step;
  display: grid;
  gap: 0.6rem;
  align-content: start;
  padding-top: 1.1rem;
  border-top: 2px solid var(--olive);
}

.steps li::before {
  content: counter(step);
  font-family: var(--display);
  font-size: 2.6rem;
  line-height: 1;
  color: var(--olive);
}

.steps p {
  color: var(--ink-soft);
  max-width: 34ch;
}

/* —— Report sheet —— */
.report {
  max-width: var(--max);
  margin: var(--gap-section) auto 0;
  padding: 0 var(--pad);
}

.section-head {
  display: grid;
  gap: 0.9rem;
  max-width: 40rem;
}

.section-head p {
  font-size: var(--t-md);
  color: var(--ink-soft);
}

.sheet-wrap {
  margin-top: 2.5rem;
}

.period {
  display: inline-flex;
  gap: 0.25rem;
  margin-bottom: 1rem;
  padding: 0.25rem;
  background: var(--neutral);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.period-btn {
  font: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: 999px;
  padding: 0.45rem 1.05rem;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

.period-btn:hover {
  color: var(--olive);
}

.period-btn[aria-pressed="true"] {
  background: var(--sheet);
  color: var(--ink);
  box-shadow: var(--shadow-ui);
}

.sheet {
  max-width: 980px;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow-paper);
  padding: clamp(1.4rem, 4vw, 3rem) clamp(1.2rem, 4vw, 3.25rem);
}

.sheet-head {
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--line);
}

.sheet-meta {
  font-size: var(--t-sm);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.sheet-title {
  margin-top: 0.3rem;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.025em;
}

.sheet-row {
  display: grid;
  gap: 0.6rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}

.sheet-row-last {
  border-bottom: 0;
  padding-bottom: 0;
}

/* On mobile the margin note sits above the block it explains */
.sheet-row .note-margin {
  order: -1;
  font-size: 0.98rem;
}

@media (min-width: 820px) {
  .sheet-row {
    grid-template-columns: minmax(0, 1fr) 15rem;
    gap: 3rem;
  }

  .sheet-row .note-margin {
    order: 0;
    padding-left: 1.25rem;
    border-left: 1px solid var(--matcha-line);
    align-self: start;
    margin-top: 1.6rem;
  }
}

.sheet-block {
  display: grid;
  gap: 0.6rem;
  min-width: 0;
}

.sheet-block h4 {
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
}

.sheet-block p {
  color: var(--ink-soft);
  max-width: 62ch;
}

.sheet-block b {
  font-weight: 600;
  color: var(--ink);
}

.sheet-summary {
  font-family: var(--display);
  font-size: clamp(1.25rem, 2vw, 1.45rem);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.sheet-block .sheet-summary {
  color: var(--ink);
}

.formula {
  font-family: var(--display);
  font-size: 1.1rem;
  padding: 0.65rem 0.9rem;
  background: var(--neutral);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow-x: auto;
  white-space: nowrap;
}

.sheet-block .formula {
  color: var(--ink);
}

.sheet-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.sheet-list li {
  padding: 0.55rem 0.8rem;
  background: var(--matcha);
  border-radius: 10px;
}

.compare {
  display: grid;
  gap: 0.6rem;
}

@media (min-width: 620px) {
  .compare {
    grid-template-columns: 1fr 1fr;
  }
}

.compare > div {
  display: grid;
  gap: 0.4rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1px solid;
  min-width: 0;
}

.compare span {
  font-size: 0.82rem;
  font-weight: 600;
}

.compare .formula {
  background: transparent;
  border: 0;
  padding: 0;
  font-size: 1.02rem;
}

.compare-wrong {
  background: var(--terra-bg);
  border-color: var(--terra-line) !important;
}

.compare-wrong span {
  color: var(--terra-ink);
}

.compare-right {
  background: var(--matcha);
  border-color: var(--matcha-line) !important;
}

.compare-right span {
  color: var(--good-ink);
}

.sheet-block-next {
  padding: 1rem 1.1rem;
  background: var(--neutral);
  border-radius: 12px;
}

/* —— Parents —— */
.parents {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  max-width: var(--max);
  margin: var(--gap-section) auto 0;
  padding: 0 var(--pad);
}

@media (min-width: 900px) {
  .parents {
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
  }

  .parents-visual {
    order: -1;
  }
}

.parents-copy {
  display: grid;
  gap: 1.1rem;
  max-width: 34rem;
}

.parents-copy p {
  color: var(--ink-soft);
}

.chat-sent .chat-body {
  padding: 1.25rem 1rem;
}

.link-card {
  display: grid;
  gap: 0.2rem;
  margin-top: 0.5rem;
  padding: 0.6rem 0.75rem;
  background: var(--sheet);
  border: 1px solid var(--matcha-line);
  border-radius: 8px;
  font-size: 0.85rem;
}

.link-card b {
  font-weight: 600;
}

.link-card span {
  color: var(--ink-soft);
}

.link-card small {
  position: static;
  color: var(--olive);
  font-size: 0.75rem;
}

/* —— Privacy —— */
.privacy {
  margin-top: var(--gap-section);
  background: var(--matcha);
  border-block: 1px solid var(--matcha-line);
}

.privacy-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6rem) var(--pad);
}

.privacy h2 {
  max-width: 16ch;
}

.facts {
  display: grid;
  gap: 1.75rem 3rem;
  margin: 2.75rem 0 0;
}

@media (min-width: 760px) {
  .facts {
    grid-template-columns: 1fr 1fr;
  }
}

.facts > div {
  display: grid;
  gap: 0.4rem;
  align-content: start;
  padding-top: 1rem;
  border-top: 1px solid var(--matcha-line);
}

.facts dt {
  font-family: var(--display);
  font-size: var(--t-lg);
  letter-spacing: -0.015em;
  color: var(--good-ink);
}

.facts dd {
  margin: 0;
  color: var(--ink-soft);
  max-width: 44ch;
}

/* —— Early access deal —— */
.deal {
  max-width: var(--max);
  margin: var(--gap-section) auto 0;
  padding: 0 var(--pad);
}

.deal-grid {
  display: grid;
  gap: 1rem;
  margin-top: 2.5rem;
}

@media (min-width: 820px) {
  .deal-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }
}

.deal-card {
  display: grid;
  gap: 1.25rem;
  align-content: start;
  padding: clamp(1.5rem, 4vw, 2.4rem);
  border-radius: 24px;
}

.deal-give {
  background: var(--olive);
  color: var(--on-olive);
}

.deal-ask {
  background: var(--sheet);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-ui);
}

.deal-card h3 {
  font-size: var(--t-lg);
}

.deal-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.deal-list li {
  position: relative;
  padding-left: 1.75rem;
  line-height: 1.5;
}

.deal-list li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.45em;
  width: 0.8rem;
  height: 0.42rem;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.deal-give .deal-list li {
  color: color-mix(in srgb, var(--on-olive) 86%, transparent);
}

.deal-give .deal-list b {
  color: var(--on-olive);
  font-weight: 600;
}

.deal-ask .deal-list li {
  color: var(--ink-soft);
}

.deal-ask .deal-list li::before {
  border-color: var(--olive);
}

.deal-ask .deal-list b {
  color: var(--ink);
  font-weight: 600;
}

.deal-exit {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-family: var(--display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--olive);
}

.timeline {
  list-style: none;
  display: grid;
  gap: 1.25rem;
  margin: 2.5rem 0 0;
  padding: 0;
}

@media (min-width: 820px) {
  .timeline {
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
  }
}

.timeline li {
  display: grid;
  gap: 0.3rem;
  align-content: start;
  padding-top: 0.9rem;
  border-top: 2px solid var(--matcha-line);
}

.timeline li:last-child {
  border-top-color: var(--olive);
}

.timeline b {
  font-family: var(--display);
  font-weight: 500;
  font-size: var(--t-md);
  color: var(--olive);
}

.timeline span {
  font-size: 0.95rem;
  color: var(--ink-soft);
  max-width: 28ch;
}

.privacy-lead {
  margin-top: 1.1rem;
  max-width: 52ch;
  font-size: var(--t-md);
  color: var(--ink-soft);
}

/* —— Apply form —— */
.apply {
  display: grid;
  gap: 2.5rem;
  max-width: var(--max);
  margin: var(--gap-section) auto 0;
  padding: 0 var(--pad);
}

@media (min-width: 960px) {
  .apply {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 4.5rem;
    align-items: start;
  }

  .apply-intro {
    position: sticky;
    top: 6rem;
  }
}

.apply-intro {
  display: grid;
  gap: 1.1rem;
}

.apply-intro > p {
  font-size: var(--t-md);
  color: var(--ink-soft);
}

.apply-fit {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 1.1rem 1.2rem;
  display: grid;
  gap: 0.6rem;
  background: var(--matcha);
  border: 1px solid var(--matcha-line);
  border-radius: 16px;
  color: var(--good-ink);
  font-size: 0.95rem;
}

.apply-fit li {
  position: relative;
  padding-left: 1.5rem;
}

.apply-fit li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.42em;
  width: 0.7rem;
  height: 0.36rem;
  border-left: 2px solid var(--olive);
  border-bottom: 2px solid var(--olive);
  transform: rotate(-45deg);
}

.apply-form,
.apply-done {
  display: grid;
  gap: 1.35rem;
  padding: clamp(1.4rem, 4vw, 2.4rem);
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-paper);
}

.field {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.field label,
.field legend {
  padding: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}

/* Safari lays out a fieldset's rendered legend outside the grid and doesn't wrap it,
   so long questions ran past the card. A floated legend is an ordinary grid item. */
.field legend {
  float: left;
  width: 100%;
  margin: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.optional {
  font-weight: 400;
  color: var(--muted);
}

.field input[type="text"],
.field textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.9rem;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.field textarea {
  resize: vertical;
  min-height: 5.5rem;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted);
}

.field input[type="text"]:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--olive);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--olive) 20%, transparent);
}

.field.is-invalid input[type="text"] {
  border-color: var(--terra);
}

.field.is-invalid legend,
.field.is-invalid > label {
  color: var(--terra-ink);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chips label {
  position: relative;
  font-weight: 500;
  cursor: pointer;
}

.chips input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.chips span {
  display: inline-flex;
  align-items: center;
  min-height: 2.6rem;
  padding: 0.45rem 1rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.chips label:hover span {
  border-color: var(--olive);
}

.chips input:checked + span {
  color: var(--on-olive);
  background: var(--olive);
  border-color: var(--olive);
}

.chips input:focus-visible + span {
  outline: 2px solid var(--olive);
  outline-offset: 2px;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.captcha-slot:empty {
  display: none;
}

.form-error {
  padding: 0.75rem 0.9rem;
  font-size: 0.95rem;
  color: var(--terra-ink);
  background: var(--terra-bg);
  border: 1px solid var(--terra-line);
  border-radius: 12px;
}

.btn-wide {
  width: 100%;
  cursor: pointer;
}

.btn[disabled] {
  opacity: 0.65;
  cursor: progress;
}

.form-legal {
  font-size: 0.8rem;
  color: var(--muted);
}

.form-legal a,
.faq-body a,
.deal-more a {
  color: var(--olive);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.deal-more {
  margin: 1.75rem 0 0;
  font-size: 0.95rem;
}

.deal-more a::after {
  content: " →";
}

.apply-done {
  justify-items: start;
  align-content: start;
}

.apply-done:focus {
  outline: none;
}

.apply-done-mark {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  font-size: 1.4rem;
  color: var(--on-olive);
  background: var(--olive);
  border-radius: 50%;
}

.apply-done p {
  color: var(--ink-soft);
  max-width: 48ch;
}

.apply-done .apply-done-note {
  padding: 0.8rem 1rem;
  background: var(--neutral);
  border-radius: 12px;
}

/* —— Language switch —— */
.lang {
  position: relative;
  margin-left: auto;
}

.lang-current {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.4rem;
  padding: 0.3rem 0.75rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

.lang-current::after {
  content: "";
  width: 0.38rem;
  height: 0.38rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.lang-current:hover {
  color: var(--olive);
  border-color: var(--olive);
}

.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  z-index: 50;
  min-width: 10rem;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-paper);
}

.lang-menu button {
  display: block;
  width: 100%;
  padding: 0.55rem 0.75rem;
  font: inherit;
  font-size: 0.92rem;
  text-align: left;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
}

.lang-menu button:hover,
.lang-menu button:focus-visible {
  background: var(--neutral);
}

.lang-menu button[aria-current="true"] {
  font-weight: 600;
  color: var(--olive);
}

@media (min-width: 900px) {
  .lang {
    margin-left: 0;
  }
}

@media (max-width: 420px) {
  .top-inner {
    gap: 0.6rem;
  }

  .brand .wordmark {
    display: none;
  }
}

/* —— FAQ —— */
.faq {
  max-width: var(--max);
  margin: var(--gap-section) auto 0;
  padding: 0 var(--pad);
}

.faq-list {
  margin-top: 2rem;
  max-width: 48rem;
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 0;
  font-family: var(--display);
  font-size: var(--t-md);
  letter-spacing: -0.01em;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  flex-shrink: 0;
  width: 0.6rem;
  height: 0.6rem;
  margin-right: 0.3rem;
  border-right: 2px solid var(--olive);
  border-bottom: 2px solid var(--olive);
  transform: rotate(45deg) translateY(-25%);
  transition: transform 200ms ease;
}

.faq details[open] summary::after {
  transform: rotate(-135deg) translateY(-25%);
}

.faq summary:hover {
  color: var(--olive);
}

.faq-body {
  display: grid;
  gap: 0.85rem;
  padding: 0 0 1.4rem;
  color: var(--ink-soft);
  max-width: 62ch;
}

.faq blockquote {
  margin: 0;
  padding: 0.9rem 1.1rem;
  background: var(--neutral);
  border: 1px solid var(--matcha-line);
  border-radius: 10px;
  color: var(--ink);
}

/* —— Close —— */
.close {
  max-width: var(--max);
  margin: var(--gap-section) auto 0;
  padding: 0 var(--pad) var(--gap-section);
}

.close h2 {
  max-width: 20ch;
}

.close p {
  margin-top: 1rem;
  font-size: var(--t-md);
  color: var(--ink-soft);
  max-width: 36ch;
}

.close .cta {
  margin-top: 2rem;
}

/* —— Footer —— */
.foot {
  border-top: 1px solid var(--line);
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 1.75rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.6rem var(--pad) 2.4rem;
  font-size: var(--t-sm);
  color: var(--muted);
}

.foot .wordmark {
  font-size: 1.4rem;
}

.foot-nav {
  display: flex;
  gap: 1.25rem;
}

.foot-nav a {
  text-decoration: none;
}

.foot-nav a:hover {
  color: var(--olive);
}

.foot-copy {
  margin-left: auto;
}

.foot-legal {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  margin: 0.15rem 0 0;
}

.foot-legal a {
  color: var(--muted);
  text-decoration: none;
}

.foot-legal a:hover {
  color: var(--olive);
}

.foot-ops {
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.85em;
  color: var(--muted);
  opacity: 0.9;
}

/* —— Cookie banner —— */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  padding: 1rem var(--pad) calc(1rem + env(safe-area-inset-bottom, 0));
  background: color-mix(in srgb, var(--paper) 96%, transparent);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 28px rgba(28, 25, 23, 0.06);
  backdrop-filter: blur(8px);
}

.cookie-banner-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.cookie-banner-text {
  flex: 1 1 18rem;
  margin: 0;
  font-size: var(--t-sm);
  color: var(--ink);
  line-height: 1.45;
}

.cookie-banner-text a {
  color: var(--olive);
}

.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.cookie-banner .btn {
  min-height: 2.4rem;
  padding: 0.45rem 1rem;
  font-size: var(--t-sm);
}

.cookie-banner .cookie-reject {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}

.cookie-banner .cookie-reject:hover {
  color: var(--ink);
  border-color: var(--line-strong, var(--line));
}

@media (max-width: 640px) {
  .cookie-banner-actions {
    width: 100%;
  }
  .cookie-banner-actions .btn {
    flex: 1 1 auto;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

.nb {
  white-space: nowrap;
}

/* —— Closed testing terms page —— */
.terms {
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4rem) var(--pad) 0;
}

.terms-back {
  margin: 0 0 1.5rem;
  font-size: var(--t-sm);
}

.terms-back a {
  color: var(--muted);
}

.terms-title {
  font-size: var(--t-xl);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.terms-lead {
  margin: 1rem 0 0;
  font-size: var(--t-md);
  color: var(--ink-soft);
}

.terms-date {
  margin: 0.75rem 0 0;
  font-size: var(--t-sm);
  color: var(--muted);
}

.terms section {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.terms h2 {
  font-size: var(--t-lg);
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.terms section p {
  margin: 0.75rem 0 0;
  color: var(--ink-soft);
}

.terms section a {
  color: var(--olive);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.terms-list {
  display: grid;
  gap: 0.75rem;
  margin: 0.9rem 0 0;
  padding-left: 1.25rem;
  color: var(--ink-soft);
}

.terms-list b {
  color: var(--ink);
  font-weight: 600;
}

.terms-cta {
  margin: 3rem 0 var(--gap-section);
}

.terms-page .lang {
  margin-left: auto;
}


/* —— Start: register, confirm the email, download —— */
.start-card {
  display: grid;
  gap: 1.35rem;
  padding: clamp(1.4rem, 4vw, 2.4rem);
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-paper);
}
.start-steps {
  list-style: none;
  counter-reset: start;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.6rem;
}
.start-steps > li {
  position: relative;
  display: grid;
  gap: 0.55rem;
  justify-items: start;
  padding-left: 3rem;
  counter-increment: start;
}
.start-steps > li::before {
  content: counter(start);
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--matcha);
  border: 1px solid var(--matcha-line);
  color: var(--good-ink);
  font-weight: 600;
}
.start-steps h3 {
  margin: 0;
  font-size: 1.15rem;
}
.start-steps p {
  margin: 0;
  color: var(--ink-soft);
}
.start-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}
.start-downloads [hidden] {
  display: none;
}
.btn-soft {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-soft:hover {
  background: var(--matcha);
}
.start-note {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.start-note a {
  color: inherit;
  text-underline-offset: 3px;
}
.start-help {
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.start-help summary {
  cursor: pointer;
  width: fit-content;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.start-help p {
  margin: 0.6rem 0 0;
}


/* —— Install guides (install/mac, install/windows) —— */
.install .terms-date { padding: 0.75rem 1rem; border-radius: 0.75rem; background: var(--sheet); border: 1px solid var(--line); }
.install section .install-dl { color: var(--o-on-olive); text-decoration: none; }
.install .cmd, .start-help .cmd { display: flex; gap: 0.75rem; align-items: center; margin: 0.9rem 0 0; flex-wrap: wrap; }
.install .cmd pre, .start-help .cmd pre { flex: 1 1 18rem; margin: 0; padding: 0.85rem 1rem; overflow-x: auto; border-radius: 0.75rem; background: var(--sheet); border: 1px solid var(--line); }
.install .cmd code, .start-help .cmd code { font: 500 0.9rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink); white-space: pre; }
.install .install-hint { font-size: var(--t-sm); color: var(--muted); }
.install .install-other { margin: 2.5rem 0 var(--gap-section); color: var(--ink-soft); }
.install .install-other a { color: var(--olive); text-decoration: underline; text-underline-offset: 0.18em; }
