/* Public customer pages: completion, privacy and error pages.
   Loads in the page head (after ki4med.css and ui-polish.css, before brand-final.css).
   Selectors that must beat brand-final.css or the legacy !important floors are more specific. */

/* Wordmarks sit inside a .brand wrapper here; brand-final's 20px wordmark margin never targets it. */
.complete-shell > .brand,
.privacy-public > .brand {
  display: inline-flex;
  max-width: 100%;
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
}
.complete-shell > .brand .brand-wordmark,
.privacy-public > .brand .brand-wordmark {
  width: min(190px, calc(100vw - 120px));
  margin: 0;
}

/* ---- Completion ------------------------------------------------------------------------- */
.complete-card p {
  max-width: 420px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--brand-secondary, #675e65);
}
.complete-card .complete-followup { margin-top: 14px; color: var(--brand-text, #302b31); font-weight: 600; }
.complete-card .public-note {
  justify-content: center;
  font-size: 14px !important;
}
.complete-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 22px;
  margin-top: 18px;
}
.complete-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--brand-copper, #a64b32);
  font-size: 15px;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---- Privacy notice --------------------------------------------------------------------- */
.privacy-document p.privacy-lead { font-size: 18px !important; line-height: 1.55; }
.privacy-caution strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
  line-height: 1.45;
}
.privacy-public .privacy-document .back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin: 18px 0 0;
  color: var(--brand-copper, #a64b32);
  font-size: 16px;
  font-weight: 650;
  text-decoration: none;
}
.privacy-public .privacy-document .back-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---- Error pages ------------------------------------------------------------------------- */
.error-page h1,
.public-error h1 {
  max-width: 720px;
  margin: 12px auto 14px;
  font-size: clamp(28px, 8vw, 42px);
  font-weight: 800;
  line-height: 1.15;
  overflow-wrap: anywhere;
  hyphens: auto;
  text-wrap: balance;
}
.error-page p,
.public-error p { max-width: 560px; margin: 0 auto 22px; }
.public-error { padding: clamp(40px, 10vw, 100px) 20px; }

@media (max-width: 600px) {
  .privacy-public .privacy-document .back-link { width: 100%; }
  .complete-links { flex-direction: column; align-items: center; gap: 0; }
}
