/* WOS Atelier — global typography and spacing refinement for 100% browser zoom. */
:root {
  --wos-design-system-status: "active-1.1.0";
  --wos-text-xs: 11px;
  --wos-text-sm: 13px;
  --wos-text-base: 16px;
  --wos-text-lead: 17px;
  --wos-heading-xl: clamp(2.75rem, 4vw, 3.625rem);
  --wos-heading-lg: clamp(2rem, 3vw, 2.5rem);
  --wos-heading-md: clamp(1.375rem, 2vw, 1.625rem);
  --wos-editorial: clamp(1.5rem, 2.3vw, 1.875rem);
  --wos-line-body: 1.65;
  --wos-line-heading: 1.08;
  --wos-section-space: clamp(4.5rem, 7vw, 6.5rem);
  --wos-section-space-compact: clamp(3.5rem, 5.5vw, 5rem);
  --wos-content-width: 60ch;
  --wos-wide-width: 1240px;
}

/* Real WordPress/Astra/Elementor content. The body marker deliberately raises
   specificity above generated widget rules without a blanket !important. */
body.wos-design-system :is(main, .site-content, .entry-content, .elementor) h1:not([class*="woocommerce"]),
body.wos-design-system .entry-title {
  font-size: var(--wos-heading-xl);
  line-height: var(--wos-line-heading);
  letter-spacing: -.035em;
}

body.wos-design-system :is(main, .site-content, .entry-content, .elementor) h2:not([class*="woocommerce"]) {
  font-size: var(--wos-heading-lg);
  line-height: 1.12;
  letter-spacing: -.025em;
}

body.wos-design-system :is(main, .site-content, .entry-content, .elementor) h3:not([class*="woocommerce"]) {
  font-size: var(--wos-heading-md);
  line-height: 1.2;
}

body.wos-design-system :is(.entry-content, .elementor-widget-text-editor) p {
  line-height: var(--wos-line-body);
}

body.wos-design-system :is(.entry-content, .elementor-widget-text-editor) > p,
body.wos-design-system .elementor-widget-text-editor .elementor-widget-container > p {
  max-width: var(--wos-content-width);
}

/* Shared editorial rhythm. */
.wah-home,
.wak-page,
.wa-editorial-page,
.waz-landing,
.wa-curriculum,
#wa-library,
.wa-task-suite {
  font-size: var(--wos-text-base);
  line-height: var(--wos-line-body);
}

.wah-home h1,
.wak-page h1,
.wa-editorial-page .wa-display-title,
.waz-landing h1,
.waz-landing .waz-hero-display,
.wa-curriculum h1,
#wa-library .wa-my__view > h1,
.wa-task-suite .wa-ts-head h1 {
  font-size: var(--wos-heading-xl);
  line-height: var(--wos-line-heading);
  letter-spacing: -.035em;
}

.wah-home h2,
.wak-page h2,
.wa-editorial-page h2,
.waz-landing h2,
.wa-curriculum h2,
#wa-library .wa-my__view > h2,
.wa-task-suite .wa-ts-head h2 {
  font-size: var(--wos-heading-lg);
  line-height: 1.12;
  letter-spacing: -.025em;
}

.wah-home h3,
.wak-page h3,
.waz-landing h3,
.wa-curriculum h3,
#wa-library .wa-my__start-grid h3,
#wa-library .wa-my__assignments h3,
#wa-library .wa-my__materials h3,
.wa-task-suite .wa-ts-card h3 {
  font-size: var(--wos-heading-md);
  line-height: 1.2;
}

.wah-intro,
.wah-lead,
.wak-lead,
.waz-lead,
.waz-lesson-lead,
.waz-process-lead,
.wa-editorial-page .wa-intro,
#wa-library .wa-my__lead {
  max-width: var(--wos-content-width);
  font-size: var(--wos-text-lead);
  line-height: 1.65;
}

.wah-eyebrow,
.wak-eye,
.wa-eyebrow,
.waz-eyebrow,
.waz-kicker,
.wa-kicker,
.wa-ts-eyebrow,
.wa-library__eyebrow,
.wa-my__label {
  font-size: var(--wos-text-xs);
  line-height: 1.35;
  letter-spacing: .2em;
}

/* Section spacing stays generous without turning each section into a viewport. */
.wah-section,
.wak-section,
.waz-section,
.wa-editorial-index,
.wa-results,
.wa-social-list,
.wa-chapters,
.wa-curriculum-how,
.wa-curriculum-faq {
  padding-top: var(--wos-section-space);
  padding-bottom: var(--wos-section-space);
}

.wa-editorial-page .wa-hero {
  min-height: min(720px, 82svh);
  padding-top: clamp(5.5rem, 9vw, 8rem);
  padding-bottom: clamp(4.5rem, 7vw, 6.5rem);
}

.wa-editorial-page .wa-hero .wa-shell {
  gap: clamp(2rem, 5vw, 4.5rem);
}

.wa-editorial-page .wa-intro {
  margin-top: 2rem;
}

.wa-editorial-page .wa-quote {
  min-height: 58svh;
  padding: var(--wos-section-space) 3rem;
}

.wa-editorial-page .wa-quote p,
.wah-home blockquote,
.wak-page blockquote,
.wak-quote,
.waz-section > blockquote,
.waz-pull {
  font-size: var(--wos-editorial);
  line-height: 1.35;
}

.wa-editorial-page .wa-chapter {
  min-height: 0;
  padding-top: var(--wos-section-space);
  padding-bottom: var(--wos-section-space);
}

.wa-editorial-page .wa-chapter-number {
  font-size: clamp(4.75rem, 10vw, 9rem);
}

.wa-editorial-page .wa-index-item,
.wa-editorial-page .wa-accordion-trigger {
  min-height: 112px;
}

.wa-editorial-page .wa-next-story a {
  min-height: 220px;
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}

/* Homepage and tutoring pages. */
.wah-section,
.wak-section {
  padding-top: var(--wos-section-space-compact);
  padding-bottom: var(--wos-section-space-compact);
}

.wah-cards,
.wah-offers,
.wak-cards,
.wak-offers {
  margin-top: 2.5rem;
}

.wah-card,
.wah-offers article,
.wak-cards article,
.wak-offers article {
  padding-top: 1.625rem;
  padding-bottom: 1.625rem;
}

.wak-result-highlight > strong {
  font-size: clamp(4.5rem, 8vw, 7.5rem);
}

.wak-signup-modal__dialog {
  width: min(640px, 100%);
  padding: clamp(2.25rem, 5vw, 3.75rem);
}

.wak-signup-modal__dialog h2 {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
}

/* Registration landing, offer cards and stories. */
.waz-hero {
  padding-top: clamp(4.75rem, 8vw, 7rem);
  padding-bottom: clamp(4rem, 7vw, 6rem);
}

.waz-landing .waz-atelier-left h2,
.waz-reviews-section h2 {
  font-size: var(--wos-heading-lg);
}

#oferta .waz-offers article {
  min-height: 0;
  padding: clamp(1.75rem, 3vw, 2.25rem);
}

#oferta .waz-offers article h3,
.waz-index h3,
.waz-process h3 {
  font-size: var(--wos-heading-md);
}

.waz-atelier-right > p,
.waz-atelier-right .waz-atelier-strong,
.waz-materials span,
.waz-index p,
.waz-process p {
  font-size: var(--wos-text-base);
}

.waz-signup-process .waz-process li {
  min-height: 260px;
  padding: 1.625rem;
}

.wos-stories-heading {
  padding-top: 4.5rem;
  padding-bottom: 4rem;
}

.wos-stories-heading h2 {
  font-size: var(--wos-text-sm);
}

.wos-stories-inner {
  padding-top: 3.75rem;
  padding-bottom: 3.75rem;
}

.wos-stories-tabs button {
  font-size: 1.25rem;
}

/* Curriculum. */
.wa-curriculum-hero {
  padding-top: var(--wos-section-space-compact);
  padding-bottom: var(--wos-section-space-compact);
}

.wa-curriculum .wa-hero-copy {
  max-width: 60ch;
  margin-top: 2rem;
}

.wa-curriculum .wa-hero-copy p {
  font-size: var(--wos-text-base);
  line-height: var(--wos-line-body);
}

.wa-curriculum .wa-question {
  font-size: var(--wos-editorial);
}

.wa-curriculum-summary,
.wa-curriculum-toc,
.wa-curriculum-sections section {
  padding-top: var(--wos-section-space-compact);
  padding-bottom: var(--wos-section-space-compact);
}

.wa-curriculum-summary dl > div {
  min-height: 118px;
  padding: 1.25rem;
}

.wa-curriculum-sections section h3 {
  font-size: clamp(1.75rem, 2.8vw, 2.375rem);
}

.wa-curriculum-sections section li,
.wa-how-copy p,
.wa-faq-list details > div {
  font-size: var(--wos-text-base);
  line-height: var(--wos-line-body);
}

/* Atelier Ucznia and task pages. */
#wa-library .wa-my__view {
  padding-top: var(--wos-section-space-compact);
  padding-bottom: var(--wos-section-space-compact);
}

#wa-library .wa-my__start-grid > section {
  min-height: 260px;
  padding-top: 1.75rem;
  padding-bottom: 1.75rem;
}

#wa-library .wa-my__numbers strong {
  font-size: 2.75rem;
}

#wa-library .wa-my__library {
  margin-top: 3.5rem;
}

#wa-library .wa-library__header h1 {
  font-size: clamp(2.5rem, 4vw, 3.5rem) !important;
}

#wa-library .wa-library__quiz h2,
#wa-library .wa-library__visual strong {
  font-size: clamp(1.25rem, 1.7vw, 1.625rem) !important;
}

.wa-task-suite {
  padding-top: 2.5rem !important;
  padding-bottom: 3rem !important;
}

.wa-task-suite .wa-ts-head {
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
}

.wa-task-suite .wa-ts-card {
  min-height: 0;
  padding: clamp(1.75rem, 3.5vw, 2.75rem);
}

.wa-task-suite .wa-ts-source {
  font-size: var(--wos-text-base);
}

/* Forms and calls to action: compact appearance, accessible targets. */
.wah-btn,
.wak-btn,
.waz-btn,
.waz-primary,
.waz-secondary,
.waz-slot-signup,
.wac-primary-button,
.wa-button,
.wa-my__button,
.wa-my__actions a,
.wa-my__actions button {
  min-height: 44px;
  padding: .7rem 1.25rem;
  font-size: var(--wos-text-sm);
  line-height: 1.25;
}

.waz-dialog {
  padding: clamp(2rem, 4vw, 2.75rem);
}

.waz-step h2,
.waz-success h2 {
  font-size: clamp(1.875rem, 3vw, 2.5rem);
}

.waz-step h3 {
  font-size: 1.375rem;
}

.waz-group > span,
.waz-lesson-type > span {
  min-height: 220px;
  padding: 1.25rem;
}

/* Theme header/navigation. Kept intentionally conservative. */
body:not(.wp-admin) .main-header-menu > .menu-item > a,
body:not(.wp-admin) .ast-builder-menu-1 .menu-item > .menu-link,
body:not(.wp-admin) header nav a {
  font-size: var(--wos-text-sm);
  line-height: 1.4;
  letter-spacing: .08em;
}

body.wos-design-system .main-header-menu,
body.wos-design-system .ast-builder-menu-1 .main-header-menu {
  column-gap: clamp(.3rem, .8vw, .9rem);
}

body.wos-design-system .main-header-menu > .menu-item > .menu-link,
body.wos-design-system .ast-builder-menu-1 .menu-item > .menu-link {
  padding-right: clamp(.45rem, .8vw, .8rem);
  padding-left: clamp(.45rem, .8vw, .8rem);
  white-space: nowrap;
}

body.wos-design-system .main-header-menu .sub-menu {
  min-width: 230px;
  padding: .55rem 0;
  border: 1px solid #d8d8d8;
  border-radius: 0;
  box-shadow: 0 12px 30px rgb(0 0 0 / 8%);
}

body.wos-design-system .main-header-menu .sub-menu .menu-link {
  min-height: 42px;
  padding: .7rem 1rem;
  font-size: var(--wos-text-sm);
  line-height: 1.35;
  letter-spacing: .04em;
}

body:not(.wp-admin) .site-header .ast-container,
body:not(.wp-admin) .ast-primary-header-bar .site-primary-header-wrap {
  min-height: 72px;
}

body:not(.wp-admin) footer,
body:not(.wp-admin) .site-footer {
  font-size: var(--wos-text-sm);
  line-height: 1.6;
}

/* Elementor content outside dedicated modules. */
body:not(.wp-admin) .elementor-widget-heading h1.elementor-heading-title {
  font-size: var(--wos-heading-xl);
  line-height: var(--wos-line-heading);
}

body:not(.wp-admin) .elementor-widget-heading h2.elementor-heading-title {
  font-size: var(--wos-heading-lg);
  line-height: 1.12;
}

body:not(.wp-admin) .elementor-widget-heading h3.elementor-heading-title {
  font-size: var(--wos-heading-md);
  line-height: 1.2;
}

body:not(.wp-admin) .elementor-widget-text-editor,
body:not(.wp-admin) .elementor-widget-text-editor p {
  line-height: var(--wos-line-body);
}

@media (max-width: 1024px) {
  :root {
    --wos-heading-xl: clamp(2.5rem, 5.4vw, 3.25rem);
    --wos-heading-lg: clamp(1.875rem, 4vw, 2.25rem);
    --wos-section-space: clamp(4rem, 8vw, 5.25rem);
  }

  .wa-editorial-page .wa-hero {
    min-height: 0;
  }

  .wa-editorial-page .wa-chapter,
  .waz-lesson-grid,
  .waz-atelier-grid {
    gap: 3.5rem;
  }

  .waz-dialog {
    width: min(920px, calc(100vw - 32px));
  }

  body.wos-design-system .main-header-menu > .menu-item > .menu-link,
  body.wos-design-system .ast-builder-menu-1 .menu-item > .menu-link {
    padding-right: .4rem;
    padding-left: .4rem;
    font-size: 12px;
  }
}

@media (max-width: 767px) {
  :root {
    --wos-text-base: 16px;
    --wos-text-lead: 16px;
    --wos-heading-xl: clamp(2.125rem, 9.8vw, 2.5rem);
    --wos-heading-lg: clamp(1.6875rem, 7.4vw, 1.9375rem);
    --wos-heading-md: clamp(1.25rem, 5.8vw, 1.4375rem);
    --wos-editorial: clamp(1.25rem, 5.8vw, 1.5rem);
    --wos-section-space: 4rem;
    --wos-section-space-compact: 3.5rem;
  }

  .wah-shell,
  .wak-shell,
  .waz-shell,
  .wa-shell,
  .wa-curriculum-shell {
    width: min(100% - 32px, var(--wos-wide-width));
  }

  .wa-editorial-page .wa-hero,
  .waz-hero {
    padding-top: 4rem;
    padding-bottom: 3.5rem;
  }

  .wa-editorial-page .wa-quote {
    min-height: 0;
    padding: 4rem 1rem;
  }

  .wah-actions,
  .wak-actions,
  .waz-actions {
    gap: .625rem;
  }

  .wah-btn,
  .wak-btn,
  .waz-btn,
  .waz-primary,
  .waz-secondary,
  .waz-slot-signup {
    min-height: 46px;
  }

  .waz-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100svh - 20px);
    margin: 10px auto;
    padding: 3.25rem 1.125rem 1.5rem;
  }

  .waz-grid,
  .waz-groups,
  .waz-lesson-type-grid,
  .waz-term-card-grid {
    grid-template-columns: 1fr;
  }

  .waz-group > span,
  .waz-lesson-type > span {
    min-height: 0;
  }

  #wa-library .wa-my__view > h1 {
    font-size: var(--wos-heading-xl) !important;
  }

  #wa-library .wa-my__view > h2 {
    font-size: var(--wos-heading-lg) !important;
  }

  .wa-task-suite {
    left: auto !important;
    width: 100% !important;
    transform: none !important;
  }

  .wa-task-suite .wa-ts-head,
  .wa-task-suite .wa-ts-stage {
    margin-right: 1rem;
    margin-left: 1rem;
  }
}

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