/* ── Page setup ── */
@page {
  size: A4;
  margin: 20mm 18mm 20mm 18mm;
}

@media print {

  /* Hide the entire UI */
  #ui-shell { display: none !important; }

  body { background: #fff; font-family: Georgia, serif; font-size: 11pt; color: #000; }

  #questionnaire-output { max-width: 100%; margin: 0; padding: 0; }
  .q-document { box-shadow: none; border-radius: 0; padding: 0; }

  .q-title {
    font-size: 16pt;
    margin-bottom: 1.5em;
    border-bottom: 2pt solid #000;
    padding-bottom: .4em;
  }

  /* Groups */
  .q-group { border-left: 3pt solid #000; padding-left: 10pt; margin: 1em 0; }
  .q-group-header { font-size: 12pt; font-weight: bold; color: #000; margin-bottom: 4pt; }
  .q-repeat { border-left: 3pt dashed #000; padding-left: 10pt; margin: 1em 0; }
  .q-repeat-header { font-size: 12pt; font-weight: bold; color: #000; margin-bottom: 4pt; }

  /* Questions */
  .q-item {
    margin-bottom: 1.2em;
    padding-bottom: .8em;
    border-bottom: .5pt solid #bbb;
  }

  /* Invisible / technical questions in print */
  .q-item.q-item--invisible {
    color: #666;
    border-bottom-color: #ccc;
  }
  .q-item.q-item--invisible .q-label,
  .q-item.q-item--invisible .q-routing,
  .q-item.q-item--invisible .q-hint,
  .q-item.q-item--invisible .q-constraint {
    color: #666;
  }
  .q-invisible-icon {
    display: inline-block;
    margin-right: 4pt;
    font-size: 9pt;
  }
  .q-invisible-icon::before {
    content: "⦻";
  }

  /* Question header */
  .q-header { display: flex; align-items: baseline; gap: 4pt; margin-bottom: 3pt; }
  .q-number     { font-weight: bold; font-size: 10pt; color: #444; }
  .q-varname    { font-size: 9pt; color: #848484; font-family: monospace; }
  .q-required   { color: #000; font-weight: bold; }

  /* Question body */
  .q-label      { font-size: 11pt; font-weight: bold; margin-bottom: 4pt; }
  .q-routing    { font-size: 10pt; color: #747474; margin: 3pt 0; }
  .q-hint       { font-size: 10pt; color: #000000; font-style: italic; margin: 3pt 0; }
  .q-constraint { font-size: 10pt; color: #747474; margin: 3pt 0; }

  /* Answer area */
  .q-answer { margin-top: 6pt; }

  /* Answer lines */
  .q-answer-line {
    border-bottom: .75pt solid #000;
    margin-bottom: 8pt;
    height: 16pt;
  }
  .q-answer-line--short { max-width: 120pt; }
  .q-answer-date { font-size: 11pt; }

  /* Choices */
  .q-choices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4pt 20pt;
    list-style: none;
    padding: 0;
    margin: 0;
  }
  .q-choices li {
    font-size: 10pt;
    display: flex;
    align-items: center;
    gap: 5pt;
  }
  .choice-circle {
    width: 10pt; height: 10pt;
    border-radius: 50%;
    border: 1pt solid #000;
    display: inline-block;
    flex-shrink: 0;
  }
  .choice-square {
    width: 9pt; height: 9pt;
    border: 1pt solid #000;
    display: inline-block;
    flex-shrink: 0;
  }

  .muted { color: #666; font-size: 9pt; }
}
