/* Build Your Stack — picker-specific styles (page-scoped, additive to styles.css tokens) */

/*
 * Safety net: an authored `display:` on any .stack-* class silently defeats the
 * `hidden` attribute (author stylesheets always beat the UA default `[hidden]{display:none}`
 * rule, regardless of source order). Without this, any card/section given its own
 * `display: flex|grid|block` needs a matching `[hidden]` override or it renders anyway
 * even when JS sets `el.hidden = true`. Concrete case: `.stack-pay-card { display: flex }`
 * had no such override, so the Performance card stayed visible with no booking module
 * selected (James, 2026-07-26 screenshot). Keep this rule; it makes every future
 * .stack-* [hidden] correct by default instead of relying on remembering a per-class override.
 */
[hidden] {
  display: none !important;
}

.stack-main {
  padding: 40px 0 80px;
}

.stack-shell {
  max-width: 640px;
  margin: 0 auto;
}

/* Topbar + progress */
.stack-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.stack-topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--mist);
  text-transform: uppercase;
}

.stack-topbar-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--brand-slate);
  font-size: 10px;
  font-weight: 700;
  color: var(--ink);
}

.stack-topbar-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--stone);
  text-transform: uppercase;
}

.stack-restart {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--stone);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.stack-restart:hover {
  color: var(--brand-green);
}

.stack-progress {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 2rem;
}

.stack-progress-seg {
  height: 3px;
  border-radius: var(--radius-full);
  background: var(--hairline);
  transition: background 0.2s ease;
}

.stack-progress-seg.is-filled {
  background: var(--brand-green);
}

/* Question screens */
.stack-step {
  margin-bottom: 2.5rem;
}

.stack-step[hidden] {
  display: none;
}

.stack-question-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 3.2vw, 1.9rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.3px;
  color: var(--ink);
}

.stack-question-lead {
  margin: 0 0 1.5rem;
  font-size: 15px;
  color: var(--steel);
}

.stack-options {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.stack-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.stack-option:hover {
  border-color: var(--steel);
}

.stack-option:focus-visible {
  outline: 2px solid var(--brand-green);
  outline-offset: 2px;
}

.stack-option.is-selected {
  border-color: var(--brand-green);
  background: rgba(18, 165, 116, 0.06);
}

.stack-option--talk {
  border-style: dashed;
}

.stack-option--talk.is-selected {
  border-color: var(--brand-green);
  border-style: dashed;
}

.stack-option-radio {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--steel);
  position: relative;
}

.stack-option.is-selected .stack-option-radio {
  border-color: var(--brand-green);
}

.stack-option.is-selected .stack-option-radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--brand-green);
}

.stack-option-body {
  flex: 1;
  min-width: 0;
}

.stack-option-title {
  margin: 0 0 0.15rem;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.stack-option-tagline {
  margin: 0;
  font-size: 13px;
  color: var(--steel);
}

.stack-option-price {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--stone);
}

.stack-option.is-selected .stack-option-price {
  color: var(--brand-green);
}

.stack-option-price--talk {
  color: var(--brand-green);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 11px;
}

/* Sector grid (Q4) */
.stack-sector-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 560px) {
  .stack-sector-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stack-sector-tile {
  padding: 0.85rem 0.5rem;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--mist);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.stack-sector-tile:hover {
  border-color: var(--steel);
  color: var(--ink);
}

.stack-sector-tile.is-selected {
  border-color: var(--brand-green);
  background: rgba(18, 165, 116, 0.08);
  color: var(--brand-green);
}

/* Nav row: back + escape hatch */
.stack-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.stack-back-link {
  font-size: 13px;
  color: var(--steel);
  text-decoration: none;
}

.stack-back-link:hover {
  color: var(--ink);
}

.stack-escape-link {
  font-size: 13px;
  color: var(--steel);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.stack-escape-link:hover {
  color: var(--brand-green);
}

/* Running stack strip */
.stack-strip {
  position: sticky;
  bottom: 0;
  z-index: 10;
  margin: 0 -1.25rem 2rem;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  background: var(--canvas);
  border-top: 1px solid var(--hairline-soft);
}

.stack-strip[hidden] {
  display: none;
}

.stack-strip-label {
  display: block;
  margin-bottom: 0.4rem;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--stone);
}

.stack-strip-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stack-strip-chip {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--mist);
}

.stack-strip-chip--talk {
  border-style: dashed;
  border-color: rgba(18, 165, 116, 0.5);
  color: var(--brand-green);
}

.stack-strip-total {
  text-align: right;
}

.stack-strip-price {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--brand-green);
  line-height: 1;
}

.stack-strip-price-note {
  display: block;
  margin-top: 0.15rem;
  font-size: 11px;
  color: var(--stone);
}

/* Result screen */
.stack-result[hidden] {
  display: none;
}

.stack-pay-grid {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 640px) {
  .stack-pay-grid.has-two-cards {
    grid-template-columns: 1fr 1fr;
  }
}

.stack-pay-card {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
}

.stack-pay-card.is-selected {
  border-color: var(--brand-green);
  box-shadow: var(--shadow-featured);
}

.stack-pay-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  font-size: 14px;
  color: var(--mist);
  border-bottom: 1px solid var(--hairline-soft);
}

.stack-pay-row:first-child {
  padding-top: 0;
}

.stack-pay-row--discount {
  color: var(--brand-green);
}

.stack-pay-row-value {
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.stack-pay-total-block {
  margin-top: 1rem;
}

.stack-pay-total-label {
  margin: 0 0 0.25rem;
  font-size: 14px;
  color: var(--ink);
  font-weight: 500;
}

.stack-pay-total-price {
  font-size: 2.25rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--brand-green);
  line-height: 1;
}

.stack-pay-total-note {
  margin: 0.35rem 0 1.25rem;
  font-size: 12px;
  color: var(--stone);
}

.stack-pay-card .btn {
  margin-top: auto;
  width: 100%;
}

.stack-pay-card--performance .stack-pay-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--stone);
  margin: 0 0 0.35rem;
}

.stack-pay-card--performance .stack-pay-rate {
  font-size: 13px;
  color: var(--stone);
  margin: 0 0 1rem;
}

.stack-pay-card--performance p.stack-pay-copy {
  font-size: 14px;
  color: var(--mist);
  margin: 0 0 1.25rem;
}

/* Whats included */
.stack-section-label {
  display: block;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--stone);
}

.stack-included-list {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 2rem;
  padding: 0;
  list-style: none;
}

.stack-included-item {
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
}

.stack-included-item[hidden] {
  display: none;
}

.stack-included-item summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
}

.stack-included-item summary::-webkit-details-marker {
  display: none;
}

.stack-included-item-title {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.stack-included-item-title::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-green);
  flex-shrink: 0;
}

.stack-included-item-toggle {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--stone);
}

.stack-included-item-summary {
  margin: 0.4rem 0 0 1.1rem;
  font-size: 13px;
  color: var(--steel);
}

.stack-included-item-details {
  margin: 0.85rem 0 0 1.1rem;
  padding: 0;
  list-style: none;
}

.stack-included-item-details li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: 0.4rem;
  font-size: 13px;
  color: var(--steel);
}

.stack-included-item-details li::before {
  content: "+";
  position: absolute;
  left: 0;
  color: var(--brand-green);
}

/* Tweak it */
.stack-tweak-group {
  margin-bottom: 1.5rem;
}

.stack-tweak-group-label {
  display: block;
  margin-bottom: 0.6rem;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}

.stack-tweak-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stack-tweak-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--hairline);
  background: var(--surface);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--mist);
  cursor: pointer;
}

.stack-tweak-chip:hover {
  border-color: var(--steel);
}

.stack-tweak-chip.is-selected {
  border-color: var(--brand-green);
  background: rgba(18, 165, 116, 0.14);
  color: var(--brand-green);
}

.stack-tweak-chip--talk {
  border-style: dashed;
}

.stack-tweak-chip-price {
  font-family: var(--font-mono);
  font-size: 11px;
  opacity: 0.85;
}

.stack-talk-note {
  margin: 0.6rem 0 0;
  padding: 0.75rem 1rem;
  border: 1px dashed rgba(18, 165, 116, 0.45);
  border-radius: var(--radius-md);
  background: rgba(18, 165, 116, 0.06);
  font-size: 13px;
  color: var(--mist);
}

.stack-talk-note[hidden] {
  display: none;
}

.stack-talk-note a {
  color: var(--brand-green);
  font-weight: 500;
}

/* CTA */
.stack-cta {
  display: grid;
  gap: 0.75rem;
  margin-top: 2rem;
}

.stack-cta .btn {
  width: 100%;
}

.stack-lead-panel {
  margin-top: 0.75rem;
  padding: 1.25rem;
  border: 1px solid var(--brand-green);
  border-radius: var(--radius-lg);
  background: rgba(18, 165, 116, 0.04);
}

.stack-lead-panel[hidden] {
  display: none;
}

.stack-lead-panel .form-field {
  margin-bottom: 0.75rem;
}

.stack-lead-panel .form-field:last-of-type {
  margin-bottom: 1rem;
}

.stack-lead-confirm {
  margin-top: 0.75rem;
  padding: 1.25rem;
  border: 1px solid var(--brand-green);
  border-radius: var(--radius-lg);
  background: rgba(18, 165, 116, 0.08);
}

.stack-lead-confirm[hidden] {
  display: none;
}

.stack-lead-confirm-tag {
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-green);
}

.stack-lead-confirm-title {
  margin: 0 0 0.35rem;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.stack-lead-confirm-body {
  margin: 0;
  font-size: 14px;
  color: var(--mist);
}

.stack-lead-confirm-body a {
  color: var(--brand-green);
}
