:root {
  --brand-primary: #203929;
  --brand-accent: #e15b2a;
  --background: #f3e7d5;
  --background-soft: #f9f3eb;
  --surface: #ffffff;
  --surface-muted: #f9f9f3;
  --text-primary: #21332a;
  --text-muted: #5f627c;
  --shadow-soft: 0 24px 60px rgba(38, 64, 50, 0.16);
  --shadow-hover: 0 30px 70px rgba(38, 64, 50, 0.22);
  --radius-xl: 36px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --border-subtle: rgba(33, 51, 42, 0.14);
  /* Step colors for Lesson Flow */
  --step-sort: #f7d774;
  --step-scan: #a5c8ff;
  --step-build: #b6e3b6;
  --step-explore: #d7c8ff;
  --step-reflect: #ffccaa;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

/* Global footer */
.site-footer {
  background: #0f1520;
  color: #fff;
  margin-top: clamp(32px, 5vw, 56px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.site-footer a {
  color: #fff;
  text-decoration: none;
}
.site-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.site-footer a:focus-visible {
  outline: 2px solid rgba(255,255,255,0.6);
  outline-offset: 2px;
  border-radius: 6px;
}
.site-footer__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(20px, 3vw, 28px) 16px 32px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.site-footer__nav a {
  background: rgba(255, 255, 255, 0.08);
  padding: 8px 12px;
  border-radius: 8px;
}
.site-footer__contact {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.site-footer__contact .channel-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  padding: 8px 12px;
  border-radius: 8px;
}
.site-footer__top {
  display: flex;
  justify-content: flex-end;
}
.site-footer__top .btn {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 10px;
  padding: 8px 12px;
}
.site-footer__brand {
  opacity: 0.8;
  font-size: 14px;
  text-align: center;
}
.site-footer__disclaimer {
  text-align: center;
}
.site-footer__disclaimer p {
  margin: 0;
  text-align: center;
}
@media (min-width: 768px) {
  .site-footer__inner { grid-template-columns: 2fr 1fr; }
  .site-footer__brand { grid-column: 1 / -1; }
  .site-footer__disclaimer { grid-column: 1 / -1; }
}

body.brickit-page {
  background: var(--background);
}

body.brickit-demo {
  background: #f3e7d5;
  color: #333333;
}

/* ===== Forms (Brickit) ===== */
.form-grid {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.25rem);
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid rgba(33, 51, 42, 0.12);
  box-shadow: 0 18px 40px rgba(32, 57, 41, 0.12);
  padding: clamp(1.25rem, 3vw, 1.75rem);
}

.form-group {
  display: grid;
  gap: 0.5rem;
}

.form-group--inline {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(0.75rem, 2vw, 1rem);
}

@media (min-width: 720px) {
  .form-group--inline {
    grid-template-columns: 1fr 1fr;
  }
}

.form-label {
  font-weight: 600;
  color: var(--brand-primary);
}

.form-hint {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.input-field,
.select-field,
.textarea-field {
  width: 100%;
  border: 1.5px solid rgba(33, 51, 42, 0.18);
  background: #ffffff;
  color: var(--text-primary);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.textarea-field {
  resize: vertical;
  min-height: 110px;
  line-height: 1.5;
}

.input-field::placeholder,
.textarea-field::placeholder {
  color: rgba(33, 51, 42, 0.45);
}

.input-field:focus,
.select-field:focus,
.textarea-field:focus {
  outline: none;
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 4px rgba(225, 91, 42, 0.15);
}

.input-field:disabled,
.select-field:disabled,
.textarea-field:disabled {
  background: rgba(33, 51, 42, 0.04);
  color: rgba(33, 51, 42, 0.55);
}

.checkbox-group,
.radio-group {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.option-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  border: 1px solid rgba(33, 51, 42, 0.12);
  background: #fff;
}

.option-item input[type="checkbox"],
.option-item input[type="radio"] {
  width: 18px;
  height: 18px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.25rem;
}

.form-error {
  margin: -0.25rem 0 0.5rem;
  color: #b42318;
  background: rgba(180, 35, 24, 0.08);
  border: 1px solid rgba(180, 35, 24, 0.25);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.95rem;
}

/* Deprecated global .checkbox block kept minimal to avoid conflicts elsewhere */
.checkbox { line-height: 1.5; }
.checkbox a { color: var(--brand-primary); font-weight: 600; }

/* Collapsible details styling */
.form-details {
  border: 1px solid rgba(33, 51, 42, 0.12);
  border-radius: 12px;
  background: #fff;
}
.form-details > summary {
  list-style: none;
  cursor: pointer;
  padding: 0.85rem 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--brand-primary);
}
.form-details > summary::-webkit-details-marker { display: none; }
.form-details > summary::after {
  content: "▾";
  margin-left: auto;
  transition: transform 0.2s ease;
}
.form-details[open] > summary::after { transform: rotate(180deg); }
.form-details[open] { box-shadow: 0 8px 20px rgba(32,57,41,0.08); }
.form-details[open] > *:not(summary) { padding: 0 0.95rem 0.85rem; }

/* --- Form typography normalization and robust layouts (desktop/mobile) --- */
.brickit-demo .form-grid {
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.brickit-demo .form-grid .form-label,
.brickit-demo .form-grid a,
.brickit-demo .form-grid summary,
.brickit-demo .form-grid .consent-field {
  line-height: 1.5;
  letter-spacing: normal;
  writing-mode: horizontal-tb;
}

/* Avoid accidental scaling on containers */
.brickit-demo .form-grid,
.brickit-demo .form-grid * {
  transform: none;
}

/* Consent checkbox: flexible, readable, accessible */
.brickit-demo .consent-field {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  user-select: text;
  flex-wrap: nowrap;
  flex-direction: row;
  writing-mode: horizontal-tb;
  direction: ltr;
}
.brickit-demo .consent-field input[type="checkbox"] {
  margin-top: 2px;
  flex: 0 0 auto;
  inline-size: 20px;
  block-size: 20px;
}
.brickit-demo .consent-field .checkbox-text {
  display: block;           /* allow natural multi-line text inside flex */
  flex: 1 1 auto;           /* take remaining row space */
  min-width: 0;             /* prevent overflow-induced shrink to letters */
  white-space: normal;      /* normal wrapping */
  word-break: normal;       /* avoid per-letter breaks */
  overflow-wrap: break-word;/* break long words only when needed */
  line-height: 1.5;
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  letter-spacing: normal;
  unicode-bidi: normal;
}
.brickit-demo .consent-field a {
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  color: var(--brand-primary);
  font-weight: 600;
}

/* Details/Summary: stable typography and clear affordance */
.brickit-demo details.form-details { margin: 12px 0 0; }
.brickit-demo details.form-details > summary {
  list-style: none;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #e3e3e3;
  background: #fff;
  cursor: pointer;
  line-height: 1.5;
  font-weight: 500;
}
.brickit-demo details.form-details > summary::-webkit-details-marker { display: none; }
.brickit-demo details.form-details > summary::after {
  content: "▾";
  float: right;
  transform: translateY(-1px);
}
.brickit-demo details[open].form-details > summary::after {
  content: "▴";
}
.brickit-demo details.form-details > *:not(summary) { margin-top: 12px; }

.btn[aria-busy="true"] {
  position: relative;
  pointer-events: none;
}

.btn[aria-busy="true"]::before {
  content: "";
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255,255,255,0.7);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.btn[aria-busy="true"]::after {
  content: "";
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

a {
  color: var(--brand-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  text-decoration: underline;
}

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

.js-enabled body:not(.show-focus-outlines) :focus {
  outline: none;
  box-shadow: none;
}

body.show-focus-outlines a:focus,
body.show-focus-outlines button:focus,
body.show-focus-outlines [tabindex]:focus {
  outline: 3px solid rgba(225, 91, 42, 0.45);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  transform: translateY(-150%);
  background: #ffffff;
  color: var(--brand-primary);
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  box-shadow: 0 12px 25px rgba(32, 57, 41, 0.16);
  transition: transform 0.2s ease, opacity 0.2s ease;
  font-weight: 600;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
}

.skip-link:focus {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.sr-only-focusable:focus {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
}

/* --- Floating language switcher --- */
.language-switcher {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-end;
}

.language-switcher__panel {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(15, 21, 32, 0.12);
  box-shadow: 0 10px 28px rgba(15, 21, 32, 0.16);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.language-switcher__link {
  text-decoration: none;
  font-weight: 500;
  color: #666666;
}

.language-switcher__link--active {
  color: #e15b2a;
  font-weight: 700;
}

.language-switcher__toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(15, 21, 32, 0.12);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 20px rgba(15, 21, 32, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #e15b2a;
  cursor: pointer;
  transition: opacity 0.25s ease, transform 0.2s ease, box-shadow 0.2s ease, visibility 0.25s ease;
}

.language-switcher__toggle:hover,
.language-switcher__toggle:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 21, 32, 0.22);
}

.language-switcher__toggle svg {
  width: 20px;
  height: 20px;
}

/* Кнопка скрыта только когда нет класса --toggle-visible (показывается при скролле) */
.language-switcher:not(.language-switcher--toggle-visible) .language-switcher__toggle {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Кнопка видна когда есть класс --toggle-visible */
.language-switcher.language-switcher--toggle-visible .language-switcher__toggle {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Панель скрыта когда нет класса --visible */
.language-switcher:not(.language-switcher--visible) .language-switcher__panel {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  pointer-events: none;
}

@media (max-width: 768px) {
  .language-switcher {
    top: 14px;
    right: 14px;
  }

  .language-switcher__panel {
    padding: 0.35rem 0.8rem;
    gap: 0.5rem;
  }

  .language-switcher__toggle {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 640px) {
  .language-switcher {
    top: 12px;
    right: 12px;
  }

  .language-switcher__panel {
    padding: 0.3rem 0.7rem;
    gap: 0.45rem;
    font-size: 0.9rem;
  }

  .language-switcher__toggle {
    width: 38px;
    height: 38px;
  }

  .language-switcher__toggle svg {
    width: 18px;
    height: 18px;
  }
}

main {
  display: block;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
  box-sizing: border-box;
  overflow-x: hidden;
}

.canvas {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 40px 24px 32px;
  box-sizing: border-box;
  overflow-x: hidden;
}

.page-section {
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.25rem, 4vw, 3rem);
  max-width: 1100px;
  box-sizing: border-box;
  overflow-x: hidden;
}

@media (max-width: 560px) {
  .page-section {
    padding: 1.5rem 1rem;
  }
}

.page-section--soft {
  background: var(--background-soft);
}

.page-section--light {
  background: #ffffff;
}

.section-heading {
  display: flex;
  flex-direction: column;
  gap: clamp(0.5rem, 1.5vw, 0.75rem);
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

@media (max-width: 560px) {
  .section-heading {
    margin-bottom: 1.5rem;
  }
}

.section-heading__eyebrow {
  font-size: clamp(0.8rem, 1.5vw, 0.85rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(33, 51, 42, 0.55);
  font-weight: 600;
}

.section-heading__title {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--brand-primary);
  line-height: 1.2;
}

@media (max-width: 560px) {
  .section-heading__title {
    font-size: 1.5rem;
    line-height: 1.3;
  }
}

.section-heading__body {
  margin: 0;
  max-width: 720px;
  color: var(--text-muted);
  line-height: 1.7;
  font-size: clamp(0.95rem, 2vw, 1.05rem);
}

@media (max-width: 560px) {
  .section-heading__body {
    font-size: 0.95rem;
    line-height: 1.6;
  }
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 5vw, 3.5rem);
  background: var(--background-soft);
  border-radius: var(--radius-xl);
  padding: clamp(2.5rem, 4vw, 3.5rem);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  margin-bottom: clamp(3rem, 6vw, 4rem);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(0);
  opacity: 0.45;
  transform: translate3d(0, 0, 0);
}

.hero::before {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle at center, rgba(225, 91, 42, 0.35), transparent 65%);
  top: -120px;
  right: -120px;
}

.hero::after {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle at center, rgba(42, 74, 55, 0.55), transparent 70%);
  bottom: -160px;
  left: -100px;
}

.hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-pill);
  background: rgba(225, 91, 42, 0.12);
  color: var(--brand-accent);
}

.hero__title {
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  margin: 0;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--brand-primary);
}

.hero__copy {
  margin: 0;
  max-width: 520px;
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.edition {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.75);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 1.55rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  will-change: transform;
}

.btn--primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand-accent), #f77449);
  box-shadow: 0 18px 35px rgba(225, 91, 42, 0.28);
}

.btn--primary::after {
  content: "→";
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}

.btn--ghost {
  color: var(--brand-primary);
  background: rgba(42, 74, 55, 0.12);
  box-shadow: inset 0 0 0 1px rgba(42, 74, 55, 0.22);
}

.btn--disabled {
  color: rgba(32, 57, 41, 0.45);
  background: rgba(33, 51, 42, 0.08);
  box-shadow: none;
  cursor: not-allowed;
}

.btn--disabled:hover {
  transform: none;
}

.btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.btn--primary:hover::after {
  transform: translateX(4px);
}

.hero__visual {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__visual-wrap {
  width: min(560px, 100%);
  aspect-ratio: 16/10;
  position: relative;
}

.blob {
  position: absolute;
  border-radius: 36% 64% 59% 41% / 40% 46% 54% 60%;
  mix-blend-mode: multiply;
  filter: saturate(110%);
  display: none;
}

.hero__image-frame {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 22px 40px rgba(32, 57, 41, 0.25);
  border: 1px solid rgba(33, 51, 42, 0.12);
}

.hero__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blob--one {
  inset: 4% 15% 20% 0;
  background: linear-gradient(150deg, rgba(33, 51, 42, 0.15), rgba(42, 74, 55, 0.1));
  box-shadow: 0 22px 35px rgba(33, 51, 42, 0.1);
}

.blob--two {
  inset: 18% 0 4% 22%;
  background: linear-gradient(130deg, rgba(225, 91, 42, 0.15), rgba(247, 148, 98, 0.1));
  box-shadow: 0 18px 30px rgba(225, 91, 42, 0.1);
}

/* Hide blob elements on mobile devices */
@media (max-width: 960px) {
  .blob,
  .blob--one,
  .blob--two {
    display: none !important;
  }
}

.stat-card {
  position: absolute;
  right: -16%;
  bottom: 12%;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 1.1rem 1.35rem;
  width: min(240px, 80%);
  max-width: calc(100% - 2rem);
  box-shadow: 0 18px 45px rgba(32, 57, 41, 0.25);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  box-sizing: border-box;
}

.stat-card span {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(42, 74, 55, 0.6);
  font-weight: 600;
}

.stat-card strong {
  font-size: 1.8rem;
  color: var(--brand-primary);
  line-height: 1.1;
}

.stat-card small {
  font-size: 0.9rem;
  color: rgba(33, 51, 42, 0.65);
}

.library {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.library__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1rem;
}

.library__title {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  color: var(--brand-primary);
  letter-spacing: -0.02em;
}

.library__subtitle {
  margin: 0;
  max-width: 480px;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.8rem;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 600px) {
  .card-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

.card {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  padding: 2.1rem;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(33, 51, 42, 0.1);
  box-shadow: 0 18px 45px rgba(32, 57, 41, 0.13);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
  overflow: hidden;
}

.card::after {
  content: "";
  position: absolute;
  inset: auto -25% -45% -25%;
  height: 120%;
  background: linear-gradient(140deg, rgba(225, 91, 42, 0.18), transparent 68%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(33, 51, 42, 0.22);
}

.card:hover::after {
  opacity: 1;
}

.card__label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(225, 91, 42, 0.85);
}

.card__title {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: -0.015em;
  color: var(--brand-primary);
}

.card__body {
  margin: 0;
  line-height: 1.65;
  color: var(--text-muted);
  flex: 1;
}

.card__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  color: var(--brand-primary);
}

.card__meta::after {
  content: "↗";
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

.card:hover .card__meta::after {
  transform: translateX(4px) translateY(-2px);
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

@media (max-width: 560px) {
  .cta-buttons {
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
  }
  
  .cta-buttons .btn {
    width: 100%;
    justify-content: center;
  }
}

.feature-grid {
  display: grid;
  gap: clamp(1.25rem, 3vw, 1.75rem);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 600px) {
  .feature-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.feature-card {
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid rgba(33, 51, 42, 0.1);
  padding: 1.75rem;
  box-shadow: 0 18px 40px rgba(32, 57, 41, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.feature-card__icon {
  font-size: 1.8rem;
}

.feature-card__title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brand-primary);
}

.feature-card__body {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.resource-grid {
  display: grid;
  gap: clamp(1.25rem, 3vw, 1.75rem);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.resource-card {
  display: block;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid rgba(124, 58, 237, 0.15);
  padding: 2.1rem;
  box-shadow: 0 18px 40px rgba(32, 57, 41, 0.16);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.resource-card:hover {
  transform: translateY(-6px);
  border-color: rgba(124, 58, 237, 0.35);
  box-shadow: 0 22px 50px rgba(32, 57, 41, 0.2);
}

.resource-card__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(225, 91, 42, 0.1);
  color: var(--brand-primary);
}

.resource-card__title {
  margin: 0.75rem 0 0.5rem;
  font-size: 1.35rem;
  color: var(--brand-primary);
}

.resource-card__body {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.step-grid {
  display: grid;
  gap: clamp(1.2rem, 3vw, 1.6rem);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 600px) {
  .step-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.step-card {
  position: relative;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid rgba(33, 51, 42, 0.1);
  padding: 1.75rem 1.75rem 1.75rem 3.25rem;
  box-shadow: 0 16px 40px rgba(32, 57, 41, 0.12);
}

.step-card__badge {
  position: absolute;
  left: 1.4rem;
  top: 1.6rem;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--brand-accent);
  color: #ffffff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.step-card__title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--brand-primary);
}

.step-card__body {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.65;
}

.info-callout {
  background: rgba(33, 51, 42, 0.06);
  border-radius: 18px;
  border: 1px solid rgba(33, 51, 42, 0.12);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  margin-top: clamp(1.5rem, 3vw, 2rem);
  color: var(--text-muted);
  line-height: 1.65;
  font-size: clamp(0.95rem, 2vw, 1rem);
}

@media (max-width: 560px) {
  .info-callout {
    padding: 1rem;
    border-radius: 16px;
  }
}

.info-callout strong {
  color: var(--brand-primary);
  font-weight: 600;
}

.info-callout a {
  color: var(--brand-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.info-callout a:hover {
  text-decoration: none;
}

/* --- Math Demo: Lesson Flow card refinements (scoped) --- */
.brickit-demo .lesson-flow .step-grid {
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 1.5rem;
}

.brickit-demo .lesson-flow .step-card {
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.25rem 1.25rem 3.2rem;
  border: none;
  box-shadow: 0 10px 26px rgba(32, 57, 41, 0.10);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.brickit-demo .lesson-flow .step-card:hover,
.brickit-demo .lesson-flow .step-card:focus-within {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 16px 40px rgba(32, 57, 41, 0.16);
}

@media (prefers-reduced-motion: reduce) {
  .brickit-demo .lesson-flow .step-card,
  .brickit-demo .lesson-flow .step-card:hover,
  .brickit-demo .lesson-flow .step-card:focus-within {
    transition: none;
    transform: none;
  }
}

.brickit-demo .lesson-flow .step-card__badge {
  left: 1rem;
  top: 1.2rem;
  width: 1.6rem;
  height: 1.6rem;
  font-size: 0.9rem;
}

.brickit-demo .lesson-flow .step-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  color: var(--brand-primary);
}

.brickit-demo .lesson-flow .step-goal {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.55rem;
  font-size: 0.92rem;
  border-radius: 999px;
  background: rgba(225, 91, 42, 0.08);
  color: var(--text-primary);
  border: 1px solid rgba(33, 51, 42, 0.10);
  margin: 0 0 0.4rem;
}

.brickit-demo .lesson-flow .step-card p {
  margin: 0.35rem 0 0.5rem;
}

.brickit-demo .lesson-flow .step-card p > strong {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(33, 51, 42, 0.06);
  border: 1px solid rgba(33, 51, 42, 0.08);
  border-radius: 8px;
  padding: 0.2rem 0.5rem;
}

.brickit-demo .lesson-flow .step-card ul {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
}

.brickit-demo .lesson-flow .step-card li {
  margin-bottom: 0.4rem;
  line-height: 1.55;
}

.brickit-demo .lesson-flow .step-card li:last-child {
  margin-bottom: 0;
}

.brickit-demo .lesson-flow .step-card .tip-box {
  margin-top: auto;
}

/* Step card color modifiers */
.brickit-demo .lesson-flow .step-sort {
  background: rgba(247, 215, 116, 0.12);
}

.brickit-demo .lesson-flow .step-scan {
  background: rgba(165, 200, 255, 0.12);
}

.brickit-demo .lesson-flow .step-build {
  background: rgba(182, 227, 182, 0.12);
}

.brickit-demo .lesson-flow .step-explore {
  background: rgba(215, 200, 255, 0.12);
}

.brickit-demo .lesson-flow .step-reflect {
  background: rgba(255, 204, 170, 0.12);
}

.brickit-demo .lesson-flow .step-sort .step-card__badge {
  background: var(--step-sort);
  color: #333;
}

.brickit-demo .lesson-flow .step-scan .step-card__badge {
  background: var(--step-scan);
  color: #333;
}

.brickit-demo .lesson-flow .step-build .step-card__badge {
  background: var(--step-build);
  color: #333;
}

.brickit-demo .lesson-flow .step-explore .step-card__badge {
  background: var(--step-explore);
  color: #333;
}

.brickit-demo .lesson-flow .step-reflect .step-card__badge {
  background: var(--step-reflect);
  color: #333;
}

/* Lesson progress bar */
.lesson-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 1rem;
}

.lesson-progress .progress-item {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  color: #333;
  font-weight: 600;
}

/* Color badges for tables */
.color-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #fff;
}

.color-badge.red {
  background: #e53935;
}

.color-badge.blue {
  background: #1e88e5;
}

.color-badge.yellow {
  background: #f9c500;
  color: #333;
}

/* Visual placeholder for future images */
.visual-placeholder {
  background: #eee;
  height: 160px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #777;
  font-size: 0.85rem;
}

.section-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

@media (max-width: 560px) {
  .section-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
    margin-top: 1.25rem;
  }
  
  .section-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

.section-actions--center {
  justify-content: center;
}

@media (max-width: 560px) {
  .section-actions--center {
    align-items: stretch;
  }
}

.inline-link {
  font-weight: 600;
  color: var(--brand-primary);
}

.inline-link::after {
  content: "↗";
  margin-left: 0.25rem;
  font-size: 0.9rem;
}

/* Program tags under homepage hero */
.program-tags {
  margin-top: 8px;
  font-size: 0.95rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: baseline;
}

.program-tags__label {
  font-weight: 600;
  color: var(--brand-primary);
}

.program-tags a {
  color: var(--brand-primary);
  font-weight: 600;
}

.program-tags .dot {
  color: rgba(33, 51, 42, 0.45);
}

.plan-grid {
  display: grid;
  gap: clamp(1.25rem, 3vw, 1.75rem);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.plan-grid--compact {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 2rem;
}

@media (max-width: 768px) {
  .plan-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  
  .plan-grid--compact {
    grid-template-columns: 1fr;
    margin-top: 1.5rem;
  }
}

.plan-card {
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid rgba(33, 51, 42, 0.12);
  padding: clamp(1.5rem, 4vw, 2rem);
  box-shadow: 0 16px 40px rgba(32, 57, 41, 0.12);
  display: flex;
  flex-direction: column;
  gap: clamp(0.75rem, 2vw, 1rem);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.plan-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 50px rgba(32, 57, 41, 0.18);
}

@media (max-width: 560px) {
  .plan-card {
    padding: 1.25rem;
    border-radius: 16px;
  }
}

.plan-card__title {
  margin: 0;
  font-size: clamp(1.2rem, 3vw, 1.3rem);
  color: var(--brand-primary);
  line-height: 1.3;
}

.plan-card__body {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.65;
  font-size: clamp(0.95rem, 2vw, 1rem);
}

.plan-card__cta {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (max-width: 560px) {
  .plan-card__cta {
    gap: 0.5rem;
  }
  
  .plan-card__cta .btn {
    width: 100%;
    justify-content: center;
  }
}

.plan-card--compact {
  padding: 1.5rem;
}

@media (max-width: 560px) {
  .plan-card--compact {
    padding: 1.25rem;
  }
}

/* --- Featured Plan (Main Offer) --- */
.plan-featured {
  background: linear-gradient(135deg, rgba(33, 51, 42, 0.03), rgba(225, 91, 42, 0.05));
  border: 2px solid var(--brand-accent);
  border-radius: 24px;
  padding: 2.5rem;
  margin: 2rem 0;
  position: relative;
  box-shadow: 0 20px 60px rgba(32, 57, 41, 0.15);
}

@media (max-width: 768px) {
  .plan-featured {
    padding: 2rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 20px;
  }
}

@media (max-width: 560px) {
  .plan-featured {
    padding: 1.5rem;
    margin: 1.25rem 0;
  }
}

.plan-featured__badge {
  position: absolute;
  top: -12px;
  left: 2rem;
  background: var(--brand-accent);
  color: #ffffff;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (max-width: 560px) {
  .plan-featured__badge {
    left: 1.5rem;
    font-size: 0.8rem;
    padding: 0.35rem 0.85rem;
  }
}

.plan-featured__content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.plan-featured__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap;
}

@media (max-width: 560px) {
  .plan-featured__header {
    flex-direction: column;
    gap: 1rem;
  }
}

.plan-featured__title {
  margin: 0;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  color: var(--brand-primary);
  line-height: 1.2;
  flex: 1;
  min-width: 200px;
}

.plan-featured__price {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-shrink: 0;
}

.plan-featured__amount {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--brand-accent);
  line-height: 1;
}

.plan-featured__currency {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  font-weight: 500;
}

.plan-featured__description {
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.1rem);
  color: var(--text-primary);
  line-height: 1.6;
  max-width: 700px;
}

.plan-featured__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.plan-featured__list li {
  padding-left: 1.75rem;
  position: relative;
  line-height: 1.6;
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  color: var(--text-muted);
}

.plan-featured__list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--brand-accent);
  font-weight: 700;
  font-size: 1.1em;
}

.plan-featured__cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

@media (max-width: 560px) {
  .plan-featured__cta {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .plan-featured__cta .btn {
    width: 100%;
    justify-content: center;
  }
}

/* --- Volume Discount Callout --- */
.discount-callout {
  background: linear-gradient(135deg, rgba(225, 91, 42, 0.08), rgba(225, 91, 42, 0.03));
  border: 2px solid var(--brand-accent);
  border-radius: 20px;
  padding: 2rem;
  margin: 2rem 0;
  position: relative;
  box-shadow: 0 12px 40px rgba(225, 91, 42, 0.15);
}

@media (max-width: 768px) {
  .discount-callout {
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 18px;
  }
}

@media (max-width: 560px) {
  .discount-callout {
    padding: 1.25rem;
  }
}

.discount-callout__badge {
  position: absolute;
  top: -12px;
  left: 2rem;
  background: var(--brand-accent);
  color: #ffffff;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (max-width: 560px) {
  .discount-callout__badge {
    left: 1.5rem;
    font-size: 0.8rem;
    padding: 0.35rem 0.85rem;
  }
}

.discount-callout__content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.discount-callout__title {
  margin: 0.5rem 0 0;
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  color: var(--brand-primary);
  font-weight: 700;
}

.discount-callout__description {
  margin: 0;
  color: var(--text-muted);
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  line-height: 1.6;
}

.discount-callout__example {
  margin: 0.5rem 0;
}

.discount-example {
  background: #ffffff;
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid rgba(33, 51, 42, 0.12);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

@media (max-width: 560px) {
  .discount-example {
    padding: 1.25rem;
  }
}

.discount-example__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.discount-example__label {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 500;
}

.discount-example__value {
  font-size: clamp(2rem, 5vw, 2.5rem);
  font-weight: 700;
  color: var(--brand-accent);
  line-height: 1;
}

.discount-example__note {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.discount-example__savings {
  background: rgba(225, 91, 42, 0.1);
  color: var(--brand-accent);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 1rem;
}

.discount-callout__footer {
  margin: 0.5rem 0 0;
  color: var(--text-muted);
  font-size: clamp(0.9rem, 2vw, 1rem);
  line-height: 1.6;
  text-align: center;
}

/* --- Contact channels (WhatsApp, Telegram, Email) --- */
.contact-channels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

/* Enhanced contact channels for demo page */
.contact-channels--enhanced {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (max-width: 640px) {
  .contact-channels--enhanced {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

.contact-channels__label {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.channel-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  color: #1e2a24;
  background: #f4f4ef;
  border: 1px solid rgba(33, 51, 42, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  text-decoration: none;
}

/* Enhanced channel buttons for demo page */
.contact-channels--enhanced .channel-btn {
  padding: 1rem 1.25rem;
  font-size: 1rem;
  border-radius: 16px;
  justify-content: center;
  min-height: 56px;
  box-shadow: 0 4px 12px rgba(32, 57, 41, 0.08);
}

.contact-channels--enhanced .channel-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(32, 57, 41, 0.16);
}

.contact-channels--enhanced .channel-btn__icon {
  width: 22px;
  height: 22px;
}

.channel-btn__icon {
  width: 18px;
  height: 18px;
  display: inline-block;
}

.channel--wa {
  background: #e9f9ef;
  border-color: rgba(37, 211, 102, 0.35);
  color: #0f6e3d;
}

.channel--tg {
  background: #e9f5fc;
  border-color: rgba(36, 161, 222, 0.35);
  color: #155a7c;
}

.channel--mail {
  background: #f2f3f4;
  border-color: rgba(33, 51, 42, 0.18);
  color: #24362d;
}

.channel--calendly {
  background: #fff4e6;
  border-color: rgba(225, 91, 42, 0.35);
  color: #b8441a;
}

@media (max-width: 560px) {
  .contact-channels {
    gap: 0.5rem;
  }
  .channel-btn {
    font-size: 0.92rem;
    padding: 0.5rem 0.8rem;
    flex: 0 1 auto;
    min-width: 0;
  }
  .brickit-page .hero .channel-btn {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(33, 51, 42, 0.2);
    color: #1f2c26;
    box-shadow: 0 4px 10px rgba(23, 34, 27, 0.12);
  }
}

@media (max-width: 400px) {
  .contact-channels {
    flex-direction: column;
    align-items: stretch;
  }
  .channel-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Homepage hero-specific tuning for contact icons */
.brickit-page .hero .contact-channels {
  margin-top: 8px;
  gap: 0.45rem;
  align-items: center;
}

.brickit-page .hero .contact-channels__label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.brickit-page .hero .channel-btn {
  background: transparent;
  border: 1px solid rgba(33, 51, 42, 0.16);
  color: var(--brand-primary);
  padding: 0.4rem 0.75rem;
  box-shadow: none;
}

.brickit-page .hero .channel-btn:hover {
  background: rgba(33, 51, 42, 0.06);
  transform: translateY(-1px);
}

.brickit-page .hero .channel--wa {
  color: #0f6e3d;
  border-color: rgba(37, 211, 102, 0.35);
}

.brickit-page .hero .channel--tg {
  color: #155a7c;
  border-color: rgba(36, 161, 222, 0.35);
}

.brickit-page .hero .channel--mail {
  color: #24362d;
}

.brickit-page .hero .channel--calendly {
  color: #b8441a;
  border-color: rgba(225, 91, 42, 0.35);
}

.safety-list {
  display: grid;
  gap: 1.5rem;
}

.safety-item {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid rgba(33, 51, 42, 0.12);
  padding: 1.75rem;
  box-shadow: 0 14px 32px rgba(32, 57, 41, 0.12);
}

.safety-item h3 {
  margin: 0 0 0.75rem;
  color: var(--brand-primary);
}

.cta-banner {
  background: linear-gradient(125deg, rgba(33, 51, 42, 0.92), rgba(42, 74, 55, 0.85));
  color: #ffffff;
  border-radius: 24px;
  padding: clamp(1.5rem, 5vw, 3rem);
  display: flex;
  flex-direction: column;
  gap: clamp(0.75rem, 2vw, 1rem);
  box-shadow: 0 22px 55px rgba(33, 51, 42, 0.25);
}

@media (max-width: 560px) {
  .cta-banner {
    padding: 1.5rem;
    border-radius: 20px;
  }
}

.cta-banner h2 {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.cta-banner p {
  margin: 0;
  max-width: 620px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  line-height: 1.6;
}

.cta-banner .cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

@media (min-width: 560px) {
  .cta-banner .cta-buttons {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media (max-width: 560px) {
  .cta-banner .cta-buttons .btn {
    width: 100%;
    justify-content: center;
  }
}

.cta-banner .cta-buttons .btn--ghost {
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #ffffff;
}

.cta-banner .cta-buttons .btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

.cta-banner--spaced {
  margin-top: clamp(2rem, 5vw, 3rem);
}

.info-list {
  list-style: none;
  padding: 0;
  margin: clamp(1rem, 3vw, 1.5rem) 0;
  display: grid;
  gap: clamp(0.75rem, 2vw, 1rem);
}

.info-list li {
  padding-left: 1.75rem;
  position: relative;
  line-height: 1.65;
  font-size: clamp(0.95rem, 2vw, 1rem);
  color: var(--text-muted);
}

.info-list li::before {
  content: "✔";
  color: var(--brand-accent);
  position: absolute;
  left: 0;
  font-weight: 600;
}

@media (max-width: 560px) {
  .info-list li {
    padding-left: 1.5rem;
    font-size: 0.95rem;
  }
}

/* --- FAQ Section --- */
.faq-list {
  display: grid;
  gap: 1.25rem;
  margin-top: 2rem;
}

.faq-item {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid rgba(33, 51, 42, 0.12);
  padding: 1.5rem;
  transition: box-shadow 0.2s ease;
}

.faq-item:hover {
  box-shadow: 0 8px 24px rgba(32, 57, 41, 0.1);
}

@media (max-width: 560px) {
  .faq-item {
    padding: 1.25rem;
    border-radius: 14px;
  }
}

.faq-question {
  margin: 0;
  font-size: clamp(1.05rem, 2.5vw, 1.15rem);
  color: var(--brand-primary);
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  user-select: none;
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--brand-accent);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.faq-item[aria-expanded="true"] .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  color: var(--text-muted);
  line-height: 1.7;
  font-size: clamp(0.95rem, 2vw, 1rem);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease, margin 0.3s ease;
  padding: 0;
  margin: 0;
}

.faq-item[aria-expanded="true"] .faq-answer {
  max-height: 2000px;
  padding-top: 0.75rem;
  margin-top: 0.75rem;
}

.faq-answer p {
  margin: 0;
}

.faq-answer a {
  color: var(--brand-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.faq-answer a:hover {
  text-decoration: none;
}

.thank-you {
  text-align: center;
  padding: clamp(3rem, 7vw, 4.5rem) clamp(1.5rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid rgba(33, 51, 42, 0.12);
  box-shadow: 0 18px 40px rgba(32, 57, 41, 0.12);
}

.thank-you h1 {
  margin: 0;
  font-size: clamp(2rem, 3.5vw, 2.6rem);
  color: var(--brand-primary);
}

.thank-you p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
}
footer {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  text-align: center;
  font-size: 0.85rem;
  color: rgba(33, 51, 42, 0.6);
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    overflow-x: hidden;
  }

  .hero__content {
    align-items: center;
    max-width: 100%;
    overflow-x: hidden;
  }

  .hero__copy {
    max-width: 100%;
  }

  .hero__actions {
    justify-content: center;
    width: 100%;
  }

  .hero__visual {
    justify-content: center;
    max-width: 100%;
    overflow-x: hidden;
  }

  .hero__visual-wrap {
    max-width: 100%;
    overflow-x: hidden;
  }

  .stat-card {
    position: static;
    width: 220px;
    max-width: 100%;
    margin: 0 auto;
  }
}

@media (max-width: 600px) {
  .canvas {
    padding: 28px 18px 24px;
    overflow-x: hidden;
  }

  .hero {
    border-radius: 28px;
    padding: clamp(1.25rem, 3vw, 2rem);
    margin-left: 0;
    margin-right: 0;
    overflow-x: hidden;
  }

  .hero__title {
    font-size: 2.2rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .hero__actions {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
    box-sizing: border-box;
  }

  .library__header {
    align-items: flex-start;
  }

  .stat-card {
    width: 100%;
    max-width: 280px;
    box-sizing: border-box;
  }
}

/* Brickit lesson guides */
.brickit-demo .container {
  max-width: 1200px;
  margin: 0 auto;
  background: #ffffff;
}

.brickit-demo .header {
  background: linear-gradient(135deg, #345b45 0%, #2a4a37 100%);
  color: #ffffff;
  padding: 60px 40px;
  position: relative;
  overflow: hidden;
}

.brickit-demo .header::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: rgba(243, 231, 213, 0.1);
  border-radius: 50%;
}

.brickit-demo .header-content {
  position: relative;
  z-index: 2;
}

.brickit-demo .emoji-icon {
  font-size: 48px;
  margin-bottom: 20px;
  display: inline-block;
}

.brickit-demo h1 {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.2;
  color: #ffffff;
}

/* Contrast fix: light hero sections on brickit-demo pages use dark titles */
.brickit-demo .hero .hero__title {
  color: var(--brand-primary);
}

.brickit-demo .subtitle {
  font-size: 20px;
  opacity: 0.9;
  margin-bottom: 30px;
}

.brickit-demo .meta-info {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  margin-top: 25px;
}

.brickit-demo .meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.15);
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 14px;
}

.brickit-demo .qr-section {
  background: rgba(255, 255, 255, 0.15);
  padding: 20px;
  border-radius: 12px;
  margin-top: 25px;
  display: inline-block;
}

.brickit-demo .qr-section a {
  color: #f3e7d5;
  font-weight: 600;
  text-decoration: none;
  font-size: 16px;
}

.brickit-demo .overview {
  background: #f3e7d5;
  padding: 50px 40px;
}

.brickit-demo .overview-content {
  background: #ffffff;
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border-left: 5px solid #e15b2a;
}

.brickit-demo .section-title {
  font-size: 28px;
  color: #345b45;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brickit-demo .goals {
  padding: 50px 40px;
  background: #ffffff;
}

.brickit-demo .goals-list {
  margin-top: 25px;
  background: #f3e7d5;
  padding: 35px;
  border-radius: 12px;
}

.brickit-demo .goals-list li {
  margin-bottom: 15px;
  padding-left: 10px;
  font-size: 17px;
  position: relative;
}

.brickit-demo .goals-list li::before {
  content: "•";
  color: #e15b2a;
  font-size: 24px;
  font-weight: bold;
  position: absolute;
  left: -20px;
}

.brickit-demo .goals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.brickit-demo .goal-card {
  background: #f3e7d5;
  padding: 25px;
  border-radius: 12px;
  border-left: 4px solid #e15b2a;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.brickit-demo .goal-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}

.brickit-demo .goal-card h3 {
  color: #345b45;
  font-size: 18px;
  margin-bottom: 10px;
}

.brickit-demo .preparation {
  padding: 50px 40px;
  background: #f9f9f9;
}

.brickit-demo .prep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.brickit-demo .prep-card {
  background: #ffffff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border-top: 4px solid #e15b2a;
}

.brickit-demo .prep-card h3 {
  color: #345b45;
  margin-bottom: 12px;
  font-size: 18px;
}

.brickit-demo .tip-box {
  background: #ffffff;
  border-left: 4px solid #e15b2a;
  padding: 20px;
  margin: 20px 0;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  color: #21332a;
}

.brickit-demo .tip-box strong {
  color: #e15b2a;
}

.brickit-demo .tip-box--dark {
  background: linear-gradient(135deg, #345b45 0%, #2a4a37 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border-left: none;
}

.brickit-demo .tip-box--dark strong {
  color: #f3e7d5;
}

.brickit-demo .skills {
  padding: 50px 40px;
  background: #f9f9f9;
}

.brickit-demo .skills-table {
  width: 100%;
  margin-top: 30px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.brickit-demo .skills-table th {
  background: #345b45;
  color: #ffffff;
  padding: 20px;
  text-align: left;
  font-weight: 600;
}

.brickit-demo .skills-table td {
  background: #ffffff;
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.brickit-demo .skills-table tr:last-child td {
  border-bottom: none;
}

.brickit-demo .lesson-flow {
  padding: 50px 40px;
  background: #ffffff;
}

.brickit-demo .timeline,
.brickit-demo .step {
  margin-top: 30px;
}

.brickit-demo .timeline-item,
.brickit-demo .step {
  display: flex;
  gap: 25px;
  margin-bottom: 30px;
  position: relative;
  padding: 30px;
  background: #f3e7d5;
  border-radius: 12px;
}

.brickit-demo .timeline-item::before {
  content: "";
  position: absolute;
  left: 27px;
  top: 60px;
  width: 2px;
  height: calc(100% + 10px);
  background: #e0e0e0;
}

.brickit-demo .timeline-item:last-child::before {
  display: none;
}

.brickit-demo .timeline-number,
.brickit-demo .step-number {
  background: #e15b2a;
  color: #ffffff;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(225, 91, 42, 0.3);
  z-index: 1;
  position: relative;
}

.brickit-demo .step-number {
  top: -18px;
  left: 30px;
  position: absolute;
}

.brickit-demo .timeline-content {
  flex: 1;
  background: #f3e7d5;
  padding: 25px;
  border-radius: 12px;
}

.brickit-demo .timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 10px;
}

.brickit-demo .timeline-title,
.brickit-demo .step-title {
  color: #345b45;
  font-size: 20px;
  font-weight: 600;
}

.brickit-demo .timeline-duration {
  background: #e15b2a;
  color: #ffffff;
  padding: 6px 15px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}

.brickit-demo .step {
  padding: 30px 30px 30px 70px;
  background: #ffffff;
  border-left: 4px solid #e15b2a;
}

.brickit-demo .step-goal {
  background: #f3e7d5;
  padding: 12px 18px;
  border-radius: 8px;
  display: inline-block;
  margin-bottom: 15px;
  font-weight: 600;
  color: #e15b2a;
  font-size: 14px;
}

.brickit-demo .step ul {
  margin-left: 20px;
  margin-top: 15px;
}

.brickit-demo .step li {
  margin-bottom: 10px;
}

.brickit-demo .rules {
  padding: 50px 40px;
  background: #f9f9f9;
}

.brickit-demo .rules-grid,
.brickit-demo .diff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.brickit-demo .rule-card,
.brickit-demo .diff-card {
  background: #ffffff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border-left: 5px solid #345b45;
  display: flex;
  gap: 15px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.brickit-demo .diff-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}

.brickit-demo .rule-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.brickit-demo .rule-text {
  font-size: 16px;
  color: #333333;
}

.brickit-demo .engineering {
  padding: 50px 40px;
  background: #ffffff;
}

.brickit-demo .cycle-box {
  background: linear-gradient(135deg, #345b45 0%, #2a4a37 100%);
  color: #ffffff;
  padding: 35px;
  border-radius: 15px;
  margin-top: 25px;
  text-align: center;
}

.brickit-demo .cycle-steps {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.brickit-demo .cycle-arrow {
  color: #e15b2a;
  margin: 0 8px;
}

.brickit-demo .cycle-text {
  font-size: 18px;
  line-height: 1.8;
}

.brickit-demo .highlight-note {
  margin-top: 20px;
  font-weight: 600;
  color: #345b45;
}

.brickit-demo .section-subheading {
  color: #345b45;
  margin: 30px 0 15px;
  font-size: 20px;
}

.brickit-demo .unstyled-list {
  list-style: none;
  margin-left: 20px;
  padding-left: 0;
}

.brickit-demo .footer-heading {
  margin-bottom: 15px;
  font-size: 22px;
}

.brickit-demo .footer-about {
  max-width: 800px;
  margin: 0 auto;
}

.brickit-demo .footer-note {
  margin-top: 30px;
  opacity: 0.8;
  font-size: 14px;
}

.brickit-demo .rubric {
  padding: 50px 40px;
  background: #f3e7d5;
}

.brickit-demo .rubric-table,
.brickit-demo .curriculum-table {
  width: 100%;
  margin-top: 30px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  background: #ffffff;
}

.brickit-demo .rubric-table th,
.brickit-demo .curriculum-table th {
  background: #345b45;
  color: #ffffff;
  padding: 20px;
  text-align: left;
  font-weight: 600;
}

.brickit-demo .rubric-table td,
.brickit-demo .curriculum-table td {
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.brickit-demo .rubric-table tr:last-child td,
.brickit-demo .curriculum-table tr:last-child td {
  border-bottom: none;
}

.brickit-demo .rubric-table td:first-child {
  font-weight: 600;
  color: #345b45;
}

.brickit-demo .reflection {
  padding: 50px 40px;
  background: #ffffff;
}

.brickit-demo .reflection-item {
  background: #f3e7d5;
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 20px;
  border-left: 4px solid #e15b2a;
}

.brickit-demo .reflection-item h3,
.brickit-demo .diff-card h3 {
  color: #345b45;
  margin-bottom: 12px;
  font-size: 18px;
}

.brickit-demo .reflection-line {
  background: #ffffff;
  border: 2px solid #dddddd;
  border-radius: 6px;
  padding: 12px;
  min-height: 60px;
  margin-top: 10px;
}

.brickit-demo .differentiation {
  padding: 50px 40px;
  background: #f9f9f9;
}

.brickit-demo .diff-card {
  border-top: 5px solid #345b45;
  flex-direction: column;
}

.brickit-demo .assessment {
  padding: 50px 40px;
  background: #ffffff;
}

.brickit-demo .checklist {
  background: #f3e7d5;
  padding: 30px;
  border-radius: 12px;
  margin-top: 20px;
}

.brickit-demo .checklist-item {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  align-items: flex-start;
  transition: background 0.25s ease;
  padding: 4px;
  margin-left: -4px;
  margin-right: -4px;
}

.brickit-demo .checklist-item:hover {
  background: rgba(0,0,0,0.04);
  border-radius: 6px;
}

.brickit-demo .checkbox {
  width: 24px;
  height: 24px;
  border: 2px solid #345b45;
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  background: #fff;
}

.brickit-demo .checkbox:hover {
  border-color: #e15b2a;
  background: #fff9f5;
}

.brickit-demo .checkbox:focus {
  outline: 2px solid #e15b2a;
  outline-offset: 2px;
}

.brickit-demo .checkbox.checked {
  background: #345b45;
  border-color: #345b45;
}

.brickit-demo .checkbox.checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 18px;
  font-weight: bold;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* Table checkbox symbols */
td[role="checkbox"] {
  font-size: 1.2em;
  text-align: center;
  transition: all 0.2s ease;
}

td[role="checkbox"]:hover {
  background: #fff9f5;
  transform: scale(1.1);
}

td[role="checkbox"]:focus {
  outline: 2px solid #e15b2a;
  outline-offset: 2px;
  border-radius: 2px;
}

td[role="checkbox"].checked {
  color: #345b45;
}

.brickit-demo .curriculum {
  padding: 50px 40px;
  background: #f9f9f9;
}

.brickit-demo .footer {
  background: #345b45;
  color: #ffffff;
  padding: 40px;
  text-align: center;
}

.brickit-demo .footer-links {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.brickit-demo .footer-links a {
  color: #f3e7d5;
  text-decoration: none;
  transition: color 0.3s ease;
}

.brickit-demo .footer-links a:hover {
  color: #e15b2a;
}

/* Brickit curriculum pages */
.brickit-curriculum .curriculum-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 0 1rem;
  border-bottom: 1px solid rgba(33, 51, 42, 0.12);
}

.breadcrumb {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.breadcrumb__list {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.breadcrumb__item::after {
  content: "/";
  margin-left: 0.5rem;
  color: rgba(33, 51, 42, 0.28);
}

.breadcrumb__item:last-child::after {
  display: none;
}

.breadcrumb__link {
  color: var(--brand-primary);
  font-weight: 600;
  transition: text-decoration 0.2s ease;
}

.breadcrumb__link:hover {
  text-decoration: underline;
}

.breadcrumb__current {
  color: var(--text-muted);
  font-weight: 600;
}

.curriculum-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.curriculum-actions .btn {
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  font-size: 0.9rem;
}

.curriculum-lead {
  margin: 1.25rem 0 2rem;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-muted);
}

.curriculum-toc {
  margin: 0 0 2.5rem;
  padding: 1.75rem 2rem;
  border-radius: 18px;
  background: var(--background-soft);
  border: 1px solid rgba(33, 51, 42, 0.12);
  box-shadow: 0 16px 35px rgba(32, 57, 41, 0.12);
}

.curriculum-toc__title {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-primary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.curriculum-toc ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.curriculum-toc a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.1rem;
  color: var(--brand-primary);
  font-weight: 600;
}

.curriculum-toc a::before {
  content: "↘";
  font-size: 0.85rem;
  color: rgba(225, 91, 42, 0.75);
}

.brickit-curriculum section {
  margin-bottom: 3rem;
}

.brickit-curriculum section:last-of-type {
  margin-bottom: 0;
}

.brickit-curriculum .philosophy {
  background: var(--background);
  padding: 50px 40px;
}

.brickit-curriculum .philosophy-content {
  background: #ffffff;
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border-left: 5px solid var(--brand-accent);
}

.brickit-curriculum .philosophy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.brickit-curriculum .philosophy-card {
  background: var(--background);
  padding: 25px;
  border-radius: 12px;
  border-left: 4px solid var(--brand-accent);
}

.brickit-curriculum .philosophy-card h3 {
  color: #345b45;
  margin-bottom: 12px;
  font-size: 18px;
}

.brickit-curriculum .course-overview {
  padding: 50px 40px;
  background: #ffffff;
}

.brickit-curriculum .info-box {
  background: var(--background);
  padding: 30px;
  border-radius: 12px;
  margin-top: 25px;
  border: 1px solid rgba(33, 51, 42, 0.12);
}

.brickit-curriculum .info-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 15px 0;
  border-bottom: 1px solid rgba(52, 91, 69, 0.2);
  flex-wrap: wrap;
}

.brickit-curriculum .info-row:last-child {
  border-bottom: none;
}

.brickit-curriculum .info-label {
  font-weight: 600;
  color: #345b45;
}

.brickit-curriculum .units {
  padding: 50px 40px;
  background: #f9f9f9;
}

.brickit-curriculum .units-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.brickit-curriculum .unit-card-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.brickit-curriculum .unit-card {
  display: block;
  background: #ffffff;
  padding: 30px;
  border-radius: 15px 15px 0 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border-top: 5px solid var(--brand-accent);
  transition: transform 0.3s ease;
  flex: 1;
}

.brickit-curriculum .unit-card:hover {
  transform: translateY(-5px);
}

.brickit-curriculum .unit-card-actions {
  background: #ffffff;
  padding: 15px 30px 30px;
  border-radius: 0 0 15px 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin-top: -1px;
}

.brickit-curriculum .unit-number {
  background: #345b45;
  color: #ffffff;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 15px;
}

.brickit-curriculum .unit-title {
  color: #345b45;
  font-size: 22px;
  margin-bottom: 10px;
  font-weight: 600;
}

.brickit-curriculum .unit-focus {
  color: var(--brand-accent);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 12px;
}

.brickit-curriculum .unit-lessons {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #e0e0e0;
}

.brickit-curriculum .unit-lessons-title {
  font-weight: 600;
  color: #345b45;
  margin-bottom: 8px;
  font-size: 14px;
}

.brickit-curriculum .unit-lessons ol {
  margin-left: 20px;
  font-size: 14px;
  line-height: 1.8;
}

.brickit-curriculum .alignment {
  padding: 50px 40px;
  background: #ffffff;
}

.brickit-curriculum .curriculum-table th {
  background: #345b45;
}

.brickit-curriculum .toolkit {
  padding: 50px 40px;
  background: #f9f9f9;
}

.brickit-curriculum .toolkit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.brickit-curriculum .toolkit-card {
  background: #ffffff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border-left: 4px solid var(--brand-accent);
}

.brickit-curriculum .toolkit-card h3 {
  color: #345b45;
  margin-bottom: 12px;
  font-size: 18px;
}

.brickit-curriculum .toolkit-card ul {
  margin-left: 20px;
  font-size: 15px;
}

.brickit-curriculum .toolkit-card li {
  margin-bottom: 8px;
}

.brickit-curriculum .skills {
  padding: 50px 40px;
  background: #ffffff;
}

.brickit-curriculum .next-steps {
  padding: 40px 32px;
  margin-top: 3rem;
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid rgba(33, 51, 42, 0.12);
  box-shadow: 0 16px 40px rgba(32, 57, 41, 0.12);
}

.brickit-curriculum .next-steps h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.4rem;
  color: var(--brand-primary);
}

.brickit-curriculum .next-steps__list {
  display: grid;
  gap: 0.75rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.brickit-curriculum .next-steps__link {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.brickit-curriculum .next-steps__link::after {
  content: "↗";
  font-size: 0.95rem;
}

.brickit-curriculum .curriculum-note {
  margin-top: 30px;
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .curriculum-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .curriculum-toc {
    padding: 1.25rem 1.5rem;
  }

  .brickit-curriculum .philosophy,
  .brickit-curriculum .course-overview,
  .brickit-curriculum .units,
  .brickit-curriculum .alignment,
  .brickit-curriculum .toolkit,
  .brickit-curriculum .skills {
    padding: 30px 20px;
  }

  .brickit-curriculum .philosophy-content,
  .brickit-curriculum .info-box {
    padding: 25px 20px;
  }

  .brickit-curriculum .philosophy-grid,
  .brickit-curriculum .units-grid,
  .brickit-curriculum .toolkit-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .brickit-curriculum .unit-card {
    padding: 25px 20px;
  }
}

@media (max-width: 768px) {
  .brickit-demo .header {
    padding: 40px 20px;
  }

  .brickit-demo h1 {
    font-size: 28px;
  }

  .brickit-demo .subtitle {
    font-size: 16px;
  }

  .brickit-demo .meta-info {
    gap: 10px;
  }

  .brickit-demo .meta-item {
    font-size: 12px;
    padding: 8px 15px;
  }

  .brickit-demo .overview,
  .brickit-demo .goals,
  .brickit-demo .skills,
  .brickit-demo .preparation,
  .brickit-demo .lesson-flow,
  .brickit-demo .rules,
  .brickit-demo .engineering,
  .brickit-demo .rubric,
  .brickit-demo .reflection,
  .brickit-demo .differentiation,
  .brickit-demo .assessment,
  .brickit-demo .curriculum {
    padding: 30px 20px;
  }

  .brickit-demo .overview-content {
    padding: 25px 20px;
  }

  .brickit-demo .section-title {
    font-size: 22px;
  }

  .brickit-demo .prep-grid,
  .brickit-demo .rules-grid,
  .brickit-demo .goals-grid,
  .brickit-demo .diff-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .brickit-demo .timeline-item {
    gap: 15px;
    padding: 25px 20px 25px 65px;
  }

  .brickit-demo .timeline-item::before {
    left: 22px;
  }

  .brickit-demo .timeline-number {
    width: 45px;
    height: 45px;
    font-size: 18px;
  }

  .brickit-demo .timeline-content {
    padding: 20px;
  }

  .brickit-demo .timeline-title,
  .brickit-demo .step-title {
    font-size: 18px;
  }

  .brickit-demo .timeline-duration {
    font-size: 13px;
    padding: 5px 12px;
  }

  .brickit-demo .rubric-table,
  .brickit-demo .curriculum-table,
  .brickit-demo .skills-table {
    font-size: 14px;
  }

  .brickit-demo .rubric-table th,
  .brickit-demo .rubric-table td,
  .brickit-demo .curriculum-table th,
  .brickit-demo .curriculum-table td,
  .brickit-demo .skills-table th,
  .brickit-demo .skills-table td {
    padding: 15px 10px;
  }

  .brickit-demo .cycle-steps {
    font-size: 18px;
  }

  .brickit-demo .step {
    padding: 25px 20px 25px 55px;
    margin-bottom: 30px;
  }

  .brickit-demo .step-number {
    width: 40px;
    height: 40px;
    font-size: 16px;
    left: 20px;
  }
}

/* Video wrapper - для центрированного видео (demo страница) */
.video-wrapper {
  margin: clamp(24px, 4vw, 40px) auto;
  width: 100%;
  max-width: clamp(280px, 85vw, 320px);
  padding: 0 clamp(16px, 4vw, 24px);
  box-sizing: border-box;
}

.video-wrapper video {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  background: #000;
  display: block;
  box-sizing: border-box;
}

/* Video with text - двухколоночный layout для главной страницы */
.video-with-text {
  display: grid;
  grid-template-columns: 4fr 1fr;
  gap: clamp(2rem, 4vw, 3rem);
  align-items: center;
  margin: clamp(32px, 5vw, 48px) 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.video-with-text__content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.video-with-text__title {
  margin: 0;
  font-size: clamp(1.5rem, 2.5vw, 1.875rem);
  color: var(--brand-primary);
  font-weight: 600;
}

.video-with-text__body {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 1rem;
}

.video-with-text__video {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.video-device-frame {
  position: relative;
  border-radius: 32px;
  padding: clamp(0.85rem, 1.5vw, 1.15rem);
  background: linear-gradient(135deg, #061427, #12294a);
  box-shadow: var(--shadow-soft), 0 25px 45px rgba(6, 20, 39, 0.35);
  display: flex;
  justify-content: center;
  align-items: center;
  isolation: isolate;
  width: min(100%, 420px);
  max-width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  overflow: hidden;
}

.video-device-frame::before,
.video-device-frame::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 999px;
  pointer-events: none;
}

.video-device-frame::before {
  top: clamp(0.35rem, 1vw, 0.55rem);
  width: clamp(72px, 10vw, 92px);
  height: 6px;
  background: rgba(255, 255, 255, 0.45);
  opacity: 0.7;
}

.video-device-frame::after {
  bottom: clamp(0.35rem, 1vw, 0.65rem);
  width: clamp(96px, 14vw, 140px);
  height: 5px;
  background: rgba(255, 255, 255, 0.3);
  opacity: 0.7;
}

.video-with-text__video video {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  background: #000;
  display: block;
  box-sizing: border-box;
}

.video-device-frame video {
  border-radius: clamp(1rem, 2vw, 1.35rem);
  box-shadow: none;
  background: #000;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
}

/* Responsive video - мобильные устройства */
@media (max-width: 768px) {
  .video-wrapper {
    max-width: 100%;
    padding: 0 16px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .video-wrapper video {
    border-radius: 12px;
    max-width: 100%;
  }
  
  .video-with-text {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-left: 0;
    margin-right: 0;
    padding: 0;
  }
  
  .video-with-text__video {
    width: 100%;
    max-width: 100%;
    padding: 0;
    justify-content: center;
  }
  
  .video-device-frame {
    border-radius: 24px;
    padding: 0.75rem;
    width: min(calc(100% - 2rem), 340px);
    max-width: 100%;
  }
  
  .video-device-frame::before {
    height: 4px;
  }
  
  .video-device-frame::after {
    height: 4px;
  }
  
  .video-with-text__video video {
    border-radius: 12px;
    max-width: 100%;
    width: 100%;
  }
  
  .video-device-frame video {
    border-radius: 12px;
  }
}

/* Дополнительные исправления для очень маленьких экранов */
@media (max-width: 560px) {
  .video-wrapper {
    padding: 0 12px;
  }
  
  .video-with-text {
    gap: 1.25rem;
  }
  
  .video-device-frame {
    border-radius: 20px;
    padding: 0.65rem;
    width: min(calc(100% - 2rem), 300px);
    max-width: 100%;
  }
  
  .video-with-text__video video {
    border-radius: 10px;
  }
  
  .video-device-frame video {
    border-radius: 10px;
  }
  
  .video-wrapper video {
    border-radius: 10px;
  }
}

/* Дополнительная защита для очень маленьких экранов (≤375px) */
@media (max-width: 375px) {
  .video-device-frame {
    width: min(calc(100% - 1.5rem), 280px);
    padding: 0.55rem;
    border-radius: 18px;
  }
  
  .video-device-frame video {
    border-radius: 9px;
  }
}

/* Breadcrumbs navigation */
.breadcrumbs {
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.breadcrumbs a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: opacity 0.2s;
}

.breadcrumbs a:hover {
  text-decoration: underline;
  opacity: 0.8;
}

.breadcrumbs span {
  color: var(--text-muted);
  margin: 0 0.25rem;
}
