/* ═════════════════════════════════════════════════════════════════════════════════════════════════
   The Sentra sign-in theme — Phase 38 W8-KC, DISC-37;
   docs/DECISIONS/ADR-049-identity-provider-pages-in-the-sentra-design.md.

   The design's sign-in surface — new_design/brand-system/mockups.jsx:25-158, ArtboardSentraLogin — drawn over
   keycloak.v2's own markup and PatternFly 5. Three rules hold every line below
   (apps/web/tests/identity-theme/theme.test.ts holds them):

   - Every colour is a brand token's value as apps/web/src/app/globals.css declares it, light and dark — the
     app's realisation of new_design/brand-system/tokens.jsx. An eight-digit hex is a token at an alpha, as the
     mockup writes its quiet gradients and its focus halo.
   - Logical properties only (ADR-048 D6): the brand panel opens the reading line in either direction.
   - Every face is the theme's own (../fonts, infra/keycloak/themes/FONTS.md): no third-party origin.

   Editorial chrome stays sharp (brand rule 4): no radius anywhere in the frame — the mockup draws none.
   ═════════════════════════════════════════════════════════════════════════════════════════════════ */

/* ── The faces ─────────────────────────────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/Geist-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/Geist-Medium.woff2') format('woff2');
}

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/Geist-SemiBold.woff2') format('woff2');
}

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/Geist-Bold.woff2') format('woff2');
}

@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/GeistMono-Medium.woff2') format('woff2');
}

/* IBM Plex Sans Arabic, declared Arabic-only exactly as the web declares it (apps/web/src/app/layout.tsx,
   ADR-048 D15): no Latin character can be drawn by it, and an English page never fetches it. */
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/IBMPlexSansArabic-Regular.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/IBMPlexSansArabic-Medium.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/IBMPlexSansArabic-SemiBold.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/IBMPlexSansArabic-Bold.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

/* ── The tokens ────────────────────────────────────────────────────────────────────────────────── */

:root {
  /* The stacks the app's TYPE carries (apps/web/src/lib/tokens.ts): Plex between each Geist face and the
     system's, so Arabic is drawn by Plex and never by a local face that happens to carry it. */
  --sx-font-ui: 'Geist', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --sx-font-mono: 'Geist Mono', 'IBM Plex Sans Arabic', ui-monospace, Menlo, monospace;
  --sx-motion: 120ms cubic-bezier(0.4, 0, 0.2, 1);

  /* The form panel: globals.css' :root (light). */
  --sx-ink: #15110d;
  --sx-ink-3: #4a403a;
  --sx-ink-4: #6b6055;
  --sx-ink-5: #978c7e;
  --sx-ink-6: #c4baa9;
  --sx-rule: #e6dfd2;
  --sx-paper-3: #f0ebdf;
  --sx-paper-2: #f6f2e9;
  --sx-paper-1: #fbf8f1;
  --sx-ochre-500: #d97757;
  --sx-ochre-600: #b85638;
  --sx-ochre-700: #7a331f;
  --sx-critical: #b3261e;
  --sx-critical-bg: #fdecea;
  --sx-medium: #d9a912;
  --sx-medium-bg: #fbf1d2;
  --sx-low: #2e7d4e;
  --sx-low-bg: #e6f2eb;
  --sx-info: #4f6b8a;
  --sx-info-bg: #e8eef5;

  /* What sits on Sienna is ink in either scheme (globals.css' --accent-foreground). */
  --sx-on-sienna: #15110d;
  /* The focus ring is Sienna 600, not the mockup's 500: 500 measures 2.62:1 against the field and 600
     3.99:1 (paper-3) / 4.25:1 (paper-2) — WCAG 1.4.11 asks 3:1. The halo is the mockup's, 1a over Sienna. */
  --sx-focus: var(--sx-ochre-600);
  --sx-halo: #d977571a;
  --sx-shadow-lg: 0 8px 24px #15110d1a, 0 2px 6px #15110d0f;

  /* The brand panel: constant in either scheme — ink ground, paper text, the on-dark Sienna (mockups.jsx:35-62). */
  --sx-brand-ground: #15110d;
  --sx-brand-text: #fbf8f1;
  --sx-brand-accent: #e69a7b;
  --sx-brand-muted: #c4baa9;

  /* PatternFly's globals, bridged to the tokens, for every element a v2 page draws that the rules below do
     not name. Unlayered and later than PatternFly's own :root, so they win without !important. */
  --pf-v5-global--FontFamily--text: var(--sx-font-ui);
  --pf-v5-global--FontFamily--text--vf: var(--sx-font-ui);
  --pf-v5-global--FontFamily--heading: var(--sx-font-ui);
  --pf-v5-global--FontFamily--heading--vf: var(--sx-font-ui);
  --pf-v5-global--FontFamily--monospace: var(--sx-font-mono);
  --pf-v5-global--FontFamily--monospace--vf: var(--sx-font-mono);
  --pf-v5-global--Color--100: var(--sx-ink);
  --pf-v5-global--Color--200: var(--sx-ink-4);
  --pf-v5-global--BackgroundColor--100: var(--sx-paper-1);
  --pf-v5-global--BackgroundColor--200: var(--sx-paper-2);
  --pf-v5-global--BorderColor--100: var(--sx-rule);
  --pf-v5-global--BorderColor--200: var(--sx-ink-5);
  --pf-v5-global--BorderColor--300: var(--sx-rule);
  --pf-v5-global--primary-color--100: var(--sx-ochre-500);
  --pf-v5-global--primary-color--200: var(--sx-ochre-600);
  --pf-v5-global--link--Color: var(--sx-ochre-700);
  --pf-v5-global--link--Color--hover: var(--sx-ochre-700);
  --pf-v5-global--danger-color--100: var(--sx-critical);
  --pf-v5-global--danger-color--200: var(--sx-critical);
  --pf-v5-global--success-color--100: var(--sx-low);
  --pf-v5-global--success-color--200: var(--sx-low);
  --pf-v5-global--warning-color--100: var(--sx-medium);
  --pf-v5-global--warning-color--200: var(--sx-medium);
  --pf-v5-global--info-color--100: var(--sx-info);
  --pf-v5-global--info-color--200: var(--sx-info);
  --pf-v5-global--disabled-color--100: var(--sx-ink-5);
  --pf-v5-global--disabled-color--200: var(--sx-ink-6);
  --pf-v5-global--disabled-color--300: var(--sx-paper-3);
  --pf-v5-global--BorderRadius--sm: 0;
  --pf-v5-global--BorderRadius--lg: 0;
  --pf-v5-global--BoxShadow--lg: none;
}

/* The app's dark tokens (globals.css' .dark), under the reader's own scheme — only while the realm's
   dark-mode switch is on (template.ftl sets sx-auto then). The brand panel's tokens do not move. */
@media (prefers-color-scheme: dark) {
  :root.sx-auto {
    --sx-ink: #f4efe6;
    --sx-ink-3: #bcb1a1;
    --sx-ink-4: #988d7e;
    --sx-ink-5: #6e6358;
    --sx-ink-6: #473f37;
    --sx-rule: #2c2720;
    --sx-paper-3: #100d0a;
    --sx-paper-2: #0e0c09;
    --sx-paper-1: #161310;
    --sx-ochre-600: #c96a4a;
    --sx-ochre-700: #e69a7b;
    --sx-critical: #ec6b57;
    --sx-critical-bg: #2e1512;
    --sx-medium: #e3c03e;
    --sx-medium-bg: #2c2510;
    --sx-low: #5dba7c;
    --sx-low-bg: #11271a;
    --sx-info: #7fa6d6;
    --sx-info-bg: #16202e;
    --sx-shadow-lg: 0 8px 24px #0e0c0957, 0 2px 6px #0e0c0933;
  }
}

/* ── The page ──────────────────────────────────────────────────────────────────────────────────── */

.sx *,
.sx *::before,
.sx *::after {
  box-sizing: border-box;
}

html.sx {
  background-color: var(--sx-paper-2);
}

.sx-body {
  margin: 0;
  min-block-size: 100vh;
  min-block-size: 100dvh;
  background-color: var(--sx-paper-2);
  color: var(--sx-ink);
  font-family: var(--sx-font-ui);
  font-size: 14px;
  line-height: 1.5;
  font-feature-settings: 'ss01', 'ss02', 'tnum';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Arabic, as the app draws it (globals.css, ADR-048 D15): tracking breaks cursive joining, so it is zero
   everywhere; the base line height opens by a tenth. */
html:lang(ar) * {
  letter-spacing: 0 !important;
}

html:lang(ar) .sx-body {
  line-height: 1.6;
}

/* ── The frame: one column, then the mockup's two (1.1fr 1fr) from 960 px ─────────────────────────── */

.sx-frame {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  min-block-size: 100vh;
  min-block-size: 100dvh;
}

@media (min-width: 960px) {
  .sx-frame {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
  }
}

/* ── The brand panel (mockups.jsx:35-72) — a header band below 960 px ─────────────────────────────── */

.sx-brand {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 18px 16px;
  background-color: var(--sx-brand-ground);
  color: var(--sx-brand-text);
}

/* The one quiet accent: two low-chroma Sienna radials, off the wordmark (mockups.jsx:41-47). Mirrored under
   rtl, so the glow keeps to the corner across from the wordmark in either direction. */
.sx-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 80% 100%, #d9775733, transparent 70%),
    radial-gradient(ellipse 70% 40% at 10% 0%, #b8563820, transparent 70%);
}

[dir='rtl'] .sx-brand::before {
  transform: scaleX(-1);
}

.sx-brand__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-block-size: 21px;
}

.sx-wordmark {
  display: block;
  flex: none;
  max-inline-size: 100%;
  block-size: auto;
}

.sx-brand .sx-brand__by,
.sx-brand .sx-brand__eyebrow {
  color: var(--sx-brand-accent);
}

.sx-brand__hero {
  display: none;
}

.sx-brand__headline {
  margin-block: 18px 0;
  margin-inline: 0;
  max-inline-size: 520px;
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--sx-brand-text);
}

.sx-brand__tagline {
  margin-block: 18px 0;
  margin-inline: 0;
  max-inline-size: 480px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--sx-brand-muted);
}

html:lang(ar) .sx-brand__headline {
  line-height: 1.3;
}

@media (min-width: 960px) {
  .sx-brand {
    padding: 56px;
  }

  .sx-brand__hero {
    display: block;
    margin-block: auto;
  }
}

/* ── The form panel (mockups.jsx:75-155) ───────────────────────────────────────────────────────────── */

.sx-main {
  display: flex;
  flex-direction: column;
  min-inline-size: 0;
  padding: 16px 16px 40px;
  background-color: var(--sx-paper-2);
  color: var(--sx-ink);
}

@media (min-width: 960px) {
  .sx-main {
    padding: 32px 56px 56px;
  }
}

/* The language switch (the realm's i18n, RUNBOOK §27) — mono links at the panel's top, at the inline end. */
.sx-locales {
  align-self: flex-end;
}

.sx-locales__list {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sx-locales__list > li + li::before {
  content: '·';
  content: '·' / '';
  margin-inline: 8px;
  color: var(--sx-ink-5);
}

.sx-locales__link {
  display: inline-block;
  padding-block: 4px;
  font-family: var(--sx-font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--sx-ink-4);
  text-decoration: none;
}

.sx-locales__link:hover {
  color: var(--sx-ink);
}

.sx-locales__link[aria-current='true'] {
  color: var(--sx-ink);
  text-decoration: underline;
  text-decoration-color: var(--sx-ochre-500);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.sx-panel {
  inline-size: 100%;
  max-inline-size: 380px;
  margin-block: 0 auto;
  margin-inline: auto;
  padding-block: 28px 8px;
}

@media (min-width: 960px) {
  .sx-panel {
    margin-block: auto;
    padding-block: 40px;
  }
}

.sx-panel__head {
  margin-block-end: 28px;
}

/* The mono eyebrow (design-system.jsx' Eyebrow; the app's .eyebrow). */
.sx-eyebrow {
  margin: 0;
  font-family: var(--sx-font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--sx-ink-4);
}

.sx-title {
  margin-block: 12px 0;
  margin-inline: 0;
  font-family: var(--sx-font-ui);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.15;
  color: var(--sx-ink);
}

html:lang(ar) .sx-title {
  line-height: 1.35;
}

.sx-lede {
  margin-block: 8px 0;
  margin-inline: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--sx-ink-3);
}

/* ── v2's forms, in the mockup's fields ────────────────────────────────────────────────────────────── */

.sx .pf-v5-c-form {
  --pf-v5-c-form--GridGap: 16px;
}

/* Field labels: the mockup's mono eyebrows. Keycloak's own words (usernameOrEmail, password). */
.sx .pf-v5-c-form__group-label {
  padding-block-end: 8px !important;
}

.sx .pf-v5-c-form__label,
.sx .pf-v5-c-form__label-text {
  font-family: var(--sx-font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--sx-ink-4);
}

.sx .pf-v5-c-form__label-required {
  margin-inline-start: 4px;
  color: var(--sx-critical);
}

/* A field: paper-3, a rule border, sharp (mockups.jsx:89-94). PatternFly draws its edges with two pseudo
   elements; they go, and the field draws its own. */
.sx .pf-v5-c-form-control {
  --pf-v5-c-form-control--BackgroundColor: var(--sx-paper-3);
  --pf-v5-c-form-control--Color: var(--sx-ink);
  border: 1px solid var(--sx-rule);
  border-radius: 0;
  background-color: var(--sx-paper-3);
  color: var(--sx-ink);
}

.sx .pf-v5-c-form-control::before,
.sx .pf-v5-c-form-control::after {
  content: none;
}

.sx .pf-v5-c-form-control > :is(input, select, textarea) {
  padding: 12px 14px;
  font-family: var(--sx-font-ui);
  font-size: 14px;
  line-height: 20px;
  color: var(--sx-ink);
}

/* The field's frame carries the focus (below), so the control's own outline would be a second ring. */
.sx .pf-v5-c-form-control > :is(input, select, textarea):focus {
  outline: none;
}

.sx .pf-v5-c-form-control:focus-within {
  border-color: var(--sx-focus);
  box-shadow: 0 0 0 3px var(--sx-halo);
}

.sx .pf-v5-c-form-control.pf-m-error {
  border-color: var(--sx-critical);
}

.sx .pf-v5-c-form-control.pf-m-error > :is(input, select, textarea) {
  padding-inline-end: 40px;
}

.sx .pf-v5-c-form-control.pf-m-readonly {
  background-color: var(--sx-paper-3);
  color: var(--sx-ink-3);
}

.sx .pf-v5-c-form-control__utilities,
.sx .pf-v5-c-form-control__icon {
  color: var(--sx-critical);
}

/* The password field and the attempted username are input groups: one box, the field and its control
   inside it, the control at the inline end (mockups.jsx:97-110). */
.sx .pf-v5-c-input-group {
  border: 1px solid var(--sx-rule);
  border-radius: 0;
  background-color: var(--sx-paper-3);
}

.sx .pf-v5-c-input-group:focus-within {
  border-color: var(--sx-focus);
  box-shadow: 0 0 0 3px var(--sx-halo);
}

.sx .pf-v5-c-input-group:has(.pf-m-error) {
  border-color: var(--sx-critical);
}

.sx .pf-v5-c-input-group .pf-v5-c-form-control,
.sx .pf-v5-c-input-group .pf-v5-c-form-control:focus-within {
  border: 0;
  background-color: transparent;
  box-shadow: none;
}

.sx .pf-v5-c-input-group__item {
  margin-inline-start: 0;
  border: 0;
  background-color: transparent;
}

/* The control buttons inside a group: v2's password toggle and its restart-sign-in button. */
.sx .pf-v5-c-button.pf-m-control {
  padding-block: 0;
  padding-inline: 14px;
  background-color: transparent;
  color: var(--sx-ochre-700);
}

/* The password toggle stays v2's control — its aria-label, its aria-controls, its script. The stylesheet
   draws the mockup's mono "Show" / "Hide" in place of the eye: the words are the theme's messages, handed
   over on <html> (template.ftl), and the script's own class swap picks between them. */
.sx .pf-v5-c-button[data-password-toggle] {
  font-family: var(--sx-font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sx [data-password-toggle] > i {
  font-family: inherit;
  font-style: normal;
  font-weight: inherit;
  line-height: 1;
}

.sx [data-password-toggle] > i::before {
  content: var(--sx-reveal-show);
}

.sx [data-password-toggle] > i.fa-eye-slash::before {
  content: var(--sx-reveal-hide);
}

/* v2's restart tooltip, which v2 positions in physical terms; here it opens above, at the inline end. */
.sx .kc-login-tooltip {
  position: relative;
}

.sx .kc-login-tooltip .kc-tooltip-text {
  position: absolute;
  inset-block-end: calc(100% + 6px);
  inset-inline-end: 0;
  z-index: 1;
  padding: 6px 8px;
  background-color: var(--sx-ink);
  color: var(--sx-paper-1);
  font-family: var(--sx-font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: none;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--sx-motion);
}

.sx .kc-login-tooltip:is(:hover, :focus-visible) .kc-tooltip-text {
  opacity: 1;
  visibility: visible;
}

/* Helper text, and a field's refusal in Critical. */
.sx .pf-v5-c-form__helper-text {
  margin-block-start: 6px;
}

.sx .pf-v5-c-helper-text__item-text {
  font-size: 13px;
  line-height: 1.45;
  color: var(--sx-ink-4);
}

.sx .pf-v5-c-helper-text__item.pf-m-error .pf-v5-c-helper-text__item-text,
.sx .pf-v5-c-helper-text__item-text.pf-m-error {
  color: var(--sx-critical);
}

.sx .pf-v5-c-check__input {
  accent-color: var(--sx-ochre-500);
}

.sx .pf-v5-c-check__label {
  font-size: 14px;
  color: var(--sx-ink-3);
}

.sx .pf-v5-c-form__actions {
  margin: 0;
  gap: 12px;
}

.sx .pf-v5-c-form__actions > * {
  margin: 0;
}

/* ── Actions ───────────────────────────────────────────────────────────────────────────────────── */

.sx .pf-v5-c-button {
  border-radius: 0;
  font-family: var(--sx-font-ui);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
}

/* PatternFly draws a button's edge on ::after and moves it on every state; the frame draws its own. */
.sx .pf-v5-c-button::after {
  border-color: transparent;
  border-radius: 0;
}

/* The CTA: full width, Sienna 500, ink on it, sharp (mockups.jsx:113-121). Its hover is the design's —
   a shadow, not a colour (HBtn's solid hover, components-forms.jsx) — so ink on Sienna stays 6.02:1. */
.sx .pf-v5-c-button.pf-m-primary {
  padding: 14px 16px;
  background-color: var(--sx-ochre-500);
  color: var(--sx-on-sienna);
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
  transition: box-shadow var(--sx-motion);
}

.sx .pf-v5-c-button.pf-m-primary:is(:hover, :focus, :active) {
  background-color: var(--sx-ochre-500);
  color: var(--sx-on-sienna);
}

.sx .pf-v5-c-button.pf-m-primary:hover {
  box-shadow: var(--sx-shadow-lg);
}

.sx .pf-v5-c-button.pf-m-primary:is(:disabled, .pf-m-disabled, [aria-disabled='true']) {
  background-color: var(--sx-ochre-500);
  color: var(--sx-on-sienna);
  box-shadow: none;
  opacity: 0.55;
}

/* Every other action: the mockup's secondary — transparent, ink, an ink-5 edge (mockups.jsx:132-141). */
.sx .pf-v5-c-button:not(.pf-m-primary, .pf-m-control, .pf-m-link, .pf-m-plain) {
  padding: 12px 16px;
  border: 1px solid var(--sx-ink-5);
  background-color: transparent;
  color: var(--sx-ink);
}

.sx .pf-v5-c-button:not(.pf-m-primary, .pf-m-control, .pf-m-link, .pf-m-plain):hover {
  border-color: var(--sx-ink);
}

.sx .pf-v5-c-button.pf-m-link {
  color: var(--sx-ochre-700);
}

/* ── Links and the pages' own sentences ───────────────────────────────────────────────────────────── */

.sx-main a:not(.pf-v5-c-button, .sx-locales__link) {
  color: var(--sx-ochre-700);
  text-decoration: underline;
  text-decoration-color: var(--sx-ochre-500);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.sx-main a:not(.pf-v5-c-button, .sx-locales__link):hover {
  text-decoration-thickness: 2px;
}

.sx .instruction,
.sx #kc-error-message p,
.sx #kc-info-message p {
  margin-block: 0 12px;
  margin-inline: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--sx-ink-3);
}

.sx-info {
  margin-block-start: 24px;
  padding-block-start: 16px;
  border-block-start: 1px solid var(--sx-rule);
  font-size: 14px;
  color: var(--sx-ink-3);
}

.sx .subtitle {
  font-size: 13px;
  color: var(--sx-ink-4);
}

.sx hr {
  margin-block: 8px 16px;
  border: 0;
  border-block-start: 1px solid var(--sx-rule);
}

/* v2's page-specific rules this frame replaces v2's stylesheet for — written logically. */
#kc-recovery-codes-list {
  columns: 2;
}

#certificate_subjectDN {
  overflow-wrap: break-word;
}

#kc-verify-email-form {
  margin-block: 24px;
}

#kc-code pre code {
  word-break: break-all;
}

#kc-social-providers svg {
  block-size: 18px;
}

/* ── Alerts: the design's inline callout (components-display.jsx:542-580), sharp, in the severity it
   carries — Critical for an error, Info for information ───────────────────────────────────────────── */

.sx .pf-v5-c-alert.sx-alert {
  --sx-tone: var(--sx-info);
  --sx-tone-bg: var(--sx-info-bg);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--sx-tone);
  border-radius: 0;
  background-color: var(--sx-tone-bg);
  box-shadow: none;
  color: var(--sx-ink);
}

.sx .pf-v5-c-alert.sx-alert--error {
  --sx-tone: var(--sx-critical);
  --sx-tone-bg: var(--sx-critical-bg);
}

.sx .pf-v5-c-alert.sx-alert--warning {
  --sx-tone: var(--sx-medium);
  --sx-tone-bg: var(--sx-medium-bg);
}

.sx .pf-v5-c-alert.sx-alert--success {
  --sx-tone: var(--sx-low);
  --sx-tone-bg: var(--sx-low-bg);
}

.sx .sx-alert .pf-v5-c-alert__icon {
  flex: none;
  margin: 0;
  font-family: var(--sx-font-mono);
  font-size: 15px;
  line-height: 20px;
  color: var(--sx-tone);
}

.sx .sx-alert .pf-v5-c-alert__icon::before {
  content: '◐';
  content: '◐' / '';
}

.sx .sx-alert--error .pf-v5-c-alert__icon::before {
  content: '■';
  content: '■' / '';
}

.sx .sx-alert--warning .pf-v5-c-alert__icon::before {
  content: '◆';
  content: '◆' / '';
}

.sx .sx-alert--success .pf-v5-c-alert__icon::before {
  content: '●';
  content: '●' / '';
}

.sx .sx-alert .pf-v5-c-alert__title {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--sx-ink);
}

/* ── Focus: a visible ring on everything a reader can reach, in Sienna 600 ─────────────────────────── */

.sx
  :is(
    a,
    button,
    select,
    summary,
    [tabindex],
    input[type='submit'],
    input[type='checkbox'],
    input[type='radio']
  ):focus-visible {
  outline: 2px solid var(--sx-focus);
  outline-offset: 2px;
}

.sx .pf-v5-c-input-group .pf-v5-c-button:focus-visible {
  outline-offset: -3px;
}

/* ── Arabic labels (last, so they win over every component rule they share a selector weight with) ── */

/* An Arabic label is not set in mono: Geist Mono has no Arabic, Plex is declared for Arabic code points only, so
   in the mono stack each space between Arabic words fell to Geist Mono's full-width space. Latin mono text inside an
   Arabic page — by VΞRNA, the English link — keeps its own lang and its mono. */
.sx
  :is(
    .sx-eyebrow,
    .pf-v5-c-form__label,
    .pf-v5-c-form__label-text,
    [data-password-toggle],
    .sx-locales__link
  ):lang(ar) {
  font-family: var(--sx-font-ui);
  font-size: 12px;
}

/* ── Reduced motion ────────────────────────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .sx *,
  .sx *::before,
  .sx *::after {
    transition: none !important;
    animation: none !important;
  }
}
