/* HomeRenovationCalc.com — shared styles */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1f2937;
  background: #ffffff;
  line-height: 1.55;
  font-size: 16px;
}

a { color: #166534; }

/* Navigation */
.nav {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.logo {
  font-weight: 800;
  font-size: 19px;
  color: #166534;
  text-decoration: none;
  letter-spacing: -0.3px;
}
.nav-links {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
}
.nav-links a {
  color: #374151;
  text-decoration: none;
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.nav-links a:hover {
  background: #f3f4f6;
  color: #166534;
}
.nav-links a.active {
  background: #166534;
  color: #ffffff;
}

/* Layout */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}

h1 {
  font-size: 32px;
  margin-bottom: 14px;
  color: #111827;
  line-height: 1.2;
  letter-spacing: -0.5px;
}
h2 {
  font-size: 22px;
  margin: 24px 0 14px;
  color: #111827;
}
h3 {
  font-size: 17px;
  margin: 18px 0 8px;
  color: #111827;
}
.intro {
  font-size: 16px;
  color: #4b5563;
  margin-bottom: 8px;
  max-width: 720px;
}

@media (max-width: 600px) {
  h1 { font-size: 26px; }
  h2 { font-size: 19px; }
}

/* Calculator card */
.calculator {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 22px;
  margin: 18px 0;
}
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: #1f2937;
  font-size: 14px;
}
.field select,
.field input[type="number"],
.field input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 15px;
  background: #ffffff;
  color: #111827;
  -webkit-appearance: none;
  appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23166534' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.field select:focus,
.field input:focus {
  outline: none;
  border-color: #166534;
  box-shadow: 0 0 0 3px rgba(22,101,52,0.15);
}
.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 600px) {
  .row { grid-template-columns: 1fr; gap: 0; }
}

/* Buttons */
.btn {
  background: #166534;
  color: #ffffff;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn:hover { background: #14532d; }
.btn:active { background: #052e16; }

/* Results */
.results {
  margin-top: 22px;
  padding: 22px;
  background: #ffffff;
  border: 2px solid #166534;
  border-radius: 10px;
}
.results h2 {
  color: #166534;
  margin-top: 0;
  font-size: 20px;
}
.results.empty {
  border-color: #e5e7eb;
  background: #f9fafb;
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
}
.cost-mid {
  font-size: 38px;
  font-weight: 800;
  color: #166534;
  line-height: 1.1;
  letter-spacing: -1px;
}
.cost-range-line {
  font-size: 15px;
  color: #4b5563;
  margin-top: 6px;
}
.cost-range-line strong { color: #111827; }
.per-sqft {
  font-size: 14px;
  color: #6b7280;
  margin-top: 4px;
}

/* Breakdown */
.breakdown { margin-top: 18px; }
.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
}
.breakdown-row:last-child {
  border-bottom: none;
  font-weight: 700;
  padding-top: 12px;
  border-top: 2px solid #e5e7eb;
}
.breakdown-label { color: #374151; }
.breakdown-value { color: #111827; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Comparison bars */
.comparison { margin-top: 22px; }
.comparison-bar {
  display: grid;
  grid-template-columns: 110px 1fr 100px;
  align-items: center;
  margin: 8px 0;
  gap: 12px;
}
.comparison-bar .label {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}
.comparison-bar .bar {
  height: 22px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}
.comparison-bar .fill {
  height: 100%;
  background: linear-gradient(90deg, #166534 0%, #15803d 100%);
  transition: width 0.3s;
}
.comparison-bar .val {
  text-align: right;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 480px) {
  .comparison-bar { grid-template-columns: 90px 1fr 80px; gap: 8px; }
  .comparison-bar .label { font-size: 13px; }
  .comparison-bar .val { font-size: 13px; }
}

/* Note */
.note {
  font-size: 13px;
  color: #78350f;
  padding: 12px 14px;
  background: #fef3c7;
  border-left: 3px solid #f59e0b;
  border-radius: 4px;
  margin: 22px 0 0;
}

/* AdSense placeholder */
.adslot {
  min-height: 90px;
  background: #f3f4f6;
  text-align: center;
  padding: 10px;
  margin: 16px 0;
  border-radius: 6px;
  color: #999;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Footer */
.footer {
  background: #1f2937;
  color: #d1d5db;
  padding: 24px 20px;
  text-align: center;
  font-size: 13px;
  margin-top: 40px;
  line-height: 1.6;
}
.footer a { color: #9ca3af; text-decoration: none; }
.footer a:hover { color: #ffffff; }
