/* ==========================================================================
   ExpiredTrademarks.co.uk — Design System
   Institutional authority meets modern SaaS. Warm, muted, trustworthy.
   ========================================================================== */

/* ---------- Design Tokens ---------- */
:root {
  /* Backgrounds */
  --bg-page: #f7f6f3;
  --bg-surface: #ffffff;
  --bg-surface-alt: #f0efeb;
  --bg-input: #ffffff;

  /* Accent — deep forest green */
  --accent: #2d5f2d;
  --accent-hover: #1e4a1e;
  --accent-light: #e8f0e8;
  --accent-text: #2d5f2d;

  /* Text */
  --text-primary: #1a1916;
  --text-secondary: #6b6960;
  --text-hint: #8a8780;

  /* Borders */
  --border: #e5e3dc;
  --border-light: #edece7;
  --border-hover: #2d5f2d;

  /* Status badges */
  --status-expired-bg: #fae8e8;
  --status-expired-text: #8b3a3a;
  --status-dead-bg: #f0efeb;
  --status-dead-text: #6b6960;
  --status-removed-bg: #f5f0e0;
  --status-removed-text: #7a6520;
  --status-registered-bg: #e8f0e8;
  --status-registered-text: #2d5f2d;
  --status-cancelled-bg: #fae8e8;
  --status-cancelled-text: #8b3a3a;
  --status-surrendered-bg: #f0efeb;
  --status-surrendered-text: #6b6960;
  --status-withdrawn-bg: #f0efeb;
  --status-withdrawn-text: #6b6960;
  --status-refused-bg: #f0efeb;
  --status-refused-text: #6b6960;

  /* Fonts */
  --font-sans: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'DM Mono', 'Consolas', monospace;

  /* Transitions */
  --transition: 0.15s ease;
}

/* ---------- Bootstrap Overrides ---------- */
body {
  font-family: var(--font-sans) !important;
  background: var(--bg-page) !important;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh !important;
  display: flex !important;
  flex-direction: column !important;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 500;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 { font-size: 22px; letter-spacing: -0.4px; }
h2 { font-size: 18px; letter-spacing: -0.3px; }
h3 { font-size: 16px; letter-spacing: -0.2px; }
h4 { font-size: 15px; }
h5 { font-size: 14px; }
h6 { font-size: 13px; }

a { color: var(--accent); transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

.text-muted { color: var(--text-secondary) !important; }

/* ---------- Layout ---------- */
.site-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 767px) {
  .site-container { padding: 0 24px; }
}

/* ---------- Navigation ---------- */
.site-nav {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1030;
}

.site-nav .navbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  padding: 0;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  border-radius: 5px;
  flex-shrink: 0;
}

.logo-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.logo-tld {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-hint);
}

.site-nav .nav-link {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  padding: 14px 10px !important;
  text-decoration: none;
  transition: color var(--transition);
}

.site-nav .nav-link:hover,
.site-nav .nav-link.active {
  color: var(--accent);
  font-weight: 500;
}

.site-nav .navbar-nav {
  gap: 0;
}

.btn-signup {
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 5px;
  text-decoration: none;
  transition: background var(--transition);
  white-space: nowrap;
}

.btn-signup:hover {
  background: var(--accent-hover);
  color: #fff;
}

.site-nav .navbar-toggler {
  border: 1px solid var(--border);
  padding: 4px 8px;
  font-size: 14px;
}

/* ---------- Buttons ---------- */
.btn-accent {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 20px;
  transition: background var(--transition);
  text-decoration: none;
  display: inline-block;
}

.btn-accent:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn-accent-sm {
  font-size: 11px;
  padding: 4px 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-weight: 500;
  transition: background var(--transition);
  text-decoration: none;
  display: inline-block;
}

.btn-accent-sm:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn-muted {
  background: var(--bg-surface-alt);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 20px;
  transition: border-color var(--transition);
  text-decoration: none;
  display: inline-block;
}

.btn-muted:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.btn-outline-secondary {
  border-color: var(--border) !important;
  color: var(--text-secondary) !important;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
}

.btn-outline-secondary:hover {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
  background: transparent !important;
}

/* Override Bootstrap primary button */
.btn-primary {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  font-weight: 500;
  border-radius: 6px;
}

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

/* ---------- Forms ---------- */
.form-control, .form-select {
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-primary);
  background: var(--bg-input);
  transition: border-color var(--transition);
}

.form-control:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(45, 95, 45, 0.1);
}

.form-control::placeholder {
  color: var(--text-hint);
}

.form-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-hint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

/* ---------- Status Badges ---------- */
[class^="badge-"],
[class*=" badge-"],
.status-badge {
  display: inline-block;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 20px;
  white-space: nowrap;
  line-height: 1.6;
}

.badge-expired,
.status-badge.badge-expired     { background: var(--status-expired-bg); color: var(--status-expired-text); }
.badge-dead,
.status-badge.badge-dead        { background: var(--status-dead-bg); color: var(--status-dead-text); }
.badge-removed,
.status-badge.badge-removed     { background: var(--status-removed-bg); color: var(--status-removed-text); }
.badge-registered,
.status-badge.badge-registered  { background: var(--status-registered-bg); color: var(--status-registered-text); }
.badge-cancelled,
.status-badge.badge-cancelled   { background: var(--status-cancelled-bg); color: var(--status-cancelled-text); }
.badge-surrendered,
.status-badge.badge-surrendered { background: var(--status-surrendered-bg); color: var(--status-surrendered-text); }
.badge-withdrawn,
.status-badge.badge-withdrawn   { background: var(--status-withdrawn-bg); color: var(--status-withdrawn-text); }
.badge-refused,
.status-badge.badge-refused     { background: var(--status-refused-bg); color: var(--status-refused-text); }
.badge-default,
.status-badge.badge-default     { background: var(--bg-surface-alt); color: var(--text-secondary); }

/* ---------- Class Pills ---------- */
.class-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  padding: 2px 7px;
  background: #f5f4f0;
  color: var(--text-secondary);
  border-radius: 4px;
  white-space: nowrap;
  line-height: 1.6;
  text-decoration: none;
}

.class-pill:hover {
  color: var(--accent);
}

/* ---------- Result Cards ---------- */
.result-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 8px;
  transition: border-color var(--transition);
}

.result-card:hover {
  border-color: var(--accent);
}

.result-card .mark-text {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.2px;
  line-height: 1.4;
}

.result-card .mark-text-empty {
  font-size: 15px;
  font-weight: 400;
  color: var(--text-hint);
  font-style: italic;
}

.result-card .tm-number {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-hint);
  margin-top: 2px;
}

.result-card .result-meta {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.result-card .result-meta dt {
  font-weight: 500;
  color: var(--text-secondary);
  display: inline;
  font-size: 12px;
}

.result-card .result-meta dd {
  font-weight: 400;
  color: var(--text-secondary);
  display: inline;
  margin-left: 3px;
  margin-right: 16px;
  font-size: 12px;
}

.result-card .card-link {
  font-size: 11px;
  color: var(--accent);
  text-decoration: none;
}

.result-card .card-link:hover {
  text-decoration: underline;
}

/* Result card inline CTA */
.result-cta {
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--bg-page);
  border-radius: 6px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.result-cta p {
  font-size: 11px;
  color: var(--text-secondary);
  margin: 0;
  flex: 1;
}

/* ---------- Search Hero ---------- */
.search-hero {
  text-align: center;
  padding: 40px 32px 32px;
}

.search-hero h1 {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.4px;
  margin-bottom: 8px;
}

.search-hero .subtitle {
  font-size: 14px;
  color: var(--text-hint);
  margin-bottom: 24px;
}

/* Search input */
.search-row {
  display: flex;
  gap: 8px;
  max-width: 560px;
  margin: 0 auto;
}

.search-input-wrap {
  flex: 1;
  position: relative;
}

.search-input-wrap .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-hint);
  pointer-events: none;
}

.search-input-wrap input {
  width: 100%;
  height: 40px;
  padding: 10px 14px 10px 36px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-input);
  transition: border-color var(--transition);
}

.search-input-wrap input:focus {
  outline: none;
  border-color: var(--accent);
}

.search-input-wrap input::placeholder {
  color: var(--text-hint);
}

/* Filter pills */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 12px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  align-items: center;
}

.filter-pill {
  padding: 6px 12px;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.filter-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-pill.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.filter-more {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 4px;
}

.filter-more:hover {
  color: var(--accent-hover);
}

/* Expanded filters panel */
.filters-panel {
  max-width: 560px;
  margin: 12px auto 0;
}

.filters-panel .filter-group {
  margin-bottom: 12px;
}

.filters-panel .filter-group label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-hint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.filters-panel .filter-group select,
.filters-panel .filter-group input {
  width: 100%;
  height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-input);
}

.filters-panel .filter-group select:focus,
.filters-panel .filter-group input:focus {
  outline: none;
  border-color: var(--accent);
}

/* Results header */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.results-header .count {
  font-size: 13px;
  color: var(--text-hint);
}

.results-header .count strong {
  color: var(--text-primary);
  font-weight: 500;
}

.results-header .sort {
  font-size: 12px;
  color: var(--text-hint);
}

/* ---------- Pagination ---------- */
.pagination {
  gap: 6px;
}

.pagination .page-link {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-surface);
  text-decoration: none;
  transition: background var(--transition);
}

.pagination .page-link:hover {
  background: var(--bg-surface-alt);
  color: var(--text-primary);
  border-color: var(--border);
}

.pagination .page-item.active .page-link {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.pagination .page-item.disabled .page-link {
  opacity: 0.4;
  cursor: default;
  background: var(--bg-surface);
}

/* ---------- Browse by Class Section ---------- */
.section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-hint);
  font-weight: 500;
  margin-bottom: 10px;
}

.class-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  text-decoration: none;
  display: block;
  transition: border-color var(--transition);
}

.class-card:hover {
  border-color: var(--accent);
}

.class-card .class-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  font-weight: 500;
}

.class-card .class-name {
  font-size: 12px;
  color: var(--text-primary);
  font-weight: 500;
  margin-top: 2px;
}

.class-card .class-count {
  font-size: 11px;
  color: var(--text-hint);
  margin-top: 4px;
}

.class-card .class-desc {
  font-size: 11px;
  color: var(--text-hint);
  margin-top: 4px;
  line-height: 1.4;
}

.class-card.active {
  border-color: var(--accent);
  background: var(--accent-light);
}

/* ---------- Trademark Detail ---------- */
.tm-detail {
  padding: 0;
}

.tm-detail h1 {
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 4px;
}

.tm-number-display {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-hint);
}

.facts-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  max-width: 560px;
}

.facts-card .fact-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}

.facts-card .fact-row:last-child {
  border-bottom: none;
}

.facts-card .fact-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.facts-card .fact-value {
  color: var(--text-primary);
  text-align: right;
}

.facts-card .fact-value .font-mono {
  font-family: var(--font-mono);
}

/* ---------- CTA Box ---------- */
.cta-box {
  background: var(--accent-light);
  border: 1px solid rgba(45, 95, 45, 0.3);
  border-radius: 8px;
  padding: 16px 20px;
}

.cta-box h3 {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.cta-box p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* ---------- Breadcrumbs ---------- */
.breadcrumb {
  font-size: 12px;
  padding: 12px 0;
  margin-bottom: 0;
  background: none;
}

.breadcrumb-item a {
  color: var(--accent);
  text-decoration: none;
}

.breadcrumb-item a:hover {
  text-decoration: underline;
}

.breadcrumb-item.active {
  color: var(--text-hint);
}

.breadcrumb-item + .breadcrumb-item::before {
  color: var(--text-hint);
}

/* ---------- Tables ---------- */
.table {
  font-size: 13px;
}

.table th {
  font-weight: 500;
  color: var(--text-secondary);
}

.table td {
  color: var(--text-primary);
}

.table > :not(caption) > * > * {
  border-bottom-color: var(--border-light);
}

/* ---------- Cards (Bootstrap override) ---------- */
.card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-surface);
}

/* ---------- Pricing ---------- */
.pricing-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-surface);
  transition: border-color var(--transition);
}

.pricing-card:hover {
  border-color: var(--border-hover);
}

.pricing-featured {
  border: 2px solid var(--accent) !important;
}

.pricing-badge {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 500;
  margin-bottom: 8px;
}

.pricing-card .price {
  font-size: 28px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.2;
}

.pricing-card .price-period {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-hint);
}

.pricing-card .feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pricing-card .feature-list li {
  padding: 6px 0;
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.pricing-card .feature-list li::before {
  content: "\2713";
  color: var(--accent);
  font-weight: 500;
  flex-shrink: 0;
}

/* ---------- FAQ ---------- */
.pricing-faq details {
  border-bottom: 1px solid var(--border);
}

.pricing-faq summary {
  padding: 12px 0;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  color: var(--text-primary);
}

.pricing-faq summary::-webkit-details-marker {
  display: none;
}

.pricing-faq details[open] summary {
  color: var(--accent);
}

.pricing-faq details p {
  padding-bottom: 12px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

/* ---------- Blog Post Layout ---------- */
.blog-post-layout {
  position: relative;
}

.social-share {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  left: max(calc((100% - 960px) / 2 - 64px), 16px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 100;
}

.social-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
  text-decoration: none;
  padding: 0;
  font: inherit;
  line-height: 1;
}

.social-share-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 1140px) {
  .social-share {
    position: static;
    transform: none;
    flex-direction: row;
    margin-bottom: 16px;
  }
}

/* ---------- Blog ---------- */
.blog-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 8px;
  transition: border-color var(--transition);
}

.blog-card:hover {
  border-color: var(--accent);
}

.blog-card h2 {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 4px;
}

.blog-card h2 a {
  color: var(--text-primary);
  text-decoration: none;
}

.blog-card h2 a:hover {
  color: var(--accent);
}

.blog-meta {
  font-size: 12px;
  color: var(--text-hint);
}

.blog-content {
  line-height: 1.7;
  max-width: 720px;
  font-size: 14px;
}

.blog-content h2 {
  margin-top: 24px;
  margin-bottom: 8px;
}

.blog-content h3 {
  margin-top: 18px;
  margin-bottom: 6px;
}

.blog-content p {
  margin-bottom: 12px;
  color: var(--text-primary);
}

.blog-content ul, .blog-content ol {
  margin-bottom: 12px;
  padding-left: 20px;
}

.blog-content li {
  margin-bottom: 4px;
}

/* ---------- Legal Pages ---------- */
.legal-content {
  max-width: 720px;
  line-height: 1.7;
  font-size: 14px;
}

.legal-content h2 {
  margin-top: 24px;
  margin-bottom: 8px;
}

.legal-content h3 {
  margin-top: 18px;
  margin-bottom: 6px;
}

.legal-content p {
  margin-bottom: 12px;
  color: var(--text-primary);
}

/* ---------- Auth Pages ---------- */
.auth-container {
  max-width: 400px;
  margin: 40px auto;
}

.auth-container h1 {
  font-size: 18px;
  margin-bottom: 20px;
}

.auth-container .form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(45, 95, 45, 0.1);
}

.alert-danger {
  background: var(--status-expired-bg);
  border-color: rgba(139, 58, 58, 0.2);
  color: var(--status-expired-text);
  border-radius: 6px;
  font-size: 13px;
}

/* ---------- Empty State ---------- */
.empty-state {
  max-width: 400px;
  margin: 0 auto;
  padding: 32px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-align: center;
}

.empty-state .empty-icon {
  width: 40px;
  height: 40px;
  color: var(--text-hint);
  margin-bottom: 12px;
}

.empty-state h2 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* ---------- Loading State ---------- */
.loading-state {
  text-align: center;
  padding: 40px 0;
}

.loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin: 0 auto 8px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-state p {
  font-size: 13px;
  color: var(--text-hint);
  margin: 0;
}

/* ---------- Cookie Banner ---------- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  z-index: 1050;
  padding: 10px 24px;
}

.cookie-banner p {
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
}

.cookie-banner a {
  color: var(--accent);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 14px 24px;
  margin-top: auto;
  flex-shrink: 0;
}

.site-footer .footer-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.site-footer .footer-copy {
  font-size: 11px;
  color: var(--text-hint);
  margin: 0;
}

.site-footer .footer-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.site-footer .footer-links a {
  font-size: 11px;
  color: var(--accent);
  text-decoration: none;
}

.site-footer .footer-links a:hover {
  text-decoration: underline;
}

.site-footer .footer-disclaimer {
  font-size: 12px;
  color: var(--text-hint);
  max-width: 700px;
  margin: 12px auto 0;
  text-align: center;
  line-height: 1.6;
}

/* ---------- Stats chip ---------- */
.stats-chip {
  display: inline-block;
  background: var(--bg-surface-alt);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-secondary);
}

/* ---------- Accordion override ---------- */
.accordion-button {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  background: transparent;
  padding: 12px 0;
}

.accordion-button:not(.collapsed) {
  color: var(--accent);
  background: transparent;
  box-shadow: none;
}

.accordion-button:focus {
  box-shadow: none;
}

.accordion-button::after {
  filter: none;
}

.accordion-item {
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
}

.accordion-body {
  padding: 0 0 12px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ---------- Danger Zone ---------- */
.danger-section {
  border-top: 1px solid var(--status-expired-bg);
  padding-top: 16px;
  margin-top: 24px;
}

/* ---------- Badge override ---------- */
.badge.bg-light {
  background: var(--bg-surface-alt) !important;
  color: var(--text-secondary) !important;
  font-weight: 400;
  font-size: 11px;
  border: 1px solid var(--border);
}

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
  .search-hero {
    padding: 24px 0 20px;
  }

  .search-hero h1 {
    font-size: 18px;
  }

  .search-row {
    flex-direction: column;
  }

  .filter-pills {
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .result-card {
    padding: 12px 14px;
  }

  .site-footer .footer-main {
    flex-direction: column;
    text-align: center;
  }

  .site-footer .footer-links {
    justify-content: center;
  }

  .cookie-banner {
    padding: 10px 16px;
  }

  .cookie-banner .container {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .facts-card {
    max-width: 100%;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .class-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Grid utilities */
.class-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

@media (max-width: 1024px) {
  .class-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .class-grid {
    grid-template-columns: 1fr;
  }
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 767px) {
  .filters-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- View link ---------- */
.view-link {
  font-size: 11px;
  color: var(--accent);
  text-decoration: none;
}

.view-link:hover {
  text-decoration: underline;
}

/* ---------- Section divider ---------- */
.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

/* ---------- Homepage Stats Bar ---------- */
.stats-bar {
  display: flex;
  gap: 12px;
  max-width: 960px;
  margin: 24px auto 32px;
  padding: 0 32px;
}

.stats-bar .stat-chip {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  text-align: center;
}

.stats-bar .stat-number {
  font-size: 22px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.3;
}

.stats-bar .stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-hint);
  margin-top: 2px;
}

@media (max-width: 767px) {
  .stats-bar {
    flex-wrap: wrap;
    padding: 0 24px;
  }
  .stats-bar .stat-chip {
    flex: 1 1 calc(50% - 6px);
    min-width: calc(50% - 6px);
  }
}

/* ---------- Homepage How It Works ---------- */
.how-it-works {
  display: flex;
  gap: 24px;
  max-width: 960px;
  margin: 0 auto 32px;
  padding: 0 32px;
}

.how-it-works .step {
  flex: 1;
  text-align: center;
}

.how-it-works .step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
}

.how-it-works .step h3 {
  font-size: 14px;
  font-weight: 500;
  margin: 10px 0 4px;
}

.how-it-works .step p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

@media (max-width: 767px) {
  .how-it-works {
    flex-direction: column;
    padding: 0 24px;
  }
}

/* ---------- Homepage Who Uses This ---------- */
.audience-cards {
  display: flex;
  gap: 24px;
  max-width: 960px;
  margin: 0 auto 32px;
  padding: 0 32px;
}

.audience-card {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px;
}

.audience-card .audience-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
}

.audience-card h3 {
  font-size: 15px;
  font-weight: 500;
  margin: 6px 0;
}

.audience-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

@media (max-width: 767px) {
  .audience-cards {
    flex-direction: column;
    padding: 0 24px;
  }
}

/* ---------- Homepage CTA Banner ---------- */
.cta-banner {
  background: var(--accent-light);
  border: 1px solid rgba(45, 95, 45, 0.2);
  border-radius: 8px;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 960px;
  margin: 0 auto 32px;
}

.cta-banner .cta-banner-text {
  flex: 1;
}

.cta-banner .cta-banner-text h3 {
  font-size: 16px;
  font-weight: 500;
  margin: 0;
}

.cta-banner .cta-banner-text p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 4px 0 0;
}

@media (max-width: 767px) {
  .cta-banner {
    flex-direction: column;
    text-align: center;
    margin-left: 24px;
    margin-right: 24px;
  }
}

/* ---------- Latest Expired List ---------- */
.latest-list {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.latest-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  text-decoration: none;
  color: inherit;
  transition: background var(--transition);
}

.latest-list a:hover {
  background: var(--bg-surface-alt);
}

.latest-list a + a {
  border-top: 1px solid var(--border-light);
}

.latest-list .latest-mark {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.latest-list .latest-mark-empty {
  flex: 1;
  font-size: 13px;
  color: var(--text-hint);
  font-style: italic;
}

.latest-list .latest-date {
  font-size: 12px;
  color: var(--text-hint);
  font-family: var(--font-mono);
  white-space: nowrap;
}

.latest-list .latest-classes {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}

/* ---------- Availability Signal ---------- */
.avail-signal {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.avail-signal .avail-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

.avail-signal.avail-green { background: #f0f8f0; border-color: rgba(45,95,45,0.2); }
.avail-signal.avail-green .avail-dot { background: #2d8a2d; }

.avail-signal.avail-amber { background: #faf6e8; border-color: rgba(180,140,20,0.2); }
.avail-signal.avail-amber .avail-dot { background: #b48c14; }

.avail-signal.avail-red { background: #faf0f0; border-color: rgba(180,50,50,0.2); }
.avail-signal.avail-red .avail-dot { background: #b43232; }

.avail-signal.avail-grey { background: var(--bg-surface-alt); border-color: var(--border); }
.avail-signal.avail-grey .avail-dot { background: var(--text-hint); }

.avail-signal .avail-text { flex: 1; color: var(--text-secondary); }
.avail-signal .avail-text strong { color: var(--text-primary); font-weight: 500; }

.avail-signal .avail-link {
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}

.avail-signal .avail-link:hover { text-decoration: underline; }

/* Search result inline indicator */
.avail-pip {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.avail-pip-green { background: #2d8a2d; }
.avail-pip-amber { background: #b48c14; }
.avail-pip-red { background: #b43232; }
.avail-pip-grey { background: var(--text-hint); }

/* ---------- Misc ---------- */
.font-mono {
  font-family: var(--font-mono);
}

code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--bg-surface-alt);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-primary);
}

/* Bootstrap spinner override */
.spinner-border {
  color: var(--accent);
}
