:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --ink: #1a1d29;
  --muted: #6b7280;
  --line: #e6e8f0;
  --brand: #5b6cff;
  --brand-dark: #4453e6;
  --good: #16a34a;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(20,22,40,.06), 0 8px 24px rgba(20,22,40,.06);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}
a { color: var(--brand); }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 720px; }

/* Header + nav */
header.site { background: var(--card); border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.logo { font-weight: 800; font-size: 20px; letter-spacing: -.5px; text-decoration: none; color: var(--ink); }
.logo span { color: var(--brand); }
.topnav { margin-left: auto; display: flex; gap: 4px; }
.topnav a { font-size: 14px; color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 600; }
.topnav a:hover, .topnav a.active { color: var(--brand-dark); background: #eef0ff; }

/* Hero */
.hero { text-align: center; padding: 44px 0 8px; }
.hero h1 { font-size: 34px; line-height: 1.2; margin: 0 0 10px; letter-spacing: -.8px; }
.hero p { font-size: 17px; color: var(--muted); margin: 0 auto; max-width: 560px; }
.badges { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.badge { font-size: 12.5px; background: #eef0ff; color: var(--brand-dark); padding: 5px 11px; border-radius: 999px; font-weight: 600; }

/* Ad slot */
.ad-slot {
  margin: 22px 0; min-height: 90px;
  display: flex; align-items: center; justify-content: center;
  border: 1px dashed #c7cbe0; border-radius: 10px;
  color: #9aa0bd; font-size: 12px;
  background: repeating-linear-gradient(45deg, #fafbff, #fafbff 10px, #f3f4fc 10px, #f3f4fc 20px);
}

/* Tool card container */
.tool { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin-top: 18px; }

.dropzone {
  border: 2px dashed #c4c9e6; border-radius: var(--radius);
  padding: 40px 20px; text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s; background: #fafbff;
}
.dropzone.drag { border-color: var(--brand); background: #eef0ff; }
.dropzone .big { font-size: 17px; font-weight: 600; margin: 8px 0 2px; }
.dropzone .small { color: var(--muted); font-size: 14px; }
.dropzone svg { width: 40px; height: 40px; color: var(--brand); }

.controls {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px;
  margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line);
}
.control label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.control .val { color: var(--brand-dark); }
input[type=range] { width: 100%; accent-color: var(--brand); }
select, input[type=number], input[type=text], input[type=email], textarea {
  width: 100%; padding: 9px 10px; border: 1px solid var(--line);
  border-radius: 9px; font-size: 14px; background: #fff; color: var(--ink); font-family: inherit;
}
textarea { resize: vertical; min-height: 120px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 5px; }

/* Results */
.summary {
  display: none; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 18px; padding: 12px 16px; background: #ecfdf3; border: 1px solid #bbf7d0;
  border-radius: 10px; color: #166534; font-size: 14px; font-weight: 600;
}
.results { margin-top: 14px; display: grid; gap: 10px; }
.item {
  display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center;
  padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.thumb { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: #f0f1f7; }
.item .name { font-weight: 600; font-size: 14px; word-break: break-all; }
.item .meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.saved { color: var(--good); font-weight: 700; }
.item .right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

.btn {
  appearance: none; border: 0; cursor: pointer; font-weight: 600; font-size: 14px;
  padding: 9px 16px; border-radius: 9px; background: var(--brand); color: #fff;
  text-decoration: none; display: inline-block; transition: background .15s;
}
.btn:hover { background: var(--brand-dark); }
.btn.ghost { background: #eef0ff; color: var(--brand-dark); }
.btn.sm { padding: 7px 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.actions { display: none; gap: 10px; margin-top: 16px; }

.spin { display:inline-block; width:13px; height:13px; border:2px solid rgba(255,255,255,.5); border-top-color:#fff; border-radius:50%; animation:spin .7s linear infinite; vertical-align:-2px; margin-right:6px;}
@keyframes spin { to { transform: rotate(360deg); } }

/* Content sections */
section.content { margin-top: 38px; }
section.content h2 { font-size: 23px; letter-spacing: -.4px; margin: 30px 0 12px; }
section.content h3 { font-size: 16px; margin: 20px 0 4px; }
section.content p { color: #374151; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 10px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.step .n { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.faq { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px 18px; margin-top: 10px; }
.faq details { padding: 14px 0; border-bottom: 1px solid var(--line); }
.faq details:last-child { border-bottom: 0; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq p { margin: 8px 0 0; color: var(--muted); }

/* Tools hub grid */
.tools-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 10px; }
.tool-card { display: block; text-decoration: none; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; transition: border-color .15s, box-shadow .15s; }
.tool-card:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.tool-card .ico { font-size: 24px; }
.tool-card h3 { margin: 8px 0 2px; font-size: 16px; }
.tool-card p { margin: 0; color: var(--muted); font-size: 13.5px; }
.tool-card.soon { opacity: .6; }

/* Article (legal / about / content pages) */
.article { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px 34px; margin-top: 24px; }
.article h1 { font-size: 28px; margin: 0 0 6px; letter-spacing: -.5px; }
.article .updated { color: var(--muted); font-size: 13px; margin: 0 0 18px; }
.article h2 { font-size: 18px; margin: 24px 0 8px; }
.article p, .article li { color: #374151; }
.article ul { padding-left: 20px; }

/* Contact form */
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }

footer.site { margin-top: 48px; padding: 28px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; text-align: center; }
footer.site a { color: var(--muted); margin: 0 8px; }

@media (max-width: 640px) {
  .hero h1 { font-size: 27px; }
  .controls { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: 1fr; }
  .topnav a { padding: 8px 9px; }
}
