/* MedAI sign-in (medai-signin.js): the home page's dialog and every page's sign-in card.
   Colours come from the page's own tokens, whichever naming the page uses (home / digest /
   panel), so light and dark follow the page. */
.si {
  --si-fg: var(--fg, var(--text-primary, #1c2026));
  --si-muted: var(--muted, var(--text-muted, #5e6673));
  --si-line: var(--line-strong, var(--border-strong, var(--line, #d3dae4)));
  --si-field: var(--bg, #fff);
  --si-alt: var(--card-2, var(--surface-2, transparent));
  --si-brand: var(--brand, #354d68);
  --si-brand-hover: var(--brand-hover, var(--brand-2, #293c52));
  --si-brand-soft: var(--brand-soft, rgba(53, 77, 104, .08));
  --si-on-brand: var(--on-brand, #fff);
  --si-link: var(--accent, var(--link, #285588));
  --si-err: var(--down, var(--critical, #d03b3b));
  color: var(--si-fg);
  font-size: 14px;
  line-height: 1.5;
}
/* resume() is checking for an open New API session: keep the form out of sight meanwhile */
.si.si-resuming > * { visibility: hidden; }

.si .si-sub { margin: 4px 0 0; font-size: 13.5px; color: var(--si-muted); }
.si .si-sub a { color: var(--si-link); text-underline-offset: 3px; }
.si .si-form { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; text-align: left; }
.si .si-form[hidden] { display: none; }
.si .si-hint { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--si-muted); }
.si .si-l { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 500; }
.si .si-lr { display: flex; justify-content: space-between; gap: 12px; }
.si .si-lr a { font-weight: 400; color: var(--si-muted); text-decoration: none; }
.si .si-lr a:hover { color: var(--si-fg); }
.si .si-l input {
  width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--si-line); border-radius: 10px;
  background: var(--si-field); color: var(--si-fg); font: inherit; font-size: 14px; font-weight: 400;
  outline: none; box-shadow: none; transition: border-color .15s, box-shadow .15s;
}
.si .si-l input:focus { border-color: var(--si-brand); box-shadow: 0 0 0 3px var(--si-brand-soft); }
.si .si-alt {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 40px;
  border: 1px solid var(--si-line); border-radius: 10px; background: var(--si-alt); color: var(--si-fg);
  font-size: 14px; font-weight: 500; text-decoration: none; transition: background-color .15s, border-color .15s;
}
.si .si-alt:hover { background: var(--si-brand-soft); border-color: var(--si-brand); }
.si .si-alt svg { width: 16px; height: 16px; }
.si .si-go {
  width: 100%; height: 40px; margin: 4px 0 0; border: 0; border-radius: 10px; background: var(--si-brand);
  color: var(--si-on-brand); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background-color .15s;
}
.si .si-go:hover { background: var(--si-brand-hover); }
.si .si-go:disabled { opacity: .6; cursor: default; }
.si .si-err { margin: 0; font-size: 13px; line-height: 1.5; color: var(--si-err); }
.si .si-err[hidden] { display: none; }
.si .si-switch {
  align-self: center; padding: 0; border: 0; background: none; color: var(--si-muted); font: inherit; font-size: 13px;
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.si .si-switch:hover { color: var(--si-fg); }
/* phones: 16px keeps iOS from zooming into the field */
@media (max-width: 768px), (pointer: coarse) {
  .si .si-l input { font-size: 16px; }
}
