/* Brightwater Heat & Air: demo styles. No build step, no framework. */

:root {
  --ink: #0f2e3d;          /* estuary ink: text, dark stage */
  --ink-soft: #cfe0e7;     /* secondary text on ink */
  --sky: #e3ecef;          /* fen sky: page */
  --sky-deep: #d3e0e5;
  --paper: #ffffff;
  --mist: #4a6170;         /* secondary text on light */
  --rule: #b9cad1;         /* dividers */
  --line: #5f7884;         /* input borders (3:1+ on white) */
  --warm: #ffb938;         /* flow amber */
  --warm-soft: #ffd27a;
  --warm-ink: #7a4f00;     /* amber-family text on light */
  --focus: #1565c0;
  --error: #a3242a;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --phone-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(16px, 4.5vw, 56px);
  --strip-h: 44px;          /* updated from JS to the real strip height */
  --stage-w: clamp(400px, 36vw, 520px);
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--sky);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.demo-strip :focus-visible,
.stage :focus-visible,
.notice :focus-visible { outline-color: var(--warm); }
.phone :focus-visible { outline-color: var(--focus); outline-offset: 1px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 8px; top: -120px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 6px;
  background: var(--warm);
  color: var(--ink);
  font-weight: 700;
}
.skip:focus { top: 8px; }

/* ---------- Honesty strip: always visible ---------- */

.demo-strip {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink);
  color: #fff;
  border-bottom: 3px solid var(--warm);
}
.demo-strip p {
  margin: 0;
  padding: 7px var(--gutter);
  font-size: .8125rem;
  line-height: 1.4;
}

/* ---------- Installer site header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px var(--gutter);
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}
.brand__mark { width: 40px; height: 40px; flex: none; }
.brand__name { display: flex; flex-direction: column; min-width: 0; line-height: 1.05; }
.brand__word {
  font-size: 1.1875rem;
  font-weight: 800;
  font-stretch: 122%;
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
}
/* ?brand= with a long name: smaller and narrower so it wraps instead of pushing the page wider */
.brand__word--long { font-size: 1rem; font-stretch: 105%; line-height: 1.15; }
.brand__sub { font-size: .8125rem; font-weight: 600; color: var(--mist); }

.call {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  font-size: .9375rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  white-space: nowrap;
}
.call:hover { background: rgba(15, 46, 61, .06); }
.call svg { width: 17px; height: 17px; flex: none; }

@media (max-width: 420px) {
  .site-header { gap: 8px; }
  .brand { gap: 8px; }
  .brand__mark { width: 34px; height: 34px; }
  .brand__word { font-size: 1.0625rem; }
  .brand__word--long { font-size: .9375rem; }
  .call { gap: 6px; padding: 0 11px; font-size: .875rem; }
  .call svg { width: 15px; height: 15px; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  min-height: 52px;
  padding: 12px 22px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 700;
  font-stretch: 108%;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, transform .1s ease;
}
.btn--primary { background: var(--warm); color: var(--ink); }
.btn--primary:hover { background: var(--warm-soft); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: rgba(15, 46, 61, .07); }
.btn--block { width: 100%; }
.btn--small { min-height: 44px; padding: 8px 16px; font-size: .9375rem; }
.btn.is-pressed, .btn:active { transform: translateY(1px) scale(.99); background: var(--warm-soft); }
.btn:disabled {
  background: var(--sky-deep);
  border-color: var(--rule);
  color: var(--mist);
  cursor: default;
  transform: none;
}

/* ---------- Hero ---------- */

.hero { padding: clamp(28px, 6vw, 64px) var(--gutter) clamp(28px, 4vw, 44px); }
.hero > * { max-width: 680px; }
.hero h1 {
  margin: 0 0 .45em;
  font-size: clamp(2.25rem, 1.3rem + 3.6vw, 3.5rem);
  font-weight: 800;
  font-stretch: 125%;
  line-height: 1.02;
  letter-spacing: -.02em;
  text-wrap: balance;
}
.hero__lede { margin: 0; font-size: 1.1875rem; line-height: 1.5; max-width: 34em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero__badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 26px 0 0;
  font-size: .875rem;
  color: var(--mist);
}
.badge-slot {
  padding: 5px 10px;
  border: 1.5px dashed var(--line);
  border-radius: 6px;
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}

/* ---------- Survey form ---------- */

.survey { padding: 0 var(--gutter) clamp(36px, 6vw, 64px); scroll-margin-top: calc(var(--strip-h) + 8px); }
.survey__sheet {
  max-width: 720px;
  padding: clamp(20px, 3.5vw, 36px);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 5px solid var(--ink);
  border-radius: 4px 4px 14px 14px;
}

.survey h2, .steps h2 {
  margin: 0 0 .35em;
  font-size: clamp(1.625rem, 1.25rem + 1.4vw, 2.125rem);
  font-weight: 800;
  font-stretch: 118%;
  line-height: 1.1;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.survey__intro { margin: 0 0 22px; color: var(--mist); max-width: 40em; }

fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.form-grid { display: grid; gap: 18px 20px; }
@media (min-width: 640px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
}

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 1rem; font-weight: 700; }
.field__hint { margin: 0; font-size: .875rem; color: var(--mist); }
.field input,
.field select {
  width: 100%;
  min-height: 50px;
  padding: 10px 14px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background-color: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1.0625rem;
}
.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%230f2e3d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 12px 8px;
}
.field input[aria-invalid="true"],
.field select[aria-invalid="true"] { border-color: var(--error); }
.field input:disabled,
.field select:disabled { background-color: #f2f6f7; color: var(--mist); border-color: var(--rule); }
.field__error { margin: 0; font-size: .9375rem; font-weight: 600; color: var(--error); }
.field__error:empty { display: none; }

.form-foot { display: grid; gap: 10px; margin-top: 24px; }
.fine { margin: 0; font-size: .875rem; color: var(--mist); }

.sent {
  margin-top: 18px;
  padding: 14px 16px;
  border-left: 5px solid var(--warm);
  border-radius: 0 8px 8px 0;
  background: #fff6e3;
}
.sent p { margin: 0; }
.sent:focus, .sent:focus-visible { outline: none; } /* status message, not a control; focus is parked here after submit */

/* ---------- Steps ---------- */

.steps { padding: clamp(36px, 6vw, 64px) var(--gutter); border-top: 1px solid var(--rule); }
.steps__list {
  display: grid;
  gap: 24px;
  max-width: 760px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
@media (min-width: 720px) {
  .steps__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.steps__list li { padding-top: 14px; border-top: 3px solid var(--ink); counter-increment: step; }
.steps__list li::before {
  content: counter(step);
  display: block;
  margin-bottom: 8px;
  font-size: 2.25rem;
  font-weight: 800;
  font-stretch: 125%;
  line-height: 1;
  color: var(--warm-ink);
}
.steps__list h3 { margin: 0 0 6px; font-size: 1.1875rem; font-stretch: 110%; line-height: 1.25; }
.steps__list p { margin: 0; font-size: 1rem; color: var(--mist); }

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

.site-footer {
  padding: 26px var(--gutter) 40px;
  border-top: 1px solid var(--rule);
  font-size: .9375rem;
  color: var(--mist);
}
.site-footer p { margin: 0 0 6px; max-width: 62em; }
.site-footer strong { color: var(--ink); }
.site-footer a { display: inline-block; padding: 10px 0; }

.noscript { margin: 0; padding: 16px var(--gutter); background: #fff6e3; }

/* =================================================================
   The stage: stopwatch and the homeowner's phone (demo apparatus)
   ================================================================= */

.stage {
  padding: 20px 16px 24px;
  background: var(--ink);
  color: #fff;
  scroll-margin-top: var(--strip-h);
}
.stage__inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}
.stage__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
}
.stage__title { margin: 0; font-size: 1rem; font-weight: 700; font-stretch: 110%; color: var(--ink-soft); }
.stage__action {
  min-height: 44px;
  padding: 0 16px;
  border: 1.5px solid rgba(255, 255, 255, .5);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: .9375rem;
  font-weight: 600;
  cursor: pointer;
}
.stage__action:hover { background: rgba(255, 255, 255, .1); }

.watch {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 2px 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .22);
}
.watch__label { grid-column: 1; grid-row: 1; margin: 0; font-size: .9375rem; font-weight: 600; color: var(--ink-soft); }
.watch__state { grid-column: 1; grid-row: 2; margin: 0; font-size: .9375rem; line-height: 1.35; color: #fff; }
.watch__digits {
  grid-column: 2;
  grid-row: 1 / span 2;
  margin: 0;
  font-size: clamp(2.75rem, 2.2rem + 2vw, 3.5rem);
  font-weight: 800;
  font-stretch: 125%;
  font-variant-numeric: tabular-nums;
  line-height: .92;
  letter-spacing: -.02em;
  color: #9fb7c2;
}
.watch[data-state="running"] .watch__digits,
.watch[data-state="replied"] .watch__digits { color: var(--warm); }
.watch[data-state="running"] .watch__label::before {
  content: "";
  display: inline-block;
  width: 9px; height: 9px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--warm);
  vertical-align: 1px;
  animation: blink 1s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }

.stage__note { min-height: 2.9em; margin: 0; font-size: .9375rem; line-height: 1.45; text-align: center; color: #fff; }
.stage__note.is-empty { visibility: hidden; }
.stage__note a { color: var(--warm); font-weight: 700; }

/* ---------- Phone ---------- */

.phone {
  width: 100%;
  max-width: 360px;
  height: 540px;
  height: clamp(480px, calc(100svh - var(--strip-h) - 240px), 640px);
  margin: 0 auto;
  padding: 9px;
  border-radius: 46px;
  background: #04090c;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .18), 0 28px 60px -22px rgba(0, 0, 0, .75);
}
.phone__screen {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: 37px;
  background: #fff;
  color: #16181d;
  font-family: var(--phone-font);
}

.phone__status {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 42px;
  padding: 6px 26px 0 30px;
  font-size: .875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.phone__status::before {
  content: "";
  position: absolute;
  top: 10px; left: 50%;
  width: 90px; height: 25px;
  margin-left: -45px;
  border-radius: 13px;
  background: #04090c;
}
.phone__icons { display: inline-flex; align-items: center; gap: 6px; }
.phone__icons svg { display: block; fill: currentColor; }

.phone__head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px 10px 8px;
  border-bottom: 1px solid #e3e6ea;
}
.phone__back { width: 24px; height: 24px; color: #0b57d0; flex: none; }
.phone__avatar {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  flex: none;
  border-radius: 50%;
  background: var(--ink);
}
.phone__avatar svg { width: 30px; height: 30px; }
/* First text from a number that isn't in the contacts: no name, no logo */
.phone__avatar--unknown { background: #a9b2bb; }
.phone__avatar--unknown svg { width: 24px; height: 24px; fill: #fff; }
.phone__who { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.phone__name { overflow: hidden; font-size: 1rem; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; text-overflow: ellipsis; }

.phone__thread {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 12px 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none; /* phones hide it too; still scrolls by touch, wheel and keyboard */
}
.phone__thread::-webkit-scrollbar { display: none; }
.phone__thread:focus-visible { outline-offset: -3px; }

.thread__empty { margin: auto; max-width: 15em; text-align: center; font-size: .9375rem; line-height: 1.45; color: #5b6670; }
.thread__stamp { align-self: center; margin: 2px 0 6px; font-size: .75rem; color: #5b6670; }
.thread__system {
  align-self: center;
  max-width: 92%;
  margin: 10px 0 2px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #f1f3f5;
  color: #3e4750;
  font-size: .8125rem;
  line-height: 1.4;
  text-align: center;
}

.msg {
  max-width: 85%;
  margin: 0;
  padding: 9px 13px;
  border-radius: 20px;
  font-size: .9375rem;
  line-height: 1.38;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.msg--in { align-self: flex-start; background: #eceef1; color: #16181d; border-bottom-left-radius: 6px; }
.msg--out { align-self: flex-end; background: #0b57d0; color: #fff; border-bottom-right-radius: 6px; }
.msg__optout { display: block; margin-top: 6px; font-size: .8125rem; color: #4f5862; }
.is-new { animation: msg-in .24s ease-out both; }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px); } }

.msg--typing { display: inline-flex; gap: 4px; padding: 13px 15px; }
.msg--typing span { width: 7px; height: 7px; border-radius: 50%; background: #8a929b; animation: dot 1.1s ease-in-out infinite; }
.msg--typing span:nth-child(2) { animation-delay: .15s; }
.msg--typing span:nth-child(3) { animation-delay: .3s; }
@keyframes dot {
  0%, 60%, 100% { opacity: .35; transform: none; }
  30% { opacity: 1; transform: translateY(-2px); }
}

.phone__replies {
  flex: none;
  max-height: 46%;
  padding: 8px 10px 4px;
  overflow-y: auto;
  border-top: 1px solid #e3e6ea;
}
.phone__replies:empty { display: none; }
.replies__cap { margin: 0 2px 6px; font-size: .75rem; color: #5b6670; }
.replies__list { display: flex; flex-wrap: wrap; gap: 6px; }

.chip {
  min-width: 44px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1.5px solid #0b57d0;
  border-radius: 22px;
  background: #fff;
  color: #0b57d0;
  font: inherit;
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color .12s ease, color .12s ease, transform .12s ease;
}
.chip__hint { margin-left: .45em; font-weight: 400; }
.chip:hover { background: #eef4ff; }
.chip--stop { border-color: #6b747d; color: #30373e; }
.chip--stop:hover { background: #f1f3f5; }
.chip.is-pressed { background: #0b57d0; color: #fff; transform: scale(.96); }
.chip--stop.is-pressed { background: #30373e; color: #fff; }

.phone__composer { flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 10px 12px; }
.phone__input {
  flex: 1;
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 20px;
  background: #f1f3f4;
  color: #5b6670;
  font-size: .9375rem;
}
.phone__send { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #dfe3e7; color: #5b6670; }
.phone__send svg { width: 18px; height: 18px; fill: currentColor; }

.phone__notif {
  position: absolute;
  z-index: 5;
  top: 46px; left: 8px; right: 8px;
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 20px;
  background: rgba(246, 247, 249, .98);
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .4);
  transform: translateY(-170%);
  transition: transform .42s cubic-bezier(.2, .85, .25, 1.12);
}
.phone__notif.is-shown { transform: none; }
.notif__icon { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 9px; background: #1e7e34; }
.notif__icon svg { width: 20px; height: 20px; fill: #fff; }
.notif__body { display: flex; flex-direction: column; min-width: 0; font-size: .8125rem; line-height: 1.3; }
.notif__row { display: flex; justify-content: space-between; gap: 8px; color: #5b6670; }
.notif__title { font-weight: 700; color: #16181d; }
.notif__text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: #2a3036;
}

/* ---------- Desktop: split screen, phone stays in view ---------- */

@media (min-width: 960px) {
  .page-home main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--stage-w);
    grid-template-areas:
      "hero   stage"
      "survey stage"
      "steps  stage";
    align-items: start;
  }
  .hero { grid-area: hero; }
  .survey { grid-area: survey; }
  .steps { grid-area: steps; }
  /* Header belongs to the installer's site (left); the stage runs full height on the right. */
  .page-home .site-header { margin-right: var(--stage-w); }
  .stage {
    grid-area: stage;
    position: sticky;
    top: var(--strip-h);
    margin-top: calc(-1 * var(--header-h, 69px));
    display: flex;
    align-items: center;
    height: calc(100vh - var(--strip-h));
    height: calc(100svh - var(--strip-h));
    padding: 20px 28px;
  }
  .stage__inner { max-width: 390px; }
  .phone {
    max-width: 370px;
    height: 600px;
    height: clamp(430px, calc(100svh - var(--strip-h) - 220px), 720px);
  }
}

/* =================================================================
   Installer view
   ================================================================= */

.page-installer .site-header,
.page-installer .site-footer,
.page-installer .demo-strip p { padding-inline: max(var(--gutter), calc((100% - 1200px) / 2 + var(--gutter))); }

.desk {
  display: grid;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px var(--gutter) 48px;
}
.desk__intro h1 {
  margin: 0 0 6px;
  font-size: clamp(1.875rem, 1.4rem + 1.8vw, 2.5rem);
  font-weight: 800;
  font-stretch: 122%;
  line-height: 1.08;
  letter-spacing: -.015em;
}
.desk__intro p { margin: 0; max-width: 44em; color: var(--mist); }

.notice {
  min-height: 7.25rem; /* место под 2–3 строки текста: без сдвига карточки при обновлении (CLS) */
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
}
.notice__dot {
  flex: none;
  width: 12px; height: 12px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--warm);
  box-shadow: 0 0 0 4px rgba(255, 185, 56, .28);
}
.notice__title { margin: 0; font-size: 1.0625rem; font-weight: 700; font-stretch: 108%; }
.notice__text { margin: 2px 0 0; color: var(--ink-soft); }
.notice__text a { color: var(--warm); font-weight: 700; }
.notice.is-arriving { animation: notice-in .55s cubic-bezier(.2, .85, .25, 1.1) both; }
@keyframes notice-in { from { opacity: 0; transform: translateY(-14px); } }

.panel {
  min-width: 0;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--paper);
}
.lead { border-top: 5px solid var(--ink); border-radius: 4px 4px 12px 12px; }
.panel h2, .report h2 { margin: 0; font-size: 1.5rem; font-weight: 800; font-stretch: 115%; line-height: 1.15; }
.panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 16px;
}
.panel__meta { margin: 0; font-size: .9375rem; color: var(--mist); }
.panel__sample { margin: -4px 0 16px; padding: 10px 12px; border-radius: 8px; background: #fff6e3; font-size: .9375rem; }

.pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.pill { display: inline-flex; align-items: center; min-height: 28px; padding: 3px 11px; border-radius: 999px; font-size: .875rem; font-weight: 700; }
.pill--booked { background: #dcf1e3; color: #14532d; }
.pill--progress { background: #e1eafe; color: #0b3a8c; }
.pill--stopped { background: #f9e1e1; color: #7f1d1d; }
.pill--follow { background: #fff1d6; color: #6b4700; }
.pill--callback { background: #ece6f6; color: #46288f; }
.pill--sample { background: transparent; border: 1.5px dashed var(--line); color: var(--ink); }

.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px; margin: 0 0 22px; }
.facts dt { font-size: .9375rem; color: var(--mist); }
.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

.sub { margin: 0 0 8px; font-size: 1.0625rem; font-weight: 800; font-stretch: 110%; }

.answers { margin: 0 0 22px; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.answers li {
  display: grid;
  grid-template-columns: 1.6rem minmax(0, 1fr);
  gap: 1px 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}
.answers__n { grid-row: 1 / span 2; font-weight: 800; font-stretch: 120%; color: var(--warm-ink); }
.answers__q { font-size: .875rem; color: var(--mist); }
.answers__a { font-weight: 600; }
.answers__a--waiting { font-weight: 400; font-style: italic; color: var(--mist); }

.activity { margin: 0; padding: 0; list-style: none; font-size: .9375rem; }
.activity li { display: grid; grid-template-columns: 4.75rem minmax(0, 1fr); gap: 10px; padding: 4px 0; }
.activity time { color: var(--mist); font-variant-numeric: tabular-nums; }

.cal-days { margin: 0; padding: 0; list-style: none; }
.cal-day { display: grid; grid-template-columns: 5.25rem minmax(0, 1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--rule); }
.cal-day__name { margin: 0; padding-top: 7px; font-size: .9375rem; font-weight: 800; font-stretch: 112%; line-height: 1.25; }
.cal-day__name span { display: block; font-size: .875rem; font-weight: 500; font-stretch: 100%; color: var(--mist); }
.cal-items { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.cal-item {
  display: grid;
  grid-template-columns: 3.1rem minmax(0, 1fr);
  gap: 0 10px;
  padding: 8px 10px;
  border: 1.5px solid transparent;
  border-radius: 8px;
  background: var(--sky);
  font-size: .9375rem;
  line-height: 1.35;
}
.cal-item__time { font-weight: 700; font-variant-numeric: tabular-nums; }
.cal-item__tag { grid-column: 2; font-size: .8125rem; color: var(--mist); }
.cal-item--booked { background: var(--warm); border-color: var(--ink); font-weight: 600; }
.cal-item--booked .cal-item__tag { color: var(--ink); font-weight: 500; }
.cal-item--offered { background: transparent; border-style: dashed; border-color: var(--line); }

.report { padding: 6px 0 0; border-top: 3px solid var(--ink); }
.report .panel__head { margin: 12px 0 4px; justify-content: flex-start; align-items: center; }
.badge-sample {
  padding: 3px 10px;
  border: 1px solid #e3bd6a;
  border-radius: 6px;
  background: #fff1d6;
  color: #6b4700;
  font-size: .875rem;
  font-weight: 700;
}
.table-wrap { overflow-x: auto; }
.report table { width: 100%; margin-top: 8px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.report th, .report td { padding: 12px 8px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: baseline; }
.report thead th { border-bottom: 2px solid var(--ink); font-size: .875rem; font-weight: 600; color: var(--mist); }
.report thead th + th, .report td { text-align: right; }
.report tbody th { font-weight: 600; }
.report td { font-size: 1.125rem; font-weight: 800; font-stretch: 112%; }
.report__note { margin: 12px 0 0; max-width: 62em; font-size: .875rem; color: var(--mist); }

.desk__foot { margin: 0; }

@media (min-width: 900px) {
  .desk {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    grid-template-areas:
      "intro  intro"
      "notice notice"
      "lead   cal"
      "report report"
      "foot   foot";
    align-items: start;
  }
  .desk__intro { grid-area: intro; }
  .notice { grid-area: notice; }
  .lead { grid-area: lead; }
  .cal { grid-area: cal; }
  .report { grid-area: report; }
  .desk__foot { grid-area: foot; }
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Экран установщика: панели заполняет скрипт — не показываем их до первой отрисовки, чтобы ничего не прыгало (CLS). */
.js-loading .page-installer #main, .js-loading body.page-installer main { visibility: hidden; }
