/* Studio: a quieter, more focused visual language for students and teachers. */
:root {
  --bg: #f7f8f5; --surface: #ffffff; --surface2: #f0f3f1;
  --ink: #19283a; --muted: #607185; --line: #e1e8e7;
  --brand: #196b72; --brand-deep: #11535b; --brand-ink: #ffffff;
  --brand-soft: #e2f3f0; --accent: #ffb65c; --accent-deep: #d58a2d;
  --ok: #208b67; --ok-deep: #176c50; --ok-soft: #e0f5eb; --ok-ink: #17664e;
  --warn: #de983a; --warn-deep: #ab6818; --warn-soft: #fff3e1; --warn-ink: #8b561b;
  --bad: #cf675c; --bad-deep: #a8463d; --bad-soft: #fcece8; --bad-ink: #a3453d;
  --ok-fill: #208b67; --ok-fill-ink: #fff; --ok-edge: #176c50;
  --warn-fill: #f5b552; --warn-fill-ink: #342411; --warn-edge: #ba7c25;
  --bad-fill: #bc574e; --bad-fill-ink: #fff; --bad-edge: #933c34;
  --shadow: 0 16px 48px rgba(29, 55, 66, .08);
  --r-card: 22px; --r-btn: 13px; --r-in: 13px;
  --hh: 74px; --side: 258px;
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111a28; --surface: #1b2838; --surface2: #223344;
    --ink: #eef4f2; --muted: #a9bac7; --line: #354657;
    --brand: #75d4c8; --brand-deep: #51b9ad; --brand-ink: #09282b;
    --brand-soft: #203f46; --accent: #f4ba6c; --accent-deep: #d79846;
    --ok: #70d0a1; --ok-deep: #45aa7e; --ok-soft: #1c3e36; --ok-ink: #87dfb3;
    --warn: #e9b96e; --warn-deep: #c2944d; --warn-soft: #443625; --warn-ink: #f1c983;
    --bad: #ed9388; --bad-deep: #ca6d64; --bad-soft: #492d32; --bad-ink: #f4a399;
    --ok-fill: #70d0a1; --ok-fill-ink: #09291b; --ok-edge: #45aa7e;
    --warn-fill: #e9b96e; --warn-fill-ink: #30200a; --warn-edge: #c2944d;
    --bad-fill: #ed9388; --bad-fill-ink: #2f0c0a; --bad-edge: #ca6d64;
    --shadow: 0 20px 50px rgba(0, 0, 0, .18);
  }
}
:root[data-theme="dark"] {
  --bg: #111a28; --surface: #1b2838; --surface2: #223344;
  --ink: #eef4f2; --muted: #a9bac7; --line: #354657;
  --brand: #75d4c8; --brand-deep: #51b9ad; --brand-ink: #09282b;
  --brand-soft: #203f46; --accent: #f4ba6c; --accent-deep: #d79846;
  --ok: #70d0a1; --ok-deep: #45aa7e; --ok-soft: #1c3e36; --ok-ink: #87dfb3;
  --warn: #e9b96e; --warn-deep: #c2944d; --warn-soft: #443625; --warn-ink: #f1c983;
  --bad: #ed9388; --bad-deep: #ca6d64; --bad-soft: #492d32; --bad-ink: #f4a399;
  --ok-fill: #70d0a1; --ok-fill-ink: #09291b; --ok-edge: #45aa7e;
  --warn-fill: #e9b96e; --warn-fill-ink: #30200a; --warn-edge: #c2944d;
  --bad-fill: #ed9388; --bad-fill-ink: #2f0c0a; --bad-edge: #ca6d64;
  --shadow: 0 20px 50px rgba(0, 0, 0, .18);
}

body { background: var(--bg); color: var(--ink); font-weight: 450; letter-spacing: -.008em; }
body::before { content: ""; position: fixed; z-index: -1; width: 38vw; height: 38vw; min-width: 320px; min-height: 320px; right: -14vw; top: -18vw; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--brand) 8%, transparent), transparent 68%); pointer-events: none; }
a { color: var(--brand); font-weight: 650; }
h1, h2, h3, b, strong { letter-spacing: -.035em; }
h1 { font-size: clamp(30px, 3vw, 40px); line-height: 1.14; font-weight: 750; margin-top: 34px; }
h2 { font-size: clamp(20px, 2vw, 25px); font-weight: 720; margin-top: 34px; }
h3 { font-weight: 700; }
.wrap { max-width: 1060px; padding: 0 clamp(18px, 3vw, 40px) 68px; }
.wrap.wide { max-width: 1480px; }
.grid { gap: 18px; }
.page-head { margin: 34px 0 26px; align-items: center; }
.page-head .sub, p.lead { font-size: 15px; line-height: 1.6; }
.section-title { margin-top: 36px; }
.card, .rail-card { border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); border-radius: var(--r-card); padding: 22px; }
.card.flat { background: var(--surface2); }
.card.lift { border-color: var(--line); }
.card h3 { margin-bottom: 12px; }

/* A filtered ancestor changes the containing block of position:fixed nav. */
header.top { background: var(--surface); border-bottom: 1px solid var(--line); backdrop-filter: none; -webkit-backdrop-filter: none; }
header.top .in { min-height: var(--hh); padding: 11px 24px; gap: 22px; }
.brand { gap: 11px; }
.brand .logo { width: 40px; height: 40px; filter: drop-shadow(0 5px 8px rgba(18, 91, 97, .17)); }
.wordmark { font-size: 21px; letter-spacing: -.055em; font-weight: 750; }
nav.main { gap: 4px; }
nav.main a { border: 0; border-radius: 11px; font-size: 14px; font-weight: 600; letter-spacing: 0; min-height: 43px; padding: 10px 13px; transition: background .2s, color .2s, transform .2s; }
nav.main a:hover { transform: translateX(2px); background: var(--surface2); color: var(--ink); }
nav.main a.on { border: 0; background: var(--brand-soft); color: var(--brand); }
nav.main a.on::before { content: ""; width: 4px; height: 20px; border-radius: 9px; background: currentColor; margin-left: -5px; }
html { scrollbar-color: color-mix(in srgb, var(--muted) 40%, var(--line)) transparent; scrollbar-width: thin; }
nav.main { scrollbar-color: color-mix(in srgb, var(--muted) 34%, var(--line)) transparent; scrollbar-width: thin; }
nav.main::-webkit-scrollbar { width: 6px; height: 6px; }
nav.main::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--muted) 34%, var(--line)); border-radius: 999px; }
nav.main::-webkit-scrollbar-track { background: transparent; }
.who { gap: 10px; }
.avatar { width: 36px; height: 36px; background: var(--brand-soft); color: var(--brand); box-shadow: none; font-size: 14px; }
.who-name { color: var(--ink); font-weight: 650; }
@media (min-width: 1024px) {
  .r-s nav.main, .r-t nav.main { border-right: 1px solid var(--line); top: calc(var(--hh) + env(safe-area-inset-top) + 1px); padding: 22px 14px; gap: 5px; overflow-x: hidden; overflow-y: auto; }
  .r-s nav.main a, .r-t nav.main a { min-height: 45px; padding: 10px 13px; font-size: 14px; text-transform: none; letter-spacing: 0; }
  .r-s nav.main a svg.i, .r-t nav.main a svg.i { width: 19px; height: 19px; stroke-width: 2.1; }
  .r-t nav.main .sep { height: 1px; margin: 10px 12px; }
}
@media (max-width: 1023.98px) {
  .r-t header.top { position: sticky; top: 0; }
  .r-t nav.main { margin: 0 -8px; }
  .r-t nav.main a.on::before { display: none; }
  .r-t nav.main a.on { box-shadow: inset 0 -2px 0 var(--brand); }
}
@media (max-width: 767.98px) {
  .r-s nav.main { border-top: 1px solid var(--line); box-shadow: 0 -12px 30px rgba(24, 45, 54, .08); }
  .r-s nav.main a { border-radius: 12px; font-size: 12px; }
  .r-s nav.main a.on::before { display: none; }
  .r-s nav.main a svg.i { width: 23px; height: 23px; }
  header.top .in { padding: 8px 16px; gap: 8px; }
  .wordmark { font-size: 18px; }
}

.btn { --edge: 0px; border: 1px solid var(--line); box-shadow: none; border-radius: var(--r-btn); min-height: 44px; padding: 10px 17px; font-weight: 650; font-size: 14px; letter-spacing: 0; transition: background .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s; }
.btn:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: 0 9px 20px rgba(20, 70, 78, .12); filter: none; }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn.primary, .btn.okb, .btn.warnb { border: 1px solid transparent; min-height: 46px; text-transform: none; letter-spacing: 0; font-size: 14px; }
.btn.primary { background: var(--brand); color: var(--brand-ink); }
.btn.okb { background: var(--ok-fill); color: var(--ok-fill-ink); }
.btn.warnb { background: var(--warn-fill); color: var(--warn-fill-ink); }
.btn.primary:hover, .btn.okb:hover, .btn.warnb:hover { border-color: transparent; filter: none; }
.btn.soft { border-color: transparent; }
.btn.ghost { box-shadow: none; border-color: transparent; }
.btn.sm { min-height: 38px; padding: 7px 13px; font-size: 13px; border-radius: 10px; }
.badge, .chip { border: 1px solid transparent; padding: 4px 10px; font-size: 12px; font-weight: 650; letter-spacing: 0; }
.badge { background: var(--surface2); color: var(--muted); }
.chip { background: var(--surface2); }
.progressbar, .bar { height: 9px; }
.progressbar > i::after, .qbar > i::after { display: none; }
.rule { font-weight: 650; }
label { font-weight: 650; }
input[type=text], input[type=password], input[type=number], input[type=datetime-local], select, textarea { border: 1px solid var(--line); background: var(--surface); box-shadow: 0 1px 2px rgba(25, 40, 58, .03); }
input:hover, select:hover, textarea:hover { border-color: var(--brand); }
.check { font-weight: 500; }
.tablewrap { border-radius: var(--r-card); }
.card.tablewrap { padding: 8px; }
th { background: var(--surface2); font-size: 11px; letter-spacing: .09em; }
th, td { padding: 14px 13px; }
tbody tr:hover td { background: color-mix(in srgb, var(--brand-soft) 35%, var(--surface)); }

/* Student home: greeting, path and work queue. */
.today { gap: 28px 32px; }
@media (min-width: 1024px) { .today { grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); } .t-rail { margin-top: 28px; top: calc(var(--hh) + 18px); } }
.hero { position: relative; min-height: 172px; margin: 28px 0 0; padding: 26px 28px; border-radius: 28px; overflow: hidden; background: linear-gradient(125deg, #164f59, #207880 65%, #26948d); color: #fff; gap: 20px; }
.hero::after { content: ""; position: absolute; width: 240px; height: 240px; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; right: -85px; top: -92px; box-shadow: 0 0 0 36px rgba(255,255,255,.045), 0 0 0 74px rgba(255,255,255,.035); }
.hero .owl { width: 92px; position: relative; z-index: 1; filter: drop-shadow(0 12px 12px rgba(0,0,0,.15)); }
.hero .bubble { position: relative; z-index: 1; border: 0; background: transparent; color: #fff; padding: 0; font-weight: 450; }
.hero .bubble::before { display: none; }
.hero h1 { font-size: clamp(26px, 3vw, 38px); letter-spacing: -.045em; margin: 0 0 9px; }
.hero p { color: #e3f6f3; font-size: 15px; line-height: 1.6; font-weight: 450; }
.stats { gap: 12px; margin: 14px 0 0; }
.stat-pill { border: 1px solid var(--line); box-shadow: none; border-radius: 16px; padding: 11px 15px; font-weight: 600; }
.stat-pill .ico { background: var(--warn-soft); border-radius: 11px; }
.stat-pill .n { font-size: 24px; font-weight: 750; }
.stat-pill .l { font-weight: 500; }
.stat-pill.goal.done { box-shadow: none; }
.stat-pill.goal .progressbar { height: 8px; }
.pathhead { margin-top: 3px; }
.pathhead h2 { font-size: 22px; }
.pathhead .line { height: 1px; }
.pathwrap { max-width: 440px; margin-top: 12px; padding-top: 24px; }
.prow { height: 180px; }
.prow:last-child { height: 155px; }
.pconn { top: 77px; height: 180px; }
.pconn path { stroke-width: 5; stroke-dasharray: 2 13; }
.pnode { --size: 84px; top: 30px; }
.pnode.current { --size: 96px; }
.pbtn { padding: 5px; }
.pcore { border: 5px solid var(--surface); box-shadow: 0 12px 25px color-mix(in srgb, var(--sk) 24%, transparent); }
.pcore::after { display: none; }
.pbtn:hover .pcore { transform: translateY(-3px); }
.pbtn:active .pcore { box-shadow: 0 5px 10px color-mix(in srgb, var(--sk) 20%, transparent); }
.pnode.current .pcore { animation: none; box-shadow: 0 0 0 6px color-mix(in srgb, var(--brand) 12%, transparent), 0 16px 30px color-mix(in srgb, var(--sk) 26%, transparent); }
.pnode.locked .pcore { box-shadow: none; }
.pcode { border: 1px solid var(--line); font-size: 11px; font-weight: 700; }
.pinfo { background: transparent; margin-top: 12px; }
.plabel { font-size: 14px; font-weight: 700; }
.pstate { font-weight: 500; }
.pstart span { border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 11px; letter-spacing: .04em; border-radius: 9px; }
.pstart span::after { border-width: 1px; }
.rail-card { padding: 20px; margin-bottom: 18px; }
.rail-card h2 { font-size: 18px; margin-bottom: 16px; }
.task, .assign { border: 1px solid var(--line); box-shadow: none; border-radius: 14px; padding: 13px; }
.task .num { box-shadow: none; font-weight: 700; }
.task.done .num { box-shadow: none; }
.task.locked { border-style: solid; }
.task h3, .assign .t { font-weight: 700; }
.task .meta { font-weight: 500; }

/* Authentication and learning content. */
.r-anon .wrap { max-width: 1060px; }
.auth { max-width: 960px; min-height: min(680px, calc(100vh - 150px)); margin: 30px auto 0; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); grid-template-rows: 1fr auto; gap: 0 34px; align-items: center; }
.auth-hero { grid-row: 1 / 3; position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-height: 510px; margin: 0; padding: 54px 48px; overflow: hidden; border-radius: 28px; background: linear-gradient(145deg, #164d58, #1e717a 58%, #1d8b83); color: #fff; text-align: left; }
.auth-hero::before, .auth-hero::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; pointer-events: none; }
.auth-hero::before { width: 420px; height: 420px; right: -245px; top: -190px; box-shadow: 0 0 0 42px rgba(255,255,255,.045), 0 0 0 84px rgba(255,255,255,.035); }
.auth-hero::after { width: 340px; height: 340px; left: -170px; bottom: -235px; }
.auth-eyebrow { position: relative; z-index: 1; order: 0; display: inline-block; padding: 7px 11px; border: 1px solid rgba(255,255,255,.34); border-radius: 999px; color: #def4f0; font-size: 11px; font-weight: 700; letter-spacing: .1em; }
.auth-hero .owl { position: relative; z-index: 1; order: 1; width: 154px; margin: 28px 0 16px; animation: none; filter: drop-shadow(0 18px 18px rgba(0,0,0,.18)); }
.auth-hero h1 { position: relative; z-index: 1; order: 2; margin: 0 0 12px; color: #fff; font-size: clamp(39px, 4vw, 52px); }
.auth-hero h1 b { color: #ffc77b; }
.auth-hero p { position: relative; z-index: 1; order: 3; max-width: 36ch; margin: 0; color: #e0f4f1; font-size: 17px; font-weight: 450; line-height: 1.6; }
.auth-highlights { position: relative; z-index: 1; order: 4; display: flex; gap: 7px; flex-wrap: wrap; margin-top: 33px; }
.auth-highlights span { border: 1px solid rgba(255,255,255,.28); border-radius: 999px; padding: 7px 10px; color: #f2fffc; font-size: 11px; font-weight: 600; }
.auth .card { grid-column: 2; align-self: end; margin: 0; padding: 34px; box-shadow: 0 25px 60px rgba(20, 65, 73, .1); }
.auth > p { grid-column: 2; align-self: start; }
.agree { border: 1px solid transparent; }
.bubble { border: 1px solid var(--line); font-weight: 550; }
.bubble::before { border-width: 1px; }
.progress-head .bubble { box-shadow: var(--shadow); }
.skillcard, .lesson, .explain { box-shadow: var(--shadow); }
.explain { border-left-width: 4px; }
.lesson-hero { box-shadow: var(--shadow); }
.qbar { height: 12px; border: 0; }
.qhead { border-bottom: 1px solid var(--line); }
.qcard { box-shadow: var(--shadow); }
.qfoot { border-top: 1px solid var(--line); box-shadow: 0 -12px 30px rgba(26, 52, 57, .06); }
.sheet, .fbsheet { border-color: var(--line); }
.pill { border-width: 1px; border-radius: 11px; box-shadow: none; font-weight: 650; }
.pill.cur, .pill.done, .pill.wait, .pill.again { box-shadow: none; }
.pill:active { transform: scale(.96); }
.choice { border-width: 1px; border-radius: 15px; box-shadow: none; font-weight: 550; }
.choice:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(20, 70, 78, .09); }
.choice:active { transform: translateY(0); box-shadow: none; }
.choice.sel, .choice.right, .choice.miss { box-shadow: none; border-width: 1px; }
.choice .key { border-width: 1px; border-radius: 10px; font-weight: 700; }
.step { border-width: 1px; border-radius: 15px; box-shadow: none; }
.step.next, .step.done { box-shadow: none; }
.step .t { font-weight: 700; }
.step .d { font-weight: 450; }
.cstat { border-width: 1px; border-radius: 15px; }
.cstat .h { letter-spacing: .02em; font-weight: 650; }
.cstat .v { font-weight: 750; }
.bub.ai { border-width: 1px; }

/* Teacher dashboard and dense tools. */
.r-t .wrap.wide { max-width: 1480px; }
.r-t h1 { font-size: clamp(30px, 3vw, 40px); }
.r-t .page-head { margin-top: 34px; }
.r-t .card { padding: 22px; }
/* The scroll container must have no inner gutter: scrolling cells otherwise
   show through between its edge and the pinned student column. */
.r-t .card.tablewrap.sticky-col { padding: 0; }
.sticky-col table { border-collapse: separate; border-spacing: 0; }
.sticky-col th:first-child, .sticky-col td:first-child { position: sticky; left: 0; min-width: 220px; background: var(--surface); z-index: 2; box-shadow: 8px 0 16px -16px rgba(15, 45, 55, .65); }
.sticky-col th:first-child { z-index: 3; background: var(--surface2); }
.sticky-col tbody tr:hover td:first-child { background: color-mix(in srgb, var(--brand-soft) 35%, var(--surface)); }
.todo { border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); min-height: 104px; padding: 20px; transition: transform .2s, border-color .2s, box-shadow .2s; }
.todo:hover { transform: translateY(-3px); border-color: var(--brand); box-shadow: 0 20px 36px rgba(24, 68, 72, .12); }
.todo:active { transform: translateY(0); box-shadow: var(--shadow); }
.todo .t { font-size: 17px; font-weight: 700; }
.todo .d { font-weight: 450; margin-top: 3px; }
.todo .ic { width: 48px; height: 48px; border-radius: 13px; }
.stat { min-height: 110px; }
.stat .ic { width: 52px; height: 52px; border-radius: 14px; }
.stat .v, .kpi { font-weight: 750; font-size: 36px; }
.stat .l { font-weight: 500; font-size: 13px; }
.filters { gap: 9px; }
.filters .btn { border-radius: 10px; }
.decision { border-width: 1px; border-color: var(--brand); }

@media (max-width: 640px) {
  .wrap { padding-left: 17px; padding-right: 17px; }
  .hero { min-height: 168px; padding: 20px; gap: 12px; }
  .hero .owl { width: 76px; }
  .hero h1 { font-size: 25px; }
  .hero p { font-size: 13px; }
  .stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-pill { min-width: 0; padding: 11px; }
  .stat-pill.goal { min-width: 0; }
  .stat-pill .n { font-size: 21px; }
  .stat-pill .l { font-size: 11px; }
  .page-head { margin: 26px 0 20px; }
  .page-head .btn { width: 100%; }
  .r-t .page-head { margin-top: 26px; }
  .r-t .card, .card, .rail-card { padding: 17px; }
  .auth .card { padding: 22px; }
}
@media (max-width: 760px) {
  .r-anon .wrap { max-width: 580px; }
  .auth { display: block; max-width: 470px; min-height: 0; margin: 20px auto 0; padding-top: 0; }
  .auth-hero { min-height: 0; align-items: center; padding: 25px 18px 28px; margin-bottom: -6px; border-radius: 22px 22px 0 0; text-align: center; }
  .auth-eyebrow { font-size: 9px; }
  .auth-hero .owl { width: 92px; margin: 12px 0 2px; }
  .auth-hero h1 { font-size: 30px; margin-bottom: 3px; }
  .auth-hero p { font-size: 12px; max-width: 34ch; }
  .auth-highlights { display: none; }
  .auth .card { position: relative; z-index: 1; padding: 22px; }
}
@media (prefers-reduced-motion: reduce) { .hero, .card, .todo { animation: none; transition: none; } }
