:root {
  color-scheme: light;
  --bg: #f7f9fc;
  --surface: #ffffff;
  --ink: #202b35;
  --muted: #626f7b;
  --line: #e3e8ed;
  --blue: #2367d1;
  --blue-hover: #1857bb;
  --soft-blue: #e9f1ff;
  --green: #247453;
  --soft-green: #e3f3eb;
  --mint: #e3f3eb;
  --peach: #fceee3;
  --lilac: #f0ebfa;
  --yellow: #fff4d9;
  --warning: #846321;
  --red: #b3261e;
  --soft-red: #fcebe9;
  --font-display: "Trebuchet MS", "Segoe UI", sans-serif;
  --font-body: "Segoe UI", Arial, sans-serif;
  --radius: 8px;
  --radius-small: 6px;
  --page-max: 1160px;
  --reading-max: 800px;
  --scroll-thumb: #bec8d2;
  --scroll-track: #f0f3f6;
  --scroll-hover: #95a5b4;
  --scroll-active: #708292;
  --shadow: 0 16px 56px #202b351a;
  --motion: 160ms;
}
* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
  letter-spacing: 0;
}
html {
  scrollbar-gutter: stable;
  scroll-padding-top: 90px;
}
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
::-webkit-scrollbar-track {
  background: var(--scroll-track);
}
::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border: 2px solid var(--scroll-track);
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-hover);
}
::-webkit-scrollbar-thumb:active {
  background: var(--scroll-active);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 var(--font-body);
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select,
textarea,
summary {
  -webkit-tap-highlight-color: transparent;
}
button,
a,
summary {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  box-shadow: none;
}
button:disabled:hover {
  transform: none;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
a,
input,
textarea,
select,
summary {
  outline-offset: 4px;
}
:focus-visible {
  outline: 2px solid var(--blue);
}
[hidden] {
  display: none !important;
}
svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke-width: 1.8;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  color: var(--ink);
  overflow-wrap: anywhere;
}
h1 {
  font: 700 32px/1.25 var(--font-display);
}
h2 {
  font: 700 21px/1.35 var(--font-display);
}
h3 {
  font-size: 16px;
  font-weight: 650;
  line-height: 1.45;
}
p {
  color: var(--muted);
}
small {
  font-size: 12px;
}
.muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.eyebrow {
  color: var(--blue);
  font-size: 11px;
  font-weight: 650;
  margin-bottom: 12px;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: -100px;
  z-index: 100;
  background: var(--surface);
  border: 2px solid var(--blue);
  border-radius: var(--radius);
  padding: 12px;
}
.skip-link:focus {
  top: 12px;
}
.app-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100dvh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  padding: 30px 14px 16px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--surface);
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 10px 32px;
  font: 700 26px/1.1 var(--font-display);
}
.brand-caption {
  display: block;
  color: var(--muted);
  font: 400 10px/1.8 var(--font-body);
  margin-top: 3px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 42px;
  background: var(--soft-blue);
  border-radius: var(--radius);
  color: var(--blue);
}
.brand-mark svg {
  width: 23px;
  height: 23px;
}
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--blue);
  color: var(--surface);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  transition:
    background var(--motion),
    border-color var(--motion),
    color var(--motion);
}
.button:not(:disabled):hover {
  background: var(--blue-hover);
}
.button:not(:disabled):active {
  filter: brightness(0.95);
}
.button svg {
  width: 18px;
  height: 18px;
}
.button.secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}
.button.secondary:not(:disabled):hover {
  background: var(--bg);
  border-color: var(--scroll-thumb);
}
.button.tonal {
  background: var(--soft-blue);
  color: var(--blue);
}
.button.tonal:not(:disabled):hover {
  background: #dce9ff;
}
.button.text {
  background: transparent;
  color: var(--blue);
  padding: 8px 5px;
}
.button.text:not(:disabled):hover {
  background: var(--soft-blue);
}
.button.danger {
  background: var(--soft-red);
  color: var(--red);
}
.button.danger:not(:disabled):hover {
  background: #f9dcd8;
}
.button.compact {
  min-height: 36px;
  font-size: 12px;
  padding: 8px 12px;
}
.button.full-width {
  width: 100%;
}
.button[aria-busy="true"] {
  opacity: 0.7;
  cursor: wait;
}
.button:focus-within {
  outline-color: var(--blue);
}
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 0;
  border-radius: var(--radius-small);
  background: transparent;
  color: var(--muted);
  transition:
    background var(--motion),
    color var(--motion);
}
.icon-button:not(:disabled):hover {
  background: var(--soft-blue);
  color: var(--blue);
}
.icon-button svg {
  width: 18px;
  height: 18px;
}
.new-folder {
  margin: 0 4px 26px;
  justify-content: flex-start;
  padding-inline: 14px;
  min-height: 46px;
}
.main-nav {
  display: grid;
  gap: 5px;
  margin-bottom: 28px;
}
.main-nav a,
.trash-link {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: var(--radius-small);
  padding: 11px 14px;
  min-height: 42px;
  color: var(--muted);
  font-size: 13px;
}
.main-nav a:hover,
.trash-link:hover {
  color: var(--ink);
  background: var(--bg);
}
.main-nav a.active {
  background: var(--soft-blue);
  color: var(--blue);
  font-weight: 600;
}
.main-nav svg {
  width: 18px;
  height: 18px;
}
.main-nav a > span {
  margin-left: auto;
  font-size: 11px;
}
.sidebar-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 6px 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.sidebar-label .icon-button {
  height: 30px;
  width: 30px;
  flex-basis: 30px;
}
.folder-list {
  flex: 1;
  min-height: 70px;
  overflow-y: auto;
  overflow-x: hidden;
}
.folder-node {
  margin-bottom: 4px;
  min-width: 0;
}
.folder-row {
  display: flex;
  align-items: center;
  min-width: 0;
  border-radius: var(--radius-small);
}
.folder-row:hover {
  background: var(--bg);
}
.folder-row.active {
  background: var(--soft-blue);
}
.folder-toggle {
  display: grid;
  place-items: center;
  height: 38px;
  width: 26px;
  flex-shrink: 0;
  background: transparent;
  border: 0;
  color: var(--muted);
}
.folder-toggle:hover {
  color: var(--blue);
}
.folder-toggle svg {
  width: 12px;
  height: 12px;
  transition: transform var(--motion);
}
.folder-toggle[aria-expanded="true"] svg {
  transform: rotate(90deg);
}
.folder-link {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex: 1;
  padding: 10px 10px 10px 0;
  font-size: 12px;
}
.folder-link svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
}
.folder-link strong {
  flex: 1;
  min-width: 0;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.folder-link small {
  font-size: 10px;
  color: var(--muted);
}
.nested-lessons {
  margin: 5px 8px 12px 28px;
  border-left: 1px solid var(--line);
  padding-left: 8px;
  min-width: 0;
}
.sidebar-source-group {
  font-size: 11px;
  min-width: 0;
}
.sidebar-source-group > summary {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  color: var(--muted);
  list-style: none;
}
.sidebar-source-group > summary > span:not(.source-chevron) {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.sidebar-source-group > summary svg {
  width: 13px;
  height: 13px;
}
.source-tree-lessons {
  display: grid;
  gap: 3px;
  padding: 3px 0 7px 14px;
}
.source-tree-lessons a {
  padding: 7px;
  color: var(--muted);
  font-size: 11px;
  border-radius: var(--radius-small);
  overflow-wrap: anywhere;
}
.source-tree-lessons a:hover,
.source-tree-lessons a.active {
  background: var(--soft-blue);
  color: var(--blue);
}
.sidebar-empty {
  display: block;
  color: var(--muted);
  font-size: 11px;
  padding: 8px 14px;
}
.trash-link {
  font-size: 12px;
  margin-top: 12px;
}
.sidebar-bottom {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 18px 7px 10px;
  margin-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--green);
  background: var(--mint);
  font-weight: 650;
  flex-shrink: 0;
}
.account-text {
  flex: 1;
  min-width: 0;
}
.account-text strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.account-text small {
  font-size: 10px;
  color: var(--muted);
}
.sidebar > .button.text {
  justify-content: flex-start;
  min-height: 32px;
  font-size: 10px;
  color: var(--muted);
  margin-inline: 6px;
}
.sidebar > .button.text svg {
  width: 14px;
  height: 14px;
}
.workspace {
  min-width: 0;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 86px;
  padding: 0 36px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.workspace-label {
  color: var(--muted);
  font-size: 12px;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  width: min(380px, 44%);
  height: 40px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding-inline: 12px 6px;
  color: var(--muted);
}
.search:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px var(--soft-blue);
}
.search > svg {
  width: 16px;
  height: 16px;
}
.search input {
  min-width: 0;
  flex: 1;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 12px;
  outline: none;
}
.search input::-webkit-search-cancel-button {
  appearance: none;
}
.search-clear {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
}
.credit-balance {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  min-height: 40px;
  padding: 8px 12px;
  font-size: 12px;
}
.credit-balance svg {
  color: var(--green);
  width: 16px;
  height: 16px;
}
.credit-balance span {
  font-size: 10px;
  color: var(--muted);
}
.credit-balance:hover {
  border-color: var(--green);
}
.topbar > .button {
  max-width: 140px;
  min-height: 40px;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.menu-button {
  display: none;
}
#accountBtn {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.navigation-close {
  display: none;
}
main {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 34px 36px 80px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}
.page-heading > div:first-child {
  min-width: 0;
}
.page-heading p {
  font-size: 13px;
  margin-top: 9px;
  line-height: 1.7;
}
.heading-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 30px 0 18px;
}
.section-heading h2 {
  font-size: 19px;
}
.section-heading small {
  color: var(--muted);
}
.section-heading > div {
  display: flex;
  align-items: center;
  gap: 10px;
}
.progress-track {
  height: 5px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}
.progress-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width 220ms;
}
.dashboard-overview {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-bottom: 24px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.dashboard-overview > div {
  display: flex;
  gap: 7px;
  align-items: baseline;
  color: var(--muted);
  font-size: 12px;
}
.dashboard-overview strong {
  font-size: 18px;
  color: var(--ink);
  font-weight: 650;
}
.folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 18px;
}
.folder-card {
  --folder-tint: var(--soft-blue);
  --folder-ink: var(--blue);
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  min-width: 0;
  transition:
    border-color var(--motion),
    box-shadow var(--motion);
  overflow: hidden;
}
.folder-card:hover {
  border-color: var(--folder-ink);
  box-shadow: 0 3px 12px #202b3507;
}
.tone-mint {
  --folder-tint: var(--mint);
  --folder-ink: var(--green);
}
.tone-peach {
  --folder-tint: var(--peach);
  --folder-ink: #976338;
}
.tone-lilac {
  --folder-tint: var(--lilac);
  --folder-ink: #78619f;
}
.folder-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 17px 0;
}
.folder-visual {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-small);
  background: var(--folder-tint);
  color: var(--folder-ink);
}
.folder-visual svg {
  width: 22px;
  height: 22px;
}
.folder-card > a {
  display: block;
  padding: 16px 20px 20px;
  border-top: 3px solid transparent;
}
.folder-card > a::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--folder-tint);
}
.folder-card h3 {
  font-family: var(--font-display);
  font-size: 17px;
  margin-bottom: 7px;
  min-height: 48px;
}
.folder-card p {
  font-size: 12px;
  margin-bottom: 20px;
}
.folder-card .progress-track {
  height: 4px;
}
.folder-card .progress-track > span {
  background: var(--folder-ink);
}
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  margin-top: 10px;
}
.folder-add {
  min-height: 210px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 12px;
  background: transparent;
  border: 1px dashed var(--scroll-thumb);
  color: var(--muted);
  border-radius: var(--radius);
  font-size: 13px;
}
.folder-add:hover {
  background: var(--surface);
  border-color: var(--blue);
  color: var(--blue);
}
.focus-next {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  background: var(--mint);
  padding: 26px 28px;
  margin: 0 0 30px;
  border-left: 3px solid var(--green);
}
.focus-next .eyebrow {
  color: var(--green);
  margin-bottom: 8px;
}
.focus-next h2 {
  font-size: 23px;
  max-width: 660px;
}
.focus-next p:not(.eyebrow) {
  font-size: 12px;
  margin: 10px 0 16px;
}
.focus-next .progress-track {
  max-width: 370px;
  background: #ccdfd4;
}
.focus-next .progress-track > span {
  background: var(--green);
}
.focus-next .button {
  background: var(--surface);
  color: var(--green);
  border-color: #bfd7c9;
}
.focus-next .button:hover {
  background: #f5fcf8;
}
.dashboard-lower {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.7fr);
  gap: 32px;
  align-items: start;
  margin-top: 10px;
}
.dashboard-lower > section {
  min-width: 0;
}
.lesson-compact,
.repeat-item,
.material-row,
.task-row,
.trash-item {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
a.lesson-compact:hover {
  color: var(--blue);
  background: var(--surface);
}
.compact-title,
.lesson-main,
.repeat-item > div,
.task-row > div,
.trash-item > div {
  flex: 1;
  min-width: 0;
}
.compact-title strong {
  display: block;
  font-weight: 600;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.compact-title p {
  margin-top: 6px;
  font-size: 11px;
}
.compact-title .progress-track {
  margin-top: 12px;
}
.round-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: var(--radius-small);
  background: var(--soft-blue);
  color: var(--blue);
}
.round-icon.green {
  background: var(--mint);
  color: var(--green);
}
.round-icon.yellow {
  background: var(--yellow);
  color: #856315;
}
.recent-ready {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  margin-bottom: 24px;
  font-size: 12px;
}
.recent-ready > span {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--green);
}
.recent-ready svg {
  width: 16px;
  height: 16px;
}
.review-prompt {
  padding: 20px 0;
  border-top: 2px solid var(--blue);
  margin-top: 30px;
}
.review-prompt h3 {
  font-size: 17px;
  margin: 12px 0 8px;
}
.review-prompt p {
  font-size: 13px;
  margin-bottom: 16px;
}
.review-prompt > svg {
  color: var(--blue);
}
.first-study {
  text-align: center;
  padding: 10px 0 40px;
  margin: auto;
  max-width: 620px;
}
.study-illustration {
  display: block;
  width: 240px;
  height: 172px;
  object-fit: contain;
  margin: 0 auto 24px;
}
.first-study h2 {
  font-size: 27px;
  margin-bottom: 12px;
}
.first-study > p {
  font-size: 14px;
  line-height: 1.8;
}
.first-study .cover-actions {
  justify-content: center;
}
.first-study .muted {
  margin-top: 20px;
  font-size: 12px;
}
.empty-state {
  text-align: center;
  padding: 58px 24px;
}
.empty-art {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  border-radius: var(--radius);
  color: var(--blue);
  background: var(--soft-blue);
}
.empty-art svg {
  width: 26px;
  height: 26px;
}
.empty-state h2 {
  font-size: 22px;
}
.empty-state p {
  max-width: 440px;
  margin: 12px auto 22px;
  font-size: 13px;
}
.crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 24px;
}
.crumbs svg {
  width: 12px;
  height: 12px;
}
.crumbs a:hover {
  color: var(--blue);
}
.crumbs span {
  color: var(--ink);
}
.tabs {
  display: flex;
  align-items: center;
  gap: 26px;
  margin: 0 0 26px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.tabs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 2px;
  font-size: 13px;
  white-space: nowrap;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}
.tabs a:hover {
  color: var(--blue);
}
.tabs a.active {
  color: var(--blue);
  border-color: var(--blue);
  font-weight: 600;
}
.source-group {
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.source-group-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  list-style: none;
  background: #eef2f6;
  padding: 14px 16px;
  border-radius: var(--radius-small);
}
summary::-webkit-details-marker {
  display: none;
}
.source-chevron {
  display: inline-flex;
  flex-shrink: 0;
}
.source-chevron svg {
  width: 14px;
  height: 14px;
  transition: transform var(--motion);
}
details[open] > summary > .source-chevron {
  transform: rotate(90deg);
}
.source-group-heading > svg {
  width: 17px;
  height: 17px;
  color: var(--muted);
}
.source-group-title {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.source-group-title strong {
  font-size: 12px;
  font-weight: 600;
}
.source-group-title small {
  display: block;
  font-size: 10px;
  margin-top: 4px;
  color: var(--muted);
}
.source-count {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.lesson-row {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 22px 16px;
  border-bottom: 1px solid var(--line);
}
.lesson-row:last-child {
  border: 0;
}
.lesson-number {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  font-size: 11px;
}
.lesson-main h3 {
  font-size: 15px;
}
.lesson-main > p {
  font-size: 12px;
  line-height: 1.8;
  margin: 8px 0 10px;
}
.lesson-detail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font-size: 11px;
  color: var(--muted);
}
.row-controls {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  background: var(--soft-blue);
  color: var(--blue);
  padding: 3px 8px;
  border-radius: 4px;
}
.status.good {
  background: var(--mint);
  color: var(--green);
}
.status.error {
  background: var(--soft-red);
  color: var(--red);
}
.upload-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 40px;
  align-items: start;
}
.upload-form {
  min-width: 0;
}
.upload-aside {
  border-left: 1px solid var(--line);
  padding-left: 24px;
}
.upload-aside > div + div {
  margin-top: 28px;
}
.upload-aside h3 {
  font-size: 13px;
  margin-bottom: 9px;
}
.upload-aside p {
  font-size: 12px;
  line-height: 1.8;
}
.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  gap: 16px;
}
.field {
  display: block;
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 20px;
}
.field input,
.field select,
.field textarea {
  display: block;
  width: 100%;
  margin-top: 8px;
  border: 1px solid #d1d9e2;
  background: var(--surface);
  border-radius: var(--radius-small);
  padding: 12px;
  min-width: 0;
  font-size: 13px;
  font-weight: 400;
  transition: border-color var(--motion);
}
.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--scroll-hover);
}
.field textarea {
  resize: none;
  min-height: 136px;
  max-height: 45vh;
  overflow: auto;
  line-height: 1.7;
}
.field-error {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--red);
  min-height: 0;
  margin-top: 5px;
}
[aria-invalid="true"] {
  border-color: var(--red) !important;
}
.password-field {
  display: flex;
  align-items: center;
  gap: 7px;
}
.password-field input {
  flex: 1;
}
.password-field .icon-button {
  margin-top: 8px;
}
.file-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px 20px;
  background: var(--surface);
  border: 1px dashed var(--scroll-thumb);
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
  min-height: 192px;
}
.file-drop:hover,
.file-drop.dragging {
  border-color: var(--blue);
  background: var(--soft-blue);
}
.file-drop > svg {
  width: 28px;
  height: 28px;
  color: var(--blue);
  margin-bottom: 5px;
}
.file-drop strong {
  font-size: 14px;
  font-weight: 600;
}
.file-drop small {
  font-size: 11px;
  color: var(--muted);
  max-width: 320px;
}
.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.file-drop:focus-within {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
}
.file-queue {
  margin: 14px 0;
}
.queued-file {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto 36px;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  font-size: 12px;
}
.queued-file strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 500;
}
.queued-file small {
  white-space: nowrap;
  color: var(--muted);
  font-size: 10px;
}
.queued-file.excluded strong {
  color: var(--muted);
}
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}
.page-range {
  grid-column: 2 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
}
.page-range input {
  width: 170px;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  padding: 8px;
  font-size: 12px;
}
.credit-estimate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 0 16px;
  margin-top: 8px;
  border-bottom: 1px solid var(--line);
}
.credit-estimate strong {
  font-size: 13px;
}
.credit-estimate p,
.credit-policy {
  font-size: 11px;
  color: var(--muted);
  margin-top: 7px;
  line-height: 1.7;
}
.credit-estimate .button {
  flex-shrink: 0;
}
.credit-policy {
  margin-top: 12px;
}
.upload-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
}
.upload-footer p {
  font-size: 11px;
  max-width: 220px;
}
.upload-footer > .button {
  min-width: 180px;
}
.error-text {
  color: var(--red);
  font-size: 12px;
  line-height: 1.7;
  min-height: 0;
  margin-block: 10px;
  overflow-wrap: anywhere;
}
.error-text:empty {
  margin-block: 0;
}
.extension-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--green);
}
.file-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 15px;
  margin-top: 12px;
  font-size: 11px;
  color: var(--muted);
}
.file-links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--blue);
  overflow-wrap: anywhere;
}
.file-links a:hover {
  text-decoration: underline;
}
.file-links svg {
  width: 13px;
  height: 13px;
}
.material-row {
  align-items: flex-start;
}
.material-row h3,
.task-row h3 {
  font-size: 14px;
}
.task-row p {
  font-size: 12px;
  margin-block: 6px;
}
.job-row {
  padding: 20px;
  border-left: 3px solid var(--blue);
  background: var(--soft-blue);
  margin-bottom: 24px;
}
.job-row > strong {
  font-size: 13px;
}
.job-row p {
  font-size: 12px;
  margin: 8px 0 12px;
}
.job-row.failed {
  background: var(--soft-red);
  border-color: var(--red);
}
.job-row .progress-track {
  max-width: 500px;
}
.job-credit {
  color: var(--muted);
  font-size: 11px;
}
.lesson-cover {
  max-width: 850px;
  padding: 12px 0;
}
.lesson-cover > h1 {
  font-size: 32px;
  line-height: 1.35;
  max-width: 770px;
}
.lead {
  font-size: 15px;
  line-height: 1.9;
  max-width: 700px;
  margin: 18px 0 22px;
}
.lesson-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  color: var(--muted);
  font-size: 12px;
  margin: 24px 0;
}
.lesson-facts > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.lesson-facts svg {
  width: 16px;
  height: 16px;
}
.lesson-cover > .progress-track {
  max-width: 550px;
  margin: 28px 0 12px;
}
.cover-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 16px;
}
.cover-outline {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 28px;
}
.cover-outline > summary,
.score-history > summary {
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
}
.outline-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 24px;
  margin-top: 16px;
}
.outline-list .button {
  justify-content: flex-start;
  text-align: left;
  font-size: 12px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.outline-list b {
  color: var(--muted);
  font-weight: 500;
  flex-shrink: 0;
}
.score-history {
  padding-top: 22px;
  margin-top: 22px;
  border-top: 1px solid var(--line);
}
.score-history p {
  font-size: 12px;
  margin-top: 12px;
}
.score-history a:hover {
  color: var(--blue);
  text-decoration: underline;
}
.app-shell.focus {
  grid-template-columns: minmax(0, 1fr);
}
.focus .sidebar,
.focus .topbar {
  display: none;
}
.focus main {
  width: 100%;
  max-width: var(--reading-max);
  padding-top: 28px;
}
.focus .workspace {
  min-width: 0;
}
.study-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 26px;
}
.study-title {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.study-position {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.study-progress {
  display: grid;
  grid-template-columns: repeat(var(--segments), minmax(0, 1fr));
  gap: 5px;
  margin: 0 0 22px;
}
.study-segment {
  height: 24px;
  padding: 9px 0;
  border: 0;
  background: transparent;
}
.study-segment::after {
  content: "";
  display: block;
  height: 4px;
  background: var(--line);
  border-radius: 2px;
}
.study-segment.read::after {
  background: var(--green);
}
.study-segment.current::after {
  background: var(--blue);
}
.study-segment:hover::after {
  background: var(--blue-hover);
}
.study-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
}
.study-tools > :first-child {
  margin-right: auto;
}
.study-tools .button {
  font-size: 11px;
  color: var(--muted);
}
.study-tools .selected {
  color: var(--blue);
  background: var(--soft-blue);
}
.learning-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 38px 40px;
  min-width: 0;
}
.learning-card h1 {
  font-size: 28px;
  line-height: 1.4;
}
.card-definition {
  font-size: 18px;
  line-height: 1.8;
  color: var(--ink);
  margin-top: 22px;
  font-weight: 500;
}
.card-body {
  font-size: 16px;
  line-height: 1.9;
  margin-top: 18px;
  color: var(--muted);
}
.card-body,
.remember p,
.example p,
.personal-note p {
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.remember,
.example {
  border-left: 3px solid var(--green);
  padding: 0 0 0 18px;
  margin-top: 26px;
}
.remember strong,
.example strong {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 650;
  color: var(--green);
}
.remember strong svg,
.example strong svg {
  width: 15px;
  height: 15px;
}
.remember p,
.example p {
  margin-top: 9px;
  font-size: 14px;
  line-height: 1.85;
}
.example {
  border-color: #c7a15c;
}
.example strong {
  color: #846321;
}
.card-points {
  margin: 22px 0;
  padding-left: 22px;
  font-size: 15px;
  line-height: 1.8;
}
.card-points li + li {
  margin-top: 10px;
}
.card-table {
  overflow-x: auto;
  margin: 24px 0;
}
.card-table table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
  line-height: 1.8;
}
.card-table td,
.card-table th {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.personal-note {
  border-top: 1px solid var(--line);
  margin-top: 26px;
  padding-top: 20px;
  font-size: 13px;
}
.personal-note p {
  margin-top: 8px;
  font-size: 14px;
}
.card-citation {
  margin-top: 26px;
  font-size: 12px;
  color: var(--muted);
}
.card-citation blockquote {
  margin: 12px 0 0;
  padding-left: 14px;
  border-left: 2px solid var(--line);
  line-height: 1.8;
}
.study-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 24px;
}
.study-nav small {
  color: var(--muted);
  font-size: 11px;
}
.study-nav .button {
  min-width: 108px;
}
.question-map {
  margin-bottom: 20px;
  font-size: 12px;
  color: var(--muted);
}
.question-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 38px);
  gap: 8px;
  margin-top: 12px;
}
.question-cell {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-small);
  font-size: 12px;
}
.question-cell.answered {
  background: var(--mint);
  color: var(--green);
}
.question-cell.current {
  border: 2px solid var(--blue);
}
.question-cell:hover {
  border-color: var(--blue);
}
.question-options {
  display: grid;
  gap: 11px;
  margin-top: 28px;
}
.answer-option {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  font-size: 14px;
  line-height: 1.65;
  cursor: pointer;
}
.answer-option:hover {
  background: var(--bg);
  border-color: var(--scroll-hover);
}
.answer-option:has(input:checked) {
  border-color: var(--blue);
  background: var(--soft-blue);
}
.answer-option input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--blue);
  flex-shrink: 0;
}
.answer-option.unsure {
  color: var(--muted);
  border-style: dashed;
}
.answer-option > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.quiz-footer {
  font-size: 11px;
  margin-top: 24px;
}
.learning-card > .button.text {
  margin-top: 12px;
  color: var(--muted);
  font-size: 10px;
}
.result-header {
  padding: 24px 0 30px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}
.lesson-plan {
  color: var(--muted);
  max-width: 60ch;
  margin: 0 0 24px;
}
.checkpoint-result {
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.checkpoint-result > .round-icon {
  margin: 8px 0 20px;
}
.checkpoint-result h1 {
  font-size: 28px;
  margin-bottom: 12px;
}
.checkpoint-result > p:not(.eyebrow) {
  max-width: 56ch;
  color: var(--muted);
}
.checkpoint-result > .button {
  margin-top: 16px;
}
.result-card h2 {
  font-size: 18px;
  line-height: 1.5;
  margin-bottom: 8px;
}
.result-score {
  font: 700 52px/1.2 var(--font-display);
  color: var(--green);
  margin: 16px 0;
}
.result-score.needs-review {
  color: var(--warning);
}
.result-header h1 {
  font-size: 27px;
}
.result-header > p:not(.eyebrow) {
  font-size: 14px;
  margin-top: 12px;
}
.result-card {
  display: flex;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.result-card > div {
  min-width: 0;
  flex: 1;
}
.result-card h3 {
  font-size: 15px;
  margin-bottom: 12px;
}
.result-card p {
  font-size: 13px;
  line-height: 1.9;
  margin-top: 7px;
}
.result-card .button {
  margin-top: 12px;
}
.correct-answers {
  margin-top: 26px;
}
.correct-answers > summary {
  color: var(--muted);
  padding: 12px 0;
  font-size: 13px;
}
.repeat-item strong {
  font-size: 14px;
  overflow-wrap: anywhere;
}
.repeat-item p,
.trash-item p {
  font-size: 12px;
  margin-top: 6px;
}
.repeat-item .button,
.task-row > .button,
.trash-item > .button {
  flex-shrink: 0;
}
dialog {
  width: min(480px, calc(100% - 32px));
  max-height: min(88dvh, 850px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 28px;
  box-shadow: var(--shadow);
  overscroll-behavior: contain;
}
dialog::backdrop {
  background: #202b3545;
  backdrop-filter: blur(2px);
}
.modal-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 26px;
}
.modal-heading h2 {
  font-size: 20px;
}
.modal-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 22px;
}
.modal-note,
.privacy-copy p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.85;
}
.privacy-copy h3 {
  font-size: 14px;
  margin: 20px 0 8px;
}
.privacy-copy .button {
  margin-top: 22px;
}
.auth-tabs {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.auth-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 0 2px 14px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}
.auth-tabs button:hover,
.auth-tabs button.active {
  color: var(--blue);
}
.auth-tabs button.active {
  border-color: var(--blue);
}
.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 20px;
  margin-top: 24px;
  border-top: 1px solid var(--line);
}
.profile-actions .button {
  font-size: 12px;
}
.source-text {
  white-space: pre-wrap;
  max-height: 45vh;
  overflow-y: auto;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.9;
}
.source-links > div {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
  font-size: 13px;
}
.credit-history {
  max-height: 40vh;
  overflow: auto;
  margin-top: 22px;
}
.credit-history > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.recovery-codes {
  display: grid;
  gap: 9px;
  margin: 22px 0;
}
.recovery-codes code {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.confirmation-symbol {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--blue);
  background: var(--soft-blue);
  border-radius: var(--radius-small);
  margin-bottom: 20px;
}
.confirmation-symbol.danger {
  background: var(--soft-red);
  color: var(--red);
}
#confirmationTitle {
  font-size: 21px;
  margin-bottom: 12px;
}
#confirmationDescription {
  font-size: 13px;
  line-height: 1.85;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
#confirmationError {
  min-height: 20px;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  max-width: min(480px, calc(100% - 32px));
  width: max-content;
  padding: 14px 20px;
  background: var(--ink);
  color: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 40;
  font-size: 12px;
  line-height: 1.7;
}
.task-bar {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 32px);
  background: var(--surface);
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 30;
  font-size: 11px;
}
.task-bar > svg {
  color: var(--blue);
  width: 17px;
  height: 17px;
  animation: spin 1.4s linear infinite;
}
.task-bar a {
  color: var(--blue);
  padding: 5px;
}
.connection-state {
  font-size: 12px;
  padding: 12px 24px;
  background: var(--yellow);
  color: #735413;
  position: sticky;
  top: 86px;
  z-index: 11;
}
.connection-state .button {
  color: inherit;
  min-height: 30px;
}
.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}
.loading-state::before {
  content: "";
  width: 20px;
  height: 20px;
  border: 2px solid var(--line);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.button.loading svg {
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (min-width: 1400px) {
  main {
    padding-inline: 48px;
  }
  .topbar {
    padding-inline: 48px;
  }
}
@media (max-width: 1100px) {
  .workspace-label {
    display: none;
  }
  .search {
    width: 100%;
    flex: 1;
    max-width: none;
  }
  .upload-layout {
    grid-template-columns: minmax(0, 1fr) 170px;
    gap: 26px;
  }
  .folder-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 960px) {
  .app-shell {
    display: block;
  }
  .sidebar {
    display: none;
    height: auto;
    max-height: none;
    position: relative;
    top: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 20px 24px;
  }
  .navigation-close {
    display: inline-grid;
    position: absolute;
    right: 20px;
    top: 22px;
  }
  .menu-open .sidebar {
    display: flex;
  }
  .menu-open .brand {
    margin-bottom: 18px;
  }
  .menu-open .main-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 16px;
  }
  .menu-open .new-folder {
    max-width: 240px;
    margin-bottom: 18px;
  }
  .menu-open .sidebar-bottom {
    margin-top: 8px;
  }
  .folder-list {
    min-height: 80px;
    max-height: 200px;
  }
  .menu-button {
    display: inline-grid;
  }
  .topbar {
    height: 74px;
    padding-inline: 24px;
    gap: 12px;
  }
  main {
    padding-inline: 28px;
  }
  .dashboard-lower {
    gap: 28px;
  }
  .connection-state {
    top: 74px;
  }
}
@media (max-width: 640px) {
  html {
    scroll-padding-top: 78px;
  }
  main {
    padding: 26px 18px 90px;
  }
  .topbar {
    padding-inline: 14px;
    height: 68px;
    gap: 8px;
  }
  .search {
    height: 38px;
    padding-inline: 9px 4px;
    gap: 7px;
  }
  .search input {
    font-size: 11px;
  }
  .credit-balance {
    padding-inline: 9px;
    gap: 5px;
    min-height: 38px;
  }
  .credit-balance span {
    display: none;
  }
  .topbar > .button {
    min-height: 38px;
    max-width: 90px;
    font-size: 11px;
    padding: 8px 10px;
  }
  .topbar .icon-button {
    flex-basis: 30px;
    width: 30px;
  }
  h1 {
    font-size: 27px;
  }
  h2 {
    font-size: 20px;
  }
  .page-heading {
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 24px;
  }
  .heading-actions {
    flex-wrap: wrap;
    width: 100%;
  }
  .page-heading .heading-actions > .button {
    font-size: 12px;
  }
  .dashboard-overview {
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 24px;
  }
  .dashboard-overview > div {
    font-size: 11px;
  }
  .dashboard-overview strong {
    font-size: 16px;
  }
  .focus-next {
    padding: 22px 20px;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .focus-next h2 {
    font-size: 20px;
  }
  .focus-next > .button {
    justify-self: start;
  }
  .folder-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .folder-card-top {
    padding: 12px 10px 0;
  }
  .folder-card > a {
    padding: 10px 14px 16px;
  }
  .folder-card h3 {
    font-size: 15px;
    min-height: 44px;
  }
  .folder-card p {
    font-size: 10px;
  }
  .folder-visual {
    width: 32px;
    height: 32px;
  }
  .folder-visual svg {
    width: 19px;
    height: 19px;
  }
  .card-foot {
    font-size: 9px;
    flex-wrap: wrap;
    gap: 4px;
  }
  .folder-add {
    min-height: 196px;
  }
  .dashboard-lower {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .first-study {
    padding-top: 0;
  }
  .study-illustration {
    width: 210px;
    height: 150px;
    margin-bottom: 20px;
  }
  .first-study h2 {
    font-size: 24px;
  }
  .first-study > p {
    font-size: 13px;
  }
  .recent-ready {
    flex-wrap: wrap;
    gap: 7px;
  }
  .lesson-row {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 12px;
    padding: 20px 6px;
  }
  .lesson-number {
    width: 24px;
    height: 26px;
  }
  .lesson-row > .row-controls {
    grid-column: 2;
    margin-top: 4px;
  }
  .lesson-main h3 {
    font-size: 14px;
  }
  .lesson-main > p {
    font-size: 12px;
  }
  .lesson-detail {
    font-size: 10px;
    gap: 7px 10px;
  }
  .source-group-heading {
    gap: 8px;
    padding: 12px;
  }
  .source-count {
    font-size: 10px;
  }
  .source-group-title strong {
    font-size: 11px;
  }
  .upload-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .upload-aside {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 22px 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
  .upload-aside > div + div {
    margin: 0;
  }
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .file-drop {
    padding: 26px 18px;
    min-height: 180px;
  }
  .credit-estimate {
    flex-wrap: wrap;
  }
  .upload-footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .upload-footer > .button {
    width: 100%;
  }
  .upload-footer p {
    max-width: none;
  }
  .page-range {
    flex-wrap: wrap;
    gap: 6px;
  }
  .page-range input {
    width: 100%;
  }
  .material-row,
  .task-row,
  .trash-item,
  .repeat-item {
    flex-wrap: wrap;
  }
  .material-row > .lesson-main,
  .repeat-item > div {
    flex-basis: calc(100% - 60px);
  }
  .material-row .row-controls,
  .repeat-item > .button {
    margin-left: 54px;
  }
  .trash-item > .button {
    margin-left: 54px;
  }
  .lesson-cover > h1 {
    font-size: 27px;
  }
  .lead {
    font-size: 14px;
  }
  .lesson-facts {
    gap: 14px;
    font-size: 11px;
  }
  .lesson-cover .cover-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .outline-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .focus main {
    padding: 20px 16px 70px;
  }
  .study-header {
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
  }
  .study-title {
    order: 3;
    flex-basis: 100%;
    font-size: 12px;
  }
  .study-position {
    margin-left: auto;
  }
  .study-tools {
    gap: 3px;
  }
  .study-tools .button {
    padding: 7px;
    font-size: 10px;
  }
  .learning-card {
    padding: 26px 22px;
  }
  .learning-card h1 {
    font-size: 24px;
  }
  .card-definition {
    font-size: 17px;
  }
  .card-body {
    font-size: 15px;
  }
  .study-nav {
    gap: 10px;
  }
  .study-nav small {
    display: none;
  }
  .study-nav .button {
    font-size: 12px;
    padding: 10px 12px;
    min-width: 84px;
  }
  .answer-option {
    padding: 14px 12px;
    font-size: 13px;
  }
  .result-score {
    font-size: 44px;
  }
  .result-header h1 {
    font-size: 24px;
  }
  .result-card {
    gap: 12px;
  }
  dialog {
    padding: 24px 20px;
    max-height: 88dvh;
  }
  .task-bar {
    right: 16px;
    bottom: 16px;
  }
  .connection-state {
    top: 68px;
    padding: 10px 16px;
    font-size: 11px;
  }
  .focus .connection-state {
    top: 0;
  }
}
@media (max-width: 370px) {
  .folder-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .credit-balance {
    font-size: 11px;
    padding-inline: 7px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (forced-colors: active) {
  * {
    scrollbar-color: auto;
  }
  :focus-visible {
    outline: 2px solid Highlight;
  }
  .button,
  .folder-card,
  .learning-card,
  .status {
    border: 1px solid ButtonText;
  }
}
