/* ==========================================================================
   Mathla UI — Editorial components (owner chose Direction A, 2026-10-06)
   Hand-built pages use these mx- blocks; mathla-editorial.css restyles the rest.
   ========================================================================== */
.mx { font-family: var(--ed-font, 'Alexandria', system-ui, sans-serif); color: var(--ed-text, #1d1d1f); font-size: 1.0625rem; line-height: 1.75; background: #fff; }
.mx *, .mx *::before, .mx *::after { box-sizing: border-box; }
.mx img { display: block; max-width: 100%; }
.mx a { text-decoration: none; }
.mx a:not(.mx-btn) { color: inherit; }
.mx-wrap { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: clamp(18px, 4vw, 40px); }
.mx-section { padding-block: clamp(64px, 9vw, 120px); }
.mx-section--tight { padding-block: clamp(44px, 6vw, 80px); }
.mx-sand { background: var(--ed-sand, #f6f5f2); }

.mx-kick { display: inline-flex; align-items: center; gap: 12px; font-size: .9rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ed-gold-dark, #8a6b12); }
.mx-band .mx-kick, .mx-band .mx-n { color: var(--ed-gold, #b8901f); }   /* light gold only on the black band */
.mx-kick::before { content: ""; width: 40px; height: 1px; background: currentColor; }
.mx-h1 { font-size: clamp(2.2rem, 4.4vw, 3.9rem); line-height: 1.1; font-weight: 800; letter-spacing: -.02em; margin: 1.4rem 0; color: var(--ed-ink, #0b0b0c); }
.mx-h1 .mx-light { font-weight: 300; display: block; }
.mx-h2 { font-size: clamp(1.7rem, 3vw, 2.6rem); line-height: 1.18; font-weight: 800; letter-spacing: -.01em; margin: 1.2rem 0 0; color: var(--ed-ink, #0b0b0c); max-width: 15em; }
.mx-h3 { font-size: 1.3rem; line-height: 1.35; font-weight: 600; margin: 0 0 .5rem; color: var(--ed-ink, #0b0b0c); }
.mx-lead { font-size: clamp(1.05rem, 1.4vw, 1.15rem); font-weight: 400; color: var(--ed-muted, #6b6b6b); max-width: 32em; margin: 0; }

.mx-btn { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 54px; padding: .9rem 1.75rem; border: 1.5px solid var(--ed-ink, #0b0b0c); border-radius: 0; font-weight: 600; font-size: 1rem; line-height: 1; cursor: pointer; background: #fff; color: var(--ed-ink, #0b0b0c); transition: background .15s ease, color .15s ease; white-space: nowrap; font-family: inherit; }
.mx-btn:hover { background: var(--ed-ink, #0b0b0c); color: #fff; }
.mx-btn--dark { background: var(--ed-ink, #0b0b0c); color: #fff; }
.mx-btn--dark:hover { background: #2b2b2b; }
.mx-btn--light { border-color: #fff; color: #fff; background: transparent; }
.mx-btn--light:hover { background: #fff; color: var(--ed-ink, #0b0b0c); }
.mx-btn--sm { min-height: 42px; padding: .6rem 1.1rem; font-size: .92rem; }
.mx-actions { display: flex; flex-wrap: wrap; gap: .9rem; align-items: center; margin-top: 2.2rem; }
.mx-link { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; font-size: .95rem; border-bottom: 1.5px solid currentColor; padding-bottom: 2px; }
.mx-icon { flex: none; }
[dir="rtl"] .mx-icon--arrow { transform: scaleX(-1); }

.mx-hero { display: grid; grid-template-columns: 1fr 1fr; min-height: min(78vh, 700px); border-bottom: 1px solid var(--ed-line, #e6e6e6); }
.mx-hero-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(48px, 7vw, 96px) clamp(18px, 4vw, 40px); padding-inline-end: clamp(18px, 5vw, 72px); }
.mx-hero-copy > * { max-width: 36rem; }
.mx-hero-photo { position: relative; min-height: 420px; background: var(--ed-sand, #f6f5f2); }
.mx-hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mx-caption { position: absolute; inset-block-end: 0; inset-inline-start: 0; background: #fff; padding: 16px 22px; font-size: .9rem; border-top: 3px solid var(--ed-gold, #b8901f); max-width: 80%; }
.mx-apps { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; margin-top: 1.4rem; font-size: .9rem; color: var(--ed-muted, #6b6b6b); }

.mx-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--ed-line, #e6e6e6); }
.mx-stat { padding: clamp(28px, 4vw, 46px) clamp(18px, 3vw, 32px); border-inline-start: 1px solid var(--ed-line, #e6e6e6); }
.mx-stat:first-child { border-inline-start: 0; }
.mx-stat b { display: block; font-size: clamp(2.2rem, 3.6vw, 3rem); font-weight: 700; line-height: 1; color: var(--ed-ink, #0b0b0c); margin-bottom: .5rem; }
.mx-stat span { color: var(--ed-muted, #6b6b6b); font-size: 1rem; }

.mx-partners { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(20px, 4vw, 48px); padding-block: 28px; border-bottom: 1px solid var(--ed-line, #e6e6e6); font-size: .82rem; letter-spacing: .12em; color: var(--ed-muted, #6b6b6b); }
.mx-partners img { height: 52px; width: auto; object-fit: contain; }
.mx-partner-nyu { background: #57068c; height: 52px; padding: 0 16px; display: flex; align-items: center; }
.mx-partner-nyu img { height: 24px; }

.mx-cols { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: clamp(40px, 5vw, 64px); border-top: 1px solid var(--ed-ink, #0b0b0c); }
.mx-cols--3 { grid-template-columns: repeat(3, 1fr); }
.mx-col { display: flex; flex-direction: column; padding: 28px 0 0; padding-inline-end: clamp(16px, 2.4vw, 32px); }
.mx-n { font-size: .95rem; font-weight: 600; color: var(--ed-gold-dark, #8a6b12); letter-spacing: .1em; }
.mx-col .mx-media { aspect-ratio: 4 / 5; overflow: hidden; margin: 18px 0 22px; background: var(--ed-sand, #f6f5f2); }
.mx-col .mx-media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.12); transition: transform .5s ease, filter .3s ease; }
a.mx-col:hover .mx-media img { transform: scale(1.03); filter: none; }
.mx-col p { color: var(--ed-muted, #6b6b6b); font-weight: 300; font-size: .97rem; margin: 0; }
.mx-col .mx-link { margin-top: 1.1rem; width: fit-content; }
.mx-col .mx-ic { margin: 16px 0 12px; color: var(--ed-ink, #0b0b0c); }

.mx-band { display: grid; grid-template-columns: 1.05fr .95fr; background: var(--ed-ink, #0b0b0c); color: #fff; }
.mx-band-copy { padding: clamp(56px, 8vw, 110px) clamp(18px, 5vw, 72px); display: flex; flex-direction: column; justify-content: center; }
.mx-band .mx-h2 { color: #fff; }
.mx-band .mx-lead { color: #b5b5b5; margin-top: 1.2rem; }
.mx-band-photo { position: relative; min-height: 380px; }
.mx-band-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mx-checks { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: .8rem; }
.mx-checks li { display: flex; gap: .8rem; align-items: flex-start; font-weight: 300; }
.mx-checks li::before { content: ""; flex: none; width: 10px; height: 10px; margin-top: .65rem; background: var(--ed-gold, #b8901f); }
.mx-band .mx-checks li { color: #dcdcdc; }

.mx-steps { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ed-ink, #0b0b0c); margin-top: clamp(36px, 5vw, 56px); }
.mx-step { padding: 30px 0 0; padding-inline-end: clamp(16px, 3vw, 40px); }
.mx-step .mx-big { display: block; font-size: 3rem; font-weight: 300; line-height: 1; color: var(--ed-ink, #0b0b0c); margin-bottom: 1rem; }
.mx-step p { color: var(--ed-muted, #6b6b6b); font-weight: 300; margin: 0; }

.mx-callouts { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--ed-line, #e6e6e6); }
.mx-callout { padding: clamp(26px, 3.4vw, 40px); display: flex; flex-direction: column; gap: .4rem; }
.mx-callout + .mx-callout { border-inline-start: 1px solid var(--ed-line, #e6e6e6); }
.mx-callout .mx-h3 { font-size: 1.6rem; font-weight: 800; }
.mx-callout p { margin: 0; color: var(--ed-muted, #6b6b6b); font-weight: 300; }
.mx-callout .mx-btn { margin-top: 1rem; width: fit-content; }

.mx-soon { display: grid; grid-template-columns: 1.1fr .9fr; border: 1px solid var(--ed-ink, #0b0b0c); margin-top: clamp(28px, 4vw, 48px); }
.mx-soon-body { padding: clamp(28px, 4.4vw, 56px); }
.mx-soon-photo { position: relative; min-height: 320px; }
.mx-soon-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.mx-course-meta { display: flex; justify-content: space-between; gap: 1rem; margin-top: auto; padding-top: 1rem; font-size: .92rem; color: var(--ed-muted, #6b6b6b); }
.mx-course-meta b { color: var(--ed-ink, #0b0b0c); font-weight: 600; }

#main-content.academy-main:has(> .mx), .academy-main:has(> .mx), #main-content.services-main:has(> .mx), .services-main:has(> .mx) { max-width: none; width: 100%; padding: 0; margin: 0; }

@media (max-width: 1024px) {
  .mx-cols { grid-template-columns: repeat(2, 1fr); }
  .mx-col { padding-bottom: 28px; }
}
@media (max-width: 860px) {
  .mx-hero, .mx-band, .mx-soon, .mx-callouts { grid-template-columns: 1fr; }
  .mx-hero-photo { min-height: 360px; order: -1; }
  .mx-hero-copy { padding-block: 40px 52px; }
  .mx-band-photo { min-height: 300px; }
  .mx-steps, .mx-cols--3 { grid-template-columns: 1fr; }
  .mx-step { padding-bottom: 28px; border-bottom: 1px solid var(--ed-line, #e6e6e6); }
  .mx-stats { grid-template-columns: 1fr 1fr; }
  .mx-stat:nth-child(3) { border-inline-start: 0; }
  .mx-stat:nth-child(n+3) { border-top: 1px solid var(--ed-line, #e6e6e6); }
  .mx-callout + .mx-callout { border-inline-start: 0; border-top: 1px solid var(--ed-line, #e6e6e6); }
}
@media (max-width: 560px) {
  .mx-cols { grid-template-columns: 1fr 1fr; gap: 0 14px; }
  .mx-col { padding-inline-end: 0; }
  .mx-btn { width: 100%; }
  .mx-actions { flex-direction: column; align-items: stretch; }
  .mx-h1 { font-size: 2.2rem; }
}
@media (prefers-reduced-motion: reduce) { .mx-col .mx-media img { transition: none; } }

/* Filter tabs (catalog) */
.ed-tabs { display: flex; flex-wrap: wrap; gap: 0 1.6rem; margin-top: 1.6rem; border-bottom: 1px solid var(--ed-line, #e6e6e6); }
.ed-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: .7rem 0; font: inherit; font-size: .95rem; color: var(--ed-muted, #6b6b6b); cursor: pointer; }
.ed-tabs button:hover { color: var(--ed-ink, #0b0b0c); }
.ed-tabs button.is-on { color: var(--ed-ink, #0b0b0c); font-weight: 600; border-bottom-color: var(--ed-ink, #0b0b0c); }

/* Course page */
.ed-meta { display: flex; flex-wrap: wrap; margin: 2rem 0 0; border-top: 1px solid var(--ed-line, #e6e6e6); }
.ed-meta > div { padding: 1rem 0; padding-inline-end: 2.4rem; }
.ed-meta dt { font-size: .78rem; letter-spacing: .1em; color: var(--ed-muted, #6b6b6b); }
.ed-meta dd { margin: .2rem 0 0; font-weight: 600; font-size: 1.1rem; color: var(--ed-ink, #0b0b0c); }
.ed-syllabus { list-style: none; padding: 0; margin: 1.8rem 0 0; border-top: 1px solid var(--ed-ink, #0b0b0c); }
.ed-syllabus > li { display: grid; grid-template-columns: 4rem 1fr; gap: 1rem; padding: 1.6rem 0; border-bottom: 1px solid var(--ed-line, #e6e6e6); }
.ed-syllabus ul { list-style: none; padding: 0; margin: .4rem 0 0; display: grid; gap: .5rem; }
.ed-syllabus ul li { display: flex; justify-content: space-between; gap: 1rem; font-weight: 300; }
.ed-reviews { list-style: none; padding: 0; margin: 1.4rem 0 0; display: grid; gap: 1rem; }
.ed-reviews p { margin: .3rem 0 0; font-weight: 300; }
.ed-forms { display: grid; grid-template-columns: 1fr 1fr; gap: 2.4rem; margin-top: 2.4rem; padding-top: 2.4rem; border-top: 1px solid var(--ed-line, #e6e6e6); }
@media (max-width: 860px) { .ed-forms { grid-template-columns: 1fr; } .ed-syllabus > li { grid-template-columns: 2.6rem 1fr; } }
