/* ============================================================
   tool-vs — editorial comparison design system
   Palette: ink navy + warm signal coral + paper
   Fonts: Space Grotesk (display) + Inter (body)
   ============================================================ */

:root {
  --ink:        #14182b;   /* near-black navy, body text */
  --ink-soft:   #3b4163;   /* secondary text */
  --paper:      #f7f6f1;   /* warm paper background */
  --paper-card: #ffffff;
  --line:       #e3e0d6;   /* hairline borders */
  --line-soft:  #efece4;
  --signal:     #e8552d;   /* coral — accents, CTAs */
  --signal-ink: #c0431f;
  --win:        #1f7a55;   /* "better" green */
  --win-bg:     #e6f3ec;
  --navy:       #1d2440;
  --navy-2:     #262e54;
  --gold:       #caa45a;
  --radius:     14px;
  --radius-sm:  9px;
  --shadow:     0 1px 2px rgba(20,24,43,.05), 0 8px 24px rgba(20,24,43,.06);
  --shadow-lg:  0 18px 50px rgba(20,24,43,.14);
  --maxw:       1080px;
  --ease:       cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: "Space Grotesk", "Inter", sans-serif;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 .5em;
  font-weight: 700;
}

a { color: var(--signal-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 2px;
  border-radius: 4px;
}

img { max-width: 100%; height: auto; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247,246,241,.86);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700; font-size: 19px; letter-spacing: -.02em;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand .vs {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--signal); color: #fff;
  font-size: 13px; font-weight: 700; letter-spacing: 0;
  transform: rotate(-4deg);
}
.nav-links { display: flex; gap: 22px; font-size: 15px; font-weight: 500; }
.nav-links a { color: var(--ink-soft); }
.nav-links a:hover { color: var(--signal-ink); text-decoration: none; }
@media (max-width: 640px) { .nav-links { display: none; } }

/* ---------- Hero / page head ---------- */
.hero {
  padding: 56px 0 30px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(900px 320px at 80% -10%, rgba(232,85,45,.08), transparent 60%),
    var(--paper);
}
.eyebrow {
  display: inline-block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 12.5px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--signal-ink);
  margin-bottom: 14px;
}
.hero h1 { font-size: clamp(2rem, 5.5vw, 3.3rem); }
.hero p.lede {
  font-size: clamp(1.05rem, 2.4vw, 1.28rem);
  color: var(--ink-soft); max-width: 64ch; margin: .4em 0 0;
}
.meta-row {
  margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px 18px;
  font-size: 14px; color: var(--ink-soft);
}
.meta-row span { display: inline-flex; align-items: center; gap: 7px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); }

/* ---------- Content ---------- */
main { padding: 38px 0 20px; }
.prose { max-width: 760px; }
.prose p { margin: 0 0 1.05em; }
section { margin: 0 0 48px; }
section > h2 {
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  margin-bottom: .5em; scroll-margin-top: 80px;
}
section > h2 .num {
  color: var(--signal); font-size: .7em; font-weight: 700;
  margin-right: .5em; font-variant-numeric: tabular-nums;
}
h3 { font-size: 1.22rem; margin-top: 1.4em; }

/* "who should read" callout */
.callout {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--signal);
  border-radius: var(--radius-sm);
  padding: 18px 22px; margin: 0 0 30px;
  box-shadow: var(--shadow);
}
.callout strong { color: var(--ink); }

/* ---------- Comparison table ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.cmp {
  width: 100%; border-collapse: collapse; font-size: 15.5px;
  background: var(--paper-card); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
table.cmp caption {
  caption-side: top; text-align: left;
  font-size: 13px; color: var(--ink-soft); padding: 0 0 10px;
}
table.cmp th, table.cmp td {
  padding: 13px 16px; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--line-soft);
}
table.cmp thead th {
  background: var(--navy); color: #fff;
  font-family: "Space Grotesk", sans-serif; font-weight: 600;
  font-size: 14.5px; letter-spacing: -.01em;
  position: sticky; top: 0;
}
table.cmp thead th:first-child { background: var(--navy-2); }
table.cmp tbody th {
  font-weight: 600; color: var(--ink); white-space: nowrap;
  background: var(--line-soft);
}
table.cmp tbody tr:last-child td,
table.cmp tbody tr:last-child th { border-bottom: 0; }
table.cmp td .best {
  display: inline-block; margin-left: 6px;
  font-size: 11px; font-weight: 700; color: var(--win);
  background: var(--win-bg); border-radius: 20px; padding: 1px 8px;
  vertical-align: middle;
}

/* ---------- Verdict cards ---------- */
.verdict-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.verdict {
  background: var(--paper-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 22px;
  box-shadow: var(--shadow);
}
.verdict h3 { margin: 0 0 .4em; font-size: 1.18rem; }
.verdict .tag {
  display: inline-block; font-size: 12px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  color: var(--signal-ink); margin-bottom: 6px;
}
.verdict ul { margin: 0; padding-left: 18px; }
.verdict ul li { margin: .3em 0; }

/* ---------- Pros / cons ---------- */
.poco-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.poco {
  background: var(--paper-card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.poco .poco-head {
  padding: 16px 20px; border-bottom: 1px solid var(--line);
  font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: space-between;
}
.poco .poco-body { padding: 6px 20px 18px; }
.poco h4 {
  font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase;
  margin: 16px 0 8px; color: var(--ink-soft);
}
.poco ul { list-style: none; margin: 0; padding: 0; }
.poco li { position: relative; padding-left: 24px; margin: .35em 0; font-size: 15px; }
.poco li.pro::before { content: "+"; position: absolute; left: 4px; color: var(--win); font-weight: 800; }
.poco li.con::before { content: "–"; position: absolute; left: 4px; color: var(--signal); font-weight: 800; }

/* ---------- CTA buttons ---------- */
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0 4px; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 15.5px;
  padding: 12px 22px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid transparent; transition: transform .15s var(--ease), box-shadow .15s var(--ease), background .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--signal); color: #fff; box-shadow: 0 6px 18px rgba(232,85,45,.28); }
.btn-primary:hover { background: var(--signal-ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); background: var(--paper-card); }
.btn-ghost:hover { border-color: var(--ink-soft); }
.btn .arr { transition: transform .15s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; }
.faq details {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--paper-card); margin-bottom: 12px; box-shadow: var(--shadow);
}
.faq summary {
  cursor: pointer; padding: 17px 20px; font-weight: 600;
  font-family: "Space Grotesk", sans-serif; font-size: 1.05rem;
  list-style: none; display: flex; justify-content: space-between; gap: 14px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--signal); font-size: 1.4rem; font-weight: 400; transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 20px 18px; color: var(--ink-soft); }

/* ---------- Hub cards (index) ---------- */
.hub-grid {
  display: grid; gap: 20px; margin-top: 8px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.hub-card {
  display: flex; flex-direction: column;
  background: var(--paper-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 22px; box-shadow: var(--shadow);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s;
  color: inherit;
}
.hub-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--signal); text-decoration: none; }
.hub-card .cat {
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--signal-ink); margin-bottom: 10px;
}
.hub-card h3 { font-size: 1.3rem; margin: 0 0 .35em; }
.hub-card p { margin: 0 0 16px; font-size: 15px; color: var(--ink-soft); }
.hub-card .go {
  margin-top: auto; font-family: "Space Grotesk", sans-serif; font-weight: 600;
  color: var(--signal-ink); font-size: 15px; display: inline-flex; align-items: center; gap: 7px;
}
.hub-card:hover .go .arr { transform: translateX(4px); }
.hub-card .go .arr { transition: transform .15s var(--ease); }

/* ---------- Internal link strip ---------- */
.more-strip {
  border-top: 1px solid var(--line); padding-top: 28px; margin-top: 10px;
}
.more-strip h2 { font-size: 1.3rem; }
.more-list { display: flex; flex-wrap: wrap; gap: 10px; }
.more-list a {
  font-size: 14px; padding: 8px 14px; border-radius: 999px;
  background: var(--paper-card); border: 1px solid var(--line); color: var(--ink-soft);
}
.more-list a:hover { border-color: var(--signal); color: var(--signal-ink); text-decoration: none; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 40px; border-top: 1px solid var(--line);
  background: var(--navy); color: #cbd0e4;
}
.site-footer .wrap { padding: 40px 22px 34px; }
.site-footer .foot-top {
  display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-start;
}
.site-footer a { color: #fff; }
.site-footer .brand-foot {
  font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 18px; color: #fff;
}
.disclosure {
  font-size: 13.5px; line-height: 1.6; color: #aab0cc; max-width: 60ch; margin: 18px 0 0;
}
.foot-meta {
  margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12);
  font-size: 13px; color: #8b90ad; display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between;
}
.foot-nav { display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; }
.foot-nav a { color: #cbd0e4; }

/* ---------- Mobile: tables become cards ---------- */
@media (max-width: 680px) {
  body { font-size: 16px; }
  table.cmp thead { position: absolute; left: -9999px; }
  table.cmp, table.cmp tbody, table.cmp tr, table.cmp td, table.cmp th { display: block; width: 100%; }
  table.cmp tr {
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    margin-bottom: 14px; overflow: hidden; background: var(--paper-card);
  }
  table.cmp tbody th {
    background: var(--navy); color: #fff; font-size: 14px;
    letter-spacing: .02em;
  }
  table.cmp td {
    display: flex; justify-content: space-between; gap: 14px;
    border-bottom: 1px solid var(--line-soft); text-align: right;
  }
  table.cmp td::before {
    content: attr(data-label);
    font-weight: 600; color: var(--ink-soft); text-align: left;
    font-family: "Space Grotesk", sans-serif; font-size: 13.5px;
    flex: 0 0 42%;
  }
  table.cmp tbody tr td:last-child { border-bottom: 0; }
}
