/*
  The Vivid dashboard: the upgraded tier above the Classic dashboard (dash.css). Every rule here applies only when
  <html data-look="vivid">, except the look switch itself, which shows in both looks. Colours come from brand.css; this
  file is the same for every client. Phone first: a dock at the bottom in thumb reach; a rail on the left from 900px.
  Motion is CSS on the clock (never per frame from script) and stops for reduced motion. No em-dashes.
*/

/* ---------------------------------------------------------------- the look switch, both looks */
.look-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.look-switch .seg { display: inline-flex; padding: 3px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); }
.look-switch button { min-height: 38px; min-width: 44px; padding: 0 13px; border-radius: 99px; border: 0; background: transparent; color: var(--muted); font: 600 13px/1 var(--sans); cursor: pointer; }
.look-switch button[aria-pressed="true"] { background: var(--gold); color: var(--on-gold); }
.look-switch .lbl-s { font: 600 10px/1 ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .18em; color: var(--faint); text-transform: uppercase; }
html[data-look="classic"] .look-switch .theme-seg, html[data-look="classic"] .look-switch .theme-lbl { display: none; }
html[data-look="classic"] .top-in { flex-wrap: wrap; align-items: center; }

/* ---------------------------------------------------------------- tokens: the Classic names, in Vivid colours */
html[data-look="vivid"] {
  --bg: var(--v-bg); --panel: color-mix(in srgb, var(--v-bg-2) 78%, transparent); --panel-2: color-mix(in srgb, var(--v-bg-2) 92%, #fff 4%);
  --text: var(--v-ink); --muted: var(--v-muted); --faint: var(--v-faint); --line: var(--v-line);
  --gold: var(--v-b); --gold-2: var(--v-a); --gold-soft: color-mix(in srgb, var(--v-b) 16%, transparent); --on-gold: var(--v-on);
  --up: var(--v-up); --down: var(--v-down); --focus: var(--v-a);
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  --serif: "Vivid Serif", "Cormorant Garamond", Georgia, serif; --sans: "Vivid Sans", "Space Grotesk", system-ui, -apple-system, sans-serif;
  --r: 18px;
  color-scheme: dark;
}
html[data-look="vivid"] body { background: var(--v-bg); }

/* the moving light behind everything: two slow glows and a fine grid, drawn by CSS, never by script */
.v-aura { display: none; }
html[data-look="vivid"] .v-aura { display: block; position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
html[data-look="vivid"] .v-aura::before, html[data-look="vivid"] .v-aura::after { content: ""; position: absolute; width: 90vmax; height: 90vmax; border-radius: 50%; filter: blur(40px); }
html[data-look="vivid"] .v-aura::before { right: -30vmax; top: -40vmax; background: radial-gradient(closest-side, var(--v-glow-1), transparent); animation: v-drift 26s ease-in-out infinite alternate; }
html[data-look="vivid"] .v-aura::after { left: -35vmax; bottom: -50vmax; background: radial-gradient(closest-side, var(--v-glow-2), transparent); animation: v-drift 34s ease-in-out infinite alternate-reverse; }
html[data-look="vivid"] .v-aura i { position: absolute; inset: 0; background:
  linear-gradient(color-mix(in srgb, var(--v-b) 5%, transparent) 1px, transparent 1px) 0 0 / 56px 56px,
  linear-gradient(90deg, color-mix(in srgb, var(--v-b) 5%, transparent) 1px, transparent 1px) 0 0 / 56px 56px;
  mask-image: radial-gradient(ellipse at 70% 10%, #000 10%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse at 70% 10%, #000 10%, transparent 70%); }
@keyframes v-drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(-8vmax, 6vmax) scale(1.12); } }
html[data-look="vivid"] .top, html[data-look="vivid"] main, html[data-look="vivid"] .v-rail, html[data-look="vivid"] .v-dock { position: relative; z-index: 1; }

/* ---------------------------------------------------------------- the frame */
html[data-look="vivid"] .top { position: sticky; background: color-mix(in srgb, var(--v-bg) 72%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--v-line); z-index: 20; }
html[data-look="vivid"] .top-in { align-items: center; padding: 10px 16px; flex-wrap: wrap; }
html[data-look="vivid"] .top h1 { display: flex; align-items: center; gap: 10px; font-size: 22px; letter-spacing: .08em; color: var(--v-a); }
html[data-look="vivid"] .top h1::before { content: ""; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--v-line-2); background: var(--v-bg-2) var(--v-mark) center / 72% no-repeat; flex: none; }
html[data-look="vivid"] .who { display: none; }
html[data-look="vivid"] .tabs { display: none; }
.v-date, .v-pill { display: none; }
html[data-look="vivid"] .v-date { display: inline; font: 500 12px/1 var(--mono); letter-spacing: .14em; color: var(--v-muted); }
html[data-look="vivid"] .v-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--v-line); font: 600 11px/1 var(--mono); letter-spacing: .14em; color: var(--v-muted); background: color-mix(in srgb, var(--v-bg) 60%, transparent); }
.v-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--v-b); box-shadow: 0 0 10px var(--v-b); flex: none; animation: v-blink 2.4s ease-in-out infinite; }
@keyframes v-blink { 50% { opacity: .35; } }
html[data-look="vivid"] .top-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-left: auto; }
html[data-look="vivid"] .look-switch .seg { background: color-mix(in srgb, var(--v-bg) 60%, transparent); border-color: var(--v-line); }
html[data-look="vivid"] .look-switch .theme-seg button[aria-pressed="true"] { background: linear-gradient(100deg, var(--v-a), var(--v-c)); }
html[data-look="vivid"] main { max-width: 1180px; padding: 14px 16px 180px; }

/* phone: the dock in thumb reach */
.v-dock, .v-rail, .v-more { display: none; }
html[data-look="vivid"] .v-dock { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 30;
  border: 1px solid var(--v-line); border-radius: 22px; background: color-mix(in srgb, var(--v-bg) 84%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.v-dock a, .v-dock button { position: relative; min-height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--v-muted); text-decoration: none; font: 600 11.5px/1 var(--sans); background: none; border: 0; cursor: pointer; }
.v-dock [aria-current="page"] { color: var(--v-a); }
.v-dock [aria-current="page"]::before { content: ""; position: absolute; top: 6px; width: 26px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--v-a), var(--v-c)); box-shadow: 0 0 12px var(--v-b); }
.v-ico { width: 22px; height: 22px; display: block; }
.v-ico path, .v-ico rect, .v-ico circle { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.v-n { position: absolute; top: 7px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--v-c); color: #fff; font: 700 11px/18px var(--sans); text-align: center; }
.v-n.gold { background: var(--v-b); color: var(--v-on); }
html[data-look="vivid"] .bar { bottom: calc(84px + env(safe-area-inset-bottom)); left: 10px; right: 10px; border-radius: 18px; border: 1px solid var(--v-line-2); background: color-mix(in srgb, var(--v-bg-2) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
html[data-look="vivid"] .toast { bottom: calc(160px + env(safe-area-inset-bottom)); border-radius: 14px; background: linear-gradient(100deg, var(--v-a), var(--v-b)); color: var(--v-on); box-shadow: 0 10px 30px var(--v-glow-2); }
html[data-look="vivid"] .toast.bad { background: var(--v-down); color: #1b0605; }

/* the More sheet on a phone */
html[data-look="vivid"] .v-more { position: fixed; left: 10px; right: 10px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 31; padding: 14px; border-radius: 20px; border: 1px solid var(--v-line-2); background: color-mix(in srgb, var(--v-bg-2) 96%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 -10px 40px rgba(0,0,0,.5); }
html[data-look="vivid"] .v-more:not([hidden]) { display: grid; gap: 8px; }
.v-more a { min-height: 48px; display: flex; align-items: center; gap: 12px; padding: 0 12px; border-radius: 12px; color: var(--v-ink); text-decoration: none; font-weight: 600; background: color-mix(in srgb, var(--v-b) 7%, transparent); }
.v-more .look-switch { padding-top: 6px; }

/* desk: the rail */
@media (min-width: 900px) {
  html[data-look="vivid"] body { padding-left: 252px; }
  html[data-look="vivid"] .v-dock, html[data-look="vivid"] .v-more { display: none !important; }
  html[data-look="vivid"] .v-rail { display: flex; flex-direction: column; gap: 4px; position: fixed; left: 0; top: 0; bottom: 0; width: 252px; padding: 18px 14px; z-index: 25;
    border-right: 1px solid var(--v-line); background: linear-gradient(180deg, color-mix(in srgb, var(--v-d) 22%, var(--v-bg)) 0%, var(--v-bg) 55%); }
  html[data-look="vivid"] .top h1 { display: none; }
  html[data-look="vivid"] .top-in { padding: 14px 28px; }
  html[data-look="vivid"] main { padding: 18px 28px 120px; }
  html[data-look="vivid"] .bar { left: 268px; right: 16px; bottom: 16px; }
  html[data-look="vivid"] .toast { bottom: 96px; left: 268px; }
}
.v-brand { display: flex; align-items: center; gap: 12px; padding: 4px 6px 20px; color: inherit; text-decoration: none; }
.v-brand img { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--v-line-2); padding: 6px; background: var(--v-bg-2); box-shadow: 0 0 24px var(--v-glow-2); }
.v-brand b { display: block; font: 600 21px/1 var(--serif); letter-spacing: .08em; color: var(--v-a); }
.v-brand small { display: block; margin-top: 5px; font: 600 10px/1 var(--mono); letter-spacing: .28em; color: var(--v-faint); }
.v-rail nav { display: grid; gap: 3px; }
.v-rail nav a { position: relative; display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 14px; border-radius: 13px; color: var(--v-muted); text-decoration: none; font-weight: 500; border: 1px solid transparent; transition: background .25s, color .25s, border-color .25s; }
.v-rail nav a:hover { color: var(--v-ink); background: color-mix(in srgb, var(--v-b) 6%, transparent); }
.v-rail nav a[aria-current="page"] { color: var(--v-ink); border-color: var(--v-line-2); background: linear-gradient(90deg, color-mix(in srgb, var(--v-b) 16%, transparent), color-mix(in srgb, var(--v-c) 14%, transparent)); box-shadow: inset 0 0 24px color-mix(in srgb, var(--v-b) 8%, transparent); }
.v-rail nav .v-n { position: static; margin-left: auto; }
.v-rail-foot { margin-top: auto; display: grid; gap: 10px; }
.v-view { min-height: 50px; border-radius: 15px; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; text-decoration: none; color: var(--v-on);
  background: linear-gradient(100deg, var(--v-a), var(--v-b) 45%, var(--v-c)); background-size: 200% 100%; box-shadow: 0 10px 30px var(--v-glow-1); animation: v-sheen 8s ease-in-out infinite; }
@keyframes v-sheen { 50% { background-position: 100% 0; } }
.v-me { border: 1px solid var(--v-line); border-radius: 15px; padding: 10px 12px; font-size: 13px; color: var(--v-muted); overflow-wrap: anywhere; }
.v-me b { display: block; color: var(--v-ink); font-size: 14px; }

/* ---------------------------------------------------------------- the hero */
.v-hero { display: none; }
html[data-look="vivid"] .v-hero { display: grid; grid-template-columns: 1fr; gap: 6px; align-items: center; margin: 0 0 8px; }
html[data-look="vivid"] .v-hero-art { order: -1; }
@media (max-width: 899px) {
  html[data-look="vivid"] .top-tools > .look-switch { display: none; }   /* on a phone the switch lives under More */
  html[data-look="vivid"] .top-in { flex-wrap: nowrap; }
  html[data-look="vivid"] .v-date { display: none; }
  html[data-look="vivid"] .v-pill { font-size: 10px; letter-spacing: .1em; padding: 0 10px; }
  html[data-look="vivid"] .v-hello { margin-top: 12px; }
  /* the publish bar: one line of words, one row of buttons, above the dock */
  html[data-look="vivid"] .bar { padding: 8px 10px; gap: 6px; }
  html[data-look="vivid"] .bar .msg { width: 100%; font-size: 13px; }
  html[data-look="vivid"] .bar .row { flex-wrap: nowrap; gap: 6px; width: 100%; }
  html[data-look="vivid"] .bar .row > * { flex: 1 1 auto; min-height: 42px; padding: 0 10px; font-size: 14px; white-space: nowrap; }
  html[data-look="vivid"] main { padding-bottom: 240px; }
}
html[data-look="vivid"] [data-pane="overview"] > h2, html[data-look="vivid"] [data-pane="overview"] > .sub { display: none; }
.v-stage { position: relative; height: min(78vw, 360px); margin: 0 -16px; }
.v-stage canvas { width: 100%; height: 100%; display: block; touch-action: pan-y; }
.v-still { position: absolute; inset: 0; margin: auto; width: 42%; max-width: 220px; height: auto; filter: drop-shadow(0 0 30px var(--v-glow-2)); }
.v-cap { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; text-align: center; font-size: 13px; color: var(--v-muted); }
.v-cap b { display: block; font: 600 11px/1.7 var(--mono); letter-spacing: .22em; color: var(--v-a); transition: opacity .4s; }
.v-shapes { display: flex; justify-content: center; gap: 2px; margin-top: 4px; }
.v-shapes button { width: 44px; height: 30px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; padding: 0; }
.v-shapes button::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--v-faint); transition: width .3s, background .3s; }
.v-shapes button[aria-pressed="true"]::after { width: 22px; border-radius: 6px; background: linear-gradient(90deg, var(--v-a), var(--v-c)); }
.v-badge { display: inline-flex; align-items: center; gap: 9px; margin: 0; padding: 7px 13px; border-radius: 99px; border: 1px solid var(--v-line-2); font: 600 11px/1.2 var(--mono); letter-spacing: .14em; color: var(--v-a); background: color-mix(in srgb, var(--v-b) 7%, transparent); text-transform: uppercase; }
html[data-look="vivid"] .v-hello { font: 600 clamp(46px, 13vw, 84px)/.95 var(--serif); margin: 16px 0 12px; letter-spacing: -.01em; color: var(--v-ink); }
.v-hello em { font-style: italic; background: linear-gradient(100deg, var(--v-a), var(--v-b) 40%, var(--v-c) 85%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: v-sheen 9s ease-in-out infinite; padding-right: .08em; }
.v-say { font-size: 17px; color: var(--v-muted); max-width: 580px; margin: 0; }
.v-say b { color: var(--v-ink); font-weight: 700; }
.v-say .g { color: var(--v-a); font-weight: 700; }
.v-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.v-btn { min-height: 50px; padding: 0 22px; border-radius: 15px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.v-btn:hover { transform: translateY(-2px); }
.v-btn-p { color: var(--v-on); background: linear-gradient(100deg, var(--v-a), var(--v-b)); box-shadow: 0 10px 30px var(--v-glow-2); }
.v-btn-q { color: var(--v-ink); border: 1px solid var(--v-line-2); background: color-mix(in srgb, var(--v-bg-2) 70%, transparent); }
@media (min-width: 900px) {
  html[data-look="vivid"] .v-hero { grid-template-columns: minmax(0, 1fr) minmax(360px, 500px); gap: 18px; min-height: 420px; }
  html[data-look="vivid"] .v-hero-art { order: 0; }
  .v-stage { height: 420px; margin: 0; }
}

/* ---------------------------------------------------------------- happening now: a swipe row of real events */
.v-feed { display: none; }
html[data-look="vivid"] .v-feed { display: block; margin: 6px 0 16px; }
.v-feed h3, html[data-look="vivid"] .card h3, html[data-look="vivid"] .v-k { font: 600 11px/1.4 var(--mono) !important; letter-spacing: .2em; color: var(--v-muted); text-transform: uppercase; margin: 0 0 10px; }
.v-feed-row { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.v-feed-row::-webkit-scrollbar { display: none; }
.v-ev { flex: 0 0 auto; width: 230px; scroll-snap-align: start; display: grid; grid-template-columns: 40px 1fr; gap: 4px 12px; align-items: center; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--v-line); background: var(--panel); }
.v-ev .v-ico { grid-row: span 2; width: 40px; height: 40px; padding: 9px; border-radius: 12px; color: var(--v-a); background: color-mix(in srgb, var(--v-b) 12%, transparent); border: 1px solid var(--v-line); }
.v-ev.sale .v-ico { color: var(--v-c); background: color-mix(in srgb, var(--v-c) 14%, transparent); }
.v-ev b { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v-ev span { font-size: 12px; color: var(--v-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v-feed .hint { margin: 0 0 4px; }

/* ---------------------------------------------------------------- the panes, restyled */
html[data-look="vivid"] h2 { font-size: 34px; }
html[data-look="vivid"] .card, html[data-look="vivid"] .tile, html[data-look="vivid"] .field, html[data-look="vivid"] details.group, html[data-look="vivid"] .tbl-wrap {
  border-color: var(--v-line); background: var(--panel); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: var(--r); }
html[data-look="vivid"] .tile { position: relative; overflow: hidden; padding: 14px 16px; transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .25s ease-out, border-color .3s; }
html[data-look="vivid"] .tile::before { content: ""; position: absolute; inset: 0 0 auto; height: 1px; background: linear-gradient(90deg, transparent, var(--v-b), transparent); opacity: .7; }
html[data-look="vivid"] .tile:nth-child(3n)::before { background: linear-gradient(90deg, transparent, var(--v-c), transparent); }
html[data-look="vivid"] .tile::after { content: ""; position: absolute; width: 140px; height: 140px; right: -50px; top: -60px; border-radius: 50%; background: radial-gradient(closest-side, var(--v-glow-2), transparent); pointer-events: none; }
html[data-look="vivid"] .tile:hover { border-color: var(--v-line-2); }
html[data-look="vivid"] .tile .n { font-size: 44px; font-variant-numeric: lining-nums tabular-nums; background: linear-gradient(180deg, var(--v-a), var(--v-b)); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[data-look="vivid"] .tile:nth-child(3n) .n { background: linear-gradient(180deg, #F6C1C4, var(--v-c)); -webkit-background-clip: text; background-clip: text; }
html[data-look="vivid"] .tiles { gap: 12px; }
html[data-look="vivid"] .ranges button, html[data-look="vivid"] .list-chip { border-color: var(--v-line); background: color-mix(in srgb, var(--v-bg-2) 60%, transparent); color: var(--v-muted); }
html[data-look="vivid"] .ranges button[aria-pressed="true"], html[data-look="vivid"] .list-chip[aria-pressed="true"] { background: linear-gradient(100deg, var(--v-a), var(--v-b)); border-color: transparent; color: var(--v-on); }
html[data-look="vivid"] .btn { background: linear-gradient(100deg, var(--v-a), var(--v-b)); border-color: transparent; color: var(--v-on); box-shadow: 0 6px 20px var(--v-glow-2); }
html[data-look="vivid"] .btn-quiet { border-color: var(--v-line-2); color: var(--v-a); }
html[data-look="vivid"] .inp, html[data-look="vivid"] .ta { background: color-mix(in srgb, var(--v-bg) 70%, transparent); border-color: var(--v-line); }
html[data-look="vivid"] .inp:focus, html[data-look="vivid"] .ta:focus { border-color: var(--v-line-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--v-b) 18%, transparent); outline: 0; }
html[data-look="vivid"] dialog { background: var(--v-bg-2); border-color: var(--v-line-2); border-radius: 20px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
html[data-look="vivid"] .note { background: color-mix(in srgb, var(--v-b) 8%, transparent); border-color: var(--v-line); border-radius: 14px; }
html[data-look="vivid"] .chart svg { overflow: visible; }
html[data-look="vivid"] .chart polyline { stroke: url(#v-line-grad) !important; filter: drop-shadow(0 0 6px var(--v-b)); stroke-dasharray: 2400; stroke-dashoffset: 0; animation: v-draw 1.6s ease-out both; }
html[data-look="vivid"] .chart polygon { fill: url(#v-area-grad) !important; animation: v-fade 1.6s ease-out both; }
html[data-look="vivid"] .chart circle { fill: var(--v-a) !important; filter: drop-shadow(0 0 4px var(--v-b)); }
@keyframes v-draw { from { stroke-dashoffset: 2400; } }
@keyframes v-fade { from { opacity: 0; } }
@property --w { syntax: "<percentage>"; inherits: false; initial-value: 0%; }
html[data-look="vivid"] .rows li { background: linear-gradient(90deg, color-mix(in srgb, var(--v-b) 22%, transparent), color-mix(in srgb, var(--v-c) 18%, transparent) var(--w, 0%), transparent var(--w, 0%)); animation: v-fill 1.2s cubic-bezier(.2,.8,.2,1) both; margin-bottom: 4px; }
@keyframes v-fill { from { --w: 0%; } }
html[data-look="vivid"] .rows .v { color: var(--v-a); font-weight: 600; }
html[data-look="vivid"] .tabs a[aria-current="page"] { background: linear-gradient(100deg, var(--v-a), var(--v-b)); }

@media (prefers-reduced-motion: reduce) {
  html[data-look="vivid"] .v-aura::before, html[data-look="vivid"] .v-aura::after, .v-dot, .v-view, .v-hello em { animation: none !important; }
  html[data-look="vivid"] .tile { transform: none !important; }
}
