:root {
  --bg: #0b0e12;
  --bg-elevated: #161e26;
  --bg-card: #111820;
  --fg: #eceff1;
  --fg-muted: #96a8b8;
  --fg-subtle: #6d7f8f;
  --accent: #7c4dff;
  --accent-strong: #9d7aff;
  --accent-dim: #7c4dff33;
  --green: #66bb6a;
  --blue: #42a5f5;
  --red: #ef5350;
  --purple: #ab47bc;
  --orange: #ffa726;
  --cyan: #26c6da;
  --border: #1f2a36;
  --border-hover: #2d3e4e;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 180ms ease;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  --font-ui: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --max-width: 1120px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f8fafc;
    --bg-elevated: #ffffff;
    --bg-card: #f1f5f9;
    --fg: #0f172a;
    --fg-muted: #475569;
    --fg-subtle: #64748b;
    --accent: #6d28d9;
    --accent-strong: #7c3aed;
    --accent-dim: #6d28d922;
    --green: #16a34a;
    --blue: #2563eb;
    --red: #dc2626;
    --purple: #9333ea;
    --orange: #ea580c;
    --cyan: #0891b2;
    --border: #e2e8f0;
    --border-hover: #cbd5e1;
    --shadow: 0 4px 24px rgba(15,23,42,0.08);
    --shadow-lg: 0 8px 40px rgba(15,23,42,0.12);
  }
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-strong); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

img { max-width: 100%; height: auto; display: block; }

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-ui);
  font-weight: 700;
  line-height: 1.2;
  color: var(--fg);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
p { color: var(--fg-muted); }

/* Site Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg) 70%, transparent 100%);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(180%) blur(12px);
  /* Clip horizontally only.
     .nav-dropdown-menu is absolutely positioned at left:50% with
     translateX(-50%). It is `visibility: hidden` when closed, which hides it
     but still leaves it in the layout box tree — so a dropdown belonging to a
     nav item near the right edge pushed the document wider than the viewport
     and gave the whole site a horizontal scrollbar (74px of overflow on a
     500px viewport, 35px at 768). Clipping the header's x-axis contains it.

     `clip` rather than `hidden` on purpose: overflow-x:hidden would force
     overflow-y to compute to `auto` and turn the header into a scroll
     container, clipping the open dropdown vertically. `overflow-x: clip`
     combined with `overflow-y: visible` is honoured per-axis, so the menu can
     still hang below the bar. */
  overflow-x: clip;
  overflow-y: visible;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--fg);
  text-decoration: none;
}

.site-brand:hover { color: var(--accent); }

.logo-mark { font-size: 1.75rem; line-height: 1; flex-shrink: 0; }

.site-nav { display: flex; align-items: center; gap: 8px; }

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg-muted);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.nav-link:hover {
  color: var(--fg);
  background: var(--bg-card);
}

.nav-sponsor {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white !important;
  padding: 8px 18px;
  margin-left: 4px;
}

.nav-sponsor:hover {
  color: white !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--accent-dim);
}

.nav-dropdown { position: relative; display: inline-flex; align-items: center; }
.nav-dropdown-btn { background: none; border: none; font-family: var(--font-ui); font-size: 0.9rem; font-weight: 500; color: var(--fg-muted); cursor: pointer; padding: 6px 10px; border-radius: var(--radius-sm); transition: all var(--transition); display: inline-flex; align-items: center; gap: 4px; }
.nav-dropdown-btn:hover { color: var(--fg); background: var(--bg-elevated); }
.nav-dropdown-menu { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%) scale(0.95); opacity: 0; visibility: hidden; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); min-width: 220px; padding: 6px; display: flex; flex-direction: column; gap: 2px; z-index: 100; transition: all 0.2s ease; }
.nav-dropdown:hover .nav-dropdown-menu, .nav-dropdown:focus-within .nav-dropdown-menu { opacity: 1; visibility: visible; transform: translateX(-50%) scale(1); }
.nav-dropdown-item { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 0.84rem; color: var(--fg-muted); border-radius: var(--radius-sm); text-decoration: none; transition: all 0.15s; }
.nav-dropdown-item:hover { background: var(--bg-elevated); color: var(--accent); }

/* Hero */
.hero {
  min-height: calc(100vh - 68px);
  display: flex;
  align-items: center;
  padding: 80px 0 120px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, var(--accent-dim) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 100% 100%, var(--green) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-badges {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--fg-muted);
  transition: all var(--transition);
}

.badge:hover { border-color: var(--border-hover); color: var(--fg); }

.badge-metapod { border-color: var(--purple); color: var(--purple); }
.badge-metapod:hover { background: rgba(171, 71, 188, 0.12); }

.badge-fpm { border-color: var(--cyan); color: var(--cyan); }
.badge-fpm:hover { background: rgba(38, 198, 218, 0.12); }

.hero-title {
  margin-bottom: 28px;
  background: linear-gradient(135deg, var(--fg) 0%, var(--fg-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.typing-container {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 48px;
}

.typing-text {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--fg-muted);
  white-space: nowrap;
}

.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  margin-left: 4px;
  background: var(--accent);
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
  box-shadow: 0 4px 16px var(--accent-dim);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-dim);
  color: white;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--fg);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-elevated);
  border-color: var(--border-hover);
  color: var(--fg);
  transform: translateY(-2px);
}

/* Sections */
.section {
  padding: 100px 0;
}

.section-alt { background: var(--bg-elevated); }

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 { margin-bottom: 12px; }

.section-subtitle {
  font-size: 1.125rem;
  color: var(--fg-subtle);
  max-width: 600px;
  margin: 0 auto;
}

/* Tools Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  border-radius: var(--radius) var(--radius) 0 0;
  opacity: 0;
  transition: opacity var(--transition);
}

.tool-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.tool-card:hover::before { opacity: 1; }

.tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--accent-dim);
  color: var(--accent);
  margin-bottom: 20px;
}

.tool-icon svg { width: 24px; height: 24px; }

.tool-name { margin-bottom: 10px; font-size: 1.125rem; }

.tool-desc { font-size: 0.9375rem; line-height: 1.6; margin-bottom: 16px; }

.tool-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
}

.tool-platform, .tool-lang {
  padding: 4px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--fg-subtle);
}

.tool-links {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

.tool-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid transparent;
  transition: all var(--transition);
}

.tool-link:hover {
  background: var(--accent);
  color: white;
}

.tool-link svg { flex-shrink: 0; }

.tool-link-secondary {
  background: transparent;
  color: var(--fg-muted);
  border-color: var(--border);
}

.tool-link-secondary:hover {
  background: var(--bg);
  color: var(--fg);
  border-color: var(--border-hover);
}

/* Guides Grid */
.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.guide-card {
  display: flex;
  flex-direction: column;
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.guide-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.guide-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: var(--accent-dim);
  color: var(--accent);
  margin-bottom: 20px;
}

.guide-icon svg { width: 28px; height: 28px; }

.guide-card h3 { margin-bottom: 12px; font-size: 1.125rem; }

.guide-card p { font-size: 0.9375rem; margin-bottom: 20px; }

.guide-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--accent);
  margin-top: auto;
}

.guide-link:hover { gap: 10px; }

/* Community Grid */
.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.community-card {
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
  cursor: pointer;
  user-select: none;
}

.community-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.community-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.community-card h3 { margin-bottom: 10px; font-size: 1rem; }

.community-card p { font-size: 0.875rem; margin-bottom: 16px; }

.card-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  opacity: 0.8;
  transition: opacity var(--transition);
}

.community-card:hover .card-action {
  opacity: 1;
}

/* Footer */
.site-footer {
  padding: 32px 0 24px;
  background: var(--bg-elevated);
}

.footer-integrated {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.footer-tagline {
  font-size: 0.875rem;
  color: var(--fg-subtle);
  text-align: center;
}

.footer-tagline .heart { color: var(--red); animation: pulse 1.5s ease-in-out infinite; }
.footer-tagline a { color: var(--fg-subtle); }
.footer-tagline a:hover { color: var(--accent); }

@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }

/* Page Wrapper */
.page-wrapper { display: flex; flex-direction: column; min-height: 100vh; }
.site-main { flex: 1; }

/* Responsive */
@media (max-width: 768px) {
  .site-header .container { height: 60px; padding: 0 16px; }
  .nav-link { padding: 6px 12px; font-size: 0.8125rem; }
  .nav-sponsor { padding: 6px 14px; }
  .hero { padding: 60px 0 100px; }
  .hero-title { font-size: clamp(2rem, 8vw, 3rem); }
  .typing-container { height: 40px; margin-bottom: 40px; }
  .typing-text { font-size: 1rem; }
  .section { padding: 72px 0; }
  .tool-card, .guide-card { padding: 24px; }
  .container { padding: 0 16px; }
}

@media (max-width: 480px) {
  .hero-cta { flex-direction: column; align-items: center; }
  .btn { width: 100%; max-width: 280px; }
  .tools-grid { grid-template-columns: 1fr; }
  .guides-grid { grid-template-columns: 1fr; }
}

/* Hero tagline */
.hero-tagline {
  font-size: 1.15rem;
  color: var(--fg-muted);
  max-width: 640px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

/* Quotes section */
.section-quotes {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-elevated) 100%);
}

.quotes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.quote-card {
  background: var(--bg-card);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 24px 28px;
  margin: 0;
}

.quote-text {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--fg);
  margin-bottom: 14px;
  line-height: 1.6;
}

.quote-attribution {
  color: var(--fg-subtle);
  font-size: 0.85rem;
  font-weight: 600;
}

/* Community card media variant */
.community-card-media {
  border-color: var(--purple);
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(138, 43, 226, 0.06) 100%);
}

.community-card-media:hover {
  border-color: var(--purple);
}

.community-card-icon {
  margin-bottom: 12px;
  color: var(--purple);
}

/* Sponsor badge */
.sponsor-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: transparent;
  border: 1px solid var(--red);
  color: var(--red);
  transition: all var(--transition);
}

.sponsor-badge:hover {
  background: var(--red);
  color: white;
  text-decoration: none;
}

/* Video grid for media section */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

/* Footer button row */
.footer-button-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-button-row a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  background: var(--bg-card);
  transition: all var(--transition);
}

.footer-button-row a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.footer-button-row a.sponsor-red:hover {
  border-color: var(--red);
  color: var(--red);
}

.footer-brand {
  font-size: 0.8125rem;
  color: var(--fg-subtle);
  text-align: center;
}

.footer-brand a { color: var(--fg-subtle); }
.footer-brand a:hover { color: var(--accent); }

/* ── Link Guard ──────────────────────────────────────────────────────────── */
.link-guard {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s ease, visibility 0.25s;
  font-family: var(--font-ui);
}
.link-guard.active { visibility: visible; opacity: 1; }

.link-guard-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.link-guard-card {
  position: relative;
  z-index: 1;
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: 12px;
  box-shadow: 0 0 0 1px var(--accent-dim), var(--shadow-lg), 0 0 40px rgba(124,77,255,0.15);
  display: flex;
  flex-direction: column;
  animation: linkGuardIn 0.25s ease;
}
@keyframes linkGuardIn {
  from { transform: translateY(-12px) scale(0.97); opacity: 0; }
  to   { transform: translateY(0)    scale(1);    opacity: 1; }
}

.link-guard-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(124,77,255,0.08) 0%, transparent 60%);
  border-radius: 12px 12px 0 0;
}

.link-guard-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(124,77,255,0.5));
}

.link-guard-heading { flex: 1; min-width: 0; }
.link-guard-heading h2 {
  margin: 0 0 4px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--fg);
  font-family: var(--font-ui);
}
.link-guard-sub {
  margin: 0;
  font-size: 0.82rem;
  color: var(--fg-muted);
  line-height: 1.4;
}

.link-guard-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--fg-muted);
  cursor: pointer;
  padding: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.link-guard-close:hover { background: var(--border); color: var(--fg); }

.link-guard-body { padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }

.link-guard-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.link-guard-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--fg-muted);
}
.link-guard-chip strong { color: var(--fg-subtle); font-weight: 600; }
.link-guard-chip.chip-warn { border-color: var(--orange); color: var(--orange); background: rgba(255,167,38,0.08); }
.link-guard-chip.chip-alert { border-color: var(--red); color: var(--red); background: rgba(239,83,80,0.08); }

.link-guard-url {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--accent-strong);
  word-break: break-all;
  padding: 8px 12px;
  background: rgba(124,77,255,0.06);
  border: 1px solid var(--accent-dim);
  border-radius: 6px;
  max-height: 72px;
  overflow-y: auto;
}

.link-guard-frame {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  aspect-ratio: 16 / 9;
}
.link-guard-frame iframe { width: 100%; height: 100%; border: none; display: block; }

.link-guard-tabs {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.link-guard-section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-subtle);
}
.link-guard-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.link-guard-repo,
.link-guard-tab {
  flex: 1;
  min-width: 160px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.15s;
}
.link-guard-repo:focus,
.link-guard-tab:focus { outline: none; border-color: var(--accent); }
.link-guard-go {
  padding: 8px 20px;
  border-radius: 6px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
}
.link-guard-go:hover { background: var(--accent-strong); }
.link-guard-go:active { transform: scale(0.97); }

.link-guard-hint {
  font-size: 0.73rem;
  color: var(--fg-subtle);
  margin: 0;
}

.link-guard-actions {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  justify-content: flex-end;
}
.link-guard-btn {
  padding: 10px 22px;
  border-radius: 8px;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.link-guard-btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg-muted);
}
.link-guard-btn-ghost:hover { border-color: var(--fg-muted); color: var(--fg); }
.link-guard-btn-primary {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #fff;
}
.link-guard-btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }

/* ═══════════════════════════════════════════════════════════════════════
   FPM PROMPT FIELD + BLINKING CURSOR + TYPING-ANIMATION MIRROR
   ─────────────────────────────────────────────────────────────────────
   The "Tell me what you like" screenwide input. The greyed-out animated
   text is rendered in a sibling <span> (created by fpm-typing.js) so the
   <input> itself stays form-friendly (a real input field, not a div).
   ═══════════════════════════════════════════════════════════════════════ */
.fpm-prompt-field {
  position: relative;
  width: 100%;
  margin: 0 auto;
}
.fpm-prompt-field input,
.fpm-prompt-field textarea {
  width: 100%;
  padding: 18px 20px;
  font: 500 16px/1.4 var(--font-ui);
  color: var(--fg);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  caret-color: var(--accent);
}
.fpm-prompt-field input:focus,
.fpm-prompt-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.fpm-prompt-field input::placeholder,
.fpm-prompt-field textarea::placeholder {
  color: transparent;
}
/* The mirror that holds the animated typing text. Floats over the input. */
.fpm-typing-mirror {
  position: absolute;
  left: 21px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--fg-subtle);
  font: 500 16px/1.4 var(--font-ui);
  white-space: nowrap;
  overflow: hidden;
  max-width: calc(100% - 60px);
}
/* The blinking cursor: appended via ::after on the mirror when input is empty. */
.fpm-typing-mirror::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--accent);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: fpm-cursor-blink 1.05s steps(2, start) infinite;
}
.fpm-prompt-field.has-content .fpm-typing-mirror { display: none; }
@keyframes fpm-cursor-blink {
  to { visibility: hidden; }
}
/* Honour reduced-motion: still blink, but no slide/fade on the field. */
@media (prefers-reduced-motion: reduce) {
  .fpm-typing-mirror::after { animation-duration: 1.6s; }
}

/* neohiro-network: top-bar contract */
/* The header is not sticky: it scrolls away and .header-mini takes over. */
.site-header {
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.32s ease;
}
.site-header--hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.header-mini {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 99;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px 0 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-card, #111820) 88%, transparent);
  border: 1px solid var(--border, #1f2a36);
  backdrop-filter: saturate(180%) blur(12px);
  box-shadow: var(--shadow, 0 4px 24px rgba(0,0,0,0.4));
  font-family: var(--font-ui, system-ui, sans-serif);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--fg, #eceff1);
  text-decoration: none;
  opacity: 0;
  transform: translateY(-14px);
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.header-mini--visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.header-mini:hover { color: var(--accent, #7c4dff); border-color: var(--accent, #7c4dff); }
.header-mini .logo-mark { font-size: 1.15rem; }

.nav-dropdown-btn { display: inline-flex; align-items: center; gap: 5px; }
.nav-dropdown-btn[aria-expanded="true"] { color: var(--fg, #eceff1); background: var(--bg-elevated, #161e26); }
.nav-caret { transition: transform 0.2s ease; opacity: 0.7; }
.nav-dropdown-btn[aria-expanded="true"] .nav-caret { transform: rotate(180deg); }

/* GitHub org glyph: always the last nav item, hard against the right edge. */
.nav-github {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-left: 2px;
  border-radius: 50%;
  color: var(--fg, #eceff1);
  background: var(--bg-card, #111820);
  border: 1px solid var(--border, #1f2a36);
  transition: color 180ms ease, border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}
.nav-github:hover {
  color: #fff;
  border-color: var(--fg, #eceff1);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.site-nav .nav-auth--user { max-width: 190px; }
.site-nav .nav-auth--user span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Progressive disclosure so the bar never wraps. Drop order: 4, then 3, then 2. */
@media (max-width: 1180px) { .nav-opt-4 { display: none; } }
@media (max-width: 1000px) { .nav-opt-3 { display: none; } }
@media (max-width: 820px)  { .nav-opt-2 { display: none; } }
@media (max-width: 1080px) { .site-nav .nav-auth--login span { display: none; } }
@media (max-width: 860px)  { .nav-github { width: 30px; height: 30px; } }
@media (max-width: 680px) {
  .site-header .container { height: 56px; }
  .site-nav { gap: 4px; }
  .site-nav .nav-link { padding: 7px 10px; font-size: 0.8125rem; }
}

/* ── Hosts dropdown ────────────────────────────────────────────────────────
   Rules for the opt-in Hosts menu in _includes/nav.html. They live in the
   site's own stylesheet rather than in assets/css/network-ux.css, which is the
   shared contract file and is regenerated wholesale by `site_forge.py sync` -
   anything a single site adds there gets reverted on the next sync. They cannot
   live in assets/css/hosts.css either: that one is pulled in per page through
   extra_css, so it is absent from the homepage, which also renders the header
   and would show an unstyled 34-item menu.

   The dot is the probe result. ok and guarded deliberately share the "live"
   colour: a bot wall (403/429/400/999) is not a broken link, and colouring it
   red would be a lie. broken and down are the only two that get a warning
   colour, and broken-dns maps to `broken` in nav.html before it becomes a
   class name. */
.nav-dropdown--wide .nav-dropdown-menu {
  min-width: 260px;
  max-height: min(70vh, 560px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.nav-hosts-all {
  font-weight: 600;
  color: var(--fg);
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  margin-bottom: 4px;
  padding-bottom: 10px;
}
.nav-hosts-group {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  padding: 10px 12px 4px;
  margin: 0;
}
.nav-hosts-item { padding-top: 5px; padding-bottom: 5px; }
.nav-host-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-host-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fg-subtle);
}
.nav-host-dot--ok      { background: var(--green); }
.nav-host-dot--guarded { background: var(--cyan); }
.nav-host-dot--down    { background: var(--orange); }
.nav-host-dot--broken  { background: var(--red); }
.nav-host-dot--dir     { background: var(--accent); }

/* Defensive alias. nav.html maps broken-dns -> broken before it becomes a class,
   so this should be unreachable. It exists so that editing a status in the data
   file without updating nav.html degrades to a visible red dot rather than an
   invisible one - which is how eight broken records once rendered as healthy. */
.nav-host-dot--broken-dns { background: var(--red); }

@media (prefers-reduced-motion: reduce) {
  .nav-dropdown--wide .nav-dropdown-menu { scroll-behavior: auto; }
}
