/* The family's sign-in, 17 November 2026. The owner: why does BiteSized have this sign-in screen and not the one the whole
   Doctorpedia family should have? The family's is Dose's, and Ask Doctorpedia took it the same day: a page of its own, a
   large dark rounded panel on the left (the field of dots that moves slowly, the app's mark and name at its top, a serif
   headline, a lead, three lines with a check, a small footer) and a narrow form column on the right. This sheet is the
   panel and the column, shared by BiteSized (index.html, #loginScreen and #bsRecovery) and the console (admin.html,
   #admGate). Each app places them in its own sheet (clean-first.css, admin-look.css); the field is signin-family.js.

   The panel is dark in the light and in the dark theme, and its colours are its own: nothing here reads the page's. */

/* 1. The panel -------------------------------------------------------------------------------------------------------- */
.sf-art {
  position: relative; isolation: isolate; flex: none; box-sizing: border-box; display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  width: calc(50% - 16px); min-height: calc(100% - 32px); margin: 16px 0 16px 16px; padding: 32px; overflow: hidden;
  border-radius: 20px; background: #141414; color: #fff; text-align: left;
  font-family: var(--cl-sans, "Hedvig Letters Sans", system-ui, sans-serif);
  /* the field's five colours, for a host that carries none of its own (signin-family.js writes them on the field itself) */
  --ds-field-1: #141414; --ds-field-2: #B3368A; --ds-field-3: #E2559F; --ds-field-4: #3D1D34; --ds-field-5: #141414;
}
/* the console's panel is graphite (17 November 2026: each app its own colour) */
#admGate .sf-art { --ds-field-2: #56565B; --ds-field-3: #86868C; --ds-field-4: #2A2A2D; }
/* in a window tall enough for its words the panel stays in sight while a long form scrolls beside it */
@media (min-height: 680px) { .sf-art { position: sticky; top: 16px; align-self: flex-start; height: calc(100% - 32px); min-height: 0; } }
.sf-art-field { position: absolute; inset: 0; z-index: -1; background: #141414; }
/* the field is seen through a grid of dots */
.sf-art-px { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s cubic-bezier(.22, .61, .36, 1);
  -webkit-mask: radial-gradient(circle at center, #000 1.7px, transparent 2.25px) 0 0 / 5px 5px; mask: radial-gradient(circle at center, #000 1.7px, transparent 2.25px) 0 0 / 5px 5px; }
/* with Larger text the page is drawn 1.09 times its size: the grid is set so its dots still fall on whole pixels */
html.a11y-large .sf-art-px { -webkit-mask: radial-gradient(circle at center, #000 calc(2px / 1.09), transparent calc(2.6px / 1.09)) 0 0 / calc(6px / 1.09) calc(6px / 1.09); mask: radial-gradient(circle at center, #000 calc(2px / 1.09), transparent calc(2.6px / 1.09)) 0 0 / calc(6px / 1.09) calc(6px / 1.09); }
/* shown once its own picture is drawn (the page may hold other fields that were drawn earlier), or flat without one */
.sf-art-px[data-ds-pixel], .sf-art-px.is-flat { opacity: 1; }
.sf-art-px.is-flat { background: radial-gradient(90% 60% at 70% 30%, #5A4FC0, transparent 72%); }
.sf-art-px canvas { display: block; width: 100% !important; height: 100% !important; }
/* two veils over the field, so what is written on it is read: a short one under the name, a long one under the words.
   The words stand on the lower half: the ground under them is dark at every moment of the wave */
.sf-art-field::before, .sf-art-field::after { content: ""; position: absolute; left: 0; right: 0; z-index: 1; pointer-events: none; }
.sf-art-field::before { top: 0; height: 28%; background: linear-gradient(180deg, rgba(20, 20, 20, .86), rgba(20, 20, 20, 0)); }
.sf-art-field::after { bottom: 0; height: 80%; background: linear-gradient(0deg, rgba(20, 20, 20, .97) 0%, rgba(20, 20, 20, .92) 46%, rgba(20, 20, 20, .6) 70%, rgba(20, 20, 20, 0) 100%); }

/* the mark and the name, on the panel and (in a narrow window) over the form */
.sf-brand { display: inline-flex; align-items: center; gap: 12px; align-self: flex-start; min-height: 36px; margin: 0; color: inherit; }
.sf-mark { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--cl-ink, #1A1A1A); color: var(--cl-surface, #fff); font-size: 19px; line-height: 1; }
.sf-mark i { font-size: 19px; line-height: 1; }
.sf-name { font-size: 17px; font-weight: 400; line-height: 1.2; letter-spacing: -.01em; }
.sf-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; background: color-mix(in srgb, currentColor 9%, transparent); font-size: 13px; line-height: 1; }
.sf-art .sf-brand { color: #fff; }
.sf-art .sf-mark { background: #F2F2F0; color: #141414; }
.sf-art .sf-tag { background: rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .92); }

.sf-art-words { max-width: 520px; }
.sf-art-h { margin: 0; font-family: var(--cl-serif, "Hedvig Letters Serif", Georgia, serif); font-size: 32px; font-weight: 400; line-height: 1.12; letter-spacing: -.02em; color: #fff; text-wrap: balance; }
/* a headline may say where it breaks: its second part on a line of its own */
.sf-art-br { display: block; }
.sf-art-l { margin: 16px 0 0; max-width: 420px; font-size: 16px; font-weight: 400; line-height: 1.6; color: rgba(255, 255, 255, .84); text-wrap: pretty; }
.sf-art-list { list-style: none; display: grid; gap: 12px; max-width: 440px; margin: 28px 0 0; padding: 0; }
.sf-art-list li { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 15px; line-height: 1.4; color: rgba(255, 255, 255, .92); }
.sf-art-list li > i { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font-size: 13px; line-height: 1; }
.sf-art-foot { display: block; margin: 32px 0 0; font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, .66); }
/* on a dark page the panel keeps its edge */
html:not(.light) .sf-art { box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); }

/* 2. The form column -------------------------------------------------------------------------------------------------- */
/* the column beside the panel; what stands in it (a form, its steps, a notice) is 400 wide and sits in its middle, and
   starts at the top when it is taller than the window */
.sf-side { flex: 1 1 0; min-width: 0; box-sizing: border-box; align-self: flex-start; min-height: 100%; display: flex; flex-direction: column; padding: 32px 56px; }
.sf-side > .sf-brand { display: none; }
.sf-col { box-sizing: border-box; width: 100%; max-width: 400px; margin: auto; }

@media (max-width: 1180px) { .sf-side { padding: 32px 40px; } .sf-art-h { font-size: 30px; } }
/* a narrow window: the panel goes and the mark stands over the form, as Dose and Ask do */
@media (max-width: 1023.98px) {
  .sf-art { display: none; }
  .sf-side { padding: 28px 24px 48px; }
  .sf-side > .sf-brand { display: inline-flex; width: 100%; max-width: 400px; margin: 0 auto 32px; }
  .sf-col { margin: 0 auto auto; }
}
@media (max-width: 640px) {
  .sf-side { padding: 20px 16px 40px; }
  .sf-side > .sf-brand { max-width: none; margin-bottom: 26px; }
  .sf-col { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { .sf-art-px { transition: none; } }
html.a11y-reduce-motion .sf-art-px { transition: none; }

/* "or" between Sign in and the other ways in (17 November 2026: the owner liked the console's; every sign-in of the family
   has it now). The form is a column with a 20 px gap and the two buttons under it pull up 8 px, so the line sits 14 px from
   each side */
#loginScreen .sf-or { display: flex; align-items: center; gap: 14px; margin: -6px 0 2px; font-size: 13px; line-height: 1; color: var(--cl-ink-3, #6b6b6b); }
#loginScreen .sf-or::before, #loginScreen .sf-or::after { content: ''; flex: 1; height: 1px; background: var(--cl-line-2, rgba(0,0,0,.1)); }
