/* DEMO TOOLS (round 64, 11 Nov 2026; the founder: "enable some little actions: you could tick the products, and you could
   hover over certain things ... some of the buttons and stuff will actually work"). The demo's own layer for three screens,
   in the platform's own measures (scratchpad r64/platform-design.md; the app's Tailwind build of 2 Nov lacks the classes
   the app added since, so the values are written here):
     Pick and pack       the purchase order's page: the tick, Allocation, Label, the paper doors and the row's press;
     HS search           the "Made in" country picker on the app's menu chrome, a flag beside every country;
     every screen here   the platform's tooltip, which also says "Not available in demo mode". */

/* ---------------------------------------------------------------- the tooltip (§4: components/tooltip.tsx) */
.dt-tip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  max-width: min(90vw, 20rem);
  padding: 4px 8px;
  border: 1px solid #e2e4e9;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 4px -1px rgb(16 24 40 / 0.04), 0 4px 12px -2px rgb(16 24 40 / 0.08);
  color: #18191b;
  font: 400 12.5px/18.4px var(--font-sans, system-ui, sans-serif);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.12s ease-out, transform 0.16s cubic-bezier(0.22, 1, 0.36, 1);
}
.dt-tip[data-on] { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .dt-tip { transition: none; transform: none; } }

/* ---------------------------------------------------------------- the checkbox (§5: choice-controls.tsx) */
.dt-box {
  position: relative;
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  vertical-align: middle;
  cursor: pointer;
}
.dt-box input {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  box-sizing: border-box;
  width: 16px;
  height: 16px;
  margin: 0;
  border: 1px solid #c9ccd2;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 1px 1px 0 rgb(16 24 40 / 0.04), inset 0 -1px 0 0 rgb(16 24 40 / 0.05);
  cursor: pointer;
  transition: background-color 0.12s ease-out, border-color 0.12s ease-out;
}
.dt-box input:hover { border-color: #b4b8c0; }
.dt-box input:checked,
.dt-box input:indeterminate { border-color: #1a1a1a; background: #1a1a1a; }
.dt-box input:focus-visible { outline: 2px solid #1a1a1a; outline-offset: 2px; }
.dt-box input:disabled { cursor: not-allowed; opacity: 0.5; }
.dt-box svg { position: absolute; inset: 0; display: none; width: 12px; height: 12px; margin: auto; color: #fff; pointer-events: none; }
.dt-box input:checked ~ .dt-tick-glyph,
.dt-box input:indeterminate ~ .dt-dash-glyph { display: block; }
@media (pointer: coarse) {
  .dt-box, .dt-box input { width: 20px; height: 20px; }
  .dt-box svg { width: 14px; height: 14px; }
}

/* ---------------------------------------------------------------- PICK AND PACK (§3 "Pick and pack") */
.dt-pp { position: relative; container: dtpp / inline-size; }
.dt-scroll { overflow-x: auto; }
.dt-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: #18191b;
  font-size: 13.5px;
  line-height: 20.8px;
  font-variant-numeric: tabular-nums;
}
.dt-h {
  box-sizing: border-box;
  width: 1px;
  height: 36px;
  padding: 0 6px;
  background: #f3f3f5;
  color: #4d5057;
  font-size: 12px;
  line-height: 17.6px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}
.dt-h:first-child { border-radius: 8px 0 0 8px; }
.dt-h:last-child { border-radius: 0 8px 8px 0; }
/* the desk's own cells (Order, Items, Customer, Destination), drawn the app's way in this table at every width: the
   capture's desk rules would squeeze the picture to 20px, hide it on a phone, and title the band "Sort by" */
.dt-table thead th:first-child::after { content: none; }
/* Items is as wide as its picture and "2 items" (the capture's desk would hold it to 7.5rem and let the words run into
   Customer); Customer takes the slack, as in the app */
.dt-table td.dt-c-items { min-width: 0; max-width: none; }
.dt-c-items > div { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dt-c-items > div > span:first-child { display: inline-flex; }
.dt-c-items > div > div { display: block; flex: none; }
.dt-c-items [data-product-thumb] { width: 40px; height: 40px; border-color: #eaecf0; border-radius: 8px; }
.dt-c-items [data-demo-pop] { display: inline-flex; color: #18191b; font-size: 13.5px; line-height: 20.8px; }
.dt-c {
  box-sizing: border-box;
  width: 1px;
  height: 52px;
  padding: 6px;
  border-bottom: 1px solid #e2e4e9;
  white-space: nowrap;
  vertical-align: middle;
  transition: background-color 0.12s ease-out;
}
.dt-row:hover > .dt-c { background: #f5f5f6; }
.dt-row[data-ticked] > .dt-c { background: #f1f1f2; }
.dt-c-tick, .dt-h.dt-c-tick { width: 32px; min-width: 32px; padding: 0 4px 0 12px; }
.dt-h.dt-c-tick { line-height: 0; }
.dt-c-customer, .dt-h.dt-c-customer { width: auto; }
.dt-c-customer > * { max-width: 12rem; }
.dt-c-customer [data-row-popover="customer"] { display: block; overflow: hidden; text-overflow: ellipsis; }
.dt-c-press, .dt-h.dt-c-press { padding-right: 8px; text-align: right; }
/* the A code: the row's largest mark, read first */
.dt-alloc { color: #18191b; font-size: 15px; line-height: 20px; font-weight: 650; letter-spacing: -0.006em; }
/* the status pill pops when it changes (the app's glyph pop) */
@keyframes dt-pop { 0% { transform: scale(0.8); } 55% { transform: scale(1.08); } 100% { transform: scale(1); } }
.dt-popped { animation: dt-pop 0.34s cubic-bezier(0.22, 1, 0.36, 1); }
@media (prefers-reduced-motion: reduce) { .dt-popped { animation: none; } }
/* the label: our mark and the Lumanora number on the soft warm field, then its doors */
.dt-label-line { display: inline-flex; align-items: center; gap: 8px; }
.dt-lml {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 6px;
  background: #fbeee1;
  color: #18191b;
  font-size: 13.5px;
  line-height: 20.8px;
  font-weight: 500;
}
.dt-lml-mark { display: block; flex: none; width: 14px; height: 14px; }
.dt-doors { display: inline-flex; align-items: center; gap: 2px; }
.dt-door, .dt-verb {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 28px;
  min-width: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #4d5057;
  font: 500 12.5px/18.4px var(--font-sans, system-ui, sans-serif);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.12s ease-out, color 0.12s ease-out, transform 0.12s ease-out;
}
.dt-verb { padding: 0 10px; color: #18191b; }
.dt-door:hover, .dt-verb:hover { background: rgb(0 0 0 / 0.06); color: #18191b; }
.dt-door:active, .dt-verb:active { transform: scale(0.97); }
.dt-door:focus-visible, .dt-verb:focus-visible { outline: 2px solid #1a1a1a; outline-offset: -2px; }
.dt-glyph { display: block; flex: none; width: 16px; height: 16px; }
/* the quiet bar over the head band while orders are ticked: the count and the one ink press */
.dt-bar {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 32px;
  right: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 36px;
  padding: 0 4px 0 6px;
  border-radius: 0 8px 8px 0;
  background: #f3f3f5;
  color: #18191b;
  font-size: 12.5px;
  line-height: 18.4px;
  font-weight: 500;
  animation: dt-fade 0.14s ease-out;
}
.dt-bar[hidden] { display: none; }
@keyframes dt-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .dt-bar { animation: none; } }
.dt-ink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  margin: 0;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: #1a1a1a;
  box-shadow: inset 0 1px 0 0 rgb(255 255 255 / 0.18), 0 1px 2px 0 rgb(0 0 0 / 0.22);
  color: #fff;
  font: 500 12.5px/18.4px var(--font-sans, system-ui, sans-serif);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.12s ease-out, transform 0.12s ease-out;
}
.dt-ink:hover { background: #000; }
.dt-ink:active { transform: scale(0.97); }
.dt-ink:focus-visible { outline: 2px solid #1a1a1a; outline-offset: 2px; }
.dt-ink .dt-glyph { width: 14px; height: 14px; }
/* the items card's head pill in the floor's tones (its one dot is demo.css's, as on Orders) */
[data-demo-items-pop] .dip-pill[data-tone="pos"] { border-color: transparent; background: #a9fa6a; color: #214b03; }
[data-demo-items-pop] .dip-pill[data-tone="neutral"] { border-color: transparent; background: rgb(0 0 0 / 0.05); color: #4a4a4a; }

/* THE RUNGS, on the table's own width (the desk's): the table from 59.25rem (its columns need 59rem, so 1280 holds it);
   under that each order is the table's line with its label under it; to 42rem a phone's three lines. The capture's desk
   rules (its stack under 58rem, its cell widths above) are undone here wherever they reach this table. */
/* the row's verbs as glyphs until the table has room for their words beside the label (68rem); the tooltip names them */
@container dtpp (max-width: 68rem) {
  .dt-verb { width: 28px; padding: 0; }
  .dt-verb-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* a tablet or a small laptop: each order on the table's own line in the table's columns (every row a subgrid of the
   table, so the columns line up under their names), and its label with its doors on a line under the order */
@container dtpp (42rem < width < 59.25rem) {
  .dt-table { display: grid; grid-template-columns: auto auto auto auto minmax(0, 1fr) auto auto auto; }
  .dt-table thead, .dt-table tbody { display: contents; }
  .dt-table tr {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
    grid-template-areas: none;
    align-items: center;
    gap: 0;
    padding: 0;
  }
  .dt-table thead tr { height: 36px; border-radius: 8px; background: #f3f3f5; }
  .dt-table thead .dt-h { display: flex; align-items: center; width: auto; height: 36px; padding: 0 6px; background: none; border-radius: 0; }
  .dt-table thead .dt-h.dt-c-tick { padding: 0 4px 0 12px; }
  .dt-table thead .dt-h.dt-c-label { display: none; }
  .dt-table thead .dt-h.dt-c-press { grid-column: 8; }
  .dt-row { border-bottom: 1px solid #e2e4e9; transition: background-color 0.12s ease-out; }
  .dt-row:hover { background: #f5f5f6; }
  .dt-row[data-ticked] { background: #f1f1f2; }
  .dt-row > .dt-c { display: block; grid-row: 1; width: auto; min-width: 0; max-width: none; height: auto; border: 0; background: none !important; }
  .dt-row > .dt-c-tick { display: flex; align-items: center; grid-column: 1; align-self: stretch; }
  .dt-row > .dt-c-alloc { grid-column: 2; }
  .dt-row > .dt-c-number { grid-column: 3; }
  .dt-row > .dt-c-items { grid-column: 4; }
  .dt-row > .dt-c-customer { grid-column: 5; }
  .dt-row > .dt-c-dest { grid-column: 6; }
  .dt-row > .dt-c-status { grid-column: 7; }
  .dt-row > .dt-c-press { grid-column: 8; }
  .dt-row > .dt-c-label { grid-row: 2; grid-column: 3 / -1; padding: 0 6px 12px; }
  .dt-row > .dt-c-label:empty { display: none; }
  /* the destination in the table's own type (the capture's stack makes it small and grey) */
  .dt-c-dest button { color: inherit; font-size: inherit; line-height: inherit; }
}
/* a phone: each order on three lines, the desk's own phone rung */
@container dtpp (max-width: 42rem) {
  .dt-table, .dt-table tbody { display: block; }
  .dt-table thead { display: block; }
  .dt-table thead tr { display: flex; align-items: center; height: 36px; border-radius: 8px; background: #f3f3f5; }
  .dt-table thead .dt-h { display: none; }
  .dt-table thead .dt-h.dt-c-tick { display: flex; align-items: center; background: none; }
  .dt-table thead .dt-h.dt-c-number { display: flex; align-items: center; width: auto; background: none; }
  .dt-row {
    display: grid;
    grid-template-columns: 20px auto minmax(0, 1fr) auto;
    grid-template-areas:
      "tick alloc number status"
      ". items items customer"
      ". label label press";
    align-items: center;
    column-gap: 10px;
    row-gap: 8px;
    padding: 12px 8px 12px 12px;
    border-bottom: 1px solid #e2e4e9;
    transition: background-color 0.12s ease-out;
  }
  .dt-row > .dt-c { display: block; width: auto; min-width: 0; height: auto; padding: 0; border: 0; background: none !important; }
  .dt-row:hover { background: #f5f5f6; }
  .dt-row[data-ticked] { background: #f1f1f2; }
  .dt-row > .dt-c-tick { grid-area: tick; display: flex; }
  .dt-row > .dt-c-alloc { grid-area: alloc; }
  .dt-row > .dt-c-number { grid-area: number; }
  .dt-row > .dt-c-status { grid-area: status; justify-self: end; }
  .dt-row > .dt-c-items { grid-area: items; }
  .dt-row > .dt-c-customer { grid-area: customer; justify-self: end; color: #4d5057; }
  .dt-row > .dt-c-customer > * { max-width: 9rem; }
  .dt-row > .dt-c-dest { display: none; }
  .dt-row > .dt-c-label { grid-area: label; }
  .dt-row > .dt-c-label:empty { display: none; }
  .dt-row > .dt-c-press { grid-area: press; justify-self: end; }
  .dt-row > .dt-c-press:empty { display: none; }
}
/* under the table rung the bar rides the bottom of the view, as the app's own bulk bar does: tick an order far down the
   list and Print labels is in reach (sticky in the list's flow, after the last order; centred, as wide as it needs) */
@container desk (width < 59.25rem) {
  [data-orders-table] [data-pp] { display: flex; flex-direction: column; }
  [data-orders-table] form > .overflow-hidden:has([data-pp]),
  [data-orders-table] [data-scroll-box]:has(> [data-pp]) { overflow: visible; }
}
@container dtpp (width < 59.25rem) {
  .dt-bar {
    position: sticky;
    order: 1;
    top: auto;
    bottom: 12px;
    left: auto;
    right: auto;
    align-self: center;
    width: fit-content;
    max-width: 100%;
    height: auto;
    min-height: 44px;
    margin-top: 12px;
    padding: 4px 4px 4px 14px;
    border: 1px solid #d4d6db;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 8px -2px rgb(16 24 40 / 0.1), 0 16px 32px -8px rgb(16 24 40 / 0.18);
    font-size: 13.5px;
    line-height: 20.8px;
    animation: dt-rise 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .dt-bar .dt-ink { height: 34px; padding: 0 12px; }
}
/* a phone: the bar as wide as the list */
@container dtpp (width < 30rem) {
  .dt-bar { align-self: stretch; width: auto; justify-content: space-between; }
}
@keyframes dt-rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .dt-bar { animation: none; } }

/* ---------------------------------------------------------------- HS SEARCH: "Made in" (§5) */
.dt-picker { position: relative; width: 100%; }
.dt-select {
  position: relative;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  width: 100%;
  height: 32px;
  margin: 0;
  padding: 0 32px 0 12px;
  border: 1px solid #c9ccd2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 1px 0 rgb(16 24 40 / 0.04), inset 0 -1px 0 0 rgb(16 24 40 / 0.05);
  color: #18191b;
  font: 400 12.5px/18.4px var(--font-sans, system-ui, sans-serif);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.12s ease-out, background-color 0.12s ease-out;
}
.dt-select:hover { border-color: #b4b8c0; background: #f5f5f6; }
.dt-select:focus-visible, .dt-select[aria-expanded="true"] { border-color: #1a1a1a; outline: 2px solid #1a1a1a; outline-offset: -2px; }
.dt-select[data-chosen] { padding-left: 40px; }
.dt-select-seat { position: absolute; top: 0; bottom: 0; left: 12px; display: none; align-items: center; pointer-events: none; }
.dt-select[data-chosen] .dt-select-seat { display: flex; }
.dt-select-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dt-caret {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  color: #676b73;
  pointer-events: none;
  transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1);
}
.dt-select[aria-expanded="true"] .dt-caret { transform: rotate(180deg); }
@media (pointer: coarse) {
  .dt-select { height: 44px; font-size: 16px; line-height: 22px; }
}
/* the list on the app's menu chrome (dropdown-menu.tsx) */
.dt-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  box-sizing: border-box;
  min-width: 10rem;
  max-height: 320px;
  margin: 0;
  padding: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
  border: 1px solid #e2e4e9;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 4px -1px rgb(16 24 40 / 0.04), 0 4px 12px -2px rgb(16 24 40 / 0.08);
  color: #18191b;
  font: 400 12.5px/18.4px var(--font-sans, system-ui, sans-serif);
  outline: none;
  transform-origin: top center;
  animation: dt-expand 0.16s cubic-bezier(0.22, 1, 0.36, 1);
}
.dt-menu[hidden] { display: none; }
@keyframes dt-expand { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .dt-menu { animation: none; } }
.dt-group { padding: 8px 10px 4px 32px; color: #676b73; font-size: 11px; line-height: 16px; font-weight: 500; }
.dt-opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 6px 32px;
  border-radius: 6px;
  cursor: pointer;
  scroll-margin: 4px;
}
.dt-opt:hover, .dt-opt[data-active] { background: #f5f5f6; }
.dt-check { position: absolute; top: 50%; left: 8px; display: none; width: 16px; height: 16px; margin-top: -8px; color: #1a1a1a; }
.dt-opt[aria-selected="true"] .dt-check { display: block; }
.dt-opt[aria-selected="true"] { font-weight: 500; }
.dt-opt-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* a flag: the drawn set at 18 by 12 with the 1px inner ring (country-flag.tsx) */
.dt-flag { position: relative; display: block; flex: none; width: 18px; height: 12px; overflow: hidden; }
.dt-flag img { display: block; width: 18px; height: 12px; object-fit: cover; }
.dt-flag:not(.dt-flag-none)::after { content: ""; position: absolute; inset: 0; border: 1px solid #d4d6db; pointer-events: none; }
@media (pointer: coarse) {
  .dt-opt { padding-top: 10px; padding-bottom: 10px; font-size: 15px; line-height: 20px; }
}
/* R157 (F096): on a phone the Try examples sit as chips in rows, 8px apart (they stood one a line, 44px tall each, with
   about 28px of air between them); "Try" heads them */
@media (max-width: 479px) {
  [data-hs-search-examples] { flex-basis: 100%; gap: 8px; }
  [data-hs-search-examples] > [data-hs-search-example] {
    min-height: 36px;
    height: auto;
    padding: 6px 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.03);
    line-height: 20px;
  }
  :has(> [data-hs-search-examples]) { flex-wrap: wrap; row-gap: 8px; }
}
