:root {
  color-scheme: dark;
  --bg:#111613;
  --surface:#19201b;
  --surface-hi:#202a22;
  --line:#344337;
  --fg:#f4f8f2;
  --muted:#b6c2b8;
  --green:#bcf46a;
  --deep:#142305;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size:16px;
}
* { box-sizing:border-box; }
body { margin:0; min-height:100vh; display:flex; flex-direction:column; background:var(--bg); color:var(--fg); }
main { flex:1; }
[hidden] { display:none!important; }
button,input,textarea { font:inherit; }
a { color:var(--green); }
a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible,summary:focus-visible { outline:3px solid var(--green); outline-offset:3px; }
button { cursor:pointer; }
button:disabled { opacity:.55; cursor:wait; }
h1,h2,h3,p { margin:0; }
h1 { font-size:clamp(1.95rem, 5vw, 3.9rem); letter-spacing:-.055em; line-height:1.03; }
h2 { font-size:clamp(1.13rem, 3.2vw, 1.42rem); letter-spacing:-.025em; }
p { line-height:1.5; }
.top { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:15px max(16px,calc((100vw - 1190px)/2)); border-bottom:1px solid var(--line); }
.brand { display:flex; gap:10px; align-items:center; text-decoration:none; color:var(--fg); font-size:1rem; font-weight:750; letter-spacing:-.02em; }
.brand b { font-weight:570; color:var(--muted); }
.mark { display:grid; place-items:center; width:35px; height:35px; border-radius:9px; background:var(--green); color:var(--deep); font-size:1.25rem; font-style:italic; font-weight:900; }
.actions,.tab-bar { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.page { max-width:1190px; padding:34px 16px 48px; margin:auto; display:grid; gap:18px; }
.section-heading { display:grid; gap:8px; }
.section-heading h1 { font-size:clamp(1.75rem,5vw,2.85rem); }
.panel,.cover { background:var(--surface); border:1px solid var(--line); border-radius:19px; }
.panel { display:grid; gap:15px; padding:clamp(16px,3vw,28px); min-width:0; }
.stack { display:grid; gap:14px; min-width:0; align-content:start; }
.muted { color:var(--muted); }
.success,.eyebrow { color:var(--green); }
.eyebrow { font-weight:750; }
.primary,.secondary,.ghost,.text-button,.link-button { border-radius:10px; min-height:44px; padding:9px 14px; font-weight:700; line-height:1.3; }
.primary { border:1px solid var(--green); background:var(--green); color:var(--deep); }
.primary:hover { background:#d1ff91; }
.secondary { background:var(--surface-hi); border:1px solid var(--line); color:var(--fg); }
.secondary:hover,.ghost:hover { border-color:var(--green); }
.ghost { padding:6px 9px; background:none; border:1px solid var(--line); color:var(--muted); }
.text-button { justify-self:start; padding-inline:0; background:none; color:var(--green); border:0; text-align:start; }
.link-button { text-decoration:none; display:inline-flex; align-items:center; justify-content:center; width:fit-content; }
.access { grid-template-columns:minmax(0,1.25fr) minmax(0,1fr); align-items:stretch; }
.cover { position:relative; overflow:hidden; isolation:isolate; display:flex; align-items:flex-end; min-height:530px; }
.cover-photo { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:center 39%; z-index:-2; }
.cover::after { content:""; position:absolute; inset:0; background:linear-gradient(0deg,#101912 4%,#111813e8 30%,#14241a10 79%); z-index:-1; }
.cover-content { display:grid; gap:10px; padding:clamp(18px,4vw,36px); }
.cover-content h1 { max-width:9ch; }
.cover-content p { color:#e0ebe0; max-width:31ch; }
.avatar { width:clamp(64px,11vw,116px); height:auto; aspect-ratio:1; object-fit:cover; border:2px solid var(--green); border-radius:20%; background:var(--bg); }
.access-form { align-content:center; }
.access-form h2 { font-size:1.75rem; }
.code-form,.audio-form { border-top:1px solid var(--line); margin-top:4px; padding-top:14px; }
.field { display:grid; gap:6px; font-size:.93rem; font-weight:650; }
.field input,.field textarea { color:var(--fg); background:#101612; border:1px solid #536257; border-radius:10px; width:100%; padding:10px 12px; min-height:46px; }
.field textarea { resize:vertical; }
.check { display:flex; align-items:flex-start; gap:9px; color:var(--muted); font-size:.92rem; line-height:1.45; }
.check input { margin:3px 0 0; accent-color:var(--green); width:18px; height:18px; flex:none; }
.message { color:var(--green); font-size:.91rem; }
.message:empty { display:none; }
.student-cover { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:clamp(15px,3vw,32px); border:1px solid var(--line); border-radius:19px; background:linear-gradient(90deg,#172a18,#111813b0),url("/academia.png") center 42% / cover; }
.student-cover p { margin-top:8px; color:var(--muted); }
.student-layout { display:grid; grid-template-columns:218px minmax(0,1fr); gap:18px; }
.navigation { display:grid; align-content:start; gap:7px; }
.navigation a { background:var(--surface); color:var(--fg); min-height:46px; display:flex; align-items:center; gap:9px; border:1px solid var(--line); border-radius:10px; text-decoration:none; padding:8px 12px; font-size:.97rem; font-weight:650; }
.navigation a:hover,.navigation a[aria-current] { color:var(--green); background:#22321b; border-color:#7a975a; }
.nav-icon { font-size:1.05rem; color:var(--green); width:17px; flex:none; }
.student-area { display:grid; align-content:start; gap:15px; min-width:0; scroll-margin:15px; }
.student-area:focus { outline:none; }
.exercise-list { display:grid; gap:8px; }
.exercise { border:1px solid var(--line); border-radius:11px; background:#151d17; }
.exercise summary { cursor:pointer; padding:12px; font-weight:700; }
.exercise summary span:first-of-type { margin-left:4px; }
.exercise .stats { display:block; margin:5px 0 0 20px; font-size:.89rem; font-weight:500; }
.exercise-detail { padding:0 12px 12px; display:grid; gap:10px; }
.exercise-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.exercise-form button,.exercise-form .message { grid-column:1/-1; }
.activity { margin:0; padding:0; list-style:none; }
.activity li,.student-list>div { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; padding:12px 0; border-bottom:1px solid var(--line); }
.activity span,.student-list span { display:block; }
.activity li:last-child,.student-list>div:last-child { border-bottom:0; }
.exercise-editor { display:grid; gap:8px; border:1px solid var(--line); border-radius:11px; padding:12px; min-width:0; }
.chat-feed { display:grid; gap:12px; }
.chat-feed article { white-space:normal; overflow-wrap:anywhere; padding:13px; border-radius:10px; }
.chat-feed article>strong { display:block; margin-bottom:4px; color:var(--green); }
.chat-user { background:#253720; }
.chat-rai { background:#151d17; border:1px solid var(--line); }
.prose { display:grid; gap:11px; overflow-wrap:anywhere; }
.prose ul,.prose ol { padding-inline-start:22px; margin:0; }
.prose li { line-height:1.45; }
.dialog { max-width:min(550px,calc(100vw - 28px)); padding:21px; background:var(--surface); color:var(--fg); border:1px solid var(--line); border-radius:15px; }
.dialog::backdrop { background:#030804cc; }
.dialog h2,.dialog p { margin-bottom:12px; }
footer { display:grid; gap:3px; padding:18px 15px; border-top:1px solid var(--line); text-align:center; font-size:.85rem; color:var(--muted); }
footer strong { color:var(--fg); }
.skip { position:absolute; top:0; left:12px; transform:translateY(-150%); background:var(--bg); padding:8px; }
.skip:focus { transform:none; }
@media (max-width: 740px) {
  .page { padding-top:20px; }
  .access,.student-layout { grid-template-columns:1fr; }
  .cover { min-height:270px; }
  .cover-content { grid-template-columns:auto 1fr; align-items:center; gap:8px 10px; }
  .cover-content h1 { max-width:14ch; }
  .cover-content p { grid-column:1/-1; }
  .navigation { grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
  .navigation a { font-size:.91rem; padding:7px 8px; }
}
@media (max-width: 370px) {
  .brand b { display:none; }
  .actions { gap:5px; }
}
