/** Shared frontend readability rules. No admin/editor or form behaviour changes. */
body.tma-next :is(h1,h2,h3,h4,legend){font-family:var(--tma-font-body);text-transform:none;letter-spacing:-.025em;font-weight:700;line-height:1.25;text-wrap:pretty;overflow-wrap:break-word}
body.tma-next h1{font-size:var(--tma-type-display-1);line-height:var(--tma-leading-display)}
body.tma-next h2{font-size:var(--tma-type-display-2)}
body.tma-next h3{font-size:var(--tma-type-lg)}
/* Component headings are not section headings. Keep a predictable type scale. */
body.tma-next :is(.tma-info-card h2,.tma-info-card h3,.tma-home-course-card h3,.tma-explorer-card h3,.tma-program-card h3,.tma-portal-card h2){font-size:var(--tma-type-lg);line-height:1.35;margin:0 0 1.2rem}
body.tma-next :is(.tma-button,.tma-text-link){font-size:var(--tma-type-base);font-weight:700;line-height:1.4}
body.tma-next .tma-architecture-menu__header{padding:1.6rem 2rem;align-items:center}
body.tma-next .tma-architecture-menu__header strong{font-family:var(--tma-font-body);font-size:var(--tma-type-lg);line-height:1.3;text-transform:none}
body.tma-next .tma-architecture-menu__header .tma-mega__label{color:var(--tma-muted);font-size:var(--tma-type-xs);letter-spacing:0;text-transform:none}
body.tma-next .tma-architecture-menu__body{gap:2rem;padding:2rem}
body.tma-next .tma-architecture-menu__body h2{font-size:var(--tma-type-sm);line-height:1.4;letter-spacing:0;text-transform:none;margin:0 0 1rem;padding:0 .8rem;color:var(--tma-ink-muted)}
body.tma-next .tma-architecture-menu__links{gap:.4rem .8rem}
body.tma-next .tma-architecture-menu__links>a{min-height:48px;padding:.8rem!important}
body.tma-next .tma-architecture-menu__links>a span{font-size:var(--tma-type-base);font-weight:700;line-height:1.35}
body.tma-next .tma-architecture-menu__links>a small{font-size:var(--tma-type-xs);line-height:1.4;margin-top:.3rem}
@media(min-width:1081px){
  body.tma-next .tma-header__main{position:relative}
  body.tma-next .tma-nav{position:static}
  body.tma-next .tma-mega--architecture{left:var(--tma-panel-left,0);right:auto;top:100%;width:min(760px,100%);max-height:var(--tma-panel-height,calc(100dvh - 160px));overflow-y:auto;overscroll-behavior:contain;gap:0;border:1px solid var(--tma-line-dark);box-shadow:0 12px 24px rgba(0,0,0,.12)}
  body.tma-next :is(.tma-nav__group--percorsi,.tma-nav__group--approfondisci,.tma-nav__group--academy) .tma-mega--architecture{width:min(600px,100%)}
}
@media(min-width:1081px) and (max-width:1240px){
  body.tma-next .tma-nav{font-size:1.5rem;gap:.8rem}
  body.tma-next .tma-nav>.tma-button{font-size:1.4rem;padding-inline:1.2rem}
  body.tma-next .tma-header__main{gap:1rem}
  body.tma-next .tma-brand{width:145px;flex:0 0 145px}
  body.tma-next .tma-mmi-badge{width:74px;min-width:74px}
  body.tma-next .tma-mmi-badge img{width:64px}
}
body.tma-next :is(.tma-event-card h2,.tma-faculty-card h2,legend){font-size:var(--tma-type-xl)}
body.tma-next :is(.tma-eyebrow,.tma-step-kicker,.tma-field>span,.tma-course-menu__title b,.tma-course-menu__header strong,.tma-teacher-blurb strong,.tma-partner-card__copy strong){text-transform:none;letter-spacing:0;line-height:1.4}
body.tma-next :is(.tma-eyebrow,.tma-step-kicker,.tma-field>span){font-size:var(--tma-type-sm)}
body.tma-next :is(.tma-section__intro,.tma-explorer__intro){margin-bottom:3.2rem}
body.tma-next :is(.tma-page-hero__lead,.tma-hero__lead){font-size:var(--tma-type-md);line-height:1.7;max-width:62ch;color:var(--tma-white)}
body.tma-next :is(.tma-explorer-card p,.tma-program-card p,.tma-program-card li,.tma-home-course-card p,.tma-faculty-card p,.tma-learning-card p,.tma-module-tile p,.tma-teacher-blurb em){font-size:var(--tma-type-base);line-height:1.65}
body.tma-next :is(.tma-choice-grid small,.tma-field>small,.tma-enrollment-card .tma-choice-grid small,.tma-enrollment-card .tma-field>small){font-size:var(--tma-type-sm);line-height:1.6}
body.tma-next :is(.tma-header,.tma-header.is-stuck){background:var(--tma-ink);box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
body.tma-next .tma-utility nav{font-size:var(--tma-type-xs);letter-spacing:0;text-transform:none}
body.tma-next .tma-course-menu__header{background:var(--tma-surface);color:var(--tma-white)}
body.tma-next .tma-course-menu__header :is(.tma-eyebrow,.tma-mega__label){color:var(--tma-cyan)}
body.tma-next .tma-nav__trigger>button{min-width:44px;min-height:44px}
body.tma-next [data-nav-ready] .tma-nav__group:not(.is-open)>.tma-mega{display:none}
body.tma-next .tma-course-menu section>nav a{height:auto;min-height:44px;padding:.8rem 1.2rem;font-size:var(--tma-type-sm);line-height:1.4}
body.tma-next .tma-page-hero{min-height:400px;background:var(--tma-surface)}
body.tma-next .tma-page-hero--compact{min-height:280px}
body.tma-next .tma-page-hero__content{padding-block:4.8rem}
body.tma-next .tma-hero{min-height:560px}
body.tma-next .tma-hero__content{padding-block:6.4rem}
body.tma-next .tma-hero__quick a{display:inline-flex;min-height:44px;align-items:center;padding:.8rem 1.1rem;line-height:1.35}
body.tma-next :is(.tma-hero__media,.tma-page-hero__media){background-image:linear-gradient(90deg,rgba(36,40,50,.96),rgba(36,40,50,.8) 58%,rgba(36,40,50,.28)),var(--hero-image)}
body.tma-next .tma-hero--home .tma-hero__media::after{background:linear-gradient(90deg,rgba(36,40,50,.95),rgba(36,40,50,.8) 58%,rgba(36,40,50,.3))}
body.tma-next :is(.tma-final-cta,.tma-footer,.tma-wizard-section,.tma-enrollment-section,.tma-home-finder,.tma-contact-section){background:var(--tma-ink)}
body.tma-next :is(.tma-button,.tma-button:hover){box-shadow:none;transform:none;border-radius:10px;padding:1.2rem 1.8rem;min-height:48px;color:var(--tma-accent-text)!important;transition:background .15s,border-color .15s}
body.tma-next .tma-button:is(.tma-button--ghost,.tma-button--dark){color:var(--tma-white)!important}
body.tma-next :is(.tma-button--ghost:hover,.tma-button--dark:hover){background:var(--tma-surface-2);border-color:var(--tma-muted);color:var(--tma-white)!important}
body.tma-next .tma-button--dark-ghost{color:var(--tma-ink)!important}
body.tma-next :is(.tma-actions,.tma-enrollment-success__actions){gap:1.2rem}
body.tma-next :is(.tma-info-card,.tma-faculty-card,.tma-teacher-blurb,.tma-partner-card,.tma-event-card,.tma-home-course-card,.tma-explorer-card,.tma-program-card,.tma-portal-card){background:var(--tma-card);box-shadow:none}
body.tma-next :is(.tma-faculty-card,.tma-event-card,.tma-partner-card,.tma-explorer-card,.tma-portal-card):hover{box-shadow:none;transform:none;border-color:var(--tma-cyan-ink)}
body.tma-next :is(.tma-teacher-blurb,.tma-path-card,.tma-learning-card,.tma-home-course-card,.tma-info-card):hover{box-shadow:none;transform:none}
body.tma-next :is(.tma-faculty-card,.tma-event-card,.tma-home-gallery,.tma-partner-card):hover img{transform:none}
body.tma-next :is(.tma-card-grid,.tma-faculty-grid,.tma-path-grid,.tma-news-grid,.tma-location-grid,.tma-event-grid,.tma-partner-grid){gap:2.4rem}
body.tma-next :is(.tma-info-card,.tma-faculty-card__content,.tma-event-card__body,.tma-home-course-card,.tma-news-card){padding:2.4rem}
body.tma-next .tma-home-course-card{min-height:280px}
body.tma-next .tma-faculty-card__media{background:var(--tma-surface-2)}
body.tma-next .tma-faculty-card__media img{width:100%;height:100%;object-fit:cover}
/* Reserve a visible box before lazy images have intrinsic dimensions. */
body.tma-next .tma-portal-card img{width:100%;height:90px;max-width:240px;object-fit:contain}
body.tma-next .tma-partner-card__logo img{width:100%;height:100px;object-fit:contain}
body.tma-next .tma-prose>img{margin-block:2.4rem;max-height:640px;object-fit:contain}
body.tma-next .tma-prose :is(img,iframe,video){max-width:100%}
body.tma-next .tma-prose iframe{aspect-ratio:16/9;height:auto;width:100%}
body.tma-next main :is(section,article)[id]{scroll-margin-top:150px}
body.tma-next .tma-faculty-profile__portrait h2{font-size:var(--tma-type-lg);line-height:1.4;margin:2.4rem 0 1.2rem}
body.tma-next .tma-faculty-profile__portrait>.tma-button{margin-top:2.4rem}
body.tma-next .tma-faculty-profile__links{gap:1.2rem;margin:1.2rem 0}
body.tma-next .tma-faculty-profile__links a{font-size:var(--tma-type-sm);font-weight:600;min-height:44px}
body.tma-next .tma-home-course-card small{margin-top:0;margin-bottom:1rem}
body.tma-next .tma-home-course-card h3{line-height:1.3}
body.tma-next .tma-explorer__intro h2{max-width:24ch}
body.tma-next .tma-explorer__search{min-width:0;width:min(100%,340px)}
body.tma-next .tma-explorer__search input{font-size:var(--tma-type-base)}
body.tma-next .tma-explorer-card__visual{height:160px;aspect-ratio:auto}
body.tma-next .tma-explorer-card__visual.is-graphic{background:var(--tma-surface-2);aspect-ratio:auto;min-height:160px;border-bottom:3px solid var(--tma-cyan)}
body.tma-next .tma-explorer-card__visual.is-graphic::after{display:none}
body.tma-next .tma-explorer-card__visual>span{display:none}
body.tma-next .tma-program-card{border-top:1px solid var(--tma-line-dark)}
body.tma-next .tma-facts{background:var(--tma-surface);color:var(--tma-white);border-bottom:2px solid var(--tma-cyan)}
body.tma-next .tma-facts span{padding:1.6rem;border-color:var(--tma-line);font-weight:600}
body.tma-next .tma-teacher-blurb{padding:1.6rem;gap:1.6rem}
body.tma-next .tma-teacher-blurb strong{font-size:var(--tma-type-md)}
body.tma-next .tma-teacher-blurb em{display:block;overflow:visible;-webkit-line-clamp:unset}
body.tma-next :is(.tma-wizard,.tma-enrollment.tma-enrollment-card,.tma-wizard-preview,.tma-enrollment-sidebar,.tma-contact-form){background:var(--tma-surface);box-shadow:none}
body.tma-next :is(.tma-wizard,.tma-enrollment-card__inner){padding:clamp(1.6rem,3vw,3.2rem)}
body.tma-next .tma-enrollment-progress i{background:var(--tma-cyan)}
body.tma-next .tma-wizard-preview__visual{background:var(--tma-surface-2);aspect-ratio:2.6}
body.tma-next .tma-wizard-preview__pulse{display:none}
body.tma-next .tma-wizard-preview__visual>b{font-size:3.2rem;line-height:1.2}
body.tma-next .tma-wizard-preview>p:not(.tma-wizard-preview__label){min-height:0}
body.tma-next .tma-wizard-preview{padding:2rem}
body.tma-next .tma-error-summary{margin:0 0 2rem;padding:1.6rem 1.8rem;color:var(--tma-white);border:1px solid var(--tma-red);border-left-width:4px;border-radius:10px;background:rgba(255,77,94,.1)}
body.tma-next .tma-error-summary strong{display:block;margin-bottom:.6rem;font-size:var(--tma-type-base)}
body.tma-next .tma-error-summary ul{display:grid;gap:.35rem;margin:0;padding-left:1.8rem;color:var(--tma-white);font-size:var(--tma-type-sm);line-height:1.5}
body.tma-next .tma-signature__typed{margin-top:1.6rem}
body.tma-next :is(.tma-field input,.tma-field select,.tma-field textarea,.tma-enrollment-card .tma-field input,.tma-enrollment-card .tma-field select,.tma-enrollment-card .tma-field textarea){background-color:var(--tma-ink);color:var(--tma-white);border-color:var(--tma-line);font-size:var(--tma-type-base);padding:1.2rem;line-height:1.5;color-scheme:dark}
body.tma-next :is(.tma-field input,.tma-field textarea)::placeholder{color:var(--tma-muted);opacity:1}
body.tma-next .tma-field option{background:var(--tma-ink);color:var(--tma-white)}
body.tma-next .tma-choice-grid label>span{padding:1.6rem;transform:none}
body.tma-next .tma-choice-grid--instruments label>span{padding-top:5.6rem}
body.tma-next .tma-choice-grid input:checked+span{transform:none;color:var(--tma-accent-text)}
body.tma-next .tma-choice-grid input:checked+span :is(b,small){color:var(--tma-accent-text)}
body.tma-next .tma-course-group{padding:1.6rem}
body.tma-next .tma-form-status.is-success{color:var(--tma-cyan)}
body.tma-next :is(.tma-field>span,.tma-group-label){color:var(--tma-white)}
body.tma-next .tma-event-filters{position:static;display:flex;flex-wrap:wrap;overflow:visible;white-space:normal;gap:8px;padding:0;background:transparent;box-shadow:none;border:0;border-radius:0;margin:0 0 3.2rem}
body.tma-next .tma-event-filters a{min-height:44px;white-space:normal;border:1px solid var(--tma-line-dark);border-radius:8px;padding:1rem 1.6rem;transform:none}
body.tma-next .tma-module-catalog__nav{position:static;display:flex;flex-wrap:wrap;overflow:visible;gap:8px;margin:0 0 3.2rem;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;backdrop-filter:none}
body.tma-next .tma-module-catalog__nav a{display:inline-flex;min-height:44px;align-items:center;padding:1rem 1.4rem;border:1px solid var(--tma-line-dark);border-radius:999px;white-space:normal;line-height:1.3}
body.tma-next .tma-home-proof__grid--inline{margin-top:3.2rem}
body.tma-next .tma-home-proof__grid--inline>div{min-height:130px}
body.tma-next .tma-home-gallery figcaption{position:absolute;inset:auto 0 0;padding:2.8rem 1.2rem 1rem;color:var(--tma-white);background:linear-gradient(transparent,rgba(21,17,38,.88));font-size:var(--tma-type-sm);line-height:1.4}
body.tma-next .tma-learning__selection-note{font-size:var(--tma-type-sm);color:var(--tma-ink-muted)}
/* Course components: colour reinforces the written status, never replaces it. */
body.tma-next .tma-learning__flow{gap:.8rem;padding:1.2rem 0;margin:0 0 2rem;border:0;border-radius:0;background:transparent}
body.tma-next .tma-learning__flow span{padding:.8rem 1.2rem;background:#e4e9ed;color:#344753;border-radius:8px;font-size:var(--tma-type-sm);font-weight:600}
body.tma-next .tma-learning__flow span:nth-of-type(3){background:#e2ece7;color:#355648}
body.tma-next .tma-learning__flow span:nth-of-type(4){background:#f0e8d9;color:#655235}
body.tma-next .tma-learning__legend{gap:1rem 2rem;margin-bottom:2.4rem;font-size:var(--tma-type-sm);font-weight:500}
body.tma-next .tma-learning__legend i{background:#597967}
body.tma-next .tma-learning__legend .is-optional i{background:#947747}
body.tma-next .tma-learning__legend .is-open i{background:#51788e}
body.tma-next .tma-learning__panels{gap:1.2rem}
body.tma-next .tma-learning-panel{background:var(--tma-card);border-color:#b6bdc0;border-radius:10px}
body.tma-next .tma-learning-panel summary{gap:1.6rem;min-height:64px;padding:2rem 2.4rem}
body.tma-next .tma-learning-panel summary strong{font-size:var(--tma-type-md);line-height:1.4}
body.tma-next .tma-learning-panel summary small{font-size:var(--tma-type-sm);line-height:1.6;margin-top:.5rem;max-width:85ch}
body.tma-next .tma-learning-panel summary>i{flex:0 0 24px;text-align:center;font-size:2.4rem;color:var(--tma-ink-muted)}
body.tma-next .tma-learning-panel__body{gap:2rem;padding:0 2.4rem 2.4rem}
body.tma-next .tma-learning-group{padding-top:2rem;border-color:#c9cdd0}
body.tma-next .tma-learning-group>header{grid-template-columns:auto minmax(0,1fr);gap:1.2rem 2rem;align-items:center;margin-bottom:1.6rem}
body.tma-next .tma-learning-group>header span{padding:.7rem 1rem;line-height:1.4;background:#e2ece7;color:#355648;border-radius:6px;font-size:var(--tma-type-xs);font-weight:700;letter-spacing:0;text-transform:none}
body.tma-next .tma-learning-group.is-optional>header span{background:#f0e8d9;color:#655235}
body.tma-next .tma-learning-group.is-open>header span{background:#e1ebf0;color:#36566a}
body.tma-next .tma-learning-group>header p{font-size:var(--tma-type-sm);line-height:1.6}
body.tma-next .tma-learning-grid{gap:1.2rem}
body.tma-next .tma-learning-card{padding:1.8rem;min-height:0;background:#f1f3ef;border-color:#c2cec6;border-radius:8px}
body.tma-next .is-optional .tma-learning-card{background:#f6f2e9;border-color:#d3cbb9}
body.tma-next .is-open .tma-learning-card{background:#edf2f4;border-color:#bfcdd4}
body.tma-next .tma-learning-card strong{font-size:var(--tma-type-base);line-height:1.4}
body.tma-next .tma-learning-card p{margin:.8rem 0 1.2rem;font-size:var(--tma-type-sm);line-height:1.65}
body.tma-next .tma-learning-card small{color:var(--tma-ink-muted);text-transform:none;letter-spacing:0;font-weight:600;font-size:var(--tma-type-xs)}
body.tma-next .tma-learning-card>span{padding-top:1rem;font-size:var(--tma-type-sm)}
body.tma-next .tma-module-catalog__nav a{font-size:var(--tma-type-sm);font-weight:600}
body.tma-next .tma-footer__grid{gap:3.2rem}
body.tma-next .tma-footer a{overflow-wrap:anywhere}
body.tma-next .tma-footer h2{font-size:var(--tma-type-display-3)}
body.tma-next .tma-footer h3{font-size:var(--tma-type-base);letter-spacing:0}
body.tma-next .tma-post-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:2.4rem}
body.tma-next .tma-post-card{overflow:hidden;border:1px solid var(--tma-line);border-radius:12px;background:var(--tma-surface)}
body.tma-next .tma-post-card>div{padding:2.4rem}
body.tma-next .tma-post-card h2{font-size:var(--tma-type-xl);margin-block:1rem}
body.tma-next .tma-post-card img{width:100%;height:220px;object-fit:cover}
body.tma-next .tma-post-card time{font-size:var(--tma-type-sm);color:var(--tma-muted)}
body.tma-next .tma-editorial-sections>article{grid-template-columns:1fr;padding-block:2.8rem}
body.tma-next .tma-editorial-sections>article>span{display:none}
/* Visible keyboard focus remains distinct on both surface families. */
body.tma-next :is(a,button,input,select,textarea,summary):focus-visible{outline:3px solid var(--tma-cyan);outline-offset:4px;box-shadow:none}
body.tma-next .tma-section--paper :is(a,button,input,select,textarea,summary):focus-visible,body.tma-next .tma-mega :is(a,button):focus-visible{outline-color:var(--tma-cyan-ink)}
@media(max-width:1080px){body.tma-next .tma-nav{background:var(--tma-ink);box-shadow:none}body.tma-next .tma-nav.is-open{transform:none}}
@media(max-width:760px){
  body.tma-next .tma-architecture-menu__body{padding:1.6rem;gap:2rem}
  body.tma-next .tma-learning-group>header{grid-template-columns:1fr;gap:.8rem}
  body.tma-next .tma-learning-panel summary{padding:1.6rem}
  body.tma-next .tma-learning-panel__body{padding:0 1.6rem 1.6rem}
  body.tma-next .tma-learning-grid{grid-template-columns:1fr}
  body.tma-next .tma-page-hero{min-height:320px}
  body.tma-next .tma-page-hero--compact{min-height:240px}
  body.tma-next .tma-page-hero__content{padding-block:3.2rem}
  body.tma-next .tma-hero{min-height:480px}
  body.tma-next .tma-hero__content{padding-block:4.8rem}
  body.tma-next .tma-section{padding-block:clamp(3.2rem,10vw,4.8rem)}
  body.tma-next .tma-home-gallery__grid{grid-template-columns:1fr}
  body.tma-next .tma-home-gallery figure.is-wide{grid-column:auto}
  body.tma-next .tma-home-gallery figure{min-height:220px}
  body.tma-next .tma-home-proof__grid--inline{grid-template-columns:repeat(3,minmax(0,1fr))}
  body.tma-next .tma-home-proof__grid--inline>div{min-height:110px;padding:1rem}
  body.tma-next .tma-home-proof__grid--inline strong{font-size:clamp(2.5rem,11vw,4rem)}
  body.tma-next .tma-home-proof__grid--inline span{font-size:var(--tma-type-xs)}
  body.tma-next :is(.tma-info-card,.tma-faculty-card__content,.tma-event-card__body,.tma-home-course-card,.tma-news-card){padding:2rem}
  body.tma-next .tma-section__intro--split{gap:2rem}
  body.tma-next .tma-editorial-sections>article{grid-template-columns:1fr;gap:1rem}
}
@media(max-width:400px){body.tma-next .tma-footer__grid{grid-template-columns:1fr}body.tma-next .tma-choice-grid--four{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){body.tma-next *,body.tma-next *::before,body.tma-next *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}html{scroll-behavior:auto}}
