:root {
  --brand: #ff385c;
  --ink: #222;
  --muted: #6b7280;
  --bg: #fafafa;
  --line: #e5e7eb;
}

* { box-sizing: border-box; }

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

a { color: var(--brand); }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-weight: 800;
  font-size: 20px;
  text-decoration: none;
  color: var(--ink);
}
.brand span { color: var(--brand); }

.site-header nav a {
  margin-left: 18px;
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
}
.site-header nav a:hover { color: var(--brand); }

main { padding: 24px; max-width: 1100px; margin: 0 auto; }

.hero {
  text-align: center;
  padding: 64px 16px 40px;
}
.hero.narrow { padding: 40px 16px 16px; }
.hero h1 { font-size: 40px; margin: 0 0 12px; line-height: 1.15; }
.hero .sub { font-size: 18px; color: var(--muted); max-width: 640px; margin: 0 auto 28px; }

.paste-form {
  display: flex;
  gap: 10px;
  max-width: 640px;
  margin: 0 auto;
}
.paste-form input[type="url"],
.paste-form input[type="email"],
.paste-form input[type="text"] {
  flex: 1;
  padding: 14px 16px;
  font-size: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.paste-form button {
  padding: 14px 22px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: var(--brand);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.paste-form button:hover { filter: brightness(0.94); }

.column-form { flex-direction: column; align-items: stretch; }
.column-form label {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  font-weight: 600;
  gap: 6px;
  margin-bottom: 12px;
}
.column-form input, .column-form textarea {
  padding: 12px;
  font-size: 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
}
.column-form textarea { resize: vertical; }

.or { margin-top: 14px; font-size: 14px; color: var(--muted); }
.or a { color: var(--muted); text-decoration: underline; }

.section { padding: 48px 16px; }
.section.narrow { max-width: 760px; margin: 0 auto; }
.section h2 { font-size: 28px; margin-bottom: 20px; }
.section h2:not(:first-child) { margin-top: 40px; }

.alert {
  max-width: 640px;
  margin: 0 auto 16px;
  padding: 12px 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 10px;
}

.steps { display: flex; gap: 24px; }
.step {
  flex: 1;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
}
.step span {
  display: inline-flex;
  width: 32px; height: 32px;
  align-items: center; justify-content: center;
  background: var(--brand); color: #fff;
  border-radius: 50%;
  font-weight: 700;
}
.step h3 { margin: 12px 0 6px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.card h3 { margin: 0 0 6px; }
.card p, .muted { color: var(--muted); }
.muted { font-size: 15px; }
.small { font-size: 13px; }

.tiers { display: flex; gap: 20px; align-items: stretch; }
.tier {
  flex: 1;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
}
.tier.featured { border: 2px solid var(--brand); }
.tier h3 { margin-top: 0; }
.tier .price { font-size: 30px; font-weight: 800; }
.tier .promo { color: var(--brand); font-weight: 600; font-size: 14px; }
.tier ul { padding-left: 18px; color: var(--muted); }
.tier li { margin-bottom: 6px; }

details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 10px;
}
details summary { cursor: pointer; font-weight: 600; }

/* score page */
.score-hero { display: flex; align-items: center; gap: 28px; margin-bottom: 28px; }
.score-ring {
  --score: 0;
  width: 120px; height: 120px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: conic-gradient(var(--brand) calc(var(--score) * 1%), var(--line) 0);
}
.score-num {
  width: 96px; height: 96px;
  background: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; font-weight: 800;
}
.bars { margin: 16px 0 32px; }
.bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.bar-label { width: 130px; font-size: 14px; font-weight: 600; }
.bar-track { flex: 1; height: 12px; background: var(--line); border-radius: 8px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--brand); border-radius: 8px; }
.bar-score { width: 34px; text-align: right; font-weight: 700; }

.weakness-list, .fix-list, .gap-list { padding-left: 22px; }
.weakness-list li, .fix-list li { margin-bottom: 10px; }

.rewrite {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 12px;
}
.rewrite-result {
  background: #fff5f6;
  border-color: var(--brand);
  font-weight: 700;
  font-size: 18px;
}

.gate {
  margin-top: 32px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
}

.comp-table { width: 100%; border-collapse: collapse; margin: 12px 0 16px; }
.comp-table th, .comp-table td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  font-size: 14px;
}

.score-num-lg { font-size: 20px; }
.print-actions button {
  padding: 10px 18px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}

.site-footer {
  text-align: center;
  padding: 28px;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--line);
  background: #fff;
}

@media (max-width: 720px) {
  .steps, .tiers { flex-direction: column; }
  .paste-form { flex-direction: column; }
  .score-hero { flex-direction: column; text-align: center; }
  .bar-label { width: 100px; }
}