/* Course shell. Scoped so it does not restyle the site header. */
.academy {
  --surface: var(--paper);
  --accent: var(--focus);
  --gold: var(--l2);
  --gold-ink: var(--ink);
  --tint: #EFECFD;
  --good: #1F7A4D;
  --warn-bg: #FBEBD0;
  --warn-ink: #7A2E0B;
  --code-bg: var(--ink);
  --code-ink: var(--ground);
  --font-display: var(--display);
  --font-body: var(--sans);
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  padding-top: 28px;
  padding-bottom: 72px;
}
.academy a { color: var(--focus); }
.academy .shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: start; }
.academy .side { position: sticky; top: 92px; display: grid; gap: 4px; padding-top: 4px; }
.academy .side a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; min-height: 44px; }
.academy .side a:hover { background: var(--tint); color: var(--ink); }
.academy .side a[aria-current="page"] { background: var(--tint); color: var(--focus); }
.academy .side svg { width: 22px; height: 22px; flex: none; }
.academy .side .sep { height: 1px; background: var(--line); margin-block: 10px; }
.academy .side .note { font-size: 13px; color: var(--muted); padding: 0 14px; line-height: 1.45; }
.academy #main { min-width: 0; display: grid; gap: 28px; }
.academy h2 { font-size: clamp(28px, 3vw, 36px); letter-spacing: -0.03em; text-wrap: balance; }
.academy h3 { font-size: 20px; text-wrap: balance; }
.academy .lead { margin-top: 0; font-size: 18px; line-height: 1.55; color: var(--body); max-width: 62ch; }
.academy .kicker { font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--l3); }

.academy .stage { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 40px; align-items: center; border-radius: 16px; padding: 48px; }
.academy .stage h1 { font-weight: 700; font-size: clamp(40px, 4.6vw, 68px); line-height: 0.98; letter-spacing: -0.04em; color: inherit; text-wrap: balance; }
.academy .stage .lead { color: var(--navy-text); font-size: 18px; max-width: 36ch; }
.academy .stage-copy { display: grid; gap: 18px; }
.academy .pills { display: flex; flex-wrap: wrap; gap: 8px; }
.academy .stage .pills span { font-family: var(--font-mono); font-size: 12px; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,0.1); color: inherit; }
.academy .btns { display: flex; flex-wrap: wrap; gap: 12px; }
.academy .btn.sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
.academy .brief-rail { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.academy .brief-rail div { background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; padding: 14px 12px; display: grid; gap: 6px; justify-items: start; }
.academy .brief-rail b { width: 36px; height: 36px; border-radius: 8px; background: var(--l2); color: var(--on-accent); display: grid; place-items: center; font-family: var(--display); font-size: 20px; }
.academy .brief-rail span { font-weight: 600; font-size: 14px; }

.academy .vid { background: var(--paper); border: 2px solid var(--ink); border-radius: 16px; padding: 22px; box-shadow: 10px 10px 0 var(--l1); display: grid; gap: 14px; }
.academy .vid video { width: 100%; display: block; border-radius: 8px; background: var(--ink); aspect-ratio: 16 / 9; }

.academy .sectionhead { display: grid; gap: 8px; }
.academy .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.academy .card { background: var(--paper); border: 2px solid var(--ink); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.academy .card:hover { transform: translate(-4px, -4px); box-shadow: 8px 8px 0 var(--ink); }
.academy .shot { margin: 0; aspect-ratio: 16 / 10; overflow: hidden; position: relative; background: var(--brand-slate); }
.academy .shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.academy .card:hover .shot img { transform: scale(1.06); }
.academy .shot::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--c, var(--l2)); }
.academy .card .body { padding: 18px 18px 8px; display: grid; gap: 8px; align-content: start; flex: 1; }
.academy .tag { font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--focus); }
.academy .card p { color: var(--body); font-size: 15px; line-height: 1.5; }
.academy .card .foot { padding: 8px 18px 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.academy .status { font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--tint); color: var(--muted); }
.academy .status.live { color: var(--good); }
.academy .track { height: 8px; border-radius: 999px; background: var(--tint); overflow: hidden; }
.academy .track i { display: block; height: 100%; width: 0; background: var(--ink); border-radius: 999px; transition: width .7s var(--ease); }
.academy .panel { background: var(--paper); border: 2px solid var(--ink); border-radius: 14px; padding: 28px; display: grid; gap: 16px; min-width: 0; }
.academy .course { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; align-items: start; }
.academy .lessons { position: sticky; top: 92px; display: grid; gap: 6px; background: var(--paper); border: 2px solid var(--ink); border-radius: 14px; padding: 16px; }
.academy .lessons h3 { font-size: 16px; padding: 4px 8px 8px; }
.academy .lessons a { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: center; padding: 9px 8px; border-radius: 10px; text-decoration: none; color: var(--ink); font-size: 15px; font-weight: 600; }
.academy .lessons a:hover { background: var(--tint); color: var(--ink); }
.academy .lessons a[aria-current="page"] { background: var(--tint); color: var(--focus); }
.academy .dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: 12px; font-family: var(--font-mono); font-weight: 700; color: var(--muted); }
.academy .dot.done { background: var(--good); border-color: var(--good); color: #fff; }
.academy .lesson { display: grid; gap: 22px; min-width: 0; }
.academy .meta { font-family: var(--font-mono); font-size: 13px; color: var(--focus); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; }
.academy .two { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.academy .cmp { border-radius: 14px; padding: 22px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.academy .cmp.v { background: var(--tint); }
.academy .cmp.b { background: #101216; color: #FFFFFF; }
.academy .cmp.b .tag { color: var(--l3); }
.academy .cmp ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; list-style: disc; }
.academy pre { margin: 0; background: #101216; color: #FFFFFF; font-family: var(--font-mono); font-size: 14px; line-height: 1.6; padding: 18px 20px; border-radius: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.academy .cmp.v pre { background: var(--paper); color: var(--ink); }
.academy .cmp.b pre { background: rgba(255,255,255,0.08); color: var(--ground); }
.academy .stick { position: sticky; top: 92px; }
.academy .codebox { display: grid; gap: 8px; min-width: 0; }
.academy .codehead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.academy .codehead span { font-size: 14px; font-weight: 700; color: var(--muted); }
.academy .brief5 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.academy .letter { background: var(--paper); border: 2px solid var(--ink); border-radius: 14px; padding: 18px; display: grid; gap: 8px; align-content: start; transition: transform .3s var(--ease); }
.academy .letter:hover { transform: translateY(-3px); }
.academy .letter b { width: 48px; height: 48px; border-radius: 12px; background: var(--l2); color: var(--on-accent); display: grid; place-items: center; font-family: var(--display); font-size: 26px; }
.academy .letter em { font-size: 14px; color: var(--muted); font-style: normal; }
.academy .brief-rows { display: grid; gap: 12px; }
.academy .brief-row { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 14px; align-items: center; }
.academy .brief-row b { width: 48px; height: 48px; border-radius: 12px; background: #101216; color: var(--l3); display: grid; place-items: center; font-family: var(--display); font-size: 24px; }
.academy .brief-row div { background: var(--tint); border-radius: 12px; padding: 12px 16px; }
.academy ol.steps { margin: 0; padding-left: 22px; display: grid; gap: 6px; list-style: decimal; }
.academy .check { display: grid; gap: 8px; }
.academy .check label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; margin: 0; font-weight: 500; }
.academy .check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--focus); flex: none; }
.academy details { background: var(--tint); border-radius: 14px; padding: 14px 18px; }
.academy details summary { cursor: pointer; font-weight: 700; }
.academy details[open] summary { margin-bottom: 12px; }
.academy .callout { background: var(--warn-bg); color: var(--warn-ink); border-radius: 14px; padding: 16px 20px; }
.academy .good { background: var(--tint); border-radius: 14px; padding: 16px 20px; border-left: 4px solid var(--good); }
.academy .pager { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 8px; }
.academy .path { display: grid; gap: 16px; }
.academy .path-step { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 18px; align-items: center; background: var(--paper); border: 2px solid var(--ink); border-radius: 14px; padding: 20px 22px; }
.academy .path-step .num { width: 56px; height: 56px; border-radius: 14px; background: #101216; color: var(--l3); display: grid; place-items: center; font-family: var(--display); font-size: 28px; font-weight: 700; position: static; }
.academy .path-step .num.done { background: var(--good); color: #fff; }
.academy .path-step .info { display: grid; gap: 4px; min-width: 0; }
.academy .path-step .info p { color: var(--body); font-size: 15px; }
.academy .path-step .acts { display: grid; gap: 8px; justify-items: end; }
.academy .path-step label { font-size: 14px; display: flex; gap: 8px; align-items: center; cursor: pointer; margin: 0; font-weight: 500; }
.academy .path-step label input { width: 18px; height: 18px; accent-color: var(--good); }
.academy .pill { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--tint); color: var(--muted); margin-left: 6px; }
.academy .builder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.academy .field { display: grid; gap: 6px; }
.academy .field label { font-weight: 700; display: flex; gap: 10px; align-items: center; margin: 0; }
.academy .field label b { width: 28px; height: 28px; border-radius: 8px; background: var(--l2); color: var(--on-accent); display: grid; place-items: center; font-family: var(--display); }
.academy textarea { font: 16px var(--sans); width: 100%; min-height: 74px; height: auto; resize: vertical; padding: 12px 14px; border-radius: 10px; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); }
.academy .meter { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.academy .meter span { width: 34px; height: 34px; border-radius: 9px; border: 2px solid var(--line); display: grid; place-items: center; font-family: var(--display); font-weight: 700; color: var(--muted); transition: background .25s var(--ease), color .25s, transform .25s var(--ease); }
.academy .meter span.on { background: var(--l2); border-color: var(--l2); color: var(--on-accent); transform: translateY(-2px); }
.academy .foot-note { font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 20px; margin-top: 12px; }

@keyframes academy-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.academy #main > section, .academy #main > article, .academy #main > div, .academy #main > p { animation: academy-in .65s var(--ease) both; }
.academy #main > :nth-child(2) { animation-delay: .08s; }
.academy #main > :nth-child(3) { animation-delay: .14s; }
.academy .grid .card { animation: academy-in .6s var(--ease) both; }
.academy .grid .card:nth-child(2) { animation-delay: .06s; }
.academy .grid .card:nth-child(3) { animation-delay: .12s; }
.academy .grid .card:nth-child(4) { animation-delay: .18s; }
.academy .grid .card:nth-child(5) { animation-delay: .24s; }
.academy .brief-rail div { animation: academy-in .5s var(--ease) both; }
.academy .brief-rail div:nth-child(2) { animation-delay: .05s; }
.academy .brief-rail div:nth-child(3) { animation-delay: .1s; }
.academy .brief-rail div:nth-child(4) { animation-delay: .15s; }
.academy .brief-rail div:nth-child(5) { animation-delay: .2s; }

@media (max-width: 900px) {
  .academy { min-width: 0; }
  .academy .shell { grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
  .academy .side { position: static; display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding-bottom: 4px; min-width: 0; max-width: 100%; -webkit-overflow-scrolling: touch; }
  .academy .side a { white-space: nowrap; flex: none; }
  .academy .side .sep, .academy .side .note { display: none; }
  .academy .stage { grid-template-columns: minmax(0, 1fr); padding: 24px 16px; min-width: 0; }
  .academy .stage h1 { font-size: clamp(32px, 9vw, 48px); }
  .academy .stage .photo { --hard: 8px; }
  .academy .brief-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .academy .grid { grid-template-columns: minmax(0, 1fr); }
  .academy .course { grid-template-columns: minmax(0, 1fr); min-width: 0; }
  .academy .lessons { position: static; display: flex; overflow-x: auto; min-width: 0; max-width: 100%; -webkit-overflow-scrolling: touch; }
  .academy .lessons h3 { display: none; }
  .academy .lessons a { grid-template-columns: 28px auto; white-space: nowrap; flex: none; min-height: 44px; }
  .academy .builder, .academy .two, .academy .panel, .academy .lesson, .academy .codebox { min-width: 0; }
  .academy .builder { grid-template-columns: minmax(0, 1fr); }
  .academy .stick { position: static; }
  .academy .btns .btn { min-height: 44px; max-width: 100%; white-space: normal; text-align: center; }
  .academy .path-step { grid-template-columns: 48px minmax(0, 1fr); min-width: 0; }
  .academy .path-step .acts { grid-column: 1 / -1; justify-items: start; }
  .academy .path-step h3 { overflow-wrap: anywhere; }
  .academy .vid { box-shadow: 8px 8px 0 var(--l1); padding: 16px; }
  .academy pre { font-size: 13px; }
}
@media (max-width: 420px) {
  .academy .brief-rail { grid-template-columns: minmax(0, 1fr); }
  .academy .panel { padding: 18px 14px; }
  .academy .stage h1 { font-size: 32px; }
}
html[data-theme="dark"] .academy{--tint:#24222F;--warn-bg:#3D2E1C;--warn-ink:#F8D7B0}
@media (prefers-color-scheme:dark){
  html:not([data-theme="light"]) .academy{--tint:#24222F;--warn-bg:#3D2E1C;--warn-ink:#F8D7B0}
}
@media (prefers-reduced-motion: reduce) {
  .academy #main > section, .academy #main > article, .academy #main > div, .academy #main > p,
  .academy .grid .card, .academy .brief-rail div, .academy .shot img, .academy .letter, .academy .card { animation: none; transition: none; transform: none; opacity: 1; }
}
