.modal-content.best-agent-content {
  --agent-accent: #a96c13;
  --agent-accent-dark: #87520f;
  --agent-accent-hover: #b87818;
  --agent-accent-soft: #f6fbf3;
  --agent-accent-border: #9ed6a8;
  --agent-action: #35a83f;
  --agent-action-dark: #17852c;
  --agent-action-hover: #3bb946;
  position: relative;
  width: min(94vw, 640px);
  max-width: 640px;
  padding: 0 16px 12px;
  overflow: visible;
  background: linear-gradient(to bottom,var(--green-dark) 0 48px,#eef6fa 48px);
  border-radius: 10px;
  color: #131d27;
  font-family: inherit;
  text-align: left;
}

.best-agent-content button {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: inherit;
  text-align: inherit;
  transition: none;
}

.best-agent-grid-toggle {
  min-height: 22px;
  margin-top: 0;
  padding: 8px 12px;
  border: 1px solid #cbd9e3;
  border-radius: 8px;
  background: #dbe6ed;
  color: #15222e;
  font-size: .84rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.best-agent-content .best-agent-title {
  background: var(--green-dark);
  color: #fff;
  margin: 0 -16px 14px;
  padding: 12px 16px;
  font-size: 20px;
  font-weight: 700;
  line-height: normal;
  border-radius: 10px 10px 0 0;
  text-align: center;
}

.best-agent-content .best-agent-x {
  position: absolute;
  top: -18px;
  right: -22px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin: 0;
  padding: 0;
  border-radius: 999px;
  background: rgba(219,230,237,.65);
  color: rgba(17,26,34,.65);
  font-family: Arial,Helvetica,sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  box-shadow: none;
}

.best-agent-content .best-agent-x:hover {
  background: rgba(207,219,228,.85);
  color: rgba(17,26,34,.85);
}

.best-agent-body {
  padding: 0;
}

.best-agent-intro {
  margin: 0 0 12px!important;
  color: #26313b!important;
  font-size: .92rem;
  font-weight: 400;
  line-height: 1.25;
  text-align: center;
}

.best-agent-controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 10px 0 8px;
}

.best-agent-controls label {
  margin: 0;
  color: #465767;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.best-agent-controls select {
  width: 100%;
  height: 36px;
  margin-top: 5px;
  padding: 5px 28px 5px 9px;
  border: 1px solid #cfd8e2;
  border-radius: 7px;
  background: #fff;
  color: #111a22;
  font-size: .9rem;
  font-weight: 400;
  text-transform: none;
}

.best-agent-hero-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 13px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(53,168,63,.34);
  border-radius: 10px;
  background: var(--agent-accent-soft);
  color: #111a22;
}

.best-agent-hero-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: var(--agent-action);
  color: #fff;
  line-height: 1;
  box-shadow: none;
  align-self: center;
  transform: translateY(-5px);
}

.best-agent-hero-badge svg {
  width: 35px;
  height: 35px;
  fill: currentColor;
}

.best-agent-hero-main {
  min-width: 0;
}

.best-agent-eyebrow {
  margin: 0;
  color: var(--agent-accent);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .045em;
  line-height: 1;
  text-transform: uppercase;
}

.best-agent-hero-main h3 {
  margin: 6px 0 4px;
  color: #101922;
  font-size: 1.68rem;
  font-weight: 700;
  line-height: 1.05;
}

.best-agent-window {
  margin: 0!important;
  color: #1d2b35!important;
  font-size: 1.12rem;
  font-weight: 500;
  line-height: 1.25;
}

.best-agent-window strong {
  font-weight: 750;
}

.best-agent-reason {
  margin: 7px 0 0!important;
  color: #4e6170!important;
  font-size: .8rem;
  font-weight: 400;
  line-height: 1.28;
  white-space: nowrap;
}

.best-agent-start-picker {
  grid-column: 1 / -1;
  display: grid;
  gap: 0;
  margin-top: 3px;
  padding: 9px 14px 8px;
  border: 1px solid rgba(53,168,63,.28);
  border-radius: 8px;
  background: rgba(255,255,255,.82);
}

.best-agent-start-picker p {
  margin: -2px 0 6px;
  color: #111a22;
  font-size: .86rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
}

.best-agent-start-options {
  display: flex;
  gap: 7px;
  align-items: center;
  padding-top: 0;
  transform: translateY(-2px);
}

.best-agent-content .best-agent-start-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 1 1 0;
  min-height: 34px;
  height: 34px;
  margin: 0;
  padding: 1px 8px;
  border: 1px solid var(--agent-action);
  border-radius: 7px;
  background: #fff;
  color: #13212c;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.best-agent-content .best-agent-start-option.is-selected::before {
  content: none;
}

.best-agent-start-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
}

.best-agent-start-check svg {
  width: 19px;
  height: 19px;
}

.best-agent-start-check svg circle,
.best-agent-start-check svg path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.best-agent-content .best-agent-start-option.is-selected .best-agent-start-check {
  color: var(--agent-action);
}

.best-agent-content .best-agent-start-option.is-selected .best-agent-start-check svg circle {
  fill: #fff;
  stroke: #fff;
}

.best-agent-content .best-agent-start-option.is-selected .best-agent-start-check svg path {
  stroke: var(--agent-action);
}

.best-agent-content .best-agent-start-option:hover,
.best-agent-content .best-agent-start-option.is-selected {
  border-color: var(--agent-action);
  background: var(--agent-action);
  color: #fff;
}

.best-agent-copy-panel {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 110px;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  margin-top: 8px;
  padding: 8px 42px;
  border: 1px solid #d7dee6;
  border-radius: 8px;
  background: #fff;
}

.best-agent-selected-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 0;
  background: transparent;
  color: var(--agent-accent-dark);
}

.best-agent-selected-icon svg {
  width: 30px;
  height: 30px;
}

.best-agent-selected-icon svg path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.best-agent-selected-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.best-agent-copy-help {
  margin: 0!important;
  color: #455767!important;
  font-size: .84rem;
  font-weight: 400;
  line-height: 1.2;
}

.best-agent-copy-help strong {
  color: #111a22;
  font-weight: 700;
}

.best-agent-copy-text {
  color: #111a22;
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.18;
}

.best-agent-content .best-agent-copy-message {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  margin-top: 0;
  width: 86px;
  min-width: 86px;
  min-height: 38px;
  padding: 7px 14px;
  border-radius: 7px;
  background: var(--agent-action);
  color: #fff;
  font-size: .96rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.best-agent-content .best-agent-copy-message:hover {
  background: var(--agent-action-hover);
}

.best-agent-other-section {
  margin-top: 3px;
  display: grid;
  gap: 7px;
}

.best-agent-copy-message svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  margin-right: 2px;
}

.best-agent-copy-message svg path,
.best-agent-copy-message svg rect,
.best-agent-copy-message svg polyline {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.best-agent-other-section h3 {
  position: relative;
  z-index: 1;
  margin: 0;
  transform: translateY(5px);
  color: #111a22;
  font-size: .84rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
}

.best-agent-other-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
  margin-top: 6px;
}

.best-agent-content .best-agent-other-card {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 3px;
  align-items: center;
  min-height: 52px;
  margin-top: 0;
  padding: 6px 6px;
  border: 1px solid #d7dee6;
  border-radius: 8px;
  background: #fff;
  color: #111a22;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  box-sizing: border-box;
}

.best-agent-content .best-agent-other-card:hover,
.best-agent-content .best-agent-other-card.is-selected {
  border-color: #aebdcc;
  background: #f7fafc;
}

.best-agent-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #edf2f6;
  color: #172434;
  font-size: 1.07rem;
  font-weight: 700;
  box-shadow: inset 0 0 0 2px rgba(23,36,52,.08);
  transform: translateX(-2px);
}

.best-agent-card-copy {
  display: block;
  min-width: 0;
  line-height: 1.1;
}

.best-agent-card-copy strong {
  display: block;
  overflow: hidden;
  font-size: .82rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.best-agent-card-copy span {
  color: #405162;
  display: block;
  overflow: hidden;
  font-size: .76rem;
  font-weight: 600;
  text-overflow: clip;
  white-space: nowrap;
}

.best-agent-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.best-agent-content .best-agent-actions button {
  margin-top: 0;
  padding: 8px 14px;
  border: 2px solid var(--agent-action);
  border-radius: 8px;
  background: transparent;
  color: #13212c;
  font-size: .84rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.best-agent-content .best-agent-close {
  border-color: var(--agent-action);
  background: var(--agent-action);
  color: #fff;
}

.best-agent-content .best-agent-review {
  min-width: 220px;
  border-color: var(--agent-action);
  background: var(--agent-action);
  color: #fff;
}

.best-agent-content .best-agent-review:hover {
  background: var(--agent-action-hover);
}

.best-agent-content .best-agent-close:hover,
.best-agent-content .best-agent-grid-toggle:hover {
  background: rgba(53,168,63,.1);
}

.best-agent-content .best-agent-close:hover {
  background: var(--agent-action-hover);
}

.best-agent-empty {
  margin: 0;
  color: #26313b;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.best-agent-content.show-agent-grid {
  outline: 3px solid rgba(21,86,255,.95);
  outline-offset: -3px;
}

.best-agent-content.show-agent-grid .best-agent-title,
.best-agent-content.show-agent-grid .best-agent-body,
.best-agent-content.show-agent-grid .best-agent-controls,
.best-agent-content.show-agent-grid .best-agent-hero-card,
.best-agent-content.show-agent-grid .best-agent-hero-badge,
.best-agent-content.show-agent-grid .best-agent-hero-main,
.best-agent-content.show-agent-grid .best-agent-start-picker,
.best-agent-content.show-agent-grid .best-agent-start-options,
.best-agent-content.show-agent-grid .best-agent-start-option,
.best-agent-content.show-agent-grid .best-agent-copy-panel,
.best-agent-content.show-agent-grid .best-agent-other-section,
.best-agent-content.show-agent-grid .best-agent-other-list,
.best-agent-content.show-agent-grid .best-agent-other-card,
.best-agent-content.show-agent-grid .best-agent-actions {
  box-shadow: inset 0 0 0 2px rgba(21,86,255,.82);
}

.best-agent-content.show-agent-grid .best-agent-other-list {
  background-image:
    linear-gradient(to right, rgba(21,86,255,.65) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(21,86,255,.38) 1px, transparent 1px);
  background-size: 25% 100%, 100% 20px;
}

.best-agent-content.show-agent-grid .best-agent-copy-panel {
  background-image:
    linear-gradient(to right, transparent 39px, rgba(21,86,255,.65) 40px, transparent 41px),
    linear-gradient(to left, transparent 39px, rgba(21,86,255,.65) 40px, transparent 41px),
    linear-gradient(to bottom, rgba(21,86,255,.38) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 20px;
}

@media (max-width: 760px) {
  .modal-content.best-agent-content {
    width: calc(100vw - 28px);
    max-height: calc(100dvh - 20px);
    overflow-y: auto;
  }

  .best-agent-controls {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .best-agent-hero-card,
  .best-agent-copy-panel {
    grid-template-columns: 1fr;
  }

  .best-agent-hero-badge,
  .best-agent-selected-icon {
    display: none;
  }

  .best-agent-other-list {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .best-agent-content .best-agent-title {
    padding: 13px 18px 12px;
  }

  .best-agent-content .best-agent-title {
    font-size: 1.28rem;
  }

  .best-agent-body {
    padding: 14px 14px 0;
  }

  .best-agent-hero-main h3 {
    font-size: 1.38rem;
  }

  .best-agent-other-list {
    grid-template-columns: 1fr;
  }

  .best-agent-content .best-agent-copy-message,
  .best-agent-content .best-agent-review,
  .best-agent-content .best-agent-grid-toggle,
  .best-agent-content .best-agent-close {
    width: 100%;
  }
}
