.rat-tool,
.rat-tool * {
  box-sizing: border-box;
}

.rat-assessment-page .small-search {
  display: none !important;
}

.rat-tool {
  --rat-navy: #1a2b56;
  --rat-red: #e13729;
  --rat-red-dark: #bd352c;
  --rat-ink: #0a0a0d;
  --rat-muted: #484848;
  --rat-line: #d9d9d9;
  display: grid;
  grid-template-columns: minmax(250px, 0.72fr) minmax(430px, 1.28fr);
  width: calc(100% - 40px);
  max-width: 1080px;
  margin: 56px auto;
  min-height: 630px;
  overflow: hidden;
  color: var(--rat-ink);
  background: #fff;
  border: 1px solid var(--rat-line);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(26, 43, 86, 0.12);
  font-family: "DM Sans", Helvetica, Arial, Lucida, sans-serif;
}

.rat-tool.rat-results-view {
  grid-template-columns: 1fr;
}

.rat-tool.rat-results-view .rat-intro {
  display: none;
}

.rat-tool.rat-results-view .rat-panel {
  margin: 20px;
}

.rat-intro {
  align-self: center;
  padding: 55px 45px;
  color: #fff;
  background: var(--rat-navy);
  border-right: 0;
}

.rat-kicker,
.rat-panel-heading > span,
.rat-results-heading > span {
  display: block;
  margin-bottom: 14px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.rat-tool .rat-intro h2 {
  margin: 0 0 18px;
  color: #fff !important;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.rat-tool .rat-intro p {
  color: #fff !important;
  font-size: 16px;
  line-height: 1.65;
}

.rat-tool .rat-intro ul {
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  color: #fff !important;
  font-size: 13px;
  line-height: 2.2;
}

.rat-intro li::before {
  content: "✓";
  margin-right: 9px;
  color: var(--rat-red);
  font-weight: 800;
}

.rat-panel {
  align-self: center;
  margin: 20px;
  min-height: 540px;
  padding: 34px;
  color: var(--rat-ink);
  background: #fff;
  border: 1px solid var(--rat-line);
  border-radius: 4px;
  box-shadow: none;
}

.rat-panel-heading h3,
.rat-scanning h3,
.rat-results h3 {
  margin: 7px 0;
  color: var(--rat-navy);
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.rat-panel-heading > span,
.rat-results-heading > span {
  display: inline-flex;
  padding: 6px 9px;
  color: #fff;
  background: var(--rat-navy);
  border-radius: 3px;
  font-size: 9px;
}

.rat-panel-heading p,
.rat-results-heading p,
.rat-scanning p {
  margin: 0 0 22px;
  color: var(--rat-muted);
  font-size: 13px;
  line-height: 1.5;
}

.rat-scanning .rat-scan-time {
  margin-top: -10px;
  color: #777777;
  font-size: 11px;
}

.rat-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 15px;
  color: #4f6073;
  font-size: 12px;
  font-weight: 700;
}

.rat-form label em {
  color: #8b98a6;
  font-size: 10px;
  font-style: normal;
  font-weight: 400;
}

.rat-form input[type="text"],
.rat-form input[type="email"],
.rat-form input[type="tel"],
.rat-form input[type="url"] {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  color: var(--rat-ink);
  background: #fff;
  border: 1px solid #ccd9e6;
  border-radius: 8px;
  outline: none;
}

.rat-place-autocomplete-host,
.rat-business-search {
  display: block;
  width: 100%;
}

.rat-business-search {
  min-height: 48px;
  color: var(--rat-ink);
  background: #fff;
  border: 1px solid #ccd9e6;
  border-radius: 8px;
}

.rat-business-search:focus-within {
  border-color: var(--rat-navy);
  box-shadow: 0 0 0 3px rgba(26, 43, 86, 0.14);
}

.rat-form input:focus {
  border-color: var(--rat-navy);
  box-shadow: 0 0 0 3px rgba(26, 43, 86, 0.14);
}

.rat-form input:-webkit-autofill,
.rat-form input:-webkit-autofill:hover,
.rat-form input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--rat-ink);
  -webkit-box-shadow: 0 0 0 1000px #fff inset;
  transition: background-color 9999s ease-out;
}

.rat-form small {
  color: #667587;
  font-size: 10px;
  font-weight: 400;
}

.rat-form small a {
  color: #344b69;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.rat-form small a:hover,
.rat-form small a:focus {
  color: var(--rat-navy);
}

.rat-share-fallback {
  margin: -5px 0 15px;
  color: #5d6b7c;
  font-size: 11px;
}

.rat-share-fallback summary {
  width: fit-content;
  color: var(--rat-navy);
  cursor: pointer;
  font-weight: 700;
}

.rat-share-fallback label {
  margin-top: 12px;
}

.pac-container {
  z-index: 100000 !important;
  margin-top: 4px;
  border: 1px solid #ccd9e6;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(26, 43, 86, 0.18);
  font-family: "DM Sans", Helvetica, Arial, Lucida, sans-serif;
}

.pac-item {
  padding: 9px 12px;
  color: #4f6073;
  font-size: 13px;
  line-height: 1.45;
  cursor: pointer;
}

.pac-item:hover,
.pac-item-selected {
  background: #f1f4f9;
}

.pac-item-query {
  color: #1a2b56;
  font-size: 14px;
}

.rat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.rat-consent {
  flex-direction: row !important;
  align-items: flex-start;
  gap: 9px !important;
  font-weight: 400 !important;
  line-height: 1.4;
}

.rat-consent input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
}

.rat-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.rat-button,
.rat-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none !important;
  cursor: pointer;
}

.rat-button {
  width: 100%;
  color: #fff !important;
  background: var(--rat-red);
  border: 0;
  box-shadow: 0 8px 18px rgba(225, 55, 41, 0.22);
}

.rat-button:hover,
.rat-button:focus {
  color: #fff !important;
  background: var(--rat-red-dark);
}

.rat-secondary {
  color: var(--rat-navy);
  background: #fff;
  border: 1px solid var(--rat-navy);
}

.rat-assurances {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 12px;
  color: #7d8c9c;
  font-size: 10px;
}

.rat-assurances span::before {
  content: "✓";
  margin-right: 5px;
  color: var(--rat-red);
}

.rat-error,
.rat-setup-warning {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 7px;
  font-size: 11px;
}

.rat-error {
  color: #8f3232;
  background: #fff0f0;
  border: 1px solid #f4caca;
}

.rat-setup-warning {
  color: #805916;
  background: #fff6df;
  border: 1px solid #f2dda8;
}

.rat-scanning {
  min-height: 470px;
  text-align: center;
}

.rat-scanning:not([hidden]) {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.rat-spinner {
  position: relative;
  width: min(250px, 80%);
  padding: 20px 24px 25px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--rat-line);
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(26, 43, 86, 0.12);
  animation: rat-pulse 1.6s ease-in-out infinite;
}

.rat-spinner img {
  display: block;
  width: 100%;
  height: auto;
}

.rat-spinner::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--rat-navy) 0 50%, var(--rat-red) 50% 100%);
}

.rat-scan-label {
  margin-top: 23px;
  color: var(--rat-navy);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.rat-progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  background: #eaf0f6;
  border-radius: 99px;
}

.rat-progress i {
  display: block;
  width: 12%;
  height: 100%;
  background: var(--rat-red);
  border-radius: inherit;
  transition: width 0.5s ease;
}

.rat-scan-steps {
  display: flex;
  width: 100%;
  justify-content: space-between;
  margin-top: 12px;
  color: #8d9baa;
  font-size: 10px;
}

.rat-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
  margin: 22px 0 17px;
}

.rat-metrics > div {
  display: flex;
  flex-direction: column;
  padding: 16px;
  background: #f4f8fb;
  border-radius: 10px;
}

.rat-metrics span,
.rat-metrics small {
  color: #7b8999;
  font-size: 10px;
}

.rat-metrics strong {
  margin: 6px 0 3px;
  color: var(--rat-navy);
  font-size: 27px;
}

.rat-opportunity {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 18px;
  padding: 14px 16px;
  color: var(--rat-navy);
  background: #f7f7f7;
  border: 1px solid var(--rat-line);
  border-radius: 10px;
  font-size: 11px;
}

.rat-opportunity small {
  grid-column: 1 / -1;
  color: var(--rat-muted);
  font-size: 9px;
}

.rat-review-list {
  margin-top: 20px;
}

.rat-list-label {
  padding-bottom: 8px;
  color: #7c8a99;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rat-review {
  display: grid;
  grid-template-columns: 145px 1fr 115px;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--rat-line);
}

.rat-reviewer {
  display: flex;
  align-items: center;
  gap: 9px;
}

.rat-reviewer > b {
  display: grid;
  flex: 0 0 auto;
  width: 29px;
  height: 29px;
  place-items: center;
  color: #fff;
  background: var(--rat-navy);
  border-radius: 50%;
  font-size: 10px;
}

.rat-reviewer span {
  display: flex;
  flex-direction: column;
}

.rat-reviewer strong {
  color: var(--rat-navy);
  font-size: 10px;
}

.rat-reviewer small {
  color: #8a98a7;
  font-size: 8px;
}

.rat-stars {
  display: inline-flex;
  gap: 1px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14.3px;
  line-height: 1;
  letter-spacing: 0;
}

.rat-stars-filled {
  color: #fbbc04;
}

.rat-stars-empty {
  color: #dadce0;
}

.rat-review p {
  margin: 4px 0;
  color: #627286;
  font-size: 10px;
  line-height: 1.4;
}

.rat-review a {
  color: var(--rat-red);
  font-size: 9px;
}

.rat-review > em {
  justify-self: end;
  padding: 6px 8px;
  color: #176438;
  background: #e3f5e9;
  border-radius: 99px;
  font-size: 8px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

@media (min-width: 901px) {
  .rat-results-heading > span {
    font-size: 14.4px;
  }

  .rat-results-heading h3 {
    font-size: 44.8px;
  }

  .rat-results-heading p {
    font-size: 20.8px;
  }

  .rat-metrics span,
  .rat-metrics small {
    font-size: 16px;
  }

  .rat-opportunity {
    font-size: 17.6px;
  }

  .rat-opportunity small,
  .rat-list-label,
  .rat-review a {
    font-size: 14.4px;
  }

  .rat-reviewer > b,
  .rat-reviewer strong,
  .rat-review p {
    font-size: 16px;
  }

  .rat-reviewer small,
  .rat-review > em {
    font-size: 12.8px;
  }

  .rat-review {
    grid-template-columns: 175px minmax(0, 1fr) 145px;
  }

  .rat-review > em {
    padding: 10px 14px;
  }
}

.rat-result-actions {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.rat-lead-confirmation {
  margin-top: 14px;
  padding: 18px 20px;
  color: var(--rat-navy);
  background: #f4f7fb;
  border: 1px solid #cbd6e5;
  border-radius: 8px;
}

.rat-lead-confirmation strong,
.rat-lead-confirmation span {
  display: block;
}

.rat-lead-confirmation strong {
  margin-bottom: 5px;
  font-size: 18px;
}

.rat-lead-confirmation span {
  font-size: 14px;
  line-height: 1.5;
}

.rat-lead-confirmation.is-complete {
  color: #164f30;
  background: #e8f6ed;
  border-color: #b9ddc6;
}

.rat-lead-confirmation.is-error {
  color: #8f3232;
  background: #fff0f0;
  border-color: #f4caca;
}

.rat-lead-confirmation a {
  color: inherit;
  font-weight: 800;
}

.rat-empty {
  padding: 24px;
  color: #52677b;
  background: #f4f8fb;
  border-radius: 10px;
  text-align: center;
}

@keyframes rat-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.985); opacity: 0.82; }
}

@media (max-width: 900px) {
  .rat-tool {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
  }

  .rat-intro,
  .rat-panel,
  .rat-form,
  .rat-panel-heading,
  .rat-place-autocomplete-host,
  .rat-business-search {
    min-width: 0;
    max-width: 100%;
  }

  .rat-tool h2,
  .rat-tool h3,
  .rat-tool p,
  .rat-tool li,
  .rat-tool label,
  .rat-tool small {
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .rat-intro {
    padding: 42px 32px;
    border-right: 0;
    border-bottom: 0;
  }

  .rat-panel {
    margin: 18px;
  }
}

@media (max-width: 620px) {
  .rat-tool {
    width: calc(100% - 28px);
    max-width: calc(100vw - 28px);
    margin: 32px auto;
    border-radius: 14px;
  }

  .rat-intro,
  .rat-panel {
    padding: 25px 20px;
  }

  .rat-panel {
    width: auto;
    margin: 14px;
  }

  .rat-business-search {
    width: 100% !important;
    max-width: 100% !important;
  }

  .rat-panel-heading > span {
    padding: 8px 11px;
    font-size: 12px;
  }

  .rat-panel-heading h3,
  .rat-scanning h3 {
    font-size: 34px;
    line-height: 1.15;
  }

  .rat-panel-heading p,
  .rat-scanning p {
    margin-bottom: 26px;
    font-size: 18px;
    line-height: 1.5;
  }

  .rat-form label {
    gap: 9px;
    margin-bottom: 22px;
    font-size: 17px;
  }

  .rat-form label em,
  .rat-form small {
    font-size: 14px;
    line-height: 1.5;
  }

  .rat-form input[type="text"],
  .rat-form input[type="email"],
  .rat-form input[type="tel"],
  .rat-form input[type="url"] {
    height: 58px;
    padding: 0 16px;
    font-size: 18px;
  }

  .rat-consent {
    gap: 12px !important;
    font-size: 16px !important;
    line-height: 1.5;
  }

  .rat-consent input {
    width: 23px;
    height: 23px;
    margin-top: 1px;
  }

  .rat-button,
  .rat-secondary {
    min-height: 58px;
    padding: 0 18px;
    font-size: 17px;
  }

  .rat-assurances {
    font-size: 14px;
    line-height: 1.45;
  }

  .rat-error,
  .rat-setup-warning {
    padding: 13px 14px;
    font-size: 14px;
    line-height: 1.45;
  }

  .rat-tool .rat-intro p,
  .rat-tool .rat-intro ul {
    font-size: 16px;
  }

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

  .rat-review {
    grid-template-columns: 1fr;
  }

  .rat-results-heading > span {
    font-size: 13px;
  }

  .rat-results-heading h3 {
    font-size: 36px;
    line-height: 1.12;
  }

  .rat-results-heading p {
    font-size: 17px;
    line-height: 1.45;
  }

  .rat-metrics span,
  .rat-metrics small {
    font-size: 15px;
  }

  .rat-opportunity {
    grid-template-columns: 1fr;
    font-size: 16px;
    line-height: 1.45;
  }

  .rat-opportunity small,
  .rat-list-label,
  .rat-review a {
    font-size: 14px;
  }

  .rat-reviewer > b,
  .rat-reviewer strong,
  .rat-review p {
    font-size: 16px;
  }

  .rat-reviewer small,
  .rat-review > em {
    font-size: 13px;
  }

  .rat-review p {
    line-height: 1.55;
  }

  .rat-review > em {
    justify-self: start;
    padding: 10px 14px;
  }

  .rat-assurances,
  .rat-scan-steps {
    flex-direction: column;
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rat-spinner {
    animation: none;
  }
}
