/* ===================================================
   HOW I BUILD WEB APPS WITH AI — AI Alchemy Theme
   =================================================== */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f7fc;
  --ink: #080b12;
  --ink-soft: #171a22;
  --navy: #101d4e;
  --purple: #8245e8;
  --purple-strong: #6d32d1;
  --purple-soft: #f1ebfd;
  --teal: #14b8b0;
  --teal-soft: #e7f8f7;
  --yellow: #ffc247;
  --yellow-soft: #fff7e3;
  --line: #e3e7f1;
  --shadow-sm: 0 8px 24px rgba(16, 29, 78, .07);
  --shadow-md: 0 20px 50px rgba(16, 29, 78, .12);
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1180px;
  --font: "Prompt", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
h1, h2, h3 {
  margin: 0 0 .55em;
  color: var(--navy);
  line-height: 1.3;
  text-wrap: balance;
}
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
strong { color: var(--navy); font-weight: 700; }

.container {
  width: min(100%, var(--maxw));
  margin-inline: auto;
  padding-inline: 28px;
}

.accent { color: var(--purple); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.only-desktop { display: inline; }

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 1000;
  padding: 10px 16px;
  color: #fff;
  background: var(--navy);
  border-radius: var(--radius-sm);
  transition: top .2s ease;
}
.skip-link:focus { top: 16px; }

/* Buttons */
.btn {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: 1.5px solid transparent;
  border-radius: 12px;
  font-family: var(--font);
  font-size: .98rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible {
  outline: 3px solid rgba(130, 69, 232, .3);
  outline-offset: 3px;
}
.btn--primary {
  color: #fff;
  background: var(--purple);
  box-shadow: 0 10px 22px rgba(130, 69, 232, .22);
}
.btn--primary:hover {
  background: var(--purple-strong);
  box-shadow: 0 14px 28px rgba(130, 69, 232, .28);
}
.btn--outline {
  color: var(--navy);
  background: #fff;
  border-color: #cfd5e5;
}
.btn--outline:hover {
  color: var(--purple);
  background: var(--purple-soft);
  border-color: var(--purple);
}
.btn--sm { min-height: 42px; padding: 9px 18px; font-size: .9rem; }
.btn--block { display: flex; width: 100%; }

/* Header / navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid rgba(227, 231, 241, .9);
  backdrop-filter: blur(14px);
  box-shadow: 0 3px 16px rgba(16, 29, 78, .03);
}
.nav {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav__brand {
  max-width: 220px;
  color: var(--navy);
  font-size: .94rem;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.25;
}
.nav__brand span { color: var(--purple); }
.nav__menu { display: flex; align-items: center; gap: 24px; }
.nav__links { display: flex; align-items: center; gap: 24px; }
.nav__links a {
  position: relative;
  color: var(--ink-soft);
  font-size: .9rem;
  white-space: nowrap;
  transition: color .18s ease;
}
.nav__links a::after {
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 2px;
  background: var(--purple);
  border-radius: 2px;
  content: "";
  opacity: 0;
  transform: scaleX(.5);
  transition: opacity .18s ease, transform .18s ease;
}
.nav__links a:hover { color: var(--navy); }
.nav__links a:hover::after { opacity: 1; transform: scaleX(1); }
.nav__links a:focus-visible { outline: 2px solid var(--purple); outline-offset: 5px; border-radius: 3px; }
.nav__toggle {
  display: none;
  width: 42px;
  height: 42px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.nav__toggle span {
  width: 22px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero { padding: 88px 0 96px; overflow: hidden; }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr);
  align-items: center;
  gap: clamp(48px, 7vw, 88px);
}
.hero__copy { max-width: 680px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--purple);
  font-size: .94rem;
  font-weight: 700;
  letter-spacing: .055em;
  line-height: 1.5;
  text-transform: uppercase;
}
.eyebrow::before {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  background: var(--teal);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--teal-soft);
  content: "";
}
.hero__title {
  margin-bottom: 14px;
  font-size: clamp(2.55rem, 5.2vw, 4.65rem);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1.05;
}
.hero__tagline {
  margin-bottom: 24px;
  color: var(--teal);
  font-size: 1.12rem;
  font-weight: 700;
}
.hero__intro {
  max-width: 62ch;
  margin-bottom: 12px;
  color: var(--ink);
  font-size: clamp(1.16rem, 2vw, 1.36rem);
  font-weight: 500;
  line-height: 1.65;
}
.hero__intro strong { color: var(--navy); font-weight: 700; }
.hero__lead { max-width: 62ch; margin-bottom: 0; color: var(--ink-soft); font-size: 1.02rem; }
.hero__price {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 6px 18px;
  margin: 28px 0;
  padding: 16px 18px;
  background: var(--yellow-soft);
  border: 1px solid #ffe0a0;
  border-radius: var(--radius-sm);
}
.hero__price-amount {
  grid-row: span 2;
  color: var(--navy);
  font-size: 1.85rem;
  font-weight: 800;
  white-space: nowrap;
}
.hero__price-note { max-width: 420px; color: #2f291d; font-size: .86rem; line-height: 1.55; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.hero__actions .btn:nth-child(3) {
  min-height: auto;
  flex-basis: 100%;
  justify-content: flex-start;
  padding: 5px 0;
  color: var(--purple);
  background: transparent;
  border: 0;
  box-shadow: none;
}
.hero__actions .btn:nth-child(3)::after { margin-left: 8px; content: "\2192"; }
.hero__actions .btn:nth-child(3):hover { color: var(--purple-strong); transform: translateX(3px); }
.hero__visual { display: flex; justify-content: center; perspective: 1200px; }
.book-mockup {
  position: relative;
  width: min(100%, 390px);
  padding: 0;
  background: #fff;
  border: 0;
  border-radius: 5px 18px 18px 5px;
  box-shadow: 0 28px 48px -22px rgba(16, 29, 78, .38), -8px 10px 22px rgba(16, 29, 78, .1);
  transform: rotateY(-11deg) rotateX(2deg) rotateZ(1.2deg);
  transform-style: preserve-3d;
  transition: transform .3s ease, box-shadow .3s ease;
}
.book-mockup:hover {
  box-shadow: 0 34px 58px -24px rgba(16, 29, 78, .42), -8px 12px 24px rgba(16, 29, 78, .12);
  transform: rotateY(-7deg) rotateX(1deg) rotateZ(.4deg) translateY(-3px);
}
.book-mockup::before {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 0;
  z-index: 2;
  width: 18px;
  background: linear-gradient(90deg, rgba(7, 15, 48, .34), rgba(255, 255, 255, .24) 45%, rgba(7, 15, 48, .1) 72%, transparent);
  border-radius: 5px 0 0 5px;
  content: "";
  pointer-events: none;
}
.book-mockup::after {
  position: absolute;
  inset: 8px -10px -8px 12px;
  z-index: -1;
  background: repeating-linear-gradient(to bottom, #fff 0, #fff 3px, #e5e8f0 4px, #fff 5px);
  border: 1px solid #d9deea;
  border-left: 0;
  border-radius: 3px 16px 16px 3px;
  box-shadow: 8px 8px 18px rgba(16, 29, 78, .14);
  content: "";
  transform: translateZ(-8px);
}
.book-mockup__image {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #d9deea;
  border-radius: 5px 16px 16px 5px;
}
.book-mockup__cover {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  overflow: hidden;
  padding: 32px 28px;
  color: #fff;
  text-align: left;
  background: linear-gradient(150deg, var(--navy) 8%, #27336d 52%, var(--purple) 100%);
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
}
.book-mockup__cover::before {
  position: absolute;
  top: 46px;
  right: 32px;
  width: 92px;
  height: 92px;
  background: var(--yellow);
  border-radius: 50%;
  box-shadow: -64px 58px 0 -24px var(--teal);
  content: "";
}
.book-mockup__cover::after {
  position: absolute;
  top: 108px;
  right: 74px;
  width: 66px;
  height: 66px;
  border: 7px solid rgba(255, 255, 255, .82);
  border-radius: 18px;
  content: "";
  transform: rotate(28deg);
}
.book-mockup__label {
  position: absolute;
  top: 24px;
  left: 28px;
  padding: 5px 10px;
  color: var(--navy);
  background: var(--yellow);
  border-radius: 6px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.book-mockup__title {
  position: relative;
  z-index: 1;
  margin-bottom: 20px;
  color: #fff;
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.3;
}
.book-mockup__title strong { color: var(--yellow); font-weight: 800; }
.book-mockup__author { position: relative; z-index: 1; color: rgba(255, 255, 255, .74); font-size: .78rem; }

/* Shared sections */
.section { padding: 92px 0; }
.section--alt { background: var(--bg-alt); }
.section__header { max-width: 760px; margin: 0 auto 52px; text-align: center; }
.section__title { margin-bottom: 18px; font-size: clamp(1.8rem, 3.5vw, 2.55rem); font-weight: 700; letter-spacing: -.025em; }
.section__lead { color: var(--ink-soft); font-size: 1.03rem; }
.section__header > p:not(.eyebrow):not(.section__lead) { color: var(--ink-soft); }
.section__header h3 { margin-top: 32px; font-size: 1.25rem; }
.section__cta { display: flex; justify-content: center; gap: 12px; margin-top: 44px; text-align: center; }

/* Feature cards */
.features { padding-top: 18px; }
.features__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.feature-card {
  position: relative;
  overflow: hidden;
  padding: 28px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.feature-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--purple), var(--teal));
  content: "";
}
.feature-card:hover { border-color: #d5c5f4; box-shadow: 0 16px 34px rgba(16, 29, 78, .11); transform: translateY(-4px); }
.feature-card__icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  margin-bottom: 18px;
  background: var(--purple-soft);
  border-radius: 12px;
  font-size: 1.45rem;
}
.feature-card h3 { margin-bottom: 8px; font-size: 1.08rem; }
.feature-card p { margin: 0; color: var(--ink-soft); font-size: .92rem; line-height: 1.7; }

/* Editorial reading section */
.section__header--reading { max-width: 820px; margin-bottom: 0; text-align: left; }
.section__header--reading .section__title { text-align: left; }
.section__header--reading .section__lead { margin-bottom: 8px; color: var(--ink); font-size: 1.1rem; }
.reading-highlight {
  margin: 0 0 28px;
  padding-left: 22px;
  color: var(--purple);
  border-left: 5px solid var(--yellow);
  font-size: clamp(1.65rem, 3.5vw, 2.55rem);
  font-weight: 700;
  line-height: 1.4;
}
.reading-paragraph { margin: 0 0 22px; color: var(--ink); font-size: 1.05rem; line-height: 1.9; }
.reading-subtitle { margin: 40px 0 18px; font-size: clamp(1.3rem, 2.5vw, 1.7rem); }
.reader-list { display: grid; gap: 10px; margin: 0 0 28px; }
.reader-list li {
  position: relative;
  padding: 13px 16px 13px 46px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 1rem;
}
.reader-list li::before {
  position: absolute;
  top: 14px;
  left: 16px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: #fff;
  background: var(--teal);
  border-radius: 50%;
  content: "\2713";
  font-size: .72rem;
  font-weight: 700;
}

/* Interactive web-app explainer */
.webapp-demo {
  margin: 34px 0 44px;
  padding: 24px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #dfe4f0;
  border-radius: 18px;
  box-shadow: 0 14px 36px rgba(16, 29, 78, .08);
}
.webapp-demo__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 24px;
}
.webapp-demo__kicker { margin: 0 0 2px; color: var(--navy); font-size: 1.05rem; font-weight: 700; }
.webapp-demo__hint { margin: 0; color: var(--ink-soft); font-size: .84rem; }
.webapp-demo__tabs {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 4px;
  padding: 4px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.webapp-demo__tab {
  min-height: 38px;
  padding: 7px 14px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 999px;
  font: 600 .82rem/1.35 var(--font);
  cursor: pointer;
  transition: color .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.webapp-demo__tab:hover { color: var(--purple); }
.webapp-demo__tab.is-active { color: #fff; background: var(--purple); box-shadow: 0 5px 12px rgba(130, 69, 232, .24); }
.webapp-demo__tab:focus-visible { outline: 3px solid rgba(20, 184, 176, .35); outline-offset: 2px; }
.webapp-demo__panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px minmax(0, 1.16fr);
  align-items: stretch;
  gap: 14px;
  animation: webapp-panel-in .35s ease both;
}
.webapp-demo__panel[hidden] { display: none; }
@keyframes webapp-panel-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.webapp-demo__device {
  position: relative;
  min-width: 0;
  padding: 16px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.webapp-demo__step {
  position: absolute;
  top: 13px;
  right: 13px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: #fff;
  background: var(--navy);
  border-radius: 50%;
  font-size: .72rem;
  font-weight: 700;
}
.webapp-demo__device-label { margin: 0 34px 11px 0; color: var(--navy); font-size: .82rem; font-weight: 700; }
.webapp-demo__phone-screen,
.webapp-demo__dashboard,
.webapp-demo__queue-list {
  min-height: 98px;
  padding: 14px;
  background: #fff;
  border: 1px solid #e6e9f2;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(16, 29, 78, .05);
}
.webapp-demo__phone-screen { display: grid; align-content: center; }
.webapp-demo__phone-screen span { color: var(--ink); font-size: .79rem; }
.webapp-demo__phone-screen strong { margin: 1px 0 4px; color: var(--purple); font-size: 1.12rem; }
.webapp-demo__phone-screen small { color: #07847e; font-size: .69rem; font-weight: 600; }
.webapp-demo__phone-screen--queue strong { color: var(--teal); }
.webapp-demo__sync { display: grid; grid-template-columns: 1fr 100px 1fr; align-items: center; }
.webapp-demo__hub { position: relative; z-index: 2; display: grid; place-items: center; min-height: 100px; padding: 10px; background: var(--navy); border: 5px solid #eef0fb; border-radius: 50%; text-align: center; box-shadow: 0 8px 22px rgba(16, 29, 78, .18); }
.webapp-demo__hub svg { width: 25px; height: 25px; margin-bottom: 2px; fill: none; stroke: var(--teal); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.webapp-demo__hub strong { color: #fff; font-size: .62rem; letter-spacing: .035em; line-height: 1.15; }
.webapp-demo__hub small { color: #ccd3ed; font-size: .51rem; line-height: 1.35; }
.webapp-demo__flow { position: relative; height: 2px; background: #cdd3e2; }
.webapp-demo__flow::after { position: absolute; top: -4px; right: -1px; width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 7px solid var(--purple); content: ""; }
.webapp-demo__flow i { position: absolute; top: -3px; left: 0; width: 8px; height: 8px; background: var(--yellow); border-radius: 50%; box-shadow: 0 0 0 4px rgba(255, 194, 71, .2); animation: webapp-data-flow 2.2s ease-in-out infinite; }
.webapp-demo__flow--out i { animation-delay: 1.1s; }
@keyframes webapp-data-flow { 0% { left: 0; opacity: 0; } 12%, 78% { opacity: 1; } 100% { left: calc(100% - 8px); opacity: 0; } }
.webapp-demo__dashboard { display: grid; grid-template-columns: 1fr 104px; align-items: end; gap: 12px; }
.webapp-demo__dashboard small { display: block; color: var(--ink-soft); font-size: .69rem; }
.webapp-demo__dashboard strong { display: block; margin-top: 3px; color: var(--navy); font-size: 1.08rem; }
.webapp-demo__bars { display: flex; height: 52px; align-items: end; gap: 5px; }
.webapp-demo__bars i { flex: 1; height: 44%; background: #c8b4f2; border-radius: 4px 4px 1px 1px; }
.webapp-demo__bars i:nth-child(2) { height: 68%; background: var(--teal); }
.webapp-demo__bars i:nth-child(3) { height: 54%; }
.webapp-demo__bars i:nth-child(4) { height: 86%; background: var(--purple); }
.webapp-demo__bars i:nth-child(5) { height: 72%; background: var(--yellow); }
.webapp-demo__queue-list { display: grid; gap: 6px; padding: 9px; }
.webapp-demo__queue-list > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 8px; color: var(--ink); background: var(--bg-alt); border-radius: 6px; }
.webapp-demo__queue-list > span.is-current { background: var(--teal-soft); outline: 1px solid rgba(20, 184, 176, .3); }
.webapp-demo__queue-list b { color: var(--navy); font-size: .75rem; }
.webapp-demo__queue-list small { color: var(--ink-soft); font-size: .64rem; }
.restaurant-order { display: grid; gap: 7px; margin: 0; padding: 0; border: 0; }
.restaurant-order legend { margin-bottom: 7px; color: var(--ink-soft); font-size: .68rem; }
.restaurant-order label { position: relative; display: block; cursor: pointer; }
.restaurant-order input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.restaurant-order label > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; padding: 6px 9px 6px 31px; background: #fff; border: 1px solid #e2e6f0; border-radius: 8px; transition: border-color .18s ease, background-color .18s ease; }
.restaurant-order label > span::before { position: absolute; left: 9px; display: grid; width: 15px; height: 15px; place-items: center; color: #fff; border: 1.5px solid #b7bfd2; border-radius: 4px; content: ""; font-size: .62rem; font-weight: 700; }
.restaurant-order input:checked + span { background: var(--teal-soft); border-color: rgba(20, 184, 176, .45); }
.restaurant-order input:checked + span::before { background: var(--teal); border-color: var(--teal); content: "✓"; }
.demo-choice input[type="radio"] + span::before { border-radius: 50%; }
.demo-choice input[type="radio"]:checked + span::before { content: ""; box-shadow: inset 0 0 0 3px #fff; }
.restaurant-order input:focus-visible + span { outline: 3px solid rgba(130, 69, 232, .25); outline-offset: 1px; }
.restaurant-order b { color: var(--navy); font-size: .7rem; }
.restaurant-order small { color: var(--ink-soft); font-size: .59rem; }
.restaurant-order__send { display: flex; width: 100%; min-height: 38px; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; color: #fff; background: var(--purple); border: 0; border-radius: 9px; font: 600 .72rem/1.3 var(--font); cursor: pointer; box-shadow: 0 5px 12px rgba(130, 69, 232, .18); transition: background-color .18s ease, transform .18s ease; }
.restaurant-order__send:hover { background: #7135d4; transform: translateY(-1px); }
.restaurant-order__send:focus-visible { outline: 3px solid rgba(20, 184, 176, .35); outline-offset: 2px; }
.restaurant-order__send.is-error { background: #b4233b; }
.restaurant-order__status { min-height: 1.25em; margin: 5px 0 -4px; color: #07847e; font-size: .61rem; text-align: center; }
.restaurant-order__status.is-error { color: #a3152d; }
.restaurant-service { display: grid; min-height: 192px; place-items: center; padding: 10px; background: #fff; border: 1px solid #e6e9f2; border-radius: 10px; box-shadow: 0 4px 12px rgba(16, 29, 78, .05); }
.restaurant-service__empty { display: grid; place-items: center; color: var(--ink-soft); text-align: center; }
.restaurant-service__empty[hidden] { display: none; }
.restaurant-service__empty svg { width: 35px; height: 35px; margin-bottom: 7px; fill: none; stroke: #a7b0c7; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }
.restaurant-service__empty strong { color: var(--navy); font-size: .76rem; }
.restaurant-service__empty small { margin-top: 3px; font-size: .59rem; }
.demo-output { align-content: center; gap: 9px; place-items: stretch; }
.demo-output > * { width: 100%; }
.restaurant-pop { position: relative; width: 100%; padding: 17px 13px 13px; background: #fff; border: 1px solid rgba(20, 184, 176, .42); border-radius: 10px; box-shadow: 0 10px 25px rgba(16, 29, 78, .12); }
.restaurant-pop[hidden] { display: none; }
.restaurant-pop.is-visible { animation: restaurant-pop-in .4s cubic-bezier(.2, .9, .25, 1.2) both; }
@keyframes restaurant-pop-in { from { opacity: 0; transform: translateY(12px) scale(.95); } to { opacity: 1; transform: none; } }
.restaurant-pop__badge { position: absolute; top: -10px; right: 10px; padding: 3px 8px; color: #fff; background: var(--teal); border-radius: 999px; font-size: .56rem; font-weight: 700; }
.restaurant-pop > strong { display: block; color: var(--navy); font-size: 1.08rem; }
.restaurant-pop p { margin: 6px 0; color: var(--ink); font-size: .68rem; line-height: 1.55; }
.restaurant-pop > small { color: var(--ink-soft); font-size: .58rem; }
.restaurant-pop--compact { padding-block: 13px 10px; }
.restaurant-pop--compact > strong { font-size: .9rem; }
.restaurant-pop--compact p { margin-block: 2px; }
.webapp-demo__caption { margin: 16px 0 0; color: var(--ink-soft); font-size: .76rem; text-align: center; }
.webapp-demo__caption span { color: var(--teal); font-size: .62rem; }

/* Examples */
.examples__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.example-card {
  position: relative;
  padding: 15px 16px 15px 42px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(16, 29, 78, .035);
  transition: border-color .2s ease, transform .2s ease;
}
.example-card::before {
  position: absolute;
  top: 20px;
  left: 17px;
  width: 9px;
  height: 9px;
  background: var(--teal);
  border-radius: 3px;
  box-shadow: 0 0 0 4px var(--teal-soft);
  content: "";
  transform: rotate(12deg);
}
.example-card:nth-child(3n + 2)::before { background: var(--purple); box-shadow: 0 0 0 4px var(--purple-soft); }
.example-card:nth-child(3n)::before { background: var(--yellow); box-shadow: 0 0 0 4px var(--yellow-soft); }
.example-card:hover { border-color: #cfc3eb; transform: translateY(-3px); }
.example-card h3 { margin-bottom: 2px; font-size: .96rem; line-height: 1.45; }
.example-card p { margin: 0; color: var(--ink-soft); font-size: .9rem; line-height: 1.5; }
#examples .section__header:last-child { margin-top: 46px; margin-bottom: 0; }

/* Steps */
.steps {
  display: grid;
  max-width: 850px;
  gap: 24px;
  margin-inline: auto;
  counter-reset: book-flow;
}
.step {
  position: relative;
  display: grid;
  grid-template-columns: 66px 1fr;
  align-items: center;
  gap: 18px;
  padding: 20px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: 0 5px 16px rgba(16, 29, 78, .04);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.step:hover {
  border-color: #cfc3eb;
  box-shadow: 0 10px 24px rgba(16, 29, 78, .08);
  transform: translateX(4px);
}
.step:not(:last-child)::after {
  position: absolute;
  bottom: -26px;
  left: 36px;
  z-index: 2;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: var(--purple);
  background: var(--bg-alt);
  border: 1px solid #d8c9f3;
  border-radius: 50%;
  content: "\2193";
  font-size: .9rem;
  font-weight: 700;
  line-height: 1;
}
.step__num {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: #fff;
  background: var(--purple);
  border-radius: 13px;
  font-size: .95rem;
  font-weight: 700;
}
.step:nth-child(even) .step__num { color: var(--navy); background: var(--yellow); }
.step:nth-child(3n) .step__num { background: var(--teal); }
.step__body h3 { margin-bottom: 4px; font-size: 1.12rem; }
.step__body p { margin: 0; color: var(--ink-soft); font-size: .94rem; }

/* Content-heavy sections */
#approach .section__header,
#next .section__header,
#tools .section__header {
  max-width: 820px;
  margin-bottom: 0;
  text-align: left;
}
#approach .section__header .section__title,
#next .section__header .section__title,
#tools .section__header .section__title { text-align: left; }

/* Sample placeholders */
.sample-gallery { display: grid; max-width: 940px; grid-template-columns: 1fr 1fr; gap: 20px; margin-inline: auto; }

.free-chapter-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 36px auto 44px; }
.free-chapter-card { display: flex; min-width: 0; flex-direction: column; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg); box-shadow: var(--shadow-sm); }
.free-chapter-card--pending { border-style: dashed; }
.free-chapter-card__index { margin: 0 0 10px; color: var(--color-accent); font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.free-chapter-card h3 { margin: 0 0 12px; }
.free-chapter-card > p:not(.free-chapter-card__index) { margin: 0 0 22px; color: var(--ink-soft); }
.free-chapter-card__actions { display: grid; gap: 10px; margin-top: auto; }
.free-chapter-card__actions .btn { width: 100%; }
.free-chapter-card__actions [aria-disabled="true"] { cursor: not-allowed; opacity: .62; }
.placeholder {
  position: relative;
  display: flex;
  min-height: 220px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 28px;
  color: #20242d;
  background: linear-gradient(145deg, #fff 0%, #f1edfc 100%);
  border: 1px dashed #bcb4d4;
  border-radius: var(--radius);
  text-align: center;
}
.placeholder::before {
  position: absolute;
  top: 22px;
  right: 24px;
  width: 32px;
  height: 32px;
  background: var(--yellow);
  border-radius: 50%;
  content: "";
  opacity: .8;
}
.placeholder--wide { min-height: 270px; grid-column: span 2; }
.placeholder span { position: relative; z-index: 1; font-size: .9rem; font-weight: 500; }
.placeholder figcaption {
  position: absolute;
  right: 18px;
  bottom: 12px;
  left: 18px;
  color: #343944;
  font-size: .75rem;
}

/* Author */
.author { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; align-items: center; gap: clamp(38px, 6vw, 72px); }
.author__photo { min-height: 430px; aspect-ratio: 3 / 4; }
.author__copy .section__title { text-align: left; }
.author__copy p:not(.eyebrow) { color: var(--ink-soft); }

/* Included */
.included-list { display: grid; max-width: 760px; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0 auto 34px; }
.included-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: 0 5px 16px rgba(16, 29, 78, .04);
}
.included-list span {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  margin-top: 1px;
  color: #fff;
  background: var(--teal);
  border-radius: 50%;
  font-size: .76rem;
  font-weight: 700;
}
.included-note { max-width: 700px; margin-inline: auto; color: var(--ink-soft); font-size: .9rem; text-align: center; }

/* Pricing */
.pricing {
  position: relative;
  max-width: 520px;
  margin-inline: auto;
  overflow: hidden;
  padding: 48px 42px 42px;
  background: #fff;
  border: 1px solid #d7caef;
  border-radius: 22px;
  box-shadow: var(--shadow-md);
}
.pricing::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 7px;
  background: linear-gradient(90deg, var(--purple) 0 55%, var(--teal) 55% 82%, var(--yellow) 82%);
  content: "";
}
.pricing__head { margin-bottom: 30px; text-align: center; }
.pricing__book { margin-bottom: 6px; color: var(--navy); font-size: .88rem; font-weight: 700; letter-spacing: .02em; }
.pricing__edition { margin-bottom: 16px; color: var(--purple); font-weight: 600; }
.pricing__price { margin-bottom: 8px; color: var(--navy); font-size: 3.4rem; font-weight: 800; letter-spacing: -.04em; line-height: 1.05; }
.pricing__price span { color: var(--ink-soft); font-size: 1rem; font-weight: 500; letter-spacing: 0; }
.pricing__note { margin: 0; color: var(--ink-soft); font-size: .9rem; }
.pricing__actions { display: grid; gap: 12px; margin-bottom: 20px; }
.pricing__legal { margin: -2px 0 14px; color: #303747; font-size: .78rem; line-height: 1.65; text-align: center; }
.pricing__legal a { color: #5f28b9; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.pricing__legal a:hover { color: var(--purple-strong); }
.pricing__legal a:focus-visible { outline: 3px solid rgba(130, 69, 232, .25); outline-offset: 3px; border-radius: 3px; }
.pricing__hint { margin: 0; color: var(--ink-soft); font-size: .84rem; text-align: center; }
.pricing__support { margin: 14px 0 0; text-align: center; }
.pricing__support a { color: var(--purple-dark, #6530c0); font-size: .82rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.checkout-notice { margin: 0 0 24px; padding: 13px 15px; border: 1px solid; border-radius: 10px; font-size: .9rem; line-height: 1.6; }
.checkout-notice.is-success { color: #075f58; background: #ecfdf9; border-color: #85ded8; }
.checkout-notice.is-info { color: #101d4e; background: #f5f7fc; border-color: #cbd3e9; }
.checkout-notice a { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
[data-link="checkout"][aria-disabled="true"] { opacity: .62; cursor: not-allowed; }
.checkout-recovery {
  margin: 0 0 28px;
  padding: 22px;
  color: var(--ink);
  background: #f8f7fc;
  border: 1px solid #d7caef;
  border-radius: 16px;
  text-align: left;
}
.checkout-recovery[hidden] { display: none; }
.checkout-recovery .eyebrow { margin-bottom: 6px; text-align: left; }
.checkout-recovery__title { margin: 0 0 8px; color: var(--navy); font-size: 1.18rem; line-height: 1.4; }
.checkout-recovery__message { margin: 0; color: #303747; font-size: .9rem; line-height: 1.7; }
.checkout-recovery__detail { margin: 8px 0 0; color: #525b70; font-size: .82rem; line-height: 1.6; }
.checkout-recovery__detail:empty { display: none; }
.checkout-recovery__actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.checkout-recovery__contact, .checkout-recovery__library {
  color: #5f28b9;
  font-size: .86rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.checkout-recovery[data-state="owned"] { background: #ecfdf9; border-color: #85ded8; }
.checkout-recovery[data-state="expired"],
.checkout-recovery[data-state="service-unavailable"],
.checkout-recovery[data-state="error"],
.checkout-recovery[data-state="network-error"] { background: #fffaf0; border-color: #f0cc7a; }
.catalogue-card__buy[aria-disabled="true"] { opacity: .62; cursor: not-allowed; }

/* Checkout modal */
body.has-modal { overflow: hidden; }
.checkout-modal { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: 20px; }
.checkout-modal[hidden] { display: none; }
.checkout-modal__backdrop { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; background: rgba(8, 11, 18, .65); border: 0; cursor: default; backdrop-filter: blur(4px); }
.checkout-modal__panel { position: relative; width: min(100%, 500px); max-height: calc(100vh - 40px); overflow-y: auto; padding: 38px; background: #fff; border: 1px solid #ded7ed; border-radius: 20px; box-shadow: 0 28px 80px rgba(8, 11, 18, .3); }
.checkout-modal__close { position: absolute; top: 13px; right: 15px; display: grid; width: 36px; height: 36px; place-items: center; padding: 0; color: #111827; background: #f5f7fc; border: 0; border-radius: 50%; font-size: 1.55rem; line-height: 1; cursor: pointer; }
.checkout-modal__panel .eyebrow { margin-bottom: 8px; text-align: left; }
.checkout-modal__panel h2 { margin: 0 0 10px; color: var(--navy); font-size: clamp(1.55rem, 5vw, 2rem); line-height: 1.25; }
.checkout-modal__intro { margin: 0 0 24px; color: var(--ink-soft); font-size: .95rem; }
.checkout-modal form { display: grid; gap: 10px; }
.checkout-modal label { color: #080b12; font-size: .9rem; font-weight: 700; }
.checkout-modal input { width: 100%; min-height: 50px; padding: 12px 14px; color: #080b12; background: #fff; border: 1px solid #aeb7ca; border-radius: 10px; font: inherit; }
.checkout-modal input:focus { border-color: var(--purple); outline: 3px solid rgba(130, 69, 232, .16); }
.checkout-modal .btn { margin-top: 4px; }
.checkout-modal .btn:disabled { cursor: wait; opacity: .7; }
.checkout-modal__status { min-height: 1.5em; margin: 2px 0 0; font-size: .86rem; font-weight: 600; }
.checkout-modal__status.is-error { color: #b42318; }
.checkout-modal__status.is-success { color: #08766d; }
.checkout-modal__privacy { margin: 16px 0 0; color: #4b5563; font-size: .76rem; line-height: 1.6; }

/* Footer */
.site-footer { padding: 64px 0 30px; color: #c8cee0; background: var(--navy); }
.footer__grid { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer__brand { margin-bottom: 8px; color: #fff; font-size: 1rem; font-weight: 800; }
.footer__brand span { color: var(--yellow); }
.footer__tag { margin: 0; color: #9fa8c7; }
.footer__links { display: flex; flex-direction: column; gap: 10px; }
.footer__links a { color: #c8cee0; font-size: .9rem; transition: color .18s ease; }
.footer__links a:hover { color: var(--yellow); }
.footer__links a:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; border-radius: 3px; }
.footer__bottom { margin-top: 46px; padding-top: 22px; color: #8791b2; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .82rem; }
.footer__bottom p { margin: 0; }

/* Responsive */
@media (max-width: 1040px) {
  .nav__toggle { display: flex; }
  .nav__menu {
    position: absolute;
    top: 74px;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 14px 28px 24px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 28px rgba(16, 29, 78, .1);
  }
  .nav__menu.is-open { display: flex; }
  .nav__links { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__links a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .96rem; }
  .nav__links a::after { display: none; }
  .nav__menu .btn { margin-top: 16px; }
  .features__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Early-page app gallery: temporary in-device previews until real screenshots arrive. */
.app-showcase { padding-top: 72px; padding-bottom: 76px; background: var(--bg-alt); }
.app-showcase__header { max-width: 760px; margin-bottom: 34px; }
.app-showcase__header .section__lead { margin-bottom: 0; }
.app-showcase__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.app-showcase__card { min-width: 0; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-sm); }
.app-showcase__stage { position: relative; height: 248px; overflow: hidden; background: #f5f2fc; }
.app-showcase__card--pos .app-showcase__stage { background: #eaf8f7; }
.app-showcase__card--pending .app-showcase__stage { background: #f4f5f8; }
.device { position: absolute; padding: 7px; background: #20283c; border: 2px solid #39445a; box-shadow: 0 15px 30px rgba(16,29,78,.21); }
.device--tablet { width: 78%; height: 172px; top: 30px; left: 9%; border-radius: 15px; transform: rotate(-5deg); }
.device--phone { width: 26%; height: 154px; right: 6%; bottom: 9px; border-radius: 13px; transform: rotate(9deg); z-index: 1; }
.app-showcase__card--pos .device--tablet { transform: rotate(4deg); }
.app-showcase__card--pos .device--phone { right: auto; left: 5%; transform: rotate(-9deg); }
.app-showcase__card--pending .device--tablet { transform: rotate(-3deg); }
.app-showcase__card--pending .device--phone { transform: rotate(6deg); }
.device__screen { height: 100%; overflow: hidden; background: #fff; border-radius: 8px; }
.preview { height: 100%; padding: 10px; color: #142039; font-size: 8px; line-height: 1.35; }
.preview--money { background: #faf8ff; }
.preview--pos { background: #f4fbfa; }
.preview__top { display: flex; justify-content: space-between; align-items: center; gap: 4px; padding-bottom: 7px; color: var(--navy); border-bottom: 1px solid #e5e7f0; }
.preview__top b { font-size: 10px; }
.preview__top span { color: #596174; }
.preview__heading { margin: 7px 0; font-size: 11px; font-weight: 700; }
.preview__metric { display: flex; justify-content: space-between; gap: 4px; margin-bottom: 7px; padding: 6px 8px; background: #ece5fb; border-radius: 5px; }
.preview--pos .preview__metric { margin-top: 8px; background: #daf4f0; }
.preview__bars { display: flex; align-items: end; gap: 5px; height: 34px; padding: 4px 8px; background: #fff; border-radius: 5px; }
.preview__bars i { flex: 1; height: 40%; background: #9b70ed; border-radius: 2px 2px 0 0; }
.preview__bars i:nth-child(2), .preview__bars i:nth-child(5) { height: 72%; }
.preview__bars i:nth-child(3) { height: 52%; background: var(--teal); }
.preview__bars i:nth-child(4) { height: 90%; background: var(--teal); }
.preview__bars i:nth-child(6) { height: 61%; }
.preview__rows { display: grid; grid-template-columns: 1fr auto; gap: 2px; margin-top: 5px; }
.preview__mini-row { display: flex; justify-content: space-between; gap: 3px; padding: 7px 0; border-bottom: 1px solid #e7eaf2; }
.preview__mini-row b { white-space: nowrap; }
.preview__pos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.preview__pos-grid div { display: flex; flex-direction: column; gap: 5px; padding: 7px; background: #fff; border: 1px solid #dcece9; border-radius: 5px; }
.preview__pos-grid b { font-size: 9px; }
.preview--pending { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 3px; color: #5c6473; background: repeating-linear-gradient(135deg, #fafbfe 0, #fafbfe 12px, #f1f3f8 12px, #f1f3f8 24px); text-align: center; }
.preview__pending-mark { color: #9ca5b6; font-size: 28px; line-height: 1; }
.app-showcase__copy { padding: 22px 23px 25px; }
.app-showcase__tag { display: inline-block; margin-bottom: 8px; padding: 3px 10px; color: #56329b; background: var(--purple-soft); border-radius: 999px; font-size: .77rem; font-weight: 600; }
.app-showcase__card--pos .app-showcase__tag { color: #086b68; background: var(--teal-soft); }
.app-showcase__card--pending .app-showcase__tag { color: #555e70; background: #eef0f5; }
.app-showcase__copy h3 { margin-bottom: 6px; font-size: 1.23rem; }
.app-showcase__copy p { margin: 0; color: var(--ink-soft); font-size: .92rem; line-height: 1.65; }

@media (max-width: 900px) {
  .app-showcase__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding: 66px 0 78px; }
  .hero__grid { grid-template-columns: 1fr; gap: 48px; }
  .hero__copy { max-width: 760px; }
  .book-mockup { width: min(70vw, 340px); }
  .examples__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .author { grid-template-columns: 240px 1fr; gap: 34px; }
  .author__photo { min-height: 330px; }
}

@media (max-width: 680px) {
  .app-showcase { padding-top: 60px; padding-bottom: 62px; }
  .app-showcase__grid { grid-template-columns: 1fr; gap: 16px; }
  .app-showcase__stage { height: 260px; }
  .device--tablet { height: 180px; }
  .device--phone { height: 162px; }
  body { font-size: 15.5px; line-height: 1.72; }
  .container { padding-inline: 20px; }
  .section { padding: 68px 0; }
  .nav { min-height: 68px; }
  .nav__brand { max-width: 190px; font-size: .86rem; }
  .nav__menu { top: 68px; padding-inline: 20px; }
  .hero { padding: 48px 0 64px; }
  .hero__title { font-size: clamp(2.35rem, 13vw, 3.25rem); }
  .hero__intro { font-size: 1.12rem; }
  .hero__price { grid-template-columns: 1fr; gap: 2px; padding: 15px 16px; }
  .hero__price-amount { grid-row: auto; font-size: 1.7rem; }
  .hero__actions { display: grid; grid-template-columns: 1fr; }
  .hero__actions .btn { width: 100%; }
  .hero__actions .btn:nth-child(3) { justify-content: center; }
  .book-mockup { width: min(82vw, 330px); transform: rotateY(-7deg) rotateX(1deg) rotateZ(.8deg); }
  .book-mockup:hover { transform: rotateY(-5deg) rotateZ(.3deg) translateY(-2px); }
  .features__grid, .examples__grid, .included-list { grid-template-columns: 1fr; }
  .features { padding-top: 8px; }
  .feature-card { padding: 25px 22px; }
  .section__header { margin-bottom: 38px; }
  .section__title { font-size: clamp(1.65rem, 8vw, 2.1rem); }
  .section__cta { flex-direction: column; }
  .section__cta .btn { width: 100%; }
  .reading-highlight { padding-left: 16px; font-size: 1.55rem; }
  .reading-paragraph { font-size: 1rem; line-height: 1.82; }
  .reader-list li { padding-right: 14px; font-size: .95rem; }
  .webapp-demo { margin: 28px 0 38px; padding: 18px; }
  .webapp-demo__topline { align-items: stretch; flex-direction: column; gap: 13px; }
  .webapp-demo__tabs { align-self: flex-start; }
  .webapp-demo__panel { grid-template-columns: 1fr; gap: 10px; }
  .webapp-demo__sync { min-height: 92px; grid-template-columns: 1fr 88px 1fr; padding-inline: 14%; transform: rotate(90deg); }
  .webapp-demo__hub { min-height: 88px; transform: rotate(-90deg); }
  .webapp-demo__device { padding: 14px; }
  .webapp-demo__dashboard { grid-template-columns: 1fr 90px; }
  .webapp-demo__caption { line-height: 1.55; }
  .steps { gap: 22px; }
  .step { grid-template-columns: 50px 1fr; gap: 12px; padding: 17px 16px; }
  .step:hover { transform: none; }
  .step:not(:last-child)::after { bottom: -24px; left: 26px; }
  .step__num { width: 42px; height: 42px; border-radius: 11px; font-size: .84rem; }
  .sample-gallery { grid-template-columns: 1fr; }
  .free-chapter-grid { grid-template-columns: 1fr; }
  .placeholder, .placeholder--wide { min-height: 210px; grid-column: span 1; }
  .author { grid-template-columns: 1fr; }
  .author__photo { width: min(100%, 280px); min-height: 360px; margin-inline: auto; }
  .pricing { padding: 40px 22px 28px; }
  .pricing__price { font-size: 3rem; }
  .checkout-recovery { padding: 18px; }
  .checkout-recovery__actions { align-items: stretch; flex-direction: column; }
  .checkout-recovery__actions .btn { width: 100%; }
  .checkout-modal__panel { padding: 34px 22px 26px; border-radius: 16px; }
  .only-desktop { display: none; }
  .footer__grid { flex-direction: column; }
}

@media (max-width: 390px) {
  .container { padding-inline: 16px; }
  .hero__title { font-size: 2.15rem; }
  .btn { padding-inline: 18px; font-size: .92rem; }
  .webapp-demo__tabs { display: grid; width: 100%; grid-template-columns: 1fr; border-radius: 13px; }
  .webapp-demo__tab { width: 100%; }
  .book-mockup { width: calc(100% - 14px); padding: 0; border-radius: 5px 16px 16px 5px; }
  .book-mockup__cover { padding: 26px 22px; }
  .book-mockup__label { left: 22px; }
}


/* Shared loading indicator: replace this single visual with the future cat-mug animation.
   Status text remains accessible and contextual throughout the site. */
:root { --site-loader-size: 1.05em; --site-loader-color: var(--purple); }
[data-catalogue][data-state="loading"] [data-catalogue-status]::before,
[data-library][data-state="loading"] [data-library-status]::before,
[data-loading="true"]::before,
[data-checkout-recovery][aria-busy="true"] [role="status"]::before {
  content: "";
  display: inline-block;
  width: var(--site-loader-size);
  height: var(--site-loader-size);
  margin-inline-end: .65em;
  vertical-align: -.17em;
  border: .16em solid color-mix(in srgb, var(--site-loader-color) 22%, transparent);
  border-top-color: var(--site-loader-color);
  border-radius: 50%;
  animation: site-loading-spin .8s linear infinite;
}
@keyframes site-loading-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  [data-catalogue][data-state="loading"] [data-catalogue-status]::before,
  [data-library][data-state="loading"] [data-library-status]::before,
  [data-loading="true"]::before,
  [data-checkout-recovery][aria-busy="true"] [role="status"]::before {
    animation: none;
    border-color: var(--site-loader-color);
    border-right-color: transparent;
  }
}

/* Honor native hidden state even on styled buttons. */
.btn[hidden] { display: none !important; }
