*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue: #2563eb;
  --blue-light: #eff6ff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --bg: #f8fafc;
  --white: #ffffff;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 15px;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* HEADER */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  padding: 0;
}
.header .container {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
}
.logo {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--text);
  font-size: 16px;
}
.logo-icon { font-size: 20px; }
.nav { display: flex; gap: 4px; }
.nav a {
  text-decoration: none; color: var(--muted);
  padding: 6px 10px; border-radius: 6px;
  font-size: 13px; font-weight: 500;
  transition: all 0.15s;
}
.nav a:hover { background: var(--blue-light); color: var(--blue); }

/* AD BANNER */
.ad-banner { background: var(--white); border-bottom: 1px solid var(--border); }
.ad-banner .container { padding: 8px 16px; }
.ad-placeholder {
  height: 60px; background: #f1f5f9;
  border: 1px dashed #cbd5e1;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 12px;
  border-radius: 6px;
}
.ad-placeholder-side {
  width: 300px; height: 250px;
  background: #f1f5f9; border: 1px dashed #cbd5e1;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 12px;
  border-radius: 6px;
}

/* MAIN */
.main { padding: 28px 0 48px; }

/* HOME */
.hero { text-align: center; margin-bottom: 36px; }
.hero h1 { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.hero p { color: var(--muted); font-size: 16px; }

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px; margin-bottom: 48px;
}
.tool-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 14px; padding: 24px;
  text-decoration: none; color: var(--text);
  transition: all 0.2s; display: block;
  box-shadow: var(--shadow);
}
.tool-card:hover { border-color: var(--blue); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(37,99,235,0.12); }
.tool-icon { font-size: 36px; margin-bottom: 12px; }
.tool-card h2 { font-size: 17px; margin-bottom: 6px; }
.tool-card p { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.tool-cta { color: var(--blue); font-size: 13px; font-weight: 600; }

.features-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px; margin-top: 20px;
}
.feature { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.feature span { font-size: 28px; display: block; margin-bottom: 10px; }
.feature h3 { font-size: 15px; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 13px; }
.info-section h2 { font-size: 22px; margin-bottom: 16px; }

/* TOOL PAGE */
.tool-header {
  display: flex; align-items: flex-start;
  gap: 16px; margin-bottom: 24px;
}
.tool-icon-lg { font-size: 48px; flex-shrink: 0; }
.tool-header h1 { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.tool-header p { color: var(--muted); }

.tool-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px; align-items: flex-start;
  margin-bottom: 40px;
}

/* CALCULATOR BOX */
.calculator-box {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 14px; padding: 24px;
  box-shadow: var(--shadow);
}

.field-group { margin-bottom: 18px; }
.field-group label {
  display: block; font-weight: 500;
  font-size: 13px; margin-bottom: 6px; color: var(--muted);
}
.field-group label small { font-weight: 400; }
input[type="text"], input[type="number"], input[type="date"], select {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 15px; font-family: inherit; color: var(--text);
  background: var(--white); outline: none;
  transition: border 0.15s;
}
input:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }

/* TOGGLES */
.toggle-group { display: flex; gap: 6px; flex-wrap: wrap; }
.toggle-btn {
  padding: 8px 14px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--white);
  font-size: 13px; cursor: pointer; font-family: inherit;
  color: var(--muted); transition: all 0.15s;
}
.toggle-btn:hover { border-color: var(--blue); color: var(--blue); }
.toggle-btn.active { background: var(--blue); border-color: var(--blue); color: white; }

/* RATE CHIPS */
.rate-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip {
  padding: 6px 14px; border: 1px solid var(--border);
  border-radius: 20px; background: var(--white);
  font-size: 13px; cursor: pointer; font-family: inherit;
  color: var(--muted); transition: all 0.15s; font-weight: 500;
}
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip.active { background: var(--blue); border-color: var(--blue); color: white; }
.rate-chips input[type="number"] { width: 90px; padding: 6px 10px; font-size: 13px; }

/* RESULT BOX */
.result-box {
  background: var(--blue-light); border: 1px solid #bfdbfe;
  border-radius: 12px; padding: 16px; margin-top: 20px;
}
.result-row {
  display: flex; justify-content: space-between;
  align-items: center; padding: 8px 0;
  border-bottom: 1px solid rgba(37,99,235,0.08);
  font-size: 14px;
}
.result-row:last-child { border-bottom: none; }
.result-row strong { font-size: 15px; }
.total-row { padding-top: 12px; }
.total-row span { font-weight: 600; font-size: 15px; }
.total-row strong { font-size: 18px; color: var(--blue); }
.result-divider { height: 1px; background: #bfdbfe; margin: 6px 0; }
.hidden { display: none !important; }

.copy-btn {
  margin-top: 14px; width: 100%;
  padding: 10px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--white);
  font-size: 14px; cursor: pointer; font-family: inherit;
  color: var(--text); transition: all 0.15s;
}
.copy-btn:hover { border-color: var(--blue); color: var(--blue); }

.note {
  margin-top: 12px; font-size: 12px;
  color: var(--muted); line-height: 1.5;
}
.info-box {
  margin-top: 10px; padding: 10px 14px;
  background: #fffbeb; border: 1px solid #fde68a;
  border-radius: 8px; font-size: 13px; color: #92400e;
}
.info-box:empty { display: none; }

/* SEO CONTENT */
.seo-content {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 14px; padding: 24px;
  box-shadow: var(--shadow);
}
.seo-content h2 { font-size: 18px; margin-bottom: 10px; }
.seo-content h3 { font-size: 15px; margin: 14px 0 6px; }
.seo-content p { color: var(--muted); font-size: 14px; margin-bottom: 8px; }

/* FOOTER */
.footer {
  background: var(--white); border-top: 1px solid var(--border);
  padding: 40px 0 20px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 2fr;
  gap: 32px; margin-bottom: 32px;
}
.footer h4 { font-size: 13px; font-weight: 600; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 6px; }
.footer a { text-decoration: none; color: var(--muted); font-size: 13px; }
.footer a:hover { color: var(--blue); }
.footer p { color: var(--muted); font-size: 13px; line-height: 1.6; }
.disclaimer-text { font-size: 11px; margin-top: 10px; line-height: 1.5; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 16px; text-align: center; }
.footer-bottom p { color: var(--muted); font-size: 12px; }

/* RESPONSIVE */
@media (max-width: 768px) {
  .tool-layout { grid-template-columns: 1fr; }
  .side-ad { display: none; }
  .nav { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .hero h1 { font-size: 22px; }
  .tools-grid { grid-template-columns: 1fr; }
}

/* LEGAL PAGES */
.legal-page { background: var(--white); border: 1px solid var(--border); border-radius: 14px; padding: 32px; max-width: 800px; box-shadow: var(--shadow); }
.legal-page h1 { font-size: 26px; margin-bottom: 4px; }
.legal-page h2 { font-size: 17px; margin: 24px 0 8px; color: var(--text); }
.legal-page p { color: var(--muted); font-size: 14px; line-height: 1.8; margin-bottom: 12px; }
.legal-page a { color: var(--blue); }
.legal-page ul { margin: 8px 0 12px 20px; }
.legal-page ul li { color: var(--muted); font-size: 14px; line-height: 1.8; }
.last-updated { color: var(--muted); font-size: 12px; margin-bottom: 24px; }

/* MOBILE MENU */
.menu-btn { display:none; background:none; border:1px solid var(--border); border-radius:6px; padding:6px 10px; cursor:pointer; font-size:16px; }
@media (max-width: 768px) {
  .menu-btn { display:block; }
  .nav { display:none; position:absolute; top:56px; left:0; right:0; background:white; border-bottom:1px solid var(--border); padding:8px 16px; flex-direction:column; z-index:99; box-shadow:0 4px 12px rgba(0,0,0,0.08); }
  .nav.open { display:flex; }
  .nav a { padding:10px 0; border-bottom:1px solid var(--border); }
  .header { position:relative; }
}
