.study-shell {
    --study-ink: #0d192e;
    --study-line: #d8dee7;
    --study-bg: #f8f9fb;
    --study-soft: #fff2f2;
    --red: #b70815;
    --red-dark: #940b16;
    --study-rail-width: 15.5rem;
    --study-bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px));
    padding-bottom: var(--study-bottom);
    background: var(--study-bg);
    color: var(--study-ink);
    min-height: 100vh;
}
.study-shell h1, .study-shell h2, .study-shell h3, .study-brand { font-family: Inter, "Segoe UI", sans-serif; }
.study-shell .main { padding-block: clamp(1.2rem, 3.3vw, 2.8rem); min-height: 72vh; }
.study-shell .footer { border-color: var(--study-line); }
.study-heading { margin-bottom: 1.3rem; }
.study-heading h1 { font-size: clamp(1.8rem, 4.5vw, 3rem); font-weight: 820; }
.study-heading p { color: #526071; }
.study-heading p + h1, .back + .study-heading { margin-top: .55rem; }
.study-brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--study-ink); font-size: 1.45rem; letter-spacing: -.04em; font-weight: 820; }
.study-brand span { color: var(--red); font-style: italic; font-size: 1.7rem; font-weight: 900; line-height: 1; }
.study-brand:hover { color: var(--study-ink); }
.study-mobile-header { background: white; min-height: 60px; display: flex; align-items: center; justify-content: space-between; padding: .35rem max(14px, calc((100% - 1180px) / 2)); border-bottom: 1px solid var(--study-line); }
.study-profile { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .65rem; color: var(--study-ink); text-decoration: none; font-weight: 700; border-radius: 8px; }
.study-profile:hover, .study-profile[aria-current] { background: var(--study-soft); color: var(--red-dark); }
.study-desktop-only { display: none; }
.study-rail { position: fixed; z-index: 2; inset: auto 0 0; background: white; border-top: 1px solid var(--study-line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.study-tabs { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 38rem; margin-inline: auto; }
.study-tabs a { display: flex; gap: .18rem; min-height: 4.2rem; align-items: center; justify-content: center; flex-direction: column; font-size: .89rem; font-weight: 700; color: var(--study-ink); text-decoration: none; }
.study-tabs a:hover, .study-tabs a[aria-current] { color: var(--red); background: var(--study-soft); }
.study-tabs a:focus-visible { outline-offset: -3px; }
.study-switch { margin-top: .85rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: min(100%, 27rem); padding: .22rem; background: #f1f3f6; border: 1px solid var(--study-line); border-radius: .85rem; gap: .25rem; }
.study-switch a { min-height: 44px; display: grid; place-content: center; text-align: center; color: var(--study-ink); font-weight: 750; text-decoration: none; padding-inline: .25rem; border-radius: .65rem; }
.study-switch a:hover { background: white; }
.study-switch a[aria-current] { background: var(--red); color: white; }
.study-overview { display: grid; grid-template-areas: "hero" "modules" "summary"; gap: 1rem; }
.study-hero {
    grid-area: hero;
    min-width: 0;
    min-height: 13rem;
    padding: clamp(1.1rem, 3vw, 2rem);
    display: grid;
    align-items: center;
    border-radius: 1rem;
    color: white;
    background: linear-gradient(90deg,#0d2038 6%,#10243aeb 50%,#10243a26), #0d2038 url('campus-hero.webp') 75% 43% / cover no-repeat;
}
.study-hero h2 { font-size: clamp(1.3rem, 3vw, 2.05rem); margin-top: .2rem; max-width: 24ch; }
.study-hero p { color: #eaf0f6; max-width: 35ch; }
.study-hero .button { margin-top: .9rem; }
.study-modules { grid-area: modules; min-width: 0; }
.study-modules h2 { margin-bottom: .65rem; }
.study-module {
    background: #fff;
    border: 1px solid var(--study-line);
    border-radius: .85rem;
    margin-bottom: .55rem;
}
.study-module summary { display: flex; align-items: center; justify-content: space-between; padding: .7rem .85rem; gap: .65rem; cursor: pointer; list-style: none; }
.study-module summary::-webkit-details-marker { display: none; }
.study-module summary > svg { flex: none; width: 1.1rem; transition: transform .12s ease-out; }
.study-module[open] summary > svg { transform: rotate(90deg); }
.study-module summary > span { display: grid; flex: 1; gap: .12rem; min-width: 0; }
.study-module summary strong { overflow-wrap: anywhere; }
.study-module summary small { display: flex; align-items: center; gap: .35rem; }
.study-module progress { margin-block: .3rem .1rem; }
.study-links { padding: 0 .85rem .65rem; list-style: none; margin: 0; }
.study-links li { display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .55rem; border-top: 1px solid var(--study-line); }
.study-links li a { padding-block: .55rem; overflow-wrap: anywhere; }
.study-links li span { color: var(--green); font-size: .825rem; }
.study-summary { grid-area: summary; }
.study-summary, .study-stack { display: grid; gap: .8rem; align-content: start; }
.study-card { min-width: 0; background: #fff; border: 1px solid var(--study-line); border-radius: .9rem; margin: 0; padding: clamp(.9rem, 2vw, 1.4rem); }
.study-card > .button { margin-top: .75rem; }
.study-overview-quiz { display: none; }
.study-percent { display: block; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; letter-spacing: -.035em; margin-top: .4rem; }
.study-success { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem .45rem; color: var(--green); font-weight: 730; }
.study-success svg { width: 1.25rem; height: 1.25rem; }
.study-retry { color: #85252b; font-weight: 740; }
.study-score { display: block; color: var(--green); font-size: 1.35rem; margin-top: .3rem; }
.study-shell progress { display: block; appearance: none; width: 100%; max-width: none; height: .55rem; background: #e6e9ee; border: 0; border-radius: 20px; overflow: hidden; }
.study-module summary progress { width: min(20rem, 85%); }
.study-shell progress::-webkit-progress-bar { background: #e6e9ee; }
.study-shell progress::-webkit-progress-value { background: var(--red); border-radius: 20px; }
.study-shell progress::-moz-progress-bar { background: var(--red); border-radius: 20px; }
.study-two { display: grid; gap: .9rem; align-items: start; }
.study-reading { max-width: 48rem; }
.study-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.study-question legend { padding-inline: .3rem; font-weight: 750; max-width: 100%; overflow-wrap: anywhere; }
.study-question label { display: flex; gap: .65rem; align-items: baseline; min-height: 44px; padding: .5rem; margin-top: .25rem; border-radius: .5rem; cursor: pointer; overflow-wrap: anywhere; }
.study-question label:has(input:checked) { background: var(--study-soft); }
.study-question input[type="radio"] { width: 1.1rem; height: 1.1rem; margin: 0; flex: none; accent-color: var(--red); }
@media (min-width: 40rem) {
    .study-overview { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); grid-template-areas: "hero hero" "modules summary"; align-items: start; }
    .study-hero { background-position: 75% 10%; }
    .study-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 68rem) {
    .study-shell { padding: 0 0 0 var(--study-rail-width); }
    .study-mobile-header { display: none; }
    .study-desktop-only { display: inline-flex; }
    .study-rail { inset: 0 auto 0 0; width: var(--study-rail-width); border: 0; border-right: 1px solid var(--study-line); padding: 1.4rem 1rem .9rem; display: flex; flex-direction: column; gap: 1.35rem; overflow-y: auto; }
    .study-rail .study-profile { margin-top: auto; justify-content: start; padding-inline: .65rem; }
    .study-tabs { display: grid; grid-template-columns: 1fr; gap: .3rem; margin: 0; }
    .study-tabs a { flex-direction: row; justify-content: start; gap: .7rem; min-height: 48px; padding-inline: .65rem; border-radius: .65rem; font-size: 1rem; }
    .study-overview { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "hero summary" "modules summary"; }
    .study-overview-quiz { display: block; }
}
