:root {
  --bg: #0f1218;
  --bg-raised: #131720;
  --bg-elevated: #181d28;
  --text: #e2e0dc;
  --text-secondary: #7d8490;
  --text-tertiary: #555d6b;
  --border: #1e2530;
  --border-subtle: #171c26;
  --accent: #e2a84b;
  --accent-hover: #edc06a;
  --accent-muted: rgba(226,168,75,0.12);
  --card-bg: #151a24;
  --card-bg-hover: #1a2030;
  --cta-bg: #e2a84b;
  --cta-text: #0f1218;
  --term-bg: #12161e;
  --preview-bg: #111520;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.35);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.4);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { max-width: 100vw; overflow-x: hidden; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
  overflow-x: hidden;
}

.container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
}
/* Constrain reading width for long-form content */
.container-narrow {
  max-width: 720px;
}

/* NAV — hidden, navigation handled by sidebar */
.nav { display: none; }

/* HEADER */
.page-header { padding: 1.5rem 0 2rem; }
.page-header h1 {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;
}
.page-header .subtitle {
  color: var(--text-secondary);
  font-size: 1.35rem;
}
.page-header .meta {
  margin-top: 0.75rem;
  font-size: 1.15rem;
  color: var(--text-secondary);
}
.site-tagline {
  font-size: 1.15rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
  font-style: italic;
}

/* LOGO */
.logo-globe {
  display: inline-block;
  color: var(--accent);
  vertical-align: middle;
}
.logo-globe svg {
  display: block;
}
.logo-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.landing-hero .logo-globe svg {
  width: 4.2rem;
  height: 4.2rem;
}
.landing-hero .logo-title {
  justify-content: center;
  gap: 0;
}
.landing-hero .logo-globe {
  margin-right: -0.65em;
}
.sidebar-brand .logo-globe svg {
  width: 28px;
  height: 28px;
}
.sidebar-brand .logo-title {
  gap: 0;
}
.sidebar-search {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}
.sidebar-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-muted);
}
.sidebar-search::placeholder { color: var(--text-tertiary); }
.sidebar-search-results {
  max-height: 300px;
  overflow-y: auto;
  margin-top: 0.25rem;
  display: none;
}
.sidebar-search-results.active { display: block; }
.sidebar-search-results a {
  display: block;
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  color: var(--text);
  text-decoration: none;
  border-left: 2px solid transparent;
  border-bottom: 1px solid var(--border-subtle);
}
.sidebar-search-results a:hover {
  color: var(--accent);
  border-left-color: var(--accent);
  background: rgba(226,168,75,0.05);
}
.sidebar-search-results .ssr-course {
  font-size: 0.65rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.sidebar-brand .logo-globe {
  margin-right: -0.2em;
}

/* SOURCE CARD — directory function, most prominent element */
.source-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-md);
}
.source-card h2 {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}
.source-card .source-name {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.source-card .source-license {
  font-size: 1.15rem;
  color: var(--accent);
  margin-bottom: 1.25rem;
}
.source-card a.source-link {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--accent);
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 500;
}
.source-card a.source-link:hover {
  background: var(--accent);
  color: var(--cta-text);
}

/* EXPANDABLE SOURCE CARDS */
.source-card-expand {
  margin-bottom: 1.5rem;
}
.source-card-expand > summary {
  display: block;
}
.source-card-expand > summary::-webkit-details-marker { display: none; }
.source-card-expand > summary::after {
  content: "Hide modules";
  display: block;
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-top: 0.75rem;
}
.source-card-expand:not([open]) > summary::after {
  content: "Show modules";
}
.source-card-expand .module-list {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* CTA BUTTON */
.cta {
  display: block;
  width: 100%;
  padding: 1.5rem 2rem;
  margin: 2.5rem 0;
  background: var(--cta-bg);
  color: var(--cta-text);
  text-align: center;
  text-decoration: none;
  font-size: 1.35rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  min-height: 64px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  letter-spacing: -0.01em;
}
.cta:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-lg), 0 0 20px rgba(226,168,75,0.15);
  transform: translateY(-1px);
}
.cta .price {
  display: block;
  font-size: 0.85rem;
  font-weight: 400;
  opacity: 0.9;
  margin-top: 0.25rem;
}

/* SECTIONS */
.section { margin-bottom: 3rem; }
.section h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  letter-spacing: -0.02em;
}

/* MODULE TWO-COLUMN LAYOUT (desktop) */
.module-layout {
  display: block;
}
@media (min-width: 900px) {
  .module-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2.5rem;
    align-items: start;
  }
  .module-main { min-width: 0; }
  .module-aside {
    position: sticky;
    top: 1.5rem;
  }
}
.module-aside {
  margin-top: 0;
}
.module-aside .aside-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.module-aside .aside-card h3 {
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}
.module-aside .aside-term {
  font-size: 1.1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.module-aside .aside-term:last-child { border-bottom: none; }
.module-aside .aside-term strong {
  color: var(--text);
  font-weight: 600;
  font-size: 1.15rem;
}
.module-aside .aside-term span {
  display: block;
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-top: 0.3rem;
  line-height: 1.65;
  text-wrap: pretty;
}

/* TOPIC LIST — text-wrap balance on bullets */
.topics ul { list-style: none; padding: 0; }
.topics li {
  padding: 0.75rem 0;
  padding-left: 1.75rem;
  position: relative;
  font-size: 1.25rem;
  line-height: 1.6;
  text-wrap: pretty;
}
.topics li::before {
  content: "\2022";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 1.5rem;
}

/* KEY TERMS */
.terms dl { display: grid; gap: 1.25rem; }
.terms dt { font-weight: 600; font-size: 1.3rem; }
.terms dd {
  font-size: 1.15rem;
  color: var(--text-secondary);
  padding: 1rem 1.25rem;
  background: var(--term-bg);
  border-radius: 6px;
  margin-left: 0;
  line-height: 1.7;
  text-wrap: pretty;
}

/* PREVIEW */
.preview {
  background: var(--preview-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem;
  font-size: 1.2rem;
  line-height: 1.85;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.preview p { margin-bottom: 0.65rem; text-wrap: pretty; }
.preview::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3rem;
  background: linear-gradient(transparent, var(--preview-bg));
  border-radius: 0 0 6px 6px;
  pointer-events: none;
}
.preview p { margin-bottom: 0.5rem; }

/* MODULE NAV */
.module-nav {
  display: flex;
  justify-content: space-between;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  margin-top: 1rem;
}
.module-nav a { color: var(--accent); text-decoration: none; }
.module-nav a:hover { text-decoration: underline; }

/* COURSE CARDS */
.category { margin-bottom: 2rem; }
.category h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  width: 100%;
}
@media (min-width: 1200px) {
  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}
.card {
  display: block;
  padding: 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}
.card:hover {
  border-color: var(--accent);
  background: var(--card-bg-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.card h3 { font-size: 1.3rem; font-weight: 600; margin-bottom: 0.4rem; }
.card .card-meta { font-size: 1rem; color: var(--text-secondary); }
.card .card-badge {
  display: inline-block;
  font-size: 0.7rem;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 3px;
  padding: 0.1rem 0.4rem;
  margin-top: 0.4rem;
}

/* MODULE LIST */
.module-list { list-style: none; padding: 0; }
.module-list li { border-bottom: 1px solid var(--border); }
.module-list li {
  padding: 0.4rem 0;
  font-size: 1.05rem;
  line-height: 1.5;
}
.module-list a {
  display: block;
  text-decoration: none;
  color: var(--text);
}
.module-list a:hover { color: var(--accent); }
.module-list .module-num {
  color: var(--text-secondary);
  font-size: 0.95rem;
  min-width: 5.5rem;
  display: inline-block;
}

/* SOURCE PROVIDERS */
.source-providers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}
.source-provider {
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
}
.source-provider:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.source-provider h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.sp-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}
.sp-license {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
}

/* CREATOR'S NOTE */
.creators-note { max-width: 600px; line-height: 1.8; }
.creators-note p { margin-bottom: 1rem; }
.creators-note .signature {
  margin-top: 2rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* LANDING HERO — the front door */
.landing-hero {
  text-align: center;
  padding: 2rem 0;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 12vh;
}
.landing-hero h1 {
  font-size: 4.5rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.landing-hero .tagline {
  color: var(--accent);
  font-size: 2rem;
  font-style: italic;
  margin: 0 0 14rem;
  letter-spacing: 0.06em;
}
.landing-hero .stats {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-top: 2rem;
}
.search-bar {
  display: block;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 1.25rem 1.75rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 1.35rem;
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}
.search-bar:focus {
  border-color: var(--accent);
  box-shadow: var(--shadow-md), 0 0 0 3px var(--accent-muted);
}
.search-bar::placeholder { color: var(--text-tertiary); }

/* FOOTER */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.5rem 1.5rem;
  background: var(--bg);
  border-top: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-align: center;
  z-index: 50;
  white-space: nowrap;
}
.footer p { display: inline; }
.footer p + p::before { content: " · "; }
.footer a { color: var(--text-tertiary); text-decoration: none; }
.footer a:hover { color: var(--accent); }
/* Pad bottom of content so footer doesn't overlap */
.container { padding-bottom: 3rem; }
@media (min-width: 768px) {
  .footer { left: 360px; }
}

/* SIDEBAR — hidden on mobile, slides in when triggered */
.sidebar {
  display: none;
  position: fixed;
  left: -80vw;
  top: 0; bottom: 0;
  width: 280px;
  background: var(--bg-raised);
  border-right: 1px solid var(--border-subtle);
  padding: 1.5rem 0;
  overflow-y: auto;
  z-index: 1100;
  transition: left 0.25s ease;
  box-shadow: 2px 0 12px rgba(0,0,0,0.4);
}
.sidebar.mobile-open {
  display: block;
  left: 0;
}
/* Sidebar styling — shared between mobile overlay and desktop fixed */
.sidebar-brand { padding: 0 1rem 0.75rem; border-bottom: 1px solid var(--border); margin-bottom: 0.5rem; }
.sidebar-brand h2 { font-size: 1.4rem; font-weight: 700; color: var(--text); margin: 0; letter-spacing: -0.02em; }
.sidebar-brand .sidebar-tagline { font-size: 0.85rem; color: var(--accent); font-style: italic; }
.sidebar-brand .logo-title { gap: 0; display: flex; align-items: center; }
.sidebar-brand .logo-globe { margin-right: -0.2em; }
.sidebar-brand .logo-globe svg { width: 24px; height: 24px; }
.sidebar-nav details { border-bottom: 1px solid var(--border-subtle); }
.sidebar-nav summary { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text); padding: 0.5rem 1rem; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; user-select: none; }
.sidebar-nav summary::-webkit-details-marker { display: none; }
.sidebar-nav summary::after { content: "+"; color: var(--text-tertiary); font-size: 0.85rem; font-weight: 400; }
.sidebar-nav details[open] summary::after { content: "-"; }
.sidebar-nav summary:hover { color: var(--accent); }
.sidebar-nav .sidebar-courses { padding: 0 0 0.35rem; }
.sidebar-nav a { display: block; padding: 0.25rem 1.25rem 0.25rem 1.75rem; font-size: 0.82rem; color: var(--text-secondary); text-decoration: none; border-left: 2px solid transparent; line-height: 1.4; }
.sidebar-nav a:hover { color: var(--text); background: rgba(226,168,75,0.05); border-left-color: var(--accent); }
.sidebar-nav a.active { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
.sidebar-sources details details summary { font-size: 0.8rem; font-weight: 600; padding: 0.3rem 0.5rem; color: var(--accent); }
.sidebar-sources details details a { padding-left: 1.25rem; font-size: 0.75rem; }
.sidebar-search { display: block; width: calc(100% - 2rem); margin: 0.75rem 1rem 0; padding: 0.5rem 0.75rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-size: 0.85rem; outline: none; }
.sidebar-search:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-muted); }
.sidebar-search::placeholder { color: var(--text-tertiary); }
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1099;
}
.sidebar-overlay.active {
  display: block;
}
@media (min-width: 768px) {
  .sidebar {
    display: block !important;
    position: fixed;
    left: 0 !important;
    top: 0; bottom: 0;
    width: 360px;
    background: var(--bg-raised);
    border-right: 1px solid var(--border-subtle);
    padding: 1.5rem 0;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 2px 0 8px rgba(0,0,0,0.2);
    transition: none;
  }
  .sidebar-overlay { display: none !important; }
  .sidebar-brand {
    padding: 0 1rem 0.75rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.5rem;
  }
  .sidebar-brand h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    letter-spacing: -0.02em;
  }
  .sidebar-brand .sidebar-tagline {
    font-size: 0.95rem;
    color: var(--accent);
    font-style: italic;
  }
  .sidebar-nav { padding: 0; }
  .sidebar-nav details {
    border-bottom: 1px solid var(--border-subtle);
  }
  .sidebar-nav summary {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text);
    padding: 0.5rem 1rem;
    margin: 0;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
  }
  .sidebar-nav summary::-webkit-details-marker { display: none; }
  .sidebar-nav summary::after {
    content: "+";
    color: var(--text-tertiary);
    font-size: 0.85rem;
    font-weight: 400;
  }
  .sidebar-nav details[open] summary::after {
    content: "−";
  }
  .sidebar-nav summary:hover {
    color: var(--accent);
  }
  .sidebar-nav .sidebar-courses {
    padding: 0 0 0.35rem;
  }
  .sidebar-nav a {
    display: block;
    padding: 0.3rem 1.5rem 0.3rem 2rem;
    font-size: 0.92rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-left: 2px solid transparent;
    line-height: 1.4;
  }
  .sidebar-nav a:hover {
    color: var(--text);
    background: rgba(226,168,75,0.05);
    border-left-color: var(--accent);
  }
  .sidebar-links {
    padding: 0.5rem 1rem 0;
    border-top: 1px solid var(--border);
    margin-top: 0.5rem;
  }
  .sidebar-links a {
    display: block;
    padding: 0.35rem 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-decoration: none;
  }
  .sidebar-links a:hover { color: var(--accent); }
  /* Nested source details inside sidebar */
  .sidebar-sources details details {
    border-bottom: none;
    margin-left: 0.5rem;
  }
  .sidebar-sources details details summary {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.3rem 0.5rem;
    color: var(--accent);
  }
  .sidebar-sources details details summary::after {
    font-size: 0.75rem;
  }
  .sidebar-sources details details a {
    padding-left: 1.25rem;
    font-size: 0.75rem;
  }

  /* Highlight active course in sidebar */
  .sidebar-nav a.active {
    color: var(--accent);
    border-left-color: var(--accent);
    font-weight: 600;
  }

  /* Content fills space right of sidebar */
  .has-sidebar .container {
    margin-left: 360px;
    max-width: 100%;
    padding: 0 2.5rem 0 2.5rem;
    margin-right: 2rem;
  }
  /* Landing page: also gets sidebar on desktop */
  .is-landing .container {
    margin-left: 360px;
    max-width: 100%;
    padding: 0 2.5rem 0 2.5rem;
    margin-right: 2rem;
  }
  /* Landing hero needs to center within the available space */
  .landing-hero {
    max-width: 800px;
    margin: 0 auto;
  }
}

/* CREATOR'S NOTE accent border */
.creators-note {
  padding-top: 0;
}
.page-header + .creators-note {
  border-top: 3px solid var(--accent);
  margin-top: -1rem;
  padding-top: 1.5rem;
}
.creators-note .signature {
  color: var(--text);
  font-style: normal;
  font-weight: 600;
}

/* RADIAL NAV */
.radial-trigger {
  position: fixed;
  right: 1rem;
  bottom: 15%;
  width: 48px;
  height: 48px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1002;
  color: var(--accent);
  transition: border-color 0.2s;
}
.radial-trigger:hover { border-color: var(--accent); }
.radial-trigger.pulse {
  animation: radial-pulse 2s ease-in-out infinite;
}
@keyframes radial-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(226, 168, 75, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(226, 168, 75, 0); }
}
.radial-menu {
  position: fixed;
  right: 1rem;
  bottom: 15%;
  z-index: 1001;
  overflow: visible;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.radial-menu.open {
  pointer-events: auto;
  opacity: 1;
}
.radial-item {
  position: absolute;
  width: 44px;
  height: 44px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  text-decoration: none;
  transition: transform 0.2s, border-color 0.2s;
}
.radial-item:hover { border-color: var(--accent); background: #1e2330; }
/* Arc positions: 270-360 degrees, fanning LEFT from right origin */
.radial-item:nth-child(1) { transform: translate(-60px, -100px); } /* search - 12 */
.radial-item:nth-child(2) { transform: translate(-100px, -60px); } /* browse - 10 */
.radial-item:nth-child(3) { transform: translate(-115px, 0px); }   /* sources - 9 */
.radial-item:nth-child(4) { transform: translate(-100px, 60px); }  /* creator - 6 */
.radial-menu:not(.open) .radial-item {
  transform: translate(0, 0) !important;
}

/* SEARCH RESULTS */
.search-results {
  width: 100%;
  max-width: 600px;
  margin: 0.5rem auto 0;
  display: none;
}
.search-results.active { display: block; }
.search-result {
  display: block;
  width: 100%;
  padding: 1rem 1.75rem;
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-bottom: none;
  text-decoration: none;
  color: var(--text);
}
.search-result:first-child {
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}
.search-result:last-child {
  border-bottom: 1px solid var(--border-subtle);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}
.search-result:only-child {
  border-bottom: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}
.search-results.active {
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.search-result:hover { border-color: var(--accent); background: var(--card-bg-hover); }
.search-result .sr-course {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-align: left;
}
.search-result .sr-module {
  font-size: 1.1rem;
  font-weight: 600;
  text-align: left;
}
.search-result .sr-match {
  font-size: 0.9rem;
  color: var(--text-tertiary);
  margin-top: 0.2rem;
  text-align: left;
}
.search-no-results {
  text-align: left;
  color: var(--text-secondary);
  font-size: 1rem;
  padding: 1rem 1.75rem;
}

/* Hide radial on landing page */
/* Show radial on ALL pages on mobile — including landing */

/* MOBILE SCALING — bring everything down to readable size */
@media (max-width: 767px) {
  .page-header h1 { font-size: 1.5rem; }
  .page-header .subtitle { font-size: 0.9rem; }
  .page-header .meta { font-size: 0.85rem; }
  .section h2 { font-size: 1.1rem; }
  .topics li { font-size: 0.95rem; padding: 0.3rem 0; padding-left: 1.25rem; }
  .topics li::before { font-size: 1rem; }
  .terms dt { font-size: 0.95rem; }
  .terms dd { font-size: 0.9rem; padding: 0.5rem 0.75rem; }
  .preview { font-size: 0.9rem; padding: 1rem; }
  .source-card { padding: 1rem; }
  .source-card h2 { font-size: 0.85rem; }
  .source-card .source-name { font-size: 1rem; }
  .source-card .source-license { font-size: 0.85rem; }
  .source-card a.source-link { font-size: 0.9rem; padding: 0.5rem 1rem; }
  .cta { font-size: 1rem; padding: 1rem; }
  .cta .price { font-size: 0.8rem; }
  .module-list li { font-size: 0.9rem; padding: 0.3rem 0; word-wrap: break-word; overflow-wrap: break-word; }
  .module-list a { display: flex; flex-wrap: wrap; gap: 0.2rem; }
  .module-list .module-num { flex-shrink: 0; }
  .module-list .module-num { font-size: 0.8rem; min-width: 4.5rem; }
  .card h3 { font-size: 1rem; }
  .card .card-meta { font-size: 0.8rem; }
  .card { padding: 1rem; }
  .category h2 { font-size: 0.85rem; }
  .aside-card { padding: 1rem; }
  .aside-card h3 { font-size: 0.85rem; }
  .aside-term { font-size: 0.85rem; }
  .aside-term strong { font-size: 0.9rem; }
  .aside-term span { font-size: 0.8rem; }
  .landing-hero { padding-top: 10vh; min-height: 85vh; justify-content: space-between; padding-bottom: 15vh; }
  .landing-hero h1 { font-size: 1.75rem; margin-bottom: 0; }
  .landing-hero .tagline { font-size: 1rem; margin: 0; }
  .landing-brand { text-align: center; }
  .landing-search-wrap { width: 100%; }
  .landing-hero .logo-globe svg { width: 1.75rem; height: 1.75rem; }
  .landing-hero .logo-globe { margin-right: -0.25em; }
  .landing-hero .logo-title { gap: 0; }
  .search-bar { font-size: 1rem; padding: 0.85rem 1.25rem; }
  .search-result .sr-module { font-size: 0.9rem; }
  .search-result .sr-course { font-size: 0.7rem; }
  .container { padding: 0 1rem; }
  .footer { font-size: 0.6rem; padding: 0.4rem 0.75rem; white-space: normal; line-height: 1.4; }
  .container { padding-bottom: 4rem; }
  .source-providers { grid-template-columns: 1fr; }
  .sp-header h3 { font-size: 1rem; }
  .sp-desc { font-size: 0.85rem; }
}

@media (min-width: 768px) {
  .radial-trigger, .radial-menu { display: none; }
}
