:root {
  --bg: #f6f8fb;
  --card: #ffffff;
  --ink: #1d2430;
  --muted: #67707e;
  --line: #e6eaf0;
  --brand: #2f6df6;
  --brand-dark: #1f55cc;
  --accent: #16a34a;
  --tile: #eef3ff;
  --shadow: 0 1px 3px rgba(16,24,40,.06), 0 8px 24px rgba(16,24,40,.06);
  --radius: 14px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
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); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 880px; margin: 0 auto; padding: 0 18px; }

/* Header */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; padding-bottom: 14px;
}
.logo { font-size: 20px; font-weight: 800; letter-spacing: -.3px; color: var(--ink); }
.logo span { color: var(--brand); }
.nav a { color: var(--muted); font-weight: 600; margin-left: 18px; font-size: 14px; }
.nav a:hover { color: var(--ink); text-decoration: none; }

/* Hamburger toggle (hidden on desktop) */
.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 44px; height: 44px; padding: 10px; margin: -6px 0;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px; margin: 5px auto;
  background: var(--ink); border-radius: 2px; transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero / tool */
.hero { padding: 34px 0 10px; text-align: center; }
.hero h1 { font-size: 30px; line-height: 1.2; margin: 0 0 8px; letter-spacing: -.5px; }
.hero p.sub { color: var(--muted); margin: 0 auto 22px; max-width: 560px; }

.tool {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}
.tool .controls { display: flex; gap: 10px; flex-wrap: wrap; }
.tool input[type="text"] {
  flex: 1 1 260px;
  font-size: 20px;
  padding: 14px 16px;
  border: 2px solid var(--line);
  border-radius: 12px;
  outline: none;
  text-transform: lowercase;
}
.tool input[type="text"]:focus { border-color: var(--brand); }
.btn {
  font-size: 16px; font-weight: 700;
  padding: 14px 22px; border-radius: 12px;
  border: none; cursor: pointer;
  background: var(--brand); color: #fff;
  transition: background .15s ease;
}
.btn:hover { background: var(--brand-dark); }
.opts { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 14px; color: var(--muted); font-size: 14px; align-items: center; }
.opts label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.opts select, .opts input[type="number"] { padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }

/* Status + results */
.status { color: var(--muted); font-size: 14px; margin: 14px 2px; min-height: 20px; }
.results-group { margin-top: 18px; }
.results-group h3 {
  font-size: 15px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px;
  margin: 0 0 10px; border-bottom: 1px solid var(--line); padding-bottom: 6px;
}
.tiles { display: flex; flex-wrap: wrap; gap: 8px; }
.tile {
  background: var(--tile);
  border: 1px solid #dde6fb;
  border-radius: 10px;
  padding: 7px 11px;
  font-weight: 600;
  display: inline-flex; align-items: baseline; gap: 7px;
}
.tile .score {
  font-size: 12px; font-weight: 700; color: #fff;
  background: var(--brand); border-radius: 6px; padding: 1px 6px;
}
.tile a { color: inherit; }

/* Ad slots */
.ad-slot {
  margin: 22px 0; min-height: 90px;
  display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--line); border-radius: 12px;
  color: #aab2bf; font-size: 12px; background: #fbfcfe;
}
.ad-slot:empty::before { content: "Ad slot (configure in assets/config.js)"; }

/* Content / SEO blocks */
.content { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin: 22px 0; box-shadow: var(--shadow); }
.content h2 { font-size: 22px; margin: 0 0 10px; letter-spacing: -.3px; }
.content h3 { font-size: 17px; margin: 20px 0 8px; }
.content p { color: #38414f; }
.pill-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.pill-links a { background: var(--tile); border: 1px solid #dde6fb; border-radius: 999px; padding: 6px 13px; font-size: 14px; font-weight: 600; }

.faq dt { font-weight: 700; margin-top: 14px; }
.faq dd { margin: 4px 0 0; color: #38414f; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--card); margin-top: 30px; }
.site-footer .container { padding: 26px 18px; color: var(--muted); font-size: 14px; }
.site-footer .cols { display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; }
.site-footer h4 { color: var(--ink); font-size: 14px; margin: 0 0 8px; }
.site-footer a { display: block; color: var(--muted); margin: 4px 0; }
.site-footer .copyright { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }

/* Mobile / tablet nav */
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .site-header .container { flex-wrap: wrap; }
  .nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    margin-top: 10px;
    border-top: 1px solid var(--line);
  }
  .nav.open { display: flex; }
  .nav a {
    margin-left: 0;
    padding: 12px 4px;
    border-bottom: 1px solid var(--line);
    font-size: 16px;
  }
  .nav a:last-child { border-bottom: none; }
}

@media (max-width: 600px) {
  .hero h1 { font-size: 24px; }
}
