/* Interactive tools: pollen seeds, one card, gold progress track.
   Studio tokens only. Motion: transform/opacity. Never sticky/fixed.
   BB band / porcelain / soft-edge: identical to /studio and /about — never
   retune plate color or .bb-frame feather on tools pages. */

.tool {
  --tool-pad: 14px;
  /* Delicate pollen gold (BB sparkle), scoped to tools only. */
  --tool-gold: #C4A035;
  --tool-gold-soft: color-mix(in srgb, var(--tool-gold) 22%, var(--white));
  --tool-gold-line: color-mix(in srgb, var(--tool-gold) 55%, var(--mist));
  --tool-track: rgba(21, 23, 26, 0.1);
  margin: 0 0 8px;
}

body.page-tool .copy > h1 {
  margin: 0 0 8px;
  font-size: clamp(20px, 5vw, 30px);
  letter-spacing: -0.04em;
  line-height: 1.08;
}

/* Phone first fold: keep Q1 + answers in vh with the existing svc BB band. */
@media (max-width: 430px) {
  body.page-tool .copy {
    padding-bottom: 28px;
  }
  body.page-tool .copy > h1 {
    margin: 0 0 4px;
    font-size: 20px;
  }
  .tool {
    margin: 0 0 4px;
  }
  .tool-card {
    padding: 8px 10px 10px;
  }
  .tool-card-head {
    margin-bottom: 4px;
    padding-bottom: 4px;
  }
  .tool-card-title {
    margin-bottom: 4px;
    font-size: 15px;
  }
  .tool-quote {
    margin-bottom: 6px;
    padding: 7px 9px;
    font-size: 11px;
    line-height: 1.32;
  }
  .tool-actions {
    margin-bottom: 6px;
    gap: 6px;
  }
  .tool-actions .btn,
  .tool-actions .btn-soft {
    min-height: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 12.5px;
  }
  .tool-choices {
    gap: 5px;
  }
  .tool-choice {
    min-height: 48px;
    padding: 7px 10px;
    font-size: 13.5px;
  }
  .tool-choice small {
    font-size: 10.5px;
    line-height: 1.2;
  }
}

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

.tool-stage {
  position: relative;
  min-height: 12rem;
}

.tool-card {
  margin: 0;
  padding: 14px 14px 16px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--edge);
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.tool-card.is-enter {
  animation: tool-card-in 0.42s var(--ease) both;
}

.tool-card.is-leave {
  animation: tool-card-out 0.28s var(--ease) both;
  pointer-events: none;
}

@keyframes tool-card-in {
  from {
    opacity: 0;
    transform: translate3d(0, 12px, 0) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes tool-card-out {
  from {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
  to {
    opacity: 0;
    transform: translate3d(0, -8px, 0);
  }
}

.tool-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--tool-track);
}

/* Kill .copy ol/ul padding so seeds sit on the card content edge. */
.copy .tool-seeds,
.tool-seeds {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.copy .tool-seeds li,
.tool-seeds li {
  width: 7px;
  height: 7px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  font-size: 0;
  line-height: 0;
  list-style: none;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--tool-track);
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
}

.copy .tool-seeds li::marker,
.tool-seeds li::marker {
  content: none;
  color: transparent;
}

.tool-seeds li.is-filled {
  background: var(--tool-gold);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--tool-gold) 40%, transparent),
    0 0 10px color-mix(in srgb, var(--tool-gold) 35%, transparent);
  transform: scale(1.08);
}

.tool-seeds li.is-current {
  box-shadow: inset 0 0 0 1px var(--tool-gold-line);
}

.tool-card-meta {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--graphite);
  white-space: nowrap;
}

.tool-card-title {
  margin: 0 0 8px;
  font-size: clamp(17px, 4.2vw, 20px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--ink);
}

.tool-card-help {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--graphite);
}

.tool-quote {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--haze);
  border-left: 2px solid var(--tool-gold-line);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

/* Copy (primary) + Open ChatGPT (secondary): same size/weight pair. */
.tool-actions .btn,
.tool-actions .btn-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  height: 44px;
  padding: 0 14px;
  border-radius: 19px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  box-sizing: border-box;
}

.tool-choices {
  display: grid;
  gap: 8px;
  margin: 0;
}

.tool-choice {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border-radius: 14px;
  text-align: left;
  background: var(--haze);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  box-shadow: inset 0 0 0 1px transparent;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease), color 0.18s var(--ease),
    box-shadow 0.18s var(--ease);
}

.tool-choice small {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  font-weight: 500;
  color: var(--graphite);
}

.tool-choice:hover {
  background: color-mix(in srgb, var(--haze) 70%, var(--mist));
}

.tool-choice:active {
  transform: scale(0.985);
}

.tool-choice[aria-pressed="true"] {
  background: var(--deep);
  color: var(--white);
  box-shadow: inset 0 0 0 1px var(--deep);
}

.tool-choice[aria-pressed="true"] small {
  color: color-mix(in srgb, var(--white) 78%, transparent);
}

.tool-choice:focus-visible {
  outline: 2px solid var(--bloom);
  outline-offset: 2px;
}

.tool-nav {
  display: flex;
  justify-content: flex-start;
  margin-top: 12px;
}

.tool-nav .btn {
  min-height: 44px;
}

/* Results */
.tool-result {
  margin: 4px 0 20px;
  padding: 18px 16px 16px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--edge);
  scroll-margin-top: calc(var(--bee-band-scrolled, var(--bee-band, 180px)) + 12px);
}

@property --p {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}

/* Numeric score: one baseline run (`6/12`). Verdict labels: display face. */
.copy p.tool-result-score,
.tool-result-score {
  display: flex;
  align-items: baseline;
  gap: 0;
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: clamp(32px, 7vw, 44px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.tool-result-score .tool-score-num {
  font: inherit;
  font-variant-numeric: inherit;
}

.tool-result-score .tool-score-den {
  margin: 0;
  padding: 0;
  font-family: inherit;
  font-size: 0.45em;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--graphite);
  vertical-align: baseline;
}

.copy p.tool-result-score.is-label,
.tool-result-score.is-label {
  font-family: var(--sans);
  font-size: clamp(28px, 6.3vw, 44px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.05;
  font-variant-numeric: normal;
}

.tool-score-track {
  height: 2px;
  margin: 0 0 14px;
  background: var(--tool-track);
  overflow: hidden;
}

.tool-score-fill {
  --p: 0;
  display: block;
  height: 100%;
  width: calc(var(--p) * 1%);
  background: var(--tool-gold);
  box-shadow: 0 0 8px color-mix(in srgb, var(--tool-gold) 45%, transparent);
  transform-origin: left center;
}

.tool-result-verdict {
  margin: 0;
  font-size: clamp(20px, 4.5vw, 26px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--ink);
}

.tool-result-lead {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--graphite);
}

/* Match /studio section kicker: muted uppercase, not bloom all-caps. */
.tool-section-label {
  margin: 0 0 10px;
  font: 500 12px/1.4 var(--sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.copy .tool-fix-list,
.tool-fix-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tool-fix-list > li {
  margin: 0 0 12px;
  padding: 12px 12px 12px 14px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--haze) 70%, var(--white));
  border-left: 2px solid var(--tool-gold-line);
}

.tool-fix-list h3 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.tool-fix-list p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--graphite);
}

.copy .tool-reasons,
.tool-reasons {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.copy .tool-reasons > li,
.tool-reasons > li {
  margin: 0 0 10px;
  padding: 0 0 0 14px;
  position: relative;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink);
}

.copy .tool-reasons > li::marker,
.tool-reasons > li::marker {
  content: none;
  color: transparent;
}

.tool-reasons > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tool-gold);
  box-shadow: 0 0 8px color-mix(in srgb, var(--tool-gold) 40%, transparent);
}

.tool-reasons strong {
  font-weight: 600;
}

.tool-route {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--graphite);
}

.tool-result .lead,
.tool-result [data-selfcheck-form],
.tool-result [data-outbound-form] {
  margin-top: 16px;
}

.tool-result h2 {
  margin: 0 0 6px;
  font-size: clamp(18px, 3.8vw, 22px);
}

.tool-meta-foot {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--muted, var(--graphite));
}

.tool-restart {
  margin-top: 12px;
}

.tool-why-below {
  margin: 28px 0 8px;
  padding-top: 18px;
  border-top: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
}

.tool-why-below h2 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.tool-why-below p {
  margin: 0;
  color: var(--graphite);
  font-size: 14px;
}

@media (prefers-reduced-motion: no-preference) {
  .tool-score-fill.is-animate {
    animation: tool-score-fill 0.85s var(--ease) both;
  }
}

@keyframes tool-score-fill {
  from {
    --p: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tool-card.is-enter,
  .tool-card.is-leave,
  .tool-score-fill.is-animate,
  .tool-seeds li,
  .tool-choice {
    animation: none !important;
    transition: none !important;
  }
}
