@font-face {
  font-family: Instrument Sans;
  src: url("../assets/brand/InstrumentSans-Variable.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --blue: #2117f4;
  --ink: #17154a;
  --paper: #fffcf3;
  --acid: #eeff60;
  --line: #ffffff60;
  color: var(--paper);
  background: var(--blue);
  font: 1rem/1.45 "Instrument Sans", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.site-header, main, footer {
  width: min(100% - clamp(2rem, 11vw, 11rem), 75rem);
  margin-inline: auto;
}
.site-header, footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem 1.25rem;
  padding-block: 1.15rem;
}
.site-header { border-bottom: 1px solid var(--line); }
.brand {
  color: var(--paper);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.055em;
  word-spacing: .06em;
  text-decoration: none;
}
.shop-link, .history-actions button, .order-toggle, .order-document {
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: .83rem;
  font-weight: 650;
}
.shop-link { padding: .62rem 1rem; text-decoration: none; }
.shop-link:hover, .history-actions button:hover { color: var(--blue); background: var(--paper); }
main { padding-block: clamp(2.2rem, 5vw, 4.7rem) 2rem; }
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: clamp(1.45rem, 3.65vw, 3rem);
}
h1 {
  font-size: clamp(3.35rem, 10.8vw, 9.4rem);
  font-weight: 700;
  line-height: .84;
  letter-spacing: -.062em;
  word-spacing: .045em;
  margin: 0 0 .11em -.06em;
}
.order-count {
  min-width: 3.2rem;
  min-height: 3.2rem;
  display: grid;
  place-items: center;
  align-self: end;
  margin-bottom: .9rem;
  border: 1px solid var(--line);
  border-radius: 100%;
  color: var(--acid);
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}
.access-panel {
  width: min(100%, 45rem);
  padding: clamp(1.1rem, 4vw, 2rem);
  color: var(--ink);
  background: var(--paper);
  border-radius: 1.15rem;
}
.access-panel p { margin: 0 0 1.25rem; }
label { display: block; font-size: .85rem; font-weight: 700; margin-block-end: .3rem; }
.email-row, .history-actions { display: flex; flex-wrap: wrap; gap: .55rem .7rem; }
input, button { font: inherit; }
input, .access-panel button {
  min-height: 2.85rem;
  padding: .65rem 1rem;
  border: 1px solid var(--ink);
  border-radius: .55rem;
}
input { flex: 1 1 15rem; min-width: 0; color: var(--ink); background: #fff; }
button { cursor: pointer; }
.access-panel button { color: var(--paper); background: var(--blue); border-color: var(--blue); font-weight: 650; }
.access-panel button:hover { background: var(--ink); border-color: var(--ink); }
button:disabled { opacity: .7; cursor: wait; }
a { color: inherit; text-underline-offset: .2em; }
:focus-visible { outline: 2px solid var(--acid); outline-offset: 4px; }
.access-panel :focus-visible, .order-card :focus-visible { outline-color: var(--blue); outline-offset: 3px; }
.order-summary:focus-visible { outline-offset: -5px; }
.message { margin-block: 1.25rem; }
.message:empty { display: none; }
#order-list {
  display: grid;
  gap: .65rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.order-card { color: var(--ink); background: var(--paper); border-radius: .95rem; overflow: hidden; }
.order-summary {
  display: grid;
  grid-template-columns: minmax(7.5rem, 12.5rem) minmax(0, 1fr) auto;
  align-items: stretch;
  min-height: 8rem;
  cursor: pointer;
  list-style: none;
}
.order-summary::-webkit-details-marker { display: none; }
.order-artwork {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .42rem;
  padding: .75rem;
  background: #e0dcff;
}
.order-card[data-status="shipped"] .order-artwork { background: var(--acid); }
.order-card[data-status="delivered"] .order-artwork { background: #ffbce1; }
.order-artwork img {
  display: block;
  width: min(29%, 3.6rem);
  height: auto;
  object-fit: contain;
  box-shadow: .2rem .28rem 0 #17154a24;
}
.order-artwork img:first-child:nth-last-child(2), .order-artwork img:last-child:nth-child(2) { width: min(46%, 3.6rem); }
.order-artwork img:only-child { width: min(74%, 4.35rem); }
.order-symbol { color: var(--ink); font-size: clamp(2.1rem, 5vw, 3.55rem); line-height: 1; }
.order-info, .order-aside {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .3rem;
}
.order-info { padding: 1.12rem clamp(.8rem, 3vw, 2rem); }
.order-heading { display: flex; align-items: center; flex-wrap: wrap; gap: .38rem .63rem; }
.order-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: .22rem .58rem;
  font-size: .72rem;
  font-weight: 700;
}
.order-badge::before { content: ""; width: .43rem; height: .43rem; border-radius: 50%; background: currentColor; }
[data-status="shipped"] .order-badge { background: var(--acid); border-color: #b6c62c; }
[data-status="delivered"] .order-badge { background: #e3f7dc; border-color: #9dc39a; }
.order-date, .test-order, .order-format { color: #555475; font-size: .85rem; }
.order-title { font-size: clamp(1.17rem, 3vw, 2.15rem); font-weight: 700; letter-spacing: -.055em; line-height: 1.08; overflow-wrap: anywhere; }
.order-aside { align-items: end; padding: 1rem clamp(.78rem, 2.5vw, 1.65rem) 1rem 0; gap: .55rem; }
.order-total { font-size: clamp(1rem, 2vw, 1.37rem); font-weight: 700; white-space: nowrap; letter-spacing: -.045em; }
.order-toggle { display: inline-flex; gap: .52rem; align-items: center; padding: .3rem .66rem; white-space: nowrap; }
.order-chevron { display: inline-block; font-size: 1rem; line-height: 1; }
[open] .order-chevron { transform: rotate(180deg); }
.order-summary:hover .order-toggle, [open] .order-toggle { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.order-content { padding: 1.15rem clamp(1rem, 4vw, 2rem) 1.45rem; border-top: 1px solid #dcd7d0; }
.order-reference { display: flex; flex-wrap: wrap; gap: .25rem .65rem; margin: 0 0 1.2rem; font-size: .83rem; overflow-wrap: anywhere; }
.order-reference span { color: #555475; min-width: 0; }
.order-progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 0 1.2rem;
  padding: 0;
  list-style: none;
  font-size: .82rem;
}
.order-progress li { position: relative; border-top: 2px solid #d6d1de; color: #555475; padding: .6rem .3rem 0 0; }
.order-progress li[data-complete="true"] { border-color: var(--blue); color: var(--ink); font-weight: 700; }
.order-items { display: grid; list-style: none; padding: 0; margin: 0; }
.order-item { display: flex; align-items: center; gap: .85rem; padding: .65rem 0; }
.order-item + .order-item { border-top: 1px solid #d6d1de; }
.order-item-images { display: flex; flex: none; gap: .3rem; }
.order-item-images img { width: clamp(2.15rem, 7vw, 3.5rem); height: auto; object-fit: contain; }
.order-item-label { display: grid; min-width: 0; overflow-wrap: anywhere; }
.order-item-label > span { color: #555475; font-size: .85rem; }
.order-tracking { margin: .85rem 0 0; overflow-wrap: anywhere; }
.order-document { display: inline-block; padding: .5rem .85rem; overflow-wrap: anywhere; }
a.order-document:hover { color: var(--paper); background: var(--ink); }
.history-actions { justify-content: flex-end; margin-top: 1.15rem; }
.history-actions button { min-height: 2.5rem; padding: .45rem .9rem; color: var(--paper); background: transparent; }
footer { border-top: 1px solid var(--line); font-size: .86rem; }
.help-link { font-weight: 700; }
.preview-note { color: var(--acid); font-size: .83rem; margin: 0; }

@media (max-width: 37rem) {
  .site-header, main, footer { width: calc(100% - 1.75rem); }
  .brand { font-size: 1.25rem; }
  .shop-link { font-size: .76rem; padding: .5rem .7rem; }
  h1 { font-size: clamp(2.75rem, 12vw, 4.5rem); }
  .order-count { min-width: 2.15rem; min-height: 2.15rem; margin-bottom: .35rem; font-size: .8rem; }
  .order-summary { grid-template-columns: 3.6rem minmax(0, 1fr) auto; min-height: 7rem; }
  .order-artwork { gap: .16rem; padding: .38rem; }
  .order-info { padding-inline: .62rem .32rem; }
  .order-title { font-size: 1.17rem; }
  .order-aside { padding-inline-end: .52rem; }
  .order-toggle { gap: .2rem; padding: .23rem .34rem; font-size: .7rem; }
  .order-date, .order-format { font-size: .73rem; }
}
@media (max-width: 23rem) {
  .order-summary { grid-template-columns: 2.8rem minmax(0, 1fr) auto; }
  .order-chevron { display: none; }
  .order-aside { padding-inline-end: .42rem; }
}

.back-to-orders {
  padding: .55rem .85rem;
  margin-bottom: 1.65rem;
  color: var(--paper);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 650;
}
.back-to-orders:hover { color: var(--blue); background: var(--paper); }
.page-heading h1:focus { outline: none; }
[data-detail] .order-summary { min-height: 10rem; }
[data-detail] .order-content { padding-block: 1.5rem 1.9rem; }
.order-status-note { margin: 0 0 .85rem; font-weight: 650; }

.order-tracking-title { margin: 0 0 .45rem; font-size: .9rem; }
.order-parcel { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .8rem; }
.order-parcel + .order-parcel { margin-top: .55rem; }

.order-document-statuses {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  padding: 0;
  margin: 1rem 0 0;
  list-style: none;
}
.order-document-statuses li {
  padding: .38rem .75rem;
  border-radius: 999px;
  background: #e0dcff;
  color: var(--ink);
  font-size: .85rem;
  font-weight: 650;
}
