/* Sign in and join — the first screens anyone sees, and the only two served
   without the app's stylesheet. Same two themes and the same mechanism as
   style.css: see the note at the top of that file for why the roles are
   written once plainly and again inside @supports.

   The Google button is the one thing here that is not ours to restyle. It keeps
   its own surface and its own border in both themes, because a sign-in button
   that has been "improved" is one people hesitate over — and Google's own terms
   are specific about it. */
:root {
  color-scheme: light dark;

  /* The app's own palette — see style.css. Kept in step by hand because this
     file has to stand alone: cool blue-biased paper, deep navy dark, blue for
     what can be pressed. */
  --paper: #ffffff;
  --surface: #edf0f6;
  --rule: #d2dae8;
  --ink: #0c1428;
  --muted: #4e5b77;
  --cobalt: #2e5fe8;
  --cobalt-deep: #2149c4;
  --warn-bg: #fbedd6;
  --warn-ink: #7a4200;
  /* A field is a hole in the sheet, so it is the page colour rather than the
     sheet colour — on a dark theme a white input is a torch. */
  --field: #ffffff;
  --on-cobalt: #ffffff;
  --cobalt-tint: rgba(46, 95, 232, .18);
  /* The wordmark face, matching the rail in the app. */
  --wordmark: "Archivo Black", "Archivo Narrow", Impact, "Haettenschweiler",
    "Arial Narrow Bold", sans-serif;
  font-size: 16px;
}

@supports (color: light-dark(#000, #fff)) {
  :root {
    --paper:   light-dark(#ffffff, #101828);
    --surface: light-dark(#edf0f6, #080d1a);
    --rule:    light-dark(#d2dae8, #253052);
    --ink:     light-dark(#0c1428, #e9edf7);
    --muted:   light-dark(#4e5b77, #98a5c0);
    --cobalt:  light-dark(#2e5fe8, #6e9bff);
    --cobalt-deep: light-dark(#2149c4, #8ab4ff);
    --warn-bg: light-dark(#fbedd6, rgba(255, 176, 32, .13));
    --warn-ink: light-dark(#7a4200, #ffd98a);
    --field:       light-dark(#ffffff, #0b101d);
    --on-cobalt:   light-dark(#ffffff, #06101f);
    --cobalt-tint: light-dark(rgba(46, 95, 232, .18), rgba(110, 155, 255, .26));
  }

  :root[data-theme="light"] { color-scheme: light; }
  :root[data-theme="dark"]  { color-scheme: dark; }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: var(--surface);
  color: var(--ink);
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.55;
}
[hidden] { display: none !important; }

/* Not a card. The first screen anyone sees was a centered, bordered,
   drop-shadowed panel — the exact object the redesign spent itself removing —
   so the front door spoke the old dialect while everything inside it was
   right. The call sheet's opening grammar instead: open with the heavy rule,
   close with the light one, and let the page ground carry the sheet. Not
   var(--paper): in the light theme paper is white on the #edf0f6 ground, and
   a borderless white band reads as a rendering fault, not a decision. The
   fields keep their own --field faces, so the form reads on both grounds. */
.sheet {
  width: 100%;
  max-width: 23rem;
  background: none;
  border: 0;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  padding: 1.75rem 0 2rem;
}

/* The mark, matching the rail in the app itself: two rewind triangles and the
   initials, both leaning back into the direction the triangles point. */
.mark {
  --lean: skewX(-12deg);
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1.75rem;
  line-height: 1;
  color: var(--cobalt);
}
.mark-glyph {
  width: 29px;
  height: 25px;
  flex: 0 0 auto;
  fill: currentColor;
  transform: var(--lean);
}
.mark-yir {
  display: inline-block;
  padding: 0 3px;
  font-family: var(--wordmark);
  font-weight: 900;
  font-size: 1.55rem;
  letter-spacing: -.035em;
  color: var(--cobalt);
  transform: var(--lean);
}
.mark-team {
  padding-left: .5rem;
  border-left: 1.5px solid var(--rule);
  color: var(--muted);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}

h1 { margin: 0; font-size: 1.4rem; font-weight: 600; letter-spacing: -.01em; }
.sub { margin: .35rem 0 1.5rem; color: var(--muted); }

.google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background .14s ease, border-color .14s ease;
}
.google:hover { background: var(--surface); border-color: var(--muted); }
.google:active { background: var(--surface); filter: brightness(.97); }

.local { margin-top: 1.5rem; border-top: 1px solid var(--rule); padding-top: 1.25rem; }
.local-head {
  margin-bottom: .85rem;
  border-radius: 3px;
  background: var(--warn-bg);
  color: var(--warn-ink);
  padding: .5rem .65rem;
  font-size: .82rem;
}
label { display: block; margin-bottom: .3rem; font-weight: 600; font-size: .82rem; }
/* The joining page picks a name from a list, so a select is styled to match the
   email field beside it rather than left as whatever the browser does. */
input, select {
  width: 100%;
  min-height: 44px;
  margin-bottom: .75rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: .6rem .7rem;
  font: inherit;
  font-size: 16px; /* stops iOS zooming the page on focus */
  color: var(--ink);
  background: var(--field);
}
input:focus,
select:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 3px var(--cobalt-tint); }

/* Sits under a field to explain it, so it is quieter than the label above. */
.hint {
  margin: -.45rem 0 .9rem;
  color: var(--muted, #6b7280);
  font-size: .78rem;
  line-height: 1.45;
}

.primary {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 3px;
  background: var(--cobalt);
  color: var(--on-cobalt);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.primary:hover { background: var(--cobalt-deep); }

.notice {
  margin-bottom: 1.1rem;
  border-left: 3px solid var(--cobalt);
  border-radius: 3px;
  /* The sheet's ground IS --surface now, so a --surface fill would dissolve
     and leave the accent border floating. Paper keeps the block a block —
     the same one-step-off relationship it had when it sat on the card. */
  background: var(--paper);
  padding: .7rem .8rem;
  font-size: .88rem;
}
.notice b { display: block; margin-bottom: .1rem; }

.foot { margin: 1.5rem 0 0; color: var(--muted); font-size: .82rem; text-align: center; }

/* ---- the ident — see style.css for the reasoning. Duplicated because this
   stylesheet stands alone. */
.ident { display: none; }
html.ident-run .ident {
  display: grid;
  place-items: center;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: #0A1226;
  pointer-events: none;
  animation: ident-wipe 340ms cubic-bezier(.65, 0, .35, 1) 640ms forwards;
}
html.ident-run .ident svg {
  width: min(34vw, 190px);
  height: auto;
  fill: #6E9BFF;
  animation: ident-sweep 720ms cubic-bezier(.55, 0, .3, 1) forwards;
}
@keyframes ident-sweep {
  0%   { transform: translateX(58vw) skewX(-12deg); opacity: 0; }
  14%  { opacity: 1; }
  100% { transform: translateX(-14vw) skewX(-12deg); opacity: 1; }
}
@keyframes ident-wipe {
  to { transform: translateX(-100%); }
}
@media (prefers-reduced-motion: reduce) {
  html.ident-run .ident { display: none; }
}
