/* Billing pages (success / cancelled / error). Same-origin CSS only; no scripts. Contrast >= 4.5:1 in both schemes. */
:root {
  color-scheme: light dark;
  --bg: #f4f6f8;
  --card: #ffffff;
  --text: #1b1f24;      /* on --card: 16:1 */
  --muted: #4a5561;     /* on --card: 7.6:1 */
  --link: #0b57d0;      /* on --card: 6.9:1 */
  --border: #8a96a3;
  --btn-bg: #0b57d0;
  --btn-text: #ffffff;  /* 6.9:1 on --btn-bg */
  --focus: #b3470a;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101317;
    --card: #1b2027;
    --text: #eef1f4;    /* on --card: 14:1 */
    --muted: #b8c2cc;   /* on --card: 8.9:1 */
    --link: #8ab4f8;    /* on --card: 7.6:1 */
    --border: #6d7886;
    --btn-bg: #8ab4f8;
    --btn-text: #0b1220; /* 8:1 on --btn-bg */
    --focus: #ffb86b;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 1rem/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
header.site, footer.site { padding: 0.75rem 1rem; max-width: 40rem; width: 100%; margin: 0 auto; }
footer.site { color: var(--muted); font-size: 0.875rem; margin-top: auto; }
/* Legal links (templates/legal_footer.html), shared by the billing and legal pages. */
.legal-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
.legal-links a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.brand { font-weight: 700; font-size: 1.125rem; color: var(--text); text-decoration: none; }
.brand:hover { text-decoration: underline; }
main.card {
  width: calc(100% - 2rem);
  max-width: 40rem;
  margin: 1rem auto;
  padding: 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow-wrap: anywhere;
}
h1 { font-size: 1.5rem; line-height: 1.25; margin: 0.5rem 0 1rem; }
h2 { font-size: 1.125rem; margin: 1.5rem 0 0.5rem; }
p { margin: 0 0 1rem; }
a { color: var(--link); }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, .button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 0.25rem;
}
.skip {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  padding: 0.5rem 0.75rem;
  background: var(--card);
  color: var(--link);
  border: 2px solid var(--link);
  border-radius: 0.25rem;
}
.skip:focus { top: 0.5rem; }
/* The label carries the meaning; the border style and text are not colour-only cues. */
.badge { margin: 0; }
.badge-text {
  display: inline-block;
  padding: 0.125rem 0.625rem;
  border: 2px solid var(--text);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 700;
}
.badge.ok .badge-text::before { content: "\2713\00a0"; }
.badge.problem .badge-text::before { content: "!\00a0"; }
.badge.info .badge-text::before { content: "i\00a0"; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1rem; margin: 0 0 1.25rem; }
.facts dt { color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; }
@media (max-width: 30rem) {
  .facts { grid-template-columns: 1fr; gap: 0; }
  .facts dd { margin-bottom: 0.75rem; }
}
.actions { margin: 1.25rem 0; }
.button {
  display: inline-block;
  min-height: 2.75rem;
  padding: 0.65rem 1.25rem;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 0.5rem;
  transition: filter 0.15s ease;
}
.button:hover { filter: brightness(1.08); text-decoration: underline; }
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  main.card { border: 2px solid CanvasText; }
  .button { border: 2px solid ButtonText; background: ButtonFace; color: ButtonText; }
  .badge-text { border-color: CanvasText; }
  a:focus-visible, .button:focus-visible { outline: 3px solid Highlight; }
  .skip { border-color: LinkText; }
}
