:root {
  color-scheme: dark;
  --ink: #0a0b09;
  --paper: #f4f1e8;
  --muted: #a49d8f;
  --line: rgba(244, 241, 232, 0.14);
  --line-strong: rgba(244, 241, 232, 0.3);
  --mint: #7ef0c1;
  --amber: #e5b756;
  --coral: #f26e58;
  --graphite: #171814;
  --graphite-soft: #20211c;
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--paper);
  background: #070806;
  letter-spacing: 0;
}

a { color: inherit; text-decoration: none; }

/* ─── HEADER ─── */
.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 8, 6, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 760;
  font-size: 15px;
}

.brand-mark {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(126, 240, 193, 0.8);
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 45%, rgba(126, 240, 193, 0.92) 46% 54%, transparent 55%),
    linear-gradient(0deg, transparent 45%, rgba(126, 240, 193, 0.72) 46% 54%, transparent 55%);
  box-shadow: 0 0 20px rgba(126, 240, 193, 0.4);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(244, 241, 232, 0.7);
  font-size: 13px;
}

.nav-btn {
  background: none;
  border: 1px solid var(--line);
  color: rgba(244, 241, 232, 0.7);
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: border-color 180ms, color 180ms;
}

.nav-btn:hover, .nav-links a:hover { color: var(--mint); }

/* ─── HERO ─── */
.hero-wrap {
  padding: 68px 20px 20px;
  background: linear-gradient(180deg, #0a0c09 0%, #070806 100%);
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 14px;
  color: rgba(244, 241, 232, 0.55);
}

.hero-stats strong {
  color: var(--mint);
  font-weight: 800;
}

.hero-search {
  width: 100%;
  max-width: 560px;
}

.hero-search input {
  width: 100%;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--paper);
  background: rgba(244, 241, 232, 0.05);
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 180ms;
}

.hero-search input:focus {
  border-color: rgba(126, 240, 193, 0.5);
}

.hero-search input::placeholder {
  color: rgba(244, 241, 232, 0.35);
}

/* ─── LAYOUT ─── */
.layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  max-width: 1280px;
  margin: 0 auto;
  min-height: calc(100vh - 140px);
}

/* ─── SIDEBAR ─── */
.sidebar {
  padding: 20px 16px 20px 20px;
  border-right: 1px solid var(--line);
  background: rgba(244, 241, 232, 0.015);
}

.sidebar-section {
  margin-bottom: 22px;
}

.sidebar-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.cat-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: rgba(244, 241, 232, 0.7);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  text-align: left;
  transition: all 150ms;
}

.cat-item:hover {
  background: rgba(244, 241, 232, 0.05);
  color: var(--paper);
}

.cat-item.active {
  background: rgba(126, 240, 193, 0.1);
  color: var(--mint);
  font-weight: 700;
}

.cat-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.cat-name {
  flex: 1;
}

.cat-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.cat-item.active .cat-count {
  color: rgba(126, 240, 193, 0.6);
}

.sidebar select {
  width: 100%;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--paper);
  background: rgba(244, 241, 232, 0.04);
  font: inherit;
  font-size: 13px;
  margin-bottom: 6px;
  outline: none;
}

.sidebar select:focus {
  border-color: rgba(126, 240, 193, 0.4);
}

.side-guide {
  display: block;
  padding: 6px 10px;
  border-radius: 6px;
  color: rgba(244, 241, 232, 0.65);
  font-size: 13px;
  transition: all 150ms;
}

.side-guide:hover {
  background: rgba(244, 241, 232, 0.05);
  color: var(--mint);
}

.side-btn {
  display: block;
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: rgba(244, 241, 232, 0.7);
  font-size: 13px;
  text-align: center;
  transition: all 180ms;
  margin-bottom: 6px;
}

.side-btn:hover {
  border-color: var(--mint);
  color: var(--mint);
}

/* ─── CONTENT ─── */
.content {
  padding: 16px 20px 40px;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.bar-stats {
  font-size: 13px;
  color: rgba(244, 241, 232, 0.55);
}

.bar-stats strong {
  color: var(--paper);
  font-weight: 700;
}

/* ─── PROVIDER GRID ─── */
.provider-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.provider-card {
  display: flex;
  flex-direction: column;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(244, 241, 232, 0.025);
  transition: border-color 180ms, background 180ms;
}

.provider-card:hover {
  border-color: rgba(126, 240, 193, 0.25);
  background: rgba(244, 241, 232, 0.04);
}

.pc-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.pc-name {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pc-name h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.pc-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(244, 241, 232, 0.06);
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
}

.pc-score {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--ink);
  background: var(--mint);
  font-weight: 800;
  font-size: 12px;
}

.pc-score.mid { background: var(--amber); }
.pc-score.high { background: var(--coral); }

.pc-meta {
  font-size: 11px;
  color: rgba(244, 241, 232, 0.4);
  margin-bottom: 8px;
}

.pc-summary {
  font-size: 13px;
  color: rgba(244, 241, 232, 0.55);
  line-height: 1.5;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.pc-tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  border-radius: 4px;
  background: rgba(244, 241, 232, 0.05);
  color: rgba(244, 241, 232, 0.55);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

.pc-risk {
  font-size: 11px;
  color: rgba(244, 241, 232, 0.45);
  margin-bottom: 10px;
}

.pc-actions {
  display: flex;
  gap: 6px;
  margin-top: auto;
}

.pc-actions a,
.pc-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(126, 240, 193, 0.3);
  border-radius: 6px;
  color: var(--ink);
  background: var(--mint);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  transition: opacity 180ms;
}

.pc-actions a.sec,
.pc-actions button.sec {
  color: rgba(244, 241, 232, 0.65);
  background: transparent;
  border-color: var(--line);
}

.pc-actions a:hover,
.pc-actions button:hover { opacity: 0.8; }

.empty-state {
  padding: 40px 20px;
  text-align: center;
  color: rgba(244, 241, 232, 0.5);
}

.empty-state strong {
  display: block;
  font-size: 18px;
  color: var(--paper);
  margin-bottom: 6px;
}

.empty-state a { color: var(--mint); }

/* ─── DIALOG ─── */
.provider-dialog {
  width: min(740px, calc(100vw - 32px));
  max-height: min(680px, calc(100vh - 32px));
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--paper);
  background: #10110e;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.5);
}

.provider-dialog::backdrop {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.dialog-close {
  position: sticky;
  top: 0;
  float: right;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--paper);
  background: #0a0b09;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.dialog-title { margin: 6px 38px 12px 0; }
.dialog-title h2 { margin: 0 0 4px; font-size: clamp(24px, 3.5vw, 36px); }
.dialog-title p { margin: 0; color: rgba(244, 241, 232, 0.55); font-size: 14px; }

.dialog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.dialog-box {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(244, 241, 232, 0.03);
}

.dialog-box strong {
  display: block;
  margin-bottom: 4px;
  color: var(--mint);
  font-size: 12px;
}

.dialog-box p, .dialog-box li {
  margin: 0;
  color: rgba(244, 241, 232, 0.6);
  font-size: 13px;
  line-height: 1.55;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.dialog-actions a {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(126, 240, 193, 0.3);
  border-radius: 6px;
  color: var(--ink);
  background: var(--mint);
  font-size: 13px;
  font-weight: 700;
}

.dialog-actions a.sec {
  color: var(--paper);
  background: transparent;
}

/* ─── FOOTER ─── */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 0 20px;
  border-top: 1px solid var(--line);
  color: rgba(244, 241, 232, 0.4);
  background: #070806;
  font-size: 13px;
}

.site-footer span:first-child {
  color: var(--paper);
  font-weight: 700;
}

.hero-copy {
  max-width: 820px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--mint);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.hero-copy p:not(.eyebrow) {
  max-width: 720px;
  margin: 14px auto 0;
  color: rgba(244, 241, 232, 0.62);
  font-size: 16px;
  line-height: 1.65;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.quick-links a {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: rgba(244, 241, 232, 0.72);
  background: rgba(244, 241, 232, 0.035);
  font-size: 13px;
}

.quick-links a:hover {
  border-color: rgba(126, 240, 193, 0.45);
  color: var(--mint);
}

.filter-toggle {
  display: none;
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(126, 240, 193, 0.35);
  border-radius: 6px;
  color: var(--ink);
  background: var(--mint);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.pc-facts {
  display: grid;
  gap: 4px;
  margin: 0 0 8px;
  color: rgba(244, 241, 232, 0.5);
  font-size: 11px;
}

.seo-section {
  margin-top: 28px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(244, 241, 232, 0.025);
}

.seo-section h2 {
  margin: 0 0 10px;
  font-size: clamp(22px, 3vw, 34px);
  letter-spacing: -0.02em;
}

.seo-section p {
  margin: 0;
  color: rgba(244, 241, 232, 0.62);
  line-height: 1.7;
}

.seo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.seo-grid article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(244, 241, 232, 0.025);
}

.seo-grid h3 {
  margin: 0 0 6px;
  color: var(--mint);
  font-size: 14px;
}

.risk-disclaimer {
  margin-top: 12px !important;
  color: rgba(242, 110, 88, 0.85) !important;
}

.article-page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 86px 20px 48px;
}

.breadcrumbs {
  margin-bottom: 18px;
  color: rgba(244, 241, 232, 0.45);
  font-size: 13px;
}

.breadcrumbs a { color: var(--mint); }

.article-hero {
  padding: 34px 0 24px;
  border-bottom: 1px solid var(--line);
}

.article-hero h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.article-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 14px 0 0;
  color: rgba(244, 241, 232, 0.65);
  font-size: 17px;
  line-height: 1.7;
}

.content-section {
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.content-section h2 {
  margin: 0 0 12px;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.025em;
}

.content-section p,
.content-section li {
  color: rgba(244, 241, 232, 0.64);
  line-height: 1.7;
}

.ranking-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-grid li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(244, 241, 232, 0.08);
}

.ranking-grid li span {
  color: var(--mint);
  font-weight: 800;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.compare-table th,
.compare-table td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
  vertical-align: top;
}

.compare-table th {
  color: var(--mint);
  background: rgba(126, 240, 193, 0.06);
  font-weight: 800;
}

.compare-table td {
  color: rgba(244, 241, 232, 0.68);
}

.compare-table a { color: var(--paper); font-weight: 800; }

.faq-section details {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.faq-section summary {
  color: var(--paper);
  cursor: pointer;
  font-weight: 800;
}

.cta-panel {
  padding: 24px;
  border: 1px solid rgba(126, 240, 193, 0.24);
  border-radius: var(--radius);
  background: rgba(126, 240, 193, 0.055);
}

.cta-panel a {
  display: inline-flex;
  align-items: center;
  height: 34px;
  margin-top: 14px;
  padding: 0 14px;
  border-radius: 6px;
  color: var(--ink);
  background: var(--mint);
  font-weight: 800;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    z-index: 30;
    top: 52px;
    left: 0;
    bottom: 0;
    width: min(320px, 86vw);
    overflow: auto;
    border-right: 1px solid var(--line-strong);
    background: #0a0b09;
    transform: translateX(-105%);
    transition: transform 180ms;
  }

  body.filters-open .sidebar {
    transform: translateX(0);
  }

  .filter-toggle {
    display: inline-flex;
    align-items: center;
  }

  .seo-grid {
    grid-template-columns: 1fr;
  }

  .hero-wrap {
    padding: 58px 14px 14px;
  }

  .content {
    padding: 12px 14px 30px;
  }

  .provider-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    font-size: 13px;
    gap: 14px;
  }
}

@media (max-width: 520px) {
  .site-header {
    min-height: 46px;
    padding: 0 10px;
  }

  .nav-links {
    gap: 5px;
    font-size: 12px;
  }

  .nav-btn {
    padding: 3px 7px;
    font-size: 12px;
  }

  .provider-card {
    padding: 12px;
  }

  .sidebar {
    top: 46px;
  }

  .article-page {
    padding: 66px 14px 34px;
  }

  .content-section {
    padding: 20px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
