/* Red Giant — the post-submission panel.
   NOT WIRED INTO ANY PAGE. Proposal only, pending approval.

   Built on the custom properties the estate already defines, so it inherits the
   typography and colour rather than introducing a second design language. It
   replaces the submitted form in place: same column, same width, same rhythm. */

.rgs {
  border: 1px solid var(--line, rgba(22,19,16,.14));
  border-top: 3px solid var(--ember, #a8271f);
  border-radius: var(--radius, 3px);
  background: var(--white, #fffdf9);
  padding: clamp(22px, 3.2vw, 34px);
  /* The panel takes the place of the form, so it inherits its margins. */
  margin: 0;
}
.rgs:focus { outline: none; }

/* ------------------------------------------------------------- the receipt */
.rgs-tick {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ember, #a8271f);
}
.rgs-tick i {
  font-style: normal; width: 18px; height: 18px; border-radius: 50%;
  background: var(--ember, #a8271f); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; line-height: 1; flex: 0 0 auto;
}
.rgs-h {
  font-family: var(--display, Georgia, serif); font-weight: 400;
  font-size: clamp(21px, 2.6vw, 28px); line-height: 1.15;
  color: var(--ink, #161310); margin: 10px 0 0; max-width: 24ch;
}
.rgs-h:focus { outline: none; }
.rgs-sub {
  font-size: 14.5px; line-height: 1.65; color: var(--ink-soft, #4c443c);
  margin: 8px 0 0; max-width: 54ch;
}

/* -------------------------------------------------------------- reference */
.rgs-ref {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px;
  margin-top: 20px; padding: 12px 14px;
  background: var(--paper, #faf7f2); border: 1px solid var(--line, rgba(22,19,16,.14));
  border-radius: var(--radius, 3px);
}
.rgs-ref .k {
  font-family: var(--mono, ui-monospace, monospace); font-size: 9.5px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint, #6b6359);
}
.rgs-ref[hidden] { display: none !important; }
.rgs-ref b {
  font-family: var(--mono, ui-monospace, monospace); font-weight: 700;
  font-size: 15px; letter-spacing: .06em; color: var(--ink, #161310);
}

/* ------------------------------------------------------------- what we got */
.rgs-got { margin-top: 16px; }
.rgs-got .k {
  display: block; font-family: var(--mono, ui-monospace, monospace); font-size: 9.5px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint, #6b6359);
  margin-bottom: 6px;
}
.rgs-got ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.rgs-got li {
  font-size: 12.5px; color: var(--ink-soft, #4c443c);
  border: 1px solid var(--line, rgba(22,19,16,.14)); background: var(--paper, #faf7f2);
  border-radius: 2px; padding: 5px 9px;
}

.rgs-acts-h {
  margin: 22px 0 10px; font-family: var(--mono, ui-monospace, monospace);
  font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-faint, #6b6359);
}
.rgs-tick.is-bad i { background: var(--ink, #161310); }

/* ------------------------------------------------------------- next steps */
.rgs-next { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line, rgba(22,19,16,.14)); }
.rgs-next .k {
  display: block; font-family: var(--mono, ui-monospace, monospace); font-size: 9.5px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ember, #a8271f);
  margin-bottom: 10px;
}
.rgs-next ol { margin: 0; padding: 0; list-style: none; counter-reset: rgs; }
.rgs-next li {
  counter-increment: rgs; position: relative; padding-left: 30px;
  font-size: 14px; line-height: 1.6; color: var(--ink-soft, #4c443c); margin-bottom: 9px;
}
.rgs-next li:last-child { margin-bottom: 0; }
.rgs-next li::before {
  content: counter(rgs); position: absolute; left: 0; top: 1px;
  width: 20px; height: 20px; border-radius: 50%;
  border: 1px solid var(--line, rgba(22,19,16,.14)); color: var(--ink-faint, #6b6359);
  font-family: var(--mono, ui-monospace, monospace); font-size: 10px;
  display: flex; align-items: center; justify-content: center;
}

/* ---------------------------------------------------------------- actions */
.rgs-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 0; }
.rgs-b {
  flex: 1 1 190px; min-height: 52px; padding: 14px 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--radius, 3px); border: 1px solid transparent; cursor: pointer;
  text-decoration: none; text-align: center;
  font-family: var(--mono, ui-monospace, monospace); font-size: 11px;
  letter-spacing: .1em; text-transform: uppercase;
}
/* WhatsApp leads, because it is the channel that actually gets answered.
   Call is the equal-weight alternative, not a lesser one. */
.rgs-wa   { background: var(--ink, #161310);  border-color: var(--ink, #161310);  color: var(--paper, #faf7f2); }
.rgs-call { background: var(--ember, #a8271f); border-color: var(--ember, #a8271f); color: #fff; }
.rgs-b:hover { filter: brightness(1.1); }
.rgs-b:focus-visible { outline: 2px solid var(--ember, #a8271f); outline-offset: 3px; }

/* ------------------------------------------------------- one contextual link */
.rgs-more {
  margin-top: 18px; padding-top: 16px;
  border-top: 1px solid var(--line, rgba(22,19,16,.14));
  font-size: 13.5px; line-height: 1.6; color: var(--ink-soft, #4c443c);
}
.rgs-more a {
  color: var(--ink, #161310); text-decoration: none;
  border-bottom: 1px solid var(--ember, #a8271f); padding-bottom: 1px;
}
.rgs-more a:hover { color: var(--ember, #a8271f); }

.rgs-fine {
  margin-top: 14px; font-size: 11.5px; line-height: 1.6; color: var(--ink-faint, #6b6359);
}

/* ------------------------------------------------------------------ failure */
.rgs.is-fail { border-top-color: var(--ember, #a8271f); }
.rgs-fail-note {
  margin-top: 14px; padding: 11px 13px; border-radius: var(--radius, 3px);
  background: rgba(168, 39, 31, .05); border: 1px solid var(--ember, #a8271f);
  font-size: 13.5px; line-height: 1.6; color: var(--ink, #161310);
}
.rgs-retry { background: var(--ink, #161310); border-color: var(--ink, #161310); color: var(--paper, #faf7f2); }

@media (max-width: 560px) {
  .rgs-acts { flex-direction: column; }
  .rgs-b { flex: 1 1 auto; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .rgs, .rgs-b { transition: none; }
}

/* ------------------------------------------------- after the conversion
   Once somebody has submitted, nothing on the page should still be asking
   them to submit. These three belong to other scripts; the class lets them
   be retired without editing any of them.
     #bestick    the sticky "get an instant estimate" prompt
     .rgbar-q    the "Get Quote" button in the mobile contact bar
     .plsticky   the live-figure bar shown while refining an estimate
   Call and WhatsApp in the contact bar are deliberately left alone: they are
   still the right thing to press. */
body.rg-converted #bestick,
body.rg-converted .plsticky,
body.rg-converted .rgbar-q { display: none !important; }
