/* ============================================================
   css/components/red-flag.css
   17 Oct 2026 v3

   v3 - W6-14. .rf-why: the line saying why the questions are back, in
   the secondary colour under the introduction.

   28 Sep 2026 v2

   v2 - F4, HATCH-GUTTER. The gutter's 64px fallback removed: the
   variable is declared (index.html :root, 68px), so the fallback was
   never used and only disagreed with it.

   RED-FLAG. The "before you start" safety screen and its stop.

   Plain on purpose: this is the one screen in the product that sounds
   like this, and it should not look like a form to get through. Each
   answer is a full-width 48px row with a native radio, so the whole row
   is the target and the state is the browser's own (announced, and
   shown by the control, not by colour alone -- 1.4.1). Emergency lines
   are text, never only red.
   ============================================================ */

.rf-view {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding-bottom: var(--space-8);
}

.rf-title {
  margin: var(--space-4) 0 0;
  /* The Home hatch sits top-right; the title never runs under it. */
  padding-right: var(--escape-hatch-gutter);
  font-size: var(--text-2xl, 1.5rem);
  line-height: 1.2;
  color: var(--color-text);
}
.rf-title:focus { outline: none; }
.rf-title:focus-visible { outline: 3px solid var(--color-border-focus); outline-offset: 4px; }

.rf-intro,
.rf-body,
.rf-still {
  margin: 0;
  line-height: 1.55;
  color: var(--color-text);
}

.rf-why { color: var(--color-text-secondary); }

.rf-form { display: flex; flex-direction: column; gap: var(--space-4); }

.rf-q {
  margin: 0;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.rf-q__text {
  /* Floated so the legend sits INSIDE the box rather than breaking its
     top border, which cut through the question text. */
  float: left;
  width: 100%;
  padding: 0;
  margin-bottom: var(--space-3);
  font-weight: 600;
  line-height: 1.45;
  color: var(--color-text);
}
.rf-q__n { color: var(--color-text-secondary); }

.rf-q__answers { clear: both; display: flex; flex-direction: column; gap: var(--space-2); }

.rf-answer {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 48px;
  padding: 0 var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--color-text);
}
.rf-answer input { width: 22px; height: 22px; accent-color: var(--color-primary); flex-shrink: 0; }
.rf-answer:has(input:checked) { border-width: 2px; border-color: var(--color-primary); font-weight: 600; }
.rf-answer:focus-within { outline: 3px solid var(--color-border-focus); outline-offset: 2px; }

.rf-error { margin: 0; min-height: 1.25rem; color: var(--color-text); font-weight: 600; }

.rf-always {
  margin: 0;
  padding: var(--space-3);
  border-left: 4px solid var(--color-danger, #F87171);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  font-weight: 600;
  line-height: 1.5;
  color: var(--color-text);
}

.rf-call { text-align: center; text-decoration: none; }

.rf-clear {
  margin-top: var(--space-4);
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.rf-clear__summary { min-height: 44px; padding: var(--space-2) 0; cursor: pointer; font-weight: 600; color: var(--color-text); }
.rf-clear__summary:focus-visible { outline: 3px solid var(--color-border-focus); outline-offset: 2px; }
.rf-clear__confirm { display: flex; gap: var(--space-3); align-items: flex-start; margin: var(--space-3) 0; color: var(--color-text); line-height: 1.45; }
.rf-clear__confirm input { width: 22px; height: 22px; margin-top: 2px; flex-shrink: 0; accent-color: var(--color-primary); }
