/* Forms review, confirm, and send (Lane Q3).
   Companion to forms-review.js. Every value comes from the Design
   Elevation Spec tokens (Part 1): colors, the 4px spacing scale,
   radii 12 and 16, the card shadow, and the one focus ring. Token
   variables carry literal fallbacks so the card looks right whether
   or not the token pass has landed in styles.css yet. Buttons and
   rows never change size, border width, or position between states.
   The Confirm and send button is gold by Mr. Chupp's order for this
   flow: same geometry as a primary action (56px, radius 12px),
   --gold fill, --ink text, full width. */

.fr-card {
  background: var(--card, #ffffff);
  border: 1px solid var(--line, #d6ddd2);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(23, 37, 27, .05), 0 4px 16px rgba(23, 37, 27, .05);
  padding: 20px;
  margin: 16px 0;
  color: var(--ink, #17251b);
  font-size: 1.0625rem;
  line-height: 1.55;
}

.fr-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 8px;
}
.fr-title:focus:not(:focus-visible) { outline: none; }

.fr-formname {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--green, #14532d);
  margin: 0 0 8px;
}

.fr-place {
  color: var(--muted, #475569);
  font-size: 0.9375rem;
  margin: 0 0 8px;
}

.fr-intro { margin: 0 0 8px; }

.fr-rows { margin: 0 0 16px; }

.fr-row {
  border-top: 1px solid var(--line, #d6ddd2);
  padding: 12px 0;
}
.fr-row:last-child { padding-bottom: 4px; }

.fr-row-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.fr-label { font-weight: 700; }

.fr-value { margin: 4px 0 0; overflow-wrap: break-word; }
.fr-value-empty { color: var(--muted, #475569); }
.fr-value-needed { color: #7f1d1d; font-weight: 600; }

.fr-fix {
  flex: none;
  min-height: 48px;
  padding: 8px 16px;
  background: #ffffff;
  border: 1px solid var(--green, #14532d);
  border-radius: 12px;
  color: var(--ink, #17251b);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.fr-routing {
  background: var(--green-wash, #f0fdf4);
  border-radius: 12px;
  padding: 12px;
  font-size: 0.9375rem;
  margin: 0 0 12px;
}

.fr-status {
  min-height: 1.55em;
  margin: 0 0 12px;
  font-weight: 600;
}
.fr-status:focus:not(:focus-visible) { outline: none; }
.fr-status-error { color: #7f1d1d; }

.fr-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fr-download {
  min-height: 52px;
  width: 100%;
  padding: 12px 20px;
  background: #ffffff;
  border: 2px solid var(--green, #14532d);
  border-radius: 12px;
  color: var(--ink, #17251b);
  font-size: 1.0625rem;
  font-weight: 600;
  cursor: pointer;
}

.fr-confirm {
  min-height: 56px;
  width: 100%;
  padding: 12px 20px;
  background: var(--gold, #facc15);
  border: 2px solid var(--gold, #facc15);
  border-radius: 12px;
  color: var(--ink, #17251b);
  font-size: 1.0625rem;
  font-weight: 700;
  cursor: pointer;
}
.fr-confirm:disabled { background: var(--line, #d6ddd2); border-color: var(--line, #d6ddd2); color: var(--muted, #475569); opacity: 1; cursor: default; }
.fr-confirm:active { background: #eab308; border-color: #eab308; }

.fr-done {
  min-height: 56px;
  width: 100%;
  padding: 12px 20px;
  background: var(--green, #14532d);
  border: 2px solid var(--green, #14532d);
  border-radius: 12px;
  color: #ffffff;
  font-size: 1.0625rem;
  font-weight: 700;
  cursor: pointer;
}
.fr-done:active { background: var(--green-deep, #0e3d21); border-color: var(--green-deep, #0e3d21); }

.fr-back {
  min-height: 52px;
  width: 100%;
  padding: 12px 20px;
  background: #ffffff;
  border: 2px solid var(--green, #14532d);
  border-radius: 12px;
  color: var(--ink, #17251b);
  font-size: 1.0625rem;
  font-weight: 600;
  cursor: pointer;
}

.fr-fix:focus-visible,
.fr-download:focus-visible,
.fr-confirm:focus-visible,
.fr-done:focus-visible,
.fr-back:focus-visible {
  outline: 3px solid #b45309;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: no-preference) {
  .fr-fix, .fr-download, .fr-confirm, .fr-done, .fr-back {
    transition: background 150ms ease, color 150ms ease;
  }
}
