:root {
  --navy: #0f172a;
  --navy-soft: #1e293b;
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --accent: #f59e0b;
  --ink: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --surface: #ffffff;
  --bg-page: #f1f5f9;
}

body {
  color: var(--ink);
  background-color: var(--bg-page);
  background-image:
    radial-gradient(at 0% 0%, rgba(13, 148, 136, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(37, 99, 235, 0.07) 0px, transparent 50%);
  background-attachment: fixed;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.fw-extrabold { font-weight: 800; }
.text-accent { color: #2dd4bf; }
.bg-teal-soft { background-color: #ccfbf1; }
.text-teal { color: #0f766e; }
.bg-soft-slate { background-color: #f8fafc; }
.bg-gradient-pro { background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%); }

/* Navbar */
.topbar {
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.75rem 0;
}
.navbar-brand {
  letter-spacing: 0.04em;
  font-size: 1.25rem;
}
.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #14b8a6, #0284c7);
  color: #fff;
  font-size: 1rem;
}
.brand-icon-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: linear-gradient(135deg, #14b8a6, #0284c7);
  color: #fff;
  font-size: 0.8rem;
}
.topbar .nav-link {
  color: #cbd5e1;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  transition: all 0.15s ease;
}
.topbar .nav-link:hover,
.topbar .nav-link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}
.topbar .nav-premium {
  background: rgba(20, 184, 166, 0.18);
  color: #5eead4 !important;
  border: 1px solid rgba(94, 234, 212, 0.3);
}
.topbar .nav-premium:hover {
  background: #0d9488;
  color: #ffffff !important;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #115e59 55%, #0369a1 100%);
  color: #ffffff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.hero-glow {
  position: absolute;
  top: -80px;
  right: -80px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.25) 0%, transparent 70%);
  pointer-events: none;
}
.hero p {
  max-width: 720px;
  color: #e2e8f0;
}
.eyebrow {
  display: inline-block;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  color: #5eead4;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(94, 234, 212, 0.3);
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  font-weight: 700;
}
.searchbar { max-width: 760px; }
.btn-accent {
  background: #14b8a6;
  border-color: #14b8a6;
  color: #042f2e;
}
.btn-accent:hover {
  background: #2dd4bf;
  border-color: #2dd4bf;
  color: #042f2e;
}
.pill-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.95rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: all 0.15s ease;
}
.pill-btn:hover,
.pill-btn.active {
  background: #ffffff;
  color: #0f172a;
  border-color: #ffffff;
}

/* Category Chips */
.cat-chip {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  color: #475569;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  transition: all 0.15s ease;
}
.cat-chip:hover {
  border-color: #0d9488;
  color: #0f766e;
}
.cat-chip.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

/* Cards & Panels */
.tool-card,
.content-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.35rem;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}
.tool-card {
  position: relative;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.tool-card:hover {
  transform: translateY(-4px);
  border-color: #5eead4;
  box-shadow: 0 14px 28px rgba(13, 148, 136, 0.12);
}
.tool-type {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  background: #f0fdfa;
  color: #0f766e;
}
.tool-type.type-planner {
  background: #eff6ff;
  color: #1d4ed8;
}
.tool-type.type-utility {
  background: #fef3c7;
  color: #b45309;
}
.go {
  color: #0d9488;
  font-weight: 700;
  font-size: 0.88rem;
}
.tool-card:hover .go {
  color: #0f766e;
}

/* Calculator & Planner Boxes */
.calc-box {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  padding: 1.35rem;
  border-radius: 14px;
  margin-top: 1rem;
}
.calc-box .form-label {
  font-weight: 600;
  font-size: 0.88rem;
  color: #334155;
}
.calc-box .form-control,
.calc-box .form-select {
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  padding: 0.6rem 0.85rem;
}
.calc-box .form-control:focus,
.calc-box .form-select:focus {
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}
.btn-primary {
  background-color: #0d9488;
  border-color: #0d9488;
  font-weight: 600;
  border-radius: 10px;
}
.btn-primary:hover,
.btn-primary:focus {
  background-color: #0f766e;
  border-color: #0f766e;
}

.result-box {
  background: linear-gradient(135deg, #f0fdfa 0%, #e0f2fe 100%);
  border: 1.5px solid #99f6e4;
  border-radius: 12px;
  padding: 1.15rem 1.25rem;
  margin-top: 1.15rem;
}
.result-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f766e;
  line-height: 1.2;
}
.formula-box {
  background: #f8fafc;
  border-left: 4px solid #0d9488;
  padding: 0.85rem 1rem;
  border-radius: 0 8px 8px 0;
}

/* Related links */
.related-link {
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  text-decoration: none;
  border: 1px solid #f1f5f9;
  background: #f8fafc;
  transition: all 0.15s ease;
}
.related-link:hover {
  background: #f0fdfa;
  border-color: #99f6e4;
}

/* Footer & Ad Slot */
.footer {
  background: #ffffff;
  border-top: 1px solid var(--line);
}
.footer a {
  color: #475569;
  text-decoration: none;
  transition: color 0.15s ease;
}
.footer a:hover {
  color: #0d9488;
}
.ad-slot {
  border: 1.5px dashed #cbd5e1;
  background: #ffffff;
  color: #94a3b8;
  min-height: 130px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1rem;
  border-radius: 14px;
  font-size: 0.82rem;
}

@media print {
  .topbar, .footer, .ad-slot, aside, .btn { display: none !important; }
  body { background: #fff !important; }
  .content-panel { box-shadow: none !important; border: 1px solid #ccc !important; }
}
