/* ==========================================================================
   onboarding.css: the pages of DEV-302's approved onboarding design.
   Two compositions: "Prisma calmo" (paper, the wordmark, one centred column,
   the prism ribbons under it) and the split page (paper on the left, the
   #1e1d1b stage on the right). On a phone (≤680px) the split page takes the
   calm composition, with a short ribbon band above the content.
   Self-contained: it does not load landing.css, and Inter is served from
   /static/fonts, so these pages ask nothing of a third party.
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/static/fonts/inter-latin.woff2') format('woff2');
}

:root {
  --paper: #fbf9f5; --surface: #fff; --soft: #f6f3ee;
  --text: #1e293b; --text2: #64748b; --muted: #94a3b8;
  --border: #e6e0d2; --border-strong: #d3cab5;
  --accent: #0f766e; --accent-strong: #115e59; --accent-soft: #eaf6f3;
  --stage: #1e1d1b; --teal-lt: #8fd3c6;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --display: Georgia, 'Iowan Old Style', 'Palatino Linotype', serif;
  --ease: cubic-bezier(.4, 0, .2, 1);
  --ease-open: cubic-bezier(.16, 1, .3, 1);
  --move: cubic-bezier(.45, 0, .25, 1);
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 .055 0 0 0 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  /* the split page's heading size and margins follow the window */
  --hs: clamp(40px, min(3.6vw, 6.4vh), 54px);
  --pp-x: clamp(48px, 6.5vw, 96px);
  --pp-top: clamp(28px, 6vh, 50px);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { min-height: 100vh; min-height: 100dvh; background: var(--paper); font-family: var(--font); color: var(--text); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ── type and the wordmark ─────────────────────────────────────────────── */
/* "the" small and underlined, "Companion" bold (design-language §11) */
.wm { display: inline-flex; align-items: flex-end; gap: 8px; font-family: var(--display); color: var(--text); text-decoration: none; }
.wm .the { font-size: 24px; font-weight: 400; line-height: 1; letter-spacing: -.01em; border-bottom: 1.3px solid currentColor; padding: 0 2px 2px 0; }
.wm .co { font-size: 24px; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
/* A page heading marks at most one key noun in italics (UI-SPEC O25, O38). */
.h1 { margin: 0; font-family: var(--display); font-weight: 700; line-height: 1.05; letter-spacing: -.032em; color: var(--text); text-wrap: balance; }
.h1 em { font-style: italic; font-weight: 400; color: var(--accent); letter-spacing: -.02em; }
.h1:focus { outline: none; }
.eyebrow { margin: 0 0 16px; font: 700 11.5px/1.2 var(--font); letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.pbody { margin: 18px 0 0; font-size: 17px; line-height: 1.55; color: var(--text2); max-width: 30em; text-wrap: pretty; }
.who { margin: 12px 0 0; font-size: 14px; color: var(--text2); }
.who b { font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.who .sep { margin: 0 7px; color: var(--muted); }

/* ── actions ───────────────────────────────────────────────────────────── */
/* "C, Contorno Companion" (DEV-357): white, a 1.5px warm outline, the radius
   of the subject cards, Google's own colour G. */
.gbtn { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 54px; border-radius: 10px; background: #fff; border: 1.5px solid var(--border-strong);
  font: 600 16px/1 var(--font); letter-spacing: -.005em; color: var(--text); text-decoration: none; cursor: pointer;
  transition: border-color .18s var(--ease), box-shadow .2s var(--ease), transform .28s var(--ease-open); }
.gbtn:hover { border-color: #bdb29a; transform: translateY(-1px); box-shadow: 0 10px 22px -14px rgba(30,41,59,.35); }
.gbtn svg { flex: none; width: 20px; height: 20px; }
.pbtn { height: 50px; padding: 0 24px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; font: 600 16px/1 var(--font); white-space: nowrap; letter-spacing: -.003em; cursor: pointer; text-decoration: none;
  transition: background .18s var(--ease), box-shadow .18s var(--ease), transform .28s var(--ease-open), opacity .2s; }
.pbtn.p { background: var(--accent); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 2px 8px rgba(15,118,110,.18); }
.pbtn.p:hover { background: var(--accent-strong); transform: translateY(-1px); box-shadow: 0 8px 18px -6px rgba(15,118,110,.45); }
.pbtn.full { width: 100%; }
/* off until the form is ready (aria-disabled keeps it in the Tab order, and a
   press says why); native disabled is only for a request in flight */
.pbtn.p[aria-disabled="true"], .pbtn.p:disabled { opacity: .42; cursor: not-allowed; transform: none; box-shadow: none; background: var(--accent); }
.pbtn.p[data-sending] { opacity: 1; cursor: progress; }
.q-link { display: inline-block; margin-top: 26px; font-size: 14.5px; line-height: 1.3; color: var(--text2); cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--border-strong); text-decoration-thickness: 1px; text-underline-offset: 4px; transition: color .18s, text-decoration-color .18s; }
.q-link:hover { color: var(--text); text-decoration-color: var(--text2); }
.lnk { font-weight: 600; color: var(--accent); cursor: pointer; text-decoration: none; }
.lnk:hover { text-decoration: underline; text-underline-offset: 3px; }
.legal { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 13px; color: var(--text2); }
.legal a { text-decoration: none; }
.legal a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.legal i { font-style: normal; color: var(--muted); }

/* ── fields ────────────────────────────────────────────────────────────── */
.fgrid { display: grid; gap: 14px; width: 100%; }
.fgrid.c2 { grid-template-columns: 1fr 1fr; }
.fld { display: flex; flex-direction: column; gap: 7px; min-width: 0; text-align: left; }
.fld > label, .flabel { margin: 0; font-size: 12.5px; font-weight: 600; letter-spacing: .01em; color: var(--text2); }
.fin { display: block; width: 100%; height: 48px; margin: 0; padding: 0 14px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--surface); font: 400 15.5px/1.3 var(--font); color: var(--text); appearance: none;
  transition: border-color .18s var(--ease), box-shadow .2s var(--ease); }
.fin::placeholder { color: #a3abb8; opacity: 1; }
.fin:hover { border-color: var(--border-strong); }
.fin:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(15,118,110,.10); }
.fin:disabled { background: var(--soft); color: var(--text2); cursor: not-allowed; }
.fin[readonly] { background: var(--soft); }
select.fin { padding-right: 38px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.fin.bad { border-color: #c98261; box-shadow: 0 0 0 4px rgba(180,85,45,.08); }
.fpw { position: relative; }
.fpw .fin { padding-right: 50px; }
.eye { position: absolute; right: 6px; top: 50%; width: 36px; height: 36px; margin-top: -18px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); transition: background .15s, color .15s; }
.eye:hover { color: var(--text2); background: var(--soft); }
.eye svg { width: 18px; height: 18px; }
/* what Google proved, read-only: the G, the address, a lock */
.locked { display: flex; align-items: center; gap: 12px; height: 50px; padding: 0 16px; border-radius: 11px; background: var(--soft); box-shadow: inset 0 0 0 1px var(--border); font-size: 15px; color: var(--text); text-align: left; }
.locked .g { flex: none; width: 18px; height: 18px; }
.locked .g svg { display: block; width: 100%; height: 100%; }
.locked .em { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.locked .lk { flex: none; width: 15px; height: 15px; color: var(--muted); }
.locked .lk svg { display: block; width: 100%; height: 100%; }

/* The Termos de Uso and the Política de Privacidade: one required box each.
   The real checkbox sits, transparent, over the drawn one: it takes the
   click, the keyboard and the screen reader. Pressing the action before both
   are ticked makes the empty boxes shake. */
.checks { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.chk { position: relative; display: flex; align-items: flex-start; gap: 12px; font-size: 14.5px; line-height: 1.45; color: var(--text2); cursor: pointer; text-align: left; }
.chk input { position: absolute; z-index: 1; left: 0; top: 0; width: 20px; height: 20px; margin: 0; opacity: 0; cursor: pointer; }
.chk-box { flex: none; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--border-strong); background: var(--surface); display: grid; place-items: center; color: #fff; transition: background .18s var(--ease-open), border-color .18s var(--ease-open), box-shadow .3s; }
.chk-box svg { width: 12px; height: 12px; opacity: 0; transform: scale(.6); transition: opacity .18s var(--ease-open), transform .28s var(--ease-open); }
.chk:hover .chk-box { border-color: var(--accent); }
.chk input:checked + .chk-box { background: var(--accent); border-color: var(--accent); }
.chk input:checked + .chk-box svg { opacity: 1; transform: none; }
.chk input:focus-visible + .chk-box { box-shadow: 0 0 0 3px rgba(15,118,110,.25); }
.chk.nudge { animation: shake .5s var(--ease) both; }
.chk.nudge .chk-box { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(15,118,110,.16); }
.chk a { font-weight: 600; color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; text-decoration-color: rgba(15,118,110,.35); }
.chk a:hover { color: var(--accent-strong); text-decoration-color: currentColor; }

/* what the server answered, under the form; a second line says what to do */
.falert { display: flex; align-items: flex-start; gap: 10px; width: 100%; margin-top: 16px; padding: 12px 14px; border-radius: 10px; text-align: left;
  background: #fbf1ea; box-shadow: inset 0 0 0 1px #f0d9cb; font-size: 14px; line-height: 1.45; color: #7a3315; animation: swapIn .42s var(--ease-open) both; }
.falert > svg { flex: none; width: 16px; height: 16px; margin-top: 2px; color: #b4552d; }
.falert .more { display: block; margin-top: 2px; color: #8f604b; }
.falert a { color: #7a3315; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(122,51,21,.35); }
/* a short note on the paper, such as the reset flash */
.fnote { width: 100%; padding: 11px 15px; border-radius: 10px; background: var(--accent-soft); box-shadow: inset 0 0 0 1px #d6ebe6; color: var(--accent-strong); font-size: 13.5px; line-height: 1.5; text-align: left; }

/* the check that answers a success */
.okc { display: block; width: 56px; height: 56px; overflow: visible; }
.okc .bg { fill: var(--accent-soft); transform-origin: 30px 30px; animation: okBg .7s var(--ease-open) both; }
.okc .ring { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 170; transform: rotate(-90deg); transform-origin: 30px 30px; animation: okDraw .9s .1s var(--ease-open) both; }
.okc .tick { fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 32; animation: okTick .55s .62s var(--ease-open) both; }
.okhead { display: block; margin-bottom: 18px; }

/* ── the ribbons ───────────────────────────────────────────────────────── */
.rb-host { position: absolute; left: 0; top: 0; pointer-events: none; }
.rb { position: absolute; left: 0; top: 0; overflow: visible; }
.rb .th { fill: none; stroke-width: 1; }
.rb-ic { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 1; will-change: transform; }
.rb-in { position: absolute; left: 0; top: 0; display: grid; place-items: center; border-radius: 50%; opacity: 0; transform: translate(-50%, -50%) scale(.55); transition: opacity .6s var(--ease-open), transform .8s var(--ease-open); }
.rb-ic.on .rb-in { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.rb-in svg { display: block; }
.ic-paper .rb-in { width: 34px; height: 34px; background: #fffdf9; color: var(--c); box-shadow: 0 0 0 1.25px var(--c), 0 0 0 5px rgba(251,249,245,.7), 0 8px 16px -8px rgba(30,29,27,.3); }
.ic-paper .rb-in svg { width: 15px; height: 15px; }
.ic-paper.sm .rb-in { width: 26px; height: 26px; box-shadow: 0 0 0 1.1px var(--c), 0 0 0 4px rgba(251,249,245,.7), 0 6px 12px -6px rgba(30,29,27,.3); }
.ic-paper.sm .rb-in svg { width: 12px; height: 12px; }
.ic-dark .rb-in { width: 42px; height: 42px; background: #262523; color: var(--c); box-shadow: 0 0 0 1.5px var(--c), 0 0 0 6px rgba(30,29,27,.55), 0 0 26px -2px color-mix(in srgb, var(--c) 55%, transparent); }
.ic-dark .rb-in svg { width: 18px; height: 18px; }

/* ── Prisma calmo ──────────────────────────────────────────────────────── */
/* The page grows with a tall step and scrolls as a whole; the ribbons run
   in the band the script reserves under the column (--band). */
.calm { position: relative; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; padding: 0 24px; background: var(--paper); overflow: hidden; }
.calm > .rb-host { inset: 0; overflow: hidden; }
.calm > .wm { position: relative; z-index: 2; flex: none; margin-top: max(24px, 5.2vh); }
.calm-col { position: relative; z-index: 2; flex: none; width: 100%; max-width: 480px; margin-top: calc(18vh - 30px); display: flex; flex-direction: column; align-items: center; text-align: center; transition: margin-top .7s var(--ease-open); }
.calm.tight .calm-col { margin-top: max(28px, calc(11.8vh - 30px)); }
.calm-band { flex: none; height: var(--band, 150px); }
.calm-legal { position: relative; z-index: 2; flex: none; margin-top: auto; padding: 20px 0 max(24px, 4.2vh); }
.calm .h1 { font-size: clamp(44px, 7.4vh, 62px); transition: font-size .5s var(--ease-open); }
.calm.tight .h1 { font-size: clamp(40px, 6.3vh, 52px); }
.calm-col .gbtn, .calm-col .cform { width: 440px; max-width: 100%; }
.calm-col .gbtn { margin-top: 32px; }
.calm-col .pbody { margin-left: auto; margin-right: auto; }
.calm-col .cform { margin-top: 28px; display: flex; flex-direction: column; text-align: left; }
.calm-col .cform .pbtn { width: 100%; height: 54px; margin-top: 18px; }
.calm-col .crow { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; }
.calm-col .crow .q-link { margin-top: 0; font-size: 14px; }

/* ── the split page ────────────────────────────────────────────────────── */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); height: 100vh; height: 100dvh; background: var(--paper); }
.paper { position: relative; z-index: 1; min-height: 0; display: flex; flex-direction: column; padding: var(--pp-top) var(--pp-x) 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.paper > .wm { flex: none; align-self: flex-start; }
.ptop { position: absolute; z-index: 2; right: var(--pp-x); top: var(--pp-top); height: 30px; display: flex; align-items: center; }
.pback { display: inline-flex; align-items: center; gap: 6px; margin-right: -6px; padding: 4px 6px; border-radius: 6px; font-size: 14px; color: var(--text2); cursor: pointer; }
.pback:hover { color: var(--text); background: var(--soft); }
.pback svg { width: 15px; height: 15px; }
.pband { display: none; }
/* the step sits a little above the middle of what is left; a taller step
   pushes the spacers to nothing and the paper scrolls */
.pmid { flex: 1 0 auto; display: flex; flex-direction: column; padding: 20px 0 36px; }
.pmid::before { content: ''; flex: 42 1 0; }
.pmid::after { content: ''; flex: 58 1 0; }
.pv { display: flex; flex-direction: column; align-items: flex-start; width: 100%; max-width: 540px; }
.pv .h1 { font-size: var(--hs); }
.pv.cad .h1 { font-size: calc(var(--hs) * 1.08); }
.pv.fp .h1 { font-size: calc(var(--hs) * .8); line-height: 1.08; }
.pv.fp .pbody { margin-top: 14px; font-size: 16px; }
.pv .cad-field { width: 100%; max-width: 470px; margin-top: 32px; }
.pv .cad-field + .cad-field, .pv .cad-meta { margin-top: 14px; }
.pv.cad .checks { margin-top: 24px; }
.pv.cad .pbtn { width: 100%; max-width: 470px; margin-top: 24px; }
.pv.cad .q-link { margin-top: 22px; font-size: 14px; }
.pv .form { width: 100%; }
.pv .fgrid.first { margin-top: 24px; }
.pv .fgrid + .fgrid, .pv .form > .fgrid { margin-top: 14px; }
.pv .pacts { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; min-height: 50px; }
.pv .psec { margin: 0 0 0 6px; font-size: 14px; color: var(--text2); cursor: pointer; text-decoration: underline; text-decoration-color: var(--border-strong); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.pv .psec:hover { color: var(--text); }
.pv > .q-link { margin-top: 20px; font-size: 14px; }
.pv .phone-only { display: none; }

.stage { position: relative; min-width: 0; background: var(--stage); overflow: hidden; }
.stage .glow-rib { position: absolute; inset: 0; pointer-events: none; transition: opacity 1.2s var(--ease);
  background: var(--grain), radial-gradient(48% 36% at 74% 30%, rgba(106,166,200,.11), transparent 72%), radial-gradient(46% 34% at 28% 72%, rgba(224,154,118,.085), transparent 72%), radial-gradient(70% 60% at 50% 50%, rgba(255,248,235,.03), transparent 70%); }
.stage.quiet .glow-rib { opacity: .45; }
.stage > .rb-host { inset: 0; overflow: hidden; }
.st-lay { position: absolute; left: 0; top: 0; transform-origin: 0 0; transition: transform .85s var(--ease-open), opacity .5s var(--ease); animation: layIn .8s var(--ease-open) both; }
.st-lay.gone { opacity: 0; pointer-events: none; }

/* ── the stage: two accounts meet (accounts.js) ────────────────────────── */
.mg { position: absolute; inset: 0; font-family: var(--font); }
.acc { position: absolute; left: 0; top: 18px; width: 318px; padding: 14px 18px 4px; border-radius: 16px; background: #fffdf9; text-align: left; transition: transform .9s var(--ease-open), opacity .5s, filter .5s;
  box-shadow: 0 0 0 1px rgba(255,255,255,.05), 0 40px 70px -30px rgba(0,0,0,.8), 0 0 60px -14px rgba(143,211,198,.16); }
.acc-hd { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid #efe9de; }
.acc-av { width: 38px; height: 38px; border-radius: 50%; flex: none; background: linear-gradient(140deg, #d9c7a7, #b49a72); color: #fff; display: grid; place-items: center; font: 600 13px/1 var(--font); letter-spacing: .02em; }
.acc-hd .nm { min-width: 0; }
.acc-hd .nm b { display: block; font: 600 15px/1.25 var(--font); color: var(--text); }
.acc-hd .nm span { display: block; font-size: 12.5px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-hd .nm span.ph { color: #b3bac6; }
.acc-row { position: relative; height: 38px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #f3eee5; }
.acc-row:last-of-type { border-bottom: 0; }
.acc-k { width: 84px; flex: none; font: 600 10.5px/1 var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.acc-val { position: relative; flex: 1; height: 100%; }
.acc-val > span { position: absolute; left: 0; top: 0; bottom: 0; display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text); white-space: nowrap; transition: opacity .5s var(--ease), transform .6s var(--ease-open); }
.acc-val svg { width: 15px; height: 15px; color: var(--text2); }
.acc-val em { font-style: normal; letter-spacing: .14em; color: var(--muted); }
.acc-bars { display: flex; align-items: flex-end; gap: 4px; }
.acc-bars i { width: 7px; border-radius: 2px; background: #a9d4cb; }
/* the turma is the account's, unknown before the password: a quiet bar */
.acc-ph { display: block; width: 120px; height: 9px; border-radius: 5px; background: #ece6da; }
.acc-ok { position: absolute; right: 0; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; transform: scale(0); }
.acc-ok svg { width: 11px; height: 11px; }
.acc-glow { position: absolute; inset: -1px; border-radius: 16px; box-shadow: 0 0 0 2px rgba(63,184,173,.9); opacity: 0; pointer-events: none; }
.acc-g2 { opacity: 0; transform: translateY(6px); }
.acc-g2 .pl { color: var(--muted); }
.acc-g2 svg.gg { width: 15px; height: 15px; }
.mg-g { position: absolute; left: 420px; top: 62px; width: 180px; padding: 14px 14px 13px; border-radius: 14px; background: #fffdf9; text-align: left; transition: transform .8s var(--move), opacity .4s, box-shadow .4s, background .4s;
  box-shadow: 0 0 0 1px rgba(255,255,255,.05), 0 30px 50px -24px rgba(0,0,0,.85), 0 0 40px -10px rgba(255,255,255,.14); }
.mg-g .g { display: block; width: 24px; height: 24px; }
.mg-g .g svg { display: block; width: 100%; height: 100%; }
.mg-g .cap { display: block; margin-top: 10px; font: 600 10px/1 var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.mg-g .em { display: block; margin-top: 5px; font-size: 12px; line-height: 1.35; color: var(--text); }
.mg svg.mg-ln { position: absolute; left: 0; top: 0; overflow: visible; }
.mg-ln path { fill: none; stroke: rgba(143,211,198,.55); stroke-width: 2; stroke-dasharray: 2.5 8; stroke-linecap: round; transition: stroke .3s, opacity .3s; }
.mg-node { position: absolute; left: 370px; top: 116px; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: #262523; box-shadow: 0 0 0 1.5px rgba(143,211,198,.6); display: grid; place-items: center; color: var(--teal-lt); transition: box-shadow .3s, color .3s, background .3s, opacity .3s; }
.mg-node::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: nodeB 2.4s var(--ease) infinite; }
.mg-node .ic { display: none; width: 14px; height: 14px; }
.mg-node .ic svg { display: block; width: 100%; height: 100%; }
.mg-badge { position: absolute; right: -10px; top: -12px; width: 34px; height: 34px; border-radius: 50%; display: none; place-items: center; background: #fffdf9; color: #b4552d; box-shadow: 0 0 0 3px var(--stage), 0 10px 20px -8px rgba(0,0,0,.7); animation: popIn .5s var(--ease-open) both; }
.mg-badge svg { width: 17px; height: 17px; }
.mg-badge .g2 svg { width: 18px; height: 18px; filter: grayscale(1) opacity(.65); }
.mg-gb { position: absolute; right: -9px; top: -11px; width: 30px; height: 30px; border-radius: 50%; background: #fffdf9; color: #b4552d; display: none; place-items: center; box-shadow: 0 0 0 3px var(--stage); animation: popIn .5s var(--ease-open) both; }
.mg-gb svg { width: 15px; height: 15px; }
.mg[data-st="busy"] .mg-ln path { animation: dashes .9s linear infinite reverse; stroke: rgba(143,211,198,.85); }
.mg[data-st="busy"] .mg-node::after { animation: nodeB .7s var(--ease) infinite; }
/* joined: the Google card goes into the account, which signs in with both */
.mg[data-st="ok"] .mg-g { transform: translate(-330px, -8px) scale(.3); opacity: 0; transition: transform .8s var(--move), opacity .3s .5s; }
.mg[data-st="ok"] .mg-ln, .mg[data-st="ok"] .mg-node { opacity: 0; }
.mg[data-st="ok"] .acc { transform: translateX(141px); transition-delay: .2s; }
.mg[data-st="ok"] .acc-pw { opacity: 0; transform: translateY(-6px); transition-delay: .6s; }
.mg[data-st="ok"] .acc-g2 { opacity: 1; transform: none; transition-delay: .7s; }
.mg[data-st="ok"] .acc-ok { animation: popIn .55s var(--ease-open) both; }
.mg[data-st="ok"] .acc-ok.o1 { animation-delay: .9s; }
.mg[data-st="ok"] .acc-ok.o2 { animation-delay: 1.1s; }
.mg[data-st="ok"] .acc-ok.o3 { animation-delay: 1.3s; }
.mg[data-st="ok"] .acc-glow { animation: glowOnce 1.6s .8s var(--ease) both; }
/* refused: the node turns ✕, ⊘ or a clock, and the card wears the reason */
.mg.err .mg-ln path { stroke: rgba(224,154,118,.5); stroke-dasharray: 1 7; }
.mg.err .mg-node { color: #e09a76; box-shadow: 0 0 0 1.5px rgba(224,154,118,.7); }
.mg.err .mg-node::after { display: none; }
.mg.err .mg-node .ic { display: block; }
.mg.err .mg-badge { display: grid; }
.mg[data-st="invalid_credentials"] .acc { animation: shake .5s var(--ease) both; }
.mg[data-st="invalid_credentials"] .acc-row.pw { background: linear-gradient(90deg, rgba(180,85,45,.10), rgba(180,85,45,0)); }
.mg[data-st="invalid_credentials"] .mg-badge, .mg[data-st="missing"] .mg-badge { display: none; }
.mg[data-st="account_rejected"] .acc, .mg[data-st="account_archived"] .acc { filter: saturate(.3) brightness(.72); }
.mg[data-st="account_pending"] .acc { filter: brightness(.86); }
/* the 15 minutes passed: the Google side is gone */
.mg[data-st="missing"] .mg-g { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.22); }
.mg[data-st="missing"] .mg-g .g { opacity: .35; filter: grayscale(1); }
.mg[data-st="missing"] .mg-g .cap { color: #8e8a84; }
.mg[data-st="missing"] .mg-g .em { color: #a8a299; }
.mg[data-st="missing"] .mg-gb { display: grid; }

/* ── phones: the calm composition everywhere ───────────────────────────── */
@media (max-width: 680px) {
  .wm .the, .wm .co { font-size: 21px; }
  .calm > .wm { margin-top: 34px; }
  .calm-col { margin-top: calc(26.8vh - 60px); }
  .calm.tight .calm-col { margin-top: max(24px, calc(17.8vh - 60px)); }
  .calm .h1, .calm.tight .h1 { font-size: 40px; }
  .calm-col .gbtn { margin-top: 30px; }
  .calm-col .cform { margin-top: 26px; }
  .calm-col .q-link { margin-top: 24px; }
  .calm-col .crow { margin-top: 16px; }
  .calm-legal { padding-bottom: 34px; }
  .legal { font-size: 12.5px; }

  .split { display: block; height: auto; min-height: 100vh; min-height: 100dvh; }
  .stage, .ptop { display: none; }
  .paper { display: flex; flex-direction: column; align-items: center; min-height: 100vh; min-height: 100dvh; padding: 34px 24px 44px; overflow: visible; text-align: center; }
  .paper > .wm { align-self: center; }
  .pband { display: block; position: relative; flex: none; width: calc(100% + 48px); height: 72px; margin: 22px -24px 0; }
  /* the strip's drawing overhangs it, so an icon at the top of its swing is never cut */
  .pband > .rb-host { inset: -12px 0; overflow: hidden; }
  .pmid { flex: none; width: 100%; padding: 0; }
  .pmid::before, .pmid::after { display: none; }
  .pv { align-items: center; max-width: none; }
  .pv .h1 { margin-top: 26px; font-size: 38px; }
  .pv.cad .h1 { margin-top: 34px; font-size: 42px; }
  .pv.cad .cad-field > .flabel { display: none; }
  .pv.fp .h1, .pv.sm .h1 { font-size: 34px; }
  .pv .eyebrow { margin: 26px 0 0; }
  .pv .eyebrow + .h1 { margin-top: 12px; }
  .pv .okhead { margin: 18px 0 0; }
  .pv .okhead + .h1 { margin-top: 18px; }
  .pv .pbody, .pv.fp .pbody { margin-top: 14px; font-size: 15.5px; }
  .pv .cad-field { max-width: none; margin-top: 26px; }
  .pv .locked { height: 48px; font-size: 14px; padding: 0 14px; gap: 10px; }
  .pv.cad .checks { width: 100%; margin-top: 22px; }
  .pv.cad .chk { font-size: 14px; }
  .pv.cad .pbtn { max-width: none; margin-top: 22px; }
  .pv.cad .q-link { margin-top: 20px; }
  .pv .fgrid.first { margin-top: 20px; }
  .pv .pacts { flex-direction: column; align-items: stretch; width: 100%; margin-top: 20px; min-height: 0; }
  .pv .pacts .pbtn { width: 100%; }
  .pv .pacts .psec { display: none; }
  .pv .phone-only { display: inline-block; }
  .pv > .q-link { margin-top: 20px; font-size: 14px; }
  .pv > .q-link + .q-link { margin-top: 12px; }
}

@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes swapIn { from { opacity: 0; transform: translateY(3px); } }
@keyframes layIn { from { opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes popIn { 0% { transform: scale(.3); opacity: 0; } 60% { transform: scale(1.14); opacity: 1; } 100% { transform: none; } }
@keyframes shake { 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }
@keyframes nodeB { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.6); opacity: .55; } }
@keyframes dashes { to { stroke-dashoffset: -17; } }
@keyframes glowOnce { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: 0; } }
@keyframes okBg { from { transform: scale(.6); opacity: 0; } }
@keyframes okDraw { from { stroke-dashoffset: 170; } }
@keyframes okTick { from { stroke-dashoffset: 32; } }

/* Reduced motion: every animation and transition jumps to its last frame,
   and the ribbons stand still (ribbons.js). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; transition-delay: 0s !important; }
}
