:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --ink: #12141d;
  --ink-soft: #4b5163;
  --muted: #737a8d;
  --line: #e4e7ef;
  --accent: #4f46e5;
  --accent-dark: #3f38c4;
  --accent-soft: #eef0ff;
  --good: #067a52;
  --good-soft: #e6f6ef;
  --warn: #9a5b06;
  --warn-soft: #fdf3e2;
  --bad: #b42318;
  --bad-soft: #fdeceb;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(18, 20, 29, .04), 0 12px 30px -18px rgba(18, 20, 29, .25);
}

* { box-sizing: border-box; }

/* Post-checkout confirmation: only shown when arriving from a paid Stripe redirect. */
.paid-banner { background: var(--good-soft); border-bottom: 1px solid #bfe6d4; }
.paid-banner-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .65rem 0; font-size: .92rem; color: var(--good);
}
.paid-banner-inner span { max-width: 70ch; }
.paid-banner-inner button {
  flex: none; border: 0; background: transparent; color: var(--good);
  font-size: 1.35rem; line-height: 1; cursor: pointer; padding: 0 .25rem;
}
.paid-banner-inner button:hover { opacity: .65; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .5rem; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); }
h3 { font-size: 1.08rem; }
p { margin: 0 0 .75rem; }
a { color: var(--accent); text-decoration: none; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9em;
  background: #eef0f6;
  border-radius: 5px;
  padding: .08em .35em;
}

.wrap { width: min(1080px, calc(100% - 2.5rem)); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 247, 251, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 700; color: var(--ink); letter-spacing: -.02em; }
.brand-mark {
  width: 22px; height: 22px; border-radius: 7px;
  background: linear-gradient(140deg, #6d64f5, #4338ca);
  position: relative;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 0;
  background: no-repeat center/62% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M16 34l10 10 22-26' fill='none' stroke='white' stroke-width='9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.nav { display: flex; gap: 1.35rem; font-size: .9rem; }
.nav a { color: var(--ink-soft); }
.nav a:hover { color: var(--accent); }

/* Hero */
.hero { padding: 3.5rem 0 2.5rem; text-align: center; }
.pill {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: .78rem;
  font-weight: 600;
  padding: .32rem .7rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.lede { font-size: 1.08rem; color: var(--ink-soft); max-width: 62ch; margin: 0 auto 1.5rem; }
.hero-actions { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; }
.hero-points {
  list-style: none; padding: 0; margin: 1.6rem 0 0;
  display: flex; gap: 1.4rem; justify-content: center; flex-wrap: wrap;
  font-size: .86rem; color: var(--muted);
}
.hero-points li::before { content: "✓"; color: var(--good); font-weight: 700; margin-right: .4rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: .62rem 1.05rem;
  font: inherit;
  font-size: .93rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .08s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
  text-align: center;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 18px -10px rgba(79, 70, 229, .8); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: #c9cee0; background: #fbfbfe; }
.btn-small { padding: .38rem .7rem; font-size: .82rem; border-radius: 8px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
}
.section { padding: 3rem 0; }
.section-sub { color: var(--ink-soft); margin-bottom: 1.6rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }

/* Tool */
.tool-card { padding: 1.5rem; }
.tool-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; flex-wrap: wrap; margin-bottom: 1rem; }
.tool-head-actions { display: flex; gap: .4rem; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }

.dropzone {
  border: 1.5px dashed #c8cde0;
  border-radius: 12px;
  padding: 1.1rem;
  text-align: center;
  background: #fbfbfe;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
  margin-bottom: 1rem;
}
.dropzone:hover, .dropzone:focus-visible, .dropzone.dragover { border-color: var(--accent); background: var(--accent-soft); outline: none; }
.dropzone p { margin: 0; }
.dropzone .link { color: var(--accent); text-decoration: underline; }

.field-label { display: block; font-size: .82rem; font-weight: 600; color: var(--ink-soft); margin-bottom: .35rem; }

textarea {
  width: 100%;
  min-height: 168px;
  resize: vertical;
  padding: .8rem .9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .86rem;
  line-height: 1.5;
  background: #fcfcff;
  color: var(--ink);
}
textarea:focus { outline: 2px solid rgba(79, 70, 229, .35); border-color: var(--accent); }

.options {
  border: 0;
  padding: 0;
  margin: 1rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: .45rem 1.3rem;
}
.options legend { font-size: .82rem; font-weight: 600; color: var(--ink-soft); padding: 0; margin-bottom: .45rem; }
.options label { display: inline-flex; align-items: center; gap: .42rem; font-size: .87rem; color: var(--ink-soft); cursor: pointer; }
.options input { accent-color: var(--accent); width: 15px; height: 15px; }

.run-row { display: flex; align-items: center; gap: 1rem; margin-top: 1.2rem; flex-wrap: wrap; }
.btn-run { min-width: 210px; }

.progress { position: relative; margin-top: 1rem; padding-bottom: 1.7rem; }
.progress::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0;
  height: 8px; background: #eef0f7; border-radius: 999px;
}
.progress-bar {
  position: relative; height: 8px; width: 0;
  background: var(--accent); border-radius: 999px;
  transition: width .18s ease;
}
.progress p { position: absolute; left: 0; bottom: 0; margin: 0; }
.progress[hidden] { display: none; }

.notice { border-radius: 10px; padding: .7rem .9rem; margin-top: 1rem; font-size: .88rem; }
.notice-error { background: var(--bad-soft); color: var(--bad); border: 1px solid #f5c9c4; }

/* Results */
.results { margin-top: 1.2rem; }
.results-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.results-head h2 { margin: 0; }
select {
  font: inherit; font-size: .86rem;
  padding: .4rem .6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: .6rem; margin-bottom: 1.1rem; }
.stat {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .6rem .7rem;
  background: #fcfcff;
}
.stat-value { display: block; font-size: 1.3rem; font-weight: 700; letter-spacing: -.02em; }
.stat-label { font-size: .74rem; color: var(--muted); }
.stat-good .stat-value { color: var(--good); }
.stat-bad .stat-value { color: var(--bad); }
.stat-warn .stat-value { color: var(--warn); }

.table-wrap { max-height: 460px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: .84rem; }
thead th {
  position: sticky; top: 0;
  background: #f4f5fa;
  text-align: left;
  padding: .5rem .65rem;
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
tbody td { padding: .48rem .65rem; border-bottom: 1px solid #f0f1f7; vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafaff; }
td.email { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; word-break: break-all; }
tr.row-bad td { background: #fffafa; }

.badge {
  display: inline-block;
  font-size: .7rem;
  font-weight: 600;
  padding: .1rem .42rem;
  border-radius: 999px;
  margin: 0 .2rem .2rem 0;
  white-space: nowrap;
}
.badge-good { background: var(--good-soft); color: var(--good); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }
.badge-neutral { background: #eef0f6; color: var(--ink-soft); }

.paywall {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid #d9dcf5;
  background: linear-gradient(180deg, #f4f5ff, #fff);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.paywall h3 { margin: 0 0 .2rem; font-size: 1rem; }
.paywall p { margin: 0; font-size: .86rem; }

.downloads { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.1rem; }

/* Content sections */
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding-left: 1.5rem; position: relative; margin-bottom: .45rem; color: var(--ink-soft); font-size: .92rem; }
.checklist li::before {
  content: "✓";
  position: absolute; left: 0; top: 0;
  color: var(--good); font-weight: 700;
}
.grid-3 .card p, .grid-2 .card p { color: var(--ink-soft); font-size: .92rem; margin: 0; }

.pricing { align-items: stretch; }
.price-card { display: flex; flex-direction: column; gap: .8rem; }
.price-card .checklist { flex: 1; }
.price { font-size: 2rem; font-weight: 700; letter-spacing: -.03em; margin: 0; }
.price-featured { border-color: #c7c4f7; box-shadow: 0 18px 40px -26px rgba(79, 70, 229, .7); }
.tag { font-size: .68rem; background: var(--accent-soft); color: var(--accent-dark); padding: .1rem .4rem; border-radius: 999px; vertical-align: middle; font-weight: 600; }

details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .8rem 1rem;
  margin-bottom: .55rem;
}
details summary { cursor: pointer; font-weight: 600; font-size: .94rem; }
details summary::marker { color: var(--accent); }
details p { margin: .6rem 0 0; color: var(--ink-soft); font-size: .9rem; }

.site-footer { border-top: 1px solid var(--line); margin-top: 2rem; padding: 1.8rem 0 2.4rem; }
.footer-inner p { margin: 0 0 .3rem; font-size: .85rem; color: var(--ink-soft); }

/* Guides (/guides/…) */
.prose { max-width: 760px; padding: 2.2rem 0 1rem; }
.prose h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 1rem; }
.prose h2 { margin-top: 2rem; }
.prose p, .prose li { color: var(--ink-soft); }
.prose ul, .prose ol { padding-left: 1.2rem; margin: 0 0 1rem; }
.prose li { margin-bottom: .4rem; }
.prose code { font-size: .88em; background: var(--accent-soft); color: var(--accent-dark); padding: .05rem .3rem; border-radius: 4px; }

.crumb { font-size: .82rem; color: var(--muted); margin: 0 0 1rem; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--accent); }

.cta-box {
  margin: 2rem 0;
  padding: 1.3rem 1.4rem;
  border: 1px solid #c7c4f7;
  background: var(--accent-soft);
  border-radius: var(--radius);
}
.cta-box p { color: var(--ink); margin-bottom: .9rem; }

.guide-list { list-style: none; padding: 0; margin: 1.4rem 0 0; }
.guide-list li {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding: .9rem 0;
  border-bottom: 1px solid var(--line);
}
.guide-list li a { font-weight: 600; }
.guide-list li span { line-height: 1.45; }

.faq-item { margin-bottom: 1.1rem; }
.faq-item h3 { font-size: 1rem; margin-bottom: .25rem; }
.faq-item p { margin: 0; }

.related { margin-top: 2.4rem; border-top: 1px solid var(--line); padding-top: 1.2rem; }
.related h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.related ul { list-style: none; padding: 0; margin: 0; }
.related li { margin-bottom: .4rem; }

@media (max-width: 640px) {
  .nav { display: none; }
  .hero { padding-top: 2.4rem; }
  .tool-card { padding: 1.1rem; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stat-value { font-size: 1.1rem; }
}
