:root {
  --navy: #0b1f4d;
  --navy-2: #143166;
  --blue: #166cff;
  --blue-2: #0d58d8;
  --yellow: #ffd84d;
  --green: #20b486;
  --orange: #ff8a3d;
  --red: #c53c54;
  --ink: #172033;
  --muted: #5c6880;
  --line: #dce5f4;
  --surface: #ffffff;
  --soft: #f4f8ff;
  --soft-2: #f8fbf6;
  --shadow: 0 18px 55px rgba(11, 31, 77, 0.12);
  --radius: 20px;
  --radius-sm: 14px;
  --focus: 0 0 0 4px rgba(255, 216, 77, 0.72);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, #f5f9ff 0, #ffffff 440px),
    #ffffff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

img,
svg {
  max-width: 100%;
}

img {
  display: block;
}

a {
  color: var(--blue-2);
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--navy);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
.button {
  min-height: 48px;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.skip-link {
  position: absolute;
  z-index: 30;
  left: 1rem;
  top: 1rem;
  transform: translateY(-160%);
  padding: 0.75rem 1rem;
  color: #ffffff;
  background: var(--navy);
  border-radius: 999px;
}

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

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(220, 229, 244, 0.86);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
}

.header-inner,
.section-inner {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  width: calc(100% - 16px);
  max-width: none;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--navy);
  text-decoration: none;
  font-weight: 800;
  min-width: 0;
}

.brand-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  object-fit: contain;
}

.brand-text {
  display: grid;
  line-height: 1.05;
}

.brand-name {
  font-size: 1.18rem;
}

.brand-tagline {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 16px;
  color: var(--navy);
  background: var(--soft);
  cursor: pointer;
}

.nav-toggle-lines,
.nav-toggle-lines::before,
.nav-toggle-lines::after {
  display: block;
  width: 24px;
  height: 3px;
  border-radius: 99px;
  background: currentColor;
  content: "";
}

.nav-toggle-lines {
  position: relative;
}

.nav-toggle-lines::before {
  position: absolute;
  top: -8px;
}

.nav-toggle-lines::after {
  position: absolute;
  top: 8px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 1rem;
  border-radius: 999px;
  color: var(--navy);
  text-decoration: none;
  font-weight: 800;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: var(--soft);
  color: var(--blue-2);
}

.main {
  min-height: calc(100vh - 320px);
}

.hero {
  position: relative;
  display: flex;
  min-height: min(76vh, 690px);
  align-items: center;
  overflow: hidden;
  padding: 82px 0 76px;
  background:
    linear-gradient(90deg, rgba(245, 249, 255, 0.99) 0%, rgba(245, 249, 255, 0.96) 45%, rgba(245, 249, 255, 0.78) 68%, rgba(245, 249, 255, 0.58) 100%),
    url("../../courses/reading_clocks_course/course_assets/m01.png") right center / cover no-repeat;
}

.hero::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 12px;
  background: linear-gradient(90deg, var(--blue), var(--yellow), var(--green), var(--orange));
  content: "";
}

.hero-content {
  width: min(780px, 100%);
}

.eyebrow {
  margin: 0 0 0.9rem;
  color: var(--blue-2);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--navy);
  line-height: 1.08;
  letter-spacing: 0;
}

h1 {
  max-width: 820px;
  font-size: clamp(2.6rem, 7vw, 5.65rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

h3 {
  font-size: 1.28rem;
}

.lead {
  max-width: 720px;
  margin: 1.15rem 0 0;
  color: var(--muted);
  font-size: clamp(1.12rem, 2vw, 1.36rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1.65rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.82rem 1.1rem;
  border: 2px solid transparent;
  border-radius: 16px;
  background: var(--blue);
  color: #ffffff;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.button:hover {
  color: #ffffff;
  background: var(--blue-2);
  transform: translateY(-1px);
}

.button.secondary {
  color: var(--navy);
  background: #ffffff;
  border-color: var(--line);
}

.button.secondary:hover {
  color: var(--navy);
  background: var(--soft);
}

.button.ghost {
  color: var(--blue-2);
  background: transparent;
  border-color: rgba(22, 108, 255, 0.25);
}

.button.warning {
  color: #ffffff;
  background: var(--red);
}

.button.small {
  min-height: 42px;
  padding: 0.55rem 0.78rem;
  border-radius: 13px;
  font-size: 0.92rem;
}

.section {
  padding: 54px 0;
}

.section.alt {
  background: var(--soft);
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.section-header p {
  max-width: 640px;
  margin: 0.55rem 0 0;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 1rem;
}

.subject-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.course-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(11, 31, 77, 0.06);
}

.subject-card {
  min-height: 100%;
  padding: 1rem;
}

.subject-card {
  display: grid;
  gap: 0.75rem;
  color: var(--ink);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.subject-card:hover {
  color: var(--ink);
  transform: translateY(-2px);
  border-color: rgba(22, 108, 255, 0.42);
  box-shadow: 0 16px 36px rgba(11, 31, 77, 0.1);
}

.subject-icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  color: var(--navy);
  background: var(--subject-soft, #eef5ff);
}

.subject-icon svg {
  width: 30px;
  height: 30px;
}

.subject-card h3,
.course-card h3 {
  font-size: 1.08rem;
}

.subject-card p,
.course-card p,
.notice p {
  margin: 0.45rem 0 0;
  color: var(--muted);
}

.count-pill,
.tag,
.status-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 32px;
  padding: 0.25rem 0.62rem;
  border-radius: 999px;
  color: var(--navy);
  background: var(--soft);
  font-size: 0.83rem;
  font-weight: 900;
}

.tag {
  background: #fff8dc;
}

.status-pill {
  background: #eef9f5;
}

.course-card {
  display: flex;
  min-height: 100%;
  overflow: hidden;
  flex-direction: column;
}

.course-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--soft);
}

.course-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-thumb-fallback {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: var(--navy);
  background:
    linear-gradient(135deg, rgba(22, 108, 255, 0.18), rgba(255, 216, 77, 0.28)),
    #ffffff;
}

.course-thumb-fallback .subject-icon {
  width: 76px;
  height: 76px;
  background: rgba(255, 255, 255, 0.78);
}

.course-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1rem;
}

.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.course-body .button {
  width: 100%;
  margin-top: auto;
}

.toolbar {
  display: grid;
  grid-template-columns: 1.2fr 0.75fr 0.75fr auto;
  gap: 0.85rem;
  align-items: end;
  padding: 1rem;
  margin-bottom: 1rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field label,
.label {
  color: var(--navy);
  font-weight: 900;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.7rem 0.8rem;
  background: #ffffff;
  color: var(--ink);
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.empty-state,
.notice {
  padding: 1.25rem;
  border: 1px dashed rgba(22, 108, 255, 0.35);
  border-radius: var(--radius);
  background: #ffffff;
}

.hidden {
  display: none !important;
}

.page-hero {
  padding: 52px 0 30px;
}

.page-hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
}

.page-hero .lead {
  max-width: 760px;
}

.launch-shell {
  width: calc(100% - 16px);
  max-width: none;
  margin: 0 auto 24px;
}

.launch-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  margin: 0.65rem 0 0.75rem;
}

.launch-actions {
  display: grid;
  gap: 0.45rem;
}

.launch-actions .button {
  justify-self: start;
}

.lesson-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 320px);
  gap: 0.75rem;
  align-items: start;
}

.iframe-card {
  min-height: 74vh;
  padding: 0;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: #ffffff;
  line-height: 0;
}

.course-frame {
  display: block;
  width: 100%;
  height: calc(100vh - 220px);
  min-height: 620px;
  border: 0;
  background: #ffffff;
}

.iframe-card:fullscreen,
.iframe-card:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  padding: 0 !important;
  margin: 0 !important;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}

.iframe-card:fullscreen .course-frame,
.iframe-card:-webkit-full-screen .course-frame {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  max-height: none;
}

.lesson-tools {
  position: sticky;
  top: 96px;
  padding: 1rem;
}

.tool-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  list-style: none;
  cursor: pointer;
}

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

.tool-summary h2 {
  font-size: 1.25rem;
}

.tool-body {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.helper {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.fast-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

.progress-box {
  display: grid;
  gap: 0.5rem;
  padding: 0.85rem;
  border-radius: 14px;
  background: var(--soft);
}

.records-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1rem;
  align-items: start;
}

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

.summary-card {
  padding: 1rem;
}

.summary-list {
  display: grid;
  gap: 0.5rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.summary-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}

.records-actions {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 0.65rem;
  padding: 1rem;
}

.notes-list {
  display: grid;
  gap: 0.75rem;
}

.tracker-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.tracker-card {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
}

.tracker-card progress {
  width: 100%;
  height: 16px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: var(--soft);
}

.tracker-card progress::-webkit-progress-bar {
  background: var(--soft);
}

.tracker-card progress::-webkit-progress-value {
  background: var(--blue);
}

.tracker-card progress::-moz-progress-bar {
  background: var(--blue);
}

.tracker-details {
  display: grid;
  gap: 0.25rem;
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.note-card {
  padding: 0.95rem;
}

.note-card p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  white-space: pre-wrap;
}

.modal-backdrop {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(11, 31, 77, 0.48);
}

.modal-panel {
  width: min(620px, 100%);
  padding: 1.25rem;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.modal-panel h2 {
  font-size: 1.5rem;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.text-page {
  max-width: 860px;
  padding: 0 0 70px;
}

.text-page h2 {
  margin-top: 2rem;
  font-size: 1.75rem;
}

.text-page p,
.text-page li {
  color: var(--muted);
}

.site-footer {
  margin-top: 42px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.footer-inner {
  display: grid;
  width: calc(100% - 16px);
  max-width: none;
  margin: 0 auto;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 28px 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--muted);
  font-weight: 800;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--blue-2);
}

@media (max-width: 1100px) {
  .course-grid,
  .subject-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .lesson-tools {
    position: static;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    left: 8px;
    right: 8px;
    top: calc(100% + 8px);
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

  .site-header.nav-open .site-nav {
    display: flex;
  }

  .site-nav a {
    border-radius: 14px;
  }

  .hero {
    min-height: auto;
    padding-top: 50px;
    background-position: center bottom;
  }

  .subject-grid,
  .course-grid,
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toolbar {
    grid-template-columns: 1fr;
  }

  .records-layout {
    grid-template-columns: 1fr;
  }

  .records-actions {
    position: static;
  }

  .launch-header {
    grid-template-columns: 1fr;
  }

  .course-frame {
    height: 74vh;
    min-height: 540px;
  }
}

@media (max-width: 540px) {
  .section-inner {
    width: min(100% - 24px, var(--max));
  }

  .header-inner,
  .footer-inner {
    width: calc(100% - 16px);
  }

  .brand-tagline {
    display: none;
  }

  .brand-icon {
    width: 40px;
    height: 40px;
  }

  .actions,
  .section-header,
  .footer-inner {
    align-items: stretch;
    flex-direction: column;
  }

  .section-header,
  .footer-inner {
    display: grid;
  }

  .button {
    width: 100%;
  }

  .subject-grid,
  .course-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding-top: 36px;
  }

  .section {
    padding: 38px 0;
  }

  .course-frame {
    height: 70vh;
    min-height: 480px;
  }
}

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