/*
 * Copperwell shop design system: the cart page, the checkout, the order confirmation and
 * "My account".
 * Builds on base.css (tokens, controls, cart lines and totals); see the note on isolation there.
 */

/* The heading of a part of a form or a summary. */
#cw .cw-step__title {
  font-size: 20px;
  line-height: 1.3;
  font-weight: 400;
}

/* ---- Cart page -------------------------------------------------------------------------------- */
#cw .cw-cartpage {
  padding-block: calc(var(--cw-header) + 16px) clamp(56px, 7vw, 96px);
  background: var(--cw-paper);
}

#cw .cw-crumbsnav {
  padding-block: 8px;
}

#cw .cw-cartpage__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
  padding-block: clamp(12px, 2vw, 28px) clamp(16px, 2vw, 28px);
}

#cw .cw-cartpage__count {
  font-size: 15px;
  color: var(--cw-brown-soft);
}

#cw .cw-cartpage__notice {
  margin-bottom: 12px;
}

#cw .cw-cartpage__notice:empty {
  display: none;
}

#cw .cw-cartpage__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: start;
  gap: clamp(24px, 4vw, 72px);
}

#cw .cw-cartpage__grid[aria-busy='true'] .cw-cartpage__lines,
#cw .cw-cartpage__grid[aria-busy='true'] .cw-cartpage__summary {
  opacity: 0.6;
  transition: opacity 0.2s ease 0.25s;
}

#cw .cw-cartpage__lines > ul:first-child {
  border-top: 1px solid var(--cw-line);
}

#cw .cw-cartpage__lines .cw-line {
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 20px;
  padding: 24px 0;
}

#cw .cw-cartpage__lines .cw-line:last-child {
  border-bottom: 1px solid var(--cw-line);
}

#cw .cw-cartpage__lines .cw-line__title {
  font-size: 18px;
}

#cw .cw-cartpage__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 14px;
}

#cw .cw-cartpage__addons {
  margin-top: 40px;
  padding: 20px;
  border-radius: var(--cw-radius);
  background: var(--cw-cream);
}

#cw .cw-cartpage__addons h2 {
  margin-bottom: 14px;
}

#cw .cw-cartpage__summary {
  position: sticky;
  top: calc(var(--cw-header) + 24px);
  display: grid;
  gap: 16px;
  padding: clamp(20px, 2.4vw, 32px);
  border-radius: var(--cw-radius);
  background: var(--cw-cream);
}

#cw .cw-cartpage__summary .cw-goal {
  margin: 0;
  background: var(--cw-paper);
}

#cw .cw-cartpage__summary .cw-totals {
  margin: 0;
}

#cw .cw-cartpage__assure {
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: var(--cw-brown-soft);
}

#cw .cw-cartpage__assure li {
  display: flex;
  align-items: center;
  gap: 8px;
}

#cw .cw-cartpage__loading {
  display: grid;
  gap: 16px;
}

#cw .cw-cartpage__loading .cw-skeleton {
  height: 140px;
}

#cw .cw-empty--page {
  padding-block: 48px 64px;
}

#cw .cw-empty--page .cw-btn {
  margin-top: 28px;
}

@media (max-width: 900px) {
  #cw .cw-cartpage__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #cw .cw-cartpage__summary {
    position: static;
  }
}

@media (max-width: 560px) {
  #cw .cw-cartpage__lines .cw-line {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 14px;
    padding: 18px 0;
  }

  #cw .cw-cartpage__lines .cw-line__title {
    font-size: 15px;
  }
}

/* ---- Checkout --------------------------------------------------------------------------------- */
#cw .cw-copage {
  /* The checkout has its own header, which scrolls with the page. */
  --cw-header: 0px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--cw-paper);
}

#cw .cw-copage > main {
  flex: 1;
}

/* Its own header: the way back, the logo, and that the page is secure. */
#cw .cw-cohead {
  border-bottom: 1px solid var(--cw-line);
}

#cw .cw-cohead__in {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  min-height: 76px;
}

#cw .cw-cohead__back {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 6px;
  min-height: 44px;
  font-size: 14px;
  transition: color 0.2s ease;
}

#cw .cw-cohead__back:hover {
  color: var(--cw-copper);
}

#cw .cw-cohead__logo img {
  width: auto;
  height: 34px;
}

#cw .cw-cohead__secure {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 8px;
  font-size: 13px;
  color: var(--cw-brown-soft);
}

#cw .cw-cofoot {
  border-top: 1px solid var(--cw-line);
  font-size: 13px;
  color: var(--cw-brown-soft);
}

#cw .cw-cofoot__in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 20px;
}

#cw .cw-cofoot ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

/* The form on the left, the order on the right. */
#cw .cw-checkout {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: start;
  gap: 0 clamp(24px, 5vw, 80px);
  padding-block: clamp(24px, 3vw, 48px) clamp(48px, 6vw, 88px);
}

#cw .cw-checkout__main {
  justify-self: end;
  width: 100%;
  min-width: 0;
  max-width: 640px;
}

#cw .cw-checkout__fold {
  display: none;
}

#cw .cw-checkout__errors {
  margin-bottom: 24px;
}

#cw .cw-checkout__errors ul {
  display: grid;
  gap: 4px;
}

#cw .cw-checkout__form {
  display: grid;
  gap: 36px;
}

#cw .cw-step {
  display: grid;
  gap: 14px;
}

#cw .cw-step__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
}

#cw .cw-step__aside {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--cw-brown-soft);
}

#cw .cw-step__hint {
  font-size: 13px;
  color: var(--cw-brown-soft);
}

#cw .cw-step__check {
  margin-top: 4px;
}

#cw .cw-step__sub {
  display: grid;
  gap: 14px;
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--cw-line);
}

#cw .cw-step__subtitle {
  font-size: 16px;
  font-weight: 400;
}

/* Fields sit on a grid of six columns. */
#cw .cw-formgrid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

#cw .cw-span-6 {
  grid-column: span 6;
}

#cw .cw-span-3 {
  grid-column: span 3;
}

#cw .cw-span-2 {
  grid-column: span 2;
}

#cw .cw-method {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 12px 16px;
  border: 1px solid var(--cw-navy);
  border-radius: var(--cw-radius-sm);
  background: var(--cw-cream);
  font-size: 15px;
}

#cw .cw-method__name {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* Tall enough for the card fields, so the page does not jump when they arrive. */
#cw .cw-paybox {
  min-height: 108px;
  padding: 16px;
  border: 1px solid var(--cw-line);
  border-radius: var(--cw-radius-sm);
  background: var(--cw-paper);
}

/* Apple Pay, Google Pay, Link: shown only where the browser offers one. */
#cw .cw-express {
  display: grid;
  gap: 12px;
}

#cw .cw-express__label {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
  color: var(--cw-copper);
}

#cw .cw-express__or {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--cw-brown-soft);
}

#cw .cw-express__or::before,
#cw .cw-express__or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--cw-line);
}

#cw .cw-checkout__place {
  margin-top: -8px;
}

#cw .cw-checkout__legal {
  margin-top: -20px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--cw-brown-soft);
  text-align: center;
}

#cw .cw-checkout__summary {
  position: sticky;
  top: 24px;
  width: 100%;
  min-width: 0;
  max-width: 480px;
}

#cw .cw-summary {
  padding: clamp(20px, 2.4vw, 32px);
  border-radius: var(--cw-radius);
  background: var(--cw-cream);
}

#cw .cw-summary__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
  font-size: 14px;
}

#cw .cw-summary .cw-line {
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 0;
}

#cw .cw-summary .cw-line__media {
  background: var(--cw-paper);
}

#cw .cw-summary__coupon {
  display: grid;
  gap: 10px;
  padding-block: 16px;
  border-block: 1px solid var(--cw-line);
}

#cw .cw-summary .cw-totals {
  margin-bottom: 0;
}

#cw .cw-checkout--loading .cw-skeleton {
  height: 120px;
  margin-bottom: 16px;
}

#cw .cw-checkout--loading .cw-checkout__summary .cw-skeleton {
  height: 340px;
}

@media (max-width: 900px) {
  #cw .cw-checkout {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 0;
  }

  /* The order is folded away under a bar that shows the total. */
  #cw .cw-checkout__fold {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    order: 0;
    width: auto;
    margin-inline: calc(-1 * var(--cw-gutter));
    padding: 14px var(--cw-gutter);
    border-bottom: 1px solid var(--cw-line);
    background: var(--cw-cream);
    font-size: 14px;
  }

  #cw .cw-checkout__fold span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  #cw .cw-checkout__fold .cw-icon:last-child {
    transition: transform 0.25s var(--cw-ease);
  }

  #cw .cw-checkout__fold[aria-expanded='true'] .cw-icon:last-child {
    transform: rotate(180deg);
  }

  #cw .cw-checkout__fold strong {
    font-size: 16px;
    font-weight: 400;
  }

  #cw .cw-checkout__summary {
    position: static;
    display: none;
    order: 1;
    max-width: none;
    margin-inline: calc(-1 * var(--cw-gutter));
    width: auto;
  }

  #cw .cw-checkout__summary[data-open='true'] {
    display: block;
  }

  #cw .cw-checkout__summary .cw-summary {
    border-bottom: 1px solid var(--cw-line);
    border-radius: 0;
    padding-inline: var(--cw-gutter);
  }

  #cw .cw-checkout__main {
    justify-self: stretch;
    order: 2;
    max-width: none;
    padding-top: 28px;
  }
}

@media (max-width: 560px) {
  #cw .cw-span-sm-6 {
    grid-column: span 6;
  }

  #cw .cw-span-sm-3 {
    grid-column: span 3;
  }

  #cw .cw-cohead__in {
    min-height: 64px;
  }

  #cw .cw-cohead__logo img {
    height: 28px;
  }

  /* Only the icons fit beside the logo; their words stay available to screen readers. */
  #cw .cw-cohead__back span,
  #cw .cw-cohead__secure span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  #cw .cw-cohead__back {
    min-width: 44px;
  }
}

/* ---- Order confirmation ----------------------------------------------------------------------- */
#cw .cw-thanks {
  padding-block: calc(var(--cw-header) + clamp(32px, 5vw, 72px)) clamp(56px, 7vw, 96px);
  background: var(--cw-paper);
}

#cw .cw-thanks__in {
  max-width: calc(980px + 2 * var(--cw-gutter));
}

#cw .cw-thanks__head {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin-bottom: clamp(28px, 4vw, 48px);
  text-align: center;
}

#cw .cw-thanks__mark {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 6px;
  border-radius: 50%;
  background: var(--cw-success-bg);
  color: var(--cw-success);
}

#cw .cw-thanks__mark--quiet {
  background: var(--cw-sand);
  color: var(--cw-brown);
}

#cw .cw-thanks__next {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 24px;
  margin-top: 36px;
}

#cw .cw-thanks__loading {
  display: grid;
  gap: 16px;
  max-width: 720px;
  margin-inline: auto;
}

#cw .cw-thanks__loading .cw-skeleton {
  height: 140px;
}

/* ---- The parts of an order (confirmation, account) --------------------------------------------- */
/* A block with a line around it. */
#cw .cw-panel {
  padding: clamp(20px, 2.4vw, 32px);
  border: 1px solid var(--cw-line);
  border-radius: var(--cw-radius);
}

#cw .cw-order__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--cw-line);
  border-radius: var(--cw-radius);
  background: var(--cw-line);
}

#cw .cw-order__facts > div {
  padding: 18px 20px;
  background: var(--cw-cream);
}

#cw .cw-order__facts dt,
#cw .cw-order__label {
  font-size: 12px;
  line-height: 1.4;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cw-brown-soft);
}

#cw .cw-order__facts dd {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

#cw .cw-order__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: start;
  gap: 20px;
  margin-top: 20px;
}

#cw .cw-order__lines {
  margin-top: 12px;
}

#cw .cw-order__lines li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--cw-line);
  font-size: 15px;
  line-height: 1.45;
}

#cw .cw-order__lines li > span:last-child {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

#cw .cw-order__option,
#cw .cw-order__qty {
  color: var(--cw-brown-soft);
}

#cw .cw-order__addresses {
  display: grid;
  gap: 24px;
}

#cw .cw-order__label {
  margin-bottom: 8px;
}

#cw :where(.cw-thanks, .cw-account) address {
  font-size: 15px;
  font-style: normal;
  line-height: 1.6;
}

#cw :where(.cw-thanks, .cw-account) address span {
  display: block;
}

/* What the shop wrote about the order: a shipping notice with its tracking number, for example. */
#cw .cw-order__updates {
  margin-top: 20px;
}

#cw .cw-order__updates li {
  padding-top: 14px;
  font-size: 15px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

#cw .cw-order__updates li + li {
  margin-top: 14px;
  border-top: 1px solid var(--cw-line);
}

#cw .cw-order__updates .cw-order__label {
  margin-bottom: 4px;
}

/* The state of an order. The colour repeats what the word says. */
#cw .cw-status {
  background: var(--cw-tile);
}

#cw .cw-status[data-status='completed'] {
  background: var(--cw-success-bg);
  color: var(--cw-success);
}

#cw .cw-status:where([data-status='cancelled'], [data-status='failed']) {
  background: var(--cw-error-bg);
  color: var(--cw-error);
}

@media (max-width: 760px) {
  #cw .cw-order__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---- My account ---------------------------------------------------------------------------------
 * Signed out: a form in the middle of the page. Signed in: the account's screens listed on the
 * left (a row of pills on a small screen), the screen itself beside them.
 */
#cw .cw-account {
  padding-block: calc(var(--cw-header) + 16px) clamp(56px, 7vw, 96px);
  background: var(--cw-paper);
}

#cw .cw-account__head {
  display: grid;
  gap: 14px;
  padding-block: clamp(12px, 2vw, 28px) clamp(20px, 2.6vw, 36px);
}

/* The heading takes the keyboard when a screen opens, so that it is read out; it is not a control. */
#cw .cw-account__head h1:focus {
  outline: none;
}

#cw .cw-account__grid {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  align-items: start;
  gap: clamp(24px, 4vw, 72px);
}

#cw .cw-account__nav {
  position: sticky;
  top: calc(var(--cw-header) + 24px);
}

#cw .cw-account__nav ul {
  display: grid;
  gap: 4px;
}

#cw .cw-account__nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 16px;
  border-radius: var(--cw-radius-sm);
  font-size: 15px;
  line-height: 1.3;
  color: var(--cw-brown-soft);
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

#cw .cw-account__nav a:hover {
  background: var(--cw-cream);
  color: var(--cw-brown);
}

#cw .cw-account__nav a[aria-current='page'] {
  background: var(--cw-tile);
  color: var(--cw-brown);
}

/* Leaving the account stands apart from its screens. */
#cw .cw-account__nav li:last-child {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--cw-line);
}

#cw .cw-account__main {
  display: grid;
  gap: 24px;
  min-width: 0;
  max-width: 880px;
}

#cw .cw-account__notice:empty {
  display: none;
}

/* Inside the account the parts of an order are spaced by the screen, like everything else on it. */
#cw .cw-account__main .cw-order__grid,
#cw .cw-account__main .cw-order__updates {
  margin-top: 0;
}

#cw .cw-account__hello {
  font-size: 18px;
  line-height: 1.5;
}

#cw .cw-account__hello strong {
  font-weight: 700;
}

#cw .cw-account__note {
  max-width: 62ch;
  font-size: 15px;
  line-height: 1.6;
  color: var(--cw-brown-soft);
}

/* The dashboard: one tile for each part of the account, with what it holds. */
#cw .cw-account__tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

#cw .cw-account__tile {
  display: grid;
  align-content: start;
  gap: 6px;
  height: 100%;
  padding: 22px;
  border-radius: var(--cw-radius);
  background: var(--cw-cream);
  transition: background-color 0.2s ease;
}

#cw .cw-account__tile:hover {
  background: var(--cw-sand);
}

#cw .cw-account__tile-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: var(--cw-paper);
  color: var(--cw-copper);
}

#cw .cw-account__tile-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 18px;
  line-height: 1.35;
}

#cw .cw-account__tile-name .cw-icon {
  transition: transform 0.25s var(--cw-ease);
}

#cw .cw-account__tile:hover .cw-account__tile-name .cw-icon {
  transform: translateX(4px);
}

#cw .cw-account__tile-text {
  font-size: 14px;
  line-height: 1.45;
  color: var(--cw-brown-soft);
  overflow-wrap: anywhere;
}

/* Orders: one row each; the whole row leads to the order. */
#cw .cw-orders {
  border-top: 1px solid var(--cw-line);
}

#cw .cw-orders__row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 4fr) minmax(0, 3fr) minmax(0, 4fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  padding: 14px 12px;
  border-bottom: 1px solid var(--cw-line);
  font-size: 15px;
  line-height: 1.4;
  transition: background-color 0.2s ease;
}

#cw .cw-orders__row:hover {
  background: var(--cw-cream);
}

#cw .cw-orders__number {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

#cw .cw-orders__number::after {
  content: '';
  position: absolute;
  inset: 0;
}

#cw .cw-orders__number:focus-visible {
  outline: none;
}

#cw .cw-orders__number:focus-visible::after {
  outline: 2px solid var(--cw-navy);
  outline-offset: -2px;
  border-radius: 8px;
}

#cw .cw-orders__date,
#cw .cw-orders__items {
  color: var(--cw-brown-soft);
}

#cw .cw-orders__total {
  font-variant-numeric: tabular-nums;
}

#cw .cw-orders__go {
  color: var(--cw-brown-soft);
}

/* The saved addresses, side by side. */
#cw .cw-account__cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

#cw .cw-account__address {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 14px;
}

/* Forms: the fields one under the other, or on the grid of the checkout's address form. */
#cw .cw-account__form {
  display: grid;
  gap: 24px;
  max-width: 640px;
}

#cw .cw-account__form > [role='alert']:empty,
#cw .cw-account__gate > [role='alert']:empty {
  display: none;
}

#cw .cw-account__fields {
  display: grid;
  gap: 12px;
}

#cw .cw-account__set {
  padding-top: 24px;
  border-top: 1px solid var(--cw-line);
}

#cw .cw-account__set .cw-account__note {
  margin-block: 6px 16px;
}

#cw .cw-account__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

#cw .cw-account__back {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 6px;
  font-size: 14px;
}

/* Signing in, and asking for or choosing a new password. */
#cw .cw-account--gate .cw-account__head {
  justify-items: center;
  padding-top: clamp(20px, 4vw, 56px);
  text-align: center;
}

#cw .cw-account__gate {
  display: grid;
  gap: 20px;
  width: 100%;
  max-width: 480px;
  margin-inline: auto;
  padding: clamp(20px, 3vw, 36px);
  border-radius: var(--cw-radius);
  background: var(--cw-cream);
}

#cw .cw-account__gate .cw-btn {
  margin-top: 8px;
}

#cw .cw-account__gate > .cw-link {
  justify-self: center;
  font-size: 14px;
}

#cw .cw-account__loading {
  display: grid;
  gap: 16px;
  max-width: 880px;
  padding-top: clamp(12px, 2vw, 28px);
}

#cw .cw-account__loading .cw-skeleton {
  height: 120px;
}

#cw .cw-account__loading .cw-skeleton:first-of-type {
  width: min(360px, 70%);
  height: 56px;
}

@media (max-width: 900px) {
  #cw .cw-account__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  /* The account's screens as a row of pills; it scrolls sideways where it does not fit. */
  #cw .cw-account__nav {
    position: static;
    border-block: 1px solid var(--cw-line);
  }

  #cw .cw-account__nav ul {
    display: flex;
    gap: 8px;
    margin-inline: calc(-1 * var(--cw-gutter));
    padding: 12px var(--cw-gutter);
    overflow-x: auto;
    scrollbar-width: none;
  }

  #cw .cw-account__nav ul::-webkit-scrollbar {
    display: none;
  }

  #cw .cw-account__nav li {
    flex: none;
  }

  #cw .cw-account__nav li:last-child {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }

  #cw .cw-account__nav a {
    min-height: 44px;
    padding: 8px 18px;
    border: 1px solid var(--cw-line);
    border-radius: var(--cw-pill);
    color: var(--cw-brown);
    white-space: nowrap;
  }

  #cw .cw-account__nav a[aria-current='page'] {
    border-color: var(--cw-brown);
    background: var(--cw-brown);
    color: #fff;
  }

  #cw .cw-account__main {
    max-width: none;
  }
}

@media (max-width: 760px) {
  #cw .cw-account__tiles,
  #cw .cw-account__cards {
    grid-template-columns: minmax(0, 1fr);
  }

  /* A tile becomes a row: its sign on the left, its words beside it. */
  #cw .cw-account__tile {
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 16px;
    align-items: center;
    padding: 18px;
  }

  #cw .cw-account__tile-icon {
    grid-row: span 2;
    margin-bottom: 0;
  }

  /* An order takes two lines: its number and state, then its date and total. */
  #cw .cw-orders__row {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 4px 12px;
    padding: 14px 0;
  }

  #cw .cw-orders__number {
    grid-area: 1 / 1;
  }

  #cw .cw-orders__status {
    grid-area: 1 / 2;
    justify-self: end;
  }

  #cw .cw-orders__date {
    grid-area: 2 / 1;
    font-size: 14px;
  }

  #cw .cw-orders__total {
    grid-area: 2 / 2;
    justify-self: end;
    font-size: 14px;
  }

  #cw .cw-orders__go {
    grid-area: 1 / 3 / 3 / 4;
  }

  #cw .cw-account__actions .cw-btn {
    flex: 1 1 auto;
  }
}
