/* =====================
   RESET & BASE
   ===================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #111;
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* =====================
   UTILITY
   ===================== */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

.content-narrow {
  max-width: 640px;
  margin: 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* =====================
   HERO
   ===================== */
.hero {
  background: #000;
  color: #fff;
  padding: 48px 0 36px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.hero .subtitle {
  margin-top: 10px;
  font-size: 1.05rem;
  color: #ccc;
}

/* =====================
   CALCULATOR SECTION
   ===================== */
.calculator-section {
  padding: 40px 0 32px;
}

.card {
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  padding: 28px 28px 32px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}

/* INPUTS */
.inputs {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.input-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 8px;
}

.input-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: #e5e7eb;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #000;
  cursor: pointer;
  transition: background 0.15s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  background: #333;
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 50%;
  background: #000;
  cursor: pointer;
}

input[type="number"] {
  width: 100px;
  padding: 8px 10px;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  color: #111;
  text-align: right;
  outline: none;
  transition: border-color 0.15s;
}

input[type="number"]:focus {
  border-color: #000;
}

/* Remove number input spinners */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] { -moz-appearance: textfield; }

/* OUTPUT */
.output {
  margin-top: 32px;
  background: #f8f9fa;
  border-radius: 10px;
  padding: 24px;
  text-align: center;
}

.output-primary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 20px;
}

.output-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #777;
}

.output-value {
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  font-weight: 800;
  color: #000;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.output-secondary {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 16px;
}

.output-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.output-item-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #999;
}

.output-item-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: #222;
}

.microcopy {
  font-size: 0.78rem;
  color: #aaa;
  margin-top: 4px;
}

.disclaimer-note {
  font-size: 0.75rem;
  color: #bbb;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
  line-height: 1.5;
}

/* Sources section */
.sources {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1.5px solid #e5e7eb;
}

.sources h2 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #999;
  margin-bottom: 12px;
}

.sources ul {
  padding-left: 0;
  list-style: none;
}

.sources ul li {
  margin-bottom: 6px;
  font-size: 0.85rem;
}

.sources ul li a {
  color: #777;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sources ul li a:hover {
  color: #333;
}

/* TRUST LINE */
.trust-line {
  text-align: center;
  font-size: 0.82rem;
  color: #bbb;
  margin-top: 14px;
  letter-spacing: 0.02em;
}

/* =====================
   CONTENT SECTIONS
   ===================== */
.content-section {
  padding: 56px 0;
}

.alt-bg {
  background: #f9fafb;
}

.content-section h2 {
  font-size: 1.55rem;
  font-weight: 800;
  color: #000;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.content-section h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111;
  margin: 28px 0 8px;
}

.content-section p {
  color: #444;
  margin-bottom: 14px;
  font-size: 0.97rem;
}

.content-section ul {
  padding-left: 20px;
  color: #444;
  font-size: 0.97rem;
}

.content-section ul li {
  margin-bottom: 8px;
}

.content-section a {
  color: #000;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.content-section a:hover {
  color: #555;
}

/* Code block */
pre {
  background: #f3f4f6;
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
  margin-top: 12px;
}

pre code {
  font-size: 0.88rem;
  color: #222;
  font-family: "SF Mono", "Fira Mono", "Consolas", monospace;
  line-height: 1.7;
}

/* =====================
   FAQ
   ===================== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.faq-item {
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 0;
  overflow: hidden;
  transition: border-color 0.15s;
}

.faq-item[open] {
  border-color: #bbb;
}

.faq-item summary {
  padding: 16px 18px;
  font-weight: 600;
  font-size: 0.97rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #111;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.2rem;
  font-weight: 400;
  color: #aaa;
  flex-shrink: 0;
  margin-left: 12px;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  padding: 0 18px 16px;
  color: #555;
  font-size: 0.93rem;
  margin: 0;
  border-top: 1px solid #f0f0f0;
  padding-top: 12px;
}

/* =====================
   FOOTER
   ===================== */
.site-footer {
  background: #000;
  color: #aaa;
  padding: 36px 0;
}

.footer-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-disclaimer {
  font-size: 0.8rem;
  color: #666;
  max-width: 500px;
  margin: 0 auto;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-nav a {
  color: #888;
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.15s;
}

.footer-nav a:hover {
  color: #fff;
}

.footer-copy {
  font-size: 0.8rem;
  color: #555;
}

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 480px) {
  .card {
    padding: 20px 16px 24px;
  }

  .input-row {
    gap: 10px;
  }

  input[type="number"] {
    width: 80px;
    font-size: 0.88rem;
  }

  .output-secondary {
    gap: 24px;
  }

  .output-item-value {
    font-size: 1.15rem;
  }

  .hero {
    padding: 36px 0 28px;
  }

  .content-section {
    padding: 40px 0;
  }
}
