/* TerraformGuru — Custom Styles */
/* Brand colors matching StackSimplify design system */
/* Navy #0F2B46 | Blue #1B4F72 | Orange #2e7d32 | Light #E8F4FD */

/* ============================================================
   LIGHT MODE — StackSimplify Brand Colors
   ============================================================ */
:root,
[data-md-color-scheme="default"] {
  --md-primary-fg-color: #0F2B46;          /* Navy — header, nav */
  --md-primary-fg-color--light: #1B4F72;   /* Blue */
  --md-primary-fg-color--dark: #0A1929;    /* Dark Navy */
  --md-primary-bg-color: #ffffff;           /* White */
  --md-primary-bg-color--light: #E8F4FD;   /* Light Blue */
  --md-accent-fg-color: #2e7d32;           /* Orange — links, CTAs */
  --md-accent-fg-color--transparent: #2e7d3220;
  --md-accent-bg-color: #2e7d32;
  --md-accent-bg-color--light: #2e7d3220;
}

/* ============================================================
   DARK MODE (Slate) — Navy tones with orange accent
   ============================================================ */
[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #0F2B46;          /* Keep navy header in dark mode too */
  --md-primary-fg-color--light: #1B4F72;
  --md-primary-fg-color--dark: #0A1929;
  --md-primary-bg-color: #0d1117;          /* GitHub-style dark bg */
  --md-primary-bg-color--light: #161b22;
  --md-default-bg-color: #0d1117;          /* Page background */
  --md-default-bg-color--light: #161b22;
  --md-accent-fg-color: #7ed884;           /* Slightly lighter orange for dark bg readability */
  --md-accent-fg-color--transparent: #7ed88420;
  --md-accent-bg-color: #2e7d32;
  --md-accent-bg-color--light: #2e7d3220;
  --md-typeset-a-color: #7ed884;           /* Links in dark mode */
}

/* Top bar (header + tab bar) = near-black #0d1117 in BOTH light and dark themes.
   Reads as black, softer than pure #000 on camera; the green logo + accent pop on it. */
.md-header {
  background-color: #0d1117;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.md-tabs {
  background-color: #0d1117;
}
[data-md-color-scheme="slate"] .md-header {
  background-color: #0d1117;
}

[data-md-color-scheme="slate"] .md-tabs {
  background-color: #0d1117;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* StackSimplify wordmark logo (SVG) - sized for the dark top bar.
   Replaces the old single-letter "S" mark; "Stack" white + "Simplify" green. */
.md-header__button.md-logo img {
  height: 1.5rem;
  width: auto;
}

/* Dark mode: tab text must be readable */
[data-md-color-scheme="slate"] .md-tabs__link {
  color: rgba(255, 255, 255, 0.7);
}

[data-md-color-scheme="slate"] .md-tabs__link--active,
[data-md-color-scheme="slate"] .md-tabs__link:hover {
  color: #7ed884;
}

/* Dark mode: ensure logo and header text are visible */
[data-md-color-scheme="slate"] .md-header__button.md-logo img {
  filter: brightness(1.1);
}

[data-md-color-scheme="slate"] .md-header__topic .md-ellipsis {
  color: rgba(255, 255, 255, 0.95);
}

/* Dark mode: search bar — placeholder text and icon visible */
[data-md-color-scheme="slate"] .md-search__input {
  background-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

[data-md-color-scheme="slate"] .md-search__input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

[data-md-color-scheme="slate"] .md-search__icon {
  color: rgba(255, 255, 255, 0.6);
}

/* Dark mode: light/dark toggle button visible */
[data-md-color-scheme="slate"] .md-header__button:not(.md-logo) {
  color: rgba(255, 255, 255, 0.8);
}

[data-md-color-scheme="slate"] .md-header__button:not(.md-logo):hover {
  color: #7ed884;
}

/* Dark mode: course cards */
[data-md-color-scheme="slate"] .course-card {
  border-color: #30363d;
  background: #161b22;
}

[data-md-color-scheme="slate"] .course-card:hover {
  border-color: #7ed884;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

[data-md-color-scheme="slate"] .course-card h3 {
  color: #e6edf3;
}

/* Dark mode: CTA banner */
[data-md-color-scheme="slate"] .cta-banner {
  background: linear-gradient(135deg, #0F2B46, #1B4F72);
}

/* Dark mode: badges */
[data-md-color-scheme="slate"] .badge-aws { background: #43a04730; color: #66bb6a; }
[data-md-color-scheme="slate"] .badge-azure { background: #0078D430; color: #4DA6FF; }
[data-md-color-scheme="slate"] .badge-gcp { background: #4285F430; color: #6EA8FC; }
[data-md-color-scheme="slate"] .badge-cert { background: #7B42BC30; color: #B07CE8; }
[data-md-color-scheme="slate"] .badge-realworld { background: #10B98130; color: #34D399; }
[data-md-color-scheme="slate"] .badge-eks { background: #326CE530; color: #5A8FEF; }

/* ============================================================
   HEADER — Logo size and alignment
   ============================================================ */
.md-header__button.md-logo img {
  height: 1.6rem;
  width: auto;
  border-radius: 4px;
}

/* Site title next to logo */
.md-header__topic .md-ellipsis {
  font-weight: 700;
}

/* GitHub repo star/fork chip (Material "source"): make it visible in our custom
   dark header. Material hides it below 76.25em by default; show it on laptops and
   up (mirrors Material's own desktop sizing), hide only on true mobile to avoid crowding. */
.md-header__source {
  display: block;
  max-width: 11.7rem;
  margin-left: 1rem;
}
@media screen and (max-width: 44.9375em) {
  .md-header__source { display: none; }
}
/* Material colors the source chip with --md-primary-bg-color, which is dark (#0d1117) in our
   custom theme - so repo name + star/fork counts were invisible on the dark header. Make them readable. */
.md-header__source,
.md-header__source .md-source__repository,
.md-header__source .md-source__facts {
  color: rgba(255, 255, 255, 0.9);
}
.md-header__source:hover,
.md-header__source:hover .md-source__repository,
.md-header__source:hover .md-source__facts {
  color: #7ed884;
}
/* TEMP - REMOVE AT LAUNCH (when repo D is PUBLIC). While D is private the public GitHub API returns no
   count, and a browser that cached the pre-launch prototype repo's numbers would otherwise show STALE
   star/fork counts (Material caches repo facts in localStorage). Hiding the count element guarantees NO
   wrong number shows on any browser during recording. The repo name still shows; delete this rule at
   launch so the real counts render. See launch-checklist. */
.md-source__facts { display: none !important; }

/* ============================================================
   Homepage "Star us on GitHub" call-to-action card
   ============================================================ */
.gh-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(126, 216, 132, 0.35);
  border-radius: 0.8rem;
  background: linear-gradient(135deg, rgba(126, 216, 132, 0.06), rgba(126, 216, 132, 0.02));
}
.gh-cta__logo {
  flex: none;
  width: 2.2rem;
  height: 2.2rem;
  fill: currentColor;
  opacity: 0.9;
}
.gh-cta__body { display: flex; flex-direction: column; gap: 0.15rem; flex: 1 1 auto; }
.gh-cta__title { font-weight: 700; font-size: 0.95rem; }
.gh-cta__sub { font-size: 0.8rem; opacity: 0.75; }
.gh-cta__btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  border-radius: 0.4rem;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  color: #0d1117;
  background: #7ed884;
  transition: background 0.15s ease, transform 0.15s ease;
}
.gh-cta__btn:hover { background: #9be8a0; transform: translateY(-1px); }
/* Material's link color would make the label green-on-green (invisible); force dark button text.
   !important so it wins regardless of theme link-color specificity. */
a.gh-cta__btn,
a.gh-cta__btn:hover,
a.gh-cta__btn:visited {
  color: #0d1117 !important;
  text-decoration: none !important;
}
.gh-cta__star { width: 1rem; height: 1rem; fill: currentColor; }
.gh-cta__count {
  font-variant-numeric: tabular-nums;
  padding-left: 0.5rem;
  margin-left: 0.4rem;
  border-left: 1px solid rgba(13, 17, 23, 0.25);
}
.gh-cta__count:empty { display: none; }   /* graceful: no count -> no divider */
@media screen and (max-width: 44.9375em) {
  .gh-cta { flex-direction: column; text-align: center; }
  .gh-cta__body { align-items: center; }
}

/* ============================================================
   NAVIGATION TABS — Clean styling
   ============================================================ */

/* Gradient fade + arrow on right edge to hint more tabs exist */
.md-tabs__list {
  position: relative;
}

.md-tabs {
  position: relative;
}

.md-tabs::after {
  content: '›';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 80px;
  background: linear-gradient(to right, transparent 0%, #0d1117 70%);
  pointer-events: none;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  font-size: 1.2rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
}

[data-md-color-scheme="slate"] .md-tabs::after {
  background: linear-gradient(to right, transparent 0%, #0A1929 70%);
}

.md-tabs__link {
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}

.md-tabs__link--active {
  font-weight: 700;
}

/* ============================================================
   HOMEPAGE — Hero, Stats, Course Cards, CTA
   ============================================================ */

/* Hero section */
.tx-hero {
  margin: 0 -0.8rem;
  padding: 2rem 0.8rem;
}

.tx-hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--md-primary-fg-color);
}

[data-md-color-scheme="slate"] .tx-hero h1 {
  color: #e6edf3;
}

.tx-hero__content {
  max-width: 40rem;
}

/* Course category cards */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
  margin: 1.5rem 0;
}

.course-card {
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 0.6rem;
  padding: 0;
  transition: all 0.3s ease;
  background: var(--md-default-bg-color);
  overflow: hidden;
}

.course-card:hover {
  border-color: var(--md-accent-fg-color);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-6px);
}

.course-card h3 {
  margin-top: 0 !important;
  font-size: 1rem;
  color: var(--md-primary-fg-color);
}

.course-card .card-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.course-card .card-meta {
  font-size: 0.78rem;
  color: var(--md-default-fg-color--light);
  margin-top: 0.5rem;
}

.course-card .card-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 1rem;
  font-size: 0.7rem;
  font-weight: 600;
  margin-right: 0.3rem;
}

/* Card banner — gradient header strip with text overlay */
.card-banner {
  height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 1rem;
  text-align: center;
}

/* SVG cross-hatch pattern overlay (matches stacksimplify) */
.card-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.1;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

/* Banner icon — large white centered icon */
.card-banner .twemoji svg {
  width: 2.5rem;
  height: 2.5rem;
  fill: white !important;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
  position: relative;
  z-index: 1;
  margin-bottom: 0.3rem;
}

.card-banner p {
  margin: 0;
  line-height: 1;
  position: relative;
  z-index: 1;
}

/* Banner text overlay */
.banner-title {
  color: white;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.banner-subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.72rem;
  margin-top: 0.25rem;
  position: relative;
  z-index: 1;
}

/* Banner corner badge (FREE, HIGHEST RATED, etc.) */
.banner-corner-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.15rem 0.5rem;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 1rem;
  z-index: 2;
  backdrop-filter: blur(4px);
}

/* Gradient variants */
.banner-terraform { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.banner-cert { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.banner-kubernetes { background: linear-gradient(135deg, #2563eb, #60a5fa); }
.banner-aws { background: linear-gradient(135deg, #ea580c, #fb923c); }
.banner-azure { background: linear-gradient(135deg, #0078D4, #4DA6FF); }
.banner-gcp { background: linear-gradient(135deg, #4285F4, #7BAAF7); }
.banner-eks { background: linear-gradient(135deg, #2563eb, #60a5fa); }
.banner-realworld { background: linear-gradient(135deg, #16a34a, #4ade80); }
.banner-devops { background: linear-gradient(135deg, #16a34a, #4ade80); }
.banner-certred { background: linear-gradient(135deg, #dc2626, #f87171); }
.banner-mlops { background: linear-gradient(135deg, #0A1929, #1B4F72); }

/* Category section headers */
.category-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 2.5rem 0 1rem;
  padding: 0;
}

.category-header:first-of-type {
  margin-top: 1rem;
}

.category-header h2,
.category-header .category-title {
  margin: 0 !important;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--md-primary-fg-color);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: none !important;
}

[data-md-color-scheme="slate"] .category-header h2,
[data-md-color-scheme="slate"] .category-header .category-title {
  color: #e6edf3;
}

/* Category colored dot — simple visual marker */
.category-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.dot-purple { background: #7c3aed; }
.dot-blue { background: #2563eb; }
.dot-orange { background: #ea580c; }
.dot-green { background: #16a34a; }
.dot-red { background: #dc2626; }
.dot-navy { background: #1B4F72; }

.category-count {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 1rem;
  white-space: nowrap;
}

.count-purple { background: #f3e8ff; color: #7c3aed; }
.count-blue { background: #dbeafe; color: #2563eb; }
.count-orange { background: #fff7ed; color: #ea580c; }
.count-green { background: #dcfce7; color: #16a34a; }
.count-red { background: #fee2e2; color: #dc2626; }
.count-navy { background: #2e7d3220; color: #2e7d32; }

[data-md-color-scheme="slate"] .count-purple { background: #7c3aed30; color: #a78bfa; }
[data-md-color-scheme="slate"] .count-blue { background: #2563eb30; color: #60a5fa; }
[data-md-color-scheme="slate"] .count-orange { background: #ea580c30; color: #fb923c; }
[data-md-color-scheme="slate"] .count-green { background: #16a34a30; color: #4ade80; }
[data-md-color-scheme="slate"] .count-red { background: #dc262630; color: #f87171; }
[data-md-color-scheme="slate"] .count-navy { background: #2e7d3230; color: #7ed884; }

/* Inline stat badges on course cards */
.card-badges {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}

.card-badges .cbadge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  font-size: 0.65rem;
  font-weight: 600;
  border-radius: 0.25rem;
}

.cbadge-students { background: #dbeafe; color: #1d4ed8; }
.cbadge-rating { background: #fef9c3; color: #a16207; }
.cbadge-count { background: #f3f4f6; color: #4b5563; }
.cbadge-bestseller { background: #fff7ed; color: #c2410c; }
.cbadge-free { background: #dcfce7; color: #15803d; }
.cbadge-hot { background: #fee2e2; color: #b91c1c; }
.cbadge-highest { background: #dcfce7; color: #15803d; }

[data-md-color-scheme="slate"] .cbadge-students { background: #1d4ed820; color: #60a5fa; }
[data-md-color-scheme="slate"] .cbadge-rating { background: #a1620720; color: #fbbf24; }
[data-md-color-scheme="slate"] .cbadge-count { background: #4b556320; color: #9ca3af; }
[data-md-color-scheme="slate"] .cbadge-bestseller { background: #c2410c20; color: #fb923c; }
[data-md-color-scheme="slate"] .cbadge-free { background: #15803d20; color: #4ade80; }
[data-md-color-scheme="slate"] .cbadge-hot { background: #b91c1c20; color: #f87171; }
[data-md-color-scheme="slate"] .cbadge-highest { background: #15803d20; color: #4ade80; }

/* Course card as clickable link */
a.course-card-link {
  display: block;
  text-decoration: none !important;
  color: inherit;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 0.6rem;
  overflow: hidden;
  transition: all 0.3s ease;
  background: var(--md-default-bg-color);
}

a.course-card-link:hover {
  border-color: var(--md-accent-fg-color);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-6px);
  text-decoration: none !important;
}

[data-md-color-scheme="slate"] a.course-card-link {
  border-color: #30363d;
  background: #161b22;
}

[data-md-color-scheme="slate"] a.course-card-link:hover {
  border-color: #7ed884;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

a.course-card-link .card-content {
  padding: 1rem 1.2rem 1.2rem;
}

a.course-card-link .card-content h3,
a.course-card-link .card-content .card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--md-primary-fg-color);
  margin: 0 0 0.4rem;
  line-height: 1.3;
}

[data-md-color-scheme="slate"] a.course-card-link .card-content h3,
[data-md-color-scheme="slate"] a.course-card-link .card-content .card-title {
  color: #e6edf3;
}

a.course-card-link:hover .card-content h3,
a.course-card-link:hover .card-content .card-title {
  color: var(--md-accent-fg-color);
}

a.course-card-link .card-desc {
  font-size: 0.75rem;
  color: var(--md-default-fg-color--light);
  margin: 0;
  line-height: 1.4;
}

/* Coming soon banner */
.coming-soon-banner {
  background: linear-gradient(135deg, #0A1929, #1B4F72);
  border-radius: 0.6rem;
  padding: 1.5rem;
  border: 1px solid rgba(27, 79, 114, 0.3);
  margin: 1rem 0;
}

.coming-soon-banner h4,
.coming-soon-banner .coming-soon-title {
  color: white !important;
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0 0 0.3rem !important;
}

.coming-soon-banner p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.78rem;
  margin: 0;
}

.coming-soon-banner .cs-note {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.82rem;
  margin-top: 0.8rem;
}

/* Card body — content below banner */
.card-body {
  padding: 1.2rem 1.5rem 1.5rem;
}

.card-body h3 {
  margin-top: 0 !important;
}

/* Card buttons — side by side */
.card-body .md-button {
  display: inline-block;
  margin-right: 0.4rem;
  margin-bottom: 0.4rem;
  font-size: 0.78rem;
  padding: 0.4rem 0.9rem;
}

/* Light mode: secondary button (Enroll on Udemy) — orange border, orange text */
.course-card .md-button:not(.md-button--primary) {
  color: #2e7d32;
  border-color: #2e7d32;
}

/* Light mode: secondary button hover — orange bg with WHITE text */
.course-card .md-button:not(.md-button--primary):hover {
  background: #2e7d32;
  color: white !important;
  border-color: #2e7d32;
}

/* Light mode: primary button (View Docs) hover — keep white text */
.course-card .md-button--primary:hover {
  color: white !important;
}

.badge-aws { background: #43a04720; color: #43a047; }
.badge-azure { background: #0078D420; color: #0078D4; }
.badge-gcp { background: #4285F420; color: #4285F4; }
.badge-cert { background: #7B42BC20; color: #7B42BC; }
.badge-realworld { background: #10B98120; color: #059669; }
.badge-eks { background: #326CE520; color: #326CE5; }

/* Stats bar */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.7rem;
  padding: 0.9rem;
  margin: 1.5rem 0;
  background: #161b22;
  border: 1px solid var(--md-accent-fg-color);
  border-radius: 0.9rem;
  box-shadow: 0 0 0 1px rgba(126, 216, 132, 0.20) inset, 0 4px 22px rgba(126, 216, 132, 0.08);
}

.stat-item {
  text-align: center;
  padding: 1.15rem 0.6rem;
  border: 1px solid rgba(126, 216, 132, 0.28);
  border-radius: 0.55rem;
  background: rgba(126, 216, 132, 0.03);
}

/* Each stat box is a link to the page it counts. Keep the card look: no underline,
   inherited colour, and a clear hover + keyboard focus state. */
a.stat-item {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}
a.stat-item:hover,
a.stat-item:focus-visible {
  border-color: var(--md-accent-fg-color);
  background: rgba(126, 216, 132, 0.09);
  transform: translateY(-2px);
}
a.stat-item:focus-visible { outline: 2px solid var(--md-accent-fg-color); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  a.stat-item { transition: none; }
  a.stat-item:hover, a.stat-item:focus-visible { transform: none; }
}

.stat-item .stat-number {
  font-size: 2.15rem;
  font-weight: 800;
  color: var(--md-accent-fg-color);
  display: block;
  line-height: 1.04;
  letter-spacing: -0.5px;
}

.stat-item .stat-label {
  font-size: 0.84rem;
  color: #ffffff;
  font-weight: 600;
  margin-top: 0.5rem;
  display: block;
  line-height: 1.32;
}

/* CTA banner */
.cta-banner {
  background: linear-gradient(135deg, #0F2B46, #1B4F72);
  color: white;
  border-radius: 0.8rem;
  padding: 2rem;
  text-align: center;
  margin: 2rem 0;
}

.cta-banner h3 {
  color: white !important;
  margin-top: 0 !important;
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.9) !important;
}

.cta-banner a {
  display: inline-block;
  background: var(--md-accent-fg-color);
  color: white !important;
  padding: 0.6rem 1.5rem;
  border-radius: 0.4rem;
  font-weight: 600;
  text-decoration: none;
  margin-top: 0.8rem;
  transition: opacity 0.2s;
}

.cta-banner a:hover {
  opacity: 0.9;
}

/* Brand footer link */
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--md-accent-fg-color);
  font-weight: 600;
  text-decoration: none;
}

.brand-link:hover {
  text-decoration: underline;
}

/* ============================================================
   CONTENT — Tables, code blocks, admonitions
   ============================================================ */

/* Better table styling */
.md-typeset table:not([class]) {
  font-size: 0.82rem;
}

.md-typeset table:not([class]) th {
  background: linear-gradient(135deg, #2e7d32, #1b5e20);   /* green header (matches the green theme + slides) */
  color: white;
  font-weight: 600;
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) th {
  background: linear-gradient(135deg, #2e7d32, #1b5e20);
}

/* Light mode: table links — clearly visible as links */
.md-typeset table:not([class]) a {
  color: #2e7d32;
  text-decoration: underline;
  text-decoration-color: rgba(46, 125, 50, 0.35);
  text-underline-offset: 2px;
}

.md-typeset table:not([class]) a:hover {
  color: #1b5e20;
  text-decoration-color: #1b5e20;
}

/* Dark mode: table links in green */
[data-md-color-scheme="slate"] .md-typeset table:not([class]) a {
  color: #7ed884;
  text-decoration-color: rgba(126, 216, 132, 0.3);
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) a:hover {
  color: #7ed884;
  text-decoration-color: #7ed884;
}

/* Dark mode: "Start Learning" / "Coming Soon" buttons in course cards */
[data-md-color-scheme="slate"] .course-card .md-button {
  color: #7ed884;
  border-color: #7ed884;
}
[data-md-color-scheme="slate"] .course-card .md-button:hover {
  background: #7ed884;
  color: #0d1117;
  border-color: #7ed884;
}
[data-md-color-scheme="slate"] .course-card .md-button--primary {
  background: #7ed884;
  color: #0d1117;
  border-color: #7ed884;
}
[data-md-color-scheme="slate"] .course-card .md-button--primary:hover {
  background: #7ed884;
  border-color: #7ed884;
}

/* ============================================================
   NEWSLETTER SECTION
   ============================================================ */
.newsletter-section {
  text-align: center;
  padding: 1.5rem 2rem;
  margin: 1rem 0;
  background: #E8F4FD;
  border: 1px solid #c8dff0;
  border-radius: 0.6rem;
}

.newsletter-section p {
  font-size: 0.9rem;
  color: var(--md-default-fg-color--light);
  max-width: 500px;
  margin: 0 auto 1rem;
  line-height: 1.5;
}

.newsletter-section iframe {
  display: block;
  margin: 0 auto;
}

[data-md-color-scheme="slate"] .newsletter-section {
  background: #161b22;
  border-color: #30363d;
}

/* Footer newsletter bar */
.footer-newsletter {
  text-align: center;
  padding: 1.5rem 1rem 0.5rem;
  background: linear-gradient(135deg, #0F2B46, #1B4F72);
  border-radius: 0.8rem;
  margin: 2rem 0 0;
}

.footer-newsletter p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.85rem;
  margin: 0 0 0.5rem;
}

.footer-newsletter .footer-nl-title {
  font-size: 1rem;
  margin: 0 0 0.3rem;
}

.footer-newsletter strong {
  color: #2e7d32;
}

/* Beehiiv embed wrapper */
.nl-embed-wrap {
  display: flex;
  justify-content: center;
}

/* Custom newsletter form (fallback) */
.nl-form {
  display: flex;
  justify-content: center;
  gap: 0;
  max-width: 420px;
  margin: 0 auto;
}

.nl-input {
  flex: 1;
  padding: 0.6rem 1rem;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-right: none;
  border-radius: 0.4rem 0 0 0.4rem;
  font-size: 0.85rem;
  color: #333;
  background: white;
  outline: none;
  font-family: inherit;
}

.nl-input:focus {
  border-color: #2e7d32;
}

.nl-input::placeholder {
  color: #999;
}

.nl-btn {
  padding: 0.6rem 1.2rem;
  background: linear-gradient(135deg, #2e7d32, #43a047);
  color: white;
  border: none;
  border-radius: 0 0.4rem 0.4rem 0;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
  font-family: inherit;
  white-space: nowrap;
}

.nl-btn:hover {
  opacity: 0.9;
}

.nl-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.nl-msg {
  color: #4ade80 !important;
  font-size: 0.78rem !important;
  margin-top: 0.4rem !important;
}

/* Mobile: stack newsletter form */
@media (max-width: 480px) {
  .nl-form {
    flex-direction: column;
    gap: 0.5rem;
  }
  .nl-input {
    border-right: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 0.4rem;
  }
  .nl-btn {
    border-radius: 0.4rem;
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
  .course-grid {
    grid-template-columns: 1fr;
  }
  .card-banner {
    height: 110px;
  }
  .card-banner .twemoji svg {
    width: 2.5rem;
    height: 2.5rem;
  }
  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem 0.4rem;
    padding: 1.3rem 0.7rem;
  }
  .stat-item {
    border-right: none;
    padding: 0.2rem 0.4rem;
  }
  .stat-item .stat-number {
    font-size: 1.6rem;
  }
  .tx-hero h1 {
    font-size: 1.6rem;
  }
  .cta-banner {
    padding: 1.5rem 1rem;
  }
}

/* ---- C1: home CTA / primary buttons - high-contrast in BOTH light and dark ----
   Fixes the invisible "Browse all StackSimplify courses" button (dark text on navy
   in slate mode). Brand orange background + white text reads in every scheme. */
.md-typeset .md-button--primary {
  background-color: #2e7d32;
  border-color: #2e7d32;
  color: #ffffff;
}
.md-typeset .md-button--primary:hover,
.md-typeset .md-button--primary:focus {
  background-color: #1b5e20;
  border-color: #1b5e20;
  color: #ffffff;
}
[data-md-color-scheme="slate"] .md-typeset .md-button--primary {
  background-color: #2e7d32;
  border-color: #2e7d32;
  color: #ffffff;
}
[data-md-color-scheme="slate"] .md-typeset .md-button--primary:hover,
[data-md-color-scheme="slate"] .md-typeset .md-button--primary:focus {
  background-color: #1b5e20;
  border-color: #1b5e20;
  color: #ffffff;
}

/* ===== C1 v2 (2026-06-25): secondary CTA button + dark-mode polish ===== */
/* Secondary (outline) button - e.g. "Browse all StackSimplify courses".
   It had no custom rule, so it used Material's default navy text -> invisible
   on the dark hero. Make it a visible orange outline in BOTH schemes. */
.md-typeset .md-button:not(.md-button--primary) {
  color: #2e7d32;
  border-color: #2e7d32;
  background: transparent;
}
.md-typeset .md-button:not(.md-button--primary):hover,
.md-typeset .md-button:not(.md-button--primary):focus {
  color: #ffffff;
  background-color: #2e7d32;
  border-color: #2e7d32;
}
[data-md-color-scheme="slate"] .md-typeset .md-button:not(.md-button--primary) {
  color: #7ed884;          /* lighter orange reads better on the dark bg */
  border-color: #7ed884;
  background: transparent;
}
[data-md-color-scheme="slate"] .md-typeset .md-button:not(.md-button--primary):hover,
[data-md-color-scheme="slate"] .md-typeset .md-button:not(.md-button--primary):focus {
  color: #0d1117;
  background-color: #7ed884;
  border-color: #7ed884;
}

/* Brighter headings in dark mode (the hero H1 looked grey) */
[data-md-color-scheme="slate"] .md-typeset h1 { color: #f3f6fb; }

/* Grid cards: subtle lift + accent border on hover, comfortable dark surface */
.md-typeset .grid.cards > ul > li {
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.md-typeset .grid.cards > ul > li:hover {
  border-color: #2e7d32;
  box-shadow: 0 4px 18px rgba(0,0,0,.18);
  transform: translateY(-2px);
}
[data-md-color-scheme="slate"] .md-typeset .grid.cards > ul > li {
  background: #161b22;
  border-color: #30363d;
}
[data-md-color-scheme="slate"] .md-typeset .grid.cards > ul > li:hover {
  border-color: #7ed884;
  box-shadow: 0 6px 22px rgba(0,0,0,.5);
}

/* Dark-mode prose links: brand orange (Material's custom-scheme default is indigo, off-brand) */
[data-md-color-scheme="slate"] .md-typeset a:not(.md-button):not(.md-icon) { color: #7ed884; }
[data-md-color-scheme="slate"] .md-typeset a:not(.md-button):not(.md-icon):hover { color: #7ed884; }

/* ============================================================
   RECORDING READABILITY (2026-06-25)
   The site is the on-screen SOURCE during course recording, so text + code
   must read comfortably at video scale. Tune the root size to taste:
     125%   = Material default (small on a recorded 1080p screen)
     137.5% = comfortable                  ~17.6px body
     150%   = large-for-recording           ~19.2px body
     162.5% = extra-large                   ~20.8px body
     175%   = extra-large+ (current)        ~22.4px body
   Everything (prose, headings, code, nav, spacing) scales off this one number.
   ============================================================ */
html { font-size: 175%; }

/* A2 (responsive font-scale): desktop/recording KEEPS 175%. These media queries fire ONLY at/below their
   width, so any screen wider than 900px (all recording screens) is untouched. Phones/tablets get a normal
   readable base instead of the oversized 28px. */
@media (max-width: 900px) { html { font-size: 145%; } }   /* tablets */
@media (max-width: 600px) { html { font-size: 118%; } }   /* phones -> ~19px root, normal reading */

/* plan 34 (partial-public): for LOGGED-OUT visitors the search index is gated, so search cannot work
   -> hide the box AND its header toggle button (gate-ui.js sets data-gated-public on <html> when there
   is no ss_gate cookie). The mobile/header toggle is a label[for="__search"] outside .md-search. */
:root[data-gated-public] .md-search,
:root[data-gated-public] [for="__search"] { display: none !important; }
/* lock marker that gate-ui.js appends to gated section links in the left nav (public visitors only) */
.gate-lock { display: inline-block; vertical-align: -1px; margin-left: 0.3em; opacity: 0.5; }
.md-nav__link:hover .gate-lock { opacity: 0.85; }

/* Code blocks: lift ABOVE prose so every character/indent reads on video */
.md-typeset pre > code,
.md-typeset .highlight pre { font-size: 0.92rem; line-height: 1.6; }
.md-typeset code { font-size: 0.86em; }

/* Slightly more open prose leading at the larger scale */
.md-typeset p,
.md-typeset li { line-height: 1.75; }

/* hl_lines focus: brand-orange active-line band (used when a fence sets hl_lines) */
.md-typeset .highlight .hll {
  background-color: #2e7d3222;
  box-shadow: inset 3px 0 0 #2e7d32;
}

/* Mermaid live diagrams: larger labels, centered, palette-aware backgrounds */
.md-typeset .mermaid { text-align: center; }
.md-typeset .mermaid text,
.md-typeset .mermaid .nodeLabel,
.md-typeset .mermaid .edgeLabel { font-size: 18px !important; }
.md-typeset .mermaid .edgeLabel { background: var(--md-default-bg-color); }

/* ============================================================
   LEFT-NAV ON/OFF TOGGLE (recording aid) - button injected by javascripts/nav-toggle.js
   ============================================================ */
.nav-toggle-btn { cursor: pointer; }
.nav-toggle-btn svg { width: 1.2rem; height: 1.2rem; }
/* When toggled off, hide the left sidebar (nav + integrated TOC); content reflows to fill. */
body.nav-hidden .md-sidebar--primary { display: none; }

/* ============================================================
   SOFT-WRAP CODE BLOCKS (recording fix)
   Long lines - mostly the # Question: comments at 175% font - used to overflow the code
   block and force a horizontal scrollbar (you had to scroll right to read them). Wrap them
   instead: break at spaces so code tokens stay intact; break a single over-long token only
   if it truly must. No more horizontal scrolling on camera.
   ============================================================ */
.md-typeset pre > code {
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

/* ============================================================
   FOOTER = near-black #0d1117, matching the top bar (consistent chrome top + bottom).
   PROMINENT PREV/NEXT PAGER (Material's footer nav, already enabled)
   Beginners follow a linear course - make the "Next" / "Previous" links obvious.
   ============================================================ */
:root, [data-md-color-scheme="slate"] {
  --md-footer-bg-color: #0d1117;
  --md-footer-bg-color--dark: #090c10;
}
.md-footer__inner { padding: 0.6rem 0; }
.md-footer__link { padding: 1rem 0.8rem; opacity: 1; border-radius: 0.4rem; transition: background .2s ease; }
.md-footer__link:hover { background: rgba(46, 125, 50, 0.10); }
[data-md-color-scheme="slate"] .md-footer__link:hover { background: rgba(126, 216, 132, 0.12); }
.md-footer__title { font-size: 0.85rem; }
.md-footer__link .md-ellipsis { font-weight: 700; color: var(--md-accent-fg-color); }
.md-footer__direction { opacity: 0.8; font-size: 0.7rem; letter-spacing: 0.04em; text-transform: uppercase; }

/* ============================================================
   SELF-HOSTED FONTS (Inter + JetBrains Mono, latin subset)
   theme.font:false in mkdocs.yml stops Material's Google Fonts <link>; these @font-face blocks
   + the --md-*-font vars drive typography. font-display:swap = instant paint, no FOIT.
   ============================================================ */
@font-face { font-family: 'Inter'; font-style: italic; font-weight: 400; font-display: swap; src: url('../fonts/inter-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 300; font-display: swap; src: url('../fonts/inter-300.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/inter-700.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/jetbrains-mono-400.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/jetbrains-mono-700.woff2') format('woff2'); }
:root { --md-text-font: "Inter"; --md-code-font: "JetBrains Mono"; }

/* ============================================================
   CONTENT HEADINGS IN BRAND GREEN - clearer header hierarchy + matches the green theme.
   Light: readable green on white; Slate: lighter green on dark. Inline code inside a heading
   inherits the green (no code chip) so each heading reads as one clean color.
   ============================================================ */
.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4 {
  color: #2e7d32;
}
[data-md-color-scheme="slate"] .md-typeset h1,
[data-md-color-scheme="slate"] .md-typeset h2,
[data-md-color-scheme="slate"] .md-typeset h3,
[data-md-color-scheme="slate"] .md-typeset h4 {
  color: #7ed884;
}
.md-typeset h1 code,
.md-typeset h2 code,
.md-typeset h3 code,
.md-typeset h4 code {
  color: inherit;
  background: transparent;
  padding: 0;
}

/* Content images carry intrinsic width/height (injected by the sync) so the browser reserves
   space and there is no layout shift (CLS). Keep height auto so they scale proportionally. */
.md-typeset img { height: auto; }

/* Accessibility (WCAG 1.4.1): in-text links are distinguishable by more than color - underline them.
   Buttons and nav links are excluded; table links already underline. */
.md-typeset :is(p, li, td) a:not(.md-button) {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
/* Footer copyright link: underline so it is not color-only (WCAG 1.4.1, Lighthouse link-in-text-block) */
.md-copyright a { text-decoration: underline; text-underline-offset: 0.15em; }
