/* Daily Life Doc: the expert's Sign in (js/signin*.js). Round 13 (zone A) drew it as the page "Expert Plans" did (a white
   card on the sage ground); round 58b (zone S1) gives it the look of the page "Start with Daily", version 15
   (docs/artifact/start/index.html, the first screen: landing(), .land, .big-wm, .startlink, .rows, .go, .link): the
   parchment ground, the Daily wordmark in the middle, Email or phone and Password as tinted rows (label at the left,
   the field at the right), the slate Sign in pill, the quiet underlined links under it, and a small Start link at the
   top right. The same look holds for every view of the screen: Sign in, Enter the code, Set a password and the join
   by invite. Daily's look has one light theme (as start.html): the screen sets its own colours below, so the app's
   dark tokens do not reach it, and the app's tokens it uses (the six code boxes of css/ui.css read --field, --sage,
   --sage-d) are set to Daily's colours inside the screen only. Font: Jost (index.html's Google Fonts link), then the
   spec's fallbacks. */
.signin {
  --parch: #FEF9F0; --vellum: #F4F1DE; --vellum-d: #ECE7CC; --slate: #1E3D4A; --slate-soft: #5D7480; --line: #E6E0CC;
  --ember-text: #B8432A; --ember-wash: rgba(224, 88, 59, .08);
  --font: 'Jost', 'Avenir Next', 'Helvetica Neue', Arial, sans-serif;
  --ink: var(--slate); --ink2: var(--slate-soft); --ink3: var(--slate-soft); --surface: var(--parch);
  --field: var(--vellum); --sage: var(--slate-soft); --sage-d: var(--slate);
  color-scheme: light; color: var(--slate); font-family: var(--font); -webkit-font-smoothing: antialiased;
  z-index: 47; display: grid; place-items: center; background: var(--parch); padding: 64px 24px 40px;
}
.signin > .si-card { max-width: 420px; }
.si-card { width: 100%; margin: auto; display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center;
  animation: dd-rise 320ms var(--ease-out) both; }
.si-card.swap { animation: si-in 260ms var(--ease-out) both; }
@keyframes si-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* The Daily wordmark, as .big-wm. */
.si-wm { display: block; width: min(150px, 40vw); height: auto; aspect-ratio: 192.4 / 100; margin-bottom: 6px; }
/* The title: hidden on Sign in (the spec's first screen has none; screen readers still read it), a quiet line elsewhere. */
.si-card h1 { font-size: 24px; font-weight: 400; line-height: 1.25; letter-spacing: -0.01em; margin: 0; }
.si-card[data-view="signin"] h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.si-to { font-size: 16px; font-weight: 300; color: var(--slate-soft); margin: -12px 0 0; overflow-wrap: anywhere; }

/* The fields and the button of a form, as .rows then .go: the rows 4 px apart, the button below them. */
.si-form { display: grid; gap: 6px; width: 100%; justify-items: stretch; }
.si-form > .si-go { justify-self: center; margin-top: 16px; }
.si-code { width: 100%; }

/* A row: the label at the left, the field at the right, on a tinted ground with no line (fields are tinted, not
   bordered). The password's Show sits at the row's end. */
.si-field { display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: center; gap: 12px; min-width: 0; text-align: left;
  background: var(--vellum); border-radius: 14px; padding: 0 4px 0 16px; min-height: 56px; transition: background-color 300ms ease; }
.si-field:focus-within { background: var(--vellum-d); }
.si-field > span:first-child { font-size: 15px; color: var(--slate-soft); }
.si-lin { position: relative; display: flex; align-items: center; min-width: 0; }
.si-lin input { flex: 1; min-width: 0; height: 52px; border: 0; background: transparent; padding: 0 10px 0 0; font: 300 21px var(--font); color: var(--slate); outline: none; }
.si-lin input[readonly] { color: var(--slate-soft); }
/* Jost's light dots are tiny: a hidden password takes the fallback font, whose dots read at a glance. */
.si-lin input[type="password"] { font-family: 'Helvetica Neue', Arial, sans-serif; font-weight: 400; letter-spacing: 3px; }
.si-show { flex: none; border: 0; background: transparent; padding: 0 12px; height: 40px; font: 400 14px var(--font); color: var(--slate-soft); cursor: pointer; border-radius: 999px;
  transition: background-color 250ms ease, color 250ms ease; }
.si-show:hover { color: var(--slate); background: var(--ember-wash); }
.si-err { font-size: 14px; color: var(--ember-text); margin: 4px 2px 0; }
.signin .si-err:not(.hint) { font-weight: 400; }
.si-err.hint { color: var(--slate-soft); } /* Set a password's rule before a short password (FX3-A) */
.si-err.shake { animation: ac-shake 200ms ease; }

/* The main button, as .go: the slate pill. */
.si-go { font: 400 16px var(--font); border: 0; border-radius: 999px; background: var(--slate); color: var(--parch); min-height: 48px; padding: 12px 30px; cursor: pointer;
  transition: transform var(--m-press) var(--ease-out), opacity 200ms ease; }
.si-go:active { transform: scale(.96); }
/* The quiet buttons under it, as .link: underlined slate-grey words. */
.si-alts { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; margin-top: -12px; }
.si-alt { font: 400 14px var(--font); border: 0; background: transparent; color: var(--slate-soft); padding: 6px 8px; cursor: pointer; border-radius: 8px;
  text-decoration: underline; text-underline-offset: 3px; transition: color 200ms ease, transform var(--m-press) var(--ease-out); }
.si-alt:hover { color: var(--slate); }
a.si-alt { text-decoration: underline; } /* round 39: Use Ask AI on your phone, a link drawn as the other small buttons */
.si-alt:active { transform: scale(.97); }
.si-card button:disabled { opacity: .55; cursor: default; }
.signin button:focus-visible, .signin a:focus-visible { outline: 2px solid var(--slate-soft); outline-offset: 3px; }
.si-card .code6 { gap: 8px; }
.si-card .code6 span { border-radius: 14px; font-family: var(--font); color: var(--slate); }

/* The Start link, as .startlink: small, at the top right, to Daily's public sign-up page (/start). */
.si-start { position: absolute; top: max(20px, env(safe-area-inset-top, 0px)); right: 22px; font: 400 15px var(--font); color: var(--slate);
  text-decoration: none; padding: 6px 12px; border-radius: 999px; transition: background-color 300ms ease; }
.si-start:hover, .si-start:active { background: var(--ember-wash); }

/* A phone: the label sits above the field in each row, and fields stay at 16 px or more so the phone does not zoom. */
@media (max-width: 480px) {
  .signin { padding: 72px 16px 32px; align-items: start; padding-top: max(84px, 16vh); }
  .si-field { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 8px 4px 2px 16px; }
  .si-field > span:first-child { font-size: 13px; }
  .si-lin input { height: 40px; font-size: 19px; }
  .si-start { right: 12px; }
}
@media (max-width: 360px) {
  /* The two quiet buttons after a wrong password share one row. */
  .si-alts { flex-wrap: nowrap; gap: 0; }
  .si-alt { padding: 6px 6px; font-size: 13px; white-space: nowrap; }
  .si-card .code6 { gap: 6px; }
  .si-card .code6 span { height: 46px; }
}
@media (prefers-reduced-motion: reduce) { .si-card, .si-card.swap { animation: none; } }
