:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --text: #162033;
  --muted: #607086;
  --primary: #1f5eff;
  --primary-dark: #1848c5;
  --accent: #f28c28;
  --border: #dce3ee;
  --shadow: 0 18px 50px rgba(22, 32, 51, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(31, 94, 255, 0.12), transparent 34rem),
    radial-gradient(circle at bottom right, rgba(242, 140, 40, 0.18), transparent 28rem),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
}

.page {
  padding: 28px 0 64px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.15rem;
}

.brand-logo {
  width: 42px;
  height: 42px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 650;
}

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

.card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero {
  padding: clamp(28px, 5vw, 60px);
  overflow: hidden;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -80px;
  width: 210px;
  height: 210px;
  background: var(--accent);
  transform: rotate(45deg);
  opacity: 0.16;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
}

h1,
h2 {
  line-height: 1.12;
  letter-spacing: -0.04em;
}

h1 {
  max-width: 820px;
  margin: 0 0 14px;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

h2 {
  margin: 0 0 14px;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

h3 {
  line-height: 1.2;
  margin: 0 0 10px;
  font-size: 1.2rem;
}

code {
  padding: 0.08rem 0.28rem;
  border-radius: 6px;
  background: #eef3ff;
  color: var(--primary-dark);
}

.lead {
  max-width: 760px;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--muted);
  margin: 0 0 24px;
}

.note {
  max-width: 760px;
  margin: 0;
  padding: 14px 18px;
  background: rgba(31, 94, 255, 0.08);
  border-left: 4px solid var(--primary);
  border-radius: 14px;
  color: var(--text);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.payment-card,
.content-section {
  padding: clamp(24px, 4vw, 36px);
}

.payment-card p,
.content-section p,
.book-content p {
  color: var(--muted);
}

.alias-box {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  margin: 8px 0 12px;
  padding: 14px 18px;
  border: 1px solid rgba(31, 94, 255, 0.2);
  border-radius: 16px;
  background: rgba(31, 94, 255, 0.07);
}

.alias-box .label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.alias-box strong {
  color: var(--text);
  font-size: 1.08rem;
  letter-spacing: 0.02em;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 750;
  margin-top: 10px;
}

.button.primary {
  background: var(--primary);
  color: #fff;
}

.button.primary:hover {
  background: var(--primary-dark);
}

.button.secondary {
  background: #eef3ff;
  color: var(--primary);
}

.button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.65;
}

.hero .button + .button {
  margin-left: 10px;
}

.qr-box {
  width: min(260px, 100%);
  padding: 16px;
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: 18px;
  margin: 18px 0;
}

.qr-box img {
  display: block;
  width: 100%;
  height: auto;
}

.small {
  font-size: 0.92rem;
}

.muted {
  color: var(--muted);
}

.library-section {
  margin: 20px 0;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.book-card {
  display: grid;
  grid-template-columns: minmax(130px, 170px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  min-width: 0;
}

.book-cover {
  position: relative;
  display: flex;
  min-height: 210px;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 18px;
  border-radius: 14px;
  color: #fff;
  box-shadow: 0 14px 34px rgba(22, 32, 51, 0.16);
}

.book-cover::after {
  content: "";
  position: absolute;
  right: -48px;
  bottom: -48px;
  width: 118px;
  height: 118px;
  background: rgba(255, 255, 255, 0.22);
  transform: rotate(45deg);
}

.cover-blue {
  background: linear-gradient(145deg, #163c9f, #1f5eff);
}

.cover-orange {
  background: linear-gradient(145deg, #1d3154, #f28c28);
}

.book-cover span {
  position: relative;
  z-index: 1;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.book-cover strong {
  position: relative;
  z-index: 1;
  font-size: 1.55rem;
  line-height: 1;
}

.book-cover-image {
  min-height: auto;
  padding: 0;
  background: #eef3ff;
  aspect-ratio: 2 / 3;
  align-self: start;
  width: 100%;
  max-width: 170px;
}

.book-cover-image::after {
  display: none;
}

.book-cover-image img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
}

.book-content {
  min-width: 0;
}

.book-kicker {
  margin: 0 0 8px;
  color: var(--accent) !important;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.book-meta {
  font-size: 0.92rem;
}

.book-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.book-actions .button {
  margin-top: 0;
}

.library-note {
  margin-bottom: 0;
}

.thanks {
  border-color: rgba(242, 140, 40, 0.45);
}

@media (max-width: 780px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

@media (max-width: 600px) {
  .hero .button {
    width: 100%;
  }

  .hero .button + .button {
    margin-left: 0;
  }

  .book-card {
    grid-template-columns: 1fr;
  }

  .book-cover {
    min-height: 190px;
    max-width: 160px;
  }
}
