/* Final UI contract. Keep repeated components here instead of page-specific files. */
:root {
  --ui-base-size: 16px;
  --ui-helper-size: 13px;
  --ui-font: "CruinnRegular", "Cruinn", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ui-display-font: "DaMiOne", "Cruinn", Inter, sans-serif;
}

html,
body,
button,
input,
select,
textarea {
  font-family: var(--ui-font);
}

body {
  font-size: var(--ui-base-size);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/*
 * Shared content-driven panel contract.
 * Text may increase a card's height, but it must never increase its width or
 * overlap the following section.
 */
:where(
  .hero,
  .hero-shell,
  .hero-copy,
  .hero-side,
  .hero-note,
  .hero-metrics,
  .hero-metrics article,
  .trust-compact,
  .trust-compact-grid,
  .trust-compact-card,
  .work-steps,
  .work-steps-grid,
  .work-step-card,
  .lead,
  .lead-copy,
  .lead-form,
  .card,
  .calculator,
  .prose,
  .legal-document,
  .intent-grid,
  .intent-grid > *,
  .footer-card
) {
  min-width: 0;
  max-width: 100%;
  height: auto;
}

:where(
  .hero,
  .hero-note,
  .hero-metrics article,
  .trust-compact,
  .trust-compact-card,
  .work-steps,
  .work-step-card,
  .lead,
  .lead-form,
  .lead-form-head,
  .card,
  .calculator,
  .prose,
  .legal-document,
  .intent-grid > *
) {
  padding: var(--site-panel-padding, 14px) !important;
}

:where(
  .hero-copy,
  .hero-side,
  .hero-note,
  .hero-metrics article,
  .trust-compact-card,
  .work-step-card,
  .lead-copy,
  .lead-form,
  .card,
  .calculator,
  .prose,
  .legal-document,
  .intent-grid > *,
  .footer-card
) > * {
  min-width: 0;
  max-width: 100%;
}

:where(
  .hero,
  .hero-note,
  .hero-metrics article,
  .trust-compact-card,
  .work-step-card,
  .lead,
  .card,
  .calculator,
  .prose,
  .legal-document,
  .intent-grid > *,
  .footer-card
) :is(h1, h2, h3, h4, p, strong, span, a, li, dt, dd, label) {
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: normal;
}

/* Hover/reveal feedback must not move panels and change perceived gaps. */
:where(
  .hero-note,
  .hero-metrics article,
  .trust-compact-card,
  .work-step-card,
  .card
):hover {
  transform: none !important;
}

/* Main hero: equal outer padding and content-driven rows. */
.hero.hero-single {
  min-height: 0 !important;
  align-items: stretch;
}

.hero.hero-single .hero-shell {
  width: 100%;
  gap: var(--site-section-gap, 14px) !important;
  align-items: stretch;
}

.hero.hero-single .hero-copy {
  display: flex;
  flex-direction: column;
}

.hero.hero-single .hero-side {
  align-self: end;
  align-content: normal;
  gap: 10px;
  margin-top: auto !important;
}

.hero.hero-single .hero-note {
  min-height: 156px !important;
  justify-content: flex-end;
}

.hero.hero-single .hero-metrics article {
  min-height: 126px !important;
  justify-content: flex-start !important;
}

.hero.hero-single .hero-note-label {
  margin-bottom: 10px;
}

.hero.hero-single .hero-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
}

.hero.hero-single .hero-metrics article {
  gap: 6px;
}

.hero.hero-single .hero-metrics strong {
  margin-bottom: 4px !important;
}

.hero.hero-single .hero-metrics strong,
.hero.hero-single .hero-metrics span {
  display: block;
  width: auto !important;
  max-width: 100% !important;
  white-space: normal !important;
}

/* Direction buttons: countries on the first row, service buttons on the second row. */
.hero.hero-single .hero-status-line {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  max-width: 820px;
}

.hero.hero-single .hero-status-row {
  display: grid;
  gap: 10px;
  align-items: stretch;
  min-width: 0;
}

.hero.hero-single .hero-status-row-countries {
  grid-template-columns: 1.05fr .82fr 1fr 1fr 1fr;
}

.hero.hero-single .hero-status-row-services {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  width: 100%;
  max-width: none;
}

.hero.hero-single .hero-status-line span {
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  height: auto;
  padding: 8px 10px;
  font-size: .86rem;
  line-height: 1.15;
  letter-spacing: .06em;
  text-align: center;
  white-space: nowrap;
  overflow-wrap: anywhere;
}

/* A textarea may grow only downwards and must never overlap an adjacent column. */
textarea,
.lead textarea,
.lead-form textarea {
  display: block;
  max-width: 100%;
  min-width: 0;
  resize: vertical;
}

.lead-message-field {
  min-width: 0;
  overflow: hidden;
}

.form-validation-tip {
  position: absolute;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 20px);
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .018)),
    #050505;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .08),
    0 14px 34px rgba(0, 0, 0, .42);
  color: rgba(255, 255, 255, .92);
  font: 500 14px/1.35 var(--ui-font);
  pointer-events: none;
}

.form-validation-tip[hidden] {
  display: none;
}

.form-validation-tip::before {
  content: "";
  position: absolute;
  left: 18px;
  bottom: -7px;
  width: 14px;
  height: 14px;
  border-right: 1px solid rgba(255, 255, 255, .18);
  border-bottom: 1px solid rgba(255, 255, 255, .18);
  background: #050505;
  transform: rotate(45deg);
}

.form-validation-tip__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, .20);
  border-radius: 8px;
  background: rgba(255, 255, 255, .07);
  color: #fff;
  font: 800 16px/1 var(--ui-font);
}

.form-validation-tip__text {
  min-width: 0;
}

/* Browser autofill must preserve the dark visual language. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  -webkit-text-fill-color: rgba(244, 244, 241, .94);
  caret-color: #fff;
  box-shadow: 0 0 0 1000px #171717 inset !important;
  -webkit-box-shadow: 0 0 0 1000px #171717 inset !important;
  transition: background-color 99999s ease-out 0s;
}

.lead label,
.calculator label,
.lead-form label > span {
  font-family: var(--ui-display-font);
  font-weight: 400;
}

.lead h2 {
  font-family: var(--ui-display-font);
  font-size: clamp(2rem, 3.6vw, 2.88rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: .01em;
}

.lead label,
.lead-form label > span {
  color: rgba(244, 244, 241, .82);
  font-size: .95rem;
  line-height: 1.2;
}

input,
select,
textarea,
input::placeholder,
textarea::placeholder,
.helptext,
.consent-note,
.policy-note {
  font-family: var(--ui-font);
}

input::placeholder,
textarea::placeholder {
  color: rgba(244, 244, 241, .46);
  font-size: 1rem;
  font-weight: 400;
}

.helptext {
  font-size: var(--ui-helper-size);
}

.policy-note a,
.policy-consent a,
.consent-note a,
.lead .consent-note a,
.legal-document a {
  color: #fff !important;
  text-decoration-color: rgba(255, 255, 255, .46) !important;
}

.card > :first-child,
.hero > :first-child,
.prose > :first-child,
.legal-document > :first-child,
.lead > :first-child,
.calculator > :first-child {
  margin-top: 0 !important;
}

.card > :last-child,
.hero > :last-child,
.prose > :last-child,
.legal-document > :last-child,
.lead > :last-child,
.calculator > :last-child {
  margin-bottom: 0 !important;
}

.wrap .card {
  padding: var(--site-panel-padding, 14px) !important;
}

.wrap .intent-grid {
  gap: var(--site-section-gap, 14px) !important;
}

/* Decorative arcs stay inside CMS hero panels and cannot widen the page. */
.wrap > .hero {
  overflow: clip;
}

.wrap > .hero::before {
  content: none !important;
  display: none !important;
}

.wrap > .hero > p:not(.eyebrow) {
  margin-bottom: var(--site-section-gap, 14px) !important;
}

.wrap > .hero > p:not(.eyebrow) + .button {
  margin-top: 0 !important;
}

.trust-compact-grid,
.work-steps-grid,
.intent-grid {
  align-items: stretch;
  gap: 10px !important;
}

.trust-compact-card,
.work-step-card,
.intent-grid > * {
  align-self: stretch;
  min-height: 0 !important;
}

.lead-form-head span {
  white-space: normal !important;
}

/* CMS model catalogue and detail pages. */
.model-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.model-card-media,
.model-hero-media,
.model-related-card img {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 18px;
  background: #080808;
}

.model-card-media {
  aspect-ratio: 12 / 7;
  margin: 0;
}

.model-card-media img,
.model-hero-media img,
.model-related-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.model-card h3,
.model-card p {
  margin: 0;
}

.model-card .button {
  align-self: flex-start;
  margin-top: auto;
}

.wrap > .model-index-list {
  margin-top: calc(var(--site-section-gap, 14px) * 2) !important;
}

body[data-page-type="model"] .wrap > .hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .78fr);
  gap: 14px;
  align-items: center;
}

.model-hero-copy {
  min-width: 0;
}

.model-hero-media {
  margin: 0;
}

.model-hero-media img {
  aspect-ratio: 23 / 14;
}

.model-gallery-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.model-gallery-thumb {
  flex: 0 0 84px;
  aspect-ratio: 3 / 2;
  min-width: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 12px;
  background: rgba(255, 255, 255, .04);
  overflow: hidden;
  cursor: pointer;
  opacity: .72;
  transition: opacity 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.model-gallery-thumb:hover,
.model-gallery-thumb.is-active {
  opacity: 1;
  border-color: rgba(255, 255, 255, .34);
}

.model-gallery-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.model-hero-media figcaption {
  margin: 0;
  padding: 8px 10px;
  color: rgba(244, 244, 241, .55);
  font-size: var(--ui-helper-size);
  line-height: 1.35;
}

.model-related-card {
  display: grid;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.model-related-card img {
  aspect-ratio: 12 / 7;
}

/* The footer below is the only footer geometry used by every route. */
footer.footer.footer-modern {
  width: min(calc(var(--app-vw, 100vw) - 32px), 1240px);
  margin: var(--site-section-gap, 14px) auto 0 !important;
  padding: 0 0 14px;
}

footer.footer.footer-modern .footer-layout.footer-layout-compact {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch !important;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 30px;
  background: rgba(255, 255, 255, .035);
  backdrop-filter: blur(20px);
}

footer.footer.footer-modern .footer-layout > .footer-card,
footer.footer.footer-modern .footer-layout > .footer-card.rates-card {
  display: flex !important;
  flex-direction: column;
  min-width: 0;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 14px !important;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 24px;
  background: rgba(0, 0, 0, .18);
}

footer.footer.footer-modern .footer-card h2,
footer.footer.footer-modern .rates-title {
  margin: 0 !important;
  color: rgba(244, 244, 241, .95);
  font-family: var(--ui-display-font);
  font-size: .88rem !important;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: .1em;
  text-transform: uppercase;
}

footer.footer.footer-modern .footer-contacts,
footer.footer.footer-modern .footer-company {
  gap: 7px;
  justify-content: flex-start;
}

footer.footer.footer-modern .footer-contacts > a,
footer.footer.footer-modern .footer-contacts > span,
footer.footer.footer-modern .footer-company > span {
  color: rgba(244, 244, 241, .72);
  font-family: var(--ui-font);
  font-size: .86rem;
  line-height: 1.4;
}

footer.footer.footer-modern .footer-messengers {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

footer.footer.footer-modern .footer-messenger-button {
  display: inline-grid !important;
  grid-template-columns: 18px auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  color: rgba(244, 244, 241, .9);
  font-size: .86rem;
  line-height: 1;
  text-decoration: none;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

footer.footer.footer-modern .footer-messenger-button:hover,
footer.footer.footer-modern .footer-messenger-button:focus-visible {
  border-color: rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .11);
}

footer.footer.footer-modern .messenger-icon {
  display: block;
  width: 18px !important;
  height: 18px !important;
  margin: 0;
  fill: currentColor;
  object-fit: contain;
  transition: color .2s ease, filter .2s ease, opacity .2s ease;
}

footer.footer.footer-modern .footer-messenger-button:hover .messenger-icon-telegram { color: #2aabee; filter: drop-shadow(0 0 7px #2aabee); }
footer.footer.footer-modern .footer-messenger-button:hover .messenger-icon-whatsapp { color: #25d366; filter: drop-shadow(0 0 7px #25d366); }
footer.footer.footer-modern .footer-messenger-button:hover .messenger-icon-vk { color: #4c75a3; filter: drop-shadow(0 0 7px #4c75a3); }
footer.footer.footer-modern .footer-messenger-button:hover .messenger-icon-max { filter: drop-shadow(0 0 7px #6e5cff) drop-shadow(0 0 4px #00bfff); opacity: 1; }

footer.footer.footer-modern .rates-list {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  width: 100%;
}

footer.footer.footer-modern .rates-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 8px !important;
}

footer.footer.footer-modern .rates-source {
  font-size: .72rem;
  white-space: nowrap;
}

footer.footer.footer-modern .rates-source-block {
  display: grid;
  flex: 1 1 auto;
  align-content: center;
  min-width: 0;
  margin: 0;
  padding: 10px;
  border-radius: 20px;
}

footer.footer.footer-modern .rates-source-warning {
  justify-items: center;
  color: rgba(244, 244, 241, .72);
  font-size: .82rem;
  line-height: 1.4;
  text-align: center;
  overflow: hidden;
}

footer.footer.footer-modern .rates-source-warning span {
  display: block;
  max-width: 100%;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

footer.footer.footer-modern .rates-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 8px;
}

footer.footer.footer-modern .rate-row {
  min-height: 28px;
  padding: 5px 9px !important;
  gap: 5px;
  font-family: var(--ui-font);
  font-size: .8rem;
  line-height: 1;
  overflow: hidden;
}

footer.footer.footer-modern .rate-row b {
  font-size: .8rem;
  flex: 0 0 auto;
}

footer.footer.footer-modern .rate-value {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

footer.footer.footer-modern .rate-delta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 54px;
  min-height: 18px;
  padding: 2px 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  font-family: var(--ui-font);
  font-size: .78rem;
  line-height: 1;
  letter-spacing: 0;
  color: rgba(244, 244, 241, .9);
  white-space: nowrap;
  transform: translateY(-.04em);
}

footer.footer.footer-modern .rate-delta-up {
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .105);
  color: #fff;
}

footer.footer.footer-modern .rate-delta-down {
  border-color: rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .045);
  color: rgba(244, 244, 241, .72);
}

footer.footer.footer-modern .footer-company {
  align-items: stretch !important;
  justify-content: space-between !important;
  text-align: right;
}

footer.footer.footer-modern .footer-company > * {
  align-self: stretch !important;
  width: auto !important;
  max-width: none !important;
  text-align: right !important;
}

footer.footer.footer-modern .footer-seo-links {
  margin: 10px auto 0 !important;
}

/* Currency code and symbol have identical optical centering. */
.price-currency-control select {
  padding: 0 34px 0 16px !important;
  text-align: center;
  text-align-last: center;
  line-height: 1.2;
}

/* Compact calculator geometry shared by the calculator and all embedded copies. */
.calculator-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

.calculator-grid .calc-country { grid-column: span 3 !important; }
.calculator-grid .calc-brand { grid-column: span 4 !important; }
.calculator-grid .calc-model { grid-column: span 5 !important; }
.calculator-grid .calc-variant { grid-column: 1 / -1 !important; }
.calculator-grid .calc-year { grid-column: span 2 !important; }
.calculator-grid .calc-engine { grid-column: span 3 !important; }
.calculator-grid .calc-volume { grid-column: span 2 !important; }
.calculator-grid .calc-power { grid-column: span 2 !important; }
.calculator-grid .calc-import { grid-column: span 3 !important; }
.calculator-grid.is-electric .calc-import { grid-column: span 5 !important; }
.calculator-grid .calc-price { grid-column: span 6 !important; }
.calculator-grid .calc-city { grid-column: span 4 !important; }
.calculator-grid .calc-submit { grid-column: span 2 !important; align-self: end; }

.calculator-grid .calc-submit .button {
  width: 100%;
  min-height: 52px;
  margin: 0;
}

.calculator-disclaimer {
  max-width: none !important;
  margin: 10px 0 0 !important;
  color: rgba(244, 244, 241, .58);
  font-size: var(--ui-helper-size);
  line-height: 1.45;
}

.calc-field {
  position: relative;
  min-width: 0;
}

select,
select option {
  color-scheme: dark;
}

select option {
  color: rgba(244, 244, 241, .94);
  background: #111;
}

/* Unified dropdown caret: visible in the normal state on every page.
   Older rules in site.css add the icon only on hover/focus, so this final
   contract keeps select-like controls visually consistent without geometry
   changes on hover. */
:root {
  --automost-select-caret: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none'%3E%3Cpath d='M2 2L7 7L12 2' stroke='%23f4f4f1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

select,
.header-city select,
body[data-page-type="calculator"] .header-city select,
input.choice-control {
  appearance: none !important;
  -webkit-appearance: none !important;
  padding-right: 42px !important;
  background-image:
    var(--automost-select-caret),
    linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02)) !important;
  background-position: right 16px center, 0 0 !important;
  background-repeat: no-repeat, no-repeat !important;
  background-size: 14px 9px, 100% 100% !important;
}

select:hover,
select:focus,
select:focus-visible,
.header-city select:hover,
.header-city select:focus,
.header-city select:focus-visible,
body[data-page-type="calculator"] .header-city select:hover,
body[data-page-type="calculator"] .header-city select:focus,
body[data-page-type="calculator"] .header-city select:focus-visible,
input.choice-control:hover,
input.choice-control:focus,
input.choice-control:focus-visible {
  background-image:
    var(--automost-select-caret),
    linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .025)) !important;
  background-position: right 16px center, 0 0 !important;
  background-repeat: no-repeat, no-repeat !important;
  background-size: 14px 9px, 100% 100% !important;
}

select::-ms-expand {
  display: none;
}

.autocomplete-input {
  padding-right: 42px !important;
  background-image:
    var(--automost-select-caret),
    linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02)) !important;
  background-position: right 16px center, 0 0 !important;
  background-repeat: no-repeat !important;
  background-size: 14px 9px, auto !important;
}

.autocomplete-menu {
  position: absolute;
  z-index: 60;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  display: grid;
  max-height: 260px;
  padding: 6px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 16px;
  background: rgba(8, 8, 8, .98);
  box-shadow: 0 18px 38px rgba(0, 0, 0, .48);
  backdrop-filter: blur(18px);
}

.autocomplete-menu[hidden] {
  display: none;
}

.autocomplete-option {
  width: 100%;
  min-height: 38px;
  padding: 8px 11px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: rgba(244, 244, 241, .86);
  font: 0.92rem/1.2 var(--ui-font);
  text-align: left;
  cursor: pointer;
}

.autocomplete-option:hover,
.autocomplete-option:focus-visible,
.autocomplete-option.is-active {
  background: rgba(255, 255, 255, .10);
  color: #fff;
  outline: none;
}

/* Buy-car intent cards: compact tile layout with the shared spacing contract. */
.intent-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--site-section-gap, 14px) !important;
  align-items: stretch;
  margin: var(--site-section-gap, 14px) 0 0 !important;
}

.intent-grid .card {
  display: flex;
  min-width: 0;
  min-height: 138px;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  margin: 0 !important;
  padding: var(--site-panel-padding, 14px) !important;
  overflow: hidden;
}

.intent-grid .card h2 {
  margin: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: clamp(25px, 2.35vw, 38px);
  line-height: .98;
  letter-spacing: -.045em;
}

.intent-grid .card p {
  margin: 0;
  max-width: 100%;
  color: rgba(244, 244, 241, .78);
  font-size: var(--ui-base-size);
  line-height: 1.34;
  overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
  .intent-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .intent-grid {
    grid-template-columns: 1fr;
    gap: 12px !important;
    margin-top: 12px !important;
  }

  .intent-grid .card {
    min-height: 0;
    gap: 8px;
  }

  .intent-grid .card h2 {
    font-size: clamp(25px, 9vw, 34px);
  }
}

/* Sitewide spacing audit: one contract for all primary blocks. */
main > * {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

main > * + * {
  margin-top: var(--site-section-gap, 14px) !important;
}

:where(
  main > .hero,
  main > .trust-compact,
  main > .work-steps,
  main > .showcase-toggle,
  main > .deliveries-showcase,
  main > .lead,
  .wrap > .hero,
  .wrap > .card,
  .wrap > .calculator,
  .wrap > .lead,
  .wrap > .prose,
  .wrap > .legal-document,
  .footer-card
) {
  padding: var(--site-panel-padding, 14px) !important;
}

.hero.hero-single {
  padding: var(--site-panel-padding, 14px) !important;
}

.hero.hero-single .hero-shell {
  gap: var(--site-section-gap, 14px) !important;
}

.hero.hero-single .hero-copy,
.hero.hero-single .hero-side {
  padding: 0 !important;
}

.hero.hero-single .hero-copy > .eyebrow {
  margin: 0 0 var(--site-section-gap, 14px) !important;
}

.hero.hero-single .hero-copy h1 {
  margin-bottom: var(--site-section-gap, 14px) !important;
}

.hero.hero-single .hero-title {
  max-width: none !important;
}

.hero.hero-single .hero-title span {
  display: block;
  white-space: nowrap;
}

.hero.hero-single .hero-text {
  margin-bottom: 0 !important;
}

.hero.hero-single .hero-status-line {
  margin-top: var(--site-section-gap, 14px) !important;
}

.hero.hero-single .hero-note,
.hero.hero-single .hero-metrics article {
  padding: var(--site-panel-padding, 14px) !important;
}

.hero.hero-single .hero-note-label,
.hero.hero-single .hero-note strong {
  margin-bottom: 10px !important;
}

.hero.hero-single .hero-metrics strong {
  margin-bottom: 0 !important;
}

.hero.hero-single .hero-note p,
.hero.hero-single .hero-metrics span {
  margin-bottom: 0 !important;
}

.market-ticker {
  margin: 0 !important;
}

main > * + .market-ticker,
main > .market-ticker + * {
  margin-top: var(--site-section-gap, 14px) !important;
}

@media (max-width: 760px) {
  .header {
    grid-template-columns: minmax(0, 1fr) auto !important;
    max-width: calc(100% - 24px);
    overflow: clip;
  }

  .header .logo-image-link {
    width: 100%;
    min-width: 0;
    max-width: 300px;
  }

  .header .logo-image-link img {
    max-width: 100%;
  }

  .header .header-actions {
    min-width: 0;
    max-width: 100%;
  }

  body[data-page-type="model"] .wrap > .hero {
    grid-template-columns: 1fr;
  }

  .wrap > .model-index-list {
    margin-top: var(--site-section-gap-mobile, 12px) !important;
  }

  .hero.hero-single .hero-shell,
  .hero.hero-single .hero-metrics {
    grid-template-columns: 1fr;
  }

  .hero.hero-single .hero-status-row-countries {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }

  .hero.hero-single .hero-status-row-services {
    grid-template-columns: minmax(0, 1fr);
    max-width: none;
  }

  .hero.hero-single .hero-status-line span {
    width: 100% !important;
  }

  footer.footer.footer-modern .footer-layout.footer-layout-compact {
    grid-template-columns: 1fr;
  }

  footer.footer.footer-modern .footer-company,
  footer.footer.footer-modern .footer-company > * {
    text-align: left !important;
  }

  footer.footer.footer-modern .rates-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calculator-grid > .calc-field {
    grid-column: 1 / -1 !important;
  }
}

/* Mobile compact contract: no red call backgrounds, even buttons, compact cards. */
.floating-call,
body[data-page-type="calculator"] .floating-call {
  border-color: rgba(255, 255, 255, .24) !important;
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, .25), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .04)),
    rgba(7, 7, 7, .86) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .10),
    0 18px 42px rgba(0, 0, 0, .38),
    0 0 34px rgba(255, 255, 255, .14) !important;
}

.floating-call:hover,
.floating-call:focus-visible,
body[data-page-type="calculator"] .floating-call:hover,
body[data-page-type="calculator"] .floating-call:focus-visible {
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, .30), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .045)),
    rgba(7, 7, 7, .88) !important;
}

@media (max-width: 980px) {
  .header-actions .phone,
  body[data-page-type="calculator"] .header-actions .phone {
    display: none !important;
  }
}

@media (max-width: 760px) {
  .hero.hero-single .hero-status-row-countries {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .hero.hero-single .hero-status-row-countries span:first-child {
    display: none !important;
  }

  .hero.hero-single .hero-status-row-services {
    grid-template-columns: 1fr !important;
  }

  .hero.hero-single .hero-metrics {
    gap: 10px !important;
  }

  .hero.hero-single .hero-metrics article {
    min-height: 0 !important;
    padding: 10px 12px !important;
    gap: 4px !important;
  }

  .hero.hero-single .hero-metrics strong {
    margin-bottom: 0 !important;
    line-height: 1.04 !important;
  }

  .hero.hero-single .hero-metrics span {
    line-height: 1.26 !important;
  }

  .work-steps-grid {
    gap: 10px !important;
  }

  .work-step-card {
    min-height: 0 !important;
    padding: 12px 14px !important;
    gap: 8px !important;
  }

  .work-step-number {
    margin-bottom: 6px !important;
  }

  .work-step-card strong {
    margin-bottom: 6px !important;
    max-width: 100% !important;
    line-height: 1.02 !important;
  }

  .work-step-card p,
  .work-step-copy-flow {
    max-width: 100% !important;
    white-space: normal !important;
    line-height: 1.32 !important;
  }

  .work-step-copy-flow span {
    display: inline !important;
  }

  .work-step-copy-flow span + span::before {
    content: " ";
  }

  .floating-call,
  body[data-page-type="calculator"] .floating-call {
    border-color: rgba(255, 255, 255, .24) !important;
    background:
      radial-gradient(circle at 28% 18%, rgba(255, 255, 255, .25), transparent 60%),
      linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .04)),
      rgba(7, 7, 7, .88) !important;
  }

  .header-actions .phone,
  body[data-page-type="calculator"] .header-actions .phone {
    display: none !important;
  }

  .calculator-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }

  .calculator-grid > .calc-field {
    grid-column: 1 / -1 !important;
  }

  .calculator-grid .calc-year,
  .calculator-grid .calc-volume,
  .calculator-grid .calc-power {
    grid-column: span 2 !important;
  }

  .calculator-grid .calc-import {
    grid-column: 1 / -1 !important;
  }

  .calculator-grid .calc-import select {
    width: 100% !important;
    min-width: 0 !important;
    white-space: nowrap !important;
    text-overflow: ellipsis;
  }
}

@media (max-width: 560px) {
  .calculator-grid .calc-year,
  .calculator-grid .calc-volume,
  .calculator-grid .calc-power {
    grid-column: 1 / -1 !important;
  }
}

.cookie-banner {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 80;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: min(520px, calc(100vw - 36px));
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 22px;
  background:
    radial-gradient(circle at 28% 14%, rgba(255, 255, 255, .09), transparent 54%),
    rgba(12, 12, 12, .88);
  box-shadow: 0 18px 56px rgba(0, 0, 0, .42);
  color: rgba(255, 255, 255, .78);
  backdrop-filter: blur(18px);
}

.cookie-banner[hidden] {
  display: none !important;
}

.cookie-banner-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.cookie-banner-title {
  margin: 0;
  color: #fff;
  font-family: var(--brand-font, inherit);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1;
  text-transform: uppercase;
}

.cookie-banner-text {
  margin: 0;
  font-size: var(--ui-helper-size, 13px);
  line-height: 1.45;
}

.cookie-policy-trigger {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, .58);
  text-underline-offset: .18em;
}

.cookie-policy-trigger:hover,
.cookie-policy-trigger:focus-visible {
  color: #fff;
  text-decoration-color: #fff;
}

.cookie-accept {
  min-width: 138px;
  min-height: 48px;
  padding-inline: 22px;
}

.country-route-panel {
  display: grid;
  gap: 14px;
  margin: 0 0 var(--site-section-gap, 14px);
  padding: var(--site-panel-padding, 14px);
  border: 1px solid rgba(255, 255, 255, .105);
  border-radius: clamp(24px, 3vw, 34px);
  background:
    radial-gradient(circle at 84% 78%, rgba(255, 255, 255, .055), transparent 0 28%),
    linear-gradient(180deg, rgba(255, 255, 255, .038), rgba(255, 255, 255, .012)),
    rgba(6, 6, 6, .38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035), 0 18px 58px rgba(0, 0, 0, .34);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.country-route-panel h1,
.country-route-panel p {
  margin: 0;
}

.country-route-panel > p:not(.eyebrow) {
  max-width: 980px;
  color: rgba(255, 255, 255, .76);
  line-height: 1.42;
}

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

.country-route-card {
  display: grid;
  gap: 8px;
  min-height: 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .018)),
    rgba(6, 6, 6, .36);
  color: inherit;
  text-decoration: none;
  align-content: start;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.country-route-card:hover,
.country-route-card:focus-visible {
  border-color: rgba(255, 255, 255, .28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .028)),
    rgba(6, 6, 6, .46);
}

.country-route-card span {
  font-family: var(--brand-font, inherit);
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1;
}

.country-route-card small {
  color: rgba(255, 255, 255, .68);
  line-height: 1.32;
}

@media (max-width: 680px) {
  .cookie-banner {
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    width: auto;
    max-width: none;
    transform: none;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
    border-radius: 20px;
  }

  .cookie-accept {
    width: 100%;
    min-height: 46px;
  }

  .country-route-panel {
    gap: 12px;
    margin-bottom: var(--site-section-gap-mobile, 12px);
    padding: var(--site-panel-padding, 14px);
  }

  .country-route-grid {
    grid-template-columns: 1fr;
  }

  .country-route-card {
    min-height: auto;
  }
}

/* Calculator header has more route buttons than the landing page.
   Keep the same visual language, but compress optical spacing so desktop
   and tablet widths do not collide with the logo or city selector. */
@media (min-width: 981px) {
  body[data-page-type="calculator"] .header {
    grid-template-columns: minmax(212px, 292px) minmax(0, 1fr) auto !important;
    gap: 10px !important;
    padding: 14px !important;
  }

  body[data-page-type="calculator"] .header .logo-image-link {
    width: min(292px, 18.6vw) !important;
    min-width: 212px !important;
  }

  body[data-page-type="calculator"] .header .logo-image-link img {
    width: 100% !important;
    height: auto !important;
  }

  body[data-page-type="calculator"] .header nav {
    justify-content: end !important;
    gap: 7px !important;
    min-width: 0 !important;
  }

  body[data-page-type="calculator"] .header nav a {
    min-height: 40px !important;
    padding-inline: 12px !important;
    font-size: clamp(13.5px, .88vw, 15.5px) !important;
    white-space: nowrap !important;
  }

  body[data-page-type="calculator"] .header-actions {
    min-width: 124px !important;
  }

  body[data-page-type="calculator"] .header-city select {
    min-width: 124px !important;
    min-height: 40px !important;
    padding-left: 16px !important;
    padding-right: 38px !important;
    border: 1px solid rgba(255, 255, 255, .08) !important;
    border-radius: 999px !important;
    background-color: rgba(255, 255, 255, .03) !important;
    color: rgba(244, 244, 241, .86) !important;
    font-size: clamp(13.5px, .88vw, 15.5px) !important;
    font-weight: 400 !important;
    box-shadow: none !important;
  }
}

@media (min-width: 981px) and (max-width: 1320px) {
  body[data-page-type="calculator"] .header {
    grid-template-columns: minmax(190px, 236px) minmax(0, 1fr) auto !important;
    gap: 8px !important;
  }

  body[data-page-type="calculator"] .header .logo-image-link {
    width: min(236px, 17vw) !important;
    min-width: 190px !important;
  }

  body[data-page-type="calculator"] .header nav {
    gap: 5px !important;
  }

  body[data-page-type="calculator"] .header nav a {
    min-height: 38px !important;
    padding-inline: 9px !important;
    font-size: 13.5px !important;
  }

  body[data-page-type="calculator"] .header-city select {
    min-width: 116px !important;
    min-height: 38px !important;
    font-size: 13.5px !important;
    padding-left: 14px !important;
    padding-right: 36px !important;
  }
}

body[data-page-type="calculator"] .header-city select:hover,
body[data-page-type="calculator"] .header-city select:focus,
body[data-page-type="calculator"] .header-city select:focus-visible {
  border-color: rgba(255, 255, 255, .18) !important;
  background-color: rgba(255, 255, 255, .06) !important;
  color: rgba(244, 244, 241, .95) !important;
}

/* Shared header geometry: home and CMS pages must not jump between routes. */
.topbar,
.header,
body[data-page-type="calculator"] .header {
  width: min(calc(100% - 32px), 1240px) !important;
  max-width: calc(100% - 32px) !important;
  min-height: 0 !important;
  margin: 16px auto 0 !important;
  padding: 12px 18px !important;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  grid-template-areas: "logo nav actions" !important;
  align-items: center !important;
  gap: clamp(14px, 1.4vw, 22px) !important;
  border: 1px solid var(--border, rgba(255, 255, 255, .10)) !important;
  border-radius: 999px !important;
  background: rgba(10, 10, 10, .72) !important;
  box-shadow: none !important;
  backdrop-filter: blur(18px) !important;
}

.topbar {
  grid-template-columns: auto minmax(0, 1fr) !important;
  grid-template-areas: "brand nav" !important;
}

.header,
body[data-page-type="calculator"] .header {
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  grid-template-areas: "logo nav actions" !important;
}

.topbar .brand-logo,
.header .logo-image-link,
body[data-page-type="calculator"] .header .logo-image-link {
  width: clamp(218px, 20vw, 300px) !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 4px 14px !important;
  justify-content: center !important;
  border: 1px solid rgba(255, 255, 255, .08) !important;
  border-radius: 999px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015)),
    rgba(7, 7, 7, .7) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .04),
    0 12px 32px rgba(0, 0, 0, .22) !important;
}

.topbar .brand-logo {
  grid-area: brand;
}

.header .logo-image-link,
body[data-page-type="calculator"] .header .logo-image-link {
  grid-area: logo;
}

.topbar .brand-logo-image,
.header .logo-image-link img,
body[data-page-type="calculator"] .header .logo-image-link img {
  width: min(100%, 270px) !important;
  max-width: 100% !important;
  max-height: none !important;
  height: auto !important;
}

.topbar .nav,
.header nav,
body[data-page-type="calculator"] .header nav {
  grid-area: nav;
  display: flex !important;
  align-items: center !important;
  justify-content: end !important;
  align-self: center !important;
  gap: clamp(8px, .9vw, 12px) !important;
  min-width: 0 !important;
}

.topbar .nav a,
.header nav a,
body[data-page-type="calculator"] .header nav a,
.header-city select,
body[data-page-type="calculator"] .header-city select {
  min-height: 42px !important;
  border: 1px solid rgba(255, 255, 255, .08) !important;
  border-radius: 999px !important;
  background-color: rgba(255, 255, 255, .03) !important;
  color: rgba(244, 244, 241, .8) !important;
  font-family: var(--ui-font) !important;
  font-size: clamp(14px, 1vw, 16px) !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  box-shadow: none !important;
}

.topbar .nav a,
.header nav a,
body[data-page-type="calculator"] .header nav a {
  padding: 0 12px !important;
}

.header-city select,
body[data-page-type="calculator"] .header-city select {
  min-width: 116px !important;
  padding: 0 40px 0 16px !important;
  text-align: left !important;
  text-align-last: left !important;
  background-color: rgba(255, 255, 255, .03) !important;
}

.topbar .nav a:hover,
.topbar .nav a:focus-visible,
.header nav a:hover,
.header nav a:focus-visible,
body[data-page-type="calculator"] .header nav a:hover,
body[data-page-type="calculator"] .header nav a:focus-visible,
.header-city select:hover,
.header-city select:focus-visible,
body[data-page-type="calculator"] .header-city select:hover,
body[data-page-type="calculator"] .header-city select:focus-visible {
  border-color: rgba(255, 255, 255, .18) !important;
  background-color: rgba(255, 255, 255, .06) !important;
  color: rgba(244, 244, 241, .95) !important;
}

@media (min-width: 981px) {
  .header nav,
  body[data-page-type="calculator"] .header nav {
    gap: clamp(6px, .55vw, 10px) !important;
  }

  .header nav a,
  body[data-page-type="calculator"] .header nav a {
    padding-inline: clamp(8px, .6vw, 11px) !important;
    font-size: clamp(13px, .88vw, 15px) !important;
  }

  .header-city select,
  body[data-page-type="calculator"] .header-city select {
    min-width: 104px !important;
    padding-inline: 14px 34px !important;
    font-size: clamp(13px, .88vw, 15px) !important;
  }
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
      "brand menu"
      "nav nav" !important;
    align-items: center !important;
    gap: 10px !important;
    width: min(calc(100% - 32px), 1240px) !important;
    min-height: 0 !important;
  }

  .header,
  body[data-page-type="calculator"] .header {
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
      "logo menu"
      "nav nav" !important;
    align-items: center !important;
    column-gap: 8px !important;
    row-gap: 0 !important;
    width: min(calc(100% - 32px), 1240px) !important;
    min-height: 0 !important;
  }

  .topbar.menu-open,
  .header.menu-open,
  body[data-page-type="calculator"] .header.menu-open {
    border-radius: 28px !important;
    row-gap: 10px !important;
  }

  .topbar .brand-logo {
    width: clamp(188px, 62vw, 218px) !important;
    max-width: 100% !important;
  }

  .topbar .brand-logo-image {
    width: min(100%, 220px) !important;
  }

  .header .logo-image-link,
  body[data-page-type="calculator"] .header .logo-image-link {
    width: clamp(176px, 52vw, 206px) !important;
    min-height: 62px !important;
    padding: 6px 14px !important;
    max-width: 100% !important;
  }

  .header .logo-image-link img,
  body[data-page-type="calculator"] .header .logo-image-link img {
    width: min(100%, 180px) !important;
  }

  .header .menu-toggle,
  body[data-page-type="calculator"] .header .menu-toggle {
    position: relative !important;
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    min-height: 50px !important;
    gap: 6px !important;
  }

  .header .menu-toggle span,
  body[data-page-type="calculator"] .header .menu-toggle span {
    width: 20px !important;
    height: 2px !important;
    transform-origin: center !important;
  }

  .header.menu-open .menu-toggle span:first-child,
  body[data-page-type="calculator"] .header.menu-open .menu-toggle span:first-child {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) rotate(45deg) !important;
  }

  .header.menu-open .menu-toggle span:last-child,
  body[data-page-type="calculator"] .header.menu-open .menu-toggle span:last-child {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) rotate(-45deg) !important;
  }

  .topbar .nav,
  .header nav,
  body[data-page-type="calculator"] .header nav {
    display: none !important;
    grid-area: nav;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    padding-top: 0 !important;
    gap: 8px !important;
  }

  .topbar.menu-open .nav,
  .header.menu-open nav,
  body[data-page-type="calculator"] .header.menu-open nav {
    display: grid !important;
    grid-template-columns: 1fr !important;
    padding-top: 0 !important;
  }

  .topbar .nav a,
  .header nav a,
  body[data-page-type="calculator"] .header nav a {
    width: 100% !important;
    justify-content: flex-start !important;
    min-height: 42px !important;
    padding: 0 14px !important;
    border-radius: 16px !important;
    white-space: normal !important;
    font-size: 15px !important;
  }

  .header-actions,
  body[data-page-type="calculator"] .header-actions {
    display: none !important;
  }

  .header-actions .phone,
  body[data-page-type="calculator"] .header-actions .phone {
    display: none !important;
  }

  .header-city,
  .header-city select,
  body[data-page-type="calculator"] .header-city,
  body[data-page-type="calculator"] .header-city select {
    min-width: 0 !important;
    width: auto !important;
    max-width: 112px !important;
  }

  .header-city select,
  body[data-page-type="calculator"] .header-city select {
    min-width: 92px !important;
    max-width: 112px !important;
    min-height: 42px !important;
    padding-inline: 13px 32px !important;
    font-size: 13px !important;
  }

  body[data-page-type="calculator"] .header {
    column-gap: 8px !important;
    row-gap: 0 !important;
  }

  body[data-page-type="calculator"] .header nav a {
    min-height: 40px !important;
    padding-inline: 14px !important;
  }
}

/*
 * Final page rhythm guard.
 * Loaded after site.css: keep non-home CMS pages on the agreed spacing contract:
 * 14px between desktop sections, 14px panel padding, 10px tight control gap,
 * 12px section gap on mobile.
 */
:where(body:not([data-page-type="home"])) .wrap {
  display: flow-root;
  padding-bottom: 0 !important;
}

:where(body:not([data-page-type="home"])) .wrap > .breadcrumbs {
  margin: 0 0 var(--site-section-gap, 14px) !important;
}

:where(body:not([data-page-type="home"])) .wrap > :is(
  .hero,
  .card,
  .calculator,
  .lead,
  .prose,
  .legal-document,
  section,
  article
) {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

:where(body:not([data-page-type="home"])) .wrap > :is(
  .hero,
  .card,
  .calculator,
  .lead,
  .prose,
  .legal-document,
  section,
  article
) + :is(
  .hero,
  .card,
  .calculator,
  .lead,
  .prose,
  .legal-document,
  section,
  article
) {
  margin-top: var(--site-section-gap, 14px) !important;
}

:where(body:not([data-page-type="home"])) .wrap > :is(
  .hero,
  .card,
  .calculator,
  .lead,
  .prose,
  .legal-document
) {
  padding: var(--site-panel-padding, 14px) !important;
}

:where(body:not([data-page-type="home"])) .wrap > :is(.hero, .card, .prose, .legal-document) > :first-child {
  margin-top: 0 !important;
}

:where(body:not([data-page-type="home"])) .wrap > :is(.hero, .card, .prose, .legal-document) > :last-child {
  margin-bottom: 0 !important;
}

:where(body:not([data-page-type="home"])) .wrap > .hero > .eyebrow {
  margin: 0 0 var(--site-control-gap, 10px) !important;
}

:where(body:not([data-page-type="home"])) .wrap > .hero > h1 {
  margin: 0 0 var(--site-section-gap, 14px) !important;
}

:where(body:not([data-page-type="home"])) .wrap > .hero > p:not(.eyebrow) {
  margin: 0 !important;
}

:where(body[data-page-type="legal"]) .legal-document :is(p, ul, ol) {
  margin-top: 0 !important;
  margin-bottom: var(--site-control-gap, 10px) !important;
}

:where(body[data-page-type="legal"]) .legal-document :is(h2, h3) {
  margin-top: var(--site-section-gap, 14px) !important;
  margin-bottom: var(--site-control-gap, 10px) !important;
}

:where(body[data-page-type="legal"]) .legal-document > :first-child {
  margin-top: 0 !important;
}

:where(body[data-page-type="legal"]) .legal-document > :last-child {
  margin-bottom: 0 !important;
}

:where(body[data-page-type="legal"]) .legal-divider {
  margin: var(--site-section-gap, 14px) 0 !important;
}

@media (max-width: 760px) {
  :where(body:not([data-page-type="home"])) .wrap > .breadcrumbs {
    margin-bottom: var(--site-section-gap-mobile, 12px) !important;
  }

  :where(body:not([data-page-type="home"])) .wrap > :is(
    .hero,
    .card,
    .calculator,
    .lead,
    .prose,
    .legal-document,
    section,
    article
  ) + :is(
    .hero,
    .card,
    .calculator,
    .lead,
    .prose,
    .legal-document,
    section,
    article
  ) {
    margin-top: var(--site-section-gap-mobile, 12px) !important;
  }
}

/*
 * Authoritative mobile header contract.
 * The landing page uses `.topbar`; CMS/calculator pages use `.header`.
 * Keep geometry here so repeated headers do not drift between pages.
 */
@media (max-width: 760px) {
  :root {
    --mobile-header-width: min(calc(100% - 32px), 1240px);
    --mobile-header-margin-top: 12px;
    --mobile-header-padding-y: 12px;
    --mobile-header-padding-x: 14px;
    --mobile-header-radius: 26px;
    --mobile-header-gap: 10px;
    --mobile-logo-box-width: clamp(176px, 52vw, 206px);
    --mobile-logo-box-min-height: 62px;
    --mobile-logo-box-padding-y: 6px;
    --mobile-logo-box-padding-x: 14px;
    --mobile-logo-image-width: min(100%, 180px);
    --mobile-menu-size: 50px;
    --mobile-menu-line-width: 20px;
    --mobile-menu-line-height: 2px;
  }

  .topbar,
  .header,
  body[data-page-type="calculator"] .header {
    position: relative !important;
    top: auto !important;
    width: var(--mobile-header-width) !important;
    max-width: calc(100% - 32px) !important;
    min-height: 0 !important;
    margin: var(--mobile-header-margin-top) auto 0 !important;
    padding: var(--mobile-header-padding-y) var(--mobile-header-padding-x) !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    justify-items: stretch !important;
    column-gap: var(--mobile-header-gap) !important;
    row-gap: 0 !important;
    border-radius: var(--mobile-header-radius) !important;
    overflow: clip !important;
  }

  .topbar {
    grid-template-areas:
      "brand menu"
      "nav nav" !important;
  }

  .header,
  body[data-page-type="calculator"] .header {
    grid-template-areas:
      "logo menu"
      "nav nav" !important;
  }

  .topbar.menu-open,
  .header.menu-open,
  body[data-page-type="calculator"] .header.menu-open {
    row-gap: var(--mobile-header-gap) !important;
    border-radius: calc(var(--mobile-header-radius) + 2px) !important;
  }

  .topbar .brand-logo,
  .header .logo-image-link,
  body[data-page-type="calculator"] .header .logo-image-link {
    width: var(--mobile-logo-box-width) !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: var(--mobile-logo-box-min-height) !important;
    height: auto !important;
    padding: var(--mobile-logo-box-padding-y) var(--mobile-logo-box-padding-x) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    align-self: center !important;
    justify-self: start !important;
  }

  .topbar .brand-logo {
    grid-area: brand !important;
  }

  .header .logo-image-link,
  body[data-page-type="calculator"] .header .logo-image-link {
    grid-area: logo !important;
  }

  .topbar .brand-logo-image,
  .header .logo-image-link img,
  body[data-page-type="calculator"] .header .logo-image-link img {
    display: block !important;
    width: var(--mobile-logo-image-width) !important;
    max-width: 100% !important;
    max-height: 48px !important;
    height: auto !important;
    object-fit: contain !important;
    transform: none !important;
  }

  .topbar .menu-toggle,
  .header .menu-toggle,
  body[data-page-type="calculator"] .header .menu-toggle {
    grid-area: menu !important;
    position: relative !important;
    display: inline-flex !important;
    width: var(--mobile-menu-size) !important;
    height: var(--mobile-menu-size) !important;
    min-width: var(--mobile-menu-size) !important;
    min-height: var(--mobile-menu-size) !important;
    flex: 0 0 var(--mobile-menu-size) !important;
    align-self: center !important;
    justify-self: end !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 0 !important;
    border-radius: 999px !important;
  }

  .topbar .menu-toggle span,
  .header .menu-toggle span,
  body[data-page-type="calculator"] .header .menu-toggle span {
    display: block !important;
    width: var(--mobile-menu-line-width) !important;
    height: var(--mobile-menu-line-height) !important;
    border-radius: 999px !important;
    transform-origin: center !important;
  }

  .topbar.menu-open .menu-toggle span:first-child,
  .header.menu-open .menu-toggle span:first-child,
  body[data-page-type="calculator"] .header.menu-open .menu-toggle span:first-child {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) rotate(45deg) !important;
  }

  .topbar.menu-open .menu-toggle span:last-child,
  .header.menu-open .menu-toggle span:last-child,
  body[data-page-type="calculator"] .header.menu-open .menu-toggle span:last-child {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) rotate(-45deg) !important;
  }

  .topbar .nav,
  .header nav,
  body[data-page-type="calculator"] .header nav {
    display: none !important;
    grid-area: nav !important;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    padding-top: 0 !important;
    gap: 8px !important;
  }

  .topbar.menu-open .nav,
  .header.menu-open nav,
  body[data-page-type="calculator"] .header.menu-open nav {
    display: grid !important;
    grid-template-columns: 1fr !important;
    padding-top: 0 !important;
  }

  .header-actions,
  body[data-page-type="calculator"] .header-actions {
    display: none !important;
  }
}

@media (max-width: 390px) {
  :root {
    --mobile-header-width: min(calc(100% - 20px), 1240px);
    --mobile-header-padding-y: 10px;
    --mobile-header-padding-x: 12px;
    --mobile-header-radius: 22px;
    --mobile-logo-box-width: clamp(166px, 62vw, 196px);
    --mobile-logo-box-min-height: 58px;
    --mobile-logo-box-padding-x: 12px;
    --mobile-logo-image-width: min(100%, 170px);
    --mobile-menu-size: 48px;
  }

  .topbar,
  .header,
  body[data-page-type="calculator"] .header {
    max-width: calc(100% - 20px) !important;
  }
}

/*
 * Mobile page-width and text-wrap contract.
 * Headers and primary blocks share one visual width; readable words must not
 * be split letter-by-letter. If text is tight, typography scales down a little
 * and panels grow vertically.
 */
@media (max-width: 760px) {
  :root {
    --mobile-page-width: min(calc(100% - 20px), 1240px);
    --mobile-text-title-tight: clamp(1.1rem, 6vw, 1.72rem);
    --mobile-text-body-tight: clamp(.86rem, 3.65vw, 1rem);
  }

  .topbar,
  .header,
  body[data-page-type="calculator"] .header,
  main,
  footer.footer.footer-modern {
    width: var(--mobile-page-width) !important;
    max-width: var(--mobile-page-width) !important;
    margin-inline: auto !important;
  }

  main {
    min-width: 0 !important;
  }

  .wrap {
    width: 100% !important;
    max-width: 100% !important;
    margin-inline: auto !important;
    padding-inline: 0 !important;
  }

  :where(
    body,
    main,
    .wrap,
    .topbar,
    .header,
    .hero,
    .hero-note,
    .hero-metrics article,
    .trust-compact-card,
    .work-step-card,
    .lead,
    .lead-copy,
    .lead-form,
    .lead-form-head,
    .card,
    .calculator,
    .prose,
    .legal-document,
    .intent-grid > *,
    .delivery-card,
    .delivery-meta,
    .footer-card,
    .footer-links
  ) :is(h1, h2, h3, h4, p, strong, span, a, li, label, button) {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
    hyphens: manual !important;
  }

  :where(
    .work-step-card strong,
    .lead-copy h2,
    .lead-form-head strong,
    .card h1,
    .card h2,
    .hero h1,
    .prose h1,
    .prose h2
  ) {
    font-size: var(--mobile-text-title-tight) !important;
    line-height: 1.02 !important;
  }

  .work-steps-grid {
    align-items: stretch !important;
    grid-auto-rows: 1fr !important;
  }

  .work-step-card {
    display: grid !important;
    grid-template-rows: auto auto 1fr !important;
    min-height: 158px !important;
  }

  .work-step-card strong {
    white-space: normal !important;
    text-wrap: auto;
    font-size: clamp(.92rem, 3.95vw, 1.12rem) !important;
  }

  .work-step-card p,
  .work-step-copy-flow {
    align-self: start !important;
    font-size: var(--mobile-text-body-tight) !important;
  }

  .lead-copy h2 {
    text-wrap: balance;
  }

  h1,
  h2,
  h3,
  .work-step-card strong,
  .lead-copy h2,
  .lead-form-head strong,
  .button,
  button {
    overflow-wrap: normal !important;
    word-break: normal !important;
    hyphens: manual !important;
  }
}

@media (max-width: 390px) {
  :root {
    --mobile-page-width: min(calc(100% - 20px), 1240px);
    --mobile-text-title-tight: clamp(1rem, 5.45vw, 1.42rem);
    --mobile-text-body-tight: clamp(.82rem, 3.45vw, .94rem);
  }

  .work-step-card {
    min-height: 148px !important;
  }
}
