/* Math Medic applets home page */
*, *::before, *::after { box-sizing: border-box; }

button, input { font-family: inherit; }

html, body { height: auto; }

body {
  background: #E6E7E8;
  color: #414142;
  min-height: 100vh;
}

/* ── Header (same style as the applet pages) ── */
.top-bar { background: #414142; color: #fff; padding: 0 32px; display: flex; align-items: stretch; min-height: 72px; }
.top-bar-left { display: flex; align-items: center; gap: 14px; flex: 1; padding: 12px 0; min-width: 0; }
.plus-icon {
  height: 46px; width: 46px; border-radius: 50%; background: #fff; overflow: hidden;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.25);
}
.plus-icon img { width: 70%; height: 70%; object-fit: contain; }
.top-bar-titles h1 { font-size: 19px; font-weight: 700; color: #fff; margin: 0 0 2px; letter-spacing: -0.01em; }
.top-bar-titles p { font-size: 12px; color: #B2D8D2; margin: 0; font-weight: 500; letter-spacing: 0.02em; }
.top-bar-right { display: flex; align-items: center; padding-left: 24px; border-left: 1px solid rgba(255,255,255,0.12); margin-left: 16px; }
.mm-logo { height: 24px; object-fit: contain; }
@media (max-width: 600px) {
  .top-bar { padding: 0 16px; }
  .top-bar-right { padding-left: 12px; margin-left: 8px; }
  .mm-logo { height: 16px; }
  .top-bar-titles h1 { font-size: 16px; }
  .plus-icon { height: 38px; width: 38px; }
}

.accent-strip { height: 4px; background: linear-gradient(90deg, #3EBEB1 0%, #008E83 60%, #06766D 100%); }

.container { max-width: 1080px; margin: 0 auto; padding: 24px 20px 60px; }
@media (max-width: 600px) { .container { padding: 18px 16px 48px; } }

/* ── Course jump links ── */
.course-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.course-nav a {
  font-size: 13px; font-weight: 700; color: #06766D; text-decoration: none;
  background: #fff; border: 1.5px solid #cfe9e5; border-radius: 999px; padding: 5px 14px;
}
.course-nav a:hover { border-color: #3EBEB1; background: #f0faf9; }

/* ── Course sections ── */
.course { padding-top: 20px; }
.course-title {
  font-size: 22px; font-weight: 800; color: #414142; margin: 0 0 14px;
  padding-bottom: 8px; border-bottom: 3px solid #3EBEB1;
}

.unit-title {
  font-size: 15px; font-weight: 800; color: #06766D; margin: 22px 0 10px;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.course-title + .unit-title { margin-top: 4px; }

.applet-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px;
}
@media (max-width: 400px) { .applet-grid { grid-template-columns: minmax(0, 1fr); } }
.applet-grid li { display: flex; min-width: 0; }

.applet-card {
  display: flex; flex-direction: column; gap: 6px; width: 100%;
  background: #fff; border-radius: 10px; border-left: 5px solid #3EBEB1; padding: 14px 16px;
  color: #414142; text-decoration: none; box-shadow: 0 1px 3px rgba(0,0,0,0.07);
  transition: box-shadow 0.12s, transform 0.12s, border-color 0.12s;
}
.applet-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.12); transform: translateY(-1px); border-left-color: #008E83; }
.applet-card:focus-visible { outline: 3px solid #9fdcd5; outline-offset: 2px; }

.applet-label { font-size: 12px; font-weight: 700; color: #008E83; letter-spacing: 0.04em; text-transform: uppercase; }
.applet-title { font-size: 17px; font-weight: 800; line-height: 1.3; color: #414142; }
.applet-desc { font-size: 14px; line-height: 1.5; color: #5d5d5f; }
