:root {
  --cbcs-red: #cf0a0a;
  --cbcs-red-deep: #a80808;
  --cbcs-red-tint: #fceaea;
  --cbcs-ink: #383636;
  --cbcs-gray: #605e5e;
  --cbcs-gray-soft: #767373;
  --cbcs-line: #e2e0de;
  --cbcs-line-strong: #d3d0cd;
  --cbcs-canvas: #f5f4f2;
  --cbcs-surface: #ffffff;
  --cbcs-success: #166534;
  --cbcs-display: "Jost", "Century Gothic", Futura, sans-serif;
  --cbcs-body: "Raleway", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ory-theme-font-family: var(--cbcs-body);
  --ory-theme-accent-def: var(--cbcs-red);
  --ory-theme-accent-muted: #b90909;
  --ory-theme-accent-emphasis: var(--cbcs-red-deep);
  --ory-theme-accent-subtle: var(--cbcs-red-tint);
  --ory-theme-foreground-def: var(--cbcs-ink);
  --ory-theme-foreground-muted: var(--cbcs-gray);
  --ory-theme-foreground-subtle: var(--cbcs-gray-soft);
  --ory-theme-background-surface: var(--cbcs-surface);
  --ory-theme-background-canvas: var(--cbcs-canvas);
  --ory-theme-background-subtle: #efedeb;
  --ory-theme-border-def: var(--cbcs-line-strong);
  --ory-theme-input-text: var(--cbcs-ink);
  --ory-theme-input-placeholder: var(--cbcs-gray-soft);
  --ory-theme-error-def: #8f0808;
  --ory-theme-error-emphasis: var(--cbcs-red);
  --ory-theme-error-subtle: var(--cbcs-red-tint);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--cbcs-surface);
  line-height: 1.5;
}

body {
  margin: 0;
  min-height: 100vh;
  min-width: 100%;
  color: var(--cbcs-ink);
  background: var(--cbcs-canvas);
  border-top: 3px solid var(--cbcs-red);
  font-family: var(--cbcs-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

ul,
ol,
p,
h1,
h2,
h3 {
  margin-top: 0;
  margin-bottom: 0;
}

h1,
h2,
h3 {
  color: var(--cbcs-ink);
  font-family: var(--cbcs-display);
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

main {
  min-height: calc(100vh - 3px);
  width: 100%;
}

a {
  color: var(--cbcs-red-deep);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--cbcs-red);
}

.spacing-32,
.spacing-16,
.spacing-8 {
  display: flex;
  flex-direction: column;
}

.spacing-32 {
  gap: 2rem;
}

.spacing-16 {
  gap: 1rem;
}

.spacing-8 {
  gap: 0.5rem;
}

.spacing-32-horizontal,
.spacing-16-horizontal {
  display: flex;
  flex-direction: row;
}

.spacing-32-horizontal {
  gap: 2rem;
}

.spacing-16-horizontal {
  gap: 1rem;
}

.divider {
  width: 2.75rem;
  margin: 1.5rem 0;
  border-color: var(--cbcs-red) !important;
}

.divider-left {
  margin: 0;
}

[data-testid$="-auth-card"],
[data-testid="error-card"] {
  width: 100%;
  min-width: 0 !important;
  max-width: 28rem !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

[data-testid$="-auth-card"] h2,
[data-testid="error-card"] h2 {
  font-family: var(--cbcs-display);
  font-size: clamp(1.75rem, 4vw, 2.15rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-align: left;
}

[data-testid$="-auth-card"] hr,
[data-testid="error-card"] hr {
  width: 2.75rem;
  margin: 0 !important;
  border-top: 3px solid var(--cbcs-red) !important;
}

[data-testid="app-express"] input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]) {
  box-sizing: border-box;
  width: 100%;
  min-height: 3.25rem;
  padding: 0.75rem 1rem;
  color: var(--cbcs-ink);
  background: var(--cbcs-surface);
  border: 1px solid var(--cbcs-line-strong);
  border-radius: 0;
  font-family: var(--cbcs-body);
  font-size: 1rem;
  line-height: 1.5;
}

[data-testid="app-express"] input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):hover {
  border-color: var(--cbcs-gray);
}

[data-testid="app-express"] input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):focus {
  border-color: var(--cbcs-red);
  outline: 3px solid rgb(207 10 10 / 16%);
  outline-offset: 0;
}

[data-testid="app-express"] input[type="checkbox"],
[data-testid="app-express"] input[type="radio"] {
  border-radius: 0;
}

[data-testid="app-express"] button {
  box-sizing: border-box;
  min-height: 3rem;
  padding: 0.625rem 1rem;
  color: #ffffff;
  background: var(--cbcs-red);
  border: 1px solid var(--cbcs-red);
  border-radius: 0;
  font-family: var(--cbcs-display);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer;
}

[data-testid="app-express"] button:hover {
  color: #ffffff;
  background: var(--cbcs-red-deep);
  border-color: var(--cbcs-red-deep);
}

[data-testid="app-express"] button:focus-visible,
[data-testid="app-express"] a:focus-visible,
[aria-label="Toggle password visibility"]:focus-visible {
  outline: 3px solid var(--cbcs-red);
  outline-offset: 3px;
}

[data-testid="app-express"] button:disabled {
  color: #ffffff;
  background: var(--cbcs-gray-soft);
  border-color: var(--cbcs-gray-soft);
  cursor: not-allowed;
}

[data-testid="app-express"] [class*="button_variant_outline"] {
  color: var(--cbcs-ink);
  background: var(--cbcs-surface);
  border-color: var(--cbcs-line-strong);
}

[data-testid="app-express"] [class*="button_variant_error"] {
  color: var(--cbcs-red-deep);
  background: var(--cbcs-surface);
  border-color: #e7b9b9;
}

[data-testid="app-express"] [class*="message_severity_error"] {
  padding: 0.75rem 1rem;
  color: #780707;
  background: var(--cbcs-red-tint);
  border: 1px solid #efbcbc;
}

[data-testid="app-express"] [class*="message_severity_success"] {
  color: var(--cbcs-success);
}

[data-testid$="-auth-card"] [class*="message_"]:has(a[href*="/self-service/registration/"]) {
  display: none;
}

pre[class*="codebox"] {
  display: block;
  width: 100%;
  overflow: visible;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

[aria-label="Toggle password visibility"] {
  min-width: 2.75rem;
  min-height: 2.75rem;
  margin-right: 0.25rem !important;
  justify-content: center;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
