/* AStudyo questionnaires — shared styles (used by every page in this folder) */
/* Studio fonts: Syne for titles, DM Mono for everything else (same pairing as the main AStudyo pages) */
@font-face { font-family: 'Syne'; src: url('/assets/fonts/syne/Syne-Variable.woff2') format('woff2'); font-weight: 400 800; font-display: swap; }
@font-face { font-family: 'DM Mono'; src: url('/assets/fonts/dm-mono/DMMono-Light.woff2') format('woff2'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'DM Mono'; src: url('/assets/fonts/dm-mono/DMMono-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'DM Mono'; src: url('/assets/fonts/dm-mono/DMMono-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }

:root {
  --bg: #0e0f11;
  --surface: #16171a;
  --panel: #141518;
  --ink: #ececea;
  --muted: #8a8b90;
  --line: rgba(255, 255, 255, .12);
  --edge: rgba(255, 255, 255, .30);
  --brand: #AA22FF;
  --brand-rgb: 170, 34, 255;
  --brand-ink: #ffffff;
  --brand-hi: color-mix(in srgb, var(--brand) 78%, #fff);
  --font-display: 'Syne', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'DM Mono', ui-monospace, monospace;
  --wrap: 980px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 300 14px/1.6 var(--font-mono); -webkit-font-smoothing: antialiased;
}
body::before {   /* quiet grid, like the presentation stage */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px; opacity: .25;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
}
button, input, textarea { font: inherit; color: inherit; }
.wrap { position: relative; z-index: 1; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 10; background: rgba(14, 15, 17, .86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.wm { font: 800 20px/1 'Syne', ui-sans-serif, system-ui, sans-serif;   /* Latin wordmark: pinned, never re-fonted for RU */ letter-spacing: -.03em; color: var(--ink); text-decoration: none; white-space: nowrap; }
.wm span { color: var(--brand); }
.brand { display: flex; align-items: center; min-width: 0; }
.mark { display: block; flex-shrink: 0; margin-right: 8px; line-height: 0; }
.nav-mark { height: 30px; width: auto; display: block; }   /* the 02 triangle lockup, same as /main */
.nav-mark .mk-stroke { stroke: var(--brand); }
.nav-mark .mk-accent { fill: var(--brand); }
@media (max-width: 520px) { .nav-mark { height: 26px; } .mark { margin-right: 6px; } }
.top-tag { color: var(--muted); font-size: 12px; margin-left: 10px; }
.progress { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.bar { width: 90px; height: 2px; background: var(--line); position: relative; overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--brand); transition: width .35s ease; }
@media (max-width: 520px) { .top-tag { display: none; } .bar { width: 56px; } }

/* EN | RU toggle (header) — Latin labels pinned to DM Mono so the RU font stack never touches them */
.top-r { display: flex; align-items: center; gap: 14px; }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 1px; }
.lang button { font: 400 11px/1 'DM Mono', ui-monospace, monospace; letter-spacing: .06em; padding: 7px 9px; border: 0; background: none; color: var(--muted); cursor: pointer; transition: color .2s, background .2s; }
.lang button + button { border-left: 1px solid var(--line); }
.lang button:hover { color: var(--ink); }
.lang button.active { background: var(--brand); color: var(--brand-ink); cursor: default; }
@media (max-width: 520px) { .top-r { gap: 10px; } .top-r .btn { padding: 7px 10px; } }

/* ---------- intro ---------- */
.hero { padding: 56px 0 28px; }
.label { font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.label b { color: var(--brand); font-weight: 400; }
h1 { font: 700 clamp(34px, 7vw, 64px)/1.02 var(--font-display); letter-spacing: -.035em; margin: 14px 0 18px; }
h1 span { color: var(--brand); }
.lead { max-width: 620px; color: var(--muted); margin: 0; }
.lead b { color: var(--ink); font-weight: 400; }
.rule { display: flex; gap: 14px; align-items: flex-start; margin-top: 28px; padding: 16px 18px; border: 1px solid rgba(var(--brand-rgb), .45); background: rgba(var(--brand-rgb), .06); max-width: 620px; }
.rule-n { font: 800 22px/1 var(--font-display); color: var(--brand); }
.rule p { margin: 0; font-size: 13px; }
.rule p + p { margin-top: 4px; color: var(--muted); }

/* ---------- type picker ---------- */
.section-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 44px 0 14px; }
.section-h h2 { font: 700 22px/1.1 var(--font-display); letter-spacing: -.02em; margin: 0; }
.types { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 820px) { .types { grid-template-columns: repeat(4, 1fr); } }
.type { text-align: left; padding: 18px 16px 16px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; display: flex; flex-direction: column; gap: 8px; min-height: 132px; transition: border-color .2s, background .2s; }
.type:hover { border-color: var(--edge); }
.type .n { font-size: 11px; color: var(--muted); }
.type .t { font: 700 18px/1.1 var(--font-display); letter-spacing: -.02em; }
.type .d { font-size: 11px; color: var(--muted); margin-top: auto; }
.type.on { border-color: var(--brand); background: rgba(var(--brand-rgb), .10); }
.type.on .n { color: var(--brand); }

/* ---------- tools row ---------- */
.tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn { padding: 8px 12px; border: 1px solid var(--line); background: none; cursor: pointer; font-size: 12px; color: var(--muted); border-radius: 1px; transition: color .2s, border-color .2s, background .2s; }
.btn:hover { color: var(--ink); border-color: var(--edge); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: var(--brand-hi); border-color: var(--brand-hi); }

/* ---------- blocks (collapsible sections) ---------- */
.blocks { display: flex; flex-direction: column; gap: 10px; }
.block { border: 1px solid var(--line); background: var(--panel); }
.block-h { width: 100%; display: grid; grid-template-columns: 34px 1fr auto 18px; align-items: center; gap: 12px; padding: 16px 18px; background: none; border: 0; cursor: pointer; text-align: left; }
.block-h .num { font: 800 16px/1 var(--font-display); color: var(--muted); }
.block-h .ttl { font: 700 18px/1.15 var(--font-display); letter-spacing: -.02em; }
.block-h .sub { display: block; font: 300 12px/1.4 var(--font-mono); color: var(--muted); letter-spacing: 0; margin-top: 3px; }
.block-h .cnt { font-size: 11px; color: var(--muted); white-space: nowrap; }
.block-h .cnt.full { color: var(--brand); }
.chev { width: 10px; height: 10px; border-right: 1px solid var(--muted); border-bottom: 1px solid var(--muted); transform: rotate(45deg) translate(-3px, -3px); transition: transform .3s; justify-self: end; }
.block.open > .block-h .chev, .q.open .q-toggle .chev { transform: rotate(-135deg) translate(-2px, -2px); }
.block.open .block-h .num { color: var(--brand); }
.block-h:hover .ttl { color: var(--brand-hi); }

/* smooth open/close without measuring: grid rows 0fr → 1fr */
.fold { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s cubic-bezier(.16, 1, .3, 1); }
.fold > .fold-in { overflow: hidden; min-height: 0; }
.open > .fold { grid-template-rows: 1fr; }
.no-anim *, .no-anim *::before, .no-anim *::after { transition: none !important; }   /* set for one frame by q.js while it redraws after EN | RU */
.block-body { padding: 0 18px 8px; border-top: 1px solid transparent; }
.block.open .block-body { border-top-color: var(--line); }

/* ---------- question ---------- */
.q { padding: 20px 0; border-bottom: 1px solid var(--line); }
.q:last-child { border-bottom: 0; }
.q-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.q-title { font-size: 14px; font-weight: 400; margin: 0; }
.q-kind { font-size: 10px; color: var(--muted); border: 1px solid var(--line); padding: 2px 6px; white-space: nowrap; }
.q-hint { color: var(--muted); font-size: 12px; margin: 4px 0 0; }
.q-row { display: flex; gap: 8px; margin-top: 12px; align-items: stretch; }
.q-note { flex: 1; min-width: 0; background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: 7px 0; font-size: 13px; outline: none; transition: border-color .2s; }
.q-note::placeholder { color: rgba(138, 139, 144, .7); }
.q-note:focus { border-bottom-color: var(--brand); }
.q-toggle { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.q-toggle .chev { width: 7px; height: 7px; }
.q.open .q-toggle { color: var(--ink); border-color: var(--edge); }
.q-picked { font-size: 11px; color: var(--brand); margin-top: 8px; display: none; }
.q.has:not(.open) .q-picked { display: block; }
.opts { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 14px; }
.pill { padding: 7px 12px; border: 1px solid var(--line); border-radius: 1px; background: none; cursor: pointer; font-size: 12px; color: var(--muted); transition: color .15s, border-color .15s, background .15s; }
.pill:hover { color: var(--ink); border-color: var(--edge); }
.pill.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
@media (max-width: 520px) { .q-row { flex-direction: column; } .q-toggle { justify-content: space-between; } }

.empty { padding: 28px 18px; border: 1px dashed var(--line); color: var(--muted); font-size: 13px; text-align: center; }

/* ---------- summary ---------- */
.summary { margin: 44px 0 80px; border: 1px solid var(--line); background: var(--surface); padding: 22px 18px; }
@media (min-width: 720px) { .summary { padding: 28px; } }
.fields { display: grid; gap: 14px; grid-template-columns: 1fr; margin: 18px 0; }
@media (min-width: 720px) { .fields { grid-template-columns: 1fr 1fr; } }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.field input, .field textarea { width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: 8px 0; outline: none; font-size: 14px; resize: vertical; }
.field input:focus, .field textarea:focus { border-bottom-color: var(--brand); }
.field.wide { grid-column: 1 / -1; }
.field textarea.box { border: 1px solid var(--line); background: var(--panel); padding: 12px 14px; min-height: 120px; line-height: 1.55; transition: border-color .2s; }   /* the free-text "your project" box */
.field textarea.box:focus { border-color: var(--brand); }
.field.project { padding: 20px 0 16px; }   /* block 01 — the project in the visitor's own words */
.field.project label { font-size: 14px; color: var(--ink); margin-bottom: 12px; }
pre.out { white-space: pre-wrap; word-break: break-word; font: 300 12px/1.6 var(--font-mono); color: var(--muted); background: var(--bg); border: 1px solid var(--line); padding: 14px; max-height: 360px; overflow: auto; margin: 0 0 14px; }
.note { font-size: 11px; color: var(--muted); margin-top: 10px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; background: var(--brand); color: var(--brand-ink); font-size: 12px; padding: 10px 16px; transition: opacity .25s, transform .25s; z-index: 20; pointer-events: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- sending ---------- */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }   /* honeypot */
.field .req { color: var(--brand); }
.field.bad label { color: #ff6b6b; }
.field.bad input { border-bottom-color: #ff6b6b; }
.status { font-size: 12px; margin-top: 12px; min-height: 1.2em; color: var(--muted); }
.status.ok { color: var(--brand-hi); }
.status.err { color: #ff6b6b; }
.btn[disabled] { opacity: .5; cursor: default; }
.brief-toggle { margin: 4px 0 14px; }
.summary .fold { margin-bottom: 0; }
@media (min-width: 820px) { .types.n3 { grid-template-columns: repeat(3, 1fr); } }
a.btn { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.back { display: inline-block; font-size: 12px; color: var(--muted); text-decoration: none; margin-bottom: 18px; transition: color .2s; }
.back:hover { color: var(--brand); }
