/* ==========================================================================
   Your Linux Guide — Custom Styles
   Dark terminal theme that overrides Bootstrap 5 defaults.
   Palette:  bg #0d1117 · green #4ade80 · purple #a78bfa
   Fonts:    Inter (body) · Fira Code (code / accents)
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
  /* Colors */
  --ylg-bg: #0d1117;
  --ylg-bg-deep: #070b10;
  --ylg-card: #161b22;
  --ylg-card-2: #1b2230;
  --ylg-border: #30363d;
  --ylg-border-soft: #232a33;
  --ylg-green: #4ade80;
  --ylg-green-soft: rgba(74, 222, 128, 0.12);
  --ylg-purple: #a78bfa;
  --ylg-purple-soft: rgba(167, 139, 250, 0.12);
  --ylg-amber: #e3b341;
  --ylg-text: #e6edf3;
  --ylg-muted: #8b949e;
  --ylg-term-bg: #0a0e14;
  --ylg-term-header: #11161d;

  /* Type */
  --ylg-font-body: "Inter", system-ui, -apple-system, sans-serif;
  --ylg-font-mono: "Fira Code", ui-monospace, "SFMono-Regular", monospace;

  /* Reusable bits */
  --ylg-radius: 14px;
  --ylg-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --ylg-navbar-h: 72px;
}

/* ---------- 2. Base ---------- */
* { -webkit-font-smoothing: antialiased; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--ylg-bg) !important;
  color: var(--ylg-text) !important;
  font-family: var(--ylg-font-body);
  line-height: 1.65;
  margin: 0;
  /* Soft ambient glows in the page corners */
  background-image:
    radial-gradient(700px 420px at 90% -10%, rgba(167, 139, 250, 0.08), transparent 60%),
    radial-gradient(800px 500px at -10% 0%, rgba(74, 222, 128, 0.07), transparent 60%);
  background-attachment: fixed;
  page-break-after: auto;
}

::selection { background: var(--ylg-green); color: #04140a; }

/* Slim custom scrollbar to match the theme */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--ylg-bg); }
::-webkit-scrollbar-thumb {
  background: #2d333b;
  border-radius: 8px;
  border: 3px solid var(--ylg-bg);
}
::-webkit-scrollbar-thumb:hover { background: #444c56; }

h1, h2, h3, h4, h5 { font-weight: 700; letter-spacing: -0.02em; }

a { color: var(--ylg-green); text-decoration: none; }
a:hover { color: #86efac; }

.text-muted-custom { color: var(--ylg-muted) !important; }
code:not(pre code) {
  font-family: var(--ylg-font-mono);
  font-size: 0.85em;
  background: var(--ylg-green-soft);
  color: var(--ylg-green);
  padding: 0.15em 0.45em;
  border-radius: 6px;
}

section[id] { scroll-margin-top: calc(var(--ylg-navbar-h) + 16px); }

/* Main content sits below the fixed navbar */
.ylg-main { padding: calc(var(--ylg-navbar-h) + 32px) 0 24px; min-height: 70vh; }

/* Small uppercase monospace "kicker" label used above headings */
.kicker {
  font-family: var(--ylg-font-mono);
  font-size: 0.8rem;
  color: var(--ylg-green);
  letter-spacing: 0.06em;
  display: inline-block;
  margin-bottom: 0.6rem;
}
.kicker::before { content: "~/"; color: var(--ylg-muted); }

.gradient-text {
  background: linear-gradient(100deg, var(--ylg-green), var(--ylg-purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Section header pattern */
.section { padding: 2.4rem 0; }
.section-title { font-size: 1.75rem; margin-bottom: 0.6rem; }
.section-lead { color: var(--ylg-muted); max-width: 720px; }

/* Page entrance animation ("smooth page transition" — fade in on load) */
@keyframes pageIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
body { animation: pageIn 0.45s ease both; transition: opacity 0.18s ease; }
body.page-leave { opacity: 0; }

/* Scale main containers down a touch on large screens for readability */
@media (min-width: 1200px) { .ylg-main .container { max-width: 1080px; } }

/* ---------- 3. Navbar ---------- */
.ylg-navbar {
  background: rgba(13, 17, 23, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--ylg-border-soft);
  min-height: var(--ylg-navbar-h);
}
.ylg-brand {
  font-family: var(--ylg-font-mono);
  font-weight: 600;
  color: var(--ylg-text) !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.02rem;
}
.ylg-brand i {
  color: var(--ylg-green);
  background: var(--ylg-green-soft);
  border: 1px solid rgba(74, 222, 128, 0.3);
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px;
}
.ylg-navbar .nav-link {
  color: var(--ylg-muted);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  position: relative;
}
.ylg-navbar .nav-link:hover { color: var(--ylg-text); }
.ylg-navbar .nav-link.active { color: var(--ylg-green); }
.ylg-navbar .nav-link.active::after {
  content: "";
  position: absolute;
  left: 0.85rem; right: 0.85rem; bottom: 2px;
  height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--ylg-green), var(--ylg-purple));
}

/* Dark dropdown menu for the Topics list */
.ylg-dropdown {
  background: #151b23;
  border: 1px solid var(--ylg-border);
  border-radius: 12px;
  box-shadow: var(--ylg-shadow);
  min-width: 250px;
  padding: 0.5rem;
  max-height: 70vh; /* scrolls on short/mobile screens */
  overflow-y: auto;
}
.ylg-dropdown .dropdown-item {
  color: var(--ylg-muted);
  border-radius: 8px;
  padding: 0.55rem 0.8rem;
  font-size: 0.92rem;
  display: flex; align-items: center; gap: 10px;
}
.ylg-dropdown .dropdown-item i { color: var(--ylg-green); width: 16px; }
.ylg-dropdown .dropdown-item:hover,
.ylg-dropdown .dropdown-item:focus { background: var(--ylg-card-2); color: var(--ylg-text); }
.ylg-dropdown .dropdown-item.active { background: var(--ylg-green-soft); color: var(--ylg-green); }
.ylg-dropdown .dropdown-divider { border-color: var(--ylg-border-soft); }

/* Navbar topic search */
.ylg-search { position: relative; width: 210px; }
.ylg-search > i {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--ylg-muted); font-size: 0.85rem; pointer-events: none;
}
.ylg-search input {
  background: var(--ylg-card);
  border: 1px solid var(--ylg-border);
  color: var(--ylg-text);
  font-size: 0.9rem;
  border-radius: 999px;
  padding: 0.45rem 1rem 0.45rem 2.15rem;
  width: 100%;
}
.ylg-search input::placeholder { color: #5c6570; }
.ylg-search input:focus {
  outline: none;
  border-color: rgba(74, 222, 128, 0.6);
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.15);
  background: var(--ylg-card-2);
}
.ylg-search-results {
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 320px; max-width: 82vw;
  background: #151b23;
  border: 1px solid var(--ylg-border);
  border-radius: 12px;
  box-shadow: var(--ylg-shadow);
  padding: 0.4rem;
  display: none;
  z-index: 1080;
}
.ylg-search-results.show { display: block; }
.ylg-search-results a {
  display: flex; align-items: center; gap: 10px;
  padding: 0.55rem 0.7rem; border-radius: 8px;
  color: var(--ylg-text); font-size: 0.9rem;
}
.ylg-search-results a:hover { background: var(--ylg-card-2); }
.ylg-search-results .num {
  font-family: var(--ylg-font-mono); font-size: 0.72rem;
  color: var(--ylg-green); background: var(--ylg-green-soft);
  border-radius: 6px; padding: 2px 7px;
}
.ylg-search-results .empty { color: var(--ylg-muted); font-size: 0.85rem; padding: 0.6rem 0.7rem; }

@media (max-width: 991.98px) {
  .ylg-search { width: 100%; margin: 0.5rem 0; }
  .navbar-collapse { padding: 0.5rem 0 1rem; }
}

/* ---------- 4. Buttons ---------- */
.btn-ylg {
  background: var(--ylg-green);
  color: #04140a !important;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  padding: 0.7rem 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn-ylg:hover, .btn-ylg:focus {
  background: #6eeab0;
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(74, 222, 128, 0.28);
}
.btn-ylg-outline {
  background: transparent;
  color: var(--ylg-text);
  border: 1px solid var(--ylg-border);
  border-radius: 10px;
  padding: 0.7rem 1.5rem;
  font-weight: 500;
  transition: all 0.2s ease;
}
.btn-ylg-outline:hover {
  color: var(--ylg-green);
  border-color: rgba(74, 222, 128, 0.55);
  background: var(--ylg-green-soft);
  transform: translateY(-2px);
}
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid rgba(74, 222, 128, 0.7);
  outline-offset: 2px;
}

/* ---------- 5. Hero (homepage) ---------- */
.hero {
  position: relative;
  padding: calc(var(--ylg-navbar-h) + 4.5rem) 0 5rem;
  overflow: hidden;
}
/* Faint terminal-style grid overlay */
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(139, 148, 158, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 148, 158, 0.055) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 25%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 25%, transparent 78%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--ylg-font-mono); font-size: 0.8rem;
  color: var(--ylg-green);
  border: 1px solid rgba(74, 222, 128, 0.35);
  background: var(--ylg-green-soft);
  border-radius: 999px;
  padding: 0.35rem 0.95rem;
  margin-bottom: 1.4rem;
}
.hero-title { font-size: clamp(2.4rem, 5.2vw, 3.9rem); font-weight: 800; line-height: 1.08; }
.hero .lead { color: var(--ylg-muted); font-size: 1.12rem; max-width: 560px; }

/* Small stat pills under the hero buttons */
.hero-stats { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 2.2rem; }
.hero-stat {
  font-family: var(--ylg-font-mono); font-size: 0.78rem;
  color: var(--ylg-muted);
  border: 1px solid var(--ylg-border-soft);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  background: rgba(22, 27, 34, 0.6);
}
.hero-stat b { color: var(--ylg-text); font-weight: 600; }

/* Blinking block cursor used in typed animations */
.cursor {
  display: inline-block;
  width: 9px; height: 1.05em;
  background: var(--ylg-green);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- 6. Topic & info cards ---------- */
.topic-card {
    padding: 30px;
}
.topic-card, .info-card {
  background: var(--ylg-card);
  border: 1px solid var(--ylg-border);
  border-radius: var(--ylg-radius);
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
a.topic-card { display: block; color: var(--ylg-text); height: 100%; }
.topic-card:hover, .info-card:hover { border-color: rgba(74, 222, 128, 0.45); }
a.topic-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(74, 222, 128, 0.15);
}
/* Subtle gradient accent line on top of each card */
.topic-card::before, .info-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--ylg-green), var(--ylg-purple));
  opacity: 0; transition: opacity 0.25s ease;
}
.topic-card:hover::before, .info-card:hover::before, .info-card.accent::before { opacity: 1; }

.topic-icon, .info-icon {
  width: 46px; height: 46px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px;
  font-size: 1.25rem;
  color: var(--ylg-green);
  background: var(--ylg-green-soft);
  border: 1px solid rgba(74, 222, 128, 0.25);
  margin-bottom: 1rem;
}
.info-icon.purple { color: var(--ylg-purple); background: var(--ylg-purple-soft); border-color: rgba(167, 139, 250, 0.25); }
.info-icon.amber { color: var(--ylg-amber); background: rgba(227, 179, 65, 0.1); border-color: rgba(227, 179, 65, 0.25); }

.card-num {
  position: absolute; top: 1.1rem; right: 1.2rem;
  font-family: var(--ylg-font-mono); font-size: 0.8rem;
  color: var(--ylg-muted);
}
.topic-card h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.topic-card p { color: var(--ylg-muted); font-size: 0.92rem; margin-bottom: 0.9rem; }
.card-cta {
  font-size: 0.88rem; font-weight: 600; color: var(--ylg-green);
  display: inline-flex; align-items: center; gap: 6px;
}
.card-cta i { transition: transform 0.2s ease; }
.topic-card:hover .card-cta i { transform: translateX(4px); }

/* "Completed" badge, revealed when localStorage flags the topic */
.card-done {
  display: none;
  position: absolute; bottom: 1.2rem; right: 1.2rem;
  font-size: 0.75rem; font-weight: 600;
  color: var(--ylg-green);
  background: var(--ylg-green-soft);
  border: 1px solid rgba(74, 222, 128, 0.3);
  padding: 3px 10px; border-radius: 999px;
}
.is-completed .card-done { display: inline-flex; align-items: center; gap: 5px; }
.is-completed { border-color: rgba(74, 222, 128, 0.5); }

/* ---------- 7. Progress bar & complete box ---------- */
.ylg-progress {
  background: var(--ylg-card-2);
  border: 1px solid var(--ylg-border-soft);
  border-radius: 999px;
  height: 14px;
  overflow: hidden;
}
.ylg-progress.slim { height: 8px; }
.ylg-progress .progress-bar {
  background: linear-gradient(90deg, var(--ylg-green), var(--ylg-purple));
  border-radius: 999px;
  transition: width 0.5s ease;
}

.progress-card {
  background: var(--ylg-card);
  border: 1px solid var(--ylg-border);
  border-radius: var(--ylg-radius);
  padding: 1.75rem;
}

/* The "Mark as Completed" call-out at the bottom of every topic page */
.complete-box {
  display: flex; flex-wrap: wrap; gap: 1rem;
  align-items: center; justify-content: space-between;
  background: linear-gradient(120deg, rgba(74, 222, 128, 0.07), rgba(167, 139, 250, 0.07));
  border: 1px solid var(--ylg-border);
  border-radius: var(--ylg-radius);
  padding: 1.5rem 1.75rem;
  margin-top: 3rem;
}
.complete-box h5 { margin-bottom: 0.2rem; }
.complete-box p { color: var(--ylg-muted); font-size: 0.9rem; margin: 0; }

.ylg-complete-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 0.92rem;
  color: var(--ylg-green);
  background: transparent;
  border: 1px solid rgba(74, 222, 128, 0.5);
  border-radius: 10px;
  padding: 0.6rem 1.3rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.ylg-complete-btn:hover { background: var(--ylg-green-soft); transform: translateY(-2px); }
.ylg-complete-btn.is-done {
  background: var(--ylg-green);
  border-color: var(--ylg-green);
  color: #04140a;
}

/* ---------- 8. Terminal code blocks ---------- */
.terminal-block {
  background: var(--ylg-term-bg);
  border: 1px solid #26314a;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  margin: 1.1rem 0;
}
.terminal-header {
  display: flex; align-items: center; gap: 8px;
  background: var(--ylg-term-header);
  border-bottom: 1px solid #1f2733;
  padding: 8px 12px;
}
.t-dot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.t-dot.red { background: #ff5f57; }
.t-dot.yellow { background: #febc2e; }
.t-dot.green { background: #28c840; }
.terminal-title {
  flex: 1; text-align: center;
  font-family: var(--ylg-font-mono);
  font-size: 0.72rem;
  color: #5c6570;
  user-select: none;
}
.copy-btn {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.72rem; font-weight: 600;
  color: var(--ylg-muted);
  background: transparent;
  border: 1px solid var(--ylg-border);
  border-radius: 7px;
  padding: 3px 10px;
  transition: all 0.2s ease;
  flex: none;
}
.copy-btn:hover { color: var(--ylg-green); border-color: rgba(74, 222, 128, 0.5); }
.copy-btn.copied { color: #04140a; background: var(--ylg-green); border-color: var(--ylg-green); }

.terminal-body {
  margin: 0;
  padding: 14px 16px;
  font-family: var(--ylg-font-mono);
  font-size: 0.87rem;
  line-height: 1.7;
  color: var(--ylg-text);
  overflow-x: auto;
  white-space: pre;
}
.terminal-body .cmdline { display: block; }
.terminal-body .prompt { color: var(--ylg-green); margin-right: 8px; user-select: none; }
.terminal-body .prompt .path { color: var(--ylg-purple); }
.terminal-body .output { color: var(--ylg-muted); display: block; }
.terminal-body .comment { color: #6e7781; font-style: italic; display: block; }

/* ---------- 9. Breadcrumbs & pager ---------- */
.ylg-breadcrumb { margin-bottom: 1.75rem; }
.ylg-breadcrumb .breadcrumb {
  background: transparent;
  padding: 0;
  margin: 0;
  font-size: 0.86rem;
  --bs-breadcrumb-divider-color: #4b5563;
}
.ylg-breadcrumb .breadcrumb-item a { color: var(--ylg-muted); }
.ylg-breadcrumb .breadcrumb-item a:hover { color: var(--ylg-green); }
.ylg-breadcrumb .breadcrumb-item.active { color: var(--ylg-text); font-weight: 500; }
.ylg-breadcrumb .breadcrumb-item + .breadcrumb-item::before { content: "/"; font-family: var(--ylg-font-mono); }

/* Previous / next topic navigation */
.pager { margin-top: 2rem; gap: 1rem; }
.pager-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ylg-muted);
  border: 1px solid var(--ylg-border);
  border-radius: 10px;
  padding: 0.65rem 1.1rem;
  font-size: 0.9rem; font-weight: 500;
  transition: all 0.2s ease;
  max-width: 48%;
}
.pager-link:hover { color: var(--ylg-green); border-color: rgba(74, 222, 128, 0.5); background: var(--ylg-green-soft); }
.pager-link.next { margin-left: auto; text-align: right; }
.pager-link .dir { font-family: var(--ylg-font-mono); font-size: 0.7rem; color: #5c6570; display: block; }
.pager-link .lbl { display: block; }

/* ---------- 10. Tables (dark overrides) ---------- */
.table-card {
  border: 1px solid var(--ylg-border);
  border-radius: var(--ylg-radius);
  overflow: hidden;
  background: var(--ylg-card);
}
.ylg-table, .table {
  --bs-table-color: var(--ylg-text);
  --bs-table-bg: transparent;
  --bs-table-border-color: var(--ylg-border-soft);
  margin-bottom: 0;
  font-size: 0.93rem;
}
.ylg-table thead th {
  font-family: var(--ylg-font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--ylg-green);
  background: var(--ylg-term-header);
  border-bottom-color: var(--ylg-border);
}
.ylg-table td code { white-space: nowrap; }
.ylg-table tbody tr:hover { --bs-table-bg: rgba(74, 222, 128, 0.04); }
.table > :not(caption) > * > * { background: transparent; box-shadow: none; }

/* ---------- 11. File-system & distro trees ---------- */
.ylg-tree, .ylg-tree ul { list-style: none; margin: 0; padding: 0; }
.ylg-tree ul { padding-left: 26px; }
.ylg-tree li { position: relative; padding: 6px 0 6px 26px; }
/* connector lines */
.ylg-tree li::before {
  content: ""; position: absolute; top: 0; left: 8px; height: 100%; width: 1px;
  background: var(--ylg-border);
}
.ylg-tree li::after {
  content: ""; position: absolute; top: 21px; left: 8px; width: 18px; height: 1px;
  background: var(--ylg-border);
}
.ylg-tree li:last-child::before { height: 21px; }
.ylg-tree > li { padding-left: 0; }
.ylg-tree > li::before, .ylg-tree > li::after { display: none; }

/* Individual tree node chip */
.node-card {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--ylg-card);
  border: 1px solid var(--ylg-border);
  border-radius: 9px;
  padding: 0.32rem 0.8rem;
  font-family: var(--ylg-font-mono);
  font-size: 0.85rem;
  transition: all 0.2s ease;
}
.node-card:hover { border-color: rgba(74, 222, 128, 0.5); transform: translateX(3px); }
.node-card i { color: var(--ylg-amber); }
.node-card .desc {
  font-family: var(--ylg-font-body);
  color: var(--ylg-muted);
  font-size: 0.76rem;
}
.node-card.root { border-color: rgba(74, 222, 128, 0.45); background: var(--ylg-green-soft); }
.node-card.purple { border-color: rgba(167, 139, 250, 0.45); }
.node-card.purple i { color: var(--ylg-purple); }
.node-card.green i { color: var(--ylg-green); }

/* "Based on" chain:  Debian → Ubuntu → Mint */
.chain { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0.4rem 0; }
.chain-badge {
  font-family: var(--ylg-font-mono); font-size: 0.8rem;
  border: 1px solid var(--ylg-border);
  background: var(--ylg-card);
  border-radius: 8px;
  padding: 4px 12px;
}
.chain-badge.hl { border-color: rgba(74, 222, 128, 0.5); color: var(--ylg-green); background: var(--ylg-green-soft); }
.chain-badge.hl-purple { border-color: rgba(167, 139, 250, 0.5); color: var(--ylg-purple); background: var(--ylg-purple-soft); }
.chain i { color: var(--ylg-muted); font-size: 0.8rem; }

/* ---------- 12. Timeline, permissions diagram, callouts ---------- */
.timeline { border-left: 2px solid var(--ylg-border); padding-left: 26px; margin-left: 6px; }
.timeline-item { position: relative; padding-bottom: 1.9rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ""; position: absolute; left: -33px; top: 6px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--ylg-green);
  box-shadow: 0 0 0 4px var(--ylg-bg), 0 0 14px rgba(74, 222, 128, 0.8);
}
.timeline-item.purple-dot::before { background: var(--ylg-purple); box-shadow: 0 0 0 4px var(--ylg-bg), 0 0 14px rgba(167, 139, 250, 0.8); }
.timeline-year { font-family: var(--ylg-font-mono); color: var(--ylg-green); font-size: 0.85rem; font-weight: 600; }
.timeline-item h5 { margin: 0.15rem 0 0.3rem; font-size: 1.02rem; }
.timeline-item p { color: var(--ylg-muted); font-size: 0.9rem; margin: 0; }

/* rwx permutation diagram: - rwx rw- r-- */
.perm-diagram { display: flex; flex-wrap: wrap; gap: 14px; margin: 1rem 0; }
.perm-group { text-align: center; }
.perm-cells { display: inline-flex; gap: 4px; }
.perm-cell {
  width: 40px; height: 46px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--ylg-font-mono); font-size: 1.15rem; font-weight: 600;
  border: 1px solid var(--ylg-border);
  background: var(--ylg-card);
  border-radius: 9px;
}
.perm-group.owner .perm-cell { color: var(--ylg-green); border-color: rgba(74, 222, 128, 0.45); background: var(--ylg-green-soft); }
.perm-group.group .perm-cell { color: var(--ylg-purple); border-color: rgba(167, 139, 250, 0.45); background: var(--ylg-purple-soft); }
.perm-group.others .perm-cell { color: var(--ylg-muted); }
.perm-label { display: block; margin-top: 6px; font-size: 0.75rem; color: var(--ylg-muted); font-weight: 600; }
.perm-label code { font-size: 0.72rem; }

/* Informational call-outs */
.callout {
  display: flex; gap: 12px;
  background: var(--ylg-card);
  border: 1px solid var(--ylg-border);
  border-left: 3px solid var(--ylg-green);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  margin: 1.2rem 0;
  font-size: 0.92rem;
  color: #c9d1d9;
}
.callout i { color: var(--ylg-green); font-size: 1.15rem; flex: none; margin-top: 2px; }
.callout.purple { border-left-color: var(--ylg-purple); }
.callout.purple i { color: var(--ylg-purple); }
.callout.warning { border-left-color: var(--ylg-amber); }
.callout.warning i { color: var(--ylg-amber); }
.callout b { color: var(--ylg-text); }

/* Flag chips e.g. "-l", "-a" next to commands */
.flag-chip {
  font-family: var(--ylg-font-mono); font-size: 0.75rem;
  color: var(--ylg-purple);
  background: var(--ylg-purple-soft);
  border: 1px solid rgba(167, 139, 250, 0.3);
  border-radius: 999px;
  padding: 2px 10px;
}
.flag-chip.green { color: var(--ylg-green); background: var(--ylg-green-soft); border-color: rgba(74, 222, 128, 0.3); }

/* ---------- 13. Quiz ---------- */
.quiz-card {
  background: var(--ylg-card);
  border: 1px solid var(--ylg-border);
  border-radius: 18px;
  box-shadow: var(--ylg-shadow);
}
.quiz-q { font-size: 1.25rem; font-weight: 700; margin-bottom: 1.3rem; }
.quiz-answer {
  display: block; width: 100%; text-align: left;
  background: var(--ylg-card-2);
  color: var(--ylg-text);
  border: 1px solid var(--ylg-border);
  border-radius: 12px;
  padding: 0.9rem 1.15rem;
  margin-bottom: 0.7rem;
  font-size: 0.95rem;
  transition: all 0.18s ease;
}
.quiz-answer:hover {
  border-color: rgba(74, 222, 128, 0.55);
  background: var(--ylg-green-soft);
  transform: translateX(5px);
}
.quiz-answer .key {
  font-family: var(--ylg-font-mono); font-size: 0.75rem;
  color: var(--ylg-green); border: 1px solid rgba(74, 222, 128, 0.4);
  border-radius: 6px; padding: 1px 8px; margin-right: 10px;
}
.quiz-result { text-align: center; padding: 0.5rem 0; }
.quiz-result .result-icon {
  width: 76px; height: 76px; margin: 0 auto 1.2rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--ylg-green);
  background: var(--ylg-green-soft);
  border: 1px solid rgba(74, 222, 128, 0.35);
  border-radius: 22px;
  box-shadow: 0 0 44px rgba(74, 222, 128, 0.18);
}
.quiz-result .badge {
  background: var(--ylg-purple-soft); color: var(--ylg-purple);
  border: 1px solid rgba(167, 139, 250, 0.35);
  font-weight: 600; font-size: 0.75rem;
  border-radius: 999px; padding: 5px 14px;
}
@keyframes popIn { from { opacity: 0; transform: scale(0.96) translateY(8px); } to { opacity: 1; transform: none; } }
.quiz-anim { animation: popIn 0.28s ease both; }

/* ---------- 14. Footer & back-to-top ---------- */
.ylg-footer {
  border-top: 1px solid var(--ylg-border-soft);
  background: rgba(10, 14, 20, 0.7);
  color: var(--ylg-muted);
  font-size: 0.88rem;
}
.ylg-footer a { color: var(--ylg-muted); }
.ylg-footer a:hover { color: var(--ylg-green); }
.ylg-footer .brand { color: var(--ylg-text); font-family: var(--ylg-font-mono); font-weight: 600; }
.ylg-footer .brand i { color: var(--ylg-green); }

.ylg-backtop {
  position: fixed; right: 22px; bottom: 22px; z-index: 1050;
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ylg-green);
  background: var(--ylg-card-2);
  border: 1px solid rgba(74, 222, 128, 0.4);
  border-radius: 12px;
  font-size: 1.1rem;
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: all 0.25s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.ylg-backtop.show { opacity: 1; visibility: visible; transform: none; }
.ylg-backtop:hover { background: var(--ylg-green); color: #04140a; }

/* ---------- 15. Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  body { animation: none; }
}

/* ---------- 16. Utility ---------- */
.divider { border: 0; border-top: 1px solid var(--ylg-border-soft); margin: 3rem 0; }
.mini-label { font-family: var(--ylg-font-mono); font-size: 0.72rem; color: #5c6570; letter-spacing: 0.08em; text-transform: uppercase; }

/* ---------- 17. Theme toggle & light theme ---------- */
/* The round toggle button in the navbar */
.ylg-theme-toggle {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  color: var(--ylg-muted);
  border: 1px solid var(--ylg-border);
  border-radius: 10px;
  font-size: 1rem;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.3s ease;
}
.ylg-theme-toggle:hover {
  color: var(--ylg-green);
  border-color: rgba(74, 222, 128, 0.5);
  transform: rotate(20deg);
}

/* Smooth color cross-fade while switching (class removed after ~400 ms) */
html.theme-anim .ylg-navbar,
html.theme-anim .card,
html.theme-anim .topic-card,
html.theme-anim .info-card,
html.theme-anim .table-card,
html.theme-anim .progress-card,
html.theme-anim .quiz-card,
html.theme-anim .quiz-answer,
html.theme-anim .callout,
html.theme-anim .complete-box,
html.theme-anim .ylg-dropdown,
html.theme-anim .ylg-search-results,
html.theme-anim .ylg-search input,
html.theme-anim .ylg-footer,
html.theme-anim .node-card,
html.theme-anim .chain-badge,
html.theme-anim .perm-cell,
html.theme-anim .pager-link,
html.theme-anim .ylg-theme-toggle,
html.theme-anim .hero-stat {
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
html.theme-anim body { transition: opacity 0.18s ease, background-color 0.35s ease, color 0.35s ease; }

/* ==========================================================================
   LIGHT THEME — applied when <html data-theme="light">.
   CSS variables do the heavy lifting; the rules below patch hardcoded dark
   pieces. Terminal blocks intentionally STAY dark — like a real terminal.
   ========================================================================== */
html[data-theme="light"] {
  --ylg-bg: #f6f8fa;
  --ylg-bg-deep: #eceff4;
  --ylg-card: #ffffff;
  --ylg-card-2: #f0f3f8;
  --ylg-border: #d4dae3;
  --ylg-border-soft: #e3e8ef;
  --ylg-text: #1f2328;
  --ylg-muted: #59636e;
  --ylg-green: #16a34a;      /* darker: readable on light surfaces */
  --ylg-green-soft: rgba(22, 163, 74, 0.09);
  --ylg-purple: #7c3aed;
  --ylg-purple-soft: rgba(124, 58, 237, 0.08);
  --ylg-amber: #9a6700;
  --ylg-term-bg: #0d1117;    /* unchanged — terminals stay dark */
  --ylg-term-header: #161b22;
}

html[data-theme="light"] body {
  background-image:
    radial-gradient(700px 420px at 90% -10%, rgba(124, 58, 237, 0.05), transparent 60%),
    radial-gradient(800px 500px at -10% 0%, rgba(22, 163, 74, 0.05), transparent 60%);
}
html[data-theme="light"] ::selection { background: var(--ylg-green); color: #ffffff; }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: #c4cdd8; border-color: var(--ylg-bg); }
html[data-theme="light"] a:hover { color: #117c37; }

/* Chrome & navigation */
html[data-theme="light"] .ylg-navbar { background: rgba(255, 255, 255, 0.85); border-bottom-color: var(--ylg-border-soft); }
html[data-theme="light"] .ylg-dropdown,
html[data-theme="light"] .ylg-search-results { background: #ffffff; box-shadow: 0 14px 38px rgba(31, 41, 55, 0.16); }
html[data-theme="light"] .ylg-theme-toggle:hover { border-color: rgba(22, 163, 74, 0.45); }

/* Buttons that put dark text on the green accent → white text in light mode */
html[data-theme="light"] .btn-ylg,
html[data-theme="light"] .copy-btn.copied,
html[data-theme="light"] .ylg-complete-btn.is-done { color: #ffffff !important; }
html[data-theme="light"] .btn-ylg:hover,
html[data-theme="light"] .btn-ylg:focus { background: #15803d; box-shadow: 0 8px 24px rgba(22, 163, 74, 0.3); }
html[data-theme="light"] .ylg-backtop:hover { color: #ffffff; }

/* Hero extras */
html[data-theme="light"] .hero::before {
  background-image:
    linear-gradient(rgba(100, 116, 139, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 116, 139, 0.09) 1px, transparent 1px);
}
html[data-theme="light"] .hero-stat { background: #ffffff; }
html[data-theme="light"] .hero-tag { border-color: rgba(22, 163, 74, 0.4); }

/* Card shadows — softer on a light background */
html[data-theme="light"] .terminal-block { box-shadow: 0 14px 34px rgba(31, 41, 55, 0.14); }
html[data-theme="light"] .quiz-card { box-shadow: 0 14px 38px rgba(31, 41, 55, 0.1); }
html[data-theme="light"] a.topic-card:hover { box-shadow: 0 18px 40px rgba(31, 41, 55, 0.13), 0 0 0 1px rgba(22, 163, 74, 0.18); }

/* Hardcoded dark greys → light-friendly */
html[data-theme="light"] .callout { color: #3d4651; }
html[data-theme="light"] .mini-label { color: #94a0ad; }

/* Table headers: they reuse the dark terminal color by default — keep light */
html[data-theme="light"] .ylg-table thead th { background: var(--ylg-card-2); }

/* Terminal content must stay readable on its (still dark) background */
html[data-theme="light"] .terminal-header { border-bottom-color: #2b333f; }
html[data-theme="light"] .terminal-title { color: #8b949e; }
html[data-theme="light"] .terminal-body { color: #e6edf3; }
html[data-theme="light"] .terminal-body .output { color: #8b949e; }
html[data-theme="light"] .terminal-body .comment { color: #7d8590; }
html[data-theme="light"] .terminal-body .prompt { color: #4ade80; }
html[data-theme="light"] .terminal-body .cursor { background: #4ade80; }
html[data-theme="light"] .copy-btn { color: #9aa4b2; border-color: #3a4252; }
html[data-theme="light"] .copy-btn:hover { color: #4ade80; border-color: rgba(74, 222, 128, 0.55); }

/* Footer */
html[data-theme="light"] .ylg-footer { background: #ffffff; }

/* ==========================================================================
   RESOURCES SECTION — drop-in styles (scoped to #resources)
   Cards use Bootstrap classes (bg-dark, text-white, border-secondary);
   the rules below only add the icon chips, tag pills and hover glow
   without touching any existing component.
   ========================================================================== */

/* Cards are full-area <a> links — kill default link colour & underline */
#resources .resource-card {
  color: inherit;
  text-decoration: none;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
#resources .resource-card:hover,
#resources .resource-card:focus-visible {
  color: inherit;
  text-decoration: none;
  border-color: #4ade80;
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(74, 222, 128, 0.16), 0 0 0 1px rgba(74, 222, 128, 0.28);
}

/* Preview images: book covers (green accent) & channel avatars (purple accent) */
#resources .resource-img {
  flex: none;
  object-fit: cover;
  background: var(--ylg-card-2);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
#resources .resource-card:hover .resource-img {
  transform: scale(1.05);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}
#resources .resource-cover {
  width: 60px;
  height: 90px;
  border-radius: 8px;
  border: 1px solid rgba(74, 222, 128, 0.4);
}
#resources .resource-avatar {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  border: 1px solid rgba(167, 139, 250, 0.4);
}
html[data-theme="light"] .resource-img { box-shadow: 0 6px 16px rgba(31, 41, 55, 0.18); }

/* Decorative icon chip (top-left of each card) */
#resources .resource-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #4ade80;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: 12px;
}
/* Channels get the purple accent instead of green */
#resources .channel-icon {
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.1);
  border-color: rgba(167, 139, 250, 0.3);
}

/* Tag pills (override Bootstrap .badge colours to match the accent) */
#resources .resource-tag {
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #4ade80;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.3);
}
#resources .channel-tag {
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.1);
  border-color: rgba(167, 139, 250, 0.3);
}

/* Author / creator line under the title */
#resources .resource-meta {
  color: #8b949e;
  font-size: 0.85rem;
}

/* "Open link" call-to-action at the bottom of each card */
#resources .resource-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #4ade80;
  font-weight: 600;
  margin-top: 0.35rem;
}
#resources .resource-cta i { transition: transform 0.2s ease; }
#resources .resource-card:hover .resource-cta i { transform: translate(2px, -2px); }

/* ---------- 18. Print styles (cheat sheet) ---------- */
@media print {
  .ylg-navbar, .ylg-footer, .ylg-backtop, .no-print, .ylg-breadcrumb, .pager, .complete-box { display: none !important; }
  body { background: #fff !important; color: #111 !important; animation: none; }
  .ylg-main, .hero { padding-top: 0 !important; }
  .ylg-main .container { max-width: 100% !important; }
  h1, h2, h3, h4, h5, p, li, td, th, span, div { color: #111 !important; }
  .card, .info-card, .table-card, .progress-card, .quiz-card {
    background: #fff !important; border-color: #bbb !important; box-shadow: none !important;
    break-inside: avoid;
  }
  .terminal-block { border-color: #999 !important; break-inside: avoid; }
  .terminal-header { background: #eee !important; }
  .terminal-body, .terminal-body .output, .terminal-body .prompt { color: #000 !important; }
  .ylg-table thead th { background: #eee !important; color: #000 !important; }
  .table { --bs-table-border-color: #999; border: 1px solid #999; }
  code:not(pre code) { background: #eee !important; color: #000 !important; }
  .kicker, .gradient-text, .mini-label { color: #000 !important; }
  a { color: #000 !important; }
  .section { padding: 1rem 0 !important; }
}

/* ---------- 15. Practice Terminal embed (practice.html) ---------- */
/* Reuses the site's terminal chrome; the live sandbox sits where the
   <pre> body normally would. Stays dark in both themes, like code blocks. */
.practice-embed {
  background: var(--ylg-term-bg);
  border: 1px solid #26314a;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}
.practice-embed-header { position: relative; }
.practice-embed-actions { display: inline-flex; gap: 6px; flex: none; }
.practice-embed-actions .copy-btn { text-decoration: none; }
.practice-embed-actions .copy-btn:disabled { opacity: 0.45; pointer-events: none; }

.practice-embed-body {
  position: relative;
  height: min(64vh, 620px);
  min-height: 380px;
  background: #0a0e14;
}

/* The live terminal (terminal.js) */
.ylg-term {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 14px 16px;
  font-family: var(--ylg-font-mono);
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--ylg-text);
  cursor: text;
}
.ylg-term-out { white-space: pre-wrap; word-break: break-word; }
.ylg-term-block { min-height: 1.2em; }
.ylg-term-block.is-err { color: #ff7b72; }
.ylg-term-block.is-echo { color: var(--ylg-text); }
.ylg-term-block .p-user, .ylg-term-prompt .p-user { color: var(--ylg-green); }
.ylg-term-block .p-path, .ylg-term-prompt .p-path { color: var(--ylg-purple); }

.ylg-term-line { display: flex; align-items: baseline; gap: 8px; }
.ylg-term-prompt { flex: none; user-select: none; }
.ylg-term-input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--ylg-text);
  font: inherit;
  padding: 0;
  caret-color: var(--ylg-green);
  min-width: 0;
}
.ylg-term-input::placeholder { color: #3d4653; }
.ylg-term-input:focus::placeholder { color: transparent; }

/* Attribution / fallback line under the embed */
.practice-credit a { color: var(--ylg-green); }

/* Fullscreen — native API target + CSS fallback (position: fixed) */
.practice-embed:fullscreen { border-radius: 0; border: 0; }
.practice-embed:fullscreen .practice-embed-body { height: calc(100vh - 38px); min-height: 0; }
.practice-embed.is-fs-fallback {
  position: fixed; inset: 0;
  z-index: 2000;
  border-radius: 0; border: 0;
}
.practice-embed.is-fs-fallback .practice-embed-body { height: calc(100vh - 38px); min-height: 0; }
html.ylg-noscroll, html.ylg-noscroll body { overflow: hidden; }

/* Light theme: keep the sandbox chrome dark (matches .terminal-block rule) */
html[data-theme="light"] .practice-embed { box-shadow: 0 14px 34px rgba(31, 41, 55, 0.16); }

/* Smaller screens: give the sandbox more vertical room, wrap the actions */
@media (max-width: 575.98px) {
  .practice-embed-body { height: 62vh; min-height: 340px; }
  .ylg-term { font-size: 0.8rem; }
  .practice-embed-actions .copy-btn span { display: none; } /* icons only */
}

/* Run buttons (type the block's commands into the live terminal) */
.run-btn { color: var(--ylg-green); border-color: rgba(74, 222, 128, 0.35); }
.run-btn:hover { color: #04140a; background: var(--ylg-green); border-color: var(--ylg-green); }

/* ---------- 17. sandbox.bio in-panel embed (practice.html) ---------- */
/* The panel that hosts the real terminal */
#sbEmbed .practice-embed-body {
  height: min(72vh, 700px);
  min-height: 460px;
  overflow: hidden; /* clips the embed page's internal header bar (below) */
}
/* The terminal frame: always visible (hidden lazy iframes never load), and
   positioned 40px ABOVE the panel so the embed page's own "sandbox.bio
   terminal" header bar is clipped out of sight — only the terminal shows.
   main.js compensates by adding the same 40px to the `h` param. */
#sbFrame {
  position: absolute;
  top: -40px; left: 0;
  width: 100%;
  height: calc(100% + 40px);
  border: 0;
  background: #0a0e14;
  color-scheme: normal; /* matches sandbox.bio's own embed.js */
}
/* Overlays sit on top of the frame */
#sbEmbed .practice-placeholder, #sbEmbed .practice-loading { z-index: 2; }

/* Click-to-load placeholder */
.practice-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1rem;
  text-align: center;
  padding: 2rem 1.25rem;
  background:
    radial-gradient(500px 300px at 50% 10%, rgba(74, 222, 128, 0.07), transparent 65%),
    #0a0e14;
}
.practice-placeholder .ph-prompt { font-family: var(--ylg-font-mono); font-size: 1rem; color: var(--ylg-text); }
.practice-placeholder .ph-prompt .prompt { color: var(--ylg-green); margin-right: 8px; }
.practice-placeholder .ph-cmd { color: var(--ylg-purple); }
.practice-placeholder .ph-text { color: var(--ylg-muted); font-size: 0.95rem; margin: 0; max-width: 560px; }
.practice-placeholder .ph-hint { color: var(--ylg-muted); font-size: 0.8rem; margin: 0; display: inline-flex; align-items: center; gap: 6px; max-width: 560px; }
.practice-placeholder .ph-hint i { color: var(--ylg-green); }

/* Boot spinner overlay */
.practice-loading {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 0.9rem;
  color: var(--ylg-muted);
  font-family: var(--ylg-font-mono);
  font-size: 0.85rem;
  text-align: center;
  background: #0a0e14;
}
.practice-loading .spinner-border { color: var(--ylg-green); }

/* Status chip in the panel header */
.sb-chip { pointer-events: none; }
.sb-chip.is-ready { color: var(--ylg-green); border-color: rgba(74, 222, 128, 0.5); }

/* Built-in fallback terminal, collapsed into a <details> */
.practice-fallback {
  border: 1px dashed var(--ylg-border);
  border-radius: var(--ylg-radius);
  padding: 0.9rem 1.1rem;
  background: var(--ylg-card);
}
.practice-fallback summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ylg-text);
  display: flex; align-items: center; gap: 8px;
  list-style: none;
}
.practice-fallback summary::-webkit-details-marker { display: none; }
.practice-fallback summary i { color: var(--ylg-green); }
.practice-fallback summary::after {
  content: "▾"; margin-left: auto; color: var(--ylg-muted);
  transition: transform 0.2s ease;
}
.practice-fallback[open] summary::after { transform: rotate(180deg); }
.practice-fallback .practice-embed { margin-top: 0.35rem; }
html[data-theme="light"] .practice-fallback { background: #ffffff; border-color: #d5dbe3; }
html[data-theme="light"] .practice-fallback summary { color: #1f2937; }

/* Navbar theme toggle spacing */
#themeToggle {
  margin-right: 12px;
}
