/* Pages outside the app (landing, sign-in, invite, waitlist, email links, legal) and the in-app welcome.
   Only the tokens and components of /qiu/styles.css, plus the layouts these pages need. */

/* ---------- shell ---------- */
body.entry { display: flex; flex-direction: column; min-height: 100dvh; }
.entry-top, .entry-main { position: relative; z-index: 1; width: 100%; max-width: 1120px; margin: 0 auto; }
.entry-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(16px + var(--safe-t)) calc(20px + var(--safe-r)) 8px calc(20px + var(--safe-l)); }
.entry-main { flex: 1; padding: 20px calc(16px + var(--safe-r)) 64px calc(16px + var(--safe-l)); }
.entry-foot {
  position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 22px;
  padding: 22px 16px calc(22px + var(--safe-b)); border-top: 1px solid var(--line); color: var(--muted); font-size: 13px;
}
.entry-foot nav { display: flex; gap: 18px; }
.entry-foot a { color: inherit; text-underline-offset: 3px; }
.entry-foot a:hover { color: var(--fg); }
.entry-lang { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font: inherit; }
.entry-lang select { width: auto; field-sizing: content; min-height: 34px; padding: 6px 32px 6px 8px; border-color: transparent; background-color: transparent; background-position: right 10px center; color: var(--fg-2); font-size: 13px; }
.entry-lang select:hover { background-color: var(--surface-2); }
.btn.big { min-height: 54px; padding: 10px 26px; font-size: 16px; }
.btn .ico { flex: none; }
/* Long labels (French, German…) wrap instead of pushing the page sideways on a 320 px phone. */
body.entry .btn, .welcome .btn { white-space: normal; text-wrap: balance; text-align: center; line-height: 1.25; }
.brandmark { width: 20px; height: 20px; flex: none; }
:root:not([data-theme="light"]) .brandmark { filter: invert(1); }
.btn:not(.ghost, .quiet) .brandmark { filter: brightness(0) invert(1); }
@media (prefers-color-scheme: light) { :root[data-theme="system"] .brandmark { filter: none; } }
/* Google's logos keep their colours (its brand rules), on a white disc where they sit on a colour. */
.brandmark:is([src$="/google.svg"], [src$="/gmail.svg"], [src$="/googlecalendar.svg"], [src$="/googledrive.svg"]) { filter: none !important; }
.btn:not(.ghost, .quiet) .brandmark[src$="/google.svg"] { box-sizing: content-box; padding: 3px; border-radius: 50%; background: #fff; }
.orb { display: block; width: 88px; height: 88px; margin: 0 auto; filter: drop-shadow(0 18px 30px var(--orb-shadow)); animation: float 6s ease-in-out infinite; }

/* ---------- one-card pages (sign-in, invite, waitlist, notes) ---------- */
.entry-card { max-width: 460px; margin: clamp(8px, 4vh, 40px) auto 0; display: grid; gap: 22px; text-align: center; }
.entry-card h1 { font-size: clamp(28px, 6.4vw, 38px); }
.entry-card .lead { color: var(--fg-2); font-size: 16.5px; }
.entry-card .panel { display: grid; gap: 14px; padding: 20px; text-align: left; }
.entry-card .hint { color: var(--muted); font-size: 14px; }
.entry-card .hint b { color: var(--fg-2); font-weight: 600; }
.entry-card .hint a { color: var(--brand-text); font-weight: 600; text-underline-offset: 3px; }
.entry-card > *, .entry-card .panel > * { min-width: 0; }
.addr { display: block; margin: 6px 0; color: var(--fg); font-weight: 700; overflow-wrap: anywhere; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }
.badge-ico { display: grid; place-items: center; width: 68px; height: 68px; margin: 0 auto; border-radius: 22px; background: var(--brand-soft); color: var(--brand-text); border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent); }
.badge-ico .ico { width: 30px; height: 30px; }
.badge-ico.warn { background: color-mix(in srgb, var(--amber) 13%, transparent); color: var(--amber); border-color: color-mix(in srgb, var(--amber) 30%, transparent); }
.badge-ico.ok { background: color-mix(in srgb, var(--green) 13%, transparent); color: var(--green); border-color: color-mix(in srgb, var(--green) 30%, transparent); }
.feats { display: grid; gap: 4px; text-align: left; }
.feats .row { min-height: 0; padding: 12px 16px; align-items: flex-start; }
.feats .tile { color: var(--brand-text); background: var(--brand-soft); border-color: transparent; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice .btn { width: 100%; }
[data-state] > [data-show] { display: none; }
[data-state="ok"] > [data-show~="ok"], [data-state="used"] > [data-show~="used"], [data-state="invalid"] > [data-show~="invalid"],
[data-state="self"] > [data-show~="self"], [data-state="guest"] > [data-show~="guest"] { display: grid; gap: 22px; }
[data-mail="off"] [data-need-mail] { display: none !important; }
[data-via-show][hidden] { display: none !important; }
/* Sign-in: email or Telegram, then the 6-digit code; WhatsApp and SMS are shown, switched off, as coming soon. */
.si-via { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
.si-via button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; font-size: 14px; }
.si-via .ico, .si-via .brandmark { width: 17px; height: 17px; }
.si-soon { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; color: var(--muted); font-size: 13.5px; opacity: .8; }
.si-soon > span:not(.status) { display: inline-flex; align-items: center; gap: 6px; }
.si-soon .brandmark, .si-soon .ico { width: 16px; height: 16px; }
.si-code { display: grid; gap: 10px; text-align: left; }
.si-code label { color: var(--fg-2); font-size: 14px; }
.si-code input { text-align: center; font: 700 24px/1 var(--font-display); letter-spacing: .3em; font-variant-numeric: tabular-nums; }
.err { color: var(--red); font-size: 14px; min-height: 0; }
.err:empty { display: none; }

/* ---------- landing ---------- */
.hero { display: grid; gap: 28px; align-items: center; padding-top: clamp(4px, 3vh, 28px); }
@media (min-width: 900px) { .hero { grid-template-columns: 1.08fr .92fr; gap: 48px; padding-top: 7vh; } }
/* Quantum's .chapa: a small blue label; the plan cards put the «Q» and the plan's name in it */
.pill, .chapa { display: inline-flex; align-items: center; gap: 8px; width: fit-content; margin: 0; padding: 6px 13px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-text); font: 700 11px/1.3 var(--font); letter-spacing: .14em; text-transform: uppercase; }
.chapa .cuadrada { font-size: 12px; }
.q-logo { flex: none; width: 22px; height: 22px; margin: -3px 0 -3px -7px; padding: 3px; border-radius: 50%; background: #fff; } /* the Q has no white version: on black it sits on a white disc */
.hero .brand-h { display: flex; align-items: center; gap: 14px; font-size: 28px; margin: 0 0 22px; }
.hero .brand-h img { border-radius: 14px; }
.hero .display { font-size: clamp(38px, 5.2vw, 62px); line-height: 1.02; letter-spacing: -.028em; margin: 20px 0 18px; text-wrap: balance; }
.hero .lead { font-size: clamp(17px, 2.2vw, 19.5px); color: var(--fg-2); max-width: 32em; text-wrap: pretty; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.cta-sub { margin-top: 14px; color: var(--muted); font-size: 14px; }
/* Qiu's black block (black belongs to Qiu), in both themes */
.stage { position: relative; display: grid; place-items: center; min-height: clamp(330px, 44vw, 460px); padding: 20px; isolation: isolate; overflow: hidden;
  background: #000; border: 1px solid #26262B; border-radius: var(--r-xl); box-shadow: 0 22px 56px rgba(10, 10, 12, .30); }
.stage .halo { position: absolute; z-index: -1; width: min(88vw, 470px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(0, 65, 245, .45), rgba(89, 132, 248, .12) 46%, transparent 68%); filter: blur(14px); animation: breathe 3.6s ease-in-out infinite; }
.stage .orb { width: min(52vw, 300px); height: auto; aspect-ratio: 1; filter: drop-shadow(0 40px 60px var(--orb-shadow)); }
.stage .say { position: absolute; max-width: min(66%, 290px); padding: 11px 15px; border-radius: 20px; font-size: 14.5px; line-height: 1.45; box-shadow: var(--shadow-2); animation: pop var(--t) var(--ease) both; }
.stage .say.me { top: 6%; left: 5%; background: var(--brand); color: #fff; border-bottom-right-radius: 6px; }
.stage .say.qiu { bottom: 6%; right: 5%; display: flex; gap: 10px; align-items: flex-start; background: var(--glass); -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5); border: 1px solid var(--line-2); border-bottom-left-radius: 6px; animation-delay: .5s; }
.stage .say.qiu img { width: 24px; height: 24px; flex: none; }
.section { margin-top: clamp(64px, 10vw, 112px); display: grid; gap: 22px; }
.section-h { font-size: clamp(24px, 2.8vw, 38px); line-height: 1.1; text-wrap: balance; }
.examples { display: grid; gap: 14px; }
@media (min-width: 820px) { .examples { grid-template-columns: repeat(3, 1fr); } }
.example { display: grid; gap: 10px; align-content: start; padding: 16px; }
.example .bubble { max-width: 100%; animation: none; }
.example .reply { display: flex; gap: 10px; align-items: flex-end; }
.example .reply img { width: 26px; height: 26px; flex: none; }
.bento { display: grid; gap: 14px; }
@media (min-width: 820px) { .bento { grid-template-columns: 1.25fr 1fr; } .bento .big { grid-row: span 2; } }
.feature { display: grid; gap: 10px; align-content: start; padding: 22px; }
.feature .tile { width: 46px; height: 46px; border-radius: 15px; color: var(--brand-text); background: var(--brand-soft); border-color: transparent; }
.feature h3 { font-size: 19px; }
.feature p { color: var(--fg-2); }
.feature.big { align-content: space-between; gap: 28px; min-height: 250px; background: var(--surface-2); }
.feature.big h3 { font-size: clamp(22px, 3vw, 28px); }
.feature-text { display: grid; gap: 10px; }
@media (min-width: 820px) { .feature.big { grid-template-rows: 1fr auto; } .feature.big .mock { align-self: center; } }
.mock { display: grid; gap: 10px; max-width: 380px; padding: 16px; border-radius: 22px; background: var(--glass); border: 1px solid var(--line-2); box-shadow: var(--shadow-2);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); transform: rotate(-1.5deg); transform-origin: left top; }
.mock-h { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); }
.mock-h img { width: 26px; height: 26px; }
.mock p { color: var(--fg-2); font-size: 14px; }
.mock-b { display: flex; justify-content: flex-end; gap: 8px; }
.mock-b .btn { pointer-events: none; }
.logos { display: flex; flex-wrap: wrap; gap: 10px; }
.logos span { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 15px; background: var(--surface); border: 1px solid var(--line); transition: transform var(--t) var(--spring), border-color var(--t-fast); }
.logos span:hover { transform: translateY(-3px); border-color: var(--line-2); }
.logos .brandmark { width: 22px; height: 22px; opacity: .9; }
.team { display: grid; gap: 18px; padding: clamp(22px, 4vw, 36px); }
@media (min-width: 820px) { .team { grid-template-columns: auto 1fr; align-items: center; gap: 32px; } }
.team .faces { display: flex; }
.team .faces .avatar { --s: 54px; font-size: 19px; }
.team .faces .avatar + .avatar { margin-left: -14px; }
.team .faces .avatar:nth-child(2) { background: #25262B; }
.team .faces .avatar:nth-child(3) { background: #5C5C63; }
.team .faces .avatar:last-child { background: #000; }
.team .faces .avatar:last-child img { position: static; width: 40px; height: 40px; }
.team p { color: var(--fg-2); font-size: 16.5px; margin-top: 8px; max-width: 40em; }
/* the closing call to open QIU: Qiu's black block too, with the outline pill in white as on Quantum's black */
.band { display: grid; gap: 14px; justify-items: center; text-align: center; padding: clamp(30px, 6vw, 56px) 20px; border-radius: var(--r-xl); border: 1px solid #26262B;
  background: #000; color: #F5F5F7; }
.band p { color: #C7C7CC; max-width: 32em; }
.band .suave { color: #5984F8; }
.band .btn.ghost { color: #fff; border-color: rgba(255, 255, 255, .35); }
.band .btn.ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }
.band .btn { margin-top: 8px; }

.band .cta-row { margin-top: 8px; justify-content: center; }

/* ---------- /planes ---------- */
.plans-hero { display: grid; gap: 18px; justify-items: start; max-width: 780px; padding-top: clamp(4px, 3vh, 28px); }
.plans-hero .display { font-size: clamp(34px, 6.6vw, 60px); line-height: 1.04; letter-spacing: -.03em; text-wrap: balance; }
.plans-hero .lead { font-size: clamp(17px, 2.2vw, 19px); color: var(--fg-2); text-wrap: pretty; }
.plans { display: grid; gap: 16px; margin-top: 34px; }
@media (min-width: 900px) { .plans { grid-template-columns: repeat(3, 1fr); } }
.plan { position: relative; display: grid; grid-template-rows: auto auto auto 1fr auto; gap: 14px; padding: clamp(24px, 3vw, 34px); scroll-margin-top: 24px; }
.plan h2 { font-size: 21px; line-height: 1.28; }
.plan-d { color: var(--fg-2); }
.plan .btn { width: 100%; }
.plan:target { box-shadow: 0 0 0 3px var(--brand); }
.plan.featured { border-color: var(--brand); box-shadow: 0 20px 50px rgba(0, 65, 245, .10); }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; align-content: start; font-size: 15px; }
.ticks li { display: flex; gap: 9px; align-items: flex-start; }
.ticks .ico { flex: none; width: 18px; height: 18px; margin-top: 3px; color: var(--brand-text); }
.plans-note { margin-top: 16px; padding: 12px 16px; border-radius: var(--r); background: var(--brand-soft); color: var(--brand-text); font-weight: 600; }
.plans-note:empty { display: none; }
.plans-page .err { margin-top: 12px; }
.plans-legend { color: var(--fg-2); max-width: 46em; line-height: 1.9; }
.kind { display: inline-block; padding: 2px 9px; border-radius: 999px; font: 600 12px/1.5 var(--font); vertical-align: 2px; white-space: nowrap; }
.kind.app { background: var(--surface-2); color: var(--fg-2); }
.kind.dfy { background: var(--brand-soft); color: var(--brand-text); }
.incl { display: grid; gap: 12px; }
@media (min-width: 820px) { .incl { grid-template-columns: 1fr 1fr; } }
.incl > .card:not(.feature) { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; padding: 18px; }
.incl .tile { color: var(--brand-text); background: var(--brand-soft); border-color: transparent; }
.incl h3 { font-size: 17px; margin-bottom: 6px; }
.incl p { color: var(--fg-2); }
.faq { display: grid; gap: 10px; max-width: 780px; }
.faq details { padding: 16px 18px; }
.faq summary { display: flex; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; font-weight: 700; font-size: 16.5px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--muted); font-weight: 500; }
.faq details[open] summary::after { content: '−'; }
.faq p { margin-top: 10px; color: var(--fg-2); }

/* ---------- documents (legal pages, feedback) ---------- */
.doc { max-width: 720px; margin: 0 auto; display: grid; gap: 14px; color: var(--fg-2); font-size: 15.5px; line-height: 1.65; }
.doc h1 { color: var(--fg); margin-bottom: 4px; }
.doc h2 { color: var(--fg); margin-top: 18px; }
.doc ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.doc a { color: var(--brand-text); text-underline-offset: 3px; }
.doc strong { color: var(--fg); }
.legal-note { padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); }
.legal-note:empty { display: none; }
.fb-list { display: grid; gap: 12px; }
.fb-item { display: grid; gap: 10px; padding: 18px; scroll-margin: 96px; }
.fb-item.focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft), var(--shadow-1); }
.fb-item .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.fb-item .reply { padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); white-space: pre-wrap; color: var(--fg); }
.fb-item .reply b { display: block; margin-bottom: 4px; color: var(--brand-text); font-size: 13px; }

/* ---------- the in-app welcome (/app/welcome) ---------- */
body[data-screen="welcome"] #tabbar, body[data-screen="welcome"] #split { display: none !important; }
body[data-screen="welcome"] #app { display: block; }
body[data-screen="welcome"] #view { padding: calc(14px + var(--safe-t)) calc(16px + var(--safe-r)) calc(24px + var(--safe-b)) calc(16px + var(--safe-l)); }
.welcome { max-width: 500px; min-height: calc(100dvh - 40px - var(--safe-t) - var(--safe-b)); margin: 0 auto; display: grid; grid-template-rows: auto 1fr; gap: 16px; }
.w-top { display: flex; align-items: center; gap: 14px; min-height: 44px; }
.w-progress { flex: 1; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.w-progress i { height: 4px; border-radius: 2px; background: var(--surface-3); transition: background var(--t) var(--ease); }
.w-progress i.on { background: linear-gradient(90deg, var(--brand), var(--cyan)); }
.w-step { display: grid; gap: 22px; align-content: center; text-align: center; padding-bottom: 8vh; animation: view-in var(--t) var(--ease); }
.w-step h1 { font-size: clamp(28px, 7vw, 36px); }
.w-step .lead { color: var(--fg-2); font-size: 16px; }
.w-step form, .w-step .left { display: grid; gap: 14px; text-align: left; }
.w-step .orb { width: 116px; height: 116px; }
/* Qiu says hello (sphere + bubble) when the welcome starts straight at Google */
.w-greet { display: flex; align-items: center; gap: 12px; text-align: left; }
.w-greet img { flex: none; filter: drop-shadow(0 10px 18px var(--orb-shadow)); }
.w-greet > div { flex: 1; padding: 12px 14px; border-radius: 6px 20px 20px 20px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-1); }
.w-greet-h { font: 700 16px/1.3 var(--font-display); margin-bottom: 3px; }
.w-tile { display: grid; place-items: center; width: 80px; height: 80px; margin: 0 auto; border-radius: 26px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-1); }
.w-tile .brandmark { width: 36px; height: 36px; }
.w-tile:has(.brandmark[src$="/google.svg"]) { background: #fff; }
.w-tile.tg { background: #229ED9; border-color: transparent; }
.w-tile.tg .brandmark { filter: invert(1); }
.w-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.w-chips span { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--fg-2); font-size: 13.5px; font-weight: 500; }
.w-chips .brandmark { width: 15px; height: 15px; }
.w-qr { width: 176px; margin: 0 auto; padding: 14px; border-radius: 20px; background: #fff; box-shadow: var(--shadow-2); }
.w-qr svg { width: 100%; height: auto; }
.w-actions { display: grid; gap: 10px; }
.w-channels { text-align: left; }
.w-channels .row.off { opacity: .55; } /* WhatsApp: shown, switched off, until the channel exists */
.w-done { display: inline-flex; margin: 0 auto; }
.w-ex .row .title { font-weight: 500; }
.w-ex .tile { color: var(--brand-text); background: var(--brand-soft); border-color: transparent; }
@media (max-width: 767px) { .w-qr, .w-qr-cap { display: none !important; } } /* on a phone, the button already opens Telegram */
