:root {
  --bg: #08080f;
  --bg2: #100f1c;
  --bg3: #16142a;
  --accent: #7c3aed;
  --accent2: #a78bfa;
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted2: #64748b;
  --border: #2d2a50;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
}

*, *::before, *::after { box-sizing: border-box; }

html { overflow-x: hidden; }

body {
  margin: 0;
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, rgba(124, 58, 237, 0.16), transparent 34rem), var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

a { color: inherit; }

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid rgba(45, 42, 80, 0.75);
  background: rgba(8, 8, 15, 0.92);
  backdrop-filter: blur(14px);
}

.brand,
.site-nav a,
.footer-links a {
  text-decoration: none;
}

.brand,
.brand span,
.firm-head,
.nav-actions {
  display: flex;
  align-items: center;
}

.brand { gap: 0.6rem; font-family: "Outfit", sans-serif; letter-spacing: 0; }
.brand span { width: 34px; height: 34px; justify-content: center; border: 1px solid var(--border); border-radius: 8px; background: var(--bg3); }
.nav-links { display: flex; align-items: center; justify-content: center; gap: 1.1rem; flex-wrap: wrap; color: var(--muted); font-size: 0.93rem; }
.nav-links a:hover, .footer-links a:hover { color: var(--text); }
.nav-actions a { color: var(--accent2); font-weight: 700; }
.hamburger-btn {
  display: none;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 1px solid rgba(167, 139, 250, 0.34);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
}
.hamburger-btn span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}
.hamburger-btn span + span { margin-top: 4px; }
.hamburger-btn:hover,
.hamburger-btn:focus-visible {
  border-color: rgba(196, 181, 253, 0.85);
  background: rgba(124, 58, 237, 0.18);
  outline: none;
}
.mobile-nav-drawer {
  position: absolute;
  top: calc(100% + 1px);
  left: clamp(1rem, 4vw, 1.5rem);
  right: clamp(1rem, 4vw, 1.5rem);
  z-index: 200;
  display: none;
  gap: 0.35rem;
  border: 1px solid rgba(45, 42, 80, 0.95);
  border-radius: 8px;
  background: rgba(8, 8, 15, 0.98);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
  padding: 0.65rem;
}
.mobile-nav-drawer:not([hidden]) { display: grid; }
.mobile-nav-drawer[hidden] { display: none !important; }
.mobile-nav-drawer a {
  display: flex;
  align-items: center;
  min-height: 42px;
  border-radius: 8px;
  color: var(--muted);
  padding: 0.6rem 0.75rem;
  text-decoration: none;
}
.mobile-nav-drawer a:hover,
.mobile-nav-drawer a:focus-visible {
  background: rgba(124, 58, 237, 0.14);
  color: var(--text);
  outline: none;
}
@media (max-width: 960px) {
  .navbar .navbar-nav + .hamburger-btn { display: inline-flex; }
}
@media (max-width: 900px) {
  .navbar .nav-links + .hamburger-btn { display: inline-flex; }
}

main { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; }
.page-hero { padding: clamp(3rem, 8vw, 6rem) 0 2rem; }
.home-hero { padding-bottom: 2.6rem; }
.eyebrow { margin: 0 0 0.8rem; color: var(--green); font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
h1, h2, h3 { font-family: "Outfit", sans-serif; line-height: 1.1; margin: 0; letter-spacing: 0; }
h1 { max-width: 840px; font-size: clamp(2.15rem, 6vw, 4.75rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.35rem); margin-bottom: 0.8rem; }
h3 { font-size: 1.15rem; }
p { color: var(--muted); margin: 0.75rem 0 0; }
.page-hero p:not(.eyebrow) { max-width: 760px; font-size: 1.08rem; color: #cbd5e1; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.4rem; }
.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  max-width: 760px;
  margin-top: 1.4rem;
}
.hero-metrics div {
  border: 1px solid rgba(45, 42, 80, 0.85);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 0.9rem;
}
.hero-metrics strong,
.hero-metrics span {
  display: block;
}
.hero-metrics strong { color: var(--text); font: 800 1.25rem "Outfit", sans-serif; }
.hero-metrics span { color: var(--muted); font-size: 0.88rem; margin-top: 0.15rem; }

.section { padding: 2.4rem 0; }
.section-kicker {
  margin: 0 0 0.55rem;
  color: var(--accent2);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.card,
.firm-card,
.cta-band,
.tool-panel {
  min-width: 0;
  border: 1px solid rgba(45, 42, 80, 0.9);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(22, 20, 42, 0.92), rgba(16, 15, 28, 0.92));
  padding: 1.15rem;
}
.card p, .firm-card p { font-size: 0.94rem; }
.firm-head { gap: 0.75rem; margin-bottom: 0.75rem; }
.firm-head img { border-radius: 5px; object-fit: contain; }
.firm-head span { color: var(--muted2); font-size: 0.84rem; }
.firm-name {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: inherit;
  font-weight: 800;
  text-decoration: none;
}
.firm-name img {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 4px;
  object-fit: contain;
}
td .firm-name img { width: 22px; height: 22px; }
h2 .firm-name img, h3 .firm-name img { width: 28px; height: 28px; border-radius: 5px; }
.firm-heading { display: inline-flex; vertical-align: middle; }
.firm-card dl { display: grid; gap: 0.55rem; margin: 1rem 0 0; }
.firm-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid rgba(45, 42, 80, 0.7);
  padding-top: 0.55rem;
}
.firm-card dt { color: var(--muted2); font-size: 0.78rem; text-transform: uppercase; }
.firm-card dd { margin: 0; color: #dbe4f0; text-align: right; font-weight: 700; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.72rem 1rem;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.btn.primary, .btn-primary { background: var(--accent); color: #fff; }
.btn.secondary, .btn-secondary { border-color: var(--border); background: rgba(255, 255, 255, 0.03); color: var(--text); }
.btn.small { min-height: 34px; padding: 0.45rem 0.72rem; font-size: 0.86rem; }
.btn.full { width: 100%; margin-top: 1rem; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; }
table { width: 100%; min-width: 760px; border-collapse: collapse; background: rgba(16, 15, 28, 0.75); }
th, td { padding: 0.9rem; border-bottom: 1px solid rgba(45, 42, 80, 0.75); text-align: left; vertical-align: top; }
th { color: var(--accent2); font-family: "Outfit", sans-serif; font-size: 0.82rem; text-transform: uppercase; }
td { color: #dbe4f0; }
.disclosure-line { color: var(--muted2); font-size: 0.9rem; margin-top: 0.85rem; }

.pill-row { display: flex; gap: 0.65rem; flex-wrap: wrap; margin-top: 1rem; }
.pill {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  padding: 0.55rem 0.85rem;
  cursor: pointer;
}
.pill.active, .pill:hover { color: var(--text); border-color: var(--accent); }
.cta-band { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; }
.cta-band p { margin: 0; color: #dbe4f0; }
.trust-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.8rem; }
.trust-strip div { border: 1px solid var(--border); border-radius: 8px; padding: 1rem; background: rgba(255,255,255,0.03); }
.trust-strip strong, .trust-strip span { display: block; }
.trust-strip span { color: var(--muted); font-size: 0.88rem; margin-top: 0.25rem; }
.editorial-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1.2rem;
}
.editorial-meta article,
.intent-card,
.faq-item {
  border: 1px solid rgba(45, 42, 80, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 1rem;
}
.editorial-meta strong,
.editorial-meta span {
  display: block;
}
.editorial-meta strong { color: var(--text); font-family: "Outfit", sans-serif; }
.editorial-meta span { color: var(--muted); font-size: 0.9rem; margin-top: 0.25rem; }
.intent-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
.intent-card h3 { font-size: 1rem; }
.intent-card p { font-size: 0.9rem; }
.check-list { margin: 1rem 0 0; padding-left: 1.1rem; color: #dbe4f0; }
.check-list li + li { margin-top: 0.45rem; }
.fact-table td:first-child { color: var(--accent2); font-weight: 800; }
.faq-list { display: grid; gap: 0.85rem; margin-top: 1rem; }
.faq-question {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0;
  font: 800 1rem "Outfit", sans-serif;
  text-align: left;
  cursor: pointer;
}
.faq-answer { display: none; margin-top: 0.75rem; color: var(--muted); }
.faq-item.open .faq-answer { display: block; }
.score-note { color: var(--muted2); font-size: 0.9rem; margin-top: 0.75rem; }

.deal-badge,
.code-badge,
.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 8px;
  padding: 0.28rem 0.55rem;
  font-weight: 800;
  line-height: 1.2;
}
.deal-badge { background: rgba(52, 211, 153, 0.12); color: var(--green); border: 1px solid rgba(52, 211, 153, 0.28); }
.code-badge { background: rgba(167, 139, 250, 0.12); color: var(--accent2); border: 1px solid rgba(167, 139, 250, 0.28); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.status-badge { background: rgba(255, 255, 255, 0.04); color: #dbe4f0; border: 1px solid rgba(45, 42, 80, 0.9); }
.status-badge.warning { color: var(--amber); border-color: rgba(251, 191, 36, 0.35); background: rgba(251, 191, 36, 0.08); }
.discount-section-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 1rem; align-items: start; }
.discount-detail { border: 1px solid rgba(45, 42, 80, 0.9); border-radius: 8px; background: rgba(255, 255, 255, 0.035); padding: 1rem; }
.discount-detail h3 { margin-top: 0; }
.discount-detail ul { margin: 0.8rem 0 0; padding-left: 1.1rem; color: #dbe4f0; }
.discount-detail li + li { margin-top: 0.45rem; }
.source-list { display: grid; gap: 0.6rem; margin-top: 1rem; }
.source-list a { color: var(--accent2); text-decoration: none; border-bottom: 1px solid rgba(167, 139, 250, 0.28); width: fit-content; }
.source-list a:hover { color: var(--text); }
.section-note { color: var(--muted2); font-size: 0.92rem; margin-top: 0.8rem; }

.category-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.ranking-list { display: grid; gap: 1rem; margin-top: 1rem; }
.rank-card {
  border: 1px solid rgba(45, 42, 80, 0.9);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(22, 20, 42, 0.92), rgba(16, 15, 28, 0.92));
  padding: 1.15rem;
}
.rank-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.rank-title { display: flex; align-items: flex-start; gap: 0.8rem; }
.rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(167, 139, 250, 0.35);
  border-radius: 8px;
  background: rgba(124, 58, 237, 0.16);
  color: var(--accent2);
  font: 800 1rem "Outfit", sans-serif;
}
.rank-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.rank-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(45, 42, 80, 0.9);
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  color: #dbe4f0;
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.84rem;
  font-weight: 700;
}
.pros-cons-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }
.pros-cons-grid h4 { margin: 0; color: var(--text); font-family: "Outfit", sans-serif; }
.mini-list { margin: 0.65rem 0 0; padding-left: 1.1rem; color: #dbe4f0; }
.mini-list li + li { margin-top: 0.4rem; }
.rank-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1rem; }

.tool-panel { max-width: 720px; }
.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; margin-top: 1rem; }
label { display: grid; gap: 0.35rem; color: var(--muted); font-size: 0.9rem; }
label,
input,
select,
.tool-layout,
.tool-layout > *,
.input-row,
.input-row > *,
.result-card,
.metric,
.formula-box,
.tool-disclaimer,
.tool-warning {
  min-width: 0;
}
input, select {
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #0c0c16;
  color: var(--text);
  padding: 0.8rem;
  font: inherit;
}
.result { margin-top: 1rem; color: var(--green); font: 800 1.2rem "Outfit", sans-serif; }

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.tool-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.tool-card .btn { margin-top: auto; }
.tool-tag {
  width: fit-content;
  margin-bottom: 0.8rem;
  border: 1px solid rgba(167, 139, 250, 0.28);
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.12);
  color: var(--accent2);
  padding: 0.28rem 0.58rem;
  font-size: 0.78rem;
  font-weight: 800;
}
.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.55fr);
  gap: 1rem;
  align-items: start;
}
.tool-layout .tool-panel { max-width: none; }
.tool-panel h2 + p { margin-top: 0; }
.input-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}
.input-row + .input-row { margin-top: 0.85rem; }
.input-hint {
  color: var(--muted2);
  font-size: 0.82rem;
}
.result-card {
  scroll-margin-top: 5.5rem;
  border: 1px solid rgba(45, 42, 80, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 1rem;
}
.result-status {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 8px;
  background: rgba(52, 211, 153, 0.1);
  color: var(--green);
  padding: 0.35rem 0.65rem;
  font-weight: 800;
}
.result-status.warning {
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.09);
  color: var(--amber);
}
.result-status.danger {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.09);
  color: var(--red);
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}
.metric {
  border-top: 1px solid rgba(45, 42, 80, 0.72);
  padding-top: 0.75rem;
}
.metric span,
.metric strong {
  display: block;
}
.metric span {
  color: var(--muted2);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.metric strong {
  color: var(--text);
  font: 800 1.35rem "Outfit", sans-serif;
  overflow-wrap: anywhere;
}
.result-copy {
  margin-top: 1rem;
  color: #dbe4f0;
}
.tool-warning,
.tool-disclaimer {
  margin-top: 1rem;
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 8px;
  background: rgba(251, 191, 36, 0.08);
  color: #fde68a;
  padding: 0.85rem;
  font-size: 0.92rem;
}
.tool-disclaimer {
  border-color: rgba(45, 42, 80, 0.9);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
}
.tool-warning:empty { display: none; }
.tool-links {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}
.tool-links a {
  color: var(--accent2);
  text-decoration: none;
  width: fit-content;
  border-bottom: 1px solid rgba(167, 139, 250, 0.28);
}
.tool-links a:hover { color: var(--text); }
.tool-links a.e8-result-banner {
  max-width: 100%;
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
  border: 1px solid rgba(167, 139, 250, 0.38);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(22, 20, 42, 0.96), rgba(124, 58, 237, 0.18));
  color: var(--text);
  padding: 0.85rem;
}
.tool-links a.e8-result-banner:hover,
.tool-links a.e8-result-banner:focus-visible {
  border-color: rgba(196, 181, 253, 0.86);
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.98), rgba(124, 58, 237, 0.28));
  color: var(--text);
  outline: none;
}
.e8-result-banner img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  border-radius: 8px;
  background: #ffffff;
  padding: 0.35rem;
}
.e8-result-copy {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}
.e8-result-copy strong {
  color: var(--text);
  font: 800 1rem "Outfit", system-ui, sans-serif;
  letter-spacing: 0;
}
.e8-result-copy span {
  color: #cbd5e1;
  font-size: 0.88rem;
  line-height: 1.35;
}
.e8-result-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 8px;
  background: var(--green);
  color: #04130d;
  font-weight: 800;
  padding: 0.48rem 0.7rem;
  white-space: nowrap;
}
.related-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.formula-box {
  margin-top: 1rem;
  border: 1px solid rgba(45, 42, 80, 0.9);
  border-radius: 8px;
  background: rgba(8, 8, 15, 0.45);
  padding: 1rem;
  color: #dbe4f0;
}
.formula-box code {
  display: inline-block;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  color: var(--accent2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.site-footer {
  width: min(1120px, calc(100% - 2rem));
  margin: 3rem auto 0;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem; margin: 0.6rem 0; }
.footer-links a { color: var(--muted); font-size: 0.9rem; }
.site-footer p { font-size: 0.88rem; }

@media (max-width: 820px) {
  .site-nav { align-items: center; flex-direction: row; gap: 0.85rem; }
  .nav-links { display: none; justify-content: flex-start; gap: 0.8rem; }
  .hamburger-btn { display: inline-flex; }
  main, .site-footer {
    width: calc(100vw - 2rem);
    max-width: calc(100vw - 2rem);
    margin-left: auto;
    margin-right: auto;
  }
  .page-hero, .section, .card, .firm-card, .cta-band, .tool-panel, .result-card { max-width: 100%; }
  h1, h2, h3, p, a, .btn, label, input, select, .metric span, .metric strong, .result-copy, .tool-warning, .tool-disclaimer { overflow-wrap: anywhere; }
  .grid, .trust-strip, .tool-grid, .hero-metrics, .editorial-meta, .intent-grid, .discount-section-grid, .category-grid, .pros-cons-grid, .tools-grid, .tool-layout, .input-row, .metric-grid, .related-tools { grid-template-columns: 1fr; }
  .tool-layout,
  .tool-panel,
  .result-card,
  .input-row,
  .metric-grid,
  .formula-box {
    width: 100%;
  }
  .tool-links a.e8-result-banner { grid-template-columns: auto minmax(0, 1fr); }
  .e8-result-action { grid-column: 1 / -1; width: 100%; }
  .rank-card-header { flex-direction: column; }
  .hero-actions { flex-direction: column; }
  .cta-band { align-items: stretch; flex-direction: column; }
  .btn { width: 100%; }
}
