/* ── Reset & Base ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f7fa;
  color: #1a1a2e;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
.header {
  background: #0f172a;
  color: white;
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid #1e293b;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo { font-size: 22px; font-weight: 800; color: white; text-decoration: none; }
.logo span { color: #22c55e; }
.nav a {
  color: #94a3b8;
  text-decoration: none;
  margin-left: 24px;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav a:hover { color: white; }
.nav a.active { color: #22c55e; }

/* ── Main ── */
main { flex: 1; }

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 80px 24px 60px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: white;
}
.hero h1 { font-size: 42px; font-weight: 800; margin-bottom: 16px; letter-spacing: -0.02em; }
.hero h1 span { color: #22c55e; }
.hero p { font-size: 18px; color: #94a3b8; max-width: 600px; margin: 0 auto 32px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-primary { background: #22c55e; color: #0f172a; }
.btn-primary:hover { background: #16a34a; transform: translateY(-1px); }
.btn-secondary { background: transparent; color: white; border: 2px solid #334155; }
.btn-secondary:hover { border-color: #22c55e; }

/* ── Container ── */
.container { max-width: 1100px; margin: 0 auto; padding: 48px 24px; }

/* ── Section ── */
.section { margin-bottom: 48px; }
.section-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.section-subtitle { color: #64748b; margin-bottom: 32px; font-size: 16px; }

/* ── Card Grid ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 28px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
}
.card:hover { border-color: #22c55e; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(34,197,94,0.08); }
.card-icon { font-size: 36px; margin-bottom: 12px; }
.card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.card p { font-size: 14px; color: #64748b; flex: 1; line-height: 1.5; }
.card-tag {
  display: inline-block;
  background: #f0fdf4;
  color: #16a34a;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
  align-self: flex-start;
}

/* ── Tool Cards ── */
.tool-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 28px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  text-align: center;
}
.tool-card:hover { border-color: #22c55e; transform: translateY(-2px); }
.tool-card .tool-icon { font-size: 48px; margin-bottom: 12px; }
.tool-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.tool-card p { font-size: 14px; color: #64748b; flex: 1; margin-bottom: 16px; }
.tool-btn {
  display: inline-block;
  background: #0f172a;
  color: white;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}
.tool-btn:hover { background: #1e293b; }

/* ── About Page ── */
.page-content { max-width: 720px; margin: 0 auto; }
.page-content h1 { font-size: 32px; font-weight: 800; margin-bottom: 8px; }
.page-content .subtitle { color: #64748b; margin-bottom: 40px; font-size: 16px; }
.page-content h2 { font-size: 22px; font-weight: 700; margin: 32px 0 16px; }
.page-content p { margin-bottom: 16px; color: #334155; line-height: 1.8; }
.page-content a { color: #22c55e; }
.page-content ul { padding-left: 20px; margin-bottom: 16px; }
.page-content li { margin-bottom: 8px; color: #334155; }

/* ── Tool Page ── */
.tool-page { background: white; }
.tool-page .container { max-width: 720px; }
.tool-page h1 { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.tool-page .subtitle { color: #64748b; margin-bottom: 32px; }
.calc-form { margin-bottom: 32px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; color: #334155; }
.form-group input, .form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34,197,94,0.1);
}
.calc-btn {
  background: #22c55e;
  color: #0f172a;
  border: none;
  padding: 14px 32px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.calc-btn:hover { background: #16a34a; }
.result-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 24px;
  margin-top: 24px;
  display: none;
}
.result-box.visible { display: block; }
.result-box h3 { font-size: 18px; font-weight: 700; margin-bottom: 12px; color: #166534; }
.result-box .result-item { margin-bottom: 8px; font-size: 15px; }
.result-box .result-item .label { color: #64748b; }
.result-box .result-item .value { font-weight: 700; color: #0f172a; }
.result-box .result-item .highlight { font-size: 24px; color: #16a34a; }

/* ── Article Page ── */
.article-page { background: white; }
.article-page .container { max-width: 720px; padding: 32px 24px 64px; }
.breadcrumb a { color: #22c55e; text-decoration: none; font-size: 14px; }
.article-header h1 { font-size: 32px; font-weight: 800; margin-bottom: 12px; line-height: 1.2; letter-spacing: -0.02em; }
.article-meta { font-size: 14px; color: #94a3b8; margin-bottom: 24px; }
.article-content { font-size: 17px; line-height: 1.85; color: #334155; }
.article-content h2 {
  font-size: 24px; font-weight: 700; margin: 40px 0 16px;
  padding-bottom: 8px; border-bottom: 1px solid #e2e8f0;
  color: #0f172a;
}
.article-content h3 { font-size: 20px; font-weight: 600; margin: 28px 0 12px; color: #0f172a; }
.article-content p { margin-bottom: 18px; }
.article-content a { color: #22c55e; }
.article-content ul, .article-content ol { margin-bottom: 18px; padding-left: 24px; }
.article-content li { margin-bottom: 6px; }
.article-content img { max-width: 100%; border-radius: 12px; margin: 28px 0; }
.article-content table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 14px; }
.article-content th, .article-content td {
  padding: 10px 14px; text-align: left; border: 1px solid #e2e8f0;
}
.article-content th { background: #f8fafc; font-weight: 600; }

/* ── Footer ── */
.footer {
  background: #0f172a;
  color: #64748b;
  padding: 32px 24px;
  text-align: center;
  font-size: 13px;
  margin-top: 48px;
}
.footer a { color: #22c55e; text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer-links { margin-top: 8px; }
.footer-links a { color: #22c55e; font-size: 13px; }
.sep { margin: 0 8px; color: #475569; }

/* ── Responsive ── */
@media (max-width: 640px) {
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 16px; }
  .header-inner { flex-direction: column; gap: 12px; }
  .nav a { margin: 0 12px; font-size: 13px; }
  .card-grid { grid-template-columns: 1fr; }
  .article-header h1 { font-size: 24px; }
}
