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

html {
  scroll-behavior: smooth;
  font-size: 100%;
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: #0f172a;
  color: #e2e8f0;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* === Container === */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* === Header === */
.site-header {
  background-color: #1e293b;
  border-bottom: 3px solid #f59e0b;
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: #f8fafc;
}

.logo-text {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f8fafc;
}

.logo-text .accent {
  color: #f59e0b;
}

.site-nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.site-nav a:hover,
.site-nav a:focus {
  color: #f59e0b;
}

/* === Hero === */
.hero {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 60%, #1a1a2e 100%);
  padding: 3.5rem 0 2.5rem;
  text-align: center;
  border-bottom: 1px solid #334155;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 900;
  color: #f8fafc;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: #f59e0b;
  max-width: 600px;
  margin: 0 auto 0.75rem;
  font-weight: 500;
}

.hero-meta {
  font-size: 0.95rem;
  color: #94a3b8;
  max-width: 520px;
  margin: 0 auto;
}

/* === Calculator Section === */
.calculator-section {
  padding: 2.5rem 0;
}

.calc-card {
  background-color: #1e293b;
  border: 1px solid #334155;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.calc-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #f59e0b;
  margin-bottom: 1.5rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-group input[type="number"] {
  background-color: #0f172a;
  border: 1px solid #475569;
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
  color: #f8fafc;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input[type="number"]:focus {
  outline: none;
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.form-hint {
  font-size: 0.78rem;
  color: #64748b;
}

.flakes-fieldset {
  border: 1px dashed #475569;
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.flakes-fieldset legend {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f59e0b;
  padding: 0 0.5rem;
}

.checkbox-group {
  justify-content: flex-end;
  flex-direction: row;
  align-items: center;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.95rem;
  color: #e2e8f0;
}

.checkbox-label input[type="checkbox"] {
  width: 1.2rem;
  height: 1.2rem;
  accent-color: #f59e0b;
}

.btn-calculate {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #0f172a;
  border: none;
  border-radius: 10px;
  padding: 0.9rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-calculate:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.35);
}

.btn-calculate:active {
  transform: translateY(0);
}

/* === Results === */
.results-panel {
  margin-top: 2rem;
  padding: 1.5rem;
  background-color: #0f172a;
  border-radius: 12px;
  border: 1px solid #334155;
}

.results-panel h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #f59e0b;
  margin-bottom: 1rem;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.result-item {
  text-align: center;
  padding: 1rem 0.5rem;
  background-color: #1e293b;
  border-radius: 10px;
  border: 1px solid #334155;
}

.result-item.highlight {
  border-color: #f59e0b;
  background: linear-gradient(180deg, #1e293b 0%, #2d1a0a 100%);
}

.result-label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-bottom: 0.35rem;
}

.result-value {
  display: block;
  font-size: 2rem;
  font-weight: 900;
  color: #f8fafc;
  line-height: 1.1;
}

.result-unit {
  display: block;
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.2rem;
}

.result-note {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #94a3b8;
  font-style: italic;
}

/* === Guide Section === */
.guide-section {
  padding: 3rem 0;
  background-color: #1a1a2e;
  border-top: 1px solid #334155;
  border-bottom: 1px solid #334155;
}

.guide-section h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 2rem;
  text-align: center;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.guide-step {
  background-color: #1e293b;
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid #334155;
  position: relative;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background-color: #f59e0b;
  color: #0f172a;
  font-weight: 900;
  border-radius: 50%;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.guide-step h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 0.5rem;
}

.guide-step p {
  font-size: 0.92rem;
  color: #cbd5e1;
  line-height: 1.55;
}

/* === FAQ Section === */
.faq-section {
  padding: 3rem 0;
}

.faq-section h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 2rem;
  text-align: center;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background-color: #1e293b;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  border: 1px solid #334155;
}

.faq-item dt {
  font-weight: 700;
  color: #f59e0b;
  margin-bottom: 0.4rem;
  font-size: 1rem;
}

.faq-item dd {
  color: #cbd5e1;
  font-size: 0.92rem;
  margin-left: 0;
}

/* === Tips Section === */
.tips-section {
  padding: 3rem 0;
  background-color: #1a1a2e;
  border-top: 1px solid #334155;
}

.tips-section h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 1.5rem;
  text-align: center;
}

.tips-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  max-width: 1000px;
  margin: 0 auto;
}

.tips-list li {
  background-color: #1e293b;
  border-left: 4px solid #f59e0b;
  padding: 1rem 1.25rem;
  border-radius: 6px;
  font-size: 0.92rem;
  color: #cbd5e1;
  line-height: 1.5;
}

/* === Footer === */
.site-footer {
  background-color: #0f172a;
  border-top: 2px solid #334155;
  padding: 2.5rem 0 1.5rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.footer-brand p {
  font-size: 0.9rem;
  color: #94a3b8;
  margin-top: 0.5rem;
}

.footer-links h4 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #f59e0b;
  margin-bottom: 0.75rem;
}

.footer-links a {
  display: block;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.88rem;
  margin-bottom: 0.4rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #f8fafc;
}

.footer-disclaimer p {
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.5;
}

.footer-copy {
  text-align: center;
  font-size: 0.8rem;
  color: #475569;
  padding-top: 1rem;
  border-top: 1px solid #1e293b;
}

/* === Responsive === */
@media (max-width: 768px) {
  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    gap: 0.75rem;
  }

  .hero {
    padding: 2.5rem 0 1.5rem;
  }

  .calc-card {
    padding: 1.25rem;
  }

  .results-grid {
    grid-template-columns: 1fr 1fr;
  }

  .guide-grid {
    grid-template-columns: 1fr;
  }

  .tips-list {
    grid-template-columns: 1fr;
  }
}

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

  .results-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.site-utility-links {
  width: min(900px, calc(100% - 32px));
  margin: 32px auto;
  padding-top: 16px;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(127, 127, 127, 0.25);
  font-size: 0.9rem;
}

.site-utility-links a {
  color: inherit;
  opacity: 0.75;
}
