.entry {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: var(--card);
}
.entry-brand {
  display: flex;
  flex-direction: column;
  padding: 48px clamp(40px, 5vw, 80px);
  color: var(--ink);
  background: linear-gradient(145deg, var(--row-highlight), var(--accent-tint));
}
.entry-brand .brand { color: var(--ink); font-size: var(--text-recorded-heading); font-weight: var(--weight-brand); gap: 10px; letter-spacing: -1px; }
.entry-intro { width: 100%; max-width: 460px; margin: auto 0; padding: 64px 0; }
.entry-eyebrow { display: flex; align-items: center; margin-bottom: 26px; }
.entry-intro h2 { font-size: clamp(36px, 3.4vw, 48px); font-weight: var(--weight-heading); line-height: 1.13; letter-spacing: var(--track-h1); }
.entry-summary { max-width: 370px; margin-top: 28px; color: var(--secondary); font-size:var(--text-patient); line-height: 1.7; }
.entry-workflow { display: flex; flex-direction: column; gap: 20px; list-style: none; margin: 40px 0 0; padding: 0; }
.entry-workflow li { display: flex; align-items: baseline; gap: 18px; font-size:var(--text-ui); color: var(--secondary); }
.entry-workflow span { color: var(--accent-text); font-size:var(--text-meta); font-variant-numeric: tabular-nums; }
.entry-caption { color: var(--muted); font-size:var(--text-secondary); line-height: 1.6; }
.entry-form { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; padding: 56px 48px; position: relative; }
.entry-mobile-brand { display: none; }
.auth-card { width: 100%; max-width: 400px; margin: auto 0; padding: 48px 0; }
.auth-heading { margin-bottom: 36px; }
.auth-heading h1 { font-size:var(--text-page-heading); line-height: 1.2; font-weight: var(--weight-heading); letter-spacing: var(--track-h1); }
.auth-heading p { font-size:var(--text-ui); line-height: 1.65; margin-top: 12px; color: var(--muted); }
.auth-fields { display: flex; flex-direction: column; gap: var(--field-gap); }
.auth-card label { font-size:var(--text-ui); font-weight: 500; line-height: 1.5; gap: 8px; color: var(--secondary); }
.auth-card input { width: 100%; border-color: var(--input-border); font-weight: 400}
.auth-card input::placeholder { color: var(--hint); opacity: 1; }
.auth-password-label { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.auth-password-label a, .auth-password-field a { font-size:var(--text-secondary); font-weight: 500; color: var(--secondary); }
.auth-password-label a:hover, .auth-password-field a:hover { color: var(--accent-text); }
/* "Forgot password?" reads beside the label but follows the field in the DOM, so Tab goes email → password → forgot → sign in. */
.auth-password-field { display: grid; grid-template-columns: 1fr auto; align-items: baseline; column-gap: 16px; }
.auth-password-field > label { grid-area: 1 / 1; margin-bottom: 8px; }
.auth-password-field > a { grid-area: 1 / 2; justify-self: end; }
.auth-password-field > input { grid-area: 2 / 1 / auto / -1; }
/* The password rule while requesting access (the server refuses anything shorter). */
.auth-field-note { grid-area: 3 / 1 / auto / -1; margin-top: 6px; font-size: var(--text-secondary); line-height: 1.5; color: var(--muted); }
.auth-card > .primary { width: 100%; margin-top: 28px; font-weight: var(--weight-control); }
.auth-divider { display: flex; align-items: center; gap: 14px; margin: 22px 0 14px; color: var(--hint); font-size: var(--text-meta); }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-card > .auth-otp { width: 100%; border-color: var(--input-border); color: var(--secondary); background: var(--card); }
.auth-card > .auth-otp:disabled { opacity: 1; color: var(--disabled); cursor: not-allowed; }
/* Why Sign in with OTP is unavailable, as text under it (touch screens show no tooltip). */
.auth-otp-note { margin: 8px 0 0; text-align: center; font-size: var(--text-secondary); line-height: 1.5; color: var(--muted); }
/* Sign in with a code: six even digits in one wide field; Resend sits where "Forgot password?" sits on the password form. */
.auth-card #otp-code { font-family: var(--font-mono); font-size: var(--text-appbar); font-weight: 500; letter-spacing: .32em; font-variant-numeric: tabular-nums; }
.auth-card #otp-code::placeholder { color: var(--disabled); }
.auth-resend { --control-size: auto; min-height: 0; padding: 0; border: 0; background: transparent; color: var(--accent-text); font-size: var(--text-secondary); font-weight: 500; font-variant-numeric: tabular-nums; }
.auth-resend:hover { background: transparent; color: var(--accent-text-hover); }
.auth-resend:disabled { opacity: 1; color: var(--hint); cursor: default; }
.auth-card > .primary.is-processing:disabled { opacity: 1; cursor: progress; }
.auth-card > .primary.is-processing::before { width: 16px; height: 16px; flex-basis: 16px; border-color: color-mix(in srgb, var(--on-accent) 35%, transparent); border-top-color: var(--on-accent); }
.auth-trial { margin-top: 18px; text-align: center; font-size: var(--text-secondary); color: var(--muted); line-height: 1.6; }
.auth-trial a { color: var(--accent-text); font-weight: 500; }
.auth-trial a:hover { text-decoration: underline; text-underline-offset: 3px; }
.auth-terms { margin-top: 18px; text-align: center; font-size: var(--text-label); line-height: 1.6; color: var(--hint); }
.auth-terms a { color: var(--secondary); text-decoration: underline; text-underline-offset: 3px; }
.auth-terms a:hover { color: var(--accent-text); }
.auth-card #desktop-unlock { width: 100%; margin-top: 12px; border: 1px solid var(--input-border); color: var(--secondary)}
.auth-card #entry-message { min-height: 22px; margin-top: 12px; color: var(--muted); font-size:var(--text-secondary); line-height: 1.65; overflow-wrap: anywhere; }
.auth-footer { display: flex; flex-direction: column; align-items: center; margin-top: 24px; border-top: 1px solid var(--border); padding-top: 20px; }
.auth-footer:has(button:not([hidden])) { min-height: 60px; }
.auth-footer:not(:has(button:not([hidden]))) { display: none; }
.auth-footer button { font-weight: 500}
.entry-account-note { color: var(--hint); font-size:var(--text-secondary); line-height: 1.6; text-align: center; }
@media (min-width: 1600px) { .entry-brand { padding-left: max(80px, calc((100vw - 1440px) / 2)); } }
@media (max-width: 1100px) and (min-width: 801px) { .entry-brand { padding: 40px 36px; } .entry-form { padding: 40px 32px; } .auth-heading h1 { font-size:var(--text-recorded-heading); } .entry-summary { font-size:var(--text-patient); } }
@media (max-width: 800px) {
  .entry { display: flex; flex-direction: column; }
  .entry-brand { display: none; }
  .entry-form { flex: 1; min-height: 100dvh; padding: max(32px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); }
  .entry-mobile-brand { display: flex; width: 100%; max-width: 400px; font-size:var(--text-appbar); gap: 10px; }
  .auth-card { padding: 48px 0 36px; }
  .auth-heading h1 { font-size:var(--text-recorded-heading); }
  .auth-heading { margin-bottom: 32px; }
  .auth-fields { gap: var(--field-gap); }
  .auth-footer { margin-top: 16px; padding-top: 16px; }
  .auth-resend { min-height: 40px; margin-block: -10px; }
}
@media (max-width: 360px) { .entry-form { padding-left: 20px; padding-right: 20px; } .auth-heading h1 { font-size:var(--text-settings-heading); } .auth-password-label { gap: 8px; } .auth-password-field { column-gap: 8px; } }

.auth-card input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--focus-ring)}

@media (prefers-reduced-motion: reduce) { .entry *, .auth-card * { transition: none; } }
/* A 1280×800 window (or a shorter one) fits the whole sign-in form, Terms line included, without scrolling. */
@media (min-width: 801px) and (max-height: 900px) { .entry-form { padding-block: 24px; } .auth-card { padding-block: 24px; } .auth-heading { margin-bottom: 28px; } }
/* …with the OTP reason and the Request access line under the form (journeys-02, 18). */
@media (min-width: 801px) and (max-height: 900px) { .auth-card > .auth-otp-note { margin-top: 6px; } .auth-trial { margin-top: 10px; } .auth-footer { margin-top: 10px; padding-top: 6px; } .auth-card > .auth-divider { margin-bottom: 12px; } .auth-footer:has(button:not([hidden])) { min-height: 0; } }
/* Phones draw edge to edge: a solid strip behind the status bar keeps scrolled sign-in content from showing through it. */
@media (max-width: 800px) { .entry::before { content: ''; position: fixed; top: 0; left: 0; right: 0; height: env(safe-area-inset-top, 0px); background: var(--card); z-index: 20; pointer-events: none; } }
