/* Demo Shop. One stylesheet for the catalogue, the cart, the order page and the 404 page.
   The look: paper prints on an ink-blue wall. Type is Archivo (one variable file, two widths). */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

/* ------------------------------------------------------------ tokens */

:root {
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --wrap: 70rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --r-art: 6px;
  --r-control: 12px;
  --r-panel: 18px;

  color-scheme: dark;
  --bg: #14163c;
  --bg-raised: #1d2052;
  --bg-sunk: #0f1130;
  --line: #343a85;
  --line-strong: #6a70c8;
  --text: #f5f0e1;
  --muted: #b8b9da;
  --action: #ffcb3d;
  --action-hover: #ffdb75;
  --action-text: #14163c;
  --link: #ffcb3d;
  --good: #4fddbf;
  --good-text: #0f1130;
  --warn: #ff8fae;
  --focus: #ffffff;
  --shadow: 0 18px 40px -18px rgb(4 5 24 / 0.8);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3efe3;
  --bg-raised: #fffcf3;
  --bg-sunk: #e8e2d0;
  --line: #d3ccb6;
  --line-strong: #7a7fa8;
  --text: #171a4a;
  --muted: #50537d;
  --action: #2e3aa8;
  --action-hover: #232d8a;
  --action-text: #ffffff;
  --link: #2e3aa8;
  --good: #0b7059;
  --good-text: #ffffff;
  --warn: #b81f4b;
  --focus: #171a4a;
  --shadow: 0 18px 40px -22px rgb(23 26 74 / 0.45);
}

/* ------------------------------------------------------------ base */

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

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Keep a focused element clear of the sticky header and the cart bar. */
  scroll-padding-block: 5rem 6rem;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  word-spacing: 0.08em;
  overflow-wrap: break-word;
  font-stretch: 100%;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
p,
ol,
ul,
dl,
dd,
figure {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--link);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 0.14em;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

h1:focus,
h2:focus {
  outline: none;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap-narrow {
  max-width: 62rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 20;
  padding: 0.6rem 0.9rem;
  border-radius: var(--r-control);
  background: var(--action);
  color: var(--action-text);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 0.75rem;
}

.icon {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.num {
  font-variant-numeric: tabular-nums;
}

.nowrap {
  white-space: nowrap;
}

/* ------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.55rem 1.25rem;
  border: 2px solid transparent;
  border-radius: var(--r-control);
  background: none;
  font-weight: 650;
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.12s ease, border-color 0.12s ease, transform 0.08s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn[disabled],
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
}

.btn-primary {
  background: var(--action);
  color: var(--action-text);
}

.btn-primary:hover:not([disabled]) {
  background: var(--action-hover);
}

.btn-quiet {
  border-color: var(--line-strong);
  color: var(--text);
}

.btn-quiet:hover:not([disabled]) {
  border-color: var(--text);
  background: var(--bg-raised);
}

.btn-wide {
  width: 100%;
}

.btn[aria-busy="true"],
.btn-text[aria-busy="true"] {
  cursor: progress;
  opacity: 0.7;
}

.pay-info .btn-pay {
  max-width: 26rem;
}

.btn-pay {
  min-height: 3.5rem;
  font-size: 1.125rem;
  font-stretch: 112%;
  font-weight: 700;
}

.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0.25rem 0.25rem;
  border: 0;
  background: none;
  color: var(--text);
  font-weight: 550;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
  cursor: pointer;
  touch-action: manipulation;
}

.btn-text:hover:not([disabled]) {
  text-decoration-thickness: 0.14em;
}

.btn-text[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: var(--r-control);
  background: none;
  color: var(--text);
  cursor: pointer;
  touch-action: manipulation;
}

.icon-btn:hover:not([disabled]) {
  background: var(--bg-raised);
}

/* ------------------------------------------------------------ header and footer */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.top-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  margin-right: auto;
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img {
  width: 1.75rem;
  height: 1.75rem;
}

.theme-toggle .icon-sun {
  display: block;
}

.theme-toggle .icon-moon {
  display: none;
}

:root[data-theme="light"] .theme-toggle .icon-sun {
  display: none;
}

:root[data-theme="light"] .theme-toggle .icon-moon {
  display: block;
}

.cart-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  padding: 0 0.85rem 0 0.7rem;
  border: 2px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
  font-weight: 650;
  text-decoration: none;
}

.cart-link:hover {
  border-color: var(--text);
}

/* A cart with something in it: the link takes the action colour. */
.cart-link.has-items {
  border-color: var(--action);
  background: var(--action);
  color: var(--action-text);
}

.cart-link.has-items:hover {
  border-color: var(--action-hover);
  background: var(--action-hover);
}

.cart-link.has-items .cart-count {
  background: var(--action-text);
  color: var(--action);
}

.cart-count {
  min-width: 1.5rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: var(--action);
  color: var(--action-text);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.5rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.preview-note {
  padding-block: 0.5rem;
  background: var(--bg-sunk);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}

main {
  flex: 1;
}

.foot {
  margin-top: 4rem;
  padding-block: 1.5rem 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9375rem;
}

.foot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 2rem;
  justify-content: space-between;
}

.foot a {
  color: inherit;
}

body.has-cart-bar .foot {
  padding-bottom: 7rem;
}

/* ------------------------------------------------------------ catalogue */

.hero {
  display: grid;
  gap: 1.75rem;
  padding-block: 2rem 2.25rem;
}

.hero h1 {
  font-size: clamp(2.125rem, 1.2rem + 4.6vw, 4.25rem);
  font-weight: 800;
  font-stretch: 125%;
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.lede {
  margin-top: 1rem;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.125rem;
}

.facts {
  align-self: end;
  border-top: 1px solid var(--line);
}

.facts-row {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.75rem;
  padding-block: 0.65rem;
  border-bottom: 1px solid var(--line);
}

.facts dt {
  color: var(--muted);
  font-size: 0.9375rem;
}

.facts dd {
  font-weight: 550;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 750;
  font-stretch: 118%;
  letter-spacing: -0.01em;
}

.resume {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1rem;
  margin-bottom: 1.75rem;
  padding: 0.75rem 1rem;
  border: 2px solid var(--line-strong);
  border-radius: var(--r-control);
}

.resume p {
  flex: 1 1 14rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem 1rem;
}

.item {
  display: flex;
  flex-direction: column;
}

.item-art {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: var(--r-art);
  background: var(--bg-raised);
}

.item-name {
  margin-top: 0.8rem;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.25;
}

.item-blurb {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.4;
}

.item-buy {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: auto;
  padding-top: 0.7rem;
}

.price {
  font-size: 1.0625rem;
  font-weight: 700;
  font-stretch: 112%;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.item-control {
  min-height: 3rem;
}

.item-control .btn {
  min-height: 3rem;
  padding-inline: 0.5rem;
}

.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3rem;
  border: 2px solid var(--line-strong);
  border-radius: var(--r-control);
}

.stepper .icon-btn {
  border-radius: calc(var(--r-control) - 3px);
}

.stepper .icon-btn[disabled] {
  cursor: not-allowed;
  color: var(--muted);
  opacity: 0.5;
}

.stepper-qty {
  flex: 1;
  font-weight: 650;
  text-align: center;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.load-note {
  padding-block: 2rem;
  color: var(--muted);
}

.problem {
  display: grid;
  gap: 0.75rem;
  justify-items: start;
  padding: 1.25rem;
  border: 2px solid var(--line-strong);
  border-radius: var(--r-control);
}

.how {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.how-steps {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.25rem;
  counter-reset: how;
}

.how-steps li {
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  gap: 0.85rem;
  counter-increment: how;
}

.how-steps li::before {
  content: counter(how);
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  font-weight: 800;
  font-stretch: 112%;
}

.how-steps h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 2.25rem;
}

.how-steps p {
  color: var(--muted);
  max-width: 26rem;
}

/* The bar that follows the catalogue while the cart holds something. */
.cart-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9;
  padding: 0.75rem var(--gutter) calc(0.75rem + env(safe-area-inset-bottom));
  pointer-events: none;
}

.cart-bar-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 34rem;
  margin-inline: auto;
  padding: 0.6rem 0.6rem 0.6rem 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: calc(var(--r-control) + 6px);
  background: var(--bg-raised);
  box-shadow: var(--shadow);
  pointer-events: auto;
}

.cart-bar-text {
  display: flex;
  flex-direction: column;
  margin-right: auto;
  line-height: 1.25;
}

.cart-bar-count {
  color: var(--muted);
  font-size: 0.9375rem;
}

/* ------------------------------------------------------------ cart */

.page-head {
  padding-block: 2rem 1.5rem;
}

.page-title {
  font-size: clamp(2rem, 1.4rem + 3vw, 3rem);
  font-weight: 800;
  font-stretch: 125%;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.cart-layout {
  display: grid;
  gap: 2rem;
}

.lines {
  border-top: 1px solid var(--line);
}

.line {
  display: grid;
  grid-template-columns: 4.5rem 1fr auto;
  grid-template-areas:
    "art name total"
    "art controls controls";
  gap: 0.35rem 0.9rem;
  align-items: start;
  padding-block: 1.1rem;
  border-bottom: 1px solid var(--line);
}

.line-art {
  grid-area: art;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: var(--r-art);
}

.line-name {
  grid-area: name;
}

.line-name h2 {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.25;
}

.line-name p {
  color: var(--muted);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

.line-total {
  grid-area: total;
  text-align: right;
}

.line-controls {
  grid-area: controls;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.line-controls .stepper {
  width: 9.5rem;
}

.summary {
  display: grid;
  gap: 1rem;
  align-content: start;
  padding: 1.25rem;
  border-radius: var(--r-panel);
  background: var(--bg-raised);
}

.summary-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.summary-total dt {
  font-weight: 650;
}

.summary-total dd {
  font-size: 1.75rem;
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.note {
  color: var(--muted);
  font-size: 0.9375rem;
}

.msg {
  display: grid;
  grid-template-columns: 1.25rem 1fr;
  gap: 0.6rem;
  align-items: start;
  color: var(--warn);
  font-weight: 550;
}

.msg .icon {
  margin-top: 0.1rem;
}

.empty {
  display: grid;
  gap: 1rem;
  justify-items: start;
  padding-block: 1rem 3rem;
}

.empty p {
  font-size: 1.125rem;
  color: var(--muted);
}

/* ------------------------------------------------------------ order page */

.order-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-block: 1.5rem 1.25rem;
}

.order-no {
  color: var(--muted);
}

.order-no strong {
  color: var(--text);
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: 0.04em;
}

.steps {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

.step {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
}

.step + .step::before {
  content: "";
  width: clamp(0.75rem, 4vw, 2.5rem);
  height: 2px;
  margin-right: 0.1rem;
  background: var(--line-strong);
}

.step-mark {
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  font-size: 0.8125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.step-mark .icon {
  width: 0.9rem;
  height: 0.9rem;
  stroke-width: 3;
}

.step.is-done,
.step.is-current {
  color: var(--text);
}

.step.is-done .step-mark {
  border-color: var(--good);
  background: var(--good);
  color: var(--good-text);
}

.step.is-current .step-mark {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}

/* The ticket: the pay panel on top, a tear line, the order's lines below. */
.ticket {
  position: relative;
  border-radius: var(--r-panel);
  background: var(--bg-raised);
  box-shadow: var(--shadow);
}

.ticket-main {
  padding: 1.5rem 1.25rem 1.75rem;
}

.ticket-tear {
  position: relative;
  height: 0;
  margin-inline: 1.25rem;
  border-top: 2px dashed var(--line-strong);
}

.ticket-tear::before,
.ticket-tear::after {
  content: "";
  position: absolute;
  top: -0.75rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--bg);
}

.ticket-tear::before {
  left: -2rem;
}

.ticket-tear::after {
  right: -2rem;
}

.ticket-stub {
  padding: 1.5rem 1.25rem;
}

.pay {
  display: grid;
  grid-template-areas:
    "info"
    "qr"
    "actions";
  gap: 1.5rem;
}

.pay-info {
  grid-area: info;
  display: grid;
  gap: 1rem;
  align-content: start;
}

.pay-qr {
  grid-area: qr;
}

.pay-actions {
  grid-area: actions;
  display: grid;
  gap: 0.75rem;
  justify-items: start;
  align-content: start;
}

.state-title {
  font-size: clamp(1.875rem, 1.3rem + 2.8vw, 3rem);
  font-weight: 800;
  font-stretch: 125%;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.state-title .num {
  white-space: nowrap;
}

.pay-to {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin-top: -0.4rem;
  color: var(--muted);
  font-size: 1.0625rem;
}

.pay-to strong {
  color: var(--text);
  font-weight: 650;
  overflow-wrap: anywhere;
}

.timer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.timer.is-low {
  color: var(--warn);
}

.state-text {
  max-width: 34rem;
  color: var(--muted);
}

.state-text strong {
  color: var(--text);
  font-weight: 650;
}

.qr-tile {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 27.5rem;
  aspect-ratio: 1;
  margin-inline: auto;
  border-radius: var(--r-control);
  background: #ffffff;
}

.qr-tile svg {
  max-width: none;
}

.qr-caption {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.9375rem;
  text-align: center;
}

.state-badge {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  color: var(--text);
}

.state-badge .icon {
  width: 1.75rem;
  height: 1.75rem;
}

.state-badge.is-good {
  border-color: var(--good);
  background: var(--good);
  color: var(--good-text);
}

.state-badge.is-good .icon {
  stroke-width: 2.6;
  stroke-dasharray: 24;
  stroke-dashoffset: 0;
  animation: draw 0.5s 0.15s ease-out backwards;
}

@keyframes draw {
  from {
    stroke-dashoffset: 24;
  }
}

.state-badge.is-warn {
  border-color: var(--warn);
  color: var(--warn);
}

.spinner {
  width: 1.75rem;
  height: 1.75rem;
  border: 3px solid var(--line-strong);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.confs {
  display: grid;
  gap: 0.5rem;
  max-width: 22rem;
}

.confs-bar {
  display: flex;
  gap: 0.35rem;
}

.conf {
  flex: 1;
  height: 0.6rem;
  border-radius: 999px;
  background: var(--bg-sunk);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.conf.is-on {
  background: var(--good);
  box-shadow: none;
}

.conf.is-next {
  animation: wait 1.6s ease-in-out infinite;
}

@keyframes wait {
  50% {
    background: var(--line-strong);
  }
}

.confs-text {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.ref {
  display: grid;
  gap: 0.15rem;
  align-content: center;
  justify-items: start;
  padding: 1.25rem;
  border-radius: var(--r-control);
  background: var(--bg-sunk);
}

.ref-label {
  color: var(--muted);
  font-size: 0.9375rem;
}

.ref-digits {
  font-size: clamp(2.5rem, 2rem + 4vw, 3.75rem);
  font-weight: 800;
  font-stretch: 125%;
  line-height: 1.1;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
}

.ref-note {
  color: var(--muted);
  font-size: 0.9375rem;
}

.stub-lines {
  display: grid;
  gap: 0.5rem;
}

.stub-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.stub-line dd {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.stub-qty {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.stub-total {
  margin-top: 0.4rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
  font-weight: 750;
}

.stub-note {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.order-after {
  margin-top: 1.5rem;
}

.lost {
  margin-top: 1rem;
}

/* ------------------------------------------------------------ 404 */

.missing {
  display: grid;
  gap: 1rem;
  justify-items: start;
  padding-block: clamp(3rem, 12vh, 7rem) 3rem;
}

.missing p {
  color: var(--muted);
  font-size: 1.125rem;
}

/* ------------------------------------------------------------ wider screens */

@media (min-width: 30rem) {
  .item-buy {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .item-control {
    width: 9.5rem;
  }
}

@media (min-width: 46rem) {
  /* Wide screens: the header's cart link is always in view, so no bar. */
  .cart-bar {
    display: none;
  }

  body.has-cart-bar .foot {
    padding-bottom: 2rem;
  }

  .hero {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 3rem;
    padding-block: 3.5rem 3.5rem;
  }

  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.75rem 2rem;
  }

  .how-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
  }

  .line {
    grid-template-columns: 5.5rem 1fr auto 6.5rem;
    grid-template-areas: "art name controls total";
    align-items: center;
    gap: 1.25rem;
  }

  .line-art {
    width: 5.5rem;
    height: 5.5rem;
  }

  .line-controls {
    margin-top: 0;
  }

  .ticket-main {
    padding: 2.25rem 2.25rem 2.5rem;
  }

  .ticket-tear {
    margin-inline: 2.25rem;
  }

  .ticket-tear::before {
    left: -3rem;
  }

  .ticket-tear::after {
    right: -3rem;
  }

  .ticket-stub {
    padding: 2rem 2.25rem;
  }

  .stub-lines {
    max-width: 30rem;
  }
}

@media (min-width: 58rem) {
  .cart-layout {
    grid-template-columns: minmax(0, 1fr) 21rem;
    gap: 3rem;
    align-items: start;
  }

  .summary {
    position: sticky;
    top: 5.5rem;
  }

  .pay.has-side {
    grid-template-columns: minmax(0, 1fr) 27.5rem;
    grid-template-areas:
      "info qr"
      "actions qr";
    grid-template-rows: auto 1fr;
    gap: 1.5rem 3rem;
  }

  .pay.has-side .pay-qr {
    align-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
