/*
 * MoveCars4u — site styles, following the look of the previous movecars4u.com: white header with the logo under a
 * graphite contact bar, the hero photo with a dark veil and the quote form beside the title, centered section titles
 * with a short red bar, white cards with a red top edge, graphite footer.
 * Graphite #2F2F33, signal red #FF131D for lines and marks, action red #D90F18 for buttons and red text
 * (5.2:1 on white, AA). Headings: Fira Sans 600; text: Inter (both local, OFL).
 */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/inter-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Fira Sans";
  font-style: normal;
  font-weight: 600;
  font-display: optional;
  src: url("/assets/fonts/fira-sans-cyrillic-600-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Fira Sans";
  font-style: normal;
  font-weight: 600;
  font-display: optional;
  src: url("/assets/fonts/fira-sans-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Arial sized to Inter and Arial Bold sized to Fira Sans (measured widths and vertical metrics), so the swap does not shift the layout. */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("Helvetica");
  size-adjust: 109.4%;
  ascent-override: 88.6%;
  descent-override: 22%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Fira Sans Fallback";
  font-weight: 600;
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("Helvetica Bold");
  size-adjust: 95.6%;
  ascent-override: 97.8%;
  descent-override: 27.7%;
  line-gap-override: 0%;
}

:root {
  --graphite: #2f2f33;
  --graphite-deep: #232327;
  --signal: #ff131d;
  --action: #d90f18;
  --action-strong: #b80d14;
  --light: #f6f6f6;
  --blush: #fff1f2;
  --white: #ffffff;
  --text: #111827;
  --muted: #5b6370;
  --on-dark: #ffffff;
  --on-dark-muted: #d4d4d8;
  --border: #8a909c;
  --divider: #e5e7eb;
  --error: #b42318;
  --error-bg: #fef3f2;
  --success: #067647;
  --success-bg: #ecfdf3;

  --font: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-heading: "Fira Sans", "Fira Sans Fallback", "Segoe UI", Roboto, Arial, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.75rem, 1.5rem + 1.1vw, 2.125rem);
  --step-4: clamp(2rem, 1.55rem + 2vw, 3rem);
  --step-5: clamp(2.25rem, 1.6rem + 2.8vw, 3.5rem);

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: clamp(3rem, 2rem + 4vw, 5.5rem);
  /* the bands run from edge to edge; their content is centered and up to 103rem wide */
  --max-width: 103rem;
  --gutter: clamp(1rem, 0.25rem + 3vw, 4rem);
  --radius: 12px;
  --radius-card: 18px;
  --pill: 999px;
  --shadow-card: 0 12px 32px rgba(17, 24, 39, 0.08);
  --shadow-button: 0 10px 22px rgba(255, 19, 29, 0.28);
}

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

html {
  -webkit-text-size-adjust: 100%;
  /* links to a part of the page (#main, anchors) stop below the sticky header */
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
}

p {
  margin: 0;
}

a {
  color: var(--action);
}

:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

main:focus,
h2[tabindex="-1"]:focus {
  outline: none;
}

.skip-link {
  position: absolute;
  top: -5rem;
  left: var(--space-2);
  z-index: 20;
  padding: var(--space-1) var(--space-2);
  color: var(--on-dark);
  background: var(--graphite);
  border-radius: var(--radius);
}

.skip-link:focus {
  top: var(--space-2);
}

/* text for screen readers only */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Buttons: red pills with a red glow ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.5rem;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  color: var(--on-dark);
  text-align: center;
  text-decoration: none;
  background: var(--action);
  border: 2px solid var(--action);
  border-radius: var(--pill);
  box-shadow: var(--shadow-button);
  cursor: pointer;
}

.button:hover {
  background: var(--action-strong);
  border-color: var(--action-strong);
}

.button:disabled {
  cursor: progress;
  opacity: 0.75;
}

.button-small {
  min-height: 44px;
  padding: 0 1.125rem;
  font-size: 0.9375rem;
}

.button-large {
  min-height: 54px;
  padding: 0 1.75rem;
  font-size: 1.0625rem;
}

.button-ghost {
  color: var(--on-dark);
  background: transparent;
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: none;
}

.button-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--on-dark);
}

.button-inverse {
  color: var(--action);
  background: var(--white);
  border-color: var(--white);
  box-shadow: none;
}

.button-inverse:hover {
  color: var(--action-strong);
  background: var(--light);
  border-color: var(--light);
}

/* ---------- Header: graphite contact bar, white bar with the logo ---------- */

/* the header stays at the top while the page scrolls; the graphite contact bar (40px) scrolls away */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--white);
  box-shadow: 0 1px 0 var(--divider), 0 6px 18px rgba(17, 24, 39, 0.05);
}

.site-header:has(> .topbar) {
  top: -40px;
}

.topbar {
  height: 40px;
  font-size: var(--step--1);
  color: var(--on-dark-muted);
  background: var(--graphite);
}

.topbar-inner {
  display: flex;
  gap: 0 var(--space-3);
  align-items: center;
  max-width: var(--max-width);
  min-height: 40px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.topbar-link {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  min-height: 40px;
  color: var(--on-dark);
  text-decoration: none;
  white-space: nowrap;
}

.topbar-link svg {
  flex: none;
  color: var(--signal);
}

.topbar-link:hover span {
  text-decoration: underline;
}

.social-links {
  display: flex;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.social-links a {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--on-dark);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.social-links a:hover {
  background: var(--action);
}

.topbar-social {
  margin-left: auto;
}

@media (max-width: 559px) {
  .topbar-inner {
    gap: 0 var(--space-2);
  }

  /* the e-mail as an icon; its address stays the name of the link */
  .topbar-email span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .topbar-email {
    justify-content: center;
    min-width: 40px;
  }
}

/* two numbers on a narrow screen: the e-mail as an icon, one phone icon for both, smaller text and, below 400 px,
   no social links in the bar (they are in the footer) */
@media (max-width: 767px) {
  .topbar-inner:has(.topbar-phone2) .topbar-email span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .topbar-inner:has(.topbar-phone2) .topbar-email {
    justify-content: center;
    min-width: 40px;
  }
}

@media (max-width: 559px) {
  .topbar-phone2 svg {
    display: none;
  }
}

@media (max-width: 399px) {
  .topbar-inner:has(.topbar-phone2) {
    gap: 0 var(--space-1);
  }

  .topbar-inner:has(.topbar-phone2) .topbar-social {
    display: none;
  }

  .topbar-inner:has(.topbar-phone2) .topbar-email {
    margin-left: auto;
  }
}

@media (max-width: 359px) {
  .topbar:has(.topbar-phone2) {
    font-size: 0.75rem;
  }
}


.site-header-inner {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  max-width: var(--max-width);
  min-height: 80px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.logo {
  display: inline-flex;
  flex: none;
  border-radius: 8px;
}

.logo img {
  display: block;
  width: auto;
  height: 60px;
}

.site-nav ul,
.footer-nav ul,
.lang-menu ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* the page links in the middle between the logo and the call to action (the auto margins share the free space) */
.site-nav ul {
  display: flex;
  gap: 0.25rem var(--space-3);
  align-items: center;
}

.site-nav ul > li:first-child {
  margin-left: auto;
  /* with the gap of the header row: the same space as between the links (space-3) */
  padding-left: var(--space-1);
}

.site-nav a:not(.button) {
  display: inline-flex;
  white-space: nowrap;
  align-items: center;
  min-height: 44px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}

.site-nav a:not(.button):hover,
.site-nav a[aria-current="page"]:not(.button) {
  color: var(--action);
}

.site-nav a[aria-current="page"]:not(.button) {
  font-weight: 600;
}

.site-nav-cta {
  margin-left: auto;
}

.lang-menu {
  position: relative;
  order: 2;
}

.site-nav {
  flex: 1 1 auto;
  order: 1;
}

.site-nav .button {
  white-space: nowrap;
}

/* the language: the flag of the page language; the flags of all languages open on hover (mouse) or on a tap */
.flag {
  display: block;
  flex: none;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.16);
}

.lang-menu summary {
  display: inline-flex;
  gap: 0.375rem;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.625rem;
  color: var(--graphite);
  list-style: none;
  background: var(--light);
  border: 1px solid var(--divider);
  border-radius: var(--pill);
  cursor: pointer;
}

.lang-menu summary::-webkit-details-marker {
  display: none;
}

.lang-menu[open] summary,
.lang-menu summary:hover {
  border-color: var(--graphite);
}

/* the hover bridge: the pointer can move from the button to the list without closing it */
.lang-menu[open]::after {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  height: 0.5rem;
  content: "";
}

.lang-menu-caret {
  transition: transform 0.15s ease;
}

.lang-menu[open] .lang-menu-caret {
  transform: rotate(180deg);
}

.lang-menu ul {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 6;
  display: grid;
  gap: 0.125rem;
  padding: 0.375rem;
  background: var(--white);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  box-shadow: 0 16px 32px rgba(17, 24, 39, 0.14);
}

.lang-menu a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  min-height: 44px;
  padding: 0 0.75rem;
  color: var(--text);
  text-decoration: none;
  border-radius: 8px;
}

.lang-menu a:hover {
  background: var(--light);
}

.lang-menu a[aria-current="true"] {
  background: var(--blush);
  box-shadow: inset 0 0 0 2px var(--signal);
}

/* the group of pages for countries and routes: a disclosure in the header menu */
.nav-group {
  position: relative;
}

.nav-group summary {
  display: inline-flex;
  gap: 0.375rem;
  align-items: center;
  min-height: 44px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  list-style: none;
  cursor: pointer;
}

.nav-group summary::-webkit-details-marker {
  display: none;
}

.nav-group summary::after {
  width: 0.5rem;
  height: 0.5rem;
  margin-top: -0.25rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  content: "";
}

.nav-group[open] summary::after {
  margin-top: 0.25rem;
  transform: rotate(-135deg);
}

.nav-group summary:hover,
.nav-group summary.nav-group-current {
  color: var(--action);
}

.nav-group summary.nav-group-current {
  font-weight: 600;
}

.site-nav .nav-group ul {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: -0.75rem;
  z-index: 6;
  display: grid;
  gap: 0;
  min-width: 16rem;
  padding: 0.375rem;
  background: var(--white);
  border-top: 3px solid var(--signal);
  border-radius: var(--radius);
  box-shadow: 0 16px 32px rgba(17, 24, 39, 0.14);
}

.site-nav .nav-group a {
  display: flex;
  width: 100%;
  padding: 0 0.75rem;
  border-radius: 8px;
}

.site-nav .nav-group a:hover {
  background: var(--light);
}

/* the same group in the menu for phones: a heading with its links */
.nav-menu-group-title {
  display: block;
  padding-top: var(--space-2);
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--muted);
}

.nav-menu-panel nav .nav-menu-group a {
  padding-left: var(--space-2);
  font-size: var(--step-0);
}

/* menu button: below 1200px, where the header links and the language menu are hidden */
.nav-menu {
  display: none;
  order: 3;
}

.nav-menu summary {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--graphite);
  list-style: none;
  border: 1px solid var(--divider);
  border-radius: 50%;
  cursor: pointer;
}

.nav-menu summary::-webkit-details-marker {
  display: none;
}

.nav-menu[open] summary,
.nav-menu summary:hover {
  border-color: var(--graphite);
}

.nav-menu-panel {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  /* the header is sticky: a long menu scrolls inside the panel */
  max-height: calc(100dvh - 7.5rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  display: grid;
  gap: var(--space-2);
  padding: var(--space-2) var(--gutter) var(--space-3);
  background: var(--white);
  border-top: 1px solid var(--divider);
  box-shadow: 0 16px 32px rgba(17, 24, 39, 0.14);
}

.nav-menu-panel ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-menu-panel nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  font-size: var(--step-1);
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--divider);
}

.nav-menu-panel nav a[aria-current="page"] {
  font-weight: 600;
  color: var(--action);
}

.nav-menu-phone {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  font-weight: 700;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--pill);
}

@media (max-width: 1199px) {
  .site-nav li:not(.site-nav-cta) {
    display: none;
  }

  .nav-menu {
    display: block;
  }
}

/* wide screens whose links do not fit in one row (set by app.js) */
.nav-overflow .site-nav li:not(.site-nav-cta) {
  display: none;
}

.nav-overflow .nav-menu {
  display: block;
}

@media (max-width: 559px) {
  .site-header-inner {
    gap: 0.5rem;
    min-height: 68px;
  }

  .logo img {
    height: 48px;
  }

  .site-nav .button {
    padding: 0 0.875rem;
  }

  /* phones: only the flag on the language button, so the logo, the button, the flag and the menu fit in one row */
  .lang-menu summary {
    padding: 0;
  }

  .lang-menu-caret {
    display: none;
  }
}

@media (max-width: 419px) {
  .site-nav .button {
    padding: 0 0.75rem;
    font-size: var(--step--1);
  }
}

@media (max-width: 359px) {
  .site-nav {
    display: none;
  }
}

/* ---------- Hero: the photo under a dark veil; the title on the left, the quote form on the right (under it on phones) ---------- */

.hero {
  --form-width: 40rem;
  display: grid;
  /* the title and the form arrive from the sides without a horizontal scroll */
  overflow-x: clip;
  grid-template-columns: minmax(var(--gutter), 1fr) minmax(0, calc(var(--max-width) - 2 * var(--gutter))) minmax(var(--gutter), 1fr);
  background: var(--graphite);
}

/* the veil over the photo (graphite without a photo) */
.hero::before {
  position: relative;
  z-index: 1;
  grid-row: 1 / span 2;
  grid-column: 1 / -1;
  background: linear-gradient(90deg, rgba(24, 24, 28, 0.9) 0%, rgba(24, 24, 28, 0.78) 55%, rgba(24, 24, 28, 0.55) 100%);
  content: "";
}

.hero:not(.hero-media)::before {
  background: radial-gradient(120% 140% at 85% 0%, #45454b 0%, var(--graphite) 55%, var(--graphite-deep) 100%);
}

.hero-photo {
  position: relative;
  grid-row: 1 / span 2;
  grid-column: 1 / -1;
  overflow: hidden;
}

.hero-photo img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* a slow drive towards the photo (transform only: it does not delay the first paint) */
  animation: hero-zoom 24s ease-in-out infinite alternate;
}

@keyframes hero-zoom {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.08);
  }
}

/* the title and the form arrive from the sides (transform only, visible from the first frame) */
.hero-text {
  animation: arrive-left 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.quote-card {
  animation: arrive-right 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.1s both;
}

@keyframes arrive-left {
  from {
    transform: translateX(-1.5rem);
  }
}

@keyframes arrive-right {
  from {
    transform: translateX(1.5rem);
  }
}

.hero-text {
  position: relative;
  z-index: 2;
  grid-row: 1;
  grid-column: 2;
  padding: var(--space-6) 0;
  color: var(--on-dark);
}

.hero h1 {
  max-width: 40ch;
  font-size: var(--step-4);
  line-height: 1.15;
}

.hero-lead {
  max-width: 36rem;
  margin-top: var(--space-3);
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--on-dark-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.hero-actions:empty {
  display: none;
}

/* the quote form card */
.quote-card {
  position: relative;
  z-index: 2;
  grid-row: 2;
  grid-column: 2;
  margin: var(--space-4) 0 var(--space-5);
  padding: var(--space-3) var(--space-2);
  background: var(--white);
  border-top: 4px solid var(--signal);
  border-radius: var(--radius-card);
  box-shadow: 0 24px 48px rgba(17, 24, 39, 0.18);
  container: quote-card / inline-size;
}

.quote-card-title {
  margin-bottom: var(--space-2);
  font-size: var(--step-2);
  line-height: 1.25;
  text-align: center;
}

.quote-card .qf {
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
}

/* compact form in the hero: the hints stay the description of their fields for screen readers */
.quote-card .qf-help {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.quote-card .qf-field {
  gap: 0.25rem;
}

.quote-card .qf-field > label,
.quote-card .qf-field legend {
  font-size: 0.9375rem;
}

.quote-card .qf textarea {
  height: 5.5rem;
}

.quote-card .qd-success {
  margin-bottom: 0;
}

@container quote-card (min-width: 24rem) {
  .quote-card .qf {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem var(--space-2);
  }

  .quote-card .qf-note,
  .quote-card .qf-summary,
  .quote-card .qf-group-title,
  .quote-card .qf-choices,
  .quote-card .qf-consent,
  .quote-card .qf-wide,
  .quote-card .qf-actions {
    grid-column: 1 / -1;
  }
}

/* a wide card (beside the title, tablets): two columns of compact fields, the questions with radio buttons and the notes
   in a column too, so the whole form is seen without scrolling */
@container quote-card (min-width: 30rem) {
  .quote-card .qf {
    gap: 0.625rem var(--space-2);
    align-items: start;
  }

  .quote-card .qf-choices,
  .quote-card .qf-wide {
    grid-column: auto;
  }

  .quote-card .qf-options {
    gap: 0 var(--space-2);
  }

  .quote-card .qf input[type="text"],
  .quote-card .qf input[type="email"],
  .quote-card .qf input[type="tel"],
  .quote-card .qf select {
    min-height: 42px;
    padding: 0.4375rem 0.75rem;
  }

  .quote-card .qf textarea {
    height: 42px;
    min-height: 42px;
    padding: 0.4375rem 0.75rem;
  }

  .quote-card .qf-group-title {
    padding-top: 0.375rem;
    font-size: var(--step-0);
  }

  .quote-card .qf-option {
    min-height: 40px;
    padding-top: 0.5rem;
  }

  .quote-card .qf-consent .qf-option {
    padding-top: 0.25rem;
    font-size: var(--step--1);
  }

  .quote-card .qf-actions .button {
    width: 100%;
  }

  .quote-card-title {
    margin-bottom: 0.5rem;
  }
}

@media (min-width: 560px) {
  .quote-card {
    padding: var(--space-4) var(--space-3);
  }
}

@media (min-width: 1024px) {
  .hero {
    grid-template-columns:
      minmax(var(--gutter), 1fr)
      minmax(0, calc(var(--max-width) - 2 * var(--gutter) - var(--form-width)))
      minmax(0, var(--form-width))
      minmax(var(--gutter), 1fr);
  }

  .hero::before,
  .hero-photo {
    grid-row: 1;
  }

  .hero-text {
    align-self: center;
    padding-right: var(--space-5);
  }

  .quote-card {
    grid-row: 1;
    grid-column: 3;
    align-self: center;
    /* space above and below the card, so it does not touch the edges of the hero */
    margin: var(--space-5) 0;
    padding: var(--space-3);
  }
}

/* ---------- Sections ---------- */

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-6) var(--gutter);
}

.section-inner > h2 {
  max-width: 28ch;
  font-size: var(--step-3);
}

/* centered section title with a short red bar under it */
.section-inner > .section-title {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.section-title::after {
  display: block;
  width: 3.5rem;
  height: 4px;
  margin: var(--space-2) auto 0;
  background: var(--signal);
  border-radius: 2px;
  content: "";
}

.advantages {
  color: var(--on-dark);
  background: radial-gradient(120% 140% at 100% 0%, #45454b 0%, var(--graphite) 55%, var(--graphite-deep) 100%);
}

.advantages .section-title {
  color: var(--white);
}

/* on the dark band the advantages are not boxes: centered columns with thin dividers and an icon in a red ring */
.advantage-list {
  display: grid;
  margin: var(--space-5) 0 0;
  padding: 0;
  list-style: none;
}

.advantage-list li {
  padding: var(--space-4) var(--space-3);
  text-align: center;
}

.advantage-list li + li {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.advantages .feature-icon {
  width: 4rem;
  height: 4rem;
  color: var(--white);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 2px var(--signal);
}

.advantage-list li:hover > .feature-icon {
  color: var(--white);
  background: var(--signal);
}

.reason-list li:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.14);
}

/* a red round icon over the title of an advantage or a reason */
.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: var(--space-2);
  color: var(--action);
  background: var(--blush);
  border-radius: 50%;
  transition: transform 0.3s ease;
}

li:hover > .feature-icon {
  transform: rotate(-8deg) scale(1.06);
}

.advantage-list h3 {
  color: var(--white);
  font-size: var(--step-1);
}

.route h3 {
  font-size: var(--step-1);
}

.advantage-list p {
  max-width: 30ch;
  margin: var(--space-1) auto 0;
  color: var(--on-dark-muted);
}

.route p {
  max-width: 34ch;
  margin-top: var(--space-1);
  color: var(--muted);
}

/* steps: numbered red stops joined by a line */
.steps {
  background: var(--light);
}

.route {
  position: relative;
  display: grid;
  gap: var(--space-4);
  margin: var(--space-5) 0 0;
  padding: 0;
  list-style: none;
}

.route li {
  position: relative;
  padding-left: 4.25rem;
}

/* the line between two stops (none after the last one); it is drawn when the steps come into view */
.route li:not(:last-child)::before {
  position: absolute;
  top: 3rem;
  bottom: calc(-1 * var(--space-4));
  left: 1.4375rem;
  width: 2px;
  background: rgba(255, 19, 29, 0.35);
  transform-origin: top;
  content: "";
}

.route.reveal li:not(:last-child)::before {
  transform: scaleY(0);
}

.route.reveal.is-visible li:not(:last-child)::before {
  transform: none;
  transition: transform 0.6s ease;
}

.route.reveal .route-stop {
  transform: scale(0.4);
}

.route.reveal.is-visible .route-stop {
  transform: none;
  transition: transform 0.45s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.route.reveal.is-visible li:nth-child(2) .route-stop,
.route.reveal.is-visible li:nth-child(1)::before {
  transition-delay: 0.25s;
}

.route.reveal.is-visible li:nth-child(3) .route-stop,
.route.reveal.is-visible li:nth-child(2)::before {
  transition-delay: 0.5s;
}

.route.reveal.is-visible li:nth-child(4) .route-stop,
.route.reveal.is-visible li:nth-child(3)::before {
  transition-delay: 0.75s;
}

.route.reveal.is-visible li:nth-child(n + 5) .route-stop,
.route.reveal.is-visible li:nth-child(n + 4)::before {
  transition-delay: 1s;
}

/* the car transporter drives along the route (wide screens, when the steps come into view) */
.steps .section-inner {
  position: relative;
}

.route-truck {
  display: none;
}

.route-stop {
  position: absolute;
  top: -0.25rem;
  left: 0;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--on-dark);
  background: var(--action);
  border-radius: 50%;
  box-shadow: var(--shadow-button);
}

/* call to action: a white card on a light band */
.cta-band {
  background: linear-gradient(180deg, var(--white) 0%, var(--light) 100%);
}

.cta-card {
  display: grid;
  gap: var(--space-2);
  justify-items: center;
  max-width: 48rem;
  margin: 0 auto;
  padding: var(--space-5) var(--space-3);
  text-align: center;
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.cta-card h2 {
  font-size: var(--step-3);
}

.cta-card p {
  max-width: 36rem;
  font-size: var(--step-1);
  color: var(--muted);
}

.cta-card .button {
  margin-top: var(--space-1);
}

@media (min-width: 760px) {
  .advantage-list {
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  }

  .advantage-list li + li {
    border-top: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.14);
  }

  .route {
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
  }

  .route li:not(:last-child)::before {
    top: 1.4375rem;
    right: calc(-1 * var(--space-4));
    bottom: auto;
    left: 3.5rem;
    width: auto;
    height: 2px;
  }

  .route li {
    padding-top: 4.25rem;
    padding-left: 0;
  }

  .route-stop {
    top: 0;
  }

  .route.reveal li:not(:last-child)::before {
    transform: scaleX(0);
    transform-origin: left;
  }

  /* room above the stops for the car transporter */
  .steps .route {
    margin-top: calc(var(--space-5) + 2rem);
  }

  /* top, left and --route-width are set by app.js from the place of the route */
  .route-truck {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    color: var(--graphite);
    opacity: 0;
  }

  .route.reveal.is-visible + .route-truck {
    animation: truck-drive 4s ease-in-out 0.2s both;
  }
}

@keyframes truck-drive {
  0% {
    opacity: 0;
    transform: translateX(0);
  }

  10% {
    opacity: 1;
  }

  90% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateX(calc(var(--route-width, 60rem) - 120px));
  }
}

/* contact band: graphite, the phone as the main action */
.support {
  color: var(--on-dark);
  background: var(--graphite);
}

.support-inner {
  display: grid;
  gap: var(--space-3);
  align-items: center;
}

.section-inner.support-inner {
  padding-top: var(--space-5);
  padding-bottom: var(--space-5);
}

.support h2 {
  font-size: var(--step-3);
}

.support p {
  max-width: 40rem;
  margin-top: var(--space-1);
  color: var(--on-dark-muted);
}

.support-hours {
  font-weight: 600;
}

.support-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* numbers: large red figures over what they count */
.stats {
  background: var(--light);
}

.stat-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: var(--space-3);
  margin: var(--space-5) 0 0;
  padding: 0;
  list-style: none;
  text-align: center;
}

.stat-list li {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-4) var(--space-2);
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.stat-value {
  font-family: var(--font-heading);
  font-size: var(--step-5);
  font-weight: 600;
  line-height: 1;
  color: var(--action);
}

.stat-label {
  color: var(--muted);
}

/* blocks under the first screen appear when they come into view (app.js sets .reveal only on those) */
.reveal {
  opacity: 0;
  transform: translateY(1.5rem);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: calc(var(--reveal-index, 0) * 90ms);
}

/* the steps keep their own motion (line, stops, truck) */
.route.reveal {
  opacity: 1;
  transform: none;
}

/* the moving strip of highlights under the hero */
.highlights {
  overflow: hidden;
  color: var(--on-dark);
  background: var(--action);
}

/* one line from the first frame (no shift when the strip starts moving); without the script it can be scrolled */
.ticker {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}

.ticker::-webkit-scrollbar {
  display: none;
}

.ticker.is-moving {
  overflow: hidden;
}

.ticker-track {
  display: flex;
  flex: none;
  gap: var(--space-5);
  margin: 0;
  padding: 1rem var(--space-5) 1rem var(--gutter);
  list-style: none;
}

.ticker-track li {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  font-weight: 700;
  white-space: nowrap;
}

.ticker.is-moving .ticker-track {
  animation: ticker var(--ticker-duration, 30s) linear infinite;
}

.ticker.is-moving:hover .ticker-track,
.ticker.is-moving:focus-within .ticker-track {
  animation-play-state: paused;
}

@keyframes ticker {
  to {
    transform: translateX(-100%);
  }
}

/* the text about the transport: a row with the photo, columns and a button (like the service pages) */
.intro {
  background: var(--white);
}

/* the title centered over the row with the photo; the parts of the section follow each other closely */
.intro-head {
  padding-bottom: 0;
}

.intro > .section-inner:not(:last-child) {
  padding-bottom: 0;
}

.intro > .section-inner + .section-inner {
  padding-top: var(--space-4);
}

.intro .prose-column p:not(.prose-button) {
  text-align: left;
}

.intro .prose-button {
  margin-top: var(--space-4);
  text-align: center;
}

.intro-figure {
  margin: var(--space-4) 0 0;
}

.intro-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.cta-figure {
  margin: var(--space-4) 0 0;
}

.cta-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

/* the call to action with a photo: the card on the left, the photo on the right */
@media (min-width: 1024px) {
  /* the card is as high as the photo: both start and end on one line, the text in the middle of the card */
  .cta-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-5);
    align-items: stretch;
  }

  .cta-split .cta-card {
    align-content: center;
    max-width: none;
    height: 100%;
    margin: 0;
  }

  .cta-split .cta-figure {
    margin: 0;
  }
}

@media (min-width: 1024px) {
  .intro-inner {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 2fr);
    gap: var(--space-5);
    align-items: start;
  }

  /* below the sticky header of the site */
  .intro-figure {
    position: sticky;
    top: 6rem;
    margin-top: 0;
  }
}

/* reasons to choose the company: the title on the left, the cards on the right (on graphite) */
.reasons {
  color: var(--on-dark);
  background: radial-gradient(120% 140% at 0% 0%, #45454b 0%, var(--graphite) 55%, var(--graphite-deep) 100%);
}

.reasons-inner {
  display: grid;
  gap: var(--space-4);
}

.reasons-head h2 {
  font-size: var(--step-3);
}

.reasons-head h2::after {
  display: block;
  width: 3.5rem;
  height: 4px;
  margin-top: var(--space-2);
  background: var(--signal);
  border-radius: 2px;
  content: "";
}

.reasons-head p {
  max-width: 30rem;
  margin: var(--space-2) 0 var(--space-3);
  font-size: var(--step-1);
  color: var(--on-dark-muted);
}

.reason-list {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.reason-list li {
  padding: var(--space-3);
  color: var(--text);
  background: var(--white);
  border-radius: var(--radius-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.reason-list h3 {
  font-size: var(--step-1);
}

.reason-list p {
  margin-top: var(--space-1);
  color: var(--muted);
}

@media (min-width: 760px) {
  .reason-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .reasons-inner {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    align-items: center;
  }
}

/* "Отзиви от клиенти" at the bottom of the pages (not in the blog), and the button that opens the review dialog */
.site-reviews {
  background: var(--light);
}

.site-reviews-action {
  margin: var(--space-4) 0 0;
  text-align: center;
}

.button-outline {
  color: var(--action);
  background: transparent;
  box-shadow: none;
}

.button-outline:hover {
  color: var(--on-dark);
}

/* the footer button "Оставете отзив" looks like the footer links */
.footer-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  font: inherit;
  color: var(--on-dark);
  background: none;
  border: 0;
  cursor: pointer;
}

.footer-link:hover {
  text-decoration: underline;
}

/* client reviews: white cards with a red top edge and a large red quotation mark */
.review-list {
  display: grid;
  gap: var(--space-3);
  margin: var(--space-5) 0 0;
  padding: 0;
  list-style: none;
}

.review-list li {
  padding: var(--space-4) var(--space-3) var(--space-3);
  background: var(--white);
  border-top: 3px solid var(--signal);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.review-list figure {
  display: grid;
  gap: var(--space-2);
  height: 100%;
  margin: 0;
}

.review-list blockquote {
  margin: 0;
}

.review-list blockquote::before {
  display: block;
  height: 2rem;
  font-family: var(--font-heading);
  font-size: 3.5rem;
  line-height: 1;
  color: var(--signal);
  content: "\201C";
  content: "\201C" / "";
}

.review-list figcaption {
  align-self: end;
  font-weight: 700;
}

@media (min-width: 760px) {
  .support-inner {
    grid-template-columns: 1fr auto;
  }

  .review-list {
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  }
}

/* ---------- Footer ---------- */

.site-footer {
  color: var(--on-dark-muted);
  background: var(--graphite);
  border-top: 4px solid var(--signal);
}

.site-footer-inner {
  display: grid;
  gap: var(--space-4);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-5) var(--gutter);
}

.logo-footer {
  margin-right: 0;
}

.logo-footer img {
  height: 72px;
}

.footer-title {
  margin-bottom: var(--space-1);
  font-size: var(--step-1);
  color: var(--on-dark);
}

.footer-title::after {
  display: block;
  width: 2.5rem;
  height: 3px;
  margin-top: 0.5rem;
  background: var(--signal);
  border-radius: 2px;
  content: "";
}

.footer-nav ul,
.footer-contact {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-nav a,
.footer-contact a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--on-dark);
  text-decoration: none;
}

.footer-nav a:hover,
.footer-contact a:hover {
  text-decoration: underline;
}

.footer-nav a[aria-current="true"] {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--signal);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}

.footer-contact {
  margin-top: var(--space-2);
}

.footer-contact li {
  overflow-wrap: anywhere;
}

.footer-social {
  margin-top: var(--space-2);
}

.footer-social a {
  width: 44px;
  height: 44px;
}

.footer-side {
  display: grid;
  gap: var(--space-2);
  align-content: start;
}

/* the profiles right under the legal links */
.footer-side .footer-social {
  margin-top: 0;
}

/* a short description of the company under the logo */
.footer-tagline {
  max-width: 34ch;
  margin-top: var(--space-2);
  font-size: var(--step--1);
  line-height: 1.6;
}

/* the last line: the copyright at the left, who developed the site at the right (on phones one under another, centered) */
.footer-bottom {
  display: grid;
  gap: 0.25rem;
  justify-items: center;
  padding-top: var(--space-3);
  font-size: var(--step--1);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.footer-credit a {
  color: var(--on-dark);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.footer-credit a:hover {
  text-decoration-color: var(--signal);
}

@media (min-width: 760px) {
  .footer-bottom {
    grid-template-columns: 1fr auto;
    align-items: center;
    text-align: left;
  }

  .footer-bottom .copyright {
    justify-self: start;
  }

  .footer-bottom .footer-credit {
    justify-self: end;
  }
}

@media (min-width: 760px) {
  .site-footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--space-5);
  }

  .footer-bottom {
    grid-column: 1 / -1;
  }
}

/* on phones everything in the footer is centered and every link is on its own line */
@media (max-width: 759px) {
  .site-footer-inner {
    text-align: center;
  }

  .footer-title::after,
  .footer-tagline {
    margin-right: auto;
    margin-left: auto;
  }

  .logo-footer,
  .footer-nav a,
  .footer-contact a {
    justify-content: center;
  }

  .footer-social {
    justify-content: center;
  }
}


/* on wide screens the columns are spread over the whole width (the first at the left edge, the last at the right) */
@media (min-width: 1100px) {
  .site-footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4) var(--space-5);
    justify-content: space-between;
  }

  .site-footer-inner > * {
    flex: 0 1 auto;
  }

  .footer-brand {
    max-width: 18rem;
  }

  .site-footer-inner > .footer-bottom {
    flex-basis: 100%;
  }

  /* with the legal links there are four columns on one line: they share the width instead of wrapping */
  .site-footer-inner:has(> .footer-side) {
    display: grid;
    grid-template-columns: minmax(0, 18rem) repeat(3, minmax(0, max-content));
    justify-content: space-between;
  }

  .site-footer-inner:has(> .footer-side) > .footer-bottom {
    grid-column: 1 / -1;
  }
}

/* ---------- Services ---------- */

/* white cards with a red top edge; the whole card is the link target */
.service-cards {
  display: grid;
  gap: var(--space-3);
  margin: var(--space-5) 0 0;
  padding: 0;
  list-style: none;
}

.section-inner > .service-cards:first-child {
  margin-top: 0;
}

.services-section {
  background: linear-gradient(180deg, var(--white) 0%, var(--light) 100%);
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-4) var(--space-3);
  text-align: center;
  background: var(--white);
  border-top: 3px solid var(--signal);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.service-card h2,
.service-card h3 {
  font-size: var(--step-1);
}

.service-card a {
  color: var(--text);
  text-decoration: none;
}

.service-card a::after {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-card);
  content: "";
}

.service-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.14);
}

.service-card:has(a:focus-visible) {
  outline: 3px solid var(--signal);
  outline-offset: 3px;
}

.service-card a:focus-visible {
  outline: none;
}

.service-card p {
  margin-top: var(--space-1);
  color: var(--muted);
}

.service-card-more {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin-top: auto;
  padding: 0 1.25rem;
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--action);
  border: 2px solid var(--action);
  border-radius: var(--pill);
}

.service-card p + .service-card-more {
  margin-top: var(--space-3);
}

.service-card:hover .service-card-more {
  color: var(--on-dark);
  background: var(--action);
}

.section-link {
  margin-top: var(--space-3);
  font-weight: 700;
}

.section-link a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.section-title ~ .section-link {
  text-align: center;
}

/* inner pages: light head with a hint of red, centered title with the red bar */
.page-head {
  position: relative;
  background: linear-gradient(180deg, #fdfdfd 0%, var(--blush) 100%);
  border-bottom: 1px solid #fde2e4;
}

.page-head-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-3) var(--gutter) var(--space-5);
  text-align: center;
}

.page-head h1 {
  max-width: 24ch;
  margin-top: var(--space-3);
  font-size: var(--step-5);
}

.page-head h1::after {
  display: block;
  width: 3.5rem;
  height: 4px;
  margin: var(--space-2) auto 0;
  background: var(--signal);
  border-radius: 2px;
  content: "";
}

.page-lead {
  max-width: 42rem;
  margin-top: var(--space-2);
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--muted);
}

.page-head-cta {
  margin-top: var(--space-4);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 0.5rem;
  margin: 0;
  padding: 0;
  font-size: var(--step--1);
  list-style: none;
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
}

.breadcrumbs li + li::before {
  margin-right: 0.5rem;
  color: var(--action);
  content: "/";
}

.breadcrumbs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
}

.breadcrumbs [aria-current="page"] {
  overflow-wrap: anywhere;
}

/* main text of a service: readable line length inside the page grid */
.prose > * {
  max-width: 44rem;
}

.prose h2 {
  margin-top: var(--space-4);
  font-size: var(--step-2);
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin-top: var(--space-3);
  font-size: var(--step-1);
}

.prose a {
  color: var(--action);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

.prose p,
.prose ul {
  margin-top: var(--space-2);
}

.prose ul {
  padding-left: 1.25rem;
}

.prose li::marker {
  color: var(--signal);
}

.prose li + li {
  margin-top: 0.375rem;
}

/* table in a text (e.g. a price list): rows with dividers; on small screens every row is a card */
.prose-table {
  margin-top: var(--space-3);
}

.prose-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step-0);
}

.prose-table th,
.prose-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.prose-table thead th {
  color: var(--muted);
  font-family: var(--font-heading);
  font-size: var(--step--1);
  font-weight: 600;
  background: var(--light);
  border-bottom: 1px solid var(--divider);
}

.prose-table tbody tr {
  border-bottom: 1px solid var(--divider);
  transition: background-color 0.15s ease;
}

.prose-table tbody tr:last-child {
  border-bottom: 0;
}

.prose-table tbody tr:hover {
  background: var(--light);
}

.prose-table tbody th {
  font-weight: 600;
}

/* the price stands out; the way of charging is quieter */
.prose-table td:nth-child(2) {
  color: var(--action);
  font-weight: 700;
  white-space: nowrap;
}

.prose-table td:nth-child(3) {
  color: var(--muted);
  font-size: var(--step--1);
}

/* on wider screens the table is a white card */
@media (min-width: 640px) {
  .prose-table {
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--divider);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
  }
}

@media (max-width: 639px) {
  .prose-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .prose-table table,
  .prose-table tbody,
  .prose-table tr,
  .prose-table th,
  .prose-table td {
    display: block;
  }

  .prose-table tbody tr {
    padding: 0.875rem 1rem;
    border: 1px solid var(--divider);
    border-left: 4px solid var(--signal);
    border-radius: var(--radius);
    background: var(--white);
  }

  .prose-table tbody tr:nth-child(even) {
    background: var(--white);
  }

  .prose-table tbody tr + tr {
    margin-top: 0.75rem;
  }

  .prose-table tbody th,
  .prose-table td {
    padding: 0;
  }

  .prose-table td {
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    margin-top: 0.375rem;
    white-space: normal;
  }

  .prose-table td {
    text-align: right;
  }

  .prose-table td::before {
    content: attr(data-label);
    flex-shrink: 0;
    color: var(--muted);
    font-weight: 400;
    text-align: left;
    overflow-wrap: normal;
  }

  .prose-table td:nth-child(2) {
    white-space: normal;
  }
}

/* a table with more than three columns (e.g. the cookies) is plain text: no price colouring, the cells wrap */
.prose-table-wide td:nth-child(2) {
  color: inherit;
  font-weight: 400;
  white-space: normal;
}

.prose-table-wide tbody th {
  overflow-wrap: normal;
  white-space: nowrap;
}

/* on phones the label of a long cell stands above its text */
@media (max-width: 639px) {
  .prose-table-wide td {
    flex-direction: column;
    gap: 0.125rem;
    text-align: left;
  }

  .prose-centered .prose-table.prose-table-wide tbody th,
  .prose-centered .prose-table.prose-table-wide td,
  .prose-centered .prose-table.prose-table-wide td::before {
    align-items: center;
    text-align: center;
  }
}

/* a centered text over the whole width (the legal pages): the cards are centered too */
.prose-centered.prose-wide .prose-cards li {
  text-align: center;
}

/* a table with an image right after it: side by side on wide screens, the image under the table on phones */
.prose > .prose-split {
  max-width: none;
}

.prose-split .prose-figure {
  margin-top: var(--space-3);
}

@media (min-width: 960px) {
  /* the image is as high as the table (cropped, not stretched): no empty space under it */
  .prose-split {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: var(--space-4);
    align-items: stretch;
    margin-top: var(--space-3);
  }

  .prose-split .prose-table,
  .prose-split .prose-figure {
    margin-top: 0;
  }

  .prose-split .prose-figure {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
  }

  .prose-split .prose-figure picture {
    display: block;
    flex: 1 1 auto;
    min-height: 0;
  }

  .prose-split .prose-figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-card);
  }
}

/* a service with centered text (admin setting): the column, headings, paragraphs and table cells are centered */
.prose-centered {
  text-align: center;
}

.prose-centered > * {
  margin-right: auto;
  margin-left: auto;
}

.prose-centered ul {
  display: table;
  padding-left: 1.25rem;
  text-align: left;
}

.prose-centered .prose-table th,
.prose-centered .prose-table td {
  text-align: center;
}

@media (max-width: 639px) {
  .prose-centered .prose-table tbody th {
    text-align: left;
  }

  .prose-centered .prose-table td {
    text-align: right;
  }
}

/* questions and answers: every question opens with a short red bar */
.faq-group + .faq-group {
  padding-top: 0;
}

.faq-list {
  max-width: 48rem;
  margin-top: var(--space-4);
}

.section-inner > .faq-list:first-child {
  margin-top: 0;
}

.faq-item {
  padding: var(--space-3) 0;
  border-top: 1px solid var(--divider);
}

.faq-item:last-child {
  border-bottom: 1px solid var(--divider);
}

.faq-question {
  max-width: 44rem;
  font-size: var(--step-1);
  line-height: 1.35;
}

.faq-question::before {
  display: block;
  width: 2rem;
  height: 3px;
  margin-bottom: var(--space-1);
  background: var(--signal);
  content: "";
}

.faq-answer > :first-child {
  margin-top: var(--space-1);
}

/* the questions of a service: centered, every answer opens under its question */
.faq-group-centered .faq-list {
  margin-right: auto;
  margin-left: auto;
}

.faq-group-centered .section-title {
  max-width: none;
}

.faq-group-centered .section-link {
  margin-top: var(--space-4);
  text-align: center;
}

.faq-group-centered .section-link .button {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  color: var(--on-dark);
  text-decoration: none;
}

.faq-accordion .faq-item {
  padding: 0;
}

.faq-accordion .faq-question {
  position: relative;
  display: block;
  max-width: none;
  padding: var(--space-3) 2.75rem var(--space-3) 0;
  font-family: var(--font-heading);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq-accordion .faq-question::-webkit-details-marker {
  display: none;
}

.faq-accordion .faq-question::before {
  display: none;
}

/* a plus that turns into a minus when the answer is open */
.faq-accordion .faq-question::after {
  position: absolute;
  top: 50%;
  right: 0.25rem;
  width: 1.75rem;
  height: 1.75rem;
  margin-top: -0.875rem;
  color: var(--white);
  font-size: 1.25rem;
  line-height: 1.75rem;
  text-align: center;
  background: var(--signal);
  border-radius: 50%;
  content: "+";
  transition: transform 0.2s ease;
}

.faq-accordion .faq-item[open] > .faq-question::after {
  content: "\2212";
}

.faq-accordion .faq-question:hover {
  color: var(--action);
}

.faq-accordion .faq-answer {
  padding: 0 0 var(--space-3);
}

/* numbered steps and items with titles in a text: cards that appear one after another */
.prose .prose-steps,
.prose .prose-cards {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-3);
  padding: 0;
  list-style: none;
}

.prose-steps {
  counter-reset: step;
}

.prose .prose-steps li,
.prose .prose-cards li {
  position: relative;
  margin: 0;
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-3);
  background: var(--white);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.04);
}

/* the transition is set only on hover so the appearing of the cards (.reveal) keeps its own timing */
.prose .prose-steps li:hover,
.prose .prose-cards li:hover {
  border-color: var(--signal);
  box-shadow: var(--shadow-card);
  translate: 0 -3px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, translate 0.2s ease;
}

/* the number of a step in a red circle */
.prose .prose-steps li {
  padding-left: 4rem;
  counter-increment: step;
}

.prose .prose-steps li::before {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  width: 2.25rem;
  height: 2.25rem;
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 2.25rem;
  text-align: center;
  background: var(--signal);
  border-radius: 50%;
  box-shadow: var(--shadow-button);
  content: counter(step);
}

/* a red bar on the left of a card */
.prose .prose-cards li::before {
  position: absolute;
  top: var(--space-2);
  bottom: var(--space-2);
  left: 0;
  width: 4px;
  background: var(--signal);
  border-radius: 0 2px 2px 0;
  content: "";
}

.prose-card-title {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--step-1);
  font-weight: 600;
  line-height: 1.25;
}

.prose-card-text {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
}

/* a highlighted note: the "i" in a circle, on blush */
.prose .prose-note {
  position: relative;
  margin-top: var(--space-3);
  padding: var(--space-2) var(--space-2) var(--space-2) 3.75rem;
  color: var(--text);
  background: var(--light);
  border-radius: var(--radius);
}

.prose-note::before {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  width: 1.75rem;
  height: 1.75rem;
  color: var(--white);
  font-family: Georgia, serif;
  font-style: italic;
  font-weight: 700;
  line-height: 1.75rem;
  text-align: center;
  background: var(--graphite);
  border-radius: 50%;
  content: "i";
}

/* service pages: simple lists are tiles with a tick; subheadings have more air and a short red bar */
.prose-rich h2 {
  margin-top: var(--space-5);
}

.prose-rich h2::after {
  display: block;
  width: 2.5rem;
  height: 3px;
  margin-top: var(--space-1);
  background: var(--signal);
  border-radius: 2px;
  content: "";
}

.prose-centered.prose-rich h2::after {
  margin-right: auto;
  margin-left: auto;
}

.prose-rich ul:not(.prose-cards) {
  display: grid;
  gap: var(--space-1);
  margin-top: var(--space-3);
  padding: 0;
  list-style: none;
}

.prose-rich ul:not(.prose-cards) li {
  position: relative;
  margin: 0;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  background: var(--light);
  border-radius: var(--radius);
}

/* the tick: two borders of a turned box */
.prose-rich ul:not(.prose-cards) li::before {
  position: absolute;
  top: 1rem;
  left: 1.1rem;
  width: 0.45rem;
  height: 0.8rem;
  border: solid var(--signal);
  border-width: 0 3px 3px 0;
  rotate: 45deg;
  content: "";
}

@media (min-width: 640px) {
  .prose .prose-cards,
  .prose-band .prose-steps,
  .prose-rich ul:not(.prose-cards) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* an odd last card takes the whole line */
  .prose .prose-cards li:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

/* the text after a divider on a service page: over the whole width, a column for every subheading */
.prose-wide > * {
  max-width: none;
}

.prose-side + .prose-wide,
.prose-wide + .prose-side,
.prose-wide + .prose-wide {
  padding-top: 0;
}

/* a band over the whole width: the title and its text centered, the cards side by side (three in a row) */
.prose-band > h2,
.prose-band > p:not(.prose-note) {
  max-width: 48rem;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.prose-rich.prose-band > h2::after {
  margin-right: auto;
  margin-left: auto;
}

/* all cards and tiles of a band on one line on wide screens (two per line on tablets, one on phones) */
@media (min-width: 1024px) {
  .prose-band .prose-cards,
  .prose-band .prose-steps,
  .prose-rich.prose-band ul:not(.prose-cards) {
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    grid-template-columns: none;
  }
}

@media (min-width: 1024px) {
  .prose-band .prose-cards li:last-child:nth-child(odd) {
    grid-column: auto;
  }
}

.prose-wide-intro {
  max-width: 48rem;
  margin: 0 auto var(--space-4);
  text-align: center;
}

/* a wide part with text only (e.g. the opening of a page): from edge to edge of the content like the boxes below it,
   no space below, a slightly larger text */
.prose-wide-intro:last-child {
  max-width: none;
  margin-bottom: 0;
}

.prose-wide-intro:last-child p {
  font-size: 1.125rem;
}

/* the columns of one line are equally high; a fixed number per line so no column stays alone on a line */
.prose-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: var(--space-3);
}

@media (min-width: 640px) {
  .prose-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .prose-columns > .prose-column:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1024px) {
  .prose-columns-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .prose-columns-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .prose-columns-3 > .prose-column:last-child:nth-child(odd),
  .prose-columns-4 > .prose-column:last-child:nth-child(odd) {
    grid-column: auto;
  }
}

.prose .prose-column {
  margin: 0;
  padding: var(--space-4) var(--space-3);
  background: var(--light);
  border-radius: var(--radius-card);
}

.prose-column > :first-child {
  margin-top: 0;
}

.prose-rich .prose-column h2 {
  margin-top: 0;
  font-size: var(--step-2);
  text-align: center;
}

.prose-rich .prose-column h2::after {
  margin-right: auto;
  margin-left: auto;
}

/* in a column the paragraphs and the button are centered under the centered title */
.prose-column > p,
.prose-column > .prose-button {
  text-align: center;
}

.prose-column > .prose-note {
  text-align: left;
}

/* in a column the cards and tiles are one under another, on white */
.prose-column .prose-cards,
.prose-rich .prose-column ul:not(.prose-cards) {
  grid-template-columns: minmax(0, 1fr);
}

.prose-rich .prose-column ul:not(.prose-cards) li {
  background: var(--white);
}

.prose-column .prose-cards li:last-child:nth-child(odd) {
  grid-column: auto;
}

.prose-column .prose-note {
  background: var(--white);
}

.prose-rule {
  margin: var(--space-4) 0;
  border: 0;
  border-top: 1px solid var(--divider);
}

/* in a row next to an image the tiles and cards are one under another */
.prose-side .prose-rich ul:not(.prose-cards),
.prose-side .prose-rich .prose-cards {
  grid-template-columns: minmax(0, 1fr);
}

/* the text about the services on the services page: the title and the parts follow each other without double space */
.services-body > .section-inner:first-child {
  padding-bottom: 0;
}

.services-body .section-inner + .prose-wide,
.services-body .section-inner + .prose-side {
  padding-top: var(--space-4);
}

.services-body .section-title {
  max-width: none;
}

.services-body-faq {
  padding-top: 0;
  text-align: center;
}

/* a note in a band is centered, with its "i" in front of the text */
.prose-band > .prose-note {
  padding: var(--space-2);
  text-align: center;
}

.prose-band > .prose-note::before {
  position: static;
  display: inline-block;
  margin-right: 0.75rem;
  vertical-align: middle;
}

/* a paragraph that is only a link: a button */
.prose .prose-button {
  margin-top: var(--space-3);
}

.prose .prose-button .button {
  color: var(--on-dark);
  text-decoration: none;
}

/* a card with an icon of the site: the icon in a red circle above the title */
.prose-card-icon {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: var(--space-2);
  color: var(--white);
  background: var(--signal);
  border-radius: 50%;
  box-shadow: var(--shadow-button);
}

.prose .prose-cards li.has-icon {
  padding-left: var(--space-3);
}

.prose .prose-cards li.has-icon::before {
  display: none;
}

/* "---dark": a wide part on a graphite band from edge to edge, the cards centered with their icons */
.prose-dark {
  color: var(--on-dark);
  background: radial-gradient(120% 140% at 0% 0%, #45454b 0%, var(--graphite) 55%, var(--graphite-deep) 100%);
}

.prose-dark .prose-wide {
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
}

.prose-dark h2 {
  color: var(--white);
}

.prose-dark .prose-cards li {
  text-align: center;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

.prose-dark .prose-cards li:hover {
  background: rgba(255, 255, 255, 0.09);
}

.prose-dark .prose-card-icon {
  margin-right: auto;
  margin-left: auto;
}

.prose-dark .prose-card-title {
  color: var(--white);
}

.prose-dark .prose-card-text,
.prose-dark p {
  color: var(--on-dark-muted);
}

.prose-dark a {
  color: var(--white);
}

/* the photo between the groups of questions: a wide band, cropped to a low height */
.faq-figure {
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
}

.faq-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.faq-figure + .faq-group {
  padding-top: 0;
}

.faq-figure figcaption {
  margin-top: var(--space-1);
  color: var(--muted);
  font-size: var(--step--1);
  text-align: center;
}

@media (min-width: 760px) {
  .faq-figure img {
    aspect-ratio: 21 / 8;
  }
}

/* the questions page: the accordion in two columns of cards; an open question has a red frame */
.faq-columns {
  display: grid;
  gap: var(--space-2);
  align-items: start;
  max-width: none;
}

.faq-columns .faq-item,
.faq-columns .faq-item:last-child {
  padding: 0 var(--space-3);
  background: var(--white);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.04);
}

.faq-columns .faq-item[open] {
  border-color: var(--signal);
  box-shadow: var(--shadow-card);
}

@media (min-width: 900px) {
  .faq-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* rows of a text with images: in every second row the image is on the left (on wide screens) */
.prose-side + .prose-side {
  padding-top: 0;
}

@media (min-width: 1024px) {
  .prose-side-reverse > .intro-figure {
    order: -1;
  }

  /* both columns of a row are equally high: the image fills its column (cropped, not stretched) */
  .prose-side {
    align-items: stretch;
  }

  .prose-side > .intro-figure {
    position: static;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
  }

  .prose-side > .intro-figure picture {
    display: block;
    flex: 1 1 auto;
    min-height: 0;
  }

  .prose-side > .intro-figure img {
    height: 100%;
    object-fit: cover;
  }
}

@media (min-width: 760px) {
  .service-cards {
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  }
}

/* ---------- Blog ---------- */

/* category links: pills; the current one is filled */
.blog-categories ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-1);
  margin: 0 0 var(--space-4);
  padding: 0;
  list-style: none;
}

.blog-categories a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-2);
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--pill);
}

.blog-categories a:hover {
  border-color: var(--text);
}

.blog-categories a[aria-current="page"] {
  color: var(--on-dark);
  background: var(--action);
  border-color: var(--action);
}

/* article cards: white cards with a red top edge, as the services */
.post-cards {
  display: grid;
  gap: var(--space-2);
  margin: var(--space-4) 0 0;
  padding: 0;
  list-style: none;
}

.blog-list > .post-cards:first-child,
.blog-categories + .post-cards {
  margin-top: 0;
}

.post-card {
  position: relative;
  padding: var(--space-3);
  background: var(--white);
  border-top: 3px solid var(--signal);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.post-card h2,
.post-card h3 {
  font-size: var(--step-1);
  line-height: 1.3;
}

.post-card a {
  color: var(--text);
  text-decoration: none;
}

.post-card a::after {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-card);
  content: "";
}

.post-card:hover {
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.14);
}

.post-card:hover a {
  color: var(--action);
}

.post-card:has(a:focus-visible) {
  outline: 3px solid var(--signal);
  outline-offset: 3px;
}

.post-card a:focus-visible {
  outline: none;
}

.post-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-2);
  margin-top: var(--space-1);
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--muted);
}

.post-card p:last-child {
  margin-top: var(--space-1);
  color: var(--muted);
}

/* the list continues: previous, page numbers, next */
.pagination ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
  margin: var(--space-5) 0 0;
  padding: 0;
  list-style: none;
}

.pagination a,
.pagination [aria-current="page"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 var(--space-2);
  font-weight: 700;
  color: var(--text);
  border-radius: var(--pill);
}

.pagination a {
  text-decoration: underline;
  text-decoration-color: var(--signal);
  text-underline-offset: 0.25em;
}

.pagination [aria-current="page"] {
  color: var(--on-dark);
  background: var(--action);
}

.pagination-gap {
  color: var(--muted);
}

/* article head: published, updated, author and category */
.post-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-1) var(--space-4);
  margin: var(--space-3) 0 0;
  font-size: var(--step--1);
}

.post-meta dt {
  color: var(--muted);
}

.post-meta dd {
  margin: 0;
  font-weight: 700;
}

.post-meta a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
}

.post-service {
  max-width: 44rem;
  padding: var(--space-3);
  background: var(--white);
  border-left: 4px solid var(--signal);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.post-service h2 {
  font-size: var(--step--1);
  color: var(--muted);
}

.post-service-name {
  margin-top: var(--space-1);
  font-size: var(--step-1);
  font-weight: 700;
}

.post-service-name a {
  color: var(--text);
  text-decoration-color: var(--signal);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}

.post-service p:last-child {
  margin-top: var(--space-1);
  color: var(--muted);
}

.service-card-image {
  display: block;
  align-self: stretch;
  margin: calc(-1 * var(--space-2)) calc(-1 * var(--space-1)) var(--space-3);
}

.service-card-image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: calc(var(--radius) - 4px);
}

/* the picture of a card above its title, all cards in the same proportion */
.post-card-image {
  display: block;
  margin-bottom: var(--space-2);
}

.post-card-image img,
.post-cover img,
.prose-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius) - 4px);
}

.post-card-image img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.post-cover {
  margin: 0 auto;
  padding-top: var(--space-5);
  padding-bottom: 0;
}

.post-cover figcaption,
.prose-figure figcaption,
.intro-figure figcaption {
  margin-top: var(--space-1);
  font-size: var(--step--1);
  color: var(--muted);
}

.prose-figure {
  margin: var(--space-4) 0 0;
}

@media (min-width: 760px) {
  .post-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* three articles in a row on a wide screen (12 on a page, 3 related) */
@media (min-width: 1024px) {
  .post-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- Blog: side column ---------- */

/* the list or the article and the side column: one under the other on phones, side by side from 1024px */
.blog-with-side {
  display: grid;
  gap: var(--space-5);
}

.blog-main {
  min-width: 0;
}

.blog-main > .post-cards:first-child {
  margin-top: 0;
}

.post-body {
  padding-top: var(--space-5);
}

.post-body .post-cover {
  margin: 0;
  padding: 0;
}

.post-body .post-cover + .prose {
  margin-top: var(--space-4);
}

.post-body .post-service {
  margin-top: var(--space-5);
}

/* beside the side column the text, its images and the related service use the whole width of the main image */
.blog-with-side .prose > *,
.blog-with-side .post-service {
  max-width: none;
}

.blog-side {
  display: grid;
  gap: var(--space-3);
  align-content: start;
}

.side-box {
  padding: var(--space-3);
  background: var(--white);
  border: 1px solid var(--divider);
  border-radius: var(--radius-card);
}

.side-title {
  margin-bottom: var(--space-2);
  font-size: var(--step-1);
  line-height: 1.3;
}

/* search: the field with the button inside it */
.side-search {
  position: relative;
  padding: 0;
  border: 0;
}

.side-search input {
  width: 100%;
  min-height: 52px;
  padding: 0 3.5rem 0 var(--space-3);
  font: inherit;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--pill);
}

.side-search input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.side-search input:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 2px;
}

.side-search button {
  position: absolute;
  top: 4px;
  right: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--on-dark);
  background: var(--action);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.side-search button:hover {
  background: var(--action-strong);
}

/* most read and latest: a small picture and the title */
.side-posts {
  display: grid;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}

.side-posts a {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: var(--space-2);
  align-items: center;
  min-height: 44px;
  padding: var(--space-1) 0;
  font-size: var(--step--1);
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  text-decoration: none;
}

.side-posts a > span {
  grid-column: 2;
}

.side-posts a:hover > span {
  color: var(--action);
  text-decoration: underline;
  text-decoration-color: var(--signal);
  text-underline-offset: 0.2em;
}

.side-posts li + li a {
  border-top: 1px solid var(--divider);
}

.side-post-image img {
  display: block;
  width: 5.5rem;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
}

/* topics: a coloured dot, the name and the number of articles */
.side-topics ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.side-topics a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
}

.side-topics li + li a {
  border-top: 1px solid var(--divider);
}

.side-topics a:hover .side-topic-name,
.side-topics a[aria-current="page"] .side-topic-name {
  color: var(--action);
}

.side-topics a[aria-current="page"] {
  font-weight: 700;
}

.side-topic-name {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
}

.side-dot {
  flex: none;
  width: 0.625rem;
  height: 0.625rem;
  background: var(--topic, var(--signal));
  border-radius: 50%;
}

/* the colours of the palette (admin → "Странична лента на блога"; the same values as BlogSidebarSettings::PALETTE) */
.topic-red { --topic: #d90f18; }
.topic-blue { --topic: #1d4ed8; }
.topic-teal { --topic: #0f766e; }
.topic-amber { --topic: #b45309; }
.topic-violet { --topic: #6d28d9; }
.topic-green { --topic: #15803d; }
.topic-pink { --topic: #be185d; }
.topic-graphite { --topic: #2f2f33; }

.side-count {
  min-width: 2rem;
  padding: 0.125rem 0.5rem;
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--muted);
  text-align: center;
  background: var(--light);
  border-radius: var(--pill);
}

/* the question: a graphite card with the red button */
.side-ask {
  color: var(--on-dark);
  background: var(--graphite);
  border-color: var(--graphite);
}

.side-ask p {
  margin-bottom: var(--space-3);
  color: var(--on-dark-muted);
}

.side-ask .button {
  width: 100%;
}

@media (min-width: 1024px) {
  .blog-with-side {
    grid-template-columns: minmax(0, 1fr) 20rem;
    align-items: start;
  }

  /* beside the column: two cards in a row; the category links start at the left */
  .blog-with-side .post-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .blog-with-side .blog-categories ul {
    justify-content: flex-start;
  }

  /* the column moves with the page: a short one stays under the header, a tall one scrolls until its end is in
     view and stays there (app.js sets --side-top from the heights of the header, the window and the column) */
  .blog-side {
    position: sticky;
    top: var(--side-top, 6.5rem);
  }
}

@media (min-width: 1280px) {
  .blog-with-side {
    grid-template-columns: minmax(0, 1fr) 22rem;
    gap: var(--space-6);
  }
}

/* ---------- Gallery ---------- */

.gallery {
  position: relative;
}

/* the slider: three images on wide screens, two on tablets, most of one on phones; it snaps to an image */
.gallery-track {
  display: grid;
  grid-auto-columns: 85%;
  grid-auto-flow: column;
  gap: var(--space-2);
  margin: 0;
  padding: 0 0 var(--space-1);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  list-style: none;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.gallery-track::-webkit-scrollbar {
  display: none;
}

.gallery-track > li {
  scroll-snap-align: start;
}

.gallery-track figure {
  margin: 0;
}

.gallery-link {
  display: block;
  overflow: hidden;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  cursor: zoom-in;
}

.gallery-link img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-link:hover img {
  transform: scale(1.04);
}

.gallery-track figcaption {
  margin-top: var(--space-1);
  font-size: var(--step--1);
  color: var(--muted);
}

/* the arrows of the slider: white circles on the left and right edge */
.gallery-arrow {
  position: absolute;
  top: calc(50% - 1.5rem);
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--divider);
  border-radius: 50%;
  box-shadow: var(--shadow-card);
  cursor: pointer;
}

.gallery-arrow[hidden] {
  display: none;
}

.gallery-arrow:hover {
  color: var(--white);
  background: var(--action);
  border-color: var(--action);
}

.gallery-arrow-prev {
  left: -0.75rem;
}

.gallery-arrow-next {
  right: -0.75rem;
}

@media (min-width: 640px) {
  .gallery-track {
    grid-auto-columns: calc((100% - var(--space-2)) / 2);
  }
}

@media (min-width: 1024px) {
  .gallery-track {
    grid-auto-columns: calc((100% - 2 * var(--space-2)) / 3);
  }

  .gallery-arrow-prev {
    left: -1.5rem;
  }

  .gallery-arrow-next {
    right: -1.5rem;
  }
}

/* the lightbox: the image on the whole screen on a dark background, arrows on the sides, the number below */
.lightbox {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  color: var(--on-dark);
  background: transparent;
  border: 0;
}

.lightbox[open] {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.lightbox::backdrop {
  background: rgba(10, 10, 12, 0.97);
}

.lightbox-figure {
  grid-column: 2;
  display: grid;
  justify-items: center;
  gap: var(--space-1);
  margin: 0;
  touch-action: pan-y;
  user-select: none;
}

.lightbox-figure img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 82dvh;
  object-fit: contain;
  border-radius: var(--radius);
}

.lightbox-figure figcaption {
  color: var(--on-dark-muted);
  font-size: var(--step--1);
  text-align: center;
}

.lightbox-button {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin: var(--space-1);
  padding: 0;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.lightbox-button:hover {
  background: var(--action);
}

.lightbox-prev {
  grid-column: 1;
  grid-row: 1;
}

.lightbox-next {
  grid-column: 3;
  grid-row: 1;
}

.lightbox-close {
  position: fixed;
  top: var(--space-2);
  right: var(--space-2);
  z-index: 1;
}

.lightbox-counter {
  position: fixed;
  bottom: var(--space-2);
  left: 50%;
  margin: 0;
  color: var(--on-dark-muted);
  font-size: var(--step--1);
  translate: -50% 0;
}

/* on phones the arrows are smaller and sit over the edges of the image */
@media (max-width: 639px) {
  .lightbox-button {
    width: 2.5rem;
    height: 2.5rem;
    margin: 0.25rem;
  }
}

/* ---------- Contacts ---------- */

/* the ways to contact us: white cards with a red top edge and an icon in a red circle, all equally high */
.contact-cards {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-4) var(--space-3);
  text-align: center;
  background: var(--white);
  border-top: 3px solid var(--signal);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.contact-card-icon {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: var(--space-2);
  color: var(--white);
  background: var(--signal);
  border-radius: 50%;
  box-shadow: var(--shadow-button);
}

.contact-card h3 {
  font-size: var(--step-1);
}

.contact-card p {
  flex: 1 1 auto;
  margin: var(--space-1) 0 var(--space-2);
  color: var(--muted);
}

.contact-card-value {
  font-size: var(--step-1);
  font-weight: 700;
  color: var(--text);
  overflow-wrap: anywhere;
}

a.contact-card-value {
  text-decoration: underline;
  text-decoration-color: var(--signal);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}

a.contact-card-value + a.contact-card-value {
  margin-top: var(--space-1);
}

a.contact-card-value:hover {
  color: var(--action);
}

.contact-card-extra {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
  color: var(--action);
}

.contact-card-button {
  color: var(--on-dark);
}

/* the working hours and the profiles under the cards, centered; the profiles are pills */
.contact-more {
  display: grid;
  justify-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  text-align: center;
}

.contact-hours {
  margin: 0;
  font-weight: 600;
}

.contact-profiles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-profiles a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  background: var(--light);
  border: 1px solid var(--divider);
  border-radius: var(--pill);
}

.contact-profiles a:hover {
  color: var(--white);
  background: var(--action);
  border-color: var(--action);
}

/* the photo under the tips fills the rest of the card (cropped, not stretched) */
.contact-tips {
  display: flex;
  flex-direction: column;
}

.contact-tips-figure {
  flex: 1 1 auto;
  min-height: 12rem;
  margin: var(--space-3) 0 0;
}

.contact-tips-figure picture {
  display: block;
  height: 100%;
}

.contact-tips-figure img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 12rem;
  object-fit: cover;
  border-radius: var(--radius);
}

/* the form follows the cards without a double space */
.contact-cards-section + .contact-form-row {
  padding-top: 0;
}

/* the form in a white card, the tips next to it on a graphite card */
.contact-form-row {
  display: grid;
  gap: var(--space-4);
  align-items: start;
}

.contact-message {
  padding: var(--space-4) var(--space-3);
  background: var(--white);
  border: 1px solid var(--divider);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.contact-tips {
  padding: var(--space-4) var(--space-3);
  color: var(--on-dark-muted);
  background: radial-gradient(120% 140% at 0% 0%, #45454b 0%, var(--graphite) 55%, var(--graphite-deep) 100%);
  border-radius: var(--radius-card);
}

.contact-tips h2 {
  color: var(--white);
  font-size: var(--step-2);
}

.contact-tips h2::after {
  display: block;
  width: 2.5rem;
  height: 3px;
  margin-top: var(--space-1);
  background: var(--signal);
  border-radius: 2px;
  content: "";
}

.contact-tips p {
  margin: var(--space-2) 0;
}

.contact-tips ul {
  display: grid;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-tips li {
  position: relative;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
}

.contact-tips li::before {
  position: absolute;
  top: 1rem;
  left: 1.1rem;
  width: 0.45rem;
  height: 0.8rem;
  border: solid var(--signal);
  border-width: 0 3px 3px 0;
  rotate: 45deg;
  content: "";
}

@media (min-width: 640px) {
  .contact-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-message {
    padding: var(--space-5) var(--space-4);
  }
}

@media (min-width: 1100px) {
  .contact-cards {
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    grid-template-columns: none;
  }

  /* the two cards are equally high */
  .contact-form-row {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    align-items: stretch;
  }
}

/* ---------- Error and quote pages ---------- */

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-5) var(--gutter) var(--space-6);
}

.page h1 {
  max-width: 22ch;
  margin-bottom: var(--space-2);
  font-size: var(--step-4);
}

.page .lead {
  max-width: 40rem;
  margin-bottom: var(--space-4);
  font-size: var(--step-1);
  color: var(--muted);
}

.quote-page {
  max-width: 50rem;
}

/* ---------- Quote form ---------- */

.qf {
  display: grid;
  gap: var(--space-2);
}

.qf-group-title {
  padding-top: var(--space-1);
  font-family: var(--font-heading);
  font-size: var(--step-1);
  font-weight: 600;
  color: var(--text);
  border-top: 1px solid var(--divider);
}

.qf-note,
.qf-help {
  font-size: var(--step--1);
  color: var(--muted);
}

.qf-field {
  display: grid;
  gap: 0.375rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.qf-field > label,
.qf-field legend {
  padding: 0;
  font-weight: 700;
}

/* "Друг модел": the text field under the list of models */
.qf-model-other {
  display: grid;
  gap: 0.25rem;
  margin-top: 0.25rem;
}

.qf-model-other[hidden] {
  display: none;
}

.qf-model-other label {
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--muted);
}

.qf-required {
  color: var(--action);
}

.qf input[type="text"],
.qf input[type="email"],
.qf input[type="tel"],
.qf select,
.qf textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.625rem 0.875rem;
  font: inherit;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.qf input:focus,
.qf select:focus,
.qf textarea:focus {
  border-color: var(--action);
  outline: 3px solid rgba(255, 19, 29, 0.25);
  outline-offset: 0;
}

.qf textarea {
  resize: vertical;
}

.qf select:disabled {
  color: var(--muted);
  background: var(--light);
}

.qf [aria-invalid="true"] {
  border-color: var(--error);
}

.qf-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem var(--space-3);
}

.qf-option {
  display: inline-flex;
  gap: 0.625rem;
  align-items: flex-start;
  min-height: 44px;
  padding-top: 0.625rem;
  font-weight: 400;
}

.qf-option input {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.125rem 0 0;
  accent-color: var(--action);
}

.qf-error {
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--error);
}

.qf-error:empty {
  display: none;
}

.qf-summary {
  padding: 0.75rem 1rem;
  font-weight: 700;
  color: var(--error);
  background: var(--error-bg);
  border-left: 4px solid var(--action);
  border-radius: 8px;
}

.qf-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.qf-actions {
  padding-top: var(--space-1);
}

.qd-success {
  padding: var(--space-3);
  color: var(--success);
  background: var(--success-bg);
  border-left: 4px solid var(--success);
  border-radius: 8px;
}

.qd-success h2,
.qd-success h3 {
  margin-bottom: var(--space-1);
  font-size: var(--step-1);
}

.qd-success p {
  margin-bottom: var(--space-2);
  color: var(--text);
}

@media (min-width: 720px) {
  .qf {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-2) var(--space-3);
  }

  .qf-note,
  .qf-summary,
  .qf-group-title,
  .qf-choices,
  .qf-consent,
  .qf-wide,
  .qf-actions {
    grid-column: 1 / -1;
  }
}

/* the form "Send us a message" of the contacts page: a readable width inside the page */
.contact-message-form,
.contact-message-lead,
.contact-message-sent {
  max-width: 50rem;
}

.contact-message-title {
  margin-bottom: var(--space-1);
  font-size: var(--step-2);
}

.contact-message-lead {
  margin-bottom: var(--space-3);
  color: var(--muted);
}

.contact-message-sent {
  padding: var(--space-3);
  background: var(--success-bg);
  border-left: 4px solid var(--success);
  border-radius: 8px;
}

.contact-message-sent-title {
  margin-bottom: var(--space-1);
  font-family: var(--font-heading);
  font-size: var(--step-1);
  font-weight: 600;
  color: var(--success);
}

/* the review dialog: one column */
.review-dialog .qf {
  grid-template-columns: minmax(0, 1fr);
}

.review-dialog .qf-field {
  grid-column: 1 / -1;
}

/* ---------- Quote dialog ---------- */

html.modal-open {
  overflow: hidden;
}

.quote-dialog {
  width: 100%;
  max-width: 46rem;
  max-height: 100%;
  margin: auto;
  padding: 0;
  color: var(--text);
  background: var(--white);
  border: 0;
  border-radius: 0;
}

.quote-dialog::backdrop {
  background: rgba(17, 24, 39, 0.6);
}

.qd-body {
  padding: var(--space-2);
}

.qd-head {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
  justify-content: space-between;
}

.qd-head h2 {
  margin-top: 0.5rem;
  font-size: var(--step-2);
}

.qd-close {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--graphite);
  background: var(--light);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.qd-close:hover {
  color: var(--on-dark);
  background: var(--graphite);
}

.qd-intro {
  margin: var(--space-1) 0 var(--space-2);
  color: var(--muted);
}

@media (min-width: 720px) {
  .quote-dialog {
    max-height: calc(100% - 4rem);
    border-radius: 16px;
  }

  .qd-body {
    padding: var(--space-3) var(--space-4) var(--space-4);
  }
}

/* ---------- Chat: a red round button in the corner and a panel above it (full screen on phones) ---------- */
.chat {
  position: fixed;
  right: max(var(--space-2), env(safe-area-inset-right));
  bottom: max(var(--space-2), env(safe-area-inset-bottom));
  z-index: 15;
}

.chat-open {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  min-height: 56px;
  padding: 0 1.25rem 0 1rem;
  font: inherit;
  font-weight: 700;
  color: var(--on-dark);
  background: var(--action);
  border: 0;
  border-radius: var(--pill);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.25);
  cursor: pointer;
}

.chat-open:hover {
  background: var(--action-strong);
}

.chat-open[aria-busy="true"] {
  cursor: progress;
}

/* on phones the button is only the icon while the panel is closed, so it covers little of the page */
@media (max-width: 639px) {
  .chat-open {
    justify-content: center;
    width: 56px;
    padding: 0;
  }

  .chat-open span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .chat-is-open .chat-open {
    display: none;
  }
}

.chat-panel {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--white);
}

.chat-panel[hidden] {
  display: none;
}

.chat-head {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-3);
  color: var(--on-dark);
  background: var(--graphite);
  border-top: 4px solid var(--signal);
}

.chat-title {
  margin: 0;
  font-size: var(--step-1);
  line-height: 1.3;
}

.chat-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.chat-close:hover {
  background: rgba(255, 255, 255, 0.12);
}

.chat-log {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--space-2);
  min-height: 0;
  padding: var(--space-3);
  overflow-y: auto;
  background: var(--light);
  overscroll-behavior: contain;
}

.chat-msg {
  max-width: 88%;
}

.chat-msg p,
p.chat-msg {
  margin: 0;
  padding: 0.75rem 1rem;
  line-height: 1.5;
  border-radius: 1rem;
}

.chat-msg-bot p,
p.chat-msg-bot {
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--divider);
  border-bottom-left-radius: 0.25rem;
}

.chat-msg-user {
  align-self: flex-end;
}

.chat-msg-user p {
  color: var(--on-dark);
  background: var(--graphite);
  border-bottom-right-radius: 0.25rem;
}

.chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-top: var(--space-1);
}

.chat-action {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--pill);
}

.chat-action:hover {
  border-color: var(--action);
}

.chat-action-main {
  color: var(--on-dark);
  background: var(--action);
  border-color: var(--action);
}

.chat-action-main:hover {
  background: var(--action-strong);
}

.chat-typing {
  margin: 0;
  font-size: var(--step--1);
  color: var(--muted);
}

.chat-error:empty {
  display: none;
}

.chat-error {
  margin: 0;
  padding: var(--space-1) var(--space-3);
  font-size: var(--step--1);
  color: var(--error);
  background: var(--white);
}

.chat-form {
  display: flex;
  gap: var(--space-1);
  align-items: flex-end;
  padding: var(--space-2) var(--space-2) 0;
  background: var(--white);
  border-top: 1px solid var(--divider);
}

.chat-form textarea {
  flex: 1;
  min-height: 48px;
  max-height: 8rem;
  padding: 0.75rem 1rem;
  font: inherit;
  line-height: 1.4;
  color: var(--text);
  resize: none;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
}

.chat-form textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}

.chat-form textarea:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 1px;
}

.chat-send {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  color: var(--on-dark);
  background: var(--action);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.chat-send:hover {
  background: var(--action-strong);
}

.chat-form[aria-busy="true"] .chat-send {
  cursor: progress;
  opacity: 0.7;
}

.chat-human {
  align-self: flex-start;
  min-height: 44px;
  margin: var(--space-1) var(--space-2) 0;
  padding: 0 var(--space-1);
  font: inherit;
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--action);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.chat-note {
  margin: 0;
  padding: var(--space-1) var(--space-3) max(var(--space-2), env(safe-area-inset-bottom));
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--muted);
  background: var(--white);
}

@media (min-width: 640px) {
  .chat-panel {
    position: absolute;
    inset: auto 0 calc(100% + var(--space-2)) auto;
    width: min(24rem, calc(100vw - 2 * var(--space-2)));
    height: min(38rem, calc(100dvh - 7rem));
    overflow: hidden;
    border-radius: var(--radius-card);
    box-shadow: 0 18px 48px rgba(17, 24, 39, 0.28);
  }
}

@media print {
  .chat {
    display: none;
  }
}

/* ---------- Consent banner: a graphite panel with a red top edge ---------- */
.consent {
  position: fixed;
  inset: auto 0 0;
  z-index: 20;
  max-height: 100dvh;
  overflow-y: auto;
  color: var(--on-dark);
  background: var(--graphite-deep);
  box-shadow: 0 -0.5rem 1.5rem rgba(0, 0, 0, 0.25);
}

.consent::before {
  display: block;
  height: 3px;
  background: var(--signal);
  content: "";
}

.consent-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-3) var(--gutter);
}

.consent-title {
  font-size: var(--step-1);
}

.consent-text {
  margin-top: var(--space-1);
  font-size: var(--step--1);
  line-height: 1.55;
  color: var(--on-dark-muted);
}

.consent-text a {
  color: var(--on-dark);
  text-decoration-thickness: 2px;
  text-decoration-color: var(--signal);
  text-underline-offset: 0.2em;
}

.consent-options {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.consent-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.75rem;
  align-items: center;
}

.consent-option input {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  accent-color: var(--signal);
}

.consent-option label {
  font-weight: 700;
}

.consent-option p {
  grid-column: 2;
  font-size: var(--step--1);
  color: var(--on-dark-muted);
}

.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-top: var(--space-3);
}

.consent-actions .button {
  flex: 1 1 10rem;
  padding: 0 1rem;
}

/* from 760px: the text over the whole width, the buttons on the right; the categories side by side from 1024px */
@media (min-width: 760px) {
  .consent-actions {
    justify-content: flex-end;
  }

  .consent-actions .button {
    flex: 0 0 auto;
  }
}

@media (min-width: 1024px) {
  .consent-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }
}

.footer-link-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  font: inherit;
  color: var(--on-dark);
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
}

.footer-link-button:hover {
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
