/* Sign-in and recovery, front page, help, privacy, errors, illustrations. */

/* Illustrations -------------------------------------------------------------- */

.art-field { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.art-field-lines { fill: none; stroke: rgb(255 255 255 / 0.06); stroke-width: 1; }
.art-field-node-a { fill: #5eead4; opacity: 0.75; }
.art-field-node-b { fill: #8fd9c0; opacity: 0.65; }
.art-field-node-c { fill: #7dd3fc; opacity: 0.45; }

.art { display: block; width: 100%; height: 100%; }
.art-bond { fill: none; stroke: var(--tone, #0f7259); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0.55; }
.art-ring { fill: none; stroke: var(--tone, #0f7259); stroke-width: 1.5; opacity: 0.5; }
.art-guide { fill: none; stroke: var(--tone, #0f7259); stroke-width: 1.5; stroke-dasharray: 3 4; stroke-linecap: round; opacity: 0.5; }
.art-spark { fill: none; stroke: var(--tone, #0f7259); stroke-width: 2.5; stroke-linecap: round; opacity: 0.45; }
.art-wedge, .art-liquid { fill: var(--tone, #0f7259); opacity: 0.22; }
.art-atom { fill: #fff; stroke: var(--tone, #0f7259); stroke-width: 1.8; }
.art-atom-solid { fill: var(--tone, #0f7259); }
.art-dot { fill: var(--tone, #0f7259); opacity: 0.6; }
.art-label { font-family: var(--font-display); font-weight: 700; fill: var(--tone-ink, #0b4f3f); }
.art-label-solid { fill: #fff; }

.art-scene { display: block; overflow: visible; }
.scene-floor { fill: #e6eaf5; }
.scene-orbit { fill: none; stroke: #c7cdee; stroke-width: 1.2; stroke-dasharray: 3 5; }
.scene-flask { fill: #fff; stroke: #0f7259; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.scene-liquid { fill: #99e6da; }
.scene-bubble { fill: #fff; opacity: 0.85; }
.scene-bubble-line { fill: none; stroke: #0d9488; stroke-width: 1.8; }
.scene-tile rect { fill: var(--tone-soft); stroke: var(--tone-line); stroke-width: 1.5; }
.scene-tile text { fill: var(--tone-ink); font: 800 19px var(--font-display); }
.scene-bond { fill: none; stroke: #aab3d6; stroke-width: 2.5; }
.scene-node { fill: var(--tone); opacity: 0.85; }

.button-ghost { background: rgb(255 255 255 / 0.07); border-color: rgb(203 213 225 / 0.32); color: #fff; }
.button-ghost:hover { background: rgb(255 255 255 / 0.15); color: #fff; }

/* Sign-in split screen, sized to the window so that nothing needs scrolling.
   Longer steps (two-step set-up, recovery codes) still scroll as usual. ------- */

.auth { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.auth-visual { display: flex; justify-content: center; align-items: center; background: var(--cream); color: var(--text-2); border-right: 1px solid var(--cream-line); }
.auth-visual-inner { display: flex; flex-direction: column; gap: var(--s5); width: 100%; max-width: 36rem; padding: var(--s6) clamp(var(--s5), 3vw, var(--s7)); }
.auth-visual .brand { color: var(--text); align-self: flex-start; }
.auth-headline { font: 500 clamp(1.6rem, 0.9rem + 1.5vw, 2.4rem)/1.15 var(--font-display); letter-spacing: -0.015em; color: var(--text); margin: 0 0 var(--s2); text-wrap: balance; }
.auth-intro { font-size: var(--fs-md); margin: 0; }
/* The drawing shrinks with the height of the window. */
.auth-visual .lab-art { align-self: center; width: 100%; max-width: max(14rem, calc((100vh - 22rem) * 1.5)); max-width: max(14rem, calc((100dvh - 22rem) * 1.5)); }

.auth-side { display: flex; flex-direction: column; min-width: 0; padding: var(--s3) var(--gutter); background: var(--surface); }
.auth-top { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: var(--s2); }
.auth-main { flex: 1; display: grid; place-items: center; padding-block: var(--s3); }
.auth-card { width: 100%; max-width: 26rem; padding: var(--s4) 0; }
.auth-card > section > :last-child { margin-bottom: 0; }
.auth-head { margin-bottom: var(--s5); }
.auth-head .chip-icon { margin-bottom: var(--s3); }
.auth-head h1 { font-size: var(--fs-2xl); margin-bottom: var(--s1); }
.auth-head .lede { margin: 0; font-size: var(--fs-base); }
.auth-card .stack { margin-bottom: var(--s4); gap: var(--s4); }
.auth-card .contact { margin-bottom: var(--s5); box-shadow: none; }
.field-group { display: flex; flex-direction: column; gap: var(--s1); }
.field-aside { align-self: flex-end; font-size: var(--fs-sm); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; min-height: 1.75rem; }
.field-aside:hover { text-decoration: underline; }
.auth-back { text-align: center; font-size: var(--fs-sm); margin: 0; }
.auth-admin-link { display: inline-flex; align-items: center; min-height: 1.75rem; padding: 0 var(--s2); color: var(--text-3); font-size: var(--fs-xs); }
.auth-foot { display: flex; flex-direction: column; align-items: center; gap: var(--s1); text-align: center; font-size: var(--fs-sm); }
.auth-foot .support-line { max-width: 30rem; margin: 0; }
.auth-foot > a { padding: 0 var(--s2); color: var(--text-2); display: inline-flex; align-items: center; min-height: 1.75rem; }

@media (max-height: 46rem) {
  .auth-head .lede { display: none; }
  .auth-head { margin-bottom: var(--s3); }
  .auth-card { padding: var(--s2) 0; }
  .auth-card .stack { gap: var(--s3); margin-bottom: var(--s3); }
  /* After a failed attempt the message takes the place of the extra line. */
  .auth-card:has(.notice-error) .auth-back { display: none; }
}
@media (max-height: 34rem) and (min-width: 62.01rem) {
  .auth-visual .lab-art { display: none; }
}

.steps { padding-left: 1.2rem; color: var(--text-2); }
.steps li { margin-bottom: var(--s2); }
.qr-card { display: flex; flex-wrap: wrap; gap: var(--s4); align-items: center; padding: var(--s4); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); margin-bottom: var(--s5); }
.qr-card > div { flex: 1 1 10rem; min-width: 0; }
.qr { width: 10.5rem; height: 10.5rem; flex: none; display: block; border: 6px solid #fff; border-radius: var(--r-sm); }
.secret { margin: var(--s1) 0 0; }
.secret code { font-size: var(--fs-md); letter-spacing: 0.04em; font-weight: 600; }
.recovery-codes { list-style: none; padding: var(--s4); margin-bottom: var(--s4); background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: var(--r-md); display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: var(--s2) var(--s5); }

/* Phones and small tablets: a slim name bar, then the form. */
@media (max-width: 62rem) {
  .auth { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .auth-visual { border-right: 0; border-bottom: 1px solid var(--cream-line); justify-content: flex-start; }
  .auth-visual-inner { padding: var(--s2) var(--gutter); max-width: none; align-items: center; }
  .auth-visual .brand { align-self: center; }
  .auth-pitch, .auth-visual .lab-art { display: none; }
  .auth-side { padding-top: var(--s2); }
  .auth-top:not(.auth-top-signed-in) { display: none; }
  .auth-top { justify-content: center; }
  .auth-main { padding-block: var(--s2); }
}

/* Help, privacy and errors ---------------------------------------------------- */

.help { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 22rem); gap: var(--s6); align-items: start; }
.help-side { display: flex; flex-direction: column; gap: var(--s5); min-width: 0; }
.faq-body ol { padding-left: 1.2rem; }

.doc { display: grid; grid-template-columns: 14rem minmax(0, 48rem); gap: var(--s6); align-items: start; }
.doc-nav { position: sticky; top: calc(var(--topbar) + var(--s4)); font-size: var(--fs-sm); }
.doc-nav p { font-weight: 700; margin-bottom: var(--s2); }
.doc-nav ul { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--border); }
.doc-nav a { display: flex; align-items: center; min-height: 2.1rem; padding: 0 var(--s3); margin-left: -2px; border-left: 2px solid transparent; color: var(--text-2); text-decoration: none; }
.doc-nav a:hover { color: var(--accent-700); border-left-color: var(--accent-600); }
.document { padding: clamp(var(--s5), 4vw, var(--s7)); }
.document h2 { margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid var(--border); }
.document > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.document > h3 { margin-top: var(--s6); }
.document .table-card { margin-bottom: var(--s4); }
.document .table td { vertical-align: top; }
.document li { margin-bottom: var(--s2); }
.document p, .document li { color: var(--text-2); }
.document .notice p, .document p.notice { color: var(--text); }

.error-page { max-width: 34rem; margin: var(--s7) auto; padding: var(--s7) var(--s6); text-align: center; }
.error-page .chip-icon { margin-bottom: var(--s4); }
.error-page .lede { margin-inline: auto; }
.error-page .button-row { justify-content: center; }

@media (max-width: 62rem) {
  .help, .doc { grid-template-columns: minmax(0, 1fr); }
  .doc-nav { position: static; }
}
