:root {
  --tged-primary: #ea5501;
  --tged-primary-dark: #cf4a00;
  --tged-text: #202124;
  --tged-muted: #5f6368;
  --tged-border: #d9dee5;
  --tged-soft: #f7f8fa;
  --tged-white: #ffffff;
}

.tged-form-wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px;
  box-sizing: border-box;
}

.tged-form-card {
  background: var(--tged-white);
  border: 1px solid var(--tged-border);
  border-radius: 24px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.05);
  padding: 28px 28px 32px;
}

.tged-topbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--tged-muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.tged-progress-wrap {
  margin-bottom: 22px;
}

.tged-progress-text {
  margin-bottom: 8px;
  color: var(--tged-muted);
  font-size: 0.98rem;
}

.tged-progress {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #eceff3;
  overflow: hidden;
}

.tged-progress-bar {
  width: calc((1 / 9) * 100%);
  height: 100%;
  border-radius: 999px;
  background: var(--tged-primary);
  transition: width 0.25s ease;
}

.tged-message {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 0.95rem;
}

.tged-error {
  background: #fff2ed;
  border: 1px solid #ffd1bd;
  color: #a03a00;
}

.tged-success {
  background: #eefbf3;
  border: 1px solid #b7ebc7;
  color: #1f7a3d;
}

.tged-form {
  display: block;
}

.tged-step {
  display: none;
}

.tged-step.is-active {
  display: block;
}

.tged-step h2 {
  margin: 0 0 14px;
  color: var(--tged-text);
  font-size: clamp(1.2rem, 2.4vw, 2.0rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.tged-sub {
  margin: 0 0 26px;
  color: var(--tged-muted);
  font-size: 1rem;
  line-height: 1.55;
}

.tged-choice-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 22px;
}

.tged-choice-card {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 78px;
  padding: 18px 20px;
  border: 1.5px solid var(--tged-border);
  border-radius: 18px;
  background: var(--tged-white);
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
  box-sizing: border-box;
}

.tged-choice-card:hover {
  border-color: var(--tged-primary);
  box-shadow: 0 8px 18px rgba(234, 85, 1, 0.08);
  transform: translateY(-1px);
}

.tged-choice-card.is-selected {
  border-color: var(--tged-primary);
  box-shadow: 0 0 0 3px rgba(234, 85, 1, 0.12);
  background: #fffaf7;
}

.tged-choice-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.tged-choice-card span {
  display: block;
  width: 100%;
  color: var(--tged-text);
  font-size: 1.08rem;
  line-height: 1.35;
  font-weight: 700;
}

.tged-field-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 22px;
}

.tged-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.tged-field-full {
  grid-column: 1 / -1;
}

.tged-field label {
  color: var(--tged-text);
  font-weight: 700;
  font-size: 0.98rem;
}

.tged-field input,
.tged-field textarea,
.tged-field select {
  width: 100%;
  min-height: 52px;
  padding: 13px 15px;
  border: 1.5px solid var(--tged-border);
  border-radius: 14px;
  background: var(--tged-white);
  color: var(--tged-text);
  font-size: 1rem;
  box-sizing: border-box;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.tged-field input:focus,
.tged-field textarea:focus,
.tged-field select:focus {
  outline: none;
  border-color: var(--tged-primary);
  box-shadow: 0 0 0 3px rgba(234, 85, 1, 0.12);
}

.tged-address-autocomplete {
  position: relative;
}

.tged-address-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--tged-border);
  border-radius: 16px;
  background: var(--tged-white);
  box-shadow: 0 16px 28px rgba(16, 24, 40, 0.10);
}

.tged-address-suggestions[hidden] {
  display: none;
}

.tged-address-suggestion {
  border: 1px solid #ebeef2;
  background: var(--tged-white);
  border-radius: 12px;
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
}

.tged-address-suggestion:hover {
  border-color: var(--tged-primary);
  background: #fffaf7;
}

.tged-address-suggestion strong {
  display: block;
  margin-bottom: 4px;
  color: var(--tged-text);
  font-weight: 700;
}

.tged-address-suggestion span {
  color: var(--tged-muted);
  font-size: 0.92rem;
}

.tged-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 8px;
  color: var(--tged-muted);
  line-height: 1.45;
}

.tged-checkbox input {
  margin-top: 3px;
}

.tged-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.tged-btn {
  appearance: none;
  border: none;
  border-radius: 16px;
  min-height: 54px;
  padding: 14px 22px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  width: 100%;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.tged-btn:hover {
  transform: translateY(-1px);
}

.tged-btn-primary {
  background: var(--tged-primary);
  color: #fff;
  box-shadow: 0 10px 22px rgba(234, 85, 1, 0.18);
}

.tged-btn-primary:hover,
.tged-btn-primary:focus {
  background: var(--tged-primary-dark);
}

.tged-btn-secondary {
  background: #1f2f46;
  color: #fff;
}

.tged-btn-secondary:hover,
.tged-btn-secondary:focus {
  background: #18263a;
}

.tged-hidden {
  display: none !important;
}

.tged-result-title {
  margin-bottom: 18px;
}

.tged-result-estimate,
.tged-result-manual {
  margin-top: 8px;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid var(--tged-border);
  background: var(--tged-soft);
}

.tged-result-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #e6eaf0;
}

.tged-result-line:last-of-type {
  border-bottom: 0;
}

.tged-result-line span {
  color: var(--tged-muted);
}

.tged-result-line strong {
  color: var(--tged-text);
  text-align: right;
}

.tged-result-note {
  margin-top: 14px;
  color: var(--tged-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.tged-manual-message {
  margin: 0;
  color: var(--tged-text);
  line-height: 1.6;
}

@media (min-width: 768px) {
  .tged-form-wrap {
    padding: 22px;
  }

  .tged-topbar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }

  .tged-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tged-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tged-actions {
    flex-direction: row;
    justify-content: space-between;
  }

  .tged-actions .tged-btn {
    width: auto;
    min-width: 180px;
  }
}

.tged-choice-group.is-error .tged-choice-card {
  border-color: #d92d20;
}

.tged-field input.is-error,
.tged-field textarea.is-error,
.tged-field select.is-error,
.tged-checkbox.is-error {
  border-color: #d92d20;
  box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.12);
}

.tged-field-error {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff2f0;
  border: 1px solid #ffd5cf;
  color: #b42318;
  font-size: 0.9rem;
  line-height: 1.35;
}