/* polish-onboarding.css - C156 first-run polish on top of css/c127.css (js/onboarding.js). Remove the line in index.html to drop it. */

/* ---------------------------------------------------------------- welcome: a calm staggered entrance (after the intro) */
.ob.ob-enter .ob-s1 { animation: none; }
.ob.ob-enter .ob-s1 > * { animation: ob-rise calc(.46s * var(--motion, 1)) cubic-bezier(.2, .8, .2, 1) both; }
.ob.ob-enter .ob-s1 > :nth-child(2) { animation-delay: calc(.05s * var(--motion, 1)); }
.ob.ob-enter .ob-s1 > :nth-child(3) { animation-delay: calc(.1s * var(--motion, 1)); }
.ob.ob-enter .ob-s1 > :nth-child(4) { animation-delay: calc(.16s * var(--motion, 1)); }
.ob.ob-enter .ob-s1 > :nth-child(5) { animation-delay: calc(.22s * var(--motion, 1)); }
.ob.ob-enter .ob-s1 > :nth-child(n+6) { animation-delay: calc(.28s * var(--motion, 1)); }
.ob.ob-enter .ob-top { animation: ob-fade calc(.5s * var(--motion, 1)) ease-out calc(.3s * var(--motion, 1)) both; }
@keyframes ob-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes ob-fade { from { opacity: 0; } to { opacity: 1; } }
.ob .app-onb-card.ob-card { box-shadow: var(--shadow-2); }
.app-onb.ob { padding-bottom: max(28px, env(safe-area-inset-bottom)); scroll-padding-bottom: 24px; }

/* small text buttons used inside sentences ("Sign in", "Use lichess: name", "see an example first") */
.ob-link-t { display: inline; padding: 2px 0; margin: 0; border: 0; background: none; cursor: pointer; font: inherit; font-weight: 800;
  color: var(--accent-text, var(--accent)); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.ob-link-t:hover { text-decoration-thickness: 2.5px; }
.ob-link-t:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.ob-signin { margin: 6px 0 0; text-align: center; font-size: 13.5px; font-weight: 600; color: var(--text-3); }
.ob-signin .ob-link-t { min-height: 32px; }

/* ---------------------------------------------------------------- step 2: the name */
.ob-hint { margin: -2px 2px 0; font-size: 13px; font-weight: 600; line-height: 1.45; color: var(--text-3); }
.ob-hint.is-note { padding: 9px 11px; margin: 0; border-radius: 12px; color: var(--text); background: color-mix(in srgb, var(--info) 12%, transparent); }
.ob-hint.is-note .ob-link-t { display: inline-block; margin-top: 2px; }
.ob .app-onb-err { font-size: 14px; font-weight: 700; color: var(--bad); }
.ob-card-note { margin: 8px 2px 0; font-size: 13px; font-weight: 700; line-height: 1.45; color: var(--warn); }
.ob-input { scroll-margin: 90px 0 120px; }
.ob-input::placeholder { color: var(--text-3); opacity: 1; }

/* ---------------------------------------------------------------- step 3: whose games + the Free cap */
.ob-for { margin: -2px 0 10px; font-size: 14px; font-weight: 600; color: var(--text-3); }
.ob-for:empty { display: none; }
.ob-cap { margin: 10px 2px 0; font-size: 13px; font-weight: 700; color: var(--text-3); }
.ob-cap[hidden] { display: none; }

/* ---------------------------------------------------------------- step 4: building, with real stages */
.ob-build-ico i { inset: -9px; border: 0; border-radius: 50%; padding: 3px;
  background: conic-gradient(from 0deg, var(--accent), color-mix(in srgb, var(--accent) 0%, transparent) 70%, var(--accent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.ob-build-ico { margin-left: 9px; margin-top: 9px; }
.ob-meter-t { flex-direction: column; align-items: flex-start; gap: 2px; }
.ob-meter-t b { font-size: 14.5px; overflow-wrap: anywhere; }
.ob-meter-t span { text-align: left; font-size: 13px; line-height: 1.4; }
.ob-meter-t span:empty { display: none; }
.ob-stages { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.ob-stages li { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; color: var(--text-3); transition: color calc(.25s * var(--motion, 1)); }
.ob-st-dot { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--border-strong); color: transparent; transition: all calc(.25s * var(--motion, 1)); }
.ob-st-dot svg { width: 12px; height: 12px; stroke-width: 3.2; }
.ob-stages li.is-now { color: var(--text); }
.ob-stages li.is-now .ob-st-dot { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); animation: ob-pulse calc(1.4s * var(--motion, 1)) ease-in-out infinite; }
.ob-stages li.is-done { color: var(--text-2); }
.ob-stages li.is-done .ob-st-dot { border-color: var(--good); background: var(--good); color: #fff; }
@keyframes ob-pulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 6%, transparent); } }
.ob-live li.ob-ph { color: var(--text-3); background: color-mix(in srgb, var(--surface-2) 70%, transparent); position: relative; overflow: hidden; }
.ob-live li.ob-ph i { flex: none; width: 18px; height: 18px; border-radius: 6px; background: var(--surface-3); }
.ob-live li.ob-ph::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--text) 6%, transparent), transparent);
  animation: ob-shimmer calc(1.6s * var(--motion, 1)) ease-in-out infinite; }
@keyframes ob-shimmer { to { transform: translateX(100%); } }
.ob-slow { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; font-weight: 600; line-height: 1.45; color: var(--text-2);
  background: color-mix(in srgb, var(--info) 10%, transparent); animation: ob-rise calc(.3s * var(--motion, 1)) ease-out both; }
.ob-slow[hidden] { display: none; }

/* ---------------------------------------------------------------- step 5: the reveal + the Plus card */
.ob-w-main .crp-lock { white-space: nowrap; max-width: 100%; }
.ob-hint[hidden] { display: none; }
.ob-go-note { margin: 6px 0 2px; text-align: center; font-size: 12.5px; font-weight: 700; color: var(--text-3); }
.ob-s5 .ob-go-note + .btn { margin-top: 2px; }
.ob-own { display: block; margin: 8px auto 0; min-height: 36px; font-size: 14px; }
.ob-own[hidden] { display: none; }
.ob-master { margin: 2px 0 16px; padding: 14px 14px 12px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent);
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 9%, var(--surface)), var(--surface));
  animation: ob-rise calc(.42s * var(--motion, 1)) cubic-bezier(.2, .8, .2, 1) calc(.5s * var(--motion, 1)) both; }
.ob-master[hidden] { display: none; }
.ob-master-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; }
.ob-master-h b { font-size: 15.5px; font-weight: 800; }
.ob-master-tag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 800; letter-spacing: .07em;
  text-transform: uppercase; color: var(--accent-ink); background: var(--accent); }
.ob-master-l { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 5px; }
.ob-master-l li { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--text-2); line-height: 1.4; }
.ob-master-l svg { flex: none; width: 15px; height: 15px; margin-top: 2px; color: var(--accent-text, var(--accent)); stroke-width: 3; }
.ob-master-btn { width: 100%; min-height: 42px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--border-strong); cursor: pointer;
  background: var(--surface-2); color: var(--text); font: inherit; font-size: 14.5px; font-weight: 800; }
.ob-master-btn:hover { border-color: var(--accent); }
.ob-master-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ob-master-n { margin: 8px 0 0; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--text-3); }

/* phone: the reveal is taller than the screen, so "Start today's training" stays in reach while the cards are read */
@media (max-width: 699px) {
  .ob-s5 [data-ob="go"] { position: sticky; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 2;
    box-shadow: 0 4px 0 var(--accent-deep), 0 10px 28px rgba(0, 0, 0, .35); }
}

/* ---------------------------------------------------------------- less motion */
:root[data-motion="off"] .ob.ob-enter .ob-s1 > *, :root[data-motion="off"] .ob.ob-enter .ob-top,
:root[data-motion="off"] .ob-stages li.is-now .ob-st-dot, :root[data-motion="off"] .ob-live li.ob-ph::after, :root[data-motion="off"] .ob-master { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .ob.ob-enter .ob-s1 > *, .ob.ob-enter .ob-top, .ob-stages li.is-now .ob-st-dot, .ob-live li.ob-ph::after, .ob-master, .ob-slow { animation: none; }
}
