/* Copyright 2026 d7r LLC. Shared Academy Site, Page and Course shell.
 * Palette and fonts are supplied by Modern core. Keep runtime copies byte-identical.
 */
.academy-shell { --shell-gutter: 48px; color: var(--text-primary); font: 400 16px/22px var(--font-sans); }
.academy-shell *, .academy-shell *::before, .academy-shell *::after { box-sizing: border-box; }
.academy-shell [hidden] { display: none !important; }
.academy-shell :where(.academy-shell__header a, .academy-shell__footer a) { text-decoration: none; color: inherit; }
.academy-shell :where(.academy-shell__header button, .academy-shell__footer button) { font: inherit; color: inherit; cursor: pointer; }
.academy-shell :where(.academy-shell__header, .academy-shell__footer, .academy-shell__skip) :where(a, button, summary):focus-visible, .academy-shell__skip:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 4px; }
.academy-shell #section-header { display: contents; }
.academy-shell__container { width: min(1280px, calc(100% - 2 * var(--shell-gutter))); min-width: 0; margin-inline: auto; }
.academy-shell__skip { position: fixed; z-index: 100; left: 20px; top: 10px; padding: 12px 20px; background: var(--surface-card); transform: translateY(-180%); }
.academy-shell__skip:focus { transform: none; }
.academy-shell__announcement { display: flex; align-items: center; justify-content: center; min-height: 38px; padding: 7px 20px; background: var(--orchid); color: var(--text-primary); text-align: center; font: 400 13px/18px var(--font-sans); }
.academy-shell__announcement p { margin: 0; font: inherit; color: inherit; }
.academy-shell__header { position: sticky; z-index: 80; top: 0; background: var(--surface-page); border-bottom: 1px solid var(--border); }
.academy-shell__header-row { display: flex; align-items: center; justify-content: space-between; min-height: 80px; gap: 20px; }
.academy-shell__brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; min-height: 48px; flex: none; }
.academy-shell__mark { display: block; width: 28px; height: 28px; flex: 0 0 28px; }
.academy-shell__mark svg { display: block; width: 28px; height: 28px; }
.academy-shell__logo-image { display: block; width: auto; max-width: 220px; max-height: 28px; object-fit: contain; }
.academy-shell__brand-copy { display: grid; gap: 1px; }
.academy-shell__brand-copy strong { color: inherit; font: 500 18px/20px var(--font-sans); letter-spacing: -.025em; }
.academy-shell__brand-copy small { color: var(--text-muted); font: 400 11px/16px var(--font-sans); letter-spacing: 0; }
.academy-shell__panel { display: flex; align-items: center; gap: 20px; min-width: 0; }
.academy-shell__nav ul { display: flex; align-items: center; gap: 20px; padding: 0; margin: 0; list-style: none; }
.academy-shell .academy-shell__nav li, .academy-shell .academy-shell__footer-column li { margin: 0; padding: 0; list-style: none; }
.academy-shell__nav a { display: inline-flex; align-items: center; min-height: 44px; border-bottom: 2px solid transparent; font: 500 14px/20px var(--font-sans); white-space: nowrap; }
.academy-shell__nav a:hover, .academy-shell__nav a[aria-current="page"] { color: var(--signal-text); border-bottom-color: var(--signal-text); }
.academy-shell__actions { display: flex; align-items: center; gap: 10px; }
.academy-shell .academy-shell__actions :is(.academy-btn, .btn) { box-sizing: border-box; min-height: 48px; padding: 12px 22px; font: 500 16px/22px var(--font-sans); border-radius: 999px; }
.academy-shell .academy-shell__actions .academy-btn-outline { border-color: var(--border-strong); background: transparent; }
.academy-shell__action, .academy-shell__login > a { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; border: 1px solid var(--border-strong); padding: 12px 22px; border-radius: 999px; background: transparent; font: 500 16px/22px var(--font-sans); white-space: nowrap; }
.academy-shell__action:hover, .academy-shell__icon:hover, .academy-shell__toggle:hover { background: var(--surface-alt); }
.academy-shell__action--primary { color: var(--text-on-chrome); background: var(--action-marketing); border-color: var(--action-marketing); }
.academy-shell__action--primary:hover { color: var(--text-on-chrome); background: var(--text-primary); border-color: var(--text-primary); }
.academy-shell__icon, .academy-shell__toggle { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; flex: 0 0 48px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface-card); padding: 0; }
.academy-shell__icon svg, .academy-shell__toggle svg { width: 22px; height: 22px; }
.academy-shell__toggle { display: none; }
.academy-shell__toggle [data-shell-close-icon] { display: none; }
.academy-shell__toggle[aria-expanded="true"] [data-shell-open-icon] { display: none; }
.academy-shell__toggle[aria-expanded="true"] [data-shell-close-icon] { display: block; }
.academy-shell__backdrop { position: fixed; z-index: 79; inset: var(--academy-shell-bottom, 118px) 0 0; background: color-mix(in srgb, var(--surface-chrome) 24%, transparent); }
.academy-shell__account { position: relative; }
.academy-shell__account-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 48px; min-height: 48px; border: 1px solid var(--border); border-radius: 999px; padding: 5px 10px 5px 5px; background: var(--surface-card); }
.academy-shell__avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; background: var(--surface-accent-soft); color: var(--signal-text); font: 500 13px/18px var(--font-sans); object-fit: cover; }
.academy-shell__account-toggle svg { width: 16px; height: 16px; }
.academy-shell__account-panel { position: absolute; z-index: 2; right: 0; top: calc(100% + 8px); width: 240px; max-width: calc(100vw - 40px); padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-card); box-shadow: 0 12px 32px color-mix(in srgb, var(--surface-chrome) 8%, transparent); }
.academy-shell__account-panel a { display: flex; align-items: center; min-height: 44px; padding: 10px 12px; border-radius: 8px; font: 400 14px/20px var(--font-sans); }
.academy-shell__account-panel a:hover { background: var(--surface-alt); }
.academy-shell:not([data-shell-ready]) .academy-shell__account-toggle { display: none; }
.academy-shell:not([data-shell-ready]) .academy-shell__account-panel { position: static; margin: 0; }
.academy-shell__footer { padding: 70px 0 28px; background: var(--surface-chrome); color: var(--text-secondary-on-chrome); }
.academy-shell__footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(120px, .55fr)); gap: 44px; margin-bottom: 60px; }
.academy-shell__footer-brand .academy-shell__brand { color: var(--text-on-chrome); }
.academy-shell__footer-brand .academy-shell__brand-copy small { color: var(--text-muted-on-chrome); }
.academy-shell__footer-brand p { max-width: 390px; margin: 19px 0 0; color: var(--text-muted-on-chrome); font: 400 14px/24px var(--font-sans); }
.academy-shell .academy-shell__footer-column h2 { margin: 0 0 17px; color: var(--text-on-chrome); font: 500 14px/20px var(--font-sans); letter-spacing: 0; }
.academy-shell__footer-column ul { padding: 0; margin: 0; list-style: none; }
.academy-shell__footer-column a { display: flex; align-items: center; min-height: 44px; padding-block: 8px; font: 400 14px/20px var(--font-sans); overflow-wrap: anywhere; }
.academy-shell__footer-column a:hover { color: var(--text-on-chrome); text-decoration: underline; text-underline-offset: 4px; }
.academy-shell__footer-bottom { margin: 0; padding-top: 24px; border-top: 1px solid var(--border-on-chrome); color: var(--text-muted-on-chrome); font: 400 12px/18px var(--font-sans); }
.academy-shell__powered-by { margin-top: 16px; color: var(--text-muted-on-chrome); font: 400 12px/18px var(--font-sans); }
.academy-shell__powered-by a { display: inline-flex; align-items: center; min-height: 44px; }
.academy-shell__footer :focus-visible { outline-color: var(--orchid); }
@media (max-width: 1120px) {
  .academy-shell__header-row { flex-wrap: wrap; }
  .academy-shell__brand { flex: 1 1 auto; }
  .academy-shell__panel { width: 100%; display: grid; gap: 20px; padding: 0 0 24px; }
  .academy-shell__nav ul { display: grid; gap: 0; }
  .academy-shell__nav li { border-bottom: 1px solid var(--border); }
  .academy-shell__nav a { display: flex; min-height: 52px; border: 0; white-space: normal; }
  .academy-shell__actions { flex-wrap: wrap; }
  .academy-shell[data-shell-ready] .academy-shell__toggle { display: inline-flex; }
  .academy-shell[data-shell-ready] .academy-shell__panel { position: fixed; top: var(--academy-shell-bottom, 118px); left: 0; right: 0; width: auto; max-height: calc(100dvh - var(--academy-shell-bottom, 118px)); overflow: auto; overscroll-behavior: contain; padding: 16px var(--shell-gutter) 24px; border-bottom: 1px solid var(--border); background: var(--surface-page); box-shadow: 0 12px 32px color-mix(in srgb, var(--surface-chrome) 8%, transparent); }
  .academy-shell__account-panel { position: static; margin-top: 8px; }
  .academy-shell__footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
  .academy-shell__footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 991px) { .academy-shell { --shell-gutter: 24px; } }
@media (max-width: 767px) {
  .academy-shell__header-row { gap: 12px; min-height: 68px; }
  .academy-shell__brand-copy strong { font-size: 16px; }
  .academy-shell__footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .academy-shell__footer { padding-top: 48px; }
}
@media (max-width: 660px) { .academy-shell { --shell-gutter: 20px; } }
@media (prefers-reduced-motion: reduce) { .academy-shell { scroll-behavior: auto; } }
@media print { .academy-shell__header { position: static; } .academy-shell__toggle, .academy-shell__panel, .academy-shell__backdrop, .academy-shell__skip { display: none !important; } }
