/* ==========================================================================
   GTAC-MGI Application Portal — shared stylesheet

   Brand values are taken from https://gtac.wustl.edu. The public site was
   sampled directly (computed styles, not guesswork); the design language it
   uses and this file follows is:

     - Source Sans Pro throughout, headings 600–700, set LARGE
     - navy #20325f dominant, teal #7cc3b9 as solid accent blocks,
       crimson #cc3366 as the tertiary action accent
     - fully-rounded pill buttons, uppercase, letter-spaced
     - generous vertical rhythm, full-bleed colour bands

   If the public site is ever restyled, update the tokens in :root below and
   every page follows.
   ========================================================================== */

:root {
  /* Brand ---------------------------------------------------------------- */
  --navy:          #20325f;   /* primary — bands, headings, primary buttons   */
  --navy-deep:     #182648;   /* hover / pressed state for navy surfaces      */
  --navy-dark:     #1c244b;   /* deepest navy, for gradient ends              */
  --slate:         #3a4260;   /* secondary text on light backgrounds          */
  --teal:          #7cc3b9;   /* accent — solid panels, rules, active markers */
  --teal-deep:     #4d9d92;   /* accent text that needs contrast on white     */
  --teal-dark:     #2f6f66;   /* accent text on teal tints                    */
  --blue-mid:      #345480;   /* supporting blue                              */
  --blue-support:  #324a6d;   /* supporting blue, gradients                   */
  --crimson:       #cc3366;   /* tertiary accent — eyebrows, arrows, dots     */
  --crimson-deep:  #a8264f;   /* crimson that needs contrast on white         */
  --amber:         #d9a066;   /* status accent — "in development" marker      */
  --amber-deep:    #c17f3a;   /* amber that needs contrast on white           */
  --amber-dark:    #8a5a1e;   /* amber text on amber tints                    */

  /* Tints ---------------------------------------------------------------- */
  --tint-blue:     #f7f9ff;
  --tint-blue-2:   #dde4ff;
  --tint-teal:     #eaf7f3;
  --tint-amber:    #fbf1e4;
  --line:          #e3e7f1;
  --line-strong:   #bfc7d6;

  /* Neutrals ------------------------------------------------------------- */
  --ink:           #1b2233;
  --ink-muted:     #5c6784;
  --ink-faint:     #8a93aa;
  --surface:       #ffffff;
  --canvas:        #f4f6fb;

  /* Type ----------------------------------------------------------------- */
  --font: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI',
          Roboto, Helvetica, Arial, sans-serif;

  /* Fluid scale. The public site runs a 52px H1; --display tops out in the
     same territory without overflowing a phone. */
  --display:  clamp(2.25rem, 5.5vw, 3.5rem);   /* 36 → 56px */
  --title:    clamp(1.75rem, 3.2vw, 2.25rem);  /* 28 → 36px */
  --subtitle: clamp(1.0625rem, 1.6vw, 1.25rem);

  /* Elevation ------------------------------------------------------------ */
  --shadow-sm: 0 1px 2px rgba(32, 50, 95, .06),
               0 1px 3px rgba(32, 50, 95, .08);
  --shadow-md: 0 2px 4px rgba(32, 50, 95, .06),
               0 8px 24px rgba(32, 50, 95, .10);
  --shadow-lg: 0 4px 8px rgba(32, 50, 95, .07),
               0 20px 48px rgba(32, 50, 95, .14);
  --shadow-xl: 0 8px 16px rgba(32, 50, 95, .08),
               0 32px 72px rgba(32, 50, 95, .18);

  --radius:      10px;
  --radius-lg:   16px;
  --radius-pill: 100px;

  /* Motion --------------------------------------------------------------- */
  --ease-out:  cubic-bezier(.22, .61, .36, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);
}

/* Base --------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue-mid); }

h1, h2, h3 {
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -.02em;
  margin: 0;
}

/* Focus is never removed — only restyled, so keyboard users keep a clear ring. */
:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Eyebrow — small uppercase label above a heading, borrowed from the public
   site's section intros. */
.eyebrow {
  margin: 0 0 .75rem;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--crimson);
}

.eyebrow--on-dark { color: var(--teal); }

/* Scroll reveal -----------------------------------------------------------
   The hidden state is gated behind html.js (set by an inline script in every
   <head>) so that with JavaScript disabled nothing is ever stuck invisible.
   motion.js adds .is-in as elements enter the viewport.
   ------------------------------------------------------------------------- */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 70ms);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* Preview banner ----------------------------------------------------------
   Shown only while PREVIEW_MODE is on in auth.js. Deliberately loud: this
   state must never ship unnoticed.
   ------------------------------------------------------------------------- */

.preview-banner {
  position: relative;
  z-index: 60;
  background: repeating-linear-gradient(
    -45deg, #8a5a00 0 14px, #7a4f00 14px 28px);
  color: #fff;
  text-align: center;
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .5rem 1rem;
}

.preview-banner strong { font-weight: 700; }

/* auth.js inserts the banner as body's first child. On the login page body is
   a two-column grid, so without this the banner would be placed into a single
   grid cell instead of spanning the top. */
.login > .preview-banner { grid-column: 1 / -1; }

/* Site header -------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s var(--ease-soft), background-color .25s var(--ease-soft);
}

/* motion.js toggles this once the page has scrolled past the header. */
.site-header--scrolled {
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--shadow-md);
}

.site-header::after {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg,
    var(--navy) 0%, var(--blue-mid) 45%, var(--teal) 78%, var(--crimson) 100%);
}

.site-header__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: .875rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: .875rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.site-header__logo {
  height: 44px;
  width: auto;
  display: block;
  transition: transform .3s var(--ease-out);
}

.site-header__brand:hover .site-header__logo { transform: scale(1.03); }

/* Divider + wordmark, mirroring the public site's lockup. */
.site-header__title {
  position: relative;
  padding-left: .875rem;
  font-size: .9375rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--navy);
  white-space: nowrap;
}

.site-header__title::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 1px; height: 1.6em;
  background: var(--line-strong);
}

.site-header__spacer { flex: 1 1 auto; }

.site-header__user {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.site-header__email {
  font-size: .9375rem;
  color: var(--ink-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 24ch;
}

/* Buttons ------------------------------------------------------------------
   Pills, uppercase, letter-spaced — the public site's button language
   (border-radius 100px, 16px/45px padding, weight 600, uppercase).
   ------------------------------------------------------------------------- */

.btn {
  position: relative;
  overflow: hidden;
  font: inherit;
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .8125rem 1.875rem;
  transition: background-color .2s var(--ease-soft), border-color .2s var(--ease-soft),
              color .2s var(--ease-soft), box-shadow .25s var(--ease-soft),
              transform .18s var(--ease-out);
}

.btn > * { position: relative; z-index: 1; }

.btn:active { transform: translateY(1px) scale(.99); }

/* A light sweep that grows from the centre on hover. Sits behind the label. */
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: currentColor;
  opacity: 0;
  transform: scaleX(.2);
  transform-origin: center;
  transition: opacity .3s var(--ease-soft), transform .4s var(--ease-out);
}

.btn:hover::before { opacity: .1; transform: scaleX(1); }

.btn--primary {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 4px 14px rgba(32, 50, 95, .22);
}
.btn--primary:hover {
  background: var(--navy-deep);
  box-shadow: 0 8px 24px rgba(32, 50, 95, .3);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: var(--ink-muted);
  border-color: var(--line-strong);
}
.btn--ghost:hover {
  color: var(--navy);
  border-color: var(--navy);
  transform: translateY(-2px);
}

/* For use on navy — inverted pill, as on the public site's teal cards. */
.btn--on-dark {
  background: #fff;
  color: var(--navy);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}
.btn--on-dark:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .26);
}

.btn--lg {
  padding: 1rem 2.5rem;
  font-size: .9375rem;
}

.btn--block { width: 100%; }

/* Layout ------------------------------------------------------------------- */

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 5rem;
}

.section-head { margin-bottom: 2.25rem; }

.section-head__title {
  font-size: var(--title);
  font-weight: 700;
}

.section-head__subtitle {
  margin: .5rem 0 0;
  color: var(--ink-muted);
  font-size: var(--subtitle);
  max-width: 56ch;
}

/* Hero band ---------------------------------------------------------------
   A full-bleed navy band, echoing the public site's hero. The layered radial
   gradients drift slowly; the dot grid gives the flat colour some texture.
   ------------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: #fff;
  isolation: isolate;
}

.hero::before {
  content: '';
  position: absolute;
  inset: -25%;
  z-index: -2;
  background:
    radial-gradient(42% 55% at 18% 22%, rgba(124, 195, 185, .38) 0%, transparent 60%),
    radial-gradient(38% 48% at 82% 30%, rgba(52, 84, 128, .75) 0%, transparent 62%),
    radial-gradient(45% 60% at 62% 88%, rgba(204, 51, 102, .22) 0%, transparent 58%),
    linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 55%, var(--blue-support) 100%);
  animation: hero-drift 26s var(--ease-soft) infinite alternate;
}

/* Fine dot grid over the gradient. */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, .1) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.9), transparent 85%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.9), transparent 85%);
}

@keyframes hero-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-4%, 2%, 0) scale(1.08); }
}

.hero__inner {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 4rem;
}

.hero__title {
  font-size: var(--display);
  font-weight: 600;
  line-height: 1.08;
  color: #fff;
  max-width: 22ch;
}

/* Teal rule under the hero heading — the public site's section marker. */
.hero__rule {
  width: 4.5rem;
  height: 4px;
  border: 0;
  border-radius: 2px;
  background: var(--teal);
  margin: 1.5rem 0;
  transform-origin: left center;
}

@keyframes rule-in {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

.hero__lede {
  margin: 0;
  font-size: var(--subtitle);
  line-height: 1.6;
  color: rgba(255, 255, 255, .84);
  max-width: 58ch;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}

.hero__stat {
  display: flex;
  flex-direction: column;
  gap: .125rem;
}

.hero__stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.hero__stat-label {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .6);
}

/* On-load entrance for the hero copy. Not scroll-driven — it is above the
   fold, so it plays immediately. */
.js .hero__inner > * { animation: hero-in .8s var(--ease-out) both; }
.js .hero__inner > *:nth-child(1) { animation-delay: .05s; }
.js .hero__inner > *:nth-child(2) { animation-delay: .12s; }
.js .hero__inner > *:nth-child(3) { animation-delay: .19s; }
.js .hero__inner > *:nth-child(4) { animation-delay: .26s; }
.js .hero__inner > *:nth-child(5) { animation-delay: .33s; }

/* The rule wipes out sideways rather than fading up like its siblings. Needs
   to outrank the blanket `.js .hero__inner > *` rule above, hence the extra
   class in the selector. */
.js .hero__inner > .hero__rule {
  animation: rule-in .7s var(--ease-out) .3s both;
}

@keyframes hero-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* Login -------------------------------------------------------------------
   Two-panel split: navy brand panel on the left, sign-in card on the right.
   Collapses to a single column on narrow screens.
   ------------------------------------------------------------------------- */

.login {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
}

/* Left — navy brand panel, same treatment as the hero band. */
.login__aside {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 4.5rem;
  background: var(--navy);
  color: #fff;
  isolation: isolate;
}

.login__aside::before {
  content: '';
  position: absolute;
  inset: -25%;
  z-index: -2;
  background:
    radial-gradient(40% 50% at 20% 20%, rgba(124, 195, 185, .42) 0%, transparent 62%),
    radial-gradient(42% 52% at 85% 72%, rgba(204, 51, 102, .26) 0%, transparent 60%),
    linear-gradient(150deg, var(--navy-dark) 0%, var(--navy) 52%, var(--blue-support) 100%);
  animation: hero-drift 30s var(--ease-soft) infinite alternate;
}

.login__aside::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px);
  background-size: 24px 24px;
}

.login__aside-inner { position: relative; max-width: 32rem; }

/* The logo PNG is RGB with no alpha — its background is opaque white, so it
   cannot sit directly on navy and cannot be recoloured with a filter (that
   just produces a white block). It gets a white plate instead, which also
   matches the white logo lockup on the public site's header. */
.login__logo-plate {
  display: inline-block;
  margin: 0 0 2.5rem;
  padding: .875rem 1.125rem;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .22);
}

.login__logo-mark {
  display: block;
  width: 100%;
  max-width: 15rem;
  height: auto;
}

.login__headline {
  font-size: var(--display);
  font-weight: 600;
  line-height: 1.1;
  color: #fff;
  margin: 0;
}

.login__aside-lede {
  margin: 1.5rem 0 0;
  font-size: var(--subtitle);
  line-height: 1.6;
  color: rgba(255, 255, 255, .82);
  max-width: 44ch;
}

.login__aside-list {
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: .875rem;
}

.login__aside-list li {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  font-size: 1rem;
  color: rgba(255, 255, 255, .8);
}

/* Teal tick before each capability line. */
.login__aside-list li::before {
  content: '';
  flex: 0 0 auto;
  width: .5rem; height: .5rem;
  margin-top: .5rem;
  border-radius: 50%;
  background: var(--teal);
}

.js .login__aside-inner > * { animation: hero-in .85s var(--ease-out) both; }
.js .login__aside-inner > *:nth-child(1) { animation-delay: .05s; }
.js .login__aside-inner > *:nth-child(2) { animation-delay: .14s; }
.js .login__aside-inner > *:nth-child(3) { animation-delay: .23s; }
.js .login__aside-inner > *:nth-child(4) { animation-delay: .32s; }

/* Right — the sign-in panel. */
.login__main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  background:
    radial-gradient(900px 420px at 70% -10%, var(--tint-teal) 0%, transparent 62%),
    linear-gradient(180deg, var(--tint-blue) 0%, var(--canvas) 100%);
}

.login__card {
  width: 100%;
  max-width: 26rem;
  text-align: left;
}

.js .login__card { animation: card-in .9s var(--ease-out) .2s both; }

@keyframes card-in {
  from { opacity: 0; transform: translateY(20px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

.login__title {
  font-size: var(--title);
  font-weight: 700;
  margin-bottom: .5rem;
}

.login__lede {
  color: var(--ink-muted);
  margin: 0 0 2rem;
  font-size: 1rem;
}

.login__rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2rem 0 1rem;
}

.login__note {
  font-size: .875rem;
  color: var(--ink-faint);
  margin: 0;
  line-height: 1.6;
}

.login__status {
  margin: 1rem 0 0;
  font-size: .9375rem;
  min-height: 1.4em;
  color: var(--ink-muted);
}

.login__status--error { color: var(--crimson-deep); font-weight: 600; }

/* Small print pinned under the sign-in panel. */
.login__footer {
  text-align: center;
  padding: 1.5rem;
  font-size: .8125rem;
  color: var(--ink-faint);
}

/* Application grid --------------------------------------------------------- */

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.app-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.625rem 1.5rem;
  text-decoration: none;
  color: inherit;
  height: 100%;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out),
              border-color .3s var(--ease-soft);
}

/* Only live cards lift on hover — a disabled card must not look clickable. */
.app-card--live:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--teal);
}

.app-card--live:hover .app-card__name { color: var(--blue-mid); }

.app-card--live:hover .app-card__icon {
  transform: scale(1.06) rotate(-3deg);
  box-shadow: 0 10px 22px rgba(32, 50, 95, .28);
}

.app-card--soon {
  background: var(--tint-blue);
  border-style: dashed;
  border-color: var(--line-strong);
  box-shadow: none;
  cursor: default;
}

/* Deliberately NOT dimmed to near-invisibility: most of the catalogue is
   still "coming soon", and a wall of 50%-opacity cards reads as a broken
   page. These stay legible and simply lack the live card's emphasis. */
.app-card--soon .app-card__name { color: var(--slate); }
.app-card--soon .app-card__desc { color: var(--ink-muted); }

.app-card__icon {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius);
  background: var(--tint-blue-2);
  color: var(--blue-support);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out);
}

.app-card--live .app-card__icon {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue-mid) 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(32, 50, 95, .2);
}

.app-card__icon svg { width: 1.625rem; height: 1.625rem; }

.app-card__name {
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--navy);
  letter-spacing: -.01em;
  transition: color .25s var(--ease-soft);
}

.app-card__desc {
  margin: 0;
  font-size: .9375rem;
  line-height: 1.6;
  color: var(--ink-muted);
  flex: 1 1 auto;
}

/* Footer row: status pill on the left, affordance arrow on the right. */
.app-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-top: .25rem;
}

.app-card__badge {
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .25rem .625rem;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: .375rem;
}

.app-card__badge--live {
  background: var(--tint-teal);
  color: var(--teal-dark);
  border: 1px solid #b8e0d8;
}

/* Pulsing dot — the only always-on animation, reserved for "live": the
   thing is fully built, not just reachable. */
.app-card__badge--live::before {
  content: '';
  width: .4375rem; height: .4375rem;
  border-radius: 50%;
  background: var(--teal-deep);
  animation: dot-pulse 2.4s var(--ease-soft) infinite;
}

@keyframes dot-pulse {
  0%, 100% { opacity: 1;  transform: scale(1); }
  50%      { opacity: .45; transform: scale(.8); }
}

.app-card__badge--dev {
  background: var(--tint-amber);
  color: var(--amber-dark);
  border: 1px solid #ecd3ac;
}

/* Static dot (no pulse) — present and clickable, but deliberately calmer
   than "live"'s animation since the feature itself isn't finished yet. */
.app-card__badge--dev::before {
  content: '';
  width: .4375rem; height: .4375rem;
  border-radius: 50%;
  background: var(--amber-deep);
}

.app-card__badge--soon {
  background: #eef1f7;
  color: var(--ink-faint);
  border: 1px solid var(--line);
}

/* Built and live, but not for this signed-in user -- distinct from "soon"
   (doesn't exist yet) so it doesn't read as a bug. No dot at all: this
   isn't a progress state, it's a closed door. */
.app-card__badge--restricted {
  background: #fbe9ee;
  color: var(--crimson-deep);
  border: 1px solid #f0c4d1;
}

.app-card__go {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem; height: 1.75rem;
  border-radius: 50%;
  color: var(--crimson);
  flex: 0 0 auto;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity .3s var(--ease-soft), transform .35s var(--ease-out);
}

.app-card__go svg { width: 1.125rem; height: 1.125rem; }

.app-card--live:hover .app-card__go,
.app-card--live:focus-visible .app-card__go {
  opacity: 1;
  transform: none;
}

/* Error page --------------------------------------------------------------- */

.error {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(900px 440px at 50% -10%, var(--tint-teal) 0%, transparent 62%),
    linear-gradient(180deg, var(--tint-blue) 0%, var(--canvas) 100%);
}

.error__main {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
}

.error__card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 34rem;
  width: 100%;
  padding: 3rem 2.5rem;
  text-align: center;
  overflow: hidden;
  position: relative;
}

.error__card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--navy), var(--teal), var(--crimson));
}

.js .error__card { animation: card-in .8s var(--ease-out) both; }

.error__logo {
  width: 100%;
  max-width: 14rem;
  height: auto;
  margin: 0 auto 2rem;
  display: block;
}

.error__code {
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--crimson);
  margin: 0 0 .75rem;
}

.error__title { font-size: var(--title); font-weight: 700; margin-bottom: .75rem; }

.error__body {
  color: var(--ink-muted);
  margin: 0 auto 2rem;
  max-width: 40ch;
  line-height: 1.6;
}

/* Responsive --------------------------------------------------------------- */

@media (max-width: 960px) {
  /* The navy panel stops being a column and becomes a band above the form. */
  .login { grid-template-columns: 1fr; }
  .login__aside { padding: 3rem 2rem; }
  .login__aside-list { display: none; }
  .login__main { padding: 2.5rem 1.5rem 1rem; }
  .login__card { max-width: 28rem; }
}

@media (max-width: 640px) {
  .login__logo-plate { padding: .625rem .875rem; margin-bottom: 1.5rem; }
  .login__logo-mark { max-width: 12rem; }

  .site-header__inner { padding: .75rem 1rem; }
  .site-header__title { display: none; }
  .site-header__email { max-width: 14ch; font-size: .875rem; }
  .site-header__logo { height: 34px; }
  .site-header__user { gap: .625rem; }

  .btn { padding: .75rem 1.25rem; font-size: .8125rem; }
  .btn--lg { padding: .9375rem 1.75rem; font-size: .875rem; }

  .hero__inner { padding: 3rem 1rem 2.75rem; }
  .hero__meta { gap: 1.25rem; }
  .hero__stat-value { font-size: 1.5rem; }

  .page { padding: 2.5rem 1rem 3.5rem; }
  .app-grid { grid-template-columns: 1fr; gap: 1rem; }
  .app-card { padding: 1.5rem 1.25rem 1.25rem; }

  .login__aside { padding: 2.25rem 1.25rem; }
  .error__card { padding: 2.25rem 1.5rem; }
}

/* Reduced motion ----------------------------------------------------------
   Everything above degrades to a static page. Note the explicit opacity and
   transform resets: killing the animations alone would leave any element
   whose start state is opacity:0 permanently invisible.
   ------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .js .reveal,
  .js .hero__inner > *,
  .js .login__aside-inner > *,
  .js .login__card,
  .js .error__card {
    opacity: 1 !important;
    transform: none !important;
  }

  .hero__rule { transform: none !important; }
  .app-card--live:hover { transform: none; }
  .app-card--live:hover .app-card__icon { transform: none; }
  .app-card__go { opacity: 1; transform: none; }
}
