/* Design: the Artist's order-tracking pack (2026-12-01). Past orders carry no date: only number, percent and status. */
/* H.G.H. customer order tracking — colours and type only from the house palette.
   No gold, cyan, green, purple or blue. Amber is reserved for assumptions and is
   not used on this page. Progress width is set with [data-pct], never inline styles. */

:root {
  --bg: #12100c;
  --panel: #1c1a15;
  --line: #2c2820;
  --tx: #f2ede4;
  --mut: #a89f8d;
  --grey: #8a8376;
  --o: #e8792b;
  --r: #d64545;
  --font: "Inter", "Segoe UI", system-ui, sans-serif;
  --pad: 22px;
  --max: 32rem;
  --radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--tx);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(232, 121, 43, 0.08), transparent 9rem),
    var(--bg);
}

.page {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px var(--pad) 40px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* ----- Header ----- */

.top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.emblem {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  color: var(--o);
  display: block;
}

.brand-text { min-width: 0; }

.org {
  margin: 0;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--o);
}

h1 {
  margin: 1px 0 0;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--tx);
}

.ex {
  margin: 4px 0 0;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey);
  flex: 0 0 auto;
}

/* ----- Message (loading, missing code, inactive, error) ----- */

#msg {
  margin: 0;
  padding: 22px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--tx);
}

#msg[hidden],
#order[hidden],
#orders[hidden],
#stale[hidden],
#more[hidden] { display: none !important; }

body[data-kind="error"] #msg {
  border-color: #3a2420;
  border-left: 3px solid var(--r);
  font-size: 1.125rem;
  font-weight: 600;
}

body[data-kind="error"] #msg .detail {
  display: block;
  margin-top: 8px;
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--mut);
}

body[data-kind="loading"] #msg {
  color: var(--mut);
  font-weight: 400;
}

/* ----- Hero order ----- */

#order {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px 20px;
}

.k {
  margin: 0;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mut);
}

#ref {
  margin: 4px 0 0;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--tx);
  font-variant-numeric: tabular-nums;
}

#pct {
  margin: 18px 0 10px;
  font-size: clamp(3.5rem, 18vw, 5rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: var(--o);
  font-variant-numeric: tabular-nums;
}

#pct.is-unknown {
  color: var(--grey);
  letter-spacing: 0;
  font-weight: 400;
  font-size: 2.5rem;
  line-height: 1;
  min-height: 3rem;
  display: flex;
  align-items: flex-end;
}

#pct .unit {
  font-size: 0.42em;
  font-weight: 600;
  letter-spacing: 0;
  margin-left: 0.08em;
  color: var(--o);
}

#pct.is-unknown .unit { display: none; }

/* Progress bar. Width comes from [data-pct="n"] rules at the end of this file. */

#bar {
  position: relative;
  height: 10px;
  margin: 4px 0 22px;
  border-radius: 999px;
}

#bar .track,
#fill,
#bar .start {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: inherit;
}

#bar .track {
  right: 0;
  background: #2a2620;
}

#fill {
  width: 0;
  background: var(--o);
  z-index: 1;
}

#bar .start {
  width: 10px;
  z-index: 2;
  background: var(--o);
  box-shadow: 0 0 0 3px rgba(232, 121, 43, 0.22);
}

#bar[data-pct="unknown"] .start,
#bar[data-pct="unknown"] #fill { display: none; }

#bar[data-pct="unknown"] .track {
  background: repeating-linear-gradient(
    90deg,
    #2a2620 0 8px,
    #12100c 8px 14px
  );
}

/* Early (0–2%): the start marker is the readable cue, plus a calm pulse. */
body[data-early] #bar .start {
  animation: pip 1.8s ease-in-out infinite;
}

@keyframes pip {
  0%, 100% { box-shadow: 0 0 0 3px rgba(232, 121, 43, 0.18); }
  50% { box-shadow: 0 0 0 6px rgba(232, 121, 43, 0.36); }
}

body[data-kind="loading"] #msg {
  position: relative;
  padding-bottom: 36px;
}

body[data-kind="loading"] #msg::after {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 16px;
  height: 10px;
  border-radius: 999px;
  background-color: #2a2620;
  background-image: linear-gradient(90deg, transparent, rgba(232, 121, 43, 0.5), transparent);
  background-size: 40% 100%;
  background-repeat: no-repeat;
  animation: sweep 1.6s ease-in-out infinite;
}

@keyframes sweep {
  0% { background-position: -40% 0; }
  100% { background-position: 140% 0; }
}

@media (prefers-reduced-motion: reduce) {
  body[data-early] #bar .start { animation: none; }
  body[data-kind="loading"] #msg::after {
    animation: none;
    background-image: none;
    background-color: #2a2620;
  }
}

/* Frozen mid-frames when screenshots add body.is-shot (no inline styles). */
body.is-shot[data-kind="loading"] #msg::after {
  animation: none;
  background-position: 30% 0;
}

body.is-shot[data-early] #bar .start {
  animation: none;
  box-shadow: 0 0 0 6px rgba(232, 121, 43, 0.36);
}

/* ----- Stepper ----- */

.steps {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  position: relative;
}

.steps::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 6px;
  height: 1px;
  background: var(--line);
  z-index: 0;
}

.steps li {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  text-align: center;
  font-size: 0.6875rem;
  letter-spacing: 0.01em;
  color: var(--grey);
  line-height: 1.25;
}

.steps li::before {
  content: "";
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--line);
  box-sizing: border-box;
}

.steps li.is-done { color: var(--mut); }
.steps li.is-done::before {
  background: var(--o);
  border-color: var(--o);
}

.steps li.is-current {
  color: var(--tx);
  font-weight: 650;
}

.steps li.is-current::before {
  background: var(--o);
  border-color: var(--o);
  box-shadow: 0 0 0 3px rgba(232, 121, 43, 0.22);
}

.steps .long,
.steps .short { display: none; }

@media (min-width: 640px) {
  .steps li { font-size: 0.75rem; }
  .steps .short { display: none; }
  .steps .long {
    display: block;
    min-height: 2.5em;
    padding: 0 4px;
    max-width: 100%;
  }
}

/* ----- Status + updated ----- */

.meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.meta dt {
  margin: 0 0 3px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mut);
}

.meta dd {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--tx);
}

.meta.price { grid-template-columns: 1fr; margin-top: 16px; }

/* What you ordered: folded until tapped */
#what { margin-top: 16px; border-top: 1px solid var(--line); }
#what[hidden] { display: none; }
#what summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 48px;
  font-weight: 600;
}
#what summary::-webkit-details-marker { display: none; }
#what summary::after { content: "Show"; color: var(--o); font-size: 0.875rem; }
#what[open] summary::after { content: "Hide"; }
#what summary:focus-visible { outline: 2px solid var(--o); outline-offset: 2px; }
#items { list-style: none; margin: 0; padding: 0; }
#items li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
}
#items em { font-style: normal; color: var(--mut); white-space: nowrap; font-variant-numeric: tabular-nums; }

#stale {
  margin: 16px 0 0;
  padding: 12px 14px;
  background: #16140f;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.9375rem;
  color: var(--mut);
  line-height: 1.45;
}

/* ----- Your orders ----- */

#orders {
  margin-top: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 0 10px;
}

#orders h2 {
  margin: 0;
  padding: 10px 20px 8px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mut);
}

#order-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

#order-list li { margin: 0; }

#order-list button {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "ref pct"
    "st  up";
  column-gap: 12px;
  row-gap: 2px;
  width: 100%;
  margin: 0;
  padding: 12px 20px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  min-height: 52px;
  border-radius: 0;
}

#order-list button:hover,
#order-list button:focus-visible {
  background: #221f19;
  outline: none;
}

#order-list button:focus-visible {
  box-shadow: inset 0 0 0 2px var(--o);
}

#order-list .r-ref {
  grid-area: ref;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--tx);
}

#order-list .r-pct {
  grid-area: pct;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--o);
  text-align: right;
}

#order-list .r-pct.is-unknown { color: var(--grey); }

#order-list .r-st {
  grid-area: st;
  font-size: 0.875rem;
  color: var(--mut);
}

#order-list .r-up {
  grid-area: up;
  font-size: 0.875rem;
  color: var(--mut);
  text-align: right;
}

#order-list button[aria-current="true"] {
  box-shadow: inset 3px 0 0 var(--o);
  background: #201c16;
}

#order-list li.is-extra { display: none; }
#orders.is-open li.is-extra { display: block; }

#more {
  display: block;
  width: calc(100% - 24px);
  margin: 8px 12px 2px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--tx);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
}

#more:hover,
#more:focus-visible {
  border-color: var(--o);
  color: var(--o);
  outline: none;
}

/* ----- Footer ----- */

footer {
  margin-top: auto;
  padding-top: 8px;
}

footer p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--grey);
  line-height: 1.5;
}

/* ----- Desktop ----- */

@media (min-width: 800px) {
  :root { --pad: 28px; }
  body {
    background:
      linear-gradient(180deg, rgba(232, 121, 43, 0.07), transparent 12rem),
      var(--bg);
  }
  .page { padding: 48px var(--pad) 56px; gap: 26px; }
  .emblem { width: 48px; height: 48px; }
  h1 { font-size: 1.25rem; }
  #order { padding: 26px 26px 22px; }
  #orders { padding-top: 10px; }
  #orders h2,
  #order-list button { padding-left: 26px; padding-right: 26px; }
}

/* Focus for keyboard users on the Try again control, if present. */
#msg button {
  display: inline-block;
  margin-top: 14px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--o);
  border-radius: 8px;
  background: transparent;
  color: var(--tx);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

#msg button:focus-visible,
#msg button:hover {
  background: rgba(232, 121, 43, 0.12);
  outline: none;
}

/* Progress fill widths: one rule per percent, so width is never an inline style. */
#bar[data-pct="0"] #fill { width: 0%; }
#bar[data-pct="1"] #fill { width: 1%; }
#bar[data-pct="2"] #fill { width: 2%; }
#bar[data-pct="3"] #fill { width: 3%; }
#bar[data-pct="4"] #fill { width: 4%; }
#bar[data-pct="5"] #fill { width: 5%; }
#bar[data-pct="6"] #fill { width: 6%; }
#bar[data-pct="7"] #fill { width: 7%; }
#bar[data-pct="8"] #fill { width: 8%; }
#bar[data-pct="9"] #fill { width: 9%; }
#bar[data-pct="10"] #fill { width: 10%; }
#bar[data-pct="11"] #fill { width: 11%; }
#bar[data-pct="12"] #fill { width: 12%; }
#bar[data-pct="13"] #fill { width: 13%; }
#bar[data-pct="14"] #fill { width: 14%; }
#bar[data-pct="15"] #fill { width: 15%; }
#bar[data-pct="16"] #fill { width: 16%; }
#bar[data-pct="17"] #fill { width: 17%; }
#bar[data-pct="18"] #fill { width: 18%; }
#bar[data-pct="19"] #fill { width: 19%; }
#bar[data-pct="20"] #fill { width: 20%; }
#bar[data-pct="21"] #fill { width: 21%; }
#bar[data-pct="22"] #fill { width: 22%; }
#bar[data-pct="23"] #fill { width: 23%; }
#bar[data-pct="24"] #fill { width: 24%; }
#bar[data-pct="25"] #fill { width: 25%; }
#bar[data-pct="26"] #fill { width: 26%; }
#bar[data-pct="27"] #fill { width: 27%; }
#bar[data-pct="28"] #fill { width: 28%; }
#bar[data-pct="29"] #fill { width: 29%; }
#bar[data-pct="30"] #fill { width: 30%; }
#bar[data-pct="31"] #fill { width: 31%; }
#bar[data-pct="32"] #fill { width: 32%; }
#bar[data-pct="33"] #fill { width: 33%; }
#bar[data-pct="34"] #fill { width: 34%; }
#bar[data-pct="35"] #fill { width: 35%; }
#bar[data-pct="36"] #fill { width: 36%; }
#bar[data-pct="37"] #fill { width: 37%; }
#bar[data-pct="38"] #fill { width: 38%; }
#bar[data-pct="39"] #fill { width: 39%; }
#bar[data-pct="40"] #fill { width: 40%; }
#bar[data-pct="41"] #fill { width: 41%; }
#bar[data-pct="42"] #fill { width: 42%; }
#bar[data-pct="43"] #fill { width: 43%; }
#bar[data-pct="44"] #fill { width: 44%; }
#bar[data-pct="45"] #fill { width: 45%; }
#bar[data-pct="46"] #fill { width: 46%; }
#bar[data-pct="47"] #fill { width: 47%; }
#bar[data-pct="48"] #fill { width: 48%; }
#bar[data-pct="49"] #fill { width: 49%; }
#bar[data-pct="50"] #fill { width: 50%; }
#bar[data-pct="51"] #fill { width: 51%; }
#bar[data-pct="52"] #fill { width: 52%; }
#bar[data-pct="53"] #fill { width: 53%; }
#bar[data-pct="54"] #fill { width: 54%; }
#bar[data-pct="55"] #fill { width: 55%; }
#bar[data-pct="56"] #fill { width: 56%; }
#bar[data-pct="57"] #fill { width: 57%; }
#bar[data-pct="58"] #fill { width: 58%; }
#bar[data-pct="59"] #fill { width: 59%; }
#bar[data-pct="60"] #fill { width: 60%; }
#bar[data-pct="61"] #fill { width: 61%; }
#bar[data-pct="62"] #fill { width: 62%; }
#bar[data-pct="63"] #fill { width: 63%; }
#bar[data-pct="64"] #fill { width: 64%; }
#bar[data-pct="65"] #fill { width: 65%; }
#bar[data-pct="66"] #fill { width: 66%; }
#bar[data-pct="67"] #fill { width: 67%; }
#bar[data-pct="68"] #fill { width: 68%; }
#bar[data-pct="69"] #fill { width: 69%; }
#bar[data-pct="70"] #fill { width: 70%; }
#bar[data-pct="71"] #fill { width: 71%; }
#bar[data-pct="72"] #fill { width: 72%; }
#bar[data-pct="73"] #fill { width: 73%; }
#bar[data-pct="74"] #fill { width: 74%; }
#bar[data-pct="75"] #fill { width: 75%; }
#bar[data-pct="76"] #fill { width: 76%; }
#bar[data-pct="77"] #fill { width: 77%; }
#bar[data-pct="78"] #fill { width: 78%; }
#bar[data-pct="79"] #fill { width: 79%; }
#bar[data-pct="80"] #fill { width: 80%; }
#bar[data-pct="81"] #fill { width: 81%; }
#bar[data-pct="82"] #fill { width: 82%; }
#bar[data-pct="83"] #fill { width: 83%; }
#bar[data-pct="84"] #fill { width: 84%; }
#bar[data-pct="85"] #fill { width: 85%; }
#bar[data-pct="86"] #fill { width: 86%; }
#bar[data-pct="87"] #fill { width: 87%; }
#bar[data-pct="88"] #fill { width: 88%; }
#bar[data-pct="89"] #fill { width: 89%; }
#bar[data-pct="90"] #fill { width: 90%; }
#bar[data-pct="91"] #fill { width: 91%; }
#bar[data-pct="92"] #fill { width: 92%; }
#bar[data-pct="93"] #fill { width: 93%; }
#bar[data-pct="94"] #fill { width: 94%; }
#bar[data-pct="95"] #fill { width: 95%; }
#bar[data-pct="96"] #fill { width: 96%; }
#bar[data-pct="97"] #fill { width: 97%; }
#bar[data-pct="98"] #fill { width: 98%; }
#bar[data-pct="99"] #fill { width: 99%; }
#bar[data-pct="100"] #fill { width: 100%; }
