:root {
  --agp-web-red: #b31217;
  --agp-web-dark: #151515;
  --agp-web-muted: #5f6368;
  --agp-web-bg: #f5f6f8;
  --agp-web-border: #e4e7ec;
  --agp-web-card: #fff;
  --agp-web-soft: #fff5f5;
}

* {
  box-sizing: border-box;
}

.agp-web-body {
  margin: 0;
  background: var(--agp-web-bg);
  color: var(--agp-web-dark);
  font-family: Arial, sans-serif;
}

.agp-web-attention,
.agp-web-card,
.agp-web-form,
.agp-web-step,
.agp-web-flow-section,
.agp-tractor-recommendations,
.agp-need-recommendations,
.agp-tractor-grid,
.agp-need-grid,
.agp-tractor-card,
.agp-need-card,
.agp-tractor-card__body,
.agp-need-card__body,
.agp-tractor-card__content,
.agp-need-card__content {
  min-width: 0;
  max-width: 100%;
}

.agp-web-attention {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.agp-web-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
  align-items: end;
  margin-bottom: 16px;
  padding: 28px;
  border: 1px solid var(--agp-web-border);
  border-radius: 22px;
  background: linear-gradient(135deg, #fff, var(--agp-web-soft));
}

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

.agp-web-hero h1 {
  margin: 0 0 10px;
  font-size: 42px;
  line-height: 1.08;
}

.agp-web-hero p {
  margin: 0;
  color: var(--agp-web-muted);
  font-size: 18px;
  line-height: 1.5;
}

.agp-web-hero__meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  border: 1px solid var(--agp-web-border);
  border-radius: 16px;
  background: #fff;
}

.agp-web-hero__meta strong {
  color: var(--agp-web-red);
}

.agp-web-topbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.agp-web-card {
  padding: 28px;
  border: 1px solid var(--agp-web-border);
  border-radius: 22px;
  background: var(--agp-web-card);
  box-shadow: 0 18px 40px rgba(15, 23, 42, .07);
}

.agp-web-form {
  display: block;
}

.agp-web-form label,
.agp-web-fieldset {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  font-weight: 700;
}

.agp-web-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.agp-web-fieldset legend,
.agp-web-step h2 {
  margin: 0 0 16px;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
}

.agp-web-flow-section h3,
.agp-tractor-recommendations__header h3 {
  margin: 0 0 14px;
  font-size: 19px;
  line-height: 1.25;
}

.agp-web-step {
  margin-top: 18px;
}

.agp-web-form.is-enhanced .agp-web-step:not(.is-active) {
  display: none;
}

.agp-web-form:not(.is-enhanced) [data-agp-next],
.agp-web-form:not(.is-enhanced) [data-agp-prev],
.agp-web-form:not(.is-enhanced) .agp-web-stepper {
  display: none;
}

.agp-web-stepper {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 20px;
}

.agp-web-stepper span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px;
  border: 1px solid var(--agp-web-border);
  border-radius: 999px;
  background: #fff;
  color: var(--agp-web-muted);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.agp-web-stepper span.is-active {
  border-color: var(--agp-web-red);
  background: var(--agp-web-soft);
  color: var(--agp-web-red);
}

.agp-web-stepper span.is-hidden {
  display: none;
}

.agp-web-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.agp-web-option {
  position: relative;
  display: block !important;
  font-weight: 700 !important;
}

.agp-web-form .agp-web-option input,
.agp-web-form .agp-tractor-card input[name="tractor_selected_product_id"],
.agp-web-form .agp-need-card input[name="need_selected_product_id"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.agp-web-option span {
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 12px 14px;
  border: 2px solid var(--agp-web-border);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.agp-web-option input:checked + span,
.agp-web-option input:focus-visible + span {
  border-color: var(--agp-web-red);
  background: var(--agp-web-soft);
  color: var(--agp-web-red);
}

.agp-web-form input,
.agp-web-form select,
.agp-web-form textarea {
  width: 100%;
  max-width: 100%;
  border: 1px solid #ccd1d7;
  border-radius: 12px;
  padding: 13px 14px;
  background: #fff;
  color: var(--agp-web-dark);
  font-size: 16px;
  font-weight: 400;
}

.agp-web-form textarea {
  resize: vertical;
}

.agp-web-form .agp-web-option input,
.agp-web-form .agp-tractor-card input[name="tractor_selected_product_id"],
.agp-web-form .agp-need-card input[name="need_selected_product_id"] {
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
}

.agp-web-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.agp-web-flow-section {
  display: block;
  margin: 0 0 16px;
  padding: 18px;
  border: 1px solid var(--agp-web-border);
  border-radius: 16px;
  background: #fbfbfc;
}

.agp-web-form.is-enhanced .agp-web-flow-section {
  display: none;
}

.agp-web-form.is-enhanced .agp-web-flow-section.is-active {
  display: block;
}

.agp-web-reference {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid var(--agp-web-border);
  border-radius: 14px;
  background: #f7f7f7;
  color: var(--agp-web-muted);
}

.agp-web-reference strong {
  color: var(--agp-web-dark);
}

.agp-web-reference small {
  color: var(--agp-web-muted);
}

.agp-step-actions,
.agp-web-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 20px;
}

.agp-web-actions--center {
  justify-content: center;
}

.agp-web-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--agp-web-red);
  color: #fff !important;
  font-size: 17px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.agp-web-button:hover {
  filter: brightness(.95);
}

.agp-web-button--secondary,
.agp-web-button--ghost {
  border: 1px solid var(--agp-web-border);
  background: #fff;
  color: var(--agp-web-dark) !important;
}

.agp-web-button--ghost {
  color: var(--agp-web-red) !important;
}

.agp-web-errors {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid #e3b1b1;
  border-radius: 14px;
  background: #fdeaea;
  color: #7f1d1d;
}

.agp-web-errors p,
.agp-web-step-status,
.agp-web-privacy {
  margin: 0;
}

.agp-web-errors p + p {
  margin-top: 6px;
}

.agp-web-step-status {
  color: #7f1d1d;
  font-weight: 700;
}

.agp-web-note {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px dashed var(--agp-web-border);
  border-radius: 14px;
  background: #f7f7f7;
  color: var(--agp-web-muted);
  font-size: 14px;
  line-height: 1.5;
}

.agp-web-summary {
  border: 1px solid var(--agp-web-border);
  border-radius: 16px;
  overflow: hidden;
}

.agp-web-summary dl {
  margin: 0;
}

.agp-web-summary div {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--agp-web-border);
}

.agp-web-summary div:last-child {
  border-bottom: 0;
}

.agp-web-summary dt,
.agp-web-summary dd {
  margin: 0;
}

.agp-web-summary dt {
  color: var(--agp-web-muted);
  font-weight: 800;
}

.agp-web-summary dd {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.agp-web-privacy {
  margin-top: 14px;
  color: var(--agp-web-muted);
}

.agp-web-success {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.agp-web-success__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: #e9f8ee;
  color: #157347;
  font-size: 30px;
  font-weight: 800;
}

.agp-web-success h2 {
  margin: 0 0 8px;
  font-size: 34px;
}

.agp-web-success p {
  color: var(--agp-web-muted);
  font-size: 18px;
}

.agp-tractor-recommendations,
.agp-need-recommendations {
  margin-top: 0;
}

.agp-tractor-recommendations__header,
.agp-need-recommendations__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

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

.agp-tractor-card,
.agp-need-card {
  position: relative;
  display: block !important;
  font-weight: 400 !important;
}

.agp-tractor-card__body,
.agp-need-card__body {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  min-height: 128px;
  padding: 12px;
  border: 2px solid var(--agp-web-border);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.agp-tractor-card input:checked + .agp-tractor-card__body,
.agp-tractor-card input:focus-visible + .agp-tractor-card__body,
.agp-need-card input:checked + .agp-need-card__body,
.agp-need-card input:focus-visible + .agp-need-card__body {
  border-color: var(--agp-web-red);
  box-shadow: 0 0 0 3px rgba(179, 18, 23, .12);
}

.agp-tractor-card img,
.agp-need-card img {
  width: 96px;
  height: 96px;
  border-radius: 10px;
  background: #f1f3f5;
  object-fit: cover;
}

.agp-tractor-card__content,
.agp-need-card__content {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.agp-tractor-card__content strong,
.agp-need-card__content strong {
  font-size: 15px;
  line-height: 1.25;
}

.agp-tractor-card__content small,
.agp-need-card__content small {
  color: var(--agp-web-muted);
  font-size: 13px;
  line-height: 1.25;
}

.agp-tractor-card__content a,
.agp-need-card__content a {
  color: var(--agp-web-red);
  font-weight: 800;
  text-decoration: none;
}

.agp-tractor-card__content strong,
.agp-need-card__content strong,
.agp-tractor-card__content small,
.agp-need-card__content small,
.agp-tractor-card__content a,
.agp-need-card__content a,
.agp-tractor-select-text,
.agp-need-select-text {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.agp-tractor-select-text,
.agp-need-select-text {
  margin-top: auto;
  color: var(--agp-web-red);
  font-size: 13px;
  font-weight: 800;
}

.agp-tractor-empty,
.agp-tractor-skip,
.agp-need-empty,
.agp-need-skip {
  margin: 0;
  color: var(--agp-web-muted);
  line-height: 1.5;
}

.agp-tractor-skip,
.agp-need-skip {
  margin-top: 10px;
}

.agp-tractor-recommendations.is-loading,
.agp-need-recommendations.is-loading {
  opacity: .72;
}

.agp-tractor-recommendations.is-loading .agp-web-button--secondary,
.agp-need-recommendations.is-loading .agp-web-button--secondary {
  cursor: wait;
}

@media (max-width: 820px) {
  .agp-web-attention {
    width: min(100% - 22px, 1120px);
    padding: 18px 0 34px;
  }

  .agp-web-hero {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .agp-web-hero h1 {
    font-size: 32px;
  }

  .agp-web-card {
    padding: 20px;
  }

  .agp-web-topbar {
    justify-content: stretch;
  }

  .agp-web-stepper,
  .agp-web-options,
  .agp-web-grid,
  .agp-tractor-grid,
  .agp-need-grid {
    grid-template-columns: 1fr;
  }

  .agp-web-stepper {
    gap: 6px;
  }

  .agp-web-summary div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .agp-step-actions,
  .agp-web-actions,
  .agp-tractor-recommendations__header,
  .agp-need-recommendations__header {
    align-items: stretch;
    flex-direction: column;
  }

  .agp-web-button {
    width: 100%;
  }

  .agp-web-flow-section {
    padding: 14px;
  }

  .agp-tractor-card__body,
  .agp-need-card__body {
    grid-template-columns: 82px minmax(0, 1fr);
    min-height: 112px;
  }

  .agp-tractor-card img,
  .agp-need-card img {
    width: 82px;
    height: 82px;
  }
}

@media (max-width: 430px) {
  .agp-web-attention {
    width: min(100% - 18px, 1120px);
  }

  .agp-web-hero h1 {
    font-size: 28px;
  }

  .agp-tractor-card__body,
  .agp-need-card__body {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }

  .agp-tractor-card img,
  .agp-need-card img {
    width: 72px;
    height: 72px;
  }
}
