/* Bay Ledger — cart. Not Glow Deck / two-column prior cart / fixed ember dock. */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:opsz,wght@6..72,500;6..72,600;6..72,700&family=Work+Sans:wght@400;500;600;700&display=swap');

.page-cart {
  --by-ink: #15202b;
  --by-mute: #5b6b7a;
  --by-fog: #f0f4f8;
  --by-panel: #ffffff;
  --by-signal: #ff5a36;
  --by-pool: #1d9bf0;
  --by-line: rgba(21, 32, 43, 0.1);
  --by-display: 'Newsreader', Georgia, serif;
  --by-body: 'Work Sans', sans-serif;
  --by-ease: cubic-bezier(0.22, 1, 0.36, 1);
  font-family: var(--by-body);
  color: var(--by-ink);
}

.page-cart .a58-main {
  padding: var(--a58-chrome-top, 6.75rem) 0 4rem;
  max-width: none;
  background:
    radial-gradient(ellipse 50% 35% at 100% 0%, rgba(29, 155, 240, 0.14), transparent 55%),
    radial-gradient(ellipse 40% 30% at 0% 40%, rgba(255, 90, 54, 0.1), transparent 50%),
    linear-gradient(180deg, #e8eef4, var(--by-fog) 40%, #e4e9ef);
}
.page-cart .a58-main button,
.page-cart .a58-main input,
.page-cart .a58-main select,
.page-cart .a58-main textarea {
  color: inherit;
}


.page-cart .a58-main > .by-root {
  padding-block: 0;
}

.by-root {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 3.5rem;
  display: grid;
  gap: 1.15rem;
}

.by-kicker {
  margin: 0 0 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--by-pool);
}

.by-mast {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: end;
  padding: 1.25rem 1.3rem;
  background: var(--by-panel);
  border: 1px solid var(--by-line);
  border-radius: 22px;
  box-shadow: 0 16px 40px rgba(21, 32, 43, 0.06);
}
.by-mast h1 {
  margin: 0 0 0.45rem;
  font-family: var(--by-display);
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.95;
}
.by-mast h1 em {
  font-style: italic;
  color: var(--by-signal);
  font-weight: 600;
}
.by-lede {
  margin: 0;
  color: var(--by-mute);
  max-width: 38rem;
  line-height: 1.5;
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
}

.by-meter {
  display: grid;
  justify-items: center;
  gap: 0.15rem;
  min-width: 5.5rem;
  padding: 0.85rem 1rem;
  border-radius: 18px;
  background: var(--by-ink);
  color: #fff;
}
.by-meter strong {
  font-family: var(--by-display);
  font-size: 2.2rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.by-meter span {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}
.by-meter strong.is-pulse {
  animation: by-pulse 0.4s var(--by-ease);
}

/* Named grid layout + container queries */
.by-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.85fr);
  grid-template-areas: 'lines sum';
  gap: 1rem;
  align-items: start;
  container-type: inline-size;
  container-name: bay;
}
.by-lines { grid-area: lines; }
.by-sum { grid-area: sum; }

.by-lines {
  display: grid;
  gap: 0.85rem;
}
.by-lines-head h2 {
  margin: 0 0 0.25rem;
  font-family: var(--by-display);
  font-size: 1.55rem;
  letter-spacing: -0.02em;
}
.by-lines-head p {
  margin: 0;
  color: var(--by-mute);
  font-size: 0.92rem;
}

.by-line-stack {
  display: grid;
  gap: 0.65rem;
}

.by-line {
  container-type: inline-size;
  container-name: line;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.75rem;
  background: var(--by-panel);
  border: 1px solid var(--by-line);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(21, 32, 43, 0.04);
  transition: transform 0.35s var(--by-ease), border-color 0.25s, box-shadow 0.35s, opacity 0.35s;
  animation: by-rise 0.5s var(--by-ease) both;
  animation-delay: calc(var(--li, 0) * 45ms);
}
.by-line:hover {
  transform: translateY(-3px);
  border-color: rgba(29, 155, 240, 0.3);
  box-shadow: 0 18px 40px rgba(21, 32, 43, 0.08);
}
.by-line.is-updating {
  border-color: rgba(255, 90, 54, 0.4);
}
.by-line.is-removing {
  opacity: 0.35;
  transform: scale(0.98);
  pointer-events: none;
}

.by-line-media {
  position: relative;
  display: block;
  width: 96px;
  height: 96px;
  border-radius: 14px;
  overflow: hidden;
  background: #dce4ec;
  clip-path: polygon(0 0, 100% 0, 100% 86%, 86% 100%, 0 100%);
}
.by-line-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--by-ease);
}
.by-line:hover .by-line-media img {
  transform: scale(1.06);
}
.by-line-media span {
  position: absolute;
  left: 0.35rem;
  bottom: 0.35rem;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  background: rgba(21, 32, 43, 0.75);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
}

.by-line-main em {
  display: block;
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--by-pool);
  margin-bottom: 0.2rem;
}
.by-line-main h3 {
  margin: 0 0 0.3rem;
  font-family: var(--by-display);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.by-line-main h3 a {
  color: inherit;
  text-decoration: none;
}
.by-line-main h3 a:hover { color: var(--by-pool); }
.by-line-main p {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  color: var(--by-mute);
  font-size: 0.85rem;
}

.by-line-ops {
  display: grid;
  gap: 0.45rem;
  justify-items: end;
  min-width: 8.5rem;
}
.by-stepper {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.2rem;
  border-radius: 12px;
  background: var(--by-fog);
  border: 1px solid var(--by-line);
}
.by-stepper button {
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--by-ink);
  font: inherit;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.by-stepper button:hover,
.by-stepper button.is-tap {
  background: #fff;
  transform: scale(1.05);
}
.by-stepper input {
  width: 2.6rem;
  border: 0;
  background: transparent;
  text-align: center;
  font: inherit;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--by-ink);
  outline: none;
}
.by-line-total {
  font-family: var(--by-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--by-ink);
  font-variant-numeric: tabular-nums;
}
.by-line-total.is-flash {
  animation: by-flash 0.38s var(--by-ease);
}
.by-remove {
  appearance: none;
  border: 0;
  background: none;
  color: var(--by-signal);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@container line (max-width: 520px) {
  .by-line {
    grid-template-columns: 72px 1fr;
    grid-template-areas:
      'media main'
      'ops ops';
  }
  .by-line-media { grid-area: media; width: 72px; height: 72px; }
  .by-line-main { grid-area: main; }
  .by-line-ops {
    grid-area: ops;
    grid-template-columns: auto 1fr auto;
    justify-items: stretch;
    align-items: center;
    min-width: 0;
    width: 100%;
  }
  .by-line-total { justify-self: end; }
  .by-remove { justify-self: start; grid-column: 1 / -1; }
}

.by-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Settlement bay */
.by-sum {
  position: sticky;
  top: 5.8rem;
}
.by-sum-inner {
  display: grid;
  gap: 0.9rem;
  padding: 1.15rem 1.15rem 1.25rem;
  background: var(--by-ink);
  color: #e7eef5;
  border-radius: 22px;
  box-shadow: 0 22px 50px rgba(21, 32, 43, 0.2);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%);
}
.by-sum-head h2 {
  margin: 0 0 0.2rem;
  font-family: var(--by-display);
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}
.by-sum-head p {
  margin: 0;
  color: rgba(231, 238, 245, 0.6);
  font-size: 0.85rem;
}

.by-path {
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  background: rgba(29, 155, 240, 0.12);
  border: 1px solid rgba(29, 155, 240, 0.25);
  display: grid;
  gap: 0.65rem;
}
.by-path-title {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7dd3fc;
}
.by-path-rails {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}
.by-rail {
  appearance: none;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.45rem;
  align-items: center;
  text-align: left;
  padding: 0.55rem 0.55rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.22);
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
}
.by-rail:hover {
  transform: translateY(-1px);
  border-color: rgba(125, 211, 252, 0.45);
}
.by-rail.is-on {
  border-color: rgba(255, 90, 54, 0.55);
  background: rgba(255, 90, 54, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 90, 54, 0.2);
}
.by-rail-tag {
  width: 1.55rem;
  height: 1.55rem;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.by-rail-body {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}
.by-rail-body strong {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
}
.by-rail-body em {
  font-style: normal;
  font-size: 0.72rem;
  color: rgba(231, 238, 245, 0.65);
  font-variant-numeric: tabular-nums;
}
.by-path-copy {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(231, 238, 245, 0.85);
  line-height: 1.45;
}

/* Promo stamp — not a standard coupon card */
.by-promo {
  position: relative;
  display: grid;
  gap: 0.4rem;
  padding: 0.85rem 0.9rem 0.95rem;
  border-radius: 14px;
  background:
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 8px,
      rgba(255, 255, 255, 0.03) 8px,
      rgba(255, 255, 255, 0.03) 9px
    ),
    rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.22);
  overflow: hidden;
}
.by-promo-stamp {
  position: absolute;
  right: -0.2rem;
  top: -0.35rem;
  width: 3.2rem;
  height: 3.2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid rgba(255, 90, 54, 0.45);
  color: rgba(255, 90, 54, 0.55);
  font-family: var(--by-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  transform: rotate(12deg);
  pointer-events: none;
}
.by-promo.is-stamped .by-promo-stamp {
  color: var(--by-signal);
  border-color: var(--by-signal);
  animation: by-pulse 0.45s var(--by-ease);
}
.by-promo-label {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(231, 238, 245, 0.55);
}
.by-promo-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.4rem;
  align-items: stretch;
}
.by-promo-row input {
  min-width: 0;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  outline: none;
}
.by-promo-row input::placeholder {
  color: rgba(231, 238, 245, 0.35);
  text-transform: none;
  letter-spacing: 0;
}
.by-promo-row input:focus {
  border-color: rgba(125, 211, 252, 0.55);
}
.by-promo-go {
  appearance: none;
  padding: 0 0.95rem;
  border-radius: 10px;
  border: 0;
  background: #fff;
  color: var(--by-ink);
  font: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}
.by-promo-go:hover {
  transform: translateY(-1px);
  background: #7dd3fc;
}
.by-promo-note {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #7dd3fc;
}
.by-promo-note.is-warn {
  color: #fbbf24;
}

.by-totals {
  margin: 0;
  display: grid;
  gap: 0.45rem;
}
.by-totals div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.by-totals dt {
  color: rgba(231, 238, 245, 0.6);
  font-size: 0.88rem;
}
.by-totals dd {
  margin: 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.by-grand {
  border-bottom: 0 !important;
  padding-top: 0.55rem !important;
}
.by-grand dt,
.by-grand dd {
  font-family: var(--by-display);
  font-size: 1.25rem;
  color: #fff;
}
.by-grand dd.is-flash {
  color: var(--by-signal);
  animation: by-flash 0.38s var(--by-ease);
}

.by-sum-actions {
  display: grid;
  gap: 0.45rem;
}
.by-sum-actions .by-btn-ghost {
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.by-sum-actions .by-btn-ghost:hover {
  border-color: #7dd3fc;
  color: #7dd3fc;
}

.by-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.1rem;
  border-radius: 12px;
  background: var(--by-signal);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: transform 0.25s, background 0.25s, box-shadow 0.25s;
}
.by-btn:hover {
  transform: translateY(-2px);
  background: #e84a28;
  box-shadow: 0 12px 28px rgba(255, 90, 54, 0.3);
}
.by-btn-ghost {
  background: transparent;
  color: var(--by-ink);
  border: 1px solid var(--by-line);
}
.by-btn-ghost:hover {
  border-color: var(--by-pool);
  color: var(--by-pool);
  background: transparent;
  box-shadow: none;
}

/* Empty */
.by-void {
  position: relative;
  text-align: center;
  padding: 3rem 1.4rem;
  background: var(--by-panel);
  border: 1px solid var(--by-line);
  border-radius: 24px;
  overflow: hidden;
}
.by-void-mark {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  border: 2px dashed rgba(29, 155, 240, 0.45);
  box-shadow: 0 0 0 12px rgba(29, 155, 240, 0.06);
}
.by-void h2 {
  margin: 0 0 0.45rem;
  font-family: var(--by-display);
  font-size: 2rem;
}
.by-void p {
  margin: 0 auto 1.2rem;
  color: var(--by-mute);
  max-width: 32rem;
}
.by-void-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

@keyframes by-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes by-flash {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(1.06); }
}
@keyframes by-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

@container bay (max-width: 780px) {
  .by-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      'lines'
      'sum';
  }
  .by-sum {
    position: relative;
    top: auto;
  }
  .by-sum-inner {
    clip-path: none;
    border-radius: 20px;
  }
  .by-path-rails {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .by-root { width: calc(100% - 1.25rem); }
  .by-mast {
    grid-template-columns: 1fr;
  }
  .by-meter {
    justify-self: start;
  }
  .by-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      'lines'
      'sum';
  }
  .by-sum { position: relative; top: auto; }
  .by-sum-inner { clip-path: none; }
}

@media (prefers-reduced-motion: reduce) {
  .by-line,
  .by-line-total.is-flash,
  .by-meter strong.is-pulse {
    animation: none !important;
  }
}
