/* ==========================================================================
   ELYREA — Phase 2 identity integration
   --------------------------------------------------------------------------
   Colour: every value here resolves through the Phase 1 tokens declared in
   theme.css (:root --ely-*). This file declares no colour literal, so the
   approved palette (Blue Zodiac / Medium Carmine / Nuclear Gold / Matte
   Graphite) plus the documented neutral scale stays the only colour set.
   Motion: transform/opacity only, disabled under prefers-reduced-motion.
   ========================================================================== */

/* ---------- 1. Homepage identity band ---------- */
.elyrea-band {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px 26px;
  margin: 56px auto 0;
  padding: 22px 26px;
  background: var(--space-2);
  border: 1px solid var(--line);
  border-left: 2px solid var(--ely-nuclear-gold);
  border-radius: 6px;
}
.elyrea-band-crest {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
}
.elyrea-band-crest img {
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 16px;
}
.elyrea-band-copy { min-width: 0; }
.elyrea-band-copy .eyebrow { margin: 0 0 8px; }
.elyrea-band-line {
  margin: 0;
  max-width: 64ch;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.62;
}
.elyrea-band-line strong { color: var(--ink); font-weight: 700; }
.elyrea-band-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  font-family: var(--ely-font-mono, ui-monospace, monospace);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ely-nuclear-gold);
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  transition: transform var(--dur-2, 0.28s) var(--ease-out, ease), border-color var(--dur-2, 0.28s) var(--ease-out, ease);
}
.elyrea-band-link:hover { border-color: var(--ely-nuclear-gold); transform: translateY(-1px); }
.elyrea-band-link:focus-visible { outline: 2px solid var(--ely-nuclear-gold); outline-offset: 3px; }

/* ---------- 2. ORDIVYR commander identity (approved character artwork) ---------- */
.elyrea-commander {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  align-items: center;
  gap: 36px;
  margin: 56px 0;
  padding: 28px;
  background: var(--space-1);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-card, none);
}
.elyrea-commander-figure { margin: 0; }
.elyrea-commander-figure picture { display: block; }
.elyrea-commander-figure img {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  border: 1px solid var(--rule-strong);
  border-radius: 10px;
  background: var(--space-0);
}
.elyrea-commander-figure figcaption {
  margin-top: 10px;
  font-family: var(--ely-font-mono, ui-monospace, monospace);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}
.elyrea-commander-body { min-width: 0; }
.elyrea-commander-body h2 { margin: 10px 0 14px; }
.elyrea-commander-body p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.62;
}
.elyrea-commander-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.elyrea-commander-facts li {
  padding: 6px 10px;
  font-family: var(--ely-font-mono, ui-monospace, monospace);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
}

/* ---------- 3. Crest tag (restrained identity chip, no character art) ---------- */
.elyrea-crest-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  padding: 5px 14px 5px 5px;
  background: var(--space-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--ely-font-mono, ui-monospace, monospace);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}
.elyrea-crest-tag img {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 7px;
}
.elyrea-crest-tag .elyrea-crest-tag-note {
  color: var(--faint);
  letter-spacing: 0.08em;
  text-transform: none;
}

/* ---------- 4. Account onboarding / first-run identity ---------- */
.elyrea-auth-crest {
  display: block;
  width: 56px;
  height: 56px;
  margin: 0 0 14px;
  border-radius: 14px;
}
.elyrea-welcome {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 16px 18px;
  margin: 0 0 24px;
  padding: 22px 24px;
  background: var(--space-2);
  border: 1px solid var(--line);
  border-top: 2px solid var(--ely-nuclear-gold);
  border-radius: 8px;
}
.elyrea-welcome img {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 12px;
}
.elyrea-welcome h2 {
  margin: 8px 0 8px;
  font-size: 1.15rem;
  line-height: 1.25;
}
.elyrea-welcome p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}
.elyrea-welcome code {
  font-family: var(--ely-font-mono, ui-monospace, monospace);
  font-size: 0.85em;
  color: var(--ely-nuclear-gold);
}

/* Empty state for account panels whose body is filled by application logic.
   The markup and account.js already emit <p class="acct-muted"> as the
   no-records state, so the treatment is expressed here and needs no JS change. */
.acct-panel > .acct-muted,
.acct-panel [id$="-body"] > .acct-muted {
  margin: 0;
  padding: 20px 18px;
  text-align: center;
  color: var(--faint);
  font-size: 0.9rem;
  line-height: 1.55;
  background: var(--space-0);
  border: 1px dashed var(--line);
  border-radius: 8px;
}

/* ---------- 5. ORDIVYR dashboard identity header ---------- */
.elyrea-dash-id {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 6px 0 26px;
}
.elyrea-dash-id img {
  display: block;
  width: 88px;
  height: 88px;
  border: 1px solid var(--rule-strong);
  border-radius: 50%;
  background: var(--space-0);
}
.elyrea-dash-id p { margin: 0; color: var(--muted); font-size: 0.85rem; }
.elyrea-dash-id .eyebrow { margin: 0 0 4px; }

/* ---------- 6. Responsive collapse ---------- */
@media (max-width: 860px) {
  .elyrea-band {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "crest copy" "link link";
    margin-top: 40px;
  }
  .elyrea-band-crest { grid-area: crest; }
  .elyrea-band-copy { grid-area: copy; }
  .elyrea-band-link { grid-area: link; justify-self: start; }
  .elyrea-commander {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding: 22px;
    margin: 40px 0;
  }
  .elyrea-commander-figure { justify-self: center; text-align: center; }
  .elyrea-commander-figure img { max-width: 248px; }
}
@media (max-width: 560px) {
  .elyrea-band { padding: 18px 16px; gap: 14px; }
  .elyrea-band-crest, .elyrea-band-crest img { width: 52px; height: 52px; border-radius: 13px; }
  .elyrea-welcome { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .elyrea-welcome img { width: 40px; height: 40px; }
  .elyrea-dash-id img { width: 72px; height: 72px; }
}

/* ---------- 7. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .elyrea-band-link { transition: none; }
  .elyrea-band-link:hover { transform: none; }
}
