:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #647284;
  --line: #e3e8ef;
  --paper: #fbfcfe;
  --surface: #ffffff;
  --soft: #f4f8fb;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --gold: #d59b24;
  --red: #c2415a;
  --blue: #0f6b8f;
  --shadow: 0 18px 50px rgba(23, 32, 42, .08);
  font-family: "Segoe UI", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, .9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  background: var(--accent-dark);
  border-radius: 8px;
}

.header-nav {
  display: flex;
  gap: clamp(12px, 2vw, 26px);
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.header-nav a,
.text-link,
.tool-name-link {
  text-decoration: none;
}

.header-nav a:hover,
.text-link:hover,
.tool-name-link:hover {
  color: var(--accent);
}

.language-switcher select {
  min-width: 122px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: stretch;
  max-width: 1480px;
  margin: 0 auto;
  padding: clamp(54px, 8vw, 104px) clamp(18px, 4vw, 56px) 32px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 430px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--red);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(48px, 6vw, 92px);
  line-height: .98;
  font-weight: 850;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(34px, 3.6vw, 58px);
  line-height: 1.06;
  font-weight: 820;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.hero-lead {
  max-width: 760px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 20px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  background: var(--accent);
  color: #fff;
}

.button.secondary {
  border-color: var(--line);
  background: var(--surface);
}

.button.compact {
  min-height: 42px;
  margin-top: 4px;
  padding: 9px 14px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
}

.verdict-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 430px;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, .07), rgba(15, 107, 143, .06)),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.badge {
  width: fit-content;
  padding: 6px 10px;
  background: #edf5ff;
  color: var(--accent-dark);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.verdict-panel h2 {
  margin-top: 24px;
  font-size: 32px;
}

.verdict-panel p {
  color: var(--muted);
}

.score-ring {
  display: flex;
  width: 132px;
  height: 132px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 10px solid var(--gold);
  border-radius: 50%;
  background: var(--surface);
}

.score-ring strong {
  font-size: 34px;
  line-height: 1;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 56px) 28px;
}

.trust-strip div {
  padding: 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.section {
  max-width: 1480px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 86px) clamp(18px, 4vw, 56px);
}

.section-head {
  max-width: 980px;
  margin-bottom: 30px;
}

.section-head p:not(.eyebrow) {
  color: var(--muted);
  font-size: 18px;
}

.ranking-grid {
  display: grid;
  gap: 18px;
}

.tool-card {
  display: grid;
  grid-template-columns: 56px minmax(260px, 420px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.tool-card.featured {
  border-color: rgba(37, 99, 235, .34);
  box-shadow: var(--shadow);
}

.tool-preview,
.review-preview {
  position: relative;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #f2f6fa;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.tool-preview::before,
.review-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .42);
}

.tool-preview img,
.review-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.tool-rank {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(23, 32, 42, .06);
}

.rank-1 .tool-rank {
  background: radial-gradient(circle at 30% 24%, #fff7cc 0, #e8bd48 42%, #b88722 100%);
  border-color: #9f741d;
  color: #221806;
}

.rank-2 .tool-rank {
  background: radial-gradient(circle at 30% 24%, #ffffff 0, #d9dee5 44%, #9ca6b3 100%);
  border-color: #8b95a1;
  color: #1f2933;
}

.rank-3 .tool-rank {
  background: radial-gradient(circle at 30% 24%, #ffe4c3 0, #c9823b 45%, #8a4d22 100%);
  border-color: #7b421c;
  color: #fffaf3;
}

.tool-heading,
.review-topline {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
}

.score,
.review-topline strong {
  flex: 0 0 auto;
  color: var(--accent-dark);
  font-size: 26px;
  font-weight: 900;
}

.score-ring-small {
  display: flex;
  width: 86px;
  height: 86px;
  align-items: center;
  justify-content: center;
  border: 7px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  line-height: 1;
}

.score-ring-small strong {
  display: block;
  font-size: 28px;
  line-height: 1;
}

.rank-1 .score-ring-small {
  border-color: var(--gold);
}

.rank-2 .score-ring-small {
  border-color: #aeb7c2;
}

.rank-3 .score-ring-small {
  border-color: #b87333;
}

.tool-card p,
.review-block p {
  margin-top: 12px;
  color: var(--muted);
}

.tool-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.tool-facts div {
  padding: 12px;
  background: var(--soft);
  border-radius: 8px;
}

.tool-facts dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.tool-facts dd {
  margin: 4px 0 0;
  font-weight: 800;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
}

.text-link.external {
  color: var(--accent-dark);
  font-weight: 850;
}

.text-link.external::after {
  content: "↗";
  margin-left: 5px;
  font-size: .9em;
}

.method-section,
.comparison-section,
.reviews-section,
.faq-section {
  border-top: 1px solid var(--line);
}

.criteria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.criteria-grid article {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.criteria-grid span {
  color: var(--gold);
  font-size: 26px;
  font-weight: 900;
}

.criteria-grid h3 {
  margin-top: 12px;
  font-size: 18px;
}

.criteria-grid p {
  color: var(--muted);
  font-size: 15px;
}

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

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #f4f8fb;
  font-size: 13px;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.review-block {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.review-block:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.rank-label {
  display: block;
  margin-bottom: 6px;
  color: var(--red);
  font-size: 13px;
  font-weight: 850;
}

.review-preview {
  margin-top: 18px;
  margin-bottom: 22px;
}

.pros-cons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.pros-cons div {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.pros-cons h4 {
  margin: 0;
  font-size: 16px;
}

.pros-cons ul {
  margin: 12px 0 0;
  padding-left: 19px;
}

.cta-section {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 22px;
  align-items: center;
  background: linear-gradient(135deg, #f7fbff, #eef6ff);
  color: var(--ink);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.cta-section p {
  max-width: 760px;
  color: var(--muted);
}

.faq-list {
  display: grid;
  gap: 10px;
}

details {
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

summary {
  cursor: pointer;
  font-weight: 850;
}

details p {
  color: var(--muted);
}

.site-footer {
  display: grid;
  place-items: center;
  padding: 28px clamp(18px, 4vw, 56px);
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--line);
}

.site-footer p {
  max-width: 820px;
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 920px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .header-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero,
  .pros-cons,
  .cta-section {
    grid-template-columns: 1fr;
  }

  .tool-card {
    grid-template-columns: 48px 1fr;
  }

  .tool-card .tool-preview {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .tool-card > div:last-child {
    grid-column: 1 / -1;
  }

  .criteria-grid,
  .trust-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .site-header {
    gap: 12px;
  }

  .brand span:last-child {
    display: none;
  }

  .hero-copy,
  .verdict-panel {
    min-height: auto;
  }

  h1 {
    font-size: 42px;
  }

  .trust-strip,
  .criteria-grid,
  .tool-facts {
    grid-template-columns: 1fr;
  }

  .tool-card {
    grid-template-columns: 1fr;
  }

  .tool-card .tool-preview,
  .tool-card > div:last-child {
    grid-column: auto;
    grid-row: auto;
  }

  .tool-heading,
  .review-topline {
    flex-direction: column;
  }
}
