/* The worker dashboard: the app's glass, a trading desk's reading order (who, the period, the figures, the curve, the
   calendar, the rows). One blue for the curve and the calendar's intensity, ink for every number. */

/* ---------- connect ---------- */
.cn { max-width: 480px; padding: 36px 32px 28px; text-align: center; display: grid; justify-items: center; gap: 0; }
.cn-mark { width: 76px; height: 76px; border-radius: 50%; margin-bottom: 22px; box-shadow: 0 18px 40px -16px rgba(30, 150, 200, 0.55), 0 0 0 6px rgba(255, 255, 255, 0.7); }
.cn-mark svg { width: 100%; height: 100%; display: block; }
.cn h2 { margin: 12px 0 14px; font-size: clamp(30px, 3vw, 40px); }
.cn > p.muted { margin: 0 0 26px; font-size: 15.5px; max-width: 30em; }
.cn-go { width: 100%; }
.plat-btn svg { width: 20px; height: 20px; display: block; }
.cn-steps { list-style: none; margin: 22px 0 0; padding: 0; width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cn-steps li { display: grid; justify-items: center; gap: 8px; padding: 12px 6px; border-radius: 14px; background: rgba(255, 255, 255, 0.6); border: 1px solid var(--line); font-size: 13px; color: var(--muted); transition: background 0.3s, color 0.3s, border-color 0.3s; }
.cn-steps b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 500 12px var(--mono); background: var(--surface-2); color: var(--ink-2); transition: background 0.3s, color 0.3s; }
.cn-steps em { font-style: normal; color: var(--ink); }
.cn-steps li.done { color: var(--ink-2); }
.cn-steps li.done b { background: var(--ink); color: #fff; }
.cn-steps li.now { border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: var(--accent-soft); color: var(--ink); }
.cn-steps li.now b { background: var(--accent); color: #fff; }
.cn-wait { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-top: 18px; font-size: 13px; }
.cn-wait .live { font-size: 12px; }
.cn .err { margin-top: 10px; }
.fine-print { margin: 14px 0 0; font-size: 13px; color: var(--muted); line-height: 1.7; }

/* ---------- the bar when connected ---------- */
.who-chip { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; }
.who-chip .av-wrap, .who-chip .av { width: 30px; height: 30px; }
.btn.out { background: rgba(255, 255, 255, 0.82); border-color: var(--line-2); color: var(--ink); }
@media (max-width: 520px) { .who-chip .mono { display: none; } }

/* ---------- head ---------- */
.wd { padding-top: 36px; }
.wd-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.wd-me { display: flex; align-items: center; gap: 18px; min-width: 0; }
.wd-me h1 { font-size: clamp(30px, 3.4vw, 44px); line-height: 1; overflow-wrap: anywhere; }
.wd-me p { margin: 8px 0 0; font-size: 13.5px; }
.av-wrap.av-lg, .av.lg { width: 64px; height: 64px; flex: none; }
.av.ini.lg { font-size: 18px; }
.seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px; background: rgba(255, 255, 255, 0.7); border: 1px solid var(--line-2); }
.seg button { height: 34px; min-width: 52px; padding: 0 14px; border: 0; border-radius: 999px; background: none; font: 500 13px var(--mono); color: var(--muted); cursor: pointer; transition: background 0.2s, color 0.2s; }
.seg button.on { background: var(--ink); color: #fff; }
.seg button:not(.on):hover { color: var(--ink); }

.active-strip { margin-top: 20px; display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap; padding: 14px 20px; font-size: 13.5px; }
.active-strip .live { font-size: 12.5px; }
.active-strip .speed { margin-left: auto; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }

/* ---------- figures ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 24px 0 24px; padding: 0; background: var(--card); border: 1px solid rgba(255, 255, 255, 0.9); border-radius: var(--r); box-shadow: var(--shadow); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); }
.kpis > div { padding: 18px 22px; display: grid; gap: 4px; min-width: 0; }
.kpis > div + div { border-left: 1px solid var(--line); }
.kpis dt { font: 400 11.5px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.kpis dd { margin: 0; font-size: clamp(22px, 2vw, 28px); font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpis span { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1020px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .kpis > div:nth-child(4) { border-left: 0; } .kpis > div:nth-child(n + 4) { border-top: 1px solid var(--line); } }
@media (max-width: 560px) { .kpis { grid-template-columns: 1fr 1fr; } .kpis > div { border-left: 0 !important; border-top: 1px solid var(--line); } .kpis > div:nth-child(2n) { border-left: 1px solid var(--line) !important; } .kpis > div:nth-child(-n + 2) { border-top: 0; } .kpis > div:last-child { grid-column: 1 / -1; border-left: 0 !important; } }

.wd-grid { margin-top: 0; }

/* ---------- the curve ---------- */
.pnl { padding: 22px 22px 14px; }
.pnl-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.pnl-big { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 6px 0 2px; }
.pnl-big > span:first-child { font-size: clamp(34px, 3.4vw, 46px); font-weight: 600; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.pnl-delta { font-size: 13px; color: var(--muted); }
.pnl-delta .up { color: #1f8a3a; }
.pnl-delta .down { color: var(--fault); }
.pnl-head > .mono { font-size: 12.5px; }
.chart { position: relative; margin: 0 -6px; }
.chart svg { display: block; width: 100%; height: auto; touch-action: pan-y; }
.chart text { font: 11px var(--mono); fill: var(--faint); }
.chart .g { stroke: var(--line); stroke-width: 1; }
.chart .ln { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .pd { stroke: var(--accent); stroke-width: 2; stroke-linecap: round; opacity: 0.45; }
.chart .guide { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .dot { fill: var(--accent); stroke: #fff; stroke-width: 2; }
.chart .empty-t { font: 13px var(--body); fill: var(--muted); }
.tip { position: absolute; z-index: 3; pointer-events: none; display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.96); border: 1px solid var(--line-2); box-shadow: 0 12px 30px -14px rgba(40, 48, 90, 0.4); font-size: 12px; white-space: nowrap; }
.tip b { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }

/* ---------- the calendar ---------- */
.cal { margin-top: 12px; }
.cal-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.cal-head h3 { margin-top: 6px; font-size: 22px; }
.cal-head .mono { font-size: 15px; font-weight: 500; margin-right: 6px; }
.btn.icon { width: 34px; padding: 0; font-size: 18px; }
.cal-dow, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-dow span { font: 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 0 8px 8px; }
.d { position: relative; min-height: 82px; padding: 8px; border-radius: 12px; background: rgba(255, 255, 255, 0.55); border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.d.pad { background: none; border-color: transparent; }
.d.fut { opacity: 0.45; }
.d.today { border-color: var(--ink); }
.d .dn { font: 11.5px var(--mono); color: var(--muted); }
.d b { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d i { font: normal 10.5px var(--mono); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d.lv1 { background: color-mix(in srgb, var(--accent) 9%, #fff); border-color: color-mix(in srgb, var(--accent) 16%, transparent); }
.d.lv2 { background: color-mix(in srgb, var(--accent) 18%, #fff); border-color: color-mix(in srgb, var(--accent) 24%, transparent); }
.d.lv3 { background: color-mix(in srgb, var(--accent) 30%, #fff); border-color: color-mix(in srgb, var(--accent) 34%, transparent); }
.d.lv4 { background: color-mix(in srgb, var(--accent) 44%, #fff); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.d.lv1 .dn, .d.lv2 .dn, .d.lv3 .dn, .d.lv4 .dn { color: var(--ink-2); }
.cal-foot { display: flex; gap: 8px 22px; flex-wrap: wrap; margin-top: 16px; font-size: 12.5px; color: var(--ink-2); }
@media (max-width: 640px) { .cal-dow, .cal-grid { gap: 4px; } .cal-dow span { padding: 0 2px 6px; font-size: 10px; letter-spacing: 0; } .d { min-height: 54px; padding: 5px; border-radius: 9px; } .d i { display: none; } .d b { font-size: 12px; } .d .dn { font-size: 10px; } }

/* ---------- the side ---------- */
.x-ok { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.x-ok b { font-family: var(--mono); font-weight: 500; }
.xin { flex: 1; min-width: 0; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.9); font: 14px var(--mono); }
.xin:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
#xBox .addr span { font-weight: 500; letter-spacing: 0.04em; }
#xBox.xl-top { margin-top: 20px; border-color: color-mix(in srgb, var(--accent) 35%, transparent); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow); }
#xBox.xl-top #xLabel { color: var(--accent); }
.x-go { gap: 10px; }
.x-go .plat svg { width: 16px; height: 16px; color: #fff; }
#xBox.xl-top #xBody, #xBox.xl-top .err { max-width: 560px; }
.mix { display: grid; gap: 14px; margin-top: 14px; }
.mx { display: grid; grid-template-columns: 22px minmax(0, 1fr) 84px; grid-template-areas: "i l v" "b b p"; gap: 6px 10px; align-items: center; font-size: 14px; }
.mx-i { grid-area: i; display: inline-flex; color: var(--ink); }
.mx-i svg { width: 15px; height: 15px; }
.mx-i .tick { font: 600 13px var(--mono); width: 15px; text-align: center; }
.mx-l { grid-area: l; }
.mx .mono:not(.mx-p) { grid-area: v; font-size: 13.5px; text-align: right; }
.mx-bar { grid-area: b; height: 6px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.mx-bar i { display: block; height: 100%; border-radius: 4px; background: var(--accent); transition: width 0.6s var(--ease); }
.mx-p { grid-area: p; font-size: 12px; min-width: 34px; text-align: right; }
.ref .big { font-size: 26px; }
.ref .addr span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.ref-list { margin-top: 10px; }
.rr { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; padding: 9px 2px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.rr:last-child { border-bottom: 0; }
.rr span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fast { color: var(--accent); }
table.rows td a:not(.link) { border-bottom: 1px solid var(--line-2); }
.wd .dash-side { top: 92px; min-width: 0; }
.wd .dash-main, .wd .dash-side > * { min-width: 0; }
.wd .addr span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1020px) { .wd .dash-side { order: 0; } }
