/* ZIGEN sign-up questions: FEIVO's onboarding. On a phone, one white column of question pages with a progress
   line, grey option rows and a black Continue pill. On a wide screen the same column sits in a large rounded
   card beside a sky panel with a floating phone and a "Your plan so far" card that fills in as you answer. */

@import url("zigen.css");

:root {
  --page: #fff;
  --s-ink: #111;
  --s-muted: #76767e;
  --s-faint: #b9b9c0;
  --hairline: #ededf0;
  --fill: #f6f6f8;
  --disabled: #c9c9ce;
  --s-accent: #185bff;
  --green: #1f9d55; --red: #d1453b;
  --body-bg: #eef3fb;
  --sky-top: #8ec5ff;
  --sky-bottom: #e7f0fb;
  --cloud: rgb(255 255 255 / .9);
  --glass-card: rgb(255 255 255 / .8);
  --glass-edge: rgb(255 255 255 / .8);
  --mark: #0f1a2e;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #161616; --s-ink: #f2f2f2; --s-muted: #9a9aa2; --s-faint: #5d5d64; --hairline: #2a2a2e; --fill: #232326; --disabled: #3a3a3e; --s-accent: #8fb0ff; --green: #5cc28e; --red: #ff7b6e;
    --body-bg: #0b111c; --sky-top: #0f2340; --sky-bottom: #1b2c45; --cloud: rgb(160 190 230 / .16); --glass-card: rgb(30 34 44 / .82); --glass-edge: rgb(255 255 255 / .08); --mark: #fff;
  }
}
:root[data-theme="dark"] {
  --page: #161616; --s-ink: #f2f2f2; --s-muted: #9a9aa2; --s-faint: #5d5d64; --hairline: #2a2a2e; --fill: #232326; --disabled: #3a3a3e; --s-accent: #8fb0ff; --green: #5cc28e; --red: #ff7b6e;
  --body-bg: #0b111c; --sky-top: #0f2340; --sky-bottom: #1b2c45; --cloud: rgb(160 190 230 / .16); --glass-card: rgb(30 34 44 / .82); --glass-edge: rgb(255 255 255 / .08); --mark: #fff;
}

html, body.start { height: 100%; background: var(--body-bg); }
body.start { color: var(--s-ink); font-family: var(--display); letter-spacing: 0; }

/* The sky: drawn here (no photo), the blue of FEIVO's with soft clouds. */
.sky { background:
  radial-gradient(120px 60px at 18% 22%, var(--cloud), transparent 70%),
  radial-gradient(180px 70px at 30% 26%, var(--cloud), transparent 70%),
  radial-gradient(160px 60px at 78% 12%, var(--cloud), transparent 70%),
  radial-gradient(240px 90px at 88% 18%, var(--cloud), transparent 72%),
  radial-gradient(220px 80px at 12% 78%, var(--cloud), transparent 72%),
  radial-gradient(300px 110px at 70% 88%, var(--cloud), transparent 72%),
  linear-gradient(180deg, var(--sky-top), var(--sky-bottom)); }
.backdrop { position: fixed; inset: 0; opacity: .55; }
.backdrop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 0%, color-mix(in oklab, var(--body-bg) 90%, transparent) 70%); }

.fa { position: relative; display: flex; flex-direction: column; max-width: 460px; height: 100dvh; margin: 0 auto; overflow: hidden; background: var(--page); }
@media (min-width: 700px) {
  .fa { height: min(100dvh - 48px, 920px); margin-top: 24px; border-radius: 34px; box-shadow: 0 30px 80px -30px rgb(22 36 74 / .35); }
}
.fa-top { display: flex; height: 52px; flex: none; align-items: center; gap: 10px; padding: 0 12px; padding-top: env(safe-area-inset-top, 0px); box-sizing: content-box; }
.fa-iconbtn { display: grid; width: 44px; height: 44px; flex: none; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--s-ink); }
.fa-iconbtn:hover { background: var(--fill); }
.fa-iconbtn .ico { width: 20px; height: 20px; }
.fa-progress { position: relative; height: 4px; flex: 1; margin-right: 20px; overflow: hidden; border-radius: 99px; background: var(--hairline); }
.fa-progress i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: var(--s-ink); transition: width .5s var(--spring); }
.fa-stage { position: relative; flex: 1; overflow: hidden; }
.fa-page { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--page); }
.fa-page.in { animation: fa-in .42s var(--spring); }
.fa-page.back-in { animation: fa-back-in .42s var(--spring); }
@keyframes fa-in { from { transform: translateX(28px); opacity: 0; } }
@keyframes fa-back-in { from { transform: translateX(-28px); opacity: 0; } }
.fa-scroll { flex: 1; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.fa-scroll::-webkit-scrollbar { display: none; }
.fa-content { display: flex; min-height: 100%; flex-direction: column; padding: 14px 24px 24px; }
.fa-bottom { display: flex; flex: none; flex-direction: column; gap: 12px; padding: 10px 24px max(12px, env(safe-area-inset-bottom, 0px)); background: var(--page); }

.fa-reveal { opacity: 0; transform: translateY(14px); animation: fa-rise .55s var(--spring) forwards; animation-delay: calc(.06s + var(--o, 0) * .07s); }
@keyframes fa-rise { to { opacity: 1; transform: none; } }

.fa-header { display: flex; flex-direction: column; gap: 8px; }
.fa-title { margin: 0; font-size: 30px; font-weight: 700; line-height: 1.18; letter-spacing: -.01em; text-wrap: balance; }
.fa-sub { margin: 0; color: var(--s-muted); font-size: 15px; font-weight: 500; line-height: 1.45; }
.fa-options { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.fa-option { display: flex; width: 100%; min-height: 60px; align-items: center; gap: 14px; padding: 0 18px; border: 1.6px solid transparent; border-radius: 16px; background: var(--fill); color: var(--s-ink); text-align: left; transition: transform .12s ease-out, opacity .12s, background .2s, border-color .2s; }
.fa-option.has-detail { min-height: 68px; }
.fa-option.is-on { border-color: var(--s-ink); background: var(--page); }
.fa-option:active { transform: scale(.975); opacity: .9; }
.fa-option-icon { display: grid; width: 28px; height: 28px; flex: none; place-items: center; font: 400 22px/1 var(--hanzi); }
.fa-option-icon .ico { width: 21px; height: 21px; }
.fa-option-text { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 2px; padding: 12px 0; }
.fa-option-title { font-size: 16px; font-weight: 600; }
.fa-option-detail { color: var(--s-muted); font-size: 13px; font-weight: 500; }
.fa-radio { position: relative; width: 22px; height: 22px; flex: none; border: 1.4px solid rgb(185 185 192 / .7); border-radius: 50%; transition: border .25s var(--spring); }
.is-on > .fa-radio { border: 6px solid var(--s-ink); }
.fa-primary { display: flex; width: 100%; min-height: 56px; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 99px; background: var(--s-ink); color: var(--page); font: 700 17px/1 var(--display); transition: background .2s, transform .12s, opacity .12s; }
.fa-primary:disabled { background: var(--disabled); color: #fff; cursor: default; }
.fa-primary:not(:disabled):active { transform: scale(.975); opacity: .9; }
.fa-primary .ico { width: 18px; height: 18px; }
.fa-enter-hint { display: none; color: var(--s-muted); font-size: 12px; font-weight: 600; text-align: center; }
.fa-enter-hint kbd { padding: 2px 6px; border: 1px solid var(--hairline); border-radius: 6px; background: var(--fill); color: var(--s-muted); font: inherit; height: auto; }
.fa-card { padding: 20px; border-radius: 22px; background: var(--fill); }
/* The level check: the character big, its four meanings, and a quieter "I don't know" */
.fa-kicker { margin: 0; color: var(--s-muted); font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.fa-title.check-glyph { font: 400 64px/1.15 var(--hanzi); letter-spacing: 0; }
.fa-option.is-quiet { min-height: 48px; background: none; border-color: var(--hairline); color: var(--s-muted); }
.fa-option.is-right { border-color: var(--green); background: color-mix(in oklab, var(--green) 14%, var(--page)); }
.fa-option.is-wrong { border-color: var(--red); background: color-mix(in oklab, var(--red) 12%, var(--page)); }
.fa-option:disabled { cursor: default; }
.fa-hero-glyph { display: grid; place-items: center; width: 148px; height: 148px; margin: 26px auto 6px; border-radius: 34px; background: var(--s-ink); color: var(--page); font: 400 92px/1 var(--hanzi); box-shadow: 0 24px 50px -24px rgb(0 0 0 / .45); animation: fa-pop .5s var(--spring); }
@keyframes fa-pop { from { opacity: 0; transform: scale(.7); } }
.fa-center { align-items: center; text-align: center; }

/* Plan lines, in the side card on wide screens and on the last page everywhere */
.plan-line { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; border-top: 1px solid var(--hairline); }
.plan-line > span { flex: none; color: var(--s-muted); font-size: 12px; font-weight: 600; }
.plan-line > strong { font-size: 14px; font-weight: 700; text-align: right; }
.plan-line.is-new { animation: fa-rise .45s var(--spring) both; }
.plan-empty { margin: 4px 0 12px; color: var(--s-muted); font-size: 14px; font-weight: 500; line-height: 1.45; }

/* The aside: hidden on phones */
.fa-aside { display: none; }

@media (min-width: 1024px) {
  body.start { display: grid; min-height: 100dvh; place-items: center; }
  .fa {
    display: grid; width: min(1200px, calc(100vw - 64px)); max-width: none; height: min(800px, calc(100dvh - 64px)); margin: 0;
    grid-template-columns: minmax(0, 1fr) minmax(400px, 44%); grid-template-rows: auto minmax(0, 1fr) auto; border-radius: 32px;
  }
  .fa-top { grid-column: 1; height: 64px; padding: 0 24px; }
  .fa-stage { grid-column: 1; grid-row: 2; }
  .fa-bottom { grid-column: 1; grid-row: 3; padding: 12px max(32px, calc((100% - 560px) / 2)) 26px; }
  .fa-content { width: 100%; max-width: 624px; margin: 0 auto; padding: 20px 32px 32px; }
  .fa-title { font-size: 34px; }
  .fa-option[data-key]::after { content: attr(data-key); display: grid; width: 22px; height: 22px; flex: none; order: 4; place-items: center; border: 1px solid var(--hairline); border-radius: 6px; background: var(--page); color: var(--s-muted); font-size: 11px; font-weight: 700; }
  .fa-option > .fa-radio { order: 5; }
  .fa-enter-hint { display: block; }
  .fa-last-plan { display: none; }

  .fa-aside { position: relative; display: flex; grid-column: 2; grid-row: 1 / -1; flex-direction: column; align-items: center; justify-content: center; gap: 18px; overflow: hidden; padding: 64px 32px 32px; }
  .fa-aside::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, color-mix(in oklab, var(--sky-bottom) 70%, transparent)); }
  .fa-aside > * { position: relative; }
  .aside-mark { position: absolute !important; top: 26px; left: 30px; display: flex; align-items: baseline; gap: 4px; color: var(--mark); }
  .aside-mark b { font: 800 19px/1 var(--display); letter-spacing: -.02em; }
  .aside-mark span { font: 400 19px/1 var(--hanzi); }
  .aside-caption { position: absolute !important; top: 20px; right: 26px; display: flex; align-items: center; gap: 8px; padding: 6px 13px 6px 6px; border: 1px solid var(--glass-edge); border-radius: 99px; background: var(--glass-card); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); font-size: 13px; font-weight: 600; }
  .aside-caption > span { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: var(--s-ink); color: var(--page); }
  .aside-caption .ico { width: 12px; height: 12px; stroke-width: 2.4; }
  .aside-phone { flex: none; animation: fa-float 7s ease-in-out infinite; }
  @keyframes fa-float { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-10px) rotate(1deg); } }
  .aside-chip { position: absolute !important; top: 30%; left: calc(50% + 70px); z-index: 2; display: flex; width: max-content; max-width: 210px; align-items: center; gap: 9px; padding: 10px 13px; border: 1px solid var(--glass-edge); border-radius: 16px; background: var(--glass-card); box-shadow: 0 16px 34px -16px rgb(22 36 74 / .45); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); font-size: 13px; font-weight: 500; line-height: 1.3; opacity: 0; transform: translate(-12px, 6px) scale(.92); transform-origin: 0 50%; transition: opacity .3s, transform .45s var(--spring); pointer-events: none; }
  .aside-chip.is-on { opacity: 1; transform: none; }
  .aside-chip .tick { display: grid; width: 18px; height: 18px; flex: none; place-items: center; border-radius: 50%; background: var(--green); color: #fff; }
  .aside-chip .tick .ico { width: 11px; height: 11px; stroke-width: 3; }
  .plan-card { width: min(380px, 100%); max-height: calc(100% - 330px); overflow: auto; padding: 18px 20px 8px; border: 1px solid var(--glass-edge); border-radius: 22px; background: var(--glass-card); box-shadow: 0 18px 44px -22px rgb(22 36 74 / .4); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); scrollbar-width: none; }
  .plan-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 15px; font-weight: 700; }
  .plan-card-head .hz { font-size: 20px; color: var(--seal); }
}
@media (min-width: 1024px) and (max-height: 760px) { .aside-phone { transform: scale(.85); } }

/* A phone drawn in CSS showing a ZIGEN lesson card */
.phone { position: relative; width: 196px; height: 400px; padding: 9px; border-radius: 40px; background: #111; box-shadow: inset 0 0 0 1.5px #3a3a3a, 0 30px 60px -25px rgb(10 25 60 / .55); }
.phone .screen { position: relative; height: 100%; overflow: hidden; border-radius: 32px; background: #141414; display: flex; flex-direction: column; }
.phone .island { position: absolute; top: 8px; left: 50%; width: 62px; height: 18px; margin-left: -31px; border-radius: 99px; background: #000; z-index: 2; }
.phone .bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px 0; height: 34px; color: #fff; font: 600 9px/1 var(--ui); }
.phone .head { display: flex; align-items: baseline; gap: 3px; padding: 8px 14px 10px; color: #fff; }
.phone .head b { font: 800 11px/1 var(--display); }
.phone .head span { font: 400 11px/1 var(--hanzi); }
.phone .panel { flex: 1; border-radius: 14px 14px 0 0; background: #fbfbfb; padding: 12px 10px; display: grid; align-content: start; gap: 8px; color: #303030; }
.phone .eyebrow { font: 500 7px/1 var(--ui); color: #8a8a8a; }
.phone .ttl { font: 650 13px/1.1 var(--display); letter-spacing: -.02em; }
.phone .card { display: grid; justify-items: center; gap: 4px; padding: 12px 8px 10px; border: 1px solid #e3e3e3; border-radius: 12px; background: #fff; }
.phone .pill { justify-self: start; padding: 2px 6px; border-radius: 99px; background: #303030; color: #fff; font: 600 6px/1.4 var(--ui); }
.phone .g { display: grid; place-items: center; width: 74px; height: 74px; border: 1px solid #e3e3e3; border-radius: 12px; background-image: linear-gradient(#ebebeb 1px, transparent 1px), linear-gradient(90deg, #ebebeb 1px, transparent 1px); background-size: 50% 50%; background-position: center; font: 400 50px/1 var(--hanzi); }
.phone .py { font: 600 11px/1 var(--ui); }
.phone .m { font: 650 11px/1.2 var(--display); }
.phone .go { justify-self: stretch; margin-top: 4px; padding: 7px; border-radius: 99px; background: #303030; color: #fff; font: 700 8px/1 var(--display); text-align: center; }
.phone .tabs { position: absolute; left: 8px; right: 8px; bottom: 10px; display: flex; gap: 5px; align-items: center; }
.phone .tabs i { display: block; width: 22px; height: 22px; border-radius: 50%; background: rgb(255 255 255 / .94); box-shadow: 0 4px 10px rgb(0 0 0 / .14); }
.phone .tabs b { flex: 1; height: 24px; border-radius: 99px; background: rgb(255 255 255 / .94); box-shadow: 0 4px 10px rgb(0 0 0 / .14); }
.phone .tabs i:last-child { background: radial-gradient(circle at 35% 30%, #fde4e1, #f7b4ab 22%, #a39ef7 55%, #738cf7 85%); }

@media (prefers-reduced-motion: reduce) {
  .fa-reveal { opacity: 1; transform: none; animation: none; }
  .aside-phone { animation: none; }
}
