/* ===== Design Tokens ===== */
:root {
  --page-bg: #FFFFFF;
  --card-bg: #FFFFFF;
  --text-primary: #0F172A;
  --text-body: #374151;
  --text-muted: #6B7280;
  --accent-primary: #2563EB;
  --accent-primary-dark: #1D4ED8;
  --accent-primary-light: #E5EDFF;
  --accent-secondary: #22C55E;
  --accent-secondary-light: #DCFCE7;
  --border-color: #E5E7EB;
  --border-light: #F3F4F6;
  --shadow-soft: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1);
  --star-color: #F59E0B;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --header-offset: 64px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page-bg: #0F172A;
    --card-bg: #1E293B;
    --text-primary: #F1F5F9;
    --text-body: #CBD5E1;
    --text-muted: #94A3B8;
    --accent-primary: #60A5FA;
    --accent-primary-dark: #93BBFD;
    --accent-primary-light: #1E3A5F;
    --accent-secondary: #34D399;
    --accent-secondary-light: #064E3B;
    --border-color: #334155;
    --border-light: #1E293B;
    --shadow-soft: 0 4px 6px -1px rgb(0 0 0 / 0.3);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.3);
    --star-color: #FBBF24;
  }
  body { color-scheme: dark; }
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  max-width: min(1200px, 100% - 3rem);
  margin: 1.25rem auto .5rem;
}
.breadcrumb a {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color .15s;
}
.breadcrumb a:hover { color: var(--accent-primary); text-decoration: none; }

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--page-bg);
  color: var(--text-body);
  font: 400 16px/1.6 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--header-offset);
}
a { color: var(--accent-primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent-primary-dark); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ===== Header ===== */
.header-shell {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  background: var(--page-bg);
  transition: box-shadow .18s ease;
}
.header-shell.is-scrolled {
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}
@media (prefers-color-scheme: dark) {
  .header-shell.is-scrolled { box-shadow: 0 4px 14px rgba(0,0,0,0.3); }
}
.site-header {
  max-width: min(1200px, 100% - 3rem);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-offset);
  gap: 1rem;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
  white-space: nowrap;
}
.site-logo:hover { text-decoration: none; }
.site-logo-icon {
  font-size: 1.5rem;
  line-height: 1;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.header-link {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color .15s;
}
.header-link:hover { color: var(--text-primary); text-decoration: none; }
.match-me-pill {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem 1.15rem;
  border-radius: 999px;
  border: 1.5px solid var(--accent-primary);
  background: var(--accent-primary);
  color: #fff;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
  white-space: nowrap;
}
.match-me-pill:hover { background: var(--accent-primary-dark); border-color: var(--accent-primary-dark); }

/* ===== Hero ===== */
.hero {
  text-align: center;
  padding: 3rem 1.5rem 2rem;
  max-width: min(1200px, 100% - 3rem);
  margin: 1.5rem auto;
}
.hero h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.hero-copy {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--text-body);
  max-width: 640px;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
}
.hero-cta {
  margin-top: 2rem;
  padding: 1.25rem 2rem;
  background-color: var(--accent-primary-light);
  border: 1px solid color-mix(in srgb, var(--accent-primary) 15%, transparent);
  border-radius: var(--radius-md);
  display: inline-block;
  max-width: 560px;
}
.hero-cta-text {
  font-size: .875rem;
  color: var(--text-muted);
  margin-bottom: .375rem;
}
.hero-cta-link {
  font-weight: 600;
  font-size: 1rem;
  color: var(--accent-primary);
  cursor: pointer;
}
.hero-cta-link:hover { text-decoration: underline; }

/* ===== Table Card ===== */
.table-card {
  max-width: min(1200px, 100% - 3rem);
  margin: 0 auto;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.table-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}
.table-header h2 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 .75rem;
}

/* ===== Filters ===== */
.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
}
.filter-search-wrap {
  position: relative;
  flex: 1 1 200px;
  min-width: 180px;
  max-width: 320px;
}
.filter-search-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}
.filter-search {
  width: 100%;
  padding: .5rem .85rem .5rem 2.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: .875rem;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.filter-search:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px var(--accent-primary-light);
}
.filter-search::placeholder { color: var(--text-muted); }
.filter-trigger {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-body);
  font-size: .8125rem;
  cursor: pointer;
  transition: border-color .15s ease;
  white-space: nowrap;
}
.filter-trigger:hover { border-color: var(--accent-primary); }
.filter-trigger[aria-pressed="true"] {
  border-color: var(--accent-primary);
  background: var(--accent-primary-light);
  color: var(--accent-primary);
  font-weight: 600;
}
.filter-label { color: var(--text-muted); font-weight: 500; }
.filter-value { font-weight: 600; color: var(--text-primary); }

.sort-select {
  appearance: none;
  padding: .5rem 2rem .5rem .85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--card-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236B7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: var(--text-body);
  font-size: .8125rem;
  cursor: pointer;
  outline: none;
  min-width: 150px;
}
@media (prefers-color-scheme: dark) {
  .sort-select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394A3B8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E"); }
}

/* ===== Data Table ===== */
.table-wrapper { overflow-x: auto; }
.table-wrapper table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.table-wrapper th {
  padding: .75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  background: var(--border-light);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
  cursor: default;
  user-select: none;
}
.table-wrapper th.sortable { cursor: pointer; }
.table-wrapper th.sortable:hover { color: var(--accent-primary); }
.table-wrapper th .sort-indicator {
  font-size: .7rem;
  margin-left: .25rem;
  opacity: .4;
}
.table-wrapper th.sort-active .sort-indicator { opacity: 1; color: var(--accent-primary); }
.table-wrapper td {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
  color: var(--text-body);
}
.table-wrapper tr:last-child td { border-bottom: none; }
.table-wrapper tbody tr { transition: background .1s; }
.table-wrapper tbody tr:hover td { background: var(--border-light); }
.table-wrapper td.numeric { font-variant-numeric: tabular-nums; }

.company-cell {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.company-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.company-name {
  font-weight: 600;
  color: var(--text-primary);
}
a.company-name-link { text-decoration: none; }
a.company-name-link:hover { color: var(--accent-primary); text-decoration: underline; }
.company-sub {
  font-size: .75rem;
  color: var(--text-muted);
}
.stars {
  color: var(--star-color);
  letter-spacing: .5px;
  font-size: .8125rem;
  line-height: 1;
}
.rating-cell {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.rating-num { font-weight: 600; color: var(--text-primary); }
.check-yes { color: var(--accent-secondary); font-weight: 700; text-align: center; display: block; }
.check-no { color: var(--text-muted); text-align: center; display: block; }
.chip-list { display: flex; flex-wrap: wrap; gap: 4px; max-width: 200px; }
.chip {
  background: var(--border-light);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: .6875rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ===== Contact button (in table) ===== */
.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .4375rem .875rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--accent-primary);
  background: transparent;
  color: var(--accent-primary);
  font-size: .8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
  white-space: nowrap;
}
.contact-btn:hover {
  background: var(--accent-primary);
  color: #fff;
}

/* ===== Status bar ===== */
.status-bar {
  padding: .75rem 1.5rem;
  border-top: 1px solid var(--border-color);
  font-size: .8125rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.status-highlight {
  font-weight: 700;
  color: var(--text-primary);
}

/* ===== Modal ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 40;
  padding: 1rem;
}
.modal-backdrop.open { display: flex; }
@media (prefers-color-scheme: dark) {
  .modal-backdrop { background: rgba(0,0,0,0.5); }
}
.modal {
  max-width: 500px;
  width: 100%;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  animation: slideUp .25s ease;
  overflow: hidden;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.5rem 1.5rem 1rem;
  gap: 1rem;
}
.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}
.modal-subtitle {
  font-size: .875rem;
  color: var(--text-muted);
  margin-top: .25rem;
  line-height: 1.5;
}
.modal-close-btn {
  width: 2rem;
  height: 2rem;
  border: none;
  background: var(--border-light);
  border-radius: 50%;
  font-size: 1.25rem;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s;
  line-height: 1;
}
.modal-close-btn:hover { background: var(--border-color); }
.modal-body {
  padding: 0 1.5rem 1.5rem;
  overflow-y: auto;
}
.form-step { display: grid; gap: 1rem; }
.field-group { display: flex; flex-direction: column; gap: .375rem; }
.field-label {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--text-primary);
}
.required-star { color: #EF4444; }
.field-input, .field-select, .field-textarea {
  padding: .625rem .875rem;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: .9375rem;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}
.field-input:focus, .field-select:focus, .field-textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px var(--accent-primary-light);
}
.field-textarea { resize: vertical; min-height: 80px; }
.radio-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: .375rem; }
.radio-pill {
  border-radius: 10px;
  border: 1.5px solid var(--border-color);
  padding: .5rem .75rem;
  font-size: .8125rem;
  cursor: pointer;
  background: var(--card-bg);
  color: var(--text-body);
  transition: all .15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .375rem;
  text-align: center;
}
.radio-pill input { display: none; }
.radio-pill:hover { border-color: var(--accent-primary); }
.radio-pill.active {
  border-color: var(--accent-primary);
  background: var(--accent-primary-light);
  color: var(--accent-primary-dark);
  font-weight: 600;
}
.step-btn {
  padding: .625rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  border: none;
}
.step-btn-next {
  background: var(--accent-primary);
  color: #fff;
  width: 100%;
}
.step-btn-next:hover { background: var(--accent-primary-dark); }
.step-btn-back {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}
.step-btn-back:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.submit-btn {
  width: 100%;
  padding: .75rem;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--accent-primary);
  color: #fff;
  font-size: .9375rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.submit-btn:hover { background: var(--accent-primary-dark); }
.submit-btn:disabled { opacity: .5; cursor: not-allowed; }
.step-actions {
  display: flex;
  gap: .5rem;
  margin-top: .25rem;
}
.step-actions .step-btn { flex: 1; }
.contact-status {
  text-align: center;
  padding: .75rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 600;
}
.contact-status.success { background: var(--accent-secondary-light); color: var(--accent-secondary); }
.contact-status.error { background: #FEE2E2; color: #EF4444; }
.consent-text {
  font-size: .75rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: .25rem;
}
/* Step progress indicator */
.step-progress {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: 0 1.5rem .75rem;
}
.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-color);
  transition: all .2s;
}
.step-dot.active {
  background: var(--accent-primary);
  width: 24px;
  border-radius: 4px;
}
.step-dot.completed {
  background: var(--accent-secondary);
}
.step-progress-label {
  font-size: .75rem;
  color: var(--text-muted);
  margin-left: auto;
}

/* ===== FAQ Section ===== */
.faq-section {
  max-width: min(1200px, 100% - 3rem);
  margin: 4rem auto;
}
.faq-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
  text-align: center;
}
.faq-grid {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  max-width: 800px;
  margin: 0 auto;
}
details {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow .15s, border-color .15s;
}
details[open] {
  box-shadow: var(--shadow-soft);
  border-color: color-mix(in srgb, var(--accent-primary) 25%, var(--border-color));
}
details summary {
  padding: 1.125rem 1.5rem;
  font-weight: 600;
  font-size: .9375rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  color: var(--text-primary);
  transition: color .15s;
}
details summary:hover { color: var(--accent-primary); }
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: '+';
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text-muted);
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--border-light);
  transition: background .15s, color .15s;
}
details[open] summary::after {
  content: '−';
  background: var(--accent-primary-light);
  color: var(--accent-primary);
}
details .faq-body {
  padding: 0 1.5rem 1.5rem;
  color: var(--text-body);
  font-size: .9375rem;
  line-height: 1.7;
  border-top: 1px solid var(--border-color);
  margin: 0 1.25rem;
  padding: 1rem 0 .25rem;
}
details .faq-body p { margin-bottom: .75rem; }
details .faq-body p:last-child { margin-bottom: 0; }
details .faq-body ul { padding-left: 1.25rem; margin: .5rem 0 .75rem; }
details .faq-body li { margin-bottom: .375rem; }

/* ===== About Section ===== */
.about-section {
  max-width: min(1200px, 100% - 3rem);
  margin: 0 auto 4rem;
  padding: 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}
.about-section h2 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: .75rem;
}
.about-section p {
  color: var(--text-body);
  font-size: .9375rem;
  line-height: 1.7;
  margin-bottom: .75rem;
}
.about-section p:last-child { margin-bottom: 0; }

/* ===== Footer ===== */
.site-footer {
  max-width: min(1200px, 100% - 3rem);
  margin: 0 auto;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: .8125rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem;
}
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { color: var(--text-muted); font-size: .8125rem; }
.footer-links a:hover { color: var(--accent-primary); }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  :root { --header-offset: 56px; }
  .hero { padding: 2rem 1rem 1.5rem; }
  .hero h1 { font-size: 1.75rem; }
  .table-header { padding: 1rem; }
  .filters-row { gap: .375rem; }
  .filter-search-wrap { flex: 1 1 100%; max-width: 100%; }
  .table-wrapper th, .table-wrapper td { padding: .625rem .5rem; font-size: .8125rem; }
  .site-header { height: 56px; }
  .modal { border-radius: 14px; }
  .modal-header { padding: 1.25rem 1.25rem .75rem; }
  .modal-body { padding: 0 1.25rem 1.25rem; }
}

/* ===== Animations ===== */
@media (prefers-reduced-motion: no-preference) {
  .fade-in { animation: fadeIn .3s ease both; }
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

/* ===== Loading ===== */
.skeleton {
  background: linear-gradient(90deg, var(--border-light) 25%, var(--border-color) 50%, var(--border-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  height: 48px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
