/* =====================================================================
   Screen styles: history — תיק כרטיס (card file) + יומן פעולות (activity log). Direction A "לוח הכרטיסים".
   Prefix hx- . Tokens from css/tokens.css only (fixed plastic colours = --card-*, --amber, --mint).
   RTL: logical properties. The plastic card is .fcard, plates are .plate, tape is .hazard (app.css).
   Sections: shared · mini card · photo sheet · search · file hero · lifecycle · facts · logbook · side
             · lives (tabs) · activity log · responsive · motion
   ===================================================================== */

/* ---------------------------------------------------------------- shared */
.hx { display: block; }
.hx-time { direction: ltr; unicode-bidi: isolate; display: inline-block; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.hx-path { word-break: break-all; padding: 8px 12px; background: var(--plate-2); border-radius: var(--radius-ctl); box-shadow: 0 0 0 1px var(--line) inset; }
.hx-none { padding: 14px 12px; text-align: center; color: var(--ink-3); font-size: var(--fs-small); border: 1.5px dashed var(--line-2); border-radius: 8px; }
.hx-newtag {
  display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 4px;
  background: var(--amber); color: var(--amber-ink); font: 700 10.5px/1 var(--font-sans); letter-spacing: .02em;
}
.hx-sk { display: grid; gap: 16px; }
.hx-sk .sk { display: block; }

/* links to the swap / trip / count */
.hx-ref {
  display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 0 9px; border-radius: 6px;
  background: var(--plate-2); color: var(--ink-2); box-shadow: 0 0 0 1px var(--line-2) inset;
  font-size: 12px; font-weight: var(--fw-semibold); text-decoration: none; white-space: nowrap;
  transition: background-color .15s, color .15s, transform .15s var(--spring);
}
.hx-ref svg.icon { width: 14px; height: 14px; color: var(--ink-3); }
.hx-ref:hover { background: var(--plate); color: var(--ink); transform: translateY(-1px); }
.hx-ref:hover svg.icon { color: var(--amber-text); }
.hx-formbtn { min-height: 28px; padding: 0 9px; font-size: 12px; border-radius: 6px; gap: 5px; }
.hx-formbtn svg.icon { width: 14px; height: 14px; }

/* ---------------------------------------------------------------- mini card (a card number lying on the desk) */
.hx-mc {
  position: relative; display: inline-flex; align-items: center; height: 25px; padding: 0 7px 4px; border-radius: 4px; flex: none;
  color: #ECE6D7; text-decoration: none; direction: ltr; unicode-bidi: isolate; white-space: nowrap;
  background:
    linear-gradient(158deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 45%),
    linear-gradient(180deg, var(--card-d-top), var(--card-d-bot));
  box-shadow: inset 0 -4px 0 var(--amber), inset 0 1px 0 rgba(255, 255, 255, .14), 0 1px 1.5px rgba(0, 0, 0, .28);
  transition: transform .16s var(--spring), box-shadow .16s;
}
.hx-mc--petrol {
  color: #F2FFF8;
  background:
    radial-gradient(120% 70% at 25% 0%, rgba(255, 255, 255, .3), transparent 62%),
    linear-gradient(180deg, var(--card-p-top), var(--card-p-bot));
  box-shadow: inset 0 -4px 0 var(--mint), inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 1.5px rgba(0, 0, 0, .25);
}
.hx-mc__n { font: 600 12px/1 var(--font-mono); letter-spacing: .03em; font-variant-numeric: tabular-nums; }
.hx-mc__n small { font-size: 10px; font-weight: 500; opacity: .58; letter-spacing: .02em; }
a.hx-mc:hover { transform: translateY(-2px) rotate(-1.5deg); box-shadow: inset 0 -4px 0 var(--amber), inset 0 1px 0 rgba(255, 255, 255, .14), 0 5px 8px -2px rgba(0, 0, 0, .35); }
a.hx-mc--petrol:hover { box-shadow: inset 0 -4px 0 var(--mint), inset 0 1px 0 rgba(255, 255, 255, .25), 0 5px 8px -2px rgba(0, 0, 0, .3); }
a.hx-mc:focus-visible { outline-offset: 2px; border-radius: 5px; }
.hx-mcs { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.hx-more-chips {
  height: 25px; padding: 0 8px; border: 0; border-radius: 4px; cursor: pointer;
  background: transparent; color: var(--ink-2); box-shadow: 0 0 0 1px var(--line-2) inset;
  font: 600 11.5px/1 var(--font-sans);
}
.hx-more-chips:hover { background: var(--plate-2); color: var(--ink); }

/* ---------------------------------------------------------------- form photo sheet: a photo pinned to the board */
dialog.hx-photo { width: min(620px, calc(100vw - 32px)); }
.hx-photo .modal__body { padding: 0; }
.hx-photo__board {
  padding: 26px 22px 24px; display: grid; gap: 10px; justify-items: center;
  background-color: var(--board);
  background-image: radial-gradient(circle at 50% 50%, var(--hole) 0 1.7px, transparent 2.3px);
  background-size: 16px 16px; background-position: 8px 8px;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, .08);
}
.hx-photo__pinned { position: relative; margin: 0; max-width: 100%; transform: rotate(-1.2deg); display: grid; gap: 8px; justify-items: center; }
.hx-photo__paper {
  position: relative; padding: 10px 10px 12px; background: #FBFBF7; border-radius: 3px; max-width: 100%;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .15), 0 12px 22px -8px rgba(20, 25, 20, .45);
}
.hx-photo__tape {
  position: absolute; z-index: 2; top: -11px; left: 50%; width: 92px; height: 24px; margin-left: -46px; transform: rotate(2deg);
  background: color-mix(in srgb, var(--amber) 55%, rgba(255, 255, 255, .5)); opacity: .82;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
  -webkit-mask: linear-gradient(90deg, transparent 0 2px, #000 2px calc(100% - 2px), transparent calc(100% - 2px));
}
.hx-photo__img { display: block; max-width: min(540px, 100%); max-height: 62vh; height: auto; border-radius: 1px; }
.hx-photo__paper.is-loading .hx-photo__img { position: absolute; opacity: 0; }
.hx-photo__sk { display: block; width: min(420px, 70vw); height: 300px; border-radius: 2px; }
.hx-photo__paper:not(.is-loading) .hx-photo__sk { display: none; }
.hx-photo__fail { display: flex; align-items: center; gap: 8px; padding: 30px 24px; color: #5A3A10; font-size: var(--fs-small); }
.hx-photo .modal__body > .banner { margin: 16px 18px 0; }
.hx-photo .modal__body > .small, .hx-photo .modal__body > .hx-path { margin-inline: 18px; }
.hx-photo .modal__body > .hx-path { margin-bottom: 18px; }

/* ---------------------------------------------------------------- search (no number / unknown number) */
.hx-find { display: grid; gap: 16px; }
.hx-find__head {
  padding: 22px 26px 18px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 1.05fr); gap: 10px 32px; align-items: center;
}
.hx-find__intro { display: grid; gap: 6px; }
.hx-find__intro .display { font-size: 34px; }
.hx-find__intro p { margin: 0; color: var(--ink-2); font-size: var(--fs-small); max-width: 46ch; }
.hx-find__form { display: flex; gap: 10px; align-items: stretch; }
.hx-find__field { position: relative; flex: 1 1 auto; min-width: 0; }
.hx-find__ico { position: absolute; top: 50%; right: 16px; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; display: grid; }
.hx-find__ico svg.icon { width: 22px; height: 22px; }
.input.hx-find__input {
  height: 60px; padding-right: 52px; padding-left: 16px; text-align: right;
  font: 600 25px/1 var(--font-mono); letter-spacing: .06em;
  background: var(--plate-2); border-radius: 10px;
  box-shadow: 0 0 0 1px var(--line-2) inset, 0 2px 4px rgba(0, 0, 0, .06) inset;
}
.input.hx-find__input::placeholder { color: color-mix(in srgb, var(--ink-3) 60%, transparent); letter-spacing: .06em; }
.input.hx-find__input:focus { box-shadow: 0 0 0 2px var(--amber) inset, 0 0 0 5px color-mix(in srgb, var(--amber) 22%, transparent); border-radius: 10px; }
.input.hx-find__input::-webkit-search-cancel-button { cursor: pointer; }
.hx-find__go { min-height: 60px; padding: 0 22px; font-size: 15px; border-radius: 10px; }
.hx-find__count { grid-column: 2; margin: 0; font-size: var(--fs-small); color: var(--ink-2); }
.hx-find__count b { font-family: var(--font-mono); color: var(--ink); }
.hx-find__count.is-nudge { animation: hx-nudge .4s; }
.hx-find__miss { color: var(--signal-ink); font-weight: var(--fw-semibold); }

.hx-find__board {
  --cw: 70px; --ch: 111px;
  position: relative; border-radius: 12px; padding: 14px 18px 20px; display: grid; gap: 12px;
  background-color: var(--board);
  background-image: radial-gradient(circle at 50% 50%, var(--hole) 0 1.7px, transparent 2.3px);
  background-size: 16px 16px; background-position: 8px 8px;
  box-shadow: 0 0 0 1px var(--board-edge), inset 0 2px 5px rgba(0, 0, 0, .08), inset 0 0 0 5px color-mix(in srgb, var(--board-edge) 40%, transparent);
}
.hx-find__cap { display: flex; align-items: center; gap: 10px; font: 700 16px/1 var(--font-display); letter-spacing: .05em; color: var(--ink-3); }
.hx-find__cap::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.hx-find__cap .plate__count { font-size: 11.5px; padding: 3px 5px; letter-spacing: 0; }
.hx-find__pegs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 26px 14px; }
.hx-find__slot { width: var(--cw); }
.hx-find__hang {
  position: relative; display: grid; justify-items: center; gap: 6px; color: var(--ink-2); text-decoration: none;
  animation: hx-in .32s var(--ease) both; animation-delay: calc(var(--i, 0) * 12ms);
}
.hx-find__card {
  position: relative; display: block; width: var(--cw); height: var(--ch); border-radius: 8px;
  transform-origin: 50% calc(var(--cw) * .138);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .22)) drop-shadow(0 4px 5px rgba(20, 25, 20, .18));
  transition: transform .38s var(--spring), filter .3s var(--ease);
}
.hx-find__card .pin { top: calc(var(--cw) * .138 - 4.5px); }
.hx-find__where { font-size: 11px; font-weight: var(--fw-semibold); white-space: nowrap; max-width: calc(var(--cw) + 16px); overflow: hidden; text-overflow: ellipsis; }
.hx-find__hang:hover .hx-find__card { transform: translateY(-6px) rotate(-2.5deg); filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .2)) drop-shadow(0 14px 12px rgba(20, 25, 20, .3)); }
.hx-find__hang:hover .hx-find__where { color: var(--ink); }
.hx-find__hang:active .hx-find__card { transform: translateY(-2px) scale(.98); transition-duration: .12s; }
.hx-find__hang:focus-visible { outline-offset: 5px; border-radius: 9px; }
.hx-find__hang.is-gone .hx-find__card { filter: grayscale(.75) brightness(.95) drop-shadow(0 1px 1px rgba(0, 0, 0, .2)); opacity: .62; }
.hx-find__hang.is-gone .hx-find__where { color: var(--ink-3); font-weight: var(--fw-medium); }
.hx-find__hang.is-gone:hover .hx-find__card { opacity: .9; }

/* ---------------------------------------------------------------- the card file: hero */
.hx-file { display: grid; gap: 0; }
.hx-life { display: grid; gap: 18px; }
.hx-hero {
  padding: 20px 26px 18px 22px; display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 0 30px; align-items: stretch;
}
.hx-hero.is-late { box-shadow: var(--shadow-plate), 0 0 0 2px color-mix(in srgb, var(--signal) 55%, transparent); }
.hx-hero__niche {
  position: relative; z-index: 1; display: grid; place-items: start center; padding-top: 18px; min-height: 236px;
  border-radius: 10px;
  background-color: var(--board);
  background-image: radial-gradient(circle at 50% 50%, var(--hole) 0 1.6px, transparent 2.2px);
  background-size: 14px 14px; background-position: 7px 7px;
  box-shadow: inset 0 0 0 1px var(--board-edge), inset 0 2px 6px rgba(0, 0, 0, .1);
}
.hx-hang {
  --cw: 118px; --ch: 187px;
  position: relative; width: var(--cw); height: var(--ch);
  transform-origin: 50% calc(var(--cw) * .138);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)) drop-shadow(0 10px 12px rgba(20, 25, 20, .28));
}
.hx-hang .fcard { --cw: inherit; --ch: inherit; border-radius: 12px; }
.hx-hang__pin.pin { top: calc(var(--cw) * .138 - 6.5px); width: 13px; height: 13px; margin-left: -6.5px; background: radial-gradient(circle at 35% 30%, #fff 0 1.5px, #D3D8D2 2.4px, #7E8680 6.5px); }
.hx-hang.is-swing { animation: hx-swing 1.3s cubic-bezier(.3, .6, .3, 1) .15s both; }
.hx-hang.is-gone .fcard { filter: grayscale(.55) brightness(.92); }
.hx-hang .stamp {
  position: absolute; z-index: 4; top: 30%; left: 50%; transform: translate(-50%, -50%) rotate(-14deg);
  background: color-mix(in srgb, var(--plate) 90%, transparent); font-size: 34px; padding: 5px 12px 2px;
}
.hx-hero__info { position: relative; z-index: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; padding-block: 2px; }
.hx-hero__eyebrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--ink-2); }
.hx-hero__type { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font-weight: 600; letter-spacing: .02em; }
.hx-hero__life { padding: 2px 7px; border-radius: 4px; background: var(--amber-bg); color: var(--amber-text); letter-spacing: .02em; }
.hx-num { margin: -2px 0 0; font: 600 44px/1 var(--font-mono); letter-spacing: .03em; text-align: start; }
.hx-num .mono { display: inline-block; }
.hx-num__pre { color: var(--ink-3); font-weight: 500; }

.hx-place { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.hx-place__l { font-size: 12px; font-weight: 600; color: var(--ink-3); letter-spacing: .03em; }
.hx-nameplate {
  position: relative; display: inline-flex; align-items: center; min-height: 34px; padding: 4px 22px 3px;
  border-radius: 6px; font-size: 16px; font-weight: 700; color: var(--ink);
  background:
    radial-gradient(circle at 50% 50%, var(--screw) 0 2px, transparent 2.6px) right 7px center / 6px 6px no-repeat,
    radial-gradient(circle at 50% 50%, var(--screw) 0 2px, transparent 2.6px) left 7px center / 6px 6px no-repeat,
    linear-gradient(180deg, var(--plate-2), var(--plate-3));
  box-shadow: 0 0 0 1px var(--line-2) inset, 0 1px 0 var(--plate-hi) inset, 0 1px 1.5px rgba(0, 0, 0, .1);
}
.hx-nameplate.is-late { color: #fff; background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .55) 0 2px, transparent 2.6px) right 7px center / 6px 6px no-repeat,
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .55) 0 2px, transparent 2.6px) left 7px center / 6px 6px no-repeat,
    var(--signal); box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.hx-nameplate.is-done { color: var(--ok-c); background:
    radial-gradient(circle at 50% 50%, var(--screw) 0 2px, transparent 2.6px) right 7px center / 6px 6px no-repeat,
    radial-gradient(circle at 50% 50%, var(--screw) 0 2px, transparent 2.6px) left 7px center / 6px 6px no-repeat,
    var(--ok-bg); }
.hx-place__sub { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: var(--fs-small); color: var(--ink-2); }

/* ---------------------------------------------------------------- lifecycle strip */
.hx-cycle { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: 520px; }
.hx-cycle li { position: relative; display: grid; justify-items: center; gap: 7px; font-size: 12px; color: var(--ink-3); text-align: center; }
.hx-cycle li::before { /* rail to the next step (RTL: the next step sits to the left) */
  content: ""; position: absolute; top: 8px; height: 2px; inset-inline-start: 50%; inset-inline-end: -50%;
  background: repeating-linear-gradient(90deg, var(--line-2) 0 5px, transparent 5px 9px);
}
.hx-cycle li:last-child::before { display: none; }
.hx-cycle li.is-done::before { background: var(--ink-3); }
.hx-cycle__node {
  position: relative; z-index: 1; width: 18px; height: 18px; border-radius: 50%; display: block;
  background: var(--plate); box-shadow: 0 0 0 2px var(--line-2) inset;
}
.hx-cycle li.is-done .hx-cycle__node { background: var(--ink-3); box-shadow: 0 0 0 4px var(--plate) inset; }
.hx-cycle li.is-done { color: var(--ink-2); }
.hx-cycle li.is-now { color: var(--ink); font-weight: 700; }
.hx-cycle li.is-now .hx-cycle__node {
  background: var(--amber); box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 30%, transparent), inset 0 -2px 0 rgba(0, 0, 0, .15);
  animation: hx-beacon 2.4s infinite;
}
.hx-cycle li.is-now .hx-cycle__l { padding: 2px 7px; border-radius: 4px; background: var(--amber); color: var(--amber-ink); }
.hx-cycle li.is-now.is-late .hx-cycle__node { background: var(--signal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--signal) 30%, transparent); }
.hx-cycle li.is-now.is-late .hx-cycle__l { background: var(--signal); color: #fff; }
.hx-cycle li.is-now.is-end .hx-cycle__node { background: var(--ok-c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok-c) 25%, transparent); animation: none; }
.hx-cycle li.is-now.is-end .hx-cycle__l { background: var(--ok-bg); color: var(--ok-c); }
.hx-cycle__l { white-space: nowrap; line-height: 1.3; }

/* ---------------------------------------------------------------- facts (engraved counters) */
.hx-facts { margin: 4px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, max-content)); gap: 0; }
.hx-fact { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 3px; padding: 0 18px; border-inline-start: 1px solid var(--line-2); }
.hx-fact:first-child { padding-inline-start: 0; border-inline-start: 0; }
.hx-fact dt { font-size: 12px; color: var(--ink-3); font-weight: 500; white-space: nowrap; }
.hx-fact dd { margin: 0; display: flex; align-items: baseline; gap: 6px; }
.hx-fact dd b { font: 700 46px/.8 var(--font-display); color: var(--ink); padding-top: 4px; font-variant-numeric: tabular-nums; }
.hx-fact dd span { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.hx-hero__foot { margin-top: auto; padding-top: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hx-hero__since { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); margin-inline-end: auto; }
.hx-hero__since svg.icon { width: 15px; height: 15px; }

/* ---------------------------------------------------------------- the logbook: index cards on the board */
.hx-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.hx-book { padding: 14px 16px 16px; display: grid; gap: 10px; }
.hx-book__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hx-book__hint { margin-inline-start: auto; font-size: 12px; color: var(--ink-3); }
.hx-tl {
  list-style: none; margin: 0; padding: 14px 14px 18px 16px; border-radius: 10px;
  background-color: var(--board);
  background-image: radial-gradient(circle at 50% 50%, var(--hole) 0 1.6px, transparent 2.2px);
  background-size: 16px 16px; background-position: 8px 8px;
  box-shadow: inset 0 0 0 1px var(--board-edge), inset 0 2px 5px rgba(0, 0, 0, .08);
}
.hx-tl > li { position: relative; }
.hx-tl > li::before { /* the spine */
  content: ""; position: absolute; inset-inline-start: 16px; top: 0; bottom: 0; width: 2px; margin-inline-start: -1px;
  background: color-mix(in srgb, var(--ink-3) 45%, transparent);
}
.hx-tl > li:first-child::before { top: 14px; }
.hx-tl > li:last-child::before { bottom: auto; height: 22px; }
.hx-day { padding: 2px 0 10px 0; padding-inline-start: 44px; }
.hx-day:not(:first-child) { padding-top: 14px; }
.hx-day > span {
  position: relative; display: inline-flex; align-items: baseline; gap: 8px; padding: 4px 10px 3px; border-radius: 5px;
  background: var(--ink); color: var(--bg); font-size: 12.5px; box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}
.hx-day > span b { font: 700 17px/1 var(--font-display); letter-spacing: .03em; }
.hx-day > span .hx-time { font-size: 11.5px; color: color-mix(in srgb, var(--bg) 70%, var(--ink)); }
.hx-day::after { /* a bolt where the day pins onto the spine */
  content: ""; position: absolute; inset-inline-start: 11px; top: calc(50% - 5px); width: 10px; height: 10px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0 1px, #D3D8D2 1.6px, #8A928C 5px); box-shadow: 0 1px 1.5px rgba(0, 0, 0, .4);
}
.hx-day:not(:first-child)::after { top: calc(50% + 2px); }

.hx-ev { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding-bottom: 12px; }
.hx-ev__dot {
  position: relative; z-index: 1; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; margin-top: 6px;
  background: var(--plate); color: var(--ink-2); box-shadow: var(--shadow-plate), 0 2px 4px rgba(0, 0, 0, .08);
}
.hx-ev__dot svg.icon { width: 17px; height: 17px; }
.hx-ev--warn .hx-ev__dot { background: var(--amber); color: var(--amber-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.hx-ev--ok .hx-ev__dot { background: var(--ok-c); color: var(--plate); box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.hx-ev--bad .hx-ev__dot { background: var(--signal); color: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.hx-ev--fix .hx-ev__dot { background: var(--plate); color: var(--amber-text); box-shadow: 0 0 0 2px var(--amber) inset, 0 1px 2px rgba(0, 0, 0, .15); }

.hx-ev__card {
  --tone: var(--line-2);
  position: relative; min-width: 0; padding: 10px 14px 12px; border-radius: 8px; display: grid; gap: 8px;
  background-color: var(--plate);
  background-image: repeating-linear-gradient(180deg, transparent 0 25px, color-mix(in srgb, var(--line) 70%, transparent) 25px 26px);
  background-position: 0 44px; background-repeat: repeat-y;
  box-shadow: var(--shadow-card);
}
.hx-ev--warn .hx-ev__card { --tone: color-mix(in srgb, var(--amber) 70%, transparent); }
.hx-ev--ok .hx-ev__card { --tone: color-mix(in srgb, var(--ok-c) 55%, transparent); }
.hx-ev--fix .hx-ev__card { --tone: color-mix(in srgb, var(--amber) 70%, transparent); }
.hx-ev.is-exc .hx-ev__card { --tone: color-mix(in srgb, var(--signal) 55%, transparent); padding-top: 14px; background-color: color-mix(in srgb, var(--signal) 5%, var(--plate)); }
.hx-ev__head { display: flex; align-items: baseline; gap: 6px 12px; padding-bottom: 7px; border-bottom: 1.5px solid var(--tone); }
.hx-ev__verb { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.3; min-width: 0; }
.hx-ev__when { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 6px; flex: none; }
.hx-ev__when .hx-time { font-size: 13px; font-weight: 600; color: var(--ink-2); }

.hx-move { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hx-move__l { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.hx-move__arr { display: grid; color: var(--ink-3); }
.hx-move__arr svg.icon { width: 15px; height: 15px; }
.hx-pl {
  display: inline-flex; align-items: center; height: 24px; padding: 1px 12px 0; border-radius: 4px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap;
  background:
    radial-gradient(circle at 50% 50%, var(--screw) 0 1.4px, transparent 1.9px) right 3px center / 4px 4px no-repeat,
    radial-gradient(circle at 50% 50%, var(--screw) 0 1.4px, transparent 1.9px) left 3px center / 4px 4px no-repeat,
    var(--plate-2);
  box-shadow: 0 0 0 1px var(--line-2) inset;
}
.hx-pl--to { color: var(--ink); background-color: var(--plate-3); box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 28%, transparent) inset; }
.hx-pl--to.is-done { color: var(--ok-c); background-color: var(--ok-bg); }
.hx-pl--new { color: var(--ink-3); background: transparent; box-shadow: 0 0 0 1px var(--line-2) inset; border: 0; font-weight: 500; }

.hx-who { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; }
.hx-who__i { display: inline-flex; align-items: baseline; gap: 6px; }
.hx-who__l { font-size: 11.5px; color: var(--ink-3); }
.hx-who b { font-weight: 600; }

.hx-exc {
  display: flex; align-items: flex-start; gap: 6px 10px; flex-wrap: wrap; padding: 8px 10px; border-radius: 6px;
  background: var(--signal-bg); box-shadow: 0 0 0 1px color-mix(in srgb, var(--signal) 30%, transparent) inset;
}
.hx-exc__tag {
  display: inline-flex; align-items: center; gap: 5px; flex: none; height: 22px; padding: 0 8px; border-radius: 4px;
  background: var(--signal); color: #fff; font-size: 11.5px; font-weight: 700;
}
.hx-exc__tag svg.icon { width: 13px; height: 13px; }
.hx-exc__r { flex: 1 1 160px; min-width: 0; color: var(--signal-ink); font-size: 13px; font-weight: 500; line-height: 1.45; overflow-wrap: anywhere; padding-top: 1px; }
.hx-fixnote { font-size: 13px; padding: 7px 10px; border-radius: 6px; background: var(--amber-bg); color: var(--ink); box-shadow: 0 0 0 1px color-mix(in srgb, var(--amber) 30%, transparent) inset; margin-inline-end: 84px; }
.hx-fixnote b { color: var(--amber-text); }
.hx-evnote { font-size: 12.5px; color: var(--ink-2); }
.hx-ev__refs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hx-ev__card > .stamp { position: absolute; inset-inline-end: 12px; bottom: 10px; z-index: 3; opacity: .92; pointer-events: none; }
.hx-ev .stamp.hx-stamp--fix { --c: var(--amber-text); transform: rotate(-8deg); }
.hx-ev.is-new .hx-ev__card { animation: hx-glow-card 8s var(--ease); }

/* ---------------------------------------------------------------- side plates */
.hx-side { display: grid; gap: 14px; }
.hx-sideplate { padding: 14px 16px 14px; display: grid; gap: 10px; }
.hx-sideplate .plate__title { font-size: 23px; }
.hx-slips, .hx-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hx-slip {
  width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; text-align: start;
  padding: 8px 10px 8px 8px; border: 0; border-radius: 8px; cursor: pointer; color: var(--ink);
  background: var(--plate-2); box-shadow: 0 0 0 1px var(--line) inset;
  transition: transform .2s var(--spring), box-shadow .2s, background-color .2s;
}
.hx-slip:hover { background: var(--plate); box-shadow: 0 0 0 1px var(--line-2) inset, 0 8px 14px -10px rgba(0, 0, 0, .4); transform: translateY(-1px); }
.hx-slip:active { transform: scale(.985); }
.hx-slip > svg.icon { color: var(--ink-3); width: 17px; height: 17px; }
.hx-slip__paper {
  width: 34px; height: 40px; display: grid; place-items: center; border-radius: 2px; transform: rotate(-4deg);
  background: linear-gradient(225deg, transparent 0 8px, #FBFBF7 8px); color: #7A827B;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .22);
}
.hx-slip__paper svg.icon { width: 17px; height: 17px; }
.hx-slip:hover .hx-slip__paper { transform: rotate(-1deg); }
.hx-slip__t { display: grid; gap: 1px; min-width: 0; }
.hx-slip__t b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hx-slip__t span { font: 500 11.5px/1.3 var(--font-mono); color: var(--ink-3); direction: ltr; text-align: end; }
.hx-people li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.hx-people__av {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--head-3); color: var(--amber); font: 700 14px/1 var(--font-sans);
}
.hx-people__t { display: grid; min-width: 0; }
.hx-people__t b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hx-people__t span { font-size: 11.5px; color: var(--ink-3); }
.hx-people time { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.hx-side__note { margin: 0; display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--ink-2); padding: 0 4px; }
.hx-side__note svg.icon { color: var(--ink-3); flex: none; margin-top: 2px; }

/* ---------------------------------------------------------------- two lives of one number: folder tabs */
.hx-lives { display: grid; gap: 10px; margin-bottom: -1px; }
.hx-lives__note {
  margin: 0; display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 9px;
  background: var(--amber-bg); box-shadow: 0 0 0 1px color-mix(in srgb, var(--amber) 32%, transparent) inset; font-size: 13px; color: var(--ink);
}
.hx-lives__note > svg.icon { color: var(--amber-text); margin-top: 2px; }
.hx-lives__note b.mono { font-weight: 600; }
.hx-tabs { display: flex; gap: 4px; padding-inline: 16px; position: relative; z-index: 2; }
.hx-tab {
  position: relative; display: grid; gap: 1px; justify-items: start; min-width: 132px; padding: 9px 16px 10px; border: 0; cursor: pointer;
  border-radius: 10px 10px 0 0; background: var(--plate-3); color: var(--ink-2); text-align: start;
  box-shadow: 0 0 0 1px var(--line) inset; transition: background-color .15s, color .15s;
}
.hx-tab:hover { background: var(--plate-2); color: var(--ink); }
.hx-tab__n { font: 700 22px/1 var(--font-display); letter-spacing: .02em; }
.hx-tab__sub { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 500; color: var(--ink-3); }
.hx-tab[aria-selected="true"] {
  background: var(--plate); color: var(--ink); box-shadow: 0 -1px 0 var(--line) inset, 0 3px 0 var(--amber) inset, 1px 0 0 var(--line), -1px 0 0 var(--line);
  padding-bottom: 13px; margin-bottom: -3px;
}
.hx-tab:focus-visible { outline-offset: -3px; border-radius: 10px 10px 0 0; }
.hx-file--multi .hx-hero { border-start-start-radius: var(--radius-card); }
.hx-file__panel:focus { outline: none; }

/* ================================================================ activity log */
.hx-loghead { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.hx-loghead .display { font-size: 38px; }
.hx-sub { margin: 4px 0 0; color: var(--ink-2); font-size: var(--fs-small); }
.hx-live {
  margin-inline-start: auto; display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 10px; border-radius: 6px;
  background: var(--plate); color: var(--ink-2); font-size: 12px; font-weight: 600; box-shadow: var(--shadow-plate);
}

/* toolbar */
.hx-tools { padding: 10px 12px; display: flex; align-items: flex-end; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.hx-tools__main, .hx-tools__more { display: contents; }
.hx-tools__search { position: relative; flex: 1.5 1 220px; min-width: 0; order: 0; }
.hx-tools__ico { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); color: var(--ink-3); display: grid; pointer-events: none; }
.hx-tools__ico svg.icon { width: 18px; height: 18px; }
.hx-tools .input, .hx-tools .select { min-height: 40px; height: 40px; font-size: 14px; }
.hx-tools__search .input { padding-right: 40px; text-align: right; font-family: var(--font-mono); letter-spacing: .03em; }
.hx-tools__search .input::placeholder { font-family: var(--font-sans); letter-spacing: 0; }
.hx-tools__f { flex: 1 1 140px; order: 1; }
.hx-tools__f.is-date { flex: 1 1 140px; }
.hx-tools__f > label { font-size: 11.5px; }
.hx-excbtn {
  order: 2; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 0; border-radius: var(--radius-ctl); cursor: pointer;
  background: var(--plate-2); color: var(--ink-2); box-shadow: 0 0 0 1px var(--line-2) inset;
  font: 600 13px/1 var(--font-sans); white-space: nowrap; transition: background-color .15s, color .15s;
}
.hx-excbtn:hover { color: var(--ink); background: var(--plate); }
.hx-excbtn__tape { width: 18px; height: 10px; border-radius: 2px; background: repeating-linear-gradient(-45deg, var(--signal) 0 4px, #1a1a1a 4px 8px); flex: none; }
.hx-excbtn[aria-pressed="true"] { background: var(--signal); color: #fff; box-shadow: 0 2px 6px -2px color-mix(in srgb, var(--signal) 70%, transparent); }
.hx-excbtn[aria-pressed="true"] .hx-excbtn__tape { background: repeating-linear-gradient(-45deg, #fff 0 4px, rgba(0, 0, 0, .55) 4px 8px); }
.hx-tools__toggle { display: none; }
.hx-tools__badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--amber); color: var(--amber-ink); font: 700 11px/18px var(--font-mono); text-align: center; }
.hx-tools__reset { order: 3; height: 40px; }

.hx-refbar:empty { display: none; }
.hx-refbar__in {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px 8px 14px; margin-bottom: 12px; border-radius: 9px;
  background: var(--amber-bg); box-shadow: 0 0 0 1px color-mix(in srgb, var(--amber) 32%, transparent) inset; font-size: 13.5px;
}
.hx-refbar__in > svg.icon { color: var(--amber-text); }
.hx-refbar__in .btn { margin-inline-start: auto; }
.hx-countline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 2px 8px; font-size: var(--fs-small); color: var(--ink-2); }
.hx-countline b { font-family: var(--font-mono); color: var(--ink); }
.hx-countline__exc { display: inline-flex; align-items: center; gap: 5px; padding: 1px 7px; border-radius: 4px; background: var(--signal-bg); color: var(--signal-ink); font-weight: 600; font-size: 12px; }
.hx-countline__exc svg.icon { width: 13px; height: 13px; }

/* the ledger table */
.hx-ledger { background: var(--plate); border-radius: var(--radius-card); box-shadow: var(--shadow-plate); }
.hx-lt { width: 100%; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.hx-lt th {
  position: sticky; top: var(--topbar-h); z-index: 5; text-align: start; white-space: nowrap;
  padding: 10px 12px; background: var(--plate-2); color: var(--ink-3);
  font-size: 11.5px; font-weight: 700; letter-spacing: .05em; border-bottom: 1px solid var(--line-2);
}
.hx-lt th:first-child { border-start-start-radius: var(--radius-card); }
.hx-lt th:last-child { border-start-end-radius: var(--radius-card); }
.hx-lt td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.hx-lt tbody tr:last-child td { border-bottom: 0; }
.hx-row { transition: background-color .15s; }
.hx-row:hover { background: color-mix(in srgb, var(--plate-2) 60%, transparent); }
.hx-lt th.c-time { width: 118px; }
.hx-lt th.c-act { width: 25%; }
.hx-lt th.c-co { width: 128px; }
.hx-lt th.c-by { width: 128px; }
.hx-lt th.c-form { width: 84px; }
.hx-lt th.c-note { width: 19%; }
.c-time { white-space: nowrap; }
.c-time .hx-time { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.hx-ago { display: block; margin-top: 3px; font-size: 11.5px; color: var(--ink-3); }
.c-time .hx-newtag { margin-top: 5px; }

.hx-act { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: start; }
.hx-act__ico { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; background: var(--plate-2); color: var(--ink-2); box-shadow: 0 0 0 1px var(--line) inset; }
.hx-act__ico svg.icon { width: 16px; height: 16px; }
.hx-row--warn .hx-act__ico { background: var(--amber-bg); color: var(--amber-text); box-shadow: none; }
.hx-row--ok .hx-act__ico { background: var(--ok-bg); color: var(--ok-c); box-shadow: none; }
.hx-row--fix .hx-act__ico { background: var(--plate); color: var(--amber-text); box-shadow: 0 0 0 1.5px var(--amber) inset; }
.hx-row.is-exc .hx-act__ico { background: var(--signal); color: #fff; box-shadow: none; }
.hx-act__t { display: grid; gap: 2px; min-width: 0; }
.hx-act__kind { font-size: 11.5px; font-weight: 700; color: var(--ink-3); letter-spacing: .02em; }
.hx-id { font-family: var(--font-mono); font-weight: 600; color: var(--ink-2); }
.hx-act__s { font-size: 13.5px; line-height: 1.4; color: var(--ink); }
.hx-act__s b { font-weight: 700; }

.hx-part { display: grid; gap: 4px; }
.hx-part + .hx-part { margin-top: 8px; }
.hx-part__l { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--ink-3); }
.hx-part--out .hx-part__l::before, .hx-part--in .hx-part__l::before, .hx-part--miss .hx-part__l::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); }
.hx-part--in .hx-part__l::before { background: var(--ok-c); }
.hx-part--out .hx-part__l::before { background: var(--amber); }
.hx-part--miss .hx-part__l { color: var(--signal-ink); }
.hx-part--miss .hx-part__l::before { background: var(--signal); }

.hx-person { display: grid; gap: 0; font-size: 13px; }
.hx-person + .hx-person { margin-top: 6px; }
.hx-person b { font-weight: 600; }
.hx-lbl { font-size: 11px; color: var(--ink-3); font-weight: 500; }
.hx-lbl--phone { display: none; }
.hx-by { font-size: 13px; color: var(--ink-2); }
.hx-dash { color: var(--line-2); font-weight: 600; }
.hx-note { font-size: 12.5px; overflow-wrap: anywhere; line-height: 1.45; }
.hx-note + .hx-note, .hx-exc + .hx-note { margin-top: 5px; }
.hx-note--quiet { color: var(--ink-3); }
.hx-bad { color: var(--signal-ink); font-weight: var(--fw-semibold); }
.hx-warn { color: var(--amber-text); font-weight: var(--fw-semibold); }
.c-note .hx-exc { padding: 6px 8px; gap: 5px 8px; }
.c-note .hx-exc__r { font-size: 12.5px; flex-basis: 100%; }

/* exception rows: tinted, with hazard tape across the top (tr is the containing block) */
.hx-row.is-exc { background: color-mix(in srgb, var(--signal) 6%, var(--plate)); }
.hx-row.is-exc:hover { background: color-mix(in srgb, var(--signal) 9%, var(--plate)); }
.hx-row.is-exc > td { padding-top: 16px; }
.hx-row.hazard::after { border-radius: 0; height: 4px; }
/* new live rows glow amber, then settle */
.hx-row.is-new > td { animation: hx-glow-row 8s var(--ease); }

.hx-skrow td { padding-block: 16px; }
.hx-skrow .sk { display: block; }
.hx-skrow .sk + .sk { margin-top: 8px; }

/* empty state */
.hx-emptyrow td { padding: 0; border: 0; }
.hx-empty { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 44px 20px 46px; }
.hx-empty__page {
  width: 64px; height: 76px; display: grid; place-items: center; margin-bottom: 6px; border-radius: 4px; transform: rotate(-3deg);
  color: var(--ink-3);
  background:
    repeating-linear-gradient(180deg, transparent 0 11px, var(--line-2) 11px 12px) 0 20px / 100% calc(100% - 26px) no-repeat,
    var(--plate-2);
  box-shadow: 0 0 0 1px var(--line-2) inset, 0 6px 14px -8px rgba(0, 0, 0, .35);
}
.hx-empty__page svg.icon { width: 26px; height: 26px; background: var(--plate-2); border-radius: 50%; padding: 3px; box-sizing: content-box; }
.hx-empty h3 { font: 700 26px/1.05 var(--font-display); letter-spacing: .01em; }
.hx-empty p { margin: 0; max-width: 46ch; color: var(--ink-2); font-size: var(--fs-small); }
.hx-empty .btn { margin-top: 6px; }

/* load more = the bottom of the ledger, with a tear line */
.hx-more { position: relative; display: grid; justify-items: center; gap: 8px; margin-top: 18px; padding-top: 18px; }
.hx-more__tear { position: absolute; inset: 0 0 auto; height: 0; border-top: 2px dashed var(--line-2); }
.hx-more__tear::before {
  content: ""; position: absolute; inset-inline-start: 50%; top: -9px; width: 64px; height: 16px; margin-inline-start: -32px;
  background: var(--bg);
}
.hx-loadmore { min-height: 44px; min-width: 260px; padding: 0 22px; border-radius: 10px; font-size: 14px; box-shadow: var(--shadow-plate), 0 6px 14px -10px rgba(0, 0, 0, .4); }
.hx-loadmore:hover { transform: translateY(-1px); }
.hx-loadmore.is-busy svg.icon { animation: hx-bob .8s ease-in-out infinite; }
.hx-more__note { font-size: 12px; color: var(--ink-3); }
.hx-more.is-end { padding-top: 14px; }
.hx-more.is-end .hx-more__tear { border-top-style: solid; border-top-width: 1px; }
.hx-more.is-end .hx-more__tear::before { display: none; }
.hx-more.is-end .hx-more__note { display: inline-flex; align-items: center; gap: 10px; font: 700 15px/1 var(--font-display); letter-spacing: .06em; color: var(--ink-3); }
.hx-more.is-end .hx-more__note::before, .hx-more.is-end .hx-more__note::after { content: "◆"; font-size: 7px; color: var(--line-2); }

/* ================================================================ responsive */
/* wide: the counters sit in a recessed panel beside the number, the strip runs under it */
@media (min-width: 1100px) {
  .hx-hero__info {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 28px; row-gap: 12px; align-content: start;
    grid-template-areas: "eye facts" "num facts" "place facts" "cycle facts" "foot foot";
  }
  .hx-hero__eyebrow { grid-area: eye; }
  .hx-num { grid-area: num; }
  .hx-place { grid-area: place; }
  .hx-cycle { grid-area: cycle; }
  .hx-hero__foot { grid-area: foot; padding-top: 12px; border-top: 1px solid var(--line); }
  .hx-facts {
    grid-area: facts; align-self: center; margin: 0; padding: 16px 20px 14px; border-radius: 10px;
    background: var(--plate-2); box-shadow: 0 0 0 1px var(--line) inset, 0 2px 5px rgba(0, 0, 0, .06) inset;
  }
  .hx-fact { padding: 0 20px; }
  .hx-fact dd b { font-size: 54px; }
}
@media (max-width: 1240px) {
  .hx-cols { grid-template-columns: minmax(0, 1fr) 280px; }
}

/* log: below 1100px the ledger turns into stacked logbook entries */
@media (max-width: 1099px) {
  .hx-ledger { background: transparent; box-shadow: none; }
  .hx-lt, .hx-lt tbody { display: block; width: 100%; }
  .hx-lt thead { display: none; }
  .hx-lt tbody { display: grid; gap: 10px; }
  .hx-lt tr.hx-row {
    position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px;
    padding: 12px 14px 12px; border-radius: 10px; background: var(--plate); box-shadow: var(--shadow-plate);
  }
  .hx-lt tr.hx-row:hover { background: var(--plate); }
  .hx-lt tr.hx-row.is-exc { background: color-mix(in srgb, var(--signal) 6%, var(--plate)); padding-top: 16px; }
  .hx-lt tr.hx-row.is-exc > td { padding-top: 0; }
  .hx-row.hazard::after { border-radius: 10px 10px 0 0; }
  .hx-lt tr.hx-row > td { display: block; padding: 0; border: 0; min-width: 0; }
  .hx-lt tr.hx-row > td.c-act { grid-column: 1; grid-row: 1; }
  .hx-lt tr.hx-row > td.c-time { grid-column: 2; grid-row: 1; text-align: end; }
  .hx-lt tr.hx-row > td.c-time .hx-time { font-size: 12px; }
  .hx-lt tr.hx-row > td.c-time .hx-newtag { display: flex; width: fit-content; margin-inline-start: auto; }
  .hx-lt tr.hx-row > td.c-cards { grid-column: 1 / -1; margin-top: 10px; padding: 10px 0 0; border-top: 1px dashed var(--line-2); }
  .hx-lt tr.hx-row > td.c-co { grid-column: 1 / -1; margin-top: 10px; display: flex; flex-wrap: wrap; gap: 4px 16px; }
  .hx-lt tr.hx-row > td.c-co .hx-person { display: inline-flex; align-items: baseline; gap: 6px; margin: 0; }
  .hx-lt tr.hx-row > td.c-note { grid-column: 1 / -1; margin-top: 10px; order: 1; }
  .hx-lt tr.hx-row > td.c-by, .hx-lt tr.hx-row > td.c-form { order: 2; }
  .hx-lt tr.hx-row > td.c-by { grid-column: 1; margin-top: 10px; align-self: center; display: flex; align-items: baseline; gap: 6px; }
  .hx-lt tr.hx-row > td.c-form { grid-column: 2; margin-top: 10px; justify-self: end; display: flex; gap: 6px; }
  .hx-lt tr.hx-row > td.is-blank { display: none; }
  .hx-lt tr.hx-row > td.c-by:has(+ td.c-form.is-blank) { grid-column: 1 / -1; }
  .hx-lbl--phone { display: inline; }
  .hx-lt tr.hx-emptyrow, .hx-lt tr.hx-emptyrow > td { display: block; }
  .hx-lt tr.hx-emptyrow { background: var(--plate); border-radius: 10px; box-shadow: var(--shadow-plate); }
  .hx-lt tr.hx-skrow > td { display: block; padding: 0; border: 0; }
  .hx-lt tr.hx-skrow td.c-co, .hx-lt tr.hx-skrow td.c-by, .hx-lt tr.hx-skrow td.c-form, .hx-lt tr.hx-skrow td.c-note { display: none; }
  .hx-lt tr.hx-skrow td.c-cards { grid-column: 1 / -1; margin-top: 12px; }
  .hx-part { display: flex; align-items: center; gap: 6px 8px; flex-wrap: wrap; }
  .hx-part__l { flex: none; }
}

@media (max-width: 1100px) {
  .hx-cols { grid-template-columns: minmax(0, 1fr); }
  .hx-side { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .hx-side__note { grid-column: 1 / -1; }
  .hx-find__head { grid-template-columns: minmax(0, 1fr); }
  .hx-find__count { grid-column: 1; }
}

@media (max-width: 899px) {
  /* toolbar: search + exceptions + a "סינון" toggle; the rest folds away */
  .hx-loghead { margin-bottom: 12px; }
  .hx-loghead .display { font-size: 32px; }
  .hx-live { margin-inline-start: 0; height: 26px; }
  .hx-tools { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; padding: 8px; }
  .hx-tools__main { display: flex; gap: 6px; align-items: center; }
  .hx-tools__search { flex: 1 1 auto; }
  .hx-excbtn { padding: 0 10px; font-size: 0; gap: 0; }
  .hx-excbtn::after { content: "חריגות"; font-size: 12.5px; margin-inline-start: 6px; }
  .hx-tools__toggle { display: inline-flex; height: 40px; padding: 0 10px; gap: 5px; }
  .hx-tools__toggle > svg.icon:first-child { display: none; }
  .hx-tools__toggle > svg.icon:last-child { width: 15px; height: 15px; transition: transform .25s var(--ease); }
  .hx-tools.is-open .hx-tools__toggle > svg.icon:last-child { transform: rotate(180deg); }
  .hx-tools__more { display: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 10px 2px 2px; }
  .hx-tools.is-open .hx-tools__more { display: grid; animation: hx-in .22s var(--ease); }
  .hx-tools__reset { justify-self: start; margin-top: 6px; }
  .hx-tools__f { min-width: 0; }
  .hx-countline { margin-bottom: 8px; }
  .hx-loadmore { min-width: 0; width: 100%; }

  /* card file hero: card beside the number, strip + facts full width */
  .hx-hero { grid-template-columns: 104px minmax(0, 1fr); gap: 12px 14px; padding: 14px 14px 14px; }
  .hx-hero__info { display: contents; }
  .hx-hero__niche { grid-column: 1; grid-row: 1 / span 3; min-height: 0; padding: 10px 0 12px; align-self: start; }
  .hx-hang { --cw: 80px; --ch: 127px; }
  .hx-hang__pin.pin { width: 10px; height: 10px; margin-left: -5px; top: calc(var(--cw) * .138 - 5px); }
  .hx-hang .stamp { font-size: 19px; }
  .hx-hero__eyebrow, .hx-num, .hx-place { grid-column: 2; position: relative; z-index: 1; }
  .hx-hero__eyebrow { align-self: end; gap: 4px 8px; font-size: 10.5px; }
  .hx-num { font-size: 30px; align-self: center; }
  .hx-place { align-self: start; gap: 6px 8px; }
  .hx-place__l { display: none; }
  .hx-nameplate { font-size: 14px; min-height: 30px; padding: 3px 18px 2px; }
  .hx-place__sub { font-size: 12px; }
  .hx-cycle, .hx-facts, .hx-hero__foot { grid-column: 1 / -1; position: relative; z-index: 1; }
  .hx-cycle { max-width: none; margin-top: 2px; padding: 10px 2px 2px; border-top: 1px solid var(--line); }
  .hx-cycle li { font-size: 11px; }
  .hx-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 10px 0 0; border-top: 1px solid var(--line); }
  .hx-fact { padding: 0 10px; }
  .hx-fact dt { font-size: 11px; white-space: normal; }
  .hx-fact dd b { font-size: 36px; }
  .hx-fact dd span { font-size: 12px; }
  .hx-hero__foot { padding-top: 0; }
  .hx-hero__since { width: 100%; margin: 0; }
  .hx-hero__foot .btn { flex: 1 1 0; }

  .hx-book { padding: 12px 10px 12px; }
  .hx-book__head .display { font-size: 23px; }
  .hx-tl { padding: 10px 8px 14px 8px; margin-inline: -2px; }
  .hx-tl > li::before { inset-inline-start: 14px; }
  .hx-day { padding-inline-start: 34px; }
  .hx-day::after { inset-inline-start: 9px; }
  .hx-ev { grid-template-columns: 28px minmax(0, 1fr); gap: 8px; }
  .hx-ev__dot { width: 28px; height: 28px; border-radius: 7px; }
  .hx-ev__dot svg.icon { width: 15px; height: 15px; }
  .hx-ev__card { padding: 9px 11px 11px; }
  .hx-ev__verb { font-size: 14px; }
  .hx-who { font-size: 12.5px; gap: 3px 12px; }
  .hx-fixnote { margin-inline-end: 0; margin-bottom: 26px; }
  .hx-ev__card > .stamp { bottom: 8px; inset-inline-end: 10px; font-size: 18px; }
  .hx-side { grid-template-columns: minmax(0, 1fr); }

  .hx-tabs { padding-inline: 8px; }
  .hx-tab { min-width: 0; flex: 1 1 0; padding: 8px 12px 9px; }
  .hx-tab[aria-selected="true"] { padding-bottom: 12px; }
  .hx-tab__n { font-size: 20px; }

  .hx-find__head { padding: 16px 14px 14px; gap: 10px; }
  .hx-find__intro .display { font-size: 27px; }
  .hx-find__form { flex-wrap: wrap; }
  .input.hx-find__input { height: 54px; font-size: 22px; }
  .hx-find__go { min-height: 48px; flex: 1 1 100%; }
  .hx-find__board { --cw: 54px; --ch: 85px; padding: 12px 10px 16px; background-size: 12px 12px; }
  .hx-find__pegs { gap: 22px 10px; justify-content: flex-start; }
  .hx-find__card .pin { width: 7px; height: 7px; margin-left: -3.5px; top: calc(var(--cw) * .138 - 3.5px); }
  .hx-find__where { font-size: 10.5px; }
  dialog.hx-photo { width: 100%; }
  .hx-photo__board { padding: 22px 16px 20px; }
  .hx-photo__img { max-width: calc(100vw - 72px); max-height: 56vh; }
  .hx-photo__sk { height: 240px; }
}
@media (max-width: 380px) {
  .hx-hero { grid-template-columns: 92px minmax(0, 1fr); }
  .hx-hang { --cw: 72px; --ch: 114px; }
  .hx-num { font-size: 26px; }
}

/* ================================================================ motion */
@keyframes hx-swing { 0% { transform: rotate(7deg); } 22% { transform: rotate(-5deg); } 44% { transform: rotate(3deg); } 64% { transform: rotate(-1.4deg); } 82% { transform: rotate(.5deg); } 100% { transform: rotate(0); } }
@keyframes hx-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes hx-nudge { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
@keyframes hx-beacon { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--amber) 55%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes hx-glow-row { 0%, 55% { background-color: color-mix(in srgb, var(--amber) 16%, transparent); } 100% { background-color: transparent; } }
@keyframes hx-glow-card { 0%, 55% { box-shadow: var(--shadow-card), 0 0 0 2px var(--amber), 0 0 18px -2px color-mix(in srgb, var(--amber) 60%, transparent); } 100% { box-shadow: var(--shadow-card); } }
@keyframes hx-bob { 50% { transform: translateY(3px); } }

@media (prefers-reduced-motion: reduce) {
  .hx-hang.is-swing, .hx-find__hang, .hx-cycle li.is-now .hx-cycle__node { animation: none; }
  .hx-find__hang:hover .hx-find__card, a.hx-mc:hover, .hx-slip:hover, .hx-ref:hover { transform: none; }
  .hx-row.is-new > td { animation: none; background-color: color-mix(in srgb, var(--amber) 12%, transparent); }
  .hx-ev.is-new .hx-ev__card { animation: none; box-shadow: var(--shadow-card), 0 0 0 2px var(--amber); }
}

/* a run of routine counts, collapsed */
.hx-ev.is-run .hx-ev__card { background-image: none; gap: 6px; }
.hx-ev.is-run .hx-ev__verb { font-size: 14px; font-weight: 600; }
.hx-ev.is-run .hx-ev__refs .hx-ref { min-height: 24px; padding: 0 7px; font-family: var(--font-mono); }
.hx-ev__more { font-size: 12px; color: var(--ink-3); font-weight: 600; }
