/* Final progressive UI overrides for simplified navigation and product display. */
body.drawer-open {
  overflow: hidden;
}

.site-nav .parent-nav {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 72px;
  padding: 12px;
}

.parent-nav .nav-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--paper);
  color: var(--red-dark);
  font-size: 1.15rem;
  font-weight: 900;
}

.parent-nav > span:last-child {
  display: grid;
  gap: 4px;
}

.parent-nav strong {
  color: inherit;
  font-size: 0.86rem;
  font-weight: 950;
  letter-spacing: 0.06em;
}

.parent-nav em {
  color: #827871;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 650;
  line-height: 1.28;
  pointer-events: none;
}

.site-nav .parent-nav.is-active .nav-icon {
  color: #fff;
  background: var(--red);
}

.site-nav .parent-nav.is-active em {
  color: #7d514c;
}

.hub-page,
.content-channel {
  background:
    radial-gradient(circle at top left, rgba(217, 43, 32, 0.05), transparent 34%),
    var(--paper);
}

.hub-grid,
.channel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.hub-grid article,
.channel-grid article {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 250px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.module-image,
.product-card-image {
  width: 100%;
  height: 168px;
  margin: -6px 0 18px;
  border-radius: calc(var(--radius) - 4px);
  object-fit: cover;
  object-position: var(--image-position, center);
  background: var(--cream);
}

.product-card-image {
  height: 154px;
  margin: 0 0 18px;
}

.programs-intro .section-heading {
  max-width: 980px;
  margin-inline: auto;
}

.hub-grid article > span,
.channel-grid article > span {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff1ef;
  color: var(--red-dark);
  font-size: 0.75rem;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hub-grid h3,
.channel-grid h3 {
  margin: 0 0 10px;
  font-size: clamp(1.28rem, 2vw, 1.7rem);
  line-height: 1.12;
}

.hub-grid p,
.channel-grid p {
  margin: 0 0 18px;
  color: var(--muted);
}

.hub-grid .button,
.channel-grid .button {
  margin-top: auto;
}

.product-hub article:nth-child(3),
.hub-grid article:has(.button.primary) {
  border-color: rgba(217, 43, 32, 0.26);
}

.pricing-section-label {
  margin: 30px auto 12px;
  color: var(--red-dark);
  font-size: 0.8rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.waitlist-grid {
  margin-top: 0;
}

.price-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  overflow: hidden;
}

.price-card .button {
  margin-top: auto;
}

.price-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
}

.original-price {
  color: #8d847d;
  font-size: 0.66em;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.price-note {
  margin: -4px 0 12px;
  color: var(--red-dark);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.product-features {
  display: grid;
  gap: 7px;
  margin: 4px 0 16px;
  padding: 0;
  list-style: none;
  color: #4a403a;
  font-weight: 750;
}

.product-features li::before {
  content: "+";
  margin-right: 8px;
  color: var(--red);
  font-weight: 950;
}

.product-audience {
  color: #827871;
  font-size: 0.88rem;
  line-height: 1.5;
}

.waitlist-card {
  opacity: 0.92;
}

.waitlist-card strong {
  color: #5f5852;
}

.word-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.detail-summary-line {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  font-weight: 850;
}

.dictionary-hero-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: clamp(20px, 4vw, 56px);
  align-items: center;
  margin-bottom: 22px;
}

.dictionary-hero-copy {
  margin-bottom: 0;
}

.home-character-showcase {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 520px;
  margin: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
  box-shadow: none;
}

.home-character-showcase img {
  width: min(100%, 420px);
  height: auto;
  max-height: 520px;
  object-fit: contain;
  object-position: center bottom;
}

.linked-card {
  position: relative;
}

.linked-card:hover {
  border-color: rgba(217, 43, 32, 0.32);
  transform: translateY(-2px);
}

.linked-card::after {
  content: "Open";
  margin-top: auto;
  color: var(--red-dark);
  font-weight: 950;
}

.card-link {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 2;
}

.card-link:focus-visible {
  outline: 3px solid rgba(217, 43, 32, 0.42);
  outline-offset: 4px;
}

.why-story {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: clamp(22px, 4vw, 52px);
  align-items: center;
  margin-bottom: 48px;
}

.why-story h3,
.compact-heading h3,
.why-final-cta h3 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: clamp(1.8rem, 3vw, 3.1rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.why-story p {
  color: var(--muted);
}

.founder-disclaimer {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(217, 43, 32, 0.18);
  border-radius: var(--radius);
  background: #fff8f5;
  color: #5d514b;
  font-weight: 800;
}

.pku-figure {
  margin: 0;
}

.pku-figure img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  object-fit: contain;
}

.pku-figure figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.compact-heading {
  margin-top: 34px;
}

.comparison-group {
  background: #fff7ef;
}

.comparison-group span {
  color: var(--red-dark) !important;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.comparison-group span:not(:first-child) {
  background: #fff7ef !important;
}

.comparison-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.research-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.research-grid h4 {
  margin: 12px 0 4px;
  color: var(--ink);
  font-size: 0.9rem;
}

.why-final-cta {
  margin-top: 34px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(217, 43, 32, 0.08), rgba(244, 188, 40, 0.12)),
    #fffaf4;
}

.why-final-cta div {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 980px) {
  .hub-grid,
  .channel-grid {
    grid-template-columns: 1fr;
  }

  .hub-grid article,
  .channel-grid article {
    min-height: auto;
  }

  .dictionary-hero-top {
    grid-template-columns: 1fr;
  }

  .home-character-showcase {
    min-height: 280px;
  }

  .why-story,
  .research-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .dictionary-shell {
    display: flex;
    flex-direction: column;
  }

  .dictionary-hero-top {
    display: contents;
  }

  .dictionary-hero-copy {
    order: 1;
  }

  .lab-hero .lab-search {
    order: 2;
  }

  .suggested-searches {
    order: 4;
  }

  .search-difference {
    order: 5;
  }

  .home-character-showcase {
    order: 6;
    width: 100%;
    min-height: auto;
    margin: 10px 0 18px;
    padding-top: 8px;
    background: transparent;
    box-shadow: none;
  }

  .home-character-showcase img {
    width: min(86vw, 340px);
    max-height: none;
  }

  .comparison-table {
    display: block;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
  }

  .comparison-row {
    display: grid;
    grid-template-columns: minmax(170px, 1fr) minmax(150px, 0.78fr) minmax(190px, 0.95fr);
    min-width: 660px;
    overflow: visible;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: #fff;
  }

  .comparison-row:first-child {
    border-top: 0;
  }

  .comparison-row span {
    border-top: 0;
    border-left: 1px solid var(--line);
    padding: 12px;
    font-size: 0.88rem;
  }

  .comparison-row span:first-child {
    border-left: 0;
    background: transparent;
  }

  .comparison-group span:first-child {
    background: #fff7ef;
  }

  #wordResults {
    order: 3;
  }

  .home-support-grid {
    order: 7;
  }

  .word-card-actions {
    align-items: stretch;
    flex-direction: column;
  }
}
