/* =====================================================================
   JAG WWII ETO Board of Review — Stylesheet
   Palette: cream body / olive accents / stone text / amber tags
   Fonts: Cinzel (titles) · Inter (body) · Oswald (headings)
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Inter:wght@300;400;500;600&family=Oswald:wght@300;400;500;600&display=swap');

/* ── Reset & base ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #292524;           /* stone-800 */
  background-color: #fbf8f1; /* warm cream */
  min-height: 100vh;
}

a { color: #5f5730; text-decoration: none; }
a:hover { color: #4a4425; text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; margin-top: 0; }
h1 { font-family: 'Cinzel', serif; font-weight: 700; }
h2, h3 { font-family: 'Oswald', sans-serif; font-weight: 500; }

p { margin-top: 0; margin-bottom: 1rem; }

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

/* ── Layout ─────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ── Navbar ──────────────────────────────────────────────────────────── */
.navbar {
  background-color: #f5f1e6;
  border-bottom: 1px solid #e7e5e4;
  position: sticky;
  top: 0;
  z-index: 100;
  height: 3.5rem;
}

.navbar-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  flex-shrink: 0;
}

.navbar-logo { width: 2rem; height: 2rem; object-fit: contain; }

.site-title {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: #292524;
  letter-spacing: 0.02em;
}

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

.navbar-nav a,
.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #57534e;
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.navbar-nav a:hover,
.nav-dropdown-toggle:hover,
.navbar-nav a.active {
  background-color: #ede9d8;
  color: #292524;
  text-decoration: none;
}

/* Dropdown */
.nav-dropdown { position: relative; }

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  background: #fff;
  border: 1px solid #e7e5e4;
  border-radius: 0.75rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  padding: 0.375rem;
  min-width: 11rem;
  list-style: none;
  margin: 0;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #57534e;
  text-decoration: none;
}

.nav-dropdown-menu a:hover {
  background-color: #f5f1e6;
  color: #292524;
}

.nav-dropdown-arrow {
  display: inline-block;
  font-size: 0.6rem;
  transition: transform 0.2s;
  margin-left: 0.25rem;
  vertical-align: middle;
}

.nav-dropdown:hover .nav-dropdown-arrow,
.nav-dropdown.open .nav-dropdown-arrow { transform: rotate(180deg); }

.navbar-spacer { flex: 1; }

/* Mobile nav toggle */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.375rem;
  color: #57534e;
  font-size: 1.25rem;
}

/* ── Hero / search banner ────────────────────────────────────────────── */
.hero {
  background: radial-gradient(circle at top left, rgba(95,87,48,0.18) 0%, transparent 60%),
              linear-gradient(135deg, #f5f1e6 0%, #fcfaf5 50%, #efe7d4 100%);
  border-radius: 2rem;
  padding: 2.5rem 2rem;
  margin: 1.5rem 0;
}

.hero-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700;
  color: #292524;
  margin-bottom: 0.5rem;
}

.hero-kicker {
  font-family: 'Oswald', sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5f5730;
  margin-bottom: 0.375rem;
}

.hero-subtitle {
  color: #57534e;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  max-width: 680px;
}

/* ── Search form ────────────────────────────────────────────────────── */
.search-form {
  display: flex;
  gap: 0.5rem;
  max-width: 640px;
}

.search-input {
  flex: 1;
  padding: 0.875rem 1.25rem;
  border: 1.5px solid #d6d3d1;
  border-radius: 1rem;
  font-family: inherit;
  font-size: 0.9375rem;
  background: #fff;
  color: #292524;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search-input:focus {
  border-color: #5f5730;
  box-shadow: 0 0 0 3px rgba(95,87,48,0.12);
}

.search-btn {
  padding: 0.875rem 1.5rem;
  background: #292524;
  color: #f5f1e6;
  border: none;
  border-radius: 1rem;
  font-family: 'Oswald', sans-serif;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.search-btn:hover { background: #1c1917; }

.search-examples { margin-top: 0.625rem; font-size: 0.8125rem; color: #78716c; }
.search-examples a { color: #5f5730; font-weight: 500; }

/* Quick links row */
.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.quick-card {
  flex: 1;
  min-width: 140px;
  background: rgba(255,255,255,0.7);
  border: 1px solid #e7e5e4;
  border-radius: 1rem;
  padding: 1rem;
  text-decoration: none;
  color: #292524;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.quick-card:hover {
  border-color: #5f5730;
  box-shadow: 0 2px 8px rgba(95,87,48,0.1);
  background: rgba(255,255,255,0.95);
  text-decoration: none;
}

.quick-card-icon { font-size: 1.25rem; color: #5f5730; margin-bottom: 0.375rem; }
.quick-card-title { font-family: 'Oswald', sans-serif; font-size: 0.875rem; font-weight: 500; }
.quick-card-sub { font-size: 0.75rem; color: #78716c; margin-top: 0.125rem; }

/* ── Layout: sidebar + main ─────────────────────────────────────────── */
.layout-split {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.sidebar {
  width: 230px;
  flex-shrink: 0;
  position: sticky;
  top: 4.5rem;
}

.sidebar-panel {
  background: #fff;
  border: 1px solid #e7e5e4;
  border-radius: 1rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

.sidebar-title {
  font-family: 'Oswald', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #78716c;
  margin-bottom: 0.75rem;
}

.filter-group { margin-bottom: 1rem; }
.filter-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #57534e;
  margin-bottom: 0.25rem;
}

.filter-input, .filter-select {
  width: 100%;
  padding: 0.4375rem 0.625rem;
  border: 1px solid #d6d3d1;
  border-radius: 0.5rem;
  font-family: inherit;
  font-size: 0.8125rem;
  background: #fff;
  color: #292524;
  outline: none;
}

.filter-input:focus, .filter-select:focus {
  border-color: #5f5730;
  box-shadow: 0 0 0 2px rgba(95,87,48,0.1);
}

.filter-row {
  display: flex;
  gap: 0.375rem;
}

.filter-row .filter-input { width: 0; flex: 1; }

.filter-apply-btn {
  width: 100%;
  padding: 0.5rem;
  background: #5f5730;
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  font-family: 'Oswald', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background 0.15s;
}

.filter-apply-btn:hover { background: #4a4425; }

.filter-clear-link {
  display: block;
  text-align: center;
  font-size: 0.75rem;
  color: #78716c;
  margin-top: 0.5rem;
}

.filter-clear-link:hover { color: #5f5730; }

.main-content { flex: 1; min-width: 0; }

/* ── Results header ─────────────────────────────────────────────────── */
.results-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.results-count {
  font-family: 'Oswald', sans-serif;
  font-size: 1.125rem;
  font-weight: 500;
  color: #292524;
}

.results-count em { color: #5f5730; font-style: normal; }

/* ── Case card ──────────────────────────────────────────────────────── */
.case-card {
  background: #fff;
  border: 1px solid #e7e5e4;
  border-radius: 1rem;
  padding: 1.25rem;
  margin-bottom: 0.75rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.case-card:hover {
  border-color: #5f5730;
  box-shadow: 0 2px 12px rgba(95,87,48,0.08);
  text-decoration: none;
}

.case-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.case-eto {
  font-family: 'Oswald', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #78716c;
  white-space: nowrap;
}

.case-card-title {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 600;
  color: #292524;
  margin-bottom: 0.25rem;
  line-height: 1.35;
}

.case-meta {
  font-size: 0.8125rem;
  color: #78716c;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.case-meta-item::before {
  content: '·';
  margin-right: 0.375rem;
  opacity: 0.5;
}

.case-meta-item:first-child::before { display: none; }

.case-snippet {
  font-size: 0.8125rem;
  color: #57534e;
  margin: 0.5rem 0;
  line-height: 1.55;
}

.case-snippet mark {
  background-color: #fef3c7;
  color: #92400e;
  border-radius: 0.25rem;
  padding: 0 0.125rem;
}

.case-card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.625rem;
}

/* ── Badges ──────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.1875rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid transparent;
  line-height: 1.4;
  white-space: nowrap;
}

.badge-default  { background: #f5f5f4; color: #57534e; border-color: #e7e5e4; }
.badge-article  { background: #f0ede0; color: #5f5730; border-color: #c9c29a; }
.badge-tag      { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.badge-facility { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.badge-location { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.badge-offence  { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
.badge-context  { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.badge-legal    { background: #faf5ff; color: #6b21a8; border-color: #e9d5ff; }
.badge-vol      { background: #f5f5f4; color: #78716c; border-color: #e7e5e4; font-family: 'Oswald', sans-serif; font-size: 0.7rem; letter-spacing: 0.04em; }

/* ── Pagination ──────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.625rem;
  border: 1px solid #e7e5e4;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #57534e;
  background: #fff;
  text-decoration: none;
  transition: background 0.12s, border-color 0.12s;
}

.page-btn:hover { background: #f5f1e6; border-color: #c9c29a; text-decoration: none; color: #292524; }

.page-btn.active {
  background: #292524;
  color: #f5f1e6;
  border-color: #292524;
  font-weight: 600;
}

.page-btn.disabled { pointer-events: none; opacity: 0.4; }

/* ── Case detail page ────────────────────────────────────────────────── */
.case-detail-header {
  background: radial-gradient(circle at top left, rgba(95,87,48,0.15) 0%, transparent 60%),
              linear-gradient(135deg, #f5f1e6 0%, #fcfaf5 50%, #efe7d4 100%);
  border-radius: 1.5rem;
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.case-detail-eto {
  font-family: 'Oswald', sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #78716c;
  margin-bottom: 0.5rem;
}

.case-detail-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.25rem, 3vw, 1.875rem);
  font-weight: 700;
  color: #1c1917;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.case-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.875rem;
  color: #57534e;
}

.case-detail-meta span { display: flex; align-items: center; gap: 0.375rem; }
.case-detail-meta i { color: #5f5730; font-size: 0.875rem; width: 1rem; text-align: center; }

/* Badly scanned pages (poor_scan_pages): amber, as .badge-tag */
.case-scan-note {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #fde68a;
  border-radius: 0.375rem;
  background: #fffbeb;
  color: #92400e;
  font-size: 0.875rem;
}

/* Tags on the left, export buttons on the right (wraps below on narrow screens) */
.case-detail-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-top: 1rem;
}

.case-detail-tags { display: flex; flex-wrap: wrap; gap: 0.375rem; }

.case-export {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.case-export-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #78716c;
  margin-right: 0.25rem;
}

.case-export-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  height: 2rem;
  padding: 0 0.75rem;
  border: 1px solid #e7e5e4;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  color: #57534e;
  background: #fff;
  text-decoration: none;
}

.case-export-btn i { color: #5f5730; }
.case-export-btn:hover { background: #f5f1e6; border-color: #c9c29a; color: #292524; text-decoration: none; }

.detail-layout {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.detail-left { flex: 0 0 340px; }
.detail-right { flex: 1; min-width: 0; }

/* Section card */
.section-card {
  background: #fff;
  border: 1px solid #e7e5e4;
  border-radius: 1rem;
  margin-bottom: 1rem;
  overflow: hidden;
}

.section-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.25rem;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid transparent;
  transition: background 0.12s;
}

.section-card-header:hover { background: #fafaf9; }
.section-card.open .section-card-header { border-bottom-color: #f5f5f4; }

.section-card-title {
  font-family: 'Oswald', sans-serif;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #292524;
}

.section-card-icon {
  display: inline-block;
  color: #a8a29e;
  font-size: 0.7rem;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.section-card.open .section-card-icon { transform: rotate(180deg); }

.section-card-body {
  padding: 1rem 1.25rem;
  display: none;
}

.section-card.open .section-card-body { display: block; }

/* Info table */
.info-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.info-table th {
  font-weight: 500;
  color: #78716c;
  text-align: left;
  padding: 0.3125rem 0.5rem 0.3125rem 0;
  white-space: nowrap;
  width: 40%;
  vertical-align: top;
}
.info-table td { padding: 0.3125rem 0; color: #292524; }

/* Accused table */
.accused-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.accused-table th {
  font-weight: 600;
  color: #78716c;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.375rem 0.5rem;
  border-bottom: 1px solid #f5f5f4;
  text-align: left;
}
.accused-table td {
  padding: 0.5rem 0.5rem;
  border-bottom: 1px solid #fafaf9;
  vertical-align: top;
}
.accused-table tr:last-child td { border-bottom: none; }

/* Charges */
.charge-block { margin-bottom: 1.25rem; }
.charge-block:last-child { margin-bottom: 0; }

.charge-heading {
  font-family: 'Oswald', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: #5f5730;
  margin-bottom: 0.5rem;
}

.spec-item {
  border-left: 2px solid #e7e4d0;
  padding-left: 0.875rem;
  margin-bottom: 0.75rem;
  font-size: 0.8125rem;
  color: #57534e;
  line-height: 1.55;
}

.spec-num {
  font-weight: 600;
  color: #78716c;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

/* Sentences */
.sentence-item {
  border-bottom: 1px solid #f5f5f4;
  padding: 0.625rem 0;
  font-size: 0.875rem;
}
.sentence-item:last-child { border-bottom: none; }
.sentence-role {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #a8a29e;
  margin-bottom: 0.25rem;
}

/* Opinion text */
.opinion-panel {
  background: #fff;
  border: 1px solid #e7e5e4;
  border-radius: 1rem;
  padding: 1.25rem;
  max-height: 70vh;
  overflow-y: auto;
  font-size: 0.875rem;
  line-height: 1.7;
  color: #44403c;
  white-space: pre-wrap;
  font-family: 'Inter', sans-serif;
}

/* ── Browse pages ────────────────────────────────────────────────────── */
.browse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.875rem;
  margin-top: 1rem;
}

.browse-card {
  background: #fff;
  border: 1px solid #e7e5e4;
  border-radius: 1rem;
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.browse-card:hover {
  border-color: #5f5730;
  box-shadow: 0 2px 12px rgba(95,87,48,0.08);
  text-decoration: none;
}

.browse-card-title {
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: #292524;
}

.browse-card-count {
  font-size: 0.8125rem;
  color: #78716c;
}

.browse-section { margin-bottom: 2rem; }

.browse-section-title {
  font-family: 'Oswald', sans-serif;
  font-size: 1.125rem;
  font-weight: 500;
  color: #292524;
  border-bottom: 1px solid #e7e5e4;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

/* ── About page ─────────────────────────────────────────────────────── */
.about-page { max-width: 760px; margin: 1.5rem auto 0; }
.about-page .prose { max-width: none; }
.about-page .prose h2 { margin-top: 2.75rem; }
.about-page .stats-grid { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.about-page .stat-number { font-size: 1.5rem; white-space: nowrap; }
.nowrap { white-space: nowrap; }

.prose details { margin-top: 0.75rem; border: 1px solid #e7e5e4; border-radius: 0.75rem; padding: 0.75rem 1rem; background: #fff; }
.prose summary { cursor: pointer; font-weight: 500; color: #292524; }
.prose details[open] summary { margin-bottom: 0.5rem; }
.about-hero {
  background: linear-gradient(135deg, #f5f1e6 0%, #efe7d4 100%);
  border-radius: 1.5rem;
  padding: 2.5rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.about-hero-logo { width: 5rem; height: 5rem; object-fit: contain; flex-shrink: 0; }

.about-hero-title {
  font-family: 'Cinzel', serif;
  font-size: 2rem;
  font-weight: 700;
  color: #1c1917;
  margin-bottom: 0.375rem;
}

.about-hero-sub { font-size: 1rem; color: #57534e; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.stat-card {
  background: #fff;
  border: 1px solid #e7e5e4;
  border-radius: 1rem;
  padding: 1.25rem;
  text-align: center;
}

.stat-number {
  font-family: 'Cinzel', serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: #5f5730;
}

.stat-label {
  font-size: 0.8125rem;
  color: #78716c;
  margin-top: 0.25rem;
}

.prose {
  max-width: 68ch;
  color: #44403c;
  line-height: 1.75;
}

.prose h2 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.375rem;
  font-weight: 500;
  color: #292524;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.prose h3 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.0625rem;
  color: #44403c;
  margin-top: 1.25rem;
  margin-bottom: 0.375rem;
}

.prose ul, .prose ol { padding-left: 1.5rem; }
.prose li { margin-bottom: 0.375rem; }
.prose strong { color: #292524; }

/* ── Admin/QC page ──────────────────────────────────────────────────── */
.qc-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.qc-table th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  background: #f5f5f4;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #78716c;
  border-bottom: 1px solid #e7e5e4;
}
.qc-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #fafaf9;
  color: #44403c;
}
.qc-table tr:last-child td { border-bottom: none; }
.qc-table tr:hover td { background: #fafaf9; }

.qc-section {
  background: #fff;
  border: 1px solid #e7e5e4;
  border-radius: 1rem;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.qc-section-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f5f5f4;
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: #292524;
}

/* ── Page header ─────────────────────────────────────────────────────── */
.page-header {
  margin-bottom: 1.5rem;
}

.page-header-title {
  font-family: 'Cinzel', serif;
  font-size: 1.625rem;
  font-weight: 700;
  color: #1c1917;
  margin-bottom: 0.25rem;
}

.page-header-sub { color: #78716c; font-size: 0.9375rem; }

/* ── Utility ─────────────────────────────────────────────────────────── */
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.text-muted { color: #78716c; }
.text-sm { font-size: 0.8125rem; }
.text-xs { font-size: 0.75rem; }

.no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: #78716c;
}

.no-results-icon { font-size: 2.5rem; color: #a8a29e; margin-bottom: 0.75rem; }
.no-results-title { font-family: 'Oswald', sans-serif; font-size: 1.125rem; color: #292524; }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .detail-layout { flex-direction: column; }
  .detail-left { flex: none; width: 100%; }
  .detail-right { width: 100%; }
}

@media (max-width: 768px) {
  .layout-split { flex-direction: column; }
  .sidebar { width: 100%; position: static; }

  .navbar-nav { display: none; }
  .navbar-nav.open { display: flex; flex-direction: column; position: absolute; top: 3.5rem; left: 0; right: 0; background: #f5f1e6; border-bottom: 1px solid #e7e5e4; padding: 0.5rem; z-index: 99; }
  .mobile-menu-btn { display: block; }

  .case-export { margin-left: 0; }
  .case-export-label { width: 100%; }

  .about-hero { flex-direction: column; text-align: center; gap: 1rem; padding: 1.75rem 1.25rem; }
  .about-hero-logo { width: 3.5rem; height: 3.5rem; }
  .about-hero-title { font-size: 1.5rem; }
}

@media (max-width: 480px) {
  .hero { padding: 1.5rem 1rem; border-radius: 1rem; }
  .search-form { flex-direction: column; }
  .search-btn { width: 100%; }
}

/* ── Statistics page ────────────────────────────────────────────────── */
.stats-controls { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1rem 0 1.5rem; }
.stats-controls > div { min-width: 200px; }
.stats-layout { display: flex; flex-wrap: wrap; gap: 2rem; align-items: flex-start; }
.stats-pie { width: 320px; max-width: 100%; height: auto; flex-shrink: 0; }
.stats-legend { flex: 1; min-width: 280px; border-collapse: collapse; font-size: 0.875rem; }
.stats-legend th { text-align: left; font-weight: 500; color: #78716c; border-bottom: 1px solid #e7e5e4; padding: 0.375rem 0.5rem; }
.stats-legend td { padding: 0.375rem 0.5rem; border-bottom: 1px solid #f5f5f4; }
.stats-legend td:nth-child(3), .stats-legend td:nth-child(4),
.stats-legend th:nth-child(3), .stats-legend th:nth-child(4) { text-align: right; }
.stats-swatch { display: inline-block; width: 0.875rem; height: 0.875rem; border-radius: 0.2rem; }
.stats-note { margin-top: 1rem; }
