:root {
  --background: #f5f6f8;
  --panel: #ffffff;
  --text: #202124;
  --muted: #5f6368;
  --line: #dadce0;
  --primary: #e31837;
  --primary-dark: #b9122b;
  --soft-red: #fff1f3;
  --shadow: 0 18px 50px rgba(32, 33, 36, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
}

.tool {
  width: min(100%, 880px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 38px);
}

.header {
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
}

.header p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.form {
  display: grid;
  gap: 22px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.field label {
  font-size: 13px;
  font-weight: 700;
}

.field input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font: inherit;
  outline: none;
  padding: 0 13px;
}

.field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(227, 24, 55, 0.14);
}

.field-note {
  min-height: 17px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.field-note.valid {
  color: #137333;
}

.field-note.invalid {
  color: var(--primary-dark);
}

.suggestion-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.suggestion-chip {
  min-height: 30px;
  border: 1px solid #e1e4e9;
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 0 10px;
}

.suggestion-chip:hover,
.suggestion-chip:focus-visible {
  border-color: var(--primary);
  color: var(--primary);
  outline: none;
}

.submit-button {
  justify-self: start;
  min-height: 48px;
  border: 0;
  border-radius: 6px;
  background: var(--primary);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 0 26px;
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.submit-button:hover:not(:disabled) {
  background: var(--primary-dark);
}

.result-panel {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 20px;
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.result-label {
  margin: 0;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.base-price {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.price-range {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--primary);
  font-size: clamp(26px, 5vw, 44px);
  font-weight: 800;
  line-height: 1.15;
}

.price-dash {
  color: var(--muted);
}

.message,
.review-text {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.review-text {
  border-radius: 6px;
  background: var(--soft-red);
  color: var(--primary-dark);
  font-weight: 700;
  padding: 12px 14px;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 0;
}

.spec-item {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
}

.spec-item dt {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
}

.spec-item dd {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .page {
    align-items: start;
  }

  .field-grid,
  .spec-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 460px) {
  .tool {
    padding: 20px 14px;
  }

  .field-grid,
  .spec-grid {
    grid-template-columns: 1fr;
  }

  .submit-button {
    width: 100%;
  }

  .result-header {
    align-items: flex-start;
    flex-direction: column;
  }
}
