:root {
  --bg: #f7f8fb; --card: #ffffff; --text: #1f2937; --muted: #6b7280;
  --brand: #2563eb; --brand-dark: #1d4ed8; --border: #e5e7eb; --accent: #16a34a;
  --radius: 12px; --shadow: 0 1px 3px rgba(0,0,0,.06);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Ubuntu, sans-serif; line-height: 1.6; color: var(--text); background: var(--bg); }
.container { max-width: 900px; margin: 0 auto; padding: 0 16px; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header { background: linear-gradient(135deg, #eef2ff 0%, #faf5ff 50%, #fff 100%); border-bottom: 1px solid var(--border); padding: 12px 0 24px; }
.top-nav { display: flex; align-items: center; justify-content: space-between; padding: 8px 0 16px; }
.logo { font-weight: 800; font-size: 22px; color: var(--brand); text-decoration: none; }
.nav-links { list-style: none; display: flex; gap: 20px; }
.nav-links a { font-weight: 500; font-size: 14px; color: var(--muted); }
.nav-links a:hover { color: var(--brand); text-decoration: none; }
.site-header h1 { font-size: 30px; letter-spacing: -0.5px; }
.subtitle { color: var(--muted); font-size: 16px; margin-top: 6px; max-width: 640px; }

/* Calculator Card */
.calc-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin: 24px 0; box-shadow: var(--shadow); }
.calc-card h2 { font-size: 22px; margin-bottom: 16px; }
.form-row { display: grid; gap: 6px; margin-bottom: 14px; }
label { font-weight: 600; font-size: 14px; }
.required { color: #ef4444; }
input[type="date"] { padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 16px; background: #fff; transition: border-color .15s; }
input[type="date"]:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
button { padding: 12px 20px; border: 0; border-radius: 8px; background: var(--brand); color: #fff; font-weight: 700; font-size: 15px; cursor: pointer; transition: background .15s, transform .08s; }
button:hover { background: var(--brand-dark); }
button:active { transform: scale(.98); }
button.secondary { background: #e5e7eb; color: #111827; }
button.secondary:hover { background: #d1d5db; }

/* Results */
.result { margin-top: 16px; padding: 16px; background: #f0fdf4; border: 1px solid #86efac; border-radius: 8px; font-size: 15px; line-height: 1.8; }
.result strong { color: #166534; }
.hidden { display: none; }
.result .fun-facts { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #86efac; color: var(--muted); font-size: 14px; }

/* Info Section */
.info-section { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin: 24px 0; box-shadow: var(--shadow); }
.info-section h2 { font-size: 20px; margin-bottom: 12px; }
.info-section p { margin-bottom: 10px; }
.info-section ul { margin: 10px 0 10px 20px; }
.info-section li { margin-bottom: 6px; }

/* FAQ */
.faq { margin: 24px 0; }
.faq h2 { font-size: 20px; margin-bottom: 14px; }
.faq details { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; margin-top: 8px; box-shadow: var(--shadow); }
.faq summary { font-weight: 600; cursor: pointer; font-size: 15px; }
.faq summary:hover { color: var(--brand); }
.faq details[open] summary { margin-bottom: 8px; }
.faq p { color: #374151; font-size: 14px; }

/* More Tools Grid */
.more-tools { margin: 32px 0; }
.more-tools h2 { font-size: 20px; margin-bottom: 16px; }
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.tool-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center; text-decoration: none; color: var(--text); box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.tool-card:hover { transform: translateY(-3px); box-shadow: 0 4px 12px rgba(0,0,0,.08); text-decoration: none; }
.tool-icon { font-size: 32px; display: block; margin-bottom: 8px; }
.tool-card h3 { font-size: 16px; margin-bottom: 4px; }
.tool-card p { font-size: 13px; color: var(--muted); }

/* Ad Slots */
.ad-slot { margin: 20px 0; text-align: center; }
.ad-placeholder { min-height: 90px; border: 2px dashed #cbd5e1; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #94a3b8; background: #f8fafc; font-size: 13px; letter-spacing: .5px; }

/* Footer */
.site-footer { margin: 40px 0 20px; padding: 20px 0; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; text-align: center; }

/* Responsive */
@media (max-width: 640px) {
  .site-header h1 { font-size: 22px; }
  .subtitle { font-size: 14px; }
  .tools-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tool-card { padding: 14px; }
  .tool-icon { font-size: 24px; }
}
