  :root {
    --bg: #f6f8f3;
    --card: #ffffff;
    --border: #e3e8dc;
    --text: #1d2318;
    --muted: #6f7a63;
    --accent: #4a7a2c;
    --accent-dark: #38591f;
    --accent-soft: #ecf4e2;
    --green: #1a7f4e;
    --green-soft: #ecf7f1;
    --blue: #2f6fb3;
    --blue-soft: #edf4fb;
    --orange: #b35a1f;
    --orange-soft: #fbf1e7;
    --red: #c23b3b;
    --red-soft: #fdecec;
    --code-bg: #f3f5ee;
    --kbd-bg: #ffffff;
    --img-border: #9db4d0;
  }

  html[data-theme="dark"] {
    --bg: #101208;
    --card: #181d12;
    --border: #2a3220;
    --text: #eef2e6;
    --muted: #9aa58a;
    --accent: #9ccf6a;
    --accent-dark: #c3e69a;
    --accent-soft: rgba(156, 207, 106, .12);
    --green: #4fc48a;
    --green-soft: rgba(79, 196, 138, .1);
    --blue: #6aa7e0;
    --blue-soft: rgba(106, 167, 224, .1);
    --orange: #e0894a;
    --orange-soft: rgba(224, 137, 74, .1);
    --red: #e07070;
    --red-soft: rgba(224, 112, 112, .1);
    --code-bg: #1f2516;
    --kbd-bg: #232a19;
    --img-border: #46608a;
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }

  body {
    font-family: "Saira", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    font-size: 17.5px;
    transition: background .2s, color .2s;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }

  header.hero {
    background:
      radial-gradient(ellipse 90% 130% at 50% 130%, rgba(156, 207, 106, .38) 0%, rgba(156, 207, 106, .10) 48%, transparent 78%),
      linear-gradient(150deg, #131a0e 0%, #1c2712 40%, #2a3a1a 78%, #374d22 100%);
    color: #fff;
    padding: 8px 20px 26px;
    text-align: center;
    border-bottom: 3px solid var(--accent);
    position: relative;
    overflow: hidden;
  }
  header.hero::before {
    content: "";
    position: absolute; inset: 0;
    background:
      radial-gradient(circle at 12% 15%, rgba(156, 207, 106, .14) 0%, transparent 38%),
      radial-gradient(circle at 88% 8%, rgba(156, 207, 106, .10) 0%, transparent 42%);
    pointer-events: none;
  }
  header.hero::after {
    content: "";
    position: absolute; inset: 0;
    background-image:
      linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse 65% 70% at 50% 40%, black 0%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 65% 70% at 50% 40%, black 0%, transparent 100%);
    pointer-events: none;
  }
  header.hero > * { position: relative; z-index: 1; }
  .hero-badge {
    display: inline-block;
    background: rgba(163,193,69,.2);
    border: 1px solid rgba(163,193,69,.45);
    color: #fff;
    padding: 2px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 12px;
  }
  header.hero h1 {
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -.02em;
  }
  header.hero p {
    color: rgba(255,255,255,.85);
    max-width: 680px;
    margin: 8px auto 0;
    font-size: .95rem;
  }

  .container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 40px 24px 60px;
    width: 100%;
    flex: 1;
  }

  .courses {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }

  .course { position: relative; }
  .rs-corner {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    cursor: pointer;
    background: var(--bg);
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    transition: all .15s;
  }
  .rs-corner:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
  .course {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 22px;
    text-decoration: none;
    color: var(--text);
    transition: border-color .15s, transform .15s, box-shadow .15s;
  }
  .course.highlighted {
    border: 3px solid var(--accent);
    animation: highlightPulse 1.6s ease-in-out infinite;
  }
  @keyframes highlightPulse {
    0%, 100% {
      box-shadow: 0 0 0 5px var(--accent-soft), 0 0 16px rgba(163, 193, 69, .35);
      transform: scale(1);
    }
    50% {
      box-shadow: 0 0 0 14px var(--accent-soft), 0 0 40px rgba(163, 193, 69, .7);
      transform: scale(1.015);
    }
  }
  .course .current-pill {
    position: absolute;
    top: -12px;
    left: 14px;
    background: var(--accent);
    color: #fff;
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .08em;
    padding: 4px 14px;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(163, 193, 69, .5);
  }
  .course:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,.06);
  }
  .course-num {
    color: var(--accent);
    font-weight: 700;
    font-size: .8rem;
    letter-spacing: .08em;
    margin-bottom: 8px;
  }
  .course h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 6px;
  }
  .course p {
    color: var(--muted);
    font-size: .95rem;
    flex: 1;
  }
  .course-cta {
    margin-top: 18px;
    color: var(--accent);
    font-weight: 600;
    font-size: .95rem;
  }
  .course.disabled {
    border-style: dashed;
    cursor: default;
    background: transparent;
  }
  .course.disabled:hover { transform: none; box-shadow: none; border-color: var(--border); }
  .course.disabled .course-num { color: var(--muted); }
  .course.disabled .course-cta { color: var(--muted); font-weight: 500; }

  .soon-pill {
    display: inline-block;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: .75rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 999px;
    margin-left: 8px;
    vertical-align: middle;
  }

  
  .msensis-footer {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    opacity: .85;
  }
  .msensis-footer img { height: 26px; width: auto; opacity: .9; }
  .msensis-footer span { color: var(--muted); font-size: .82rem; }
footer {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    padding: 24px 20px;
    border-top: 1px solid var(--border);
  }

  .quiz-heading {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 44px 0 16px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
  }
  .quiz-grid { grid-template-columns: repeat(3, 1fr); }
  .quiz-grid .course p strong { color: var(--accent); }
  .join-grid { grid-template-columns: 1fr; }
  .guides-grid { grid-template-columns: repeat(2, 1fr); }

  .active-section {
    display: none;
    margin-bottom: 40px;
  }
  .active-section.show { display: block; }
  .active-link {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: .95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .15s;
  }
  .active-link:hover { border-color: var(--accent); background: var(--card); }
  .active-link .dot {
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--accent);
    animation: activeDotPulse 1.4s ease-in-out infinite;
  }
  .current-pill.subtle {
    top: -10px;
    left: -10px;
    width: 24px; height: 24px;
    padding: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: .8rem;
    font-weight: 700;
    border-radius: 50%;
    box-shadow: 0 1px 5px rgba(163, 193, 69, .45);
  }
  @keyframes activeDotPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(163, 193, 69, .5); }
    50% { box-shadow: 0 0 0 6px rgba(163, 193, 69, .15); }
  }

  .topline {
    display: flex; align-items: center; gap: 12px;
    padding: 8px 2px;
    background: transparent;
  }
  .topline .brand {
    display: flex; align-items: center; gap: 8px;
    text-decoration: none;
  }
  .topline .brand img { height: 18px; width: auto; opacity: 1; }
  .topline .brand .site-name {
    color: rgba(255,255,255,.55);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .05em;
  }
  .topline .spacer { flex: 1; }
  .topline .reset-btn {
    cursor: pointer;
    background: rgba(255,255,255,.06);
    color: rgba(255,255,255,.7);
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 999px;
    font-size: 11.5px;
    padding: 4px 12px;
    transition: all .15s;
  }
  .topline .reset-btn:hover { color: #ff8a8a; border-color: rgba(255,138,138,.6); background: rgba(255,138,138,.08); }
  .topline .theme-toggle {
    cursor: pointer;
    background: rgba(255,255,255,.06);
    color: rgba(255,255,255,.7);
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 999px;
    font-size: 11.5px;
    padding: 4px 12px;
    display: flex; align-items: center; gap: 6px;
    transition: all .15s;
  }
  .topline .theme-toggle:hover { color: #fff; border-color: rgba(255,255,255,.45); }

  header.hero {
    background:
      radial-gradient(ellipse 70% 120% at 50% 135%, rgba(196, 226, 91, .55) 0%, rgba(196, 226, 91, .14) 45%, transparent 75%),
      linear-gradient(160deg, #191e13 0%, #262c18 45%, #37421f 100%);
    color: #fff;
    padding: 0 20px 26px;
    text-align: center;
    border-bottom: 3px solid var(--accent);
    position: relative;
    overflow: hidden;
  }
  header.hero::before {
    content: "";
    position: absolute; inset: 0;
    background:
      radial-gradient(circle at 15% 20%, rgba(163, 193, 69, .10) 0%, transparent 40%),
      radial-gradient(circle at 85% 10%, rgba(163, 193, 69, .08) 0%, transparent 45%);
    pointer-events: none;
  }
  header.hero > * { position: relative; z-index: 1; }
  header.hero h1 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -.01em;
  }
  .hero-badge {
    display: inline-block;
    background: rgba(163,193,69,.16);
    border: 1px solid rgba(163,193,69,.4);
    color: #d9e8a8;
    padding: 2px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    margin-bottom: 10px;
  }

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