@view-transition {
  navigation: auto;
}

@keyframes bc-page-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-8px); }
}

@keyframes bc-page-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

::view-transition-old(root) {
  animation: bc-page-out 150ms ease both;
}

::view-transition-new(root) {
  animation: bc-page-in 210ms ease both;
}

::view-transition-group(bc-topbar) {
  animation-duration: 210ms;
}

::view-transition-old(bc-topbar),
::view-transition-new(bc-topbar) {
  animation: none;
  mix-blend-mode: normal;
}

.nav-pill { text-decoration: none; display: inline-flex; align-items: center; }
.account-avatar {
  width: 38px;
  height: 38px;
  min-width: 38px;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  text-transform: uppercase;
}

.account-avatar img,
.icon-account-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  transform: scale(2.35);
  transform-origin: center;
}
.course-home, .unit-landing { display: grid; gap: 22px; }
.course-lede {
  padding: 30px 34px;
  border-radius: 18px;
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(148,163,184,.24);
  box-shadow: var(--soft-shadow);
}
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
  align-items: stretch;
}
.unit-card {
  display: grid;
  grid-template-rows: auto minmax(3.05rem, auto) minmax(4.75rem, auto) minmax(0, 1fr) auto;
  gap: 12px;
  padding: 18px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: rgba(255,255,255,.94);
  box-shadow: var(--soft-shadow);
}
.unit-card-top {
  min-height: 32px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid #edf2f7;
}
.unit-number, .topic-count, .pattern-tags {
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 800;
  color: #64748b;
}
.unit-card h2 { font-size: 1.12rem; line-height: 1.35; color: #172033; }
.unit-card p { color: #475569; line-height: 1.55; }
.topic-mini-list, .topic-more-inner, .unit-topic-list, .write-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 7px;
}
.topic-mini-list a, .unit-topic-row a {
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  gap: 10px;
  align-items: center;
  color: #334155;
  text-decoration: none;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(248,250,252,.72);
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}
.topic-mini-list a:hover,
.topic-mini-list a:focus-visible,
.unit-topic-row a:hover,
.unit-topic-row a:focus-visible {
  border-color: #fdba74;
  background: #fff7ed;
  color: #172033;
}
.topic-mini-list span, .unit-topic-code {
  color: var(--red);
  font-weight: 800;
}
.topic-more-wrap {
  display: grid;
  gap: 0;
}
.topic-more-toggle {
  width: 100%;
  min-height: 38px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: rgba(255,255,255,.86);
  color: #475569;
  font: inherit;
  font-size: .86rem;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}
.topic-more-toggle:hover,
.topic-more-toggle:focus-visible,
.topic-more-wrap.is-open .topic-more-toggle {
  border-color: #fdba74;
  background: #fff7ed;
  color: #172033;
  box-shadow: none;
  transform: none;
}
.topic-more-icon {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #f8fafc;
  color: var(--red);
  transition: transform .2s ease, background .18s ease;
}
.topic-more-wrap.is-open .topic-more-icon {
  transform: rotate(45deg);
  background: #fff;
}
.topic-more-panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  margin-top: 0;
  transition: grid-template-rows .24s ease, opacity .18s ease, margin-top .18s ease;
}
.topic-more-panel[hidden] {
  display: none;
}
.topic-more-wrap.is-open .topic-more-panel {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 7px;
}

/* Expanded topics replace the trigger until the pointer or focus leaves its unit. */
.topic-more-wrap.is-open .topic-more-toggle {
  min-height: 0;
  height: 0;
  padding: 0;
  border-top-color: transparent;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.topic-more-wrap.is-open .topic-more-panel {
  margin-top: 0;
}
.topic-more-inner {
  min-height: 0;
  overflow: hidden;
}
.unit-open {
  width: 100%;
  min-height: 42px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0 16px;
  border: 1px solid #9f1f18;
  border-radius: 8px;
  background: #b42318;
  color: #fff;
  font-size: .88rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: none;
}
.unit-open:hover,
.unit-open:focus-visible {
  background: #9f1f18;
  color: #fff;
  transform: none;
  box-shadow: none;
}
.unit-page { max-width: 980px; margin: 0 auto; }
.unit-topic-list { counter-reset: topic; }
.unit-topic-row a {
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid #dbe3ee;
  background: rgba(255,255,255,.88);
}
.unit-topic-title { font-weight: 800; line-height: 1.35; }
.course-intro { min-height: 150px; }
.quick-check { display: grid; gap: 14px; }
.mcq-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #dbe3ee;
  background: rgba(255,255,255,.9);
}
.mcq-card h3 { font-size: 1rem; line-height: 1.5; color: #172033; }
.mcq-choices { display: grid; gap: 8px; }
.mcq-choice {
  width: 100%;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: start;
  text-align: left;
  border: 1px solid #dbe3ee;
  background: #fff;
  color: #334155;
  border-radius: 8px;
}
.mcq-choice span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #eff6ff;
  color: var(--blue);
}
.mcq-choice.is-correct { border-color: #22c55e; background: #f0fdf4; }
.mcq-choice.is-wrong { border-color: #f97316; background: #fff7ed; }
.choice-feedback { min-height: 1.4em; color: #475569; font-weight: 700; line-height: 1.5; }
.write-list {
  margin-top: 12px;
  gap: 10px;
}

.pricing-page {
  max-width: 1180px;
  margin: 0 auto;
}

.pricing-lede {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.access-status {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  font-size: .84rem;
  font-weight: 800;
}

.access-status.is-active {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.access-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
}

.checkout-panel {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: rgba(255,255,255,.94);
  box-shadow: var(--soft-shadow);
}

.checkout-panel label {
  color: #172033;
  font-size: .82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.checkout-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.checkout-row input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #172033;
  font: inherit;
  background: #fff;
}

.checkout-row input:focus {
  outline: 3px solid rgba(253, 186, 116, .36);
  border-color: #fb923c;
}

.secondary-btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: .88rem;
  font-weight: 800;
  text-decoration: none;
}

.public-page .primary-btn,
.public-page .secondary-btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 8px;
  font-family: inherit;
  font-size: .88rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.public-page .primary-btn {
  border: 1px solid #9f1f18;
  background: #b42318;
  color: #fff;
}

.public-page .primary-btn:hover,
.public-page .primary-btn:focus-visible {
  background: #9f1f18;
  color: #fff;
  transform: none;
  box-shadow: none;
}

.public-page .secondary-btn {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
}

.public-page .secondary-btn:hover,
.public-page .secondary-btn:focus-visible {
  border-color: #94a3b8;
  color: #172033;
  transform: none;
  box-shadow: none;
}

.checkout-message {
  min-height: 1.45em;
  color: #9f1f18;
  font-size: .9rem;
  font-weight: 700;
}

.checkout-message.is-muted {
  color: var(--bc-muted);
}

.checkout-message.is-success {
  color: var(--bc-primary);
}

.turnstile-status {
  display: grid;
  gap: 6px;
  margin-top: -4px;
  color: #9f1f18;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.45;
}

.turnstile-status[hidden] {
  display: none;
}

.turnstile-status__retry {
  justify-self: start;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.is-hidden {
  display: none !important;
}

.pricing-message {
  margin: -4px 0 0;
  text-align: center;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.pricing-card {
  display: grid;
  grid-template-rows: auto auto auto minmax(4.2rem, auto) minmax(0, 1fr) auto;
  gap: 12px;
  padding: 18px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: rgba(255,255,255,.96);
  box-shadow: var(--soft-shadow);
}

.pricing-card.is-featured {
  border-color: #fdba74;
  box-shadow: 0 18px 40px rgba(154, 52, 18, .14);
}

.trial-offer-badge {
  display: inline-flex;
  width: fit-content;
  min-height: 30px;
  align-items: center;
  padding: 6px 11px;
  border: 1px solid #b8d6c1;
  border-radius: 999px;
  background: #edf7f0;
  color: #2e6842;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1;
  text-transform: uppercase;
}

.monthly-trial-price {
  display: grid;
  gap: 7px;
  align-content: start;
}

.monthly-trial-price__free {
  color: #172033;
  font-size: clamp(2.25rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1;
}

.monthly-trial-price__after {
  color: #334155;
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.35;
}

.monthly-offer-copy {
  display: grid;
  gap: 9px;
  align-content: start;
}

.monthly-offer-copy .trial-cancel-note,
.monthly-offer-copy .launch-transition-note {
  margin: 0;
}

.monthly-offer-copy .trial-cancel-note {
  color: #334155;
  font-weight: 400;
}

.monthly-offer-copy .launch-transition-note {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  color: #64748b;
  font-size: .84rem;
  font-weight: 600;
  line-height: 1.55;
}

.pricing-card-top {
  min-height: 32px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid #edf2f7;
}

.pricing-card h2 {
  font-size: 1.12rem;
  line-height: 1.35;
  color: #172033;
}

.price-line {
  min-height: 52px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.price-was {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  color: #64748b;
  font-size: .88rem;
  font-weight: 800;
  white-space: nowrap;
}

.price-was-value {
  position: relative;
  color: #7c8aa0;
  font-size: 1.6rem;
  line-height: 1;
}

.price-was-value::after {
  content: "";
  position: absolute;
  left: -5px;
  right: -5px;
  top: 48%;
  height: 2px;
  background: #b42318;
  transform: rotate(-18deg);
  transform-origin: center;
}

.price-now {
  color: #172033;
  font-size: 2.45rem;
  line-height: 1;
  font-weight: 800;
}

.price-note {
  color: #64748b;
  font-weight: 800;
}

.pricing-card p,
.pricing-list {
  color: #475569;
  line-height: 1.55;
}

.pricing-list {
  display: grid;
  gap: 8px;
  padding-left: 18px;
}

.pricing-card button.unit-open {
  cursor: pointer;
}

.pricing-card button.unit-open:disabled {
  cursor: wait;
  opacity: .72;
}

.launch-price-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.launch-price-help {
  position: relative;
  display: inline-flex;
  text-transform: none;
  letter-spacing: normal;
}

.launch-price-help__button {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  padding: 0;
  border: 1px solid #94a3b8;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font: 800 .72rem/1 var(--font-sans);
  cursor: help;
}

.launch-price-help__button:hover,
.launch-price-help__button:focus-visible,
.launch-price-help.is-pinned .launch-price-help__button {
  border-color: var(--blue);
  color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(14, 87, 216, .13);
}

.launch-price-help__bubble {
  position: absolute;
  z-index: 120;
  top: calc(100% + 9px);
  right: -8px;
  width: min(290px, calc(100vw - 40px));
  padding: 11px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .16);
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.5;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
}

.launch-price-help__bubble > strong {
  display: block;
  margin-bottom: 3px;
  color: #172033;
}

.launch-price-help__bubble::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 12px;
  width: 10px;
  height: 10px;
  border-top: 1px solid #bfdbfe;
  border-left: 1px solid #bfdbfe;
  background: #fff;
  transform: rotate(45deg);
}

.launch-price-help:not(.is-dismissed):hover .launch-price-help__bubble,
.launch-price-help:not(.is-dismissed):focus-within .launch-price-help__bubble,
.launch-price-help.is-pinned .launch-price-help__bubble {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.billing-consent-dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #172033;
}

.billing-consent-dialog::backdrop {
  background: rgba(15, 23, 42, .58);
  backdrop-filter: blur(3px);
}

.billing-consent-card {
  position: relative;
  display: grid;
  gap: 16px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(15, 23, 42, .3);
}

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

.billing-consent-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 1.35rem;
  cursor: pointer;
}

.billing-consent-summary,
.billing-consent-links {
  color: #475569;
  line-height: 1.58;
}

.billing-consent-facts {
  display: grid;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
  overflow: hidden;
}

.billing-consent-facts > div {
  display: grid;
  grid-template-columns: minmax(110px, .36fr) minmax(0, 1fr);
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #e5edf8;
  line-height: 1.45;
}

.billing-consent-facts > div:last-child {
  border-bottom: 0;
}

.billing-consent-facts span {
  color: #475569;
}

.billing-consent-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  padding: 14px;
  border: 1px solid #93c5fd;
  border-radius: 8px;
  background: #eff6ff;
  color: #172033;
  font-weight: 700;
  line-height: 1.5;
}

.billing-consent-check input {
  width: 19px;
  height: 19px;
  margin-top: 2px;
  accent-color: var(--blue);
}

.billing-consent-validation {
  min-height: 1.4em;
  color: #b42318;
  font-size: .86rem;
  font-weight: 700;
}

.billing-consent-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.billing-consent-actions button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

@media (max-width: 920px) {
  .pricing-grid,
  .pricing-lede,
  .checkout-row {
    grid-template-columns: 1fr;
  }

  .billing-consent-facts > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .billing-consent-actions {
    display: grid;
  }
}
.link-button {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: rgba(255,255,255,.9);
  color: #172033;
  text-align: left;
  line-height: 1.45;
  font-weight: 800;
}
.link-button:hover,
.link-button:focus-visible {
  border-color: #fdba74;
  background: #fff7ed;
  color: #172033;
  box-shadow: none;
  transform: none;
  text-decoration: none;
}
.pattern-tags { display: none; }
.visual-guide { display: grid; gap: 14px; }
.visual-guide-grid { display: grid; gap: 14px; }
.visual-card {
  display: grid;
  grid-template-columns: minmax(220px, .95fr) minmax(220px, 1.05fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: rgba(255,255,255,.92);
}
.visual-art {
  min-width: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fafc 0%, #eef6f5 100%);
  border: 1px solid #e2e8f0;
}
.brain-svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 170px;
}
.brain-svg text {
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 14px;
  font-weight: 800;
  fill: #172033;
}
.brain-outline {
  fill: #fff7ed;
  stroke: #273142;
  stroke-width: 7;
  stroke-linejoin: round;
}
.brain-outline.soft { fill: #f8fafc; stroke-width: 5; }
.lobe, .node, .hemi, .stem { stroke: #273142; stroke-width: 4; stroke-linejoin: round; }
.frontal { fill: #f1a7b3; }
.parietal { fill: #e8c39e; }
.temporal { fill: #e9df92; }
.occipital { fill: #efb7a6; }
.cerebellum-shape { fill: #dfc3ab; }
.thalamus { fill: #b7d7f2; }
.hypothalamus { fill: #f1b8ad; }
.pituitary { fill: #f5d47c; }
.hippocampus { fill: #b9e0c2; }
.amygdala { fill: #ef8f8f; }
.reward { fill: #d9c2f0; }
.medulla { fill: #f5c388; }
.ras { fill: none; stroke: #0f766e; stroke-width: 8; stroke-linecap: round; }
.cerebellum { fill: #cde7d1; }
.brainstem-dot { fill: #8ecae6; }
.left { fill: #e3f2fd; }
.right { fill: #fff1e6; }
.bridge { fill: #d8b4fe; stroke: #273142; stroke-width: 4; }
.broca { fill: #fb7185; }
.wernicke { fill: #fbbf24; }
.visual-copy { min-width: 0; display: grid; gap: 8px; }
.visual-copy h3 { font-size: 1rem; color: #172033; line-height: 1.35; }
.visual-copy p, .visual-copy li { color: #475569; line-height: 1.5; }
.visual-copy ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
}
@media (max-width: 720px) {
  .course-lede { padding: 22px 18px; }
  .topic-mini-list a, .unit-topic-row a { grid-template-columns: 1fr; gap: 4px; }
  .visual-card { grid-template-columns: 1fr; }
  .brain-svg { min-height: 150px; }
  .brain-svg text { font-size: 13px; }
}

/* Public Brain-Course pages */
.public-page {
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(180, 39, 29, .12) 44px, transparent 45px),
    repeating-linear-gradient(to bottom, #fffef9 0, #fffef9 31px, rgba(59, 130, 246, .12) 32px),
    #f4f2eb;
}

.public-shell {
  max-width: 1320px;
}

.public-topbar {
  align-items: center;
  background: rgba(255, 254, 249, .96);
}

.public-nav {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-pill.is-active {
  border-color: #fdba74;
  background: #fff7ed;
  color: #9f1f18;
}

body.nav-preview-icon-topbar .app-shell {
  width: 100%;
  max-width: none;
  padding: 0 0 46px;
}

body.nav-preview-icon-topbar .public-main {
  width: min(1320px, calc(100vw - 36px));
  margin: 0 auto;
  padding-top: 94px;
}

body.nav-preview-icon-topbar .public-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  isolation: isolate;
  min-height: 70px;
  width: 100%;
  margin: 0;
  padding: 0 18px;
  align-items: stretch;
  border: 0;
  border-bottom: 1px solid rgba(117, 84, 62, .28);
  border-radius: 0;
  background: rgba(239, 228, 216, .97);
  box-shadow: 0 12px 26px rgba(31, 43, 61, .12);
  backdrop-filter: blur(10px);
}

body.nav-preview-icon-topbar .public-topbar > div:first-child {
  min-width: min(420px, 45vw);
  display: grid;
  align-content: center;
  padding: 10px 18px 10px 0;
  border-right: 1px solid rgba(117, 84, 62, .2);
}

body.nav-preview-icon-topbar .brand-title {
  font-size: clamp(2.45rem, 4vw, 3.25rem);
}

body.nav-preview-icon-topbar .brand-sub {
  color: #4f5f78;
}

body.nav-preview-icon-topbar .public-nav {
  flex: 1;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 0;
  padding-left: 14px;
}

body.nav-preview-icon-topbar .icon-nav-link,
body.nav-preview-icon-topbar .icon-account-avatar {
  width: 44px;
  min-width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #26364d;
  font: inherit;
  font-size: .86rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition:
    width .26s cubic-bezier(.2,.8,.2,1),
    background .18s ease,
    border-color .18s ease,
    color .18s ease;
}

body.nav-preview-icon-topbar .icon-nav-link {
  padding: 0 12px;
}

body.nav-preview-icon-topbar .icon-nav-link:hover,
body.nav-preview-icon-topbar .icon-nav-link:focus-visible {
  width: min(168px, 36vw);
  border-color: rgba(159, 31, 24, .24);
  background: rgba(255, 247, 237, .9);
  color: #9f1f18;
}

body.nav-preview-icon-topbar .icon-nav-link.is-active {
  border-color: rgba(159, 31, 24, .24);
  background: rgba(255, 247, 237, .72);
  color: #9f1f18;
}

body.nav-preview-icon-topbar .icon-nav-link:focus-visible,
body.nav-preview-icon-topbar .icon-account-avatar:focus-visible,
body.nav-preview-icon-topbar .icon-account-popover a:focus-visible,
body.nav-preview-icon-topbar .icon-account-popover button:focus-visible {
  outline: 3px solid rgba(253, 186, 116, .42);
  outline-offset: 2px;
}

body.nav-preview-icon-topbar .icon-nav-link.is-emphasis {
  color: #9f1f18;
}

body.nav-preview-icon-topbar .icon-nav-mark {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 20px;
}

body.nav-preview-icon-topbar .icon-nav-mark svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.nav-preview-icon-topbar .icon-nav-label {
  max-width: 0;
  opacity: 0;
  white-space: nowrap;
  transform: translateX(-7px);
  transition:
    max-width .26s cubic-bezier(.2,.8,.2,1),
    opacity .18s ease,
    transform .22s cubic-bezier(.2,.8,.2,1);
}

body.nav-preview-icon-topbar .icon-nav-link:hover .icon-nav-label,
body.nav-preview-icon-topbar .icon-nav-link:focus-visible .icon-nav-label {
  max-width: 120px;
  opacity: 1;
  transform: translateX(0);
}

body.nav-preview-icon-topbar .icon-account-menu {
  position: relative;
  z-index: 2100;
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
}

body.nav-preview-icon-topbar .icon-account-avatar {
  justify-content: center;
  border-color: rgba(159, 31, 24, .3);
  border-radius: 50%;
  background: #fffef9;
  color: #9f1f18;
  text-transform: uppercase;
}

body.nav-preview-icon-topbar .icon-account-menu:hover .icon-account-avatar,
body.nav-preview-icon-topbar .icon-account-menu:focus-within .icon-account-avatar,
body.nav-preview-icon-topbar .icon-account-menu.is-open .icon-account-avatar {
  background: #fff7ed;
  border-color: #fdba74;
}

body.nav-preview-icon-topbar .icon-account-popover {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 2200;
  min-width: 154px;
  display: grid;
  gap: 4px;
  padding: 7px;
  border: 1px solid rgba(117, 84, 62, .24);
  border-radius: 0;
  background: #fffef9;
  box-shadow: 0 18px 36px rgba(31, 43, 61, .16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}

body.nav-preview-icon-topbar .icon-account-menu:hover .icon-account-popover,
body.nav-preview-icon-topbar .icon-account-menu:focus-within .icon-account-popover,
body.nav-preview-icon-topbar .icon-account-menu.is-open .icon-account-popover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

body.nav-preview-icon-topbar .icon-account-popover a,
body.nav-preview-icon-topbar .icon-account-popover button {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #26364d;
  font: inherit;
  font-size: .86rem;
  font-weight: 800;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

body.nav-preview-icon-topbar .icon-account-popover a:hover,
body.nav-preview-icon-topbar .icon-account-popover button:hover,
body.nav-preview-icon-topbar .icon-account-popover a:focus-visible,
body.nav-preview-icon-topbar .icon-account-popover button:focus-visible {
  background: #fff7ed;
  color: #9f1f18;
}

.public-main {
  display: grid;
  gap: 24px;
}

.public-hero {
  min-height: min(760px, calc(100vh - 136px));
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(320px, .85fr);
  gap: clamp(28px, 5vw, 68px);
  align-items: center;
  padding: clamp(44px, 6vw, 88px);
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 10px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(180, 39, 29, .16) 64px, transparent 65px),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.95) 0, rgba(255,255,255,.95) 31px, rgba(59,130,246,.14) 32px),
    #fffef9;
  box-shadow: 0 24px 54px rgba(31, 43, 61, .14);
}

.public-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255,255,255,.72), rgba(255,255,255,.18));
}

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

.public-hero-title {
  max-width: 9.2ch;
  margin: 10px 0 18px;
  font-family: "Amatic SC", cursive;
  font-size: clamp(5.2rem, 10vw, 9.2rem);
  line-height: .82;
  color: var(--red);
  letter-spacing: 0;
}

.public-hero-lede {
  max-width: 59ch;
  color: #26364d;
  font-size: 1.13rem;
  line-height: 1.72;
  font-weight: 600;
}

.hero-actions,
.login-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-btn {
  width: auto;
  min-width: 170px;
}

.hero-notebook {
  min-height: 460px;
  display: grid;
  align-content: center;
  gap: 18px;
}

.hero-sticky {
  --sticky-width: min(500px, 100%);
  --sticky-height: 188px;
  --sticky-pad: 22px;
  --sticky-rotate: -2deg;
  --sticky-font-size: 2rem;
  --sticky-content-top: 30px;
  --sticky-content-right: 74px;
  --sticky-content-bottom: 34px;
  --sticky-content-left: 34px;
  justify-self: end;
}

.hero-topic-card {
  width: min(440px, 100%);
  justify-self: start;
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 18px 36px rgba(15, 23, 42, .1);
}

.hero-topic-card.small {
  width: min(380px, 92%);
  justify-self: end;
}

.hero-topic-card h2 {
  margin: 0;
  color: #172033;
  font-size: 1.1rem;
}

.hero-topic-card p {
  margin: 0;
  color: #475569;
  line-height: 1.55;
}

.hero-unit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.hero-unit-card {
  display: grid;
  gap: 5px;
  min-height: 116px;
  padding: 14px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: rgba(255,255,255,.94);
  color: #334155;
  text-decoration: none;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .08);
}

.hero-unit-card strong {
  color: #172033;
  font-size: .98rem;
  line-height: 1.25;
}

.hero-unit-card span:last-child {
  color: #53647a;
  font-size: .88rem;
  line-height: 1.42;
}

.hero-unit-card:hover,
.hero-unit-card:focus-visible {
  border-color: #f4a261;
  color: #172033;
  transform: translateY(-1px);
}

.public-section,
.public-page-head,
.login-panel {
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 10px;
  background: rgba(255,255,255,.94);
  box-shadow: var(--soft-shadow);
}

.public-section {
  padding: clamp(24px, 4vw, 42px);
}

.public-page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  padding: clamp(28px, 5vw, 54px);
}

.public-feature-grid,
.about-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.public-feature {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #fffef9;
}

.feature-mark {
  width: fit-content;
  padding: 5px 8px;
  border-radius: 6px;
  background: #fff7ed;
  color: var(--red);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.public-feature h2,
.access-strip h2,
.public-split h2 {
  margin: 0;
  color: #172033;
  font-size: 1.2rem;
  line-height: 1.35;
}

.public-feature p,
.access-strip p,
.public-split p,
.public-disclaimer {
  color: #475569;
  line-height: 1.62;
}

.access-strip {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 22px;
  align-items: center;
}

.access-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.access-steps a {
  display: grid;
  gap: 5px;
  min-height: 92px;
  padding: 14px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  text-decoration: none;
  font-weight: 800;
  line-height: 1.35;
}

.access-steps span {
  color: var(--red);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.access-cta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

.access-pricing-btn {
  min-width: min(320px, 100%);
}

.public-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.stacked-heading {
  display: grid;
  gap: 3px;
}

.stacked-heading span {
  display: block;
}

.public-disclaimer {
  background: #fff7ed;
  border-color: #fdba74;
}

.public-legal {
  max-width: 980px;
  margin: 0 auto;
  color: #475569;
  font-size: .84rem;
  line-height: 1.6;
  text-align: center;
}

.public-legal-text,
.public-legal-links,
.public-legal-note {
  display: block;
  margin: 0;
}

.public-legal-links {
  margin-top: 7px;
}

.public-legal-note {
  margin-bottom: 7px;
  color: #5b6680;
}

.public-legal a {
  color: #0052cc;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.public-legal-official-link {
  white-space: nowrap;
}

.public-pricing-grid {
  margin-bottom: 0;
}

.public-pricing-card {
  background:
    linear-gradient(90deg, rgba(180, 39, 29, .08) 22px, transparent 23px),
    repeating-linear-gradient(to bottom, #fff 0, #fff 29px, rgba(59, 130, 246, .09) 30px);
}

.public-checkout-panel {
  grid-template-columns: minmax(0, .72fr) minmax(0, 1fr);
  align-items: end;
}

.public-checkout-panel p {
  margin: 5px 0 0;
  color: #64748b;
  line-height: 1.5;
}

.newsletter-panel {
  margin-top: 0;
}

.login-page {
  min-height: calc(100vh - 132px);
  align-content: center;
}

.login-panel {
  position: relative;
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, .72fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: clamp(30px, 6vw, 68px);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(180, 39, 29, .12) 52px, transparent 53px),
    repeating-linear-gradient(to bottom, #fffef9 0, #fffef9 31px, rgba(59, 130, 246, .12) 32px);
}

.login-sticky {
  --sticky-width: 100%;
  --sticky-height: 206px;
  --sticky-pad: 22px;
  --sticky-rotate: -2.2deg;
  --sticky-font-size: 2.05rem;
  --sticky-content-top: 32px;
  --sticky-content-right: 78px;
  --sticky-content-bottom: 36px;
  --sticky-content-left: 36px;
}

.login-copy {
  display: grid;
  gap: 12px;
}

.login-status {
  width: fit-content;
}

.auth-panel {
  align-items: start;
}

.auth-form {
  box-shadow: none;
}

.auth-form[hidden] {
  display: none !important;
}

.auth-form input,
.contact-form input,
.contact-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #172033;
  font: inherit;
  background: #fff;
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  box-sizing: border-box;
  padding-right: 2.75rem;
}

.password-toggle {
  position: absolute;
  top: 1px;
  right: .62rem;
  bottom: 1px;
  width: 1.8rem;
  height: auto;
  min-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--bc-primary);
  transform: none;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  line-height: 1;
  box-shadow: none;
}

.password-toggle:hover {
  background: transparent;
}

.password-toggle:focus-visible {
  outline: 2px solid rgba(0, 74, 198, .32);
  outline-offset: -2px;
  background: transparent;
}

.password-toggle:active {
  top: 1px;
  bottom: 1px;
  transform: none;
  background: transparent;
  box-shadow: none;
}

.password-toggle-icon {
  width: 1rem;
  height: 1rem;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.password-toggle-icon-hide,
.password-toggle.is-visible .password-toggle-icon-show {
  display: none;
}

.password-toggle.is-visible .password-toggle-icon-hide {
  display: block;
}

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

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.auth-form input:focus,
.contact-form input:focus,
.contact-form textarea:focus {
  outline: 3px solid rgba(253, 186, 116, .36);
  border-color: #fb923c;
}

.account-grid,
.admin-grid {
  display: grid;
  gap: 18px;
}

.account-panel,
.legal-panel,
.admin-panel,
.locked-panel {
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
}

.account-panel h2,
.legal-panel h2,
.admin-panel h2 {
  color: #172033;
  font-size: 1.05rem;
}

.account-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.account-list div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #edf2f7;
}

.account-list dt {
  color: #64748b;
  font-weight: 800;
}

.account-list dd {
  margin: 0;
  color: #172033;
  overflow-wrap: anywhere;
}

.dynamic-unit-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
}

.locked-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid #fdba74;
  border-radius: 8px;
  background: #fff7ed;
}

.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: .82rem;
}

.admin-table th,
.admin-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #edf2f7;
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: #64748b;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.admin-table td {
  color: #334155;
  overflow-wrap: anywhere;
}

.admin-readiness {
  border-width: 2px;
}

.admin-readiness.is-ready {
  border-color: #86efac;
}

.admin-readiness.is-blocked {
  border-color: #fca5a5;
}

.admin-readiness__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.admin-readiness__badge {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: #b42318;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.admin-readiness.is-ready .admin-readiness__badge {
  color: #176b3a;
}

.admin-readiness__facts,
.admin-readiness-variants {
  margin: 18px 0 0;
  padding-left: 20px;
}

.admin-readiness-variants {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  list-style: none;
}

.admin-readiness-variant {
  padding: 12px;
  border: 1px solid var(--bc-line);
  border-radius: 10px;
  background: #f8faff;
}

.admin-readiness-variant strong,
.admin-readiness-variant span,
.admin-readiness-variant small {
  display: block;
}

.admin-readiness-variant span,
.admin-readiness-variant small,
.admin-readiness__note {
  margin-top: 4px;
  color: var(--bc-muted);
  font-size: .8rem;
}

.admin-readiness-variant.is-blocked small {
  color: #b42318;
}

.admin-readiness__note {
  margin-bottom: 0;
}

@media (max-width: 760px) {
  .admin-readiness-variants {
    grid-template-columns: minmax(0, 1fr);
  }
}

.legal-page {
  max-width: 980px;
  margin: 0 auto;
}

.legal-panel {
  line-height: 1.7;
}

.legal-panel p {
  margin: 0 0 12px;
  color: #475569;
}

.about-head {
  grid-template-columns: 1fr;
}

@media (max-width: 980px) {
  .public-hero,
  .public-page-head,
  .access-strip,
  .public-checkout-panel,
  .login-panel {
    grid-template-columns: 1fr;
  }

  .public-feature-grid,
  .about-cards,
  .access-steps,
  .public-split {
    grid-template-columns: 1fr;
  }

  .dynamic-unit-top {
    grid-template-columns: 1fr;
  }

  .hero-notebook {
    min-height: auto;
  }

  .hero-sticky,
  .hero-topic-card,
  .hero-topic-card.small {
    justify-self: stretch;
    width: 100%;
  }

  .access-cta {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .public-topbar {
    grid-template-columns: 1fr;
  }

  .public-nav {
    justify-content: flex-start;
  }

  .public-hero {
    padding: 28px 18px;
    min-height: auto;
  }

  .public-hero-title {
    font-size: clamp(4.3rem, 18vw, 6.4rem);
  }

  .hero-actions,
  .login-actions {
    display: grid;
  }

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

  .hero-btn {
    width: 100%;
  }

  body.nav-preview-icon-topbar .public-topbar {
    min-height: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0 10px;
  }

  body.nav-preview-icon-topbar .public-main {
    padding-top: 146px;
  }

  body.nav-preview-icon-topbar .public-topbar > div:first-child {
    min-width: 0;
    padding: 10px 0 8px;
    border-right: 0;
    border-bottom: 1px solid rgba(117, 84, 62, .2);
  }

  body.nav-preview-icon-topbar .public-nav {
    width: 100%;
    justify-content: flex-start;
    gap: 2px;
    padding: 8px 0;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  body.nav-preview-icon-topbar .brand-title {
    font-size: 2.45rem;
  }

  body.nav-preview-icon-topbar .brand-sub {
    font-size: .76rem;
  }

  body.nav-preview-icon-topbar .icon-nav-link,
  body.nav-preview-icon-topbar .icon-account-avatar {
    width: 40px;
    min-width: 40px;
    height: 40px;
  }

  body.nav-preview-icon-topbar .icon-nav-link:hover,
  body.nav-preview-icon-topbar .icon-nav-link:focus-visible {
    width: min(142px, 62vw);
  }

  body.nav-preview-icon-topbar .icon-account-popover {
    right: auto;
    left: 0;
  }
}

.account-settings-grid[hidden] {
  display: none !important;
}

.settings-page {
  width: min(1180px, calc(100vw - 36px));
  margin: 0 auto;
  padding-bottom: 56px;
}

.settings-heading {
  padding: 38px 0 24px;
}

.settings-shell {
  display: grid;
  grid-template-columns: minmax(230px, 290px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.settings-shell[hidden] {
  display: none !important;
}

.settings-nav {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--bc-line);
  border-radius: 18px;
  background: #fff;
}

.settings-nav__item {
  min-width: 0;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 9px;
  color: var(--bc-text);
  text-decoration: none;
  border: 1px solid var(--bc-line);
  border-radius: 12px;
  background: #fff;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.settings-nav__item:hover,
.settings-nav__item:focus-visible,
.settings-nav__item.is-active {
  color: var(--bc-text);
  border-color: var(--bc-primary, #004ac6);
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--bc-primary, #004ac6);
}

.settings-nav__item:focus-visible {
  outline: 3px solid rgba(18, 91, 219, .18);
  outline-offset: 2px;
}

.settings-nav__icon {
  position: relative;
  width: 42px;
  height: 42px;
  display: block;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
}

.settings-nav__icon-static,
.settings-nav__icon-motion {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: inherit;
  background: #fff;
}

.settings-nav__icon-motion {
  z-index: 1;
  opacity: 0;
  transition: opacity 90ms ease;
}

.settings-nav__icon-motion.is-visible {
  opacity: 1;
}

html[data-reduce-motion="true"] .settings-nav__icon-motion,
html[data-reduce-motion="true"] .course-topic-icon-motion {
  display: none !important;
}

.settings-nav__item span,
.settings-nav__item strong,
.settings-nav__item small {
  min-width: 0;
  display: block;
  background: transparent;
}

.settings-nav__item strong {
  font-size: .92rem;
}

.settings-nav__item small {
  margin-top: 2px;
  color: var(--bc-muted);
  font-size: .74rem;
  line-height: 1.35;
}

.settings-outlet {
  min-width: 0;
}

.settings-outlet [data-settings-panel][hidden] {
  display: none !important;
}

.settings-outlet .account-settings-panel {
  min-height: 520px;
}

.account-settings-form select,
.account-settings-form textarea {
  width: 100%;
  border: 1px solid var(--bc-line);
  border-radius: 10px;
  background: #fff;
  color: var(--bc-text);
  font: inherit;
}

.account-settings-form select {
  min-height: 44px;
  padding: 9px 12px;
}

.account-settings-form textarea {
  min-height: 150px;
  padding: 12px;
  resize: vertical;
}

.password-toggle span[aria-hidden] {
  font-size: .72rem;
  font-weight: 800;
}

.settings-divider {
  margin: 30px 0;
  border: 0;
  border-top: 1px solid var(--bc-line);
}

.settings-preferences {
  margin: 30px 0 0;
  padding: 18px;
  border: 1px solid var(--bc-line);
  border-radius: 12px;
  background: #f8faff;
}

.settings-preferences legend {
  padding: 0 6px;
  color: var(--bc-text);
  font-weight: 800;
}

.settings-preference {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  cursor: pointer;
}

.settings-preference input {
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  accent-color: var(--bc-primary, #004ac6);
}

.settings-preference strong,
.settings-preference small {
  display: block;
}

.settings-preference small {
  margin-top: 3px;
  color: var(--bc-muted);
  line-height: 1.45;
}

.subscription-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0;
}

.subscription-facts[hidden] {
  display: none;
}

.subscription-facts div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--bc-line);
  border-radius: 10px;
  background: #f8faff;
}

.subscription-facts dt {
  color: var(--bc-muted);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.subscription-facts dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  color: var(--bc-text);
  font-weight: 700;
}

@media (max-width: 760px) {
  .settings-page {
    width: min(100% - 24px, 680px);
  }

  .settings-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-nav {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-nav__item {
    grid-template-columns: 38px minmax(0, 1fr);
    padding: 7px;
  }

  .settings-nav__icon {
    width: 34px;
    height: 34px;
  }

  .settings-nav__item small {
    display: none;
  }

  .subscription-facts {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .settings-nav__icon-motion {
    display: none !important;
  }
}

.account-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.account-settings-panel {
  min-width: 0;
  padding: 24px;
}

.account-settings-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.account-settings-panel h2 {
  margin: 5px 0 18px;
  color: var(--bc-text);
  font-size: 1.35rem;
}

.account-subscription-panel {
  grid-column: 1 / -1;
}

.account-subscription-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 20px;
  border: 1px solid #c9d9f8;
  border-radius: 16px;
  background: linear-gradient(135deg, #f8fbff 0%, #eef4ff 100%);
}

.account-subscription-copy {
  min-width: 0;
}

.account-subscription-copy h2 {
  margin: 5px 0 8px;
  font-size: clamp(1.35rem, 2.2vw, 1.65rem);
}

.account-subscription-copy > p {
  max-width: 720px;
  margin: 0;
  color: var(--bc-muted);
  line-height: 1.58;
}

.account-subscription-status {
  flex: 0 0 auto;
  width: fit-content;
  padding: 8px 11px;
  border: 1px solid #bfd3fb;
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  font-size: .82rem;
  font-weight: 800;
  box-shadow: 0 5px 14px rgba(16, 74, 176, .08);
}

.account-subscription-status[data-tone="active"],
.account-subscription-status[data-tone="on_trial"] {
  border-color: #b7dfc4;
  background: #f2fbf5;
  color: #18743a;
}

.account-subscription-status[data-tone="past_due"],
.account-subscription-status[data-tone="unavailable"] {
  border-color: #f4ca9b;
  background: #fff9f1;
  color: #9a4c08;
}

.account-subscription-notice {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #f8fbff;
  color: #334155;
  line-height: 1.5;
}

.account-subscription-notice strong {
  color: var(--blue);
}

.account-subscription-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.account-subscription-panel .subscription-facts {
  margin: 16px 0;
}

.account-subscription-panel .subscription-facts div {
  padding: 15px 16px;
  border-color: #dce5f4;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(15, 39, 82, .04);
}

@media (max-width: 620px) {
  .account-subscription-hero {
    display: grid;
    gap: 14px;
    padding: 17px;
  }

  .account-subscription-status {
    grid-row: 1;
  }
}

.account-avatar-editor {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid var(--bc-primary);
  border-radius: 50%;
  background: var(--bc-primary-soft);
  color: var(--bc-primary);
  font-size: 1.45rem;
  font-weight: 800;
}

.account-avatar-editor img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.account-settings-form {
  display: grid;
  gap: 9px;
}

.account-settings-form label {
  color: var(--bc-text);
  font-size: .82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.account-settings-form input {
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--bc-border-strong);
  border-radius: var(--bc-radius);
  background: #fff;
  color: var(--bc-text);
  font: inherit;
}

.account-settings-form input[readonly] {
  background: #f3f5f8;
  color: var(--bc-muted);
}

.account-settings-form input[type="file"] {
  padding: 8px;
}

.account-settings-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 760px) {
  .account-settings-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .account-settings-actions {
    grid-column: auto;
    flex-direction: column;
  }
}

/* Brain-Course redesign V1: Stitch-inspired core shell without changing routes or runtime hooks. */
:root {
  --bc-bg: #f8f9ff;
  --bc-bg-warm: #fffaf6;
  --bc-surface: #ffffff;
  --bc-surface-soft: #f1f4ff;
  --bc-surface-blue: #eaf0ff;
  --bc-border: #dfe4f2;
  --bc-border-strong: #b9c4dd;
  --bc-text: #111827;
  --bc-muted: #5b6680;
  --bc-primary: #004ac6;
  --bc-primary-strong: #003ea8;
  --bc-primary-soft: #e9eeff;
  --bc-accent: #943700;
  --bc-accent-soft: #ffede6;
  --bc-danger: #b3261e;
  --bc-success: #176b3a;
  --bc-radius: 8px;
  --bc-shadow: 0 18px 42px rgba(27, 39, 72, .08);
  --bc-topic-shell-width: 1580px;
  --bc-topic-document-width: 1010px;
}

html {
  background: var(--bc-bg);
}

body,
.topic-chip,
button,
input,
textarea,
select {
  font-family: "Be Vietnam Pro", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  color: var(--bc-text);
  background:
    linear-gradient(180deg, rgba(255,255,255,.85), rgba(248,249,255,.92) 360px),
    var(--bc-bg);
}

.app-shell,
.public-shell {
  width: min(1288px, calc(100vw - 48px));
  max-width: none;
  padding: 0 0 64px;
}

.app-shell:has(.topic-document-wrap) {
  width: min(var(--bc-topic-shell-width), calc(100vw - 24px));
}

.topbar,
.public-topbar {
  position: relative;
  z-index: 120;
  isolation: isolate;
  overflow: visible;
  view-transition-name: bc-topbar;
  width: 100vw;
  margin: 0 calc(50% - 50vw) clamp(42px, 6vw, 72px);
  padding: 16px max(24px, calc((100vw - 1288px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border: 0;
  border-bottom: 1px solid var(--bc-border);
  border-radius: 0;
  background: rgba(255, 255, 255, .9);
  box-shadow: none;
  backdrop-filter: blur(14px);
}

.app-shell:has(.topic-document-wrap) .topbar {
  padding-inline: max(24px, calc((100vw - var(--bc-topic-shell-width)) / 2));
}

.public-topbar {
  padding-block: 19px;
}

.topbar > div:first-child {
  min-width: clamp(216px, 22vw, 310px);
}

.brand-title {
  width: clamp(216px, 22vw, 310px);
  height: clamp(46px, 4vw, 52px);
  display: block;
  overflow: hidden;
  background: url("./logo/brain-course-logo.png?v=logo-1") left center / contain no-repeat;
  color: transparent;
  font-size: 0;
  line-height: 0;
  white-space: nowrap;
}

.brand-title::before {
  content: none;
}

.brand-sub {
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.top-actions,
.public-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

/* Static markup is public. Keep it out of view until the shared auth shell
   has rendered either a cached account or a confirmed anonymous state. */
.top-actions:not([data-nav-ready="true"]) > * {
    visibility: hidden;
    pointer-events: none;
}

.nav-auth-slot {
  min-width: 156px;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.nav-auth-slot > .account-menu,
.nav-auth-slot > .icon-account-menu {
  margin-left: auto;
}

/* Paid-unit cards stay neutral while client session restoration is unresolved.
   This avoids presenting a signed-out action to a signed-in student. */
.unit-card[aria-busy="true"] .unit-open {
  cursor: wait;
  opacity: .78;
  pointer-events: none;
}

.pill,
.nav-pill,
.public-page .secondary-btn,
.secondary-btn {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: var(--bc-radius);
  background: transparent;
  color: var(--bc-text);
  font-size: .94rem;
  font-weight: 600;
  letter-spacing: 0;
  text-decoration: none;
}

.pill,
.nav-pill {
  padding: 9px 12px;
}

.nav-pill:hover,
.nav-pill:focus-visible,
.pill:hover,
.pill:focus-visible {
  border-color: var(--bc-border);
  background: var(--bc-surface-soft);
  color: var(--bc-primary);
  outline: none;
}

.nav-pill.is-active,
.pill.is-active {
  border-color: transparent;
  border-bottom-color: var(--bc-primary);
  border-radius: 0;
  background: transparent;
  color: var(--bc-primary);
  box-shadow: inset 0 -2px 0 var(--bc-primary);
}

.nav-pill--unavailable,
.icon-nav-link.is-unavailable {
  color: var(--bc-muted);
  cursor: default;
  opacity: .7;
}

.nav-pill--unavailable::after {
  content: "Soon";
  margin-left: 6px;
  color: var(--bc-muted);
  font-size: .64rem;
  font-weight: 800;
  text-transform: uppercase;
}

.account-popover__unavailable {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  color: var(--bc-muted);
  font-weight: 700;
  cursor: default;
}

.account-popover__unavailable small {
  color: var(--bc-muted);
  font-size: .72rem;
  font-weight: 600;
}

.pill.accent,
.public-page .primary-btn,
.primary-btn,
.unit-open {
  min-height: 44px;
  border: 1px solid var(--bc-primary);
  border-radius: var(--bc-radius);
  background: var(--bc-primary);
  color: #fff;
  font-size: .94rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: none;
}

span.pill.accent {
  min-height: 40px;
  border-color: var(--bc-primary-soft);
  background: var(--bc-primary-soft);
  color: var(--bc-primary);
  font-weight: 700;
  cursor: default;
}

.pill.accent:hover,
.pill.accent:focus-visible,
.public-page .primary-btn:hover,
.public-page .primary-btn:focus-visible,
.primary-btn:hover,
.primary-btn:focus-visible,
.unit-open:hover,
.unit-open:focus-visible {
  border-color: var(--bc-primary-strong);
  background: var(--bc-primary-strong);
  color: #fff;
  transform: none;
  box-shadow: none;
}

span.pill.accent:hover,
span.pill.accent:focus-visible {
  border-color: var(--bc-primary-soft);
  background: var(--bc-primary-soft);
  color: var(--bc-primary);
  outline: none;
}

.account-avatar {
  overflow: hidden;
  border: 1px solid var(--bc-border-strong);
  border-radius: 50%;
  background: #fff;
  color: var(--bc-primary);
  box-shadow: none;
}

.account-avatar:hover,
.account-avatar:focus-visible,
.account-menu.is-open .account-avatar {
  border-color: var(--bc-primary);
  background: #fff;
  box-shadow: none;
}

.account-menu {
  position: relative;
  z-index: 130;
  display: inline-flex;
}

.account-menu-trigger {
  border-radius: 50%;
  border-color: var(--bc-primary);
  font: inherit;
  cursor: pointer;
}

.account-menu-trigger.is-active {
  border-radius: 50%;
  border-color: var(--bc-primary);
  box-shadow: 0 0 0 3px rgba(0, 74, 198, .12);
}

.account-menu-trigger:hover,
.account-menu-trigger:focus-visible,
.account-menu.is-open .account-menu-trigger {
  border-color: var(--bc-primary-strong);
  background: var(--bc-primary-strong);
  color: #fff;
}

.account-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 40;
  min-width: 168px;
  padding: 8px;
  border: 1px solid var(--bc-border);
  border-radius: var(--bc-radius);
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .14);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.account-menu.is-open .account-popover,
.account-menu:focus-within .account-popover {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translateY(0);
}

.account-popover a,
.account-popover button {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--bc-text);
  font: inherit;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.account-popover a:hover,
.account-popover button:hover,
.account-popover a:focus-visible,
.account-popover button:focus-visible {
  background: var(--bc-primary-soft);
  color: var(--bc-primary);
  outline: none;
}

.public-main,
.course-home,
.unit-landing {
  display: grid;
  gap: clamp(24px, 4vw, 36px);
}

.course-home,
.pricing-page,
.legal-page {
  max-width: 1180px;
  margin: 0 auto;
}

.course-lede,
.public-page-head {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

.public-page-head {
  grid-template-columns: 1fr;
  justify-items: center;
}

.section-kicker,
.unit-number,
.topic-count,
.modal-label,
.course-index-kicker,
.course-unit-kicker,
.topic-footer-kicker {
  color: var(--bc-primary);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.page-title,
.public-hero-title,
.course-index-head h2,
.modal h2,
.image-lightbox h3 {
  font-family: "Be Vietnam Pro", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--bc-text);
  letter-spacing: 0;
}

.page-title,
.public-hero-title {
  margin: 10px 0 12px;
  font-size: clamp(2.6rem, 5vw, 4rem);
  line-height: 1.04;
  font-weight: 800;
  text-wrap: balance;
}

.page-subtitle,
.public-hero-lede {
  max-width: 760px;
  margin: 0 auto;
  color: var(--bc-muted);
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.65;
  font-weight: 500;
}

.course-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.unit-card,
.pricing-card,
.public-feature,
.checkout-panel,
.legal-panel,
.admin-panel,
.account-panel,
.course-index-panel {
  border: 1px solid var(--bc-border-strong);
  border-radius: var(--bc-radius);
  background: rgba(255, 255, 255, .94);
  box-shadow: none;
}

.unit-card {
  min-height: 430px;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 18px;
  padding: 26px;
}

.unit-card-top,
.pricing-card-top {
  min-height: 34px;
  padding: 0;
  border: 0;
}

.unit-number,
.topic-count,
.unit-lock-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 5px 10px;
  border-radius: 7px;
  background: var(--bc-primary-soft);
  color: var(--bc-primary);
  letter-spacing: 0;
  text-transform: none;
}

.topic-count {
  background: transparent;
  color: var(--bc-text);
  font-weight: 600;
}

.unit-lock-badge {
  margin-left: 6px;
  border: 1px solid var(--bc-border);
  background: #f8faff;
  color: var(--bc-muted);
  font-size: .78rem;
  font-weight: 800;
}

.unit-card h2,
.pricing-card h2,
.public-feature h2,
.access-strip h2,
.public-split h2 {
  color: var(--bc-text);
  font-size: 1.45rem;
  line-height: 1.25;
  font-weight: 700;
}

.unit-card p,
.pricing-card p,
.public-feature p,
.public-split p,
.access-strip p,
.legal-panel p,
.account-list dd,
.admin-table td {
  color: var(--bc-muted);
  line-height: 1.65;
}

.topic-mini-list,
.topic-more-inner {
  gap: 8px;
}

.topic-mini-list a {
  min-height: 34px;
  grid-template-columns: 54px minmax(0, 1fr);
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--bc-primary);
  font-size: .96rem;
  font-weight: 500;
}

.topic-mini-list a:hover,
.topic-mini-list a:focus-visible {
  background: transparent;
  color: var(--bc-primary-strong);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.topic-mini-list span,
.unit-topic-code {
  color: var(--bc-primary);
  font-weight: 700;
}

.topic-mini-list a[href*="unit.html?slug=topic-"]::after {
  content: "Locked";
  justify-self: end;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--bc-primary-soft);
  color: var(--bc-muted);
  font-size: .72rem;
  font-weight: 700;
}

.topic-mini-list a[href*="unit.html?slug=topic-"] {
  grid-template-columns: 54px minmax(0, 1fr) auto;
}

.unit-card:not(.is-locked) .topic-mini-list a[data-course-unlocked="true"] {
  grid-template-columns: 54px minmax(0, 1fr);
}

.unit-card:not(.is-locked) .topic-mini-list a[data-course-unlocked="true"]::after {
  content: none;
}

.unit-card:not(.is-locked) .topic-mini-list a[data-state-label] {
  grid-template-columns: 54px minmax(0, 1fr) auto;
}

.unit-card:not(.is-locked) .topic-mini-list a[data-state-label]::after {
  content: attr(data-state-label);
  justify-self: end;
  color: var(--bc-muted);
  font-size: .7rem;
  font-weight: 700;
  text-decoration: none;
}

.unit-card:not(.is-locked) .topic-mini-list a[data-learning-state="needs_review"]::after { color: #a75000; }
.unit-card:not(.is-locked) .topic-mini-list a[data-learning-state="proficient"]::after,
.unit-card:not(.is-locked) .topic-mini-list a[data-learning-state="mastered"]::after,
.unit-card:not(.is-locked) .topic-mini-list a[data-learning-state="lesson_complete"]::after { color: #207447; }

.topic-more-toggle {
  min-height: 42px;
  padding: 10px 0;
  border: 0;
  border-top: 1px solid var(--bc-border);
  border-radius: 0;
  background: transparent;
  color: var(--bc-text);
  font-size: .95rem;
  font-weight: 600;
}

.topic-more-icon {
  background: transparent;
  color: var(--bc-text);
}

.unit-open {
  width: 100%;
  background: transparent;
  color: var(--bc-text);
  border-color: var(--bc-border-strong);
}

.unit-open:hover,
.unit-open:focus-visible {
  border-color: var(--bc-primary);
  background: var(--bc-primary);
}

.public-page {
  background:
    radial-gradient(circle at 8% 0%, rgba(148, 181, 255, .24), transparent 28%),
    linear-gradient(180deg, #fbfbff 0%, var(--bc-bg) 54%, #f4f7ff 100%);
}

.public-hero {
  min-height: auto;
  grid-template-columns: minmax(0, .88fr) minmax(360px, 1fr);
  gap: clamp(34px, 6vw, 76px);
  padding: clamp(40px, 6vw, 74px) 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

.public-hero::before {
  content: none;
}

.home-unit-hero {
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(6px, 1.6vw, 14px);
  padding-top: clamp(10px, 2vw, 18px);
  padding-bottom: clamp(22px, 4vw, 42px);
}

.home-unit-hero .hero-copy {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(310px, .92fr) minmax(300px, .82fr);
  align-items: center;
  gap: clamp(34px, 7vw, 108px);
}

.public-hero-title {
  max-width: 12ch;
  margin-top: 12px;
}

.hero-copy .public-hero-lede {
  margin: 0;
}

.hero-lede-panel {
  justify-self: end;
  width: min(560px, 100%);
  padding: 16px 20px;
  background: linear-gradient(90deg, rgba(234, 240, 255, .54), rgba(234, 240, 255, .18));
  color: #42506a;
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  line-height: 1.62;
  font-weight: 500;
}

.hero-actions,
.login-actions {
  margin-top: 26px;
  gap: 12px;
}

.hero-unit-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.hero-unit-card {
  min-height: 132px;
  gap: 8px;
  padding: 18px;
  border-color: var(--bc-border);
  border-radius: var(--bc-radius);
  background: #fff;
  box-shadow: none;
}

.hero-unit-card:hover,
.hero-unit-card:focus-visible,
.public-feature:hover {
  border-color: var(--bc-primary);
  transform: none;
}

.home-unit-path {
  width: min(1240px, 100%);
  margin: clamp(-16px, -1.2vw, -6px) auto 0;
  padding: 0 clamp(8px, 3vw, 34px);
  display: grid;
  gap: clamp(12px, 2vw, 20px);
}

.home-unit-path-visual {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  aspect-ratio: 3601 / 1060;
  overflow: visible;
  background: transparent;
  --glow-x: 9%;
  --glow-y: 46%;
  --glow-color: 91, 204, 235;
}

.home-unit-glow {
  position: absolute;
  /* Keep gradient coordinates aligned with the transparent illustration. */
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  filter: blur(14px);
  transform: scale(.96);
  background:
    radial-gradient(
      ellipse 13% 58% at var(--glow-x) var(--glow-y),
      rgba(var(--glow-color), .44) 0%,
      rgba(var(--glow-color), .24) 31%,
      rgba(var(--glow-color), .08) 58%,
      transparent 84%
    ),
    radial-gradient(
      ellipse 21% 74% at calc(var(--glow-x) + 1%) calc(var(--glow-y) + 2%),
      rgba(var(--glow-color), .11) 0%,
      rgba(var(--glow-color), .045) 48%,
      transparent 82%
    ),
    radial-gradient(
      ellipse 10% 36% at calc(var(--glow-x) - 4%) calc(var(--glow-y) - 9%),
      rgba(255, 255, 255, .32) 0%,
      transparent 78%
    );
  transition:
    opacity .32s ease,
    transform .42s cubic-bezier(.2,.8,.2,1);
}

.home-unit-path-visual.is-glowing .home-unit-glow,
.home-unit-path:focus-within .home-unit-glow {
  opacity: 1;
  transform: scale(1);
}

.home-unit-path-visual img {
  position: relative;
  z-index: 1;
  width: 100%;
  display: block;
}

.home-unit-labels {
  position: relative;
  z-index: 3;
}

.home-unit-path-visual img {
  height: auto;
}

.home-unit-hero .hero-secondary-btn {
  border-color: #9db7e8;
  background: #eaf1ff;
  color: #123f91;
}

.home-unit-hero .hero-secondary-btn:hover,
.home-unit-hero .hero-secondary-btn:focus-visible {
  border-color: #5f83c6;
  background: #dce8ff;
  color: #0b347d;
}

.home-unit-hotspot {
  position: absolute;
  z-index: 3;
  display: block;
  border-radius: 999px;
  color: transparent;
  text-decoration: none;
  outline: none;
}

.home-unit-hotspot:focus-visible,
.home-unit-label:focus-visible {
  outline: 3px solid rgba(0, 74, 198, .24);
  outline-offset: 5px;
}

.home-unit-hotspot.unit-0 { left: 0; top: 22%; width: 20%; height: 54%; }
.home-unit-hotspot.unit-1 { left: 20%; top: 4%; width: 18%; height: 76%; }
.home-unit-hotspot.unit-2 { left: 38%; top: 16%; width: 18%; height: 66%; }
.home-unit-hotspot.unit-3 { left: 55%; top: 2%; width: 17%; height: 78%; }
.home-unit-hotspot.unit-4 { left: 70%; top: 10%; width: 16%; height: 70%; }
.home-unit-hotspot.unit-5 { left: 84%; top: 4%; width: 16%; height: 78%; }

.home-unit-labels {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: stretch;
  gap: clamp(8px, 1.6vw, 22px);
}

.home-unit-label {
  min-height: 78px;
  display: grid;
  grid-template-rows: auto 1fr;
  align-content: stretch;
  gap: 5px;
  padding: 8px 4px;
  border-radius: var(--bc-radius);
  color: var(--bc-text);
  text-align: center;
  text-decoration: none;
}

.home-unit-label span {
  display: block;
  font-size: clamp(.76rem, 1.2vw, 1.03rem);
  font-weight: 800;
  line-height: 1.08;
  align-self: start;
  text-wrap: balance;
}

.home-unit-label strong {
  display: block;
  order: -1;
  color: var(--bc-muted);
  font-family: "Be Vietnam Pro", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(.9rem, 1.35vw, 1.13rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0;
}

.home-unit-label:hover,
.home-unit-label:focus-visible {
  color: var(--bc-primary);
}

.home-unit-label:hover strong,
.home-unit-label:focus-visible strong,
.home-unit-label:hover span,
.home-unit-label:focus-visible span {
  color: var(--bc-primary);
}

.public-section,
.login-panel {
  border-color: var(--bc-border);
  border-radius: var(--bc-radius);
  background: rgba(255,255,255,.9);
  box-shadow: none;
}

.public-section,
.public-page-head {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.public-section {
  padding-inline: 0;
}

.public-feature {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.public-feature:hover,
.public-feature:focus-visible {
  border-color: transparent;
  background: transparent;
  transform: none;
}

.public-feature-grid,
.about-cards,
.pricing-grid {
  gap: 20px;
}

.access-strip,
.public-split,
.public-checkout-panel,
.login-panel {
  background: #fff;
}

.access-strip,
.public-split {
  background: transparent;
}

.access-steps a {
  border-color: var(--bc-border);
  border-radius: var(--bc-radius);
}

.public-legal {
  width: 100vw;
  max-width: none;
  margin: 28px calc(50% - 50vw) 0;
  padding: 24px max(24px, calc((100vw - 1288px) / 2));
  border-top: 1px solid var(--bc-border);
  background: #f0f3ff;
  color: var(--bc-muted);
  font-size: .82rem;
  line-height: 1.58;
  text-align: center;
}

.public-legal a {
  color: var(--bc-primary);
}

.public-legal-text,
.public-legal-links,
.public-legal-note {
  width: min(980px, 100%);
  display: block;
  margin: 0 auto;
}

.public-legal-links {
  margin-top: 8px;
}

.public-legal-note {
  margin-bottom: 8px;
  color: var(--bc-muted);
}

.public-legal-official-link {
  white-space: nowrap;
}

.home-tools-section {
  display: grid;
  gap: 22px;
}

.home-tools-head {
  display: grid;
  gap: 22px;
  align-items: end;
}

.calculator-head,
.calculator-source-note {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: end;
}

.home-tools-head h2,
.calculator-source-note h2 {
  max-width: 780px;
  margin-top: 8px;
  color: var(--bc-text);
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.12;
  font-weight: 800;
}

.home-tools-head p {
  max-width: 760px;
  margin-top: 10px;
  color: var(--bc-muted);
  font-size: 1rem;
  line-height: 1.62;
}

.calculator-back-link {
  align-self: center;
  white-space: nowrap;
}

.home-tools-grid {
  display: grid;
  grid-template-columns: minmax(300px, .82fr) minmax(0, 1.18fr);
  gap: 18px;
  align-items: start;
}

.home-tool-card,
.question-cluster,
.score-input-card,
.score-results-panel {
  border: 1px solid var(--bc-border);
  border-radius: var(--bc-radius);
  background: #fff;
  box-shadow: var(--bc-shadow);
}

.home-tool-card {
  min-height: 100%;
  display: grid;
  align-content: start;
  gap: 16px;
  padding: clamp(20px, 3vw, 30px);
}

.tool-card-top,
.score-input-head,
.score-results-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.home-tool-card h3 {
  max-width: 14ch;
  color: var(--bc-text);
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  line-height: 1.08;
  font-weight: 800;
}

.home-tool-card p {
  color: var(--bc-muted);
  line-height: 1.58;
}

.tool-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.tool-stat-grid div {
  min-height: 74px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--bc-border);
  border-radius: var(--bc-radius);
  background: var(--bc-surface-soft);
}

.tool-stat-grid dt {
  color: var(--bc-muted);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.tool-stat-grid dd {
  margin: 0;
  color: var(--bc-text);
  font-size: .92rem;
  font-weight: 800;
  line-height: 1.2;
}

.tool-card-action {
  width: 100%;
  justify-content: center;
}

.popular-question-queue {
  display: grid;
  gap: 10px;
}

.question-cluster {
  overflow: hidden;
  box-shadow: none;
}

.question-cluster.is-pretext-bound > .question-cluster-panel,
.question-item.is-pretext-bound > .question-answer-panel {
  height: 0;
  opacity: 0;
  overflow: hidden;
  transition: height .24s ease, opacity .18s ease;
}

.question-cluster.is-pretext-bound.is-open > .question-cluster-panel,
.question-item.is-pretext-bound.is-open > .question-answer-panel {
  height: var(--pretext-accordion-height, auto);
  opacity: 1;
}

.question-cluster-toggle {
  width: 100%;
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  border: 0;
  background: #fff;
  color: var(--bc-text);
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.question-cluster-toggle span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.question-cluster-toggle span:last-child,
.question-item-toggle span:last-child {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--bc-border);
  border-radius: 50%;
  color: var(--bc-primary);
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.question-cluster-toggle:hover,
.question-cluster-toggle:focus-visible {
  color: var(--bc-primary);
  outline: none;
}

.question-cluster-toggle:focus-visible span:last-child {
  border-color: var(--bc-primary);
  box-shadow: 0 0 0 3px rgba(0, 74, 198, .14);
}

.question-cluster.is-open > .question-cluster-toggle span:last-child,
.question-item.is-open > .question-item-toggle span:last-child {
  transform: rotate(45deg);
  border-color: var(--bc-primary);
  background: var(--bc-primary-soft);
}

.question-cluster-panel {
  border-top: 1px solid var(--bc-border);
}

.question-cluster-panel-inner {
  padding: 14px 16px 16px;
}

.question-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.question-item {
  min-height: 40px;
  display: grid;
  align-content: start;
  overflow: hidden;
  border: 1px solid var(--bc-border);
  border-radius: var(--bc-radius);
  background: #fbfcff;
  color: #334155;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.32;
}

.question-item-toggle {
  width: 100%;
  min-height: 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.question-item-toggle span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.question-item-toggle span:last-child {
  width: 24px;
  height: 24px;
  background: #fff;
  font-size: .9rem;
}

.question-item-toggle:hover,
.question-item-toggle:focus-visible {
  color: var(--bc-primary);
  outline: none;
}

.question-item-toggle:focus-visible span:last-child {
  border-color: var(--bc-primary);
  box-shadow: 0 0 0 3px rgba(0, 74, 198, .14);
}

.question-answer-panel {
  border-top: 1px solid var(--bc-border);
  background: #fff;
}

.question-answer-inner {
  padding: 10px 12px 12px;
}

.question-answer-inner p {
  margin: 0;
  color: var(--bc-muted);
  font-size: .88rem;
  font-weight: 600;
  line-height: 1.45;
}

.home-faq-preview {
  min-height: 100%;
  display: grid;
  align-content: space-between;
  gap: 14px;
}

.question-item-link {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 9px 10px;
  color: inherit;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.question-item-link:hover,
.question-item-link:focus-visible {
  color: var(--bc-primary);
  outline: none;
}

.public-page .more-faq-link {
  justify-self: end;
  min-height: 44px;
  border-color: var(--bc-primary);
  background: #fff;
  color: var(--bc-primary);
  font-weight: 800;
}

.public-page .more-faq-link:hover,
.public-page .more-faq-link:focus-visible {
  border-color: var(--bc-primary);
  background: var(--bc-primary-soft);
  color: var(--bc-primary);
}

.faq-page {
  display: grid;
  gap: 24px;
}

.faq-page.has-faq-index {
  grid-template-columns: clamp(280px, 22vw, 320px) minmax(0, 1120px);
  column-gap: 16px;
  align-items: start;
  justify-content: center;
}

.faq-page.has-faq-index > .public-page-head,
.faq-page.has-faq-index > .public-legal {
  grid-column: 1 / -1;
  width: min(100%, 1120px);
  justify-self: center;
}

.faq-page.has-faq-index > .faq-accordion-stack,
.faq-page.has-faq-index > .faq-source-section,
.faq-page.has-faq-index > .faq-bottom-actions {
  grid-column: 2;
  width: 100%;
}

.faq-public-page .public-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .08);
}

.faq-public-page .public-main {
  padding-top: 104px;
}

.faq-head {
  align-items: end;
}

.faq-page.has-faq-index .faq-head > div:first-child {
  transform: translateX(clamp(58px, 5.8vw, 96px));
}

.faq-page-title {
  display: grid;
  gap: 0;
}

.faq-date-line {
  max-width: none;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.45;
}

.faq-page-index {
  grid-column: 1;
  position: fixed;
  left: max(18px, calc((100vw - 1456px) / 2));
  top: 140px;
  z-index: 35;
  width: clamp(280px, 22vw, 320px);
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  padding: 14px 14px 12px;
  border: 1px solid var(--bc-border);
  border-radius: var(--bc-radius);
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--bc-shadow);
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 74, 198, .36) transparent;
}

.faq-page-index::-webkit-scrollbar {
  width: 7px;
}

.faq-page-index::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(0, 74, 198, .3);
}

.faq-page-index__title {
  margin: 0 0 10px;
  color: var(--bc-text);
  font-family: "Be Vietnam Pro", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
}

.faq-page-index__item {
  width: 100%;
  min-height: 30px;
  margin: 2px 0;
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 9px;
  padding: 3px 5px 3px 0;
  border: 0;
  background: transparent;
  color: #26364d;
  text-align: left;
  cursor: pointer;
  transition: color 180ms ease, transform 180ms ease, opacity 180ms ease;
}

.faq-page-index__item:hover,
.faq-page-index__item:focus-visible {
  color: var(--bc-primary);
  outline: none;
  transform: translateX(-2px);
}

.faq-page-index__item:focus-visible .faq-page-index__box {
  box-shadow: 0 0 0 3px rgba(0, 74, 198, .14);
}

.faq-page-index__label {
  min-width: 0;
  font-size: .87rem;
  font-weight: 800;
  line-height: 1.15;
  transition: color 180ms ease;
}

.faq-page-index__box {
  width: 17px;
  height: 17px;
  margin-left: 4px;
  display: grid;
  place-items: center;
  border: 1.8px solid #526886;
  border-radius: 4px;
  background: rgba(255, 255, 255, .7);
  transition: border-color .18s ease, background .18s ease;
}

.faq-page-index__tick {
  width: 19px;
  height: 19px;
  overflow: visible;
  transform: translateY(-2px);
}

.faq-page-index__tick path {
  fill: none;
  stroke: var(--bc-primary);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  transition: stroke-dashoffset .26s ease-out;
}

.faq-page-index__item.is-complete .faq-page-index__tick path {
  stroke-dashoffset: 0;
}

.faq-page-index__item.is-complete .faq-page-index__box {
  border-color: var(--bc-primary);
  background: var(--bc-primary-soft);
}

.faq-page-index__item.is-current {
  color: var(--bc-primary);
  transform: translateX(-3px);
}

.faq-page-index__item.is-current .faq-page-index__label {
  color: var(--bc-primary);
  font-weight: 800;
}

.faq-head-actions,
.faq-bottom-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.faq-accordion-stack,
.faq-section-block,
.faq-section-items {
  display: grid;
  gap: 16px;
}

.faq-accordion-stack,
.faq-source-section,
.faq-teacher-note,
.faq-bottom-actions {
  width: min(100%, 1120px);
  margin-inline: auto;
}

.faq-section-block {
  scroll-margin-top: 92px;
}

.faq-section-heading {
  display: grid;
  gap: 5px;
}

.faq-section-heading h2 {
  margin: 0;
  color: var(--bc-text);
  font-size: clamp(1.35rem, 2.1vw, 1.85rem);
  line-height: 1.2;
}

.wide-faq-item {
  scroll-margin-top: 92px;
  overflow: hidden;
  border: 1px solid var(--bc-border);
  border-radius: var(--bc-radius);
  background: #fff;
  box-shadow: var(--bc-shadow);
}

.wide-faq-item summary {
  min-height: 62px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  color: var(--bc-text);
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

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

.wide-faq-item summary span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.wide-faq-item summary span:last-child {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--bc-border);
  border-radius: 50%;
  color: var(--bc-primary);
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.wide-faq-item summary:hover,
.wide-faq-item summary:focus-visible {
  color: var(--bc-primary);
  outline: none;
}

.wide-faq-item summary:focus-visible span:last-child {
  border-color: var(--bc-primary);
  box-shadow: 0 0 0 3px rgba(0, 74, 198, .14);
}

.wide-faq-item[open] summary {
  border-bottom: 1px solid var(--bc-border);
}

.wide-faq-item[open] summary span:last-child {
  transform: rotate(45deg);
  border-color: var(--bc-primary);
  background: var(--bc-primary-soft);
}

.faq-answer {
  padding: clamp(18px, 2.6vw, 28px);
}

.faq-answer blockquote {
  margin: 0;
  padding: 14px 16px;
  border-left: 4px solid var(--bc-primary);
  border-radius: 0 var(--bc-radius) var(--bc-radius) 0;
  background: var(--bc-primary-soft);
}

.faq-answer pre {
  margin: 0;
  padding: 14px 16px;
  overflow: auto;
  border: 1px solid var(--bc-border);
  border-radius: var(--bc-radius);
  background: #0f172a;
  color: #f8fafc;
}

.faq-answer pre code {
  color: inherit;
  font-size: .9rem;
  line-height: 1.65;
  white-space: pre-line;
}

.faq-inline-action {
  margin: 2px 0;
}

.faq-inline-action .primary-btn {
  display: inline-flex;
}

.student-md-content table {
  width: 100%;
}

.student-md-content th,
.student-md-content td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.student-md-content .align-right {
  text-align: right;
}

.student-md-content .align-center {
  text-align: center;
}

.faq-source-section,
.faq-teacher-note {
  display: grid;
  gap: 16px;
}

.faq-bottom-actions {
  justify-content: center;
  padding-top: 8px;
}

.calculator-page {
  display: grid;
  gap: 26px;
}

.score-calculator-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .72fr);
  gap: 22px;
  align-items: start;
}

.score-input-panel {
  display: grid;
  gap: 16px;
  margin: 0;
}

.score-input-card {
  display: grid;
  gap: 14px;
  padding: clamp(18px, 2.4vw, 26px);
}

.score-input-card label {
  color: var(--bc-text);
  font-size: clamp(1.05rem, 1.8vw, 1.24rem);
  font-weight: 800;
  line-height: 1.25;
}

.score-input-card p,
.score-control-help {
  color: var(--bc-muted);
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.45;
}

.score-control-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px;
  gap: 14px;
  align-items: center;
}

.score-control-row input[type="range"] {
  width: 100%;
  accent-color: var(--bc-primary);
}

.score-control-row input[type="number"] {
  width: 86px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--bc-border-strong);
  border-radius: var(--bc-radius);
  color: var(--bc-text);
  font: inherit;
  font-weight: 800;
  text-align: center;
}

.score-control-row input[type="number"]:focus {
  outline: 3px solid rgba(0, 74, 198, .15);
  border-color: var(--bc-primary);
}

.score-results-panel {
  position: sticky;
  top: 100px;
  display: grid;
  gap: 18px;
  padding: clamp(20px, 2.6vw, 30px);
}

.score-reset {
  min-height: 34px;
  padding: 6px 10px;
  font-size: .82rem;
}

.ap-score-display {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 20px;
  border: 1px solid var(--bc-border);
  border-radius: var(--bc-radius);
  background: linear-gradient(180deg, #f8fbff, #eef4ff);
  text-align: center;
}

.ap-score-display span {
  color: var(--bc-muted);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ap-score-display strong {
  width: 86px;
  height: 86px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bc-primary);
  color: #fff;
  font-size: 2.55rem;
  line-height: 1;
  box-shadow: 0 12px 24px rgba(0, 74, 198, .24);
}

.ap-score-display em {
  color: var(--bc-text);
  font-style: normal;
  font-weight: 800;
}

.score-result-list {
  display: grid;
  gap: 0;
  margin: 0;
  border: 1px solid var(--bc-border);
  border-radius: var(--bc-radius);
  overflow: hidden;
}

.score-result-list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  border-bottom: 1px solid var(--bc-border);
  background: #fff;
}

.score-result-list div:last-child {
  border-bottom: 0;
}

.score-result-list dt {
  color: var(--bc-muted);
  font-size: .82rem;
  font-weight: 800;
}

.score-result-list dd {
  margin: 0;
  color: var(--bc-text);
  font-weight: 800;
  white-space: nowrap;
}

.score-meter-stack {
  display: grid;
  gap: 10px;
}

.score-meter-stack div {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.score-meter-stack span {
  color: var(--bc-muted);
  font-size: .76rem;
  font-weight: 800;
}

.score-meter-stack i {
  height: 9px;
  display: block;
  overflow: hidden;
  border-radius: 999px;
  background: var(--bc-surface-soft);
}

.score-meter-stack i::before {
  content: "";
  width: var(--meter-width, 0%);
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--bc-primary), var(--bc-success));
  transition: width .18s ease;
}

.score-next-step,
.score-disclaimer {
  margin: 0;
  color: var(--bc-text);
  font-size: .94rem;
  font-weight: 700;
  line-height: 1.45;
}

.score-next-step.muted,
.score-disclaimer {
  color: var(--bc-muted);
  font-weight: 600;
}

.score-disclaimer {
  padding-top: 14px;
  border-top: 1px solid var(--bc-border);
  font-size: .84rem;
}

.calculator-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.calculator-source-note {
  align-items: start;
  padding: clamp(18px, 3vw, 26px);
  border: 1px solid var(--bc-border);
  border-radius: var(--bc-radius);
  background: #fff;
}

.calculator-source-note ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.calculator-source-note a {
  color: var(--bc-primary);
  font-weight: 800;
  text-decoration: none;
}

.calculator-source-note a:hover,
.calculator-source-note a:focus-visible {
  text-decoration: underline;
}

.pricing-card {
  padding: 26px;
}

.pricing-card.is-featured {
  border-color: var(--bc-primary);
  box-shadow: 0 0 0 3px rgba(0, 74, 198, .08);
}

.public-pricing-card {
  background: #fff;
}

.price-now {
  color: var(--bc-text);
}

.price-was-value::after {
  background: var(--bc-danger);
}

.checkout-panel input,
.checkout-panel textarea,
.auth-form input,
.contact-form input,
.contact-form textarea,
.checkout-row input,
.course-index-search input {
  border: 1px solid var(--bc-border-strong);
  border-radius: var(--bc-radius);
  background: #fff;
  color: var(--bc-text);
}

.checkout-panel input:focus,
.checkout-panel textarea:focus,
.auth-form input:focus,
.contact-form input:focus,
.contact-form textarea:focus,
.checkout-row input:focus,
.course-index-search input:focus {
  outline: 3px solid rgba(0, 74, 198, .15);
  border-color: var(--bc-primary);
}

.access-status {
  border-color: var(--bc-border);
  border-radius: var(--bc-radius);
  background: var(--bc-primary-soft);
  color: var(--bc-primary);
}

.access-status.is-active {
  border-color: rgba(23, 107, 58, .22);
  background: #ecfdf3;
  color: var(--bc-success);
}

.login-panel {
  max-width: 980px;
  grid-template-columns: minmax(260px, .68fr) minmax(0, 1fr);
  background: #fff;
}

.login-panel.auth-panel {
  max-width: 760px;
  grid-template-columns: minmax(0, 1fr);
  justify-content: center;
}

.auth-panel .login-copy {
  width: min(100%, 560px);
  justify-self: center;
}

.brand-nowrap {
  white-space: nowrap;
}

.auth-provider-actions {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
}

.google-auth-btn {
  width: 100%;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--bc-border-strong);
  border-radius: var(--bc-radius);
  background: #fff;
  color: var(--bc-text);
  font: inherit;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
}

.google-auth-btn:hover,
.google-auth-btn:focus-visible {
  border-color: var(--bc-primary);
  background: var(--bc-surface-soft);
  outline: none;
}

.google-auth-mark {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--bc-border);
  border-radius: 50%;
  color: var(--bc-primary);
  font-size: .82rem;
  font-weight: 800;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--bc-muted);
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: var(--bc-border);
}

.auth-text-link {
  justify-self: center;
  color: var(--bc-primary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-field-hint {
  margin: -4px 0 2px;
  color: var(--bc-muted);
  font-size: .82rem;
  line-height: 1.4;
}

.auth-form .auth-terms-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin-top: 6px;
  padding: 12px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--bc-muted);
  font-size: .84rem;
  font-weight: 600;
  line-height: 1.5;
  text-transform: none;
  letter-spacing: normal;
}

.auth-form .auth-terms-check input {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin-top: 2px;
  accent-color: var(--blue);
}

.auth-purpose {
  margin-top: 8px;
}

.locked-access-context {
  margin-bottom: 24px;
  padding: 20px;
  border: 1px solid #b9cff2;
  border-left: 4px solid var(--bc-primary);
  border-radius: 6px;
  background: #f5f9ff;
}

.locked-access-context h1 {
  margin: 7px 0 8px;
  color: var(--bc-text);
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  line-height: 1.2;
}

.locked-access-context p {
  margin: 0;
  color: var(--bc-muted);
  line-height: 1.55;
}

.locked-access-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.locked-access-actions .secondary-btn {
  min-height: 40px;
  padding: 9px 12px;
  font-size: .84rem;
}

.hero-action-detail {
  margin: 10px 0 0;
  color: var(--bc-muted);
  font-size: .9rem;
  font-weight: 700;
}

.home-learning-path {
  align-items: center;
}

body.public-page .home-public-shell {
  width: 100%;
  max-width: none;
}

.home-public-shell .public-topbar {
  padding-inline: max(24px, calc((100vw - 1288px) / 2));
}

.home-public-shell .public-main {
  display: block;
}

.home-public-shell .public-main > :not(.learning-band) {
  width: min(1288px, calc(100vw - 48px));
  margin-inline: auto;
}

.home-public-shell .public-main > * + * {
  margin-top: 24px;
}

.learning-band {
  width: 100%;
  background: #000106;
}

.learning-band__content {
  width: min(1288px, calc(100vw - 48px));
  display: grid;
  gap: 0;
  margin-inline: auto;
  padding-block: clamp(18px, 3vw, 34px);
}

.learning-band .public-section {
  margin: 0;
}

.learning-band .public-feature h2,
.learning-band .access-strip h2 {
  color: #d8dfee;
}

.learning-band .public-feature p,
.learning-band .learning-step-list {
  color: #7f8aa4;
}

.learning-band .section-kicker {
  color: #3982ff;
}

.learning-band .primary-btn {
  border-color: #3982ff;
  background: #3982ff;
  color: #071225;
}

.learning-band .primary-btn:hover,
.learning-band .primary-btn:focus-visible {
  border-color: #72a8ff;
  background: #72a8ff;
  color: #071225;
}

.learning-band .home-learning-map-btn {
  border-color: #53627e;
  background: transparent;
  color: #d8dfee;
}

.learning-band .home-learning-map-btn:hover,
.learning-band .home-learning-map-btn:focus-visible {
  border-color: #8fa2c8;
  background: #11192d;
  color: #eef3ff;
}

.learning-step-list {
  display: grid;
  gap: 6px;
  margin: 14px 0 0;
  padding-left: 1.25rem;
  color: var(--bc-muted);
  line-height: 1.55;
}

.unit-card.is-locked {
  border-color: #bdc7d4;
  background:
    linear-gradient(rgba(244, 246, 249, .94), rgba(244, 246, 249, .94)),
    repeating-linear-gradient(135deg, transparent 0 10px, rgba(71, 85, 105, .05) 10px 12px);
  color: #667085;
}

.unit-card.is-locked .topic-mini-list a {
  color: #7b8797;
  cursor: not-allowed;
  opacity: .72;
  text-decoration: none;
  pointer-events: none;
}

.unit-card.is-locked .unit-open {
  border-color: #aab5c3;
  background: #dfe4ea;
  color: #344054;
}

.unit-card.is-locked .unit-open:hover,
.unit-card.is-locked .unit-open:focus-visible {
  border-color: #8794a5;
  background: #d3d9e1;
  color: #1f2937;
}

.unit-card.is-locked h2,
.unit-card.is-locked p,
.unit-card.is-locked .topic-count {
  color: #667085;
}

.unit-card.is-locked .topic-more-toggle {
  border-color: #c8d0da;
  background: rgba(255, 255, 255, .62);
  color: #596579;
}

.unit-card.is-locked .unit-lock-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border: 2px solid currentColor;
  border-radius: 2px;
  box-shadow: 0 -5px 0 -3px currentColor;
}

.student-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr);
  gap: 20px 28px;
  padding: 26px;
  border: 1px solid var(--bc-border-strong);
  border-radius: var(--bc-radius);
  background: #fff;
}

.student-dashboard__heading h2 {
  margin: 6px 0 8px;
  color: var(--bc-text);
  font-size: clamp(1.55rem, 3vw, 2.2rem);
}

.student-dashboard__heading p {
  max-width: 62ch;
  margin: 0;
  color: var(--bc-muted);
  line-height: 1.6;
}

.student-dashboard__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  grid-column: 1 / -1;
}

.student-dashboard__stat {
  min-height: 88px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--bc-border);
  border-radius: var(--bc-radius);
  background: var(--bc-surface-soft);
}

.student-dashboard__stat strong {
  color: var(--bc-primary);
  font-size: 1.35rem;
}

.student-dashboard__stat span,
.student-dashboard__continue > span {
  color: var(--bc-muted);
  font-size: .82rem;
  font-weight: 700;
}

.student-dashboard__continue {
  display: grid;
  align-content: start;
  gap: 9px;
}

.student-dashboard__continue .primary-btn {
  justify-content: flex-start;
  text-align: left;
}

.student-dashboard__units {
  display: grid;
  gap: 12px;
  grid-column: 1 / -1;
}

.student-dashboard__unit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 14px;
  color: var(--bc-text);
  font-size: .88rem;
}

.student-dashboard__track {
  height: 7px;
  grid-column: 1 / -1;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ecf4;
}

.student-dashboard__track > span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--bc-primary);
}

.student-dashboard--loading {
  min-height: 270px;
  place-items: center;
  grid-template-columns: 1fr;
}

.bc-loader {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid var(--bc-border);
  border-radius: 50%;
  background: #fff;
  animation: bc-loader-spin 1s linear infinite;
}

.bc-loader img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

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

@media (prefers-reduced-motion: reduce) {
  .bc-loader { animation: none; }
}

.student-dashboard__topic-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.student-dashboard__topic {
  min-height: 112px;
  display: grid;
  align-content: start;
  gap: 5px;
  padding: 13px;
  border: 1px solid var(--bc-border);
  border-radius: var(--bc-radius);
  background: #fff;
  color: var(--bc-text);
  text-decoration: none;
}

.student-dashboard__topic:hover,
.student-dashboard__topic:focus-visible {
  border-color: var(--bc-primary);
  background: var(--bc-primary-soft);
}

.student-dashboard__topic-code {
  color: var(--bc-primary);
  font-size: .75rem;
  font-weight: 800;
}

.student-dashboard__topic strong { font-size: .83rem; line-height: 1.35; }
.student-dashboard__topic small,
.student-dashboard__insights p,
.student-dashboard__recent p { color: var(--bc-muted); font-size: .78rem; line-height: 1.45; }

.student-dashboard__insights,
.student-dashboard__recent {
  display: grid;
  align-content: start;
  gap: 8px;
}

.student-dashboard__insights h3,
.student-dashboard__recent h3 { margin: 0; font-size: 1rem; }
.student-dashboard__weak-list,
.student-dashboard__session-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.student-dashboard__weak-list li,
.student-dashboard__session-list li { padding: 9px 10px; border-left: 3px solid var(--bc-primary); background: var(--bc-surface-soft); color: var(--bc-muted); font-size: .82rem; }
.student-dashboard__session-list li { display: flex; justify-content: space-between; gap: 10px; border-left-color: #8ab6ee; }
.student-dashboard__session-list strong { color: var(--bc-text); }
.student-dashboard__discard { align-self: center; padding: 3px 0; border: 0; background: transparent; color: var(--bc-primary); font: inherit; font-size: .76rem; font-weight: 800; cursor: pointer; text-decoration: underline; }
.student-dashboard__discard:disabled { color: var(--bc-muted); cursor: wait; }

.practice-page { width: min(1400px, calc(100% - 48px)); margin: 0 auto; padding-block: 28px 72px; }
.practice-back-link { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; color: var(--bc-primary); font-weight: 800; text-decoration: none; }
.practice-back-link:hover { text-decoration: underline; }
.practice-shell { min-height: 620px; overflow: hidden; border: 1px solid var(--bc-border-strong); border-radius: 16px; background: #fff; box-shadow: 0 14px 38px rgba(31, 69, 128, .08); }
.practice-layout { display: grid; grid-template-columns: minmax(340px, 370px) minmax(440px, 1fr) minmax(300px, 340px); min-height: 620px; }
.practice-selector { min-width: 0; display: flex; flex-direction: column; padding: 30px; border-right: 1px solid var(--bc-border-strong); background: #fff; }
.practice-selector__heading h2 { margin: 0; color: var(--bc-text); font-size: 1rem; }
.practice-selector__heading p { margin: 4px 0 10px; color: var(--bc-muted); font-size: .78rem; }
.practice-topic-search { min-height: 44px; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 7px; align-items: center; padding: 0 12px; border: 1px solid var(--bc-border-strong); border-radius: 10px; color: var(--bc-muted); }
.practice-topic-search:focus-within { border-color: var(--bc-primary); box-shadow: 0 0 0 3px rgba(16, 91, 209, .12); }
.practice-topic-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--bc-text); font: inherit; font-size: .85rem; }
.practice-selector__quick-actions { display: flex; gap: 18px; padding: 10px 1px; }
.practice-selector__quick-actions button { padding: 0; border: 0; background: transparent; box-shadow: none; color: var(--bc-primary); font: inherit; font-size: .74rem; font-weight: 800; text-decoration: none; text-underline-offset: 3px; cursor: pointer; transform: none; }
.practice-selector__quick-actions button:hover,
.practice-selector__quick-actions button:focus-visible,
.practice-selector__quick-actions button:active { outline: 0; box-shadow: none; text-decoration: underline; transform: none; }
.practice-topic-tree { max-height: 420px; overflow: auto; border: 1px solid var(--bc-border-strong); border-radius: 10px; background: #fff; }
.practice-topic-tree__empty { margin: 0; padding: 18px; color: var(--bc-muted); font-size: .8rem; }
.practice-unit + .practice-unit { border-top: 1px solid var(--bc-border); }
.practice-unit summary { min-height: 54px; display: grid; grid-template-columns: 22px minmax(0, 1fr) 18px; gap: 9px; align-items: center; padding: 8px 12px; cursor: pointer; list-style: none; }
.practice-unit summary::-webkit-details-marker { display: none; }
.practice-unit summary::after { content: "⌄"; color: var(--bc-text); font-weight: 800; transform: rotate(-90deg); transition: transform .16s ease; }
.practice-unit[open] summary::after { transform: rotate(0); }
.practice-unit__copy { min-width: 0; display: grid; gap: 2px; }
.practice-unit__copy strong { font-size: .83rem; }
.practice-unit__copy small { overflow: hidden; color: var(--bc-muted); font-size: .66rem; text-overflow: ellipsis; white-space: nowrap; }
.practice-unit input,
.practice-topic-row input { width: 17px; height: 17px; margin: 0; accent-color: var(--bc-primary); }
.practice-topic-list { margin: 0; padding: 0; border-top: 1px solid var(--bc-border); list-style: none; }
.practice-topic-row { min-height: 38px; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 9px; align-items: start; padding: 8px 12px 8px 17px; font-size: .73rem; cursor: pointer; }
.practice-topic-row:hover { background: #f7faff; }
.practice-topic-row__copy { min-width: 0; display: grid; gap: 2px; }
.practice-topic-row__copy strong { color: var(--bc-text); line-height: 1.35; }
.practice-topic-row__copy small { color: var(--bc-muted); font-size: .66rem; }
.practice-topic-row.is-unavailable { opacity: .62; }
.practice-selection-warning,
.practice-pool-warning { margin: 8px 0 0; padding: 9px 11px; border-radius: 8px; background: #fff8e7; color: #8a5700; font-size: .7rem; line-height: 1.45; }
.practice-pool-warning { background: #fff4f2; color: #9f1f18; }
.practice-count-picker { margin: auto 0 0; padding: 16px 0 0; border: 0; }
.practice-count-picker legend { margin-bottom: 7px; color: var(--bc-text); font-size: .74rem; font-weight: 800; }
.practice-count-picker > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--bc-border-strong); border-radius: 9px; }
.practice-count-picker label { min-height: 38px; display: grid; place-items: center; cursor: pointer; }
.practice-count-picker label + label { border-left: 1px solid var(--bc-border-strong); }
.practice-count-picker input { position: absolute; opacity: 0; pointer-events: none; }
.practice-count-picker span { width: 100%; height: 100%; display: grid; place-items: center; font-size: .78rem; font-weight: 800; }
.practice-count-picker input:checked + span { background: var(--bc-primary); color: #fff; }
.practice-count-picker input:focus-visible + span { outline: 3px solid rgba(16, 91, 209, .24); outline-offset: -3px; }
.practice-build-button { width: 100%; margin-top: 9px; }
.practice-selector__status { min-height: 18px; margin: 6px 0 0; color: var(--bc-muted); font-size: .68rem; text-align: center; }
.practice-primary { min-width: 0; padding: clamp(28px, 4vw, 48px); }
.practice-heading { max-width: 760px; }
.practice-heading .page-title { margin: 8px 0 4px; }
.practice-heading .page-subtitle { margin: 0; }
.practice-shell.is-session .practice-heading .page-title { font-size: clamp(2.35rem, 4vw, 3.35rem); line-height: 1.04; }
.practice-modes { margin-top: 28px; }
.practice-mode-group { min-width: 0; display: grid; gap: 12px; margin: 0; padding: 0; border: 0; }
.practice-mode-group legend { margin-bottom: 12px; padding: 0; color: var(--bc-text); font-size: .92rem; font-weight: 800; }
.practice-mode,
.practice-written-toggle {
  width: 100%;
  min-height: 82px;
  display: grid;
  grid-template-columns: 24px 54px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 13px 18px;
  border: 1px solid var(--bc-border-strong);
  border-radius: 14px;
  background: #fff;
  color: var(--bc-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.practice-mode:hover,
.practice-written-toggle:hover { border-color: #7da5ef; }
.practice-mode:focus-visible,
.practice-written-toggle:focus-within { outline: 3px solid rgba(16, 91, 209, .2); outline-offset: 2px; }
.practice-mode.is-selected { border-color: var(--bc-primary); box-shadow: inset 0 0 0 1px var(--bc-primary); }
.practice-mode__indicator { width: 21px; height: 21px; display: grid; place-items: center; border: 2px solid #b7c4dc; border-radius: 50%; }
.practice-mode.is-selected .practice-mode__indicator { border-color: var(--bc-primary); }
.practice-mode.is-selected .practice-mode__indicator::after { width: 9px; height: 9px; border-radius: 50%; background: var(--bc-primary); content: ""; }
.practice-mode__icon { position: relative; width: 52px; height: 52px; display: grid; place-items: center; overflow: hidden; border: 1px solid #e4eaf5; border-radius: 13px; background: #fff; }
.practice-mode__icon img,
.practice-mode__icon video { width: 46px; height: 46px; display: block; object-fit: contain; background: transparent; }
.practice-mode__icon-static,
.practice-mode__icon-motion { transition: opacity .14s ease; }
.practice-mode__icon-motion { position: absolute; inset: 3px; opacity: 0; pointer-events: none; }
.practice-mode__icon-motion.is-visible { opacity: 1; }
.practice-mode__icon:has(.practice-mode__icon-motion.is-visible) .practice-mode__icon-static { opacity: 0; }
.practice-mode__icon--rail { border-color: transparent; }
html[data-reduce-motion="true"] .practice-mode__icon-motion { display: none; }
.practice-mode__copy { min-width: 0; display: grid; gap: 4px; }
.practice-mode__copy strong { color: var(--bc-text); font-size: .95rem; line-height: 1.3; }
.practice-mode__copy small { color: var(--bc-muted); font-size: .8rem; line-height: 1.45; }
.practice-mode__badge { padding: 4px 10px; border: 1px solid #b8cdf5; border-radius: 999px; background: #f2f6ff; color: var(--bc-primary); font-size: .7rem; font-weight: 800; white-space: nowrap; }
.practice-mode__badge--optional { border-color: #d7c4ff; background: #faf7ff; color: #7652c7; }
.practice-written-toggle input { width: 21px; height: 21px; margin: 0; accent-color: var(--bc-primary); }
.practice-setup-action { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--bc-border); }
.practice-setup-action__note { color: var(--bc-muted); font-size: .82rem; font-weight: 700; }
.practice-setup-action .primary-btn { min-width: 180px; }
.practice-content { margin-top: 24px; }
.practice-modes.is-hidden + .practice-content { margin-top: 26px; }
.practice-rail { min-width: 0; padding: clamp(30px, 4vw, 48px); border-left: 1px solid var(--bc-border-strong); background: linear-gradient(180deg, #fff 0%, #fbfcff 100%); }
.practice-rail h2 { margin: 0; color: var(--bc-text); font-size: 1rem; }
.practice-rail__divider { height: 1px; margin: 18px 0 22px; background: var(--bc-border-strong); }
.practice-overview-item { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 16px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--bc-border); }
.practice-overview-item strong,
.practice-overview-item small { display: block; }
.practice-overview-item strong { margin-bottom: 5px; color: var(--bc-text); font-size: .92rem; }
.practice-overview-item small { color: var(--bc-muted); font-size: .8rem; line-height: 1.45; }
.practice-glance { margin-top: 28px; padding: 16px; border: 1px solid var(--bc-border-strong); border-radius: 13px; background: #fff; }
.practice-glance > strong { display: block; margin-bottom: 14px; font-size: .78rem; }
.practice-glance > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.practice-glance span { display: grid; gap: 4px; padding: 0 9px; text-align: center; }
.practice-glance span + span { border-left: 1px solid var(--bc-border); }
.practice-glance b { color: var(--bc-text); font-size: .95rem; }
.practice-glance small { color: var(--bc-muted); font-size: .65rem; line-height: 1.3; }
.practice-glance__coverage { display: flex; justify-content: space-between; gap: 12px; margin: 16px -16px -16px; padding: 13px 16px; border-top: 1px solid var(--bc-border); color: var(--bc-muted); font-size: .7rem; }
.practice-glance__coverage strong { color: var(--bc-text); }
.practice-glance__coverage span { max-width: 190px; text-align: right; }
.practice-shell.is-session .practice-selector { display: none; }
.practice-shell.is-session { overflow: visible; }
.practice-shell.is-session .practice-layout {
  grid-template:
    "assessment assessment" auto
    "question stimulus" clamp(520px, calc(100vh - 116px), 720px)
    / minmax(0, 1.08fr) minmax(360px, .92fr);
  min-height: 0;
}
.practice-shell.is-session .practice-primary { display: contents; }
.practice-shell.is-session .practice-heading {
  grid-area: assessment;
  max-width: none;
  padding: clamp(26px, 3.5vw, 42px) clamp(28px, 4vw, 48px) 24px;
  border-bottom: 1px solid var(--bc-border-strong);
  background: linear-gradient(135deg, #fff 0%, #f8fbff 100%);
}
.practice-shell.is-session .practice-heading .page-title {
  margin-top: 0;
  font-size: clamp(2rem, 3.4vw, 3rem);
}
.practice-shell.is-session .practice-heading .page-subtitle {
  color: var(--bc-muted);
  font-weight: 700;
}
.practice-shell.is-session .practice-content {
  grid-area: question;
  min-width: 0;
  margin: 0;
  padding: clamp(30px, 4vw, 52px);
  overflow: auto;
  box-sizing: border-box;
  scrollbar-gutter: stable;
}
.practice-shell.is-session .practice-modes { display: none; }
.practice-shell.is-session .practice-rail {
  position: sticky;
  top: 92px;
  grid-area: stimulus;
  align-self: start;
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 116px);
  overflow: auto;
  box-sizing: border-box;
  border-left: 1px solid var(--bc-border-strong);
  background: linear-gradient(180deg, #f8fbff 0%, #fff 100%);
  scrollbar-gutter: stable;
}
.practice-shell.is-session:not(.has-stimulus) .practice-content {
  grid-column: 1 / -1;
  max-width: 980px;
  width: 100%;
}
.practice-shell.is-session:not(.has-stimulus) .practice-rail { display: none; }
.practice-progress {
  width: 100%;
  height: 8px;
  display: block;
  margin-top: 20px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  accent-color: var(--bc-primary);
}
.practice-progress::-webkit-progress-bar { border-radius: 999px; background: #dfe9fb; }
.practice-progress::-webkit-progress-value { border-radius: 999px; background: var(--bc-primary); }
.practice-progress::-moz-progress-bar { border-radius: 999px; background: var(--bc-primary); }
.practice-stimulus__header { display: grid; gap: 12px; }
.practice-stimulus__header h2 {
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  line-height: 1.15;
}
.practice-stimulus__context { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.practice-stimulus__range {
  color: var(--bc-primary);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.practice-stimulus__kind {
  padding: 5px 9px;
  border: 1px solid #b8cdf5;
  border-radius: 999px;
  background: #edf4ff;
  color: var(--bc-primary);
  font-size: .7rem;
  font-weight: 800;
  white-space: nowrap;
}
.practice-stimulus__body {
  margin-top: 22px;
  color: var(--bc-text);
  font-size: .96rem;
  line-height: 1.7;
}
.practice-stimulus__body p { margin: 0 0 16px; }
.practice-stimulus__source {
  margin: 24px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--bc-border);
  color: var(--bc-muted);
  font-size: .76rem;
  line-height: 1.55;
}
.practice-stimulus__source strong { color: var(--bc-text); }
.practice-rail__summary { color: var(--bc-muted); font-size: .9rem; line-height: 1.6; }
.practice-question { display: grid; gap: 0; }
.practice-question__prompt { margin-top: 0; color: var(--bc-text); font-size: 1rem; line-height: 1.6; }
.practice-question__prompt p { margin: 0 0 14px; }
.practice-markdown-table { max-width: 100%; overflow-x: auto; border: 1px solid var(--bc-border); border-radius: var(--bc-radius); }
.practice-markdown-table table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.practice-markdown-table th, .practice-markdown-table td { padding: 10px; border-bottom: 1px solid var(--bc-border); text-align: left; vertical-align: top; }
.practice-markdown-table th { background: var(--bc-primary-soft); }
.practice-choice-list { display: grid; gap: 10px; max-width: 780px; }
.practice-choice { min-height: 58px; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 15px; border: 1px solid var(--bc-border-strong); border-radius: 12px; background: #fff; color: var(--bc-text); font: inherit; line-height: 1.45; text-align: left; cursor: pointer; transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease; }
.practice-choice:hover:not(:disabled) { border-color: #7da5ef; }
.practice-choice:focus-visible { outline: 3px solid rgba(16, 91, 209, .2); outline-offset: 2px; }
.practice-choice span { width: 34px; height: 34px; display: grid; place-items: center; border: 1.5px solid currentColor; border-radius: 50%; color: var(--bc-primary); font-size: .82rem; font-weight: 800; }
.practice-choice.is-selected { border-color: var(--bc-primary); background: #f7faff; box-shadow: inset 0 0 0 1px var(--bc-primary); }
.practice-choice.is-correct-answer { border-color: #27a35a; background: #f0faf4; box-shadow: inset 0 0 0 1px #27a35a; }
.practice-choice.is-correct-answer span { color: #168449; background: #e2f6e9; }
.practice-choice.is-wrong-answer { border-color: #ef4f4f; background: #fff4f4; box-shadow: inset 0 0 0 1px #ef4f4f; }
.practice-choice.is-wrong-answer span { color: #d62e2e; background: #ffe4e4; }
.practice-choice[data-result-label]::after { padding: 3px 8px; border: 1px solid currentColor; border-radius: 999px; content: attr(data-result-label); font-size: .68rem; font-weight: 800; white-space: nowrap; }
.practice-choice.is-correct-answer[data-result-label]::after { color: #168449; }
.practice-choice.is-wrong-answer[data-result-label]::after { color: #c92a2a; }
.practice-choice:disabled { color: var(--bc-text); cursor: default; opacity: 1; }
.practice-written-response { width: 100%; min-height: 220px; resize: vertical; padding: 13px; border: 1px solid var(--bc-border-strong); border-radius: var(--bc-radius); color: var(--bc-text); font: inherit; line-height: 1.55; }
.practice-feedback { display: grid; gap: 4px; margin-top: 16px; padding: 14px 16px; border-left: 4px solid var(--bc-primary); background: #f4f7ff; color: var(--bc-muted); line-height: 1.5; }
.practice-feedback[hidden] { display: none; }
.practice-feedback strong { color: var(--bc-text); }
.practice-feedback.is-correct { border-left-color: #168449; background: #effaf3; color: #176b3a; }
.practice-feedback.is-wrong, .practice-message.is-error { border-left-color: #d92d20; background: #fff4f2; color: #9f1f18; }
.practice-question__actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--bc-border); }
.practice-question__action-note { color: var(--bc-muted); font-size: .8rem; font-weight: 700; }
.practice-question__actions .primary-btn { min-width: 180px; }
.practice-finish, .practice-access-note { display: grid; gap: 14px; max-width: 620px; }
.practice-finish h2, .practice-access-note h1 { margin: 0; }

@media (max-width: 1120px) {
  .practice-layout { grid-template-columns: minmax(320px, 350px) minmax(0, 1fr); }
  .practice-rail { grid-column: 1 / -1; border-top: 1px solid var(--bc-border-strong); border-left: 0; }
  .practice-shell.is-session .practice-rail {
    grid-column: auto;
    border-top: 0;
    border-left: 1px solid var(--bc-border-strong);
  }
}

@media (max-width: 900px) {
  .practice-page { width: min(100% - 28px, 760px); }
  .practice-layout { grid-template-columns: minmax(0, 1fr); }
  .practice-selector { border-right: 0; border-bottom: 1px solid var(--bc-border-strong); }
  .practice-rail { border-top: 1px solid var(--bc-border-strong); border-left: 0; }
  .practice-shell.is-session .practice-layout {
    grid-template:
      "assessment" auto
      "stimulus" auto
      "question" auto
      / minmax(0, 1fr);
  }
  .practice-shell.is-session .practice-rail {
    position: static;
    height: auto;
    max-height: none;
    overflow: visible;
    border-top: 0;
    border-right: 0;
    border-bottom: 1px solid var(--bc-border-strong);
    border-left: 0;
  }
  .practice-shell.is-session:not(.has-stimulus) .practice-content {
    grid-column: auto;
  }
  .practice-shell.is-session .practice-content {
    overflow: visible;
  }
}

@media (max-width: 760px) {
  .student-dashboard__topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .student-dashboard__session-list li { display: grid; }
  .practice-primary,
  .practice-selector,
  .practice-rail { padding: 24px; }
  .practice-mode,
  .practice-written-toggle { grid-template-columns: 22px 46px minmax(0, 1fr); min-height: 76px; padding: 12px; }
  .practice-mode__icon { width: 44px; height: 44px; }
  .practice-mode__badge { display: none; }
  .practice-setup-action,
  .practice-question__actions { align-items: stretch; flex-direction: column; }
  .practice-setup-action .primary-btn,
  .practice-question__actions .primary-btn { width: 100%; }
}

@media (max-width: 460px) {
  .student-dashboard__topic-grid { grid-template-columns: minmax(0, 1fr); }
  .practice-page { width: min(100% - 20px, 920px); padding-top: 20px; }
  .practice-shell { padding: 0; }
  .practice-primary,
  .practice-selector,
  .practice-rail { padding: 20px; }
  .practice-choice { grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 11px; }
  .practice-choice[data-result-label]::after { grid-column: 2; justify-self: start; }
}

.course-auth-message {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #f1b5ae;
  border-radius: var(--bc-radius);
  background: #fff4f2;
  color: #9f1f18;
  font-weight: 700;
}

.course-auth-message.is-success {
  border-color: #9fd2b4;
  background: #effaf3;
  color: #176b3a;
}

.checkout-confirmation-recovery {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -4px 0 20px;
}

.checkout-confirmation-recovery[hidden] {
  display: none;
}

.learning-legal-footer {
  width: min(100%, 1180px);
  margin: 42px auto 0;
  padding: 22px 0 6px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  border-top: 1px solid var(--bc-line, #dbe3ee);
  color: var(--bc-muted, #5d6a7d);
  font-size: .78rem;
  line-height: 1.55;
}

.learning-legal-footer p {
  max-width: 760px;
  margin: 0;
}

.learning-legal-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 14px;
  white-space: nowrap;
}

.learning-legal-footer a {
  color: var(--bc-primary, #004ac6);
  font-weight: 800;
}

@media (max-width: 760px) {
  .learning-legal-footer {
    flex-direction: column;
  }

  .learning-legal-footer nav {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pricing-info-tooltip__bubble {
    transition: none;
  }
}

@media (max-width: 760px) {
  .student-dashboard {
    grid-template-columns: minmax(0, 1fr);
    padding: 18px;
  }

  .student-dashboard__stats {
    grid-template-columns: minmax(0, 1fr);
  }
}

.resume-strip {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  max-width: min(420px, calc(100vw - 36px));
  padding: 14px 16px;
  border: 1px solid var(--bc-border);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(15, 35, 65, .16);
}

.resume-strip a {
  color: var(--bc-primary);
  font-weight: 800;
}

.compact-auth-page .login-panel {
  max-width: 720px;
  margin-inline: auto;
}

.auth-page .public-topbar {
  margin-bottom: 24px;
}

@media (min-width: 900px) and (max-height: 820px) {
  .login-page {
    min-height: 0;
    align-content: start;
    padding-top: 20px;
  }

  .login-panel.auth-panel {
    padding: 22px 32px;
  }

  .auth-panel .page-title {
    font-size: clamp(2.35rem, 4vw, 3.25rem);
    line-height: 1.02;
  }

  .auth-panel .login-copy {
    gap: 7px;
    padding-block: 0;
  }

  .auth-provider-actions {
    gap: 8px;
    margin-top: 8px;
  }

  .auth-divider {
    margin-block: 8px;
  }

  .auth-form {
    gap: 6px;
    padding: 12px;
  }

  .auth-form input {
    min-height: 40px;
    padding-block: 8px;
  }

  .auth-purpose {
    margin-top: 2px;
  }
}

@media (max-width: 640px) {
  .public-topbar {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 12px 14px;
  }

  .public-nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
  }

  .public-nav .nav-pill {
    min-width: 0;
    min-height: 34px;
    justify-content: center;
    padding: 6px 4px;
    font-size: .76rem;
    text-align: center;
  }
}

/* Knowledge workspace and practice remain a separate, task-focused surface. */
.workspace-page {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 72px;
}

.workspace-page .student-dashboard { display: block; }

/* The new authenticated Home owns its canvas; do not inherit the former
   all-in-one dashboard card's padding, frame, or background. */
.workspace-page .student-dashboard--home {
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.workspace-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 26px;
}

.workspace-sidebar {
  display: grid;
  align-content: start;
  gap: 3px;
  position: sticky;
  top: 20px;
  height: fit-content;
  padding: 10px;
  border: 1px solid var(--bc-border);
  border-radius: var(--bc-radius);
  background: var(--bc-surface-soft);
}

.workspace-sidebar a {
  padding: 9px 10px;
  border-radius: 5px;
  color: var(--bc-text);
  font-size: .86rem;
  font-weight: 750;
  text-decoration: none;
}

.workspace-sidebar a:hover,
.workspace-sidebar a:focus-visible {
  background: #fff;
  color: var(--bc-primary);
  outline: 2px solid var(--bc-primary);
  outline-offset: -2px;
}

.workspace-main {
  min-width: 0;
  display: grid;
  gap: 22px;
}

.workspace-unit {
  overflow: hidden;
  border: 1px solid var(--bc-border);
  border-radius: var(--bc-radius);
  background: #fff;
}

.workspace-unit.is-complete {
  border-color: #4eae7a;
  background: #f3fbf6;
}

.workspace-unit__summary {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.workspace-unit__summary::-webkit-details-marker { display: none; }
.workspace-unit__summary::after { content: "+"; color: var(--bc-primary); font-weight: 800; }
.workspace-unit[open] .workspace-unit__summary::after { content: "-"; }
.workspace-unit__summary span { color: var(--bc-muted); font-size: .82rem; }
.workspace-unit .student-dashboard__topic-grid { padding: 0 14px 14px; }

.student-dashboard__topic.is-started { border-color: #82a8e8; background: #f4f8ff; }
.student-dashboard__topic.is-complete { border-color: #4eae7a; background: #f0faf4; }
.student-dashboard__topic.is-complete .student-dashboard__topic-code { color: #207447; }

.workspace-access-note {
  display: grid;
  gap: 14px;
  max-width: 700px;
  margin: 22px auto;
}

.workspace-access-note h1 { margin: 0; }
.workspace-access-note__actions { display: flex; flex-wrap: wrap; gap: 10px; }

.practice-progress {
  width: 100%;
  height: 8px;
  accent-color: var(--bc-primary);
}

/* Exam focus is an academic callout now, not a tilted decorative sticky note. */
.topic-hero .sticky-note,
.exam-focus,
.exam-panel {
  width: 100%;
  min-height: 0;
  padding: 22px 24px;
  border: 1px solid #a9bdf2;
  border-radius: var(--bc-radius);
  background: var(--bc-primary-soft) !important;
  background-image: none !important;
  box-shadow: none;
  transform: none !important;
}

.topic-hero .sticky-note p,
.exam-focus p,
.exam-panel p {
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

@media (min-width: 1101px) {
  body.student-app-shell[data-route-scope="learn"] .topic-document-wrap > .notebook-index {
    top: calc(var(--learn-shell-visible-header, 80px) + 24px);
    max-height: calc(100dvh - var(--learn-shell-visible-header, 80px) - 48px);
  }
}

@media (min-width: 1281px) {
  body.student-app-shell[data-route-scope="learn"] {
    --student-learn-sidebar-width: var(--course-index-collapsed-width, 56px);
  }

  body.student-app-shell[data-route-scope="learn"].course-index-open {
    --student-learn-sidebar-width: var(--course-index-expanded-width, 380px);
  }

  body.student-app-shell[data-route-scope="learn"] .topic-document-wrap {
    grid-template-columns: minmax(260px, 300px) minmax(0, 1120px);
    gap: clamp(20px, 2vw, 32px);
    max-width: 1500px;
    justify-content: start;
    margin: 0 auto;
    padding: 0 12px;
  }

  body.student-app-shell[data-route-scope="learn"].has-vsas-rail .topic-document-wrap {
    padding-right: calc(
      12px +
      var(--vsas-rail-width, 92px) +
      var(--vsas-rail-gap, 26px)
    );
  }

  body.student-app-shell[data-route-scope="learn"] .topic-document {
    grid-column: 2;
    grid-row: 1;
  }

  body.student-app-shell[data-route-scope="learn"] .topic-document-wrap > .notebook-index {
    /* Runtime geometry attaches the fixed index to the lesson edge throughout
       the drawer transition instead of estimating from the viewport width. */
    position: fixed;
    top: calc(var(--learn-shell-visible-header, 80px) + 24px);
    left: var(--learn-page-index-left, 16px);
    right: auto;
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    width: 100%;
    max-width: 300px;
    max-height: calc(100dvh - var(--learn-shell-visible-header, 80px) - 48px);
    transition: none;
  }
}

@media (max-width: 760px) {
  .workspace-page { width: min(100% - 24px, 760px); }
  .workspace-layout { grid-template-columns: 1fr; }
  .workspace-sidebar { display: none; }
  .workspace-unit__summary { align-items: start; flex-direction: column; gap: 3px; }
}

.workspace-overall {
  display: grid;
  gap: 9px;
  padding: 15px 16px;
  border: 1px solid var(--bc-border);
  border-radius: var(--bc-radius);
  background: var(--bc-surface-soft);
}

.workspace-overall__label {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--bc-text);
  font-size: .86rem;
}

.workspace-overall__label span { color: var(--bc-muted); }
.workspace-overall progress,
.workspace-focus-card progress { width: 100%; height: 9px; accent-color: var(--bc-primary); }

.workspace-focus-card {
  display: grid;
  gap: 10px;
  padding: clamp(20px, 4vw, 30px);
  border: 1px solid var(--bc-primary);
  border-radius: var(--bc-radius);
  background: linear-gradient(135deg, #f7faff, var(--bc-primary-soft));
}

.workspace-focus-card h3 {
  max-width: 34ch;
  margin: 0;
  color: var(--bc-text);
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.workspace-focus-card p { max-width: 66ch; margin: 0; color: var(--bc-muted); line-height: 1.55; }
.workspace-focus-card .primary-btn { width: fit-content; margin-top: 4px; }

.workspace-queue,
.workspace-mastery,
.student-dashboard__insights,
.student-dashboard__recent {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--bc-border);
  border-radius: var(--bc-radius);
  background: #fff;
}

.workspace-queue h3,
.workspace-mastery h3 { margin: 0; font-size: 1.12rem; }
.workspace-queue__list { display: grid; gap: 8px; margin: 0; padding-left: 1.4rem; }
.workspace-queue__list li { padding: 8px 10px; color: var(--bc-muted); }
.workspace-queue__list a { display: block; color: var(--bc-text); font-weight: 800; text-decoration: none; }
.workspace-queue__list a:hover,
.workspace-queue__list a:focus-visible { color: var(--bc-primary); text-decoration: underline; text-underline-offset: 3px; }
.workspace-queue__list span { display: block; margin-top: 3px; font-size: .84rem; line-height: 1.45; }

.workspace-unit__heading { margin: 0; }
.workspace-unit__summary {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--bc-text);
  font: inherit;
  text-align: left;
}
.workspace-unit__summary:hover,
.workspace-unit__summary:focus-visible { background: var(--bc-primary-soft); outline: 2px solid var(--bc-primary); outline-offset: -2px; }
.workspace-unit__summary[aria-expanded="true"]::after { content: "-"; }
.workspace-unit__panel { overflow: hidden; }

.student-dashboard__topic {
  position: relative;
  min-height: 142px;
  grid-template-rows: auto auto 1fr auto;
}
.student-dashboard__topic.is-in_progress { border-color: #82a8e8; background: #f4f8ff; }
.student-dashboard__topic.is-needs_review { border-color: #e09b55; background: #fff8ef; }
.student-dashboard__topic.is-proficient,
.student-dashboard__topic.is-mastered { border-color: #4eae7a; background: #f0faf4; }
.student-dashboard__topic.is-mastered::after {
  content: "Mastered";
  position: absolute;
  top: 10px;
  right: 10px;
  color: #207447;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
}
.student-dashboard__topic-state { padding-right: 4px; }
.student-dashboard__topic-actions { display: flex; gap: 12px; align-items: center; }
.student-dashboard__topic-actions a {
  color: var(--bc-primary);
  font-size: .76rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.student-dashboard__weak-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.student-dashboard__weak-list a { color: var(--bc-primary); font-weight: 800; white-space: nowrap; }

.student-dashboard__strengths {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--bc-border);
}
.student-dashboard__strengths h4 { margin: 0; font-size: .92rem; }
.student-dashboard__strength-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.student-dashboard__strength-list li { display: flex; justify-content: space-between; gap: 12px; }
.student-dashboard__strength-list a { color: #176b43; font-weight: 800; }
.student-dashboard__strength-list span { color: var(--bc-muted); font-size: .8rem; }

.workspace-mastery { grid-template-columns: minmax(260px, .9fr) minmax(280px, 1.1fr); }
.workspace-mastery > .section-kicker,
.workspace-mastery > h3,
.workspace-foundation { grid-column: 1 / -1; }
.workspace-mastery__figure { margin: 0; }
.workspace-mastery__figure svg { width: min(100%, 360px); display: block; margin: 0 auto; }
.workspace-mastery__figure figcaption { color: var(--bc-muted); font-size: .78rem; line-height: 1.45; text-align: center; }
.workspace-mastery__grid { fill: none; stroke: #cbd7eb; stroke-width: 1; }
.workspace-mastery__axis { stroke: #dbe3f1; stroke-width: 1; }
.workspace-mastery__evidence { fill: rgba(0, 79, 201, .2); stroke: var(--bc-primary); stroke-width: 2; }
.workspace-mastery__empty { fill: var(--bc-muted); font-size: 12px; font-weight: 700; text-anchor: middle; }
.workspace-mastery__list { display: grid; align-content: center; gap: 7px; margin: 0; padding: 0; list-style: none; }
.workspace-mastery__list li { display: grid; gap: 2px; padding: 9px 10px; border-left: 3px solid #cbd7eb; background: var(--bc-surface-soft); }
.workspace-mastery__list li.is-needs_review { border-left-color: #d97706; }
.workspace-mastery__list li.is-proficient,
.workspace-mastery__list li.is-mastered { border-left-color: #29935b; }
.workspace-mastery__list a { color: var(--bc-text); font-size: .82rem; font-weight: 800; text-decoration: none; }
.workspace-mastery__list span { color: var(--bc-muted); font-size: .76rem; }
.workspace-foundation { display: flex; justify-content: space-between; gap: 16px; padding: 12px; border: 1px solid var(--bc-border); background: #f8fbff; }
.workspace-foundation span { color: var(--bc-muted); font-size: .82rem; }

@media (max-width: 900px) {
  .workspace-mastery { grid-template-columns: 1fr; }
  .workspace-mastery > .section-kicker,
  .workspace-mastery > h3,
  .workspace-foundation { grid-column: auto; }
}

@media (max-width: 640px) {
  .workspace-page .student-dashboard { padding: 14px; }
  .student-dashboard__stats { grid-template-columns: 1fr; }
  .workspace-overall__label,
  .workspace-foundation { flex-direction: column; gap: 4px; }
  .workspace-focus-card .primary-btn { width: 100%; }
  .student-dashboard__topic-grid { grid-template-columns: 1fr; }
  .student-dashboard__weak-list li { align-items: start; flex-direction: column; }
  .student-dashboard__strength-list li { flex-direction: column; gap: 2px; }
}

/* Authenticated Home: presentation over the existing workspace payload. */
.home-workspace {
  display: grid;
  gap: 26px;
  width: min(100%, 1080px);
  margin: 0 auto;
  padding: 8px 0 38px;
}

.home-workspace__heading {
  display: grid;
  gap: 7px;
  max-width: 760px;
}

.home-workspace__heading h1,
.home-workspace h2,
.home-workspace h3 {
  margin: 0;
  color: var(--bc-text);
}

.home-workspace__heading h1 {
  font-size: clamp(2rem, 4vw, 3.45rem);
  line-height: 1.04;
}

.home-workspace__heading p {
  max-width: 62ch;
  margin: 0;
  color: var(--bc-muted);
  font-size: 1.04rem;
  line-height: 1.55;
}

.home-workspace__top-grid,
.home-workspace__lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr);
  gap: 18px;
}

.home-workspace__lower-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.home-continue-card,
.home-today-card,
.home-panel,
.home-quick-card {
  border: 1px solid var(--bc-border);
  border-radius: 8px;
}

.home-continue-card {
  display: grid;
  align-content: start;
  gap: 13px;
  min-height: 310px;
  padding: clamp(22px, 4vw, 32px);
  border-color: #153f81;
  background-color: #0a2857;
  background-image: linear-gradient(rgba(143, 183, 245, .11) 1px, transparent 1px), linear-gradient(90deg, rgba(143, 183, 245, .11) 1px, transparent 1px);
  background-size: 22px 22px;
  color: #f8fbff;
}

.home-continue-card .section-kicker,
.home-continue-card h2 {
  color: #fff;
}

.home-continue-card h2 {
  max-width: 23ch;
  font-size: clamp(1.55rem, 2.8vw, 2.3rem);
}

.home-continue-card__meta {
  max-width: 65ch;
  margin: 0;
  color: #cbdcff;
  line-height: 1.55;
}

.home-continue-card__progress {
  display: grid;
  gap: 7px;
  margin-top: auto;
}

.home-continue-card__progress > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #dce8ff;
  font-size: .85rem;
}

.home-continue-card progress,
.home-panel progress {
  width: 100%;
  height: 9px;
  accent-color: var(--bc-primary);
}

.home-continue-card progress { accent-color: #5ba6ff; }

.home-continue-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 10px;
}

.home-continue-card__actions .secondary-btn {
  border-color: #a8c9ff;
  background: transparent;
  color: #fff;
}

.home-continue-card__actions .secondary-btn:hover,
.home-continue-card__actions .secondary-btn:focus-visible {
  border-color: #fff;
  background: #143c79;
}

.home-today-card,
.home-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 22px;
  background: #fff;
}

.home-today-card h2,
.home-panel h2 { font-size: 1.28rem; }

.home-today-card > p,
.home-panel > p {
  margin: 0;
  color: var(--bc-muted);
  font-size: .91rem;
  line-height: 1.5;
}

.home-today-card__choices {
  display: grid;
  gap: 6px;
  margin-top: 4px;
}

.home-choice {
  display: grid;
  gap: 2px;
  padding: 11px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--bc-text);
  text-decoration: none;
}

.home-choice strong { font-size: .9rem; }
.home-choice span { color: var(--bc-muted); font-size: .78rem; }

.home-choice:hover,
.home-choice:focus-visible {
  border-color: #aec6f3;
  background: var(--bc-primary-soft);
  outline: 2px solid var(--bc-primary);
  outline-offset: 1px;
}

.home-session-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-session-list li { border-top: 1px solid var(--bc-border); }
.home-session-list__row {
  display: grid;
  gap: 3px;
  padding: 12px 10px;
  color: var(--bc-text);
  text-decoration: none;
  transition: background .16s ease, border-color .16s ease;
}
.home-session-list__row:hover,
.home-session-list__row:focus-visible {
  background: var(--bc-primary-soft);
  outline: 2px solid var(--bc-primary);
  outline-offset: -2px;
}
.home-session-list li:first-child { border-top: 0; }
.home-session-list li:first-child .home-session-list__row { padding-top: 0; }
.home-session-list strong { color: var(--bc-text); font-size: .9rem; }
.home-session-list span { color: var(--bc-muted); font-size: .79rem; }

.home-panel--snapshot {
  grid-template-rows: auto auto auto 1fr auto;
}

.home-panel--snapshot h2 {
  color: var(--bc-primary);
  font-size: clamp(1.45rem, 2.7vw, 2rem);
}

.home-panel--snapshot .secondary-btn { width: 100%; margin-top: auto; }

.home-progress-workspace { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.home-progress-workspace > .home-workspace__heading,
.home-progress-workspace > .workspace-mastery { grid-column: 1 / -1; }

.home-progress-metrics {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.home-progress-metric {
  display: grid;
  gap: 5px;
  min-height: 105px;
  padding: 18px;
  border: 1px solid var(--bc-border);
  border-radius: 8px;
  background: var(--bc-primary-soft);
}

.home-progress-metric strong { color: var(--bc-primary); font-size: clamp(1.4rem, 2.7vw, 2rem); }
.home-progress-metric span { color: var(--bc-muted); font-size: .84rem; font-weight: 750; }
.home-progress-course { min-height: 236px; }

.home-review-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-review-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border-left: 3px solid #d97706;
  background: #fff8ef;
  color: var(--bc-muted);
  font-size: .84rem;
}

.home-review-list a { color: var(--bc-primary); font-weight: 800; white-space: nowrap; }

.home-progress-history { grid-column: 1 / -1; }
.home-progress-history__list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.home-progress-history__list li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--bc-border); }
.home-progress-history__list li:first-child { padding-top: 0; border-top: 0; }
.home-progress-history__list li > div:first-child { display: grid; gap: 3px; }
.home-progress-history__list strong { color: var(--bc-text); font-size: .9rem; }
.home-progress-history__list span { color: var(--bc-muted); font-size: .8rem; }
.home-progress-history__list li > div:last-child { display: flex; align-items: center; gap: 10px; }
.home-progress-history__list .secondary-btn { min-height: 32px; padding: 5px 8px; font-size: .76rem; }

.home-workspace.is-partial .home-continue-card {
  background: #173e7a;
}

@media (max-width: 900px) {
  .home-workspace__top-grid,
  .home-workspace__lower-grid { grid-template-columns: 1fr; }
  .home-continue-card { min-height: 0; }
  .home-progress-workspace { grid-template-columns: 1fr; }
  .home-progress-workspace > .home-workspace__heading,
  .home-progress-workspace > .workspace-mastery { grid-column: auto; }
}

@media (max-width: 680px) {
  .home-workspace { gap: 20px; padding-top: 0; }
  .home-continue-card,
  .home-today-card,
  .home-panel { padding: 17px; }
  .home-continue-card__actions .primary-btn,
  .home-continue-card__actions .secondary-btn { width: 100%; }
  .home-progress-metrics { grid-template-columns: 1fr; }
  .home-review-list li { align-items: start; flex-direction: column; }
  .home-progress-history { grid-column: auto; }
  .home-progress-history__list li { align-items: start; flex-direction: column; }
}

.sticky-note,
.login-sticky,
.hero-sticky {
  min-height: 0;
  border: 1px solid var(--bc-border);
  border-radius: var(--bc-radius);
  background: var(--bc-primary-soft);
  color: var(--bc-text);
  box-shadow: none;
  transform: none;
}

.sticky-note::before,
.sticky-note::after {
  content: none !important;
}

.sticky-note h2,
.sticky-note h3 {
  font-family: "Be Vietnam Pro", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--bc-text);
  font-size: 1.1rem;
  line-height: 1.3;
}

.sticky-note p {
  color: var(--bc-muted);
  font-family: "Be Vietnam Pro", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 500;
}

.unit-landing {
  max-width: 900px;
  margin: 0 auto;
}

.unit-page,
.topic-document,
.page {
  min-height: 0;
  border: 1px solid var(--bc-border);
  border-radius: var(--bc-radius);
  background: #fff;
  box-shadow: none;
}

.page::before,
.page::after {
  content: none;
}

.unit-page {
  width: 100%;
  max-width: 900px;
  padding: clamp(28px, 5vw, 44px);
}

/* The student experience keeps this shell mounted while the route outlet changes. */
body.student-app-shell .app-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 0 46px;
}

body.student-app-shell .topbar {
  position: sticky;
  top: 0;
  z-index: 120;
  width: 100%;
  height: 80px;
  min-height: 80px;
  margin: 0;
  padding: 0 28px 0 64px;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, .28);
  border-radius: 0;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 7px 20px rgba(15, 23, 42, .06);
  backdrop-filter: blur(12px);
}

body.student-app-shell .topbar > div:first-child {
  display: grid;
  min-width: max-content;
}

body.student-app-shell .brand-title {
  width: 230px;
  height: 52px;
  color: transparent;
  font-size: 0;
  line-height: 0;
}

body.student-app-shell .brand-sub {
  margin-top: 4px;
  font-size: .66rem;
  line-height: 1;
}

body.student-app-shell .top-actions {
  min-width: 0;
  flex: 1;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 7px;
}

body.student-app-shell .top-actions .pill {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border-color: transparent;
  background: transparent;
  color: #172033;
}

body.student-app-shell .top-actions .nav-pill.is-active {
  border-color: transparent;
  background: transparent;
  color: #172033;
  box-shadow: inset 0 -2px 0 #2563eb;
}

.student-unit-context {
  flex: 0 0 auto;
  padding: 0 7px;
  color: #172033;
  font-size: .82rem;
  font-weight: 800;
  white-space: nowrap;
}

body.student-app-shell .public-main,
body.student-app-shell .course-home,
body.student-app-shell .unit-landing,
body.student-app-shell .topic-document {
  width: min(1320px, calc(100vw - 36px));
  margin-inline: auto;
}

/* Learn owns its own nested shell. The Course Map column exists only while
   routeScope=learn, so dashboard and practice never reserve sidebar space. */
body.student-app-shell[data-route-scope="learn"] .app-shell {
  display: grid;
  grid-template-columns: var(--course-index-collapsed-width, 56px) minmax(0, 1fr);
  grid-template-rows: 80px minmax(0, 1fr);
  transition: grid-template-columns 220ms ease;
}

body.student-app-shell[data-route-scope="learn"].course-index-open .app-shell {
  grid-template-columns: var(--course-index-expanded-width, 380px) minmax(0, 1fr);
}

body.student-app-shell[data-route-scope="learn"] .topbar {
  grid-column: 1 / -1;
  grid-row: 1;
}

body.student-app-shell[data-route-scope="learn"] [data-student-route-outlet] {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
}

@media (min-width: 901px) {
  body.student-app-shell[data-route-scope="learn"] .course-index-sidebar {
    position: fixed;
    inset: var(--learn-shell-visible-header, 80px) auto auto 0;
    grid-column: auto;
    grid-row: auto;
    align-self: auto;
    width: var(--course-index-collapsed-width, 56px);
    height: calc(100dvh - var(--learn-shell-visible-header, 80px));
    min-height: 0;
    overflow: hidden;
    transform: none;
    transition: width 220ms ease, box-shadow 200ms ease, transform 220ms ease;
  }

  body.student-app-shell[data-route-scope="learn"].course-index-open .course-index-sidebar,
  body.student-app-shell[data-route-scope="learn"] .course-index-sidebar.is-open {
    width: var(--course-index-expanded-width, 380px);
  }
}

body.student-app-shell[data-route-scope="learn"] .course-index-toggle {
  position: absolute;
  top: 14px;
  left: 7px;
}

.student-route-skeleton,
.student-route-error {
  width: min(1080px, 100%);
  min-height: 360px;
  display: grid;
  align-content: start;
  gap: 16px;
  margin: 38px auto;
  padding: 34px;
  border: 1px solid #dbe3ee;
  border-radius: 16px;
  background: #fff;
}

.student-route-skeleton span {
  display: block;
  border-radius: 999px;
  background: linear-gradient(90deg, #eef2f7 20%, #f8fafc 40%, #eef2f7 60%);
  background-size: 200% 100%;
  animation: student-route-pulse 1.25s ease-in-out infinite;
}

.student-route-skeleton__eyebrow { width: 120px; height: 14px; }
.student-route-skeleton__title { width: min(520px, 80%); height: 44px; }
.student-route-skeleton__line { width: min(720px, 95%); height: 17px; }
.student-route-skeleton__line.is-short { width: min(460px, 68%); }

@keyframes student-route-pulse { to { background-position: -200% 0; } }

@media (max-width: 720px) {
  body.student-app-shell .topbar {
    height: 64px;
    min-height: 64px;
    gap: 8px;
    padding: 0 10px 0 56px;
  }

  body.student-app-shell .brand-sub,
  body.student-app-shell .student-unit-context {
    display: none;
  }

  body.student-app-shell .brand-title {
    width: 156px;
    height: 42px;
    font-size: 0;
  }
  body.student-app-shell .top-actions {
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  body.student-app-shell .top-actions .pill {
    min-height: 34px;
    padding-inline: 7px;
    font-size: .72rem;
  }

  body.student-app-shell .course-index-toggle { top: 11px; }
  body.student-app-shell .public-main,
  body.student-app-shell .course-home,
  body.student-app-shell .unit-landing,
  body.student-app-shell .topic-document { width: min(100% - 20px, 1320px); }
}

@media (max-width: 900px) {
  body.student-app-shell[data-route-scope="learn"] .app-shell,
  body.student-app-shell[data-route-scope="learn"].course-index-open .app-shell {
    display: block;
  }

  body.student-app-shell[data-route-scope="learn"] [data-student-route-outlet] {
    min-width: 0;
  }

  body.student-app-shell[data-route-scope="learn"] .course-index-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 140;
    width: min(var(--course-index-expanded-width, 380px), calc(100vw - 4px));
    height: 100dvh;
    transform: translateX(calc(-100% + var(--course-index-collapsed-width, 56px)));
    pointer-events: auto;
  }

  body.student-app-shell[data-route-scope="learn"] .course-index-sidebar.is-open {
    width: min(var(--course-index-expanded-width, 380px), calc(100vw - 4px));
    transform: translateX(0);
  }

  body.student-app-shell[data-route-scope="learn"] .course-index-toggle {
    position: absolute;
    top: 11px;
    left: auto;
    right: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .student-route-skeleton span { animation: none; }
}

/* Unit overview pages use the notebook background directly; each topic row
   remains its own white, bordered control. Topic-document cards are unchanged. */
.unit-landing .unit-page {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.unit-page .page-inner {
  display: grid;
  gap: 28px;
}

.dynamic-unit-top {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.route-loading-line {
  width: min(320px, 70%);
  height: 4px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--bc-primary-soft);
}

.route-loading-line::after {
  content: "";
  width: 42%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--bc-primary);
  animation: route-loading 900ms ease-in-out infinite alternate;
}

@keyframes route-loading {
  from { transform: translateX(0); }
  to { transform: translateX(138%); }
}

.unit-topic-list {
  gap: 14px;
  counter-reset: none;
}

.unit-topic-row a {
  min-height: 76px;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px 22px;
  border: 1px solid var(--bc-border-strong);
  border-radius: var(--bc-radius);
  background: #fff;
  color: var(--bc-text);
}

.unit-topic-row a:has(.unit-topic-status) {
  grid-template-columns: 44px 72px minmax(0, 1fr) auto;
}

.unit-topic-row a:hover,
.unit-topic-row a:focus-visible {
  border-color: var(--bc-primary);
  background: #fff;
}

.unit-topic-status {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 2px solid var(--bc-primary);
  border-radius: 50%;
  background: #fff;
}

.unit-topic-row[data-topic-state="current"] a {
  border-color: #a6b8ff;
  border-left: 5px solid var(--bc-primary);
  box-shadow: 0 0 0 3px rgba(0, 74, 198, .06);
}

.unit-topic-row[data-topic-state="current"] .unit-topic-status::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 10px solid var(--bc-primary);
}

.unit-topic-row[data-topic-state="completed"] .unit-topic-status {
  background: var(--bc-primary-soft);
}

.unit-topic-row[data-topic-state="completed"] .unit-topic-status::before {
  content: "";
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--bc-primary);
  border-bottom: 2px solid var(--bc-primary);
  transform: rotate(-45deg);
}

.unit-topic-row[data-topic-state="locked"] a {
  opacity: .62;
  background: #fafbff;
}

.unit-topic-row[data-topic-state="locked"] .unit-topic-status {
  border-color: var(--bc-border-strong);
  background: var(--bc-primary-soft);
}

.unit-topic-meta {
  justify-self: end;
  padding: 5px 10px;
  border-radius: 7px;
  background: var(--bc-primary-soft);
  color: var(--bc-primary);
  font-size: .82rem;
  font-weight: 700;
}

body.student-app-shell[data-route-scope="learn"] .topic-document-wrap {
  justify-content: stretch;
  width: 100%;
  max-width: none;
  padding-inline: clamp(18px, 2vw, 32px);
}

body.student-app-shell[data-route-scope="learn"] .topic-document-wrap > .topic-document {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
}

.brand-title {
  cursor: pointer;
}

.brand-title:focus-visible {
  outline: 3px solid rgba(0, 74, 198, .28);
  outline-offset: 4px;
}

.topic-document {
  width: 100%;
  padding: clamp(28px, 5vw, 42px);
}

.topic-document .page-inner {
  display: grid;
  gap: 24px;
}

.topic-hero {
  grid-template-columns: 1fr;
  gap: 22px;
  padding: 0 0 8px;
}

.topic-hero .page-title {
  font-size: clamp(2.2rem, 4vw, 3.35rem);
}

.topic-hero .page-subtitle {
  margin-left: 0;
}

.topic-hero .sticky-note {
  width: 100%;
  max-width: none;
  justify-self: stretch;
  padding: 22px 24px;
  border-color: #a6b8ff;
  background: var(--bc-primary-soft);
}

.note-block,
.md-content-section,
.compare-card,
.callout,
.exam-panel {
  border: 1px solid var(--bc-border);
  border-radius: var(--bc-radius);
  background: #fff;
  box-shadow: none;
}

.note-block,
.md-content-section {
  padding: clamp(22px, 4vw, 30px);
}

.section-title {
  margin-bottom: 18px;
}

.section-title .doodle {
  display: none;
}

.section-title h2,
.note-block h3 {
  font-family: "Be Vietnam Pro", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--bc-text);
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  line-height: 1.25;
  font-weight: 700;
}

.student-md-content {
  display: grid;
  gap: 16px;
}

.student-md-content p,
.student-md-content li,
.student-md-content td,
.student-md-content th {
  color: var(--bc-muted);
  font-size: 1rem;
  line-height: 1.68;
}

.student-md-content strong {
  color: var(--bc-text);
}

.md-table-wrap {
  border: 1px solid var(--bc-border);
  border-radius: var(--bc-radius);
  overflow: auto;
}

.student-md-content table {
  margin: 0;
  border: 0;
  border-collapse: collapse;
  background: #fff;
}

.student-md-content th {
  background: #f5f7ff;
  color: var(--bc-text);
}

.student-md-content th,
.student-md-content td {
  border-color: var(--bc-border);
}

.note-block:has(.quick-check-launch) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  border-color: var(--bc-border);
  background: #f7f9ff;
  color: var(--bc-text);
}

.note-block:has(.quick-check-launch) .section-title {
  margin: 0;
}

.note-block:has(.quick-check-launch) .section-title h2 {
  color: var(--bc-text);
  font-size: 1.25rem;
  line-height: 1.2;
}

.quick-check-launch {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.topic-practice-action {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid var(--bc-primary);
  border-radius: var(--bc-radius);
  background: var(--bc-primary);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.topic-practice-action:hover {
  background: #0744b6;
  color: #fff;
}

.topic-practice-action:focus-visible {
  outline: 2px solid var(--bc-primary);
  outline-offset: 3px;
}

.topic-practice-prompt .modal {
  width: min(520px, calc(100vw - 32px));
}

.topic-practice-prompt .modal-top {
  margin-bottom: 10px;
}

.topic-practice-prompt .modal-top h2 {
  margin: 0;
}

.topic-practice-prompt .modal-label {
  display: none;
}

.topic-practice-prompt .modal-actions {
  justify-content: flex-end;
  margin-top: 20px;
}

.topic-practice-prompt .secondary-btn,
.topic-practice-prompt .primary-btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: var(--bc-radius);
  font: inherit;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  transform: none;
  box-shadow: none;
}

.topic-practice-prompt .secondary-btn {
  border-color: var(--bc-primary);
  background: #fff;
  color: var(--bc-primary);
}

.topic-practice-prompt .secondary-btn:hover,
.topic-practice-prompt .secondary-btn:focus-visible {
  border-color: var(--bc-primary);
  background: #edf4ff;
  color: var(--bc-primary);
  transform: none;
  box-shadow: none;
}

.topic-practice-prompt .primary-btn {
  border-color: var(--bc-primary);
  background: var(--bc-primary);
  color: #fff;
}

.topic-practice-prompt .primary-btn:hover,
.topic-practice-prompt .primary-btn:focus-visible {
  border-color: #0744b6;
  background: #0744b6;
  color: #fff;
  transform: none;
  box-shadow: none;
}

@media (max-width: 720px) {
  .note-block:has(.quick-check-launch) {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .quick-check-launch {
    justify-content: flex-start;
  }
}

.topic-footer-nav {
  margin-top: 10px;
  padding-top: 22px;
  border-top: 1px solid var(--bc-border);
}

.topic-footer-link {
  border-radius: var(--bc-radius);
  box-shadow: none;
}

.course-index-sidebar {
  background: rgba(255,255,255,.96);
  border-right-color: var(--bc-border);
  box-shadow: none;
}

.course-index-sidebar::before {
  content: none !important;
}

.course-index-sidebar .course-index-head {
  border-bottom-color: var(--bc-border);
}

.course-index-sidebar .course-index-kicker,
.course-index-sidebar .course-unit-kicker {
  color: var(--bc-primary);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.course-index-sidebar .course-index-head h2 {
  font-family: "Be Vietnam Pro", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 2.35rem;
  line-height: 1.02;
  color: var(--bc-text);
  letter-spacing: 0;
}

.course-index-sidebar .course-index-search {
  border-bottom-color: var(--bc-border);
}

.course-index-sidebar .course-index-search input {
  border-color: var(--bc-border-strong);
  background: #fff;
  color: var(--bc-text);
}

.course-index-sidebar .course-index-search input:focus {
  border-color: var(--bc-primary);
  outline: 3px solid rgba(0, 74, 198, .15);
}

.course-index-sidebar .course-index-search label,
.course-index-sidebar .course-index-search-status,
.course-index-sidebar .course-topic-first-match,
.course-index-sidebar .course-index-search-empty {
  color: var(--bc-muted);
}

.course-index-sidebar .course-index-search-clear:hover,
.course-index-sidebar .course-index-search-clear:focus-visible {
  background: var(--bc-primary-soft);
  color: var(--bc-primary);
}

.course-index-sidebar .course-index-units {
  scrollbar-color: rgba(0, 74, 198, .45) rgba(234, 240, 255, .75);
}

.course-index-sidebar .course-index-units::-webkit-scrollbar-track {
  background: rgba(234, 240, 255, .75);
}

.course-index-sidebar .course-index-units::-webkit-scrollbar-thumb {
  background: rgba(0, 74, 198, .35);
  border-color: rgba(255, 255, 255, .8);
}

.course-index-sidebar .course-index-units::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 74, 198, .55);
}

.course-index-sidebar .course-unit-accordion,
.course-index-sidebar .course-unit-accordion.has-current-topic {
  border-bottom-color: var(--bc-border);
  background: #fff;
}

.course-index-sidebar .course-unit-accordion.has-current-topic {
  background: var(--bc-primary-soft);
}

.course-index-sidebar .course-unit-title {
  color: var(--bc-text);
}

.course-index-sidebar .course-topic-link {
  border-color: var(--bc-border);
  border-radius: var(--bc-radius);
  background: #fff;
  color: var(--bc-muted);
}

.course-index-sidebar .course-topic-link:hover,
.course-index-sidebar .course-topic-link:focus-visible,
.course-index-sidebar .course-topic-link.is-current,
.course-index-sidebar .course-topic-link[aria-current="page"],
.course-index-sidebar .course-topic-link[data-active="true"] {
  border-color: var(--bc-primary);
  background: #fff;
}

.course-index-sidebar .course-topic-link .course-topic-icon,
.course-index-sidebar .course-topic-link .course-topic-icon-static,
.course-index-sidebar .course-topic-link .course-topic-icon-motion,
.course-index-sidebar .course-topic-link .course-topic-code,
.course-index-sidebar .course-topic-link .course-topic-title {
  background: transparent;
}

.course-index-sidebar .course-topic-code {
  color: var(--bc-primary);
}

.course-index-sidebar .course-topic-title {
  color: var(--bc-text);
}

.course-index-toggle {
  border-radius: var(--bc-radius);
  border-color: var(--bc-border);
}

.notebook-index {
  left: max(64px, calc((100vw - var(--bc-topic-shell-width)) / 2 + 24px));
  border-color: var(--bc-border);
  border-radius: var(--bc-radius);
  background: rgba(255,255,255,.96);
  box-shadow: var(--bc-shadow);
}

.notebook-index__title {
  margin-left: 0;
  font-family: "Be Vietnam Pro", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  color: var(--bc-text);
  letter-spacing: 0;
}

.notebook-index__item.is-current .notebook-index__label,
.notebook-index__item.is-complete .notebook-index__box,
.notebook-index__tick path {
  color: var(--bc-primary);
  stroke: var(--bc-primary);
  border-color: var(--bc-primary);
}

/* If the measured desktop columns cannot maintain both navigation gaps, use
   the existing floating Index control before either panel can cover content. */
@media (min-width: 1101px) {
  body.student-app-shell[data-route-scope="learn"].notebook-index-compact .notebook-index-toggle {
    display: block;
    position: fixed;
    right: 16px;
    bottom: 18px;
    z-index: 37;
    padding: 9px 14px;
    border: 1px solid var(--bc-border-strong);
    border-radius: 999px;
    background: #fff;
    color: var(--bc-text);
    font-weight: 800;
    box-shadow: var(--bc-shadow);
  }

  body.student-app-shell[data-route-scope="learn"].notebook-index-compact .topic-document-wrap > .notebook-index {
    top: auto;
    left: 16px;
    right: 16px;
    bottom: 68px;
    width: auto;
    max-width: none;
    max-height: min(720px, calc(100dvh - 104px));
    transform: translateY(12px);
    opacity: 0;
    pointer-events: none;
    transition: transform 180ms ease, opacity 180ms ease;
  }

  body.student-app-shell[data-route-scope="learn"].notebook-index-compact .topic-document-wrap > .notebook-index.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
}

.unit-topic-rail {
  border-color: var(--bc-border);
  border-radius: var(--bc-radius);
  background: #fff;
  box-shadow: none;
}

.topic-chip {
  border-radius: var(--bc-radius);
  border-color: var(--bc-border);
}

.topic-chip.is-current {
  border-color: var(--bc-primary);
  background: var(--bc-primary-soft);
}

.modal,
.image-lightbox {
  border-radius: var(--bc-radius);
  border-color: var(--bc-border);
  background: #fff;
}

.modal h2,
.image-lightbox h3 {
  font-size: 2rem;
  line-height: 1.15;
  font-weight: 800;
}

.quick-check-progress span {
  background: var(--bc-primary);
}

.quick-check-choice {
  border-radius: var(--bc-radius);
}

@media (max-width: 1100px) {
  .faq-page.has-faq-index {
    grid-template-columns: minmax(0, 1120px);
  }

  .faq-page.has-faq-index > .public-page-head,
  .faq-page.has-faq-index > .public-legal,
  .faq-page.has-faq-index > .faq-accordion-stack,
  .faq-page.has-faq-index > .faq-source-section,
  .faq-page.has-faq-index > .faq-bottom-actions {
    grid-column: 1;
  }

  .faq-page.has-faq-index .faq-head > div:first-child {
    transform: none;
  }

  .faq-page-index {
    display: none;
  }

  .notebook-index {
    left: 16px;
  }
}

@media (max-width: 1180px) {
  .course-grid,
  .pricing-grid,
  .public-feature-grid,
  .calculator-facts,
  .about-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-shell:has(.topic-document-wrap) {
    width: min(1288px, calc(100vw - 48px));
  }

  .app-shell:has(.topic-document-wrap) .topbar {
    padding-inline: max(24px, calc((100vw - 1288px) / 2));
  }

  .topic-document-wrap {
    grid-template-columns: minmax(0, 780px);
    padding-left: 0;
    padding-right: 0;
  }
}

@media (max-width: 820px) {
  .faq-public-page .public-main {
    padding-top: 172px;
  }

  .faq-section-block,
  .wide-faq-item {
    scroll-margin-top: 176px;
  }

  .app-shell,
  .public-shell {
    width: min(100% - 28px, 760px);
  }

  .app-shell:has(.topic-document-wrap) {
    width: min(100% - 28px, 760px);
  }

  .topbar,
  .public-topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    padding-inline: 18px;
    margin-bottom: 32px;
  }

  body:not(.public-page) .topbar > div:first-child {
    padding-left: 46px;
  }

  .top-actions,
  .public-nav {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    width: 100%;
    scrollbar-width: none;
  }

  .top-actions::-webkit-scrollbar,
  .public-nav::-webkit-scrollbar {
    display: none;
  }

  .top-actions .pill,
  .public-nav .pill {
    min-width: max-content;
    flex: 0 0 auto;
    justify-content: center;
    padding-inline: 10px;
    text-align: center;
    white-space: nowrap;
  }

  .course-grid,
  .pricing-grid,
  .public-feature-grid,
  .about-cards,
  .public-hero,
  .home-tools-head,
  .home-tools-grid,
  .calculator-head,
  .score-calculator-shell,
  .calculator-facts,
  .calculator-source-note,
  .faq-head,
  .access-strip,
  .public-split,
  .public-checkout-panel,
  .login-panel {
    grid-template-columns: 1fr;
  }

  .home-tools-head,
  .calculator-head,
  .calculator-source-note {
    align-items: start;
  }

  .calculator-back-link {
    justify-self: start;
  }

  .faq-head-actions,
  .faq-bottom-actions {
    justify-content: flex-start;
  }

  .more-faq-link {
    justify-self: stretch;
    justify-content: center;
  }

  .question-list {
    grid-template-columns: 1fr;
  }

  .score-results-panel {
    position: static;
  }

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

  .home-unit-hero .hero-copy {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .hero-lede-panel {
    justify-self: stretch;
    padding: 0;
    background: transparent;
  }

  .home-unit-path {
    padding-inline: 0;
    gap: 14px;
    margin-top: 0;
  }

  .home-unit-glow,
  .home-unit-hotspot {
    display: none;
  }

  .home-unit-path-visual {
    width: 100%;
    overflow: visible;
  }

  .home-unit-labels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
  }

  .home-unit-label {
    min-height: 64px;
    padding: 8px 6px;
    border: 1px solid var(--bc-border);
    background: rgba(255, 255, 255, .68);
  }

  .home-unit-label span {
    font-size: .86rem;
  }

  .home-unit-label strong {
    font-size: .96rem;
  }

  .unit-card {
    min-height: auto;
  }

  .dynamic-unit-top {
    grid-template-columns: 1fr;
  }

  .dynamic-unit-top .access-status {
    justify-self: start;
  }

  .unit-topic-row a,
  .unit-topic-row a:has(.unit-topic-status) {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 8px 12px;
  }

  .unit-topic-code,
  .unit-topic-meta {
    grid-column: 2;
    justify-self: start;
  }

  .unit-topic-title {
    grid-column: 2;
  }

  .public-legal {
    text-align: center;
  }

  .public-legal-official-link {
    white-space: normal;
  }

  .tool-stat-grid,
  .score-control-row {
    grid-template-columns: 1fr;
  }

  .score-control-row input[type="number"] {
    width: 100%;
    text-align: left;
  }

  .topic-document {
    padding: 22px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-unit-glow,
  ::view-transition-old(root),
  ::view-transition-new(root),
  ::view-transition-old(bc-topbar),
  ::view-transition-new(bc-topbar) {
    animation: none;
    transition: none;
  }
}

@media (max-width: 640px) {
  .public-topbar {
    gap: 10px;
    padding: 12px 14px;
  }

  .public-nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
    padding-bottom: 0;
  }

  .public-nav .pill,
  .public-nav .nav-pill {
    min-width: 0;
    min-height: 34px;
    width: 100%;
    padding: 6px 4px;
    font-size: .76rem;
    white-space: normal;
  }

  .public-nav .nav-auth-slot {
    min-width: 0;
    grid-column: span 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .public-nav .nav-auth-slot > .account-menu,
  .public-nav .nav-auth-slot > .icon-account-menu {
    grid-column: 2;
    justify-self: end;
  }
}

/* Universal top-bar geometry
   Public pages and the persistent student shell share the same physical frame.
   Route-specific links may change, but the logo, controls, and divider do not move. */
:root {
  --bc-topbar-height: 80px;
  --bc-topbar-padding-start: 64px;
  --bc-topbar-padding-end: 28px;
  --bc-topbar-brand-width: 230px;
}

/* Keep the universal frame full-width and constrain only the public content.
   This avoids the half-scrollbar offset produced by the legacy 100vw breakout. */
body.public-page .public-shell {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

body.public-page .public-main {
  width: min(1288px, calc(100% - 48px));
  margin-inline: auto;
}

body.public-page .home-public-shell .public-main {
  width: 100%;
}

.topbar,
.public-topbar {
  box-sizing: border-box;
  position: sticky;
  top: 0;
  width: 100vw;
  height: var(--bc-topbar-height);
  min-height: var(--bc-topbar-height);
  margin-inline: calc(50% - 50vw);
  padding: 0 var(--bc-topbar-padding-end) 0 var(--bc-topbar-padding-start);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, .28);
  border-radius: 0;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 7px 20px rgba(15, 23, 42, .06);
  backdrop-filter: blur(12px);
}

body.public-page .public-topbar,
.home-public-shell .public-topbar,
.app-shell:has(.topic-document-wrap) .topbar {
  padding: 0 var(--bc-topbar-padding-end) 0 var(--bc-topbar-padding-start);
}

body.public-page .public-topbar {
  width: 100%;
  margin-inline: 0;
}

.topbar > div:first-child,
.public-topbar > div:first-child,
body.student-app-shell .topbar > div:first-child {
  width: var(--bc-topbar-brand-width);
  min-width: var(--bc-topbar-brand-width);
  flex: 0 0 var(--bc-topbar-brand-width);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
}

.brand-title,
body.student-app-shell .brand-title {
  width: var(--bc-topbar-brand-width);
  height: 52px;
  flex: 0 0 var(--bc-topbar-brand-width);
}

.top-actions,
.public-nav,
body.student-app-shell .top-actions {
  position: relative;
  width: auto;
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: nowrap;
  overflow: visible;
  padding-bottom: 0;
}

.nav-auth-slot {
  min-width: 156px;
  flex: 0 0 156px;
}

.topbar .top-actions .pill,
.topbar .top-actions .nav-pill,
.public-topbar .public-nav .pill,
.public-topbar .public-nav .nav-pill,
body.student-app-shell .topbar .top-actions .pill,
body.student-app-shell .topbar .top-actions .nav-pill {
  min-height: 40px;
  padding: 9px 12px;
  font-size: .94rem;
  line-height: 1.25;
}

/* Unit context belongs between the brand and primary links, but it must not
   participate in flex sizing or nudge the primary navigation sideways. */
.student-unit-context {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}

@media (max-width: 720px) {
  :root {
    --bc-topbar-height: 64px;
    --bc-topbar-padding-start: 56px;
    --bc-topbar-padding-end: 10px;
    --bc-topbar-brand-width: 156px;
  }

  .topbar,
  .public-topbar,
  body.student-app-shell .topbar,
  body.public-page .public-topbar,
  .home-public-shell .public-topbar,
  .app-shell:has(.topic-document-wrap) .topbar {
    height: var(--bc-topbar-height);
    min-height: var(--bc-topbar-height);
    padding: 0 var(--bc-topbar-padding-end) 0 var(--bc-topbar-padding-start);
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  .topbar > div:first-child,
  .public-topbar > div:first-child,
  body:not(.public-page) .topbar > div:first-child {
    width: var(--bc-topbar-brand-width);
    min-width: var(--bc-topbar-brand-width);
    flex-basis: var(--bc-topbar-brand-width);
    padding: 0;
  }

  .brand-title,
  body.student-app-shell .brand-title {
    width: var(--bc-topbar-brand-width);
    height: 42px;
    flex-basis: var(--bc-topbar-brand-width);
  }

  .top-actions,
  .public-nav,
  body.student-app-shell .top-actions {
    width: auto;
    display: flex;
    grid-template-columns: none;
    justify-content: flex-start;
    gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0;
    scrollbar-width: none;
  }

  .top-actions .nav-auth-slot,
  .public-nav .nav-auth-slot {
    min-width: 156px;
    flex: 0 0 156px;
    grid-column: auto;
    display: flex;
  }

  .student-unit-context {
    display: none;
  }
}

/* Account settings: compact utility workspace. These rules are intentionally
   scoped so public pages and lesson panels retain their existing presentation. */
body.public-page .public-main.settings-page {
  width: min(1220px, calc(100% - 48px));
  gap: 0;
  padding-bottom: 64px;
}

.settings-page .settings-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding-top: 28px;
}

.settings-page .settings-nav {
  position: sticky;
  top: calc(var(--bc-topbar-height) + 24px);
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #dde5f2;
  border-radius: 16px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 14px 34px rgba(32, 52, 89, .07);
}

.settings-page .settings-nav__item {
  position: relative;
  min-width: 0;
  min-height: 62px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  padding: 9px 10px 9px 14px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--bc-text);
  text-decoration: none;
  box-shadow: none;
  transition: background-color 150ms ease, color 150ms ease;
}

.settings-page .settings-nav__item::before {
  position: absolute;
  inset: 10px auto 10px 0;
  width: 3px;
  border-radius: 999px;
  background: var(--bc-primary);
  content: "";
  opacity: 0;
  transform: scaleY(.45);
  transition: opacity 150ms ease, transform 150ms ease;
}

.settings-page .settings-nav__item:hover {
  border: 0;
  background: #f4f7fd;
  color: var(--bc-text);
  box-shadow: none;
}

.settings-page .settings-nav__item.is-active,
.settings-page .settings-nav__item[aria-current="page"] {
  border: 0;
  background: #eaf1ff;
  color: #003fa9;
  box-shadow: none;
}

.settings-page .settings-nav__item.is-active::before,
.settings-page .settings-nav__item[aria-current="page"]::before {
  opacity: 1;
  transform: scaleY(1);
}

.settings-page .settings-nav__item:focus-visible {
  border: 0;
  background: #eef4ff;
  outline: 3px solid rgba(0, 74, 198, .2);
  outline-offset: 2px;
  box-shadow: none;
}

.settings-page .settings-nav__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #fff;
}

.settings-page .settings-nav__icon-static,
.settings-page .settings-nav__icon-motion {
  background: #fff;
}

.settings-page .settings-nav__item strong {
  color: inherit;
  font-size: .91rem;
  line-height: 1.25;
}

.settings-page .settings-nav__item small {
  margin-top: 2px;
  color: #66738e;
  font-size: .7rem;
  line-height: 1.35;
}

.settings-page .settings-outlet {
  min-width: 0;
}

.settings-page .settings-outlet .account-settings-panel {
  min-height: 0;
  padding: 36px 40px;
  border: 1px solid #d9e2f0;
  border-radius: 18px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 18px 42px rgba(32, 52, 89, .07);
}

.settings-page .account-settings-panel__head {
  display: block;
}

.settings-page .account-settings-panel h2 {
  margin: 5px 0 24px;
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  line-height: 1.25;
}

.settings-page .account-settings-panel h3 {
  margin: 0 0 5px;
  color: var(--bc-text);
  font-size: 1rem;
}

.settings-page .account-form-column,
.settings-page .settings-preferences,
.settings-page .checkout-message[data-profile-message],
.settings-page .checkout-message[data-password-message] {
  max-width: 700px;
}

.settings-page .account-settings-form {
  display: grid;
  gap: 10px;
}

.settings-page .account-form-column {
  display: grid;
  gap: 10px;
}

.settings-page .account-settings-form label,
.settings-page .account-profile-media__label {
  color: #25324b;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.settings-page .account-settings-form input:not([type="hidden"]):not([type="file"]),
.settings-page .account-settings-form select,
.settings-page .account-settings-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #c9d4e7;
  border-radius: 10px;
  background-color: #fff;
  color: var(--bc-text);
  font: inherit;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.settings-page .account-settings-form input:not([type="hidden"]):not([type="file"]),
.settings-page .account-settings-form select {
  min-height: 48px;
  padding: 11px 13px;
}

.settings-page .account-settings-form select {
  padding-right: 42px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #52617e 50%), linear-gradient(135deg, #52617e 50%, transparent 50%);
  background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
}

.settings-page .account-settings-form textarea {
  min-height: 185px;
  padding: 12px 13px;
  line-height: 1.55;
  resize: vertical;
}

.settings-page .account-settings-form input[readonly] {
  background: #f4f6fa;
  color: #5f6b82;
}

.settings-page .account-settings-form input:focus-visible,
.settings-page .account-settings-form select:focus-visible,
.settings-page .account-settings-form textarea:focus-visible {
  border-color: var(--bc-primary);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(0, 74, 198, .13);
}

.settings-page .auth-field-hint {
  margin: -2px 0 7px;
  color: #68758d;
  font-size: .73rem;
  line-height: 1.5;
}

.settings-page .account-profile-media {
  max-width: 700px;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  margin: 0 0 26px;
  padding: 18px;
  border: 1px solid #e1e7f1;
  border-radius: 14px;
  background: #f8faff;
}

.settings-page .account-avatar-editor {
  width: 84px;
  height: 84px;
  flex-basis: 84px;
  border: 2px solid #c8d7f3;
  background: #fff;
  box-shadow: 0 0 0 5px rgba(0, 74, 198, .06);
}

.settings-page .account-profile-media__controls {
  min-width: 0;
}

.settings-page .account-upload-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 7px 0 6px;
}

.settings-page .account-settings-form .account-upload-button {
  flex: 0 0 auto;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid #9db5de;
  border-radius: 9px;
  background: #fff;
  color: #164ca4;
  font-size: .83rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.settings-page .account-settings-form .account-upload-button:hover {
  border-color: var(--bc-primary);
  background: #f3f7ff;
}

.settings-page .account-profile-media__controls:has(.account-avatar-input:focus-visible) .account-upload-button {
  border-color: var(--bc-primary);
  box-shadow: 0 0 0 3px rgba(0, 74, 198, .16);
}

.settings-page .account-upload-filename {
  min-width: 0;
  overflow: hidden;
  color: #5e6a81;
  font-size: .8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-page .account-avatar-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

.settings-page .password-field {
  position: relative;
}

.settings-page .password-field input {
  padding-right: 2.75rem !important;
}

.settings-page .account-settings-panel .primary-btn,
.settings-page .account-settings-panel .secondary-btn {
  width: fit-content;
  min-width: 176px;
  min-height: 44px;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 9px;
}

.settings-page .account-settings-panel .account-form-column > .primary-btn {
  margin-top: 7px;
}

.settings-page .account-mfa-card {
  max-width: 700px;
  display: grid;
  gap: 16px;
  margin: 20px 0 34px;
  padding: 20px;
  border: 1px solid #c9d8f2;
  border-radius: 14px;
  background: #f8faff;
}

.settings-page .account-mfa-card[hidden],
.settings-page .account-mfa-setup[hidden],
.settings-page .account-mfa-form[hidden] {
  display: none;
}

.settings-page .account-mfa-card h3,
.settings-page .account-mfa-card p {
  margin: 0;
}

.settings-page .account-mfa-card p {
  color: var(--bc-muted);
  font-size: .9rem;
  line-height: 1.55;
}

.settings-page .account-mfa-setup {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.settings-page .account-mfa-qr {
  width: 168px;
  height: 168px;
  padding: 8px;
  border: 1px solid #d9e1ef;
  border-radius: 10px;
  background: #fff;
}

.settings-page .account-mfa-secret {
  display: block;
  margin-top: 10px;
  padding: 9px 11px;
  overflow-wrap: anywhere;
  border-radius: 8px;
  background: #e9f0fc;
  color: #153d7a;
  font-size: .82rem;
}

.settings-page .account-mfa-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: end;
}

.settings-page .account-mfa-form label {
  grid-column: 1 / -1;
  color: #27344d;
  font-size: .78rem;
  font-weight: 800;
}

.settings-page .account-mfa-form input {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #c9d3e3;
  border-radius: 9px;
  font: inherit;
  letter-spacing: .18em;
}

.settings-page .account-mfa-admin-link {
  text-decoration: none;
}

.settings-page .account-security-subtitle {
  margin: 0 0 16px;
}

.settings-page .account-session-card {
  max-width: 700px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: 34px;
  padding: 22px 0 0;
  border-top: 1px solid #e1e7f1;
}

.settings-page .account-session-card p {
  margin: 0;
  color: var(--bc-muted);
  font-size: .9rem;
}

.settings-page .account-session-card .secondary-btn {
  min-width: 112px;
  border-color: #dc8f89;
  color: #a42a22;
}

.settings-page .account-session-card .secondary-btn:hover,
.settings-page .account-session-card .secondary-btn:focus-visible {
  border-color: #b3261e;
  background: #fff5f4;
  color: #8f2019;
}

.settings-page .settings-preferences {
  margin: 32px 0 0;
  padding: 18px;
  border-color: #e1e7f1;
  border-radius: 13px;
  background: #f8faff;
}

.settings-page .settings-preferences legend {
  color: #25324b;
  font-size: .82rem;
}

.settings-page .settings-preference {
  letter-spacing: 0;
  text-transform: none;
}

.settings-page .settings-preference strong {
  font-size: .86rem;
  letter-spacing: 0;
  text-transform: none;
}

.settings-page .settings-preference small {
  font-size: .76rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.settings-page .account-subscription-hero {
  padding: 22px;
  border-color: #cfdbef;
  border-radius: 15px;
  background: #f3f7ff;
}

.settings-page .account-subscription-copy h2 {
  margin-bottom: 7px;
}

.settings-page .account-subscription-status {
  border-color: #c7d7f3;
  background: #fff;
  box-shadow: none;
}

.settings-page .account-subscription-panel .subscription-facts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.settings-page .account-subscription-panel .subscription-facts div {
  min-height: 78px;
  display: grid;
  align-content: center;
  padding: 15px 17px;
  border-color: #dce4f0;
  background: #fff;
  box-shadow: none;
}

.settings-page .account-subscription-notice {
  margin-top: 2px;
  padding: 14px 16px;
  border-radius: 10px;
  background: #f8fbff;
}

.settings-page .account-subscription-actions {
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #e1e7f1;
}

.settings-page .account-help-intro {
  max-width: 700px;
  margin: -12px 0 4px;
  color: var(--bc-muted);
  line-height: 1.55;
}

.settings-page .account-help-warning {
  max-width: 700px;
  margin: 0 0 20px;
  padding: 10px 12px;
  border-left: 3px solid #9fb9e6;
  border-radius: 0 8px 8px 0;
  background: #f6f9ff;
  color: #52617d;
  font-size: .82rem;
}

.settings-page .account-subscription-notice[hidden],
.settings-page .account-subscription-actions [hidden] {
  display: none !important;
}

@media (max-width: 960px) {
  body.public-page .public-main.settings-page {
    width: min(100% - 36px, 900px);
  }

  .settings-page .settings-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-page .settings-nav {
    position: static;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .settings-page .settings-nav__item {
    min-height: 58px;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 8px;
    padding-inline: 10px;
  }

  .settings-page .settings-nav__icon {
    width: 36px;
    height: 36px;
  }

  .settings-page .settings-nav__item small {
    font-size: .64rem;
  }
}

@media (max-width: 700px) {
  body.public-page .public-main.settings-page {
    width: min(100% - 24px, 680px);
    padding-bottom: 40px;
  }

  .settings-page .settings-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 9px;
  }

  .settings-page .settings-shell {
    padding-top: 20px;
  }

  .settings-page .settings-outlet .account-settings-panel {
    padding: 24px 22px;
    border-radius: 15px;
  }

  .settings-page .account-profile-media {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 15px;
    padding: 15px;
  }

  .settings-page .account-avatar-editor {
    width: 68px;
    height: 68px;
    flex-basis: 68px;
  }

  .settings-page .account-upload-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .settings-page .account-settings-panel .primary-btn,
  .settings-page .account-settings-panel .secondary-btn {
    width: 100%;
  }

  .settings-page .account-mfa-setup,
  .settings-page .account-mfa-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-page .account-mfa-qr {
    justify-self: center;
  }

  .settings-page .account-mfa-form label {
    grid-column: auto;
  }

  .settings-page .account-session-card {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-page .account-subscription-hero {
    display: grid;
    gap: 14px;
    padding: 18px;
  }

  .settings-page .account-subscription-status {
    grid-row: 1;
  }

  .settings-page .account-subscription-panel .subscription-facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-page .account-subscription-actions {
    display: grid;
  }
}

@media (max-width: 500px) {
  .settings-page .settings-nav {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-page .settings-nav__item {
    min-height: 54px;
  }

  .settings-page .settings-nav__item small {
    display: block;
  }

  .settings-page .account-profile-media {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-page .account-avatar-editor {
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .settings-page .settings-nav__item,
  .settings-page .settings-nav__item::before,
  .settings-page .account-settings-form .account-upload-button,
  .settings-page .account-settings-form input,
  .settings-page .account-settings-form select,
  .settings-page .account-settings-form textarea {
    transition: none;
  }
}
