:root {
  --ink: #12151d;
  --muted: #656b76;
  --paper: #f8f6f0;
  --white: #fff;
  --line: #dedbd2;
  --accent: #df6044;
  --navy: #243c67;
  --shadow: 0 20px 55px rgba(18, 21, 29, .1)
}

.faq {
  max-width: 1100px;
  margin: auto;
  padding: 94px 5%;
  display: grid;
  grid-template-columns: .7fr 1.3fr;
  gap: 70px
}

.faq h2 {
  font-family: "Playfair Display", serif;
  font-size: 46px;
  letter-spacing: -1.8px;
  line-height: 1;
  margin: 0
}

.faq-intro p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  max-width: 290px
}

.faq-list {
  border-top: 1px solid var(--line)
}

.faq-item {
  border-bottom: 1px solid var(--line)
}

.faq-item h3 {
  margin: 0
}

.faq-item button {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 21px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  text-align: left;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer
}

.faq-item button i {
  font-style: normal;
  color: var(--accent);
  font-size: 23px;
  font-weight: 400;
  transition: transform .25s
}

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .3s ease
}

.faq-answer p {
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65
}

.faq-item.open .faq-answer {
  grid-template-rows: 1fr
}

.faq-item.open .faq-answer p {
  padding-bottom: 21px
}

.faq-item.open button i {
  transform: rotate(45deg)
}

.pdf-preview {
  display: none;
  width: 100%;
  height: 100%;
  min-height: 380px;
  background: #d8d2c3;
  border-radius: 8px;
  overflow: hidden
}

.pdf-scroll {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px 0
}

.pdf-page {
  max-width: 100%;
  height: auto;
  box-shadow: 0 6px 18px rgba(18, 21, 29, .18);
  border-radius: 3px;
  background: #fff
}

.preview-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  box-shadow: 0 6px 18px rgba(18, 21, 29, .18);
  border-radius: 3px;
  background: #fff
}

.pdf-status {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  padding: 30px 20px
}

.pdf-status-end {
  padding: 6px 20px 20px
}

.pdf-status-error a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline
}

.modal.has-pdf-preview .preview-sheet {
  display: none
}

.modal.has-pdf-preview .pdf-preview {
  display: block
}

@media(min-width:701px) {

  /* Give the preview column a real, bounded height on tablet/desktop so the
     PDF pages scroll INSIDE the panel instead of stretching the whole modal
     card taller than the viewport (which clipped everything past page 1-2). */
  .modal.has-pdf-preview .modal-card {
    height: calc(100vh - 40px);
    overflow: hidden
  }

  .modal.has-pdf-preview .modal-preview {
    display: block;
    height: 100%;
    padding: 20px;
    overflow: hidden
  }

  .modal.has-pdf-preview .modal-content {
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch
  }
}

@media(max-width:700px) {
  .faq {
    padding: 70px 5%;
    display: block
  }

  .faq h2 {
    font-size: 39px
  }

  .faq-intro p {
    max-width: none;
    margin-bottom: 30px
  }

  .modal.has-pdf-preview .modal-preview {
    display: block;
    padding: 12px
  }

  .modal.has-pdf-preview .pdf-preview {
    height: 58vh;
    min-height: 320px
  }
}

* {
  box-sizing: border-box
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden
}

body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", sans-serif
}

img,
svg {
  max-width: 100%;
  display: block
}

body.modal-open,
body.menu-open {
  overflow: hidden
}

a {
  text-decoration: none;
  color: inherit
}

button {
  font: inherit
}

.navbar {
  height: 78px;
  padding: 0 max(5%, calc((100% - 1100px)/2));
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid transparent;
  transition: height .3s, background .3s, box-shadow .3s;
  border-bottom-color .3s;
  background: rgba(248, 246, 240, .86);
  backdrop-filter: blur(14px)
}

.navbar.scrolled {
  height: 66px;
  border-bottom-color: var(--line);
  box-shadow: 0 5px 22px rgba(18, 21, 29, .05)
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  white-space: nowrap
}

.brand>span:last-child>span {
  color: var(--accent)
}

.brand-mark {
  height: 35px;
  width: 35px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  border-radius: 9px;
  font-size: 11px;
  letter-spacing: -.5px
}

.desktop-nav {
  display: flex;
  gap: 24px;
  color: #555b65;
  font-size: 13px
}

.desktop-nav a,
footer nav a {
  transition: color .2s
}

.desktop-nav a:hover,
footer nav a:hover {
  color: var(--accent)
}

.nav-btn,
.primary-btn {
  border: 0;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  padding: 12px 16px;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  transition: transform .2s, background .2s, box-shadow .2s
}

.nav-btn:hover,
.primary-btn:hover {
  transform: translateY(-2px);
  background: #292d38;
  box-shadow: 0 8px 18px rgba(18, 21, 29, .16)
}

.nav-btn span,
.primary-btn span,
.preview-button span,
.text-btn span,
.combo-card button span {
  transition: transform .2s
}

.nav-btn:hover span,
.primary-btn:hover span,
.preview-button:hover span,
.text-btn:hover span,
.combo-card button:hover span {
  transform: translateX(3px)
}

.menu-toggle,
.mobile-nav {
  display: none
}

.hero {
  max-width: 1220px;
  margin: auto;
  padding: 88px 6% 80px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 80px;
  align-items: center
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 16px
}

.hero h1,
.section-head h2,
.combo h2,
.how h2,
.coming h2,
.placement-callout h2 {
  font-family: "Playfair Display", serif;
  letter-spacing: -2px
}

.hero h1 {
  font-size: clamp(54px, 6.4vw, 84px);
  line-height: .96;
  margin: 0 0 24px
}

.hero h1 em {
  font-style: normal;
  color: var(--accent)
}

.hero p {
  margin: 0;
  max-width: 570px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7
}

.hero-actions {
  display: flex;
  gap: 20px;
  align-items: center;
  margin: 31px 0
}

.text-btn {
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  gap: 9px;
  align-items: center
}

.trust-row {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: #6d7078;
  font-size: 11px
}

.hero-card {
  background: #e9e3d5;
  min-height: 432px;
  padding: 23px;
  border-radius: 18px;
  box-shadow: var(--shadow);
  transform: rotate(1.3deg);
  animation: cardFloat 6s ease-in-out infinite
}

.card-top {
  display: flex;
  justify-content: space-between;
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 1.4px;
  font-weight: 700
}

.book-stack {
  height: 324px;
  position: relative
}

.mini-book {
  position: absolute;
  width: 72%;
  height: 208px;
  padding: 24px;
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 14px 25px rgba(18, 21, 29, .16)
}

.mini-book span,
.mini-book small {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1.2px
}

.mini-book b {
  font-family: "Playfair Display";
  font-size: 28px;
  line-height: 1.03
}

.book-a {
  top: 27px;
  left: 4%;
  background: #1d293d;
  color: #fff;
  transform: rotate(-7deg);
  animation: bookA 6s ease-in-out infinite
}

.book-b {
  top: 59px;
  left: 17%;
  background: #d9694e;
  color: #fff;
  transform: rotate(4deg);
  animation: bookB 6s ease-in-out infinite
}

.book-c {
  top: 100px;
  left: 27%;
  background: #f9f6ea;
  color: var(--ink);
  transform: rotate(-2deg);
  animation: bookC 6s ease-in-out infinite
}

.hero-note {
  text-align: center;
  font-family: "Playfair Display";
  font-size: 19px
}

.stats {
  max-width: 1220px;
  margin: auto;
  border-block: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, 1fr)
}

.stats div {
  padding: 27px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-right: 1px solid var(--line)
}

.stats div:last-child {
  border: 0
}

.stats strong {
  font-size: 23px
}

.stats span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase
}

.section,
.how {
  max-width: 1220px;
  margin: auto;
  padding: 100px 6%
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 35px;
  margin-bottom: 31px
}

.section-head h2,
.combo h2,
.how h2,
.coming h2,
.placement-callout h2 {
  font-size: 48px;
  line-height: 1;
  margin: 0
}

.section-head p {
  max-width: 390px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65
}

.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 28px
}

.filter {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  transition: background .2s, color .2s, transform .2s
}

.filter:hover {
  transform: translateY(-1px)
}

.filter.active,
.filter:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink)
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 23px;
  transition: opacity .16s, transform .16s
}

.product-grid.is-filtering {
  opacity: 0;
  transform: translateY(5px)
}

.product {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
  container-type: inline-size;
  transition: transform .25s, box-shadow .25s
}

.product:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 36px rgba(18, 21, 29, .1)
}

.cover {
  min-height: 235px;
  padding: 21px;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform .3s
}

.product:hover .cover {
  transform: scale(1.025)
}

.cover span,
.cover small {
  font-size: 9px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-weight: 700
}

.cover b {
  font-family: "Playfair Display";
  font-size: 31px;
  line-height: 1.02
}

.cover-math {
  background: #304f82
}

.cover-basic {
  background: #b95d44
}

.cover-digital {
  background: #202b3e
}

.cover-micro {
  background: #6b4d76
}

.cover-embedded {
  background: #365c54
}

.cover-combo {
  background: #bd8735
}

.cover-electronics-combo {
  background: #c75942
}

.cover-complete {
  background: #273d6b
}

.cover-pcb {
  background: #1c3d2e
}

.cover-ee {
  background: #1a2f52
}

.cover-mechanical {
  background: #3d6a52
}

.cover-aptitude {
  background: #5a3d7a
}

.product-info {
  padding: 20px
}

.tag {
  display: inline-block;
  color: var(--accent);
  font-size: 9px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 8px
}

.tag.soon {
  color: #777
}

.product h3 {
  font-size: 18px;
  margin: 0 0 8px
}

.product p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
  min-height: 38px
}

.product-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 19px
}

.product-bottom strong {
  font-size: 21px
}

.product-bottom button,
.combo-card button {
  border: 0;
  background: var(--ink);
  color: white;
  border-radius: 7px;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, transform .2s
}

.product-bottom button:hover,
.combo-card button:hover {
  background: var(--accent);
  transform: translateY(-1px)
}

button.disabled {
  background: #dfddd7;
  color: #898780;
  cursor: not-allowed
}

/* Reacts to the card's own rendered width (not the viewport) — so cards stay
   readable even when a phone forces a wide "desktop" layout and the columns
   end up narrow. Drops the description and tightens spacing/type instead of
   letting long titles wrap and get clipped by the cover box. */
@container (max-width: 230px) {
  .cover {
    min-height: 168px;
    padding: 16px
  }

  .cover b {
    font-size: 22px
  }

  .product-info {
    padding: 14px
  }

  .product h3 {
    font-size: 15px;
    margin-bottom: 4px
  }

  .product p {
    display: none
  }

  .product-bottom {
    margin-top: 10px
  }

  .product-bottom strong {
    font-size: 17px
  }

  .product-bottom button {
    padding: 8px 10px;
    font-size: 10px
  }
}

.placement-callout {
  max-width: 1100px;
  margin: 0 auto 92px;
  padding: 36px 40px;
  border-block: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  gap: 34px;
  align-items: center
}

.placement-callout .eyebrow {
  margin-bottom: 10px
}

.placement-callout h2 {
  font-size: 31px
}

.placement-callout p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65
}

.combo {
  background: var(--ink);
  color: #fff;
  padding: 84px max(6%, calc((100% - 1100px)/2));
  display: grid;
  grid-template-columns: .72fr 1.28fr;
  gap: 55px
}

.combo p {
  color: #b7bbc5;
  font-size: 14px;
  line-height: 1.65
}

.combo-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px
}

.combo-card {
  min-height: 235px;
  padding: 21px;
  border: 1px solid #3d414b;
  border-radius: 11px;
  display: flex;
  flex-direction: column;
  gap: 10px
}

.combo-card.featured {
  background: #f3eee2;
  color: var(--ink);
  border-color: #f3eee2;
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, .16)
}

.combo-card span {
  color: #aab0b9;
  font-size: 10px
}

.combo-card b {
  font-size: 15px
}

.combo-card small {
  min-height: 38px;
  color: #aab0b9;
  font-size: 10px;
  line-height: 1.5
}

.combo-card.featured small {
  color: #62666f
}

.combo-card strong {
  font-size: 23px
}

.combo-card button {
  margin-top: auto
}

.how {
  padding-bottom: 100px
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line)
}

.steps>div {
  padding: 29px 21px 0;
  border-right: 1px solid var(--line)
}

.steps>div:last-child {
  border: 0
}

.steps span {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent)
}

.steps h3 {
  font-size: 16px;
  margin: 24px 0 8px
}

.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65
}

.coming {
  background: #e8e0d1;
  text-align: center;
  padding: 88px 5%
}

.coming p {
  max-width: 520px;
  margin: 18px auto 25px;
  color: #65615a;
  font-size: 14px;
  line-height: 1.65
}

.coming-pill {
  position: relative;
  display: inline-block;
  border: 1px solid #aaa198;
  border-radius: 999px;
  padding: 11px 17px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.1px;
  overflow: hidden
}

.coming-pill:after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-120%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .75), transparent);
  animation: shimmer 3.5s infinite
}

.coming-pill i {
  color: var(--accent);
  font-style: normal
}

footer {
  max-width: 1220px;
  margin: auto;
  padding: 38px 6%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 12px
}

footer p {
  margin: 12px 0 0;
  color: var(--muted)
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: #595d65
}

footer small {
  color: #85837f;
  white-space: nowrap
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px
}

.modal.open {
  display: flex
}

.modal-backdrop {
  border: 0;
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 17, .7);
  backdrop-filter: blur(5px);
  animation: fade .25s
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(850px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: #f8f6f0;
  border-radius: 17px;
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .28);
  animation: modalIn .3s ease-out
}

.close {
  position: absolute;
  right: 14px;
  top: 13px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: white;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
  transition: transform .2s
}

.close:hover {
  transform: rotate(90deg)
}

.modal-preview {
  background: #e4ddcf;
  padding: 43px;
  display: grid;
  place-items: center
}

.preview-sheet {
  width: 225px;
  height: 305px;
  padding: 21px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: #fff;
  box-shadow: 0 16px 30px rgba(18, 21, 29, .18)
}

.preview-sheet b {
  font-family: "Playfair Display";
  font-size: 27px;
  line-height: 1.02;
  margin: auto 0 8px
}

.preview-sheet>span {
  font-size: 8px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 700
}

.fake-line {
  height: 5px;
  width: 72%;
  margin-top: 12px;
  background: rgba(255, 255, 255, .45)
}

.fake-line.wide {
  width: 95%;
  height: 10px
}

.fake-line.medium {
  width: 52%
}

.fake-box {
  height: 58px;
  margin-top: 18px;
  background: rgba(255, 255, 255, .2)
}

.watermark {
  position: absolute;
  left: 19px;
  top: 145px;
  transform: rotate(-35deg);
  font-size: 29px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .2);
  font-weight: 700
}

.modal-content {
  padding: 46px
}

.modal-content h2 {
  font-family: "Playfair Display";
  font-size: 37px;
  letter-spacing: -1px;
  line-height: 1.05;
  margin: 0 0 11px
}

.modal-content>p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65
}

.preview-copy {
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px
}

.preview-copy b {
  margin-bottom: 2px
}

.modal-price {
  padding: 17px 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center
}

.modal-price span {
  font-size: 11px;
  color: var(--muted)
}

.modal-price strong {
  font-size: 25px
}

.full {
  width: 100%
}

.notice {
  display: block;
  margin-top: 10px;
  text-align: center;
  color: #85837f;
  font-size: 9px
}

.hero-animate {
  opacity: 0;
  transform: translateY(16px);
  animation: heroIn .6s forwards
}

.hero-title {
  animation-delay: .1s
}

.hero-description {
  animation-delay: .2s
}

.hero-actions-animate {
  animation-delay: .3s
}

.hero-trust {
  animation-delay: .42s
}

[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .55s ease, transform .55s ease
}

[data-reveal="fade"] {
  transform: none
}

[data-reveal="scale"] {
  transform: scale(.96)
}

[data-reveal].revealed {
  opacity: 1;
  transform: none
}

@keyframes heroIn {
  to {
    opacity: 1;
    transform: none
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(.96) translateY(12px)
  }

  to {
    opacity: 1;
    transform: none
  }
}

@keyframes fade {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

@keyframes cardFloat {
  50% {
    transform: rotate(.4deg) translateY(-6px)
  }
}

@keyframes bookA {
  50% {
    transform: rotate(-8deg) translateY(-4px)
  }
}

@keyframes bookB {
  50% {
    transform: rotate(5deg) translateY(2px)
  }
}

@keyframes bookC {
  50% {
    transform: rotate(-1deg) translateY(-3px)
  }
}

@keyframes shimmer {

  0%,
  65% {
    transform: translateX(-120%)
  }

  100% {
    transform: translateX(120%)
  }
}

@media(max-width:950px) {
  .desktop-nav {
    gap: 14px
  }

  .hero {
    gap: 46px
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr)
  }

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

  .placement-callout {
    margin-inline: 5%;
    grid-template-columns: 1fr 1fr
  }

  .placement-callout .text-btn {
    grid-column: 1/-1
  }

  .steps {
    grid-template-columns: repeat(2, 1fr)
  }

  .steps>div:nth-child(2) {
    border-right: 0
  }

  .stats {
    grid-template-columns: repeat(2, 1fr)
  }

  .stats div:nth-child(2) {
    border-right: 0
  }

  .stats div:nth-child(-n+2) {
    border-bottom: 1px solid var(--line)
  }
}

/* Tablet portrait (e.g. iPad/Android tablets ~760-900px): the two-column hero
   still fits at 950px, but between ~760-900px it was squeezing into narrow
   columns and wrapping the headline badly. Stack it like mobile here instead. */
@media(max-width:900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 44px;
    padding: 60px 6% 60px;
    text-align: left
  }

  .hero-card {
    min-height: 380px;
    max-width: 460px;
    margin: 0 auto
  }
}

@media(max-width:700px) {
  .navbar {
    height: 68px
  }

  .desktop-nav,
  .desktop-cta {
    display: none
  }

  .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    cursor: pointer
  }

  .menu-toggle i {
    width: 21px;
    height: 2px;
    background: var(--ink);
    transition: transform .2s, opacity .2s
  }

  .menu-open .menu-toggle i:first-child {
    transform: translateY(7px) rotate(45deg)
  }

  .menu-open .menu-toggle i:nth-child(2) {
    opacity: 0
  }

  .menu-open .menu-toggle i:last-child {
    transform: translateY(-7px) rotate(-45deg)
  }

  .mobile-nav {
    position: fixed;
    display: flex;
    flex-direction: column;
    gap: 4px;
    left: 0;
    right: 0;
    top: 68px;
    padding: 20px 5% 28px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 15px 25px rgba(18, 21, 29, .08);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform .25s, opacity .25s
  }

  .mobile-nav a {
    padding: 10px 0;
    font-size: 15px
  }

  .mobile-nav .nav-btn {
    margin-top: 9px
  }

  .menu-open .mobile-nav {
    transform: none;
    opacity: 1;
    pointer-events: auto
  }

  .hero {
    padding: 55px 5% 65px;
    grid-template-columns: 1fr;
    gap: 44px
  }

  .hero h1 {
    font-size: 54px
  }

  .hero-card {
    min-height: 365px
  }

  .book-stack {
    height: 260px
  }

  .mini-book {
    height: 177px;
    padding: 19px
  }

  .mini-book b {
    font-size: 24px
  }

  .stats {
    margin: 0 5%
  }

  .stats div {
    padding: 18px 13px
  }

  .section,
  .how {
    padding: 70px 5%
  }

  .section-head {
    display: block
  }

  .section-head p {
    margin-top: 16px
  }

  .section-head h2,
  .combo h2,
  .how h2,
  .coming h2 {
    font-size: 39px
  }

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

  .filter-bar {
    flex-wrap: wrap;
    row-gap: 8px
  }

  .filter {
    padding: 11px 16px
  }

  .product-bottom button,
  .combo-card button {
    padding: 12px 14px
  }

  .placement-callout {
    padding: 30px 0;
    margin: 0 5% 68px;
    display: block
  }

  .placement-callout p {
    margin: 17px 0
  }

  .combo {
    padding: 64px 5%
  }

  .combo-cards {
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 8px
  }

  .combo-card {
    min-height: 200px
  }

  .combo-card.featured {
    transform: none
  }

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

  .steps>div {
    padding: 25px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line)
  }

  .steps>div:last-child {
    border-bottom: 0
  }

  .coming {
    padding: 68px 5%
  }

  footer {
    padding: 34px 5%;
    display: block
  }

  footer nav {
    margin: 25px 0
  }

  footer small {
    white-space: normal
  }

  .modal {
    padding: 0
  }

  .modal-card {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch
  }

  .close {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 6;
    box-shadow: 0 4px 14px rgba(18, 21, 29, .25)
  }

  .modal-content {
    padding: 30px 20px 32px
  }

  .modal-content h2 {
    font-size: 28px
  }
}

@media(max-width:480px) {
  .hero h1 {
    font-size: 42px
  }

  .hero-card {
    min-height: 330px
  }

  .book-stack {
    height: 232px
  }

  .mini-book {
    height: 158px;
    padding: 16px
  }

  .mini-book b {
    font-size: 21px
  }

  .stats {
    grid-template-columns: repeat(2, 1fr)
  }

  .stats div:nth-child(2) {
    border-right: 0
  }

  .stats div:nth-child(-n+2) {
    border-bottom: 1px solid var(--line)
  }

  .section-head h2,
  .combo h2,
  .how h2,
  .coming h2 {
    font-size: 32px
  }

  .filter-bar {
    flex-wrap: wrap;
    row-gap: 8px
  }

  .modal-content h2 {
    font-size: 24px
  }

  .modal.has-pdf-preview .pdf-preview {
    height: 54vh;
    min-height: 280px
  }
}

/* Short/landscape viewports (landscape phones, small foldables): width alone
   can be >700px here so the two-column modal would otherwise apply with very
   little vertical room. Force the mobile-style stacked, full-height modal
   whenever height is tight, regardless of width. */
@media(max-height:500px) {
  .modal {
    padding: 0
  }

  .modal-card {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch
  }

  .modal.has-pdf-preview .modal-card {
    height: 100%;
    overflow-y: auto
  }

  .modal.has-pdf-preview .modal-preview {
    display: block;
    height: auto;
    padding: 12px
  }

  .modal.has-pdf-preview .modal-content {
    height: auto;
    overflow: visible
  }

  .modal.has-pdf-preview .pdf-preview {
    height: 70vh;
    min-height: 220px
  }

  .close {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 6;
    box-shadow: 0 4px 14px rgba(18, 21, 29, .25)
  }

  .hero {
    padding-top: 40px;
    padding-bottom: 40px
  }
}

@media(prefers-reduced-motion:reduce) {
  html {
    scroll-behavior: auto
  }

  *,
  *:before,
  *:after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important
  }

  .hero-animate,
  [data-reveal] {
    opacity: 1;
    transform: none
  }
}

/* =========================================
   AI QUIZ — Placement Diary
========================================= */
.ai-quiz-section {
  background: var(--ink);
  color: var(--white);
  padding: 100px 5%;
}
.ai-quiz-container { max-width: 1100px; margin: 0 auto; }
.ai-quiz-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 30px; margin-bottom: 42px;
}
.ai-quiz-header h2 {
  font-family: "Playfair Display", serif;
  font-size: clamp(40px, 5vw, 58px);
  line-height: 1; letter-spacing: -2px; margin: 8px 0 14px;
}
.ai-quiz-header p { color: rgba(255,255,255,.68); max-width: 560px; line-height: 1.7; margin: 0; }
.ai-badge {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  border: 1px solid rgba(255,255,255,.2); border-radius: 999px;
  padding: 11px 15px; font-size: 13px; color: rgba(255,255,255,.86);
}
.ai-badge span { color: #df6044; }
.ai-quiz-setup {
  display: grid; grid-template-columns: repeat(4, 1fr) auto;
  gap: 12px; align-items: end; padding: 18px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
}
.quiz-field label { display:block; margin: 0 0 8px; font-size: 12px; color: rgba(255,255,255,.62); }
.quiz-field select {
  width: 100%; min-height: 46px; padding: 0 12px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.16); background: #fff; color: var(--ink);
  font: inherit; outline: none;
}
.quiz-field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(223,96,68,.18); }
.ai-generate-btn { min-height: 46px; white-space: nowrap; border: 0; }
.ai-generate-btn.is-loading { opacity: .65; pointer-events: none; }
.quiz-loading {
  text-align: center; padding: 50px 20px; color: rgba(255,255,255,.78);
}
.quiz-loader {
  width: 32px; height: 32px; margin: 0 auto 15px; border: 3px solid rgba(255,255,255,.18);
  border-top-color: var(--accent); border-radius: 50%; animation: pdQuizSpin .8s linear infinite;
}
@keyframes pdQuizSpin { to { transform: rotate(360deg); } }
.quiz-error {
  margin-top: 18px; padding: 15px 17px; border-radius: 12px;
  background: rgba(223,96,68,.13); border: 1px solid rgba(223,96,68,.35);
  color: #ffd7ce; line-height: 1.55;
}
.ai-quiz-area { margin-top: 30px; }
.quiz-topbar {
  display:flex; justify-content:space-between; align-items:center; gap:20px;
  padding-bottom: 22px; border-bottom: 1px solid rgba(255,255,255,.12);
}
.quiz-topbar h3 { font-size: 24px; margin: 6px 0 0; }
.quiz-progress { color: rgba(255,255,255,.62); font-size: 13px; }
.quiz-question {
  background: var(--white); color: var(--ink); border-radius: 16px; padding: 24px;
  margin-top: 16px; border: 1px solid var(--line); box-shadow: 0 12px 35px rgba(0,0,0,.12);
}
.quiz-question-number { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.quiz-question h4 { font-size: 17px; line-height: 1.55; margin: 9px 0 18px; }
.quiz-options { display:grid; gap:10px; }
.quiz-option {
  display:flex; align-items:flex-start; gap:11px; width:100%; text-align:left;
  padding: 13px 14px; border:1px solid var(--line); border-radius:10px;
  background: #fff; color:var(--ink); cursor:pointer; font:inherit; line-height:1.45;
  transition: border-color .18s, transform .18s, background .18s;
}
.quiz-option:hover { border-color: var(--accent); transform: translateY(-1px); }
.quiz-option.selected { border-color: var(--accent); background: #fff6f2; }
.quiz-option input { margin-top: 3px; accent-color: var(--accent); }
.quiz-option.is-correct { border-color: #3b8f5a; background: #edf8f0; }
.quiz-option.is-wrong { border-color: #c95445; background: #fff0ed; }
.quiz-feedback {
  margin-top: 10px; padding: 11px 13px; border-radius: 9px; font-size: 13px;
  background: #f5f3ed; color: var(--muted); line-height: 1.55;
}
.quiz-submit-btn { margin-top: 22px; border:0; }
.quiz-submit-btn:disabled { opacity:.55; cursor:not-allowed; }
.quiz-result {
  margin-top: 25px; padding: 28px; border-radius: 16px;
  background: rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.14);
}
.result-score { display:flex; align-items:baseline; justify-content:space-between; gap:20px; }
.result-score span { color:rgba(255,255,255,.64); font-size:13px; }
.result-score strong { font-size:42px; line-height:1; }
.result-message { margin:15px 0 20px; color:rgba(255,255,255,.82); line-height:1.6; }
.quiz-result .text-btn { color:#fff; }
.quiz-result .text-btn:hover { color:#fff; }

@media(max-width:950px) {
  .ai-quiz-setup { grid-template-columns: repeat(2, 1fr); }
  .ai-generate-btn { grid-column: 1 / -1; }
}
@media(max-width:700px) {
  .ai-quiz-section { padding: 72px 5%; }
  .ai-quiz-header { display:block; }
  .ai-badge { margin-top: 20px; }
  .ai-quiz-setup { grid-template-columns: 1fr; padding: 15px; }
  .ai-generate-btn { grid-column:auto; width:100%; }
  .quiz-topbar { align-items:flex-start; flex-direction:column; }
  .quiz-question { padding: 18px; }
  .result-score strong { font-size:34px; }
}

/* AI QUIZ — free-text subject/topic inputs and smart suggestions */
.quiz-autocomplete { position: relative; }
.quiz-field input[type="text"] {
  width: 100%; min-height: 46px; padding: 0 13px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.16); background: #fff; color: var(--ink);
  font: inherit; outline: none; box-sizing: border-box;
}
.quiz-field input[type="text"]::placeholder { color: #7c7c7c; }
.quiz-field input[type="text"]:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(223,96,68,.18);
}
.quiz-field label span { color: rgba(255,255,255,.42); font-weight: 400; }
.quiz-hint {
  display: block; margin-top: 7px; color: rgba(255,255,255,.45); font-size: 10px; line-height: 1.45;
}
.subject-suggestions {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 7px);
  max-height: 310px; overflow-y: auto; padding: 6px;
  background: #fff; border: 1px solid rgba(18,21,29,.12); border-radius: 12px;
  box-shadow: 0 18px 45px rgba(0,0,0,.22);
}
.subject-suggestion {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  border: 0; background: transparent; color: var(--ink); text-align: left; cursor: pointer;
  padding: 11px 12px; border-radius: 8px; font: inherit;
}
.subject-suggestion:hover,
.subject-suggestion.is-active { background: #f5f3ed; }
.suggestion-name { font-size: 12px; font-weight: 600; line-height: 1.35; }
.suggestion-branch {
  flex: 0 0 auto; font-size: 9px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--accent); font-weight: 700;
}
.quiz-subject-field { min-width: 0; }
.quiz-topic-field { min-width: 0; }

@media(max-width:950px) {
  .quiz-subject-field, .quiz-topic-field { grid-column: span 2; }
}
@media(max-width:700px) {
  .quiz-subject-field, .quiz-topic-field { grid-column: auto; }
  .subject-suggestions { max-height: 260px; }
}
