/* Kereskedő-napló. Design: pigments on lilac paper. One signature element: the day arc.
   Saturated flat colours carry meaning (violet = system, mint = gain/ok, coral = loss/stop, amber = caution, sky = info). */
@font-face { font-family: "Bricolage"; font-weight: 200 800; font-display: swap; src: url(/fonts/bricolage-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Bricolage"; font-weight: 200 800; font-display: swap; src: url(/fonts/bricolage-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Figtree"; font-weight: 300 900; font-display: swap; src: url(/fonts/figtree-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Figtree"; font-weight: 300 900; font-display: swap; src: url(/fonts/figtree-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #eef1f7; --surface: #ffffff; --surface-2: rgba(15,23,42,.04); --ink: #0f172a; --ink-2: #475569; --muted: #8190a5; --line: rgba(15,23,42,.09);
  --violet: #4f7cff; --mint: #12b886; --coral: #f0546a; --amber: #f59f00; --sky: #22b8cf;
  --on-accent: #ffffff; --mix: 11%; --track: rgba(15,23,42,.08);
  --glass: rgba(255,255,255,.62); --glass-strong: rgba(255,255,255,.86); --glass-line: rgba(255,255,255,.75);
  --shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 18px 40px -22px rgba(30,50,90,.35);
  --orb1: #9db8ff; --orb2: #8fe3d0; --orb3: #ffd3a8;
  --display: "Bricolage", "Avenir Next", "Trebuchet MS", system-ui, sans-serif;
  --ui: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-lg: 24px; --r-md: 16px; --r-sm: 10px; --nav-h: 0px;
}
:root[data-theme="dark"] {
  --bg: #070b14; --surface: #111827; --surface-2: rgba(255,255,255,.05); --ink: #e8edf7; --ink-2: #a3b0c6; --muted: #6f7d95; --line: rgba(255,255,255,.09);
  --violet: #7b9cff; --mint: #3ddc97; --coral: #ff7a8c; --amber: #ffc247; --sky: #4dd4e8;
  --on-accent: #07101f; --mix: 16%; --track: rgba(255,255,255,.09);
  --glass: rgba(20,28,46,.55); --glass-strong: rgba(17,24,39,.88); --glass-line: rgba(255,255,255,.09);
  --shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 20px 44px -24px rgba(0,0,0,.8);
  --orb1: #2b4bd6; --orb2: #0e8f7a; --orb3: #7a3fb8;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #070b14; --surface: #111827; --surface-2: rgba(255,255,255,.05); --ink: #e8edf7; --ink-2: #a3b0c6; --muted: #6f7d95; --line: rgba(255,255,255,.09);
    --violet: #7b9cff; --mint: #3ddc97; --coral: #ff7a8c; --amber: #ffc247; --sky: #4dd4e8;
    --on-accent: #07101f; --mix: 16%; --track: rgba(255,255,255,.09);
    --glass: rgba(20,28,46,.55); --glass-strong: rgba(17,24,39,.88); --glass-line: rgba(255,255,255,.09);
    --shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 20px 44px -24px rgba(0,0,0,.8);
    --orb1: #2b4bd6; --orb2: #0e8f7a; --orb3: #7a3fb8;
  }
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 15px/1.5 var(--ui); min-height: 100vh; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, .display { font-family: var(--display); font-weight: 700; letter-spacing: -0.01em; }
.num { font-variant-numeric: tabular-nums lining-nums; }
.muted { color: var(--muted); }
.good { color: var(--mint); } .bad { color: var(--coral); } .warn { color: var(--amber); }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 6px; }
svg.i { width: 1em; height: 1em; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* tone helper: every element that sets --c gets a tinted background through .tint */
.tone-good { --c: var(--mint); } .tone-bad { --c: var(--coral); } .tone-warn { --c: var(--amber); }
.tone-info { --c: var(--violet); } .tone-sky { --c: var(--sky); } .tone-muted { --c: var(--muted); }
.tint { background: color-mix(in srgb, var(--c) var(--mix), var(--surface)); }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background:
  radial-gradient(70vmax 40vmax at 85% -10%, color-mix(in srgb, var(--violet) 22%, transparent), transparent 70%),
  radial-gradient(60vmax 40vmax at -10% 110%, color-mix(in srgb, var(--mint) 18%, transparent), transparent 70%); }
.login-box { width: min(400px, 100%); background: var(--surface); border-radius: var(--r-lg); padding: 30px 28px; display: grid; gap: 12px; box-shadow: var(--shadow); }
.login-box .logo { width: 52px; height: 52px; }
.login-box h1 { font-size: 30px; }
.login-box label { font-weight: 600; font-size: 14px; }
.login-box input { font: inherit; padding: 13px 14px; border: 2px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); color: var(--ink); }
.login-box input:focus { border-color: var(--violet); outline: none; }
.err { color: var(--coral); min-height: 1.5em; font-weight: 600; }
.btn { background: var(--violet); color: var(--on-accent); font-weight: 700; padding: 13px 18px; border-radius: var(--r-md); transition: transform .12s ease, filter .12s ease; }
.btn:hover { filter: brightness(1.08); } .btn:active { transform: scale(.98); }

/* shell */
#app { max-width: 1240px; margin: 0 auto; padding: 14px 16px calc(var(--nav-h) + 40px); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; padding: 2px 0 14px; }
.brand { display: flex; align-items: center; gap: 12px; }
.logo { width: 38px; height: 38px; flex: none; }
.brand h1 { font-size: 22px; line-height: 1.1; }
.brand small { display: block; color: var(--muted); font-size: 13px; }
.top-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chip-mode { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; font-weight: 700; font-size: 13.5px; color: var(--c); }
.chip-mode::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.seg { display: inline-flex; background: var(--surface); border-radius: 99px; padding: 3px; gap: 2px; }
.seg button { padding: 5px 11px; border-radius: 99px; font-size: 13px; font-weight: 700; color: var(--muted); transition: background .15s, color .15s; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); font-size: 19px; color: var(--ink-2); transition: background .15s, color .15s; }
.icon-btn:hover { color: var(--ink); background: var(--surface-2); }
.live { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); padding: 0 4px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); display: inline-block; }
.dot.on { background: var(--mint); } .dot.stale { background: var(--amber); } .dot.off { background: var(--coral); }

.banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--r-md); margin: 0 0 12px; font-weight: 600; color: var(--ink); }
.banner svg { font-size: 22px; color: var(--c); }
.banner .grow { flex: 1; }
.banner small { display: block; font-weight: 400; color: var(--ink-2); }

/* hero: arc + feed */
.hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 14px; align-items: stretch; }
.arc-panel { background: var(--surface); border-radius: var(--r-lg); padding: 16px 16px 14px; box-shadow: var(--shadow); display: grid; gap: 6px; }
.arc-wrap { position: relative; }
.arc-wrap svg { display: block; width: 100%; height: auto; overflow: visible; }
.arc-center { position: absolute; left: 50%; bottom: 7%; transform: translateX(-50%); text-align: center; width: 62%; pointer-events: none; }
.arc-center .lbl { color: var(--muted); font-size: 13.5px; font-weight: 600; }
.arc-center .big { font: 800 clamp(40px, 7.4vw, 70px)/1 var(--display); letter-spacing: -0.03em; margin: 2px 0 6px; }
.arc-center .sub { color: var(--ink-2); font-size: 14px; }
.arc-tick { font: 600 11.5px var(--ui); fill: var(--muted); }
.arc-tick.strong { fill: var(--ink-2); }
.bead { cursor: pointer; transition: transform .18s cubic-bezier(.3,1.6,.5,1); transform-box: fill-box; transform-origin: center; }
.bead:hover, .bead.sel { transform: scale(1.35); }
.bead:focus-visible { outline: none; }
.bead:focus-visible .bead-ring { stroke: var(--sky); stroke-width: 3; }
.bead-ring { fill: none; stroke: transparent; stroke-width: 2.5; }
.bead.sel .bead-ring { stroke: var(--ink); }
.hand-halo { fill: var(--sky); opacity: .25; }
.status-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.phase { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.phase .dot { background: var(--c); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); display: inline-block; }

.feed-panel { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); display: flex; flex-direction: column; min-height: 0; max-height: 560px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 18px 8px; flex-wrap: wrap; }
.panel-head h2 { font-size: 19px; }
.feed { list-style: none; margin: 0; padding: 4px 10px 12px; overflow-y: auto; display: grid; gap: 4px; align-content: start; flex: 1; }
.feed-item { display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 9px 10px; border-radius: var(--r-md); transition: background .15s; }
.feed-item:hover, .feed-item.sel { background: var(--surface-2); }
.feed-item.sel { box-shadow: inset 3px 0 0 var(--c); }
.ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: var(--c); font-size: 19px; }
.feed-item b { display: block; font-weight: 700; line-height: 1.25; }
.feed-item span.sub { color: var(--muted); font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-item time { font-size: 12.5px; color: var(--muted); }
.feed-empty { padding: 26px 20px; color: var(--ink-2); display: grid; gap: 8px; justify-items: start; }
.feed-empty .ico { width: 48px; height: 48px; font-size: 24px; }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); gap: 12px; margin: 14px 0 6px; }
.tile { border-radius: var(--r-lg); padding: 14px 16px 15px; display: grid; gap: 4px; align-content: start; position: relative; overflow: hidden; }
.tile .head { display: flex; align-items: center; gap: 9px; color: var(--ink-2); font-weight: 600; font-size: 14px; }
.tile .head .ico { width: 30px; height: 30px; border-radius: 10px; font-size: 16px; background: var(--c); color: var(--on-accent); }
.tile .val { font: 800 28px/1.1 var(--display); letter-spacing: -0.02em; margin-top: 4px; }
.tile .note { font-size: 13px; color: var(--ink-2); }
.slots { display: flex; gap: 6px; margin-top: 6px; }
.slots i { flex: 1; height: 9px; border-radius: 6px; background: color-mix(in srgb, var(--c) 22%, var(--surface)); }
.slots i.on { background: var(--c); }
.meter { height: 9px; border-radius: 6px; background: color-mix(in srgb, var(--c) 18%, var(--surface)); overflow: hidden; margin-top: 8px; }
.meter b { display: block; height: 100%; border-radius: 6px; background: var(--c); width: 0; transition: width .9s cubic-bezier(.2,.8,.2,1); }
.spark { width: 100%; height: 34px; margin-top: 6px; }

/* nav */
.nav { display: flex; gap: 6px; margin: 22px 0 16px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav button { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 99px; font-weight: 700; color: var(--ink-2); background: var(--surface); white-space: nowrap; transition: background .15s, color .15s, transform .12s; }
.nav button:hover { color: var(--ink); }
.nav button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.nav button svg { font-size: 18px; }
.nav .badge { background: var(--coral); color: #fff; font-size: 11.5px; min-width: 19px; height: 19px; border-radius: 10px; display: grid; place-items: center; padding: 0 5px; }

/* panels */
.panel { display: grid; gap: 14px; }
.panel[hidden] { display: none; }
.panel.enter { animation: panel-in .28s ease-out both; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.card { background: var(--surface); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow); display: grid; gap: 12px; align-content: start; min-width: 0; }
.card h2 { font-size: 19px; }
.card .lead { color: var(--ink-2); max-width: 60ch; }
.empty { display: grid; justify-items: start; gap: 10px; padding: 8px 0; color: var(--ink-2); max-width: 56ch; }
.empty .ico { width: 46px; height: 46px; font-size: 23px; }
.empty b { color: var(--ink); font-size: 16px; }

.rows { display: grid; gap: 8px; }
.row { display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-2); }
.row .t { font-weight: 700; } .row .s { color: var(--muted); font-size: 13px; }
.row .amt { font: 800 18px var(--display); text-align: right; }
.avatar { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font: 800 13px var(--display); background: var(--c); color: var(--on-accent); letter-spacing: -0.01em; }
.pillrow { display: flex; flex-wrap: wrap; gap: 8px; }
.sym { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 99px; background: var(--surface-2); font-weight: 700; }
.sym .avatar { width: 30px; height: 30px; border-radius: 50%; font-size: 8.5px; letter-spacing: -0.03em; }
.steps { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.steps b { color: var(--c); }
.cta { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: var(--r-lg); color: var(--ink); }
.cta .ico { background: var(--c); color: var(--on-accent); }
.cta p { color: var(--ink-2); }

/* tables */
.tablewrap { overflow-x: auto; margin: 0 -6px; padding: 0 6px; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 11px 10px 11px 0; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
th { color: var(--muted); font-weight: 700; font-size: 13px; }
th button { font-weight: 700; color: inherit; display: inline-flex; gap: 4px; align-items: center; }
th button:hover { color: var(--ink); }
td.r, th.r { text-align: right; padding-right: 12px; padding-left: 10px; } td.r:last-child, th.r:last-child { padding-right: 0; }
tbody tr { transition: background .12s; } tbody tr:hover { background: var(--surface-2); }
tr.hl { background: color-mix(in srgb, var(--violet) 12%, var(--surface)); }
.tag { display: inline-block; padding: 2px 10px; border-radius: 99px; font-weight: 700; font-size: 12.5px; color: var(--c); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fchip { padding: 6px 14px; border-radius: 99px; background: var(--surface-2); font-weight: 700; font-size: 13.5px; color: var(--ink-2); transition: background .15s, color .15s; }
.fchip[aria-pressed="true"] { background: var(--violet); color: var(--on-accent); }
select { font: inherit; font-weight: 600; background: var(--surface-2); color: var(--ink); border: 2px solid transparent; border-radius: 99px; padding: 5px 12px; }
select:focus { border-color: var(--violet); outline: none; }

/* charts */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font: 600 13px var(--ui); fill: var(--muted); }
.tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--bg); padding: 5px 10px; border-radius: 9px; font-size: 13px; font-weight: 600; white-space: nowrap; transform: translate(-50%, -125%); z-index: 3; }
.donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.donut { width: 132px; height: 132px; flex: none; }
.donut text { font: 800 24px var(--display); fill: var(--ink); text-anchor: middle; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; flex: 1; }
.kv div { background: var(--surface-2); border-radius: var(--r-md); padding: 10px 12px; }
.kv small { display: block; color: var(--muted); font-size: 12.5px; }
.kv b { font: 800 19px var(--display); }
.stack { display: flex; height: 14px; border-radius: 8px; overflow: hidden; background: var(--track); }
.stack i { display: block; background: var(--c); }
.legend-row { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ink-2); }
.legend-row span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: 6px; }

/* what-if */
.wi { display: grid; grid-template-columns: 42px minmax(0,1fr) minmax(120px, 220px); gap: 12px; align-items: center; padding: 12px; border-radius: var(--r-md); background: var(--surface-2); }
.wi .why { color: var(--ink-2); font-size: 13.5px; }
.rbar { position: relative; height: 26px; background: var(--track); border-radius: 13px; overflow: hidden; }
.rbar::after { content: ""; position: absolute; left: 33.3%; top: 0; bottom: 0; width: 2px; background: var(--surface); }
.rbar b { position: absolute; top: 4px; bottom: 4px; background: var(--c); border-radius: 8px; transition: width .8s cubic-bezier(.2,.8,.2,1); }
.rbarwrap { display: flex; align-items: center; gap: 10px; } .rbarwrap .rbar { flex: 1; }
.rbarwrap span { font: 800 15px var(--display); min-width: 58px; text-align: right; color: var(--c); }
.callout { padding: 12px 14px; border-radius: var(--r-md); border-left: 4px solid var(--c); color: var(--ink); }
.big-r { font: 800 40px/1 var(--display); letter-spacing: -0.02em; }

/* sheet */
.scrim { position: fixed; inset: 0; background: rgba(14,13,43,.38); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 20; }
.scrim.on { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; z-index: 21; background: var(--surface); color: var(--ink); box-shadow: 0 -20px 60px -20px rgba(0,0,0,.45); display: flex; flex-direction: column;
  right: 0; top: 0; bottom: 0; width: min(440px, 100%); border-radius: var(--r-lg) 0 0 var(--r-lg); transform: translateX(105%); transition: transform .28s cubic-bezier(.2,.8,.2,1); }
.sheet.on { transform: none; }
.sheet-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 18px 10px; }
.sheet-head h2 { font-size: 21px; line-height: 1.2; flex: 1; }
.sheet-body { padding: 4px 18px 18px; overflow-y: auto; display: grid; gap: 14px; align-content: start; flex: 1; }
.sheet-body pre { margin: 0; white-space: pre-wrap; font: 400 14.5px/1.55 var(--ui); color: var(--ink-2); background: var(--surface-2); padding: 12px 14px; border-radius: var(--r-md); }
.sheet-foot { display: flex; gap: 8px; padding: 12px 18px 18px; border-top: 1px solid var(--line); }
.sheet-foot button { flex: 1; padding: 11px; border-radius: var(--r-md); background: var(--surface-2); font-weight: 700; display: inline-flex; gap: 6px; align-items: center; justify-content: center; }
.sheet-foot button:hover:not(:disabled) { background: var(--line); }
.sheet-foot button:disabled { opacity: .4; cursor: default; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.facts div { background: var(--surface-2); border-radius: var(--r-sm); padding: 8px 10px; }
.facts small { color: var(--muted); display: block; font-size: 12px; } .facts b { font-weight: 700; }

.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 18px); transform: translate(-50%, 30px); opacity: 0; background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 99px; font-weight: 700; z-index: 30; transition: transform .25s cubic-bezier(.3,1.5,.5,1), opacity .2s; display: flex; align-items: center; gap: 8px; max-width: calc(100vw - 32px); }
.toast.on { transform: translate(-50%, 0); opacity: 1; }

/* motion: one orchestrated entrance, then only responses to the data and to the person */
.intro .arc-track { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s cubic-bezier(.4,0,.2,1) forwards; }
.intro .bead { animation: pop .5s cubic-bezier(.3,1.6,.5,1) both; animation-delay: calc(0.9s + var(--i, 0) * 70ms); }
.intro .tile { animation: rise .5s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(0.5s + var(--i, 0) * 80ms); }
.intro .feed-panel, .intro .arc-center { animation: fade .6s ease-out both; animation-delay: .3s; }
.hand { transition: transform .6s ease; }
.hand-halo { animation: halo 2.4s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.dot.on { animation: blink 2.4s ease-in-out infinite; }
.feed-item.fresh { animation: slide-in .5s cubic-bezier(.2,.8,.2,1); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: scale(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes halo { 0% { transform: scale(.6); opacity: .45; } 100% { transform: scale(2.1); opacity: 0; } }
@keyframes blink { 50% { opacity: .4; } }
@keyframes slide-in { from { opacity: 0; transform: translateX(-12px); background: color-mix(in srgb, var(--c) 25%, transparent); } to { opacity: 1; transform: none; } }
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* responsive: phone gets a bottom bar, stacked tables, a bottom sheet */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .feed-panel { max-height: 420px; }
}
@media (max-width: 640px) {
  :root { --nav-h: 74px; }
  #app { padding: 10px 12px calc(var(--nav-h) + 28px); }
  .brand small { display: none; }
  .nav { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: var(--surface); box-shadow: 0 -10px 30px -16px rgba(0,0,0,.4); z-index: 15; justify-content: space-between; overflow: visible; }
  .nav button { flex-direction: column; gap: 3px; padding: 6px 4px; font-size: 11.5px; border-radius: 14px; flex: 1; position: relative; background: none; }
  .nav button[aria-selected="true"] { background: color-mix(in srgb, var(--violet) 16%, var(--surface)); color: var(--ink); }
  .nav button svg { font-size: 22px; }
  .nav .badge { position: absolute; top: 2px; right: 18%; }
  .sheet { right: 0; left: 0; top: auto; width: 100%; max-height: 84vh; border-radius: var(--r-lg) var(--r-lg) 0 0; transform: translateY(105%); }
  .sheet.on { transform: none; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .tile { padding: 12px 13px 13px; } .tile .val { font-size: 23px; }
  .arc-center .big { font-size: clamp(34px, 11vw, 48px); }
  table.rtable thead { display: none; }
  table.rtable, table.rtable tbody, table.rtable tr, table.rtable td { display: block; width: 100%; }
  table.rtable tr { background: var(--surface-2); border-radius: var(--r-md); padding: 8px 12px; margin-bottom: 8px; }
  table.rtable td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; white-space: normal; }
  table.rtable td::before { content: attr(data-label); color: var(--muted); font-weight: 600; text-align: left; }
  table.rtable td.r { padding: 4px 0; }
  .wi { grid-template-columns: 42px 1fr; } .wi .rbarwrap, .wi > .muted { grid-column: 1 / -1; }
}

/* ---- glass layer: one calm neutral, colour only where it means something ---- */
body { background: var(--bg); position: relative; overflow-x: hidden; }
body::before, body::after { content: ""; position: fixed; z-index: -1; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(90px); opacity: .55; pointer-events: none; }
body::before { background: radial-gradient(circle, var(--orb1), transparent 65%); top: -22vmax; left: -14vmax; animation: drift-a 26s ease-in-out infinite alternate; }
body::after { background: radial-gradient(circle, var(--orb2), transparent 65%); bottom: -26vmax; right: -16vmax; animation: drift-b 32s ease-in-out infinite alternate; }
#app::before { content: ""; position: fixed; z-index: -1; width: 40vmax; height: 40vmax; border-radius: 50%; filter: blur(100px); opacity: .35; pointer-events: none; background: radial-gradient(circle, var(--orb3), transparent 65%); top: 30vh; right: 10vw; animation: drift-c 38s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate(14vmax, 10vmax) scale(1.15); } }
@keyframes drift-b { to { transform: translate(-12vmax, -9vmax) scale(1.2); } }
@keyframes drift-c { to { transform: translate(-16vmax, 12vmax) scale(.85); } }

.arc-panel, .feed-panel, .card, .tile, .banner, .cta, .login-box, .seg, .icon-btn, .nav button, .sheet, .toast {
  -webkit-backdrop-filter: blur(20px) saturate(1.5); backdrop-filter: blur(20px) saturate(1.5);
}
.arc-panel, .feed-panel, .card, .tile, .cta, .login-box { background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--shadow); }
.tile.tint, .banner.tint, .cta.tint { background: var(--glass); border: 1px solid var(--glass-line); }
.banner.tint, .cta.tint { background: linear-gradient(90deg, color-mix(in srgb, var(--c) 16%, transparent), var(--glass) 60%); border-left: 3px solid var(--c); }
.seg, .icon-btn, .nav button { background: var(--glass); border: 1px solid var(--glass-line); }
.seg { padding: 3px; } .seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); box-shadow: 0 4px 14px -6px rgba(0,0,0,.5); }
.nav button[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: transparent; box-shadow: 0 8px 20px -10px rgba(0,0,0,.6); }
.sheet { background: var(--glass-strong); border: 1px solid var(--glass-line); }
.toast { background: var(--glass-strong); color: var(--ink); border: 1px solid var(--glass-line); box-shadow: var(--shadow); }
.toast svg { color: var(--violet); }
.row, .wi, .kv div, .sym, .feed-item:hover, .feed-item.sel, .sheet-body pre, .facts div { background: var(--surface-2); }
.fchip { background: var(--surface-2); } .fchip[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.tile .head .ico { background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); }
.tile .val { font-size: 30px; }
.ico.tint { background: color-mix(in srgb, var(--c) 16%, transparent); }
.avatar { background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.tag.tint { background: color-mix(in srgb, var(--c) 15%, transparent); }
.btn { background: linear-gradient(135deg, var(--violet), var(--sky)); color: var(--on-accent); box-shadow: 0 10px 24px -12px var(--violet); }
.login { background: none; }
.login-box input, select { background: var(--surface-2); border: 1px solid var(--line); }
.callout.tint { background: color-mix(in srgb, var(--c) 10%, transparent); }
.arc-center .big { background: none; }
.hand-halo { fill: var(--violet); }
.dot.on { box-shadow: 0 0 0 0 color-mix(in srgb, var(--mint) 60%, transparent); animation: ping 2.2s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--mint) 55%, transparent); } 80%,100% { box-shadow: 0 0 0 9px transparent; } }

/* motion: hover feedback, shimmer, staggered panel entry, flowing light on the entry window */
.tile, .card, .row, .feed-item, .wi { transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s, background .2s; }
.tile:hover, .card:hover { transform: translateY(-3px); box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 26px 44px -22px rgba(30,50,90,.45); }
.row:hover, .wi:hover { transform: translateX(3px); }
.feed-item:hover { transform: translateX(3px); }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.28) 50%, transparent 65%); transform: translateX(-120%); transition: transform .9s ease; pointer-events: none; }
.tile:hover::after { transform: translateX(120%); }
.panel.enter > * { animation: rise .55s cubic-bezier(.2,.8,.2,1) both; }
.panel.enter > *:nth-child(2) { animation-delay: .08s; } .panel.enter > *:nth-child(3) { animation-delay: .16s; } .panel.enter > *:nth-child(4) { animation-delay: .24s; }
.panel.enter .grid2 > * { animation: rise .55s cubic-bezier(.2,.8,.2,1) both; } .panel.enter .grid2 > *:nth-child(2) { animation-delay: .1s; }
.arc-flow { stroke-dasharray: 5 95; stroke-dashoffset: 100; animation: flow 5.5s linear infinite; filter: drop-shadow(0 0 6px #fff); }
@keyframes flow { to { stroke-dashoffset: 0; } }
.bead { filter: drop-shadow(0 4px 8px color-mix(in srgb, var(--c) 45%, transparent)); }
.bead:hover { filter: drop-shadow(0 0 12px var(--c)); }
.nav button, .seg button, .fchip, .icon-btn { transition: transform .15s, background .2s, color .2s; }
.nav button:hover, .icon-btn:hover, .fchip:hover { transform: translateY(-1px); }
.nav button:active, .icon-btn:active, .fchip:active { transform: scale(.96); }
.banner { animation: banner-in .5s cubic-bezier(.2,.8,.2,1) both; }
@keyframes banner-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.rbar b { transition: width .9s cubic-bezier(.2,.8,.2,1); }
@media (max-width: 640px) {
  .nav { background: var(--glass-strong); -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5); border-top: 1px solid var(--glass-line); }
  .nav button { background: none; border: 0; box-shadow: none; }
  .nav button[aria-selected="true"] { background: color-mix(in srgb, var(--violet) 18%, transparent); color: var(--ink); }
}
@media (prefers-reduced-motion: reduce) { body::before, body::after, #app::before, .arc-flow { animation: none !important; } }
