/* Bookstore storefront — clean, modern, mobile-first. */
:root {
  --ink: #1a1a2e;
  --muted: #5b6172;
  --line: #e6e8ef;
  --bg: #f7f8fc;
  --card: #ffffff;
  --accent: #2f5bea;
  --accent-dark: #1f44c4;
  --gold: #b8860b;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(26, 26, 46, 0.08);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

h1, h2, h3, .brand, .btn, .card-price, .product-price, .format-price {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.container {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

a { color: var(--accent); text-decoration: none; }
.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;
}

/* Header / footer */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  padding-bottom: 16px;
  flex-wrap: wrap;
}
.header-branding {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}
.brand {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.tagline { color: var(--muted); font-size: 0.9rem; }
.site-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
}
.site-nav a { color: var(--ink); }
.site-nav a:hover { color: var(--accent); }

.site-footer {
  margin-top: 64px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: left;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 22px;
}
.footer-group h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 0.9rem;
  letter-spacing: 0;
}
.footer-group a {
  display: block;
  color: var(--muted);
  margin: 5px 0;
}
.footer-group a:hover { color: var(--accent); }
.footer-support {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  border-top: 1px solid var(--line);
  margin: 24px 0 0;
  padding-top: 16px;
}
.footer-support strong {
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.footer-legal {
  border-top: 1px solid var(--line);
  margin: 16px 0 0;
  padding-top: 16px;
}

main.container { padding-top: 32px; padding-bottom: 32px; }

/* Hero */
.hero { text-align: center; margin: 16px 0 40px; }
.hero h1 { font-size: 2rem; margin: 0 0 10px; letter-spacing: -0.02em; }
.hero p { color: var(--muted); max-width: 560px; margin: 0 auto; }

/* Product grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  color: var(--ink);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-cover {
  aspect-ratio: 2 / 3;
  background: #eef0f7;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card-cover img { width: 100%; height: 100%; object-fit: contain; }
.card-body { padding: 16px; }
.card-title { font-size: 1.05rem; margin: 0 0 4px; }
.card-sub { color: var(--muted); font-size: 0.9rem; margin: 0 0 6px; }
.card-author { color: var(--muted); font-size: 0.85rem; margin: 0 0 8px; }
.card-price { font-weight: 700; color: var(--ink); margin: 0; }
.muted-price { color: var(--muted); font-weight: 600; }

.cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  background: linear-gradient(135deg, #2f5bea22, #b8860b22);
  color: var(--ink);
  font-weight: 600;
}

/* Product page */
.product {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.product-media {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.product-cover {
  width: 100%;
  max-width: 320px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  aspect-ratio: 2 / 3;
  object-fit: contain;
  background: #eef0f7;
}
.product-render {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: var(--radius);
  background: #eef0f7;
}
.product-title { font-size: 1.8rem; margin: 0 0 6px; letter-spacing: -0.02em; }
.product-subtitle { color: var(--muted); font-size: 1.1rem; margin: 0 0 8px; }
.product-author { color: var(--muted); margin: 0 0 20px; }

/* Buy form */
.buy {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.formats { border: 0; padding: 0; margin: 0 0 16px; }
.formats legend {
  font-weight: 700;
  padding: 0;
  margin-bottom: 10px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.format-opt {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 4px 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 10px;
  cursor: pointer;
}
.format-opt:has(input:checked) { border-color: var(--accent); background: #2f5bea0a; }
.format-opt input { grid-row: span 2; }
.format-name { font-weight: 600; }
.format-meta { color: var(--muted); font-size: 0.85rem; grid-column: 2; }
.format-price {
  grid-row: span 2;
  grid-column: 3;
  font-weight: 700;
  font-size: 1.1rem;
}

.email-field { display: block; margin-bottom: 16px; }
.email-field span {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.email-field input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 13px 22px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}
.btn:hover { background: var(--accent-dark); }
.btn-buy { width: 100%; font-size: 1.1rem; }
.btn-secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-secondary:hover {
  background: #f2f4f8;
}
.btn-small {
  padding: 9px 14px;
  font-size: 0.9rem;
}
.trust { color: var(--muted); font-size: 0.82rem; text-align: center; margin: 12px 0 0; }
.trust-panel {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.88rem;
}
.trust-panel p { margin: 0 0 7px; }
.trust-panel p:last-child { margin-bottom: 0; }
.trust-panel strong { color: var(--ink); }
.payment-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}
.payment-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.payment-badge img {
  width: 45px;
  height: 30px;
  display: block;
}
.payment-badge-stripe {
  gap: 6px;
  padding-left: 2px;
}
.payment-badge-stripe img {
  width: 45px;
  height: 30px;
}
.powered-by {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0;
}
.buy.unavailable h2 { margin: 0 0 8px; font-size: 1rem; }
.buy.unavailable p { color: var(--muted); margin: 0; }

/* Checkout */
.checkout-page { max-width: 1120px; margin: 0 auto; }
.checkout-heading { margin: 8px 0 22px; }
.checkout-heading h1 { margin: 6px 0 0; font-size: 2rem; }
.back-link { color: var(--muted); font-size: 0.9rem; }
.checkout-form-grid {
  display: grid;
  gap: 20px;
}
.checkout-main,
.order-summary,
.checkout-actions {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.checkout-section {
  border: 0;
  padding: 0;
  margin: 0 0 22px;
}
.checkout-section:last-child { margin-bottom: 0; }
.checkout-section legend,
.order-summary h2 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 12px;
  padding: 0;
}
.section-note { margin: -6px 0 12px; color: var(--muted); font-size: 0.9rem; }
.field-grid {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}
.field { display: block; }
.field span {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.field input,
.field select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
.field input[disabled] { background: #f2f4f8; color: var(--muted); }
.field input[aria-invalid="true"],
.field select[aria-invalid="true"] {
  border-color: #c62828;
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.08);
}
.field-error {
  display: block;
  color: #b42318;
  font-size: 0.82rem;
  margin-top: 5px;
}
.country-field { max-width: 260px; }
.check-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.95rem;
}
.check-field input { margin-top: 4px; }
.billing-fields {
  display: none;
  margin-top: 16px;
}
#billing-different:checked ~ .billing-fields { display: block; }
.order-summary h2 { margin-bottom: 16px; }
.summary-product {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: start;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.summary-product img,
.summary-cover-placeholder {
  width: 72px;
  aspect-ratio: 2 / 3;
  border-radius: 8px;
  object-fit: contain;
  background: #eef0f7;
}
.summary-cover-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  text-align: center;
  font-size: 0.75rem;
  line-height: 1.2;
}
.summary-title {
  margin: 0 0 4px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 700;
  line-height: 1.25;
}
.summary-meta { margin: 0 0 3px; color: var(--muted); font-size: 0.9rem; }
.summary-lines { margin: 16px 0 0; }
.summary-lines div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 8px 0;
}
.summary-lines dt { color: var(--muted); }
.summary-lines dd { margin: 0; text-align: right; }
.summary-note {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 12px;
  color: var(--muted);
  font-size: 0.86rem;
}
.summary-total {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 12px !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
}
.checkout-actions { padding-top: 18px; }
.checkout-trust { margin-bottom: 16px; }

/* Companion bundle */
.bundle-section { margin: 28px 0; }
.bundle-card {
  border: 1px solid #d9e2f1;
  background: #f6f9ff;
  border-radius: 14px;
  padding: 22px 24px;
  max-width: 860px;
}
.bundle-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.74rem;
  font-weight: 700;
  color: #b94700;
  margin: 0 0 4px;
}
.bundle-card h2 { margin: 0 0 8px; font-size: 1.4rem; }
.bundle-body { color: #334; line-height: 1.55; margin: 0 0 18px; max-width: 680px; }
.bundle-books {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}
.bundle-books-stacked {
  display: grid;
  gap: 14px;
}
.bundle-book {
  display: grid;
  grid-template-columns: 118px 1fr;
  align-items: center;
  gap: 20px;
  min-height: 146px;
  padding: 16px 18px;
  border: 1px solid #dfe6f3;
  border-radius: 12px;
  background: #fff;
}
.bundle-iso-book {
  width: 86px;
  aspect-ratio: 2 / 3;
  justify-self: center;
  position: relative;
  transform: perspective(54em) rotateX(58deg) rotateZ(-34deg) skewY(-7deg);
  border-top-right-radius: 5px;
  box-shadow: -10px 13px 2px -4px rgba(0, 0, 0, 0.55),
              -14px 17px 14px -7px rgba(0, 0, 0, 0.28),
              4px 18px 20px rgba(47, 91, 234, 0.12);
}
.bundle-iso-book img,
.bundle-iso-book > span {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  inset: 0;
  border-top-right-radius: 5px;
  object-fit: cover;
  background: linear-gradient(145deg, #243b73, #7a4f17);
  color: #fff;
  padding: 8px;
  text-align: center;
  font-size: 0.66rem;
  line-height: 1.15;
  font-weight: 700;
  filter: saturate(0.95);
}
.bundle-iso-book::before,
.bundle-iso-book::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.bundle-iso-book::before {
  z-index: -1;
  left: -6%;
  width: 108%;
  height: 106%;
  background-repeat: no-repeat;
  background-image:
    linear-gradient(115deg, transparent 3%, #2f2f36 3.2%, #2f2f36 16%, transparent 16.2%),
    linear-gradient(125deg, transparent 10%, #3c3d46 10.2%, #3c3d46 17%, #20212a 47%, transparent 47.2%),
    linear-gradient(140deg, transparent 45%, #f5f2e8 45.2%, #cfc7b5 97%, transparent 97.2%);
  background-size: 100% 100%;
}
.bundle-iso-book::after {
  background-repeat: no-repeat;
  background-image:
    linear-gradient(to right, transparent 2%, rgba(0, 0, 0, 0.12) 3%, rgba(0, 0, 0, 0.12) 4%, transparent 5%),
    linear-gradient(-50deg, rgba(0, 0, 0, 0.16) 20%, transparent 100%),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.18) 0%, transparent 42%);
}
.bundle-book-title {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  margin: 0;
  line-height: 1.25;
}
.bundle-book-author {
  color: #667;
  font-size: 0.86rem;
  margin: 3px 0 0;
}
.bundle-book-pitch {
  display: block;
  color: #394150;
  font-size: 0.93rem;
  line-height: 1.42;
  margin: 7px 0 0;
}
.bundle-cta { font-weight: 700; color: #0654a8; margin: 8px 0 0; }
.bundle-optin {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  cursor: pointer;
  position: relative;
  border: 2px solid #cdd9ee;
  background: #f6f9ff;
  border-radius: 14px;
  padding: 18px 20px;
  margin: 4px 0 18px;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.bundle-optin:hover { border-color: #9bb6e6; }
.bundle-optin input { position: absolute; opacity: 0; width: 0; height: 0; }
.bundle-optin-check {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  margin-top: 2px;
  border-radius: 7px;
  border: 2px solid #9bb6e6;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #fff;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.bundle-optin-check::after {
  content: "✓";
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.12s ease, transform 0.12s ease;
}
.bundle-optin input:checked ~ .bundle-optin-check { background: #1f8f4e; border-color: #1f8f4e; }
.bundle-optin input:checked ~ .bundle-optin-check::after { opacity: 1; transform: scale(1); }
.bundle-optin:has(input:checked) {
  border-color: #1f8f4e;
  background: #f0faf3;
  box-shadow: 0 2px 14px rgba(31, 143, 78, 0.14);
}
.bundle-optin input:focus-visible ~ .bundle-optin-check { outline: 3px solid #1f8f4e55; outline-offset: 2px; }
.bundle-optin-body { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.bundle-optin-head { font-weight: 700; font-size: 1.08rem; }
.bundle-optin-copy { color: #334; line-height: 1.45; }
.bundle-optin-titles { margin: 2px 0; }
.bundle-checkout-book {
  grid-template-columns: 92px 1fr;
  min-height: 116px;
  padding: 12px 14px;
  gap: 14px;
}
.bundle-checkout-book .bundle-iso-book { width: 66px; }
.bundle-checkout-book .bundle-book-title { font-size: 0.9rem; }
.bundle-checkout-book .bundle-book-pitch { font-size: 0.82rem; margin-top: 4px; }
.bundle-optin-bullets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  color: #1f7a44;
  font-size: 0.88rem;
  font-weight: 600;
}
.bundle-optin-label { font-weight: 700; color: #0c5b2e; margin-top: 2px; }
.bundle-optin-price { color: #556; font-size: 0.9rem; }

.author-quote, blockquote {
  font-style: italic;
  color: var(--muted);
  border-left: 3px solid var(--accent);
  margin: 20px 0 0;
  padding: 6px 0 6px 16px;
}

/* Description + reviews */
.description, .reviews { margin: 40px 0; }
.description h2, .reviews h2 { font-size: 1.4rem; margin: 0 0 16px; }
.prose p { margin: 0 0 14px; }

/* Informational pages */
.info-page {
  max-width: 760px;
  margin: 0 auto;
}
.info-hero {
  margin: 10px 0 26px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.info-hero .eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}
.info-hero h1 {
  margin: 0 0 10px;
  font-size: 2.2rem;
  line-height: 1.12;
}
.info-hero p {
  color: var(--muted);
  font-size: 1.08rem;
  margin: 0;
}
.info-section {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.info-section h2 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}
.info-section p { margin: 0 0 10px; }
.info-list {
  margin: 8px 0 0;
  padding-left: 22px;
}
.info-list li { margin: 5px 0; }

/* MyBooks */
.account-page,
.mybooks-page {
  max-width: 860px;
  margin: 0 auto;
}
.account-page {
  max-width: 520px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}
.account-page h1,
.mybooks-heading h1 {
  margin: 0 0 10px;
  font-size: 2rem;
}
.account-intro,
.mybooks-heading p,
.purchase-subtitle,
.purchase-author,
.purchase-detail {
  color: var(--muted);
}
.account-form {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}
.notice {
  background: #edf7f1;
  border: 1px solid #c7ead4;
  border-radius: 10px;
  color: #0a6f47;
  margin: 18px 0 0;
  padding: 11px 13px;
  font-size: 0.92rem;
}
.notice.error {
  background: #fff5f5;
  border-color: #f3c9c5;
  color: #b42318;
}
.mybooks-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
  padding-bottom: 18px;
}
.purchase-list {
  display: grid;
  gap: 16px;
}
.purchase-card {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.purchase-cover img,
.purchase-cover .cover-placeholder {
  width: 90px;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  object-fit: cover;
}
.purchase-cover .cover-placeholder {
  font-size: 0.78rem;
  line-height: 1.2;
}
.purchase-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
}
.purchase-body h2 {
  margin: 6px 0 4px;
  font-size: 1.15rem;
}
.purchase-body p {
  margin: 0 0 6px;
}
.download-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.button-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.quote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.review-quote {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 10px;
  padding: 16px 18px;
  margin: 0;
  font-style: normal;
  color: var(--ink);
}
.review-quote p { margin: 0 0 8px; }
.review-quote cite { color: var(--muted); font-size: 0.85rem; font-style: normal; }

/* Confirmation / cancel / empty */
.confirmation, .empty {
  text-align: center;
  max-width: 560px;
  margin: 40px auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 28px;
}
.confirmation .check {
  width: 64px; height: 64px; line-height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #18a05822;
  color: #18a058;
  font-size: 2rem;
}
.confirmation h1, .empty h1, .empty h2 { margin: 0 0 12px; }
.order-line { color: var(--muted); }
.delivery { color: var(--muted); margin: 16px 0 24px; }

/* Larger screens: two-column product layout */
@media (min-width: 760px) {
  .hero h1 { font-size: 2.6rem; }
  .product {
    grid-template-columns: 340px 1fr;
    align-items: start;
  }
  .product-media { justify-content: flex-start; position: sticky; top: 88px; }
  .checkout-form-grid {
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: start;
  }
  .checkout-main { grid-column: 1; grid-row: 1; }
  .order-summary {
    grid-column: 2;
    grid-row: 1 / span 2;
    position: sticky;
    top: 88px;
  }
  .checkout-actions { grid-column: 1; grid-row: 2; }
  .field-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-grid.three { grid-template-columns: 1.4fr 0.8fr 1fr; }
}

@media (max-width: 520px) {
  .account-page { padding: 24px 20px; }
  .mybooks-heading { display: block; }
  .mybooks-heading .btn { margin-top: 12px; }
  .purchase-card {
    grid-template-columns: 72px 1fr;
    padding: 14px;
  }
  .purchase-cover img,
  .purchase-cover .cover-placeholder {
    width: 72px;
  }
  .bundle-card { padding: 18px 16px; }
  .bundle-book,
  .bundle-checkout-book {
    grid-template-columns: 78px 1fr;
    min-height: 108px;
    gap: 12px;
    padding: 12px;
  }
  .bundle-iso-book,
  .bundle-checkout-book .bundle-iso-book {
    width: 58px;
  }
  .bundle-book-title { font-size: 0.88rem; }
  .bundle-book-author,
  .bundle-book-pitch,
  .bundle-checkout-book .bundle-book-pitch {
    font-size: 0.78rem;
  }
  .bundle-optin { padding: 14px 12px; gap: 10px; }
}

/* --- Revenue-transparency trigger + modal --- */
.info-trigger {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; margin-left: 6px; padding: 0;
  border: none; border-radius: 50%; cursor: pointer;
  background: #0a7d55; color: #fff; font-size: 12px; font-weight: 700; line-height: 1;
  vertical-align: middle;
}
.info-trigger:hover { background: #0c9667; }
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(15, 23, 42, 0.55); padding: 24px;
  align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff; max-width: 760px; width: 100%; max-height: 90vh; overflow: auto;
  border-radius: 12px; padding: 28px 32px; position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.modal-close {
  position: absolute; top: 12px; right: 16px; border: none; background: none;
  font-size: 28px; line-height: 1; cursor: pointer; color: #888;
}
.modal-close:hover { color: #222; }
.revenue-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 18px 0; }
@media (max-width: 600px) { .revenue-compare { grid-template-columns: 1fr; } }
.revenue-col { border: 1px solid #e5e7eb; border-radius: 10px; padding: 16px 18px; }
.revenue-col h3 { margin: 0 0 8px; }
.revenue-col.ours { border-color: #0a7d55; background: #f0fdf8; }
.revenue-col .example { color: #555; font-size: .92rem; }
.revenue-col ul { margin: 8px 0; padding-left: 18px; }
.revenue-col li { margin: 6px 0; }
.bigstat { margin-top: 10px; font-size: 1.05rem; }
.ours-stat { color: #0a7d55; }
.modal-fineprint { color: #777; font-size: .85rem; margin-top: 4px; }
