/* QuickTools shared stylesheet — clean, fast, mobile-first */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --accent: #4f46e5;
  --accent-dark: #4338ca;
  --accent-soft: #eef2ff;
  --green: #16a34a;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 4px 12px rgba(15, 23, 42, .06);
  --max: 1080px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; height: 60px;
}
.brand { font-weight: 800; font-size: 1.25rem; color: var(--text); display: flex; align-items: center; gap: 8px; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px; background: var(--accent);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 800;
}
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--muted); font-size: .92rem; padding: 8px 12px; border-radius: 8px; }
.nav a:hover, .nav a.active { color: var(--accent); background: var(--accent-soft); text-decoration: none; }

/* layout */
.container { max-width: var(--max); margin: 0 auto; padding: 28px 20px 60px; }
.hero { text-align: center; padding: 36px 0 8px; }
.hero h1 { font-size: 2rem; margin: 0 0 10px; letter-spacing: -0.02em; }
.hero p { color: var(--muted); max-width: 640px; margin: 0 auto; font-size: 1.05rem; }
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 12px; }

/* tool grid (hub) */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin-top: 28px; }
.tool-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); transition: transform .12s ease, box-shadow .12s ease;
  display: block; color: var(--text);
}
.tool-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(15,23,42,.12); text-decoration: none; }
.tool-card .icon { font-size: 1.8rem; }
.tool-card h2, .tool-card h3 { margin: 10px 0 6px; font-size: 1.12rem; }
.tool-card p { margin: 0; color: var(--muted); font-size: .93rem; }

/* calculator card */
.calc-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px; margin: 22px 0;
}
.calc-card h2 { margin-top: 0; font-size: 1.25rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: .9rem; }
.field input, .field select {
  padding: 11px 13px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 1rem; background: #fff; color: var(--text); width: 100%;
}
.field input:focus, .field select:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.field .hint { font-size: .8rem; color: var(--muted); }
.btn {
  display: inline-block; background: var(--accent); color: #fff; border: none;
  padding: 13px 34px; font-size: 1.02rem; font-weight: 700; border-radius: 10px;
  cursor: pointer; margin-top: 18px;
}
.btn:hover { background: var(--accent-dark); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-secondary { background: var(--surface); color: var(--accent); border: 1.5px solid var(--accent); }

/* results */
.result-panel {
  background: var(--accent-soft); border: 1px solid #c7d2fe; border-radius: var(--radius);
  padding: 22px; margin-top: 20px; display: none;
}
.result-panel.show { display: block; }
.result-hero { font-size: 2rem; font-weight: 800; color: var(--accent-dark); margin: 4px 0 12px; }
.result-rows { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.result-item { background: #fff; border-radius: 8px; padding: 12px 14px; border: 1px solid var(--border); }
.result-item .k { font-size: .82rem; color: var(--muted); }
.result-item .v { font-size: 1.15rem; font-weight: 700; }
.bar { height: 10px; background: #e0e7ff; border-radius: 6px; overflow: hidden; margin-top: 8px; }
.bar > span { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: .88rem; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; }

/* content sections */
.prose { max-width: 760px; }
.prose h2 { margin-top: 34px; font-size: 1.35rem; }
.prose h3 { margin-top: 22px; font-size: 1.08rem; }
.faq { margin-top: 12px; }
.faq details {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 18px; margin-bottom: 10px;
}
.faq summary { font-weight: 700; cursor: pointer; }
.faq summary:hover { color: var(--accent); }
.disclaimer {
  font-size: .85rem; color: var(--muted); background: #fffbeb; border: 1px solid #fde68a;
  border-radius: 10px; padding: 12px 16px; margin-top: 24px;
}

/* ad slots (fill after AdSense approval) */
.ad-slot {
  border: 1.5px dashed var(--border); border-radius: 10px; color: #cbd5e1;
  text-align: center; padding: 26px 10px; margin: 26px 0; font-size: .85rem;
  background: #fcfdff;
}
.ad-slot.filled { border: none; padding: 0; background: none; color: inherit; }

/* affiliate box */
.aff-box {
  background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: var(--radius);
  padding: 20px 22px; margin: 26px 0;
}
.aff-box h3 { margin: 0 0 8px; font-size: 1.05rem; }
.aff-box p { margin: 0 0 12px; font-size: .93rem; color: #166534; }

/* footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 40px; }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 30px 20px; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 14px; }
.footer-links a { color: var(--muted); font-size: .9rem; }
.copy { color: var(--muted); font-size: .82rem; }

@media (max-width: 640px) {
  .hero h1 { font-size: 1.5rem; }
  .nav a { padding: 8px 8px; font-size: .85rem; }
  .calc-card { padding: 18px; }
  .result-hero { font-size: 1.6rem; }
}
