:root {
  color-scheme: dark;
  --bg: #101421;
  --panel: #191f31;
  --line: #343b52;
  --ink: #f5f3ff;
  --muted: #b5bdd7;
  --accent: #d9fb95;
  --violet: #cbbcff;
  font: 16px/1.55 Inter, system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
button, select, textarea, input { font: inherit; }
button, select { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
[hidden], #nexusAuthModal.hidden, #nexusProfileModal.hidden { display: none !important; }
h1, h2, h3, p { margin: 0; }
.wrap { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.top { border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 70px; }
.top a, .button { text-decoration: none; }
.brand { font-size: 1.18rem; font-weight: 850; white-space: nowrap; }
.brand span { color: var(--accent); margin-right: 5px; }
nav { display: flex; flex-wrap: wrap; gap: clamp(10px, 3vw, 32px); color: var(--muted); }
nav [aria-current] { color: var(--accent); }
.account { max-width: 180px; overflow-wrap: anywhere; font-size: .88rem; }
.hero { position: relative; isolation: isolate; overflow: hidden; display: grid; align-items: center; grid-template-columns: 1.12fr 1fr; gap: 16px; padding: clamp(26px, 5vw, 62px); margin: 26px 0 20px; border: 1px solid #403d61; border-radius: 28px; background: radial-gradient(ellipse at 88% 32%, #392c69, transparent 65%), #222038; }
.hero-copy { z-index: 1; }
.eyebrow { font-size: .77rem; font-weight: 800; letter-spacing: .13em; color: var(--accent); }
h1 { font-size: clamp(2.7rem, 7vw, 5.55rem); line-height: .99; letter-spacing: -.068em; margin: 17px 0 20px; }
h1 em { font-style: normal; color: var(--accent); }
.hero-copy > p:not(.eyebrow) { max-width: 40ch; color: #e1dcef; margin-bottom: 24px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .7em; border: 1px solid transparent; border-radius: 10px; padding: .63em .92em; color: var(--ink); background: transparent; font-weight: 750; line-height: 1.4; }
.primary { background: var(--accent); color: #1d2910; }
.secondary { border-color: #686184; background: #272741; }
.button:hover { filter: brightness(1.12); }
.button:disabled { cursor: wait; opacity: .65; }
.orbit { position: relative; min-height: 270px; display: grid; place-items: center; }
.planet { width: clamp(105px, 18vw, 222px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 22%, #f4ffdc 0%, #d9fa9d 22%, #91bc70 44%, #414779 70%, #252344 88%); box-shadow: 0 0 70px #c2f39638, inset -16px -18px 28px #20274984; }
.orbit-ring { position: absolute; width: min(96%, 414px); aspect-ratio: 2.42; border: 1px solid #c5aef2a0; border-radius: 50%; transform: rotate(-27deg); }
.orbit-ring.inner { width: min(80%, 340px); transform: rotate(27deg); opacity: .65; z-index: 1; }
.sat { position: absolute; display: grid; place-items: center; width: 44px; aspect-ratio: 1; z-index: 2; border-radius: 14px; border: 1px solid #a595d3; background: #39315e; color: #f3ebff; font-size: 1.4rem; }
.sat-a { right: 8%; top: 16%; }
.sat-b { left: 11%; bottom: 16%; }
.sat-c { right: 11%; bottom: 12%; color: var(--accent); }
.settings, .panel { border: 1px solid var(--line); background: var(--panel); border-radius: 17px; }
.settings { display: flex; flex-wrap: wrap; gap: 18px 30px; align-items: center; justify-content: space-between; padding: 19px 23px; scroll-margin-top: 16px; }
h2 { font-size: 1.35rem; line-height: 1.25; letter-spacing: -.025em; }
.settings p, .muted, .assessment p { color: var(--muted); font-size: .9rem; }
.grades { border: 0; margin: 0; padding: 0; min-width: 0; }
.grades legend, .time { color: var(--muted); font-size: .83rem; }
#grades { display: flex; flex-wrap: wrap; gap: 5px; }
.grade { position: relative; display: grid; cursor: pointer; }
.grade input { position: absolute; opacity: 0; }
.grade span, select { background: #242b40; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; }
.grade input:checked + span { background: var(--violet); color: #231942; border-color: var(--violet); font-weight: 800; }
.grade input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.time { display: grid; gap: 4px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(260px, 1fr); gap: 28px; margin-block: 34px; }
.section-title { display: flex; gap: 12px; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.section-title span { color: var(--violet); font-size: .87rem; }
#plan-note, #ai-status { margin-bottom: 12px; }
.day { margin-bottom: 13px; padding: 14px 16px; }
.day summary { cursor: pointer; font-weight: 800; }
.day summary span { color: var(--muted); font-size: .86rem; font-weight: 500; }
.task { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: start; gap: 11px; padding: 14px 0 2px; margin-top: 12px; border-top: 1px solid var(--line); }
.task-icon, .assessment-icon { display: grid; place-items: center; width: 36px; height: 36px; background: #343052; color: var(--violet); border-radius: 9px; }
.task h3, .assessment h3 { font-size: 1.05rem; }
.task p { color: var(--muted); font-size: .87rem; }
.task .button { align-self: center; font-size: .83rem; }
.assessment { padding: 18px; margin-bottom: 12px; }
.assessment > * + * { margin-top: 9px; }
.skill { margin-top: 8px; }
.skill span { display: flex; justify-content: space-between; gap: 6px; font-size: .85rem; }
progress { width: 100%; height: 8px; accent-color: var(--violet); }
.text-link { color: var(--violet); }
footer.wrap { display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: space-between; color: var(--muted); border-top: 1px solid var(--line); padding: 20px 0 28px; font-size: .9rem; }
dialog { width: min(700px, calc(100% - 24px)); max-height: 90dvh; background: var(--panel); border: 1px solid #656084; border-radius: 18px; color: var(--ink); padding: clamp(15px, 4vw, 27px); }
dialog::backdrop { background: #080b17c9; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 15px; }
.icon-button { border: 1px solid var(--line); color: inherit; background: #292c42; border-radius: 8px; width: 40px; height: 40px; flex: 0 0 auto; }
.question { min-width: 0; margin: 16px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.question legend { padding: 0 5px; font-weight: 700; }
.option { display: flex; gap: 9px; align-items: baseline; padding: 5px 0; cursor: pointer; }
.option input { accent-color: var(--accent); }
.reason { display: grid; gap: 6px; margin: 15px 0; }
textarea { width: 100%; min-height: 75px; resize: vertical; background: #111728; color: var(--ink); border: 1px solid #686184; border-radius: 8px; padding: 8px; }
.result { margin-block: 12px; padding: 12px; border-left: 3px solid var(--violet); background: #24283d; }
.result > * + *, .lab-content > * + *, .ai-result > * + * { margin-top: 8px; }
.ai-result { margin-top: 16px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; }
@media (max-width: 760px) {
  .wrap { width: calc(100% - 28px); }
  .hero { grid-template-columns: 1fr; }
  .orbit { position: absolute; width: 51%; right: -13%; top: -20px; opacity: .48; z-index: -1; }
  .workspace { grid-template-columns: 1fr; }
  .top-inner { flex-wrap: wrap; padding-block: 11px; gap: 6px 13px; }
  .top nav { order: 3; width: 100%; }
}
@media (max-width: 400px) {
  .task { grid-template-columns: 32px 1fr; }
  .task .button { grid-column: 2; justify-self: start; }
}
.ai-feedback { white-space: pre-wrap; overflow-wrap: anywhere; }
