/* =============================================================================
   Hero destination — a replica of verity-overview.html's Overview screen.
   Built at a fixed 1160x700 canvas and scaled to fit, so the assembly maths
   works from stable geometry at every viewport. Prefix vd-.
   ========================================================================== */
.vd-scaler {
  position: absolute;
  top: 50%; left: 50%;
  width: 1160px; height: 860px;
  margin: -430px 0 0 -580px;
  transform: scale(var(--vd-scale, 1));
  transform-origin: 50% 50%;
}

.vd-frame {
  position: absolute; inset: 0;
  border-radius: var(--radius-cards);
  overflow: hidden;
  font-family: var(--font-ui);
  color: var(--color-ink-black);
  font-size: 14px;
  line-height: 1.45;
}
/* The frame's chrome — ground, hairline, shadow — is its own layer, so it can
   resolve after the shards land without ever hiding the shards themselves. */
.vd-frame::before {
  content: "";
  position: absolute; inset: 0; z-index: 0;
  background: var(--color-fog-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-cards);
  box-shadow: var(--shadow-subtle-3);
  opacity: var(--vd-chrome, 1);
}
.vd-app { position: relative; z-index: 1; }
.vd-app { display: grid; grid-template-columns: 232px 1fr; height: 100%; }

/* ------------------------------------------------------------- sidebar --- */
.vd-side {
  background: var(--color-fog-white);
  border-right: 1px solid var(--border);
  padding: 20px 14px 14px;
  display: flex; flex-direction: column; gap: 22px;
}
.vd-brand { display: flex; align-items: center; gap: 9px; padding-left: 6px; }
.vd-brand span { font-size: 23px; font-weight: 300; letter-spacing: -.02em; }
.vd-nav { display: flex; flex-direction: column; gap: 1px; }
.vd-navitem {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; border-radius: var(--radius-inputs);
  color: var(--color-slate-gray); font-size: 14px;
  border: 1px solid transparent;
}
.vd-navitem svg { width: 18px; height: 18px; flex: none; }
.vd-navitem.is-current {
  background: var(--color-paper-white); border-color: var(--border);
  color: var(--color-ink-black); box-shadow: var(--shadow-subtle);
}
.vd-navitem.is-current svg { color: var(--accent); }

.vd-user { margin-top: auto; display: flex; align-items: center; gap: 9px; padding: 8px 6px; }
.vd-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--thumb-bg); flex: none; }
.vd-user b { display: block; font-size: 13px; font-weight: 500; }
.vd-user small { font-size: 13px; color: var(--color-slate-gray); }

/* ---------------------------------------------------------------- main --- */
.vd-main { min-width: 0; padding: 14px 22px 0; display: flex; flex-direction: column; gap: 14px; }

.vd-top { display: flex; align-items: center; gap: 10px; }
.vd-search {
  flex: 0 1 420px; margin-inline: auto;
  display: flex; align-items: center;
  height: 38px; padding: 0 15px;
  background: var(--color-paper-white); border: 1px solid var(--border);
  border-radius: var(--radius-buttons);
  color: var(--color-ash-gray); font-size: 13px;
  white-space: nowrap; overflow: hidden;
}
.vd-search--sm { flex: 1 1 auto; margin: 0; }
.vd-pill {
  display: inline-flex; align-items: center;
  height: 38px; padding: 0 14px;
  background: var(--color-paper-white); border: 1px solid var(--border);
  border-radius: var(--radius-buttons); font-size: 13px; white-space: nowrap;
}
.vd-iconbtn {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center; color: var(--color-slate-gray);
  background: var(--color-paper-white); border: 1px solid var(--border);
  border-radius: var(--radius-inputs);
}
.vd-iconbtn svg { width: 17px; height: 17px; }
.vd-initials {
  width: 36px; height: 36px; flex: none;
  display: grid; place-items: center;
  background: var(--color-mist-gray); border: 1px solid var(--border);
  border-radius: 50%; font-size: 13px; font-weight: 500;
}
.vd-title { margin: 0; font-size: 28px; font-weight: 300; letter-spacing: -.02em; }

/* --------------------------------------------------------------- cards --- */
.vd-dash {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 186px 172px;
  gap: 16px;
}
.vd-card {
  background: var(--color-paper-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-cards);
  box-shadow: var(--shadow-subtle);
  overflow: hidden;
}
.vd-reorder { grid-column: 3; grid-row: 1 / span 2; padding: 14px; }
.vd-logi { grid-column: 1 / span 2; grid-row: 2; position: relative; padding: 16px; }

.vd-cardhead { display: flex; align-items: center; justify-content: space-between; padding: 15px 17px 0; }
.vd-cardtitle { font-size: 15px; font-weight: 400; }
.vd-chip {
  height: 25px; padding: 0 9px; display: inline-flex; align-items: center;
  background: var(--color-mist-gray); border-radius: var(--radius-buttons);
  font-size: 13px; color: var(--color-slate-gray);
}
.vd-link { font-size: 13px; color: var(--color-slate-gray); text-decoration: underline; text-underline-offset: 3px; }

.vd-orders { display: flex; flex-direction: column; }
.vd-stats { display: flex; gap: 10px; padding: 16px 17px 0; }
.vd-stats span { flex: 1; }
.vd-stats b { display: block; font-size: 20px; font-weight: 300; }
.vd-stats small { font-size: 13px; color: var(--color-slate-gray); }
.vd-stats .is-accent b, .vd-stats .is-accent small { color: var(--accent); }

.vd-spark { display: flex; align-items: flex-end; gap: 10px; flex: 1; min-height: 0; padding: 12px 17px 0; }
.vd-spark i { flex: 1; border-radius: var(--r-focus) var(--r-focus) 0 0; }
.vd-spark .s-solid { background: var(--accent); border-radius: var(--r-bar); }
.vd-spark .s-dot { background-image: radial-gradient(currentColor 1px, transparent 1.1px); background-size: 6px 6px; color: var(--color-ash-gray); }
.vd-spark .s-hatch { background-image: repeating-linear-gradient(45deg, var(--accent) 0 1px, transparent 1px 6px); opacity: .55; }
.vd-spark .s-fill { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 60%, transparent), color-mix(in srgb, var(--accent) 6%, transparent)); }

.vd-stockbody { display: flex; align-items: center; gap: 16px; padding: 14px 17px 18px; }
.vd-legend { display: flex; flex-direction: column; gap: 9px; font-size: 13px; color: var(--color-slate-gray); }
.vd-legend span { display: flex; align-items: center; gap: 8px; }
.vd-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.vd-dot.d-soft { background: color-mix(in srgb, var(--accent) 45%, transparent); }
.vd-dot.d-mute { background: var(--border-strong); }
.vd-dot.d-ink { background: var(--color-ink-black); }
.vd-donut { position: relative; width: 104px; height: 104px; flex: none; }
.vd-ring {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 205deg, var(--accent) 0 56%, color-mix(in srgb, var(--accent) 16%, transparent) 56% 74%, transparent 74% 100%);
  -webkit-mask: radial-gradient(circle, transparent 44px, #000 45px);
          mask: radial-gradient(circle, transparent 44px, #000 45px);
}
.vd-donutc { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.vd-donutc b { font-size: 23px; font-weight: 300; }
.vd-donutc small { font-size: 13px; color: var(--color-slate-gray); }

.vd-media {
  position: relative; height: calc(100% - 34px);
  border-radius: var(--radius-inputs); background: var(--thumb-bg);
  overflow: hidden; display: grid; place-items: center;
}
.vd-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.55), transparent 55%); }
.vd-ph {
  width: 58%; aspect-ratio: 1; border-radius: 50%;
  /* Photographic stand-in for a delivery image: a neutral material, not a
     brand colour, so it is deliberately outside the token ramp. */
  background: radial-gradient(120% 90% at 30% 22%, rgba(255,255,255,.55), transparent 55%), linear-gradient(150deg, #c9ced4, #7c848d 55%, #4a5057);
}
.vd-badge {
  position: absolute; top: 11px; left: 11px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 9px;
  background: var(--color-paper-white); border-radius: var(--radius-buttons);
  font-size: 13px; box-shadow: var(--shadow-subtle-2);
}
.vd-mediameta { position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 2; color: var(--color-paper-white); }
.vd-mediameta b { display: block; font-size: 17px; font-weight: 400; }
.vd-mediameta small { font-size: 13px; color: rgba(255,255,255,.72); }
.vd-mediacta {
  position: absolute; right: 14px; bottom: 12px; z-index: 3;
  width: 32px; height: 32px; border-radius: var(--r-control); background: var(--accent);
}

.vd-map { position: absolute; inset: 0 0 0 290px; z-index: 1; color: var(--map-land); }
.vd-map svg { width: 100%; height: 100%; }
.vd-logibody { position: relative; z-index: 2; max-width: 280px; }
.vd-loginote { margin: 20px 0 10px; font-size: 13px; }
.vd-thumbs { display: flex; align-items: center; }
.vd-thumbs i {
  width: 42px; height: 38px; border-radius: var(--r-control);
  background: var(--thumb-bg); border: 2px solid var(--color-paper-white);
  margin-right: -8px;
}
.vd-thumbs small { margin-left: 15px; font-size: 13px; color: var(--color-slate-gray); }
.vd-delays {
  position: absolute; z-index: 3; left: 56%; top: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center;
  height: 25px; padding: 0 10px;
  background: var(--color-paper-white); border: 1px solid var(--border);
  border-radius: var(--radius-buttons); font-size: 13px;
  box-shadow: var(--shadow-subtle-2);
}

/* ------------------------------------------------------------- toolbar --- */
.vd-toolbar { display: flex; align-items: center; gap: 10px; }
.vd-add {
  display: inline-flex; align-items: center;
  height: 38px; padding: 0 18px;
  background: var(--accent); color: var(--accent-ink);
  border-radius: var(--radius-buttons); font-size: 13px; font-weight: 500;
  white-space: nowrap;
}

/* --------------------------------------------------------------- table --- */
.vd-table { background: var(--color-fog-white); }
.vd-tr {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr .7fr 1.1fr;
  align-items: center; gap: 12px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.vd-tr--head { font-size: 13px; color: var(--color-slate-gray); padding-block: 10px; }
.vd-item { display: flex; align-items: center; gap: 11px; min-width: 0; }
.vd-thumb { width: 38px; height: 38px; border-radius: var(--r-control); background: var(--thumb-bg); flex: none; }
.vd-item b { display: block; font-weight: 400; }
.vd-item small { font-size: 13px; color: var(--color-slate-gray); }
.vd-num { color: var(--accent); }
.vd-num.is-zero { color: var(--danger); }
.vd-status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; }
.vd-status.s-in  { color: var(--accent); }
.vd-status.s-low { color: var(--warn); }
.vd-status.s-out { color: var(--danger); }
.vd-status .vd-dot { background: currentColor; }

/* Shards animate as whole units; GSAP owns their transforms. */
[data-shard] { will-change: transform, opacity; }

/* The assembling screen sits BEHIND the hero copy, so scattered shards can
   never make the headline unreadable. The copy clears out well before the
   assembly resolves, handing the frame over. */
.hero-workspace, .pr-layer { z-index: 1; }
.hero-copy { z-index: 2; opacity: max(0, calc(1 - var(--p, 0) * 2.4)); }


/* ---------------------------------------------------------------------------
   Narrow widths: the canvas itself changes shape rather than shrinking the
   desktop one to a postage stamp. Mirrors verity-overview.html's own mobile
   rule — the sidebar becomes an icon rail, the grid restacks.
--------------------------------------------------------------------------- */
@media (max-width: 720px) {
  /* On a phone the replica is not a shrunken desktop screen — it is the
     product's own narrow layout, rendered near 1:1 so its labels stay above
     the type floor instead of scaling into mush. */
  .vd-scaler { width: 380px; height: 830px; margin: -415px 0 0 -190px; }
  .vd-app { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }

  .vd-side {
    flex-direction: row; align-items: center; gap: 4px;
    padding: 8px 10px; overflow: hidden;
    border-right: 0; border-bottom: 1px solid var(--border);
  }
  .vd-brand span { display: none; }
  .vd-nav { flex-direction: row; gap: 0; }
  .vd-navitem { font-size: 0; padding: 7px; gap: 0; }
  .vd-navitem svg { width: 16px; height: 16px; }
  .vd-navitem:nth-child(n+7) { display: none; }
  .vd-user { display: none; }

  .vd-main { padding: 12px 12px 0; gap: 10px; }
  .vd-top .vd-pill, .vd-top .vd-iconbtn { display: none; }
  .vd-search { flex: 1 1 auto; margin: 0; font-size: 13px; height: 34px; }
  .vd-title { font-size: 22px; }

  .vd-dash { grid-template-columns: 1fr; grid-template-rows: 150px 122px 168px; gap: 10px; }
  .vd-logi { grid-column: 1; grid-row: 2; padding: 12px; }
  .vd-reorder { grid-column: 1; grid-row: 3; }
  .vd-media { height: 128px; }
  .vd-map { inset: 0 0 0 150px; }
  /* three rows is the phone's share of the table; the fourth would push the
     screen past the frame and shrink every label below the type floor. */
  .vd-tr:nth-child(n+4) { display: none; }
  .vd-donut { width: 88px; height: 88px; }
  .vd-ring { -webkit-mask: radial-gradient(circle, transparent 36px, #000 37px); mask: radial-gradient(circle, transparent 36px, #000 37px); }
  .vd-stats { gap: 6px; }
  .vd-stats b { font-size: 18px; }

  .vd-toolbar .vd-pill:nth-of-type(2), .vd-toolbar .vd-pill:nth-of-type(3), .vd-toolbar .vd-iconbtn { display: none; }
  .vd-tr { grid-template-columns: 2.2fr .7fr 1.1fr; gap: 8px; }
  .vd-tr > span:nth-child(2), .vd-tr > span:nth-child(3) { display: none; }
  .vd-thumb { width: 32px; height: 32px; }
}

/* ---------------------------------------------------------------------------
   Reduced motion: no pin, no scrub. The hero reads as a normal page — the
   headline first, the assembled Overview screen beneath it — so the copy
   still reaches visitors who turn motion off.
--------------------------------------------------------------------------- */
.vd-static .hero-scrub { height: auto; }
.vd-static .hero-stage { position: static; height: auto; overflow: visible; padding-bottom: var(--spacing-96); }
.vd-static .hero-copy { position: static; opacity: 1; transform: none; padding-top: var(--spacing-96); }
.vd-static .hero-workspace { position: static; margin-top: var(--spacing-64); }
.vd-static .vd-scaler {
  position: relative; top: auto; left: auto; margin: 0 auto;
  transform: scale(var(--vd-scale, 1)); transform-origin: 50% 0;
}

