/* «Долгов Авто» – anonymous client survey (feedback.dolgov-auto.ru, cars-system lib/survey.js).
   Direction: a postcard after the trip – warm paper, one flat road illustration, brand red only as an accent.
   Fonts are copies in feedback/assets, served as /_/…; no external requests (CSP: self only). Mobile first. */
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 200 900; font-display: swap; src: url(/_/unbounded-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 200 900; font-display: swap; src: url(/_/unbounded-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/_/onest-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/_/onest-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }

:root {
  --paper: #f5ede0; --card: #fffcf6; --ink: #2b2a29; --ink-2: #6b6157; --line: #e3d7c4; --line-2: #cdbda4;
  --red: #ef1313; --red-dark: #c90f0f;
  --low: #f7d5c8; --low-line: #d9785a;
  --mid: #f7e4ae; --mid-line: #d4a421;
  --high: #d3e6c4; --high-line: #6f9f55;
  --hint: var(--card); --hint-line: var(--line-2);
  --f-head: "Unbounded", "Arial Black", sans-serif;
  --f-body: "Onest", "Segoe UI", Arial, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  font-family: var(--f-body); font-size: 18px; line-height: 1.5; color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%;
}
button, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
h1:focus, h2:focus, section:focus { outline: none; }

.fb-top { display: flex; justify-content: center; padding: 18px 20px 4px; }
.fb-brand { display: block; }
.fb-brand img { display: block; height: 34px; width: auto; mix-blend-mode: multiply; }

.fb { flex: 1; width: 100%; max-width: 680px; margin: 0 auto; padding: 16px 16px 28px; }
.fb-card {
  position: relative; overflow: hidden; background: var(--card); border: 1.5px solid var(--line); border-radius: 24px;
  box-shadow: 0 14px 32px -18px rgba(86, 58, 24, .35);
  animation: fb-rise .7s var(--ease) both;
}
.fb-art { height: 132px; border-bottom: 1.5px solid var(--line); background: #fbe5c8; overflow: hidden; }
.fb-art svg { display: block; width: 100%; height: 100%; }
.fb-body { padding: 22px 18px 24px; }

.fb-anon {
  display: flex; align-items: center; gap: 8px; width: max-content; max-width: 100%; margin: 0 0 18px; padding: 6px 14px 6px 10px;
  border-radius: 16px; background: #f4ead9; color: #5a5046; font-size: 15px; line-height: 1.3;
}
.fb-anon svg { flex: none; color: #8a6f4d; }
.fb h1, .fb h2 { font-family: var(--f-head); font-weight: 600; line-height: 1.3; margin: 0; }
.fb h1 { font-size: 20px; margin-bottom: 20px; }

/* the 0–10 row: 6 + 5 on a phone, one row from 560px */
.fb-scale { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.fb-pt { position: relative; display: block; }
.fb-pt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.fb-pt span {
  display: flex; align-items: center; justify-content: center; min-height: 52px; border: 1.5px solid var(--line-2); border-radius: 14px;
  background: #fff; font-family: var(--f-head); font-weight: 600; font-size: 18px; color: var(--ink);
  transition: border-color .15s, background-color .2s, transform .15s var(--ease);
}
.fb-pt:hover span { border-color: var(--ink); transform: translateY(-2px); }
.fb-pt input:focus-visible + span { outline: 3px solid var(--red); outline-offset: 2px; }
.fb-pt input:checked + span { background: var(--hint); border-color: var(--hint-line); animation: fb-pop .38s var(--ease); }
form[data-group="low"] { --hint: var(--low); --hint-line: var(--low-line); }
form[data-group="mid"] { --hint: var(--mid); --hint-line: var(--mid-line); }
form[data-group="high"] { --hint: var(--high); --hint-line: var(--high-line); }
.fb-scale.is-shake { animation: fb-shake .4s; }
.fb-legend { display: flex; justify-content: space-between; gap: 12px; margin: 10px 2px 0; font-size: 15px; color: var(--ink-2); }

/* the second question grows out of nothing once a score is chosen */
.fb-q2 { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.fb-q2.is-open { grid-template-rows: 1fr; }
.fb-q2-in { min-height: 0; overflow: hidden; opacity: 0; transition: opacity .3s; }
.fb-q2.is-open .fb-q2-in { opacity: 1; transition-delay: .1s; }
.fb-q2 label { display: block; margin: 26px 0 10px; font-family: var(--f-head); font-weight: 600; font-size: 17px; line-height: 1.35; }
.fb-q2 textarea {
  display: block; width: 100%; min-height: 112px; padding: 14px 16px; border: 1.5px solid var(--line-2); border-left: 6px solid var(--hint-line);
  border-radius: 14px; background: #fff; resize: vertical; line-height: 1.5; transition: border-color .2s;
}
.fb-q2 textarea::placeholder { color: #8a7f73; }
.fb-q2 textarea:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

.fb-error { margin: 14px 0 0; padding: 10px 14px; border-radius: 12px; background: #fdeaea; color: #8f1010; font-size: 16px; line-height: 1.4; }
.fb-send {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 56px; margin-top: 22px;
  border: 0; border-radius: 16px; background: var(--red); color: #fff; font-family: var(--f-head); font-weight: 600; font-size: 16px;
  box-shadow: 0 6px 0 var(--red-dark); transition: transform .12s, box-shadow .12s, background-color .2s;
}
.fb-send:hover { background: #ff2323; }
.fb-send:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--red-dark); }
.fb-send:disabled { cursor: progress; background: #c98a84; box-shadow: 0 6px 0 #a96d68; }
.fb-spin { display: none; width: 18px; height: 18px; border: 3px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: fb-turn .7s linear infinite; }
.fb-send:disabled .fb-spin { display: block; }

/* thanks: written on the same card, under the road */
.fb-thanks { animation: fb-fade .7s .35s var(--ease) both; }
.fb h2 { font-size: 30px; margin-bottom: 14px; }
.fb-thanks p { margin: 0 0 12px; font-size: 20px; line-height: 1.45; }
.fb-thanks .fb-thanks-low { color: var(--ink-2); font-size: 18px; }
.fb-thanks .fb-sign { margin-top: 20px; font-family: var(--f-head); font-weight: 600; font-size: 15px; color: var(--red-dark); }
.fb-card[data-view="thanks"] form { display: none; }

/* the car drives away when the answer is sent and stays gone when it was sent earlier */
.fb-card.is-driving .fb-car { animation: fb-drive 1.7s .15s cubic-bezier(.5, 0, .9, .6) forwards; }
.fb-card.is-gone .fb-car { display: none; }
.fb-card.is-driving .fb-dash { animation: fb-road .5s linear infinite; }

.fb-foot { padding: 4px 20px 26px; text-align: center; font-size: 15px; }
.fb-foot a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--line-2); }
.fb-foot a:hover { color: var(--ink); }

@keyframes fb-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fb-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fb-pop { 0% { transform: scale(.88); } 55% { transform: scale(1.14); } 100% { transform: scale(1); } }
@keyframes fb-shake { 0%, 100% { transform: none; } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes fb-turn { to { transform: rotate(360deg); } }
@keyframes fb-drive { 0% { transform: translateX(0); } 12% { transform: translateX(-6px); } 100% { transform: translateX(340px); } }
@keyframes fb-road { to { stroke-dashoffset: -42; } }

@media (min-width: 560px) {
  .fb { padding-top: 28px; }
  .fb-body { padding: 30px 36px 34px; }
  .fb-art { height: 200px; }
  .fb h1 { font-size: 26px; margin-bottom: 26px; }
  .fb-scale { grid-template-columns: repeat(11, 1fr); }
  .fb-pt span { min-height: 60px; }
  .fb-send { width: auto; min-width: 240px; padding: 0 36px; }
  .fb h2 { font-size: 38px; }
  .fb-thanks p { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .fb-car { display: none; }
}
