/* ── Base ─────────────────────────────────────────────── */
:root {
  --accent:        #990000;
  --accent-hover:  #6b0000;
  --accent-light:  #fff0f0;
  --text:          #111827;
  --text-body:     #374151;
  --muted:         #6b7280;
  --border:        #e5e7eb;
  --bg:            #ffffff;
  --bg-soft:       #f9fafb;
  --radius:        0.5rem;
  --radius-lg:     0.75rem;
  --font:          'Inter', system-ui, -apple-system, sans-serif;
}

html, body {
  min-height: 100vh;
}

body {
  font-family: var(--font);
  font-size: 1rem;
  color: var(--text-body);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

main.container { flex: 1; }

/* ── Typography ───────────────────────────────────────── */
h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 0.75rem;
}

h2 {
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

p {
  line-height: 1.8;
  color: var(--text-body);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.12s;
}
a:hover { color: var(--accent-hover); text-decoration: underline; }

/* ── Page layout (content + sidebar) ─────────────────── */
.page-layout {
  display: flex;
  align-items: flex-start;
  gap: 2.5rem;
}

.page-content {
  flex: 1;
  min-width: 0; /* prevent flex blowout */
}

.page-sidebar {
  flex: 0 0 160px;
  width: 160px;
}

/* On small screens stack sidebar below content */
@media (max-width: 767px) {
  .page-layout {
    flex-direction: column;
  }
  .page-sidebar {
    flex: none;
    width: 100%;
  }
}

/* ── Ad unit ──────────────────────────────────────────── */
.ad-unit {
  text-align: center;
}

.ad-unit-sticky {
  position: sticky;
  top: 1.5rem;
}

.ad-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

/* ── Site header ──────────────────────────────────────── */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 0 0;
  background: var(--bg);
}

.site-header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.site-logo-link {
  display: inline-block;
  line-height: 0;
}

.site-logo {
  height: auto;
  max-width: 100%;
  width: auto;
  display: block;
}

/* ── Site nav (below logo) ────────────────────────────── */
.site-nav {
  width: auto;
}

.site-nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.4rem 0.55rem;
  cursor: pointer;
  margin-bottom: 0.25rem;
}

.site-nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--muted);
  border-radius: 2px;
}

.site-nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 0.15rem;
  padding: 0.25rem 0;
}

.site-nav-links .nav-link {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: color 0.12s, background 0.12s;
  white-space: nowrap;
}

.site-nav-links .nav-link:hover {
  color: var(--accent);
  background: var(--accent-light);
  text-decoration: none;
}

.site-nav-links .nav-link-dim {
  color: #aaa;
}

.site-nav-links .nav-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
}

/* Mobile: hamburger visible, nav collapses */
@media (max-width: 575px) {
  .site-nav {
    width: 100%;
  }
  .site-nav-toggle {
    display: flex;
  }
  .site-nav-links {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.5rem 0 0.75rem;
  }
  /* When Bootstrap adds .collapse without .show, hide it */
  .site-nav-links.collapse:not(.show) {
    display: none !important;
  }
}

/* Desktop: always show the nav regardless of Bootstrap collapse state */
@media (min-width: 576px) {
  .site-nav-toggle {
    display: none !important;
  }
  .site-nav-links {
    display: flex !important;   /* override Bootstrap .collapse */
    height: auto !important;
    overflow: visible !important;
    padding-bottom: 0.35rem;
  }
  .site-header-inner {
    flex-direction: row;
    align-items: flex-end;
    justify-content: center;
    gap: 2rem;
  }
}

/* ── Footer ───────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  margin-top: 4rem;
}

.site-footer a {
  font-size: 0.875rem;
  color: var(--muted);
}
.site-footer a:hover { color: var(--accent); text-decoration: none; }

.footer-brand {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* ── Breadcrumb ───────────────────────────────────────── */
.breadcrumb {
  font-size: 0.8rem;
  background: transparent;
  padding: 0;
  margin-bottom: 2rem;
}

.breadcrumb-item + .breadcrumb-item::before { color: var(--border); }
.breadcrumb-item a { color: var(--muted); }
.breadcrumb-item a:hover { color: var(--accent); text-decoration: none; }
.breadcrumb-item.active { color: var(--muted); }

/* ── Home hero ────────────────────────────────────────── */
.hero-block {
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.hero-kicker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.2rem 0.65rem;
  border-radius: 2rem;
  margin-bottom: 1rem;
}.hero-title {
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0;
}

/* ── Random term card ─────────────────────────────────── */
.random-jargon-card {
  padding: 1.75rem 2rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-lg);
  margin-bottom: 2.5rem;
}

.random-jargon-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.random-jargon-term {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-top: 0;
  margin-bottom: 0.6rem;
}

.random-jargon-term a {
  color: var(--text);
}
.random-jargon-term a:hover {
  color: var(--accent);
  text-decoration: none;
}

.random-jargon-def {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-body);
  margin-bottom: 0.75rem;
}

.random-jargon-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
}

.random-jargon-meta a {
  color: var(--muted);
  font-weight: 500;
}
.random-jargon-meta a:hover { color: var(--accent); text-decoration: none; }

/* ── Stat strip ───────────────────────────────────────── */
.stat-strip {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
  padding: 0.85rem 1.1rem;
  background: var(--bg-soft);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 2rem;
}

.stat-strip a {
  color: var(--text-body);
  font-weight: 600;
}
.stat-strip a:hover { color: var(--accent); text-decoration: none; }

/* ── Section heading ──────────────────────────────────── */
.section-heading {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
  margin-top: 0;
}

/* ── Term list (categories / subcategories) ───────────── */
.term-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.25rem;
}

.term-list li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-body);
  transition: background 0.1s, color 0.1s;
}

.term-list li a:hover {
  background: var(--accent-light);
  color: var(--accent);
  text-decoration: none;
}

.term-count {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 400;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 2rem;
  padding: 0.1rem 0.5rem;
  margin-left: 0.5rem;
  white-space: nowrap;
}

/* ── Jargon list (subcategory index) ─────────────────── */
.jargon-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 0.2rem;
}

.jargon-list li a {
  display: block;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text-body);
  transition: background 0.1s, color 0.1s;
}

.jargon-list li a:hover {
  background: var(--accent-light);
  color: var(--accent);
  text-decoration: none;
}

/* ── Definition page ──────────────────────────────────── */
.def-header {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.75rem;
}

.def-category-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.def-category-label a {
  color: var(--accent);
}
.def-category-label a:hover { color: var(--accent-hover); text-decoration: none; }
.def-category-label .sep {
  color: var(--border);
  margin: 0 0.35rem;
}

.def-term {
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--text);
  margin-bottom: 0;
}

.def-body {
  font-size: 1.1rem;
  line-height: 1.85;
  color: var(--text-body);
  margin-bottom: 1.75rem;
}

.def-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.75rem;
}

.see-also-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.see-also-links a {
  font-size: 0.88rem;
  font-weight: 500;
}

.view-count {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: var(--muted);
  padding: 0.2rem 0.7rem;
  background: var(--bg-soft);
  border-radius: 2rem;
  border: 1px solid var(--border);
}

.back-link {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}
.back-link:hover { color: var(--accent); text-decoration: none; }

.link-box-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem;
  max-width: 440px;
}

.link-box-card .link-box-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  display: block;
  margin-bottom: 0.5rem;
}

/* ── Category page header ─────────────────────────────── */
.cat-header {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.75rem;
}

.cat-header h1 {
  margin-bottom: 0.25rem;
}

/* ── Forms ────────────────────────────────────────────── */
.form-label {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.form-control, .form-select {
  border-color: var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  color: var(--text);
}

.form-control:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
  border-radius: var(--radius);
  padding: 0.55rem 1.5rem;
  font-size: 0.95rem;
}

.btn-primary:hover, .btn-primary:focus {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* ── FAQ ──────────────────────────────────────────────── */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
}
.faq-item:last-child { border-bottom: none; }

.faq-question {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.faq-answer {
  font-size: 0.93rem;
  line-height: 1.75;
  color: var(--text-body);
  margin: 0;
}

/* ── Page header (About/FAQ/Submit) ───────────────────── */
.page-header {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.page-header p {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 0;
}
