/* Sign-in wall. The lock that hides the prototype lives in the inline style
   the installer puts in each page, so this file only paints the wall itself. */
html:not(.sage-open) body { background: #000; }
#sage-page-gate {
  position: relative;
  min-height: 100vh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 72px;
  background-color: #000;
  /* The attached aurora: two soft green beams on the page edges, black
     between them. Painted in CSS so the glow follows any viewport width. */
  background-image:
    radial-gradient(ellipse 10% 42% at 0% 24%, rgba(0, 200, 70, 0.55) 0%, rgba(0, 150, 60, 0.28) 38%, rgba(0, 80, 40, 0) 72%),
    radial-gradient(ellipse 8% 26% at 2% 60%, rgba(0, 120, 90, 0.28) 0%, rgba(0, 90, 60, 0) 70%),
    radial-gradient(ellipse 9% 40% at 100% 22%, rgba(0, 140, 130, 0.35) 0%, rgba(0, 110, 90, 0.18) 45%, rgba(0, 60, 50, 0) 75%),
    radial-gradient(ellipse 12% 45% at 99% 78%, rgba(0, 200, 60, 0.5) 0%, rgba(0, 150, 50, 0.25) 40%, rgba(0, 80, 30, 0) 74%);
  background-repeat: no-repeat;
  color: #fff;
  color-scheme: dark;
  /* 16px, then em, so a page that sets a 10px root font does not shrink the wall.
     A root-relative unit would follow that root and collapse the form. */
  font-size: 16px;
  font-family: "Sage Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.5;
}
/* The two beams have hard-ish blurred edges in the attached art, so they are
   painted as narrow strips and blurred rather than as pure radial haze. */
#sage-page-gate::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 170, 60, 0.35) 12%, rgba(0, 210, 70, 0.5) 30%, rgba(0, 120, 80, 0.22) 52%, rgba(0, 0, 0, 0) 66%),
    linear-gradient(180deg, rgba(0, 0, 0, 0) 4%, rgba(0, 150, 130, 0.28) 24%, rgba(0, 190, 80, 0.4) 60%, rgba(0, 210, 60, 0.55) 82%, rgba(0, 0, 0, 0) 98%);
  background-repeat: no-repeat;
  background-size: 9% 100%, 8% 100%;
  background-position: 1% 0, 98% 0;
  filter: blur(2.4vw);
}
.sage-gate-card { position: relative; z-index: 1; }
#sage-page-gate[hidden] { display: none !important; }
.sage-gate-card {
  box-sizing: border-box;
  width: 100%;
  /* 496px = the old 416px form width plus the 40px panel padding each side. */
  max-width: 31em;
  margin-block: auto;
  padding: 40px;
  border: 1px solid #5c6b73;
  border-radius: 8px;
  /* Background colors/Gray S4 (docs/kit-variables.md). */
  background: #1b1b1b;
}
.sage-gate-logo {
  display: flex;
  justify-content: center;
  margin: 0 0 2.5em;
  line-height: 0;
}
.sage-gate-logo svg { display: block; width: 90px; height: 50px; }
.sage-gate-card h1 {
  margin: 0 0 40px;
  font-size: 1.5em;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.sage-gate-card p { margin: 0 0 1em; color: #d7dcde; }
#sage-page-gate label,
#sage-page-gate .sage-gate-field span { color: #fff; }
.sage-gate-field { display: flex; flex-direction: column; gap: 0.35em; margin: 0 0 0.75em; }
/* 16px between the email row and the Password / Forgot password row. */
.sage-gate-field--password { margin-top: 1em; }
/* The reset form's single field sits 24px above its button. */
.sage-gate-field--forgot { margin-bottom: 1.5em; }
#sage-page-gate form label.sage-gate-field--forgot { margin-bottom: 1.5em; }
.sage-gate-field span,
.sage-gate-password-header label { font-size: 0.875em; font-weight: 600; }
.sage-gate-field input {
  font: inherit;
  color: #fff;
  width: 100%;
  box-sizing: border-box;
  padding: 0.7em 0.8em;
  border: 1px solid #5c6b73;
  border-radius: 4px;
  background: #000;
}
.sage-gate-field input::placeholder { color: #d7dcde; }
.sage-gate-password-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.5em;
}
/* Prototype pages style every "form label" as width 100% and order 1.
   That swaps Forgot password to the left of Password. Reset it here. */
#sage-page-gate form label {
  order: 0;
  width: auto;
  margin-bottom: 0;
}
#sage-page-gate .sage-gate-field { width: 100%; }
#sage-page-gate .sage-gate-password-header label { flex: 0 0 auto; }
#sage-page-gate .sage-gate-forgot { margin-left: auto; }
.sage-gate-forgot,
.sage-gate-subtle {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: #d7dcde;
  font: inherit;
  font-size: 0.75em;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.sage-gate-subtle { display: block; font-size: 0.875em; text-align: left; margin-top: 0.35em; }
.sage-gate-form { margin: 0; }
.sage-gate-help { margin: 0.25em 0 0; font-size: 0.875em; color: #d7dcde; }
.sage-gate-help a { color: #fff; font-weight: 700; text-decoration: underline; }
/* The reset screen's two ways out are a centred pair, 40px apart. */
.sage-gate-forgot-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  margin: 1em 0 0;
  text-align: center;
}
.sage-gate-forgot-links .sage-gate-subtle { margin-top: 0; text-align: center; }
.sage-gate-forgot-links .sage-gate-help { margin: 0; }
/* The request-access line belongs to the page edge, not the card. */
.sage-gate-footer {
  position: absolute;
  z-index: 1;
  left: 16px;
  right: 16px;
  bottom: 24px;
  margin: 0;
  text-align: center;
}
.sage-gate-actions { display: flex; flex-direction: column; gap: 0.5em; margin: 0 0 0.75em; }
.sage-gate-actions--pair { flex-direction: row; }
.sage-gate-actions--pair > * { flex: 1 1 0; min-width: 0; width: auto; }
.sage-gate-primary,
.sage-gate-secondary {
  font: inherit;
  font-weight: 700;
  width: 100%;
  padding: 0.7em 1em;
  border-radius: 4px;
  cursor: pointer;
}
.sage-gate-primary { background: #00d639; color: #212322; border: 0; }
.sage-gate-primary:disabled,
.sage-gate-secondary:disabled { opacity: 0.6; cursor: default; }
/* The prototype bundle styles every button (pill, 96px min, hover fill).
   The wall keeps its own controls when that bundle is on the page. */
#sage-page-gate button {
  min-height: 0;
  overflow: visible;
  z-index: auto;
}
#sage-page-gate .sage-gate-primary { min-width: 0; }
#sage-page-gate .sage-gate-forgot,
#sage-page-gate .sage-gate-subtle {
  min-width: max-content;
  width: auto;
}
#sage-page-gate button:after { content: none; display: none; }
#sage-page-gate .sage-gate-primary:hover,
#sage-page-gate .sage-gate-primary:focus,
#sage-page-gate .sage-gate-primary:active {
  background: #00d639;
  color: #212322;
}
#sage-page-gate .sage-gate-forgot:hover,
#sage-page-gate .sage-gate-forgot:focus,
#sage-page-gate .sage-gate-subtle:hover,
#sage-page-gate .sage-gate-subtle:focus {
  background: transparent;
  color: #fff;
}
#sage-page-gate [hidden] { display: none !important; }
.sage-gate-secondary {
  display: block;
  box-sizing: border-box;
  background: transparent;
  color: #fff;
  border: 1px solid #5c6b73;
  text-align: center;
  text-decoration: none;
}
.sage-gate-card .sage-gate-note { margin: 0; }
.sage-gate-note { min-height: 20px; font-size: 0.9375em; color: #d7dcde; }
.sage-gate-note[data-kind="error"] { color: #fecaca; }

/* The viewing-passcode door under the sign-in form. Same card, second door.
   The actions' 12px + the note's reserved 20px + this 8px = 40px from the
   button row to the divider, which is the gap between the two groups. */
.sage-gate-passcode {
  margin: 8px 0 0;
  padding-top: 1em;
  border-top: 1px solid #5c6b73;
}
.sage-gate-passcode-label {
  display: block;
  margin: 0 0 0.35em;
  font-size: 0.875em;
  font-weight: 600;
}
.sage-gate-passcode-row { display: flex; gap: 0.5em; }
.sage-gate-passcode-row input {
  font: inherit;
  color: #fff;
  flex: 1 1 auto;
  min-width: 0;
  box-sizing: border-box;
  padding: 0.7em 0.8em;
  border: 1px solid #5c6b73;
  border-radius: 4px;
  background: #000;
}
.sage-gate-passcode-row input::placeholder { color: #d7dcde; }
.sage-gate-passcode-row .sage-gate-secondary { width: auto; flex: 0 0 auto; }
.sage-gate-passcode .sage-gate-note { margin: 0.35em 0 0; }
/* The prototype bundle gives every button a 96px floor. This one sizes to its
   word, like the input row wants it to. */
#sage-page-gate .sage-gate-passcode-row .sage-gate-secondary { min-width: 0; }
/* The second door is a primary action, so it wears the same Sage green. */
.sage-gate-view {
  background: #00d639;
  border: 0;
  color: #212322;
}
#sage-page-gate .sage-gate-view:hover,
#sage-page-gate .sage-gate-view:focus,
#sage-page-gate .sage-gate-view:active {
  background: #00d639;
  color: #212322;
}
