/* exui page compositions — system: _404, unauthorized, client_maintenance (DESIGN §7.10). Loaded on every page after exui.css; scope rules to the area (body.exui …). */

/* (The shell glue that lived here during phase 1 — page-head gap, "More"
   button, current language pill, phone alert dismiss — moved to exui.css
   §05/§06/§15 at integration.) */

/* A centred 560px window card on the atmosphere; the shell's page head is
   hidden on these pages (the card carries h1#page-title). Markup: .ex-sys >
   .ex-window.ex-sys__card > .ex-window__frame > (.ex-blade, .ex-window__bar, .ex-window__body). */
body.exui .ex-sys {
  display: grid; place-items: center;
  min-height: clamp(26rem, calc(100vh - var(--ex-header-h) - 320px), 40rem);
  padding: 56px 0 24px;
}
body.exui .ex-sys__card { width: 100%; max-width: 560px; }
body.exui .ex-sys .ex-window__body { padding: 32px 32px 30px; }
/* The bar's right slot (its third child): a neutral glyph, the lock on
   access denied; 404 and maintenance leave it out. The check-shield stays
   on the sign-in card, where "secure" is the point. */
body.exui .ex-sys__mark { justify-self: end; display: inline-flex; min-width: 14px; color: var(--ex-muted); }
body.exui .ex-sys__title {
  margin: 16px 0 0; font-size: 36px; line-height: 1.05; font-weight: 900; letter-spacing: -.04em;
  color: #fff; text-wrap: balance;
}
body.exui .ex-sys .ex-lede { margin-top: 12px; }
/* 404: a pending flash ($message, message.pdt alerts) under the lede */
body.exui .ex-sys__msg { margin-top: 20px; }
body.exui .ex-sys__msg > .alert.ex-alert { margin: 0; }
body.exui .ex-sys__msg > * + * { margin-top: 10px; }
/* unauthorized: a controller's own reason, when it adds something (prose, not mono) */
body.exui .ex-sys__why { margin-top: 12px; }
body.exui .ex-sys__reason { margin-top: 14px; font-size: 15px; line-height: 1.6; color: var(--ex-fg-72); }
body.exui .ex-sys__reason > * + * { margin-top: 10px; }
body.exui .ex-sys__steps { margin-top: 22px; padding-top: 12px; border-top: 1px solid var(--ex-line); }
body.exui .ex-sys__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 28px; }
/* The second action is a navigation link ("Open a ticket →", "Contact
   support ↗"): a little more air after the pill than between two pills. */
body.exui .ex-sys__actions > .ex-btn + .ex-go { margin-left: 14px; }
[dir="rtl"] body.exui .ex-sys__actions > .ex-btn + .ex-go { margin: 0 14px 0 0; }
/* maintenance: "This page refreshes every 30 seconds." (a mono status note, DESIGN §7.10) */
body.exui .ex-sys__note { margin-top: 18px; font: 400 12px/1.5 var(--ex-mono); color: var(--ex-fg-58); }

/* 404 prints a signed-in and a signed-out action row (the view cannot tell
   which shell wraps it); the shell's body class picks one. Signed out, the
   guest header's Order owns the red, so the page offers Sign in as secondary. */
body.exui.exui-guest .ex-sys__actions--client,
body.exui:not(.exui-guest) .ex-sys__actions--guest { display: none; }

@media screen and (max-width: 767.98px) {
  body.exui .ex-sys { min-height: 0; padding-top: 28px; }
  body.exui .ex-sys .ex-window__body { padding: 24px 20px; }
  body.exui .ex-sys__title { font-size: 30px; }
  /* One full-width action per row, in DOM order (primary or secondary, then
     the link), whatever the label lengths or the language. The link is a
     centred 44px row under the button (DESIGN §9 tap targets). */
  body.exui .ex-sys__actions { flex-direction: column; align-items: stretch; }
  body.exui .ex-sys__actions > .ex-btn + .ex-go,
  [dir="rtl"] body.exui .ex-sys__actions > .ex-btn + .ex-go { justify-content: center; min-height: 44px; margin: 0; }
  /* the large size (exui.css .ex-btn--lg: 50px, 28px, 15px), as the sign-in
     cards' submit and DESIGN §9 "primary grows to 50 px" */
  body.exui .ex-sys__actions .ex-btn { width: 100%; height: 50px; padding: 0 28px; font-size: 15px; }
  body.exui .ex-sys__actions .ex-btn--arrow { padding-right: 24px; }
}
