:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --accent: #14b8a6;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, .08);
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

img, video, canvas {
  max-width: 100%;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 700;
  font-size: 18px;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.02em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 0;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--primary);
  text-decoration: none;
}

/* Hero & Breadcrumb */
.hero-tool {
  padding: 32px 0 48px;
}

.article-hero {
  padding: 48px 0 24px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
}

.hero-header {
  margin-bottom: 24px;
}

h1 {
  margin: 0 0 12px;
  font-size: 36px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

h2 {
  margin: 0 0 16px;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
}

h3 {
  margin: 24px 0 8px;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--text);
}

.hero-lead {
  margin: 0 0 16px;
  font-size: 18px;
  color: var(--muted);
  max-width: 70ch;
}

.trust-badges {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trust-badges li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

/* Buttons */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-hover);
  text-decoration: none;
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

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

.article-cta-row {
  margin-top: 24px;
}

/* Tool Shell & Engage Bar */
.tool-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 24px;
}

.engage-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.engage-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.engage-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.engage-btn[data-gf-liked] {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.engage-count {
  font-weight: 700;
}

.share-msg {
  font-size: 14px;
  color: var(--muted);
}

/* Content Sections */
.content-section {
  padding: 48px 0;
  border-top: 1px solid var(--border);
}

.steps-grid {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
}

.step-card h3 {
  margin: 0 0 8px;
}

.step-card p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

/* Prose */
.prose {
  max-width: 820px;
}

.prose p,
.prose li {
  max-width: 70ch;
  color: var(--text);
  margin: 0 0 16px;
}

.prose ul,
.prose ol {
  padding-left: 24px;
  margin: 0 0 24px;
}

.prose h2 {
  margin-top: 40px;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose table {
  width: 100%;
  max-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 24px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  /* Scroll shadows: a soft edge appears only when more columns are hidden. */
  background:
    linear-gradient(to right, var(--surface) 30%, rgba(255, 255, 255, 0)) left center / 40px 100% no-repeat local,
    linear-gradient(to left, var(--surface) 30%, rgba(255, 255, 255, 0)) right center / 40px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(15, 23, 42, 0.16), rgba(15, 23, 42, 0)) left center / 14px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(15, 23, 42, 0.16), rgba(15, 23, 42, 0)) right center / 14px 100% no-repeat scroll,
    var(--surface);
}

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

.prose thead tr:first-child th:first-child {
  border-top-left-radius: calc(var(--radius) - 1px);
}

.prose thead tr:first-child th:last-child {
  border-top-right-radius: calc(var(--radius) - 1px);
}

.prose tbody tr:hover td {
  background-color: rgba(37, 99, 235, 0.04);
}

.prose th,
.prose td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  vertical-align: top;
}

.prose th {
  background: var(--bg);
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

.prose code {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 14px;
}

/* Related Grid */
.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.related-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  color: var(--text);
}

.related-card:hover {
  border-color: var(--primary);
  text-decoration: none;
}

.related-card h3 {
  margin: 0 0 8px;
  color: var(--text);
}

.related-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.related-cta {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 12px;
  max-width: 820px;
  margin-top: 24px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 24px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.faq-item:hover {
  border-color: #bfdbfe;
}

.faq-item[open] {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::marker {
  content: "";
}

.faq-item summary::after {
  content: "+";
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--primary);
  font-size: 18px;
  font-weight: 600;
  line-height: 26px;
  text-align: center;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.2s ease;
}

.faq-item summary:hover {
  color: var(--primary);
}

.faq-item summary:hover::after {
  border-color: var(--primary);
}

.faq-item[open] summary::after {
  content: "\2212";
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  transform: rotate(180deg);
}

.faq-item p {
  margin: 12px 0 0;
  color: var(--muted);
  max-width: 70ch;
}

/* Comments */
.comment-form {
  max-width: 720px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.form-row {
  margin-bottom: 12px;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.comment-msg {
  font-size: 14px;
  color: var(--muted);
}

.comments-list {
  max-width: 720px;
  display: grid;
  gap: 12px;
}

.comments-empty {
  display: none;
  color: var(--muted);
  margin: 0;
}

.comments-list[data-gf-empty] .comments-empty {
  display: block;
}

.comment-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 24px;
}

.comment-card[data-gf-owner] {
  border-color: var(--primary);
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
}

.comment-meta strong {
  color: var(--text);
}

.owner-badge {
  background: var(--primary);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.comment-body {
  margin: 0 0 8px;
}

.reply-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--primary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.comment-replies {
  margin-top: 12px;
  padding-left: 16px;
  border-left: 2px solid var(--border);
  display: grid;
  gap: 8px;
}

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 0;
  margin-top: 48px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

.footer-tagline {
  margin: 12px 0 8px;
  color: var(--muted);
  font-size: 14px;
  max-width: 42ch;
}

.footer-copy {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.footer-heading {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--text);
}

.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.footer-list a {
  font-size: 14px;
  color: var(--muted);
}

.footer-list a:hover {
  color: var(--primary);
}

.not-found {
  padding: 64px 0;
}

/* Section lead */
.section-lead {
  margin: 0 0 24px;
  max-width: 70ch;
  color: var(--muted);
  font-size: 17px;
}

/* Workflow diagram */
.workflow-figure {
  margin: 0;
  max-width: 960px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px;
}

.workflow-figure img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.workflow-figure figcaption {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
  max-width: 70ch;
}

/* Tool recommendation cards */
.pick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.pick-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  min-width: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pick-card:hover {
  border-color: #bfdbfe;
  box-shadow: var(--shadow-md);
}

.pick-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.pick-head h3 {
  margin: 0;
  font-size: 20px;
}

.pick-type {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.pick-badge {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  color: #0f766e;
  font-size: 13px;
  font-weight: 700;
}

.pick-desc {
  margin: 0;
  color: var(--text);
  font-size: 15px;
}

.pick-lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.pick-list-title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pick-pros .pick-list-title {
  color: #0f766e;
}

.pick-cons .pick-list-title {
  color: #b45309;
}

.pick-list ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.pick-list li {
  position: relative;
  padding-left: 20px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}

.pick-pros li::before,
.pick-cons li::before {
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
}

.pick-pros li::before {
  content: "+";
  color: var(--accent);
}

.pick-cons li::before {
  content: "\2212";
  color: #d97706;
}

.pick-best {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.pick-best strong {
  color: var(--text);
}

.pick-cta {
  margin-top: auto;
  align-self: flex-start;
}

.pick-note {
  margin: 20px 0 0;
  font-size: 13px;
  color: var(--muted);
  max-width: 70ch;
}

@media (min-width: 901px) {
  .prose table {
    display: table;
  }
}

@media (max-width: 900px) {
  .pick-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 0;
  }

  .site-nav {
    width: 100%;
    gap: 16px;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 22px;
  }

  .tool-shell {
    padding: 16px;
  }

  .steps-grid,
  .related-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
  }

  .pick-card {
    padding: 20px;
  }

  .pick-lists {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .pick-cta {
    align-self: stretch;
  }

  .workflow-figure {
    padding: 8px;
  }

  .faq-item {
    padding: 14px 16px;
  }

  /* Compact, horizontally scrollable comparison tables (no page-level overflow). */
  .prose table {
    display: block;
    width: 100%;
    overflow-x: auto;
    margin: 20px 0;
  }

  .prose table::before {
    content: "Swipe sideways to compare \2192";
    display: block;
    position: sticky;
    left: 0;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
  }

  .prose th,
  .prose td {
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.45;
    min-width: 9.5rem;
  }

  .prose th {
    white-space: normal;
  }

  .prose th:first-child,
  .prose td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    min-width: 7.5rem;
    background: var(--surface);
    box-shadow: 1px 0 0 var(--border);
  }

  .prose th:first-child {
    background: var(--bg);
  }
}