/* Build your stack — pill picker (light editorial, rd-* tokens) */

.bys-page {
  position: relative;
  padding-top: clamp(100px, 12vw, 140px);
  padding-bottom: clamp(72px, 10vw, 120px);
}

.bys-page-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: var(--rd-grain-url);
  background-size: 120px 120px;
  mix-blend-mode: multiply;
}

.bys-inner {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 4vw, 36px);
}

.bys-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 620px;
}

.bys-title {
  margin: 0;
  font-family: var(--rd-font-display);
  font-weight: 600;
  font-size: clamp(34px, 5vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--rd-ink);
}

.bys-lead {
  margin: 0;
  font-size: clamp(16px, 2.2vw, 18px);
  line-height: 1.55;
  color: var(--rd-muted);
}

.bys-card {
  background: var(--rd-surface);
  border: 1px solid var(--rd-hairline);
  border-radius: 8px;
  padding: clamp(12px, 2vw, 16px) clamp(20px, 4vw, 40px) clamp(28px, 4vw, 36px);
  box-shadow: 0 1px 0 rgba(26, 31, 34, 0.04);
}

.bys-rows {
  display: flex;
  flex-direction: column;
}

.bys-row {
  padding: clamp(20px, 3vw, 24px) 0 4px;
  border-top: 1px solid var(--rd-hairline);
}

.bys-row:first-child {
  border-top: none;
}

.bys-row[data-row="shop"] {
  border-bottom: 1px solid var(--rd-hairline);
  padding-bottom: 0;
}

.bys-row-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.bys-row-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rd-ink);
}

.bys-row-qual {
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--rd-muted);
}

.bys-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.bys-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  min-height: 44px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--rd-hairline);
  background: var(--rd-bg);
  color: var(--rd-muted);
  font-family: var(--rd-font-body);
  font-size: 15px;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition:
    border-color 280ms var(--rd-ease),
    color 280ms var(--rd-ease),
    background 280ms var(--rd-ease),
    transform 280ms var(--rd-ease);
}

.bys-pill:hover {
  border-color: var(--rd-muted);
  color: var(--rd-ink);
  background: var(--rd-surface-hover);
}

.bys-pill.is-dashed {
  border-style: dashed;
}

.bys-pill-name {
  font-weight: 500;
}

.bys-pill-price {
  font-family: var(--rd-font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.bys-pill-chevron {
  display: inline-flex;
  align-items: center;
  margin-left: 2px;
  opacity: 0.45;
  transform: rotate(0deg);
  transition:
    transform 280ms var(--rd-ease),
    opacity 280ms var(--rd-ease);
}

.bys-pill.is-selected {
  border-color: var(--rd-green);
  background: var(--rd-surface-hover);
  color: var(--rd-ink);
}

.bys-pill.is-selected .bys-pill-price {
  color: var(--rd-green-deep);
}

.bys-pill.is-selected .bys-pill-chevron {
  opacity: 0.85;
}

.bys-pill.is-open .bys-pill-chevron {
  opacity: 1;
  transform: rotate(180deg);
}

.bys-panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition:
    grid-template-rows 280ms var(--rd-ease),
    opacity 280ms var(--rd-ease);
}

.bys-panel.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
}

.bys-panel-wrap {
  overflow: hidden;
}

.bys-panel-inner {
  padding: 20px 0 4px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bys-panel-promise {
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
  color: var(--rd-ink);
}

.bys-panel-bullets {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 40px;
}

.bys-panel-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--rd-muted);
}

.bys-panel-bullets li::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--rd-green);
}

.bys-totals {
  padding-top: clamp(24px, 4vw, 32px);
  border-top: 1px solid var(--rd-hairline);
}

.bys-summary {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 520px;
}

.bys-breakdown {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bys-breakdown-heading {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rd-caption);
}

.bys-breakdown-lines {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bys-breakdown-subhead {
  margin: 6px 0 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rd-caption);
}

.bys-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.bys-line-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.bys-line-cat {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--rd-caption);
}

.bys-line-name {
  font-size: 15px;
  line-height: 1.35;
  color: var(--rd-ink);
}

.bys-line-value {
  flex: none;
  font-family: var(--rd-font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--rd-ink);
  white-space: nowrap;
}

.bys-line-period {
  font-size: 14px;
  font-weight: 500;
  color: var(--rd-muted);
}

.bys-discount-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px dashed rgba(76, 163, 120, 0.35);
  color: var(--rd-green-deep);
}

.bys-discount-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.bys-discount-label {
  font-size: 15px;
  font-weight: 500;
}

.bys-discount-save {
  font-size: 13px;
  color: var(--rd-green);
}

.bys-discount-value {
  flex: none;
  font-family: var(--rd-font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.bys-total-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--rd-hairline);
}

.bys-total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}

.bys-total-label {
  font-size: 15px;
  font-weight: 500;
  color: var(--rd-muted);
}

.bys-total-figure {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.bys-total {
  font-family: var(--rd-font-display);
  font-size: clamp(40px, 10vw, 56px);
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--rd-ink);
}

.bys-total-suffix {
  font-size: 17px;
  color: var(--rd-muted);
}

.bys-total-note {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--rd-caption);
}

.bys-shop-callout {
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid rgba(76, 163, 120, 0.28);
  background: rgba(76, 163, 120, 0.08);
}

.bys-shop-callout[hidden] {
  display: none !important;
}

.bys-shop-callout-title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--rd-green-deep);
}

.bys-shop-callout-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--rd-muted);
}

.bys-discount-row[hidden],
.bys-nudge[hidden] {
  display: none !important;
}

.bys-init-fallback {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--rd-hairline);
  border-radius: 8px;
  background: var(--rd-bg);
  color: var(--rd-muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.bys-nudge {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--rd-muted);
}

.bys-cta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.bys-email-panel {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--rd-hairline);
}

.bys-email-panel[hidden] {
  display: none !important;
}

.bys-email-form {
  display: grid;
  gap: 12px;
  max-width: 360px;
}

.bys-email-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rd-caption);
}

.bys-email-input {
  width: 100%;
  padding: 10px 2px;
  border: 0;
  border-bottom: 1px solid var(--rd-hairline);
  border-radius: 0;
  background: transparent;
  color: var(--rd-ink);
  font: inherit;
  font-size: 16px;
  transition: border-color 260ms var(--rd-ease);
}

.bys-email-input::placeholder {
  color: var(--rd-caption);
}

.bys-email-input:focus {
  outline: none;
  border-bottom-color: var(--rd-green);
}

.bys-email-input.is-bad {
  border-bottom-color: var(--rd-error);
}

.bys-email-send {
  justify-self: start;
}

.bys-email-done {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--rd-green-deep);
}

.bys-email-error {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--rd-error);
}

.bys-email-error[hidden],
.bys-email-done[hidden] {
  display: none !important;
}

.bys-cta-call[hidden] {
  display: none !important;
}

.bys-cta-secondary {
  font-size: 15px;
  color: var(--rd-muted);
  border-bottom: 1px solid var(--rd-hairline);
  padding-bottom: 2px;
  transition:
    color 280ms var(--rd-ease),
    border-color 280ms var(--rd-ease);
}

.bys-cta-secondary:hover {
  color: var(--rd-ink);
  border-color: var(--rd-ink);
}

/* GSAP motion helpers (JS clears inline styles after tween) */
.bys-card.is-motion-ready {
  will-change: transform, opacity;
}

@media (max-width: 720px) {
  .bys-card {
    padding: 12px 16px 24px;
  }

  .bys-panel-bullets {
    grid-template-columns: 1fr;
  }

  .bys-summary {
    max-width: none;
  }

  .bys-line-value {
    font-size: 16px;
  }

  .bys-total {
    font-size: clamp(36px, 11vw, 48px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bys-pill,
  .bys-pill-chevron,
  .bys-panel,
  .bys-cta-secondary {
    transition-duration: 0.01ms !important;
  }
}
