/* Global */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background: #020617;
  color: #e5e7eb;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Header / Nav */

header {
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  padding-top: 15PX;
  padding-bottom: 15px;
  
  top: 0;
  z-index: 10;
}

.nav-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

nav ul {
  display: flex;
  gap: 1rem;
  list-style: none;
  font-size: 0.9rem;
}

nav a {
  opacity: 0.8;
}

nav a:hover {
  opacity: 1;
}

main {
  flex: 1;
}

/* Hero & calculator (index) */

.hero {
  max-width: 960px;
  margin: 2rem auto 2.5rem;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
}

.hero-text {
  max-width: 520px;
}

.hero-text h1 {
  font-size: clamp(1.9rem, 3vw, 2.3rem);
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.hero-text p {
  font-size: 0.92rem;
  line-height: 1.6;
  color: #cbd5f5;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.15);
  color: #5eead4;
  margin-bottom: 0.5rem;
}

.badge span:first-child {
  font-size: 0.9rem;
}

.card {
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.25), transparent 55%),
    radial-gradient(circle at bottom right, rgba(94, 234, 212, 0.2), transparent 55%),
    #020617;
  border-radius: 1.25rem;
  padding: 1.5rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.3);
  width: 100%;
  max-width: 520px;
  text-align: left;
}

.card h2 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.hint {
  font-size: 0.8rem;
  color: #9ca3af;
  margin-bottom: 0.9rem;
}

.section-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
  margin-bottom: 0.3rem;
}

.toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.toggle-group {
  display: inline-flex;
  padding: 0.18rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.7);
}

.toggle-btn {
  border: none;
  background: transparent;
  color: #9ca3af;
  font-size: 0.8rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
  white-space: nowrap;
}

.toggle-btn.active {
  background: linear-gradient(to right, #38bdf8, #22c55e);
  color: #020617;
  font-weight: 600;
}

form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.75rem;
}

@media (max-width: 640px) {
  form {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
}

label {
  color: #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.3rem;
}

.unit-tag {
  font-size: 0.75rem;
  color: #9ca3af;
}

input {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.5);
  border-radius: 0.6rem;
  padding: 0.55rem 0.7rem;
  color: #e5e7eb;
  font-size: 0.9rem;
  outline: none;
  width: 100%;
}

input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.4);
}

.inline-group {
  display: flex;
  gap: 0.5rem;
}

.inline-group .form-subfield {
  flex: 1;
}

.sub-label {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-bottom: 0.15rem;
}

.full-row {
  grid-column: 1 / -1;
}

.btn-primary {
  margin-top: 0.5rem;
  width: 100%;
  border: none;
  border-radius: 0.9rem;
  padding: 0.7rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  background: linear-gradient(to right, #38bdf8, #22c55e);
  color: #020617;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.1s ease;
  box-shadow: 0 10px 30px rgba(34, 197, 94, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 18px rgba(34, 197, 94, 0.35);
}

.disclaimer {
  margin-top: 0.7rem;
  font-size: 0.75rem;
  color: #9ca3af;
}

/* How section */

.how-section {
  border-top: 1px solid rgba(30, 64, 175, 0.5);
  background: radial-gradient(circle at top, rgba(37, 99, 235, 0.12), transparent 55%);
  margin-top: 1.5rem;
}

.how-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.8rem 1.5rem 2.2rem;
}

.how-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.how-intro {
  font-size: 0.85rem;
  color: #cbd5f5;
  max-width: 620px;
  margin-bottom: 1.1rem;
}

.how-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
  font-size: 0.8rem;
  color: #e5e7eb;
}

@media (max-width: 720px) {
  .how-columns {
    grid-template-columns: 1fr;
  }
}

.how-block-title {
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.how-block ul {
  margin-left: 1rem;
  margin-top: 0.25rem;
  list-style: disc;
}

.how-block li {
  margin-bottom: 0.25rem;
}

.how-note {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 0.3rem;
}

/* FAQ */

.faq-section {
  border-top: 1px solid rgba(30, 64, 175, 0.4);
  background: #020617;
}

.faq-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 2rem;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.75rem;
}

@media (max-width: 900px) {
  .faq-grid {
    grid-template-columns: 1fr;
  }
}

.faq-item h3 {
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.faq-item p {
  font-size: 0.8rem;
  color: #cbd5f5;
  line-height: 1.6;
}

/* Results page */

.results-main {
  flex: 1;
}

.results-container {
  max-width: 960px;
  margin: 2rem auto;
  padding: 0 1.5rem 2rem;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 2rem;
}

@media (max-width: 768px) {
  .results-container {
    grid-template-columns: minmax(0, 1fr);
  }
}

.results-card h1 {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
}

.subtext {
  font-size: 0.9rem;
  color: #cbd5f5;
  margin-bottom: 1rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (max-width: 640px) {
  .stats {
    grid-template-columns: 1fr;
  }
}

.stat {
  padding: 0.75rem;
  border-radius: 0.9rem;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.stat-label {
  font-size: 0.75rem;
  color: #9ca3af;
}

.stat-value {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 0.25rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.75rem;
  margin-top: 0.4rem;
}

.pill-good {
  background: rgba(22, 163, 74, 0.25);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.55);
}

.pill-warning {
  background: rgba(202, 138, 4, 0.18);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.5);
}

.pill-bad {
  background: rgba(220, 38, 38, 0.25);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.6);
}

.info-text {
  font-size: 0.8rem;
  color: #9ca3af;
  line-height: 1.6;
  margin-top: 0.75rem;
}

.actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.btn {
  border-radius: 0.9rem;
  padding: 0.55rem 0.9rem;
  font-size: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.9);
  cursor: pointer;
  color: #e5e7eb;
}

.btn-primary {
  border: none;
  background: linear-gradient(to right, #38bdf8, #22c55e);
  color: #020617;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(34, 197, 94, 0.35);
}

.btn:hover {
  filter: brightness(1.05);
}

.chart-card {
  background: #020617;
  border-radius: 1.25rem;
  padding: 1.5rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chart-title {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.chart-wrapper {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: 320px;
  margin: 0 auto;
}

.legend {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 0.5rem;
  line-height: 1.5;
}

/* Footer */

footer {
  border-top: 1px solid rgba(148, 163, 184, 0.3);
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #9ca3af;
}

/* Blog listing */

.blog-main {
  flex: 1;
  max-width: 960px;
  margin: 2rem auto 2.5rem;
  padding: 0 1.5rem 2rem;
}

.blog-hero {
  max-width: 640px;
  margin-bottom: 1.5rem;
}

.badge-soft {
  background: rgba(37, 99, 235, 0.18);
  color: #bfdbfe;
}

.blog-hero h1 {
  font-size: 1.6rem;
  margin: 0.4rem 0 0.5rem;
}

.blog-hero p {
  font-size: 0.9rem;
  color: #cbd5f5;
  line-height: 1.6;
}

.blog-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 1024px) {
  .blog-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .blog-list {
    grid-template-columns: 1fr;
  }
}

.post-card {
  background: rgba(15, 23, 42, 0.95);
  border-radius: 1rem;
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.8);
}

.post-link {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.post-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: #9ca3af;
}

.post-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.7rem;
  background: rgba(8, 47, 73, 0.9);
  color: #7dd3fc;
}

.post-date {
  font-size: 0.72rem;
  color: #9ca3af;
}

.post-title {
  font-size: 0.95rem;
  font-weight: 600;
}

.post-excerpt {
  font-size: 0.8rem;
  color: #cbd5f5;
  line-height: 1.6;
}

.post-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.75rem;
  color: #9ca3af;
}

.post-cta {
  font-size: 0.78rem;
}

/* Article detail */

.article-main {
  flex: 1;
}

.article-inner {
  max-width: 720px;
  margin: 2rem auto 2.5rem;
  padding: 0 1.5rem 2rem;
}

.article-breadcrumb {
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}

.article-breadcrumb a {
  color: #9ca3af;
}

.article-header h1 {
  font-size: 1.7rem;
  margin-bottom: 0.6rem;
}

.article-tag-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  color: #9ca3af;
  margin-bottom: 0.4rem;
}

.article-meta {
  font-size: 0.75rem;
  color: #9ca3af;
}

.article-lead {
  font-size: 0.9rem;
  color: #cbd5f5;
  line-height: 1.6;
  margin-bottom: 1.2rem;
}

.article-body {
  font-size: 0.86rem;
  line-height: 1.7;
  color: #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.article-body h2 {
  font-size: 1.1rem;
  margin-top: 0.5rem;
}

.article-body ul {
  margin-left: 1rem;
  list-style: disc;
}

.article-body li {
  margin-bottom: 0.25rem;
}

.article-footer {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.article-note {
  font-size: 0.78rem;
  color: #9ca3af;
  max-width: 420px;
}

/* CTA Banner */

.blog-cta-banner {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 2rem;
  border-radius: 1.5rem;
  margin-bottom: 2.5rem;
  text-align: center;
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.5);
}

.banner-inner h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.banner-inner p {
  font-size: 0.9rem;
  color: #cbd5f5;
  margin-bottom: 1rem;
}

.banner-btn {
  display: inline-block;
  padding: 0.6rem 1rem;
  background: #3b82f6;
  border-radius: 0.6rem;
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
}

.related-articles {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 1.2rem 1.5rem;
  border-radius: 1rem;
  margin-top: 2.5rem;
}

.related-articles h3 {
  margin-bottom: 0.8rem;
  font-size: 1.1rem;
}

.related-articles ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.related-articles li {
  margin-bottom: 0.5rem;
}

.related-articles a {
  color: #93c5fd;
  font-size: 0.95rem;
}

.blog-categories a {
  margin-right: 0.7rem;
  font-size: 0.85rem;
  color: #cbd5e1;
  background: rgba(255,255,255,0.05);
  padding: 0.3rem 0.6rem;
  border-radius: 0.5rem;
}



