/* The door and the verification screens, what was added on 3 October 2026 (docs/design/FAMILY.md for the look).

   claim-door.js draws these screens and injects their base styles (classes cd-*); this file holds the parts the
   owner asked for while walking the live sign-up: the line that says where BiteSized is open, the three steps
   that explain the search, the search while it is out, the two password fields, the method cards, the
   verification screen while it opens, and the waiting state. The three steps of the waiting state (vw-*) are
   also drawn by the app's read-only card and by Settings, so they live here once. Tokens only.

   Motion: one curve (--ease-out), nothing bounces, nothing turns. What moves says something: a line draws in the
   direction the steps are read, the live step breathes, a tick is drawn, a result lands where the search was. */

/* 1. Find your profile: where it is open, and what the search does ---------------------------------------- */
.cd-us {
  display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--frost-well);
  font-size: 13.5px; line-height: 1.5; color: var(--oryn-text-2);
}
.cd-us > i { flex: none; margin-top: 2px; font-size: 17px; color: var(--color-brand-ink); }
.cd-us__link { position: relative; font-weight: 600; color: var(--color-foreground); white-space: nowrap; }
.cd-us__link::after { content: ''; position: absolute; left: -6px; right: -6px; top: -13px; bottom: -13px; }
.cd-us__link:focus-visible { outline: none; border-radius: 4px; box-shadow: 0 0 0 4px var(--brand-soft); }

.cd-how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.cd-how__step { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; font-size: 12.5px; line-height: 1.4; color: var(--color-muted-foreground); }
.cd-how__ic { display: grid; width: 40px; height: 40px; margin-bottom: 8px; place-items: center; border-radius: 50%; background: var(--brand-soft); font-size: 20px; color: var(--color-brand-ink); }
.cd-how__step b { font-size: 13.5px; font-weight: 600; line-height: 1.4; color: var(--color-foreground); }
/* the line from one step to the next, drawn once in the direction it is read */
.cd-how__step:not(:last-child)::before {
  content: ''; position: absolute; left: 48px; right: -4px; top: 20px; height: 1.5px; border-radius: 1px; transform-origin: 0 50%;
  background: linear-gradient(90deg, color-mix(in srgb, var(--color-brand) 55%, transparent), color-mix(in srgb, var(--color-brand) 14%, transparent));
  animation: cd-draw .5s var(--ease-out) .3s both;
}
.cd-how__step:nth-child(2)::before { animation-delay: .42s; }
@keyframes cd-draw { from { transform: scaleX(0); } to { transform: none; } }

/* two short lines under the form, one under the other: side by side they never fit this column, and the bar
   between them was left hanging at the end of the first */
[data-cd-step="find"] .cd-below .cd-bar, [data-cd-step="check"] .cd-below .cd-bar { display: none; }
[data-cd-step="find"] .cd-below > .cd-pair, [data-cd-step="check"] .cd-below > .cd-pair { flex: 1 1 100%; }

/* 2. The search while it is out: the picture (door-search.js) and its three steps ------------------------- */
.cd-scene { position: relative; height: 148px; overflow: hidden; border: 1px solid var(--frost-line); border-radius: 22px; background: var(--frost-strong); box-shadow: var(--frost-rim), var(--frost-shadow); }
.cd-scene[hidden] { display: none; }
.cd-scene__cv { position: absolute; inset: 0; display: block; }
.cd-steps { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0 4px; list-style: none; }
.cd-st { display: flex; align-items: center; gap: 12px; min-height: 36px; font-size: 15px; line-height: 1.4; color: var(--color-muted-foreground); transition: color .25s var(--ease-out); }
.cd-st.is-now { font-weight: 600; color: var(--color-foreground); }
.cd-st.is-done { color: var(--oryn-text-2); }
.cd-st__mark, .vw-dot {
  position: relative; flex: none; width: 22px; height: 22px; border: 1.5px solid color-mix(in srgb, var(--color-foreground) 22%, transparent); border-radius: 50%;
  background: var(--color-card); transition: background-color .25s var(--ease-out), border-color .25s var(--ease-out);
}
/* the live step: a point that breathes, and a ring that leaves it */
.cd-st.is-now .cd-st__mark, .vw-step.is-now .vw-dot { border-color: var(--color-brand); }
.cd-st.is-now .cd-st__mark::before, .vw-step.is-now .vw-dot::before { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: var(--color-brand); animation: vw-breathe 1.6s ease-in-out infinite; }
.cd-st.is-now .cd-st__mark::after, .vw-step.is-now .vw-dot::after { content: ''; position: absolute; inset: -1.5px; border: 1.5px solid var(--color-brand); border-radius: 50%; animation: vw-halo 1.6s var(--ease-out) infinite; }
/* the step that is done: the accent, and the same tick the app's tick box draws */
.cd-st.is-done .cd-st__mark, .vw-step.is-done .vw-dot { border-color: var(--color-brand); background: var(--color-brand); }
.cd-st.is-done .cd-st__mark::before, .vw-step.is-done .vw-dot::before {
  content: ''; position: absolute; inset: 0; background: var(--color-primary-foreground);
  -webkit-mask: var(--bs-tick) center / 13px 13px no-repeat; mask: var(--bs-tick) center / 13px 13px no-repeat;
  animation: bs-tick .3s var(--ease-out) both;
}
@keyframes bs-tick { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes vw-breathe { 0%, 100% { transform: scale(.8); } 50% { transform: scale(1); } }
@keyframes vw-halo { from { opacity: .7; transform: scale(1); } to { opacity: 0; transform: scale(1.9); } }
/* said to a screen reader as the steps change; the list above is what the eye reads */
.cd-live { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* the result lands where the search was: it comes into focus, with one ring of light */
.cd.cd-arrive.cd-arrive > [data-cd-step] > .cd-card, .cd.cd-arrive.cd-arrive .cd-pick { animation: cd-arrive .6s var(--ease-out) both; animation-delay: .06s; }
.cd.cd-arrive.cd-arrive .cd-list li:nth-child(2) .cd-pick { animation-delay: .12s; }
.cd.cd-arrive.cd-arrive .cd-list li:nth-child(3) .cd-pick { animation-delay: .18s; }
.cd.cd-arrive.cd-arrive .cd-list li:nth-child(n+4) .cd-pick { animation-delay: .24s; }
@keyframes cd-arrive {
  from { opacity: 0; transform: translateY(10px) scale(.96); filter: blur(6px); box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-brand) 40%, transparent); }
  55% { opacity: 1; filter: blur(0); box-shadow: 0 0 0 5px color-mix(in srgb, var(--color-brand) 22%, transparent); }
  to { opacity: 1; transform: none; filter: blur(0); box-shadow: 0 0 0 16px transparent; }
}

/* 3. Create account: the two password fields, each with its own show and hide ----------------------------- */
.cd-pw { position: relative; }
.cd .cd-pw .lg-field { padding-right: 54px; }
.cd-pw__eye {
  position: absolute; right: 3px; top: 50%; display: grid; width: 44px; height: 44px; place-items: center; translate: 0 -50%;
  border: 0; border-radius: 12px; background: none; font-size: 19px; color: var(--color-muted-foreground); cursor: pointer;
  transition: color .16s var(--ease-out), background-color .16s var(--ease-out);
}
.cd-pw__eye:hover { background: var(--oryn-surface-hover); color: var(--color-foreground); }
.cd-pw__eye:focus-visible { outline: none; color: var(--color-foreground); box-shadow: 0 0 0 4px var(--brand-soft); }
.cd-pw__eye[aria-pressed="true"] { color: var(--color-brand-ink); }
.cd-pwmatch { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--color-muted-foreground); }
.cd-pwmatch:empty { display: none; }
.cd-pwmatch::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.cd-pwmatch[data-state="differ"] { color: var(--color-alert-ink, var(--color-alert)); }
.cd-pwmatch[data-state="same"] { color: color-mix(in srgb, var(--color-success) 62%, var(--color-foreground)); }

/* a tick box with its sentence */
.cd-check { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 11px 0; font-size: 14px; line-height: 22px; color: var(--color-foreground); cursor: pointer; }
.cd-checks .cd-check { padding: 9px 0; }

/* 4. Verify: the two ways, each a card that is the whole target ------------------------------------------- */
.cd-method {
  position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) 22px; align-items: center; gap: 16px; min-height: 96px; padding: 18px 20px;
  border: 1px solid var(--frost-line); border-radius: 18px; background: var(--frost-strong); box-shadow: var(--frost-rim);
  font-size: 14px; line-height: 1.5; color: var(--color-muted-foreground); cursor: pointer;
  transition: border-color .2s var(--ease-out), background-color .2s var(--ease-out), box-shadow .3s var(--ease-out), translate .3s var(--ease-out), scale .12s var(--ease-out), opacity .2s var(--ease-out);
}
.cd-method__ic {
  display: grid; width: 44px; height: 44px; place-items: center; border-radius: 50%; background: var(--brand-soft); font-size: 22px; color: var(--color-brand-ink);
  transition: background-color .2s var(--ease-out), color .2s var(--ease-out);
}
.cd-method__txt { min-width: 0; }
.cd-method__txt b { display: block; margin-bottom: 2px; font-size: 15.5px; font-weight: 600; line-height: 1.35; letter-spacing: -.01em; color: var(--color-foreground); }
@media (hover: hover) { .cd-method:hover { border-color: var(--oryn-border-hover); box-shadow: var(--frost-rim), var(--frost-shadow); translate: 0 -1px; } }
.cd-method:active { scale: .985; }
.cd-method:has(input:checked) {
  border-color: color-mix(in srgb, var(--color-brand) 75%, transparent); background: color-mix(in srgb, var(--color-brand) 7%, var(--color-card));
  box-shadow: var(--frost-rim), 0 0 0 4px var(--brand-soft); translate: none;
}
.cd-method:has(input:checked) .cd-method__ic { background: var(--color-brand); color: var(--color-primary-foreground); animation: cd-chosen .34s var(--ease-out); }
.cd-list:has(input:checked) .cd-method:not(:has(input:checked)) { opacity: .7; }
.cd-method:has(input:focus-visible) { border-color: color-mix(in srgb, var(--color-brand) 75%, transparent); box-shadow: var(--frost-rim), 0 0 0 4px var(--brand-soft); }
@keyframes cd-chosen { from { scale: .82; } to { scale: 1; } }
@media (max-width: 420px) { .cd-method { grid-template-columns: 40px minmax(0, 1fr) 22px; gap: 14px; padding: 16px; } .cd-method__ic { width: 40px; height: 40px; font-size: 20px; } }

/* 5. The verification screen while it opens: the shape of what is coming, and one line that says so -------- */
.cd-sk { position: relative; display: block; overflow: hidden; border-radius: 14px; background: color-mix(in srgb, var(--color-foreground) 7%, transparent); }
.cd-sk::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--color-foreground) 7%, transparent), transparent); animation: cd-shimmer 1.5s ease-in-out infinite;
}
@keyframes cd-shimmer { to { transform: translateX(100%); } }
.cd-sk--title { width: 82%; height: calc(4.2rem - 10px); margin: 5px 0; border-radius: 12px; }
.cd-sk--line { width: 70%; height: 14px; margin: 4px 0; border-radius: 7px; }
.cd-sk--card { height: 102px; border-radius: 18px; }
.cd-sk--card + .cd-sk--card { height: 124px; }
@media (max-width: 480px) { .cd-sk--card, .cd-sk--card + .cd-sk--card { height: 132px; } }
.cd-sk--cta { height: 50px; border-radius: 2rem; }
.cd-opening { display: flex; align-items: flex-start; gap: 12px; margin: 0; font-size: 14px; line-height: 1.5; color: var(--color-muted-foreground); }
.cd-opening__dot { position: relative; flex: none; width: 10px; height: 10px; margin-top: 5.5px; border-radius: 50%; background: var(--color-brand); animation: vw-breathe 1.6s ease-in-out infinite; }
.cd-opening__dot::after { content: ''; position: absolute; inset: 0; border: 1.5px solid var(--color-brand); border-radius: 50%; animation: vw-halo 1.6s var(--ease-out) infinite; }
/* the answer fills the screen that is already there: it does not arrive a second time */
.cd.cd-fill.cd-fill > [data-cd-step] > * { animation: cd-fill .32s ease-out both; animation-delay: 0s; }
.cd.cd-fill--kept.cd-fill > [data-cd-step] > :is(.cd-h1, .cd-sub) { animation: none; }
@keyframes cd-fill { from { opacity: .3; } to { opacity: 1; } }

/* 6. In review: what was received, who looks at it, what comes next ---------------------------------------- */
.cd-wait { padding: 24px 22px; border: 1px solid var(--frost-line); border-radius: 22px; background: var(--frost-strong); box-shadow: var(--frost-rim), var(--frost-shadow); }
.cd-can { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.cd-can__label { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--color-muted-foreground); }
.cd-can__list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.cd-can__list li { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px 0 11px; border-radius: 999px; background: var(--brand-soft); font-size: 13.5px; font-weight: 600; color: var(--color-brand-ink); }
.cd-can__list i { font-size: 16px; }
.cd-wait__help { text-align: center; }

/* the three steps (also in the app's read-only card and in Settings) */
.vw-steps { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.vw-step { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 14px; padding-bottom: 22px; }
.vw-step:last-child { padding-bottom: 0; }
/* the line to the next step */
.vw-step:not(:last-child)::before { content: ''; position: absolute; left: 10.25px; top: 22px; bottom: 0; width: 1.5px; background: color-mix(in srgb, var(--color-foreground) 14%, transparent); }
.vw-step.is-done:not(:last-child)::before { background: var(--color-brand); }
/* from the live step onward the line is alive: a light travels along it, slowly */
.vw-step.is-now:not(:last-child)::before {
  background: linear-gradient(180deg, transparent, var(--color-brand), transparent) 0 -40% / 100% 40% no-repeat, color-mix(in srgb, var(--color-foreground) 14%, transparent);
  animation: vw-travel 2.4s linear infinite;
}
@keyframes vw-travel { from { background-position: 0 -70%, 0 0; } to { background-position: 0 170%, 0 0; } }
.vw-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-top: 1px; }
.vw-txt b { font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--color-foreground); }
.vw-txt span { font-size: 13.5px; line-height: 1.5; color: var(--color-muted-foreground); }
.vw-step:not(.is-done):not(.is-now) .vw-txt b { font-weight: 500; color: var(--color-muted-foreground); }
/* in a row: the card and Settings show the three names on one line */
.vw-steps--row { flex-direction: row; align-items: flex-start; }
.vw-steps--row .vw-step { display: flex; flex: 1 1 0; flex-direction: column; align-items: center; gap: 8px; min-width: 0; padding: 0; text-align: center; }
.vw-steps--row .vw-step:not(:last-child)::before { left: calc(50% + 17px); right: calc(-50% + 17px); top: 10.25px; bottom: auto; width: auto; height: 1.5px; }
.vw-steps--row .vw-step.is-now:not(:last-child)::before {
  background: linear-gradient(90deg, transparent, var(--color-brand), transparent) -40% 0 / 40% 100% no-repeat, color-mix(in srgb, var(--color-foreground) 14%, transparent);
  animation: vw-travel-x 2.4s linear infinite;
}
@keyframes vw-travel-x { from { background-position: -70% 0, 0 0; } to { background-position: 170% 0, 0 0; } }
.vw-steps--row .vw-txt { padding: 0; }
.vw-steps--row .vw-txt b { font-size: 12.5px; }

/* 7. Reduced motion: the calm version. Nothing travels, breathes or is drawn; states still read ------------ */
@media (prefers-reduced-motion: reduce) {
  .cd-how__step::before, .cd-st__mark::before, .cd-st__mark::after, .vw-dot::before, .vw-dot::after, .vw-step::before, .cd-sk::after,
  .cd-opening__dot, .cd-opening__dot::after, .cd-method__ic, .cd.cd-arrive .cd-card, .cd.cd-arrive .cd-pick, .cd.cd-fill > [data-cd-step] > * { animation: none !important; }
  .cd-st.is-now .cd-st__mark::after, .vw-step.is-now .vw-dot::after, .cd-opening__dot::after { display: none; }
  .cd-method, .cd-method__ic, .cd-pw__eye { transition: none; }
}
html.a11y-reduce-motion :is(.cd-how__step, .cd-st__mark, .vw-dot, .vw-step, .cd-sk, .cd-opening__dot)::before,
html.a11y-reduce-motion :is(.cd-st__mark, .vw-dot, .cd-sk, .cd-opening__dot)::after,
html.a11y-reduce-motion :is(.cd-opening__dot, .cd-method__ic),
html.a11y-reduce-motion .cd.cd-arrive :is(.cd-card, .cd-pick),
html.a11y-reduce-motion .cd.cd-fill > [data-cd-step] > * { animation: none !important; }
html.a11y-reduce-motion :is(.cd-st.is-now .cd-st__mark, .vw-step.is-now .vw-dot, .cd-opening__dot)::after { display: none; }
