/* Current IMAT content layer: scoped to the refreshed page. */
.imat-current-page {
    --imat-navy: #171d35;
    --imat-red: #e3121a;
    --imat-ink: #252a3a;
    --imat-muted: #667084;
    --imat-line: #dfe2e8;
    --imat-soft: #f5f6f8;
}

.imat-current-page .hero {
    height: 54vh;
    min-height: 410px;
    max-height: 590px;
}

.imat-current-page .hero-overlay {
    background: linear-gradient(90deg, rgba(10, 14, 28, .86), rgba(10, 14, 28, .50) 60%, rgba(10, 14, 28, .22));
}

.imat-current-page .hero-content {
    bottom: 78px;
    left: max(40px, calc((100% - 1200px) / 2));
    max-width: 760px;
}

.imat-current-page .hero-kicker,
.imat-current-page .section-kicker {
    margin: 0 0 10px;
    color: var(--imat-red);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: 1.7px;
    line-height: 1.3;
}

.imat-current-page .hero-title {
    margin: 0 0 16px;
    font-size: clamp(2rem, 3.7vw, 3.15rem);
    letter-spacing: 0;
    line-height: 1.08;
}

.imat-current-page .hero-accent-line {
    width: 64px;
    height: 3px;
    margin-bottom: 16px;
}

.imat-current-page .hero-text {
    max-width: 680px;
    color: rgba(255,255,255,.9);
    font-size: .94rem;
    line-height: 1.65;
}

.imat-current-page .hero-breadcrumb {
    left: max(40px, calc((100% - 1200px) / 2));
}

.imat-inner {
    width: min(1200px, calc(100% - 80px));
    margin: 0 auto;
}

.imat-current-page main h2 {
    margin: 0;
    color: var(--imat-navy);
    font-size: clamp(1.55rem, 2.6vw, 2.25rem);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.2;
}

.imat-overview {
    padding: 66px 0 58px;
    background: #fff;
}

.overview-copy {
    display: grid;
    grid-template-columns: minmax(280px, .9fr) minmax(420px, 1.25fr);
    gap: 14px 70px;
    align-items: start;
}

.overview-copy .section-kicker { grid-column: 1 / -1; }
.overview-copy h2 { grid-column: 1; grid-row: 2 / 4; }
.overview-copy > p {
    grid-column: 2;
    margin: 0 0 12px;
    color: #485061;
    font-size: .88rem;
    line-height: 1.75;
}

.exam-facts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-top: 38px;
    border-top: 1px solid var(--imat-line);
    border-bottom: 1px solid var(--imat-line);
}

.fact-item {
    min-width: 0;
    padding: 22px 24px;
    border-right: 1px solid var(--imat-line);
}
.fact-item:last-child { border-right: 0; }
.fact-item strong {
    display: block;
    color: var(--imat-red);
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1.1;
}
.fact-item span {
    display: block;
    margin-top: 7px;
    color: var(--imat-navy);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .7px;
    text-transform: uppercase;
}

.system-note {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 28px;
    margin-top: 28px;
    padding: 24px 26px;
    border-left: 4px solid var(--imat-red);
    background: var(--imat-soft);
}
.note-label {
    color: var(--imat-red);
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: 1px;
}
.system-note h3 {
    margin: 0 0 6px;
    color: var(--imat-navy);
    font-size: .96rem;
}
.system-note p {
    margin: 0;
    color: #50586a;
    font-size: .8rem;
    line-height: 1.65;
}

.imat-format {
    padding: 60px 0 64px;
    background: var(--imat-soft);
}

.section-heading-row {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 70px;
    align-items: end;
    margin-bottom: 30px;
}
.section-heading-row > p {
    margin: 0;
    color: #50586a;
    font-size: .84rem;
    line-height: 1.7;
}

.distribution-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    border: 1px solid var(--imat-line);
    background: #fff;
}
.distribution-item {
    min-width: 0;
    padding: 22px 20px;
    border-right: 1px solid var(--imat-line);
    border-top: 3px solid transparent;
}
.distribution-item:last-child { border-right: 0; }
.distribution-item:hover { border-top-color: var(--imat-red); background: #fafafb; }
.distribution-item > span {
    display: block;
    margin-bottom: 14px;
    color: var(--imat-red);
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1;
}
.distribution-item h3 {
    min-height: 44px;
    margin: 0 0 8px;
    color: var(--imat-navy);
    font-size: .78rem;
    line-height: 1.4;
}
.distribution-item p {
    margin: 0;
    color: var(--imat-muted);
    font-size: .7rem;
    line-height: 1.55;
}

.scoring-panel {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 50px;
    margin-top: 30px;
    padding: 30px;
    background: var(--imat-navy);
}
.scoring-copy h2 { color: #fff !important; font-size: clamp(1.35rem, 2.1vw, 1.8rem) !important; }
.scoring-copy > p:last-child {
    margin: 14px 0 0;
    color: rgba(255,255,255,.72);
    font-size: .8rem;
    line-height: 1.7;
}
.score-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch;
}
.score-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 18px;
    border-left: 1px solid rgba(255,255,255,.18);
}
.score-item strong { color: #fff; font-size: 1.35rem; line-height: 1.1; }
.score-item span { margin-top: 8px; color: rgba(255,255,255,.68); font-size: .66rem; line-height: 1.4; }
.score-item.positive strong { color: #8fd5a6; }
.score-item.negative strong { color: #ff7a80; }

.imat-calendar {
    padding: 62px 0 66px;
    background: #fff;
}
.section-heading-row.compact { align-items: start; }

.calendar-line {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--imat-line);
    border-bottom: 1px solid var(--imat-line);
    list-style: none;
}
.calendar-line li {
    position: relative;
    min-width: 0;
    padding: 24px 20px 24px 24px;
    border-right: 1px solid var(--imat-line);
}
.calendar-line li:last-child { border-right: 0; }
.calendar-line li::before {
    content: "";
    position: absolute;
    top: -5px;
    left: 24px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--imat-red);
}
.calendar-line time {
    display: block;
    margin-bottom: 11px;
    color: var(--imat-red);
    font-size: .68rem;
    font-weight: 800;
}
.calendar-line strong {
    display: block;
    margin-bottom: 6px;
    color: var(--imat-navy);
    font-size: .76rem;
}
.calendar-line span {
    display: block;
    color: var(--imat-muted);
    font-size: .68rem;
    line-height: 1.5;
}

.application-notes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-top: 30px;
}
.application-notes article {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 12px;
    min-width: 0;
}
.application-notes article > span {
    color: var(--imat-red);
    font-size: .68rem;
    font-weight: 800;
}
.application-notes h3 {
    margin: 0 0 5px;
    color: var(--imat-navy);
    font-size: .78rem;
}
.application-notes p {
    margin: 0;
    color: var(--imat-muted);
    font-size: .7rem;
    line-height: 1.55;
}

.imat-mentor {
    padding: 64px 0;
    background: var(--imat-navy);
}
.mentor-layout {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 72px;
    align-items: start;
}
.mentor-copy h2 { color: #fff !important; }
.mentor-copy > p:not(.section-kicker) {
    margin: 16px 0 0;
    color: rgba(255,255,255,.74);
    font-size: .84rem;
    line-height: 1.75;
}
.mentor-points {
    border-top: 1px solid rgba(255,255,255,.2);
}
.mentor-points > div {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 4px 12px;
    padding: 18px 0;
    border-bottom: 1px solid rgba(255,255,255,.2);
}
.mentor-points span {
    grid-row: 1 / 3;
    color: var(--imat-red);
    font-size: .66rem;
    font-weight: 800;
}
.mentor-points h3 { margin: 0; color: #fff; font-size: .78rem; }
.mentor-points p { margin: 0; color: rgba(255,255,255,.62); font-size: .69rem; line-height: 1.55; }

.official-source-band {
    padding: 22px 0;
    border-bottom: 1px solid var(--imat-line);
    background: #fff;
}
.official-source-band .imat-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}
.official-source-band .imat-inner > span {
    color: var(--imat-muted);
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: 1.2px;
}
.source-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 24px; }
.source-links a { color: var(--imat-navy); font-size: .68rem; font-weight: 700; }
.source-links a:hover { color: var(--imat-red); }
.source-links b { color: var(--imat-red); }

.imat-current-page .related-section { padding-top: 54px; }

@media (max-width: 980px) {
    .overview-copy { grid-template-columns: 1fr; gap: 12px; }
    .overview-copy .section-kicker,
    .overview-copy h2,
    .overview-copy > p { grid-column: 1; grid-row: auto; }
    .distribution-grid { grid-template-columns: repeat(3, 1fr); }
    .distribution-item { border-bottom: 1px solid var(--imat-line); }
    .distribution-item:nth-child(3) { border-right: 0; }
    .distribution-item:nth-child(n+4) { border-bottom: 0; }
    .scoring-panel { grid-template-columns: 1fr; gap: 24px; }
    .calendar-line { grid-template-columns: repeat(3, 1fr); }
    .calendar-line li { border-bottom: 1px solid var(--imat-line); }
    .calendar-line li:nth-child(3) { border-right: 0; }
    .calendar-line li:nth-child(n+4) { border-bottom: 0; }
    .mentor-layout { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 768px) {
    .imat-current-page .hero { height: 49vh; min-height: 370px; }
    .imat-current-page .hero-content { left: 20px; right: 20px; bottom: 64px; max-width: none; }
    .imat-current-page .hero-title { font-size: 1.82rem; }
    .imat-current-page .hero-text { font-size: .79rem; line-height: 1.55; }
    .imat-current-page .hero-breadcrumb { left: 20px; }
    .imat-inner { width: calc(100% - 40px); }
    .imat-overview, .imat-format, .imat-calendar, .imat-mentor { padding: 46px 0; }
    .exam-facts { grid-template-columns: repeat(2, 1fr); }
    .fact-item:nth-child(2) { border-right: 0; }
    .fact-item:nth-child(-n+2) { border-bottom: 1px solid var(--imat-line); }
    .system-note { grid-template-columns: 1fr; gap: 10px; padding: 22px; }
    .section-heading-row { grid-template-columns: 1fr; gap: 14px; align-items: start; }
    .distribution-grid { grid-template-columns: 1fr; }
    .distribution-item,
    .distribution-item:nth-child(3) {
        display: grid;
        grid-template-columns: 42px 1fr;
        gap: 3px 10px;
        padding: 17px;
        border-right: 0;
        border-bottom: 1px solid var(--imat-line);
        border-top: 0;
        border-left: 3px solid transparent;
    }
    .distribution-item:hover { border-left-color: var(--imat-red); }
    .distribution-item:last-child { border-bottom: 0; }
    .distribution-item > span { grid-row: 1 / 3; margin: 0; font-size: 1.2rem; }
    .distribution-item h3 { min-height: 0; margin: 0; }
    .score-items { border-top: 1px solid rgba(255,255,255,.18); }
    .score-item:first-child { border-left: 0; }
    .calendar-line { grid-template-columns: 1fr; border-bottom: 0; }
    .calendar-line li,
    .calendar-line li:nth-child(3),
    .calendar-line li:nth-child(n+4) {
        padding: 20px 16px 20px 30px;
        border-right: 0;
        border-bottom: 1px solid var(--imat-line);
    }
    .calendar-line li::before { top: 24px; left: 8px; }
    .application-notes { grid-template-columns: 1fr; }
    .official-source-band .imat-inner { display: block; }
    .source-links { display: grid; justify-content: start; gap: 10px; margin-top: 14px; }
    .imat-current-page .side-buttons { display: none !important; }
}

@media (max-width: 480px) {
    .imat-current-page .hero-title { font-size: 1.58rem; }
    .imat-current-page main h2 { font-size: 1.48rem; }
    .scoring-panel { padding: 24px 20px; }
    .score-items { grid-template-columns: 1fr; }
    .score-item { border-left: 0; border-bottom: 1px solid rgba(255,255,255,.18); }
    .score-item:last-child { border-bottom: 0; }
}
