/* Cypherpunk School 101 - Matrix/Terminal Theme */
/* Pure CSS - No JavaScript - Secure */

/* ========================================
   MATRIX GREEN COLOR PALETTE
   ======================================== */
:root {
  --matrix-green: #00ff41;
  --matrix-green-dim: #00cc33;
  --matrix-green-dark: #00aa2a;
  --matrix-green-glow: rgba(0, 255, 65, 0.15);
  --terminal-bg: #0a0f0a;
  --terminal-bg-light: #0d1a0d;
  --terminal-border: #1a3a1a;
  /* Blue accent for quotes */
  --quote-blue: #58a6ff;
  --quote-blue-dim: #388bfd;
  --quote-blue-glow: rgba(88, 166, 255, 0.1);
}

/* ========================================
   BODY BACKGROUND - MATRIX GRADIENT
   ======================================== */
/* Reserve scrollbar space on every page so the centered nav + content don't
   shift ~16px between scrolling and non-scrolling pages (the A/B nav difference).
   Also removes the layout jump when navigating between short and long pages. */
html {
  scrollbar-gutter: stable;
}

/* Zero the default body margin on EVERY page. PaperMod pages reset it; the
   full-HTML cps-page layouts (landings/podcast/about/donate/resources) did not,
   so they carried an 8px margin → nav inset ~16px vs PaperMod pages, and the
   full-bleed bands stopped short of the screen edges. One reset fixes both. */
body {
  margin: 0;
}

body.dark {
  background: linear-gradient(
    180deg,
    #0d1117 0%,
    #0a0f0a 30%,
    #0d1117 100%
  ) !important;
  background-attachment: fixed !important;
}

/* Subtle grid pattern overlay for matrix feel */
body.dark::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(rgba(0, 255, 65, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 65, 0.02) 1px, transparent 1px);
  background-size: 50px 50px;
}

/* ========================================
   SIMPLE STICKY TOC (IN-FLOW)
   ======================================== */

/* Desktop: Make ToC sticky */
@media screen and (min-width: 768px) {
  .toc {
    position: -webkit-sticky;
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    margin-bottom: 2rem;
    z-index: 100;
  }

  .toc::-webkit-scrollbar {
    width: 6px;
  }

  .toc::-webkit-scrollbar-track {
    background: var(--theme);
  }

  .toc::-webkit-scrollbar-thumb {
    background: var(--matrix-green-dark);
    border-radius: 3px;
  }
}

/* Mobile: Collapsible */
@media screen and (max-width: 767px) {
  .toc {
    margin-bottom: 2rem;
  }

  .toc details:not([open]) summary::after {
    content: " (tap to expand)";
    font-size: 0.85em;
    color: var(--secondary);
  }
}

/* ========================================
   TOC STYLING
   ======================================== */

.toc details {
  background: var(--code-bg);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.toc summary {
  cursor: pointer;
  font-weight: 600;
  user-select: none;
  margin-bottom: 0.5rem;
}

.toc ul {
  margin: 0.5rem 0 0 0;
  padding-left: 1.2rem;
  list-style: none;
}

.toc li {
  margin: 0.4rem 0;
  line-height: 1.6;
}

.toc a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-block;
  font-size: 0.95em;
}

.toc a:hover {
  color: var(--matrix-green);
  padding-left: 0.25rem;
}

.toc ul ul {
  padding-left: 1rem;
  border-left: 2px solid var(--border);
  margin-left: 0.5rem;
}

.toc ul ul a {
  font-size: 0.9em;
  color: var(--secondary);
}

/* ========================================
   BETTER READABILITY
   ======================================== */

.post-content h2 {
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  padding-top: 1rem;
  border-top: 2px solid var(--border);
}

.post-content h2:first-child {
  border-top: none;
  margin-top: 0;
}

.post-content h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

/* ========================================
   CODE BLOCKS - MATRIX TERMINAL STYLE
   ======================================== */

/* Code blocks - dark with green tint */
.post-content pre,
.highlight pre,
.highlight {
  background: var(--terminal-bg) !important;
  border: 1px solid var(--terminal-border) !important;
  border-left: 1px solid var(--matrix-green-dark) !important;
  border-radius: 6px;
  position: relative;
}

.post-content pre,
.highlight pre {
  padding: 1rem;
  overflow-x: auto;
  font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;
  font-size: 0.9em;
  line-height: 1.5;
}

.post-content pre code,
.highlight pre code {
  background: transparent !important;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
  color: #b8d4b8;
}

/* Syntax highlighting - matrix green tones */
.highlight .c, .highlight .c1, .highlight .cm { color: #4a7a4a; } /* comments - dim green */
.highlight .k, .highlight .kd, .highlight .kn { color: var(--matrix-green); } /* keywords - bright green */
.highlight .s, .highlight .s1, .highlight .s2 { color: #7ec87e; } /* strings - light green */
.highlight .nf, .highlight .nb { color: #5fd35f; } /* functions */
.highlight .nv, .highlight .vi { color: #98d998; } /* variables */
.highlight .mi, .highlight .mf { color: #66cc66; } /* numbers */
.highlight .o, .highlight .p { color: #88aa88; } /* operators, punctuation */

/* Inline code - subtle green highlight */
.post-content code:not(pre code) {
  background: var(--terminal-bg-light);
  color: #a8d8a8;
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.88em;
  border: 1px solid var(--terminal-border);
}

/* Copy code button */
.copy-code {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--terminal-bg-light);
  color: var(--matrix-green-dim);
  border: 1px solid var(--terminal-border);
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s;
  z-index: 10;
}

.highlight:hover .copy-code,
pre:hover .copy-code {
  opacity: 1;
}

.copy-code:hover {
  background: var(--terminal-border);
  color: var(--matrix-green);
}

/* ========================================
   BLOCKQUOTES - DISTINCT FROM CODE
   ======================================== */

.post-content blockquote {
  border-left: 3px solid var(--matrix-green-dim);
  background: var(--matrix-green-glow);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 6px 6px 0;
  font-style: italic;
}

.post-content blockquote p {
  margin: 0;
}

/* ========================================
   LINKS - MATRIX GREEN
   ======================================== */

/* Content links - green, single underline only */
/* PaperMod uses box-shadow for underlines - must override */
.post-content a,
.toc a:hover {
  color: var(--matrix-green-dim);
  text-decoration: underline !important;
  text-decoration-color: var(--matrix-green-dark) !important;
  text-underline-offset: 2px !important;
  text-decoration-thickness: 1px !important;
  box-shadow: none !important;
  border-bottom: none !important;
}

.post-content a:hover {
  color: var(--matrix-green);
  text-decoration-color: var(--matrix-green);
  box-shadow: none !important;
}

/* General page links */
.page-content a,
article a:not(.post-entry a):not(.entry-link) {
  color: var(--matrix-green-dim);
}

.page-content a:hover,
article a:not(.post-entry a):not(.entry-link):hover {
  color: var(--matrix-green);
}

/* ========================================
   FOOTER - CLEAN, NO UNDERLINES
   ======================================== */

.footer a,
.footer a:link,
.footer a:visited,
.footer a:hover,
.footer a:active,
footer a,
footer a:link,
footer a:visited,
footer a:hover,
footer a:active {
  text-decoration: none !important;
  border-bottom: none !important;
}

.footer a,
footer a {
  color: var(--secondary);
}

.footer a:hover,
footer a:hover {
  color: var(--matrix-green);
}

/* ========================================
   POST ENTRY CARDS (LIST VIEW)
   ======================================== */

/* All post entries get consistent card styling */
.post-entry,
.first-entry {
  background: var(--entry);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s;
}

/* Make first-entry same size as others (remove PaperMod's featured styling) */
.first-entry {
  font-size: 14px !important;
  min-height: auto !important;
  margin: var(--gap) 0 !important;
}

.first-entry .entry-header h1,
.first-entry .entry-header h2 {
  font-size: 1.4rem !important;
  line-height: 1.4 !important;
}

.first-entry .entry-content {
  max-height: 4.5rem !important;
  overflow: hidden !important;
  font-size: 14px !important;
  margin: 8px 0 !important;
  -webkit-line-clamp: 2 !important;
}

.first-entry .entry-content p {
  margin: 0 !important;
  font-size: inherit !important;
}

.first-entry .entry-footer {
  font-size: 14px !important;
}

.post-entry:hover,
.first-entry:hover {
  border-color: var(--matrix-green-dark);
}

/* Entry titles */
.post-entry .entry-title,
.first-entry .entry-title,
.post-entry .entry-hint-parent,
.first-entry .entry-hint-parent {
  color: var(--primary);
}

.post-entry:hover .entry-title,
.first-entry:hover .entry-title,
.post-entry:hover .entry-hint-parent,
.first-entry:hover .entry-hint-parent {
  color: var(--matrix-green-dim);
}

/* ========================================
   NAVIGATION - GREEN ACCENTS
   ======================================== */

/* Prev/Next navigation */
.paginav {
  margin-top: 2rem;
  padding-bottom: 1rem;
}

.paginav a {
  background: var(--terminal-bg) !important;
  border: 1px solid var(--terminal-border) !important;
  border-radius: 6px;
  padding: 1rem 1.25rem !important;
  transition: border-color 0.2s, background 0.2s;
}

.paginav a:hover {
  border-color: var(--matrix-green-dark) !important;
  background: var(--terminal-bg-light) !important;
}

.paginav .title {
  color: var(--secondary);
}

.paginav a:hover .title {
  color: var(--matrix-green-dim);
}

/* Tags at bottom of posts */
.post-tags {
  margin-bottom: 1.5rem;
}

.post-tags a {
  background: var(--terminal-bg) !important;
  border: 1px solid var(--terminal-border) !important;
  color: var(--secondary) !important;
  border-radius: 4px;
  padding: 0.3rem 0.6rem;
  font-size: 0.85rem;
  transition: border-color 0.2s, color 0.2s;
  box-shadow: none !important;
  text-decoration: none !important;
}

.post-tags a:hover {
  border-color: var(--matrix-green-dark) !important;
  color: var(--matrix-green-dim) !important;
  background: var(--terminal-bg-light) !important;
}

/* ========================================
   DONATE PAGE
   ======================================== */

/* QR codes: constrain size + center (PNGs are 1000px; full-width is too large) */
.post-content img[src*="/images/donate/"],
.page-content img[src*="/images/donate/"] {
  display: block;
  max-width: 500px;
  width: 100%;
  height: auto;
  margin: 1rem auto 1.5rem;
  border: 1px solid var(--terminal-border);
  border-radius: 6px;
}

/* Long crypto addresses: wrap inside the code block instead of horizontal-scroll
   (the scrollbar was overlapping the address text).
   Scoped to the donate page ONLY (a page that contains a donate QR image) so
   lesson code blocks + ASCII diagrams elsewhere keep their normal formatting. */
.post-content:has(img[src*="/images/donate/"]) pre,
.page-content:has(img[src*="/images/donate/"]) pre {
  white-space: pre-wrap;
  word-break: break-all;
  overflow-wrap: anywhere;
}

/* ========================================
   MAIN NAV - GREEN HOVER (match footer)
   ======================================== */

/* Top menu links light up matrix green on hover (active item stays styled) */
#menu a:hover,
#menu a:hover span,
#menu li:hover a {
  color: var(--matrix-green) !important;
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

html {
  scroll-behavior: smooth;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--matrix-green);
  outline-offset: 2px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
summary:focus:not(:focus-visible) {
  outline: none;
}

/* ========================================
   FONT STACK VARIABLES
   ======================================== */

:root {
  --font-guide-heading: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --font-blog-heading: Georgia, Cambria, "Times New Roman", Times, serif;
}

/* ========================================
   CONTENT WIDTH — OVERRIDE PAPERMOD DEFAULT (720px)
   PaperMod uses: .main { max-width: calc(var(--main-width) + var(--gap) * 2) }
   theme-vars.css sets --main-width: 720px; we override here.
   ======================================== */

:root {
  --main-width: 900px;
}

/* ========================================
   GUIDE PAGE — HEADING FONT
   ======================================== */

.guide-page h1,
.guide-page h2,
.guide-page h3,
.guide-page h4,
.guide-masthead-badge {
  font-family: var(--font-guide-heading);
}

/* ========================================
   GUIDE PAGE — LEFT ACCENT STRIPE
   Only on wider screens so it doesn't crowd mobile.
   ======================================== */

@media screen and (min-width: 769px) {
  .guide-page {
    border-left: 3px solid var(--matrix-green-dark);
    padding-left: 1.25rem;
  }
}

/* ========================================
   GUIDE MASTHEAD BOX
   ======================================== */

.guide-masthead {
  display: flex;
  flex-direction: column;
  gap: 0.6em;
  margin: 1.5em 0;
  padding: 1em 1.25em;
  border: 1px solid var(--matrix-green-dark);
  border-radius: 6px;
  background: var(--terminal-bg-light);
}

.guide-masthead-badge {
  color: var(--matrix-green);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 600;
}

.guide-pdf-link {
  display: inline-block;
  padding: 0.4em 1em;
  border: 1px solid var(--matrix-green-dark);
  border-radius: 4px;
  font-weight: bold;
  text-decoration: none !important;
  color: var(--matrix-green-dim) !important;
  font-size: 0.9rem;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  align-self: flex-start;
}

.guide-pdf-link:hover {
  border-color: var(--matrix-green) !important;
  color: var(--matrix-green) !important;
  background: var(--matrix-green-glow);
}

/* ========================================
   TAG CLOUD — /tags/ page
   ======================================== */

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6em 0.8em;
  justify-content: center;
  padding: 1.5em 0;
}

.tag-cloud-item {
  font-family: var(--font-guide-heading);
  color: var(--matrix-green-dim) !important;
  text-decoration: none !important;
  line-height: 1.3;
  transition: color 0.15s;
  white-space: nowrap;
}

.tag-cloud-item:hover {
  color: var(--matrix-green) !important;
  text-decoration: none !important;
}

.tag-cloud-count {
  font-size: 0.6em;
  color: var(--secondary);
  margin-left: 0.15em;
  font-weight: normal;
  vertical-align: super;
}

/* ========================================
   NAV DROPDOWN — PURE CSS, NO JS
   ======================================== */

/* The "More ▾" label — looks like the other nav links */
/* Let the panel escape PaperMod's #menu overflow-x:auto clip, and wrap
   instead of scroll-clipping when the bar is tight. */
#menu {
  overflow: visible;
  flex-wrap: wrap;
  row-gap: 0.3rem;
}

#menu li.menu-dropdown {
  position: relative;
}

/* The "More ▾" trigger is a <span>, not an <a> — match nav link size. */
#menu .menu-dropdown-label {
  font-size: 16px;
  line-height: inherit;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

/* The panel: hidden until hover / keyboard focus. Anchored to the RIGHT
   edge so it never spills off-screen near the end of the bar. */
#menu .menu-dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  left: auto;
  transform: none;
  min-width: 175px;
  margin: 0;
  padding: 0.4rem 0;
  list-style: none !important;
  background: var(--terminal-bg-light);
  border: 1px solid var(--terminal-border);
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  z-index: 1000;
}

#menu li.menu-dropdown:hover .menu-dropdown-content,
#menu li.menu-dropdown:focus-within .menu-dropdown-content {
  display: block;
}

#menu .menu-dropdown-content li {
  margin: 0 !important;
  padding: 0;
  list-style: none !important;
}

#menu .menu-dropdown-content a {
  display: block;
  padding: 0.5rem 1.1rem;
  font-size: 0.95rem;
  white-space: nowrap;
  color: var(--primary);
  text-decoration: none !important;
  border: none !important;
  box-shadow: none !important;
}

#menu .menu-dropdown-content a:hover,
#menu .menu-dropdown-content a:focus {
  color: var(--matrix-green) !important;
  background: rgba(0, 255, 65, 0.06);
}

#menu .menu-dropdown-content a span.active {
  color: var(--matrix-green);
}

/* Mobile: PaperMod collapses the nav — render children inline-indented. */
@media screen and (max-width: 768px) {
  #menu li.menu-dropdown {
    position: static;
  }

  #menu .menu-dropdown-content {
    position: static;
    min-width: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    padding: 0 0 0 1rem;
  }
}

/* ========================================
   SHARED SITE NAV — cs-nav
   (used by both index.html and PaperMod pages)
   ======================================== */

.cs-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(10,15,10,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #1a3a1a;
}

.cs-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  /* Pin box model so the nav is identical on PaperMod pages (which set
     *{box-sizing:border-box} globally) and the full-HTML pages (which don't).
     content-box → 1100px content area + padding on every page. */
  box-sizing: content-box;
}

.cs-nav-brand {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Liberation Mono', 'Courier New', monospace;
  font-size: 0.9rem;
  font-weight: 600;
  color: #00ff41;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  text-shadow: 0 0 12px rgba(0,255,65,0.25);
  text-decoration: none;
}

.cs-nav-brand:hover {
  color: #00ff41;
  text-decoration: none;
}

.cs-nav-bracket {
  color: #00aa2a;
  font-weight: 400;
}

.cs-nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.cs-nav-links a {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Liberation Mono', 'Courier New', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: #8b949e;
  text-decoration: none;
  transition: color 0.2s;
}

.cs-nav-links a:hover {
  color: #00ff41;
  text-decoration: none;
}

.cs-nav-rss {
  display: flex;
  align-items: center;
  opacity: 0.55;
  transition: opacity 0.2s, color 0.2s;
}

.cs-nav-rss:hover {
  opacity: 1;
  color: #00ff41 !important;
}

/* Nav dropdowns (Courses / More) — pure CSS, no JS.
   Reveal on hover (desktop) and focus-within (keyboard + touch-tap). */
.cs-nav-drop {
  position: relative;
  display: block;
}
.cs-nav-droptoggle {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Liberation Mono', 'Courier New', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: #8b949e;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.2s;
}
.cs-nav-drop:hover .cs-nav-droptoggle,
.cs-nav-drop:focus-within .cs-nav-droptoggle {
  color: #00ff41;
}
.cs-nav-caret {
  font-size: 0.6rem;
  transition: transform 0.2s;
}
.cs-nav-drop:hover .cs-nav-caret,
.cs-nav-drop:focus-within .cs-nav-caret {
  transform: rotate(180deg);
}
.cs-nav-dropmenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: rgba(10,15,10,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid #1a3a1a;
  border-radius: 6px;
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 250;
  box-shadow: 0 10px 28px rgba(0,0,0,0.55);
}
.cs-nav-drop:hover .cs-nav-dropmenu,
.cs-nav-drop:focus-within .cs-nav-dropmenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.cs-nav-dropmenu a {
  display: block;
  padding: 0.5rem 0.7rem;
  border-radius: 4px;
  white-space: nowrap;
  font-size: 0.78rem;
  color: #8b949e;
}
.cs-nav-dropmenu a:hover {
  background: rgba(0,255,65,0.08);
  color: #00ff41;
}

/* Hamburger toggle — hidden on desktop, shown on mobile via the @media block below */
.cs-nav-toggle-cb { display: none; }
.cs-nav-burger { display: none; }

@media (max-width: 600px) {
  /* Hamburger button */
  .cs-nav-burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    padding: 8px 4px;
    margin: -8px -4px;
  }
  .cs-nav-burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #8b949e;
    transition: transform 0.25s ease, opacity 0.2s ease;
  }
  .cs-nav-toggle-cb:checked ~ .cs-nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .cs-nav-toggle-cb:checked ~ .cs-nav-burger span:nth-child(2) { opacity: 0; }
  .cs-nav-toggle-cb:checked ~ .cs-nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* Slide-down menu panel */
  .cs-nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.1rem;
    background: rgba(10,15,10,0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid #1a3a1a;
    padding: 1.25rem 1.5rem;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
  }
  .cs-nav-toggle-cb:checked ~ .cs-nav-links { display: flex; }

  /* Flatten the Courses / More dropdowns into stacked sections on mobile */
  .cs-nav-drop { width: 100%; }
  .cs-nav-droptoggle { cursor: default; color: #00ff41; }
  .cs-nav-caret { display: none; }
  .cs-nav-dropmenu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: none;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    min-width: 0;
    padding: 0.6rem 0 0 0.9rem;
    gap: 0.7rem;
  }
  .cs-nav-dropmenu a { padding: 0; }
}

/* ========================================
   SHARED SITE FOOTER — cs-footer
   (used by both index.html and PaperMod pages)
   ======================================== */

.cs-footer {
  background: #070d07;
  border-top: 1px solid #0f240f;
  padding: 2.5rem 0;
}

.cs-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.cs-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.cs-footer-nav a {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Liberation Mono', 'Courier New', monospace;
  font-size: 0.78rem;
  color: #6e7681;
  letter-spacing: 0.04em;
  transition: color 0.2s;
  text-decoration: none;
}

.cs-footer-nav a:hover {
  color: #00cc33;
  text-decoration: none;
}

.cs-footer-follow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Liberation Mono', 'Courier New', monospace;
  font-size: 0.72rem;
}

.cs-footer-follow-label {
  color: #6e7681;
  letter-spacing: 0.06em;
}

.cs-footer-follow-link {
  color: #6e7681;
  text-decoration: none;
  transition: color 0.2s;
  letter-spacing: 0.04em;
}

.cs-footer-follow-link:hover {
  color: #00cc33;
}

.cs-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cs-footer-copy {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Liberation Mono', 'Courier New', monospace;
  font-size: 0.7rem;
  color: #6e7681;
}

.cs-footer-copy a {
  color: #6e7681;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cs-footer-copy a:hover {
  color: #00cc33;
}

.cs-footer-business {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Liberation Mono', 'Courier New', monospace;
  font-size: 0.68rem;
  color: #3a5a3a;
  text-decoration: none;
  transition: color 0.2s;
}

.cs-footer-business:hover {
  color: #6e7681;
}

/* ========================================
   CROSS-LINKS (declare-once graph)
   Rendered on guide + lesson pages. Uses globally-available --matrix-* vars.
   ======================================== */
.cross-links {
  margin: 2.5rem 0 1rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--terminal-border);
  border-left: 3px solid var(--matrix-green);
  border-radius: 6px;
  background: var(--terminal-bg-light);
  display: grid;
  gap: 1.1rem;
}

.cross-links-group {
  margin: 0;
}

.cross-links-title {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--matrix-green-dim);
  font-family: var(--mono, "JetBrains Mono", monospace);
}

.cross-links-group ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
}

.cross-links-group li {
  margin: 0;
}

.cross-links-group a {
  color: #e6edf3;
  text-decoration: none;
  border-bottom: 1px dashed rgba(0, 255, 65, 0.35);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.cross-links-group a:hover {
  color: var(--matrix-green);
  border-bottom-color: var(--matrix-green);
}
