* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f8f9fa;
  color: #1a1a1a;
  line-height: 1.5;
  padding: 16px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 16px 0 8px; color: #555; text-transform: uppercase; letter-spacing: .5px; }

.project-header { padding: 16px 0; border-bottom: 1px solid #ddd; }
.project-header p { margin: 4px 0; font-size: 14px; color: #555; }
.spec-link {
  display: inline-block; margin: 8px 0; padding: 8px 12px;
  background: #e7f1ff; color: #0066cc; text-decoration: none;
  border-radius: 6px; font-size: 14px;
}
.materials-note { font-size: 13px; color: #777; font-style: italic; }
.preconditions {
  font-size: 13px; color: #333; line-height: 1.55;
  background: #fffdf0; border-left: 3px solid #e6c200;
  padding: 10px 12px; border-radius: 4px; margin: 10px 0;
}
.schedule {
  font-size: 13px; color: #333; line-height: 1.55;
  background: #eef6ff; border-left: 3px solid #0066cc;
  padding: 10px 12px; border-radius: 4px; margin: 10px 0;
}
.address {
  font-size: 13px; color: #333; line-height: 1.7;
  background: #f4f0ff; border-left: 3px solid #6b40c2;
  padding: 10px 12px; border-radius: 4px; margin: 10px 0;
}
.address a { color: #6b40c2; }

.contact-line {
  font-size: 13px; color: #333; margin: 8px 0 4px;
}
.contact-line a { color: #1a73e8; text-decoration: underline; }

.contact input {
  display: block; width: 100%; padding: 12px; margin-bottom: 8px;
  border: 1px solid #ccc; border-radius: 6px; font-size: 16px;
  min-height: 44px;
}

.phone-input-wrap {
  display: flex; align-items: stretch;
  border: 1px solid #ccc; border-radius: 6px;
  background: #fff; margin-bottom: 8px;
  min-height: 44px; overflow: hidden;
}
.phone-input-wrap:focus-within {
  border-color: #0066cc;
  outline: 2px solid rgba(0, 102, 204, 0.25);
  outline-offset: 0;
}
.phone-input-wrap .phone-prefix {
  padding: 0 8px 0 12px;
  display: flex; align-items: center;
  color: #555; border-right: 1px solid #eee;
  font-size: 16px; font-family: inherit;
  user-select: none; white-space: nowrap;
}
.phone-input-wrap input[type="tel"] {
  border: none; outline: none; background: transparent;
  flex: 1; padding: 12px; margin-bottom: 0;
  font-size: 16px; font-family: inherit;
  min-height: 0; width: auto;
}

.sections { margin-top: 16px; }
.section { border: 1px solid #e0e0e0; border-radius: 8px; margin-bottom: 8px; background: #fff; }
.section-header {
  width: 100%; padding: 12px 16px; background: none; border: none;
  text-align: left; cursor: pointer; font-size: 15px; font-weight: 600;
  display: flex; justify-content: space-between; align-items: center;
  min-height: 44px;
}
.section-body { display: none; padding: 0 12px 12px; }
.section-body.open { display: block; }

.section-fits {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; color: #0a6b2e;
  background: #e8f5ec; border: 1px solid #b6dcc1;
  padding: 8px 12px; border-radius: 6px;
  margin: 10px 0; cursor: pointer; min-height: 40px;
}
.section-fits input[type="checkbox"] { width: 18px; height: 18px; }

.section-note {
  font-size: 13px; color: #333; line-height: 1.55;
  background: #fffdf0; border-left: 3px solid #e6c200;
  padding: 10px 12px; border-radius: 4px; margin: 10px 0 14px;
}
.section-note p { margin: 0 0 8px; }
.section-note .spec-chip { margin-bottom: 0; }

.item { padding: 12px 0; border-bottom: 1px solid #f0f0f0; }
.item:last-child { border-bottom: none; }
.item-title { font-size: 14px; margin-bottom: 6px; }
.spec-chip {
  display: inline-block; padding: 2px 8px; margin-bottom: 6px;
  background: #f0f4ff; color: #0066cc; font-size: 12px;
  border-radius: 4px; text-decoration: none;
}

.price-row {
  display: flex; align-items: center; gap: 8px; margin: 6px 0; flex-wrap: wrap;
}
.price-row .qty { font-size: 13px; color: #555; }
.price-row input[type="number"] {
  width: 100px; padding: 8px; border: 1px solid #ccc; border-radius: 4px;
  font-size: 15px; min-height: 36px;
}
.price-row .line-total { font-size: 13px; color: #060; font-weight: 600; }

.checks { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 4px; }
.checks label { font-size: 13px; display: flex; align-items: center; gap: 4px; }
.checks input[type="checkbox"] { width: 18px; height: 18px; }

.form-footer { margin-top: 24px; padding: 16px 0; border-top: 1px solid #ddd; }
.form-footer label { display: block; margin-bottom: 8px; font-size: 14px; }
.form-footer .date-row {
  display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 8px;
}
.form-footer .date-row label { margin-bottom: 0; }
.form-footer input[type="date"] {
  padding: 8px; border: 1px solid #ccc; border-radius: 4px;
  font-size: 15px; min-height: 36px;
}
.form-footer textarea {
  width: 100%; min-height: 80px; padding: 8px; border: 1px solid #ccc;
  border-radius: 6px; font-size: 15px; font-family: inherit;
}
.form-footer .totals {
  text-align: right; font-size: 14px; margin: 12px 0; padding: 12px; background: #fff;
  border-radius: 6px;
}
.form-footer .totals .grand-total { font-size: 18px; color: #060; }

.submit-btn {
  display: block; width: 100%; padding: 14px;
  background: #0066cc; color: #fff; border: none; border-radius: 8px;
  font-size: 16px; font-weight: 600; cursor: pointer; min-height: 48px;
}
.submit-btn:disabled { background: #ccc; cursor: not-allowed; }

.item.has-error { background: #fff4f4; border-left: 3px solid #c00; padding-left: 8px; }
.field-error { color: #c00; font-size: 12px; margin-top: 4px; }

.thank-you {
  text-align: center; padding: 40px 16px;
}
.thank-you h1 { color: #060; }
.thank-you .download-btn {
  display: inline-block; margin-top: 16px; padding: 12px 24px;
  background: #0066cc; color: #fff; text-decoration: none; border-radius: 8px;
}

@media (min-width: 600px) {
  body { padding: 24px; }
  .price-row { flex-wrap: nowrap; }
}
