/* ============================================================================
   studio-auth-supplement.css — the auth-surface rules that belong to Studio,
   layered on top of the shared shell
   (_content/Vahary.Branding/vahary-auth-shell.css, Vahary.Branding.Assets 0.6.0).

   THE ONE RULE FOR THIS FILE: it may only ADD elements the shared shell does not
   have. It must never restate, override, or "improve" a shell rule.

   That rule is the whole point. Studio used to vendor its own copy of the shell,
   and the copy drifted badly — 342 of its 388 lines differed from the package's,
   with only 91 lines common to both — because the tokens had been renamed to a
   --vh-* prefix and the class vocabulary with them. Nothing caught it: a
   stylesheet that no longer matches
   its own markup still compiles and still passes every test. It only looks wrong.
   Anything in here that duplicates the shell is the beginning of that same
   divergence, so if a rule below ever needs to change because the SHELL changed,
   it is in the wrong file — push it upstream instead.

   Everything here is expressed in the shell's own --vh-* tokens and hangs off
   .vh-shell, so it inherits the tenant accent and the Night ground rather than
   carrying a second opinion about either. Studio-owned classes take a `studio-`
   prefix so this file can never collide with a class a future shell release
   decides to claim.

   Deliberately NOT carried over from the vendored sheet, because the shell now
   owns them and restating would re-open the divergence:
     .brand img / .brand .tname  -> .vh-brand img / .vh-brand-textmark (white-label
                                    brand slots are a shell concern, and the shell
                                    styles both shapes)
     a.quiet                     -> .vh-quiet
     the four @font-face blocks  -> wwwroot/vahary.css already self-hosts the same
                                    four woff2 subsets under the same family names
   Dropped as dead rather than moved: .frow, input.otp, .validation-errors,
   .validation-message and input.invalid (Studio's auth pages use a plain <form>
   with hand-rolled validation — there is no EditForm on either surface), and
   .tall (see MonumentShell.Tall: the v2 root grows instead of clipping).
   ============================================================================ */

/* ---------------- host layout ---------------- */

/* AuthLayout's host element, <main class="auth-shell">.
   This is the one rule in the old vendored sheet that had nothing to do with the shell's own look,
   and it is the one most easily lost: v1's root was `position:fixed; inset:0`, so it escaped its host
   entirely and the host only ever had to supply a ground colour. The v2 root is `position:relative`,
   so the host's box IS the shell's box — every constraint on this element is now a constraint on the
   login. Keeping it explicitly `display:block` with no padding is what keeps the shell full-bleed;
   the ground colour still matters because the body underneath is Bootstrap's white and shows through
   on overscroll.

   The ground is a literal, not var(--vh-void): the shell defines its tokens on .vh-shell itself,
   which is this element's CHILD, so they are not in scope here. It matches --vh-void by value. */
.auth-shell {
  display: block;
  background: #0D1013;
  min-height: 100vh;
  padding: 0;
  margin: 0;
}

/* Belt-and-braces for the org disclosure below, which hides its field group with the `hidden`
   attribute rather than a class. The UA sheet's [hidden] rule is display:none with NO !important, so
   any component library that gives .vh-fgroup a display would silently reveal a field the page
   believes is collapsed. The shell has no opinion on [hidden]. */
.vh-shell [hidden] { display: none !important; }

/* ---------------- the org-scope disclosure ---------------- */

/* Studio's sign-in needs an organization ID (a GUID) to scope the token request — a functional
   requirement, not a first-class field, and asking for a GUID as the first thing on the page reads as
   a developer console rather than a sign-in. So it is demoted to a collapsed "Organization"
   disclosure in the mono label voice, and SignIn re-opens it whenever the org id is missing or
   invalid on submit, so the requirement is never hidden from a user who trips it.
   No other product in the estate has this affordance, which is why it is here and not in the shell. */
.vh-shell .studio-disclose {
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: var(--vh-font-mono);
  font-size: .64rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--vh-steel);
  transition: color var(--vh-touch-dur);
}
.vh-shell .studio-disclose:hover,
.vh-shell .studio-disclose:focus-visible { color: var(--vh-paper); }
.vh-shell .studio-chev {
  display: inline-block;
  color: var(--vh-accent-bright);
  transition: transform 180ms var(--vh-rise-ease);
}
.vh-shell .studio-disclose[aria-expanded="true"] .studio-chev { transform: rotate(90deg); }

/* ---------------- element gaps the shell does not cover ---------------- */

/* .vh-quiet is written for an <a> — it sets colour, size and the underline hairline, but nothing
   that a <button> needs to stop looking like a button. Studio uses both shapes: "Sign out" and
   "Continue to the console" are ACTIONS, not links (they never navigate the document), while
   Invite's "Already a member? Sign in" is a real link. This adds only the button reset; every
   visual property still comes from the shell's .vh-quiet. */
.vh-shell button.vh-quiet {
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: var(--vh-font-body);
  text-align: left;
}
.vh-shell button.vh-quiet:disabled { opacity: .5; cursor: default; }

/* Field hint (the org-id explainer, the invite password note) in the label voice, unshouted. */
.vh-shell .studio-fhint {
  display: block;
  margin-top: .4rem;
  font-size: .74rem;
  color: var(--vh-steel);
  line-height: 1.45;
}
/* The shell anchors .vh-reveal to the field group's bottom; when a hint extends the group, lift it
   back level with the input so SHOW never sits on the hint line. */
.vh-shell .vh-fgroup:has(.studio-fhint) .vh-reveal { bottom: calc(4px + 1.5rem); }

/* ---------------- Studio's own states ---------------- */

/* Quiet status line — "Connected · org …" on sign-in, "Membership active" on invite. The mono
   annotation register, no card. The shell's only state band is .vh-error (fault); it has no
   success/status equivalent, and if another product grows one this is the rule to move upstream. */
.vh-shell .studio-notice {
  margin: 2.2rem 0 0;
  font-family: var(--vh-font-mono);
  font-size: .66rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--vh-steel);
  animation: vh-rise var(--vh-rise-dur) var(--vh-rise-ease) 260ms both;
}
.vh-shell .studio-notice.is-ok { color: var(--vahary-violet-tint, #D8C9F7); }

/* Invite's designed failure states: an incomplete link, or a console with no backend behind it.
   Never a stack trace, and never a lie that the accept worked. Hairline rules in the neutral
   register — this is a dead end, not a fault the user caused. */
.vh-shell .studio-blocked {
  margin-top: 2.2rem;
  padding: 1rem 0;
  border-top: 1px solid var(--vh-hairline);
  border-bottom: 1px solid var(--vh-hairline);
  color: var(--vh-steel);
  font-size: .9rem;
  line-height: 1.6;
  animation: vh-rise var(--vh-rise-dur) var(--vh-rise-ease) 260ms both;
}
.vh-shell .studio-blocked-tag {
  display: block;
  font-family: var(--vh-font-mono);
  font-size: .64rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--vh-attention);
  margin-bottom: .35rem;
}

/* ---------------- composition modifiers ---------------- */

/* An action row that is not inside a form (the recovery affordance, the post-accept "Go to sign in").
   The shell's .vh-form carries the top margin and the rise for a form's actions; a standalone row has
   no form to inherit either from. */
.vh-shell .vh-actions.studio-standalone {
  margin-top: 2.2rem;
  animation: vh-rise var(--vh-rise-dur) var(--vh-rise-ease) 260ms both;
}

/* The sentence of body copy under the product noun (invite's explanation of what accepting does). */
.vh-shell .studio-sub {
  margin: 0;
  max-width: 24rem;
  color: var(--vh-steel);
  font-size: .9rem;
  line-height: 1.6;
  animation: vh-rise var(--vh-rise-dur) var(--vh-rise-ease) 200ms both;
}

/* Invite asks for three fields plus a hint on two of them. At the shell's default 1.9rem rhythm that
   is taller than a 13" laptop viewport, so the form tightens — the rhythm is the only thing that
   changes, and only on this one form. */
.vh-shell .studio-form-compact .vh-fgroup { margin-bottom: 1.15rem; }

@media (prefers-reduced-motion: reduce) {
  .vh-shell .studio-notice,
  .vh-shell .studio-blocked,
  .vh-shell .studio-sub,
  .vh-shell .vh-actions.studio-standalone {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .vh-shell .studio-chev { transition: none; }
}
