/* Preview-only chrome: page layout + feedback blocks.
   Reuses the --shell-* design tokens from app-shell.css. */

/* app-shell.css lays the body out as a sidebar grid. There is no sidebar on
   this preview, so fall back to a plain block layout. */
body.preview-body.app-shell {
  display: block;
  padding: 0;
}

.preview-body .app-main {
  margin: 0 auto;
  max-width: 1000px;
  padding: clamp(1rem, 3vw, 2.5rem);
}

.preview-body .page-intro {
  max-width: 66ch;
  color: var(--shell-muted-strong, #2f3a55);
}

/* Both preview pages now render inside the app-shell sidebar grid. Keep the
   intro at a comfortable reading measure. */
.app-main .page-intro { max-width: 66ch; }

.intro-content { max-width: 760px !important; }
.intro-content p,
.intro-content li { max-width: 66ch; }
.intro-content h2 { margin-top: 1.8rem; }
.intro-next {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--shell-radius, 8px);
  background: var(--shell-accent, #2457d6);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.intro-next:hover { filter: brightness(1.05); }
.intro-next:focus-visible {
  outline: 3px solid var(--shell-accent-warn, #f59e0b);
  outline-offset: 3px;
}

/* ─── Feedback blocks (per-design + final) ─────────────────────────────── */
.fb-block {
  margin: 1.5rem 0 2.5rem;
  padding: clamp(1.1rem, 2.5vw, 1.6rem);
  background: var(--shell-surface, #f5f7fb);
  border: 1px solid var(--shell-line, #d6dbe5);
  border-left: 4px solid var(--shell-accent, #2563eb);
  border-radius: var(--shell-radius, 8px);
}

.fb-block-title { margin-top: 0; }

.fb-block-intro,
.fb-scale-note {
  color: var(--shell-muted, #4a5673);
  max-width: 66ch;
}

.fb-scale-note { font-size: 0.95rem; }

/* Rating radios */
fieldset.fb-rate {
  margin: 0.9rem 0 1.1rem;
  padding: 0.8rem 1rem 1rem;
  border: 1px solid var(--shell-line, #d6dbe5);
  border-radius: var(--shell-radius, 8px);
  background: var(--shell-surface-strong, #fff);
}

fieldset.fb-rate legend {
  font-weight: 600;
  padding: 0 0.4rem;
}

.fb-rate-opt {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0;
}

.fb-rate-opt input[type="radio"] {
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
  accent-color: var(--shell-accent, #2563eb);
}

.fb-rate-opt label { cursor: pointer; }

/* Free-text areas */
.fb-why-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.fb-why,
.fb-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.6rem 0.7rem;
  font: inherit;
  color: inherit;
  background: var(--shell-surface-strong, #fff);
  border: 1px solid var(--shell-line-strong, #a8b2c4);
  border-radius: var(--shell-radius, 8px);
}

.fb-why { resize: vertical; }

.fb-why:focus,
.fb-field input:focus {
  outline: 2px solid var(--shell-accent, #2563eb);
  outline-offset: 1px;
}

/* Final block: a little more prominent */
.fb-final { border-left-width: 6px; }

.fb-who {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.2rem;
}

.fb-field {
  flex: 1 1 240px;
  min-width: 0;
}

.fb-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.fb-optional { font-weight: 400; color: var(--shell-muted, #4a5673); }

/* Honeypot — visually and audibly removed, present in the DOM for bots. */
.fb-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.fb-submit {
  margin-top: 1.3rem;
  padding: 0.7rem 1.5rem;
  font: inherit;
  font-weight: 600;
  /* Use the theme's on-accent ink (not hard-coded white): in dark theme the
     accent is a light blue, so white text fails WCAG 1.4.3 contrast. */
  color: var(--shell-on-accent, #fff);
  background: var(--shell-accent, #2563eb);
  border: 0;
  border-radius: var(--shell-radius, 8px);
  cursor: pointer;
}

.fb-submit:hover { filter: brightness(1.05); }
.fb-submit:disabled { opacity: 0.6; cursor: default; }

.fb-status {
  margin-top: 0.85rem;
  min-height: 1.2em;
  font-weight: 600;
}

.fb-status.is-ok { color: #1a7f37; }
.fb-status.is-error { color: #cf222e; }
