/* Shared ZEUS brand. Workspace themes supply an optional surface and motif. */
.rebirth {
  color-scheme: light dark;
  --zeus-brand-action: light-dark(#c2410c, #ff984e);
  --zeus-brand-on-action: light-dark(#fff, #211915);
  --zeus-brand-link: light-dark(#9a3412, #ffb47d);
  --zeus-brand-tint: light-dark(#f8e8dc, #452d21);
  --zeus-brand-bg: light-dark(#faf8f5, #1c1917);
  --zeus-brand-surface: light-dark(#ffffff, #262220);
  --zeus-brand-raised: light-dark(#efece6, #34302c);
  --zeus-brand-line: light-dark(#d7d1c9, #5d5149);
  --zeus-brand-text: light-dark(#1c1917, #faf8f5);
  --zeus-brand-muted: light-dark(#57534e, #d6cbc3);
  --z-bg: var(--zeus-brand-bg);
  --z-surface: var(--zeus-brand-surface);
  --z-raised: var(--zeus-brand-raised);
  --z-line: var(--zeus-brand-line);
  --z-text: var(--zeus-brand-text);
  --z-muted: var(--zeus-brand-muted);
  --z-accent: var(--zeus-brand-action);
  --z-accent-ink: var(--zeus-brand-on-action);
  --z-tint: var(--zeus-brand-tint);
  --z-focus: var(--zeus-brand-link);
  --z-good: light-dark(#14694c, #8ce2bf);
  --z-warn: light-dark(#825000, #ffce86);
  --z-danger: light-dark(#a32635, #ffacb5);
  --z-radius: .75rem;
  --z-radius-small: .45rem;
  --z-shadow: light-dark(0 12px 34px #1e35521a, 0 12px 34px #0006);
  --z-font: "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
  --z-small: .875rem;
  --z-leading: 1.6;
  --z-space: clamp(1rem, 3vw, 2.5rem);
  --z-fast: 150ms;
  --z-enter: 220ms;
  --z-ease-out: cubic-bezier(.2,.75,.25,1);
  background: var(--z-bg);
  color: var(--z-text);
  font-family: var(--z-font);
}

html[data-theme=light] .rebirth.zeus-controller { color-scheme: light; }
html[data-theme=dark] .rebirth.zeus-controller { color-scheme: dark; }
.rebirth .zeus-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--z-text);
  font: 760 1rem/1.25 var(--z-font);
  letter-spacing: .1em;
  text-decoration: none;
}
.rebirth .zeus-brand-lockup img {
  display: block;
  flex: none;
  border-radius: .4rem;
}
.rebirth :where(a,button,input,summary,textarea,select,[tabindex]):focus-visible {
  outline: 2px solid var(--z-focus);
  outline-offset: 3px;
}
.rebirth [hidden]:not([hidden="until-found"]) { display: none !important; }
.rebirth :where(input:not([type=checkbox],[type=radio],[type=color],[type=range]),textarea,select) {
  font: inherit;
}
.rebirth .z-skip {
  position: fixed;
  z-index: 140;
  inset: .75rem auto auto .75rem;
  color: var(--z-accent-ink);
  background: var(--z-accent);
  padding: .7rem 1rem;
  border-radius: var(--z-radius-small);
  transform: translateY(calc(-100% - 1rem));
}
.rebirth .z-skip:focus { transform: translateY(0); }
.rebirth .z-button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 2.75rem;
  border: 1px solid var(--z-line);
  border-radius: var(--z-radius-small);
  padding: .55rem .9rem;
  color: var(--z-text);
  background: var(--z-surface);
  font: 650 var(--z-small)/1.3 var(--z-font);
  text-decoration: none;
  cursor: pointer;
}
.rebirth .z-button:disabled { cursor: not-allowed; color: var(--z-muted); }
.rebirth .z-button:hover:not(:disabled) { background: var(--z-raised); }
.rebirth .z-button-primary, .rebirth .z-button-primary:hover:not(:disabled) {
  background: var(--z-accent);
  border-color: var(--z-accent);
  color: var(--z-accent-ink);
}
.rebirth .z-button-primary:hover:not(:disabled) { filter: brightness(.94); }
.rebirth .z-key {
  white-space: nowrap;
  padding: .15rem .35rem;
  background: var(--z-raised);
  color: var(--z-muted);
  border: 1px solid var(--z-line);
  border-radius: .3rem;
  font: 600 .75rem/1.2 var(--z-font);
}
.rebirth .z-dialog {
  box-sizing: border-box;
  width: min(34rem, calc(100% - 2rem));
  max-height: min(80dvh, 38rem);
  padding: 0;
  border: 1px solid var(--z-line);
  border-radius: var(--z-radius);
  background: var(--z-surface);
  box-shadow: var(--z-shadow);
  color: var(--z-text);
}
.rebirth .z-dialog::backdrop { background: #101827b8; }
.rebirth :is(.z-button, .z-dialog) { transition: background-color var(--z-fast); }
.rebirth .z-pending {
  display: inline-block;
  margin-inline-start: .35em;
  padding: .1em .5em;
  border: 1px solid var(--z-line);
  border-radius: .4em;
  color: var(--z-muted);
  background: var(--z-raised);
  font-size: .8em;
  font-weight: 600;
}
@keyframes z-control-enter {
  from { opacity: .66; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: no-preference) {
  .rebirth .z-dialog[open] { animation: z-control-enter var(--z-enter) var(--z-ease-out); }
}
@media (prefers-reduced-motion: reduce) {
  .rebirth :is(.z-button, .z-dialog) { transition: none; }
}
