.rct-grid,
.rct-grid * {
  box-sizing: border-box;
}

body.rct-target-page #content.container {
  width: min(1400px, calc(100% - 32px));
  max-width: 1400px;
}

body.rct-target-page #primary.content-area {
  width: 100% !important;
  max-width: 100% !important;
  flex: 0 0 100% !important;
}

body.rct-target-page #secondary.widget-area {
  display: none !important;
}

.rct-grid {
  --rct-green: #007a42;
  --rct-green-dark: #005d33;
  --rct-blue: #1367d1;
  --rct-ink: #1f2a2e;
  --rct-muted: #5d696e;
  --rct-line: #d9e0e2;
  --rct-soft: #f5f7f6;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, 1fr);
  gap: 28px;
  align-items: start;
  width: 100%;
  margin: 28px 0 40px;
  color: var(--rct-ink);
  font-family: inherit;
}

.rct-form-column {
  min-width: 0;
}

/* No quote form was found to sit beside, so the panel stands on its own. */
.rct-grid-solo {
  grid-template-columns: minmax(0, 1fr);
  max-width: 560px;
}

.rct-panel {
  border: 1px solid var(--rct-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(29, 47, 55, 0.08);
}

/* Sits inside the panel between the header and the map, not as its own card. */
.rct-location-card {
  margin: 0;
  padding: 16px 22px 18px;
  border-bottom: 1px solid var(--rct-line);
  background: var(--rct-soft);
}

.rct-location-label {
  display: block;
  margin: 0 0 8px;
  color: var(--rct-ink);
  font-size: 15px;
  font-weight: 700;
}

/* Sits under the input, as a hint rather than an instruction. */
.rct-location-help {
  margin: 8px 0 0;
  color: var(--rct-muted);
  font-size: 12px;
  line-height: 1.45;
}

.rct-location-controls {
  display: flex;
  gap: 10px;
}

.rct-location-input {
  min-width: 0;
  flex: 1;
  height: 44px;
  padding: 9px 12px;
  border: 1px solid #aeb9bd;
  border-radius: 6px;
  background: #fff;
  color: var(--rct-ink);
  font: inherit;
  font-size: 15px;
}

.rct-location-input:focus {
  border-color: var(--rct-blue);
  outline: 3px solid rgba(19, 103, 209, 0.16);
}

.rct-check-button {
  min-height: 44px;
  padding: 9px 18px;
  border: 0;
  border-radius: 6px;
  background: var(--rct-green);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  white-space: nowrap;
}

.rct-check-button:hover,
.rct-check-button:focus-visible {
  background: var(--rct-green-dark);
}

.rct-check-button:focus-visible {
  outline: 3px solid rgba(0, 122, 66, 0.24);
  outline-offset: 2px;
}

.rct-check-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.rct-location-error {
  margin: 10px 0 0;
  color: #9b2020;
  font-size: 14px;
  font-weight: 600;
}

/*
 * The quote form is never dimmed, covered or made non-interactive. There is
 * deliberately no rule here that can disable it.
 */

.rct-panel {
  position: sticky;
  top: 20px;
  overflow: hidden;
}

.rct-panel-header {
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--rct-line);
}

.rct-eyebrow {
  margin: 0 0 4px;
  color: var(--rct-green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rct-panel h2 {
  margin: 0;
  color: var(--rct-ink);
  font-size: 24px;
  line-height: 1.2;
}

.rct-map-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 1158 / 727;
  background: #f2f4f2;
}

.rct-map {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.rct-map-marker {
  position: absolute;
  z-index: 3;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--rct-blue);
  box-shadow: 0 0 0 2px rgba(19, 103, 209, 0.88), 0 3px 8px rgba(0, 0, 0, 0.4);
}

.rct-map-marker::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
}

.rct-map-loading {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  background: rgba(250, 251, 250, 0.82);
  color: var(--rct-ink);
  font-weight: 700;
}

.rct-map-loading[hidden],
.rct-map-marker[hidden] {
  display: none;
}

.rct-legend {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 7px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.5);
  border-bottom: 1px solid var(--rct-line);
  background: #fff;
  color: var(--rct-muted);
  font-size: 11px;
}

.rct-legend i {
  display: block;
  height: 8px;
  border-radius: 10px;
  background: linear-gradient(90deg, #6897a0 0%, #69b897 20%, #c2d29d 40%, #efe0a3 50%, #d8a770 60%, #9f443e 80%, #741334 100%);
}

.rct-result {
  margin: 0;
  padding: 20px 22px;
  border-bottom: 1px solid var(--rct-line);
}

.rct-result p {
  margin-top: 0;
}

.rct-result-initial,
.rct-result-loading {
  color: var(--rct-muted);
}

.rct-result-location {
  margin-bottom: 18px;
  font-size: 15px;
  font-weight: 700;
}

.rct-precision {
  display: inline-block;
  margin-left: 7px;
  padding: 3px 7px;
  border-radius: 100px;
  background: #e9eff2;
  color: #43545b;
  font-size: 11px;
  font-weight: 700;
  vertical-align: 1px;
}

.rct-value-label {
  margin-bottom: 1px;
  color: var(--rct-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.rct-value {
  margin-bottom: 15px;
  color: var(--rct-ink);
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
}

.rct-result-title {
  margin: 0 0 7px;
  color: var(--rct-ink);
  font-size: 19px;
  line-height: 1.25;
}

.rct-result-copy,
.rct-boundary-note {
  margin-bottom: 0;
  color: #3f4d52;
  font-size: 14px;
  line-height: 1.55;
}

.rct-class-439_preliminary {
  border-left: 5px solid #16834c;
}

.rct-class-316l_preliminary {
  border-left: 5px solid #8a2839;
}

.rct-class-roofinox_review,
.rct-result-error {
  border-left: 5px solid #d28a00;
}

.rct-boundary-note {
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: 5px;
  background: #fff4d8;
  color: #66501f;
  font-weight: 650;
}

.rct-source,
.rct-disclaimer,
.rct-no-endorsement {
  margin: 0;
  padding-right: 22px;
  padding-left: 22px;
  color: var(--rct-muted);
  font-size: 11px;
  line-height: 1.5;
}

.rct-source {
  padding-top: 14px;
  padding-bottom: 7px;
}

/*
 * The verbatim Census citation is a span inside .rct-source, so it inherits that
 * paragraph's size, colour and indent. Deliberately not styled through a class of
 * its own -- a rule an older cached stylesheet would not carry.
 */

.rct-source a {
  color: var(--rct-green-dark);
  text-decoration: underline;
}

.rct-disclaimer {
  padding-top: 0;
  padding-bottom: 7px;
}

.rct-no-endorsement {
  padding-top: 0;
  padding-bottom: 18px;
  font-style: italic;
}

@media (max-width: 980px) {
  .rct-grid {
    grid-template-columns: 1fr;
  }

  .rct-panel {
    position: static;
  }
}

@media (max-width: 560px) {
  .rct-grid {
    gap: 20px;
  }

  .rct-location-controls {
    display: grid;
  }

  .rct-check-button {
    width: 100%;
  }

  .rct-panel-header,
  .rct-result,
  .rct-location-card {
    padding-right: 16px;
    padding-left: 16px;
  }

  .rct-source,
  .rct-disclaimer,
  .rct-no-endorsement {
    padding-right: 16px;
    padding-left: 16px;
  }
}
