:root {
  --page-bg: #f8f8fb;
  --card-bg: #ffffff;
  --card-border: #e8e5ef;
  --heading: #556888;
  --body: #4f5566;
  --title: #222739;
  --tag-bg: #785e7f;
  --tag-text: #ffffff;
  --shadow: 0 12px 28px rgba(55, 35, 67, 0.06);
  --radius-lg: 18px;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Lato", "Segoe UI", sans-serif;
  color: var(--body);
  background: var(--page-bg);
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2 {
  margin: 0;
}

ul {
  margin: 0;
  padding-left: 1.15rem;
}

li {
  line-height: 1.55;
}

.page-shell {
  width: min(1240px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 4.75rem 0 3rem;
}

.course-portal {
  display: grid;
  gap: 1.1rem;
}

.home-button {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 2000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.7rem 1rem;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(55, 35, 67, 0.08);
  font-family: "Montserrat", "Lato", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--heading);
}

.home-button:hover {
  background: #ffffff;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.title-logo {
  width: 122px;
  height: auto;
  flex: 0 0 auto;
}

.title-bar {
  width: 56px;
  height: 7px;
  border-radius: 999px;
  background: #7d6485;
}

.title-row h1 {
  font-family: "Montserrat", "Lato", sans-serif;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--heading);
}

.welcome-panel {
  display: grid;
  gap: 0.35rem;
  max-width: 920px;
  padding: 0.2rem 0 0.15rem;
}

.welcome-tag {
  margin: 0;
  font-family: "Montserrat", "Lato", sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7d6485;
}

.welcome-copy {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.6;
  color: #5c6375;
}

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

.module-card {
  display: grid;
  gap: 0.7rem;
  min-height: 182px;
  padding: 1rem 1.15rem 1.1rem;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfd 100%);
  box-shadow: var(--shadow);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.module-card:hover {
  transform: translateY(-1px);
  border-color: #d6d1e0;
  box-shadow: 0 16px 30px rgba(55, 35, 67, 0.08);
}

.module-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 28px;
  padding: 0.35rem 0.8rem;
  border-radius: 8px;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-family: "Montserrat", "Lato", sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.module-card h2 {
  font-size: 2rem;
  line-height: 1.05;
  color: var(--title);
}

.module-intro {
  margin: 0;
  font-size: 1.02rem;
  font-style: italic;
  font-weight: 700;
  color: #596073;
}

.module-card ul {
  color: #5c6375;
  font-size: 1rem;
}

@media (max-width: 860px) {
  .module-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .page-shell {
    width: min(100% - 1rem, 1240px);
    padding-top: 4.5rem;
  }

  .module-card {
    min-height: auto;
    padding: 0.95rem 1rem 1rem;
  }

  .module-card h2 {
    font-size: 1.7rem;
  }

  .module-card ul {
    font-size: 0.97rem;
  }
}
