/* ============================================================
   Joey — minimal & premium, in the spirit of corca.app.
   White + neutral gray, electric-blue accent, Geist type,
   monospace technical accents, lots of whitespace.
   ============================================================ */
:root {
  --blue:        #0a84ff;
  --blue-deep:   #0061d6;
  --blue-tint:   #eaf3ff;
  --blue-tint-2: #f4f9ff;

  --ink:         #0b1220;   /* near-black headings */
  --body:        #3d4759;   /* body text */
  --muted:       #8a94a6;   /* secondary */
  --line:        #e7ebf2;   /* hairlines */
  --line-soft:   #f0f3f8;
  --paper:       #ffffff;
  --canvas:      #ffffff;
  --wash:        #f7f9fc;   /* faint section wash */

  --r:    16px;
  --r-sm: 11px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --maxw: 1120px;
  --pad:  clamp(1.25rem, 4vw, 2rem);
}

* { box-sizing: border-box; }

/* ---------- page-to-page transitions ----------
   Cross-document View Transitions (Safari 18.2+, Chromium): navigating between
   Joey's pages cross-fades instead of hard-cutting, so multi-page browsing
   feels like one continuous surface. The persistent chrome (nav, footer) is
   tagged so it stays put while the page body cross-fades. */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 0.32s; animation-timing-function: var(--ease); }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) { animation: none !important; }
}
/* first-paint fade-in fallback for browsers without cross-document VT */
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
body { animation: pageIn 0.4s var(--ease) both; }
@media (prefers-reduced-motion: reduce) { body { animation: none; } }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0; background: var(--canvas); color: var(--body);
  font-family: var(--sans); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3, h4 { color: var(--ink); margin: 0; line-height: 1.08; letter-spacing: -0.03em; font-weight: 700; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
strong { color: var(--ink); font-weight: 600; }
.c-mono, .term { font-family: var(--mono); }
.muted { color: var(--muted); font-weight: 700; }
.accent { color: var(--blue); }
.hl { color: var(--ink); font-weight: 600; box-shadow: inset 0 -0.5em 0 var(--blue-tint); }

/* ---------- buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--sans); font-weight: 600; font-size: 0.95rem;
  padding: 0.62em 1.15em; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; transition: background 0.18s, transform 0.18s var(--ease), box-shadow 0.18s;
  white-space: nowrap;
}
.btn-lg { font-size: 1rem; padding: 0.8em 1.4em; }
.btn-primary { color: #fff; background: var(--blue); box-shadow: 0 1px 2px rgba(10,80,200,0.25); }
.btn-primary:hover { background: var(--blue-deep); transform: translateY(-1px); box-shadow: 0 8px 20px -8px rgba(10,90,220,0.55); }
.link-quiet { color: var(--body); font-weight: 500; font-size: 0.95rem; transition: color 0.18s; }
.link-quiet:hover { color: var(--ink); }
.link-arrow { color: var(--blue); font-weight: 600; font-size: 0.96rem; display: inline-flex; align-items: center; gap: 0.4em; }
.link-arrow .arr { transition: transform 0.2s var(--ease); }
.link-arrow:hover .arr { transform: translateX(4px); }
.kicker { font-family: var(--mono); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.04em;
  text-transform: lowercase; color: var(--blue); display: inline-block; margin-bottom: 1rem; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1.5rem;
  max-width: var(--maxw); margin: 0 auto; padding: 0.95rem var(--pad);
  transition: background 0.3s, box-shadow 0.3s;
}
.nav.scrolled { background: rgba(255,255,255,0.85); backdrop-filter: blur(14px) saturate(1.3); box-shadow: 0 1px 0 var(--line); }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.15rem; color: var(--ink); letter-spacing: -0.02em; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; overflow: hidden;
  background: var(--blue-tint); border: 1px solid var(--line); }
.brand-mark.sm { width: 26px; height: 26px; }
.brand-mark img { width: 120%; transform: translateY(10%); }
.nav-links { display: flex; gap: 1.7rem; margin-left: auto; font-size: 0.95rem; font-weight: 500; color: var(--body); }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 1.1rem; }
.nav-burger { display: none; background: none; border: 0; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; margin-left: auto; }
.nav-burger span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: 0.25s var(--ease); }

/* ---------- shared section frame ---------- */
section { scroll-margin-top: 80px; }
.hero, .run, .uses, .how, .swarm, .statement, .builton, .cta,
.flow, .devices, .page-hero, .faq, .ways, .portal { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }

/* ---------- hero ---------- */
.hero { padding-top: clamp(3rem, 8vw, 6.5rem); padding-bottom: clamp(2rem, 5vw, 4rem); text-align: center; }
.tag {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--mono); font-size: 0.8rem; color: var(--body);
  border: 1px solid var(--line); border-radius: 999px; padding: 0.35em 0.85em; background: var(--paper);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: #18c964; }
@media (prefers-reduced-motion: no-preference) { .dot { animation: pulse 2.2s infinite; } }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(24,201,100,0.5); } 60% { box-shadow: 0 0 0 6px rgba(24,201,100,0); } }
.hero h1 { font-size: clamp(2.5rem, 6.2vw, 4.6rem); font-weight: 800; letter-spacing: -0.04em; margin: 1.4rem auto 0; max-width: 16ch; }
.lede { font-size: clamp(1.08rem, 1.7vw, 1.3rem); color: var(--body); max-width: 60ch; margin: 1.5rem auto 0; }
.hero-actions { display: flex; align-items: center; justify-content: center; gap: 1.4rem; margin-top: 2rem; flex-wrap: wrap; }

/* ---------- window / product UI ---------- */
.window {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: 0 30px 60px -30px rgba(20,50,90,0.22), 0 2px 8px -4px rgba(20,50,90,0.08);
  overflow: hidden; text-align: left;
}
.window-bar {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); background: var(--wash);
}
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #dfe5ee; display: block; }
.window-title { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 0.4em; font-family: var(--mono); font-size: 0.74rem;
  padding: 0.2em 0.6em; border-radius: 999px; border: 1px solid var(--line); }
.badge-live { color: var(--blue-deep); background: var(--blue-tint); border-color: transparent; }
.window-bar .badge { margin-left: auto; }
.window-body { padding: 1.2rem 1.3rem; }
.term { font-family: var(--mono); font-size: 0.86rem; line-height: 1.85; margin: 0; color: var(--body); white-space: pre-wrap; word-break: break-word; }
.term.big { font-size: 0.92rem; line-height: 2; }
.c-dim { color: var(--muted); }
.c-ok { color: #18c964; }
.c-blue { color: var(--blue); }
.c-mono { font-family: var(--mono); color: var(--ink); }

.hero-panel { position: relative; max-width: 740px; margin: 3rem auto 0; }
.panel-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 1.2rem;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.panel-stats > div { background: var(--paper); padding: 0.9rem 1rem; text-align: left; }
.ps-num { display: block; font-family: var(--mono); font-weight: 600; font-size: 1.15rem; color: var(--ink); }
.ps-num.accent { color: var(--blue); }
.ps-label { font-size: 0.78rem; color: var(--muted); }
/* ---------- hero app/cli toggle + GUI mockup ---------- */
.ui-toggle { position: relative; display: inline-flex; gap: 0.2rem; margin: 0 auto 1.2rem;
  padding: 0.28rem; border: 1px solid var(--line); border-radius: 999px; background: var(--paper);
  width: max-content; left: 50%; transform: translateX(-50%); }
.ut { position: relative; z-index: 1; border: 0; background: none; cursor: pointer; font-family: var(--sans);
  font-weight: 600; font-size: 0.9rem; color: var(--muted); padding: 0.46em 1.1em; border-radius: 999px; transition: color 0.2s; }
.ut.is-active { color: var(--ink); }
.ut-pill { position: absolute; z-index: 0; top: 0.28rem; bottom: 0.28rem; left: 0; width: 0;
  background: var(--blue-tint); border-radius: 999px; transition: transform 0.28s var(--ease), width 0.28s var(--ease); }
.ui-view { display: none; }
.ui-view.is-active { display: block; animation: fade 0.35s var(--ease); }

.app-body { padding: 1.4rem 1.5rem; }
.app-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.app-label { font-size: 0.82rem; color: var(--muted); }
.app-kpi { font-family: var(--mono); font-weight: 600; font-size: clamp(2rem, 4.5vw, 2.9rem); line-height: 1.05; letter-spacing: -0.02em; margin-top: 0.2rem; }
.app-sub { font-size: 0.82rem; color: var(--muted); }
.switch { display: inline-flex; flex-direction: column; align-items: center; gap: 0.3rem; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track { width: 52px; height: 30px; border-radius: 999px; background: var(--line); position: relative; transition: background 0.25s var(--ease); }
.switch-knob { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 6px -1px rgba(20,50,90,0.4); transition: transform 0.25s var(--ease); }
.switch input:checked + .switch-track { background: var(--blue); }
.switch input:checked + .switch-track .switch-knob { transform: translateX(22px); }
.switch-state { font-size: 0.74rem; font-weight: 600; color: var(--blue-deep); }
.app-spark { height: 70px; margin: 1.2rem 0; border-radius: 10px;
  background: linear-gradient(180deg, var(--blue-tint), transparent); position: relative; overflow: hidden; }
.app-spark::after { content: ""; position: absolute; left: 4%; right: 4%; bottom: 14%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--blue), var(--blue-deep)); border-radius: 2px;
  clip-path: polygon(0 80%, 10% 64%, 22% 72%, 34% 40%, 46% 54%, 58% 24%, 70% 44%, 82% 18%, 100% 6%, 100% 100%, 0 100%); }
.app-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.app-stat { background: var(--paper); padding: 0.85rem 0.9rem; }
.app-stat b { display: block; font-size: 1rem; color: var(--ink); font-weight: 600; }
.app-stat span { font-size: 0.76rem; color: var(--muted); }
.app-status { display: flex; align-items: center; gap: 0.5rem; margin-top: 1.1rem; font-family: var(--mono);
  font-size: 0.8rem; color: var(--body); }

/* ---------- download buttons ---------- */
.dl-buttons { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.6rem; }
.dl-ico { font-size: 1.05em; line-height: 1; }
.btn-ghost { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue-deep); background: var(--blue-tint-2); transform: translateY(-1px); }
.dl-note { font-size: 0.84rem; color: var(--muted); margin-top: 0.7rem; }

/* ---------- statement ---------- */
.statement { padding: clamp(4rem, 9vw, 7rem) var(--pad); }
.statement p { font-size: clamp(1.5rem, 3.4vw, 2.5rem); font-weight: 600; color: var(--muted);
  line-height: 1.3; letter-spacing: -0.025em; max-width: 22ch; margin: 0 auto; text-align: center; }
.statement strong { color: var(--ink); font-weight: 700; }

/* ---------- run it ---------- */
.run { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(2rem, 5vw, 4rem); align-items: center;
  padding-block: clamp(2.5rem, 6vw, 5rem); }
.run h2 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 800; }
.run-copy > p { margin-top: 1.1rem; max-width: 42ch; }
.ticks { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: 0.7rem; }
.ticks li { position: relative; padding-left: 1.8rem; color: var(--ink); font-size: 0.98rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.45em; width: 1.05rem; height: 1.05rem;
  background: var(--blue-tint); border-radius: 50%; }
.ticks li::after { content: "✓"; position: absolute; left: 0.27rem; top: 0.1em; font-size: 0.66rem; color: var(--blue); font-weight: 700; }

/* ---------- use-case tabs ---------- */
.uses { padding-block: clamp(2.5rem, 6vw, 5rem); }
.uses-head { margin-bottom: 2.2rem; }
.uses-head h2 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 800; max-width: 18ch; }
.tab-rail { display: flex; flex-wrap: wrap; gap: 0.5rem; border-bottom: 1px solid var(--line); margin-bottom: 2rem; }
.tab { font-family: var(--sans); font-size: 0.96rem; font-weight: 600; color: var(--muted);
  background: none; border: 0; padding: 0.7rem 0.9rem; cursor: pointer; position: relative; transition: color 0.18s; }
.tab:hover { color: var(--body); }
.tab.is-active { color: var(--ink); }
.tab.is-active::after { content: ""; position: absolute; left: 0.9rem; right: 0.9rem; bottom: -1px; height: 2px; background: var(--blue); border-radius: 2px; }
.tab-panel { display: none; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.tab-panel.is-active { display: grid; animation: fade 0.4s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.tp-copy h3 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; }
.tp-copy p { margin: 0.9rem 0 1.4rem; max-width: 42ch; }
.window.mini { max-width: 440px; }
.window.mini .window-body { padding: 1.1rem 1.2rem; }
.earn-row { display: flex; justify-content: space-between; align-items: baseline; padding: 0.6rem 0; border-bottom: 1px solid var(--line-soft); }
.earn-row:last-of-type { border-bottom: 0; }
.earn-row span { color: var(--muted); font-size: 0.9rem; }
.earn-row b { font-family: var(--mono); color: var(--ink); font-size: 1.05rem; font-weight: 600; }
.earn-row b.accent { color: var(--blue); }
.spark { height: 56px; margin-top: 0.8rem; border-radius: 8px;
  background:
    linear-gradient(180deg, var(--blue-tint), transparent),
    repeating-linear-gradient(90deg, transparent 0 22px, var(--line-soft) 22px 23px);
  position: relative; overflow: hidden; }
.spark::after { content: ""; position: absolute; left: 6%; right: 6%; bottom: 18%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--blue), var(--blue-deep)); border-radius: 2px; opacity: 0.8;
  clip-path: polygon(0 80%, 12% 60%, 25% 70%, 40% 35%, 55% 50%, 70% 20%, 85% 38%, 100% 5%, 100% 100%, 0 100%); }
.field { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--line-soft); }
.field:last-child { border-bottom: 0; }
.f-label { font-family: var(--mono); font-size: 0.82rem; color: var(--muted); }
.f-val { font-size: 0.92rem; color: var(--ink); }
.f-val.accent { color: var(--blue); font-family: var(--mono); font-weight: 600; }

/* ---------- how ---------- */
.how { padding-block: clamp(2.5rem, 6vw, 5rem); }
.how-head { margin-bottom: 2.4rem; max-width: 30ch; }
.how-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 800; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.step { border-top: 2px solid var(--line); padding-top: 1.2rem; }
.step-no { font-family: var(--mono); font-size: 0.85rem; color: var(--blue); font-weight: 600; }
.step h3 { font-size: 1.15rem; font-weight: 700; margin: 0.7rem 0 0.5rem; }
.step p { font-size: 0.94rem; color: var(--body); }

/* ---------- live swarm ---------- */
.swarm { padding-block: clamp(2.5rem, 6vw, 5rem); }
.swarm-head { text-align: center; margin-bottom: 2.2rem; }
.swarm-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); font-weight: 800; }
.swarm-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.metric { background: var(--paper); padding: 2rem 1.2rem; text-align: center; }
.metric-num { font-family: var(--mono); font-weight: 600; font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  letter-spacing: -0.02em; color: var(--ink); }
.metric-label { font-size: 0.84rem; color: var(--muted); margin-top: 0.4rem; }
.swarm-foot { text-align: center; font-family: var(--mono); font-size: 0.8rem; color: var(--muted); margin-top: 1.1rem; }

/* ---------- built on ---------- */
.builton { padding-block: clamp(2.5rem, 5vw, 4rem); text-align: center; border-top: 1px solid var(--line); }
.builton-label { font-size: 0.85rem; color: var(--muted); letter-spacing: 0.02em; }
.builton-row { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(1.5rem, 4vw, 3rem);
  padding: 0; margin: 1.4rem 0 0; }
.builton-row li { font-family: var(--mono); font-weight: 500; color: var(--ink); font-size: 1.05rem; opacity: 0.75; }

/* ---------- cta ---------- */
.cta { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.cta-inner { background: linear-gradient(160deg, var(--blue), var(--blue-deep)); color: #fff; border-radius: 24px; text-align: center;
  padding: clamp(2.5rem, 6vw, 4.5rem); position: relative; overflow: hidden; }
.cta-inner::before { content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 140% at 50% -20%, rgba(255,255,255,0.35), transparent 55%); }
.cta-inner > * { position: relative; }
.cta-inner h2 { color: #fff; font-size: clamp(1.9rem, 4.5vw, 3rem); font-weight: 800; }
.cta-inner p { color: rgba(255,255,255,0.7); font-size: 1.1rem; margin: 0.8rem 0 1.8rem; }
.cta-actions { display: flex; align-items: center; justify-content: center; gap: 1.4rem; flex-wrap: wrap; }
.cta-actions .btn-primary { background: #fff; color: var(--ink); }
.cta-actions .btn-primary:hover { background: var(--blue-tint); }
.cta-actions .link-arrow { color: #fff; }

/* ---------- footer ---------- */
.foot { max-width: var(--maxw); margin: 0 auto; padding: clamp(2.5rem,5vw,3.5rem) var(--pad) 2.5rem; border-top: 1px solid var(--line); }
.foot-top { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.foot-brand { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; color: var(--ink); }
.foot-cols { display: flex; gap: clamp(2rem, 5vw, 4rem); }
.foot-cols h4 { font-size: 0.8rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.8rem; }
.foot-cols a { display: block; font-size: 0.94rem; color: var(--body); padding: 0.22rem 0; }
.foot-cols a:hover { color: var(--blue); }
.foot-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 2.5rem;
  padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--muted); }
.foot-bottom .c-mono { color: var(--muted); }

/* ---------- hero device rotator ----------
   .swap is an invisible reservation slot whose width JS locks to the WIDEST
   device word, so the headline never reflows as words rotate. .swap-pill is
   the visible blue chip and hugs each word (no empty box for short words like
   "Mac"). The word sits at the end of its line, so the reserved slack is
   absorbed as invisible trailing space — nothing moves. */
.swap { display: inline-flex; justify-content: flex-start; vertical-align: baseline; }
.swap-pill {
  display: inline-flex; align-items: center; gap: 0.32em; overflow: hidden;
  background: var(--blue-tint); color: var(--blue-deep);
  border-radius: 0.32em; padding: 0 0.3em 0.04em; line-height: 1.05;
  /* the pill hugs each word; its width is animated within the fixed slot so the
     blue chip glides between word lengths instead of snapping. */
  transition: width 0.5s var(--ease);
}
.swap-ico { width: 0.86em; height: 0.86em; display: inline-grid; place-items: center; flex: none; }
.swap-ico svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 6; }
.swap-word { white-space: nowrap; }
/* two-phase swap: the current word lifts out, the next word eases up into place. */
.swap-pill.is-out .swap-ico,
.swap-pill.is-out .swap-word { animation: swapOut 0.2s var(--ease) forwards; }
.swap-pill.is-in .swap-ico,
.swap-pill.is-in .swap-word { animation: swapIn 0.44s var(--ease); }
.swap-pill.is-in .swap-word { animation-delay: 0.04s; }
@keyframes swapOut {
  from { opacity: 1; transform: translateY(0); filter: blur(0); }
  to   { opacity: 0; transform: translateY(-0.42em); filter: blur(2px); }
}
@keyframes swapIn {
  from { opacity: 0; transform: translateY(0.5em); filter: blur(2px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@media (prefers-reduced-motion: reduce) {
  .swap-pill { transition: none; }
  .swap-pill.is-out .swap-ico, .swap-pill.is-out .swap-word,
  .swap-pill.is-in .swap-ico, .swap-pill.is-in .swap-word { animation: none; }
}

/* ---------- runs-on-everything strip ---------- */
.devices { text-align: center; padding-block: clamp(1rem, 3vw, 2.5rem); }
.devices-label { font-size: 0.85rem; color: var(--muted); letter-spacing: 0.02em; margin-bottom: 1.6rem; }
.device-row { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(0.75rem, 2vw, 1.4rem); }
.device-card {
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
  width: clamp(108px, 15vw, 158px); padding: 1.3rem 1rem 1.05rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  transition: transform 0.22s var(--ease), box-shadow 0.22s, border-color 0.22s;
}
.device-card img { width: clamp(48px, 6vw, 68px); height: clamp(48px, 6vw, 68px); object-fit: contain; transition: transform 0.22s var(--ease); }
.device-card span { font-size: 0.86rem; font-weight: 600; color: var(--body); }
.device-card:hover { transform: translateY(-6px); border-color: var(--blue); box-shadow: 0 18px 34px -20px rgba(10,90,220,0.5); }
.device-card:hover img { transform: scale(1.08) rotate(-3deg); }
.device-card:hover span { color: var(--ink); }

/* ---------- post-a-job flow ---------- */
.flow { padding-block: clamp(2.5rem, 6vw, 5rem); }
.flow-head { max-width: 34ch; margin-bottom: 2.4rem; }
.flow-head h2 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 800; }
.flow-head p { margin-top: 1.1rem; max-width: 48ch; }
.flow-stage { display: grid; grid-template-columns: minmax(210px, 0.82fr) minmax(440px, 1.18fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }

.flow-rail { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.fl-step {
  width: 100%; text-align: left; display: flex; align-items: center; gap: 1rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 0.95rem 1.1rem; cursor: pointer; font-family: var(--sans);
  transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease), box-shadow 0.2s;
}
.fl-step:hover { transform: translateX(3px); border-color: var(--blue-tint); }
.fl-no { font-family: var(--mono); font-size: 0.8rem; font-weight: 600; color: var(--muted);
  width: 2.2rem; height: 2.2rem; flex: none; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 9px; background: var(--wash); transition: 0.2s; }
.fl-txt { display: flex; flex-direction: column; line-height: 1.3; }
.fl-txt b { color: var(--ink); font-size: 0.98rem; font-weight: 600; }
.fl-txt i { color: var(--muted); font-size: 0.85rem; font-style: normal; }
.fl-step.is-active { border-color: var(--blue); background: var(--blue-tint-2); box-shadow: 0 10px 24px -16px rgba(10,90,220,0.5); }
.fl-step.is-active .fl-no { color: #fff; background: var(--blue); border-color: var(--blue); }

.composer { min-height: 332px; }
.composer .window-body { padding: 1.3rem 1.4rem; position: relative; min-height: 268px; }
#cmp-badge { margin-left: auto; }
.cmp-screen { display: none; }
.cmp-screen.is-active { display: block; animation: fade 0.4s var(--ease); }

/* palette (command-bar autocomplete) */
.cmp-field { display: flex; align-items: center; gap: 0.5rem; border: 1px solid var(--line);
  border-radius: 11px; padding: 0.8rem 1rem; background: var(--wash); font-family: var(--mono); }
.cmp-caret { color: var(--blue); font-weight: 700; }
.cmp-typed { color: var(--ink); font-size: 0.95rem; }
.cmp-cursor { width: 2px; height: 1.1em; background: var(--blue); display: inline-block; animation: blink 1.1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.palette { list-style: none; margin: 0.7rem 0 0; padding: 0.4rem; border: 1px solid var(--line);
  border-radius: 12px; background: var(--paper); box-shadow: 0 18px 36px -24px rgba(20,50,90,0.4); }
.pal-row { display: flex; align-items: center; gap: 0.8rem; padding: 0.62rem 0.7rem; border-radius: 8px;
  cursor: pointer; transition: background 0.15s; }
.pal-ico { width: 1.5rem; height: 1.5rem; flex: none; display: grid; place-items: center; border-radius: 7px;
  background: var(--blue-tint); color: var(--blue-deep); font-size: 0.85rem; }
.pal-main { color: var(--ink); font-weight: 500; font-size: 0.92rem; }
.pal-tag { font-family: var(--mono); font-size: 0.74rem; color: var(--muted); margin-left: auto; }
.pal-row kbd { font-family: var(--mono); font-size: 0.72rem; color: var(--body); background: var(--wash);
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 0.05em 0.45em; }
.pal-row.is-sel, .pal-row:hover { background: var(--blue-tint-2); }
.pal-row.is-sel { box-shadow: inset 0 0 0 1px var(--blue-tint); }

/* keyspace */
.ks { margin-top: 1.3rem; }
.ks-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.8rem; }
.ks-top span { color: var(--muted); font-size: 0.9rem; }
.ks-top b { font-size: 1.15rem; }
.ks-top sup { font-size: 0.62em; }
.ks-range { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 999px;
  background: linear-gradient(90deg, var(--blue) 50%, var(--line) 50%); outline: none; }
.ks-range::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; border: 2px solid var(--blue); box-shadow: 0 2px 8px -2px rgba(10,90,220,0.6); cursor: pointer; }
.ks-range::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid var(--blue); cursor: pointer; }
.ks-scale { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 0.74rem; color: var(--muted); margin-top: 0.5rem; }
.ks-note { font-size: 0.86rem; color: var(--body); margin-top: 0.9rem; }

/* escrow */
.esc-amount { display: flex; align-items: baseline; gap: 0.3rem; font-family: var(--mono); margin-bottom: 1.1rem; }
.esc-cur { font-size: 1.4rem; color: var(--muted); }
.esc-num { font-size: 2.6rem; font-weight: 600; color: var(--ink); letter-spacing: -0.02em; }
.esc-tkn { font-size: 0.95rem; color: var(--blue-deep); background: var(--blue-tint); padding: 0.15em 0.5em; border-radius: 7px; align-self: center; }
.btn-block { width: 100%; justify-content: center; margin-top: 1.2rem; }
.esc-note { font-size: 0.82rem; color: var(--muted); margin-top: 0.8rem; text-align: center; }

/* solving */
.solve-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1rem; }
.solve-bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; margin-bottom: 1.2rem; }
.solve-bar span { display: block; height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--blue-deep)); transition: width 0.5s var(--ease); }

/* ============================================================
   Liquid Glass — Apple-style frosted/refractive glass.
   liquid-dom (WebGPU + Chrome HTML-in-Canvas flag) can't run in
   Safari, so this is a native port of the *look*: layered
   backdrop blur + saturation, a specular rim, inner sheen, and
   an SVG-turbulence displacement overlay for the watery edge.
   Progressive: true backdrop refraction kicks in where the
   engine supports url() SVG filters on backdrop-filter.
   ============================================================ */
.glass {
  position: relative;
  background: rgba(255, 255, 255, 0.6);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow:
    0 16px 40px -24px rgba(20, 50, 90, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.glass > * { position: relative; z-index: 1; }
.glass .window-bar { background: rgba(247, 250, 255, 0.55); border-bottom-color: rgba(255,255,255,0.6); }

@media (prefers-reduced-motion: no-preference) {
  .glass.is-active { animation: glassin 0.5s var(--ease); }
}
@keyframes glassin { from { transform: scale(0.99); } to { transform: none; } }

/* nav gets a clean frost once scrolled */
.nav.scrolled {
  background: rgba(255,255,255,0.72);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  box-shadow: 0 1px 0 var(--line), 0 8px 24px -20px rgba(20,50,90,0.26);
}

/* ============================================================
   Multi-page: per-page hero, current-nav state, FAQ, ways cards
   ============================================================ */
.nav-links a { position: relative; transition: color 0.18s; }
.nav-links a.is-current { color: var(--ink); font-weight: 600; }
.nav-links a.is-current::after { content: ""; position: absolute; left: 0; right: 0; bottom: -0.5rem;
  height: 2px; background: var(--blue); border-radius: 2px; }

/* page hero (download / post / help) */
.page-hero { padding-top: clamp(2.5rem, 7vw, 5rem); padding-bottom: clamp(1.25rem, 3vw, 2.25rem); text-align: center; }
.page-hero h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); font-weight: 800; letter-spacing: -0.04em; margin: 0.9rem auto 0; max-width: 20ch; }
.page-hero .lede { margin: 1.2rem auto 0; }
.page-hero .dl-buttons, .page-hero .hero-actions { justify-content: center; }
.page-hero .dl-note { text-align: center; }

/* two ways to run (download) */
.ways { padding-block: clamp(2rem, 5vw, 4rem); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 2.5rem); align-items: start; }
.way { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(1.4rem, 3vw, 2rem); display: flex; flex-direction: column; gap: 1rem; transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s var(--ease); }
.way:hover { border-color: var(--blue); box-shadow: 0 22px 44px -28px rgba(10,90,220,0.45); transform: translateY(-3px); }
.way-tag { font-family: var(--mono); font-size: 0.76rem; color: var(--blue); letter-spacing: 0.02em; }
.way h3 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); font-weight: 700; }
.way > p { color: var(--body); font-size: 0.97rem; margin-top: -0.4rem; }
.way .window { margin-top: auto; }

/* faq + help */
.faq { max-width: 820px; padding-block: clamp(2rem, 5vw, 4rem); }
.faq-head { text-align: center; margin-bottom: 1.8rem; }
.faq-head h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); font-weight: 800; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; padding: 1.15rem 0; font-weight: 600; font-size: 1.05rem; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--blue); font-size: 1.5rem; font-weight: 400; line-height: 1; transition: transform 0.2s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 1.15rem; color: var(--body); max-width: 70ch; }
.faq details p a { color: var(--blue); font-weight: 600; }

/* help quick-links */
.help-links { max-width: var(--maxw); margin: 0 auto; padding: clamp(1rem,3vw,2rem) var(--pad) clamp(2.5rem,5vw,4rem); }
.help-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 3vw, 1.6rem); }
.help-card { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.4rem 1.5rem; transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s var(--ease); }
.help-card:hover { border-color: var(--blue); box-shadow: 0 20px 40px -26px rgba(10,90,220,0.45); transform: translateY(-3px); }
.help-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.4rem; }
.help-card p { font-size: 0.92rem; color: var(--body); }
.help-card .arr { color: var(--blue); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.65s var(--ease), transform 0.65s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .flow-stage { grid-template-columns: 1fr; }
  .flow-rail { grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.3rem; }
  .fl-step { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .fl-txt i { display: none; }
  .composer { min-height: 0; }
}
@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: flex; }
  .nav.open .nav-links { display: flex; flex-direction: column; gap: 0.2rem; position: absolute; top: 100%;
    left: var(--pad); right: var(--pad); background: #fff; border: 1px solid var(--line); border-radius: 14px;
    padding: 0.8rem; box-shadow: 0 20px 40px -20px rgba(20,50,90,0.3); }
  .run, .tab-panel.is-active { grid-template-columns: 1fr; }
  .run-art { order: -1; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .swarm-grid { grid-template-columns: repeat(2, 1fr); }
  .panel-stats { grid-template-columns: 1fr; }
  .ways { grid-template-columns: 1fr; }
  .help-cards { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  body { font-size: 16px; }
  .steps { grid-template-columns: 1fr; }
  .foot-top { flex-direction: column; }
  .tab-rail { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .tab { white-space: nowrap; }
}

/* ============================================================
   Job-posting portal (post.html) — the real on-chain form.
   ============================================================ */
.portal { padding-block: clamp(2rem, 6vw, 4.5rem); }
.portal-head { max-width: 640px; margin-bottom: clamp(1.6rem, 4vw, 2.6rem); }
.portal-head .kicker { color: var(--blue-deep); }
.portal-head h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); letter-spacing: -0.02em; margin: 0.5rem 0 0.7rem; }
.portal-head p { color: var(--body); font-size: 1.05rem; line-height: 1.55; }

.portal-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(1rem, 2.5vw, 1.8rem); align-items: start; }

/* ----- form card ----- */
.portal-form { padding: clamp(1.2rem, 3vw, 1.8rem); display: flex; flex-direction: column; gap: 1.05rem; border-radius: var(--r); }
.wallet-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 0.8rem;
  padding: 0.7rem 0.85rem; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--blue-tint-2);
}
.wallet-state { display: inline-flex; align-items: center; gap: 0.55rem; font-size: 0.92rem; font-weight: 500; color: var(--ink); }
.wdot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; box-shadow: 0 0 0 0 rgba(10,132,255,0.4); }
.wdot[data-state="on"] { background: #1fb574; box-shadow: 0 0 0 4px rgba(31,181,116,0.16); }
.wdot[data-state="pending"] { background: var(--blue); animation: wpulse 1.1s var(--ease) infinite; }
.wdot[data-state="off"] { background: var(--muted); }
@keyframes wpulse { 0%,100% { box-shadow: 0 0 0 0 rgba(10,132,255,0.4); } 50% { box-shadow: 0 0 0 5px rgba(10,132,255,0); } }
.btn-sm { font-size: 0.85rem; padding: 0.5em 0.9em; }

.pf-field { display: flex; flex-direction: column; gap: 0.4rem; }
.pf-label { font-size: 0.84rem; font-weight: 600; color: var(--ink); display: flex; align-items: baseline; gap: 0.5rem; }
.pf-label em { font-style: normal; font-weight: 400; color: var(--muted); font-family: var(--mono); font-size: 0.74rem; }
.pf-field input,
.pf-select select {
  width: 100%; font: inherit; font-size: 0.95rem; color: var(--ink);
  padding: 0.7em 0.85em; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--paper); transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
#f-target { font-family: var(--mono); font-size: 0.85rem; }
#f-start, #f-end { font-family: var(--mono); }
.pf-field input::placeholder { color: var(--muted); }
.pf-field input:focus,
.pf-select select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-tint); }
.pf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.pf-hint { margin: -0.4rem 0 0; font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
.pf-hint[data-bad="1"] { color: #d23f3f; }
.pf-select { position: relative; display: block; }
.pf-select::after { content: "▾"; position: absolute; right: 0.85em; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.pf-select select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 2em; }
.pf-actions { display: flex; gap: 0.7rem; margin-top: 0.3rem; }
.pf-actions .btn { flex: 1; justify-content: center; }
.pf-actions #btn-post { flex: 1.5; }
.pf-note { margin: 0; font-size: 0.82rem; line-height: 1.5; color: var(--muted); }

/* ----- side rail ----- */
.portal-side { display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 84px; }
.portal-side > .glass { padding: 1.15rem 1.25rem; border-radius: var(--r); }
.portal-side h3 { margin: 0 0 0.7rem; font-size: 0.95rem; letter-spacing: -0.01em; }
.q-body { display: flex; flex-direction: column; gap: 0.4rem; }
.q-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; font-size: 0.88rem; }
.q-row span { color: var(--body); }
.q-row b { font-family: var(--mono); font-weight: 600; color: var(--ink); }
.q-div { height: 1px; background: var(--line); margin: 0.5rem 0; }

.prog-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.prog-step { display: flex; align-items: center; gap: 0.65rem; font-size: 0.88rem; color: var(--body); }
.prog-ico { width: 16px; height: 16px; flex: none; border-radius: 50%; border: 2px solid var(--line); position: relative; }
.prog-step.is-active .prog-ico { border-color: var(--blue); border-top-color: transparent; animation: spin 0.7s linear infinite; }
.prog-step.is-done .prog-ico { border-color: #1fb574; background: #1fb574; }
.prog-step.is-done .prog-ico::after { content: "✓"; position: absolute; inset: -3px 0 0; color: #fff; font-size: 11px; text-align: center; line-height: 16px; }
.prog-step.is-fail .prog-ico { border-color: #d23f3f; background: #d23f3f; }
.prog-step.is-fail .prog-ico::after { content: "!"; position: absolute; inset: -3px 0 0; color: #fff; font-size: 11px; font-weight: 700; text-align: center; line-height: 16px; }
.prog-step.is-fail { color: #c23636; }
.prog-txt { flex: 1; }
.prog-link { font-size: 0.78rem; font-family: var(--mono); color: var(--blue-deep); white-space: nowrap; }
@keyframes spin { to { transform: rotate(360deg); } }

.myjobs-head { display: flex; align-items: baseline; justify-content: space-between; }
.link-mini { background: none; border: 0; color: var(--blue-deep); font: inherit; font-size: 0.8rem; cursor: pointer; padding: 0; }
.link-mini:hover { text-decoration: underline; }
.jobs-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.job-empty { font-size: 0.86rem; color: var(--muted); }
.job-row { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; padding: 0.6rem 0; border-top: 1px solid var(--line-soft); }
.job-row:first-child { border-top: 0; }
.job-main { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.job-main b { font-size: 0.9rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job-id { font-size: 0.72rem; color: var(--muted); }
.job-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 0.15rem; flex: none; }
.job-state { font-size: 0.72rem; font-weight: 600; padding: 0.1rem 0.5rem; border-radius: 999px; background: var(--blue-tint); color: var(--blue-deep); white-space: nowrap; }
.job-state[data-state="solved"] { background: rgba(31,181,116,0.14); color: #138a57; }
.job-state[data-state="working"], .job-state[data-state="live"] { background: var(--blue-tint); color: var(--blue-deep); }
.job-state[data-state="waiting-for-funding"], .job-state[data-state="cancelled"] { background: var(--wash); color: var(--muted); }
.job-escrow { font-size: 0.76rem; color: var(--body); }

@media (max-width: 860px) {
  .portal-grid { grid-template-columns: 1fr; }
  .portal-side { position: static; }
}
@media (max-width: 540px) {
  .pf-row { grid-template-columns: 1fr; }
}

/* ============================================================
   Liquid glass on interactive controls — buttons, wallet bar,
   pills and badges gain the same frosted/glossy language as the
   .glass cards while keeping the electric-blue / white identity.
   ============================================================ */
.btn { position: relative; isolation: isolate; }
/* a single subtle top-gloss, shared by every button */
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.22), rgba(255,255,255,0) 50%);
}
/* primary stays solid electric blue with a soft lift + 1px inner rim — no sheen sweep */
.btn-primary {
  box-shadow: 0 8px 18px -10px rgba(10,90,210,0.55),
              inset 0 1px 0 rgba(255,255,255,0.45);
}
.btn-primary:hover {
  box-shadow: 0 10px 24px -10px rgba(10,90,210,0.6),
              inset 0 1px 0 rgba(255,255,255,0.5);
}
/* ghost is a light, clean frost */
.btn-ghost {
  background: rgba(255,255,255,0.6);
  -webkit-backdrop-filter: blur(8px) saturate(150%);
  backdrop-filter: blur(8px) saturate(150%);
  border-color: rgba(255,255,255,0.7);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}
.btn-ghost:hover { background: rgba(234,243,255,0.8); border-color: var(--blue); color: var(--blue-deep); }
/* the wallet bar reads as a frosted slab */
.wallet-bar {
  background: rgba(244,249,255,0.66);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  backdrop-filter: blur(10px) saturate(140%);
  border-color: rgba(255,255,255,0.7);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}
.wallet-actions { display: inline-flex; align-items: center; gap: 0.5rem; }
.wallet-qr { gap: 0.4em; }
.wallet-qr svg { opacity: 0.85; }
/* pills stay flat translucent — no per-element backdrop blur (crisper + cheaper at small size) */
.tag, .badge { box-shadow: inset 0 1px 0 rgba(255,255,255,0.65); }

/* ============================================================
   QR mobile-wallet modal — scan to open Joey inside a phone
   wallet. Stylish on-brand code: ink modules that hover blue,
   rounded eyes, Joey in the cleared center.
   ============================================================ */
.qr-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: var(--pad); }
.qr-modal[hidden] { display: none; }
.qr-backdrop {
  position: absolute; inset: 0; background: rgba(11,18,32,0.42);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity 0.24s var(--ease);
}
.qr-modal.is-open .qr-backdrop { opacity: 1; }
.qr-sheet {
  position: relative; width: min(420px, 100%); border-radius: 24px;
  padding: clamp(1.5rem, 4vw, 2.1rem); text-align: center;
  opacity: 0; transform: translateY(12px) scale(0.98);
  transition: opacity 0.26s var(--ease), transform 0.26s var(--ease);
}
.qr-modal.is-open .qr-sheet { opacity: 1; transform: none; }
.qr-sheet .kicker { margin-bottom: 0.35rem; }
.qr-sheet h3 { font-size: clamp(1.4rem, 3.6vw, 1.7rem); font-weight: 800; letter-spacing: -0.02em; }
.qr-sub { color: var(--body); font-size: 0.95rem; line-height: 1.5; margin: 0.55rem auto 1.2rem; max-width: 34ch; }
.qr-close {
  position: absolute; top: 0.9rem; right: 0.9rem; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(255,255,255,0.6); color: var(--body);
  font-size: 0.82rem; cursor: pointer; display: grid; place-items: center; transition: 0.18s;
}
.qr-close:hover { color: var(--ink); border-color: var(--blue); }
.qr-tabs {
  display: inline-flex; gap: 0.2rem; padding: 0.28rem; margin-bottom: 1.15rem;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,0.5);
}
.qr-tab {
  border: 0; background: none; cursor: pointer; font: inherit; font-weight: 600; font-size: 0.88rem;
  color: var(--muted); padding: 0.42em 1.05em; border-radius: 999px; transition: color 0.18s, background 0.18s;
}
.qr-tab.is-active { color: var(--blue-deep); background: var(--blue-tint); }
.qr-frame {
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  padding: clamp(0.9rem, 3vw, 1.3rem);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 12px 32px -22px rgba(20,50,90,0.45);
}
.qr-holder { width: 100%; aspect-ratio: 1; display: grid; place-items: center; }
.qr-loading { font-family: var(--mono); font-size: 0.82rem; color: var(--muted); line-height: 1.5; }
.qr-loading b { color: var(--ink); }
.qr-svg { width: 100%; height: auto; display: block; }
.qr-mod { fill: var(--ink); transition: fill 0.12s var(--ease); }
.qr-mod:hover { fill: var(--blue); }
.qr-eye { fill: var(--ink); transition: fill 0.12s var(--ease); cursor: pointer; }
.qr-eye:hover { fill: var(--blue); }
.qr-note { font-size: 0.8rem; color: var(--muted); margin-top: 1rem; }
.qr-note b { color: var(--body); }
body.qr-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .qr-backdrop, .qr-sheet { transition: none; }
  .qr-mod, .qr-eye { transition: none; }
}
