:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-2: #e9eef8;
  --ink: #111827;
  --muted: #586374;
  --line: #d6deea;
  --blue: #2457f5;
  --blue-dark: #1535a7;
  --lime: #c6f432;
  --lime-soft: #f1ffc9;
  --aqua-soft: #e8fbff;
  --coral: #ff5a3d;
  --shadow: 0 18px 46px rgba(17, 24, 39, 0.12);
  --shadow-soft: 0 10px 24px rgba(17, 24, 39, 0.08);
  --radius: 16px;
  --radius-lg: 22px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.home-page {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Aptos, "Segoe UI", Arial, system-ui, sans-serif;
  line-height: 1.5;
}

body.home-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 12%, rgba(36, 87, 245, 0.12), transparent 28%),
    radial-gradient(circle at 86% 8%, color-mix(in srgb, var(--lime) 42%, transparent), transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(243, 246, 251, 0.8));
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

:focus-visible {
  outline: 3px solid rgba(36, 87, 245, 0.35);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 1000;
  transform: translateY(-140%);
  border-radius: 12px;
  background: var(--ink);
  color: #ffffff;
  font-weight: 800;
  padding: 10px 12px;
  text-decoration: none;
}

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

.home-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.home-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(243, 246, 251, 0.88);
  border-bottom: 1px solid rgba(214, 222, 234, 0.9);
  backdrop-filter: blur(16px);
}

.header-inner,
.home-brand,
.home-nav,
.hero-identity,
.focus-topline,
.focus-actions,
.module-meta,
.footer-inner,
.footer-links {
  display: flex;
  align-items: center;
}

.header-inner {
  justify-content: space-between;
  min-height: 72px;
  gap: 20px;
}

.home-brand {
  min-width: 0;
  gap: 12px;
  text-decoration: none;
}

.home-brand img,
.hero-identity img {
  flex: 0 0 auto;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

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

.brand-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand-text strong {
  color: var(--ink);
  font-weight: 850;
  line-height: 1.1;
  white-space: nowrap;
}

.brand-text small,
.hero-summary,
.focus-copy,
.result-count,
.module-main span,
.module-date,
.home-footer {
  color: var(--muted);
}

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

.home-nav {
  justify-content: flex-end;
  gap: 8px;
}

.home-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--blue-dark);
  font-weight: 800;
  padding: 0 14px;
  text-decoration: none;
}

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

.nav-support {
  background: var(--ink);
  color: #ffffff !important;
}

.home-hero {
  padding: 34px 0 26px;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 500px);
  gap: 18px;
  align-items: stretch;
}

.hero-introduction,
.focus-card,
.course-map-header {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-introduction {
  min-width: 0;
  display: grid;
  align-content: space-between;
  min-height: 500px;
  padding: 34px;
}

.hero-identity {
  gap: 12px;
}

.hero-identity img {
  width: 62px;
  height: 62px;
}

.hero-identity span,
.hero-kicker,
.section-kicker,
.daily-quote-label {
  display: none;
}

.hero-introduction h1,
.focus-card h2,
.course-map h2,
.resource-strip h2 {
  margin: 0;
  color: var(--ink);
  font-family: "Aptos Display", Aptos, "Segoe UI", Arial, system-ui, sans-serif;
  font-weight: 850;
  letter-spacing: 0;
}

.hero-introduction h1 {
  max-width: 720px;
  margin-top: 30px;
  font-size: 4.35rem;
  line-height: 0.95;
}

.hero-summary {
  max-width: 650px;
  margin: 22px 0 0;
  font-size: 1.12rem;
  line-height: 1.55;
}

.daily-quote {
  max-width: 680px;
  margin: 34px 0 0;
  padding: 18px 20px;
  border: 1px solid rgba(36, 87, 245, 0.18);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.daily-quote blockquote {
  margin: 0;
  color: var(--blue-dark);
  font-weight: 800;
  line-height: 1.45;
}

.focus-card {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: space-between;
  padding: 28px;
  background: var(--blue);
  color: #ffffff;
}

.focus-card::before {
  content: "";
  position: absolute;
  right: -48px;
  bottom: -64px;
  width: 190px;
  height: 190px;
  border-radius: 999px;
  background: var(--lime);
  opacity: 0.22;
}

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

.focus-topline {
  justify-content: space-between;
  gap: 12px;
}

.focus-label,
.focus-countdown,
.module-state {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 900;
  line-height: 1;
  padding: 0 10px;
  white-space: nowrap;
}

.focus-label {
  background: rgba(17, 24, 39, 0.24);
  color: #ffffff;
}

.focus-countdown {
  background: #ffffff;
  color: var(--blue-dark);
}

.focus-module {
  width: fit-content;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  margin: 34px 0 8px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  padding: 0 10px;
  text-transform: uppercase;
}

.focus-card h2 {
  color: #ffffff;
  font-size: 3rem;
  line-height: 1;
}

.focus-date {
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 900;
}

.focus-copy {
  min-height: 4.6em;
  margin: 14px 0 26px;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.55;
}

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

.focus-actions a {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-weight: 900;
  padding: 0 14px;
  text-align: center;
  text-decoration: none;
}

.focus-actions .focus-primary {
  grid-column: 1 / -1;
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink);
}

.focus-actions .focus-secondary:last-child {
  grid-column: 1 / -1;
}

.course-map {
  padding: 18px 0 72px;
}

.course-map-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 22px;
  align-items: end;
  padding: 24px;
  box-shadow: var(--shadow-soft);
}

.course-map h2 {
  font-size: 2.55rem;
  line-height: 1;
}

.result-count {
  margin: 10px 0 0;
  font-weight: 800;
}

.module-tools {
  display: grid;
  gap: 12px;
}

.module-tools label {
  color: var(--blue-dark);
  font-size: 0.86rem;
  font-weight: 900;
}

.module-tools input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  padding: 0 14px;
}

.module-tools input::placeholder {
  color: var(--ink);
  opacity: 0.68;
}

.module-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.module-filter {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--blue-dark);
  cursor: pointer;
  font-weight: 900;
  padding: 0 10px;
}

.module-filter.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

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

.module-item {
  min-height: 112px;
  content-visibility: auto;
  contain-intrinsic-size: 112px;
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) auto 20px;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  padding: 18px;
  text-decoration: none;
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), border-color 160ms var(--ease);
}

.module-item:hover,
.module-item:focus-visible {
  border-color: rgba(36, 87, 245, 0.45);
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

.module-item[hidden] {
  display: none;
}

.module-item[data-state="current"] {
  border-color: rgba(36, 87, 245, 0.55);
  background: linear-gradient(135deg, #ffffff 0 68%, color-mix(in srgb, var(--lime) 48%, transparent));
}

.module-number {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: var(--surface-2);
  color: var(--blue-dark);
  font-size: 0.9rem;
  font-weight: 900;
}

.module-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.module-main strong {
  color: var(--ink);
  font-weight: 900;
}

.module-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.module-meta {
  justify-content: flex-end;
  gap: 10px;
}

.module-state {
  background: var(--surface-2);
  color: var(--muted);
}

.module-state.current {
  background: var(--lime);
  color: var(--ink);
}

.module-state.upcoming {
  background: var(--aqua-soft);
  color: #006b76;
}

.module-date {
  min-width: 92px;
  font-size: 0.88rem;
  font-weight: 800;
  text-align: right;
}

.module-arrow {
  color: var(--blue);
  font-size: 1.9rem;
  line-height: 1;
}

.empty-modules {
  margin: 16px 0 0;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--muted);
  font-weight: 800;
  padding: 18px;
  text-align: center;
}

.resource-strip {
  padding: 42px 0;
  background: var(--ink);
  color: #ffffff;
}

.resource-strip-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: 28px;
  align-items: center;
}

.resource-strip h2 {
  color: #ffffff;
  font-size: 2.2rem;
  line-height: 1.05;
}

.resource-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.resource-links a {
  min-height: 82px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-weight: 900;
  line-height: 1.25;
  padding: 16px;
  text-decoration: none;
}

.resource-links a:hover,
.resource-links a:focus-visible {
  background: var(--lime);
  color: var(--ink);
}

.resource-links span {
  display: block;
  width: fit-content;
  margin-top: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.75rem;
  padding: 5px 8px;
}

.home-footer {
  padding: 28px 0;
  background: #ffffff;
}

.footer-inner {
  justify-content: space-between;
  gap: 20px;
}

.footer-inner p {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 800;
}

.footer-links {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.footer-links a,
.footer-link {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border: 0;
  background: transparent;
  color: var(--blue-dark);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 900;
  padding: 0;
  text-decoration: none;
}

.disclaimer-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(17, 24, 39, 0.52);
}

.disclaimer-modal-backdrop.show {
  display: grid;
}

.disclaimer-modal {
  position: relative;
  width: min(520px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: 0 24px 72px rgba(17, 24, 39, 0.28);
  padding: 28px;
}

.disclaimer-close-button,
.disclaimer-accept-button {
  min-height: 42px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 900;
}

.disclaimer-close-button {
  position: absolute;
  right: 16px;
  top: 16px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--blue-dark);
  padding: 0 12px;
}

.disclaimer-modal-badge {
  display: none;
}

.disclaimer-modal h2 {
  margin: 22px 0 10px;
  font-size: 2rem;
}

.disclaimer-modal p {
  margin: 0;
  color: var(--muted);
}

.disclaimer-warning {
  margin-top: 18px;
  border: 1px solid rgba(255, 90, 61, 0.28);
  border-radius: var(--radius);
  background: #fff0ec;
  color: #9f2d1d;
  font-weight: 800;
  padding: 14px;
}

.disclaimer-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

.disclaimer-accept-button {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #ffffff;
  padding: 0 18px;
}

@media (max-width: 920px) {
  .hero-layout,
  .course-map-header,
  .module-list,
  .resource-strip-inner {
    grid-template-columns: 1fr;
  }

  .hero-introduction {
    min-height: 0;
  }

  .hero-introduction h1 {
    font-size: 3.4rem;
  }

  .focus-card h2 {
    font-size: 2.35rem;
  }
}

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

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

  .brand-text small {
    display: none;
  }

  .home-brand {
    width: 100%;
  }

  .home-nav {
    width: 100%;
    justify-content: flex-start;
  }

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

  .hero-introduction,
  .focus-card,
  .course-map-header {
    padding: 18px;
    border-radius: 16px;
  }

  .hero-introduction h1 {
    margin-top: 24px;
    font-size: 2.45rem;
  }

  .hero-summary {
    font-size: 1rem;
  }

  .hero-identity img {
    width: 54px;
    height: 54px;
  }

  .hero-identity {
    display: none;
  }

  .hero-introduction h1 {
    margin-top: 0;
  }

  .daily-quote {
    margin-top: 24px;
    padding: 16px 18px;
  }

  .focus-module {
    margin-top: 16px;
  }

  .focus-card h2 {
    font-size: 2rem;
    line-height: 1.02;
  }

  .focus-copy {
    min-height: 0;
    margin-bottom: 16px;
    line-height: 1.45;
  }

  .focus-date {
    margin-top: 12px;
  }

  .focus-actions {
    gap: 8px;
  }

  .focus-actions a {
    min-height: 46px;
  }

  .focus-actions,
  .module-filters,
  .resource-links {
    display: grid;
    grid-template-columns: 1fr;
  }

  .module-item {
    grid-template-columns: 56px minmax(0, 1fr) 18px;
    min-height: 126px;
  }

  .module-meta {
    grid-column: 2 / 3;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .module-date {
    min-width: 0;
    text-align: left;
  }
}

@media (max-width: 420px) {
  .hero-introduction h1 {
    font-size: 2.25rem;
  }

  .module-item {
    grid-template-columns: 1fr 18px;
  }

  .module-number,
  .module-main,
  .module-meta {
    grid-column: 1 / 2;
  }

  .module-arrow {
    grid-column: 2 / 3;
    grid-row: 1 / 4;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
  }
}

/* Typeset pass: make small UI roles readable without changing the visual world. */
.brand-text small,
.nav-support,
.daily-quote-label,
.focus-label,
.module-tools label,
.module-status-label,
.resource-tag,
.resource-links span,
.footer-inner p,
.footer-links a,
.footer-link,
.disclaimer-content p,
.disclaimer-content li {
  font-size: 0.94rem;
}

.module-status-label,
.resource-tag,
.daily-quote-label,
.focus-label {
  line-height: 1.2;
}

.hero-copy,
.focus-copy,
.resource-card p,
.module-item p {
  line-height: 1.6;
}

@media (max-width: 680px) {
  .module-tools label,
  .footer-inner p,
  .footer-links a,
  .footer-link {
    font-size: 0.95rem;
  }
}

/* Harden pass: prevent real-world long text from widening the viewport. */
.hero-introduction,
.hero-copy,
.daily-quote,
.focus-card,
.focus-card h2,
.focus-copy,
.module-item,
.module-main,
.module-main span,
.module-meta,
.module-state,
.module-date,
.resource-links,
.resource-links a,
.disclaimer-modal,
.disclaimer-content {
  min-width: 0;
  overflow-wrap: anywhere;
}

.module-main span {
  display: block;
  white-space: normal;
}

.focus-card::before {
  right: 0;
  transform: none;
}

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

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

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

  .home-header .home-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;
  }

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

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