:root {
  --module-bg: #fffaf0;
  --module-panel: #ffffff;
  --module-panel-raised: #f5f0e0;
  --module-surface: #faf5e8;
  --module-current: color-mix(in srgb, var(--module-yellow) 22%, #ffffff);
  --module-line: #e5e5e5;
  --module-ink: #0a0a0a;
  --module-muted: #5f5f5f;
  --module-teal: #1a3a3a;
  --module-pink: #ff4d8b;
  --module-pink-deep: #9f1748;
  --module-mint: #a4d4c5;
  --module-lavender: #b8a4ed;
  --module-yellow: #e8b94a;
  --module-radius: 16px;
  color-scheme: light;
}

.module-page {
  min-width: 0;
  margin: 0;
  background: var(--module-bg) !important;
  color: var(--module-ink) !important;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.module-page main,
.module-tools-section {
  padding: 0;
  background: var(--module-bg) !important;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 1000000;
  min-height: 44px;
  transform: translateY(-140%);
  border: 1px solid var(--module-line);
  border-radius: 12px;
  background: var(--module-ink);
  color: #ffffff !important;
  font-weight: 900;
  padding: 10px 12px;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.module-shell {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding-inline: 24px;
  max-width: 100%;
}

.module-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 250, 240, 0.94) !important;
  border-bottom: 1px solid rgba(229, 229, 229, 0.9) !important;
  backdrop-filter: blur(14px);
}

.module-header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.module-brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--module-ink);
  text-decoration: none;
}

.module-brand:hover {
  text-decoration: none;
}

.module-brand img {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 16px;
  background: var(--module-panel);
  object-fit: contain;
}

.module-brand-text {
  min-width: 0;
  display: grid;
}

.module-brand-text strong {
  color: var(--module-ink);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
}

.module-brand-text small {
  color: var(--module-muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.module-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px !important;
}

.module-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 13px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--module-teal);
  font-size: 1rem;
  font-weight: 800;
  text-decoration: none;
}

.module-nav a:hover,
.module-nav .module-home-link {
  border-color: var(--module-line);
  background: var(--module-panel-raised);
  color: var(--module-teal);
  text-decoration: none;
}

.module-page :focus-visible {
  outline: 3px solid rgba(26, 58, 58, 0.32) !important;
  outline-offset: 3px;
}

.module-hero {
  padding: 48px 0 60px;
  border-bottom: 1px solid var(--module-line);
  background: linear-gradient(120deg, color-mix(in srgb, var(--module-mint) 24%, transparent), color-mix(in srgb, var(--module-yellow) 30%, transparent) 58%, color-mix(in srgb, var(--module-lavender) 14%, transparent)), var(--module-bg);
}

.module-back {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 36px;
  color: var(--module-teal);
  font-size: 1rem;
  font-weight: 850;
  text-decoration: none;
}

.module-back:hover {
  color: var(--module-pink-deep);
  text-decoration: none;
}

.module-back span {
  font-size: 2rem;
  font-weight: 500;
  line-height: 1;
}

.module-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  align-items: end;
  gap: 56px;
}

.module-title-block {
  min-width: 0;
}

.module-kicker,
.module-section-kicker,
.module-tool-type {
  margin: 0 0 10px;
  color: var(--module-pink-deep);
  font-size: 0.88rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.module-page .module-title {
  margin: 0;
  color: var(--module-ink) !important;
  font-size: clamp(2.3rem, 7vw, 4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
}

.module-topic {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--module-ink);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.12;
}

.module-summary {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--module-muted);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.6;
}

.module-schedule {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--module-teal);
  border-radius: var(--module-radius);
  background: var(--module-teal);
  color: #ffffff;
}

.module-schedule-label {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.module-status {
  display: block;
  margin-top: 10px;
  color: #ffffff;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.12;
}

.module-date {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1rem;
  font-weight: 800;
}

.module-tools-section {
  padding: 64px 0 80px;
}

.module-tools-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.module-tools-heading h2 {
  margin: 0;
  color: var(--module-ink) !important;
  font-size: 2rem;
  line-height: 1.12;
}

.module-tools-heading p:last-child {
  max-width: 460px;
  margin: 0;
  color: var(--module-muted);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.6;
  text-align: right;
}

.module-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.module-tool {
  --tool-accent: var(--module-teal);
  min-width: 0;
  min-height: 184px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 24px;
  align-items: start;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--module-line);
  border-radius: var(--module-radius);
  background: var(--module-panel);
  color: var(--module-ink);
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.module-tool,
.module-tool *,
.module-tool:hover,
.module-tool:focus-visible,
.module-tool:hover *,
.module-tool:focus-visible * {
  text-decoration: none !important;
  text-decoration-line: none !important;
}

.module-tool:hover,
.module-tool:focus-visible {
  border-color: var(--tool-accent);
  background: var(--module-surface);
  text-decoration: none;
  transform: translateY(-1px);
}

.module-tool-primary {
  --tool-accent: var(--module-pink-deep);
  grid-column: 1 / -1;
  min-height: 156px;
  background: var(--module-current);
  border-color: rgba(159, 23, 72, 0.34);
  color: var(--module-ink);
}

.module-tool-primary:hover,
.module-tool-primary:focus-visible {
  background: #ffffff;
  border-color: var(--module-pink-deep);
}

.module-tool-primary .module-tool-type,
.module-tool-primary .module-tool-arrow {
  color: var(--module-pink-deep) !important;
}

.module-page .module-tool-primary h2 {
  color: var(--module-ink) !important;
}

.module-tool-primary p {
  color: var(--module-muted) !important;
}

.module-tool-primary .module-tool-mark {
  border-color: var(--module-pink-deep);
  background: var(--module-pink-deep);
  color: #ffffff !important;
}

.tool-quiz,
.tool-ecg {
  --tool-accent: var(--module-lavender);
}

.tool-materials {
  --tool-accent: var(--module-yellow);
}

.tool-review {
  --tool-accent: var(--module-teal);
}

.module-tool-mark {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--tool-accent);
  border-radius: 12px;
  color: var(--tool-accent);
  font-size: 0.76rem;
  font-weight: 950;
}

.module-tool-copy {
  min-width: 0;
  display: grid;
  align-content: start;
}

.module-tool-type {
  margin-bottom: 7px;
  color: var(--tool-accent);
}

.module-page .module-tool h2 {
  margin: 0;
  color: var(--module-ink) !important;
  font-size: 1rem;
  line-height: 1.35;
}

.module-tool p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--module-muted);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.6;
}

.module-tool-arrow {
  align-self: center;
  justify-self: end;
  color: var(--tool-accent);
  font-size: 2rem;
  font-weight: 500;
  line-height: 1;
}

.module-footer {
  padding: 26px 0;
  border-top: 1px solid var(--module-line);
  background: var(--module-surface);
}

.module-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.module-footer p {
  margin: 0;
  color: var(--module-muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.module-footer-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 18px;
}

.module-footer a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  color: var(--module-teal);
  font-size: 1rem;
  font-weight: 850;
  text-decoration: none;
}

.module-footer a:hover {
  color: var(--module-pink-deep);
  text-decoration: none;
}

@media (max-width: 820px) {
  .module-shell {
    padding-inline: 18px;
  }

  .module-hero-grid {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 32px;
  }

  .module-schedule {
    width: min(100%, 520px);
  }

  .module-tools-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .module-tools-heading p:last-child {
    text-align: left;
  }
}

@media (max-width: 680px) {
  .module-shell {
    padding-inline: 16px;
  }

  .module-header-inner {
    min-height: 68px;
  }

  .module-brand img {
    width: 42px;
    height: 42px;
  }

  .module-brand-text small {
    display: none;
  }

  .module-page .module-nav {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center !important;
    justify-content: flex-end;
  }

  .module-hero {
    padding: 32px 0 44px;
  }

  .module-back {
    margin-bottom: 26px;
  }

  .module-topic {
    font-size: 1rem;
    line-height: 1.35;
  }

  .module-tools-section {
    padding: 48px 0 56px;
  }

  .module-tool-grid {
    grid-template-columns: 1fr;
  }

  .module-tool,
  .module-tool-primary {
    grid-column: auto;
    min-height: 156px;
    padding: 20px;
  }

  .module-footer-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .module-footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 390px) {
  .module-tool {
    grid-template-columns: 46px minmax(0, 1fr) 18px;
    gap: 12px;
    padding: 18px;
  }

  .module-tool-mark {
    width: 44px;
    height: 44px;
  }
}

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

  .module-tool:hover,
  .module-tool:focus-visible {
    transform: none;
  }
}

/* Study Launchpad redesign for module workspaces. */
:root {
  --module-bg: #f4f7fb;
  --module-panel: #ffffff;
  --module-panel-raised: #eaf0fb;
  --module-surface: #eaf0fb;
  --module-current: #c6f432;
  --module-line: #d7deea;
  --module-ink: #111827;
  --module-muted: #5b6575;
  --module-teal: #2457f5;
  --module-pink: #ff5a3d;
  --module-pink-deep: #c53030;
  --module-mint: #dcfce7;
  --module-lavender: #ecebff;
  --module-yellow: #c6f432;
  --module-radius: 16px;
}

.module-page {
  background: var(--module-bg) !important;
  color: var(--module-ink) !important;
  font-family: Aptos, "Segoe UI", Arial, system-ui, sans-serif;
}

.module-header {
  background: rgba(244, 247, 251, 0.9) !important;
  border-bottom-color: var(--module-line) !important;
  backdrop-filter: blur(18px);
}

.module-brand img {
  border-radius: var(--module-radius);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.09);
}

.module-brand-text strong,
.module-page .module-title,
.module-topic,
.module-tools-heading h2,
.module-tool h2,
.module-status {
  color: var(--module-ink) !important;
  font-family: "Aptos Display", Aptos, "Segoe UI", Arial, system-ui, sans-serif;
  font-weight: 850;
}

.module-brand-text small,
.module-summary,
.module-tools-heading p:last-child,
.module-tool p,
.module-footer {
  color: var(--module-muted);
}

.module-nav a,
.module-back {
  border-radius: 12px;
  color: #1236a3;
}

.module-nav a:hover,
.module-nav .module-home-link,
.module-back:hover {
  background: #ffffff;
  border-color: var(--module-line);
  color: #1236a3;
}

.module-hero {
  padding: 38px 0 46px;
  border-bottom: 0;
  background: transparent;
}

.module-hero-grid {
  align-items: stretch;
  gap: 18px;
}

.module-title-block,
.module-schedule {
  border: 1px solid var(--module-line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 18px 46px rgba(17, 24, 39, 0.11);
}

.module-title-block {
  padding: 32px;
}

.module-kicker,
.module-section-kicker,
.module-tool-type {
  display: none;
}

.module-page .module-title {
  font-size: 5.2rem;
  line-height: 0.94;
}

.module-topic {
  max-width: 780px;
  color: #1236a3 !important;
  font-size: 2.5rem;
  line-height: 1.03;
}

.module-schedule {
  display: grid;
  align-content: end;
  padding: 26px;
  background: var(--module-teal);
  color: #ffffff;
}

.module-schedule-label,
.module-date {
  color: rgba(255, 255, 255, 0.8);
}

.module-schedule-label {
  font-size: 0.9rem;
}

.module-status {
  color: var(--module-current) !important;
  font-size: 2.45rem;
}

.module-tools-section {
  padding: 28px 0 78px;
  background: transparent !important;
}

.module-tools-heading {
  align-items: center;
  padding: 22px 24px;
  border: 1px solid var(--module-line);
  border-radius: 20px;
  background: #ffffff;
}

.module-tool-grid {
  gap: 14px;
  margin-top: 14px;
}

.module-tool {
  min-height: 192px;
  border-color: var(--module-line);
  border-radius: var(--module-radius);
  background: #ffffff;
  box-shadow: none;
}

.module-tool-primary {
  background: linear-gradient(135deg, #ffffff 0 70%, rgba(198, 244, 50, 0.46));
  border-color: rgba(36, 87, 245, 0.45);
}

.module-tool:hover,
.module-tool:focus-visible {
  border-color: rgba(36, 87, 245, 0.5);
  box-shadow: 0 14px 32px rgba(17, 24, 39, 0.1);
}

.module-tool-mark {
  border-radius: 16px;
  background: var(--module-panel-raised);
  color: #1236a3;
  font-size: 0.95rem;
  font-weight: 900;
}

.module-tool-primary .module-tool-mark {
  background: var(--module-ink);
  color: #ffffff;
}

.module-tool-arrow {
  color: var(--module-teal);
}

.module-footer {
  background: #ffffff;
  border-top-color: var(--module-line);
}

.module-page :focus-visible {
  outline: 3px solid rgba(36, 87, 245, 0.35) !important;
}

@media (max-width: 920px) {
  .module-page .module-title {
    font-size: 4rem;
  }

  .module-topic {
    font-size: 2rem;
  }
}

@media (max-width: 680px) {
  .module-header-inner {
    gap: 12px;
  }

  .module-nav a {
    min-height: 44px;
    padding-inline: 12px;
  }

  .module-title-block,
  .module-schedule,
  .module-tools-heading,
  .module-tool {
    border-radius: 16px;
  }

  .module-title-block {
    padding: 22px;
  }

  .module-page .module-title {
    font-size: 3rem;
  }

  .module-topic {
    font-size: 1.45rem;
  }

  .module-status {
    font-size: 2rem;
  }

  .module-summary,
  .module-tool p,
  .module-footer {
    font-size: 1rem;
  }

  .module-footer a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

.module-brand,
.module-footer a {
  min-height: 44px;
}

/* Typeset pass: stabilize small roles across module workspaces. */
.module-brand-text small,
.module-schedule-label,
.module-date,
.module-footer p,
.module-footer a,
.module-tool-type,
.module-tool-mark {
  font-size: 0.95rem;
}

.module-summary,
.module-tool p,
.module-tools-heading p:last-child {
  line-height: 1.62;
}

.module-page .module-title {
  max-width: 10ch;
}

.module-topic {
  max-width: 28ch;
}

@media (max-width: 680px) {
  .module-page .module-title {
    max-width: 8ch;
  }

  .module-summary,
  .module-tool p,
  .module-tools-heading p:last-child {
    font-size: 1rem;
    line-height: 1.58;
  }
}

/* Harden pass: long imported titles, source names, or labels must wrap. */
.module-brand,
.module-brand-text,
.module-title-block,
.module-page .module-title,
.module-topic,
.module-summary,
.module-schedule,
.module-status,
.module-date,
.module-tools-heading,
.module-tool,
.module-tool h2,
.module-tool p,
.module-footer {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Polish pass: keep module action cards dense enough for repeated study use. */
.module-tool {
  border-radius: var(--module-radius);
}

.module-tool p {
  margin-top: 8px;
}

@media (max-width: 680px) {
  .module-tools-section {
    padding-bottom: 64px;
  }

  .module-tools-heading {
    padding: 20px;
  }

  .module-tool,
  .module-tool-primary {
    min-height: 136px;
    padding: 18px;
  }
}

@media (max-width: 390px) {
  .module-tool,
  .module-tool-primary {
    min-height: 128px;
  }
}

/* Unified study chrome: keep the product header consistent across page families. */
.module-header .module-shell {
  width: min(1180px, calc(100% - 40px));
  padding-inline: 0;
}

.module-header-inner {
  min-height: 72px;
  gap: 20px;
}

.module-brand {
  gap: 12px;
}

.module-brand img {
  width: 44px;
  height: 44px;
}

.module-brand-text {
  gap: 2px;
}

.module-brand-text strong {
  line-height: 1.1;
  white-space: nowrap;
}

.module-brand-text small {
  font-size: 0.88rem;
  font-weight: 700;
}

.module-nav {
  gap: 8px !important;
}

.module-nav a {
  min-height: 44px;
  padding: 0 14px;
  color: #1535a7;
  font-weight: 800;
}

.module-nav a:hover,
.module-nav a:focus-visible,
.module-nav .module-home-link,
.module-nav a[aria-current="page"] {
  background: #ffffff;
  border-color: var(--module-line);
  color: #1535a7;
}

@media (max-width: 680px) {
  .module-header .module-shell {
    width: min(100% - 28px, 1180px);
  }

  .module-header-inner {
    flex-wrap: wrap;
    min-height: 64px;
    gap: 8px;
    padding: 10px 0 12px;
  }

  .module-brand,
  .module-page .module-nav {
    width: 100%;
  }

  .module-brand-text small {
    display: none;
  }

  .module-page .module-nav {
    justify-content: flex-start;
  }

  .module-nav a {
    flex: 1 1 0;
    padding: 0 8px;
  }

}

/* Keep every header destination available on phones and narrow tablets. */
@media (max-width: 960px) {
  .module-header {
    position: static;
  }

  .module-header .module-header-inner {
    display: flex !important;
    flex-wrap: wrap;
    min-height: 0;
    gap: 8px;
    padding-block: 10px 12px;
  }

  .module-header .module-brand {
    width: 100%;
    min-width: 0;
  }

  .module-header .module-nav {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr)) !important;
    align-items: stretch !important;
    width: 100%;
    min-width: 0;
    gap: 8px;
  }

  .module-header .module-nav a {
    min-width: 0;
    min-height: 44px;
    padding: 8px;
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
  }

  .module-header .module-brand strong {
    white-space: normal;
  }
}
