/* EasyCalcs — shared stylesheet */
:root {
  --primary: #0f766e;
  --primary-dark: #115e59;
  --accent: #f59e0b;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --radius: 12px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

/* Header */
header {
  background: var(--primary);
  color: #fff;
  padding: 0.9rem 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}
.logo span { color: #fcd34d; }
nav { display: flex; flex-wrap: wrap; gap: 0.25rem; }
nav a {
  color: #e6fffa;
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
}
nav a:hover, nav a.active { background: rgba(255,255,255,0.15); color: #fff; }

/* Layout */
main { max-width: 1000px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
h1 { font-size: 1.9rem; margin: 1rem 0 0.5rem; color: var(--primary-dark); }
h2 { font-size: 1.4rem; margin: 2rem 0 0.75rem; color: var(--primary-dark); }
h3 { font-size: 1.1rem; margin: 1.25rem 0 0.5rem; }
p { margin-bottom: 1rem; }
.subtitle { color: var(--muted); font-size: 1.05rem; margin-bottom: 1.5rem; }
ul, ol { margin: 0 0 1rem 1.5rem; }
li { margin-bottom: 0.4rem; }

/* Calculator card */
.calc-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.5rem 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.field { margin-bottom: 1rem; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}
.field input, .field select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: #fff;
  color: var(--text);
}
.field input:focus, .field select:focus {
  outline: 2px solid var(--primary);
  border-color: var(--primary);
}
.field .hint { font-size: 0.8rem; color: var(--muted); margin-top: 0.2rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }

button.calc-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 0.5rem;
}
button.calc-btn:hover { background: var(--primary-dark); }

.result {
  display: none;
  margin-top: 1.25rem;
  padding: 1.1rem 1.25rem;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  border-radius: 8px;
}
.result.show { display: block; }
.result .big {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary-dark);
}
.result table { width: 100%; border-collapse: collapse; margin-top: 0.5rem; }
.result td { padding: 0.35rem 0; border-bottom: 1px solid #ccfbf1; font-size: 0.95rem; }
.result td:last-child { text-align: right; font-weight: 600; }
.result .warn { color: #b45309; font-weight: 600; }

/* Home grid */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.tool-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow 0.15s, transform 0.15s;
  display: block;
}
.tool-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.1); transform: translateY(-2px); }
.tool-card .icon { font-size: 2rem; }
.tool-card h3 { color: var(--primary-dark); margin: 0.5rem 0 0.35rem; }
.tool-card p { color: var(--muted); font-size: 0.9rem; margin: 0; }

/* Ad slots */
.ad-slot {
  min-height: 90px;
  margin: 1.75rem auto;
  background: repeating-linear-gradient(45deg, #f1f5f9, #f1f5f9 12px, #f8fafc 12px, #f8fafc 24px);
  border: 1px dashed var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* FAQ */
.faq details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 0.6rem;
}
.faq summary { font-weight: 600; cursor: pointer; }
.faq details p { margin: 0.6rem 0 0; color: var(--muted); }

/* Footer */
footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 2rem 1rem;
  margin-top: 2rem;
}
.footer-inner { max-width: 1000px; margin: 0 auto; text-align: center; font-size: 0.9rem; }
.footer-inner a { color: #cbd5e1; text-decoration: none; margin: 0 0.6rem; }
.footer-inner a:hover { color: #fff; }
.footer-inner .copy { margin-top: 0.75rem; font-size: 0.8rem; }

.disclaimer {
  font-size: 0.85rem;
  color: var(--muted);
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin: 1.5rem 0;
}
