/* Scaffold — Design System v3
   Sharp B2B comparison. Clean. Authoritative. Fast.
   Reference: Wirecutter, G2, The Verge product pages.
*/

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=DM+Mono:wght@400;500&display=swap');

:root {
  --bg:             #F4F6F8;
  --bg-white:       #FFFFFF;
  --surface:        #FFFFFF;
  --surface-2:      #F0F2F5;
  --border:         #E2E6EA;
  --border-strong:  #C8CDD4;

  --text-1:         #0D1117;
  --text-2:         #2D3748;
  --text-3:         #5A6478;
  --text-muted:     #8C95A4;

  --accent:         #0057FF;
  --accent-light:   #EEF3FF;
  --accent-hover:   #0040CC;

  --green:          #16803C;
  --green-light:    #EDFAF3;
  --red:            #C0392B;
  --red-light:      #FEF0EE;
  --gold:           #D4760A;

  --font:           'DM Sans', -apple-system, sans-serif;
  --mono:           'DM Mono', monospace;

  --radius-sm:      3px;
  --radius:         6px;
  --radius-lg:      10px;

  --shadow-sm:      0 1px 2px rgba(0,0,0,0.05), 0 0 0 1px rgba(0,0,0,0.04);
  --shadow:         0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg:      0 12px 40px rgba(0,0,0,0.12);

  --max-width:      760px;
  --max-width-wide: 1080px;
}

/* ─── Reset ───────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
img, svg { display: block; max-width: 100%; }

/* ─── Base ────────────────────────────────────────────── */

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-1);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ─── Typography ──────────────────────────────────────── */

h1, h2, h3, h4 {
  font-family: var(--font);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-1);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-bottom: 0.6rem; }
h2 { font-size: 1.35rem; font-weight: 600; margin: 2.5rem 0 0.75rem; letter-spacing: -0.01em; }
h3 { font-size: 1.1rem; font-weight: 600; margin: 2rem 0 0.5rem; }
h4 { font-size: 0.95rem; font-weight: 600; margin: 1.5rem 0 0.4rem; }

p { margin-bottom: 1.1rem; line-height: 1.75; color: var(--text-2); font-size: 1rem; }
strong { color: var(--text-1); font-weight: 600; }

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

ul, ol { padding-left: 1.4rem; margin-bottom: 1.1rem; }
li { margin-bottom: 0.3rem; color: var(--text-2); line-height: 1.65; }

hr { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }

code {
  font-family: var(--mono);
  font-size: 0.82em;
  background: var(--surface-2);
  padding: 0.12em 0.4em;
  border-radius: var(--radius-sm);
  color: var(--text-2);
}

/* ─── Layout ──────────────────────────────────────────── */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 5rem;
}

/* ─── Navigation ──────────────────────────────────────── */

.site-nav {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
  gap: 2rem;
}

.nav-logo {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-1);
  text-decoration: none;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.nav-logo:hover { color: var(--accent); text-decoration: none; }

.nav-links {
  display: flex;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-3);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-sm);
  transition: color 0.12s;
}

.nav-links a:hover { color: var(--text-1); text-decoration: none; background: var(--surface-2); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 4px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text-2);
  border-radius: 2px;
}

/* ─── Buttons ─────────────────────────────────────────── */

.btn-cta {
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.12s;
}

.btn-cta:hover { background: var(--accent-hover); color: #fff; text-decoration: none; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-strong);
  color: var(--text-2);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.58rem 1.25rem;
  border-radius: var(--radius);
  text-decoration: none;
  white-space: nowrap;
  background: var(--bg-white);
  transition: border-color 0.12s, color 0.12s;
}

.btn-secondary:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ─── Disclosure ──────────────────────────────────────── */

.disclosure {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 1rem;
  margin: 1.25rem 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ─── Page Hero ───────────────────────────────────────── */

.page-hero {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.page-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.775rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  flex-wrap: wrap;
  font-family: var(--mono);
}

/* ─── Quick Verdict ───────────────────────────────────── */

.quick-verdict {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.quick-verdict .verdict-text {
  font-size: 0.95rem;
  color: var(--text-2);
  margin: 0.6rem 0 1rem;
  line-height: 1.65;
}

/* ─── Winner Badge ────────────────────────────────────── */

.winner-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
  font-family: var(--mono);
}

/* ─── Pros / Cons ─────────────────────────────────────── */

.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1rem 0 1.25rem;
}

.pros-cons > div {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  background: var(--bg-white);
}

.pros-cons > div:first-child { border-top: 2px solid var(--green); }
.pros-cons > div:last-child { border-top: 2px solid var(--red); }

.pros-cons > div strong {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.6rem;
  font-family: var(--mono);
}

.pros-cons > div:first-child strong { color: var(--green); }
.pros-cons > div:last-child strong { color: var(--red); }

.pros-cons ul { list-style: none; padding: 0; margin: 0; }

.pros-cons li {
  font-size: 0.875rem;
  padding: 0.2rem 0 0.2rem 1.1rem;
  position: relative;
  color: var(--text-2);
  margin: 0;
}

.pros-cons > div:first-child li::before {
  content: '+';
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

.pros-cons > div:last-child li::before {
  content: '−';
  position: absolute;
  left: 0;
  color: var(--red);
  font-weight: 700;
}

/* ─── Rating Stars ────────────────────────────────────── */

.rating-stars { color: var(--gold); font-size: 0.95rem; }

/* ─── TOC ─────────────────────────────────────────────── */

.toc {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.875rem;
  background: var(--bg-white);
}

.toc strong {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-family: var(--mono);
}

.toc ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
.toc li { margin: 0; }
.toc a { text-decoration: none; font-weight: 500; color: var(--text-3); font-size: 0.85rem; }
.toc a:hover { color: var(--accent); }

/* ─── Picks List ──────────────────────────────────────── */

.picks-list { display: flex; flex-direction: column; gap: 0.75rem; margin: 1.25rem 0; }

.pick-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  transition: border-color 0.15s;
}

.pick-card:hover { border-color: var(--accent); }

.pick-info { flex: 1; min-width: 0; }
.pick-info strong { display: block; font-size: 0.95rem; margin: 0.25rem 0 0.2rem; }
.pick-info p { font-size: 0.85rem; color: var(--text-3); margin: 0; }

/* ─── Tables ──────────────────────────────────────────── */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.875rem;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

th {
  background: var(--surface-2);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  text-align: left;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
}

td {
  padding: 0.7rem 1rem;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface-2); }

/* ─── Page Body ───────────────────────────────────────── */

.page-body { margin-top: 2rem; }
.page-body h2 { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.page-body h2:first-child { border-top: none; padding-top: 0; }

/* ─── Bottom CTA ──────────────────────────────────────── */

.bottom-cta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.aff-cta { margin: 1.5rem 0; }

/* ─── Homepage ────────────────────────────────────────── */

.home-hero {
  padding: 3.5rem 0 3rem;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.home-hero h1 { font-size: clamp(1.75rem, 4vw, 2.6rem); margin-bottom: 0.75rem; }

.home-hero p { font-size: 1.05rem; color: var(--text-3); margin-bottom: 1.75rem; }

.home-hero .bottom-cta { justify-content: center; border: none; padding: 0; margin: 0; }

.home-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.home-nav-card {
  display: block;
  padding: 1rem 1.25rem;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text-2);
  font-weight: 600;
  font-size: 0.875rem;
  transition: border-color 0.12s, color 0.12s;
}

.home-nav-card:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.section-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  font-family: var(--mono);
}

/* ─── Footer ──────────────────────────────────────────── */

.site-footer {
  background: var(--text-1);
  padding: 2.5rem 1.5rem 1.75rem;
  margin-top: 5rem;
}

.footer-inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
}

.footer-brand .nav-logo { color: #fff; display: inline-block; margin-bottom: 0.35rem; }
.footer-brand p { font-size: 0.82rem; color: rgba(255,255,255,0.4); margin: 0; }

.site-footer nav ul { list-style: none; padding: 0; display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site-footer nav a { font-size: 0.82rem; color: rgba(255,255,255,0.45); text-decoration: none; }
.site-footer nav a:hover { color: #fff; }

.footer-bottom {
  max-width: var(--max-width-wide);
  margin: 2rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.07);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.25);
  line-height: 1.6;
}

/* ─── Mobile ──────────────────────────────────────────── */

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 54px; left: 0; right: 0;
    background: var(--bg-white);
    flex-direction: column;
    padding: 0.75rem 1rem 1rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .pros-cons { grid-template-columns: 1fr; }
  .pick-card { flex-direction: column; align-items: flex-start; }
  .bottom-cta { flex-direction: column; align-items: flex-start; }
  .footer-inner { flex-direction: column; }
  .site-footer nav ul { gap: 0.75rem; }
  main { padding: 1.5rem 1rem 4rem; }
}

@media (max-width: 480px) {
  .home-hero { padding: 2.5rem 0 2rem; }
}
