/* Academy is a website page; keep its layout and reader styles locally scoped. */
.academy-page {
    --academy-ink: #16132d;
    --academy-muted: #555;
    --academy-line: #dedfe8;
    color: var(--academy-ink);
    line-height: 1.7;
    overflow-wrap: anywhere;
}
.academy-page *, .academy-reader-dialog * { box-sizing: border-box; }
.academy-section {
    width: min(1120px, calc(100% - 3rem));
    margin-inline: auto;
    padding-block: clamp(2.75rem, 6vw, 5rem);
    scroll-margin-top: calc(var(--nav-h) + 1rem);
}
.academy-page h3 { margin: 0; color: #000; font-size: var(--fs-500); font-weight: 700; line-height: 1.25; }
.academy-page p { margin: 1rem 0 0; }
.academy-page .academy-eyebrow { margin: 0 0 .4rem; font-size: var(--fs-400); font-weight: 700; line-height: 1.75; letter-spacing: .04em; text-transform: uppercase; color: var(--webpage-main-color); }
.academy-section-intro { max-width: 720px; margin-bottom: 2.5rem; }
.academy-hero { padding-block: clamp(2.5rem, 5vw, 4rem) 1rem; }
.academy-hero .academy-lead { max-width: 720px; color: #555; font-size: var(--font-base); line-height: 1.75; margin-top: 1.5rem; }
.academy-program { list-style: none; margin: 0; padding: 0; }
.academy-module { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 2rem; padding-block: 2rem; border-top: 1px solid var(--academy-line); }
.academy-module:last-child { border-bottom: 1px solid var(--academy-line); }
.academy-module-number { color: var(--webpage-main-color); font-weight: 700; font-size: 1.4rem; line-height: 1.2; }
.academy-module p { margin-top: .7rem; max-width: 720px; }
.academy-extras { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.academy-extra { padding: 1.65rem; background: #fff; border: 1px solid #e3e4ed; border-radius: 16px; }
.academy-page :is(a, button, [tabindex]):focus-visible, .academy-reader-dialog :is(a, button, [tabindex]):focus-visible { outline: 3px solid #4857ab; outline-offset: 4px; }
.academy-skip { position: fixed; top: -200px; left: 1rem; z-index: 10002; background: white; color: #16132d; padding: 1rem; }
.academy-skip:focus { top: .5rem; }

.academy-section-intro > p:last-child, .academy-module p, .academy-extra p { color: var(--academy-muted); font-size: var(--font-base); line-height: 1.75; }
#academy-brochure { padding-top: 1.25rem; }
.academy-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* The same reader moves into a native dialog when expanded. */
.academy-reader, .academy-reader-dialog { color: #16132d; font-family: 'Prompt', sans-serif; line-height: 1.5; }
.academy-reader { border: 1px solid #dedfe8; border-radius: 12px; padding: 8px 8px 0; overflow: hidden; background: #fff; }
.academy-reader [hidden] { display: none !important; }
.academy-reader button { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-width: 36px; min-height: 36px; border: 1px solid transparent; border-radius: 6px; padding: .35rem .55rem; background: transparent; color: inherit; font: 400 .75rem/1.4 'Prompt', sans-serif; cursor: pointer; user-select: none; touch-action: manipulation; transition: background-color .15s ease; }
.academy-reader button:hover:not(:disabled) { background: #ffffff20; }
.academy-reader button:active:not(:disabled) { background: #ffffff30; }
.academy-reader button:disabled { color: #8e929a; cursor: default; }
.academy-reader button svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.academy-reader-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem .5rem; margin-inline: -8px; padding: .25rem .5rem; flex-shrink: 0; color: #f5f6f8; background: rgb(28 30 35 / .95); }
.academy-page .academy-reader-toolbar button:focus-visible,
.academy-reader-dialog .academy-reader-toolbar button:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }
.academy-reader-page-controls { display: flex; gap: .15rem; align-items: center; }
.academy-reader-page-controls span[data-reader-counter] { min-width: 92px; text-align: center; color: #e3e5e9; font-size: .75rem; font-variant-numeric: tabular-nums; }
.academy-reader-viewport { width: 100%; height: min(70vh, 780px); max-height: calc((100vw - 2.5rem) * .8); min-height: 200px; overflow: auto; scrollbar-width: none; background: transparent; position: relative; }
.academy-reader-viewport::-webkit-scrollbar { display: none; }
.academy-reader-viewport:focus-visible { outline-offset: -4px !important; }
.academy-reader-dialog { padding: 0; border: 0; border-radius: 16px; width: min(1500px, calc(100vw - 2rem)); height: calc(100vh - 2rem); height: calc(100dvh - 2rem); max-width: none; max-height: none; margin: auto; }
.academy-reader-dialog::backdrop { background: #111020b3; }
.academy-reader-dialog .academy-reader { height: 100%; display: flex; flex-direction: column; border: 0; }
.academy-reader-dialog .academy-reader-viewport { flex: 1; min-height: 0; height: auto; max-height: none; }
.academy-reader-dialog [data-reader-expand] { display: none; }
html.academy-reader-expanded { overflow: hidden; }

.academy-reader-document { width: 100%; }
.academy-reader-sheet { position: relative; margin: 0 0 .75rem; aspect-ratio: 1600 / 1133; background: #fff; }
.academy-reader-sheet:last-child { margin-bottom: 0; }
.academy-reader-sheet img { display: block; width: 100%; max-width: none; height: auto; }
.academy-reader-error { position: absolute; inset: 0 auto auto 0; width: min(100%, 32rem); padding: 1.5rem; background: #fff; }
.academy-reader-error p { margin: 0 0 1rem; }
.academy-reader-error a { color: #4857ab; }
.academy-reader-error button { border-color: #dcdde7; color: #4857ab; }
.academy-reader-error button:hover { background: #eef0fa; }
@media (max-width: 960px) {
    .academy-extras { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .academy-module { gap: 1.25rem; }
}
@media (max-width: 700px) {
    .academy-section { width: calc(100% - 2.5rem); }
    .academy-module { grid-template-columns: 32px minmax(0, 1fr); }
    .academy-extras { grid-template-columns: 1fr; }
    .academy-extra { padding: 1.5rem; }
    .academy-reader-action-label { display: none; }
    .academy-reader-dialog { width: calc(100vw - 1rem); height: calc(100vh - 1rem); height: calc(100dvh - 1rem); }
}
@media (prefers-reduced-motion: reduce) {
    .academy-page *, .academy-reader-dialog * { scroll-behavior: auto !important; transition: none !important; }
}
