/* sclass only: sign-in, forms, account, privacy, errors, footer. The shared design is static/ui/ui.css. */
body { display: flex; flex-direction: column; }
main { width: 100%; flex: 1; }
main.narrow { max-width: 760px; }
.brand + .bar-right { margin-left: auto; }
.brand:has(+ .bar-right) .brand-text { display: inline; }  /* signed out: room for the name even on a phone */
.sync-form { margin: 0; display: flex; }
.sync:disabled { cursor: progress; }
.link { color: var(--text); font-weight: 600; text-decoration: underline; text-decoration-color: var(--line-strong);
  text-underline-offset: 3px; transition: text-decoration-color .25s; }
.link:hover { text-decoration-color: currentColor; }
.btn.small { padding: 6px 11px; font-size: 13px; border-radius: 9px; }
.btn.small .ico { width: 14px; height: 14px; }
.btn.danger { background: var(--bad); color: #fff; border-color: transparent; justify-self: start; }
.btn.danger:hover { background: color-mix(in srgb, var(--bad) 88%, #000); }
.sync-alert .btn { flex: none; }
.sync-note { display: flex; align-items: center; gap: 10px; margin: 0 0 20px; padding: 11px 14px; border-radius: 12px;
  font-size: 14px; font-weight: 500; color: var(--text-2); background: var(--surface); border: 1px solid var(--line); }
.sync-note .sync-spin { display: block; flex: none; }

.flash { padding: 11px 14px; border-radius: 12px; font-weight: 600; font-size: 14px; margin: 0 0 16px; border: 1px solid;
  background: var(--surface); }
.flash-error { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 30%, var(--line)); }
.flash-ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, var(--line)); }

.form { display: grid; gap: 14px; margin-top: 20px; }
.form label { display: grid; gap: 7px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.form input[type="text"], .form input[type="password"] { font: 500 15.5px var(--font); color: var(--text); padding: 11px 13px;
  border-radius: 11px; border: 1px solid var(--line-strong); background: var(--surface); outline: none;
  transition: border-color .25s, box-shadow .25s; }
.form input:hover { border-color: color-mix(in srgb, var(--text) 30%, transparent); }
.form input:focus { border-color: var(--text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 8%, transparent); }
.form input[readonly] { color: var(--muted); background: var(--surface-2); }
.form .check { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.form .check input { width: 17px; height: 17px; accent-color: var(--bad); }
.form .btn { padding: 12px 18px; margin-top: 4px; }

/* sign-in card (landing page and reconnect) */
.auth-card { padding: 30px; box-shadow: var(--shadow-lg); border-color: transparent; }
.auth-card h2 { font-size: 22px; font-weight: 700; margin: 18px 0 4px; }
.auth-logo { width: 40px; height: 40px; border-radius: 11px; }
.auth-logo .ico { width: 20px; height: 20px; }
.note { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: var(--muted); margin-top: 18px; line-height: 1.5; }
.note .ico { width: 15px; height: 15px; margin-top: 1px; color: var(--ok); }
.note a { color: var(--text-2); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.solo { max-width: 420px; margin: 7vh auto 0; }

/* account, privacy */
.page-head { margin: 6px 0 26px; }
.page-head .display { margin: 12px 0 12px; font-size: clamp(36px, 5vw, 54px); }
.narrow .card { margin-bottom: 12px; }
.who { display: flex; align-items: center; gap: 14px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.who b { font-size: 16px; font-weight: 650; }
.who-out { margin-left: auto; }
.avatar-lg { width: 46px; height: 46px; flex: none; border-radius: 13px; display: grid; place-items: center;
  font: 650 20px var(--font); color: var(--bg); background: var(--text); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin: 0; font-size: 14px; }
.facts dt { color: var(--muted); font-weight: 500; }
.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.danger-zone { border-color: color-mix(in srgb, var(--bad) 25%, var(--line)); }
.danger-zone .card-title h2, .danger-zone .card-title h2 .ico { color: var(--bad); }
.prose .card h2 { font-size: 16px; font-weight: 650; margin-bottom: 8px; }
.prose .card p { color: var(--text-2); line-height: 1.75; }

/* errors */
.error-card { text-align: center; display: grid; justify-items: center; gap: 8px; padding: 40px 26px; }
.error-card .code { font-size: 96px; font-weight: 650; letter-spacing: -.06em; line-height: 1; color: var(--text); }
.error-card h2 { font-size: 21px; font-weight: 700; }
.error-card .btn { margin-top: 14px; }

/* footer */
.foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 10px; padding: 0 16px 32px;
  font-size: 12.5px; color: var(--muted); text-align: center; }
.foot a { transition: color .2s; }
.foot a:hover { color: var(--text); }
.foot .langs { display: inline-flex; gap: 8px; }
.foot .langs a { font-weight: 700; }
.foot .langs a.on { color: var(--text); }

@media (max-width: 760px) {
  .sync { width: 34px; padding: 0; justify-content: center; }  /* just the status dot */
  .sync .sync-ico { display: none; }
}
@media (max-width: 640px) {
  /* formulas inside the flipping flashcards inflate the page width in Chrome; on a phone main spans the screen,
     so clipping it costs nothing (clip, unlike hidden, keeps position: sticky working) */
  main { padding: 24px 16px 64px; overflow-x: clip; }
  .auth-card { padding: 22px; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 10px; }
  .foot .sep-after-disclaimer { display: none; }
  .who { flex-wrap: wrap; }
}
@media (max-width: 420px) {
  .lang { display: none; }  /* the footer has the languages too */
  .tabs a { padding: 8px 10px; }
}

/* background sync, the "keep me synced" box */
.form .check.keep { align-items: flex-start; font-weight: 500; }
.form .check.keep input { accent-color: var(--text); margin-top: 2px; flex: none; }
.keep span { display: grid; gap: 2px; }
.keep b { font-size: 14px; color: var(--text); font-weight: 600; }
.keep small { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.as-on { --bc: var(--ok); } .as-off { --bc: var(--idle); } .as-invalid { --bc: var(--bad); }
.autosync-card > p + p { margin-top: 6px; }
.inline-form { grid-template-columns: 1fr auto; align-items: end; }
.inline-form .btn { margin: 0; }
@media (max-width: 520px) { .inline-form { grid-template-columns: 1fr; } }

/* ---------- landing page (the sign-in page, read while scrolling; motion in static/web/landing.js) ---------- */
body.landing { --intro-delay: 0s; }
body.landing .intro-screen { display: none; }  /* the hero is the intro here */
.bar-signin { margin-right: 6px; }
@keyframes l-settle { to { opacity: 1; translate: 0 0 0; } }

.l-hero { position: relative; min-height: calc(100svh - 150px); display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px;
  align-items: center; padding: 8px 0 72px; --p: 0; --tx: 0; --ty: 0; }
.l-hero .display.l-title { font-size: clamp(44px, 5.8vw, 80px); line-height: 1; margin: 24px 0 20px; }
.l-hero .lead { font-size: 18px; }
.unofficial { white-space: normal; }
.l-title .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .2em; margin-bottom: -.2em; }
.l-title .w > span { display: inline-block; }
html.motion .l-in { opacity: 0; translate: 0 16px; }
html.motion.l-go .l-in { animation: l-settle 1s var(--ease) forwards; animation-delay: calc(var(--d) * 90ms + 120ms); }
html.motion .l-title:not(.split) { opacity: 0; animation: show 0s 2s forwards; }  /* landing.js never ran: show it */
html.motion:not(.l-go) .l-in { animation: show 0s 2s forwards; }
html.motion .l-title .w > span { translate: 0 108%; }
html.motion.l-go .l-title .w > span { animation: l-settle 1.1s var(--ease) forwards; animation-delay: calc(var(--wi) * 75ms + 150ms); }

/* the stack: three cards of the real product, isometric; scrolling fans them apart, the pointer tilts them */
.l-stage { position: relative; height: 520px; perspective: 1700px; }
.l-stack { position: absolute; inset: 0; transform-style: preserve-3d; animation: l-float 7s ease-in-out infinite;
  transform: rotateX(calc(52deg - var(--p) * 16deg - var(--ty) * 10deg)) rotateZ(calc(-32deg + var(--p) * 10deg + var(--tx) * 10deg));
  transition: transform .8s var(--ease); }
@keyframes l-float { 50% { translate: 0 -12px; } }
.l-stack::before { content: ""; position: absolute; left: 50%; top: 50%; width: 330px; height: 220px; margin: -110px 0 0 -165px;
  border-radius: 26px; background: var(--text); opacity: .07; filter: blur(28px); transform: translateZ(-30px); }
html.motion .l-stack::before { opacity: 0; }
html.motion.l-go .l-stack::before { animation: l-shade 1.2s var(--ease) .45s forwards; }
html.l-skip .l-stack::before { animation: none; opacity: .07; }
@keyframes l-shade { to { opacity: .07; } }
.slab { position: absolute; left: 50%; top: 50%; width: 300px; height: 186px; margin: -93px 0 0 -150px; padding: 18px 20px;
  display: grid; align-content: start; gap: 10px; border-radius: 18px; background: var(--surface); color: var(--text);
  border: 1px solid var(--line-strong); box-shadow: 0 40px 60px -36px rgba(0, 0, 0, .45);
  transform: translateZ(calc(var(--z) * (70px + var(--p) * 120px))); }
html.motion .slab { opacity: 0; translate: 0 0 380px; }
html.motion.l-go .slab { animation: l-settle 1.2s var(--ease) forwards; animation-delay: calc(var(--d) * 120ms + 380ms); }
html.motion:not(.l-go) .slab { animation: show 0s 2s forwards; }
.slab-top { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.slab-top .ico { width: 16px; height: 16px; }
.slab-big { margin-left: auto; font-size: 30px; font-weight: 650; letter-spacing: -.04em; color: var(--text); }
.slab .bar-track { margin-top: 6px; }
.slab-task { font-size: 16px; font-weight: 650; letter-spacing: -.02em; }
.slab .countdown { font-size: 26px; margin-top: 6px; }
.slab-ai { background: var(--text); color: var(--bg); border-color: transparent; }
.slab-ai .slab-top { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.slab-ai .slab-top b { color: var(--bg); }
.slab-ai .avatar { width: 24px; height: 24px; border-radius: 7px; background: var(--bg); color: var(--text); margin: 0; }
.slab-ai .avatar .ico { width: 13px; height: 13px; }
.slab-q { font-size: 13px; color: color-mix(in srgb, var(--bg) 65%, transparent); }
.slab-a { font-size: 14.5px; line-height: 1.5; }
.slab-ai .cite { background: color-mix(in srgb, var(--bg) 18%, transparent); color: var(--bg); }

.l-scroll { position: absolute; left: 50%; bottom: 8px; translate: -50% 0; display: grid; justify-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; color: var(--muted); opacity: calc(1 - var(--p) * 5); transition: color .25s; }
.l-scroll:hover { color: var(--text); }
.l-scroll i { width: 1px; height: 42px; background: linear-gradient(var(--text), transparent); transform-origin: top;
  animation: l-cue 2.2s var(--ease-io) infinite; }
@keyframes l-cue { 0% { transform: scaleY(0); opacity: 1; } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* sections */
.l-section { padding: 96px 0 24px; }
.l-h2 { font-size: clamp(32px, 4.4vw, 54px); font-weight: 650; letter-spacing: -.045em; line-height: 1.04; max-width: 17ch;
  margin: 12px 0 48px; text-wrap: balance; }
.l-feature { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: center; padding: 56px 0; border-top: 1px solid var(--line); }
.l-feature.flip .l-copy { order: 2; }
.l-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.l-kicker .ico { width: 16px; height: 16px; }
.l-copy h3 { font-size: clamp(26px, 3vw, 38px); font-weight: 650; letter-spacing: -.04em; line-height: 1.08; margin: 14px 0 14px; }
.l-copy p { font-size: 17px; line-height: 1.6; color: var(--muted); max-width: 40ch; }
.l-demo { padding: 22px 24px; }

.demo-due .timeline b { font-weight: 600; }
html.motion .demo-due li { opacity: 0; translate: 14px 0; }
html.motion .demo-due.in li { animation: l-settle .8s var(--ease) forwards; animation-delay: calc(var(--k) * 140ms + 250ms); }
.demo-grades .bar-track > span { animation-delay: calc(var(--k) * 160ms + .35s); }

.demo-chat { min-height: 230px; display: grid; align-content: start; gap: 18px; }
.demo-chat .msg { animation: none; }
.demo-chat .msg.bot { opacity: 0; translate: 0 10px; transition: opacity .6s var(--ease), translate .6s var(--ease); }
.demo-chat.thinking .msg.bot, .demo-chat.answering .msg.bot { opacity: 1; translate: 0 0; }
.demo-chat .typing { display: none; }
.demo-chat.thinking .typing { display: inline-flex; }
.l-typed { margin: 0; color: var(--text-2); line-height: 1.7; }
.l-typed:empty { display: none; }
.demo-chat.answering:not(.answered) .l-typed::after { content: ""; display: inline-block; width: 2px; height: 1.05em; margin-left: 2px;
  vertical-align: -2px; background: var(--text); animation: l-caret 1s steps(1) infinite; }
@keyframes l-caret { 50% { opacity: 0; } }
.src-chip { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 3px 11px 3px 3px; border-radius: 999px;
  border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--text-2);
  opacity: 0; translate: 0 6px; transition: opacity .6s var(--ease), translate .6s var(--ease); }
.demo-chat.answered .src-chip { opacity: 1; translate: 0 0; }

.demo-card { perspective: 1400px; padding: 0; }
.l-flash { position: relative; height: 250px; transform-style: preserve-3d; }
.l-flash .face { gap: 12px; }
.l-flash .face-back { background: var(--text); color: var(--bg); border-color: transparent; }
.l-flash .face-back .eyebrow { color: color-mix(in srgb, var(--bg) 60%, transparent); }
.demo-card.in .l-flash { animation: l-flip 6s var(--ease-io) .8s infinite; }
@keyframes l-flip { 0%, 38% { transform: rotateY(0); } 50%, 88% { transform: rotateY(180deg); } 100% { transform: rotateY(360deg); } }

/* how it works: the line draws, the steps follow it */
.l-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; position: relative; }
.l-steps::before { content: ""; position: absolute; left: 22px; right: 22px; top: 22px; height: 1px; background: var(--line-strong);
  transform-origin: left; transform: scaleX(0); transition: transform 1.6s var(--ease) .2s; }
.l-steps.in::before, html:not(.motion) .l-steps::before { transform: none; }
.l-steps li { position: relative; display: grid; gap: 8px; align-content: start; }
.l-num { position: relative; z-index: 1; width: 44px; height: 44px; margin-bottom: 12px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 650; background: var(--bg); border: 1px solid var(--line-strong); }
.l-steps li:first-child .l-num { background: var(--text); color: var(--bg); border-color: var(--text); }
.l-steps b { font-size: 18px; font-weight: 650; letter-spacing: -.02em; }
.l-steps p { color: var(--muted); line-height: 1.6; max-width: 32ch; }
html.motion .l-steps li { opacity: 0; translate: 0 14px; }
html.motion .l-steps.in li { animation: l-settle .9s var(--ease) forwards; animation-delay: calc(var(--k) * 260ms + .35s); }

.l-trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.l-trust .card { padding: 26px; }
.l-trust b { display: block; margin: 18px 0 6px; font-size: 16.5px; font-weight: 650; }
.l-trust p { color: var(--muted); font-size: 14.5px; line-height: 1.6; }

/* the end of the story: sign in */
.l-signin { display: grid; grid-template-columns: 1fr 440px; gap: 56px; align-items: center; padding: 140px 0 80px; scroll-margin-top: 40px; }
.l-signin-head .l-h2 { margin-bottom: 16px; }
html.l-skip .l-in, html.l-skip .l-title .w > span, html.l-skip .slab { animation: none; opacity: 1; translate: none; }

@media (max-width: 900px) {
  .l-hero { grid-template-columns: 1fr; min-height: 0; padding-bottom: 40px; }
  .l-stage { height: 330px; margin: -10px 0 -20px; }
  .slab { width: 250px; height: 168px; margin: -84px 0 0 -125px; padding: 14px 16px; }
  .l-scroll { display: none; }
  .l-section { padding-top: 80px; }
  .l-feature { grid-template-columns: 1fr; gap: 28px; padding: 40px 0; }
  .l-feature.flip .l-copy { order: 0; }
  .l-steps, .l-trust { grid-template-columns: 1fr; }
  .l-steps::before { left: 22px; right: auto; top: 22px; bottom: 22px; width: 1px; height: auto; transform: scaleY(0); transform-origin: top; }
  .l-steps li { grid-template-columns: 44px 1fr; column-gap: 16px; }
  .l-steps li .l-num { grid-row: span 2; margin: 0; }
  .l-signin { grid-template-columns: 1fr; gap: 24px; padding-top: 90px; }
}
@media (max-width: 420px) {
  .bar-signin { display: none; }
  .l-hero .display.l-title { font-size: clamp(40px, 12vw, 56px); }
}
