:root {
  --blue: #2563eb;
  --blue-d: #1d4ed8;
  --orange: #f7791c;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f8fafc;
}
* { 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(--blue); text-decoration: none; }

/* Header */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 9px; font-size: 22px; color: var(--ink); }
.brand b { font-weight: 700; }
.brand i { font-style: normal; color: var(--blue); font-weight: 700; }
.brand.sm { font-size: 17px; }
.site-header nav { display: flex; gap: 22px; font-size: 15px; }
.site-header nav a { color: var(--muted); }
.site-header nav a:hover { color: var(--blue); }

/* Hero */
.hero { text-align: center; padding: 56px 20px 30px; }
.hero h1 { font-size: 40px; margin: 0 0 12px; line-height: 1.15; }
.hero h1 span { color: var(--blue); }
.hero p { font-size: 18px; color: var(--muted); max-width: 620px; margin: 0 auto 22px; }
.hero-btn {
  display: inline-block; background: var(--blue); color: #fff; font-weight: 600;
  padding: 12px 26px; border-radius: 12px;
}
.hero-btn:hover { background: var(--blue-d); }

/* Tool grid */
.tools-wrap { max-width: 1100px; margin: 0 auto; padding: 20px 20px 60px; }
.group-title { font-size: 15px; font-weight: 600; color: var(--muted); margin: 28px 8px 12px; text-transform: uppercase; letter-spacing: .04em; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px;
  cursor: pointer; transition: border-color .15s, transform .1s, box-shadow .15s;
}
.card:hover { border-color: var(--blue); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(37,99,235,.08); }
.card .emoji { font-size: 30px; }
.card h3 { margin: 10px 0 3px; font-size: 16px; }
.card p { margin: 0; font-size: 13px; color: var(--muted); }

/* Tool view */
#tool-view { max-width: 640px; margin: 0 auto; padding: 28px 20px 70px; }
.back-btn { background: none; border: none; color: var(--blue); font-size: 15px; cursor: pointer; padding: 6px 0; }
.tool-panel { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 26px; margin-top: 10px; }
.tool-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.tool-emoji { font-size: 38px; }
.tool-head h2 { margin: 0; font-size: 22px; }
.tool-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }

.dropzone {
  display: block; border: 2px dashed #cbd5e1; border-radius: 14px; padding: 34px 16px;
  text-align: center; cursor: pointer; transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--blue); background: #eff6ff; }
.dz-icon { font-size: 34px; }
.dz-label { color: var(--blue); font-weight: 600; margin-top: 8px; }
.dz-hint { color: #94a3b8; font-size: 12px; margin-top: 4px; }

.params { margin: 20px 0 0; display: flex; flex-direction: column; gap: 16px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
.field input[type=text], .field input[type=number], .field select {
  width: 100%; padding: 11px 12px; border: 1px solid #cbd5e1; border-radius: 10px; font-size: 15px;
}
.field.check { display: flex; align-items: center; gap: 10px; }
.field.check label { margin: 0; color: var(--ink); font-size: 15px; }

.process-btn {
  width: 100%; margin-top: 24px; background: var(--blue); color: #fff; border: none;
  border-radius: 12px; padding: 14px; font-size: 16px; font-weight: 600; cursor: pointer;
}
.process-btn:hover:not(:disabled) { background: var(--blue-d); }
.process-btn:disabled { background: #cbd5e1; cursor: not-allowed; }

.result { margin-top: 20px; text-align: center; }
.result .working { color: var(--blue); font-weight: 600; }
.result .err { color: #dc2626; font-weight: 600; }
.dl-btn {
  display: block; margin-top: 8px; background: #16a34a; color: #fff; font-weight: 600;
  padding: 13px; border-radius: 12px; text-align: center;
}
.dl-btn:hover { background: #15803d; }

/* Anúncios */
.ad-slot { max-width: 970px; margin: 18px auto; padding: 0 20px; text-align: center; }
.ad-slot ins { margin: 0 auto; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: #fff; padding: 30px 20px; text-align: center; }
.site-footer .brand { justify-content: center; margin-bottom: 10px; }
.foot-links { display: flex; gap: 20px; justify-content: center; font-size: 14px; margin-bottom: 10px; }
.site-footer small { color: var(--muted); font-size: 12px; }

@media (max-width: 560px) {
  .hero h1 { font-size: 30px; }
  .hero p { font-size: 16px; }
  .site-header nav a:first-child { display: none; }
}
