/* Ebook layout follows the current shared service-detail design. Body background and colors inherit the main theme. */
.ebook-content {
  padding: calc(64px + 3.5rem) 0 7rem;
}

.ebook-content.ebook-shell {
  width: min(960px, calc(100% - 4rem));
  margin: 0 auto;
}

.ebook-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-size: .8125rem;
  line-height: 1.6;
}

.ebook-breadcrumb a:hover {
  color: var(--primary);
}

.ebook-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2.25rem, 6vw, 4.5rem);
  background: #fff;
  border: 2px solid var(--on-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.ebook-hero::after {
  content: "eBooks";
  position: absolute;
  right: -1rem;
  bottom: -2.25rem;
  color: rgba(0, 112, 224, .055);
  font-family: 'Caveat', cursive;
  font-size: clamp(6rem, 18vw, 11rem);
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.ebook-content .ebook-hero::after {
  content: "eBooks";
}

.ebook-hero > * {
  position: relative;
  z-index: 1;
}

.ebook-hero .sec-label {
  display: block;
  margin: 0 0 .75rem;
}

.ebook-hero h2 {
  display: inline;
  width: auto;
  margin: 0;
  padding: 0 .08em;
  background: linear-gradient(transparent 70%, var(--tertiary) 70%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  font-size: clamp(1.65rem, 4.5vw, 3rem);
  font-weight: 700;
  letter-spacing: .03em;
  line-height: 1.45;
}

.ebook-content .ebook-catch {
  width: fit-content;
  margin: 0 0 1.25rem;
  font-size: clamp(1.65rem, 4.5vw, 3rem);
  font-weight: 700;
  letter-spacing: .03em;
  line-height: 1.45;
}

.ebook-content .ebook-catch:last-child {
  margin-bottom: 1.25rem;
}

.ebook-content .ebook-catch strong {
  font-weight: 700;
}

.ebook-content .ebook-marker {
  padding: 0 .06em;
  background: linear-gradient(transparent 70%, var(--tertiary) 70%) !important;
  color: inherit;
}

.ebook-hero h1 {
  max-width: 760px;
  margin: 1.25rem 0 0;
  color: var(--on-surface);
  font-size: clamp(1.15rem, 2.6vw, 1.65rem);
  font-weight: 600;
  letter-spacing: .025em;
  line-height: 1.6;
}

.ebook-intro {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) 1.5rem 1rem;
}

.ebook-intro p {
  margin-bottom: 1.25rem;
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: 2.05;
}

.ebook-intro p:last-child {
  margin-bottom: 0;
  font-weight: 700;
}

.ebook-sections {
  counter-reset: service-section;
  display: grid;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.ebook-section {
  counter-increment: service-section;
  position: relative;
  padding: clamp(1.75rem, 5vw, 3.5rem);
  background: #fff;
  border: 1px solid rgba(0, 112, 224, .18);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 28px rgba(24, 28, 30, .045);
}

.ebook-section::before {
  content: "SECTION " counter(service-section, decimal-leading-zero);
  display: block;
  margin-bottom: .55rem;
  color: var(--primary);
  font-family: var(--en);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .14em;
}

.ebook-section > h2:first-child {
  margin: 0 0 1.75rem;
  font-size: clamp(1.3rem, 3.4vw, 2rem);
  font-weight: 700;
  letter-spacing: .03em;
  line-height: 1.5;
}

.ebook-section h3 {
  margin: 2rem 0 .65rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--primary);
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  font-weight: 700;
  line-height: 1.6;
}

.ebook-section > h2 + h3 {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.ebook-section p,
.ebook-section li {
  font-size: 1rem;
  line-height: 2;
}

.ebook-section p {
  margin-bottom: 1rem;
}

.ebook-section p:last-child {
  margin-bottom: 0;
}

.ebook-section strong {
  font-weight: 700;
}

.ebook-section mark {
  background: linear-gradient(transparent 58%, var(--tertiary) 58%) !important;
  color: inherit;
  padding: 0 .1em;
}

.ebook-section ul {
  display: grid;
  gap: .75rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.ebook-section li {
  position: relative;
  padding: .85rem 1rem .85rem 3rem;
  background: rgba(0, 112, 224, .045);
  border-radius: var(--radius-md);
}

.ebook-section li::before {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 1rem;
  transform: translateY(-50%);
  width: 1.35rem;
  height: 1.35rem;
  display: grid;
  place-items: center;
  background: var(--primary);
  border-radius: 50%;
  color: #fff;
  font-family: var(--en);
  font-size: .75rem;
  font-weight: 800;
  line-height: 1;
}

.ebook-section a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .2em;
}

.ebook-section:last-child {
  border-color: var(--on-surface);
  text-align: center;
}

.ebook-section:last-child::before {
  content: "CONTACT";
}

.ebook-section:last-child > h2:first-child {
  display: inline;
  width: auto;
  margin: 0;
  padding: 0 .08em;
  background: linear-gradient(transparent 72%, var(--tertiary) 72%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.ebook-section:last-child > h2:first-child + * {
  margin-top: 1.75rem;
}

.ebook-section:last-child p:last-child a {
  display: inline-block;
  margin-top: 1rem;
  padding: 12px 32px;
  background: var(--primary);
  border-radius: 4px;
  color: #fff;
  text-decoration: none;
}

.ebook-section:last-child p:last-child a:hover {
  opacity: .85;
}

@media (max-width: 768px) {
  .ebook-content {
    padding: calc(64px + 2rem) 0 5rem;
  }

  .ebook-content.ebook-shell {
    width: min(100% - 2.5rem, 960px);
  }

  .ebook-hero {
    border-radius: 1rem;
  }

  .ebook-hero::after {
    right: -1.5rem;
    bottom: -1rem;
  }

  .ebook-intro {
    padding-right: .25rem;
    padding-left: .25rem;
  }

  .ebook-section {
    border-radius: 1rem;
  }
}

@media (max-width: 480px) {
  .ebook-content.ebook-shell {
    width: min(100% - 2rem, 960px);
  }

  .ebook-breadcrumb {
    font-size: .75rem;
  }

  .ebook-hero {
    padding: 1.75rem 1.35rem 2rem;
  }

  .ebook-hero h2 {
    font-size: 1.55rem;
  }

  .ebook-content .ebook-catch {
    font-size: 1.55rem;
  }

  .ebook-hero h1 {
    font-size: 1rem;
  }

  .ebook-section {
    padding: 1.5rem 1.25rem;
  }

  .ebook-section p,
  .ebook-section li {
    font-size: .9375rem;
  }
}

.ebook-content .ebook-hero > * {position:relative;z-index:1}
.ebook-content .ebook-eyebrow {display:block;margin:0 0 .75rem;color:var(--primary);font-family:var(--en);font-size:.75rem;font-weight:800;letter-spacing:.14em}
.ebook-content .ebook-marker {background:linear-gradient(transparent 70%,var(--tertiary) 70%);box-decoration-break:clone;-webkit-box-decoration-break:clone;padding:0 .06em}
.ebook-content .ebook-contact h2 .ebook-marker {background:none;padding:0}
.ebook-content .ebook-jump {display:flex;flex-wrap:wrap;gap:.75rem 1.5rem;margin-top:1.5rem;font-size:.875rem;color:var(--primary)}
.ebook-content .ebook-prices {display:grid;grid-template-columns:1fr 1fr;gap:1.25rem}
.ebook-content .ebook-price-card {border:1px solid rgba(0,112,224,.18);border-radius:var(--radius-md);padding:1.75rem;background:rgba(0,112,224,.045)}
.ebook-content .ebook-price-card h3 {margin:0 0 .5rem;padding:0;border:0;color:var(--on-surface)}
.ebook-content .ebook-price-card .ebook-en {font-family:var(--en);font-size:.7rem;font-weight:800;letter-spacing:.14em;color:var(--primary)}
.ebook-content .ebook-price-card .ebook-amount {margin:1rem 0;line-height:1.3;white-space:nowrap}
.ebook-content .ebook-amount strong {font-family:var(--en);font-size:2.7rem;letter-spacing:-.04em}
.ebook-content .ebook-amount span {font-size:1.05rem;font-weight:700}
.ebook-content .ebook-price-card .ebook-unit {font-size:.75rem;color:var(--muted)}
.ebook-content .ebook-price-card .ebook-description {font-size:.875rem;line-height:2}
.ebook-content .ebook-discount {margin-top:1.5rem;font-weight:700}
.ebook-content .ebook-note {font-size:.8125rem;color:var(--muted)}
.ebook-content .ebook-callout {margin:1.5rem 0;padding:1.25rem;border-left:3px solid var(--primary);background:rgba(0,112,224,.045);font-size:.875rem;line-height:2}
.ebook-content .ebook-callout strong {display:block;margin-bottom:.3rem}
.ebook-content .ebook-table-wrap {margin:1.5rem 0}
.ebook-content table {width:100%;table-layout:fixed;border-collapse:collapse;font-size:.875rem;line-height:1.8}
.ebook-content th,.ebook-content td {padding:1rem .75rem;text-align:center;border-bottom:1px solid var(--border);overflow-wrap:anywhere}
.ebook-content thead th {background:rgba(0,112,224,.045);font-weight:700}
.ebook-content th:first-child {width:50%;text-align:left}
.ebook-content tbody th {font-weight:500}
.ebook-content .ebook-required {color:var(--primary);font-weight:700}
.ebook-content .ebook-supplies dt {font-weight:700;margin:1.5rem 0 .4rem}
.ebook-content .ebook-supplies dd {margin:0;font-size:.875rem;line-height:2;color:var(--muted)}
.ebook-content .ebook-cta {display:inline-block;margin-top:1rem;padding:12px 32px;background:var(--primary);border-radius:4px;color:#fff;text-decoration:none;font-weight:700}
.ebook-content .ebook-cta:hover {opacity:.85}
.ebook-content .ebook-section {scroll-margin-top:90px}
.ebook-content a:focus-visible {outline:3px solid var(--primary);outline-offset:4px}
@media(max-width:700px){.ebook-content .ebook-prices{grid-template-columns:1fr}.ebook-content .ebook-price-card{padding:1.25rem}.ebook-content th,.ebook-content td{padding:.8rem .35rem;font-size:.75rem}.ebook-content th:first-child{width:46%}.ebook-content .ebook-jump{font-size:.8125rem}.ebook-content .ebook-cta{padding:12px 20px}}
