/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: #2c2c2c;
  background: #f9f6f0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, legend {
  font-weight: 700;
  color: #1e2f3f;
  line-height: 1.2;
}
h1 { font-size: 2.4rem; letter-spacing: -0.02em; }
h2 { font-size: 1.6rem; margin-bottom: 1rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
p { margin-bottom: 0.75rem; }
a { color: #2B5C8F; text-decoration: none; transition: color 0.2s; }
a:hover { color: #1E4060; text-decoration: underline; }
small { font-size: 0.8rem; color: #6b6b6b; display: block; margin-top: 0.25rem; }

/* ===== LAYOUT ===== */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
main { flex: 1; }

/* ===== HEADER ===== */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid #e0dcd5;
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: #1e2f3f;
  text-decoration: none;
}
.logo:hover { text-decoration: none; color: #2B5C8F; }
.nav-links { display: flex; gap: 1.25rem; font-size: 0.9rem; }

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, #e8f0f8 0%, #fdf8f0 100%);
  padding: 2.5rem 0 2rem;
  text-align: center;
  border-bottom: 1px solid #e0dcd5;
}
.hero-sub {
  font-size: 1.1rem;
  color: #4a5568;
  max-width: 560px;
  margin: 0.5rem auto 0;
}

/* ===== CALCULATOR SECTION ===== */
.calculator-section {
  padding: 2rem 0;
}
.calculator-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 8px 30px rgba(0,0,0,0.06);
  border: 1px solid #ece6dc;
}
.calculator-card h2 {
  margin-bottom: 0.75rem;
}

/* ===== PRESET CHIPS ===== */
.preset-chips {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: #5a5a5a;
}
.preset-chips button {
  background: #f0ece4;
  border: 1px solid #d6cebc;
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  color: #3a3a3a;
  transition: all 0.2s;
}
.preset-chips button:hover {
  background: #e0d8c8;
  border-color: #b8a88a;
}
.preset-chips button:active {
  background: #d4c8ae;
}

/* ===== FORM ===== */
.form-row {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.form-group {
  flex: 1;
  min-width: 140px;
}
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
  color: #3a3a3a;
}
.form-group input,
.form-group select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1.5px solid #d6cebc;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #fefdfb;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #2B5C8F;
  box-shadow: 0 0 0 3px rgba(43,92,143,0.12);
}

/* ===== SURFACE OPTIONS ===== */
.surface-options {
  border: none;
  margin-bottom: 1.5rem;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.surface-options legend {
  font-weight: 600;
  font-size: 0.85rem;
  color: #3a3a3a;
  margin-bottom: 0.3rem;
  width: 100%;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  cursor: pointer;
  user-select: none;
}
.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #2B5C8F;
}

/* ===== BUTTON ===== */
.btn-calculate {
  display: block;
  width: 100%;
  padding: 0.85rem 1.5rem;
  background: #2B5C8F;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  letter-spacing: 0.01em;
}
.btn-calculate:hover {
  background: #1E4060;
}
.btn-calculate:active {
  transform: scale(0.98);
}

/* ===== RESULTS PANEL ===== */
.results-panel {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 2px dashed #e0dcd5;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}
.result-card {
  background: #f7f4ed;
  border-radius: 12px;
  padding: 1.25rem 1rem;
  text-align: center;
  border: 1px solid #ece6dc;
}
.result-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b6b6b;
  margin-bottom: 0.35rem;
  font-weight: 600;
}
.result-value {
  display: block;
  font-size: 2.2rem;
  font-weight: 700;
  color: #1e2f3f;
  line-height: 1.1;
}
.result-unit {
  display: block;
  font-size: 0.8rem;
  color: #6b6b6b;
  margin-top: 0.15rem;
}
.result-note {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 0.9rem;
  color: #4a5568;
  margin-top: 0.5rem;
  font-style: italic;
}

/* ===== TIPS SECTION ===== */
.tips-section {
  padding: 2.5rem 0;
  background: #ffffff;
  border-top: 1px solid #e0dcd5;
  border-bottom: 1px solid #e0dcd5;
}
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 1.25rem;
}
.tip-card {
  background: #fdf8f0;
  border-radius: 12px;
  padding: 1.25rem;
  border: 1px solid #ece6dc;
}
.tip-card h3 {
  color: #2B5C8F;
  margin-bottom: 0.5rem;
}
.tip-card p {
  font-size: 0.9rem;
  color: #4a4a4a;
  margin-bottom: 0;
}

/* ===== FAQ SECTION ===== */
.faq-section {
  padding: 2.5rem 0 3rem;
}
.faq-item {
  background: #ffffff;
  border: 1px solid #ece6dc;
  border-radius: 10px;
  margin-bottom: 0.75rem;
  padding: 0.25rem 1.25rem;
  transition: box-shadow 0.2s;
}
.faq-item[open] {
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}
.faq-item summary {
  padding: 1rem 0;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
  color: #1e2f3f;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 400;
  color: #2B5C8F;
  transition: transform 0.2s;
}
.faq-item[open] summary::after {
  content: '−';
  transform: rotate(180deg);
}
.faq-item p {
  padding-bottom: 1rem;
  font-size: 0.9rem;
  color: #4a4a4a;
  margin-bottom: 0;
}

/* ===== FOOTER ===== */
.site-footer {
  background: #1e2f3f;
  color: #cbd5e0;
  padding: 1.5rem 0;
  font-size: 0.85rem;
  text-align: center;
}
.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}
.site-footer nav { display: flex; gap: 1.25rem; }
.site-footer a { color: #e2e8f0; font-weight: 500; }
.site-footer a:hover { color: #ffffff; }

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  h1 { font-size: 1.8rem; }
  .calculator-card { padding: 1.25rem; }
  .form-row { flex-direction: column; gap: 0.75rem; }
  .form-group { min-width: 100%; }
  .results-panel { grid-template-columns: 1fr; }
  .preset-chips { gap: 0.35rem; }
  .preset-chips button { padding: 0.3rem 0.7rem; font-size: 0.75rem; }
  .tips-grid { grid-template-columns: 1fr; }
  .site-header .container { flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
}

@media (min-width: 601px) and (max-width: 900px) {
  .results-panel { grid-template-columns: repeat(3, 1fr); }
}

/* ===== PRINT ===== */
@media print {
  .site-header, .site-footer, .btn-calculate, .preset-chips { display: none; }
  body { background: #fff; }
  .calculator-card { box-shadow: none; border: 1px solid #ccc; }
}



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