/*
================================================================
Space Vanta Theme 2.0
Module: Cart page (styles)
Path: public/sv-cart/page.css
Version: SVCART-PAGE-002

Everything is under .svpg / .svpg__*. Nothing here touches the header.

Look: warm paper ground (the theme's), metal edges, chamfered plates
stacked with a ghost plate behind each, blue as the only accent.
The two groups sit on plates that lean in opposite directions with
a seam between them: one cart, two ways of shipping.

Desktop: items on the left, a floating summary plate on the right.
Mobile (<= 767px) is its own layout: compact lines, and a docked
checkout bar at the bottom. It is not the desktop page made smaller.
================================================================
*/

.svpg {
  --svpg-paper: #fbf7f0;
  --svpg-paper-2: #f7f2e8;
  --svpg-ground: var(--sv-ground-2, #f1ebdf);
  --svpg-ink: var(--sv-ink, #252321);
  --svpg-ink-2: #3a352f;
  --svpg-muted: #5f574d;
  --svpg-line: #ddd6c9;
  --svpg-plate: #d5cfc3;
  --svpg-blue: var(--sv-blue, #1d6bff);
  --svpg-blue-hi: var(--sv-blue-2, #4d8dff);
  --svpg-blue-lo: #1458e0;
  --svpg-metal: linear-gradient(135deg, #ffffff 0%, #aeb6c2 22%, #f2f4f8 46%, #98a3b3 72%, #f7f8fb 100%);
  --svpg-font: var(--sv-font, "Inter", "Manrope", -apple-system, "Segoe UI", sans-serif);
  --svpg-mono: ui-monospace, "IBM Plex Mono", SFMono-Regular, Menlo, Consolas, monospace;

  width: 100%;
  color: var(--svpg-ink);
  font-family: var(--svpg-font);
  -webkit-font-smoothing: antialiased;
}

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

.svpg :where(button) { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; }
.svpg :where(a) { color: inherit; text-decoration: none; }
.svpg .svpg__cta { color: #fff; }
.svpg :focus-visible { outline: 2px solid var(--svpg-blue); outline-offset: 3px; }
.svpg form { margin: 0; }

.svpg__mono {
  font-family: var(--svpg-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.svpg__wrap {
  width: min(100%, var(--sv-container-max, 1280px));
  margin: 0 auto;
  padding: var(--sv-space-10, 56px) var(--sv-container-gutter-desktop, 34px) 112px;
}

/* ---------- head ---------- */

.svpg__head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 36px;
}
.svpg__title {
  margin: 0;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 0.95;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.svpg__count { color: var(--svpg-muted); }

.svpg__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- frame ---------- */

.svpg__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 56px;
  align-items: start;
}

.svpg[data-state="empty"] .svpg__side,
.svpg[data-state="empty"] .svpg__dock { display: none; }
.svpg[data-state="empty"] .svpg__grid { grid-template-columns: minmax(0, 1fr); }

.svpg__main { display: flex; flex-direction: column; min-width: 0; }

/* ---------- plates ---------- */

.svpg__group { position: relative; margin: 0 14px 14px 0; animation: svpg-up 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(var(--d, 0) * 1ms); }
.svpg__main.is-settled .svpg__group { animation: none; }

.svpg__ghost {
  position: absolute;
  left: 14px;
  top: 14px;
  right: -14px;
  bottom: -14px;
  border: 1px solid #aab3c1;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(185, 193, 206, 0.2));
  clip-path: polygon(22px 0, 100% 0, 100% 100%, 0 100%, 0 22px);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
  pointer-events: none;
}
/* the second group leans the other way */
.svpg__group--onDemand { margin: 0 0 14px 14px; }
.svpg__group--onDemand .svpg__ghost { left: -14px; right: 14px; }
.svpg__group:hover .svpg__ghost { transform: translate(3px, 3px); }
.svpg__group--onDemand:hover .svpg__ghost { transform: translate(-3px, 3px); }

.svpg__lift { position: relative; filter: drop-shadow(0 18px 22px rgba(37, 35, 33, 0.1)); }
.svpg__shell {
  padding: 1.5px;
  background: var(--svpg-metal);
  clip-path: polygon(22px 0, 100% 0, 100% 100%, 0 100%, 0 22px);
}
.svpg__in {
  padding: 22px 30px 8px;
  background: var(--svpg-paper);
  clip-path: polygon(21px 0, 100% 0, 100% 100%, 0 100%, 0 21px);
}
.svpg__group--onDemand .svpg__in {
  background:
    linear-gradient(135deg, rgba(185, 193, 206, 0.14), rgba(185, 193, 206, 0) 55%),
    var(--svpg-paper);
}

.svpg__ghead { position: relative; display: flex; align-items: center; gap: 12px; padding: 0 0 14px; }
.svpg__idx { color: var(--svpg-blue); font-weight: 500; }
.svpg__label { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.svpg__gcount { color: var(--svpg-muted); }
.svpg__gline { flex: 1; height: 1px; background: var(--svpg-line); }
.svpg__node {
  width: 9px;
  height: 9px;
  background: var(--svpg-paper);
  border: 1.5px solid var(--svpg-blue);
  transform: rotate(45deg);
  transition: background 0.3s;
}
.svpg__node.is-on { background: var(--svpg-blue); }
.svpg__group--onDemand .svpg__node { position: relative; }
.svpg__group--onDemand .svpg__node::after {
  content: "";
  position: absolute;
  inset: -1.5px;
  border: 1.5px solid var(--svpg-blue);
  transform: translate(3px, -3px);
  opacity: 0.55;
}

/* the cut between the two groups */
.svpg__seam { display: flex; align-items: stretch; height: 22px; margin: 4px 0 18px; }
.svpg__seam i:nth-child(1) { flex: 1; align-self: flex-end; height: 1px; margin-bottom: 4px; background: #b9c1ce; }
.svpg__seam i:nth-child(2) { width: 1px; margin: 0 2px; background: var(--svpg-blue); transform: skewX(-32deg); }
.svpg__seam i:nth-child(3) { flex: 1; align-self: flex-start; height: 1px; margin-top: 4px; background: #b9c1ce; }

/* ---------- lines ---------- */

.svpg__list { display: flex; flex-direction: column; }
.svpg__item {
  position: relative;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 22px;
  padding: 18px 0;
  border-top: 1px solid var(--svpg-line);
}
.svpg__item:first-child { border-top: 0; padding-top: 4px; }
.svpg__item[aria-busy="true"] { opacity: 0.72; pointer-events: none; }
.svpg__item.is-splitting { transition: height 0.24s cubic-bezier(0.5, 0, 0.2, 1), padding 0.24s; }
.svpg__item.is-collapsing { padding-top: 0 !important; padding-bottom: 0 !important; border-color: transparent; }

.svpg__thumb { position: relative; display: block; width: 112px; height: 112px; }
.svpg__thumb::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  width: 112px;
  height: 112px;
  border: 1px solid var(--svpg-plate);
}
.svpg__thumb-frame {
  position: relative;
  display: block;
  width: 108px;
  height: 108px;
  padding: 1px;
  background: var(--svpg-metal);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.svpg__thumb-img {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  background: #ebe3d5;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  overflow: hidden;
}
.svpg__thumb-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.svpg__thumb-img b {
  position: absolute;
  left: 22px;
  top: 20px;
  width: 40px;
  height: 52px;
  background: linear-gradient(150deg, #7fb0ff, var(--svpg-blue) 55%, #0f4fd6);
  clip-path: polygon(0 0, 100% 20%, 80% 100%, 10% 80%);
}

.svpg__body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.svpg__row { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.svpg__name { font-size: 16px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.svpg__name:hover { text-decoration: underline; text-underline-offset: 3px; }
.svpg__line { font-family: var(--svpg-mono); font-size: 14px; white-space: nowrap; }
.svpg__variant { font-size: 13px; color: var(--svpg-muted); }
.svpg__unit { color: var(--svpg-muted); font-size: 10.5px; }

.svpg__ctrl { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.svpg__qty { display: inline-flex; align-items: center; border: 1px solid #cfc8bb; background: rgba(255, 255, 255, 0.4); }
.svpg__qty button { width: 42px; height: 42px; font-size: 17px; transition: background 0.15s; }
.svpg__qty button:hover { background: rgba(37, 35, 33, 0.06); }
.svpg__qty output { min-width: 32px; text-align: center; font-size: 14px; font-weight: 700; }
.svpg__rm { height: 42px; padding: 0 4px; color: var(--svpg-muted); }
.svpg__rm:hover { color: var(--svpg-ink); text-decoration: underline; text-underline-offset: 4px; }

/* quantity: the number ticks */
.svpg__item[data-tick="up"] .svpg__qty output,
.svpg__item[data-tick="up"] .svpg__line { animation: svpg-tick-up 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.svpg__item[data-tick="down"] .svpg__qty output,
.svpg__item[data-tick="down"] .svpg__line { animation: svpg-tick-down 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) both; }

/* remove: cut on a diagonal, halves slide apart */
.svpg__item.is-splitting > *:not(.svpg__shardrow) { visibility: hidden; }
.svpg__shardrow {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 22px;
  padding: 18px 0;
  background: var(--svpg-paper);
  pointer-events: none;
}
.svpg__shardrow--a { clip-path: polygon(0 0, 64% 0, 40% 100%, 0 100%); animation: svpg-cut-a 0.52s cubic-bezier(0.5, 0, 0.2, 1) 0.06s both; }
.svpg__shardrow--b { clip-path: polygon(64% 0, 100% 0, 100% 100%, 40% 100%); animation: svpg-cut-b 0.52s cubic-bezier(0.5, 0, 0.2, 1) 0.06s both; }
.svpg__item.is-splitting::after {
  content: "";
  position: absolute;
  left: 40%;
  width: 24%;
  top: 0;
  bottom: 0;
  background: linear-gradient(to bottom right, rgba(29, 107, 255, 0) calc(50% - 1px), var(--svpg-blue) 50%, rgba(29, 107, 255, 0) calc(50% + 1px));
  animation: svpg-seam 0.5s ease-out both;
  pointer-events: none;
}

/* ---------- route ---------- */

.svpg__route {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 6px 0 20px;
  padding: 14px 16px;
  background: var(--svpg-ground);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.svpg__route[data-state="loading"] .svpg__cells { opacity: 0.45; }
.svpg__rline { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.svpg__status { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; }
.svpg__thresh { color: var(--svpg-muted); }
.svpg__cells { position: relative; display: flex; gap: 4px; overflow: hidden; transition: opacity 0.2s; }
.svpg__cell {
  flex: 1;
  height: 9px;
  background: #d9d5cb;
  transform: skewX(-18deg);
  transition: background 0.35s ease;
  transition-delay: calc(var(--i, 0) * 40ms);
}
.svpg__cell.is-on { background: linear-gradient(180deg, var(--svpg-blue-hi), var(--svpg-blue)); }
.svpg__scan {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 26%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0));
  transform: skewX(-18deg);
  animation: svpg-scan 1s ease 0.1s both;
  pointer-events: none;
}
.svpg__note { color: var(--svpg-muted); line-height: 1.5; font-size: 10.5px; }

/* ---------- summary (desktop: a plate that floats beside the lines) ---------- */

.svpg__side {
  position: sticky;
  top: 132px;
  align-self: start;
  padding: 0 0 14px 14px;
}
.svpg__plate { position: relative; }
.svpg__plate::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 14px;
  right: 14px;
  bottom: -14px;
  border: 1px solid #aab3c1;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(185, 193, 206, 0.2));
  clip-path: polygon(22px 0, 100% 0, 100% 100%, 0 100%, 0 22px);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.svpg__plate:hover::before { transform: translate(-3px, 3px); }
.svpg__plate .svpg__in { display: flex; flex-direction: column; gap: 16px; padding: 24px 26px 26px; }

.svpg__sumhead { color: var(--svpg-muted); }
.svpg__sub { display: flex; justify-content: space-between; align-items: baseline; }
.svpg__sub span { font-size: 15px; font-weight: 600; }
.svpg__sub strong { font-size: 28px; font-weight: 800; letter-spacing: -0.015em; }
.svpg__sub strong.is-tick { animation: svpg-tick-up 0.42s ease both; }

.svpg__sumrows { list-style: none; margin: 0; padding: 12px 0; border-top: 1px solid var(--svpg-line); border-bottom: 1px solid var(--svpg-line); display: flex; flex-direction: column; gap: 8px; }
.svpg__sumrows li { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 600; align-items: center; }
.svpg__sumrows li span:last-child { display: inline-flex; align-items: center; gap: 6px; }
.svpg__sumrows .svpg__mono { color: var(--svpg-muted); font-weight: 500; }

.svpg__meta { display: flex; flex-direction: column; gap: 6px; }
.svpg__duties { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--svpg-ink-2); }
.svpg__small { color: var(--svpg-muted); font-size: 10.5px; }

.svpg__actions { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }

/* primary button: blue part on an offset metal plate */
.svpg__ctawrap { position: relative; padding: 0 7px 7px 0; }
.svpg__ctawrap::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 7px;
  right: 0;
  bottom: 0;
  background: var(--svpg-metal);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}
.svpg__cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 0 28px;
  background: linear-gradient(180deg, #2273ff 0%, var(--svpg-blue) 55%, var(--svpg-blue-lo) 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  overflow: hidden;
  transition: transform 0.18s ease, filter 0.2s;
}
.svpg__cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(190px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0) 62%);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}
.svpg__cta:hover::before { opacity: 1; }
.svpg__ctawrap:hover .svpg__cta { transform: translate(-2px, -2px); }
.svpg__ctawrap:active .svpg__cta { transform: translate(2px, 2px); }
.svpg__cta[aria-busy="true"] { filter: saturate(0.7); cursor: progress; }
.svpg__cta[aria-busy="true"]::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 26%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
  transform: skewX(-18deg);
  animation: svpg-scan 1.1s ease infinite;
}
.svpg__cta svg { flex: none; }

.svpg__link { display: flex; align-items: center; justify-content: center; min-height: 46px; font-size: 14px; font-weight: 700; transition: background 0.15s; }
.svpg__link:hover { background: rgba(37, 35, 33, 0.06); }

.svpg__dock { display: none; }

/* ---------- empty ---------- */

.svpg__empty { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; padding: 24px 0 40px; max-width: 460px; }
.svpg__empty h2 { margin: 6px 0 0; font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.svpg__empty p { margin: -8px 0 0; font-size: 15px; line-height: 1.55; color: var(--svpg-muted); }
.svpg__empty .svpg__ctawrap { min-width: 240px; }

.svpg__err { margin: 0 0 14px; padding: 10px 12px; font-size: 13px; color: #8a1f1f; background: #fbeaea; }

/* first paint, before the cart arrives */
.svpg__skeleton { height: 280px; margin: 0 14px 14px 0; background: linear-gradient(110deg, rgba(185, 193, 206, 0.14) 30%, rgba(255, 255, 255, 0.5) 50%, rgba(185, 193, 206, 0.14) 70%) 0 0 / 220% 100%; clip-path: polygon(22px 0, 100% 0, 100% 100%, 0 100%, 0 22px); animation: svpg-shimmer 1.6s linear infinite; }
.svpg__main:not(:empty) > .svpg__skeleton:only-child { display: block; }

/* ---------- motion ---------- */

@keyframes svpg-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes svpg-shimmer { from { background-position: 100% 0; } to { background-position: -120% 0; } }
@keyframes svpg-tick-up { from { opacity: 0.2; transform: translateY(8px); color: var(--svpg-blue); } to { opacity: 1; transform: none; } }
@keyframes svpg-tick-down { from { opacity: 0.2; transform: translateY(-8px); color: var(--svpg-muted); } to { opacity: 1; transform: none; } }
@keyframes svpg-cut-a { to { transform: translate(-34px, 7px) rotate(-1.4deg); opacity: 0; filter: grayscale(1); } }
@keyframes svpg-cut-b { to { transform: translate(34px, -7px) rotate(1.4deg); opacity: 0; filter: grayscale(1); } }
@keyframes svpg-seam { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }
@keyframes svpg-scan { from { left: -30%; opacity: 1; } to { left: 120%; opacity: 0; } }

html[data-sv-motion="calm"] .svpg *,
html[data-sv-motion="calm"] .svpg *::before,
html[data-sv-motion="calm"] .svpg *::after { animation: none !important; transition: none !important; }

@media (prefers-reduced-motion: reduce) {
  .svpg *, .svpg *::before, .svpg *::after { animation: none !important; transition: none !important; }
}

/* ---------- tablet: one column, summary below ---------- */

@media (max-width: 1023px) {
  .svpg__grid { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .svpg__side { position: static; padding-left: 0; max-width: 520px; }
}

/* ================================================================
   MOBILE — its own layout
   Compact lines (thumbnail left, price and stepper right), a seam
   between the groups, and a docked checkout bar. The summary plate
   keeps the facts; the dock keeps the button within reach.
   ================================================================ */

@media (max-width: 767px) {
  .svpg__wrap { padding: 20px 16px calc(132px + env(safe-area-inset-bottom, 0px)); }

  .svpg__head { margin-bottom: 20px; gap: 10px; }
  .svpg__title { font-size: 34px; }

  .svpg__grid { gap: 26px; }

  .svpg__group { margin: 0 8px 10px 0; }
  .svpg__group--onDemand { margin: 0 0 10px 8px; }
  .svpg__ghost { left: 8px; top: 8px; right: -8px; bottom: -8px; clip-path: polygon(14px 0, 100% 0, 100% 100%, 0 100%, 0 14px); }
  .svpg__group--onDemand .svpg__ghost { left: -8px; right: 8px; }
  .svpg__lift { filter: drop-shadow(0 10px 14px rgba(37, 35, 33, 0.1)); }
  .svpg__shell { clip-path: polygon(14px 0, 100% 0, 100% 100%, 0 100%, 0 14px); }
  .svpg__in { padding: 16px 16px 4px; clip-path: polygon(13px 0, 100% 0, 100% 100%, 0 100%, 0 13px); }

  .svpg__ghead { padding-bottom: 8px; gap: 10px; }
  .svpg__gcount { display: none; }

  /* lines: a tile — picture, then name over price, stepper on the bottom edge */
  .svpg__item,
  .svpg__shardrow { grid-template-columns: 84px minmax(0, 1fr); gap: 14px; padding: 14px 0; }
  .svpg__thumb { width: 84px; height: 84px; }
  .svpg__thumb::before { width: 84px; height: 84px; left: 4px; top: 4px; }
  .svpg__thumb-frame { width: 80px; height: 80px; clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
  .svpg__thumb-img { clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
  .svpg__thumb-img b { left: 16px; top: 14px; width: 30px; height: 40px; }

  .svpg__row { flex-direction: column; gap: 3px; }
  .svpg__name { font-size: 15px; }
  .svpg__line { font-size: 13px; }
  .svpg__ctrl { margin-top: 6px; }
  .svpg__qty button { width: 44px; height: 44px; }
  .svpg__rm { height: 44px; }

  .svpg__route { margin: 4px 0 14px; padding: 12px 12px; }
  .svpg__rline { flex-direction: column; align-items: flex-start; gap: 3px; }
  .svpg__seam { height: 18px; margin: 2px 0 12px; }

  /* the summary plate is facts only: the dock carries the button */
  .svpg__side { max-width: none; padding-left: 0; padding-right: 8px; }
  .svpg__plate::before { left: -8px; top: 8px; right: 8px; bottom: -8px; clip-path: polygon(14px 0, 100% 0, 100% 100%, 0 100%, 0 14px); }
  .svpg__plate .svpg__in { padding: 18px 18px 20px; }
  .svpg__sub strong { font-size: 24px; }
  .svpg__actions .svpg__ctawrap { display: none; }
  .svpg__actions { padding-top: 0; }

  .svpg__dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 800;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: var(--svpg-paper);
    box-shadow: 0 -14px 28px rgba(37, 35, 33, 0.12);
    animation: svpg-dock 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s both;
  }
  .svpg__dock::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 2px;
    background: var(--svpg-metal);
  }
  .svpg__dock-sum { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: none; }
  .svpg__dock-sum strong { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
  .svpg__dock-sum span { color: var(--svpg-muted); font-size: 10px; }
  .svpg__dock .svpg__ctawrap { flex: 1; min-width: 0; }
  .svpg__dock .svpg__cta { min-height: 52px; font-size: 15px; padding: 0 18px; }

  .svpg[data-state="empty"] .svpg__wrap { padding-bottom: 56px; }
  .svpg__empty { padding-top: 10px; }
}

@keyframes svpg-dock { from { transform: translateY(100%); } to { transform: none; } }

[data-svpg-sum] { display: flex; flex-direction: column; gap: 16px; }
[data-svpg-sum]:empty { display: none; }


/* =================================================================
   v2 — floating planes, no blurred shadow; Regular and Made to order
   differ in structure (solid spine vs dashed, stacked edge)
   ================================================================= */

.svpg__lift { filter: none; }

/* depth: two hard planes under each plate (hatched, then a blue outline) */
.svpg__ghost {
  border: 0;
  left: 16px;
  top: 16px;
  right: -16px;
  bottom: -16px;
  background:
    repeating-linear-gradient(135deg, rgba(37, 35, 33, 0.15) 0 1px, rgba(37, 35, 33, 0) 1px 6px),
    linear-gradient(135deg, rgba(185, 193, 206, 0.24), rgba(185, 193, 206, 0));
}
.svpg__ghost::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 14px;
  right: -14px;
  bottom: -14px;
  border: 1px solid rgba(29, 107, 255, 0.45);
  clip-path: polygon(22px 0, 100% 0, 100% 100%, 0 100%, 0 22px);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.svpg__group:hover .svpg__ghost::after { transform: translate(3px, 3px); }
.svpg__group--onDemand .svpg__ghost::after { left: -14px; right: 14px; }
.svpg__group { margin-right: 30px; margin-bottom: 30px; }
.svpg__group--onDemand { margin-left: 30px; margin-right: 0; }
.svpg__group--onDemand .svpg__ghost { left: -16px; right: 16px; }

/* Regular: one solid plate with a blue spine */
.svpg__group--regular .svpg__in { box-shadow: inset 3px 0 0 var(--svpg-blue); padding-left: 33px; }
.svpg__group--regular .svpg__node { display: none; }

/* Made to order: dashed rim, hatched head, chip */
.svpg__group--onDemand .svpg__shell {
  background:
    repeating-linear-gradient(90deg, #b9c1ce 0 8px, #eef0f4 8px 12px);
}
.svpg__group--onDemand .svpg__ghead {
  margin: -22px -30px 14px;
  padding: 14px 30px 12px;
  background: repeating-linear-gradient(135deg, rgba(185, 193, 206, 0.3) 0 1px, rgba(185, 193, 206, 0) 1px 6px);
  border-bottom: 1px dashed #aab3c1;
}
.svpg__chip {
  flex: none;
  padding: 3px 8px;
  font-size: 10px;
  color: var(--svpg-blue);
  border: 1px solid var(--svpg-blue);
  clip-path: polygon(4px 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%, 0 4px);
}

/* summary plate follows the same depth language */
.svpg__plate::before {
  border: 0;
  background:
    repeating-linear-gradient(135deg, rgba(37, 35, 33, 0.15) 0 1px, rgba(37, 35, 33, 0) 1px 6px),
    linear-gradient(135deg, rgba(185, 193, 206, 0.24), rgba(185, 193, 206, 0));
}
.svpg__plate .svpg__in { box-shadow: inset 0 3px 0 var(--svpg-blue); }

@media (max-width: 767px) {
  .svpg__group { margin-right: 18px; margin-bottom: 22px; }
  .svpg__group--onDemand { margin-left: 18px; margin-right: 0; }
  .svpg__ghost { left: 10px; top: 10px; right: -10px; bottom: -10px; }
  .svpg__group--onDemand .svpg__ghost { left: -10px; right: 10px; }
  .svpg__group--onDemand .svpg__ghead { margin: -22px -18px 12px; padding: 12px 18px 10px; }
  .svpg__group--regular .svpg__in { padding-left: 21px; }
  .svpg__dock { box-shadow: none; border-top: 1px solid #b9c1ce; }
}
