:root {
  color-scheme: light;
  --ink: #071525;
  --ink-2: #17304c;
  --muted: #64778b;
  --canvas: #f3f7fb;
  --surface: #ffffff;
  --surface-2: #edf5fc;
  --line: #dbe5ef;
  --azure: #0877e8;
  --azure-dark: #0057b8;
  --azure-soft: #dcebff;
  --cyan: #16b7c9;
  --mint: #1cbf94;
  --mint-soft: #d9f8ee;
  --amber: #e59115;
  --amber-soft: #fff1d4;
  --coral: #e15c64;
  --coral-soft: #ffe4e5;
  --violet: #7158e8;
  --shadow-sm: 0 8px 24px rgba(14, 41, 70, 0.08);
  --shadow-lg: 0 24px 60px rgba(5, 35, 67, 0.16);
  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #dbe7f2;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% -10%, rgba(8, 119, 232, 0.22), transparent 31rem),
    #dbe7f2;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(8, 119, 232, 0.35);
  outline-offset: 3px;
}

.app-shell {
  position: relative;
  width: min(100%, 780px);
  min-height: 100svh;
  margin: 0 auto;
  background: var(--canvas);
  box-shadow: var(--shadow-lg);
  overflow: clip;
}

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: calc(70px + var(--safe-top));
  padding: calc(12px + var(--safe-top)) 20px 12px;
  color: #fff;
  background: rgba(7, 21, 37, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
}

.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 7px 12px rgba(0, 96, 207, 0.28));
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-track {
  color: #8bbce9;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--ink);
  background: var(--surface);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.profile-button {
  color: #dff4ff;
  background: linear-gradient(145deg, rgba(41, 152, 255, 0.3), rgba(18, 183, 201, 0.22));
  border: 1px solid rgba(151, 218, 255, 0.3);
  font-size: 13px;
  font-weight: 800;
}

.screen {
  min-height: calc(100svh - 70px);
  padding: 22px 18px calc(104px + var(--safe-bottom));
}

.screen.no-pad {
  padding-inline: 0;
  padding-top: 0;
}

.course-switcher {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0 0 16px;
  padding: 12px 14px;
  color: var(--ink);
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.course-switcher-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  background: linear-gradient(145deg, var(--azure), var(--violet));
  border-radius: 13px;
  font-size: 13px;
  font-weight: 900;
}

.course-switcher-action {
  color: var(--azure);
  font-size: 14px;
  font-weight: 800;
}

.course-library-heading {
  margin-bottom: 22px;
}

.course-library-logo {
  display: block;
  width: 76px;
  height: 76px;
  margin: -8px 0 8px -8px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(8, 119, 232, 0.16));
}

.course-library {
  display: grid;
  gap: 18px;
}

.course-library-card {
  position: relative;
  padding: 22px;
  overflow: visible;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 5px solid var(--course-accent, var(--azure));
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.course-library-card.is-active {
  border-color: color-mix(in srgb, var(--course-accent, var(--azure)) 45%, var(--line));
}

.course-library-card:has(.course-card-menu[open]) {
  z-index: 10;
}

.course-library-top,
.course-library-footer,
.course-library-meta {
  display: flex;
  align-items: center;
}

.course-library-top,
.course-library-footer {
  justify-content: space-between;
  gap: 14px;
}

.course-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.course-card-menu {
  position: relative;
}

.course-card-menu > summary {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0 0 8px;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 11px;
  cursor: pointer;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 2px;
  list-style: none;
}

.course-card-menu > summary::-webkit-details-marker {
  display: none;
}

.course-card-menu[open] > summary {
  color: var(--azure);
  border-color: color-mix(in srgb, var(--azure) 42%, var(--line));
}

.course-card-menu-popover {
  position: absolute;
  z-index: 12;
  top: 44px;
  right: 0;
  display: grid;
  width: min(245px, calc(100vw - 64px));
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
}

.course-card-menu-popover button {
  min-height: 44px;
  padding: 10px 12px;
  color: var(--coral);
  background: transparent;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  text-align: left;
}

.course-card-menu-popover button:hover:not(:disabled),
.course-card-menu-popover button:focus-visible {
  background: var(--coral-soft);
}

.course-card-menu-popover button:disabled {
  color: var(--muted);
  cursor: not-allowed;
}

.course-card-menu-popover small {
  padding: 2px 12px 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.course-code-badge {
  display: inline-grid;
  place-items: center;
  min-height: 38px;
  padding: 0 13px;
  color: #fff;
  background: var(--course-accent, var(--azure));
  border-radius: 11px;
  font-weight: 900;
  letter-spacing: .04em;
}

.course-library-card h2 {
  margin: 6px 0 8px;
  font-size: clamp(1.5rem, 5vw, 2rem);
  line-height: 1.05;
}

.course-library-card > p:not(.eyebrow) {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.55;
}

.course-library-meta {
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.course-library-footer {
  margin-top: 15px;
}

.course-library-footer > span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.available-courses {
  margin-top: 34px;
}

.available-courses .section-heading {
  margin-bottom: 14px;
}

.available-course-card {
  background: color-mix(in srgb, var(--surface) 84%, var(--surface-2));
  box-shadow: none;
}

.available-course-card .course-library-footer {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.course-request-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  margin-top: 18px;
  padding: 22px;
  background: linear-gradient(135deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.course-request-copy {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 15px;
}

.course-request-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: var(--azure);
  background: var(--azure-soft);
  border-radius: 15px;
}

.course-request-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.course-request-card h2 {
  margin: 4px 0 6px;
  font-size: clamp(1.25rem, 4vw, 1.55rem);
  line-height: 1.1;
}

.course-request-card .eyebrow,
.course-request-card p:last-child {
  margin: 0;
}

.course-request-card p:last-child {
  color: var(--muted);
  line-height: 1.5;
}

.course-request-button {
  flex: 0 0 auto;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.course-request-sheet .sheet-panel {
  max-height: 90svh;
}

.course-request-form {
  display: grid;
  gap: 16px;
}

.course-request-field {
  display: grid;
  gap: 7px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 800;
}

.course-request-field small {
  color: var(--muted);
  font-weight: 600;
}

.request-textarea {
  width: 100%;
  min-height: 104px;
  padding: 11px;
  color: var(--ink);
  background: #f4f8fb;
  border: 1px solid #cddbe6;
  border-radius: 11px;
  font: inherit;
  font-size: 16px;
  line-height: 1.45;
  resize: vertical;
}

.course-request-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.course-request-help {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.course-request-email-copy {
  justify-self: center;
}

.course-removal-sheet .sheet-panel {
  max-height: 90svh;
}

.course-removal-intro {
  margin: -4px 0 18px;
  color: var(--muted);
  line-height: 1.55;
}

.course-removal-options {
  display: grid;
  gap: 10px;
}

.course-removal-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 13px;
  width: 100%;
  padding: 15px;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 15px;
  cursor: pointer;
  text-align: left;
}

.course-removal-option:hover,
.course-removal-option:focus-visible {
  border-color: color-mix(in srgb, var(--azure) 40%, var(--line));
}

.course-removal-option.destructive:hover,
.course-removal-option.destructive:focus-visible {
  border-color: color-mix(in srgb, var(--coral) 55%, var(--line));
}

.course-removal-option strong,
.course-removal-option small {
  display: block;
}

.course-removal-option strong {
  margin-bottom: 4px;
  font-size: 15px;
}

.course-removal-option small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.course-removal-option-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--coral);
  background: var(--coral-soft);
  border-radius: 10px;
  font-size: 20px;
  font-weight: 900;
}

.course-removal-option-icon.keep {
  color: #0c7258;
  background: var(--mint-soft);
  font-size: 16px;
}

.course-removal-cancel {
  width: 100%;
  margin-top: 12px;
}

@media (min-width: 680px) {
  .course-library {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .course-request-card {
    grid-template-columns: 1fr;
  }

  .course-request-button {
    width: 100%;
    white-space: normal;
  }

  .course-request-actions {
    grid-template-columns: 1fr;
  }
}

.tabbar {
  position: fixed;
  z-index: 50;
  bottom: 0;
  left: 50%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: min(100%, 780px);
  min-height: calc(72px + var(--safe-bottom));
  padding: 9px 10px calc(8px + var(--safe-bottom));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid rgba(8, 43, 79, 0.1);
  transform: translateX(-50%);
  backdrop-filter: blur(20px);
}

.tab-item {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  min-height: 52px;
  padding: 4px;
  color: #718397;
  background: transparent;
  border: 0;
  border-radius: 14px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.tab-item svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
}

.tab-item.is-active {
  color: var(--azure);
  background: var(--azure-soft);
}

.tabbar.is-hidden,
.topbar.is-hidden {
  display: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(28px, 8vw, 40px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

h2 {
  margin-bottom: 8px;
  font-size: 23px;
  line-height: 1.13;
  letter-spacing: -0.03em;
}

h3 {
  margin-bottom: 6px;
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

p,
li {
  font-size: 16px;
  line-height: 1.55;
}

.eyebrow {
  margin-bottom: 7px;
  color: var(--azure);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-heading {
  margin-bottom: 22px;
}

.page-heading p {
  margin: 0;
  color: var(--muted);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin: 28px 2px 14px;
}

.section-heading h2,
.section-heading p {
  margin: 0;
}

.section-heading p {
  color: var(--muted);
  font-size: 13px;
}

.text-link {
  padding: 5px 0;
  color: var(--azure);
  background: transparent;
  border: 0;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.card {
  background: var(--surface);
  border: 1px solid rgba(16, 67, 111, 0.08);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.hero-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 22px;
  color: #fff;
  background:
    radial-gradient(circle at 92% 3%, rgba(99, 243, 209, 0.35), transparent 38%),
    linear-gradient(140deg, #0a3156 0%, #075bb9 58%, #087de7 100%);
  border: 0;
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  right: -32px;
  bottom: -50px;
  width: 150px;
  height: 150px;
  border: 26px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-copy .eyebrow {
  color: #9debd9;
}

.hero-copy h1 {
  max-width: 11ch;
  margin-bottom: 10px;
  font-size: clamp(28px, 8vw, 38px);
}

.hero-copy p {
  max-width: 32ch;
  margin-bottom: 20px;
  color: #dbefff;
  font-size: 15px;
}

.progress-orb {
  --value: 0;
  position: relative;
  z-index: 1;
  align-self: center;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  background: conic-gradient(#63f3d1 calc(var(--value) * 1%), rgba(255, 255, 255, 0.17) 0);
  border-radius: 50%;
}

.progress-orb::before {
  content: "";
  position: absolute;
  inset: 8px;
  background: #0a4f91;
  border-radius: 50%;
}

.progress-orb strong,
.progress-orb span {
  position: relative;
  z-index: 1;
}

.progress-orb strong {
  display: block;
  font-size: 24px;
  line-height: 1;
}

.progress-orb span {
  margin-top: 2px;
  color: #b9dcf7;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-button {
  color: #05213b;
  background: #63f3d1;
  border: 0;
  box-shadow: 0 10px 24px rgba(4, 37, 65, 0.24);
}

.primary-button.azure {
  color: #fff;
  background: var(--azure);
  box-shadow: 0 10px 24px rgba(8, 119, 232, 0.25);
}

.secondary-button {
  color: var(--azure-dark);
  background: var(--azure-soft);
  border: 0;
}

.ghost-button {
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--line);
}

.danger-button {
  color: #a82432;
  background: var(--coral-soft);
  border: 0;
}

.primary-button:active,
.secondary-button:active,
.ghost-button:active,
.danger-button:active,
.module-card:active,
.chapter-row:active,
.action-card:active,
.quick-reference-entry:active,
.quick-reference-tile:active,
.chapter-reference-shortcut:active {
  transform: scale(0.98);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button-row > button {
  flex: 1 1 140px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.stat-card {
  min-width: 0;
  padding: 16px 12px;
  text-align: center;
}

.stat-card strong {
  display: block;
  font-size: 22px;
  letter-spacing: -0.035em;
}

.stat-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.goal-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 15px;
  padding: 17px;
}

.goal-icon,
.action-icon,
.module-icon,
.report-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  color: var(--azure-dark);
  background: var(--azure-soft);
  border-radius: 15px;
  font-size: 22px;
}

.goal-copy {
  min-width: 0;
}

.goal-copy strong {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
  font-size: 15px;
}

.goal-copy strong span:last-child {
  color: var(--muted);
  font-weight: 650;
}

.daily-plan-preview {
  padding: 19px;
  background:
    radial-gradient(circle at 100% 0%, rgba(99, 243, 209, 0.16), transparent 38%),
    linear-gradient(145deg, #f7fbff, #eef8ff);
  border-color: #c9e2f5;
}

.daily-plan-preview-top {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 13px;
  margin-bottom: 15px;
}

.daily-plan-preview-top h3,
.daily-plan-preview-top p {
  margin: 0;
}

.daily-plan-preview-top h3 {
  margin-top: 3px;
  font-size: 19px;
}

.plan-calendar {
  display: grid;
  place-items: center;
  width: 49px;
  height: 49px;
  color: #fff;
  background: var(--azure);
  border-radius: 15px;
  font-size: 20px;
  font-weight: 900;
}

.daily-plan-preview > p {
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.daily-plan-preview .primary-button {
  width: 100%;
}

.linear-progress {
  position: relative;
  width: 100%;
  height: 8px;
  overflow: hidden;
  background: #e4edf5;
  border-radius: 99px;
}

.linear-progress > span {
  display: block;
  height: 100%;
  width: var(--value, 0%);
  background: linear-gradient(90deg, var(--azure), var(--cyan));
  border-radius: inherit;
  transition: width 500ms ease;
}

.module-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(242px, 80%);
  gap: 12px;
  margin-inline: -18px;
  padding: 0 18px 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.module-scroll::-webkit-scrollbar {
  display: none;
}

.module-card {
  position: relative;
  min-height: 180px;
  padding: 19px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid rgba(16, 67, 111, 0.08);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  scroll-snap-align: start;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}

.module-card::after {
  content: attr(data-domain);
  position: absolute;
  right: -8px;
  bottom: -28px;
  color: rgba(8, 119, 232, 0.07);
  font-size: 96px;
  font-weight: 900;
}

.module-card > * {
  position: relative;
  z-index: 1;
}

.module-card .module-icon {
  margin-bottom: 17px;
}

.module-card .button-title {
  max-width: 18ch;
}

.module-card .button-subtitle {
  display: block;
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 13px;
}

.button-title,
.button-subtitle,
.button-copy {
  display: block;
}

.button-title {
  margin: 0 0 3px;
  color: inherit;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.25;
}

.button-subtitle {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.module-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--azure-dark);
  font-size: 12px;
  font-weight: 800;
}

.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.action-card {
  min-height: 154px;
  padding: 17px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid rgba(16, 67, 111, 0.08);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  text-align: left;
  cursor: pointer;
}

.action-card .action-icon {
  margin-bottom: 18px;
}

.action-card .button-subtitle {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.action-card.is-mint .action-icon {
  color: #067557;
  background: var(--mint-soft);
}

.action-card.is-amber .action-icon {
  color: #9d5c00;
  background: var(--amber-soft);
}

.resource-spotlight {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
  width: 100%;
  margin-top: 12px;
  padding: 17px;
  color: #fff;
  background:
    radial-gradient(circle at 100% 0%, rgba(99, 243, 209, 0.25), transparent 38%),
    linear-gradient(145deg, #0a3156, #0b5ba9);
  border: 0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  text-align: left;
  cursor: pointer;
}

.resource-spotlight .eyebrow {
  color: #83ecd4;
}

.resource-spotlight .button-subtitle,
.resource-spotlight .row-arrow {
  color: #c5ddf1;
}

.resource-spotlight-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #053a5b;
  background: #63f3d1;
  border-radius: 14px;
  font-size: 25px;
  font-weight: 900;
}

.course-banner {
  position: relative;
  margin: -22px -18px 22px;
  padding: 25px 20px 23px;
  color: #fff;
  background:
    radial-gradient(circle at 93% 0%, rgba(99, 243, 209, 0.28), transparent 30%),
    #0a3156;
  overflow: hidden;
}

.course-banner .eyebrow {
  color: #85e7d0;
}

.course-banner h1 {
  max-width: 14ch;
}

.course-banner p {
  max-width: 42ch;
  margin-bottom: 16px;
  color: #cbdff1;
  font-size: 15px;
}

.quick-reference-entry,
.chapter-reference-shortcut {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 16px;
  color: var(--ink);
  background:
    radial-gradient(circle at 100% 0%, rgba(99, 243, 209, 0.15), transparent 38%),
    linear-gradient(145deg, var(--surface), var(--azure-soft));
  border-color: color-mix(in srgb, var(--azure) 20%, var(--line));
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.quick-reference-entry-icon,
.chapter-reference-icon,
.quick-reference-hero-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: #07324b;
  background: #63f3d1;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(28, 191, 148, 0.2);
  font-size: 20px;
  font-weight: 900;
}

.quick-reference-entry .eyebrow,
.chapter-reference-shortcut .eyebrow {
  margin: 0 0 3px;
}

.quick-reference-entry .button-subtitle,
.chapter-reference-shortcut .button-subtitle {
  margin-top: 3px;
}

.quick-reference-hero {
  position: relative;
  margin: -22px -18px 24px;
  padding: 27px 20px 25px;
  color: #fff;
  background:
    radial-gradient(circle at 92% 4%, rgba(99, 243, 209, 0.26), transparent 32%),
    radial-gradient(circle at 10% 100%, rgba(74, 168, 255, 0.24), transparent 38%),
    #071f36;
  overflow: hidden;
}

.quick-reference-hero-icon {
  margin-bottom: 19px;
}

.quick-reference-hero .eyebrow {
  color: #83ecd4;
}

.quick-reference-hero h1 {
  max-width: 15ch;
  margin-bottom: 11px;
  font-size: clamp(32px, 9vw, 46px);
}

.quick-reference-hero > p:not(.eyebrow) {
  max-width: 48ch;
  margin: 0 0 17px;
  color: #c9deef;
  font-size: 15px;
}

.quick-reference-domains {
  display: grid;
  gap: 10px;
}

.quick-reference-domain > .section-heading {
  align-items: end;
}

.quick-reference-grid {
  display: grid;
  gap: 12px;
}

.quick-reference-tile {
  display: grid;
  gap: 15px;
  width: 100%;
  min-height: 202px;
  padding: 18px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.reference-tile-top,
.reference-tile-footer {
  display: flex;
  align-items: center;
}

.reference-tile-top {
  justify-content: space-between;
}

.reference-card-number {
  color: var(--azure-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.reference-domain-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--azure-dark);
  background: var(--azure-soft);
  border-radius: 11px;
  font-size: 17px;
}

.quick-reference-tile .button-title {
  margin-bottom: 7px;
  font-size: 18px;
}

.quick-reference-tile .button-subtitle {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.reference-tile-footer {
  align-self: end;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding-top: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 12px;
  font-weight: 750;
}

.reference-tile-footer .row-arrow {
  margin-left: auto;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 800;
}

.pill {
  color: #dceeff;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.status-pill {
  color: var(--azure-dark);
  background: var(--azure-soft);
}

.status-pill.complete {
  color: #067557;
  background: var(--mint-soft);
}

.status-pill.focus {
  color: #9d5c00;
  background: var(--amber-soft);
}

.status-pill.ready {
  color: #075e49;
  background: var(--mint-soft);
}

.module-list {
  display: grid;
  gap: 14px;
}

.module-group {
  overflow: hidden;
}

.module-toggle {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 18px;
  color: var(--ink);
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
}

.module-toggle .module-icon {
  width: 44px;
  height: 44px;
  margin: 0;
}

.module-toggle .button-title {
  margin: 0 0 3px;
}

.module-toggle .button-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.chevron {
  color: var(--muted);
  font-size: 22px;
  transition: transform 180ms ease;
}

.module-group.is-open .chevron {
  transform: rotate(90deg);
}

.chapter-list {
  display: none;
  padding: 0 12px 12px;
  border-top: 1px solid var(--line);
}

.module-group.is-open .chapter-list {
  display: block;
}

.chapter-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 15px 6px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid #e9eff5;
  text-align: left;
  cursor: pointer;
}

.chapter-row:last-child {
  border-bottom: 0;
}

.chapter-number {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--azure-dark);
  background: var(--azure-soft);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 850;
}

.chapter-row.is-complete .chapter-number {
  color: #fff;
  background: var(--mint);
}

.chapter-row .button-title {
  margin: 0 0 2px;
  font-size: 15px;
}

.chapter-row .button-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.row-arrow {
  color: #8fa0b1;
  font-size: 20px;
}

.detail-header {
  position: sticky;
  z-index: 40;
  top: 0;
  padding: calc(10px + var(--safe-top)) 16px 11px;
  color: #fff;
  background: rgba(7, 21, 37, 0.97);
  backdrop-filter: blur(18px);
}

.detail-header-row {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 8px;
}

.detail-header .icon-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}

.detail-title {
  min-width: 0;
  text-align: center;
}

.detail-title strong {
  display: block;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-title span {
  color: #9db9d2;
  font-size: 11px;
}

.detail-progress {
  margin-top: 10px;
}

.detail-progress .linear-progress {
  height: 5px;
  background: rgba(255, 255, 255, 0.14);
}

.detail-progress .linear-progress > span {
  background: #63f3d1;
}

.detail-progress-label {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  color: #a7c1d8;
  font-size: 10px;
  font-weight: 700;
}

.detail-body {
  padding: 24px 18px calc(104px + var(--safe-bottom));
}

.chapter-intro {
  margin-bottom: 20px;
}

.chapter-intro h1 {
  font-size: clamp(30px, 9vw, 42px);
}

.chapter-intro > p {
  color: var(--muted);
}

.chapter-reference-shortcut {
  margin-bottom: 14px;
  box-shadow: none;
}

.reference-intro {
  margin-bottom: 18px;
}

.reference-intro h1 {
  margin-bottom: 14px;
  font-size: clamp(29px, 8vw, 40px);
}

.reference-sheet {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.reference-sheet-heading {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 14px;
  padding: 22px;
  color: #fff;
  background:
    radial-gradient(circle at 100% 0%, rgba(99, 243, 209, 0.23), transparent 40%),
    linear-gradient(145deg, #071f36, #0b4e85);
}

.reference-sheet-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #07324b;
  background: #63f3d1;
  border-radius: 13px;
  font-size: 18px;
  font-weight: 900;
}

.reference-sheet-heading .eyebrow {
  margin: 0 0 5px;
  color: #83ecd4;
}

.reference-sheet-heading h2 {
  margin: 0;
  color: #fff;
  font-size: 20px;
  line-height: 1.35;
}

.reference-section {
  padding: 22px;
  border-top: 1px solid var(--line);
}

.reference-section-heading {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 12px;
  margin-bottom: 16px;
}

.reference-section-heading > span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--azure-dark);
  background: var(--azure-soft);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 900;
}

.reference-section-heading .eyebrow,
.reference-section-heading h2 {
  margin: 0;
}

.reference-section-heading h2 {
  margin-top: 2px;
  font-size: 20px;
}

.reference-facts {
  display: grid;
  gap: 9px;
  margin: 0;
}

.reference-facts > div {
  padding: 13px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 13px;
}

.reference-facts dt {
  margin-bottom: 4px;
  color: var(--azure-dark);
  font-size: 14px;
  font-weight: 850;
}

.reference-facts dd {
  margin: 0;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.55;
}

.reference-traps {
  background: var(--amber-soft);
}

.reference-traps ul {
  display: grid;
  gap: 11px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reference-traps li {
  position: relative;
  padding-left: 32px;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.55;
}

.reference-traps li::before {
  content: "!";
  position: absolute;
  left: 0;
  top: 1px;
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  color: #fff;
  background: var(--amber);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 900;
}

.reference-check-list {
  display: grid;
  gap: 9px;
}

.reference-check-list details {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
}

.reference-check-list summary {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  color: var(--ink);
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
  list-style: none;
}

.reference-check-list summary::-webkit-details-marker {
  display: none;
}

.reference-check-list summary > span {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  color: var(--azure-dark);
  background: var(--azure-soft);
  border-radius: 8px;
  font-size: 11px;
}

.reference-check-list details > p {
  margin: 0;
  padding: 0 14px 14px 49px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.55;
}

.reference-source {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 22px;
  color: var(--muted);
  background: var(--surface-2);
  border-top: 1px solid var(--line);
}

.reference-source > span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  color: #fff;
  background: var(--mint);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 900;
}

.reference-source p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.reference-pagination {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.reference-pagination button {
  width: 100%;
}

.reference-actions {
  margin-top: 10px;
}

.lesson-card {
  margin-bottom: 14px;
  padding: 20px;
}

.lesson-card p:last-child {
  margin-bottom: 0;
}

.lesson-card.callout {
  background: #e9f6ff;
  border-color: #c8e7fc;
  box-shadow: none;
}

.lesson-card.callout .callout-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  color: var(--azure-dark);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lesson-source {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  margin-bottom: 14px;
  padding: 13px 14px;
  color: #17405f;
  background: #e9f6ff;
  border: 1px solid #c5e4fa;
  border-radius: 16px;
}

.lesson-source-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #fff;
  background: var(--azure);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 900;
}

.lesson-source strong {
  display: block;
  font-size: 14px;
}

.lesson-source p {
  margin: 2px 0 0;
  color: #52748f;
  font-size: 12px;
  line-height: 1.4;
}

.lesson-source a {
  color: var(--azure-dark);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.lesson-overview {
  margin-bottom: 14px;
  padding: 22px;
  color: #fff;
  background:
    radial-gradient(circle at 100% 0%, rgba(99, 243, 209, 0.22), transparent 40%),
    #0a3156;
  border-radius: var(--radius-md);
}

.lesson-overview .eyebrow {
  color: #83ecd4;
}

.lesson-overview > p:last-child {
  margin: 0;
  color: #e0edf8;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.58;
}

.study-section {
  position: relative;
  padding-top: 54px;
}

.study-section .section-number {
  position: absolute;
  top: 18px;
  left: 20px;
  color: var(--azure-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.study-section h2 {
  margin-bottom: 12px;
  font-size: 23px;
}

.study-section p {
  color: #334d66;
  font-size: 16px;
  line-height: 1.68;
}

.study-section p + p {
  margin-top: 13px;
}

.memory-card {
  margin: 16px 0;
  padding: 21px;
  color: #fff;
  background: linear-gradient(145deg, #0877e8, #0057b8);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 34px rgba(8, 119, 232, 0.2);
}

.memory-card .eyebrow {
  color: #a9f4e3;
}

.memory-card h2 {
  margin-bottom: 14px;
  font-size: 22px;
}

.memory-card ol {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  counter-reset: memory;
  list-style: none;
}

.memory-card li {
  position: relative;
  padding: 10px 12px 10px 43px;
  color: #eef8ff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  font-size: 14px;
  line-height: 1.45;
  counter-increment: memory;
}

.memory-card li::before {
  content: counter(memory);
  position: absolute;
  left: 11px;
  top: 9px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #064467;
  background: #63f3d1;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 900;
}

.scenario-card {
  margin-bottom: 18px;
  overflow: hidden;
}

.scenario-card summary {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 17px;
  cursor: pointer;
  list-style: none;
}

.scenario-card summary::-webkit-details-marker,
.recall-card summary::-webkit-details-marker {
  display: none;
}

.scenario-card summary > span:nth-child(2) {
  display: grid;
  gap: 2px;
  font-size: 16px;
  font-weight: 850;
}

.scenario-card summary small {
  color: var(--azure-dark);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.scenario-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #9d5c00;
  background: var(--amber-soft);
  border-radius: 12px;
  font-weight: 900;
}

.detail-chevron {
  color: var(--muted);
  font-size: 22px;
  transition: transform 180ms ease;
}

.scenario-card[open] .detail-chevron {
  transform: rotate(90deg);
}

.scenario-body {
  padding: 0 18px 19px 68px;
}

.scenario-body strong {
  display: block;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.5;
}

.scenario-body p {
  margin: 11px 0 0;
  padding: 13px;
  color: #075e49;
  background: var(--mint-soft);
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.5;
}

.recall-section {
  margin-top: 22px;
}

.recall-section .section-heading {
  align-items: end;
}

.recall-list {
  display: grid;
  gap: 9px;
}

.recall-card {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.recall-card summary {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 11px;
  padding: 15px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
  cursor: pointer;
  list-style: none;
}

.recall-card summary span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--azure-dark);
  background: var(--azure-soft);
  border-radius: 9px;
  font-size: 12px;
}

.recall-card p {
  margin: 0;
  padding: 0 15px 16px 56px;
  color: #075e49;
  font-size: 15px;
  line-height: 1.5;
}

.official-links {
  margin: 18px 0;
  padding: 19px;
  background: #eaf3fb;
  border-radius: var(--radius-md);
}

.official-links h2 {
  margin-bottom: 10px;
  font-size: 19px;
}

.official-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  padding: 10px 0;
  color: var(--azure-dark);
  border-top: 1px solid #cddfeb;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.official-links a:first-of-type {
  border-top: 0;
}

.resource-heading {
  margin-bottom: 17px;
}

.resource-verification {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 11px;
  margin-bottom: 16px;
  padding: 15px;
  color: #075e49;
  background: var(--mint-soft);
  border: 1px solid #bcebdc;
  border-radius: 16px;
}

.resource-verification > span {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  color: #fff;
  background: #0c9b73;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
}

.resource-verification strong {
  display: block;
  font-size: 14px;
}

.resource-verification p {
  margin: 3px 0 0;
  color: #376c60;
  font-size: 13px;
  line-height: 1.45;
}

.resource-filters {
  display: flex;
  gap: 8px;
  margin-inline: -18px;
  padding: 2px 18px 9px;
  overflow-x: auto;
  scrollbar-width: none;
}

.resource-filters::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 14px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.filter-chip.is-active {
  color: #fff;
  background: var(--azure);
  border-color: var(--azure);
}

.resource-count {
  margin: 5px 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.resource-count strong {
  color: var(--ink);
}

.resource-list {
  display: grid;
  gap: 13px;
}

.resource-card {
  padding: 19px;
}

.resource-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.resource-icon {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  color: var(--azure-dark);
  background: var(--azure-soft);
  border-radius: 13px;
  font-size: 18px;
  font-weight: 900;
}

.resource-status {
  padding: 6px 9px;
  color: #075e49;
  background: var(--mint-soft);
  border-radius: 99px;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.resource-status.supplemental {
  color: #9d5c00;
  background: var(--amber-soft);
}

.resource-status.community {
  color: #5d46bb;
  background: #eeeaff;
}

.resource-provider {
  margin: 0 0 5px;
  color: var(--azure-dark);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.resource-card h2 {
  margin-bottom: 8px;
  font-size: 22px;
}

.resource-card > p:not(.resource-provider):not(.resource-caution) {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.resource-best,
.resource-access {
  padding: 9px 11px;
  border-radius: 11px;
  font-size: 13px;
  line-height: 1.45;
}

.resource-best {
  margin-top: 14px;
  color: #24445f;
  background: #eef5fb;
}

.resource-access {
  margin-top: 7px;
  color: #075e49;
  background: var(--mint-soft);
  font-weight: 750;
}

.resource-caution {
  margin: 10px 0 0;
  color: #76501c;
  font-size: 12px;
  line-height: 1.45;
}

.resource-link {
  width: 100%;
  margin-top: 15px;
  text-decoration: none;
}

.secondary-resource-links {
  display: grid;
  gap: 2px;
  margin-top: 10px;
}

.secondary-resource-links a {
  display: flex;
  min-height: 42px;
  align-items: center;
  color: var(--azure-dark);
  border-top: 1px solid var(--line);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.resource-safety-note {
  margin-top: 16px;
  padding: 18px;
  color: #fff;
  background: var(--ink);
  border-radius: var(--radius-md);
}

.resource-safety-note strong {
  font-size: 17px;
}

.resource-safety-note p {
  margin: 6px 0 0;
  color: #c3d6e7;
  font-size: 14px;
  line-height: 1.55;
}

.objectives-card {
  margin-bottom: 16px;
  padding: 20px;
}

.objectives-card ul {
  display: grid;
  gap: 10px;
  margin: 13px 0 0;
  padding: 0;
  list-style: none;
}

.objectives-card li {
  position: relative;
  padding-left: 28px;
  color: var(--ink-2);
  font-size: 15px;
}

.objectives-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px;
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  color: #047b5a;
  background: var(--mint-soft);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 900;
}

.chapter-actions {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.chapter-actions button {
  width: 100%;
}

.plan-heading {
  margin-bottom: 17px;
}

.target-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
  padding: 21px;
  color: #fff;
  background:
    radial-gradient(circle at 100% 0%, rgba(99, 243, 209, 0.23), transparent 42%),
    linear-gradient(145deg, #08233d, #0b5ba9);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.target-card h2,
.target-card p {
  margin: 0;
}

.target-card .eyebrow {
  color: #83ecd4;
}

.target-card h2 {
  margin: 4px 0 6px;
  font-size: 24px;
}

.target-card p {
  max-width: 48ch;
  color: #d5e8f7;
  font-size: 14px;
  line-height: 1.5;
}

.target-card small {
  display: block;
  margin-top: 8px;
  color: #a9c8e1;
  font-size: 12px;
  line-height: 1.4;
}

.target-card .secondary-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.plan-progress-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
}

.plan-progress-card > div:first-child {
  display: grid;
  gap: 2px;
}

.plan-progress-card > div:first-child span {
  color: var(--azure-dark);
  font-size: 25px;
  font-weight: 900;
}

.plan-progress-card > div:first-child strong {
  color: var(--muted);
  font-size: 14px;
}

.plan-progress-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  flex: 0 0 auto;
  background: conic-gradient(var(--azure) calc(var(--value) * 1%), #dfebf4 0);
  border-radius: 50%;
}

.plan-progress-ring::before {
  content: "";
  position: absolute;
  width: 54px;
  height: 54px;
  background: #fff;
  border-radius: 50%;
}

.plan-progress-ring span {
  position: relative;
  z-index: 1;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.plan-step-list {
  display: grid;
  gap: 11px;
}

.plan-step {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
  padding: 17px;
}

.plan-step.is-complete {
  background: #f2fbf8;
  border-color: #c6eadf;
}

.plan-step-number {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--azure-dark);
  background: var(--azure-soft);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 900;
}

.plan-step.is-complete .plan-step-number {
  color: #fff;
  background: #0c9b73;
}

.plan-step-copy {
  min-width: 0;
}

.plan-step-copy h3,
.plan-step-copy p {
  margin: 0;
}

.plan-step-copy h3 {
  margin: 3px 0 4px;
  font-size: 17px;
}

.plan-step-copy > p:last-child {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.plan-step .secondary-button {
  min-width: 108px;
}

.plan-done-label {
  padding: 7px 9px;
  color: #075e49;
  background: var(--mint-soft);
  border-radius: 99px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.boost-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 19px;
}

.boost-card h3,
.boost-card p {
  margin: 0;
}

.boost-card h3 {
  margin: 3px 0 5px;
  font-size: 18px;
}

.boost-card > div > p:last-child {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.boost-icon {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  color: #5d46bb;
  background: #eeeaff;
  border-radius: 14px;
  font-size: 18px;
  font-weight: 900;
}

.boost-card .primary-button {
  grid-column: 2;
  justify-self: start;
  margin-top: -2px;
}

.smart-review-card {
  margin-bottom: 16px;
  padding: 19px;
  background:
    radial-gradient(circle at 100% 0%, rgba(99, 243, 209, 0.2), transparent 42%),
    #f7fbff;
  border-color: #cce3f4;
}

.smart-review-heading {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
}

.smart-review-heading h2,
.smart-review-heading p {
  margin: 0;
}

.smart-review-heading h2 {
  font-size: 19px;
}

.smart-review-icon {
  display: grid;
  place-items: center;
  width: 41px;
  height: 41px;
  color: #064467;
  background: #63f3d1;
  border-radius: 13px;
  font-size: 17px;
  font-weight: 900;
}

.smart-review-card > p {
  margin: 14px 0;
  color: #39566e;
  font-size: 15px;
  line-height: 1.55;
}

.smart-review-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
  margin-bottom: 12px;
}

.smart-review-stats span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 9px 7px;
  color: var(--muted);
  background: #fff;
  border: 1px solid #dfebf4;
  border-radius: 11px;
  font-size: 12px;
  text-align: center;
}

.smart-review-stats strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
}

.smart-review-progress {
  height: 8px;
  background: #dbe8f2;
  border-radius: 99px;
  overflow: hidden;
}

.smart-review-progress span {
  display: block;
  width: var(--value);
  height: 100%;
  background: linear-gradient(90deg, var(--azure), #10b78d);
  border-radius: inherit;
}

.smart-review-card > small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.practice-feature {
  position: relative;
  padding: 23px;
  color: #fff;
  background:
    radial-gradient(circle at 100% 0%, rgba(99, 243, 209, 0.28), transparent 38%),
    linear-gradient(145deg, #081f37, #0b5ba9);
  border: 0;
  overflow: hidden;
}

.practice-feature h2 {
  max-width: 14ch;
}

.practice-feature p {
  max-width: 34ch;
  margin-bottom: 20px;
  color: #d7e9f7;
  font-size: 15px;
}

.exam-count {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 7px;
}

.exam-count strong {
  font-size: 38px;
  line-height: 1;
}

.exam-count span {
  color: #9fc7e5;
  font-size: 13px;
  font-weight: 750;
}

.practice-list {
  display: grid;
  gap: 11px;
}

.resume-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding: 17px;
  border-color: rgba(8, 119, 232, 0.22);
}

.resume-card h2,
.resume-card p {
  margin: 0;
}

.resume-card h2 {
  margin-bottom: 3px;
  font-size: 17px;
}

.resume-card p:not(.eyebrow) {
  color: var(--muted);
  font-size: 13px;
}

.resume-card .primary-button {
  min-width: auto;
  padding-inline: 17px;
}

.practice-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 16px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid rgba(16, 67, 111, 0.08);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  text-align: left;
  cursor: pointer;
}

.practice-row .button-title,
.practice-row .button-subtitle {
  margin: 0;
}

.review-list {
  display: grid;
  gap: 10px;
}

.review-item {
  padding: 0;
  overflow: hidden;
}

.practice-row:disabled {
  opacity: 0.62;
  cursor: default;
}

.due-review-row:not(:disabled) {
  border-color: #bcebdc;
  background: #f2fbf8;
}

.review-item summary {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: start;
  gap: 11px;
  padding: 16px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
  cursor: pointer;
  list-style: none;
}

.review-item summary::-webkit-details-marker {
  display: none;
}

.review-item summary > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #9d5c00;
  background: var(--amber-soft);
  border-radius: 9px;
  font-size: 12px;
}

.review-item > p {
  margin: 0;
  padding: 0 16px 17px 57px;
  color: var(--muted);
  font-size: 14px;
}

.perfect-card {
  margin-top: 18px;
  padding: 18px;
  color: #075e49;
  background: var(--mint-soft);
}

.perfect-card p {
  margin: 4px 0 0;
  color: #376c60;
}

.smart-followup {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 11px;
  margin-top: 11px;
  padding: 14px;
  color: #075e49;
  background: var(--mint-soft);
  border: 1px solid #bcebdc;
  border-radius: 14px;
}

.smart-followup > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #fff;
  background: #0c9b73;
  border-radius: 9px;
  font-weight: 900;
}

.smart-followup p {
  margin: 2px 0 0;
  font-size: 14px;
  line-height: 1.5;
}

.mastery-card {
  margin-bottom: 22px;
  padding: 19px;
}

.mastery-topline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.mastery-topline > div {
  display: grid;
  gap: 2px;
  padding: 11px 8px;
  background: #f2f7fb;
  border-radius: 12px;
  text-align: center;
}

.mastery-topline strong {
  color: var(--ink);
  font-size: 22px;
}

.mastery-topline span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.mastery-card > p {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.objective-heading {
  margin-bottom: 4px;
}

.objective-intro {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.objective-map {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.objective-domain {
  padding: 0;
  overflow: hidden;
}

.objective-domain > summary {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 15px 17px;
  cursor: pointer;
  list-style: none;
}

.objective-domain > summary::-webkit-details-marker {
  display: none;
}

.objective-domain[open] > summary .detail-chevron {
  transform: rotate(90deg);
}

.objective-domain-number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--azure-dark);
  background: var(--azure-soft);
  border-radius: 13px;
  font-size: 13px;
  font-weight: 900;
}

.objective-domain-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.objective-domain-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.objective-domain-copy small {
  color: var(--muted);
  font-size: 12px;
}

.objective-domain-progress {
  height: 5px;
  margin-top: 3px;
  background: #e1ebf3;
  border-radius: 99px;
  overflow: hidden;
}

.objective-domain-progress > span {
  display: block;
  width: var(--value);
  height: 100%;
  background: linear-gradient(90deg, var(--azure), #10b78d);
}

.objective-list {
  border-top: 1px solid var(--line);
}

.objective-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 66px;
  padding: 12px 16px;
  color: var(--ink);
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  cursor: pointer;
}

.objective-row:last-child {
  border-bottom: 0;
}

.objective-status-dot {
  width: 10px;
  height: 10px;
  background: #aab7c3;
  border-radius: 50%;
}

.objective-status-dot.learning {
  background: var(--azure);
}

.objective-status-dot.needs_review {
  background: #e59a24;
}

.objective-status-dot.mastered {
  background: #0c9b73;
}

.objective-row-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.objective-row-copy strong {
  font-size: 14px;
  line-height: 1.35;
}

.objective-row-copy small {
  color: var(--muted);
  font-size: 12px;
}

.objective-status {
  padding: 6px 8px;
  color: #5f7080;
  background: #edf2f6;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.objective-status.learning {
  color: var(--azure-dark);
  background: var(--azure-soft);
}

.objective-status.needs_review {
  color: #94590b;
  background: var(--amber-soft);
}

.objective-status.mastered {
  color: #075e49;
  background: var(--mint-soft);
}

.practice-row .button-subtitle {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.quiz-page {
  min-height: 100svh;
  padding: calc(14px + var(--safe-top)) 17px calc(28px + var(--safe-bottom));
  background:
    radial-gradient(circle at 100% 0%, rgba(8, 119, 232, 0.15), transparent 28rem),
    var(--canvas);
}

.quiz-top {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.quiz-top .icon-button {
  background: #e3edf5;
}

.quiz-progress-copy strong {
  display: block;
  font-size: 14px;
}

.quiz-progress-copy span {
  color: var(--muted);
  font-size: 12px;
}

.quiz-timer {
  min-width: 62px;
  padding: 8px 10px;
  color: var(--azure-dark);
  background: var(--azure-soft);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 850;
  text-align: center;
}

.quiz-linear {
  margin-bottom: 22px;
}

.question-card {
  padding: 22px;
}

.question-type {
  display: inline-flex;
  margin-bottom: 17px;
  padding: 6px 10px;
  color: var(--azure-dark);
  background: var(--azure-soft);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.question-card h1 {
  margin-bottom: 21px;
  font-size: clamp(24px, 7vw, 32px);
  line-height: 1.18;
}

.answer-list {
  display: grid;
  gap: 10px;
}

.answer-option {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 13px 14px;
  color: var(--ink);
  background: #f8fbfd;
  border: 1.5px solid #dce6ef;
  border-radius: 15px;
  text-align: left;
  cursor: pointer;
}

.answer-option:hover {
  border-color: #b9cfe1;
}

.answer-option.is-selected {
  background: #e8f3ff;
  border-color: var(--azure);
}

.answer-option.is-correct {
  background: var(--mint-soft);
  border-color: var(--mint);
}

.answer-option.is-wrong {
  background: var(--coral-soft);
  border-color: var(--coral);
}

.answer-marker {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: var(--muted);
  background: #fff;
  border: 1.5px solid #c9d6e1;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 850;
}

.answer-option.is-selected .answer-marker {
  color: #fff;
  background: var(--azure);
  border-color: var(--azure);
}

.answer-option.is-correct .answer-marker {
  color: #fff;
  background: var(--mint);
  border-color: var(--mint);
}

.answer-option.is-wrong .answer-marker {
  color: #fff;
  background: var(--coral);
  border-color: var(--coral);
}

.answer-text {
  font-size: 15px;
  line-height: 1.4;
}

.matching-list {
  display: grid;
  gap: 14px;
}

.matching-row {
  display: grid;
  gap: 7px;
}

.matching-row label {
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 800;
}

.matching-row select {
  width: 100%;
  min-height: 50px;
  padding: 10px 38px 10px 12px;
  color: var(--ink);
  background: #f8fbfd;
  border: 1.5px solid #dce6ef;
  border-radius: 13px;
  font-size: 15px;
}

.quiz-footer {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.quiz-footer .primary-button {
  width: 100%;
}

.quiz-footer .primary-button:disabled {
  color: #8795a3;
  background: #dfe7ee;
  box-shadow: none;
  cursor: not-allowed;
}

.feedback-card {
  margin-top: 14px;
  padding: 18px;
  border-radius: var(--radius-md);
}

.feedback-card.correct {
  color: #075e49;
  background: var(--mint-soft);
  border: 1px solid #aeead8;
}

.feedback-card.incorrect {
  color: #8d2731;
  background: var(--coral-soft);
  border: 1px solid #f1b9bd;
}

.feedback-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
}

.feedback-card p {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
}

.result-hero {
  position: relative;
  margin: -22px -18px 24px;
  padding: 35px 20px 29px;
  color: #fff;
  background:
    radial-gradient(circle at 90% 0%, rgba(99, 243, 209, 0.28), transparent 35%),
    #092b4b;
  text-align: center;
}

.score-ring {
  --value: 0;
  display: grid;
  place-items: center;
  width: 142px;
  height: 142px;
  margin: 0 auto 19px;
  background: conic-gradient(#63f3d1 calc(var(--value) * 1%), rgba(255, 255, 255, 0.12) 0);
  border-radius: 50%;
}

.score-ring::before {
  content: "";
  position: absolute;
  width: 116px;
  height: 116px;
  background: #092b4b;
  border-radius: 50%;
}

.score-ring span {
  position: relative;
  z-index: 1;
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -0.045em;
}

.result-hero h1 {
  margin-bottom: 7px;
  font-size: 30px;
}

.result-hero p {
  margin: 0 auto;
  color: #bad2e7;
  font-size: 14px;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.report-metric {
  padding: 15px 8px;
  text-align: center;
}

.report-metric strong {
  display: block;
  font-size: 20px;
}

.report-metric span {
  color: var(--muted);
  font-size: 11px;
}

.domain-report {
  padding: 20px;
}

.domain-score-row + .domain-score-row {
  margin-top: 18px;
}

.domain-score-copy {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 750;
}

.domain-score-copy span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-card {
  padding: 20px;
}

.chart-wrap {
  position: relative;
  min-height: 210px;
  margin: 16px -6px 0;
}

.score-chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart-gridline {
  stroke: #dbe5ef;
  stroke-width: 1;
}

.chart-label {
  fill: #708196;
  font-size: 10px;
  font-weight: 650;
}

.chart-line {
  fill: none;
  stroke: var(--azure);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-area {
  fill: url(#areaGradient);
}

.chart-dot {
  fill: #fff;
  stroke: var(--azure);
  stroke-width: 3;
}

.history-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.history-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.history-item span {
  color: var(--muted);
}

.empty-state {
  padding: 28px 20px;
  color: var(--muted);
  text-align: center;
}

.empty-state .report-icon {
  margin: 0 auto 14px;
}

.empty-state h3 {
  color: var(--ink);
}

.settings-sheet {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  align-items: end;
  background: rgba(5, 17, 30, 0.48);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.settings-sheet.is-open {
  opacity: 1;
  pointer-events: auto;
}

.sheet-panel {
  max-height: 82svh;
  padding: 12px 18px calc(24px + var(--safe-bottom));
  background: #fff;
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -22px 60px rgba(6, 25, 43, 0.22);
  overflow-y: auto;
  transform: translateY(25px);
  transition: transform 180ms ease;
}

.settings-sheet.is-open .sheet-panel {
  transform: translateY(0);
}

.sheet-handle {
  width: 42px;
  height: 5px;
  margin: 0 auto 20px;
  background: #d8e1e9;
  border-radius: 99px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.setting-row p,
.setting-row strong {
  margin: 0;
}

.setting-row p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.profile-name-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 280px);
  align-items: center;
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.profile-name-row label,
.profile-name-row p {
  margin: 0;
}

.profile-name-row label {
  color: var(--ink);
}

.profile-name-row p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.profile-name-controls {
  display: flex;
  gap: 8px;
  min-width: 0;
}

.name-input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 11px;
  color: var(--ink);
  background: #f4f8fb;
  border: 1px solid #cddbe6;
  border-radius: 11px;
  font: inherit;
  font-size: 15px;
}

.name-input::placeholder {
  color: var(--muted);
  opacity: 0.8;
}

.save-name-button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 9px 15px;
  border-radius: 11px;
}

.exam-date-row {
  align-items: flex-start;
}

.exam-date-row label {
  color: var(--ink);
}

.date-input {
  flex: 0 0 auto;
  min-height: 44px;
  max-width: 158px;
  padding: 8px 10px;
  color: var(--ink);
  background: #f4f8fb;
  border: 1px solid #cddbe6;
  border-radius: 11px;
  font: inherit;
  font-size: 14px;
}

.switch {
  position: relative;
  flex: 0 0 auto;
  width: 50px;
  height: 30px;
  padding: 0;
  background: #ccd7e1;
  border: 0;
  border-radius: 99px;
  cursor: pointer;
}

.switch::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 7px rgba(7, 21, 37, 0.2);
  transition: transform 170ms ease;
}

.switch[aria-checked="true"] {
  background: var(--azure);
}

.switch[aria-checked="true"]::after {
  transform: translateX(20px);
}

.restart-panel {
  margin-top: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.restart-panel > summary {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 14px 16px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.restart-panel > summary::-webkit-details-marker {
  display: none;
}

.restart-panel > summary > span:first-child {
  display: grid;
  gap: 3px;
}

.restart-panel > summary strong {
  font-size: 15px;
}

.restart-panel > summary small {
  color: var(--muted);
  font-size: 13px;
}

.restart-panel[open] > summary .detail-chevron {
  transform: rotate(90deg);
}

.restart-options {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: var(--surface-2);
  border-top: 1px solid var(--line);
}

.restart-option {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 68px;
  padding: 12px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  text-align: left;
  cursor: pointer;
}

.restart-option > span:last-child {
  display: grid;
  gap: 3px;
}

.restart-option strong {
  font-size: 14px;
}

.restart-option small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.restart-option-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--azure-dark);
  background: var(--azure-soft);
  border-radius: 11px;
  font-size: 13px;
  font-weight: 900;
}

.restart-option.restart-all {
  border-color: color-mix(in srgb, var(--coral) 35%, var(--line));
}

.restart-option.restart-all .restart-option-icon {
  color: var(--coral);
  background: var(--coral-soft);
  font-size: 18px;
}

.name-setup-open body {
  overflow: hidden;
}

.name-setup {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  place-items: center;
  padding: max(20px, var(--safe-top)) 20px max(20px, var(--safe-bottom));
  background: rgba(5, 17, 30, 0.62);
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(12px);
  overflow-y: auto;
  transition: opacity 180ms ease;
}

.name-setup.is-open {
  opacity: 1;
  pointer-events: auto;
}

.name-setup-card {
  width: min(100%, 440px);
  padding: 28px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
  margin: auto;
  transform: translateY(12px) scale(0.98);
  transition: transform 180ms ease;
}

.name-setup.is-open .name-setup-card {
  transform: translateY(0) scale(1);
}

.name-setup-logo {
  display: block;
  width: 112px;
  height: 112px;
  margin: -12px auto 14px;
  object-fit: contain;
  filter: drop-shadow(0 14px 24px rgba(8, 119, 232, 0.2));
}

.name-setup-card h1,
.name-setup-card p {
  margin-top: 0;
}

.name-setup-card h1 {
  margin-bottom: 10px;
  font-size: clamp(27px, 7vw, 34px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.name-setup-card > p:not(.eyebrow) {
  margin-bottom: 0;
  color: var(--muted);
}

.name-setup-form {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.name-setup-form label {
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 800;
}

.name-setup-form .name-input {
  min-height: 50px;
  font-size: 16px;
}

.name-setup-form .primary-button {
  width: 100%;
  margin-top: 4px;
}

.name-skip {
  display: block;
  margin: 12px auto 0;
}

.name-privacy {
  display: block;
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.toast-region {
  position: fixed;
  z-index: 150;
  left: 50%;
  bottom: calc(91px + var(--safe-bottom));
  width: min(calc(100% - 36px), 430px);
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  padding: 13px 16px;
  color: #fff;
  background: rgba(7, 21, 37, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  animation: toast-in 220ms ease both;
}

.loading-state,
.error-state {
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 58svh;
  text-align: center;
}

.loading-state h1,
.error-state h1 {
  margin-top: 18px;
  font-size: 26px;
}

.loading-state p,
.error-state p {
  color: var(--muted);
}

.loading-logo {
  width: 88px;
  height: 88px;
  margin-bottom: 8px;
  object-fit: contain;
  filter: drop-shadow(0 12px 22px rgba(8, 119, 232, 0.18));
  animation: logo-float 1.8s ease-in-out infinite;
}

.loading-orbit {
  width: 48px;
  height: 48px;
  border: 4px solid #dbe8f3;
  border-top-color: var(--azure);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.noscript {
  padding: 20px;
  color: #fff;
  background: #9e2935;
  font: 700 16px/1.4 sans-serif;
  text-align: center;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes logo-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

@media (min-width: 720px) {
  .screen {
    padding-inline: 28px;
  }

  .course-banner,
  .result-hero {
    margin-inline: -28px;
    padding-inline: 30px;
  }

  .module-scroll {
    grid-auto-columns: 280px;
    margin-inline: -28px;
    padding-inline: 28px;
  }

  .action-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .resource-list {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .quick-reference-hero {
    margin-inline: -28px;
    padding-inline: 30px;
  }

  .quick-reference-grid {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }

  .detail-body,
  .quiz-page {
    width: min(100%, 700px);
    margin-inline: auto;
  }
}

@media (max-width: 390px) {
  .screen {
    padding-inline: 15px;
  }

  .hero-card {
    grid-template-columns: 1fr;
  }

  .progress-orb {
    position: absolute;
    right: 18px;
    top: 20px;
    width: 74px;
    height: 74px;
  }

  .progress-orb::before {
    inset: 7px;
  }

  .progress-orb strong {
    font-size: 20px;
  }

  .hero-copy h1 {
    max-width: 9ch;
    padding-right: 56px;
  }

  .stats-grid {
    gap: 7px;
  }

  .target-card {
    grid-template-columns: 1fr;
  }

  .target-card .secondary-button {
    width: 100%;
  }

  .plan-step {
    grid-template-columns: auto 1fr;
    align-items: start;
  }

  .plan-step .secondary-button,
  .plan-done-label {
    grid-column: 2;
    justify-self: start;
  }

  .boost-card .primary-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .objective-status {
    grid-column: 2;
    justify-self: start;
  }

  .objective-row {
    grid-template-columns: auto 1fr;
  }

  .exam-date-row {
    align-items: stretch;
    flex-direction: column;
  }

  .date-input {
    width: 100%;
    max-width: none;
  }

  .profile-name-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .profile-name-controls {
    display: grid;
    grid-template-columns: 1fr;
  }

  .save-name-button {
    width: 100%;
  }

  .name-setup-card {
    padding: 24px 20px;
  }

  .quick-reference-hero {
    margin-inline: -15px;
    padding-inline: 18px;
  }

  .quick-reference-entry,
  .chapter-reference-shortcut {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .quick-reference-entry > .row-arrow,
  .chapter-reference-shortcut > .row-arrow {
    display: none;
  }

  .reference-sheet-heading,
  .reference-section {
    padding-inline: 17px;
  }

  .reference-source {
    padding-inline: 17px;
  }

  .stat-card {
    padding-inline: 6px;
  }

  .tabbar {
    padding-inline: 4px;
  }

  .tab-item {
    padding-inline: 1px;
    font-size: 9px;
  }

  .lesson-source {
    grid-template-columns: auto 1fr;
  }

  .lesson-source a {
    grid-column: 2;
  }

  .scenario-body {
    padding-left: 18px;
  }
}

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

html.large-text {
  font-size: 112.5%;
}

html.high-contrast {
  --muted: #42576a;
  --line: #b8c8d7;
  --azure: #005dbf;
  --azure-dark: #003f87;
}

html.dark-theme {
  color-scheme: dark;
  --ink: #f2f7fb;
  --ink-2: #d8e4ee;
  --muted: #a9bac9;
  --canvas: #0a1724;
  --surface: #112335;
  --surface-2: #172b3f;
  --line: #2c4358;
  --azure: #4aa8ff;
  --azure-dark: #86c5ff;
  --azure-soft: #173b5d;
  --cyan: #47ccda;
  --mint: #35d2aa;
  --mint-soft: #123c33;
  --amber: #f0b24d;
  --amber-soft: #423116;
  --coral: #ff7b84;
  --coral-soft: #47242c;
  --violet: #a190ff;
  --shadow-sm: 0 8px 26px rgba(0, 0, 0, 0.24);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.38);
  background: #06111d;
}

html.dark-theme body {
  background:
    radial-gradient(circle at 50% -10%, rgba(74, 168, 255, 0.16), transparent 31rem),
    #06111d;
}

html.dark-theme .app-shell {
  background: var(--canvas);
}

html.dark-theme .tabbar {
  background: rgba(10, 23, 36, 0.96);
  border-top-color: rgba(173, 205, 232, 0.16);
}

html.dark-theme .tab-item {
  color: #9bafc1;
}

html.dark-theme .tab-item.is-active {
  color: var(--azure);
}

html.dark-theme .card,
html.dark-theme .module-card,
html.dark-theme .action-card,
html.dark-theme .practice-row {
  border-color: rgba(154, 191, 222, 0.16);
}

html.dark-theme .ghost-button {
  background: var(--surface);
}

html.dark-theme .danger-button {
  color: #ffb1b7;
}

html.dark-theme .primary-button.azure,
html.dark-theme .filter-chip.is-active,
html.dark-theme .plan-calendar,
html.dark-theme .lesson-source-mark {
  color: #fff;
  background: #006fc9;
}

html.dark-theme .filter-chip.is-active {
  border-color: #006fc9;
}

html.dark-theme .action-card.is-mint .action-icon,
html.dark-theme .status-pill.complete,
html.dark-theme .status-pill.ready {
  color: #9be8d3;
}

html.dark-theme .action-card.is-amber .action-icon,
html.dark-theme .status-pill.focus,
html.dark-theme .scenario-icon,
html.dark-theme .review-item summary > span {
  color: #f4ca82;
}

html.dark-theme .chapter-row {
  border-bottom-color: var(--line);
}

html.dark-theme .daily-plan-preview {
  background:
    radial-gradient(circle at 100% 0%, rgba(53, 210, 170, 0.12), transparent 40%),
    linear-gradient(145deg, #10283d, #0f2031);
  border-color: #29465f;
}

html.dark-theme .linear-progress,
html.dark-theme .smart-review-progress,
html.dark-theme .objective-domain-progress {
  background: #2a3e50;
}

html.dark-theme .lesson-card.callout,
html.dark-theme .lesson-source,
html.dark-theme .official-links {
  background: #102a40;
  border-color: #294b66;
}

html.dark-theme .lesson-source {
  color: var(--ink-2);
}

html.dark-theme .lesson-source p,
html.dark-theme .study-section p {
  color: var(--ink-2);
}

html.dark-theme .official-links a {
  border-top-color: var(--line);
}

html.dark-theme .scenario-body p,
html.dark-theme .recall-card p,
html.dark-theme .resource-verification,
html.dark-theme .resource-status,
html.dark-theme .resource-access,
html.dark-theme .plan-done-label,
html.dark-theme .perfect-card,
html.dark-theme .smart-followup,
html.dark-theme .objective-status.mastered,
html.dark-theme .feedback-card.correct {
  color: #9be8d3;
}

html.dark-theme .resource-verification,
html.dark-theme .smart-followup,
html.dark-theme .feedback-card.correct {
  border-color: #285d51;
}

html.dark-theme .resource-verification p,
html.dark-theme .perfect-card p {
  color: #b4d8cf;
}

html.dark-theme .resource-status.supplemental,
html.dark-theme .resource-caution,
html.dark-theme .objective-status.needs_review {
  color: #f4ca82;
}

html.dark-theme .resource-status.community,
html.dark-theme .boost-icon {
  color: #c3b8ff;
  background: #2b2750;
}

html.dark-theme .resource-best {
  color: var(--ink-2);
  background: var(--surface-2);
}

html.dark-theme .resource-safety-note {
  background: #06111d;
}

html.dark-theme .objectives-card li::before {
  color: #9be8d3;
}

html.dark-theme .plan-progress-ring {
  background: conic-gradient(var(--azure) calc(var(--value) * 1%), #2a3e50 0);
}

html.dark-theme .plan-progress-ring::before {
  background: var(--surface);
}

html.dark-theme .plan-step.is-complete,
html.dark-theme .due-review-row:not(:disabled) {
  background: #102f2a;
  border-color: #285d51;
}

html.dark-theme .smart-review-card {
  background:
    radial-gradient(circle at 100% 0%, rgba(53, 210, 170, 0.13), transparent 42%),
    #10263a;
  border-color: #294b66;
}

html.dark-theme .smart-review-card > p {
  color: var(--ink-2);
}

html.dark-theme .smart-review-stats span,
html.dark-theme .mastery-topline > div,
html.dark-theme .objective-row {
  background: var(--surface-2);
  border-color: var(--line);
}

html.dark-theme .objective-status {
  color: #c2ced8;
  background: #293c4e;
}

html.dark-theme .objective-status-dot {
  background: #8295a7;
}

html.dark-theme .quiz-top .icon-button,
html.dark-theme .answer-option,
html.dark-theme .matching-row select {
  background: var(--surface-2);
  border-color: #365066;
}

html.dark-theme .answer-option:hover {
  border-color: #5d7d98;
}

html.dark-theme .answer-option.is-selected {
  background: #153a5b;
}

html.dark-theme .answer-option.is-correct {
  background: var(--mint-soft);
  border-color: var(--mint);
}

html.dark-theme .answer-option.is-wrong {
  background: var(--coral-soft);
  border-color: var(--coral);
}

html.dark-theme .answer-marker {
  background: var(--surface);
  border-color: #49667e;
}

html.dark-theme .answer-option.is-selected .answer-marker {
  color: #fff;
  background: #006fc9;
  border-color: #006fc9;
}

html.dark-theme .answer-option.is-correct .answer-marker {
  color: #fff;
  background: #08785c;
  border-color: #08785c;
}

html.dark-theme .answer-option.is-wrong .answer-marker {
  color: #fff;
  background: #bf3944;
  border-color: #bf3944;
}

html.dark-theme .quiz-footer .primary-button:disabled {
  color: #8395a4;
  background: #273947;
}

html.dark-theme .feedback-card.incorrect {
  color: #ffb2b8;
  border-color: #76414a;
}

html.dark-theme .chart-gridline {
  stroke: #2b4257;
}

html.dark-theme .chart-label {
  fill: #9fb1c1;
}

html.dark-theme .chart-dot {
  fill: var(--surface);
}

html.dark-theme .settings-sheet {
  background: rgba(1, 7, 13, 0.72);
}

html.dark-theme .sheet-panel {
  background: var(--surface);
}

html.dark-theme .sheet-handle {
  background: #40566a;
}

html.dark-theme .date-input,
html.dark-theme .name-input,
html.dark-theme .request-textarea {
  background: var(--surface-2);
  border-color: #3b566d;
}

html.dark-theme .switch {
  background: #455b6f;
}

html.dark-theme .switch[aria-checked="true"] {
  background: var(--azure);
}

html.dark-theme .objective-status-dot.learning {
  background: var(--azure);
}

html.dark-theme .objective-status-dot.needs_review {
  background: var(--amber);
}

html.dark-theme .objective-status-dot.mastered {
  background: var(--mint);
}

html.dark-theme .loading-orbit {
  border-color: #2d4356;
  border-top-color: var(--azure);
}

html.dark-theme.high-contrast {
  --muted: #c6d2dc;
  --line: #587086;
  --azure: #75bdff;
  --azure-dark: #a7d5ff;
}
