@font-face { font-family: "Roboto"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/roboto-variable.ttf") format("truetype"); }
@font-face { font-family: "Roboto"; font-style: italic; font-weight: 100 900; font-display: swap; src: url("../fonts/roboto-variable-italic.ttf") format("truetype"); }

:root,
.editor-styles-wrapper {
    --miras-page-wide: 1440px;
    --miras-page-gutter: clamp(20px, 5.6944vw, 110px);
    --miras-prose: 80ch;
    --miras-ink: #021b47;
    --miras-navy: #153052;
    --miras-blue: #4c88db;
    --miras-gold: #ffd03a;
    --miras-text: #29415e;
    --miras-muted: #596f89;
    --miras-line: #d8e5f0;
    --miras-surface: #f5fafe;
    --miras-accent: #245fbb;
    --miras-highlight: #eaf7fd;
    --miras-media-radius: var(--wp--custom--media-radius, 12px);
}

/* Give the editor the same working gutters as the front-end page. */
.editor-styles-wrapper.post-type-page .is-root-container {
    box-sizing: border-box;
    width: 100%;
    max-width: 1520px;
    padding: 24px clamp(20px, 2.5vw, 40px);
    margin-inline: auto;
}

/* Compact, image-free cover. */
.miras-editorial-page {
    color: var(--miras-text);
    background: #fff;
}

.miras-editorial-cover {
    position: relative;
    overflow: hidden;
    padding-inline: clamp(20px, 2.5vw, 40px);
    border-bottom: 0;
    color: #fff;
    background: var(--miras-ink);
    isolation: isolate;
}

.miras-editorial-cover::before,
.miras-editorial-cover::after {
    position: absolute;
    z-index: 0;
    pointer-events: none;
    content: "";
}

.miras-editorial-cover::before {
    inset: 0 auto 0 0;
    width: min(36vw, 340px);
    background: url("../images/home-2026/figma/universities-dots.svg") left top / 340px auto no-repeat;
    opacity: 0.22;
}

.miras-editorial-cover::after {
    top: 50%;
    right: -24px;
    width: clamp(280px, 47vw, 704px);
    aspect-ratio: 704 / 134;
    background: #fff;
    mask: url("../images/home-2026/figma/footer-miras-wordmark.svg") center / contain no-repeat;
    opacity: 0.055;
    transform: translateY(-50%);
}

.miras-editorial-cover__inner {
    position: relative;
    z-index: 1;
    width: min(var(--miras-page-wide), 100%);
    padding-block: 24px;
    margin-inline: auto;
}

.miras-editorial-cover__content {
    max-width: 1200px;
}

.miras-editorial-breadcrumbs {
    margin-bottom: 10px;
    color: rgb(255 255 255 / 66%);
    font-family: "Roboto", Arial, sans-serif;
    font-size: 13px;
    line-height: 1.45;
}

.miras-editorial-breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.miras-editorial-breadcrumbs li {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.miras-editorial-breadcrumbs li:not(:last-child)::after {
    color: rgb(255 255 255 / 35%);
    content: "›";
}

.miras-editorial-breadcrumbs a {
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
    box-sizing: border-box;
    align-items: center;
    padding-inline: 4px;
    color: inherit;
    text-decoration: none;
    text-underline-offset: 4px;
}

.miras-editorial-breadcrumbs a:hover,
.miras-editorial-breadcrumbs a:focus-visible {
    color: #fff;
    text-decoration: underline;
}

.miras-editorial-cover h1 {
    max-width: 25ch;
    margin: 0;
    color: #fff;
    font-family: "Roboto", Arial, sans-serif;
    font-size: clamp(31px, 3vw, 46px);
    font-weight: 680;
    letter-spacing: -0.038em;
    line-height: 1.06;
    text-wrap: balance;
}

.miras-editorial-cover__description {
    max-width: 100ch;
    margin: 9px 0 0;
    color: rgb(255 255 255 / 77%);
    font-family: "Roboto", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.375;
    text-wrap: pretty;
}

/* Document canvas and WordPress alignment. */
.miras-editorial-page:not(.miras-contact-page) .miras-editorial-body {
    padding: 28px var(--miras-page-gutter) 40px;
}

.miras-editorial-content {
    width: min(var(--miras-page-wide), 100%);
    margin-inline: auto;
}

:where(.miras-editorial-content, .editor-styles-wrapper) {
    color: var(--miras-text);
    font-family: "Roboto", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.375;
    text-wrap: pretty;
}

.miras-editorial-content > * {
    margin-top: 0;
    margin-bottom: 24px;
}

.miras-editorial-content > :last-child {
    margin-bottom: 0;
}

.miras-editorial-content > :where(h2, h3, h4, p, ul, ol, blockquote),
.miras-editorial-content > :where(.miras-content-lead, .miras-text-section, .miras-prose-section, .miras-page-callout, .miras-tariff-conditions) {
    width: min(var(--miras-prose), 100%);
    margin-right: auto;
    margin-left: 0;
}

.miras-editorial-content > :where(
    .alignwide,
    .wp-block-media-text,
    .wp-block-gallery,
    .wp-block-table,
    .wp-block-miras-media-carousel,
    .miras-team-grid,
    .miras-link-grid,
    .miras-feature-grid,
    .miras-horizontal-sections,
    .miras-index-section,
    .miras-facts,
    .miras-steps
) {
    width: 100%;
    max-width: var(--miras-page-wide);
    margin-right: auto;
    margin-left: auto;
}

/* Conventional editorial typography. */
:where(.miras-editorial-content, .editor-styles-wrapper) :is(h2, h3, h4) {
    color: var(--miras-ink);
    font-family: "Roboto", Arial, sans-serif;
    font-weight: 680;
    text-wrap: balance;
}

:where(.miras-editorial-content, .editor-styles-wrapper) h2 {
    margin: 0 0 12px;
    font-size: clamp(24px, 2vw, 28px);
    letter-spacing: -0.03em;
    line-height: 1.14;
}

:where(.miras-editorial-content, .editor-styles-wrapper) h3 {
    margin: 0 0 8px;
    font-size: clamp(20px, 1.55vw, 22px);
    letter-spacing: -0.015em;
    line-height: 1.27;
}

:where(.miras-editorial-content, .editor-styles-wrapper) h4 {
    margin: 0 0 7px;
    font-size: 18px;
    line-height: 1.35;
}

:where(.miras-editorial-content, .editor-styles-wrapper) p {
    max-width: var(--miras-prose);
    margin-block: 0 0.76em;
}

:where(.miras-editorial-content, .editor-styles-wrapper) :is(ul, ol) {
    max-width: var(--miras-prose);
    padding-left: 1.35em;
    margin-block: 0 0.9em;
}

:where(.miras-editorial-content, .editor-styles-wrapper) li + li {
    margin-top: 0.375em;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .wp-block-list > li::marker {
    color: var(--miras-accent);
}

/* An opt-in core List style, not a separate block or automatic text rewrite. */
@media (min-width: 901px) {
    :where(.miras-editorial-content, .editor-styles-wrapper) ul.is-style-miras-compact-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px 28px;
        column-count: auto;
    }

    :where(.miras-editorial-content, .editor-styles-wrapper) ul.is-style-miras-compact-list > li {
        margin: 0;
    }
}

:where(.miras-editorial-content, .editor-styles-wrapper) strong {
    color: var(--miras-ink);
    font-weight: 700;
}

:where(.miras-editorial-content, .editor-styles-wrapper) a {
    color: var(--miras-accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

:where(.miras-editorial-content, .editor-styles-wrapper) a:hover,
:where(.miras-editorial-content, .editor-styles-wrapper) a:focus-visible {
    color: var(--miras-ink);
}

:where(.miras-editorial-content, .editor-styles-wrapper) :is(a, button, summary):focus-visible {
    outline: 2px solid var(--miras-accent);
    outline-offset: 4px;
}

:where(.miras-editorial-content, .editor-styles-wrapper) blockquote {
    max-width: var(--miras-prose);
    padding: 16px 20px;
    margin-block: 20px;
    border-left: 3px solid var(--miras-blue);
    border-radius: 0 8px 8px 0;
    color: var(--miras-ink);
    background: var(--miras-surface);
    font-size: 1rem;
    font-weight: 560;
    line-height: 1.375;
}

:where(.miras-editorial-content, .editor-styles-wrapper) blockquote cite {
    display: block;
    margin-top: 10px;
    color: var(--miras-muted);
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-content-lead {
    max-width: 78ch;
    padding: 0;
    border: 0;
    color: var(--miras-ink);
    background: transparent;
    font-size: 1rem;
    line-height: 1.375;
}

/* Images, galleries, and borderless media rows. */
:where(.miras-editorial-content, .editor-styles-wrapper) :is(.wp-block-image, .wp-block-gallery, .wp-block-cover, .wp-block-table) {
    margin-block: 18px;
}

:where(.miras-editorial-content, .editor-styles-wrapper) :is(.wp-block-image img, .wp-block-gallery img) {
    height: auto;
    border-radius: var(--miras-media-radius);
}

:where(.miras-editorial-content, .editor-styles-wrapper) figcaption {
    margin-top: 8px;
    color: var(--miras-muted);
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .wp-block-cover {
    min-height: clamp(280px, 38vw, 500px);
    overflow: hidden;
    border-radius: var(--miras-media-radius);
}

:where(.miras-editorial-content, .editor-styles-wrapper) .wp-block-gallery {
    gap: 12px;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .wp-block-gallery .wp-block-image {
    overflow: visible;
    margin: 0;
    border-radius: var(--miras-media-radius);
    background: transparent;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .wp-block-gallery .wp-block-image figcaption {
    position: static;
    padding: 8px 0 0;
    margin: 0;
    color: var(--miras-muted);
    background: transparent;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-content-gallery .wp-block-image img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-enrolment-gallery .wp-block-image img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

:where(.miras-editorial-content, .editor-styles-wrapper) :is(.miras-media-section, .miras-welcome-layout) {
    display: grid;
    align-items: start;
    gap: clamp(24px, 2.5vw, 36px);
    min-height: 0;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

:where(.miras-editorial-content, .editor-styles-wrapper) :is(.miras-media-section, .miras-welcome-layout) .wp-block-media-text__media {
    width: 100%;
    height: auto;
    min-height: 0;
    overflow: visible;
    margin: 0;
    border-radius: var(--miras-media-radius);
    background: transparent;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-media-section .wp-block-media-text__media img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: auto;
    border-radius: var(--miras-media-radius);
    object-fit: cover;
    transform: none;
}

:where(.miras-editorial-content, .editor-styles-wrapper) :is(.miras-media-section, .miras-welcome-layout) .wp-block-media-text__content,
:where(.miras-editorial-content, .editor-styles-wrapper) .miras-media-section.has-media-on-the-right .wp-block-media-text__content {
    padding: 0;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-welcome-layout {
    align-items: start;
}

.miras-editorial-content .wp-block-media-text.miras-welcome-layout :is(.wp-block-media-text__media, .wp-block-media-text__content),
.editor-styles-wrapper .wp-block-media-text.miras-welcome-layout :is(.wp-block-media-text__media, .wp-block-media-text__content) {
    align-self: start;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-welcome-layout .wp-block-media-text__media img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 680px;
    aspect-ratio: 3 / 4;
    border-radius: var(--miras-media-radius);
    object-fit: cover;
    object-position: center top;
}

:where(.miras-editorial-content, .editor-styles-wrapper) :is(.miras-text-section, .miras-prose-section, .miras-float-section) {
    padding-block: 16px;
    margin-block: 0;
    border-top: 1px solid var(--miras-line);
    background: transparent;
}

:where(.miras-editorial-content, .editor-styles-wrapper) :is(.miras-text-section, .miras-prose-section, .miras-float-section):first-child {
    padding-top: 0;
    border-top: 0;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-float-section {
    display: flow-root;
    width: 100%;
    max-width: var(--miras-page-wide);
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-float-section__media {
    float: left;
    width: min(38%, 470px);
    margin: 0 clamp(22px, 3vw, 40px) 18px 0;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-float-section__media img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--miras-media-radius);
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-section-note {
    max-width: var(--miras-prose);
    padding: 0;
    margin-top: 14px;
    border: 0;
    color: var(--miras-ink);
    background: transparent;
    font-weight: 600;
}

/* Staff directory: equal 3:4 frames, with non-destructive, proportional crops. */
:where(.miras-editorial-content, .editor-styles-wrapper) .miras-team-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    justify-content: stretch;
    align-items: stretch;
    gap: 24px;
    margin: 0;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-team-card,
:where(.miras-editorial-content, .editor-styles-wrapper) .miras-team-card:hover,
:where(.miras-editorial-content, .editor-styles-wrapper) .miras-team-card:focus-within {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: visible;
    border: 1px solid #e0e7ef;
    border-radius: var(--miras-media-radius);
    background: #f7f9fc;
    box-shadow: none;
    transform: none;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-team-card__image {
    aspect-ratio: 3 / 4;
    flex-shrink: 0;
    overflow: hidden;
    margin: 0;
    border-radius: calc(var(--miras-media-radius) - 1px) calc(var(--miras-media-radius) - 1px) 0 0;
    background: #f2f4f6;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-team-card__image img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 0;
    object-fit: cover;
    object-position: center bottom;
    transform: scale(var(--miras-portrait-zoom, 1));
    transform-origin: center bottom;
}

/* Individually reviewed hairlines: leave approximately 2% headroom.
   Bottom anchoring retains the lower portrait; uniform scaling never stretches
   faces. Match stable asset names, not environment-specific attachment IDs.
   Unknown/replacement portraits default to an unzoomed 3:4 frame. */
.miras-team-card__image img[src*="/team-elena-khamitova"] { --miras-portrait-zoom: 1.084; }
.miras-team-card__image img[src*="/team-galina-bandurina"] { --miras-portrait-zoom: 1.118; }
.miras-team-card__image img[src*="/team-aurore-homo-peron"] { --miras-portrait-zoom: 1.148; }
.miras-team-card__image img[src*="/team-akmaral-asylkhan"] { --miras-portrait-zoom: 1.163; }
.miras-team-card__image img[src*="/team-adema-kasseinova"] { --miras-portrait-zoom: 1.151; }
.miras-team-card__image img[src*="/team-aliya-baizhanova"] { --miras-portrait-zoom: 1.128; }
.miras-team-card__image img[src*="/team-elena-mishutina"] { --miras-portrait-zoom: 1.148; }

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-team-card__body {
    padding: 16px 16px 18px;
    margin: 0;
    border: 0;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-team-card h3 {
    margin: 0 0 8px;
    color: var(--miras-ink);
    font-size: 18px;
    font-weight: 650;
    line-height: 1.3;
    text-wrap: pretty;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-team-card__role {
    margin: 0;
    color: #4c607b;
    font-size: 1rem;
    line-height: 1.375;
}

/* Lists of resources and compact feature groups. */
:where(.miras-editorial-content, .editor-styles-wrapper) :is(.miras-link-grid, .miras-feature-grid) {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0 clamp(24px, 3vw, 40px);
    padding: 0;
    border: 0;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-feature-grid--single {
    grid-template-columns: minmax(0, var(--miras-prose)) !important;
}

:where(.miras-editorial-content, .editor-styles-wrapper) :is(.miras-link-card, .miras-feature-item),
:where(.miras-editorial-content, .editor-styles-wrapper) :is(.miras-link-card, .miras-feature-item):hover,
:where(.miras-editorial-content, .editor-styles-wrapper) :is(.miras-link-card, .miras-feature-item):focus-within {
    min-height: 0;
    padding: clamp(17px, 1.8vw, 23px) 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
}

:where(.miras-editorial-content, .editor-styles-wrapper) :is(.miras-link-card__link, .miras-feature-item__link, .miras-horizontal-row__link) {
    margin-top: 16px;
    margin-bottom: 0;
    font-size: 1rem;
    font-weight: 700;
}

:where(.miras-editorial-content, .editor-styles-wrapper) :is(.miras-link-card__link, .miras-feature-item__link, .miras-horizontal-row__link) a::after {
    margin-left: 7px;
    content: "→";
}

/* A single quiet inset for supporting information, not a card grid. */
:where(.miras-editorial-content, .editor-styles-wrapper) :is(.miras-page-callout, .miras-tariff-conditions) {
    width: 100%;
    max-width: none;
    padding: 18px 22px;
    overflow: visible;
    border: 0;
    border-radius: 8px;
    color: var(--miras-text);
    background: var(--miras-surface);
    box-shadow: none;
}

:where(.miras-editorial-content, .editor-styles-wrapper) :is(.miras-page-callout, .miras-tariff-conditions) :is(h2, h3, p, li, a, strong) {
    color: inherit;
}

/* Horizontal document rows and their two-column collections. */
:where(.miras-editorial-content, .editor-styles-wrapper) .miras-horizontal-sections {
    display: grid;
    gap: 0;
    margin: 0;
    border: 0;
}

.miras-editorial-content .wp-block-miras-content-row.miras-horizontal-row,
.editor-styles-wrapper .wp-block-miras-content-row.miras-horizontal-row {
    display: grid;
    grid-template-columns: minmax(180px, 0.24fr) minmax(0, 0.76fr);
    gap: clamp(24px, 2.5vw, 36px);
    align-items: start;
    align-content: start;
    min-height: 0;
    padding: 16px 0;
    margin: 0;
    border: 0;
    border-top: 1px solid var(--miras-line);
    border-radius: 0;
    color: var(--miras-text);
    background: transparent;
    box-shadow: none;
}

.miras-editorial-content .wp-block-miras-content-row.miras-horizontal-row:first-child,
.editor-styles-wrapper .wp-block-miras-content-row.miras-horizontal-row:first-child {
    border-top: 0;
}

.miras-editorial-content .wp-block-miras-content-row:is(.is-tone-soft, .is-tone-navy),
.editor-styles-wrapper .wp-block-miras-content-row:is(.is-tone-soft, .is-tone-navy) {
    padding-right: 0;
    padding-left: 0;
    color: var(--miras-text);
    background: transparent;
}

.miras-editorial-content .wp-block-miras-content-row.is-tone-navy :is(h2, h3, p, li, a, strong),
.editor-styles-wrapper .wp-block-miras-content-row.is-tone-navy :is(h2, h3, p, li, a, strong) {
    color: inherit;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-horizontal-row__heading h2 {
    max-width: none;
    margin-bottom: 0;
    font-size: clamp(20px, 1.65vw, 24px);
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-horizontal-row__content {
    min-width: 0;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-horizontal-row__content > :last-child {
    margin-bottom: 0;
}

/* Services share one quiet blue surface; they remain a heading/body document
 * section, not separate cards. The same treatment is available as a core style. */
:where(.miras-editorial-content, .editor-styles-wrapper) :is(.miras-medical-services, .is-style-miras-soft-panel) {
    box-sizing: border-box;
    padding: 20px 24px;
    border: 0;
    border-radius: 12px;
    background: var(--miras-surface);
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-medical-services > .wp-block-miras-content-row.miras-horizontal-row {
    padding: 0;
    border: 0;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .is-style-miras-soft-panel > :last-child {
    margin-bottom: 0;
}

/* Keep native circular image style and author-specified inline radii intact. */
:where(.miras-editorial-content, .editor-styles-wrapper) .wp-block-image.is-style-rounded img {
    border-radius: 9999px;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-horizontal-row--split-list .miras-horizontal-row__content > ul {
    max-width: none;
    column-count: 2;
    column-gap: clamp(28px, 4vw, 52px);
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-horizontal-row--split-list .miras-horizontal-row__content > ul li {
    break-inside: avoid;
}

:where(.miras-editorial-content, .editor-styles-wrapper) :is(
    .miras-about-highlights,
    .miras-foundation-sections,
    .miras-academic-results,
    .miras-programme-overview,
    .miras-programme-outcomes,
    .miras-vacancies-sections,
    .miras-family-resources,
    .miras-parent-information,
    .miras-campus-life-index,
    .miras-students-index,
    .miras-uniform-details
) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 clamp(24px, 3vw, 42px);
    padding: 0;
    border: 0;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-students-index {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

:where(.miras-editorial-content, .editor-styles-wrapper) :is(
    .miras-about-highlights,
    .miras-foundation-sections,
    .miras-academic-results,
    .miras-programme-overview,
    .miras-programme-outcomes,
    .miras-vacancies-sections,
    .miras-family-resources,
    .miras-parent-information,
    .miras-campus-life-index,
    .miras-students-index,
    .miras-uniform-details
) > .wp-block-miras-content-row.miras-horizontal-row {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: clamp(17px, 1.8vw, 22px) 0;
    border-top: 0;
    border-bottom: 0;
}

/* Native disclosure, program index, facts, and semantic steps. */
:where(.miras-editorial-content, .editor-styles-wrapper) .miras-details {
    padding: 0 18px;
    margin-top: 14px;
    border: 0;
    border-radius: 8px;
    background: var(--miras-surface);
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-details summary {
    display: list-item;
    min-height: 48px;
    padding: 13px 34px 13px 0;
    border: 0;
    color: var(--miras-ink);
    background: transparent;
    cursor: pointer;
    font-weight: 700;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-details summary::marker {
    color: var(--miras-accent);
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-details[open] summary {
    border-bottom: 1px solid var(--miras-line);
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-details > :not(summary) {
    margin-right: 0;
    margin-left: 0;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-details > :nth-child(2) {
    margin-top: 15px;
}

.miras-editorial-content .wp-block-miras-program-index.miras-index-section,
.editor-styles-wrapper .wp-block-miras-program-index.miras-index-section {
    position: relative;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    color: var(--miras-text);
    background: transparent;
    box-shadow: none;
}

.miras-editorial-content .wp-block-miras-program-index.is-tone-navy :is(h2, h3, p, li, a, strong),
.editor-styles-wrapper .wp-block-miras-program-index.is-tone-navy :is(h2, h3, p, li, a, strong) {
    color: inherit;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-index-section__intro {
    max-width: var(--miras-prose);
    margin-bottom: 14px;
    color: var(--miras-muted);
}

.miras-editorial-content .wp-block-miras-program-index .miras-index-grid,
.editor-styles-wrapper .wp-block-miras-program-index .miras-index-grid {
    display: grid;
    gap: 0 clamp(20px, 2.5vw, 34px);
    border: 0;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-myp-subjects .miras-index-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-index-item {
    min-height: 0;
    padding: clamp(15px, 1.6vw, 20px) 0;
    border: 0;
    border-radius: 0;
    color: var(--miras-text);
    background: transparent;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-index-item h3 {
    font-size: clamp(18px, 1.45vw, 22px);
    color: var(--miras-accent);
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-index-item :is(p, ul) {
    max-width: none;
    font-size: 1rem;
    line-height: 1.375;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-facts {
    display: grid;
    overflow: visible;
    border: 0;
    border-radius: 12px;
    color: var(--miras-text);
    background: var(--miras-surface);
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-fact {
    min-width: 0;
    padding: clamp(17px, 1.8vw, 23px);
    border: 0;
    border-right: 1px solid var(--miras-line);
    color: var(--miras-text);
    background: transparent;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-fact:last-child {
    border-right: 0;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-fact__value {
    margin: 0 0 6px;
    color: var(--miras-accent);
    font-size: clamp(28px, 2.8vw, 40px);
    font-weight: 750;
    letter-spacing: -0.04em;
    line-height: 1;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-fact__detail {
    margin: 0;
    color: var(--miras-muted);
    font-size: 1rem;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-steps {
    padding: 0;
    counter-reset: miras-step;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-step {
    display: flex;
    gap: clamp(18px, 2.5vw, 32px);
    align-items: flex-start;
    padding: clamp(18px, 2vw, 26px) 0;
    border-top: 1px solid var(--miras-line);
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-step__number {
    display: grid;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    margin: 0;
    border: 1px solid var(--miras-blue);
    border-radius: 50%;
    color: var(--miras-ink);
    background: transparent;
    font-size: 17px;
    font-weight: 750;
    place-items: center;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-step__body {
    flex: 1 1 auto;
    min-width: 0;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-programme-deep-dive {
    padding: 16px 0;
    border: 0;
    border-top: 1px solid var(--miras-line);
    border-radius: 0;
    color: var(--miras-text);
    background: transparent;
}

/* Tables remain wide only when their data needs it. */
:where(.miras-editorial-content, .editor-styles-wrapper) .wp-block-table {
    overflow-x: auto;
    border: 0;
    border-radius: 8px;
}

:where(.miras-editorial-content, .editor-styles-wrapper) table {
    width: 100%;
    border-collapse: collapse;
}

:where(.miras-editorial-content, .editor-styles-wrapper) :is(th, td) {
    padding: 11px 13px;
    border: 0;
    border-bottom: 1px solid var(--miras-line);
    text-align: left;
    vertical-align: top;
}

:where(.miras-editorial-content, .editor-styles-wrapper) th {
    color: var(--miras-ink);
    background: var(--miras-highlight);
    font-weight: 700;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
    background: var(--miras-surface);
}

:where(.miras-editorial-content, .editor-styles-wrapper) .wp-block-table.is-style-stripes tbody tr:nth-child(even) {
    background: transparent;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .wp-block-table thead {
    border-bottom: 1px solid var(--miras-line);
}

/* Quiet native carousel controls below the uniform media. */
/* Wide, left-aligned document sections. Do not re-centre the children of a
 * native constrained Group: that was recreating the narrow gold columns. */
:where(.miras-editorial-content, .editor-styles-wrapper) :is(.miras-page-callout, .miras-prose-section, .miras-tariff-conditions).is-layout-constrained > :not(.aligncenter) {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

:where(.miras-editorial-content, .editor-styles-wrapper) :is(.miras-page-callout, .miras-prose-section, .miras-tariff-conditions) > :is(h2, h3) {
    max-width: none;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-media-section .wp-block-media-text__content > h2:not(:first-child) {
    margin-top: 20px;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-mission-columns {
    gap: 36px;
    align-items: flex-start;
    margin-bottom: 0;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-mission-columns .wp-block-image img {
    display: block;
    width: 100%;
}

:where(.miras-editorial-content, .editor-styles-wrapper) :is(h2, h3, h4) {
    scroll-margin-top: 100px;
}

:where(.miras-editorial-content, .editor-styles-wrapper) :is(p, li, th, td) {
    overflow-wrap: anywhere;
}

/* Philosophy: one editable list, read across two roomy columns, no panels. */
:where(.miras-editorial-content, .editor-styles-wrapper) .miras-philosophy-statement > ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 36px;
    max-width: none;
    padding-left: 1.25em;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-philosophy-statement > ul > li {
    margin: 0;
    padding-left: 4px;
}

/* Parent and campus directories need two readable columns, not three strips. */
:where(.miras-editorial-content, .editor-styles-wrapper) .miras-students-index {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Keep related curriculum sections together without the empty heading rail. */
:where(.miras-editorial-content, .editor-styles-wrapper) :is(.miras-curriculum-sections, .miras-myp-context, .miras-music-programmes) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 32px;
    border-bottom: 0;
}

:where(.miras-editorial-content, .editor-styles-wrapper) :is(.miras-curriculum-sections, .miras-myp-context, .miras-music-programmes) > .wp-block-miras-content-row.miras-horizontal-row {
    grid-template-columns: 1fr;
    gap: 10px;
}

:where(.miras-editorial-content, .editor-styles-wrapper) :is(.miras-curriculum-sections, .miras-myp-context, .miras-music-programmes) h2 {
    max-width: none;
}

/* Fees and calendar are documents, not ornamental callouts. */
:where(.miras-editorial-content, .editor-styles-wrapper) .miras-tariff-intro {
    border-top: 0;
    padding-top: 0;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-tariff-group {
    width: 100%;
    max-width: none;
    margin-inline: 0;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-tariff-eligibility {
    max-width: 110ch;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-tariff-group th:first-child {
    width: 50%;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-tariff-group :is(th, td):not(:first-child) {
    text-align: right;
}

.miras-editorial-content .wp-block-gallery.has-nested-images figure.wp-block-image figcaption,
.editor-styles-wrapper .wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
    position: static;
    width: 100%;
    max-height: none;
    padding: 8px 0 0;
    margin: 0;
    color: var(--miras-muted);
    background: none;
    font-size: 1rem;
    line-height: 1.375;
    text-align: left;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .miras-tariff-conditions :is(p, ul),
:where(.miras-editorial-content, .editor-styles-wrapper) .miras-calendar-callout p {
    max-width: 100ch;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .wp-block-table {
    font-variant-numeric: tabular-nums;
    font-size: 1rem;
    line-height: 1.375;
}

/* Body blocks share the requested baseline, including custom InnerBlocks. */
:where(.miras-editorial-content, .editor-styles-wrapper) :is(.miras-process-step, .miras-horizontal-row__content, .miras-index-item) {
    font-size: 1rem;
    line-height: 1.375;
}

/* A small colour cue belongs on the step number, not around the whole text. */
:where(.miras-editorial-content, .editor-styles-wrapper) .wp-block-miras-process-step.miras-process-step {
    border-top: 0;
    padding-top: 0;
}

:where(.miras-editorial-content, .editor-styles-wrapper) .wp-block-miras-process-step .miras-process-step__number {
    border-radius: 50%;
    color: var(--miras-accent);
    background: var(--miras-highlight);
    font-size: 18px;
    place-items: center;
}

/* Rows need a rule between entries, not a frame around the directory. */
:where(.miras-editorial-content, .editor-styles-wrapper) .miras-link-grid > .miras-link-card:nth-child(n + 3),
:where(.miras-editorial-content, .editor-styles-wrapper) .miras-feature-grid > .miras-feature-item:nth-child(n + 3) {
    border-top: 1px solid var(--miras-line);
}

@media (max-width: 900px) {
    :where(.miras-editorial-content, .editor-styles-wrapper) .miras-philosophy-statement > ul,
    :where(.miras-editorial-content, .editor-styles-wrapper) :is(.miras-curriculum-sections, .miras-myp-context, .miras-music-programmes, .miras-students-index) {
        grid-template-columns: minmax(0, 1fr);
    }
}

.miras-editorial-page:not(.miras-contact-page) .wp-block-miras-media-carousel.miras-media-carousel {
    padding-bottom: 52px;
    margin-bottom: clamp(24px, 2.6vw, 34px);
}

.miras-editorial-page:not(.miras-contact-page) .miras-media-carousel__track {
    gap: 12px;
}

.miras-editorial-page:not(.miras-contact-page) .miras-media-carousel__track > .wp-block-image {
    overflow: hidden;
    border: 0;
    border-radius: var(--miras-media-radius);
    background: transparent;
}

.miras-editorial-page:not(.miras-contact-page) .miras-media-carousel__track > .wp-block-image img {
    border-radius: var(--miras-media-radius);
}

.miras-editorial-page:not(.miras-contact-page) .miras-media-carousel__controls {
    position: absolute;
    inset: auto 0 0;
    display: flex;
    height: 44px;
    justify-content: flex-end;
    gap: 8px;
    pointer-events: none;
}

.miras-editorial-page:not(.miras-contact-page) .miras-media-carousel__button {
    position: static;
    display: grid;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--miras-line);
    border-radius: 50%;
    color: var(--miras-ink);
    background: #fff;
    box-shadow: none;
    pointer-events: auto;
    transform: none;
    place-items: center;
}

.miras-editorial-page:not(.miras-contact-page) .miras-media-carousel__button:hover,
.miras-editorial-page:not(.miras-contact-page) .miras-media-carousel__button:focus-visible {
    color: #fff;
    background: var(--miras-ink);
    box-shadow: none;
}

@media (max-width: 1080px) {
    :where(.miras-editorial-content, .editor-styles-wrapper) .miras-team-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    :where(.miras-editorial-content, .editor-styles-wrapper) .miras-students-index {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    :where(.miras-editorial-content, .editor-styles-wrapper) :is(.miras-media-section, .miras-welcome-layout) {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }

    :where(.miras-editorial-content, .editor-styles-wrapper) :is(.miras-media-section, .miras-welcome-layout) .wp-block-media-text__media {
        grid-row: 1;
        grid-column: 1;
    }

    :where(.miras-editorial-content, .editor-styles-wrapper) :is(.miras-media-section, .miras-welcome-layout) .wp-block-media-text__content {
        grid-row: 2;
        grid-column: 1;
    }

    :where(.miras-editorial-content, .editor-styles-wrapper) .miras-media-section .wp-block-media-text__media img {
        width: auto;
        max-width: 100%;
        max-height: 440px;
        aspect-ratio: auto;
        object-fit: contain;
        object-position: left top;
    }

    :where(.miras-editorial-content, .editor-styles-wrapper) .miras-welcome-layout .wp-block-media-text__media img {
        width: min(100%, 520px);
        max-height: 480px;
        aspect-ratio: auto;
        object-fit: contain;
    }

    .miras-editorial-content .wp-block-miras-content-row.miras-horizontal-row,
    .editor-styles-wrapper .wp-block-miras-content-row.miras-horizontal-row {
        grid-template-columns: minmax(190px, 0.34fr) minmax(0, 0.66fr);
        gap: 24px;
    }
}

@media (max-width: 782px) {
    :where(.miras-editorial-content, .editor-styles-wrapper) :is(.miras-medical-services, .is-style-miras-soft-panel) {
        padding: 18px;
    }

    :where(.miras-editorial-content, .editor-styles-wrapper) .miras-link-grid > .miras-link-card:nth-child(n + 2),
    :where(.miras-editorial-content, .editor-styles-wrapper) .miras-feature-grid > .miras-feature-item:nth-child(n + 2) {
        border-top: 1px solid var(--miras-line);
    }

    .miras-editorial-cover {
        padding-inline: 18px;
    }

    .miras-editorial-cover__inner {
        padding-block: 22px;
    }

    .miras-editorial-cover h1 {
        font-size: clamp(29px, 7vw, 38px);
    }

    .miras-editorial-page:not(.miras-contact-page) .miras-editorial-body {
        padding: 22px var(--miras-page-gutter) 42px;
    }

    :where(.miras-editorial-content, .editor-styles-wrapper) {
        font-size: 16px;
        line-height: 1.375;
    }

    :where(.miras-editorial-content, .editor-styles-wrapper) .miras-team-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px 12px;
    }

    :where(.miras-editorial-content, .editor-styles-wrapper) :is(.miras-link-grid, .miras-feature-grid) {
        grid-template-columns: 1fr !important;
    }

    .miras-editorial-content .wp-block-miras-content-row.miras-horizontal-row,
    .editor-styles-wrapper .wp-block-miras-content-row.miras-horizontal-row {
        grid-template-columns: 1fr;
        gap: 8px;
        padding-block: 17px;
    }

    :where(.miras-editorial-content, .editor-styles-wrapper) .miras-horizontal-row--split-list .miras-horizontal-row__content > ul {
        column-count: 1;
    }

    :where(.miras-editorial-content, .editor-styles-wrapper) :is(
        .miras-about-highlights,
        .miras-foundation-sections,
        .miras-academic-results,
        .miras-programme-overview,
        .miras-programme-outcomes,
        .miras-vacancies-sections,
        .miras-family-resources,
        .miras-parent-information,
        .miras-campus-life-index,
        .miras-students-index,
        .miras-uniform-details
    ) {
        grid-template-columns: 1fr;
    }

    .miras-editorial-content .wp-block-miras-program-index .miras-index-grid,
    .editor-styles-wrapper .wp-block-miras-program-index .miras-index-grid,
    :where(.miras-editorial-content, .editor-styles-wrapper) .miras-myp-subjects .miras-index-grid {
        grid-template-columns: 1fr;
    }

    :where(.miras-editorial-content, .editor-styles-wrapper) .wp-block-group.miras-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    :where(.miras-editorial-content, .editor-styles-wrapper) .miras-fact {
        border-right: 1px solid var(--miras-line);
        border-bottom: 1px solid var(--miras-line);
    }

    :where(.miras-editorial-content, .editor-styles-wrapper) .miras-fact:nth-child(even) {
        border-right: 0;
    }

    :where(.miras-editorial-content, .editor-styles-wrapper) .miras-fact:nth-last-child(-n + 2) {
        border-bottom: 0;
    }

    :where(.miras-editorial-content, .editor-styles-wrapper) .miras-float-section__media {
        float: none;
        width: 100%;
        max-width: 520px;
        margin: 0 0 18px;
    }
}

@media (max-width: 479px) {
    .miras-editorial-breadcrumbs {
        font-size: 12px;
    }

    :where(.miras-editorial-content, .editor-styles-wrapper) h2 {
        font-size: 25px;
    }

    :where(.miras-editorial-content, .editor-styles-wrapper) .miras-team-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    :where(.miras-editorial-content, .editor-styles-wrapper) .miras-team-card h3 {
        font-size: 18px;
    }

    :where(.miras-editorial-content, .editor-styles-wrapper) .miras-team-card__role {
        font-size: 1rem;
    }

    :where(.miras-editorial-content, .editor-styles-wrapper) .miras-step {
        gap: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .miras-editorial-page:not(.miras-contact-page) .miras-media-carousel__viewport {
        scroll-behavior: auto;
    }

    .miras-editorial-page:not(.miras-contact-page) .miras-media-carousel__button {
        transition: none;
    }
}
