:root {
  --ink: #07141f;
  --ink-soft: #0e2233;
  --paper: #e7eef4;
  --paper-dim: #d5e0ea;
  --mist: #9bb0c3;
  --jade: #1f9b7a;
  --jade-bright: #2ec9a0;
  --jade-deep: #0f6b54;
  --sand: #f3ebe0;
  --line: rgba(231, 238, 244, 0.12);
  --shadow: 0 24px 60px rgba(3, 12, 22, 0.45);
  --radius: 4px;
  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--paper);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(31, 155, 122, 0.22), transparent 55%),
    radial-gradient(900px 500px at 100% 20%, rgba(46, 120, 180, 0.18), transparent 50%),
    linear-gradient(165deg, #041018 0%, var(--ink) 40%, #0a1c2c 100%);
  min-height: 100vh;
  line-height: 1.55;
  overflow-x: hidden;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.site-header,
main,
.site-footer,
.modal,
.cart-drawer {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem clamp(1.2rem, 4vw, 3rem);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(7, 20, 31, 0.72);
  border-bottom: 1px solid var(--line);
  /* relative for mobile dropdown */
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}

.nav {
  display: flex;
  gap: 1.5rem;
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(14, 34, 51, 0.65);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 1.1rem;
  height: 2px;
  border-radius: 2px;
  background: var(--paper);
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

.site-header.is-nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header.is-nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.site-header.is-nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.catalog-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  margin: 0 0 1.25rem;
}

.catalog-pick {
  font-size: 0.92rem;
  color: var(--jade-bright);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.catalog-pick:hover {
  color: var(--paper);
}

.nav a {
  color: var(--mist);
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--paper);
}

.cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--paper);
  transition: border-color 0.2s, background 0.2s;
}

.cart-btn:hover {
  border-color: var(--jade-bright);
  background: rgba(31, 155, 122, 0.12);
}

.cart-count {
  min-width: 1.4rem;
  height: 1.4rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--jade);
  color: #041018;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Hero */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: clamp(2rem, 6vw, 5rem) clamp(1.2rem, 4vw, 3rem) clamp(3rem, 7vw, 6rem);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.9;
}

.hero-bg-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-copy,
.hero-visual {
  position: relative;
  z-index: 1;
}

.hero-area {
  animation: fade-soft 1.4s var(--ease) 0.2s both;
}

.chart-draw {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: draw-long 2.2s var(--ease) 0.35s forwards;
}

.chart-draw.delay2 {
  animation-delay: 0.7s;
}

.hero-bars .bar {
  transform-origin: bottom;
  transform: scaleY(0);
  animation: bar-grow 0.9s var(--ease) forwards;
}

.hero-bars .bar:nth-child(1) { animation-delay: 0.35s; }
.hero-bars .bar:nth-child(2) { animation-delay: 0.45s; }
.hero-bars .bar:nth-child(3) { animation-delay: 0.55s; }
.hero-bars .bar:nth-child(4) { animation-delay: 0.5s; }
.hero-bars .bar:nth-child(5) { animation-delay: 0.6s; }
.hero-bars .bar:nth-child(6) { animation-delay: 0.7s; }

.donut-arc,
.pie-arc {
  animation: fade-soft 1.2s var(--ease) 0.6s both;
}

.donut-arc.delay,
.pie-arc.delay {
  animation-delay: 0.85s;
}

.brand-mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.2rem, 8vw, 6.5rem);
  line-height: 0.9;
  letter-spacing: -0.06em;
  margin: 0 0 1.2rem;
  background: linear-gradient(120deg, #fff 0%, var(--jade-bright) 45%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rise 0.9s var(--ease) both;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.55rem, 3.2vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  max-width: 18ch;
  animation: rise 0.9s var(--ease) 0.08s both;
}

.hero-lead {
  margin: 0 0 1.8rem;
  color: var(--mist);
  max-width: 38ch;
  font-size: 1.05rem;
  animation: rise 0.9s var(--ease) 0.16s both;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: rise 0.9s var(--ease) 0.24s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s var(--ease), background 0.2s, color 0.2s, border-color 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--jade);
  color: #041018;
}

.btn-primary:hover {
  background: var(--jade-bright);
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--paper);
}

.btn-ghost:hover {
  border-color: var(--mist);
}

.btn-sm {
  padding: 0.65rem 1rem;
  font-size: 0.88rem;
}

.hero-visual {
  position: relative;
  z-index: 1;
  min-height: 360px;
  animation: float-in 1.1s var(--ease) 0.2s both;
}

.sheet {
  background: linear-gradient(160deg, rgba(14, 34, 51, 0.95), rgba(8, 24, 38, 0.98));
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.sheet-a {
  padding: 0.9rem;
  transform: rotate(-2deg);
}

.sheet-b {
  position: absolute;
  right: 4%;
  bottom: 6%;
  width: min(260px, 70%);
  padding: 1rem 1.1rem;
  transform: rotate(3deg);
  background: linear-gradient(145deg, rgba(15, 107, 84, 0.35), rgba(8, 24, 38, 0.95));
  animation: bob 5s ease-in-out infinite;
}

.sheet-c {
  position: absolute;
  left: 2%;
  bottom: 12%;
  width: min(150px, 42%);
  padding: 0.85rem;
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  transform: rotate(-4deg);
  background: linear-gradient(145deg, rgba(46, 120, 180, 0.28), rgba(8, 24, 38, 0.95));
  animation: bob 6s ease-in-out 0.8s infinite;
}

.pie-mini {
  width: 72px;
  height: 72px;
}

.sheet-bar {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.8rem;
}

.sheet-bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(231, 238, 244, 0.2);
}

.sheet-bar span:nth-child(1) { background: #e06b5c; }
.sheet-bar span:nth-child(2) { background: #d4b45a; }
.sheet-bar span:nth-child(3) { background: var(--jade-bright); }

.sheet-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1px;
  background: rgba(231, 238, 244, 0.08);
  border: 1px solid rgba(231, 238, 244, 0.08);
}

.cell {
  background: rgba(7, 20, 31, 0.85);
  padding: 0.55rem 0.65rem;
  font-size: 0.78rem;
  color: var(--mist);
}

.cell.head {
  background: rgba(31, 155, 122, 0.18);
  color: var(--paper);
  font-weight: 600;
}

.cell.val {
  font-variant-numeric: tabular-nums;
  color: var(--paper);
  text-align: right;
}

.cell.up {
  color: var(--jade-bright);
}

.mini-chart {
  color: var(--jade-bright);
  margin-bottom: 0.45rem;
}

.mini-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.3rem;
  height: 42px;
  margin-bottom: 0.55rem;
}

.mini-bars span {
  flex: 1;
  height: var(--h);
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, var(--jade-bright), rgba(31, 155, 122, 0.35));
  transform-origin: bottom;
  animation: bar-grow 0.8s var(--ease) forwards;
}

.mini-bars span:nth-child(1) { animation-delay: 0.5s; }
.mini-bars span:nth-child(2) { animation-delay: 0.58s; }
.mini-bars span:nth-child(3) { animation-delay: 0.66s; }
.mini-bars span:nth-child(4) { animation-delay: 0.74s; }
.mini-bars span:nth-child(5) { animation-delay: 0.82s; }

.chart-line {
  stroke-dasharray: 280;
  stroke-dashoffset: 280;
  animation: draw 1.6s var(--ease) 0.6s forwards;
}

.mini-label {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--paper-dim);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes bob {
  0%, 100% { transform: rotate(3deg) translateY(0); }
  50% { transform: rotate(3deg) translateY(-8px); }
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

@keyframes draw-long {
  to { stroke-dashoffset: 0; }
}

@keyframes bar-grow {
  from { transform: scaleY(0); opacity: 0.3; }
  to { transform: scaleY(1); opacity: 1; }
}

@keyframes fade-soft {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Sections */
.section-head {
  margin-bottom: 2rem;
  max-width: 40rem;
}

.section-head h2,
.authors h2,
.why h3,
.product-name,
.modal-body h2 {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
}

.section-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin: 0 0 0.6rem;
}

.section-head p {
  margin: 0;
  color: var(--mist);
}

.catalog,
.home-ebooks,
.why,
.compare,
.authors,
.reviews-section {
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1.2rem, 4vw, 3rem);
}

.home-ebooks-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  max-width: none;
}

.home-ebooks-head > div {
  max-width: 40rem;
}

.home-ebooks-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1.25rem 1.35rem;
  max-width: 640px;
}

.home-ebook {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 0 0 140px;
  width: 140px;
  max-width: 140px;
  box-sizing: border-box;
  color: inherit;
  text-decoration: none;
  transition: transform 0.35s var(--ease);
}

.home-ebook:hover {
  transform: translateY(-4px);
}

.home-ebook img {
  display: block;
  width: 140px;
  height: 200px;
  max-width: 140px;
  max-height: 200px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--ink-soft);
  box-shadow: 0 10px 22px rgba(3, 12, 22, 0.32);
}

.home-ebook:hover img {
  border-color: rgba(46, 201, 160, 0.45);
}

.home-ebook-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-ebook-meta {
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--jade-bright);
}

.home-ebooks-foot {
  margin: 1.5rem 0 0;
  font-size: 0.95rem;
}

.home-ebooks-foot a {
  color: var(--jade-bright);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.home-ebooks-foot a:hover {
  color: var(--paper);
}

.compare-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(14, 34, 51, 0.45);
}

.compare-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.compare-table th,
.compare-table td {
  padding: 0.85rem 0.95rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}

.compare-table thead th {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  background: rgba(31, 155, 122, 0.12);
  color: var(--paper);
  position: sticky;
  top: 0;
}

.compare-table thead th a {
  color: var(--jade-bright);
}

.compare-table thead th a:hover {
  color: var(--paper);
}

.compare-table tbody th {
  font-weight: 600;
  color: var(--paper-dim);
  white-space: nowrap;
  background: rgba(7, 20, 31, 0.35);
}

.compare-table tbody td {
  color: var(--mist);
  max-width: 11rem;
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
  border-bottom: 0;
  vertical-align: middle;
}

.float-cta {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 25;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  background: var(--jade);
  color: #041018;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 12px 32px rgba(3, 12, 22, 0.45);
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.float-cta.is-visible {
  transform: none;
  opacity: 1;
  pointer-events: auto;
}

.float-cta[hidden] {
  display: none;
}

.float-cta:not([hidden]) {
  display: inline-flex;
}

.float-cta:hover {
  background: var(--jade-bright);
}

.home-reviews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}

.home-reviews img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--ink-soft);
}

.reviews-more {
  margin: 1.75rem 0 0;
  text-align: center;
}

/* Filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0;
}

.catalog-tools .filters {
  margin-bottom: 0;
}

.filter {
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--mist);
  transition: 0.2s;
}

.filter:hover,
.filter.is-active {
  color: #041018;
  background: var(--jade-bright);
  border-color: var(--jade-bright);
}

/* Products — list rows, not card grid */
.product-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.product {
  display: grid;
  grid-template-columns: 140px minmax(0, 1.4fr) minmax(0, 1fr) auto;
  gap: 1.25rem 1.5rem;
  align-items: center;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.7s var(--ease) forwards;
}

.product-thumb {
  position: relative;
  display: block;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--ink-soft);
  aspect-ratio: 4 / 3;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}

.product-name a:hover {
  color: var(--jade-bright);
}

.product.is-hidden {
  display: none;
}

.product-tag {
  display: inline-block;
  margin-bottom: 0.45rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--jade-bright);
}

.product-labels {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin-bottom: 0.45rem;
}

.product-labels .product-tag {
  margin-bottom: 0;
}

.product-badge {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.28rem 0.55rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--jade-bright);
  border-radius: 4px;
}

.product-badge-icon {
  width: 0.85em;
  height: 0.85em;
  flex-shrink: 0;
}

.product-badge--inline {
  position: static;
  padding: 0.2rem 0.45rem;
  font-size: 0.68rem;
}

.product-name {
  margin: 0 0 0.35rem;
  font-size: 1.55rem;
  font-weight: 700;
}

.product-full-title {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  color: var(--paper-dim);
  max-width: 48ch;
}

.product-short {
  margin: 0;
  color: var(--mist);
  max-width: 48ch;
  font-size: 0.92rem;
}

.product-price-block {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.price-old {
  color: var(--mist);
  text-decoration: line-through;
  font-size: 0.9rem;
}

.price-now {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.price-save {
  font-size: 0.8rem;
  color: var(--jade-bright);
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

/* Why */
.why {
  background:
    linear-gradient(180deg, transparent, rgba(15, 107, 84, 0.08) 30%, transparent);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem 2.5rem;
}

.why-num {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--jade);
  margin-bottom: 0.6rem;
  letter-spacing: -0.04em;
}

.why h3 {
  margin: 0 0 0.55rem;
  font-size: 1.2rem;
}

.why article p {
  margin: 0;
  color: var(--mist);
}

/* Authors */
.authors-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: stretch;
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(14, 34, 51, 0.7), rgba(7, 20, 31, 0.4));
}

.eyebrow {
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--jade-bright);
}

.authors h2 {
  margin: 0 0 0.9rem;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
}

.authors-photos {
  display: flex;
  gap: 0.85rem;
  margin: 0 0 1.25rem;
}

.authors-photos figure {
  margin: 0;
  width: 72px;
}

.authors-photos img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: block;
}

.authors-photos figcaption {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--paper-dim);
  text-align: center;
}

.authors-copy > p {
  color: var(--mist);
  margin: 0 0 1.2rem;
}

.elibrary-link {
  color: var(--jade-bright);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.authors-copy .elibrary-link:hover {
  color: var(--paper);
}

.books-label {
  margin: 0 0 0.35rem !important;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--jade-bright) !important;
}

.books-label a {
  color: var(--paper-dim);
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
}

.books-label a:hover {
  color: var(--jade-bright);
}

.books-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.books-list li {
  padding: 0;
  border-top: 1px solid var(--line);
}

.books-list a {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  padding: 0.7rem 0;
  color: var(--paper-dim);
  font-size: 0.95rem;
  transition: color 0.2s;
}

.books-list a:hover {
  color: var(--jade-bright);
}

.book-title {
  flex: 1 1 12rem;
}

.book-rating {
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  color: var(--jade-bright);
  letter-spacing: 0.01em;
}

.books-list a:hover .book-rating {
  color: var(--jade-bright);
}

.authors-panel {
  display: flex;
  align-items: flex-end;
}

.quote-block {
  width: 100%;
  padding: 1.5rem;
  border-radius: 12px;
  background: linear-gradient(160deg, var(--jade-deep), #0a3d32);
}

.quote-block p {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.quote-block span {
  color: rgba(231, 238, 244, 0.7);
  font-size: 0.85rem;
}

/* Footer */
.site-footer {
  margin-top: 2rem;
  padding: 2.5rem clamp(1.2rem, 4vw, 3rem) 2rem;
  border-top: 1px solid var(--line);
  color: var(--mist);
  font-size: 0.92rem;
}

.footer-top {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.footer-top .logo {
  color: var(--paper);
}

.footer-mid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  margin-bottom: 1rem;
}

.footer-mid a {
  color: var(--jade-bright);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}

.footer-links a:hover {
  color: var(--paper);
}

/* Modal */
.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 14, 0.72);
  backdrop-filter: blur(4px);
}

.modal-panel {
  position: relative;
  width: min(720px, 100%);
  max-height: min(88vh, 860px);
  overflow: auto;
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 1.75rem 1.75rem 0;
}

.modal-close {
  position: absolute;
  top: 0.7rem;
  right: 0.9rem;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--mist);
}

.modal-body .product-tag {
  margin-bottom: 0.35rem;
}

.modal-body h2 {
  margin: 0 0 0.35rem;
  font-size: 1.8rem;
}

.modal-subtitle {
  margin: 0 0 1rem;
  color: var(--jade-bright);
  font-size: 1rem;
  font-weight: 500;
}

.modal-body .lead {
  color: var(--mist);
  margin: 0 0 1.4rem;
  font-size: 0.98rem;
}

.modal-h {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 1.4rem 0 0.55rem;
  color: var(--paper);
}

.feature-list {
  margin: 0 0 0.5rem;
  padding: 0;
  list-style: none;
}

.feature-list li {
  position: relative;
  padding: 0.5rem 0 0.5rem 1.35rem;
  border-bottom: 1px solid var(--line);
  color: var(--paper-dim);
  font-size: 0.92rem;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.95rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 2px;
  background: var(--jade);
}

.for-whom {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 0.75rem;
}

.for-whom article {
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}

.for-whom h4 {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
}

.for-whom p {
  margin: 0;
  color: var(--mist);
  font-size: 0.9rem;
}

.modal-note {
  margin: 1.1rem 0 0.5rem;
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--jade);
  background: rgba(31, 155, 122, 0.1);
  color: var(--paper-dim);
  font-size: 0.9rem;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.sticky-actions {
  position: sticky;
  bottom: 0;
  margin: 1.25rem -1.75rem 0;
  padding: 1rem 1.75rem 1.25rem;
  background: linear-gradient(180deg, transparent, var(--ink-soft) 28%);
  border-top: 1px solid var(--line);
}

.modal-price-wrap {
  margin-right: auto;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.modal-price {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
}

/* Cart */
.cart-overlay[hidden] {
  display: none;
}

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 8, 14, 0.55);
  z-index: 29;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 30;
  width: min(400px, 100%);
  height: 100%;
  background: var(--ink-soft);
  border-left: 1px solid var(--line);
  transform: translateX(105%);
  transition: transform 0.35s var(--ease);
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
}

.cart-drawer.is-open {
  transform: none;
}

.cart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.cart-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.4rem;
}

.cart-head button {
  font-size: 1.6rem;
  color: var(--mist);
}

.cart-items {
  flex: 1;
  overflow: auto;
}

.cart-empty {
  color: var(--mist);
  padding: 1rem 0;
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 0.75rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.cart-item h3 {
  margin: 0;
  font-size: 1rem;
  font-family: var(--font-display);
}

.cart-item .meta {
  grid-column: 1 / -1;
  color: var(--mist);
  font-size: 0.88rem;
}

.cart-item .remove {
  color: var(--mist);
  font-size: 0.82rem;
  text-decoration: underline;
  justify-self: end;
}

.cart-buy {
  grid-column: 1 / -1;
  margin-top: 0.35rem;
}

.cart-foot {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.75rem;
  font-size: 1.05rem;
}

.cart-total strong {
  font-family: var(--font-display);
  font-size: 1.4rem;
}

.cart-note {
  margin: 0;
  font-size: 0.82rem;
  color: var(--mist);
}

body.cart-open {
  overflow: hidden;
}

/* Responsive */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 2.5rem;
  }

  .hero-bg {
    opacity: 0.55;
  }

  .hero-visual {
    order: -1;
    min-height: 280px;
  }

  .product {
    grid-template-columns: 100px 1fr;
    gap: 0.9rem;
  }

  .product-price-block,
  .product-actions {
    grid-column: 1 / -1;
  }

  .product-actions {
    justify-content: flex-start;
  }

  .why-grid,
  .authors-inner {
    grid-template-columns: 1fr;
  }

  .home-ebooks-grid {
    max-width: none;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .site-header .btn,
  .site-header #headerBuy {
    display: none;
  }

  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 1.2rem 1rem;
    background: rgba(7, 20, 31, 0.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
  }

  .site-header.is-nav-open .nav {
    display: flex;
  }

  .nav a {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 1rem;
    color: var(--paper);
  }

  .nav a:last-child {
    border-bottom: 0;
  }

  .brand-mark {
    font-size: clamp(2.8rem, 14vw, 4.5rem);
  }

  .sheet-a {
    transform: none;
  }

  .sheet-b,
  .sheet-c {
    transform: none;
    animation: none;
  }

  .home-ebooks-grid {
    gap: 1.1rem 1rem;
  }

  .home-ebook {
    flex: 0 0 120px;
    width: 120px;
    max-width: 120px;
  }

  .home-ebook img {
    width: 120px;
    height: 172px;
    max-width: 120px;
    max-height: 172px;
  }

  .home-ebook-title {
    font-size: 0.88rem;
  }
}
