/* Product pages extend the existing Dicti palette, typography and components. */
.logo-filter-definitions { position: absolute; }
.logo-outline-color { flood-color: var(--color-bg-app-alt); }
body[data-page^="product-"] .site-header {
  background: var(--color-bg-app-alt);
  backdrop-filter: none;
}
body[data-page="product-home"] .site-header-home {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  width: 100%;
  padding: 0;
  margin-bottom: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.hero-header-overlay { position: absolute; top: 16px; left: 16px; right: 16px; display: flex; direction: ltr; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.site-header-home .hero-header-overlay > .header-actions { margin-left: auto; margin-right: 0; }
.site-header-home .header-actions { gap: 12px; }
[dir="rtl"] .hero-header-overlay .language-select,
[dir="rtl"] .hero-header-overlay .header-action-label { direction: rtl; unicode-bidi: isolate; }
.site-header-home .header-icon-control,
.site-header-home .header-icon-action {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
  border-color: var(--color-border-soft);
  background: var(--color-bg-surface-soft);
}
.site-header-home .header-icon-action { width: auto; min-width: 44px; flex-basis: auto; padding-inline: 14px; }
.product-hero > .brand-link { justify-self: center; }
.product-hero > .brand-link .brand-logo { width: auto; height: 55px; max-width: none; filter: url(#dicti-logo-outline); }
html[lang="ru"] .product-hero > .brand-link .brand-logo { height: 68.75px; }
.site-header-home .header-icon-control:hover,
.site-header-home .header-icon-action:hover {
  border-color: transparent;
  background: var(--color-bg-surface-soft);
}
.product-heading {
  max-width: none;
  margin: 0 0 24px;
  font-size: clamp(2.25rem, 4.2vw, 3.25rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.025em;
  text-align: center;
  text-wrap: balance;
}
@media (max-width: 720px) {
  .hero-header-overlay { top: 12px; left: 12px; right: 12px; }
  .site-header-home .header-actions { gap: 8px; }
  .product-heading { margin: 0 0 18px; }
  .site-header-home .header-icon-action { padding-inline: 12px; }
}
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 50;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--color-accent-primary);
  color: white;
}
.skip-link:focus { top: 12px; }
.header-product-link {
  padding: 8px 10px;
  color: var(--color-accent-primary);
  font-size: 0.88rem;
  font-weight: 600;
}
.header-product-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.product-hero { padding: 12px 4px; border: 0; border-radius: 0; background: transparent; box-shadow: none; grid-template-columns: minmax(0, 1fr); --hero-row-gap: 20px; gap: var(--hero-row-gap); align-items: start; }
.product-hero > .product-slogan { margin-top: 10px; grid-column: 1 / -1; }
.product-demo-link { justify-self: center; gap: 10px; }
.hero-context { grid-column: 1 / -1; margin-top: 0; gap: 16px; font-size: 1.2rem; }
.hero-context p { max-width: none; line-height: 1.55; }
.hero-context .product-heading { margin: 0; }
.product-home .hero-context .hero-language-summary { margin: 0; font-size: 1.2rem; font-weight: 600; text-align: center; }
.product-illustration { width: 100%; margin: 0; align-self: start; }
.product-illustration picture, .product-illustration img { display: block; width: 100%; }
.product-illustration img { height: auto; border-radius: 18px; }
/* For the 1400 × 1120 artwork, 25% of its height is 20% of its width. */
body[data-page="product-home"] .site-header-home { margin-bottom: calc(-20% - var(--hero-row-gap)); z-index: 0; }
.product-hero > :not(.site-header-home) { position: relative; z-index: 1; }
.product-illustration { mask-image: linear-gradient(to bottom, #000 70%, transparent 100%); }

/* Shared homepage type scale; hero slogans and utility controls keep their own sizes. */
.product-home { font-size: 1.08rem; font-weight: 400; }
.product-home .prose p,
.product-home .step-copy { font-size: inherit; font-weight: 400; }
.product-home h2:not(.product-heading) { font-size: 1.35rem; font-weight: 600; }
.product-home .step-title { font-size: 1.16rem; font-weight: 600; }

.product-introduction { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 38px; align-items: start; }
.product-introduction h2 { line-height: 1.25; }
.product-feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.product-feature-list li { position: relative; padding-inline-start: 25px; color: var(--color-text-secondary); line-height: 1.6; }
.product-feature-list li::before { content: "✓"; position: absolute; inset-inline-start: 0; top: 0; color: var(--color-accent-primary); font-weight: 600; }
.product-support { display: grid; gap: 26px; }
.product-languages { border-top: 1px solid var(--color-border-soft); padding-top: 22px; gap: 12px; }
.product-languages ul { margin: 0; padding-inline-start: 20px; line-height: 1.7; color: var(--color-text-secondary); }
.product-languages li + li { margin-top: 6px; }
.product-demo .demo-intro,
.product-demo .demo-intro p { max-width: none; }
.product-demo .quiz-invitation { max-width: none; font-size: 1.2rem; }
.product-demo .quiz-invitation p { max-width: none; }
.demo-lesson-embed { min-width: 0; margin-top: 22px; border: 1px solid var(--color-border-soft); border-radius: 18px; }
.product-demo .cta-group { justify-content: center; }
.product-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.product-more { margin-top: 24px; }
.product-final-cta { justify-content: center; }
.product-final-more { justify-items: center; text-align: center; }
html[lang="ru"] body[data-page="product-home"] .site-footer {
  margin-top: 48px;
  border-top: 1px solid var(--color-border-soft);
  padding-top: 28px;
}
.product-more a, .detail-content a { color: var(--color-accent-primary); text-decoration: underline; text-decoration-color: var(--color-border-strong); text-underline-offset: 4px; }
.product-more a:hover, .detail-content a:hover { text-decoration-color: currentColor; }
.detail-content a.button-primary { color: var(--color-bg-app-alt); text-decoration: none; }
.product-how > .cta-group { padding-top: 20px; border-top: 1px solid var(--color-border-soft); }
.product-details { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.detail-header, .detail-layout { min-width: 0; }
.product-home, .product-details { overflow-wrap: anywhere; }
.detail-header h1 { max-width: 23ch; font-size: clamp(1.8rem, 3.5vw, 2.5rem); line-height: 1.15; }
.detail-header .prose { margin-top: 22px; }
.detail-layout { display: grid; grid-template-columns: 205px minmax(0, 1fr); gap: 22px; align-items: start; }
.detail-toc { position: sticky; top: 22px; padding: 14px 0 14px 4px; }
.detail-toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.detail-toc a { display: block; padding: 9px 12px; border-radius: 10px; font-size: 0.86rem; line-height: 1.45; color: var(--color-text-muted); }
.detail-toc a:hover, .detail-toc a:focus-visible { background: var(--color-accent-primary-soft); color: var(--color-accent-primary); }
.detail-content { min-width: 0; gap: 18px; padding: 30px; }
.detail-content h2 { font-size: 1.5rem; line-height: 1.23; margin-top: 18px; padding-top: 26px; border-top: 1px solid var(--color-border-soft); scroll-margin-top: 22px; }
.detail-content h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.detail-content h3 { font-size: 1.12rem; line-height: 1.35; margin-top: 8px; scroll-margin-top: 22px; }
.detail-content .cta-group { margin-top: 0; }
.table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--color-border-soft); border-radius: 14px; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 0.9rem; line-height: 1.5; color: var(--color-text-secondary); }
.table-wrap th { background: var(--color-bg-surface-soft); font-weight: 600; color: var(--color-text-primary); }
.table-wrap th, .table-wrap td { text-align: start; vertical-align: top; padding: 12px; border-bottom: 1px solid var(--color-border-soft); overflow-wrap: anywhere; }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap td + td, .table-wrap th + th { border-inline-start: 1px solid var(--color-border-soft); }
.product-home a:focus-visible, .product-details a:focus-visible, .site-header a:focus-visible { outline: 2px solid var(--color-accent-primary); outline-offset: 4px; }
@media (max-width: 980px) {
  .product-introduction { gap: 26px; }
  .detail-layout { grid-template-columns: 175px minmax(0, 1fr); gap: 18px; }
  .detail-content { padding: 24px; }
}
@media (max-width: 720px) {
  .header-product-link { display: none; }
  .product-hero { grid-template-columns: 1fr; --hero-row-gap: 24px; }
  .product-introduction { grid-template-columns: 1fr; gap: 26px; }
  .product-support { border-top: 1px solid var(--color-border-soft); padding-top: 26px; }
  .product-steps { grid-template-columns: 1fr; }
  .step-card { padding: 20px; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-toc { position: static; padding: 8px; border: 1px solid var(--color-border-soft); border-radius: 18px; }
  .detail-toc ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-content { padding: 22px; }
  .table-wrap th, .table-wrap td { padding: 9px; }
  .table-wrap table { font-size: 0.82rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

@media (max-width: 720px) {
  :lang(de) .product-home, :lang(de) .product-details,
  :lang(hy) .product-home, :lang(hy) .product-details { hyphens: auto; }
}

/* Greek demo quiz uses the same header, cards and footer as the product pages. */
.product-quiz { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; overflow-wrap: anywhere; }
.quiz-header { gap: 12px; padding: 24px 30px; }
.quiz-header h1 { max-width: none; text-wrap: pretty; font-size: clamp(1.8rem, 3.5vw, 2.5rem); line-height: 1.15; }
.quiz-embed { min-width: 0; padding: 0; }
.demo-lesson-embed iframe, .quiz-embed iframe { display: block; width: 100%; border: 0; border-radius: inherit; background: var(--color-bg-app-alt); }
.demo-lesson-embed iframe { height: 640px; }
/* The quiz owns its viewport-sized card; the host adds no second frame. */
.quiz-embed iframe { height: 100vh; height: 100svh; }
@media (max-width: 720px) {
  .quiz-header { padding: 22px; }
  .demo-lesson-embed iframe { height: 680px; }
}

/* Chinese and Arabic keep native reading direction and system font shaping. */
:lang(zh-Hans) .detail-header h1 { max-width: none; }
:lang(zh-Hans) .product-home, :lang(zh-Hans) .product-details, :lang(zh-Hans) .product-quiz { overflow-wrap: normal; word-break: normal; line-break: strict; }
[dir="rtl"] .skip-link { left: auto; right: 16px; }
[dir="rtl"] .detail-toc { padding-inline: 4px 0; }
