:root {
  color-scheme: dark;
  --bg: #081016;
  --panel: #0d1821;
  --panel-2: #10212c;
  --line: #1f3a47;
  --text: #e8f4f5;
  --muted: #8eacb3;
  --cyan: #54e0d1;
  --cyan-soft: rgba(84, 224, 209, .12);
  --violet: #b39aff;
  --danger: #ff8d9b;
  --warning: #ffd27d;
  --radius: 16px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 80% -10%, rgba(84, 224, 209, .12), transparent 34rem), var(--bg); color: var(--text); }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.academy-topbar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem clamp(1rem, 3vw, 2.4rem); border-bottom: 1px solid rgba(84, 224, 209, .15); background: rgba(8, 16, 22, .92); backdrop-filter: blur(16px); }
.brand { font-weight: 800; letter-spacing: .08em; text-decoration: none; }
.brand span { color: var(--cyan); font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: .65rem; }
.status-pill, .mode-badge { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: .32rem .62rem; color: var(--muted); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.status-pill.online { color: var(--cyan); border-color: rgba(84, 224, 209, .5); }
.status-pill.preview { color: var(--warning); border-color: rgba(255, 210, 125, .5); }

.academy-notice { min-height: 2rem; padding: .55rem clamp(1rem, 3vw, 2.4rem); color: var(--warning); font-size: .87rem; }
.academy-notice:empty { display: none; }
.career-profile { max-width: 1800px; margin: 1rem auto; padding: clamp(1rem, 2vw, 1.35rem) clamp(1rem, 3vw, 2.4rem); }
.career-profile-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.career-profile-top h2 { margin: 0; color: var(--text); font-size: clamp(1.15rem, 2vw, 1.55rem); }
.career-profile-top h2 > span { color: var(--muted); font-size: .75em; font-weight: 500; }
.career-profile-role { margin: .28rem 0 0; color: #c4d5d8; font-size: .88rem; }
.career-profile-status { flex: 0 0 auto; padding: .35rem .62rem; border: 1px solid rgba(84, 224, 209, .35); border-radius: 999px; color: var(--cyan); font-size: .72rem; }
.career-profile-grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: .7rem; margin-top: .9rem; }
.career-profile-block { padding: .75rem .82rem; border: 1px solid rgba(142, 172, 179, .16); border-radius: 10px; background: rgba(6, 16, 21, .3); }
.career-profile-block h3 { margin-bottom: .35rem; color: #d9eeef; font-size: .82rem; }
.career-profile-block p, .career-profile-block li { color: #b9cdd0; font-size: .8rem; line-height: 1.5; }
.career-profile-block p { margin-bottom: 0; }
.career-profile-block ul, .career-profile-block ol { margin: 0; padding-left: 1.15rem; }
.career-profile-note { margin: .8rem 0 0; color: var(--muted); font-size: .72rem; line-height: 1.5; }
.study-notebook { max-width: 1800px; margin: 1rem auto; padding: clamp(1rem, 2vw, 1.35rem) clamp(1rem, 3vw, 2.4rem); scroll-margin-top: 5.2rem; }
.study-notebook-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.study-notebook-heading h2 { margin-bottom: .35rem; font-size: clamp(1.2rem, 2vw, 1.55rem); }
.study-notebook-heading p:not(.eyebrow) { max-width: 72ch; margin-bottom: 0; color: #b9cdd0; font-size: .84rem; line-height: 1.55; }
.study-count-card { flex: 0 0 auto; min-width: 8.5rem; padding: .7rem .8rem; border: 1px solid rgba(84, 224, 209, .28); border-radius: 10px; background: rgba(84, 224, 209, .06); text-align: center; }
.study-count-card strong, .study-count-card span { display: block; }
.study-count-card strong { color: var(--cyan); font-size: 1.25rem; }
.study-count-card span { margin-top: .18rem; color: var(--muted); font-size: .7rem; }
.study-progress { margin: 1rem 0 .8rem; }
.study-progress-label { display: flex; justify-content: space-between; gap: .7rem; margin-bottom: .35rem; color: var(--muted); font-size: .72rem; }
.study-progress-label strong { color: var(--cyan); }
.study-progress-track { height: .42rem; overflow: hidden; border-radius: 999px; background: #071218; }
.study-progress-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--violet)); transition: width .2s ease; }
.study-controls { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: .7rem; border: 1px solid rgba(142, 172, 179, .16); border-radius: 11px; background: rgba(6, 16, 21, .3); }
.study-search { display: flex; align-items: center; gap: .45rem; flex: 1; min-width: 12rem; color: var(--muted); }
.study-search input { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: .55rem .62rem; background: #09161d; color: var(--text); outline: none; }
.study-search input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(84, 224, 209, .12); }
.study-filter-list { display: flex; flex-wrap: wrap; gap: .35rem; }
.study-filter-button { border: 1px solid var(--line); border-radius: 999px; padding: .38rem .6rem; background: transparent; color: var(--muted); font-size: .72rem; white-space: nowrap; }
.study-filter-button:hover, .study-filter-button.active { border-color: var(--cyan); background: var(--cyan-soft); color: #d9fffa; }
.study-section { margin-top: 1.1rem; }
.study-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: .8rem; margin-bottom: .55rem; }
.study-section-heading h3 { margin-bottom: 0; color: #d9eeef; }
.study-section-heading > span { color: var(--muted); font-size: .72rem; }
.study-term-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; }
.study-term-card { min-width: 0; padding: .78rem; border: 1px solid var(--line); border-radius: 11px; background: rgba(6, 16, 21, .32); }
.study-term-card.is-remembered { border-color: rgba(84, 224, 209, .42); background: rgba(84, 224, 209, .06); }
.study-term-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .55rem; }
.study-term-card h3 { margin: 0; color: var(--text); font-size: .98rem; overflow-wrap: anywhere; }
.study-term-expansion { margin: .18rem 0 0; color: var(--violet); font: .72rem/1.4 ui-monospace, monospace; overflow-wrap: anywhere; }
.study-memory-badge { flex: 0 0 auto; color: var(--muted); font-size: .65rem; }
.study-term-card.is-remembered .study-memory-badge { color: var(--cyan); }
.study-term-card p { margin: .55rem 0 0; color: #bdd0d4; font-size: .78rem; line-height: 1.5; }
.study-term-card strong { color: #d9eeef; }
.study-pronunciation { color: var(--violet) !important; font-family: ui-monospace, monospace; }
.study-pronunciation span { color: var(--muted); font-family: inherit; }
.study-example { padding: .5rem .58rem; border-radius: 7px; background: rgba(84, 224, 209, .06); }
.study-card-actions { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .7rem; }
.study-card-actions .button { font-size: .68rem; }
.study-empty { padding: .8rem; border: 1px dashed var(--line); border-radius: 9px; color: var(--muted); font-size: .8rem; }
.study-image-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .65rem; }
.study-image-card { display: block; width: 100%; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: rgba(6, 16, 21, .42); color: var(--text); text-align: left; transition: border-color .15s ease, transform .15s ease; }
.study-image-card:hover, .study-image-card:focus-visible { border-color: var(--cyan); transform: translateY(-2px); }
.study-image-card img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #061015; }
.study-image-card-body { display: block; padding: .6rem .65rem .7rem; }
.study-image-card-body strong, .study-image-card-body small, .study-image-card-body em { display: block; }
.study-image-card-body strong { font-size: .78rem; line-height: 1.35; }
.study-image-card-body small { margin-top: .28rem; color: #b9cdd0; font-size: .7rem; line-height: 1.4; }
.study-image-card-body em { margin-top: .35rem; color: var(--cyan); font-size: .65rem; font-style: normal; }
.study-image-dialog { width: min(68rem, calc(100% - 2rem)); max-height: calc(100% - 2rem); overflow: auto; padding: .85rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); color: var(--text); box-shadow: 0 25px 90px rgba(0,0,0,.6); }
.study-image-dialog::backdrop { background: rgba(0,0,0,.72); }
.study-image-dialog img { display: block; width: 100%; max-height: 70vh; object-fit: contain; border: 1px solid var(--line); border-radius: 9px; background: #061015; }
.study-image-dialog h2 { margin: .85rem 0 .35rem; }
.study-image-dialog p { color: #bdd0d4; font-size: .84rem; line-height: 1.55; }
.study-image-dialog .study-image-terms { color: var(--cyan); font-size: .75rem; }
.academy-grid { display: grid; grid-template-columns: minmax(170px, .8fr) minmax(320px, 1.45fr) minmax(300px, 1fr); grid-template-areas: "nav reader lab" "nav tasks lab"; gap: 1rem; padding: 0 clamp(1rem, 3vw, 2.4rem) 2rem; max-width: 1800px; margin: auto; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(150deg, rgba(16, 33, 44, .92), rgba(10, 20, 28, .96)); box-shadow: 0 18px 50px rgba(0,0,0,.16); }
.navigator-panel { grid-area: nav; align-self: start; position: sticky; top: 5.2rem; padding: .8rem; }
.reader-panel { grid-area: reader; padding: clamp(1.1rem, 3vw, 2rem); }
.lab-panel { grid-area: lab; padding: clamp(1rem, 2vw, 1.4rem); display: flex; flex-direction: column; min-height: 32rem; }
.task-panel { grid-area: tasks; padding: clamp(1rem, 2vw, 1.4rem); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.eyebrow { margin: 0 0 .35rem; color: var(--cyan); font-size: .7rem; font-weight: 800; letter-spacing: .16em; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 22ch; margin-bottom: .7rem; font-size: clamp(1.65rem, 3vw, 2.55rem); line-height: 1.08; }
h2 { margin-bottom: .35rem; font-size: 1.1rem; }
h3 { margin-bottom: .45rem; font-size: .98rem; }
.muted, .lesson-summary, .command-help, .task-meta, .nav-meta { color: var(--muted); }
.lesson-summary { max-width: 70ch; font-size: 1rem; line-height: 1.6; }
.lesson-meta { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 1.25rem; }
.meta-chip { border: 1px solid var(--line); border-radius: 999px; padding: .28rem .58rem; color: var(--muted); font-size: .75rem; }
.objectives { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; padding: 0; margin: 0 0 1.3rem; list-style: none; }
.objectives li { padding: .65rem .75rem; border-radius: 10px; background: rgba(84, 224, 209, .06); color: #cce7e8; font-size: .86rem; line-height: 1.4; }
.objectives li::before { content: '✓'; margin-right: .45rem; color: var(--cyan); }
.lesson-section { padding: 1rem 0; border-top: 1px solid rgba(142, 172, 179, .16); }
.lesson-section p { max-width: 75ch; margin-bottom: .35rem; color: #c4d5d8; line-height: 1.72; }
.term-button { display: inline; padding: 0 .12rem; border: 0; border-bottom: 1px dashed var(--cyan); background: transparent; color: var(--cyan); }
.term-button:hover, .term-button:focus-visible { background: var(--cyan-soft); }
.term-inline { color: #a9c7cc; font-size: .85em; font-weight: 500; }
.safety-card { margin: 1rem 0; padding: .75rem .85rem; border-left: 3px solid var(--warning); border-radius: 8px; background: rgba(255, 210, 125, .08); color: #f3dba7; font-size: .82rem; line-height: 1.5; }

.syntax-card, .npc-guide, .table-guide { margin-top: 1.25rem; padding: 1rem; border: 1px solid rgba(179, 154, 255, .28); border-radius: 12px; background: rgba(179, 154, 255, .06); }
.syntax-intro, .npc-guide p, .table-guide p { color: #c4d5d8; line-height: 1.58; }
.syntax-note { margin-top: .75rem; padding-top: .75rem; border-top: 1px solid rgba(179, 154, 255, .16); }
.syntax-note code, .npc-step code { display: block; overflow-x: auto; padding: .55rem .65rem; border-radius: 8px; background: #081218; color: var(--violet); font: .8rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.syntax-note p { margin: .48rem 0 0; font-size: .82rem; line-height: 1.52; }
.syntax-note .syntax-example code { display: inline-block; margin-top: .28rem; padding: .16rem .38rem; }
.npc-guide { border-color: rgba(84, 224, 209, .32); background: rgba(84, 224, 209, .05); }
.npc-step { margin: .8rem 0; padding: .75rem; border-radius: 9px; background: rgba(6, 16, 21, .42); }
.npc-step p { margin: .4rem 0 .65rem; }
.npc-command-label { margin-bottom: .2rem !important; color: var(--muted); }
.npc-example code { display: inline-block; margin-top: .2rem; padding: .16rem .38rem; }
.npc-expected { color: #c8e6e4; }
.npc-annotated-output { margin-top: .65rem; padding: .65rem; border: 1px solid rgba(84, 224, 209, .2); border-radius: 8px; background: rgba(84, 224, 209, .04); color: #c8e6e4; font-size: .8rem; line-height: 1.5; }
.annotated-line { margin-top: .55rem; padding-top: .45rem; border-top: 1px solid rgba(142, 172, 179, .12); }
.annotated-line code { display: block; margin-bottom: .25rem; padding: .35rem .45rem; color: var(--violet); }
.annotated-line > span { display: block; color: #c4d5d8; }
.npc-controls { display: flex; align-items: center; justify-content: space-between; gap: .7rem; }
.table-scroll { overflow-x: auto; }
.table-guide table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.table-guide th, .table-guide td { min-width: 8rem; padding: .62rem; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.table-guide th { color: var(--cyan); background: rgba(84, 224, 209, .08); }
.table-guide th small { display: block; margin-top: .25rem; color: var(--muted); font-weight: 400; line-height: 1.35; }
.table-guide td { color: #c4d5d8; }

.lesson-link { display: block; width: 100%; padding: .72rem .7rem; border: 1px solid transparent; border-radius: 11px; background: transparent; color: var(--text); text-align: left; }
.lesson-link:hover { background: rgba(84, 224, 209, .07); }
.lesson-link.active { border-color: rgba(84, 224, 209, .42); background: var(--cyan-soft); }
.lesson-link.done .nav-title::after { content: ' ✓'; color: var(--cyan); }
.nav-number { display: inline-block; min-width: 1.8rem; color: var(--cyan); font-size: .75rem; font-weight: 800; }
.nav-title { display: inline; font-size: .84rem; line-height: 1.35; }
.nav-meta { display: block; margin: .3rem 0 0 1.8rem; font-size: .7rem; }

.web-lab-surface { margin: .2rem 0 1rem; }
.web-browser-card { overflow: hidden; border: 1px solid #2a4a58; border-radius: 13px; background: #f4f8f8; color: #17323b; box-shadow: 0 16px 32px rgba(0,0,0,.22); }
.browser-chrome { display: flex; align-items: center; gap: .6rem; padding: .58rem .7rem; background: #dce8e9; color: #47626a; font-size: .7rem; }
.browser-dots { display: flex; gap: .22rem; }
.browser-dots i { width: .45rem; height: .45rem; border-radius: 50%; background: #78929a; }
.browser-address { flex: 1; overflow: hidden; padding: .35rem .55rem; border: 1px solid #bed0d2; border-radius: 7px; background: #f7fbfb; white-space: nowrap; text-overflow: ellipsis; }
.browser-badge { color: #176f69; font-weight: 800; letter-spacing: .08em; }
.web-app-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1rem; background: #16756e; color: #f0fffc; }
.web-app-kicker { margin: 0 0 .18rem; color: #b4fff3; font-size: .64rem; font-weight: 800; letter-spacing: .14em; }
.web-app-header h3, .web-app-title h4, .object-request-card h4, .web-response-card h4 { margin: 0; }
.web-app-header h3 { font-size: 1.1rem; }
.web-app-header h3 span { font-size: .78rem; font-weight: 500; opacity: .82; }
.web-lock { display: grid; place-items: center; width: 2rem; height: 2rem; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; }
.web-userbar { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: .65rem 1rem; border-bottom: 1px solid #dbe6e6; background: #fff; color: #46656c; font-size: .8rem; }
.web-userbar strong { color: #17323b; }
.web-userbar .button { border-color: #a6ccca; background: #effaf8; color: #176f69; }
.web-app-body { padding: 1rem; }
.web-app-title, .response-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; }
.web-app-title { margin-bottom: .7rem; }
.web-app-title h4 { color: #17323b; font-size: 1rem; }
.web-count { color: #769096; font-size: .72rem; }
.invoice-list { display: grid; gap: .45rem; }
.invoice-row { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: .65rem .72rem; border: 1px solid #d6e2e2; border-radius: 9px; background: #fff; }
.invoice-row.active { border-color: #5fb8af; box-shadow: 0 0 0 2px rgba(95,184,175,.13); }
.invoice-row strong, .invoice-row span { display: block; }
.invoice-row strong { color: #23434b; font-size: .84rem; }
.invoice-row span { margin-top: .18rem; color: #7a9297; font-size: .7rem; }
.invoice-row .button { border-color: #c6d9d9; background: #fff; color: #306b68; }
.object-request-card, .web-response-card { margin-top: .75rem; padding: .8rem; border: 1px solid #d6e2e2; border-radius: 10px; background: #fff; }
.object-request-card p { margin: .25rem 0 0; color: #70888d; font-size: .76rem; line-height: 1.45; }
.object-input-row { display: flex; align-items: center; gap: .35rem; margin-top: .7rem; color: #678187; font: .78rem ui-monospace, monospace; }
.object-input-row input { width: 6rem; min-width: 0; border: 1px solid #aac8c6; border-radius: 7px; padding: .5rem .55rem; background: #f7fbfb; color: #18373d; font: inherit; }
.object-input-row .button { white-space: nowrap; }
.web-request-preview { display: block; margin-top: .55rem; padding: .45rem .55rem; overflow-x: auto; border-radius: 7px; background: #edf4f4; color: #326b69; font-size: .72rem; }
.web-response-card { border-color: #b8d2d2; }
.web-response-card.is-success { border-color: #63b6a8; }
.web-response-card.is-danger { border-color: #df7581; background: #fffafa; }
.response-heading h4 { color: #17323b; font-size: .9rem; }
.response-status { color: #26786f; font: .78rem ui-monospace, monospace; }
.is-danger .response-status { color: #b13f52; }
.response-fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .45rem; margin: .7rem 0; }
.response-fields div { padding: .45rem .5rem; border-radius: 7px; background: #f0f6f6; }
.response-fields dt { color: #789096; font: .65rem ui-monospace, monospace; }
.response-fields dd { margin: .18rem 0 0; color: #23434b; font-size: .76rem; overflow-wrap: anywhere; }
.web-response-body { margin: .65rem 0 0; padding: .6rem; overflow-x: auto; border-radius: 7px; background: #152f35; color: #c8fff3; font: .72rem/1.5 ui-monospace, monospace; }
.empty-response { margin: .65rem 0 0; color: #70888d; font-size: .78rem; line-height: 1.5; }
.web-observation { display: grid; gap: .3rem; margin-top: .65rem; padding: .6rem; border-left: 3px solid #d45769; border-radius: 7px; background: #fff0f1; color: #6b3440; font-size: .76rem; line-height: 1.5; }
.web-observation code { color: #9a3147; }
.web-lab-placeholder { padding: 1rem; border: 1px dashed var(--line); border-radius: 11px; background: rgba(84, 224, 209, .04); color: #c4d5d8; line-height: 1.55; }
.web-lab-placeholder p:last-child { margin-bottom: 0; }
.terminal-output { flex: 1; min-height: 14rem; max-height: 32rem; overflow: auto; margin: .2rem 0 1rem; padding: .9rem; border: 1px solid #1c3946; border-radius: 11px; background: #061015; color: #c5f8ec; font: .82rem/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.terminal-line { margin-bottom: .75rem; }
.terminal-line:last-child { margin-bottom: 0; }
.terminal-command { color: var(--violet); }
.terminal-error { color: var(--danger); }
.terminal-output-line { min-height: 1.35em; }
.terminal-line-note { padding: .15rem 0 .25rem 1rem; color: #9fc6c1; font: .76rem/1.45 Inter, ui-sans-serif, system-ui, sans-serif; white-space: normal; }
.command-form { display: flex; align-items: center; gap: .55rem; }
.prompt-symbol { color: var(--cyan); font: 1rem ui-monospace, monospace; }
.command-form input, .answer-input { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 9px; padding: .68rem .72rem; background: #09161d; color: var(--text); outline: none; }
.command-form input:focus, .answer-input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(84, 224, 209, .12); }
.button { border: 1px solid var(--line); border-radius: 9px; padding: .62rem .8rem; color: var(--text); background: #122630; }
.button:hover { border-color: var(--cyan); }
.button-primary { border-color: rgba(84, 224, 209, .6); background: #12433f; color: #d9fffa; }
.button-ghost { background: transparent; color: var(--muted); }
.command-help { margin: .65rem 0 0; font-size: .72rem; }

.task-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: .8rem; }
.score { color: var(--cyan); font-weight: 800; }
.mode-switcher { display: flex; gap: .35rem; flex-wrap: wrap; }
.mode-button { border: 1px solid var(--line); border-radius: 999px; padding: .34rem .58rem; background: transparent; color: var(--muted); font-size: .72rem; }
.mode-button.active { border-color: var(--violet); background: rgba(179, 154, 255, .12); color: #e5ddff; }
.task-group-title { margin: 1rem 0 .55rem; color: var(--muted); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.task-card { margin: .55rem 0; padding: .78rem; border: 1px solid var(--line); border-radius: 11px; background: rgba(6, 16, 21, .32); }
.task-card.completed { border-color: rgba(84, 224, 209, .5); }
.task-card.locked { opacity: .62; }
.task-card-header { display: flex; align-items: flex-start; gap: .65rem; }
.task-index { display: grid; place-items: center; flex: 0 0 1.55rem; height: 1.55rem; border-radius: 50%; background: #17333c; color: var(--cyan); font-size: .7rem; font-weight: 800; }
.task-card p { margin: .45rem 0 .7rem 2.2rem; color: #bdd0d4; font-size: .84rem; line-height: 1.5; }
.task-actions { display: flex; flex-wrap: wrap; gap: .45rem; margin-left: 2.2rem; }
.task-form { display: flex; gap: .45rem; margin: .55rem 0 0 2.2rem; }
.task-feedback { margin: .55rem 0 0 2.2rem; color: var(--warning); font-size: .78rem; line-height: 1.45; }
.task-feedback.success { color: var(--cyan); }
.task-explanation { margin: .55rem 0 0 2.2rem; padding: .55rem .65rem; border-left: 2px solid var(--cyan); background: rgba(84, 224, 209, .06); color: #c8e6e4; font-size: .78rem; line-height: 1.5; }
.small-button { padding: .42rem .58rem; font-size: .74rem; }

.glossary-dialog { width: min(32rem, calc(100% - 2rem)); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); color: var(--text); box-shadow: 0 25px 90px rgba(0,0,0,.5); }
.glossary-dialog::backdrop { background: rgba(0,0,0,.65); }
.pronunciation { color: var(--violet); font-family: ui-monospace, monospace; }
.dialog-example { padding: .7rem; border-radius: 8px; background: rgba(84, 224, 209, .08); color: #c8e6e4; line-height: 1.5; }
.dialog-actions { display: flex; gap: .5rem; margin: 1rem 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 1050px) {
  .academy-grid { grid-template-columns: minmax(170px, .75fr) minmax(320px, 1.25fr); grid-template-areas: "nav reader" "nav lab" "nav tasks"; }
  .lab-panel { min-height: 25rem; }
}

@media (min-width: 1051px) {
  .lab-panel { position: sticky; top: 5.2rem; align-self: start; height: calc(100vh - 6.2rem); max-height: 58rem; overflow-y: auto; }
  .lab-panel .terminal-output { min-height: 10rem; max-height: 22rem; }
}

@media (max-width: 720px) {
  .academy-topbar { align-items: flex-start; flex-direction: column; }
  .topbar-actions { width: 100%; justify-content: space-between; }
  .academy-grid { display: flex; flex-direction: column; padding: 0 .8rem 1.3rem; }
  .career-profile { margin: .8rem; padding: .9rem; }
  .study-notebook { margin: .8rem; padding: .9rem; }
  .study-notebook-heading { flex-direction: column; }
  .study-count-card { align-self: stretch; text-align: left; }
  .study-count-card strong, .study-count-card span { display: inline; }
  .study-count-card span { margin-left: .35rem; }
  .study-controls { align-items: stretch; flex-direction: column; }
  .study-filter-list { overflow-x: auto; flex-wrap: nowrap; padding-bottom: .15rem; }
  .study-term-grid { grid-template-columns: 1fr; }
  .study-image-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .career-profile-top { flex-direction: column; }
  .career-profile-status { align-self: flex-start; }
  .career-profile-grid { grid-template-columns: 1fr; }
  .navigator-panel { position: static; order: 0; overflow: auto; padding: .55rem; }
  .navigator-panel > nav { display: flex; gap: .45rem; min-width: max-content; }
  .lesson-link { width: 11rem; }
  .reader-panel { order: 1; }
  .lab-panel { order: 2; min-height: 25rem; }
  .task-panel { order: 3; }
  .objectives { grid-template-columns: 1fr; }
  .command-form { position: sticky; bottom: .5rem; padding: .45rem; border: 1px solid var(--line); border-radius: 10px; background: rgba(6, 16, 21, .94); }
  .terminal-output { max-height: 24rem; }
  .task-form { flex-direction: column; }
  .task-form .button { width: 100%; }
}
