/* Haul Tag Board — orders (Cautionfield Market / Ovasta Seeds)
   Asphalt HAUL BOARD mast · wire-hung shipping tags · chevron status · tear tag.
   UI fixes: hang gap, clip-path eating shadow, locked count, cancelled mute,
   mobile stub/eyelet, stage rhythm under Yard Stake Rail.
   Replaces Work Order Rack. Avoids Exposure / Flipboard / Dendro / Franking /
   Strikebook / Player Roll / Semaphore / Spine / Firing / Log Scroll / Chrono. */

.page-a99-haultag {
  --ht-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ht-hang: 14px;
  scroll-padding-top: calc(var(--cf-nav-h, 110px) + 24px);
  background:
    radial-gradient(ellipse 90% 40% at 50% 0%, rgba(18, 21, 26, 0.08), transparent 55%),
    linear-gradient(180deg, #c5ced6 0%, var(--cf-field) 38%, #d8e0e6 100%);
}

.page-a99-haultag .ht-main { padding-bottom: var(--cf-space-6); }

/* —— Mast —— */
.page-a99-haultag .ht-mast {
  position: relative;
  background:
    linear-gradient(180deg, #1a1f24 0%, var(--cf-asphalt) 55%, #0c0f12 100%);
  color: #fff;
  overflow: hidden;
  padding-bottom: 32px;
}
.page-a99-haultag .ht-mast-hazard {
  height: 10px;
  background: repeating-linear-gradient(
    -45deg,
    var(--cf-signal) 0 12px,
    var(--cf-asphalt) 12px 24px
  );
  border-bottom: 3px solid #000;
}
.page-a99-haultag .ht-mast-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(28px, 5vw, 48px) 0 18px;
}
.page-a99-haultag .ht-kicker {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cf-tape);
}
.page-a99-haultag .ht-stencil {
  margin: 0 0 8px;
  font-family: var(--cf-font-display);
  font-size: clamp(1.1rem, 3vw, 1.45rem);
  font-weight: 400;
  letter-spacing: 0.16em;
  color: var(--cf-signal);
  text-shadow: 2px 2px 0 #000;
  opacity: 0;
  transform: translateY(8px) skewX(-4deg);
  animation: htStencilIn 520ms var(--ht-ease) 60ms forwards;
}
.page-a99-haultag .ht-mast h1 {
  margin: 0 0 10px;
  font-family: var(--cf-font-display);
  font-size: clamp(1.8rem, 4.5vw, 2.7rem);
  font-weight: 400;
  line-height: 1.05;
  color: #fff;
}
.page-a99-haultag .ht-lede {
  margin: 0;
  max-width: 40rem;
  color: var(--cf-soft-on-dark);
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.45;
}
.page-a99-haultag .ht-count {
  min-width: 88px;
  padding: 12px 14px;
  text-align: center;
  background: #0B5C3A;
  border: 3px solid #fff;
  box-shadow: 0 0 0 3px #0B5C3A, 4px 4px 0 #000;
  transform: rotate(-2deg);
}
.page-a99-haultag .ht-count em {
  display: block;
  font-style: normal;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.7);
}
.page-a99-haultag .ht-count strong {
  display: block;
  margin-top: 2px;
  font-family: var(--cf-font-display);
  font-size: 2rem;
  line-height: 1;
  color: #fff;
}
.page-a99-haultag .ht-mast-dash {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  height: 5px;
  background: repeating-linear-gradient(
    90deg,
    var(--cf-signal) 0 22px,
    transparent 22px 40px
  );
  opacity: 0.85;
  pointer-events: none;
}

.page-a99-haultag .ht-stage { padding-top: var(--cf-space-4); }
.page-a99-haultag .ht-loading { margin-bottom: var(--cf-space-3); }

/* Gate / empty */
.page-a99-haultag .ht-gate,
.page-a99-haultag .ht-empty {
  padding: 28px 22px;
  background: var(--cf-surface);
  border: 3px solid var(--cf-asphalt);
  box-shadow: 5px 5px 0 var(--cf-asphalt);
  max-width: 520px;
}
.page-a99-haultag .ht-gate h2,
.page-a99-haultag .ht-empty h2 {
  margin: 0 0 8px;
  font-family: var(--cf-font-display);
  font-size: 1.5rem;
  font-weight: 400;
}
.page-a99-haultag .ht-gate p,
.page-a99-haultag .ht-empty p {
  margin: 0 0 16px;
  color: var(--cf-mute);
  line-height: 1.45;
}
.page-a99-haultag .ht-boom {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 12px 16px;
  border: 3px solid #000;
  background: var(--cf-cone);
  color: var(--cf-on-cone);
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 4px 4px 0 var(--cf-signal);
  transition: transform 180ms var(--ht-ease), box-shadow 180ms ease;
}
.page-a99-haultag .ht-boom:hover,
.page-a99-haultag .ht-boom:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--cf-signal);
  outline: none;
}
.page-a99-haultag .ht-boom-arm {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 230, 0, 0.5) 50%, transparent 58%);
  transform: translateX(-120%);
  transition: transform 420ms ease;
  z-index: 0;
}
.page-a99-haultag .ht-boom:hover .ht-boom-arm { transform: translateX(120%); }
.page-a99-haultag .ht-boom-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.page-a99-haultag .ht-boom-copy em {
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.85;
}
.page-a99-haultag .ht-boom-copy strong {
  font-family: var(--cf-font-display);
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.1;
}
.page-a99-haultag .ht-boom-chev {
  position: relative;
  z-index: 1;
  font-size: 1.3rem;
  font-weight: 800;
}
.page-a99-haultag .ht-exit {
  display: inline-block;
  margin-top: 14px;
  color: var(--cf-text-tape);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.page-a99-haultag .ht-exit:hover {
  color: var(--cf-text-cone);
  border-bottom-color: var(--cf-cone);
}

/* Wire head */
.page-a99-haultag .ht-wire-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.page-a99-haultag .ht-wire-tag {
  display: inline-block;
  margin-bottom: 4px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cf-text-cone);
}
.page-a99-haultag .ht-wire-head h2 {
  margin: 0;
  font-family: var(--cf-font-display);
  font-size: 1.45rem;
  font-weight: 400;
  color: var(--cf-ink);
}
.page-a99-haultag .ht-wire-code {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--cf-mute);
  padding: 6px 10px;
  border: 2px solid var(--cf-asphalt);
  background: var(--cf-surface);
}
.page-a99-haultag .ht-wire {
  position: relative;
  z-index: 3;
  height: 10px;
  margin-bottom: 0;
  background: linear-gradient(180deg, #8a9098 0%, #3a424a 45%, #1a1e22 100%);
  border: 2px solid #000;
  border-radius: 5px;
  box-shadow:
    0 5px 0 rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Tag list — hung from the wire */
.page-a99-haultag .ht-list {
  display: grid;
  gap: 28px;
  padding-top: var(--ht-hang);
}
.page-a99-haultag .ht-tag {
  position: relative;
  display: grid;
  grid-template-columns: 92px 1fr;
  background: var(--cf-field-warm);
  border: 3px solid #000;
  box-shadow: 5px 5px 0 var(--cf-asphalt);
  overflow: visible;
  opacity: 0;
  transform: translateY(-18px);
  animation: htTagIn 480ms var(--ht-ease) forwards;
  animation-delay: calc(70ms + var(--ht-i, 0) * 60ms);
}
/* Hang cord from wire into eyelet */
.page-a99-haultag .ht-tag::before {
  content: "";
  position: absolute;
  left: 43px;
  top: calc(var(--ht-hang) * -1 - 4px);
  width: 3px;
  height: calc(var(--ht-hang) + 8px);
  background: linear-gradient(180deg, #1a1e22, #5a626a);
  border-radius: 1px;
  z-index: 4;
  pointer-events: none;
}
.page-a99-haultag .ht-tag.tone-cancelled {
  background: #ebebeb;
  border-color: #555;
  box-shadow: 4px 4px 0 #555;
  filter: grayscale(0.45);
}
.page-a99-haultag .ht-tag.tone-delivered { border-color: var(--cf-ok); }
.page-a99-haultag .ht-tag.tone-shipped { border-color: var(--cf-tape-deep); }

.page-a99-haultag .ht-eyelet {
  position: absolute;
  top: -16px;
  left: 36px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--cf-field);
  border: 3px solid #000;
  box-shadow:
    inset 0 0 0 3px #6a7078,
    0 1px 0 rgba(0, 0, 0, 0.25);
  z-index: 5;
}
.page-a99-haultag .ht-stub {
  display: grid;
  place-content: center;
  gap: 2px;
  text-align: center;
  padding: 26px 8px 16px;
  background: var(--cf-asphalt);
  color: var(--cf-signal);
  border-right: 2px dashed rgba(255, 230, 0, 0.4);
  /* Chamfer only the stub — keeps tag box-shadow intact */
  clip-path: polygon(0 14px, 14px 0, 100% 0, 100% 100%, 0 100%);
}
.page-a99-haultag .ht-stub-day {
  font-family: var(--cf-font-display);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1;
  color: #fff;
}
.page-a99-haultag .ht-stub-mon {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.page-a99-haultag .ht-stub-yr {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--cf-soft-on-dark);
}
.page-a99-haultag .ht-face {
  padding: 16px 16px 14px;
  background: linear-gradient(180deg, #fffef6 0%, var(--cf-field-warm) 100%);
  min-width: 0;
}
.page-a99-haultag .ht-tag.tone-cancelled .ht-face {
  background: linear-gradient(180deg, #f4f4f4 0%, #e6e6e6 100%);
}
.page-a99-haultag .ht-face-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.page-a99-haultag .ht-status {
  display: inline-block;
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--cf-signal);
  color: var(--cf-signal-ink);
  border: 2px solid #000;
}
.page-a99-haultag .ht-tag.tone-shipped .ht-status {
  background: var(--cf-tape);
  color: var(--cf-on-tape);
}
.page-a99-haultag .ht-tag.tone-delivered .ht-status {
  background: var(--cf-ok);
  color: #fff;
  border-color: #000;
}
.page-a99-haultag .ht-tag.tone-cancelled .ht-status {
  background: var(--cf-err);
  color: #fff;
}
.page-a99-haultag .ht-face-head time {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cf-mute);
}
.page-a99-haultag .ht-id {
  margin: 0 0 10px;
  font-family: var(--cf-font-display);
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--cf-ink);
  word-break: break-word;
}
.page-a99-haultag .ht-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
  margin: 0 0 12px;
  padding: 0;
}
.page-a99-haultag .ht-meta > div {
  padding: 0 0 8px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid rgba(20, 24, 26, 0.2);
}
.page-a99-haultag .ht-meta dt {
  margin: 0 0 2px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cf-mute);
}
.page-a99-haultag .ht-meta dd {
  margin: 0;
  font-weight: 800;
  color: var(--cf-ink);
}
.page-a99-haultag .ht-items {
  margin: 0 0 12px;
  font-size: 0.88rem;
  color: var(--cf-mute);
  font-weight: 500;
  line-height: 1.4;
}

/* Chevron status track */
.page-a99-haultag .ht-chevs {
  list-style: none;
  margin: 0 0 14px;
  padding: 10px 8px 8px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  background: rgba(18, 21, 26, 0.05);
  border: 2px solid rgba(20, 24, 26, 0.18);
}
.page-a99-haultag .ht-chevs li {
  display: grid;
  gap: 4px;
  justify-items: center;
  text-align: center;
}
.page-a99-haultag .ht-chev {
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 14px solid #c5ccd2;
}
.page-a99-haultag .ht-chevs li.is-lit .ht-chev {
  border-left-color: var(--cf-cone);
}
.page-a99-haultag .ht-tag.tone-shipped .ht-chevs li.is-lit .ht-chev {
  border-left-color: var(--cf-tape-deep);
}
.page-a99-haultag .ht-tag.tone-delivered .ht-chevs li.is-lit .ht-chev {
  border-left-color: var(--cf-ok);
}
.page-a99-haultag .ht-tag.tone-cancelled .ht-chevs li.is-lit .ht-chev {
  border-left-color: var(--cf-err);
}
.page-a99-haultag .ht-chevs small {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cf-mute);
}
.page-a99-haultag .ht-chevs li.is-lit small { color: var(--cf-ink); }

.page-a99-haultag .ht-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.page-a99-haultag .ht-open {
  display: inline-block;
  padding: 8px 12px;
  background: var(--cf-asphalt);
  color: var(--cf-signal);
  font-size: 0.85rem;
  font-weight: 800;
  text-decoration: none;
  border: 2px solid #000;
}
.page-a99-haultag .ht-open:hover {
  background: var(--cf-cone);
  color: var(--cf-on-cone);
}
.page-a99-haultag .ht-tear {
  appearance: none;
  padding: 8px 12px;
  background: transparent;
  color: var(--cf-text-cone);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  border: 0;
  border-bottom: 2px solid var(--cf-cone);
  cursor: pointer;
  transition: transform 200ms ease, opacity 200ms ease;
}
.page-a99-haultag .ht-tear:hover { color: var(--cf-ink); }
.page-a99-haultag .ht-tear.is-tearing {
  transform: translateX(12px) rotate(2deg);
  opacity: 0.55;
}

@keyframes htStencilIn {
  to { opacity: 1; transform: translateY(0) skewX(-4deg); }
}
@keyframes htTagIn {
  from {
    opacity: 0;
    transform: translateY(-22px) rotate(-1.2deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }
}

@media (max-width: 640px) {
  .page-a99-haultag {
    --ht-hang: 12px;
  }
  .page-a99-haultag .ht-tag {
    grid-template-columns: 1fr;
  }
  .page-a99-haultag .ht-tag::before {
    left: 50%;
    transform: translateX(-50%);
  }
  .page-a99-haultag .ht-stub {
    grid-template-columns: auto auto auto;
    justify-content: center;
    gap: 10px;
    padding: 18px 14px 12px;
    border-right: 0;
    border-bottom: 2px dashed rgba(255, 230, 0, 0.4);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
  .page-a99-haultag .ht-stub-day {
    font-size: 1.65rem;
  }
  .page-a99-haultag .ht-eyelet {
    left: 50%;
    transform: translateX(-50%);
    top: -14px;
  }
  .page-a99-haultag .ht-meta {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .page-a99-haultag .ht-chevs {
    gap: 4px;
    padding: 8px 4px 6px;
  }
  .page-a99-haultag .ht-mast-inner {
    align-items: flex-start;
  }
  .page-a99-haultag .ht-count {
    transform: rotate(-1deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-a99-haultag .ht-stencil,
  .page-a99-haultag .ht-tag,
  .page-a99-haultag .ht-boom,
  .page-a99-haultag .ht-tear {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
