:root {
  --page-background: #f4f9fa;
  --surface: #ffffff;
  --surface-soft: #f7fbfc;
  --text-primary: #17343b;
  --text-secondary: #62777c;
  --border: #dce9eb;
  --brand: #1c8fa0;
  --brand-dark: #137786;
  --brand-soft: #e4f5f7;
  --success: #237b61;
  --error: #b74444;
  --error-background: #fff3f3;
  --shadow: 0 24px 70px rgba(28, 73, 82, 0.11);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(
      circle at 12% 8%,
      rgba(196, 233, 245, 0.55),
      transparent 31rem
    ),
    radial-gradient(
      circle at 91% 76%,
      rgba(215, 242, 250, 0.5),
      transparent 30rem
    ),
    var(--page-background);
  color: var(--text-primary);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.quote-page {
  min-height: 100vh;
  padding: 54px 24px;
}

.quote-hero {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(500px, 1.18fr);
  align-items: center;
  gap: 76px;
}

.quote-hero-copy {
  position: sticky;
  top: 54px;
  align-self: start;
  padding-top: 24px;
}

.quote-eyebrow,
.result-eyebrow {
  margin: 0 0 14px;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.quote-hero-copy h1 {
  max-width: 560px;
  margin: 0;
  font-size: clamp(46px, 5vw, 72px);
  line-height: 0.99;
  letter-spacing: -0.055em;
}

.quote-introduction {
  max-width: 540px;
  margin: 28px 0 0;
  color: var(--text-secondary);
  font-size: 19px;
  line-height: 1.7;
}

.quote-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.quote-benefits li {
  padding: 9px 13px;
  border: 1px solid rgba(28, 143, 160, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  color: #476268;
  font-size: 13px;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.quote-tool {
  overflow: hidden;
  min-height: 700px;
  border: 1px solid rgba(207, 225, 228, 0.92);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.quote-form,
.quote-result {
  padding: 44px;
}

.form-heading {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 34px;
}

.form-heading-icon {
  display: grid;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 15px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 21px;
}

.form-heading h2,
.result-heading h2 {
  margin: 0;
  font-size: 27px;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.form-heading p {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.55;
}

.form-error {
  margin-bottom: 24px;
  padding: 14px 16px;
  border: 1px solid #f1cccc;
  border-radius: 12px;
  background: var(--error-background);
  color: var(--error);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
}

.field-group {
  margin-bottom: 23px;
}

.field-group label {
  display: block;
  margin-bottom: 9px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 750;
}

.field-group input,
.field-group textarea {
  display: block;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  outline: none;
  background: #ffffff;
  color: var(--text-primary);
  font-size: 15px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.field-group input {
  height: 54px;
  padding: 0 16px;
}

.field-group textarea {
  min-height: 180px;
  padding: 16px;
  line-height: 1.6;
  resize: vertical;
}

.field-group input::placeholder,
.field-group textarea::placeholder {
  color: #9aabad;
}

.field-group input:hover,
.field-group textarea:hover {
  border-color: #c3dadd;
}

.field-group input:focus,
.field-group textarea:focus {
  border-color: var(--brand);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(28, 143, 160, 0.11);
}

.field-help {
  margin: 8px 2px 0;
  color: #829397;
  font-size: 12px;
  line-height: 1.5;
}

.generate-quote-button,
.save-quote-button {
  display: inline-flex;
  width: 100%;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 15px;
  background: linear-gradient(
    135deg,
    var(--brand),
    var(--brand-dark)
  );
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(28, 143, 160, 0.2);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    opacity 160ms ease;
}

.generate-quote-button:hover,
.save-quote-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 15px 30px rgba(28, 143, 160, 0.26);
}

.generate-quote-button:disabled {
  cursor: wait;
  opacity: 0.76;
}

.button-loader {
  display: none;
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: quote-spin 700ms linear infinite;
}

.generate-quote-button.is-loading .button-loader {
  display: block;
}

.form-privacy,
.result-disclaimer {
  margin: 14px 0 0;
  color: #87979a;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.result-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.result-location {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 750;
}

.recommended-price-card {
  position: relative;
  overflow: hidden;
  padding: 31px;
  border-radius: 22px;
  background:
    linear-gradient(
      140deg,
      rgba(228, 245, 247, 0.96),
      rgba(244, 249, 250, 0.96)
    );
  text-align: center;
}

.recommended-price-card::after {
  position: absolute;
  right: -46px;
  bottom: -74px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: rgba(196, 233, 245, 0.58);
  content: "";
}

.recommended-price-card p,
.recommended-price-card span {
  position: relative;
  z-index: 1;
}

.recommended-price-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 750;
}

.recommended-price-card strong {
  position: relative;
  z-index: 1;
  display: block;
  margin: 8px 0 5px;
  color: var(--text-primary);
  font-size: 60px;
  line-height: 1;
  letter-spacing: -0.055em;
}

.recommended-price-card span {
  color: var(--success);
  font-size: 12px;
  font-weight: 750;
}

.result-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.result-summary-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #ffffff;
}

.result-summary-card span {
  display: block;
  margin-bottom: 7px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 650;
}

.result-summary-card strong {
  display: block;
  color: var(--text-primary);
  font-size: 17px;
  line-height: 1.35;
}

.result-section {
  margin-top: 28px;
}

.result-section h3,
.customer-quote-heading h3 {
  margin: 0 0 14px;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.price-factor-list,
.assumption-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.price-factor-list li,
.assumption-list li {
  position: relative;
  padding-left: 25px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

.price-factor-list li::before {
  position: absolute;
  top: 1px;
  left: 0;
  color: var(--success);
  font-weight: 900;
  content: "✓";
}

.assumption-list li::before {
  position: absolute;
  top: 7px;
  left: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  content: "";
}

.customer-quote-card {
  margin-top: 30px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface-soft);
}

.customer-quote-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 19px;
}

.customer-quote-heading h3 {
  margin-bottom: 0;
}

.copy-quote-button,
.new-quote-button {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #ffffff;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 750;
  transition:
    border-color 160ms ease,
    background 160ms ease;
}

.copy-quote-button {
  min-height: 38px;
  padding: 0 13px;
}

.copy-quote-button:hover,
.new-quote-button:hover {
  border-color: #b9d4d8;
  background: #fbfefe;
}

.customer-quote-text {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.65;
}

.customer-quote-text > strong {
  display: block;
  color: var(--text-primary);
  font-size: 16px;
}

.customer-quote-text p {
  margin: 12px 0 0;
}

.customer-quote-text h4 {
  margin: 18px 0 7px;
  color: var(--text-primary);
  font-size: 13px;
}

.customer-quote-text ul {
  margin: 0;
  padding-left: 19px;
}

.customer-fixed-price {
  color: var(--brand-dark);
  font-weight: 800;
}

.result-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 11px;
  margin-top: 24px;
}

.save-quote-button {
  min-height: 50px;
}

.new-quote-button {
  min-height: 50px;
  padding: 0 17px;
}

@keyframes quote-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 980px) {
  .quote-page {
    padding: 34px 20px;
  }

  .quote-hero {
    grid-template-columns: 1fr;
    gap: 42px;
    max-width: 680px;
  }

  .quote-hero-copy {
    position: static;
    padding-top: 0;
  }

  .quote-hero-copy h1 {
    max-width: 650px;
  }

  .quote-introduction {
    max-width: 620px;
  }
}

@media (max-width: 600px) {
  .quote-page {
    padding: 22px 12px 34px;
  }

  .quote-hero {
    gap: 30px;
  }

  .quote-hero-copy {
    padding: 0 8px;
  }

  .quote-hero-copy h1 {
    font-size: 42px;
  }

  .quote-introduction {
    margin-top: 20px;
    font-size: 16px;
  }

  .quote-benefits {
    margin-top: 24px;
  }

  .quote-tool {
    min-height: 0;
    border-radius: 23px;
  }

  .quote-form,
  .quote-result {
    padding: 27px 20px;
  }

  .form-heading {
    gap: 12px;
    margin-bottom: 28px;
  }

  .form-heading-icon {
    flex-basis: 42px;
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .form-heading h2,
  .result-heading h2 {
    font-size: 23px;
  }

  .field-group textarea {
    min-height: 200px;
  }

  .result-heading {
    display: block;
  }

  .result-location {
    display: inline-block;
    margin-top: 13px;
  }

  .recommended-price-card {
    padding: 27px 18px;
  }

  .recommended-price-card strong {
    font-size: 52px;
  }

  .result-summary-grid {
    grid-template-columns: 1fr;
  }

  .customer-quote-heading {
    display: block;
  }

  .copy-quote-button {
    margin-top: 13px;
  }

  .result-actions {
    grid-template-columns: 1fr;
  }

  .new-quote-button {
    width: 100%;
  }
}

.pdf-details {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #ffffff;
}

.pdf-details-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.pdf-details-heading h3 {
  margin: 0;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.pdf-details-heading span {
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
}

.pdf-details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pdf-details-grid label {
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 700;
}

.pdf-details-grid input {
  width: 100%;
  height: 46px;
  margin-top: 8px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  background: #ffffff;
  color: var(--text-primary);
}

.pdf-details-grid input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(28, 143, 160, 0.11);
}

.result-actions {
  grid-template-columns: 1fr auto;
}

.download-quote-button {
  min-height: 50px;
  padding: 0 18px;
  border: 0;
  border-radius: 15px;
  background: linear-gradient(
    135deg,
    var(--brand),
    var(--brand-dark)
  );
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(28, 143, 160, 0.2);
}

.download-quote-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.save-quote-button {
  width: auto;
  min-height: 50px;
  padding: 0 18px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text-primary);
  box-shadow: none;
}

@media (max-width: 700px) {
  .pdf-details-grid,
  .result-actions {
    grid-template-columns: 1fr;
  }

  .save-quote-button,
  .new-quote-button {
    width: 100%;
  }
}