.submission-receipt {
  --receipt-gutter: clamp(16px, 4vw, 28px);
  position: fixed;
  inset: 0;
  inline-size: min(35rem, calc(100% - 24px));
  max-inline-size: none;
  block-size: fit-content;
  max-block-size: calc(100vh - 32px);
  max-block-size: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d6e2f1;
  border-radius: 20px;
  background: #fff;
  color: #102740;
  box-shadow: 0 24px 80px #03112270;
}
.submission-receipt[open] { display: flex; flex-direction: column; }
.submission-receipt::backdrop { background: #07172cb8; backdrop-filter: blur(5px); }

.receipt-header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: start;
  gap: 12px;
  flex: none;
  padding: var(--receipt-gutter);
  border-bottom: 1px solid #e0e9f3;
  background: #f4f8fd;
}
.receipt-mark {
  display: grid;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
  border: 1px solid #b6ddcc;
  border-radius: 12px;
  background: #e4f5ed;
  color: #176646;
}
.receipt-mark svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.submission-receipt[open] .receipt-mark svg path { stroke-dasharray: 1; animation: receipt-check-draw .55s .08s ease-out both; }
@keyframes receipt-check-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .submission-receipt[open] .receipt-mark svg path { animation: none; } }
.receipt-heading h2 {
  margin: 0;
  color: #102a49;
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  line-height: 1.2;
  letter-spacing: -.035em;
}
.receipt-heading h2:focus { outline: none; }
.receipt-heading p {
  margin: 6px 0 0;
  color: #49617d;
  font-size: .875rem;
  line-height: 1.5;
}
.receipt-close {
  display: grid;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
  border: 1px solid #d1dfee;
  border-radius: 10px;
  background: #fff;
  color: #294666;
  cursor: pointer;
}
.receipt-close:hover { background: #eaf1fa; }
.receipt-close .icon { inline-size: 18px; block-size: 18px; }

.receipt-body {
  min-block-size: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 22px var(--receipt-gutter);
}
.receipt-body h3 {
  margin: 0 0 12px;
  color: #143050;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.015em;
}
.receipt-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #c7d8e9;
  border-radius: 12px;
  background: #c7d8e9;
}
.receipt-detail { min-inline-size: 0; padding: 11px 14px 12px; background: #fff; }
.receipt-detail--wide { background: #f7fafe; }
.receipt-detail--wide { grid-column: 1 / -1; }
.receipt-detail dt { color: #516783; font-size: .8125rem; font-weight: 600; line-height: 1.4; }
.receipt-detail dd {
  margin: 3px 0 0;
  color: #122f51;
  font-size: .9375rem;
  font-weight: 650;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.receipt-follow-up {
  margin-block-start: 16px;
  padding: 12px 14px;
  border-inline-start: 3px solid #8fb1dc;
  border-radius: 0 8px 8px 0;
  background: #f1f6fc;
  color: #193c62;
  font-size: .875rem;
  line-height: 1.5;
}
.receipt-follow-up p { margin: 3px 0 0; color: #465f7b; }

.receipt-footer {
  display: flex;
  flex: none;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 12px var(--receipt-gutter);
  border-top: 1px solid #dce7f2;
  background: #fff;
}
.receipt-contact,
.receipt-done {
  display: inline-flex;
  min-block-size: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: .875rem;
  font-weight: 700;
}
.receipt-contact { color: #28527f; white-space: nowrap; }
.receipt-contact:hover { text-decoration: underline; }
.receipt-contact .icon { inline-size: 16px; block-size: 16px; }
.receipt-done {
  min-inline-size: 108px;
  padding: 8px 19px;
  border-radius: 10px;
  background: #17395f;
  color: #fff;
  cursor: pointer;
}
.receipt-done:hover { background: #214c7d; }
.submission-receipt :is(button, a, .receipt-body):focus-visible { outline: 2px solid #296dbb; outline-offset: -3px; }

@media (max-width: 480px) {
  .receipt-header { grid-template-columns: 36px minmax(0, 1fr) 44px; gap: 8px; }
  .receipt-mark { inline-size: 36px; block-size: 36px; border-radius: 9px; }
  .receipt-body { padding-block: 15px; }
  .receipt-detail { padding: 9px 10px; }
  .receipt-detail dd { font-size: .875rem; }
}
@media (max-height: 450px) {
  .submission-receipt { max-block-size: calc(100dvh - 16px); }
  .receipt-header, .receipt-footer { padding-block: 8px; }
  .receipt-heading p { margin-block-start: 3px; }
  .receipt-body { padding-block: 12px; }
}

.consent-dialog { inline-size: min(42rem, calc(100% - 24px)); }
.consent-dialog .consent-header { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.consent-body { color: #344c67; font-size: 1rem; line-height: 1.65; overflow-wrap: anywhere; }
.consent-body h3 { margin: 1rem 0 .35rem; }
.consent-body h3:first-child { margin-top: 0; }
.consent-body p, .consent-body ul { margin: 0 0 .7rem; }
.consent-body ul { padding-inline-start: 1.3rem; }
.consent-body a { text-decoration: underline; text-underline-offset: .15em; }
.consent-footer { justify-content: flex-end; flex-wrap: wrap; }
.consent-footer .consent-dismiss { background: #eef4fb; color: #17395f; }
.consent-footer .consent-dismiss:hover { background: #e1edfb; }
@media (max-width: 390px) {
  .consent-footer .receipt-done { flex: 1 1 auto; min-inline-size: 0; padding-inline: .75rem; }
}
