/* MazeLab presentation and project card. Colours and type come from 9SD tokens. */
.ml { padding-top: 64px; padding-bottom: 112px; }
.ml-hero { padding-top: 32px; }
.ml-hero .back-link { margin-bottom: 44px; }
.ml-hero h1 { max-width: 1060px; margin: 24px 0; font-size: clamp(42px, 5.4vw, 78px); font-weight: 650; line-height: 1.06; letter-spacing: -.05em; }
.ml-hero h1 span { color: var(--muted); }
.ml-subtitle { max-width: 780px; margin: 0 0 42px; color: var(--muted); font-size: clamp(18px, 1.6vw, 22px); line-height: 1.55; }
.ml figure { margin: 36px 0 0; }
.ml picture, .ml-project-card picture { display: block; }
.ml img, .ml-project-card img { display: block; width: 100%; height: auto; }
.ml-image-link { display: block; border: 1px solid var(--line); }
.ml a:focus-visible, .ml-project-card a:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.ml-image-link:hover { border-color: var(--accent); }
.ml-image-link { cursor: zoom-in; }
html:has(.ml-viewer) { scrollbar-gutter: stable; }
.ml-viewer-open { overflow: hidden; }
.ml-viewer { position: fixed; inset: 0; box-sizing: border-box; width: 100%; height: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 72px 20px 24px; border: 0; background: transparent; color: var(--text); }
.ml-viewer[open] { display: grid; place-items: center; }
.ml-viewer::backdrop { background: rgba(0, 0, 0, .65); }
.ml-viewer figure { display: flex; flex-direction: column; align-items: center; max-width: 100%; min-width: 0; margin: 0; }
.ml-viewer img { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100dvh - 180px); object-fit: contain; background: var(--surface); }
.ml-viewer figcaption { box-sizing: border-box; max-width: min(100%, 78ch); max-height: 4.5em; overflow: auto; margin-top: 12px; padding: 10px 14px; background: var(--surface); color: var(--text); font-size: 14px; line-height: 1.5; text-align: center; }
.ml-viewer__close { position: absolute; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); min-width: 48px; min-height: 48px; padding: 6px 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 28px; cursor: pointer; }
.ml-viewer__close:hover { background: var(--surface-hover); }
.ml-viewer__close:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.ml figcaption { padding-top: 12px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.ml-intro { max-width: 940px; padding: 64px 0 80px; color: var(--text); font-size: clamp(18px, 1.6vw, 22px); line-height: 1.7; }
.ml-intro p { margin: 0; }
.ml-section { padding: 72px 0; border-top: 1px solid var(--line); scroll-margin-top: 120px; }
.ml-section__heading { display: grid; grid-template-columns: 1fr 2fr; gap: 32px; margin-bottom: 32px; align-items: start; }
.ml-section__heading .eyebrow { margin-top: 10px; line-height: 1.7; }
.ml-section h2, .ml-footer h2 { margin: 0; font-size: clamp(32px, 3.4vw, 48px); font-weight: 600; line-height: 1.1; letter-spacing: -.045em; }
.ml-section > p { max-width: 830px; margin: 0 0 20px auto; color: var(--muted); font-size: 18px; line-height: 1.7; }
.ml-section .ml-source { font-size: 14px; }
.ml-tournaments, .ml-technologies { margin: 32px 0; padding: 0; list-style: none; }
.ml-tournaments li { padding: 28px 32px; border: 1px solid var(--line); border-left: 2px solid var(--accent); background: var(--card-bg-soft); color: var(--muted); line-height: 1.8; }
.ml-tournaments li + li { border-top: 0; }
.ml-tournaments strong { display: block; margin-bottom: 8px; color: var(--text); font-size: 22px; font-weight: 600; }
.ml-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 24px; }
.ml-gallery figure { min-width: 0; margin: 0; align-self: start; }
.ml-gallery figure:last-child { grid-column: 1 / -1; }
.ml-technologies { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.ml-technologies li { padding: 28px 32px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--card-bg-soft); color: var(--muted); line-height: 1.7; }
.ml-technologies strong { color: var(--text); }
.ml-footer { padding-top: 64px; border-top: 1px solid var(--line); }
.ml-footer > p { color: var(--muted); }
.ml-footer > p:first-child { margin-bottom: 32px; }
.ml-footer h2 span { color: var(--muted); }
.ml-downloads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 36px 0; }
.ml-downloads a { display: grid; gap: 18px; padding: 32px; border: 1px solid var(--line); background: var(--surface); }
.ml-downloads a:hover { border-color: var(--accent); }
.ml-downloads strong { font-size: 24px; font-weight: 600; line-height: 1.2; letter-spacing: -.035em; }
.ml-downloads a > span:last-child { color: var(--muted); font-size: 14px; }
.ml-downloads b { color: var(--accent); margin-left: 8px; font-size: 22px; }
.ml-footer > p a { text-decoration: underline; text-underline-offset: 4px; }
.ml-project-card { margin-top: 32px; border: 1px solid var(--line); background: var(--card-bg-soft); }
.ml-project-card__body { padding: 38px; }
.ml-project-card h2 { margin: 22px 0; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.1; font-weight: 600; letter-spacing: -.045em; }
.ml-project-card h2 span { color: var(--muted); }
.ml-project-card__body > p:not(.eyebrow) { max-width: 830px; color: var(--muted); line-height: 1.7; }
.ml-project-card__more { display: inline-flex; align-items: center; gap: 16px; min-height: 44px; margin-top: 12px; font: 600 11px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.ml-project-card__more:hover { color: var(--text); }
@media (max-width: 1040px) {
  .ml-section__heading { grid-template-columns: 1fr; gap: 16px; }
  .ml-section > p { margin-left: 0; }
}
@media (max-width: 780px) {
  .ml { padding-top: 36px; padding-bottom: 72px; }
  .ml-intro { padding: 40px 0 56px; }
  .ml-section { padding: 48px 0; }
  .ml-gallery, .ml-technologies, .ml-downloads { grid-template-columns: 1fr; }
  .ml-gallery figure { max-width: 100%; margin-inline: auto; }
  .ml-gallery figure:nth-child(1) { max-width: 692px; }
  .ml-gallery figure:nth-child(2) { max-width: 694px; }
  .ml-gallery figure:nth-child(3) { max-width: 604px; }
  .ml-tournaments li, .ml-technologies li, .ml-downloads a, .ml-project-card__body { padding: 24px; }
  .ml-section > p { font-size: 17px; }
}
@media (max-width: 520px) {
  .ml-hero .back-link { margin-bottom: 32px; }
  .ml-hero h1 { font-size: 40px; }
  .ml-subtitle { margin-bottom: 28px; }
  .ml-tournaments li, .ml-technologies li, .ml-downloads a, .ml-project-card__body { padding: 22px 20px; }
}
