:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #090b12; --bg-soft: #0d1019; --surface: #121620; --surface-2: #181d29;
  --line: #252b39; --text: #f2f4fa; --muted: #8d96aa; --primary: #8b7cff;
  --primary-2: #5de1d1; --success: #56d99b; --danger: #ff7085; --radius: 16px;
  color: var(--text); background: var(--bg);
}
* { box-sizing:border-box; }
html { min-height:100%; background:var(--bg); }
body { min-height:100vh; margin:0; background:radial-gradient(circle at 10% -10%, #5d43ba26 0, transparent 32rem), radial-gradient(circle at 100% 30%, #1b95851c 0, transparent 30rem), var(--bg); }
body::before { content:""; position:fixed; inset:0; z-index:-1; opacity:.22; background-image:linear-gradient(#ffffff05 1px, transparent 1px),linear-gradient(90deg,#ffffff05 1px,transparent 1px); background-size:40px 40px; mask-image:linear-gradient(to bottom,black,transparent 80%); }
a { color:#a99fff; text-decoration:none; transition:.2s ease; } a:hover { color:#c8c2ff; }
button,input,textarea,select { font:inherit; }
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible { outline:2px solid var(--primary-2); outline-offset:3px; }
.topbar { position:sticky; top:0; z-index:10; display:flex; align-items:center; gap:2rem; min-height:70px; padding:.7rem max(1rem,calc((100vw - 1180px)/2)); border-bottom:1px solid #ffffff0d; background:#090b12d9; backdrop-filter:blur(18px); }
.brand { display:flex; align-items:center; gap:.7rem; color:var(--text); font-size:1.12rem; font-weight:750; letter-spacing:-.03em; }.brand:hover{color:white}.brand>span:last-child span{color:var(--primary-2)}
.brand-mark,.auth-icon { display:grid; place-items:center; width:36px; height:36px; border:1px solid #ffffff26; border-radius:11px; color:white; background:linear-gradient(135deg,var(--primary),#604ee0 55%,#2c9d98); box-shadow:0 8px 24px #6855ea4d; }
.topbar nav { display:flex; align-items:center; gap:.35rem; margin:auto; }.topbar nav a { padding:.55rem .8rem; border-radius:9px; color:var(--muted); font-size:.9rem; }.topbar nav a:hover { color:white; background:#ffffff0a; }.topbar nav span { color:var(--primary-2); margin-right:.25rem; }
.account { display:flex; align-items:center; gap:.55rem; color:var(--muted); font-size:.85rem; }.avatar { display:grid; place-items:center; width:31px; height:31px; border:1px solid #ffffff18; border-radius:50%; color:#dcd8ff; background:#8b7cff25; }.account form{display:flex}.logout { padding:.4rem; border:0; color:var(--muted); background:none; cursor:pointer; }.logout:hover{color:var(--danger)}
.page-shell { width:min(1120px,calc(100% - 2rem)); min-height:calc(100vh - 150px); margin:0 auto; padding:4rem 0; }
footer { padding:1.5rem; border-top:1px solid #ffffff0a; color:#596174; text-align:center; font-size:.78rem; letter-spacing:.08em; text-transform:uppercase; }footer span{color:var(--primary)}
h1,h2,h3,p { margin-top:0; }h1 { margin-bottom:.7rem; font-size:clamp(2rem,4vw,3.5rem); line-height:1.02; letter-spacing:-.055em; }h2{letter-spacing:-.025em}h3{margin-bottom:.3rem}.lead{max-width:46rem;color:var(--muted);font-size:1.02rem;line-height:1.7}.eyebrow{margin-bottom:.7rem;color:var(--primary-2);font-size:.73rem;font-weight:750;letter-spacing:.16em;text-transform:uppercase}
.page-heading { display:flex; justify-content:space-between; align-items:center; gap:2rem; margin-bottom:3rem; }.page-heading.compact{margin-bottom:2rem}.heading-orb { display:grid; place-items:center; flex:0 0 auto; width:92px; height:92px; border:1px solid #a99fff30; border-radius:28px; color:#c7c1ff; background:linear-gradient(145deg,#9c8fff24,#5de1d10d); box-shadow:inset 0 1px #ffffff16,0 30px 70px #654edd20; font-size:2rem; transform:rotate(6deg); }.section-title{margin:0 0 1rem;font-size:1.15rem;color:#dfe3ee}
.primary,.button { display:inline-flex; align-items:center; justify-content:center; gap:.5rem; padding:.7rem 1rem; border:1px solid #a99fff4d; border-radius:10px; color:white; background:linear-gradient(135deg,#8878f7,#6655db); box-shadow:0 8px 24px #6d59e32e; cursor:pointer; }.primary:hover,.button:hover{color:white;filter:brightness(1.1);transform:translateY(-1px)}.wide{width:100%}.text-action{font-size:.85rem;font-weight:650}.back-link{display:inline-block;margin-bottom:2rem;color:var(--muted)}
input,textarea,select { width:100%; padding:.75rem .85rem; border:1px solid var(--line); border-radius:10px; color:var(--text); background:#0b0e16; transition:.2s; }input:hover,textarea:hover{border-color:#3b4356}input:focus,textarea:focus{border-color:var(--primary);box-shadow:0 0 0 3px #8b7cff18}label{display:block;margin-bottom:.4rem;color:#c5cad6;font-size:.85rem}form p{margin-bottom:1rem}.errorlist{padding:.6rem .8rem;border:1px solid #ff70853d;border-radius:8px;color:#ff98a7;background:#ff708512;list-style:none;font-size:.85rem}
.group-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:1rem; }.group-card { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:1rem; min-height:125px; padding:1.3rem; border:1px solid var(--line); border-radius:var(--radius); color:var(--text); background:linear-gradient(145deg,#171b27,#10141d); box-shadow:0 18px 45px #00000024; }.group-card:hover{border-color:#8b7cff70;color:white;transform:translateY(-3px);box-shadow:0 22px 55px #0006,0 0 30px #7b68ee13}.group-card h2{margin:0 0 .4rem;font-size:1.05rem}.group-card p{margin:0;color:var(--muted);font-size:.82rem}.card-icon{display:grid;place-items:center;width:43px;height:43px;border:1px solid #8b7cff35;border-radius:12px;color:#b8afff;background:#8b7cff16}.card-arrow{color:#626b7f;font-size:1.2rem;transition:.2s}.group-card:hover .card-arrow{color:var(--primary-2);transform:translateX(3px)}.empty-state{grid-column:1/-1;padding:4rem;border:1px dashed #303747;border-radius:var(--radius);color:var(--muted);text-align:center}.empty-state>span{font-size:2rem;color:var(--primary)}
.course,.content-panel,.search,.cards { border:1px solid var(--line); border-radius:var(--radius); background:linear-gradient(145deg,#151924,#10131c); box-shadow:0 16px 40px #0003; }.course{margin:0 0 1rem;padding:1.3rem}.course-head{display:flex;align-items:center;gap:1rem;margin-bottom:1rem}.course-head p{margin:0;color:var(--muted);font-size:.88rem}.course ul{padding:0;margin:0;list-style:none}.course li a{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:1rem;padding:.8rem;border-top:1px solid #ffffff0a;color:#cdd2de}.course li a:hover{padding-left:1rem;color:white;background:#ffffff04}.lecture-date{padding:.32rem .5rem;border-radius:7px;color:var(--primary-2);background:#5de1d112;font-size:.75rem;font-weight:700}
.search{margin-bottom:2rem;padding:1.2rem}.search>div{display:flex;gap:.7rem}.search input{min-width:0}.cards{padding:.35rem 1rem;list-style:none}.cards li{display:flex;justify-content:space-between;align-items:center;gap:1rem;min-height:58px;padding:.75rem .25rem;border-bottom:1px solid #ffffff0a}.cards li:last-child{border:0}.cards small{color:var(--muted)}
.heading-actions{display:flex;gap:.6rem;flex-wrap:wrap}.creation-grid{display:grid;grid-template-columns:1fr 1fr;gap:1rem;margin-bottom:2rem}.create-panel{margin:0 0 2rem;padding:1.3rem;border:1px solid var(--line);border-radius:var(--radius);background:linear-gradient(145deg,#151924,#10131c);box-shadow:0 16px 40px #0003}.create-panel h2{font-size:1.1rem}.create-panel.is-collapsed{display:none}.create-panel textarea{resize:vertical}
.page-heading + details.content-panel{margin-bottom:1.5rem}details.content-panel summary{cursor:pointer;color:var(--primary-2);font-weight:650}details.content-panel form{margin-top:1rem}
.message { padding:.8rem 1rem;border:1px solid #56d99b33;border-radius:10px;color:#9aefc4;background:#56d99b12; }.columns{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.content-panel{padding:1.3rem}.entries article{margin-top:.8rem;padding:1rem;border:1px solid #ffffff0b;border-radius:11px;background:#0c0f17}.entries article small{float:right;color:var(--muted)}
.auth-card { width:min(420px,100%); margin:3vh auto; padding:2rem; border:1px solid var(--line); border-radius:22px; background:linear-gradient(145deg,#171b26e8,#0e1119e8); box-shadow:0 35px 90px #0008,0 0 60px #7865e515; backdrop-filter:blur(14px); }.auth-icon{width:48px;height:48px;margin-bottom:2rem}.auth-card h1{font-size:2.3rem}.auth-card .lead{margin-bottom:2rem;font-size:.9rem}
.auth-switch{margin:1.4rem 0 0;text-align:center;color:var(--muted);font-size:.88rem}.auth-switch a{font-weight:700}
.chat-messages{height:28rem;overflow-y:auto;padding:1.2rem;border:1px solid var(--line);border-radius:var(--radius);background:#0d1018}.chat-message{max-width:70%;margin:.6rem 0;padding:.75rem 1rem;border:1px solid #ffffff0c;border-radius:4px 13px 13px;background:#191e2a}.chat-message.own{margin-left:auto;border-color:#8b7cff28;background:#302951}.chat-message small{float:right;margin-left:1rem;color:var(--muted)}.chat-message p{margin:.4rem 0 0;white-space:pre-wrap}.chat-form{margin-top:1rem}.chat-form textarea{width:100%}
.group-chat-widget{position:fixed;right:8.5rem;bottom:1.25rem;z-index:20;width:min(23rem,calc(100vw - 2rem));height:34rem;display:grid;grid-template-rows:auto 1fr auto;overflow:hidden;border:1px solid #343b4b;border-radius:16px;background:#0e1119;box-shadow:0 25px 80px #000b,0 0 45px #765fe31a}.group-chat-widget[hidden],.open-chat[hidden]{display:none}.widget-header{display:flex;justify-content:space-between;align-items:center;padding:.85rem 1rem;border-bottom:1px solid #ffffff10;color:white;background:linear-gradient(135deg,#211c3e,#151a28)}.widget-header div{display:flex;flex-direction:column}.widget-header small{color:var(--primary-2)}.widget-header button{width:2rem;height:2rem;padding:0;border:0;color:var(--muted);background:transparent;font-size:1.5rem;cursor:pointer}.widget-messages{overflow-y:auto;padding:.8rem;background-color:#0b0e15;background-image:radial-gradient(#ffffff0a .7px,transparent .7px);background-size:12px 12px}.widget-message{clear:both;float:left;max-width:78%;margin:.25rem 0;padding:.55rem .75rem;border:1px solid #ffffff0b;border-radius:3px 11px 11px;background:#1a1f2b;box-shadow:0 4px 12px #0003}.widget-message.own{float:right;border-color:#8b7cff26;border-radius:11px 3px 11px 11px;background:#332b58}.widget-message strong{display:block;color:var(--primary-2);font-size:.76rem}.widget-message p{margin:.15rem 0;white-space:pre-wrap;overflow-wrap:anywhere}.widget-message small{display:block;text-align:right;color:var(--muted);font-size:.66rem}.widget-chat-form{display:flex;gap:.5rem;padding:.65rem;border-top:1px solid #ffffff0d;background:#11151f}.widget-chat-form textarea{flex:1;resize:none;padding:.65rem .8rem;border-radius:18px}.widget-chat-form button{width:2.6rem;height:2.6rem;border:0;border-radius:50%;color:white;background:linear-gradient(135deg,var(--primary),#5d4fd2);cursor:pointer}.open-chat{position:fixed;right:8.5rem;bottom:1.25rem;z-index:20;padding:.8rem 1rem;border:1px solid #9689ff44;border-radius:24px;color:white;background:#19152d;box-shadow:0 10px 35px #0008;cursor:pointer}.open-chat span{margin-right:.35rem}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

.peggy-support{position:fixed;right:1rem;bottom:.6rem;z-index:40}.peggy-button{position:relative;width:7rem;padding:0;border:0;color:white;background:none;cursor:pointer;filter:drop-shadow(0 10px 16px #0008)}.peggy-button img{display:block;width:100%;transition:transform .25s ease,filter .25s ease;transform-origin:bottom center}.peggy-button>span{position:absolute;right:.1rem;bottom:.15rem;padding:.3rem .65rem;border:1px solid #ff9fbc80;border-radius:1rem;background:#a82e5f;color:white;font-size:.72rem;font-weight:800;box-shadow:0 5px 18px #0006}.peggy-greeting{position:absolute;right:5.4rem;bottom:6.6rem;width:max-content;max-width:13rem;padding:.55rem .8rem;border:1px solid #ff9fbc70;border-radius:13px 13px 2px 13px;color:#63203c;background:#fff4f7;font-size:.78rem;font-weight:750;opacity:0;pointer-events:none;transform:translateY(.5rem) scale(.95);transition:.22s ease}.peggy-support:not(.is-open):hover .peggy-greeting{opacity:1;transform:none}.peggy-support:not(.is-open):hover .peggy-button img{animation:peggy-happy .55s ease;filter:brightness(1.06) saturate(1.08)}
.peggy-panel{position:absolute;right:.25rem;bottom:7.5rem;width:min(25rem,calc(100vw - 2rem));max-height:min(39rem,calc(100vh - 9rem));overflow:hidden;border:1px solid #ff8eb35c;border-radius:18px;background:#11151f;box-shadow:0 24px 80px #000c,0 0 40px #e7568c1c}.peggy-panel[hidden]{display:none}.peggy-panel header{display:flex;justify-content:space-between;align-items:center;padding:1rem 1.1rem;color:white;background:linear-gradient(135deg,#a72f60,#da5f89)}.peggy-panel header div{display:flex;flex-direction:column}.peggy-panel header small{margin-top:.18rem;color:#ffe3ec}.peggy-panel header button{border:0;color:white;background:none;font-size:1.6rem;cursor:pointer}.peggy-content{max-height:calc(min(39rem,calc(100vh - 9rem)) - 4.5rem);padding:1rem;overflow-y:auto}.peggy-content h2{margin:0 0 .75rem;font-size:.9rem;color:#ff9fbd}.peggy-content h2:not(:first-child){margin-top:1.2rem}.peggy-content details{border-bottom:1px solid #ffffff10}.peggy-content summary{padding:.7rem .1rem;color:#e8eaf0;cursor:pointer;font-size:.86rem;font-weight:650}.peggy-content details p{padding:0 .2rem .75rem;margin:0;color:var(--muted);font-size:.8rem;line-height:1.55}.peggy-ticket-form label{margin-bottom:.75rem}.peggy-ticket-form input,.peggy-ticket-form textarea{margin-top:.3rem}.peggy-ticket-form textarea{resize:vertical}
@keyframes peggy-happy{0%,100%{transform:rotate(0) scale(1)}25%{transform:rotate(-4deg) translateY(-5px) scale(1.04)}55%{transform:rotate(4deg) translateY(-8px) scale(1.07)}75%{transform:rotate(-2deg) translateY(-4px) scale(1.04)}}
::-webkit-scrollbar{width:9px}::-webkit-scrollbar-track{background:#0b0e15}::-webkit-scrollbar-thumb{border:2px solid #0b0e15;border-radius:9px;background:#343a4a}
.group-chat-widget,.open-chat{right:1.25rem}
@media(max-width:700px){.topbar{flex-wrap:wrap;gap:.5rem;padding:.65rem 1rem}.topbar nav{order:3;width:100%;justify-content:center;border-top:1px solid #ffffff0a;padding-top:.5rem}.account-name{display:none}.page-shell{padding:2.3rem 0}.page-heading{align-items:flex-start}.heading-orb{width:62px;height:62px;border-radius:18px}.columns{grid-template-columns:1fr}.search>div{flex-direction:column}.cards li{align-items:flex-start;flex-direction:column}.cards li form,.cards li button{width:100%}}
@media(max-width:700px){.creation-grid{grid-template-columns:1fr}.heading-actions{justify-content:flex-end}.page-heading{flex-wrap:wrap}}
@media(max-width:500px){h1{font-size:2.2rem}.group-chat-widget{right:.5rem;bottom:7.5rem;width:calc(100vw - 1rem);height:min(34rem,calc(100vh - 9rem))}.open-chat{right:7.7rem}.page-heading{gap:1rem}.heading-orb{display:none}.peggy-button{width:6.5rem}.peggy-panel{right:0;bottom:7rem}.peggy-greeting{display:none}}
@media(max-width:500px){.group-chat-widget{right:.5rem;bottom:.5rem;height:min(34rem,calc(100vh - 1rem))}.open-chat{right:.5rem}}
