:root {
  color-scheme: dark;
  --bg: #071817;
  --surface: #102826;
  --surface-2: #173532;
  --ink: #f7f6ef;
  --muted: #b8c8c4;
  --accent: #6bd0b8;
  --accent-soft: rgb(107 208 184 / .14);
  --warm: #f0bd72;
  --line: rgb(255 255 255 / .15);
  --focus: #ffda72;
  --shadow: 0 1.5rem 4rem rgb(0 0 0 / .3);
  --radius: 1.25rem;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; background: var(--bg); color: var(--ink); }
body { overflow-x: hidden; }
button, a { font: inherit; }
button:focus-visible, a:focus-visible { outline: .2rem solid var(--focus); outline-offset: .2rem; }
[hidden] { display: none !important; }

.skip-link {
  position: fixed; z-index: 20; inset: .75rem auto auto .75rem; translate: 0 -180%;
  padding: .7rem 1rem; border-radius: .6rem; background: white; color: #092421;
}
.skip-link:focus { translate: 0; }

.academy-module { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; }
.module-bar {
  position: relative; z-index: 10; display: grid; grid-template-columns: auto minmax(9rem, 1fr) auto;
  align-items: center; gap: clamp(.8rem, 2vw, 2rem); min-height: 4.5rem;
  padding: .65rem clamp(.8rem, 4vw, 3rem); border-bottom: 1px solid var(--line);
  background: rgb(7 24 23 / .94); backdrop-filter: blur(16px);
}
.module-brand { display: grid; gap: .1rem; }
.module-brand strong { letter-spacing: -.035em; }
.module-brand strong span { color: var(--accent); }
.module-exit { color: var(--muted); font-size: .75rem; font-weight: 750; text-decoration: none; }
.module-exit:hover { color: var(--ink); }
.module-progress { display: grid; gap: .35rem; }
.module-progress__meta { display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .78rem; }
.module-progress progress { width: 100%; height: .4rem; accent-color: var(--accent); }
.icon-button {
  width: 2.8rem; height: 2.8rem; border: 1px solid var(--line); border-radius: .75rem;
  background: transparent; color: var(--ink); cursor: pointer;
}

.module-main { min-height: 0; outline: none; }
.scene { display: none; min-height: calc(100dvh - 9.5rem); padding: clamp(1rem, 3vw, 2.5rem); }
.scene.is-active { display: grid; place-items: center; }
.scene.is-active .scene__frame { animation: scene-in .4s cubic-bezier(.22,.72,.2,1) both; }
.scene__frame { width: min(100%, 78rem); display: grid; gap: 1rem; }
.scene__meta { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.scene__phase { margin: 0 0 .35rem; color: var(--accent); font-size: .72rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.scene h1 { margin: 0; max-width: 24ch; font-size: clamp(1.7rem, 2.5vw + 1rem, 3.7rem); line-height: 1.02; letter-spacing: -.045em; text-wrap: balance; }
.scene__time { margin: 0; padding: .4rem .7rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .78rem; }
.scene__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(19rem, .75fr); gap: clamp(1rem, 2.5vw, 2rem); align-items: stretch; }

.workplace {
  position: relative; isolation: isolate; overflow: hidden; min-height: min(52vw, 32rem); margin: 0;
  border: 1px solid var(--line); border-radius: var(--radius); background: #16322f; box-shadow: var(--shadow);
}
.workplace::before {
  content: ""; position: absolute; inset: 0; z-index: -3;
  background:
    radial-gradient(circle at 78% 14%, rgb(255 232 180 / .28), transparent 24%),
    linear-gradient(145deg, #1a4540 0 46%, #0a201f 46% 100%);
}
.workplace::after { content: ""; position: absolute; inset: auto 0 0; height: 31%; z-index: -2; background: #0a1f1e; border-top: 1px solid var(--line); }
.workplace__window { position: absolute; inset: 9% 7% auto auto; width: 32%; height: 36%; border: .55rem solid #dce7df; background: linear-gradient(#8fbab6, #d8e5dc); box-shadow: inset 0 0 0 1px #476d69; }
.workplace__window::after { content: ""; position: absolute; inset: 0 49%; width: .25rem; background: #dce7df; }
.workplace__desk { position: absolute; inset: auto 7% 16% 8%; height: 9%; border-radius: .3rem; background: #d5a56c; box-shadow: 0 1.1rem 0 -.25rem #7d553b; }
.workplace__screen { position: absolute; inset: 34% auto auto 13%; width: 30%; height: 27%; border: .55rem solid #10201f; border-radius: .45rem; background: #dcece7; box-shadow: 0 .5rem 1rem rgb(0 0 0 / .3); }
.workplace__screen::after { content: ""; position: absolute; inset: 22% 13%; background: linear-gradient(var(--accent) 0 15%, transparent 15% 30%, #7caaa2 30% 40%, transparent 40% 55%, #7caaa2 55% 65%, transparent 65%); opacity: .8; }
.person { position: absolute; inset: auto 19% 14% auto; width: 18%; height: 43%; }
.person::before { content: ""; position: absolute; inset: 0 29% auto; aspect-ratio: 1; border-radius: 50%; background: #d39a72; box-shadow: 0 -.5rem 0 #2b2928; }
.person::after { content: ""; position: absolute; inset: 22% 5% 0; border-radius: 42% 42% 12% 12%; background: #5a8eb0; }
.person--second { left: 53%; right: auto; scale: .86; opacity: .86; }
.signal-layer { position: absolute; inset: 7%; z-index: 3; pointer-events: none; }
.signal { position: absolute; padding: .45rem .65rem; border: 1px solid rgb(255 255 255 / .35); border-radius: .55rem; background: rgb(7 24 23 / .9); color: white; font-size: clamp(.68rem, 1.1vw, .82rem); font-weight: 820; box-shadow: 0 .6rem 1rem rgb(0 0 0 / .25); }
.signal:nth-child(1) { inset: 4% auto auto 5%; }
.signal:nth-child(2) { inset: 15% 4% auto auto; }
.signal:nth-child(3) { inset: auto 10% 10% auto; }
.signal:nth-child(4) { inset: auto auto 22% 3%; }
.signal--warm { border-color: var(--warm); color: var(--warm); }
.system-path { position: absolute; inset: 8% 6%; z-index: 2; display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; gap: .35rem; }
.system-path span { position: relative; padding: .8rem .45rem; border: 1px solid var(--line); border-radius: .65rem; background: rgb(7 24 23 / .88); text-align: center; font-size: .76rem; font-weight: 800; }
.system-path span:not(:last-child)::after { content: "→"; position: absolute; inset: 50% -.9rem auto auto; translate: 0 -50%; color: var(--accent); }
.workplace--network .workplace__screen, .workplace--network .person { opacity: .28; }
.workplace--network .system-path { inset-block: 24%; }
.workplace--meeting .workplace__screen { width: 45%; height: 32%; left: 8%; }
.workplace--meeting .person { right: 10%; }
.workplace--handoff .person--second, .workplace--meeting .person--second { display: block; }
.workplace--recovery::before { background: radial-gradient(circle at 75% 18%, rgb(255 225 157 / .42), transparent 28%), linear-gradient(145deg, #356761, #112d2b); }
.workplace--evidence .workplace__screen::after { background: linear-gradient(90deg, var(--accent) 0 25%, transparent 25% 33%, var(--warm) 33% 58%, transparent 58% 66%, #87b2ca 66%); inset: 30% 12%; }
.workplace--technology .workplace__screen::after { background: repeating-linear-gradient(0deg, #d9917a 0 8%, transparent 8% 20%); }
.workplace--choice .workplace__desk { width: 44%; left: 28%; }
.workplace--choice .person { right: 40%; }
.workplace--choice .workplace__screen { left: 7%; }

.panel { display: grid; align-content: start; gap: 1rem; padding: clamp(1rem, 2.2vw, 1.5rem); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.panel p { margin: 0; line-height: 1.5; }
.panel__lead { color: var(--muted); }
.interaction-note { margin-top: -.55rem !important; color: var(--muted); font-size: .82rem; }
.learning-card { display: grid; gap: .6rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: .8rem; background: rgb(255 255 255 / .045); }
.learning-card p { margin: 0; }
.learning-card__title { color: var(--accent); font-weight: 850; }
.learning-card ul { display: grid; gap: .45rem; margin: 0; padding-inline-start: 1.2rem; color: var(--ink); line-height: 1.45; }
.learning-card__note { color: var(--muted); font-size: .86rem; }
.learning-card--tip { border-color: rgb(240 189 114 / .48); background: rgb(240 189 114 / .09); }
.learning-card--tip .learning-card__title { color: var(--warm); }
.option-list { display: grid; gap: .55rem; }
.option {
  width: 100%; min-height: 3.2rem; padding: .75rem .9rem; border: 1px solid var(--line); border-radius: .75rem;
  background: var(--surface-2); color: var(--ink); text-align: left; font-weight: 760; cursor: pointer;
}
.option:hover { border-color: var(--accent); }
.option[aria-pressed="true"] { border-color: var(--accent); background: #215f53; box-shadow: inset 0 0 0 1px var(--accent); }
.option small { display: block; margin-top: .3rem; color: var(--muted); font-weight: 500; line-height: 1.4; }
.feedback { padding: .85rem 1rem; border-inline-start: .3rem solid var(--accent); border-radius: .3rem .7rem .7rem .3rem; background: var(--accent-soft); line-height: 1.5; }
.feedback strong { color: var(--accent); }
.feedback--warm { border-color: var(--warm); background: rgb(240 189 114 / .11); }
.scene-transfer { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .2rem; }
.scene-transfer span { padding: .42rem .65rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .78rem; }
.scope-note { padding: .75rem .85rem; border: 1px solid var(--line); border-radius: .7rem; color: var(--muted); font-size: .82rem; }
.completion { text-align: center; }
.completion h1 { max-width: 20ch; margin-inline: auto; }
.completion .panel { max-width: 54rem; margin-inline: auto; }
.completion-mark { display: grid; place-items: center; width: 4.5rem; height: 4.5rem; margin: 0 auto; border: 2px solid var(--accent); border-radius: 50%; color: var(--accent); font-size: 2rem; font-weight: 900; }

.module-controls {
  position: sticky; z-index: 10; inset-block-end: 0; display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 1rem; min-height: 5rem; padding: .7rem clamp(.8rem, 4vw, 3rem);
  border-top: 1px solid var(--line); background: rgb(7 24 23 / .95); backdrop-filter: blur(16px);
}
.module-controls__right { grid-column: 3; justify-self: end; }
.button { min-height: 2.8rem; padding: .7rem 1.05rem; border: 1px solid var(--line); border-radius: .7rem; background: transparent; color: var(--ink); font-weight: 780; cursor: pointer; }
.button--primary { border-color: var(--accent); background: var(--accent); color: #06211d; }
.button:disabled { opacity: .38; cursor: not-allowed; }
.live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

dialog { max-width: min(32rem, calc(100% - 2rem)); padding: 0; border: 1px solid var(--line); border-radius: 1rem; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
dialog::backdrop { background: rgb(0 0 0 / .72); backdrop-filter: blur(4px); }
.resume { padding: 1.25rem; }
.resume h2 { margin: 0 0 .55rem; }
.resume p { margin: 0; color: var(--muted); line-height: 1.5; }
.resume__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }

@keyframes scene-in { from { opacity: 0; translate: 0 .3rem; } to { opacity: 1; translate: 0; } }

@media (max-width: 820px) {
  .module-bar { grid-template-columns: auto 1fr; }
  .module-bar .icon-button { position: absolute; inset: .55rem .65rem auto auto; }
  .module-progress { grid-column: 1 / -1; }
  .scene { min-height: auto; padding: 1rem; }
  .scene__grid { grid-template-columns: 1fr; }
  .workplace { min-height: 19rem; }
  .panel { padding: 1rem; }
  .module-controls { position: sticky; min-height: 4.4rem; }
}

@media (max-width: 480px) {
  .module-brand strong span { display: none; }
  .module-bar { padding-inline: .65rem; }
  .module-progress__meta span:first-child { max-width: 65%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .scene__meta { align-items: start; }
  .scene__time { font-size: .7rem; }
  .workplace { min-height: 15.5rem; border-radius: .85rem; }
  .system-path { grid-template-columns: 1fr 1fr; inset-block: 12%; }
  .system-path span:not(:last-child)::after { display: none; }
  .signal { font-size: .62rem; }
  .module-controls { grid-template-columns: auto 1fr auto; gap: .35rem; padding-inline: .45rem; }
  .button { padding-inline: .65rem; font-size: .86rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
