/*
  Colours sampled with PIL from reference/figma (frames 01, 06, 09-19 and the top-level captures).
  page gradient     #FEFEFF top, #F6EFFD at 66%, #F2E8FD bottom
  ink               #28232E   titles, body, nav icons
  muted             #85788E   tagline, back and close glyphs, lesson module name, helper, hints
  muted caption     #8D8095   card captions, module status lines, match hint
  chevron           #9B8CA6
  helper strong     #62626F   panel label, helper once a term is chosen
  purple            #A665F5   primary button face, labels, progress fill, active dot
  purple deep       #7C3BCB   button bottom edge, path labels, links, term text, overlay headings
  disabled button   #EBE1F3 fill, #A699B1 text
  progress track    #E9E2F0
  idle dot          #DFD5E8
  nav               #FFFFFF bar, #F1E7FA active pill, #B8AFBF inactive You
  icon disc         #EFE2FC   action card icon background, icon stroke #9961CA
  card border       #EAE3F0
  desk              #F0F0F5 surface, #25252C object ink, #6C6C78 subtitle, #E2E3E9 rules
  required reading  #EDE9FB fill, #6554B9 spine, focus border, panel rule, definition heading
  study group       #D6D7E0 frame, #E2E3EB lower bar
  hairline          #D6D7E0   match chip border, meaning card border, dividers
  match retry       #F6EDD4 card, #FFF3E8 callout with no border (frame 17), #A16E43 callout title
  match correct     #DFF1E6 card, #24573B card border, #EDF6EF callout, #47765F callout title
  takeaway callout  #F1E6FC fill, #7C3BCB title
*/

:root {
  --bg-top: #FEFEFF;
  --bg-mid: #F6EFFD;
  --bg-bottom: #F2E8FD;
  --ink: #28232E;
  --muted: #85788E;
  --caption: #8D8095;
  --helper: #62626F;
  --purple: #A665F5;
  --purple-edge: #7C3BCB;
  --purple-text: #7C3BCB;
  --disabled-bg: #EBE1F3;
  --disabled-ink: #A699B1;
  --track: #E9E2F0;
  --dot: #DFD5E8;
  --nav-active: #F1E7FA;
  --nav-off: #B8AFBF;
  --icon-disc: #EFE2FC;
  --card-border: #EAE3F0;
  --desk: #F0F0F5;
  --desk-ink: #25252C;
  --desk-sub: #6C6C78;
  --desk-rule: #E2E3E9;
  --reading: #EDE9FB;
  --indigo: #6554B9;
  --group-frame: #D6D7E0;
  --group-bar: #E2E3EB;
  --rule: #D6D7E0;
  --yellow-card: #F6EDD4;
  --yellow-callout: #FFF3E8;
  --yellow-title: #A16E43;
  --green-card: #DFF1E6;
  --green-border: #24573B;
  --green-callout: #EDF6EF;
  --green-title: #47765F;
  --callout-purple: #F1E6FC;
  --gutter: 21px;
  --state: 150ms;
  --stage: 250ms;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding: 110px 0 140px; }

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 22px;
  color: var(--ink);
  background: var(--bg-bottom);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 66%, var(--bg-bottom) 100%);
}
body[data-screen="lesson"]::before, body[data-screen="modules"]::before {
  background: linear-gradient(180deg, #FEFDFF 0%, #FCF9FF 40%, #FAF5FF 63%, #F8F3FF 75%, #F7F1FE 100%);
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }

:focus-visible { outline: 2px solid var(--purple); outline-offset: 3px; border-radius: 6px; }
[tabindex="-1"]:focus { outline: none; }

.app {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100dvh;
  position: relative;
}

.screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 0 var(--gutter);
}

[hidden] { display: none !important; }

/* type */
.wordmark { font-size: 26px; line-height: 32px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.title { font-size: 24px; line-height: 30px; font-weight: 700; }
.caption { font-size: 13px; line-height: 18px; color: var(--caption); }
.label {
  font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: 0.02em;
  text-transform: uppercase; color: var(--purple);
}

/* top bar */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 20px; min-height: 52px;
}
.tagline { font-size: 10px; line-height: 14px; color: var(--muted); }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; margin: -10px;
  border: 0; background: none; color: var(--muted); border-radius: 12px; text-decoration: none;
}
.icon-btn svg { width: 24px; height: 24px; }

/* buttons */
.btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 48px; padding: 0 16px;
  border: 0; border-radius: 16px;
  background: var(--purple); color: #fff;
  font-size: 14px; font-weight: 600;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 5px 0 var(--purple-edge);
  transition: transform var(--state) ease, box-shadow var(--state) ease, background-color var(--state) ease, color var(--state) ease;
  margin-bottom: 5px;
}
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 2px 0 var(--purple-edge); }
.btn:disabled, .btn[aria-disabled="true"] {
  background: var(--disabled-bg); color: var(--disabled-ink);
  box-shadow: none; cursor: default;
}
.btn.soon:disabled { background: #EBE1F4; color: #A294AF; box-shadow: 0 5px 0 #D6C8E4; }

.btn-secondary {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 48px; padding: 0 16px;
  border: 1px solid var(--card-border); border-radius: 24px;
  background: #fff; color: var(--purple-text);
  font-size: 15px; font-weight: 600; text-decoration: none;
  transition: background-color var(--state) ease;
}
.btn-secondary:active { background: var(--nav-active); }

.text-link {
  border: 0; background: none; padding: 6px 0; margin: -6px 0;
  font-size: 13px; line-height: 18px; color: var(--ink);
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--muted);
}
.text-link.purple { color: var(--purple-text); font-weight: 600; text-decoration: none; }

/* cards */
.card {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 24px;
}

/* bottom nav */
.tabbar-wrap {
  position: sticky; bottom: 0;
  margin: auto calc(-1 * var(--gutter)) 0;
  padding: 16px calc(var(--gutter) + 22px) calc(24px + env(safe-area-inset-bottom));
  pointer-events: none;
}
.tabbar {
  display: grid; grid-template-columns: repeat(3, minmax(0, 90px)); column-gap: 9px; justify-content: center;
  height: 66px; padding: 6px 8px;
  background: #fff; border-radius: 33px;
  pointer-events: auto;
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border-radius: 27px; text-decoration: none; color: var(--ink);
  font-size: 9px; line-height: 11px; font-weight: 400;
  transition: background-color var(--state) ease;
}
.tab svg { width: 24px; height: 24px; }
.tab[aria-current="page"] { background: var(--nav-active); }
.tab.you:not([aria-current="page"]) { color: var(--nav-off); }

/* home */
.carousel { margin-top: 53px; position: relative; touch-action: pan-y; }
.carousel-viewport { overflow: hidden; }
.carousel-track { display: flex; transition: transform var(--stage) ease; }
.slide { flex: 0 0 100%; display: flex; flex-direction: column; align-items: center; text-align: center; }
.slide-title { font-size: 24px; line-height: 30px; font-weight: 700; }
.slide .label { font-size: 12px; line-height: 16px; letter-spacing: 0.1em; margin-top: 17px; }
.slide-art { width: 300px; height: 240px; margin-top: 43px; transform: translateX(3px); user-select: none; -webkit-user-drag: none; }
.carousel-controls {
  display: flex; align-items: center; justify-content: space-between;
  width: 280px; margin: 13px auto 0;
}
.carousel-controls .icon-btn { margin: 0; }
.carousel-controls .icon-btn { color: #9B8CA6; }
.carousel-controls .icon-btn svg { width: 20px; height: 20px; }
.dots { display: flex; gap: 0; align-items: center; }
.dot {
  width: 32px; height: 24px; border: 0; padding: 0; background: none;
  display: grid; place-items: center;
}
.dot::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--dot);
  transition: background-color var(--state) ease, width var(--state) ease, height var(--state) ease;
}
.dot[aria-current="true"]::before { width: 8px; height: 8px; background: var(--purple); }

.action-card { margin-top: 27px; padding: 17px 16px 17px; }
.action-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.action-icon {
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; background: var(--icon-disc); color: #9961CA;
}
.action-icon img { width: 46px; height: 46px; border-radius: 50%; }
.action-icon svg { width: 26px; height: 26px; }
.action-head .caption { font-size: 10px; line-height: 13px; }
.action-title { font-size: 13px; line-height: 17px; font-weight: 600; margin-top: 1px; }
.action-card .btn {
  height: 49px; margin-bottom: 6px; border-radius: 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 6px 0 var(--purple-edge);
}
.action-card .btn:active:not(:disabled) { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 3px 0 var(--purple-edge); }
.action-card .btn.soon:disabled { box-shadow: 0 6px 0 #D6C8E4; }

@media (max-height: 799px) {
  .carousel { margin-top: 24px; }
  .slide-art { margin-top: 24px; }
  .action-card { margin-top: 16px; }
}

/* modules list */
.modules .topbar { padding-top: 31px; align-items: flex-start; }
.modules .topbar .icon-btn { margin: -12px 1px 0 0; }
.page-title { text-align: center; margin-top: 46px; font-size: 27px; line-height: 34px; }
.page-sub { margin-top: 13px; font-size: 13px; line-height: 18px; color: var(--muted); }
.module-list { list-style: none; margin: 26px 0 24px; padding: 0; display: grid; gap: 14px; }
.module-card {
  display: flex; align-items: center; gap: 15px;
  min-height: 139px; padding: 20px 20px 20px 19px;
  text-decoration: none; color: inherit;
  transition: transform var(--state) ease, box-shadow var(--state) ease;
}
a.module-card:active { transform: scale(0.99); }
.module-card img { width: 67px; height: 67px; object-fit: contain; flex: none; }
.module-card .label { font-size: 10px; letter-spacing: 0; }
.module-card .mod-title { font-size: 17px; line-height: 22px; font-weight: 600; margin-top: 10px; }
.module-card .status { font-size: 10px; line-height: 13px; color: var(--caption); margin-top: 10px; }
.module-card[aria-disabled="true"] { cursor: default; }

/* lesson path */
.path-screen { padding-bottom: 0; }
.path-head {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  padding-top: 11px; min-height: 59px;
}
.path-head .icon-btn { margin: -10px -10px -10px -2px; }
.path-head .path-icon { position: absolute; left: calc(50% - 34px); top: 16px; width: 38px; height: 38px; }
.pill {
  padding: 5px 9px 6px; border: 1px solid var(--card-border); border-radius: 15px;
  font-size: 10px; line-height: 16px; font-weight: 500; color: var(--muted); background: rgba(255, 255, 255, 0.6);
}
.module-banner {
  margin-top: 13px; padding: 12px 16px 12px; text-align: center;
  background: #fff; border: 1.5px solid var(--purple); border-radius: 20px;
  box-shadow: 0 4px 0 var(--purple);
}
.module-banner .label { color: var(--purple-edge); font-size: 10px; letter-spacing: 0; }
.module-banner h1 { font-size: 17px; line-height: 22px; font-weight: 600; margin-top: 5px; }

.path { list-style: none; margin: 84px 0 0; padding: 0; display: grid; gap: 90px; }
.path-row {
  display: flex; align-items: center; gap: 12px;
  width: 100%; height: 48px; padding: 0 0 0 var(--offset, 83px); margin: 0;
  border: 0; background: none; text-align: left; color: inherit;
  border-radius: 16px; -webkit-tap-highlight-color: transparent;
}
.path-row .medallion { width: 91.5px; height: 66px; flex: none; margin: -9px 0; transition: transform var(--state) ease; }
.path-row.is-active .medallion { margin-left: -1.5px; }
.path-row.is-locked { gap: 16px; }
.path-row.is-locked .medallion { margin-left: -6px; }
.path-row.is-complete .medallion { margin-left: -5.5px; }
.path-row:active .medallion { transform: translateY(2px); }
.row-text { position: relative; top: -7px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.row-num { font-size: 10px; line-height: 12px; font-weight: 500; color: var(--muted); }
.row-title { font-size: 14px; line-height: 20px; color: var(--muted); }
.path-row.is-active .row-num, .path-row.is-complete .row-num { color: var(--purple-edge); }
.path-row.is-active .row-title, .path-row.is-complete .row-title { color: var(--ink); }
.path-footer { margin: 43px 0 0; text-align: center; font-size: 10px; line-height: 14px; font-weight: 500; color: var(--muted); }

.start-card-wrap {
  position: sticky; bottom: 0; margin: 30px calc(-1 * var(--gutter)) 0;
  padding: 48px var(--gutter) calc(32px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(243, 234, 253, 0) 0, rgba(243, 234, 253, 0.96) 20px);
}
.start-card { padding: 15px 15px 41px; text-align: center; border-radius: 28px; }
.start-card .label { color: var(--purple-edge); font-size: 10px; }
.start-card h2 { font-size: 15px; line-height: 20px; font-weight: 600; margin: 7px 0 8px; }
.start-card .btn { height: 44px; font-size: 14px; font-weight: 500; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 4px 0 var(--purple-edge); margin-bottom: 4px; }
.start-card .btn.soon:disabled { box-shadow: 0 4px 0 #D6C8E4; }

/* you */
.you .topbar { padding-top: 26px; }
.you-card { margin-top: 40px; padding: 22px 20px; }
.you-name { font-size: 24px; line-height: 30px; font-weight: 700; }
.you-email { margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 18px; overflow-wrap: anywhere; }
.you-stat { display: flex; align-items: baseline; gap: 8px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--card-border); }
.you-stat strong { font-size: 24px; line-height: 30px; font-weight: 700; color: var(--purple-edge); }
.you-stat span { color: var(--muted); font-size: 13px; }
.you .btn-secondary { margin-top: 24px; }

/* auth */
.auth .topbar { padding-top: 26px; }
.auth h1 { margin-top: 64px; }
.auth form { margin-top: 28px; display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 12px; line-height: 16px; font-weight: 600; color: var(--ink); }
.field input {
  height: 48px; padding: 0 14px;
  border: 1px solid var(--card-border); border-radius: 14px; background: #fff;
  font-size: 16px; transition: border-color var(--state) ease, box-shadow var(--state) ease;
}
.field input:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(166, 101, 245, 0.18); }
.auth .btn { margin-top: 8px; }
.form-error { min-height: 18px; font-size: 13px; line-height: 18px; color: var(--ink); }
.form-error:not(:empty) { padding: 10px 12px; border-radius: 12px; background: var(--callout-purple); }
.auth-switch { margin-top: 18px; text-align: center; font-size: 13px; color: var(--muted); }
.auth-switch .text-link { margin-left: 4px; }

/* lesson shell */
.lesson { padding-bottom: 0; }
.lesson-top {
  position: sticky; top: 0; z-index: 2;
  margin: 0 calc(-1 * var(--gutter)); padding: 20px var(--gutter) 0;
  background: linear-gradient(180deg, var(--bg-top) 75%, rgba(254, 254, 255, 0));
}
.lesson-bar { display: flex; align-items: center; gap: 20px; height: 32px; }
.lesson-bar .icon-btn:first-child { margin: -10px -10px -10px -2px; }
.lesson-bar .icon-btn:last-child { margin-right: -3px; }
.progress { flex: 1; height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; margin: 0 11px 0 9px; }
.progress span { display: block; height: 100%; border-radius: 3px; background: var(--purple); transition: width var(--stage) ease; }
.lesson-meta { display: flex; justify-content: space-between; align-items: baseline; padding-top: 27px; }
.lesson-meta .module-name { font-size: 10px; line-height: 13px; font-weight: 500; color: var(--muted); }
.lesson-meta .label { font-size: 10px; line-height: 13px; letter-spacing: 0; }

.stage { flex: 1; display: flex; flex-direction: column; animation: stage-in var(--stage) ease both; }
@keyframes stage-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.stage > .title { margin-top: 15px; font-size: 25px; line-height: 31px; }
.stage-body { flex: 1; padding-bottom: 16px; }
.lede { margin-top: 39px; font-size: 14px; line-height: 20px; color: var(--muted); }
.body { margin-top: 13px; font-size: 16px; line-height: 22.4px; }
.intro .desk { margin-top: 32px; }

.lesson-foot {
  position: sticky; bottom: 0; z-index: 2; margin-top: auto;
  margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter));
  padding: 16px var(--gutter) 12px;
  background: linear-gradient(180deg, rgba(247, 242, 254, 0) 0, rgba(247, 242, 254, 0.96) 16px);
}
.lesson-foot .btn { font-size: 13px; }
.foot-note {
  min-height: 34px; padding-top: 7px; text-align: center;
  font-size: 11px; line-height: 14px; color: var(--muted);
}
.match .foot-note { font-size: 10px; color: var(--caption); }
.foot-note .text-link.purple { font-size: 12px; line-height: 16px; padding: 4px 8px; margin: -4px 0; }

/* desk */
.desk {
  container-type: inline-size;
  position: relative; width: 100%; aspect-ratio: 348 / 277;
  margin-top: 24px; border-radius: 16px; background: var(--desk);
}
.desk.compact { aspect-ratio: 348 / 189; }
.desk-obj {
  position: absolute; display: block;
  padding: 0; margin: 0; border: 0; text-align: left;
  font-family: var(--font); font-size: 3.8cqw; color: var(--desk-ink);
  background: #fff;
  border-radius: 1.1cqw;
  box-shadow: 0.6cqw 1.3cqw 0 rgba(214, 215, 224, 0.6), 0 0 0 0.3cqw rgba(214, 215, 224, 0.5);
  transform: rotate(var(--rot, 0deg));
  transition: transform var(--stage) ease, opacity var(--state) ease, box-shadow var(--state) ease;
}
button.desk-obj { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.desk-obj .t { position: absolute; left: 11%; top: 16%; right: 6%; line-height: 1.2; }
.desk-obj .s { position: absolute; left: 11%; top: 36%; right: 6%; font-size: 2.9cqw; line-height: 1.2; color: var(--desk-sub); }
.desk-obj .lines {
  position: absolute; left: 11%; right: 9%; top: 60%;
  height: calc(2.9cqw * 3 + 0.45cqw);
  background: repeating-linear-gradient(180deg, var(--desk-rule) 0 0.45cqw, transparent 0.45cqw 2.9cqw);
}

.desk-obj[data-obj="assignment"] { left: 9.2%; top: 6.1%; width: 40.4%; height: 44.5%; --rot: -7deg; }

.desk-obj[data-obj="reading"] {
  left: 53.4%; top: 11.2%; width: 34.9%; height: 40.4%; --rot: 6deg;
  background: var(--reading); border-radius: 0.4cqw 1.1cqw 1.1cqw 0.4cqw;
}
.desk-obj[data-obj="reading"]::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 1.6cqw;
  background: var(--indigo); border-radius: 0.4cqw 0 0 0.4cqw;
}
.desk-obj[data-obj="reading"] .t { left: 17%; top: 14%; right: 12%; }
.desk-obj[data-obj="reading"] .s { left: 17%; top: 53%; }
.desk-obj[data-obj="reading"] .lines { display: none; }

.desk-obj[data-obj="time"] { left: 9.9%; top: 62.6%; width: 25.3%; height: 29.3%; --rot: -3deg; }
.desk-obj[data-obj="time"] .t { left: 14%; top: 22%; }
.desk-obj[data-obj="time"] .s { left: 14%; top: 46%; }
.desk-obj[data-obj="time"] .lines { left: 14%; top: 78%; height: calc(2.9cqw + 0.45cqw); }

.desk-obj[data-obj="notes"] { left: 39.2%; top: 59.6%; width: 26.8%; height: 35.1%; --rot: 4deg; }
.desk-obj[data-obj="notes"] .t { left: 12%; top: 16%; }
.desk-obj[data-obj="notes"] .s { left: 12%; top: 36%; }
.desk-obj[data-obj="notes"] .lines { left: 12%; top: 62%; height: calc(2.9cqw + 0.45cqw); }

.desk-obj[data-obj="group"] {
  left: 72.2%; top: 59.6%; width: 20.2%; height: 35.4%; --rot: 6deg;
  border-radius: 2.6cqw; font-size: 4.1cqw;
  box-shadow: 0.6cqw 1.3cqw 0 rgba(214, 215, 224, 0.6), 0 0 0 0.9cqw var(--group-frame);
}
.desk-obj[data-obj="group"] .t { left: 11%; top: 13%; }
.desk-obj[data-obj="group"] .lines { display: none; }
.desk-obj[data-obj="group"]::before, .desk-obj[data-obj="group"]::after {
  content: ''; position: absolute; height: 10%; border-radius: 0.6cqw;
}
.desk-obj[data-obj="group"]::before { left: 7%; right: 14%; top: 60%; background: var(--reading); }
.desk-obj[data-obj="group"]::after { left: 33%; right: 8%; top: 79%; background: var(--group-bar); }
.desk.plain .desk-obj[data-obj="group"]::before, .desk.plain .desk-obj[data-obj="group"]::after { display: none; }

.desk.compact .desk-obj[data-obj="assignment"] { left: 8.2%; top: 3.2%; width: 41.1%; height: 46.6%; --rot: -4deg; }
.desk.compact .desk-obj[data-obj="reading"] { left: 53.9%; top: 11.9%; width: 35%; height: 41.3%; --rot: 5deg; }
.desk.compact .desk-obj[data-obj="time"] { left: 9.5%; top: 64.8%; width: 25.9%; height: 27.5%; --rot: -2deg; }
.desk.compact .desk-obj[data-obj="notes"] { left: 39.2%; top: 61.7%; width: 27.3%; height: 35.8%; --rot: 2deg; }
.desk.compact .desk-obj[data-obj="group"] { left: 73.4%; top: 64%; width: 19.4%; height: 31%; --rot: 5deg; }
.desk.compact .desk-obj { font-size: 3.2cqw; }
.desk.compact .desk-obj .t { left: 7%; top: 14%; }
.desk.compact .desk-obj[data-obj="reading"] .t { left: 14%; top: 14%; right: 28%; }
.desk.compact .desk-obj[data-obj="time"] .t { left: 9%; top: 30%; }
.desk.compact .desk-obj[data-obj="notes"] .t { left: 9%; top: 10%; }
.desk.compact .desk-obj[data-obj="group"] .t { left: 11%; top: 12%; }

.desk-obj.is-focus {
  --rot: 0deg;
  box-shadow: 0.6cqw 1.3cqw 0 rgba(214, 215, 224, 0.6), 0 0 0 0.6cqw var(--indigo);
}
.desk-obj[data-obj="group"].is-focus { box-shadow: 0.6cqw 1.3cqw 0 rgba(214, 215, 224, 0.6), 0 0 0 0.9cqw var(--indigo); }
.desk-obj.is-dim { opacity: 0.4; }
.desk:not(.compact) .desk-obj[data-obj="assignment"].is-focus { left: 7.6%; top: 7.8%; width: 39.8%; height: 44.4%; }
.desk:not(.compact) .desk-obj[data-obj="reading"].is-focus { left: 55.4%; top: 7.8%; width: 34.1%; height: 39.4%; }
.desk:not(.compact) .desk-obj[data-obj="time"].is-focus { left: 9.6%; top: 61.9%; width: 24.9%; height: 28.9%; }
.desk:not(.compact) .desk-obj[data-obj="notes"].is-focus { left: 40.5%; top: 57.2%; width: 26.1%; height: 34.3%; }
.desk:not(.compact) .desk-obj[data-obj="group"].is-focus { left: 73.9%; top: 57.8%; width: 19.2%; height: 33.6%; }
.desk:not(.compact) .desk-obj[data-obj="reading"].is-focus .t,
.desk:not(.compact) .desk-obj[data-obj="reading"].is-focus .s { left: 10%; }

/* explore */
.term-text { margin-top: 37px; max-width: 325px; font-size: 14px; line-height: 29px; color: var(--desk-ink); }
.term-chip {
  display: inline; padding: 3px 5px 4px; margin: 0;
  border: 1px solid transparent; border-radius: 5px;
  background: var(--reading); color: var(--desk-ink);
  font-size: 14px; line-height: 17px;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  transition: border-color var(--state) ease, background-color var(--state) ease;
}
.term-chip[aria-pressed="true"] { border-color: var(--indigo); }
.explore .desk { margin-top: 10px; }
.helper { margin-top: 13px; font-size: 12px; line-height: 16px; color: var(--muted); }
.helper.strong { font-size: 11px; color: var(--helper); }
.definition { margin-top: 11px; padding-top: 12px; border-top: 1px solid var(--rule); animation: fade-in var(--state) ease both; }
.definition.closed { padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
.definition h3 { font-size: 14px; line-height: 20px; font-weight: 400; color: var(--indigo); }
.definition p { margin-top: 7px; font-size: 13px; line-height: 18px; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* match */
.match-sub { margin-top: 40px; font-size: 13px; line-height: 18px; color: var(--muted); }
.term-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 10px; margin-top: 11px; }
.term-grid .wide { grid-column: 1 / -1; }
.term-btn {
  height: 34px; padding: 0 8px; border-radius: 5px;
  border: 1px solid var(--rule); background: #fff;
  font-size: 13px; font-weight: 600; color: var(--purple-text);
  transition: background-color var(--state) ease, border-color var(--state) ease, opacity var(--state) ease, color var(--state) ease;
}
.term-btn[aria-pressed="true"] { background: var(--reading); border-color: var(--indigo); color: var(--indigo); box-shadow: inset 0 0 0 1px var(--indigo); }
.term-btn.used { background: var(--desk); border-color: var(--desk); color: var(--disabled-ink); cursor: default; }
.meanings {
  margin-top: 13px; padding: 16px 16px 15px 15px;
  background: #fff; border: 1px solid var(--rule); border-radius: 3px;
  box-shadow: inset 5px 0 0 var(--indigo), 0 4px 0 var(--desk);
}
.match.settled .meanings { margin-top: 39px; }
.meanings .panel-label { font-size: 10px; line-height: 13px; color: var(--helper); text-transform: uppercase; padding-bottom: 8px; border-bottom: 1px solid var(--rule); }
.meaning-list { list-style: none; margin: 0; padding: 0; }
.meaning-list li { padding: 9px 0; border-bottom: 1px solid var(--rule); }
.meaning-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.meaning {
  display: block; width: 100%; padding: 11px; text-align: left;
  background: #fff; border: 1px solid var(--rule); border-radius: 5px; color: var(--desk-ink);
  transition: background-color var(--state) ease, border-color var(--state) ease;
}
.meaning .m-cap { display: block; font-size: 11px; line-height: 14px; color: var(--desk-sub); }
.meaning .m-text { display: block; margin-top: 4px; font-size: 13px; line-height: 18px; }
.meaning .m-ok { display: flex; align-items: center; gap: 4px; margin-top: 7px; font-size: 11px; line-height: 14px; }
.meaning .m-ok svg { width: 10px; height: 10px; }
.meaning.filled { border-color: var(--indigo); box-shadow: inset 0 0 0 1px var(--indigo); }
.meaning.filled .m-cap { color: var(--indigo); font-weight: 600; }
.meaning.retry { background: var(--yellow-card); padding-bottom: 31px; }
.meaning.correct { background: var(--green-card); border-color: var(--green-border); padding-bottom: 10px; }
.meaning.correct .m-cap { color: var(--helper); }
.meaning:disabled { cursor: default; }
.match-helper { margin-top: 12px; font-size: 11px; line-height: 14px; color: var(--purple-text); }
.review-row { margin-top: 21px; }
.match.settled .review-row { margin-top: 20px; }
.review-row .text-link { font-size: 13px; line-height: 18px; text-decoration-color: #8E8C95; text-underline-offset: 2px; }
.callout { margin-top: 13px; padding: 12px 14px 11px; border-radius: 18px; font-size: 12px; line-height: 16px; }
.callout strong { display: block; font-weight: 600; margin-bottom: 5px; }
.callout.retry { background: var(--yellow-callout); }
.callout.retry strong { color: var(--yellow-title); }
.callout.correct { background: var(--green-callout); }
.callout.correct strong { color: var(--green-title); }

dialog.defs {
  width: min(350px, calc(100vw - 32px)); max-height: calc(100dvh - 32px);
  padding: 21px 18px 25px; border: 0; border-radius: 22px;
  background: #fff; color: var(--ink);
  box-shadow: 0 20px 50px rgba(60, 30, 110, 0.18);
}
dialog.defs[open] { animation: fade-in var(--state) ease both; }
dialog.defs::backdrop { background: rgba(40, 35, 46, 0.28); }
.defs h2 { font-size: 21px; line-height: 26px; font-weight: 700; }
.defs dl { margin: 18px 0 0; }
.defs dt { margin-top: 45px; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--purple-text); }
.defs dt:first-child { margin-top: 0; }
.defs dd { margin: 4.5px 0 0; font-size: 12px; line-height: 17px; }
.defs .btn-secondary { margin-top: 62px; height: 40px; border-radius: 20px; font-size: 13px; }

/* takeaway */
.callout-purple {
  margin-top: 39px; padding: 13px 14px 9px; border-radius: 16px;
  background: var(--callout-purple); font-size: 13px; line-height: 18px;
}
.callout-purple strong { display: block; color: var(--purple-text); font-size: 12px; line-height: 16px; font-weight: 600; margin-bottom: 4px; }
.takeaway-body { margin-top: 12px; font-size: 14px; line-height: 20px; }
.takeaway .desk { margin-top: 13px; }
.chip-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 13px; }
.outline-chip {
  height: 36px; border-radius: 18px; border: 1px solid var(--card-border); background: #fff;
  font-size: 13px; font-weight: 600; color: var(--purple-text);
  transition: background-color var(--state) ease, border-color var(--state) ease;
}
.outline-chip[aria-pressed="true"] { background: var(--reading); border-color: var(--indigo); color: var(--indigo); }
.takeaway-foot { margin-top: 16px; font-size: 12px; line-height: 16px; color: var(--muted); }

/* complete */
.keep-card {
  position: relative; margin: 47px 14px 0 5px; min-height: 202px;
  padding: 23px 20px 20px 19px;
  background: #fff; border-left: 5px solid var(--indigo);
  box-shadow: 4px 4px 0 #F0F0F5, 0 0 0 1px rgba(214, 215, 224, 0.7);
  transform: rotate(-2deg);
}
.keep-card h2 { font-size: 19px; line-height: 24px; font-weight: 400; color: var(--desk-ink); }
.keep-card ul { list-style: none; margin: 22px 0 0; padding: 0; font-size: 14px; line-height: 20px; color: var(--desk-ink); }
.complete-body { margin-top: 17px; font-size: 14px; line-height: 20px; }
.next-card { margin-top: 13px; padding: 12px 14px 21px; border-radius: 16px; }
.next-card .label { font-size: 9px; line-height: 12px; letter-spacing: 0; color: var(--muted); font-weight: 500; }
.next-card p:last-child { margin-top: 6px; font-size: 14px; line-height: 18px; font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}
