/* Sign-in pieces newer than patient.css (Micah 2026-10-15), loaded on
   every public card page after it. */

/* The app's stages at sign-in (Micah 2026-10-15): the other ways to finish
   this sign-in are the method buttons the other stages use; Restart
   sign-in is a plain link below a hairline, quieter than the buttons. */
.pat-signin-method-form {
  display: inline-flex;
  margin: 0;
}

button.pat-signin-method {
  font-family: inherit;
  cursor: pointer;
}

.pat-totp-restart {
  margin: var(--space-5, 1.5rem) 0 0;
  padding-top: var(--space-3, 0.75rem);
  border-top: 1px solid var(--line, #ececec);
  text-align: center;
  font-size: var(--text-md, 1rem);
}

.pat-totp-restart a {
  color: var(--accent-ink, #0072B5);
  text-decoration: underline;
}

/* Two-step verification (Micah 2026-10-15): a small label above the
   heading on every second-step screen, tying them together. */
.pat-two-step-eyebrow {
  margin: 0 0 0.25rem;
  font-size: var(--text-xs, 0.75rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #545f71);
}

/* ----- Landing window (TON-529, tono-z50a): the welcome video beside the
   form on sign-in, the front door, the handout code and a new patient's
   invitation; the whole window below the form on phones ----- */

body.pat-claim-page.has-window {
  background: var(--surface);
}

/* A landing page fills the screen and does not scroll on a desktop: the
   gutter base.css reserves would show as an empty scrollbar beside the
   window (Micah 2026-11-16). */
html:has(> body.has-window) {
  scrollbar-gutter: auto;
}

.landing-split {
  overflow: clip;
  background: var(--paper);
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  min-height: 100dvh;
}

.landing-split>.auth-main {
  background: var(--paper);
  padding-block: clamp(2rem,6vw,5rem);
}

/* Both sides centred (Micah, Jake 2026-11-14): the card group takes the
   slack above it as well as below, the help line keeps the bottom. */
.landing-split>.auth-main>:first-child {
  margin-top: auto;
}

.landing-window {
  position: relative;
  overflow: hidden;
  color: #fff;
  --lw-ground: radial-gradient(circle at 85% 10%,rgba(124,213,255,.35),transparent 40%), radial-gradient(circle at 10% 95%,rgba(124,213,255,.25),transparent 45%), linear-gradient(160deg,var(--accent-ink-deep),var(--accent-ink));
  background: var(--lw-ground);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem,6vw,5rem);
}

/* The form side is the call to action, so it sits on top: its edge curves
   out over the window and casts the shadow (Micah 2026-11-16). */
.landing-split>.auth-main {
  position: relative;
  z-index: 1;
}

.landing-split>.landing-window {
  padding-left: calc(clamp(2rem,6vw,5rem) + 4.5vw);
}

.landing-split>.auth-main::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -70%;
  /* The bulge scales with the curve, so its ends meet the window's edge
     at the top and bottom on any screen: an ellipse this size falls back
     about 8.7% of the column's width there (Micah 2026-11-16: gray showed
     on a large screen). */
  right: -9%;
  width: 200%;
  height: 240%;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 1rem 0 2rem rgba(0,30,60,.4);
  pointer-events: none;
}


.lw-full {
  position: relative;
  max-width: 30rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.lw-title {
  margin: 0;
  font-size: clamp(1.6rem,2.6vw,2.2rem);
  line-height: 1.15;
  font-weight: 700;
}

.lw-video {
  position: relative;
  display: block;
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0,0,0,.25);
  color: #fff;
  text-decoration: none;
}

.lw-video img {
  display: block;
  width: 100%;
  height: auto;
}

.lw-play {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  z-index: 1;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  padding-left: .2rem;
  box-sizing: border-box;
}

.lw-video-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2.5rem 1rem 1.95rem 5rem;
  font-weight: 600;
  line-height: 1.3;
  background: linear-gradient(transparent,rgba(0,0,0,.6));
}

.lw-video .lw-video-caption,
.lw-video:hover .lw-video-caption,
.lw-video:focus-visible .lw-video-caption {
  color: #fff;
}

.lw-play {
  transition: transform .15s ease,background-color .15s ease,color .15s ease,box-shadow .15s ease;
}

.lw-video img {
  transition: transform .3s ease;
}

.lw-video:hover .lw-play,
.lw-video:focus-visible .lw-play {
  transform: scale(1.12);
  background: var(--accent-ink);
  color: #fff;
  box-shadow: 0 6px 16px rgba(0,0,0,.35);
}

.lw-video:hover img {
  transform: scale(1.03);
}

.lw-video:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

@media (prefers-reduced-motion:reduce) {
  .lw-play,
  .lw-video img {
    transition: none;
  }

  .lw-video:hover img {
    transform: none;
  }
}

.lw-glimpses {
  list-style: none;
  margin: .4rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .9rem;
  line-height: 1.4;
}

.lw-glimpses li {
  display: flex;
  gap: .85rem;
  align-items: center;
}

.lw-glimpse b,
.lw-glimpse span {
  display: block;
  margin: 0;
}

.lw-glimpse span {
  opacity: .9;
}

.lw-icon {
  flex: none;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  display: grid;
  place-items: center;
}

.modal.lw-video-modal {
  width: min(56rem,calc(100vw - 2rem));
  max-width: none;
}

.lw-player {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: .75rem;
  overflow: hidden;
  background: #000;
}

.lw-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* A returning visitor's window (DRAFT, Micah 2026-11-14): Dawn's tip of
   the day and the video one small link away. */
.lw-tip {
  margin: 0;
  padding: 1.6rem 1.6rem 1.3rem;
  border-radius: 1.25rem;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 18px 40px rgba(0,0,0,.18);
}

.lw-tip-eyebrow {
  margin: 0 0 .75rem;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .6rem;
  align-items: center;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.lw-tip .lw-tip-text {
  margin: 0;
  padding: 0;
  border: 0;
  color: inherit;
  font-style: normal;
  font-size: clamp(1.25rem,2vw,1.6rem);
  line-height: 1.3;
  font-weight: 600;
}

.lw-tip .lw-tip-text::before {
  content: "\201C";
  display: block;
  height: 1.6rem;
  font-size: 3.5rem;
  line-height: 1;
  opacity: .5;
}

.lw-tip-by {
  margin-top: 1.1rem;
  display: flex;
  gap: .75rem;
  align-items: center;
  line-height: 1.3;
}

.lw-tip-by b,
.lw-tip-by span span {
  display: block;
}

.lw-tip-by span span {
  opacity: .85;
  font-size: .9rem;
}

.lw-tip-face {
  flex: none;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  object-fit: cover;
  object-position: 64% 22%;
  border: 2px solid rgba(255,255,255,.7);
}

.lw-rewatch {
  align-self: flex-start;
  display: inline-flex;
  gap: .6rem;
  align-items: center;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.lw-rewatch:hover,
.lw-rewatch:focus-visible {
  color: #fff;
  text-decoration: underline;
}

.lw-rewatch-play {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  font-size: .7rem;
  padding-left: .12rem;
  box-sizing: border-box;
}

@media (width < 48rem),(height < 32rem) {
  .landing-split {
    display: flex;
    flex-direction: column;
  }

  /* On a phone the form comes first, the call to action; the whole window
     follows below it, and the form's bottom edge curves down over it
     (DRAFT, Micah 2026-11-16). */
  body.pat-claim-page .landing-split>.auth-main {
    min-height: 0;
    padding-bottom: var(--space-6);
  }

  .landing-split>.auth-main::after {
    top: auto;
    bottom: -1.5rem;
    left: -50%;
    right: auto;
    width: 200%;
    height: 24rem;
    background: var(--surface);
    box-shadow: 0 .75rem 1.5rem rgba(0,30,60,.35);
    clip-path: inset(50% 0 -3rem 0);
  }

  .landing-split>.landing-window {
    order: 0;
    flex: 1 0 auto;
    align-items: flex-start;
    padding: 3.5rem 1.25rem 2.5rem;
  }

  .landing-split>.auth-main {
    background: var(--surface);
    min-height: 0;
    padding-bottom: var(--space-7, 2.5rem);
  }

  .landing-split>.auth-main>:first-child {
    margin-top: 0;
  }
}
