
/* /sign-in, rebuilt from new-web's AuthShell + AuthFlow: the ink art panel (mark, "Every past question, solved.", the
   three-ways photo, the pilot's three numbers), the passwordless flow (Google, or a 6-digit code by email: typo fix,
   sending, the code boxes with paste, resend clock, wrong code, verified, welcome back, connecting to Google), Need
   help?, and the terms line. Grafted: the form in a centre card that fills the column, a clay target and a halftone
   print on the ink, what Today looks like on the other side, the inbox the code arrives in, tries left, and a
   too-many-tries lock with its cooldown. */

/* layout: ink | the form | after you sign in */
.si.focus-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr); }
.si-center { align-content: stretch; }
.si-card { grid-template-rows: auto minmax(0, 1fr) auto; gap: var(--s5); padding: clamp(24px, 2.6vw, 44px); }
.si-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); min-height: 32px; }
.si-kick { font-size: var(--fs-small); font-weight: 600; color: var(--ink-3); }
.si-pips { display: flex; gap: 6px; }
.si-pips i { width: 22px; height: 6px; border-radius: var(--r-pill); background: var(--surface-2); transition: background-color var(--t) var(--ease-out); }
.si-pips i.on { background: var(--accent); }
.si-body { display: grid; align-content: center; width: 100%; max-width: clamp(420px, 30vw, 540px); margin: 0 auto; }
.si-step { display: grid; gap: var(--s4); animation: step-in 320ms var(--ease-out) both; }
@keyframes step-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .si-step { animation: none; } }
.si-h1 { font-size: clamp(34px, min(3.3vw, 6vh), 64px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.04; text-wrap: balance; }
.pill-hi { display: inline-block; padding: 0 0.26em 0.04em; border-radius: var(--r-pill); background: var(--accent); color: var(--accent-ink); line-height: 1.08; }
.si-sub { font-size: var(--fs-body); color: var(--ink-2); text-wrap: pretty; }
.si-sub b { color: var(--ink); font-weight: 700; overflow-wrap: anywhere; }
.si-line { display: flex; align-items: center; gap: var(--s2); font-size: var(--fs-small); color: var(--ink-3); }
.si-line .od-icon { --od-icon-size: 16px; color: var(--ink-2); }
.si-line .info { margin: -10px -10px -10px auto; }

.g-btn { gap: var(--s3); border-color: var(--line); }
.g-btn svg { width: 20px; height: 20px; flex: none; }
.si-or { display: flex; align-items: center; gap: var(--s3); font-size: var(--fs-small); color: var(--ink-3); }
.si-or::before, .si-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.si-fix { display: flex; align-items: center; gap: var(--s2); font-size: var(--fs-small); color: var(--ink-2); }
.si-fix .od-icon { --od-icon-size: 16px; }
.si-fix button { min-height: 32px; font-weight: 700; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.si-msg:empty { display: none; }
.back { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; justify-self: start; font-size: var(--fs-small); font-weight: 600; color: var(--ink-2); }
.back .od-icon { --od-icon-size: 18px; }
@media (hover: hover) { .back:hover { color: var(--ink); } }

/* shell.css also has a .field (a pill input of the Add page): reset it so only the input carries a ring */
.si .field { flex: none; min-height: 0; padding: 0; border: 0; border-radius: 0; background: none; }
/* the six boxes */
.otp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(6px, 0.8vw, 10px); }
.otp input { width: 100%; aspect-ratio: 5 / 6; min-height: 56px; max-height: 76px; padding: 0; border-radius: var(--r); border: 1px solid var(--line); background: var(--raised); text-align: center; font-family: var(--mono); font-size: clamp(22px, 1.8vw, 30px); font-weight: 500; color: var(--ink); caret-color: var(--accent-strong); transition: border-color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out), background-color var(--t-fast) var(--ease-out); }
.otp input.filled { background: var(--surface); }
.otp input.next { border-color: var(--accent-line); }
.otp input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 12%, transparent); }
.otp.bad input { border-color: var(--danger); box-shadow: 0 0 0 1.5px var(--danger); background: color-mix(in srgb, var(--danger) 7%, var(--raised)); }
.otp.bad { animation: shake 360ms var(--ease-out); }
.otp.good input { border-color: var(--accent-line); box-shadow: 0 0 0 1.5px var(--accent-line); background: var(--accent-soft); }
.otp input:disabled { background: var(--surface); color: var(--ink-3); cursor: not-allowed; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
@media (prefers-reduced-motion: reduce) { .otp.bad { animation: none; } }
.otp-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s4); min-height: 22px; }
.tries { display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--fs-small); font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.tries i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.tries i.used { background: transparent; box-shadow: inset 0 0 0 1.5px var(--danger); }
.resend { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s4); font-size: var(--fs-small); color: var(--ink-3); }
.resend b { font-family: var(--mono); font-weight: 600; color: var(--ink); }
.resend button { min-height: 44px; font-weight: 700; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.resend button:disabled { color: var(--ink-3); text-decoration: none; cursor: default; }

/* the lock */
.lock-ic { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, var(--raised)); box-shadow: inset 0 0 0 1.5px var(--danger); }
.lock-ic .od-icon { --od-icon-size: 26px; }
.cool { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--s4); padding: var(--s4) var(--s5); border-radius: var(--r); background: var(--surface); }
.cool .num { font-size: var(--fs-number); line-height: 1; letter-spacing: -0.02em; }
.cool .od-field { --od-gap: 8px; }
.cool .bar { height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.cool .bar > span { display: block; height: 100%; width: var(--p, 100%); background: var(--ink-2); transition: width 1s linear; }
.todo { display: grid; gap: 2px; }
.todo > * { display: flex; align-items: center; gap: var(--s3); min-height: 52px; padding: 0 var(--s3); border-radius: var(--r-sm); font-size: var(--fs-ui); font-weight: 600; color: var(--ink); text-align: left; }
.todo .od-icon { --od-icon-size: 20px; color: var(--ink-2); }
.todo .g-mini { width: 20px; height: 20px; flex: none; }
.todo .go { margin-left: auto; color: var(--ink-3); --od-icon-size: 18px; }
@media (hover: hover) { .todo a:hover, .todo button:hover { background: var(--surface); } }

/* google + verified */
.ring-spin { width: 48px; height: 48px; border-radius: 50%; border: 3px solid var(--surface-2); border-top-color: var(--ink); animation: spin 800ms linear infinite; }
.ok-tick { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); animation: pop 420ms var(--ease-out) both; }
.ok-tick .od-icon { --od-icon-size: 30px; }
@keyframes pop { from { transform: scale(0.6); opacity: 0; } }
.si-terms { max-width: 480px; margin: 0 auto; text-align: center; font-size: 13px; color: var(--ink-3); text-wrap: pretty; }
.si-terms a { color: var(--ink); white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }

/* the ink panel: the live AuthShell art, with one clay object and a halftone print */
.si-ink { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; gap: var(--s5); padding: clamp(24px, 2.4vw, 40px); min-height: 100%; }
.si-ink .mark { width: 50px; height: 40px; color: var(--brand-lime); }
:root[data-mode="dark"] .si-ink .mark { color: var(--accent); }
.si-art-h { max-width: 11ch; font-size: clamp(32px, 2.6vw, 50px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.02; }
/* the doctor stands on the app picture and changes pose with each step */
.si-stage { display: flex; flex-direction: column; justify-content: flex-end; min-height: 0; }
.doc.si-doc { align-self: flex-end; width: auto; height: clamp(120px, 25vh, 250px); margin: 0 clamp(4px, 1vw, 16px) -10px 0; z-index: 1; }
.si-shot { position: relative; margin: 0; border-radius: var(--r); overflow: hidden; background: var(--brand-ink); box-shadow: 0 0 0 1px var(--hero-line); }
.si-shot img { display: block; width: 100%; height: auto; aspect-ratio: 1920 / 1280; object-fit: cover; }
.si-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); margin: 0; padding-top: var(--s4); border-top: 1px solid var(--hero-line); }
.si-stats div { display: grid; gap: 2px; align-content: start; }
.si-stats dt { order: 2; font-size: 12.5px; line-height: 1.3; color: var(--hero-fg-2); }
.si-stats dd { order: 1; margin: 0; font-family: var(--mono); font-size: clamp(24px, 2vw, 34px); line-height: 1.05; letter-spacing: -0.03em; color: var(--hero-fg); }

/* after you sign in: Today, and the inbox the code arrives in */
.si-after .card { grid-template-rows: auto minmax(0, 1fr); gap: var(--s4); padding: var(--s5); }
.c-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.c-head h2 { font-size: var(--fs-body); font-weight: 700; letter-spacing: -0.01em; }
.c-head .od-row { --od-gap: 8px; }
.tdy { display: grid; align-content: space-between; gap: var(--s4); }
.tdy-hi { font-size: clamp(22px, 1.6vw, 28px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; }
.plan { display: grid; gap: var(--s2); }
.plan li { display: flex; align-items: center; gap: var(--s3); min-height: 52px; padding: 0 var(--s3); border-radius: var(--r-sm); background: var(--surface); font-size: var(--fs-small); font-weight: 600; }
.plan li .od-icon { --od-icon-size: 20px; color: var(--ink-3); }
.plan li.done .od-icon { color: var(--accent-strong); }
.plan li.done span:not(.num) { color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.plan li .num { margin-left: auto; font-size: var(--fs-cap); color: var(--ink-3); }
.meter { display: grid; gap: var(--s2); }
.meter .od-row { justify-content: space-between; font-size: var(--fs-small); color: var(--ink-3); }
.meter .bar { height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.meter .bar > span { display: block; height: 100%; width: var(--p); background: var(--accent); }
.wk { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: var(--s4); }
.wk-big { display: flex; align-items: baseline; gap: var(--s3); }
.wk-big .num { font-size: var(--fs-number); line-height: 1; letter-spacing: -0.03em; }
.wk-big span:last-child { font-size: var(--fs-small); color: var(--ink-3); }
.bars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--s2); align-items: end; min-height: 120px; }
.bars div { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 6px; height: 100%; text-align: center; font-size: 12px; color: var(--ink-3); }
.bars div > i { align-self: stretch; transform: scaleY(var(--s)); min-height: 6px; background: color-mix(in srgb, var(--ink) 16%, var(--raised)); transform-origin: bottom; animation: grow 700ms var(--ease-out) both; animation-delay: calc(var(--i) * 50ms); }
.bars div.now > i { background: var(--accent); }
.bars div.now { color: var(--ink); font-weight: 700; }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(var(--s)); } }
@media (prefers-reduced-motion: reduce) { .bars div > i { animation: none; } }
.mail { display: grid; align-content: center; gap: var(--s3); padding: var(--s5); border-radius: var(--r); background: var(--surface); }
.mail-top { display: flex; align-items: center; gap: var(--s3); }
.mail-top .tile { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); flex: none; }
.mail-top .tile .mark { width: 20px; height: 16px; color: currentColor; }
.mail-top b { font-size: var(--fs-ui); }
.mail-top small { margin-left: auto; font-size: var(--fs-cap); color: var(--ink-3); white-space: nowrap; }
.mail-code { font-family: var(--mono); font-size: clamp(30px, 2.4vw, 40px); letter-spacing: 0.12em; line-height: 1.1; }
.mail.expired .mail-code { color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 2px; }
.mail-wait { display: flex; align-items: center; justify-content: center; gap: var(--s3); min-height: 120px; color: var(--ink-3); font-size: var(--fs-small); font-weight: 600; }
.mail-wait .spin { border-color: var(--ink-3); border-right-color: transparent; }

/* tablet: ink | form; the Today side goes */
@media (max-width: 1180px) {
  .si.focus-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
  .si.focus-main > .focus-side.left { display: grid; }
  .si .si-after { display: none; }
}
/* phone: the form, then a compact ink companion */
@media (max-width: 860px) {
  .si.focus-main { grid-template-columns: 1fr; }
  .si-center { order: -1; }
  .si-shot { display: none; }
  .si-ink { grid-template-rows: auto auto auto; position: relative; }
  .si-art-h { max-width: none; font-size: 28px; padding-right: 96px; }
  .si-stage { position: absolute; top: clamp(16px, 4vw, 28px); right: clamp(12px, 4vw, 28px); }
  .doc.si-doc { height: 120px; margin: 0; }
}
@media (max-width: 600px) {
  .si-card { padding: var(--s5) var(--s4); box-shadow: none; background: transparent; }
  .si-card .si-head { display: none; }
  .si-h1 { font-size: 34px; }
  .si-stats dd { font-size: 24px; }
}
