:root {
  color-scheme: light;
  --ink: #161614;
  --paper: #f8f7f4;
  --line: #d9d7cf;
  --muted: #53534c;
  --signal: #ff824d;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--paper);
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: .23em; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 2px solid #a42c04; outline-offset: 4px; }
.shell { width: min(1280px, calc(100% - 72px)); margin-inline: auto; }
.masthead { background: white; color: var(--ink); border-bottom: 4px solid #ff4e0d; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 66px; }
.brand { font-size: 1rem; font-weight: 900; letter-spacing: -.03em; text-decoration: none; }
.brand span { margin-left: .65rem; font-size: .62rem; color: #a42c04; letter-spacing: .13em; }
.retail { font-size: .8rem; white-space: nowrap; }
.review { padding: .55rem 1rem; background: #eeeace; text-align: center; font-size: .82rem; }
.access { max-width: 570px; margin: 9vh auto; padding: 38px; background: white; border: 1px solid var(--line); }
.label { font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2.6rem, 6vw, 5.4rem); font-weight: 900; letter-spacing: -.07em; line-height: .96; }
.access h1 { margin: 14px 0; font-size: clamp(2.4rem, 6vw, 3.7rem); }
.access p:not(.label), .catalog-heading p:not(.label), .history p { color: var(--muted); line-height: 1.5; }
.access form, .access > p { margin-top: 20px; }
.access form > label { margin-bottom: 18px; }
.fields { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
label { display: grid; gap: 6px; font-size: .82rem; font-weight: 700; }
label > span { color: var(--muted); }
input, select, textarea { min-width: 0; width: 100%; padding: .6rem; border: 1px solid #a5a499; background: white; color: var(--ink); border-radius: 0; }
.primary { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; background: var(--ink);
  color: white; text-decoration: none; border: 1px solid var(--ink); padding: .65rem 1rem; font-size: .86rem; font-weight: 800; cursor: pointer; }
.primary:hover { background: var(--signal); color: var(--ink); }
.access .primary { margin-top: 18px; }
.error, .notice { padding: 12px; border-left: 3px solid #8d2c22; margin: 12px 0; background: #fff4f1; }
.notice { border-color: #627621; background: #f0f5da; }
.catalog-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; padding: 52px 0 28px; }
.catalog-heading h1 { margin: 11px 0 13px; }
.account { display: grid; justify-items: end; gap: .4rem; flex: 0 0 auto; font-size: .85rem; }
.text-button { border: 0; padding: 0; background: none; color: inherit; text-decoration: underline; cursor: pointer; }
.order-layout { display: grid; gap: 26px; grid-template-columns: minmax(0, 1fr) minmax(268px, 322px); padding-bottom: 44px; align-items: start; }
.volume { color: white; background: #242621; padding: 20px 22px; }
.volume-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.volume h2 { font-size: 1.13rem; }
.volume output { color: var(--signal); font-size: .84rem; text-align: right; }
.volume-track { height: 8px; background: #575b4d; margin: 17px 0 13px; position: relative; overflow: hidden; }
#volume-fill { width: 0; background: var(--signal); height: 100%; transition: width 160ms ease; }
.milestones { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; gap: 6px; }
.milestones li { display: grid; gap: 4px; color: #f0f0e8; font-size: .8rem; text-align: right; }
.milestones li span { color: #c9cbc1; font-size: .71rem; }
.milestones li.reached strong { color: var(--signal); }
.catalog-label { font-size: 1.3rem; margin: 25px 0 12px; }
.products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.product { min-width: 0; border: 1px solid var(--line); background: #fff; }
.product.unavailable { opacity: .58; }
.photo { background: #eae7de; aspect-ratio: 1.33; display: grid; place-items: center; }
.photo img { width: 100%; height: 100%; aspect-ratio: 1.33; object-fit: contain; }
.product-info { padding: 13px; }
.stock { color: #365013; font-size: .72rem; font-weight: 800; margin-bottom: 6px; }
.unavailable .stock { color: #7d2924; }
.product h3 { font-size: .91rem; letter-spacing: -.015em; }
.terms { display: flex; justify-content: space-between; align-items: baseline; gap: 4px; margin: 10px 0 0; font-size: .8rem; flex-wrap: wrap; }
.terms strong { font-size: 1.04rem; }
.terms small, .terms span { color: var(--muted); font-weight: 400; }
.quantity { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; margin-top: 10px; border-top: 1px solid var(--line); }
.quantity input { width: 68px; }
.summary { padding: 19px; background: white; border: 1px solid var(--line); }
.summary h2 { font-size: 1.3rem; }
.summary h3 { margin: 20px 0 12px; font-size: 1rem; }
.summary dl { display: grid; gap: 9px; margin-bottom: 9px; }
.summary dl div { display: flex; justify-content: space-between; gap: 8px; font-size: .85rem; }
.summary dl dd { margin: 0; font-weight: 700; }
.summary dl .total { border-top: 1px solid var(--line); padding-top: 10px; font-size: .95rem; font-weight: 800; }
.summary > label { margin-top: 14px; }
.summary .primary { width: 100%; margin-top: 16px; }
.retailer-profile { display: grid; gap: 4px; overflow-wrap: anywhere; font-size: .83rem; color: var(--muted); }
.retailer-profile strong { color: var(--ink); }
.order-actions { display: grid; gap: 8px; }
.secondary { border: 1px solid var(--ink); min-height: 44px; background: white; color: var(--ink); padding: .65rem 1rem; font-size: .86rem; font-weight: 800; cursor: pointer; }
.secondary:hover { background: #f3f1eb; }
.hint { color: var(--muted); font-size: .78rem; line-height: 1.4; }
.history { max-width: 740px; margin: 38px auto; }
.history h1 { margin: 20px 0; font-size: clamp(2.6rem, 6vw, 4.6rem); }
.history-row { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; padding: 18px; border: 1px solid var(--line); margin: 10px 0; background: white; }
.history-row h2 { font-size: 1.05rem; }
.history-row .primary { display: flex; margin-top: 10px; }
.invoice { border: 1px solid var(--line); background: white; padding: clamp(16px, 4vw, 28px); }
.invoice h2 { margin-block: 8px 2px; }
.invoice-lines { margin: 14px 0; padding: 0; list-style: none; }
.invoice-lines li, .invoice-totals div { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; }
.invoice-lines li { border-bottom: 1px solid var(--line); font-size: .9rem; }
.invoice-lines li small { display: block; margin-top: 3px; color: var(--muted); }
.invoice-lines li strong, .invoice-totals dd { white-space: nowrap; font-variant-numeric: tabular-nums; }
.invoice-totals dd { margin: 0; font-weight: 700; }
.invoice-totals .invoice-total { border-top: 1px solid var(--line); padding-top: 15px; font-size: 1.25rem; font-weight: 800; }
.invoice-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
@media (max-width: 1080px) {
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 730px) {
  .shell { width: calc(100% - 28px); }
  .catalog-heading { align-items: start; flex-direction: column; padding: 28px 0 18px; }
  .account { display: flex; flex-wrap: wrap; gap: .5rem .9rem; }
  .order-layout { grid-template-columns: 1fr; gap: 16px; }
  .access { padding: 20px; margin-block: 30px; }
  .volume { padding: 14px; }
  .milestones li { font-size: .72rem; }
  .milestones li span, .volume output { font-size: .72rem; }
  input, select, textarea { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) { #volume-fill { transition: none; } }
