body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  width: 100%;
}

/* ——— Centered content well (~1100px) ——— */
main .container,
.site-header .container,
.site-footer .container {
  width: min(92vw, 68.75rem);
  margin-left: auto;
  margin-right: auto;
}

/* ——— Header ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line-strong);
  box-shadow: 0 1px 0 rgba(44, 42, 40, 0.06);
}

.site-header .container {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.logo:hover {
  color: var(--accent);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.95rem;
}

.nav-links a:not(.btn) {
  color: var(--ink-muted);
  text-decoration: none;
}

.nav-links a:not(.btn):hover {
  color: var(--accent);
  text-decoration: underline;
}

.nav-signed-in {
  font-size: 0.85rem;
  color: var(--ink-faint);
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-logout-btn {
  all: unset;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink-muted);
  cursor: pointer;
}

.nav-logout-btn:hover {
  color: var(--accent);
  text-decoration: underline;
}

.hero-signed-in {
  margin: 0.85rem 0 0;
  font-size: 0.85rem;
  color: var(--ink-faint);
}

.hero-signed-in strong {
  font-weight: 600;
  color: var(--ink-muted);
}

/* ——— Hero ——— */
.hero {
  padding: 3rem 0 4rem;
  background: var(--paper);
}

@media (min-width: 768px) {
  .hero {
    padding: 4rem 0 5rem;
  }
}

.hero-grid {
  display: grid;
  gap: 2.75rem;
  align-items: center;
  text-align: left;
}

@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 55fr 45fr;
    gap: 3rem 4rem;
  }
}

.hero-copy {
  max-width: 38rem;
}

.hero-eyebrow {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-muted);
  margin: 0 0 0.85rem;
  letter-spacing: 0.01em;
}

.hero h1 {
  font-size: clamp(1.75rem, 3.2vw, 2.35rem);
  font-weight: 600;
  margin: 0 0 1.15rem;
  max-width: 22ch;
  letter-spacing: -0.02em;
  line-height: 1.28;
}

.hero .lead {
  font-size: 1.0625rem;
  color: var(--ink-muted);
  max-width: 52ch;
  margin: 0 0 1.65rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.hero-aside {
  margin: 1.35rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-faint);
  max-width: 46ch;
  line-height: 1.6;
}

.hero-aside strong {
  color: var(--ink-muted);
  font-weight: 700;
}

/* ——— Reader mockup ——— */
.reader-mockup {
  margin: 0;
  width: 100%;
  max-width: 20rem;
}

@media (min-width: 768px) {
  .reader-mockup {
    justify-self: center;
    max-width: 19rem;
  }
}

.reader-mockup__frame {
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  overflow: hidden;
  box-shadow:
    0 1px 2px rgba(44, 42, 40, 0.04),
    0 8px 24px rgba(44, 42, 40, 0.07);
}

.reader-mockup__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0.95rem;
  border-bottom: 1px solid var(--line);
  background: var(--paper-warm);
}

.reader-mockup__brand {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-muted);
}

.reader-mockup__progress {
  font-size: 0.75rem;
  color: var(--ink-faint);
}

.reader-mockup__source {
  margin: 0;
  padding: 0.55rem 0.95rem 0;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: var(--paper);
}

.reader-mockup__body {
  padding: 1.25rem 1.1rem 1.75rem;
  min-height: 7.5rem;
  background: linear-gradient(180deg, var(--paper) 0%, #faf7f2 100%);
}

.reader-mockup__body p {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  line-height: 1.55;
  color: var(--ink);
  text-align: left;
}

.reader-mockup__body em {
  font-style: italic;
  color: var(--accent);
  font-weight: 600;
}

.reader-mockup__footer {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.7rem 0.95rem;
  border-top: 1px solid var(--line);
  background: var(--paper-warm);
}

.reader-mockup__btn {
  display: inline-block;
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
}

.reader-mockup__btn--ghost {
  background: transparent;
  color: var(--ink-muted);
  border: 1px solid var(--line-strong);
}

/* ——— Prose sections ——— */
.prose-section {
  padding: 3rem 0 3.25rem;
  border-top: 1px solid var(--line);
  background: var(--paper-warm);
}

.prose-section--plain {
  background: var(--paper);
}

.prose-section h2 {
  font-size: 1.45rem;
  font-weight: 600;
  margin: 0 0 1.35rem;
  max-width: var(--measure);
  line-height: 1.32;
  letter-spacing: -0.01em;
}

.section-lead {
  margin: -0.75rem 0 1.5rem;
  color: var(--ink-faint);
  font-size: 0.95rem;
}

.prose-with-visual {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 768px) {
  .prose-with-visual {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3rem 4rem;
  }

  .prose-with-visual--flip {
    grid-template-columns: 0.85fr 1.15fr;
  }
}

.prose-block {
  max-width: 44rem;
  min-width: 0;
}

.prose-block p {
  margin: 0 0 1.15rem;
  color: var(--ink-muted);
  max-width: 58ch;
  line-height: 1.7;
  overflow-wrap: break-word;
  word-break: normal;
}

@media (min-width: 768px) {
  .prose-with-visual--flip .prose-block {
    justify-self: end;
  }

  .prose-with-visual--flip .prose-block p {
    margin-left: auto;
  }
}

.prose-block p:last-child {
  margin-bottom: 0;
}

/* ——— Reading illustration ——— */
.reading-visual {
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

@media (min-width: 768px) {
  .reading-visual {
    justify-content: flex-end;
  }

  .prose-with-visual--flip .reading-visual {
    justify-content: flex-start;
  }
}

.reading-visual img {
  max-width: 100%;
  height: auto;
  opacity: 0.95;
}

/* ——— Split section variants ——— */
.use-cases-grid {
  display: grid;
  gap: 0;
}

@media (min-width: 768px) {
  .use-cases-grid {
    grid-template-columns: 1fr 1fr;
    column-gap: 2.5rem;
    max-width: min(52rem, 100%);
  }

  .use-cases-grid .split-item {
    flex-direction: row;
    border-bottom: none;
    padding: 1.15rem 0;
  }

  .use-cases-grid .split-item:nth-child(odd):last-child {
    grid-column: 1 / -1;
    max-width: calc(50% - 1.25rem);
    justify-self: center;
  }
}

.use-cases-grid .split-item {
  border-bottom: 1px solid var(--line);
}

.use-cases-grid .split-item:last-child {
  border-bottom: none;
}

@media (max-width: 767px) {
  .use-cases-grid .split-item--alt {
    flex-direction: row;
  }
}

/* ——— Ways to use it ——— */
.split-section {
  padding: 3rem 0 3.25rem;
  border-top: 1px solid var(--line);
  background: var(--paper-warm);
}

.split-section--plain {
  background: var(--paper);
}

.split-heading {
  font-size: 1.45rem;
  font-weight: 600;
  margin: 0 0 0.6rem;
  line-height: 1.32;
  letter-spacing: -0.01em;
}

.split-intro {
  margin: 0 0 2.25rem;
  color: var(--ink-faint);
  font-size: 0.98rem;
  max-width: 48ch;
  line-height: 1.65;
}

.split-content {
  max-width: 44rem;
}

/* Editorial split — centered intro, full-width rows, alternating icons */
.split-section--editorial .split-heading,
.split-section--editorial .split-intro {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.split-section--editorial .split-content {
  max-width: min(44rem, 100%);
  margin-inline: auto;
}

.dual-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 2rem;
  margin-top: 0.25rem;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--line);
}

.dual-sections .split-item--quiet {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
  max-width: none;
  text-align: left;
}

.dual-sections .split-item--quiet .split-item__text p {
  margin-inline: 0;
}

@media (max-width: 768px) {
  .dual-sections {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .dual-sections .split-item--quiet + .split-item--quiet {
    margin-top: 0.5rem;
    padding-top: 1.25rem;
    border-top: 1px dashed var(--line);
  }
}

@media (min-width: 768px) {
  .split-section--editorial .split-content {
    max-width: min(52rem, 100%);
  }
}

.split-item {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1.15rem 1.35rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}

.split-item--alt {
  flex-direction: row-reverse;
}

.split-item__text {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  width: auto;
}

.split-item:first-child {
  padding-top: 0;
}

.split-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.split-item--quiet {
  flex-direction: column;
  padding-top: 1.5rem;
  margin-top: 0.25rem;
  border-top: 1px dashed var(--line);
  border-bottom: none;
}

.split-item__icon {
  flex: 0 0 2.75rem;
  width: 2.75rem;
  height: 2.75rem;
  margin-top: 0.1rem;
}

.split-content h3 {
  font-size: 1.08rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
  line-height: 1.35;
}

.split-content p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.98rem;
  max-width: none;
  line-height: 1.65;
  overflow-wrap: break-word;
  word-break: normal;
}

/* ——— Steps ——— */
.steps-list {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  counter-reset: steps;
}

.steps-list li {
  counter-increment: steps;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 1rem;
  align-items: start;
}

/* Keep step copy in one column — bare text + inline code/links become separate grid items */
.steps-list li > div {
  grid-column: 2;
  min-width: 0;
  color: var(--ink-muted);
  font-size: 0.98rem;
  line-height: 1.65;
  text-align: left;
}

.steps-list li > div strong {
  color: var(--ink);
  font-weight: 700;
}

.steps-list li > div code {
  font-family: var(--font-body);
  font-size: 0.9em;
  padding: 0.12em 0.4em;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink);
  white-space: nowrap;
}

.steps-list--bullets {
  counter-reset: none;
}

.steps-list--bullets li {
  counter-increment: none;
}

.steps-list--bullets li::before {
  content: "•";
  font-size: 1.1rem;
  line-height: 1.4;
}

.steps-list li:first-child {
  padding-top: 0;
}

.steps-list li:last-child {
  border-bottom: none;
}

.steps-list li::before {
  content: counter(steps) ".";
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--ink-faint);
  font-weight: 600;
}

.steps-list strong {
  display: block;
  color: var(--ink);
  font-size: 0.98rem;
  margin-bottom: 0.2rem;
}

.steps-list span {
  color: var(--ink-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* Narrow prose — full-width band, centered inner column */
.prose-section--narrow .narrow-section-inner,
.prose-section--narrow > .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(36rem, 92vw);
  max-width: 36rem;
  margin-inline: auto;
  text-align: center;
}

.prose-section--narrow h2,
.prose-section--narrow .section-lead {
  width: 100%;
  margin-inline: auto;
}

.prose-section--narrow .steps-list--centered {
  align-self: center;
  width: min(28rem, 100%);
  margin-inline: auto;
  text-align: left;
}

/* ——— Android / narrow editorial pages ——— */
.prose-section--narrow h1 {
  font-size: clamp(1.75rem, 3.2vw, 2.1rem);
  font-weight: 600;
  margin: 0 0 1rem;
  max-width: 100%;
  letter-spacing: -0.02em;
  line-height: 1.28;
}

.prose-section--narrow .lead {
  font-size: 1.0625rem;
  color: var(--ink-muted);
  margin: 0 0 1.5rem;
  line-height: 1.7;
  max-width: 42ch;
}

.prose-section--narrow .hero-actions {
  justify-content: center;
  margin: 0 0 2rem;
}

.prose-section--narrow .field-hint {
  max-width: 38ch;
  margin: -0.5rem auto 1.5rem;
}

.prose-section--narrow .field-hint code {
  font-family: var(--font-body);
  font-size: 0.85em;
  padding: 0.1em 0.35em;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink);
}

.android-page .android-prose {
  color: var(--ink-muted);
  font-size: 0.98rem;
  line-height: 1.7;
  max-width: 42ch;
  margin: 0 auto 2rem;
}

.android-page .android-prose strong {
  color: var(--ink);
  font-weight: 700;
}

.android-page .android-back {
  margin: 2.5rem 0 0;
  font-size: 0.95rem;
}

/* ——— Closing CTA ——— */
.closing {
  padding: 2rem 0 1rem;
  background: var(--paper-warm);
  border-top: 1px solid var(--line);
}

.closing--plain {
  background: var(--paper);
}

/* Centered column — same pattern as getting-started (not the wide main .container) */
.closing--balanced .closing-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: min(36rem, 92vw);
  max-width: 36rem;
  margin-inline: auto;
  text-align: center;
}

.closing--balanced .closing-inner p {
  width: 100%;
  max-width: 40ch;
  margin: 0 0 1.35rem;
  color: var(--ink-muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.closing--balanced .closing-inner .hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
}

/* ——— Footer ——— */
.site-footer {
  margin-top: auto;
  padding: 1.75rem 0 2.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--ink-faint);
  text-align: center;
  background: var(--paper);
}

.site-footer p {
  margin: 0;
}

.site-footer [data-legal-footer] {
  margin-top: 0.65rem;
}

.site-footer .legal-footer__nav {
  justify-content: center;
  gap: 0.35rem 0.75rem;
}

/* ——— Auth pages ——— */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: var(--paper);
}

.auth-card {
  width: min(24rem, 100%);
  padding: 0;
}

.auth-card .logo {
  display: inline-block;
  margin-bottom: 2rem;
}

.auth-card h1 {
  font-size: 1.65rem;
  margin: 0 0 0.35rem;
}

.auth-card .subtitle {
  color: var(--ink-muted);
  margin: 0 0 1.75rem;
  font-size: 0.95rem;
}

.auth-switch {
  margin-top: 1.75rem;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.auth-switch a {
  font-weight: 700;
}

/* ——— Mobile landing ——— */
@media (max-width: 767px) {
  .site-header {
    padding: 1rem 0;
  }

  .site-header .container {
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
  }

  .nav-links {
    gap: 0.65rem;
    flex-wrap: wrap;
  }

  .hero {
    padding: 2rem 0 2.75rem;
  }

  .hero-grid {
    gap: 2rem;
  }

  .hero h1 {
    max-width: none;
    font-size: clamp(1.5rem, 6.5vw, 1.85rem);
  }

  .hero .lead {
    font-size: 1rem;
  }

  .hero-actions .btn {
    flex: 1 1 calc(50% - 0.35rem);
    min-width: min(100%, 9.5rem);
  }

  .reader-mockup {
    max-width: min(100%, 20rem);
    margin-inline: auto;
  }

  .prose-section,
  .split-section,
  .closing {
    padding: 2.5rem 0;
  }

  .prose-section h2,
  .split-heading {
    font-size: 1.3rem;
  }

  .split-item {
    gap: 0.85rem 1rem;
    padding: 1.15rem 0;
  }

  .split-item--alt {
    flex-direction: row;
  }

  .split-item__icon {
    flex-basis: 2.5rem;
    width: 2.5rem;
    height: 2.5rem;
  }

  .split-section--editorial .split-heading,
  .split-section--editorial .split-intro {
    text-align: left;
  }

  .closing--balanced .closing-inner {
    text-align: center;
  }

  .closing--balanced .closing-inner .hero-actions {
    justify-content: center;
  }

  .site-footer {
    padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 359px) {
  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
    flex: 1 1 auto;
  }

  .split-item__icon {
    flex-basis: 2.25rem;
    width: 2.25rem;
    height: 2.25rem;
  }
}

/* ——— Pricing ——— */
.pricing-section {
  padding: 4rem 0;
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.pricing-header {
  text-align: center;
  max-width: 42rem;
  margin: 0 auto 2rem;
}

.pricing-header h2 {
  margin-bottom: 0.75rem;
}

.pricing-free-card {
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 2rem;
}

.pricing-free-copy h3 {
  margin-top: 0;
}

.pricing-free-list {
  margin: 1rem 0 1.25rem;
  padding-left: 1.25rem;
  color: var(--ink-muted);
}

.pricing-free-list li + li {
  margin-top: 0.35rem;
}

.pricing-topup h3 {
  margin-bottom: 0.5rem;
}

.pricing-topup-lead {
  color: var(--ink-muted);
  max-width: 44rem;
  margin-bottom: 0.75rem;
}

.pricing-currency-note {
  font-size: 0.85rem;
  color: var(--ink-faint);
  margin-bottom: 1rem;
}

.pricing-packs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.pricing-pack {
  position: relative;
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.pricing-pack--featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(0, 128, 128, 0.15);
}

.pricing-pack-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--accent-soft, #e8f4fc);
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
}

.pricing-pack-title {
  margin: 0;
  font-size: 1rem;
}

.pricing-pack-credits {
  margin: 0;
  color: var(--ink-muted);
}

.pricing-pack-price {
  margin: 0.25rem 0 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--ink);
}

.pricing-pack-per {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--ink-faint);
}

.pricing-pack .btn {
  margin-top: auto;
  align-self: flex-start;
}

.pricing-footnote {
  font-size: 0.85rem;
  color: var(--ink-faint);
  max-width: 44rem;
}

.pricing-loading {
  color: var(--ink-muted);
}

@media (max-width: 820px) {
  .pricing-packs {
    grid-template-columns: 1fr;
  }
}
