/* Colors from the three strands of the CIT Human Compass. */
html {
    --home-ink: #0d1b3f;
    --home-blue: #254e95;
    --home-coral: #a04025;
    --home-teal: #12685f;
    --home-line: #ced7e3;
    --home-width: 1040px;
    --home-header-height: 65px;
    --home-tabs-height: 51px;
    scroll-padding-top: calc(var(--home-header-height) + var(--home-tabs-height) + 12px);
}

/* The points along the line correspond to the five destinations, in reading order. */
.home-sections {
    position: sticky;
    top: var(--home-header-height);
    z-index: 8;
    background: var(--home-ink);
    color: #f4f7ff;
    border-bottom: 1px solid #314266;
}
.home-sections__links {
    display: flex;
    max-width: var(--home-width);
    margin-inline: auto;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
}
.home-sections a {
    --point: #94b8ff;
    --track: #7184a5;
    position: relative;
    display: grid;
    flex: 1 0 auto;
    place-items: center;
    min-height: 50px;
    padding: 18px 6px 5px;
    color: #e6edf8;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.25;
    white-space: nowrap;
    text-decoration: none;
}
.home-sections a:nth-child(2) { --point: #ff9c79; }
.home-sections a:nth-child(3) { --point: #66d2c1; }
.home-sections a:nth-child(4) { --point: #b9a9fc; }
.home-sections a:nth-child(5) { --point: #ffdf90; }
.home-sections a::before {
    content: "";
    position: absolute;
    inset: 13px 0 auto;
    height: 1px;
    background: var(--track);
}
.home-sections a:first-child::before { left: 50%; }
.home-sections a:last-child::before { right: 50%; }
.home-sections a::after {
    content: "";
    position: absolute;
    top: 10px;
    left: 50%;
    width: 7px;
    height: 7px;
    border: 1.5px solid var(--point);
    border-radius: 50%;
    background: var(--home-ink);
    transform: translateX(-50%);
}
.home-sections a:hover, .home-sections a:focus-visible { background: #1a3058; color: #fff; }
.home-sections a[aria-current="location"] { color: var(--point); }
.home-sections a[aria-current="location"]::after {
    border-radius: 1px;
    background: var(--point);
    transform: translateX(-50%) rotate(45deg) scale(1.3);
}
.home-sections a:focus-visible { outline: 2px solid var(--point); outline-offset: -3px; }
.home-sections__short { display: none; }
#navBarContainer:has(.cit-nav-static) { height: auto; }
html:has(.cit-nav-static) { --home-header-height: 0px; }
#navBarContainer:has(.sticky-header) { height: var(--home-header-height); }

/* An exam code and its syllabus name read across a single row. */
.study-routes {
    width: min(var(--home-width), calc(100% - 40px));
    margin-inline: auto;
    color: var(--home-ink);
}
.study-row {
    --topic: var(--home-blue);
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.15fr);
    align-items: start;
    gap: clamp(24px, 5vw, 72px);
    padding-block: clamp(28px, 3.5vw, 48px);
}
.study-row + .study-row { border-top: 1px solid var(--home-line); }
.study-row[aria-labelledby="ap-ib-subjects"] { --topic: var(--home-teal); }
.study-row[aria-labelledby="competition-prep"] { --topic: var(--home-coral); }
.study-intro h2 {
    margin: 0;
    color: var(--home-ink);
    font-size: clamp(24px, 2.7vw, 38px);
    font-weight: 800;
    line-height: 1.17;
    letter-spacing: -0.035em;
    text-wrap: balance;
}
.study-intro h2 span { white-space: nowrap; }
.study-intro p { margin: 12px 0 0; color: #3d4c64; font-size: 15px; line-height: 1.6; }
.study-more {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 14px;
    row-gap: 3px;
}
.study-intro .study-more { margin-top: 15px; font-size: 14px; }
.study-more > span { display: none; }
.study-more a, .study-subjects a {
    color: var(--topic);
    font-weight: 650;
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, var(--topic) 50%, white);
    text-underline-offset: 4px;
}
.study-more a { padding-block: 3px; }
.study-routes a:hover { text-decoration-color: currentColor; }
.study-options { margin: 0; padding: 0; list-style: none; border-block: 2px solid var(--topic); }
.study-options li + li { border-top: 1px solid var(--home-line); }
.study-options a {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 12px;
    padding: 10px 6px;
    color: var(--home-ink);
    font-size: 17px;
    font-weight: 750;
    line-height: 1.3;
    text-decoration: none;
}
.study-options a::after {
    content: "";
    width: 7px;
    height: 7px;
    border: solid var(--topic);
    border-width: 1.5px 1.5px 0 0;
    transform: rotate(45deg);
    margin-right: 4px;
    grid-column: -2;
    grid-row: 1 / span 2;
}
.study-options a:hover, .study-options a:focus-visible { background: #f1f5f9; }
.study-options a > span:not(.study-detail), .study-detail > span {
    display: block;
    color: #465670;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.45;
}
.study-detail b { display: block; }
.study-code {
    grid-row: 1;
    color: var(--topic);
    font: 700 14px/1.2 ui-monospace, monospace;
    letter-spacing: -0.02em;
}
.study-row[aria-labelledby="exam-prep"] .study-options a {
    grid-template-columns: 6ch minmax(0,1fr) auto;
    min-height: 60px;
}
.study-row[aria-labelledby="exam-prep"] .study-options a::after { grid-row: 1; }
.study-subjects { margin: 0; border-block: 2px solid var(--topic); }
.study-subjects > div { padding-block: 12px; }
.study-subjects > div + div { border-top: 1px solid var(--home-line); }
.study-subjects dt { margin: 0 0 5px; color: var(--topic); font-size: 15px; font-weight: 750; }
.study-subjects dd { display: flex; flex-wrap: wrap; gap: 2px 16px; margin: 0; }
.study-subjects a { color: var(--home-ink); padding-block: 4px; font-size: 14px; }
.study-routes a:focus-visible, .gmc-example summary:focus-visible,
.home-hero-en a:focus-visible { outline: 3px solid #6189df; outline-offset: 3px; }

/* The Korean figure stays in its original dark palette; the English edition
   features an actual student's statistical poster and its original map. */
html:lang(ko) .hp-hero h1 { font-size: clamp(31px, 3.3vw, 46px); line-height: 1.14; text-wrap: balance; }
.hp-hero h1 span { display: inline-block; }
.hp-hero .o2o-chip { border: 0; border-top: 1px solid #657394; border-radius: 0; background: transparent; padding: 12px 0 0; }
html:lang(en) header.site .wrap, html:lang(en) .strip .wrap,
html:lang(en) .block > .wrap, html:lang(en) footer.site .wrap {
    max-width: calc(var(--home-width) + 48px);
}
header.site .brand { display: flex; align-items: center; gap: 10px; }
header.site .brand img { width: 78px; height: auto; }
header.site .brand small { color: #35415c; font: 600 13px/1.25 'DM Sans', sans-serif; max-width: 14ch; }
.home-hero-en {
    padding: clamp(32px, 4vw, 60px) 0;
    color: #fff;
    background: var(--home-ink);
}
.home-hero-en .wrap {
    display: grid;
    grid-template-columns: 1.08fr 1fr;
    align-items: center;
    gap: 0 clamp(28px, 4vw, 64px);
    max-width: calc(var(--home-width) + 48px);
}
.home-hero-en h1 {
    color: #fff;
    font-size: clamp(36px, 3.8vw, 55px);
    line-height: 1.04;
    letter-spacing: -.035em;
    text-wrap: balance;
}
.home-hero-en h1 span { display: block; color: #a8c9ff; }
.home-hero-en .lede { color: #d8e3f6; font-size: 16px; line-height: 1.55; }
.home-hero-en .hero-actions { gap: 8px 14px; margin-top: 20px; align-items: center; }
.home-hero-en .hero-primary { color: var(--home-ink); background: #edf4ff; border-radius: 6px; padding: 10px 15px; }
.home-hero-en .hero-primary:hover { background: #cddaef; }
.home-hero-en .hero-secondary { color: white; border: 0; padding: 9px 0; text-decoration: underline; text-underline-offset: 4px; }
.home-hero-en .o2o-chip { color: #d8e3f6; background: transparent; border: 0; border-top: 1px solid #536384; border-radius: 0; padding: 10px 0 0; }
.home-hero-en .o2o-chip b { color: white; }
.home-research { grid-area: 1 / 2 / span 2 / 3; position: relative; min-width: 0; margin: 0; }
.home-research img { display: block; width: 100%; height: auto; }
.home-research figcaption { margin-top: 12px; color: #d8e3f6; line-height: 1.4; }
.home-research strong { display: block; margin-bottom: 4px; font-size: 18px; font-weight: 700; color: white; }
.home-research figcaption span { font-size: 13px; }
.home-research figcaption a { color: #a8c9ff; white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }
.home-research figcaption a::after { content: ""; position: absolute; inset: 0; }
.home-research:focus-within { outline: 3px solid #a8c9ff; outline-offset: 5px; }
.home-research:hover figcaption a { color: #fff; }

#programs .hp-head { margin-inline: 0; text-align: start; }
#programs .hp-matrixwrap { box-shadow: none; border-radius: 0; border-width: 2px 0 1px; border-top-color: var(--home-teal); }
:is(#programs-title, #approach-title, #enrollment) { text-wrap: balance; }
h2.sec:is(#programs-title, #approach-title) { font-size: clamp(26px, 3vw, 36px); line-height: 1.15; letter-spacing: -.03em; }
.about-grid.home-programs {
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 0 22px;
    border-top: 2px solid var(--home-teal);
}
.home-programs a.cell {
    display: block;
    padding: 15px 0;
    background: #fff;
    border: 0;
    border-bottom: 1px solid var(--home-line);
    border-radius: 0;
}
.home-programs a.cell:first-child { grid-row: span 2; padding: 20px; background: #e8f4f0; }
.home-programs a.cell:first-child h3 { color: #12564e; font-size: clamp(19px, 2vw, 24px); line-height: 1.25; }
.home-programs .cell h3 { margin-bottom: 5px; }
.home-programs .cell:hover h3, .home-programs .cell:focus-visible h3 { text-decoration: underline; text-underline-offset: 3px; }
.home-programs a:focus-visible { outline: 3px solid var(--home-teal); outline-offset: -3px; }


@media (min-width: 960px) {
    #main-content .hp-split__aside { top: calc(var(--home-header-height) + var(--home-tabs-height) + 16px); }
}
@media (max-width: 760px) {
    .study-row, .home-hero-en .wrap { grid-template-columns: minmax(0,1fr); }
    .study-row { gap: 17px; padding-block: 24px; }
    .home-hero-en .wrap { gap: 18px; }
    .home-hero-en .o2o-chip { margin: 0; }
    .about-grid.home-programs { grid-template-columns: minmax(0,1fr); }
    .home-programs a.cell:first-child { grid-row: auto; }
    .home-hero-en h1 { font-size: clamp(34px, 6.8vw, 44px); }
    .home-research { grid-area: auto; max-width: 500px; }
}
@media (min-width: 641px) and (max-width: 850px) {
    header.site .brand small { display: none; }
    header.site nav.top { gap: 12px; }
}
@media (max-width: 640px) {
    .home-sections__full { display: none; }
    .home-sections__short { display: inline; }
    .home-sections a { padding-inline: 4px; font-size: 13px; }
    .study-options a { font-size: 16px; }
}
@media (max-width: 470px) {
    header.site .brand small { display: none; }
    header.site nav.top .cta-pill { white-space: nowrap; }
    .home-hero-en h1 { font-size: clamp(30px, 8.2vw, 37px); }
}
@media (max-width: 380px) {
    .study-routes { width: calc(100% - 32px); }
    .study-row[aria-labelledby="exam-prep"] .study-options a { grid-template-columns: 6ch minmax(0,1fr) auto; column-gap: 7px; }
}
@media (forced-colors: active) {
    .home-sections a[aria-current="location"] { text-decoration: underline; }
}
@media print {
    .home-sections { display: none; }
}
