/* ============================================
   WHATISMYIP.WIKI — Design System
   Dark hacker aesthetic, hand-written CSS
   ============================================ */

/* --- Fonts (self-hosted, no external requests) --- */
@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-var.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/jetbrains-mono.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

/* --- Design Tokens --- */
:root {
  --bg:        #08080F;
  --surface:   #0D0D18;
  --surface-2: #111122;
  --accent:    #00D4FF;
  --accent-dim:rgba(0,212,255,0.5);
  --success:   #22c55e;
  --warn:      #f59e0b;
  --danger:    #ef4444;
  --purple:    #6C63FF;

  --text-95:   rgba(255,255,255,0.95);
  --text-90:   rgba(255,255,255,0.9);
  --text-85:   rgba(255,255,255,0.85);
  --text-80:   rgba(255,255,255,0.8);
  --text-70:   rgba(255,255,255,0.7);
  --text-65:   rgba(255,255,255,0.65);
  --text-60:   rgba(255,255,255,0.6);
  --text-50:   rgba(255,255,255,0.5);
  --text-40:   rgba(255,255,255,0.4);
  --text-35:   rgba(255,255,255,0.35);
  --text-30:   rgba(255,255,255,0.3);
  --text-25:   rgba(255,255,255,0.25);
  --text-20:   rgba(255,255,255,0.2);
  --text-15:   rgba(255,255,255,0.15);
  --text-10:   rgba(255,255,255,0.10);

  --border-divider:     rgba(255,255,255,0.04);
  --border-card:        rgba(255,255,255,0.06);
  --border-interactive: rgba(255,255,255,0.08);
  --border-hover:       rgba(255,255,255,0.12);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 999px;

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', monospace;

  --nav-height: 56px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  background: var(--bg);
  color: white;
  font-family: var(--font-sans);
  font-weight: 500;
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

main { flex: 1; padding-top: var(--nav-height); }

::selection { background: rgba(0,212,255,0.15); color: white; }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,212,255,0.3); }

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

/* --- Links --- */
a { color: var(--accent); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: white; }

/* --- Typography --- */
.label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-25);
}
.label-accent {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent-dim);
}
.label-sm {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-30);
}

h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-95);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-85);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-70);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}
h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-65);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.body-text { font-size: 15px; color: var(--text-65); line-height: 1.8; }
.body-sm { font-size: 13px; color: var(--text-40); line-height: 1.6; }
.mono { font-family: var(--font-mono); }

@media (min-width: 640px) {
  h1 { font-size: 48px; }
  h2 { font-size: 26px; }
}

/* --- Layout --- */
.container      { max-width: 1152px; margin: 0 auto; padding: 0 16px; }
.container-sm   { max-width: 768px; margin: 0 auto; padding: 0 16px; }
.container-xs   { max-width: 640px; margin: 0 auto; padding: 0 16px; }
.container-full { max-width: 1280px; margin: 0 auto; padding: 0 16px; }

@media (min-width: 640px) {
  .container, .container-sm, .container-xs, .container-full { padding: 0 24px; }
}

.section {
  padding: 56px 0;
  border-top: 1px solid var(--border-divider);
}
@media (min-width: 640px) {
  .section { padding: 80px 0; }
}
@media (min-width: 1024px) {
  .section { padding: 96px 0; }
}

.section:first-child,
.section.no-border { border-top: none; }

/* --- Section Headers --- */
.section-header { margin-bottom: 40px; }
.section-header .label,
.section-header .label-accent { margin-bottom: 12px; display: block; }
.section-header h2 {
  font-size: 28px;
  margin-top: 0;
  color: var(--text-90);
}
@media (min-width: 640px) {
  .section-header h2 { font-size: 36px; }
}
.section-header p {
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-35);
  max-width: 512px;
  line-height: 1.7;
}

/* --- Cards --- */
.card {
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}
.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(8,8,15,0.85);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border-divider);
  display: flex;
  align-items: center;
}

.navbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
@media (min-width: 640px) {
  .navbar-inner { padding: 0 24px; }
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo img {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
}
.nav-logo-text {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-70);
}
.nav-logo-text .accent { color: var(--accent); }

.nav-pill {
  display: none;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-full);
  padding: 6px 8px;
}
@media (min-width: 768px) {
  .nav-pill { display: flex; }
}

.nav-pill a {
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-50);
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.nav-pill a:hover {
  color: var(--text-80);
  background: rgba(255,255,255,0.04);
}
.nav-pill a.active {
  color: white;
  background: rgba(255,255,255,0.08);
}

.nav-cta {
  display: none;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  align-items: center;
  gap: 8px;
}
.nav-cta:hover {
  background: white;
  color: var(--bg);
}
@media (min-width: 768px) {
  .nav-cta { display: flex; }
}

.nav-hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  color: var(--text-40);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
}
.nav-hamburger:hover { color: var(--text-70); }
@media (min-width: 768px) {
  .nav-hamburger { display: none; }
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99;
  background: rgba(8,8,15,0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 24px;
  overflow-y: auto;
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block;
  padding: 14px 0;
  font-size: 16px;
  color: var(--text-60);
  text-decoration: none;
  border-bottom: 1px solid var(--border-divider);
  transition: color 0.2s;
}
.mobile-menu a:hover { color: white; }
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu .mobile-cta {
  display: inline-block;
  margin-top: 24px;
  padding: 12px 24px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  border-radius: var(--radius-full);
  text-align: center;
  width: 100%;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border-divider);
  background: var(--bg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding: 48px 0;
}
@media (min-width: 640px) {
  .footer-grid { gap: 48px; }
}
@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr 1fr; }
}

.footer-brand { grid-column: 1 / -1; }
@media (min-width: 1024px) {
  .footer-brand { grid-column: 1; }
}
.footer-brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-bottom: 16px;
}
.footer-brand-logo img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}
.footer-brand-logo span {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-50);
}
.footer-brand p {
  font-size: 13px;
  color: var(--text-30);
  line-height: 1.7;
  max-width: 280px;
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-30);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  font-size: 13px;
  color: var(--text-40);
  text-decoration: none;
  margin-bottom: 10px;
  transition: color 0.2s ease;
}
.footer-col a:hover { color: var(--text-80); }

.footer-bottom {
  border-top: 1px solid var(--border-divider);
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
@media (min-width: 640px) {
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}
.footer-bottom p,
.footer-bottom a {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-20);
}
.footer-bottom-links {
  display: flex;
  gap: 20px;
}

/* --- Hero --- */
.hero {
  padding: 80px 0 64px;
  text-align: center;
  position: relative;
  overflow: visible;
}
@media (min-width: 640px) {
  .hero { padding: 120px 0 80px; }
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(ellipse at center top, rgba(0,212,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(0,212,255,0.06);
  border: 1px solid rgba(0,212,255,0.12);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-dim);
  margin-bottom: 24px;
}
.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero h1 {
  max-width: 720px;
  margin: 0 auto 20px;
}
.hero h1 .accent { color: var(--accent); }

.hero-desc {
  font-size: 15px;
  color: var(--text-40);
  max-width: 520px;
  margin: 0 auto 40px;
  line-height: 1.8;
}

.hero-search {
  position: relative;
  z-index: 100;
  max-width: 480px;
  margin: 0 auto 32px;
}
.hero-search svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-20);
  pointer-events: none;
}
.hero-search input {
  width: 100%;
  padding: 14px 16px 14px 48px;
  background: var(--surface);
  border: 1px solid var(--border-interactive);
  border-radius: var(--radius-md);
  color: var(--text-70);
  font-family: var(--font-mono);
  font-size: 14px;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.hero-search input:focus {
  border-color: rgba(0,212,255,0.3);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.06);
}
.hero-search input::placeholder { color: var(--text-15); }

.hero-stats {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-25);
}
.hero-stats span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.hero-stats .num { color: var(--text-50); font-weight: 600; }

/* --- Featured Articles --- */
.featured-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) {
  .featured-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .featured-grid { grid-template-columns: 1fr 1fr 1fr 1fr; }
}

.featured-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.featured-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--purple));
  opacity: 0;
  transition: opacity 0.25s ease;
}
.featured-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
}
.featured-card:hover::before { opacity: 1; }

.featured-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(0,212,255,0.06);
  border: 1px solid rgba(0,212,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.featured-card-icon svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.featured-card .category {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-dim);
  margin-bottom: 8px;
}
.featured-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-80);
  margin: 0 0 8px 0;
  transition: color 0.2s;
}
.featured-card:hover h3 { color: white; }
.featured-card p {
  font-size: 13px;
  color: var(--text-35);
  line-height: 1.6;
  flex: 1;
}
.featured-card .meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-20);
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-divider);
}

/* --- Topic Cards (Browse by Topic) --- */
.topics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 480px) {
  .topics-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 768px) {
  .topics-grid { grid-template-columns: 1fr 1fr 1fr; }
}
@media (min-width: 1024px) {
  .topics-grid { grid-template-columns: repeat(4, 1fr); }
}

.topic-card {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  transition: all 0.25s ease;
}
.topic-card:hover {
  border-color: var(--border-hover);
  background: rgba(255,255,255,0.02);
}

.topic-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.topic-card-icon svg {
  width: 18px;
  height: 18px;
}
.topic-card-icon.ip      { background: rgba(0,212,255,0.08); color: var(--accent); }
.topic-card-icon.security { background: rgba(34,197,94,0.08); color: var(--success); }
.topic-card-icon.dns     { background: rgba(108,99,255,0.08); color: var(--purple); }
.topic-card-icon.protocols { background: rgba(245,158,11,0.08); color: var(--warn); }
.topic-card-icon.tools   { background: rgba(0,212,255,0.08); color: var(--accent); }
.topic-card-icon.threats { background: rgba(239,68,68,0.08); color: var(--danger); }
.topic-card-icon.infra   { background: rgba(108,99,255,0.08); color: var(--purple); }

.topic-card-text h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-70);
  margin: 0 0 2px 0;
  transition: color 0.2s;
}
.topic-card:hover .topic-card-text h3 { color: white; }
.topic-card-text span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-25);
}

/* --- Article Cards (listings & related) --- */
.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 640px) {
  .articles-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .articles-grid { grid-template-columns: 1fr 1fr 1fr; }
}

.article-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all 0.25s ease;
}
.article-card:hover {
  border-color: var(--border-hover);
  background: rgba(255,255,255,0.02);
  transform: translateY(-1px);
}
.article-card .category {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-dim);
  margin-bottom: 8px;
}
.article-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-70);
  margin: 0 0 6px 0;
  transition: color 0.2s;
  line-height: 1.4;
}
.article-card:hover h3 { color: white; }
.article-card p {
  font-size: 13px;
  color: var(--text-35);
  line-height: 1.6;
  flex: 1;
}
.article-card .meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-20);
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-divider);
  display: flex;
  align-items: center;
  gap: 12px;
}

/* --- Breadcrumbs --- */
.breadcrumbs {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-25);
  margin-bottom: 24px;
}
.breadcrumbs a {
  color: var(--text-25);
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumbs a:hover { color: var(--text-50); }
.breadcrumbs .sep { margin: 0 8px; opacity: 0.5; }
.breadcrumbs .current { color: var(--text-40); }

/* --- Difficulty Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.badge-beginner     { color: var(--success); background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.2); }
.badge-intermediate { color: var(--warn); background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.2); }
.badge-advanced     { color: var(--danger); background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.2); }

/* --- Article Meta --- */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-30);
  margin-bottom: 8px;
}
.article-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-20);
}

/* --- Tags --- */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 32px;
}
.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-card);
  color: var(--text-30);
  text-decoration: none;
  transition: all 0.2s;
}
.tag:hover {
  color: var(--accent);
  border-color: rgba(0,212,255,0.2);
  background: rgba(0,212,255,0.04);
}

/* --- Table of Contents --- */
.toc {
  margin-bottom: 2rem;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
}
.toc-title {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-25);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toc ul {
  list-style: none;
  padding: 0;
}
.toc li { margin-bottom: 6px; }
.toc a {
  font-size: 13px;
  color: var(--text-40);
  text-decoration: none;
  transition: color 0.2s;
  display: block;
  padding: 2px 0;
}
.toc a:hover { color: var(--accent); }
.toc a.active { color: var(--accent); }
.toc ul ul { padding-left: 16px; margin-top: 6px; }

/* Desktop: sticky sidebar TOC */
@media (min-width: 1024px) {
  .article-layout {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 48px;
    align-items: start;
  }
  .toc {
    position: sticky;
    top: 80px;
    align-self: start;
  }
}

/* --- Prose (article body) --- */
.prose h2 {
  color: var(--text-85);
  font-size: 22px;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}
.prose h3 {
  color: rgba(255,255,255,0.75);
  font-size: 17px;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.prose p {
  color: var(--text-65);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}
.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(0,212,255,0.3);
  transition: text-decoration-color 0.2s;
}
.prose a:hover {
  color: white;
  text-decoration-color: white;
}
.prose strong { color: var(--text-85); font-weight: 600; }
.prose em { color: var(--text-50); }
.prose code {
  color: var(--accent);
  background: rgba(0,212,255,0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-family: var(--font-mono);
}
.prose pre {
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 20px;
  overflow-x: auto;
  margin: 1.5rem 0;
}
.prose pre code {
  background: none;
  padding: 0;
  color: var(--text-50);
  font-size: 13px;
}
.prose ul,
.prose ol { margin-bottom: 1.25rem; padding-left: 1.5rem; }
.prose ul li,
.prose ol li {
  color: var(--text-60);
  padding-left: 4px;
  margin-bottom: 0.5rem;
  line-height: 1.7;
}
.prose ul li::marker { color: var(--accent); }
.prose ol li::marker { color: var(--accent); font-family: var(--font-mono); font-size: 13px; }
.prose blockquote {
  border-left: 2px solid rgba(0,212,255,0.3);
  padding-left: 16px;
  color: var(--text-50);
  font-style: italic;
  margin: 1.5rem 0;
}
.prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.prose th {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-30);
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-card);
}
.prose td {
  font-size: 14px;
  color: var(--text-50);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-divider);
}
.prose td code { font-size: 12px; }
.prose hr {
  border: none;
  border-top: 1px solid var(--border-card);
  margin: 2.5rem 0;
}
.prose img {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-card);
  margin: 1.5rem 0;
}

/* --- Tool CTA Card --- */
.tool-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid rgba(0,212,255,0.15);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin: 1.5rem 0;
  transition: all 0.25s ease;
  text-decoration: none;
}
/* Prevent prose link styles from bleeding into cards/banners */
.prose .tool-cta,
.prose .tool-cta:hover,
.prose .tool-cta *,
.prose .featured-card,
.prose .featured-card:hover,
.prose .featured-card *,
.prose .article-card,
.prose .article-card:hover,
.prose .article-card *,
.prose .ecosystem-card,
.prose .ecosystem-card:hover,
.prose .ecosystem-card *,
.prose .quickref-card,
.prose .quickref-card:hover,
.prose .quickref-card * {
  text-decoration: none;
}
.tool-cta:hover {
  border-color: rgba(0,212,255,0.35);
  background: rgba(0,212,255,0.03);
}
.tool-cta-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(0,212,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tool-cta-icon svg { width: 20px; height: 20px; color: var(--accent); }
.tool-cta-text { flex: 1; }
.tool-cta-text h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-80);
  margin: 0 0 2px 0;
}
.tool-cta-text p {
  font-size: 13px;
  color: var(--text-35);
  margin: 0;
}
.tool-cta-link {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
}

/* --- Callout Boxes --- */
.callout {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
  font-size: 14px;
  line-height: 1.7;
}
.callout-title {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
  font-weight: 600;
}
.callout-info {
  background: rgba(0,212,255,0.05);
  border: 1px solid rgba(0,212,255,0.12);
  color: var(--text-60);
}
.callout-info .callout-title { color: var(--accent); }
.callout-warn {
  background: rgba(245,158,11,0.05);
  border: 1px solid rgba(245,158,11,0.12);
  color: var(--text-60);
}
.callout-warn .callout-title { color: var(--warn); }
.callout-tip {
  background: rgba(34,197,94,0.05);
  border: 1px solid rgba(34,197,94,0.12);
  color: var(--text-60);
}
.callout-tip .callout-title { color: var(--success); }
.callout-danger {
  background: rgba(239,68,68,0.05);
  border: 1px solid rgba(239,68,68,0.12);
  color: var(--text-60);
}
.callout-danger .callout-title { color: var(--danger); }

/* --- Definition Tooltip --- */
.definition {
  position: relative;
  display: inline;
  cursor: help;
}
.definition-term {
  border-bottom: 1px dashed rgba(0,212,255,0.4);
  color: var(--accent);
  transition: border-color 0.2s;
}
.definition:hover .definition-term,
.definition:focus .definition-term {
  border-bottom-color: var(--accent);
}
.definition-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-50);
  line-height: 1.6;
  white-space: normal;
  width: max-content;
  max-width: 320px;
  z-index: 100;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  pointer-events: none;
}
.definition-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--border-card);
}
.definition:hover .definition-tooltip,
.definition:focus .definition-tooltip {
  display: block;
}

/* --- FAQ Accordion --- */
.faq-list {
  border-top: 1px solid var(--border-divider);
}
.faq-item {
  border-bottom: 1px solid var(--border-divider);
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-70);
  font-family: var(--font-sans);
  transition: color 0.2s;
}
.faq-question:hover { color: var(--text-90); }
.faq-question svg {
  width: 16px;
  height: 16px;
  color: var(--text-25);
  flex-shrink: 0;
  transition: transform 0.25s ease;
}
.faq-item.open .faq-question svg { transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-answer-inner {
  padding-bottom: 20px;
  font-size: 14px;
  color: var(--text-40);
  line-height: 1.7;
}
.faq-item.open .faq-answer { max-height: 500px; }

/* --- Glossary --- */
.glossary-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 32px;
}
.glossary-nav a {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 6px;
  color: var(--text-30);
  border: 1px solid var(--border-card);
  text-decoration: none;
  transition: all 0.2s;
}
.glossary-nav a:hover {
  color: var(--accent);
  border-color: rgba(0,212,255,0.2);
  background: rgba(0,212,255,0.04);
}

.glossary-section { margin-bottom: 32px; }
.glossary-letter {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-card);
}
.glossary-section dt {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-70);
  margin-top: 16px;
}
.glossary-section dt a {
  color: var(--accent);
  text-decoration: none;
}
.glossary-section dt a:hover { color: white; }
.glossary-section dd {
  font-size: 14px;
  color: var(--text-40);
  line-height: 1.7;
  margin-bottom: 8px;
  padding-left: 0;
}

/* --- Search --- */
.search-wrapper {
  position: relative;
  margin-bottom: 32px;
}
.search-input {
  width: 100%;
  padding: 14px 16px 14px 48px;
  background: var(--surface);
  border: 1px solid var(--border-interactive);
  border-radius: var(--radius-md);
  color: var(--text-70);
  font-family: var(--font-mono);
  font-size: 14px;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.search-input:focus {
  border-color: rgba(0,212,255,0.3);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.06);
}
.search-input::placeholder { color: var(--text-15); }

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #08080F;
  border: 1px solid rgba(0,212,255,0.15);
  border-radius: var(--radius-md);
  max-height: 400px;
  overflow-y: auto;
  display: none;
  z-index: 9999;
  box-shadow: 0 20px 60px rgba(0,0,0,0.95), 0 0 0 1px rgba(0,212,255,0.1);
}
.search-results.active { display: block; }
.search-result-item {
  display: block;
  padding: 12px 16px;
  text-decoration: none;
  border-bottom: 1px solid var(--border-divider);
  transition: background 0.15s;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: rgba(0,212,255,0.05); }
.search-result-item:hover h4 { color: var(--accent); }
.search-result-item h4 {
  font-size: 14px;
  color: var(--text-90);
  font-weight: 600;
  margin: 0 0 4px 0;
}
.search-result-item p {
  font-size: 13px;
  color: var(--text-50);
  margin: 0;
  line-height: 1.4;
}

/* --- Ecosystem Section --- */
.ecosystem-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) {
  .ecosystem-grid { grid-template-columns: 1fr 1fr; }
}

.ecosystem-card {
  display: block;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.ecosystem-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--purple));
  opacity: 0;
  transition: opacity 0.25s;
}
.ecosystem-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}
.ecosystem-card:hover::after { opacity: 1; }
.ecosystem-card .label-accent { margin-bottom: 10px; display: block; }
.ecosystem-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-80);
  margin: 0 0 8px 0;
}
.ecosystem-card p {
  font-size: 13px;
  color: var(--text-35);
  line-height: 1.6;
}

/* --- Quick Reference Cards --- */
.quickref-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 768px) {
  .quickref-grid { grid-template-columns: 1fr 1fr 1fr; }
}

.quickref-card {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 18px;
  transition: all 0.25s ease;
}
.quickref-card:hover {
  border-color: rgba(0,212,255,0.2);
  background: rgba(0,212,255,0.02);
}
.quickref-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(0,212,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.quickref-card-icon svg { width: 18px; height: 18px; color: var(--accent); }
.quickref-card h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-70);
  margin: 0 0 2px 0;
}
.quickref-card p {
  font-size: 12px;
  color: var(--text-30);
  margin: 0;
}

/* --- 404 Page --- */
.page-404 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 60vh;
  padding: 64px 24px;
}
.page-404 .error-code {
  font-family: var(--font-mono);
  font-size: 96px;
  font-weight: 700;
  color: rgba(0,212,255,0.15);
  line-height: 1;
  margin-bottom: 16px;
}
.page-404 h1 {
  font-size: 28px;
  margin-bottom: 12px;
}
.page-404 p {
  font-size: 15px;
  color: var(--text-40);
  margin-bottom: 32px;
}
.page-404 .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: background 0.2s;
}
.page-404 .btn:hover { background: white; color: var(--bg); }

/* --- Related Articles --- */
.related-section { margin-top: 3rem; }
.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 20px;
}
@media (min-width: 640px) {
  .related-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .related-grid { grid-template-columns: 1fr 1fr 1fr; }
}

/* --- Built By Section --- */
.built-by {
  padding: 64px 0 0;
}
.built-by-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-20);
  margin-bottom: 20px;
  text-align: center;
}
.built-by-card {
  max-width: 680px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: border-color 0.3s ease;
}
.built-by-card:hover {
  border-color: var(--border-hover);
}
.built-by-header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 20px;
}
.built-by-logo {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}
.built-by-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-90);
  margin: 0 0 8px 0;
}
.built-by-since {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--text-20);
  letter-spacing: 0.1em;
  margin-left: 8px;
  vertical-align: middle;
}
.built-by-desc {
  font-size: 14px;
  color: var(--text-40);
  line-height: 1.7;
  margin: 0;
}
.built-by-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.built-by-links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-40);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-card);
  background: rgba(255,255,255,0.02);
  transition: all 0.2s ease;
}
.built-by-links a:hover {
  color: var(--accent);
  border-color: rgba(0,212,255,0.25);
  background: rgba(0,212,255,0.04);
}
@media (max-width: 540px) {
  .built-by-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .built-by-card { padding: 24px; }
  .built-by-links { justify-content: center; }
}

/* --- Utility --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* --- Animations (CSS only) --- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-in {
  opacity: 0;
  animation: fadeInUp 0.6s cubic-bezier(0.16,1,0.3,1) forwards;
}
.animate-in-1 { animation-delay: 0ms; }
.animate-in-2 { animation-delay: 80ms; }
.animate-in-3 { animation-delay: 160ms; }
.animate-in-4 { animation-delay: 240ms; }
.animate-in-5 { animation-delay: 320ms; }
.animate-in-6 { animation-delay: 400ms; }

/* --- Responsive visibility --- */
.hide-mobile { display: none; }
@media (min-width: 768px) {
  .hide-mobile { display: block; }
  .hide-desktop { display: none; }
}

/* --- Print --- */
@media print {
  .navbar, .footer, .toc, .tool-cta, .mobile-menu, .built-by { display: none; }
  body { background: white; color: black; }
  main { padding-top: 0; }
  .prose a { color: black; text-decoration: underline; }
  .prose code { background: #f0f0f0; color: #333; }
}
