/* Base & Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 16px; color: #e0e0e0; background: #121212; line-height: 1.6; }
body { display: flex; flex-direction: column; min-height: 100vh; }
a { color: #f5c518; text-decoration: none; }
a:hover { text-decoration: underline; }
header { background: #1f1f1f; padding: 1rem 2rem; display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #f5c518; flex-wrap: wrap; }
.logo { font-size: 1.4rem; font-weight: bold; color: #f5c518; }
nav a { margin-left: 1.5rem; color: #ccc; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.5px; }
nav a:first-child { margin-left: 0; }
main { flex: 1; max-width: 960px; width: 100%; margin: 2rem auto; padding: 0 1rem; }
footer { background: #1f1f1f; text-align: center; padding: 1.5rem 1rem; border-top: 1px solid #333; font-size: 0.9rem; }
footer p { margin-bottom: 0.5rem; }
footer nav a { margin: 0 0.5rem; font-size: 0.9rem; }

/* Sections */
.hero { text-align: center; margin-bottom: 2rem; }
.hero h1 { font-size: 2.4rem; color: #f5c518; margin-bottom: 0.5rem; }
.hero p { font-size: 1.2rem; max-width: 600px; margin: 0 auto; }

.calculator-panel { background: #1e1e1e; border-radius: 8px; padding: 1.5rem; margin-bottom: 2rem; box-shadow: 0 2px 8px rgba(0,0,0,0.4); }
.calculator-panel h2 { color: #f5c518; margin-bottom: 1rem; }

.form-group { margin-bottom: 1.2rem; }
label, legend { display: block; font-weight: 600; margin-bottom: 0.3rem; }
input[type="number"], select { width: 100%; padding: 0.6rem 0.8rem; border: 1px solid #444; border-radius: 4px; background: #2a2a2a; color: #fff; font-size: 1rem; }
input[type="number"]:focus, select:focus { outline: none; border-color: #f5c518; }
fieldset { border: none; padding: 0; }
fieldset label { display: inline-block; margin-right: 1.5rem; font-weight: normal; }
input[type="radio"] { margin-right: 0.3rem; accent-color: #f5c518; }

.btn-primary { background: #f5c518; color: #121212; border: none; padding: 0.7rem 1.5rem; font-size: 1rem; font-weight: bold; border-radius: 4px; cursor: pointer; transition: background 0.2s; }
.btn-primary:hover { background: #e0b214; }

.empty-state { color: #888; font-style: italic; padding: 1rem 0; }
.results-container { background: #2a2a2a; border-radius: 4px; padding: 1rem; margin: 1.5rem 0; }
.results-container h3 { color: #f5c518; margin-bottom: 0.8rem; }
.result-list dt { font-weight: bold; margin-top: 0.5rem; }
.result-list dd { margin-left: 0; margin-bottom: 0.5rem; }
.results-actions { display: flex; gap: 0.5rem; margin-top: 1rem; }
.results-actions button { background: #444; border: none; color: #fff; padding: 0.4rem 0.8rem; border-radius: 4px; cursor: pointer; }
.results-actions button:hover { background: #555; }

.history { margin-top: 1.5rem; }
.history h4 { color: #f5c518; }
.history ul { list-style: none; margin: 0.5rem 0; }
.history ul li { padding: 0.3rem 0; border-bottom: 1px solid #333; }
.history ul li:last-child { border-bottom: none; }
#clear-history { background: #c0392b; color: #fff; border: none; padding: 0.3rem 0.8rem; border-radius: 4px; cursor: pointer; }

.supporting-content { background: #1e1e1e; border-radius: 8px; padding: 1.5rem; margin-bottom: 2rem; }
.supporting-content h2 { color: #f5c518; margin: 1.5rem 0 0.5rem; }
.supporting-content h2:first-child { margin-top: 0; }
.supporting-content p, .supporting-content ul, .supporting-content dl { margin-bottom: 1rem; }
.supporting-content ul, .supporting-content dl { margin-left: 1.5rem; }
.supporting-content dt { font-weight: bold; margin-top: 1rem; }

.ad-slot-placeholder { text-align: center; margin: 2rem 0; }

/* Responsive */
@media (max-width: 768px) {
  header { flex-direction: column; align-items: flex-start; }
  nav { margin-top: 0.5rem; }
  nav a { margin-left: 1rem; font-size: 0.9rem; }
  .hero h1 { font-size: 1.8rem; }
  .calculator-panel, .supporting-content { padding: 1rem; }
}
@media (max-width: 480px) {
  main { margin: 1rem auto; }
  .hero p { font-size: 1rem; }
  .results-actions { flex-direction: column; }
}


/* 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;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
