/* Desk: D's lane (Seller and Buyer cross the seal; List, Hold, Settled; the house route underneath), with every block on
   it as B's ticket. From the approved design (ui-upgrade/variations/final/desk.html). Scoped under .pg-desk; the diagram
   system is flow.css, laid out by web/flow.js drawLane. */

/* ---------- the lane ---------- */
.pg-desk .lane { position: relative; }
.pg-desk .lane-in { position: relative; }
.pg-desk .st-name { display: flex; align-items: baseline; gap: 10px; }
.pg-desk .st-rule { margin-top: 3px; }
.pg-desk .item .btn { margin-top: 12px; }
.pg-desk .lane .fig { margin-top: 8px; }

/* the rack's head: the count, the cap, and the board switch */
.pg-desk .rack-head { display: grid; gap: 10px; margin-bottom: 16px; }
.pg-desk .rack-head .row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.pg-desk .rack-head .fig { margin: 0; font-size: 40px; }
.pg-desk .rack-head .segs > * { height: 28px; padding: 0 11px; }
.pg-desk .ex-note { color: var(--paper); font-size: 13px; font-weight: 500; }
.pg-desk .tickets { display: grid; gap: 12px; }
.pg-desk .held { margin-top: 12px; }
.pg-desk .coins { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; }
.pg-desk .coins a { display: inline-flex; align-items: center; gap: 6px; color: var(--paper2); font-size: 13px; white-space: nowrap; transition: color var(--t1) var(--ease); }
.pg-desk .coins a:hover { color: var(--paper); }
.pg-desk .coins em { font-style: normal; color: var(--label); font-variant-numeric: tabular-nums; }

/* ---------- B's ticket on the lane: [body][perforation][stub] ---------- */
.pg-desk .tk { --tk: #21110d; --tk-hair: #5e4239; --perf: 14px; --stub: 130px; display: grid; grid-template-columns: minmax(0, 1fr) var(--perf) var(--stub); width: 356px; color: var(--paper2); text-align: left; }
.pg-desk .tk-body, .pg-desk .tk-stub { min-width: 0; background: var(--tk); }
.pg-desk .tk-body { border-radius: 6px 0 0 6px; padding: 14px 14px 14px 16px; }
.pg-desk .tk-stub { border-radius: 0 6px 6px 0; padding: 14px 10px 14px 8px; display: flex; flex-direction: column; gap: 10px; }
/* the perforation: slits cut through the stock, and a square notch at each end */
.pg-desk .tk-perf { margin: 7px 0; background: var(--tk); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10'%3E%3Cpath fill-rule='evenodd' d='M0 0h14v10H0zM6 2h2v6H6z'/%3E%3C/svg%3E") center top / 14px 10px repeat-y; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10'%3E%3Cpath fill-rule='evenodd' d='M0 0h14v10H0zM6 2h2v6H6z'/%3E%3C/svg%3E") center top / 14px 10px repeat-y; }
.pg-desk .tk-top { display: flex; align-items: center; gap: 8px; min-height: 22px; white-space: nowrap; min-width: 0; }
.pg-desk .tk-top b { color: var(--paper); font-weight: 600; font-size: 15px; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; }
.pg-desk .tk-top span:not(.ci) { color: var(--label); font-size: 13px; }
.pg-desk .tk-top em { font-style: normal; color: var(--coral); font-weight: 500; font-size: 13px; }
/* the gap to market is the biggest thing on a ticket */
.pg-desk .tk-hero { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px 10px; margin: 12px 0 8px; }
.pg-desk .tk-gap { color: var(--paper); font: 560 42px / 0.86 var(--f); letter-spacing: -0.05em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pg-desk .tk-gap small { font-size: 0.46em; font-weight: 500; letter-spacing: 0; margin-left: 0.06em; color: var(--paper2); }
.pg-desk .tk-say { color: var(--label); font-size: 13px; line-height: 1.3; }
.pg-desk .tk-say b { display: block; color: var(--paper); font-weight: 550; font-size: 14px; }
.pg-desk .tk-px { margin-bottom: 12px; color: var(--label); font-size: 13px; font-variant-numeric: tabular-nums; }
.pg-desk .tk-px .px { color: var(--paper2); font-weight: 500; }
/* the sealed size field: the bar runs to the band, over a printed scale of all five bands */
.pg-desk .tk-size { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; row-gap: 5px; align-items: baseline; }
.pg-desk .tk-lab { color: var(--label); font-size: 13px; line-height: 1.35; }
.pg-desk .tk-band { text-align: right; color: var(--paper); font-size: 13px; font-weight: 500; white-space: nowrap; }
.pg-desk .tk-scale { grid-column: 1 / -1; position: relative; display: grid; grid-template-columns: repeat(5, 1fr); height: 16px; }
.pg-desk .tk-scale i { border-left: 1px solid var(--tk-hair); }
.pg-desk .tk-scale i:last-of-type { border-right: 1px solid var(--tk-hair); }
.pg-desk .tk-scale .redact { position: absolute; left: 0; top: 2px; height: 12px; width: calc(var(--bi) * 20% - var(--cap-w) - var(--cap-gap)); font-size: 18px; }
.pg-desk .tk-ticks { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, 1fr); color: var(--label); font-size: 13px; line-height: 1; font-variant-numeric: tabular-nums; }
.pg-desk .tk-ticks span { margin-left: -0.25ch; }
/* the stub: the number, the punched quarter hour, the action */
.pg-desk .tk-no { color: var(--label); font-size: 13px; line-height: 1.35; }
.pg-desk .tk-no b { display: block; margin-top: 2px; color: var(--paper); font: 500 13px / 1.35 var(--mono); letter-spacing: -0.02em; white-space: nowrap; } /* an ID: Geist Mono */
.pg-desk .tk-no .redact { --w: 4.6em; }
.pg-desk .tk-stamp { display: inline-flex; align-items: center; margin-top: 2px; color: var(--paper); font: 500 15px / 1 var(--f); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pg-desk .tk-stamp::before { content: ""; width: 4px; height: 1.05em; margin-right: 3px; border-radius: 1px; background: var(--coral); } /* the punch: a cap, then the gap */
.pg-desk .tk-stub .btn { margin-top: auto; height: 32px; padding: 0 10px; font-size: 13px; }
.pg-desk .tk-hold { margin-top: auto; display: grid; gap: 6px; }
.pg-desk .timer { display: block; height: 4px; border-radius: 1px; background: var(--bar); overflow: hidden; }
.pg-desk .timer i { display: block; height: 100%; width: var(--done, 0%); background: var(--coral); }
/* a filled ticket: sealed, its stub torn off, so the perforation opens into a gap */
.pg-desk .tk.torn { --stub: 104px; width: max-content; }
.pg-desk .tk.torn .tk-perf { visibility: hidden; }
.pg-desk .tk.torn .tk-body { border-radius: 6px; }
.pg-desk .tk.torn .tk-stub { border-radius: 6px; margin-left: 10px; }
.pg-desk .tk.torn .tk-gap .redact { --w: 2.2em; }
.pg-desk .tk-who { color: var(--label); font-size: 13px; }
.pg-desk .tk-who b { color: var(--paper2); font-weight: 500; }
.pg-desk .torn { display: grid; gap: 10px; }
/* the blank: the next block lands on it, printed on paper */
.pg-desk .tk.blank { --tk: #f2eee8; --tk-hair: #a89f90; --stub: 132px; width: 450px; color: #33312d; }
.pg-desk .tk.blank h2 { color: #0b0b0e; font: 600 26px / 1.05 var(--f); letter-spacing: -0.035em; }
.pg-desk .tk.blank p { margin-top: 6px; color: #33312d; font-size: 14px; }
.pg-desk .tk.blank .tk-hero { margin: 18px 0 14px; }
.pg-desk .tk.blank .tk-gap, .pg-desk .tk.blank .tk-say { color: #57534c; }
.pg-desk .tk.blank .tk-say b { color: #0b0b0e; }
.pg-desk .tk.blank :is(.tk-lab, .tk-band, .tk-ticks, .tk-no) { color: #57534c; font-weight: 400; }
.pg-desk .tk-ln { display: block; height: 1.2em; border-bottom: 1.5px solid #b3ab9e; }
.pg-desk .tk.blank .slot { width: 80px; height: 36px; }

@media (min-width: 1180px) {
  .pg-desk .lane .band { display: block; position: absolute; left: 0; right: 0; }
  .pg-desk .lane .band.pub { top: 0; height: 132px; background: var(--g-public); }
  .pg-desk .lane .band.priv { top: 132px; bottom: 0; background: var(--g-private); }
  .pg-desk .lane-in { height: 100%; }
  .pg-desk .lane .seg, .pg-desk .lane .gate { display: contents; }
  .pg-desk .lane .item { position: absolute; width: max-content; max-width: 480px; }
  .pg-desk .lane #i-branch, .pg-desk .lane #i-coins { max-width: none; }
  .pg-desk .e.priv { padding: 4px 12px; background: var(--g-private); }
  .pg-desk #i-branch { display: flex; align-items: center; gap: 16px; }
  .pg-desk #i-branch .btn { margin: 0; }
  .pg-desk #i-lots { text-align: right; }
  .pg-desk #i-settled { text-align: right; }
  .pg-desk #i-settled .st-name { justify-content: flex-end; }
  .pg-desk #i-settled .torn { justify-items: end; margin-top: 12px; }
}
@media (max-width: 1179.98px) {
  .pg-desk .lane .seg, .pg-desk .lane .gate { padding: 22px 22px 22px 50px; }
  .pg-desk .lane .seg.pub, .pg-desk .lane .gate.pub { background: var(--g-public); }
  .pg-desk .lane .seg.priv { background: var(--g-private); }
  .pg-desk .lane .gate { border-bottom: 2px solid var(--bar); padding-top: 0; }
  .pg-desk .lane .seg > .item + .item { margin-top: 26px; }
  .pg-desk .lane-in { padding: 0; }
  .pg-desk #i-branch, .pg-desk #i-coins { padding-right: 26px; }
  .pg-desk .lane #i-coins { margin-top: 10px; }
  .pg-desk #i-buyer { display: none; }
  .pg-desk .lane .tk { width: 100%; max-width: 420px; }
  .pg-desk .lane .tk.blank { max-width: 460px; }
  .pg-desk .lane .tk.torn { width: max-content; max-width: 100%; }
  .pg-desk #i-settled .torn { margin-top: 12px; justify-items: start; }
}
/* phones: the stub drops under the body, and the perforation turns to run across */
@media (max-width: 560px) {
  .pg-desk .lane .tk { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto var(--perf) auto; }
  .pg-desk .lane .tk .tk-body { border-radius: 6px 6px 0 0; }
  .pg-desk .lane .tk .tk-stub { border-radius: 0 0 6px 6px; flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 10px 22px; padding: 12px 14px 14px 16px; }
  .pg-desk .lane .tk .tk-perf { margin: 0 7px; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='14'%3E%3Cpath fill-rule='evenodd' d='M0 0h10v14H0zM2 6h6v2H2z'/%3E%3C/svg%3E") left center / 10px 14px repeat-x; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='14'%3E%3Cpath fill-rule='evenodd' d='M0 0h10v14H0zM2 6h6v2H2z'/%3E%3C/svg%3E") left center / 10px 14px repeat-x; }
  .pg-desk .lane .tk .tk-stub .btn, .pg-desk .lane .tk .tk-hold { margin: 0 0 0 auto; }
  .pg-desk .lane .tk .tk-hold { min-width: 110px; }
  .pg-desk .lane .tk.torn .tk-body, .pg-desk .lane .tk.torn .tk-stub { border-radius: 6px; }
  .pg-desk .lane .tk.torn .tk-stub { margin: 10px 0 0; }
  .pg-desk .tk.blank .tk-stub .tk-ln { width: 90px; }
}

/* ---------- #/sell: the sell panel under the lane, the step a List or Sell to the house button opens ---------- */
.pg-desk .sellsec { padding: 40px 0 8px; scroll-margin-top: 68px; }
.pg-desk .sellsec .panel { max-width: 440px; }
