/* Опросный лист на роботизированную ячейку: /opros-robot (шаблон pages/robot-opros.html, скрипт js/ropros.js).
   Основа формы — .oq-* из site.css (как у опросного листа гидравлики); здесь плитки, схемы, режимы, навигация. */

/* ---------- first screen ---------- */
.rqh{ padding-bottom: clamp(48px, 7vh, 88px); }
.rqh-wrap{ position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.rqh-copy{ min-width: 0; }
.rqh .ph-h1{ font-size: clamp(34px, 4.3vw, 62px); overflow-wrap: break-word; }
@media (max-width: 400px){ .rqh .ph-h1{ font-size: 30px; overflow-wrap: anywhere; } }
.rqh .ph-h1 em{ display: block; }
.rqh-steps{ margin: 28px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; border-top: 1px solid rgba(255,255,255,.12); padding-top: 18px; }
.rqh-steps li{ font-size: 14px; line-height: 1.45; color: rgba(255,255,255,.62); }
.rqh-steps b{ display: block; margin-bottom: 4px; font-family: var(--font-display); font-size: 16px; color: #fff; }
.rqh-ex{ display: grid; gap: 14px; min-width: 0; }
.rqh-k{ display: block; margin-bottom: 10px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.5); }
.rqh-was{ position: relative; padding: 20px 64px 20px 22px; border-radius: 20px; border: 1px dashed rgba(255,255,255,.28); }
.rqh-was p{ margin: 0; font-size: clamp(16px, 1.4vw, 19px); line-height: 1.4; color: rgba(255,255,255,.86); }
.rqh-q{ position: absolute; right: 18px; top: 50%; translate: 0 -50%; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.08); font-family: 'Unbounded', var(--font-display); font-size: 15px; color: var(--accent-2); }
.rqh-need{ padding: 22px; border-radius: 22px; background: #fff; color: var(--ink); box-shadow: 0 24px 60px -30px rgba(0,0,0,.6); }
.rqh-need .rqh-k{ color: var(--accent-ink); }
.rqh-need dl{ margin: 0; display: grid; }
.rqh-need dl div{ display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-top: 1px solid rgba(10,10,12,.08); }
.rqh-need dt{ font-size: 13px; font-weight: 700; color: var(--muted-2); }
.rqh-need dd{ margin: 0; font-size: 14.5px; line-height: 1.4; }

/* ---------- form frame ---------- */
.rq-form{ gap: 18px; }
.rq-mode{ display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 14px; border-radius: 20px; background: #fff; border: 1px solid rgba(10,10,12,.07); }
.rq-mode-b{ padding: 10px 18px; border-radius: 999px; border: 1px solid rgba(10,10,12,.16); background: none; font: 600 14.5px var(--font-body); color: var(--ink); cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.rq-mode-b.is-on{ background: var(--ink); border-color: var(--ink); color: #fff; }
.rq-mode-note{ flex: 1 1 260px; margin: 0 0 0 6px; font-size: 13.5px; line-height: 1.45; color: var(--muted-2); }
.rq-main{ display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(250,90,32,.12); color: var(--accent-ink); font: 700 10.5px var(--font-body); font-style: normal; letter-spacing: .06em; text-transform: uppercase; vertical-align: 2px; }

.rq-why{ clear: both; margin: -6px 0 18px; font-size: 14.5px; line-height: 1.55; color: var(--muted-2); max-width: 68ch; }
.rq-grid{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 18px; }
.rq-wide{ grid-column: 1 / -1; }
.rq-q{ margin: 0; padding: 0; border: 0; min-width: 0; }
.oq-set .rq-q > legend{ float: none; display: block; width: auto; margin: 0 0 10px; font-family: var(--font-body); font-size: 14px; font-weight: 700; color: var(--ink); }
.rq .field > label{ font-size: 14px; font-weight: 700; color: var(--ink); }
.rq-q[data-main] > legend::after, .rq-q[data-main] > label::after{ content: "главное"; display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(250,90,32,.12); color: var(--accent-ink); font: 700 10.5px var(--font-body); letter-spacing: .06em; text-transform: uppercase; vertical-align: 2px; }
.rq-hint{ margin: -4px 0 10px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.field .rq-hint{ margin: 0; }
.rq .field textarea{ min-height: 120px; }
.rq-vh{ position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rq-dims{ display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.rq-dims .field label{ font-size: 13px; font-weight: 600; color: var(--muted-2); }
.rq-radio span::before{ content: ""; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid rgba(10,10,12,.35); transform: none !important; }
.rq-radio input:checked + span::before{ border-color: var(--accent-2); background: var(--accent-2); box-shadow: inset 0 0 0 2px var(--ink); }
.rq-clear{ margin-top: 8px; padding: 0; border: 0; background: none; font: 600 13px var(--font-body); color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* tiles with an icon */
.rq-tiles{ display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.rq-tile{ position: relative; display: grid; }
.rq-tile input{ position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.rq-tile > span{ display: grid; grid-template-rows: auto 1fr; justify-items: start; gap: 10px; padding: 14px; border-radius: 16px; border: 1px solid rgba(10,10,12,.12); background: var(--paper); transition: border-color .2s, background-color .2s, box-shadow .2s; }
.rq-tile b{ font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.rq-ico{ width: 40px; height: 40px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rq-ico .a{ stroke: var(--accent); }
.rq-tile input:checked + span{ border-color: var(--accent); background: #fff; box-shadow: 0 0 0 2px var(--accent) inset; }
.rq-tile input:checked + span::after{ content: "✓"; position: absolute; top: 10px; right: 12px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; }
.rq-tile input:focus-visible + span{ outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine){
  .rq-tile:hover > span{ border-color: rgba(10,10,12,.3); background: #fff; }
  .rq-mode-b:hover:not(.is-on){ border-color: var(--ink); }
}

/* pallet sub-block */
.rq-sub{ margin-top: 24px; padding: clamp(16px, 2vw, 24px); border-radius: 20px; background: var(--paper); border: 1px solid rgba(10,10,12,.06); }
.rq-sub-t{ display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.rq-sub-t .rq-ico{ width: 32px; height: 32px; }
.rq-sub .rq-tile > span{ background: #fff; }
.rq-sub .oq .field input{ background: #fff; }

/* ---------- schemes ---------- */
.rq-scheme{ margin: 0 0 22px; padding: 16px 18px; border-radius: 18px; background: var(--paper); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: 18px; align-items: center; }
.rq-scheme > svg{ width: 100%; height: auto; max-height: 230px; }
.rq-scheme svg.rq-ico-l{ width: 52px; height: 52px; }
.rq-scheme figcaption{ font-size: 13.5px; line-height: 1.5; color: var(--muted-2); }
.rq-scheme .ln, .rq-scheme .ln2{ fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.rq-scheme .f{ fill: #fff; } .rq-scheme .f2{ fill: #ffe0cf; } .rq-scheme .f3{ fill: #ffc7a8; }
.rq-scheme .dim{ fill: none; stroke: var(--accent); stroke-width: 1.6; }
.rq-scheme .t{ font: 700 12px var(--font-body); fill: var(--accent-ink); }
.rq-scheme .ts{ font: 600 10px var(--font-body); fill: var(--muted-2); }
.rq-scheme .kg path{ fill: var(--ink); }
.rq-scheme .tk{ font: 700 11px var(--font-body); fill: #fff; text-anchor: middle; }
.rq-scheme .fl{ fill: #fff; stroke: var(--ink); stroke-width: 2; stroke-dasharray: 6 5; }
.rq-scheme .reach{ fill: rgba(250,90,32,.08); stroke: var(--accent); stroke-width: 1.4; stroke-dasharray: 4 4; }
.rq-scheme .base{ fill: var(--ink); }
.rq-scheme .obj{ fill: #ffe0cf; stroke: var(--ink); stroke-width: 1.4; }
.rq-scheme .door{ stroke: #fff; stroke-width: 6; }

.rq-flow{ grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1fr); align-items: end; text-align: center; }
.rq-flow figcaption{ grid-column: 1 / -1; text-align: left; }
.rq-flow-pt{ display: grid; justify-items: center; gap: 8px; padding: 14px 10px; border-radius: 16px; background: #fff; border: 1px solid rgba(10,10,12,.08); min-width: 0; }
.rq-flow-k{ font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); }
.rq-flow-pt b{ font-size: 13.5px; line-height: 1.3; overflow-wrap: anywhere; }
.rq-flow-pt b.is-empty{ color: var(--muted); font-weight: 500; }
.rq-ico-l{ width: 52px; height: 52px; }
.rq-flow-robot{ position: relative; display: grid; justify-items: center; min-width: 0; }
.rq-flow-arc{ width: 100%; max-height: 60px; fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: 7 6; stroke-linecap: round; }
.rq-flow-img{ width: auto; max-width: 100%; height: clamp(110px, 12vw, 160px); object-fit: contain; }

/* ---------- contacts, aside ---------- */
.rq-file{ margin: 0 0 18px; }
.rq-file b{ color: var(--ink); }
.rq-contacts{ margin-top: 4px; }
.rq-nav ol{ margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.rq-nav a{ display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; font-size: 14px; line-height: 1.3; color: var(--ink); transition: background-color .2s; }
.rq-nav a.is-here{ background: var(--paper); }
.rq-nav-n{ display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid rgba(10,10,12,.2); font: 700 10px 'Unbounded', var(--font-display); }
.rq-nav a.is-done .rq-nav-n{ background: var(--accent); border-color: var(--accent); color: #fff; }
.rq-nav i{ font-style: normal; font-size: 12px; color: var(--muted); }
.rq-call{ margin: 12px 0 0; font-size: 13.5px; line-height: 1.45; color: rgba(255,255,255,.6); }

/* quick mode: only the questions marked «главное» */
.rq-form.is-quick .rq-q:not([data-main]), .rq-form.is-quick .rq-sub, .rq-form.is-quick .rq-scheme:not(.rq-flow){ display: none; }
.rq-form.is-quick .rq-set.rq-nomain{ display: none; }
.rq-aside.is-quick .rq-nav li.rq-nomain{ display: none; }
[data-rq-show][hidden]{ display: none !important; }

@media (max-width: 1100px){
  .rqh-wrap{ grid-template-columns: 1fr; }
  .rqh-ex{ max-width: 640px; }
}
@media (max-width: 900px){
  .rq-aside .rq-nav{ display: none; }
}
@media (max-width: 760px){
  .rq-grid{ grid-template-columns: 1fr; }
  .rq-scheme{ grid-template-columns: 1fr; padding: 14px; }
  .rq-flow{ grid-template-columns: minmax(0, 1fr) minmax(0, .8fr) minmax(0, 1fr); gap: 8px; }
  .rq-flow-pt{ padding: 10px 6px; }
  .rq-flow-pt b{ font-size: 12px; }
  .rq-ico-l{ width: 40px; height: 40px; }
  .rqh-steps{ grid-template-columns: 1fr; gap: 10px; }
  .rqh-steps li{ display: flex; gap: 8px; align-items: baseline; }
  .rqh-steps b{ display: inline; margin: 0; font-size: 15px; white-space: nowrap; }
  .rq-tiles{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rq-dims{ grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .rq .field input, .rq .field textarea{ font-size: 16px; }
  .rqh-need dl div{ grid-template-columns: 70px minmax(0, 1fr); }
}
@media (max-width: 400px){
  .rq-dims{ grid-template-columns: 1fr; }
}

/* pallet layer patterns (big tiles) */
.rq-tiles-big{ grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.rq-tiles-big .rq-tile > span{ background: #fff; }
.rq-pat{ width: 100%; height: auto; }
.rq-pat .pp-pal{ fill: #e8d6bd; stroke: #b99a72; stroke-width: 1.5; }
.rq-pat .pp-box{ fill: #fff; stroke: var(--ink); stroke-width: 1.4; }
.rq-pat .pp-alt{ fill: #ffd2b8; }
.rq-pat .pp-t{ font: 600 11px var(--font-body); fill: var(--muted-2); }
.rq-pat .pp-doc, .rq-pat .pp-line{ fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.rq-pat .pp-line{ stroke: var(--accent); }

/* restored draft */
.rq-draft{ flex: 1 1 100%; order: -1; margin: 0 0 4px; padding: 10px 14px; border-radius: 12px; background: rgba(250,90,32,.1); font-size: 14px; line-height: 1.45; color: var(--accent-ink); }
.rq-draft button{ margin-left: 6px; padding: 0; border: 0; background: none; font: 700 14px var(--font-body); color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* PDF link under the first-screen buttons */
.rqh-pdf{ display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; font-size: 14.5px; color: rgba(255,255,255,.72); border-bottom: 1px solid rgba(255,255,255,.2); padding-bottom: 2px; }
.rqh-pdf span{ display: grid; place-items: center; padding: 3px 6px; border-radius: 6px; background: var(--accent); color: #fff; font: 700 10px var(--font-body); letter-spacing: .06em; }
@media (hover: hover) and (pointer: fine){ .rqh-pdf:hover{ color: #fff; border-color: var(--accent-2); } }
