/* ── the interview (js/interview.mjs, agent-guides/interview.md) ─────────────────────────────────
   The form's pages asked one question at a time. Tokens only (app.css :root is the single token
   layer, so the light theme and a partner's veste need no override here); no backdrop-filter (the
   panel is in the scroll path).

   The interview hides the page's FIELD CELLS and nothing else, and only with `display`: `hidden`,
   `disabled` and `inert` on a cell already mean «this question does not apply» (renderer
   applyVisibilityState), and borrowing one would take the answer out of what the form collects.
   What stays on a page: its title, its note (the contacts page's is the disclosure that allows the
   capture), its callouts, the APE toggle, the reminder block. Three states of #moduleForm, set by the
   controller: `chat` (a page of questions), `native` (a page the form draws by itself: the priced
   choice, the documents, the room map, the declared spaces, the consents) and `ask` (the visitor has
   not chosen between interview and form yet). */

#moduleForm[data-intake="interview"][data-interview-page="chat"]:not([data-interview-frame="page"]) #formBuilder [data-field-cell]:not([data-interview-open]),
#moduleForm[data-intake="interview"][data-interview-page="chat"]:not([data-interview-frame="page"]) #formBuilder .header-field,
#moduleForm[data-intake="interview"][data-interview-page="chat"]:not([data-interview-frame="page"]) #formBuilder .repeater-title,
#moduleForm[data-intake="interview"][data-interview-page="chat"]:not([data-interview-frame="page"]) #formBuilder .btn-remove,
#moduleForm[data-intake="interview"][data-interview-page="chat"]:not([data-interview-frame="page"]) #formBuilder [id^="container-"] + .btn,
#moduleForm[data-intake="interview"][data-interview-page="chat"] > .required-note {
  display: none;
}
/* A row with every cell hidden is an empty frame: the thread names the rows instead. Not a grid either:
   the form's row keeps a header line as tall as its «×» (app.css .repeater-item), which here would be
   a blank band for every row. */
#moduleForm[data-intake="interview"][data-interview-page="chat"]:not([data-interview-frame="page"]) #formBuilder .repeater-item {
  display: block;
  border: 0;
  background: none;
  margin: 0;
  padding: 0;
}
#moduleForm[data-intake="interview"][data-interview-page="chat"]:not([data-interview-frame="page"]) #formBuilder .form-grid { gap: 0; }
/* A cell the form itself points at (a field the interview does not ask) is shown as the form draws it. */
#moduleForm[data-intake="interview"][data-interview-page="chat"] #formBuilder [data-interview-open] {
  margin-bottom: var(--space-3);
}
/* Until the visitor has chosen, only the choice (and the save panel) is on the page. Each selector
   outweighs the rule of app.css that shows its target: the section index above 1220px is drawn by
   `#moduleForm:has(> .step-rail:not([hidden])) > .step-rail`. */
#moduleForm[data-intake="interview"][data-interview-page="ask"] > #formBuilder,
#moduleForm[data-intake="interview"][data-interview-page="ask"] > .stepper:not([hidden]),
#moduleForm[data-intake="interview"][data-interview-page="ask"]:not([hidden]) > .step-rail:not([hidden]),
#moduleForm[data-intake="interview"][data-interview-page="ask"] > .step-nav:not([hidden]),
#moduleForm[data-intake="interview"][data-interview-page="ask"] > .required-note,
#moduleForm[data-intake="interview"][data-interview-page="ask"] > [data-step] {
  display: none;
}
/* …and the form is ONE column there. Above 1220px app.css makes it two — the pages and the section index —
   on the index being in the markup, which it still is: taken off with `display`, its 280px column stayed,
   empty, and the save panel and the choice ended that much short of the page's right edge, under a comune
   line and a «Il tuo modulo» rule that reach it (seen 2026-11-13 at 1280px). Outweighs that rule
   (`#moduleForm:has(> .step-rail:not([hidden]))`); below 1220px the form is no grid and this says nothing. */
#moduleForm[data-intake="interview"][data-interview-page="ask"]:not([hidden]) { grid-template-columns: minmax(0, 1fr); }

.interview { margin-top: var(--space-3); }
.interview[hidden] { display: none; }

.interview__thread {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.interview__thread[hidden] { display: none; }

.interview__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-3);
  padding-bottom: var(--space-1);
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: var(--fs-base);
  font-weight: 600;
}
.interview__group {
  margin-top: var(--space-2);
  color: var(--muted);
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* An answered question: what was asked on the left, what was answered on the right — the answer is a
   button, because touching it is how it is changed. */
.interview__pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  align-items: start;
  gap: var(--space-3);
}
.interview__q {
  margin: 0;
  padding: var(--space-2) 0;
  color: var(--muted);
  font-size: var(--fs-base);
  line-height: var(--lh-snug);
}
.interview__a {
  justify-self: end;
  max-width: 100%;
  min-height: var(--control-h-sm);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-sm) var(--radius-lg);
  background: var(--accent-light);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-base);
  line-height: var(--lh-snug);
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: var(--transition-control);
}
.interview__a:hover { border-color: rgba(var(--accent-rgb), .7); }
.interview__a:focus-visible,
.interview__chip:focus-visible,
.interview__link:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.interview__a--skipped {
  border-style: dashed;
  border-color: var(--border);
  background: none;
  color: var(--muted);
}

/* The question being asked. */
.interview__ask,
.interview__done {
  margin-top: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) var(--radius-sm);
  background: var(--surface-1);
}
.interview__question {
  margin: 0;
  color: var(--text);
  font-size: var(--fs-md);
  font-weight: 600;
  line-height: var(--lh-snug);
}
.interview__optional { color: var(--muted); font-weight: 400; }
.interview__help {
  margin: var(--space-2) 0 0;
  color: var(--text-secondary);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
}
.interview__note {
  margin: var(--space-2) 0 0;
  color: var(--danger-dark);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
}
/* Always in the thread, shown only when it says something: a live region whose text changes is read,
   one that appears already filled often is not. */
.interview__note:empty { display: none; }
/* A wait or an explanation, not a value refused. */
.interview__note[data-tone="info"] { color: var(--text-secondary); }
/* What the last turn wrote: the visitor reads there what was made of their sentence. */
.interview__pair--new .interview__a { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
/* A reply is being read: the box stays readable, nothing is taken meanwhile. */
.interview[data-busy] .interview__actions { opacity: .55; pointer-events: none; }
.interview[data-busy] .interview__input { color: var(--text-secondary); }
.interview__ai {
  margin: var(--space-3) 0 0;
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
}
.interview__ai[hidden] { display: none; }
.interview__question:focus { outline: none; }
.interview__question:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }

.interview__answer { margin-top: var(--space-3); }
.interview__answer[hidden] { display: none; }
.interview__input { width: 100%; }
/* A block, not a box on a line of text: on a line it sits on the baseline and the line's descender is
   added under it — 7px between the box and the buttons that no rule asked for (31 for the 24 of
   --space-6, full screen). */
textarea.interview__input { display: block; min-height: var(--control-min-touch); resize: none; }
/* A one-line answer's box is as tall as what is typed in it (interview.mjs fitAnswer): a sentence with
   several answers stays whole while it is written and while it is read. It stops at six of its own
   lines — past that the text scrolls, the caret in view — and the cap is whole lines, so none is cut:
   --answer-line is the line of the type the box is written in (the form's box here: --fs-md at the
   page's --lh-relaxed; the full-screen view sets its own below), --answer-frame what the box adds
   around its lines: its padding (--space-3 above and below) and its two hairlines. It sizes itself, so
   it has no grip to drag. A note's box sizes itself too, from its three rows up to the share of the
   screen the contract's sheet stops at (app.css .contract-sheet__text): a phone has no grip. */
textarea.interview__input:not([data-kind="long"]) {
  --answer-line: calc(var(--fs-md) * var(--lh-relaxed));
  --answer-frame: calc(var(--space-3) * 2 + 2px);
  max-height: calc(var(--answer-line) * 6 + var(--answer-frame));
}
textarea.interview__input[data-kind="long"] { max-height: 60dvh; }
.interview__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.interview__chip {
  min-height: var(--control-min-touch);
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-pill, 999px);
  background: var(--surface-1);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-base);
  line-height: var(--lh-tight);
  text-align: left;
  cursor: pointer;
  transition: var(--transition-control);
}
/* Only where a pointer hovers: under a finger the hover stays where the tap was, and the next question's
   answer, drawn in that place, looked already chosen (this fill is the chosen answer's). */
@media (hover: hover) { .interview__chip:hover { background: var(--accent-light); } }
.interview__chip[aria-pressed="true"] { background: var(--accent-light); border-color: var(--accent); }
.interview__checks { display: grid; gap: var(--space-1); }
/* A row is the form's own (app.css .check): its box stands on the label's FIRST line by a margin of its
   own, so the row is aligned at its start. Centred in the row, as it was here, that margin counted as
   part of the box and pushed it under its words: 6.5px under a finger, where the row is 44px, 2 under
   a mouse (seen 2026-11-12). The 44px of a row are the form's under a finger (the label fills it) and
   this padding otherwise — around ONE line, so a label that wraps keeps its box on the first. */
.interview__checks .check { margin: 0; }
@media not all and (pointer: coarse) {
  .interview__checks .check { padding-block: calc((var(--control-min-touch) - var(--fs-base) * var(--lh-relaxed)) / 2); }
}
.interview__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.interview__choice[hidden] { display: none; }
/* On a phone the reveal lands on this card (main.mjs revealCompilationForm): a step under the sticky
   header, the save panel a short scroll above — so both ways are whole over the orb and the
   assistant's bubble on a screen as short as a phone's browser leaves. A step, not the 56px of reading
   space a page's landing has (app.css): this card is all there is on the screen, and a small phone has
   no room to give away.
   Centred, like the landing it follows: a card that asks one thing — a question, two buttons, a line under
   each — is read from its middle, as the landing's question and help are; what is read at length and filled
   in (the questionnaire's pages, the notices) keeps the left edge (operator, 2026-11-13: centred where it
   fits, nothing left to chance). */
.interview__choice {
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-1);
  text-align: center;
  scroll-margin-top: calc(var(--header-h) + var(--space-4));
}
.interview__choice-lead:focus { outline: none; }
.interview__choice-lead {
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 500;
  line-height: var(--lh-tight);
}
/* What makes the choice cheap comes first: same questions, changeable, nothing lost. */
.interview__choice-intro {
  max-width: var(--column-max);
  margin: var(--space-2) auto 0;
  color: var(--text-secondary);
  font-size: var(--fs-md);
  line-height: var(--lh-normal);
}
/* Two ways side by side, each with the one line that says who it is for; one above the other on a phone. */
.interview__choice-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4) var(--space-5);
  margin: var(--space-5) 0 0;
  padding: 0;
  list-style: none;
}
.interview__choice-option .btn { width: 100%; min-height: var(--control-h-lg); }
.interview__choice-for {
  margin: var(--space-2) 0 0;
  color: var(--muted);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
}

/* The way to the other mode: on every page of the interview and of the form, never loud. */
.interview__switch { margin: var(--space-4) 0 0; text-align: center; }
.interview__switch[hidden] { display: none; }
/* The classic form's way back to the interview is at the head of every page, over the stepper, never at
   the page's foot (index.html): right-aligned like the page's other quiet link («Rileggi quando usare il
   modulo», app.css .practice-intent-reference) and, like it, tucked --space-2 under the block before it,
   with --space-2 to the stepper. Where a page change lands it takes no room from the page's boxes: the
   stepper stops 56px under the sticky header (app.css scroll-margin-top), and this line — a 44px target
   and the step under it — is in that room. */
.interview__switch--offer { margin: calc(var(--space-2) * -1) 0 var(--space-2); text-align: right; }
.interview__link {
  min-height: var(--control-min-touch);
  padding: var(--space-1) var(--space-2);
  border: 0;
  border-radius: var(--radius-md);
  background: none;
  color: var(--text-secondary);
  font: inherit;
  font-size: var(--fs-sm);
  text-decoration: underline;
  cursor: pointer;
}
.interview__link:hover { color: var(--text); }
.interview__row .interview__link { min-height: 0; font-weight: 400; }

@media (max-width: 640px) {
  .interview__pair { grid-template-columns: 1fr; gap: 0; }
  .interview__q { padding-bottom: var(--space-1); }
  .interview__actions .btn { flex: 1 1 auto; }
  .interview__choice { scroll-margin-top: calc(var(--header-h-compact) + var(--space-4)); }
  .interview__choice-options { grid-template-columns: 1fr; }
  /* The page lands on the choice's card (main.mjs revealCompilationForm), a step under the header — when
     there is page enough under the card to scroll that far. There was not: on a phone the scroll stopped
     84px short (390x664), with the save panel above the card cut in the middle of its sentence by the
     header. The panel that holds the card is as tall as what the header leaves of the screen from the
     card's place down, so the card always reaches it and the save panel is whole above, out of sight. */
  #moduleForm[data-intake="interview"][data-interview-page="ask"] > .interview {
    min-height: calc(100dvh - var(--header-h-compact) - var(--space-4));
  }
}

/* ── the full-screen view (js/interviewStage.mjs, agent-guides/interview.md → The stage) ──────────
   One thing at a time, and nothing of the form around it: a greeting, a page's opening, one question,
   what a sentence was read into, a page's answers. On every page the view draws or frames (`chat`):
   a page the form draws by itself is framed, the form's own controls under the view's words — the
   last one too, the consents with the send. The comune line is hidden only while it is collapsed:
   whatever opens it is pointing the visitor at it.

   The form becomes one column the height of the screen: the bar, whatever cell the form itself opens
   (a hint), the panel, and the form's own notices under it. Everything else is `display: none`, never
   covered, so nothing behind the view can take the focus. */

body:has(#moduleForm[data-interview-view="stage"][data-interview-page="chat"]:not([hidden])) .app-header,
body:has(#moduleForm[data-interview-view="stage"][data-interview-page="chat"]:not([hidden])) .progress-orb,
body:has(#moduleForm[data-interview-view="stage"][data-interview-page="chat"]:not([hidden])) .assistant,
main:has(> #moduleForm[data-interview-view="stage"][data-interview-page="chat"]:not([hidden])) > .hero-header,
main:has(> #moduleForm[data-interview-view="stage"][data-interview-page="chat"]:not([hidden])) > #pickerCard[data-collapsed],
main:has(> #moduleForm[data-interview-view="stage"][data-interview-page="chat"]:not([hidden])) > #practiceIntentReference,
main:has(> #moduleForm[data-interview-view="stage"][data-interview-page="chat"]:not([hidden])) > .lane-divider {
  display: none;
}
main:has(> #moduleForm[data-interview-view="stage"][data-interview-page="chat"]:not([hidden])) {
  padding-top: 0;
  padding-bottom: 0;
}

#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"] {
  --interview-col: var(--column-max);
  --stage-control: var(--control-h-lg);
  --stage-title: 34px;
  --stage-title-line: 40px;
  --stage-hello: 96px;
  --stage-line: var(--space-6);
  --stage-top: calc(var(--space-10) * 2);
  --stage-beat: var(--dur-slower);
  --stage-rise: var(--space-3);
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}
/* A phone — and any screen as short as a phone held sideways, where 80px over a 40px line left a
   question with its answer under the fold (844×390: the first typed screen was 701px tall). */
@media (max-width: 640px), (max-height: 500px) {
  #moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"] {
    --stage-title: 28px;
    --stage-title-line: 32px;
    --stage-hello: 64px;
    --stage-top: var(--space-8);
  }
}
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"] > .required-note,
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"] > .stepper:not([hidden]),
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"]:not([hidden]) > .step-rail:not([hidden]),
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"] > .step-nav .step-nav__actions,
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"] > .step-nav .step-nav__error,
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"] #formBuilder .card-header,
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"] #formBuilder .section-note,
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"]:not([data-interview-frame="page"]) #formBuilder .info-callout,
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"]:not([data-interview-frame="page"]) #formBuilder .info-field,
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"] #formBuilder .recovery-email-panel,
/* The APE's «non disponibile» box: this view asks it as the page's first question (interview.mjs renderApe). */
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"]:not([data-interview-frame="page"]) #formBuilder .ape-toggle {
  display: none;
}
/* The save panel is NEVER hidden while the form is open (main.mjs setAutosavePanel: «is it saved?» came
   back every time it disappeared). Full screen it is the same object in the same place — first, above
   the bar. While it says only its routine promise it is drawn small: the promise, and beside it the
   form's own offer in words, «Continua su un altro dispositivo» — the way out for whoever started on a
   phone, which a truncated «Salvataggio automatico…» never told anybody (operator, 2026-11-12). Nothing
   is cut with an ellipsis. It is whole, as the form draws it, whenever it says anything else (the
   controller sets `data-interview-save="open"`; `data-tone="warn"` holds by itself) and when the
   visitor opens it from the foot of the screen. */
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"] > .save-note {
  width: 100%;
  max-width: var(--interview-col);
  margin: var(--space-3) auto 0;
}
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"]:not([data-interview-save="open"]) > .save-note:not([data-tone="warn"]) {
  /* Its type on a line of whole pixels (13 on 20: at 1.5 it was 19.5, and every block under it sat on
     a half), and the height of the offer beside the promise. */
  --save-line: var(--space-5);
  --save-offer: var(--control-h-sm);
  align-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: var(--save-line);
}
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"]:not([data-interview-save="open"]) > .save-note:not([data-tone="warn"]) .save-note__icon {
  font-size: inherit;
  line-height: inherit;
}
/* The promise and the offer on one row (on a phone, below, on two lines). The row has the offer's
   height from the first screen: the offer comes with the first saved answer, about a second after it
   was given, and a row that grew then pushed the bar, the question and the box down under whoever was
   reading the next question — 44px on a phone (seen 2026-11-12). */
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"]:not([data-interview-save="open"]) > .save-note:not([data-tone="warn"]) .save-note__body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 var(--space-4);
  min-height: var(--save-offer);
}
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"]:not([data-interview-save="open"]) > .save-note:not([data-tone="warn"]) .save-note__message strong {
  color: var(--text-secondary);
  font-weight: 600;
}
/* Beside a question the promise is its bold lead alone («Bozza salvata su questo dispositivo.»): the rest
   of the sentence is read on the screens that are a pause — the greeting, a page's opening, a page's
   answers. Only a message that HAS a lead: any other is left whole. */
/* The line's height goes with the type: a paragraph of no type that kept a line of 20px was 25px
   tall around its lead. */
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"]:not([data-interview-save="open"]):not(:has(> .interview:is([data-scene="welcome"], [data-scene="intro"], [data-scene="review"]))) > .save-note:not([data-tone="warn"]) .save-note__message:has(> strong) {
  font-size: 0;
  line-height: 0;
}
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"]:not([data-interview-save="open"]):not(:has(> .interview:is([data-scene="welcome"], [data-scene="intro"], [data-scene="review"]))) > .save-note:not([data-tone="warn"]) .save-note__message:has(> strong) > strong {
  font-size: var(--fs-sm);
  line-height: var(--save-line);
}
/* The form's own offer, as words to tap. Every other control of the panel comes with the open panel. */
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"]:not([data-interview-save="open"]) > .save-note:not([data-tone="warn"]) .save-note__actions {
  margin: 0;
}
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"]:not([data-interview-save="open"]) > .save-note:not([data-tone="warn"]) #btnCloudActivate {
  min-height: var(--save-offer);
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: var(--text);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: .2em;
}
/* A link kept online says how it stands in one more line. */
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"]:not([data-interview-save="open"]) > .save-note:not([data-tone="warn"]) .cloud-draft-panel {
  flex-basis: 100%;
  margin: 0;
  padding: 0;
  border: 0;
}
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"]:not([data-interview-save="open"]) > .save-note:not([data-tone="warn"]) .save-note__meta,
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"]:not([data-interview-save="open"]) > .save-note:not([data-tone="warn"]) .save-note__actions .btn:not(#btnCloudActivate),
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"]:not([data-interview-save="open"]) > .save-note:not([data-tone="warn"]) .cloud-draft-panel > :not(#cloudStatus) {
  display: none;
}
@media (pointer: coarse) {
  #moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"]:not([data-interview-save="open"]) > .save-note:not([data-tone="warn"]) {
    --save-offer: var(--control-min-touch);
  }
}
/* On a phone the two never fit one row. They were a line and, under it, a 44px button: 63.5px before
   every question, with the icon centred between the two. Here they are the two lines of one small
   paragraph, the icon on the first; the offer is one line tall and is pressed on 44px all the same —
   the line above it, which is not a control, and a step under it (::after). Two lines of room from the
   first screen, for the reason given above. */
@media (max-width: 640px) {
  #moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"]:not([data-interview-save="open"]) > .save-note:not([data-tone="warn"]) {
    align-items: flex-start;
  }
  #moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"]:not([data-interview-save="open"]) > .save-note:not([data-tone="warn"]) .save-note__body {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: flex-start;
    min-height: calc(var(--save-line) * 2);
  }
  #moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"]:not([data-interview-save="open"]) > .save-note:not([data-tone="warn"]) #btnCloudActivate {
    position: relative;
    min-height: var(--save-line);
    line-height: var(--save-line);
  }
  #moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"]:not([data-interview-save="open"]) > .save-note:not([data-tone="warn"]) #btnCloudActivate::after {
    content: "";
    position: absolute;
    inset: calc(var(--save-line) * -1) 0 calc(var(--space-1) * -1);
  }
}
/* A page with every cell closed is nothing at all: no frame, no room. */
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"] #formBuilder {
  width: 100%;
  max-width: var(--interview-col);
  margin: 0 auto;
}
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"] #formBuilder .card,
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"] #formBuilder .card-body {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
/* The form's own notices (a move it proposes, answers it asks to confirm) come under the question. */
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"] > .step-nav {
  position: static;
  width: 100%;
  max-width: var(--interview-col);
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: none;
}
/* Its foot is the notices': with neither on screen it holds nothing and takes no room. It kept
   --space-5 on every screen, and a screen that was full without it — «Ecco cosa ho scritto.» with five
   answers on a phone — scrolled by what was left of that band, with nothing cut. */
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"] > .step-nav:has(> .step-nav__notice:not([hidden])),
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"] > .step-nav:has(> .step-check:not([hidden])) {
  padding-bottom: var(--space-5);
}
/* …a step under the view's own button: flush against «Continua», the form's panel read as part of it. */
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"] > .step-nav > .step-nav__notice,
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"] > .step-nav > .step-check {
  margin-top: var(--space-4);
}

.interview-bar {
  display: grid;
  grid-template-columns: var(--control-min-touch) minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  max-width: var(--interview-col, var(--column-max));
  min-height: calc(var(--control-min-touch) + var(--space-5));
  margin: 0 auto;
}
.interview-bar[hidden] { display: none; }
.interview-bar__back {
  width: var(--control-min-touch);
  height: var(--control-min-touch);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: none;
  color: var(--text);
  font: inherit;
  font-size: var(--fs-lg);
  line-height: 1;
  cursor: pointer;
  transition: var(--transition-control);
}
.interview-bar__back:hover { background: var(--surface-2); }
.interview-bar__back:focus-visible { outline: none; box-shadow: var(--focus-ring); }
/* Each in its own column: with nowhere back (the first screen) the others do not slide over. */
.interview-bar__back { grid-column: 1; }
.interview-bar__title {
  grid-column: 2;
  margin: 0;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: var(--fs-base);
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.interview-bar__count {
  grid-column: 3;
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}

/* The anti-bot check, right under the bar (index.html: the form's own `documenti` session widget, a
   static child that is never moved; a typed answer's session waits on it as an upload's does). It is
   on screen only while a request waits on the visitor's press — which is when the form's own line
   shows under it (main.mjs waitForTurnstileToken: the checkbox up, and somebody waiting). Then it is
   on the view's column, a step under the bar, the line at the size of what the view explains with
   (15 on 24) and 8 from the box, as inside any group. At every other moment it is not drawn: Cloudflare
   may put its checkbox up again with a session already in hand and nothing waiting on it, and one
   thing at a time has no room for a box that asks for nothing. Hidden, never emptied — the widget
   keeps its challenge, as the consents page's does on every page before the last. It stood above the
   bar and against the screen's left edge, where no rule of this view reached it. */
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"] > .turnstile-box {
  gap: var(--space-2);
  width: 100%;
  max-width: var(--interview-col);
  margin: var(--space-6) auto 0;
}
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"] > .turnstile-box:not(:has(> .invalid-feedback.show)) {
  display: none;
}
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"] > .turnstile-box > .invalid-feedback {
  margin-top: 0;
  line-height: var(--lh-relaxed);
}

/* ── the view's own measures ─────────────────────────────────────────────────────────────────────
   Every size below is one of these, and each of these is a step of app.css's scale (the 4px grid of
   --space-*, the control heights, the durations) or a type size set on that grid. No size is written
   where it is used: a screen that is one sentence and one answer shows every pixel that is off.
   They are declared on the form (the rule above that makes it one column), so that the bar, the words
   above a framed block and the panel all read the same ones.

     column   one, 34rem: the bar, the question, the answer and the foot share its two edges
     control  one height, 48px: the box, a choice's row, a button; the box of a typed answer grows from
              that one line with its sentence, a line at a time, up to six. A line is --stage-line, 24px
              under --fs-lg, and the box's padding is --space-3 LESS its hairline: 24 + 22 + 2 is the 48.
              (At --lh-tight a line was 23.4 and the box 49.4: taller than the button under it, and
              every block below it on a fraction of a pixel.)
     type     two sizes above the body's — the sentence of a screen (34/40, the size of a large title;
              28/32 on a phone) and the greeting (96, 64 on a phone); under them the form's own
              --fs-lg for what explains and --fs-md for what is typed
     rhythm   8 inside a group, 12 from a sentence to what explains it, 24 from the words to the
              answer and from the answer to its buttons, 80 from the bar to the first line (32 on a
              phone, where the keyboard takes half the screen)
     motion   one beat (--dur-slower): a screen arrives in less than one, the greeting takes three */
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"] > .interview {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  width: 100%;
  max-width: var(--interview-col);
  margin: 0 auto;
  padding-top: var(--stage-top);
}

/* A page the form draws by itself, framed (the documents): the view's words where a question would
   be, then the form's own block on the same column, then the view's way on. The panel keeps the rest
   of the screen's height, so the ways out stay at its foot. */
.interview-opening {
  width: 100%;
  max-width: var(--interview-col, var(--column-max));
  margin: 0 auto;
  padding-top: var(--stage-top);
}
.interview-opening[hidden] { display: none; }
/* What the form says about such a page runs to a paragraph: it is read at the size of what is typed. */
.interview-opening .interview__lede { font-size: var(--fs-md); }
.interview-opening .interview__actions:empty { display: none; }
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"][data-interview-frame] #formBuilder { margin-top: var(--space-6); }
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"][data-interview-frame] > .interview { padding-top: 0; }
/* Every other page the form draws by itself (`page`: the priced choice, the room map, the square metres
   of rooms and spaces): its own cells, shown as the form draws them, on the view's one column — so one
   under the other, never two side by side in 34rem. */
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"][data-interview-frame="page"] #formBuilder .cell--half {
  grid-column: span 2;
}
/* The last page (`send`): the consents and the send are static markup of the form, a card AFTER the
   panel. Framed where it is: its chrome off, on the view's column, under the view's words; the foot's
   own margin keeps the ways out at the bottom of the screen. */
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"][data-interview-frame="send"] > [data-step] {
  width: 100%;
  max-width: var(--interview-col);
  margin: var(--space-6) auto 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"][data-interview-frame="send"] > [data-step] .card-header {
  display: none;
}
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"][data-interview-frame="send"] > [data-step] .card-body {
  padding: 0;
}
/* Nothing of the builder is on this page and the panel holds nothing: neither takes room, or the card
   would start three gaps under the words instead of one. */
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"][data-interview-frame="send"] > #formBuilder,
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"][data-interview-frame="send"] > .interview {
  display: none;
}
/* Any other screen drawn while that page is the current one (how an analysis ended) is alone. */
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"]:not([data-interview-frame="send"]) > [data-step] {
  display: none;
}
/* The ways out: last in the form (interview.mjs stageFoot), on the same column, at the screen's foot. */
#moduleForm[data-intake="interview"][data-interview-page="chat"][data-interview-view="stage"] > .interview__foot {
  width: 100%;
  max-width: var(--interview-col);
  margin: auto auto 0;
}

/* The words of a screen. */
[data-interview-view="stage"] .interview__thread { gap: 0; }
[data-interview-view="stage"] .interview__ask,
[data-interview-view="stage"] .interview__scene {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
}
[data-interview-view="stage"] .interview__question {
  font-family: var(--font-display);
  font-size: var(--stage-title);
  font-weight: 500;
  line-height: var(--stage-title-line);
  letter-spacing: -.02em;
  text-wrap: balance;
}
[data-interview-view="stage"] .interview__hello {
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: var(--stage-hello);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.04em;
}
/* The screen's sentence takes the focus so that it is what is read next; it is not a control, and a
   ring around it reads as a box to type in. */
[data-interview-view="stage"] .interview__hello:focus,
[data-interview-view="stage"] .interview__hello:focus-visible,
[data-interview-view="stage"] .interview__question:focus,
[data-interview-view="stage"] .interview__question:focus-visible { outline: none; box-shadow: none; }
[data-interview-view="stage"] .interview__optional {
  display: block;
  margin-top: var(--space-2);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-relaxed);
  letter-spacing: 0;
}
.interview__lede {
  margin: var(--space-3) 0 0;
  color: var(--text-secondary);
  font-size: var(--fs-lg);
  line-height: var(--lh-normal);
  text-wrap: pretty;
}
.interview__context {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-3);
  margin: 0 0 var(--space-2);
  color: var(--muted);
  font-size: var(--fs-base);
  line-height: var(--lh-relaxed);
}
.interview__context-row { color: var(--text-secondary); font-weight: 600; }
[data-interview-view="stage"] .interview__help {
  margin-top: var(--space-3);
  font-size: var(--fs-lg);
  line-height: var(--lh-normal);
}
[data-interview-view="stage"] .interview__note {
  margin-top: var(--space-3);
  font-size: var(--fs-md);
}
/* On a question's screen that line keeps its room, said or not: one line of its own type, a step
   (--space-3) over it and — below — a step to the answer. Shown only once it spoke, it pushed the box
   and «Avanti» down by its line and its step the moment a sentence was sent («Leggo la risposta…»),
   under the finger and, on a phone, towards the keyboard. A refusal longer than a line still takes the
   lines it needs: that one is read before anything is pressed. */
[data-interview-view="stage"] .interview__ask > .interview__note { display: block; min-height: calc(1em * var(--lh-normal)); }
/* What the form says before a question (its own callout box), under the question it belongs to. */
[data-interview-view="stage"] .interview__ask .info-callout { margin: var(--space-4) 0 0; }

/* The answer: one height for whatever takes it, the column's two edges for whatever is typed or chosen. */
[data-interview-view="stage"] .interview__answer { margin-top: var(--space-6); }
/* Under a question the line above already keeps the room between the words and the answer; and when
   the answer is only buttons («Sì, aggiungi», «No, prosegui») they start there, with no step of their
   own on top of it. */
[data-interview-view="stage"] .interview__thread:has(> .interview__ask) + .interview__answer { margin-top: var(--space-3); }
[data-interview-view="stage"] .interview__thread:has(> .interview__ask) + .interview__answer > .interview__actions:first-child { margin-top: 0; }
[data-interview-view="stage"] .interview__input {
  min-height: var(--stage-control);
  padding: calc(var(--space-3) - 1px) var(--space-4);
  border-radius: var(--radius-lg);
  font-size: var(--fs-lg);
  line-height: var(--stage-line);
}
/* A date and a list are the browser's own controls, each with insides of its own (a date was 2px over
   the box beside it): the one height is given to them, not left to add up. */
[data-interview-view="stage"] input.interview__input,
[data-interview-view="stage"] select.interview__input { height: var(--stage-control); }
/* A one-line answer's box grows with its sentence, up to six lines (the rule of the thread's box, above):
   here a line is the stage's own, and the frame is --space-3 above and below, hairlines included. */
[data-interview-view="stage"] textarea.interview__input:not([data-kind="long"]) {
  --answer-line: var(--stage-line);
  --answer-frame: calc(var(--space-3) * 2);
}

/* The contract's sheet is the form's own component (app.css .contract-sheet, js/contractSheet.mjs):
   nothing of it is drawn here. This view only places what the form says about the clauses under it
   (interview.mjs renderQuestion). */
[data-interview-view="stage"] .interview__answer > .contract-sheet + .info-callout { margin-top: var(--space-4); }
/* A choice is a short list to read down, not a row of pills to scan across. */
[data-interview-view="stage"] .interview__chips {
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-2);
}
[data-interview-view="stage"] .interview__chip {
  min-height: var(--stage-control);
  padding: var(--space-3) var(--space-4);
  border-color: var(--border);
  border-radius: var(--radius-lg);
  font-size: var(--fs-md);
  line-height: var(--lh-tight);
}
@media (hover: hover) { [data-interview-view="stage"] .interview__chip:hover { border-color: var(--accent-border); } }
/* The choice made is the row with the accent's edge. Said again here: the rule above, as strong as the
   thread's `[aria-pressed="true"]` and later, gave the chosen row the plain edge back, and it stood
   apart from the others by a tint alone, 1.06 to 1 (seen 2026-11-12). After the hover's rule: under a
   mouse the chosen row keeps its edge too. */
[data-interview-view="stage"] .interview__chip[aria-pressed="true"] { border-color: var(--accent); }
[data-interview-view="stage"] .interview__checks { gap: var(--space-2); }
[data-interview-view="stage"] .interview__actions {
  gap: var(--space-3);
  margin-top: var(--space-6);
}
[data-interview-view="stage"] .interview__actions .btn {
  min-width: calc(var(--space-10) * 4);
  min-height: var(--stage-control);
  padding-inline: var(--space-6);
  font-size: var(--fs-md);
}
/* …on a line of whole pixels, like every line of this view (13 on 20; 15 on 24 above: at 1.5 they were
   19.5 and 22.5, and what came under them sat on half a pixel). */
[data-interview-view="stage"] .interview__ai { margin-top: var(--space-4); line-height: var(--space-5); }

/* A page's answers, and what a sentence was read into: a list to read down. Each row is the question
   in small type over its answer, and the whole row is the button that reopens it. */
[data-interview-view="stage"] .interview__row {
  margin-top: var(--space-6);
  padding-bottom: var(--space-2);
  font-size: var(--fs-base);
  line-height: var(--lh-relaxed);
}
[data-interview-view="stage"] .interview__group { margin-top: var(--space-4); line-height: var(--space-5); }
[data-interview-view="stage"] .interview__pair {
  position: relative;
  display: block;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-light);
}
[data-interview-view="stage"] .interview__scene + .interview__pair { margin-top: var(--space-6); border-top: 1px solid var(--border-light); }
[data-interview-view="stage"] .interview__q {
  padding: 0;
  font-size: var(--fs-sm);
  line-height: var(--space-5);
}
[data-interview-view="stage"] .interview__a {
  display: block;
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  font-size: var(--fs-md);
  line-height: var(--lh-normal);
}
/* The row, not the words, is what is pressed. */
[data-interview-view="stage"] .interview__a::after {
  content: "";
  position: absolute;
  inset: 0;
}
[data-interview-view="stage"] .interview__a--skipped { color: var(--muted); }
/* A page with nothing left to ask: a small mark of something finished, drawn, never an emoji. */
.interview__done-mark {
  position: relative;
  display: block;
  width: var(--control-h-md);
  height: var(--control-h-md);
  margin-bottom: var(--space-4);
  border-radius: var(--radius-full);
  background: var(--accent-light);
}
.interview__done-mark::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--space-2);
  height: var(--space-4);
  margin: calc(var(--space-3) * -1) 0 0 calc(var(--space-1) * -1);
  border: solid var(--accent-dark);
  border-width: 0 var(--space-0-5) var(--space-0-5) 0;
  transform: rotate(45deg);
}

/* The ways out, at the foot of the screen whatever the screen holds. */
.interview__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 var(--space-5);
  margin: auto 0 0;
  padding: var(--space-10) 0 var(--space-4);
}
.interview__foot[hidden] { display: none; }
.interview__foot .interview__link {
  display: inline-flex;
  align-items: center;
  padding-inline: 0;
}

/* A new screen arrives; the same screen saying something more (a wait, a refusal) does not move. */
@keyframes interview-in {
  from { opacity: 0; transform: translateY(var(--stage-rise)); }
}
[data-interview-view="stage"] .interview:not([data-still]) .interview__thread > li,
[data-interview-view="stage"] .interview:not([data-still]) .interview__answer > * {
  animation: interview-in var(--dur-slow) var(--ease-out) both;
}
[data-interview-view="stage"] .interview:not([data-still]) .interview__answer > * { animation-delay: var(--dur-instant); }
/* The one staged moment: the greeting, then what happens next, then the way in — three beats. */
[data-interview-view="stage"] .interview[data-scene="welcome"]:not([data-still]) .interview__thread > li {
  animation-duration: calc(var(--stage-beat) * 2);
}
[data-interview-view="stage"] .interview[data-scene="welcome"]:not([data-still]) .interview__lede {
  animation: interview-in calc(var(--stage-beat) * 2) var(--ease-out) var(--stage-beat) both;
}
[data-interview-view="stage"] .interview[data-scene="welcome"]:not([data-still]) .interview__answer > * {
  animation-delay: calc(var(--stage-beat) * 2);
}
@media (prefers-reduced-motion: reduce) {
  [data-interview-view="stage"] .interview .interview__thread > li,
  [data-interview-view="stage"] .interview .interview__answer > *,
  [data-interview-view="stage"] .interview .interview__lede { animation: none; }
}

@media (max-width: 640px) {
  /* On a phone the one button of a screen spans the column, under the thumb. */
  [data-interview-view="stage"] .interview__actions .btn-primary { flex: 1 1 100%; }
}
