/* AI Stack Opportunities — uses the public tools theme tokens (public/styles.css). */

.stk-setup { margin-bottom: 28px; }
/* Wizard: one question at a time. */
.stk-wizard { display: grid; gap: 18px; }
.stk-wizard-top { display: flex; align-items: center; gap: 12px; }
.stk-wizard-count { color: var(--muted); font-size: 0.85rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stk-wizard-bar { flex: 1; height: 6px; border-radius: 999px; background: var(--track); overflow: hidden; }
.stk-wizard-bar span { display: block; height: 100%; width: 0; background: var(--blue); transition: width 0.3s ease; }
.stk-step, .stk-final { display: grid; gap: 12px; }
.stk-step-title { margin: 0; font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.stk-step-title:focus { outline: none; }
.stk-options { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.stk-options--grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); }
.stk-option {
  min-height: 52px; min-width: 140px; padding: 12px 20px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface-hover); color: var(--text); font: inherit; font-size: 1.05rem; font-weight: 650;
  text-align: left; cursor: pointer; transition: border-color 140ms ease, background 140ms ease;
}
.stk-options--grid .stk-option { min-width: 0; }
.stk-option:hover, .stk-option:focus-visible { border-color: var(--blue); outline: none; }
.stk-option.is-selected { border-color: var(--blue); background: var(--glow-blue); box-shadow: inset 0 0 0 1px var(--blue); }
/* Multi-select answers show a checkbox so "pick all that apply" is obvious. */
.stk-option--check { display: flex; align-items: center; gap: 10px; }
.stk-option--check::before { content: ""; width: 18px; height: 18px; flex: none; border: 2px solid var(--line); border-radius: 5px; }
.stk-option--check.is-selected::before { border-color: var(--blue); background: var(--blue); box-shadow: inset 0 0 0 3px var(--panel-solid); }
.stk-other-line { display: flex; gap: 10px; flex-wrap: wrap; }
.stk-other-line .audit-url-input { flex: 1 1 220px; }
.stk-wizard .audit-url-input {
  min-height: 44px; padding: 10px 14px; border-radius: 12px; border-width: 1px;
  font-size: 1rem; font-weight: 500; letter-spacing: normal;
}
.stk-wizard .audit-url-input::placeholder { font-weight: 400; }
.stk-summary h3 { font-size: 0.95rem; margin: 6px 0; }
.stk-summary ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.stk-summary li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; color: var(--muted); }
.stk-summary li .stk-link-btn { text-align: right; color: var(--text); font-weight: 600; }
.stk-wizard-nav { display: flex; justify-content: space-between; gap: 12px; }
.stk-wizard-nav .stk-link-btn { color: var(--muted); text-decoration: none; }
.stk-wizard-nav .stk-link-btn:hover { color: var(--text); }
.stk-field { display: grid; gap: 8px; min-width: 0; }
.stk-optional { color: var(--muted); font-weight: 400; font-size: 0.9em; }
.stk-hint, .stk-privacy { color: var(--muted); font-size: 0.875rem; margin: 0; }
.stk-error { color: var(--red); margin: 0; font-weight: 600; }
.stk-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }



.stk-chips { display: flex; flex-wrap: wrap; gap: 8px; min-height: 0; }
.stk-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 12px; border-radius: 999px; background: var(--glow-blue); border: 1px solid var(--line); color: var(--text); font-size: 0.9rem; }
.stk-chip small { color: var(--muted); font-size: 0.75rem; }
.stk-chip--suggested { border-style: dashed; background: transparent; }
.stk-chip-x { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 1.1rem; line-height: 1; padding: 0 6px; border-radius: 999px; }
.stk-chip-x:hover { color: var(--text); background: var(--surface-hover); }

/* progress */
.stk-progress, .stk-teaser, .stk-failed, .stk-history, .stk-card { background: var(--panel); border: 1px solid var(--surface-border); border-radius: 20px; box-shadow: var(--shadow); }
.stk-progress, .stk-teaser, .stk-failed, .stk-history { padding: 28px; margin-bottom: 28px; }
.stk-progress-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.stk-progress-title { margin: 0 0 6px; }
.stk-progress-lead { color: var(--muted); margin: 0; }
.stk-clock { display: grid; justify-items: end; text-align: right; }
.stk-clock-elapsed { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); }
.stk-clock small { color: var(--muted); font-size: 0.85rem; }
.stk-bar { height: 10px; border-radius: 999px; background: var(--track); overflow: hidden; margin: 18px 0 14px; }
.stk-bar span { display: block; height: 100%; width: 0; border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green)); transition: width 0.8s ease; }
.stk-steps-row { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 0.875rem; color: var(--muted); }
.stk-steps-row li { display: inline-flex; align-items: center; gap: 8px; }
.stk-steps-row li.is-active { color: var(--text); font-weight: 600; }
.stk-steps-row li.is-done { color: var(--text); }
.stk-step-dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.stk-steps-row li.is-active .stk-step-dot { border-color: var(--blue); box-shadow: 0 0 0 4px var(--glow-blue); animation: stk-pulse 1.2s ease-in-out infinite; }
.stk-steps-row li.is-done .stk-step-dot { background: var(--green); border-color: var(--green); }
@keyframes stk-pulse { 50% { box-shadow: 0 0 0 8px transparent; } }

.stk-engine-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.stk-engine-card { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: grid; gap: 8px; align-content: start;
  background: var(--panel-solid); transition: border-color 0.3s ease; }
.stk-engine-card.is-done { border-color: var(--green); animation: stk-pop 0.35s ease-out; }
.stk-engine-card.is-failed { border-color: var(--red); }
.stk-engine-card.is-skipped { opacity: 0.65; }
@keyframes stk-pop { from { transform: scale(0.98); } to { transform: none; } }
.stk-engine-head { display: flex; align-items: center; gap: 10px; color: var(--text); }
.stk-product-title { display: grid; min-width: 0; }
.stk-product-title small { color: var(--muted); font-size: 0.78rem; }
.stk-engine-dots { margin: 0; font-size: 0.78rem; color: var(--muted); }
.stk-engine-dots:empty { display: none; }
.stk-engine-time { margin-left: auto; font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.stk-engine-icon { width: 18px; height: 18px; flex: none; border-radius: 50%; position: relative; }
.is-running .stk-engine-icon { border: 2px solid var(--track); border-top-color: var(--blue); animation: stk-spin 0.9s linear infinite; }
.is-done .stk-engine-icon { background: var(--green); }
.is-done .stk-engine-icon::after { content: ""; position: absolute; left: 6px; top: 3px; width: 4px; height: 8px;
  border: solid var(--panel-solid); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.is-failed .stk-engine-icon { background: var(--red); }
.is-failed .stk-engine-icon::after { content: "!"; position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 0.75rem; font-weight: 800; color: var(--panel-solid); }
.is-skipped .stk-engine-icon { border: 2px dashed var(--line); }
@keyframes stk-spin { to { transform: rotate(360deg); } }
.stk-mini-bar { height: 4px; border-radius: 999px; background: var(--track); overflow: hidden; }
.stk-mini-bar span { display: block; height: 100%; width: 0; background: var(--blue); transition: width 1s linear; }
.is-done .stk-mini-bar span { background: var(--green); }
.is-failed .stk-mini-bar span { background: var(--red); }
.stk-engine-status { margin: 0; font-size: 0.85rem; color: var(--muted); }
.is-done .stk-engine-status { color: var(--text); }
.stk-engine-found .stk-chips { gap: 4px; }
.stk-chip--mini { font-size: 0.75rem; padding: 2px 8px; }
.stk-early-ideas { margin: 6px 0 0; padding-left: 1.1rem; font-size: 0.8rem; color: var(--muted); display: grid; gap: 2px; }
.stk-found { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.stk-found h3 { margin: 0 0 4px; font-size: 1rem; }
.stk-found h3 small { color: var(--muted); font-weight: 400; }
.stk-found-counts { margin: 0 0 10px; color: var(--muted); font-size: 0.9rem; }
.stk-progress-note { margin: 16px 0 0; color: var(--muted); font-size: 0.8rem; }
@media (prefers-reduced-motion: reduce) {
  .is-running .stk-engine-icon, .stk-steps-row li.is-active .stk-step-dot, .stk-engine-card.is-done { animation: none; }
  .stk-bar span, .stk-mini-bar span { transition: none; }
}
.stk-engines { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.stk-engine { display: inline-block; font-size: 0.8rem; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); margin: 2px 4px 2px 0; color: var(--text); }
.stk-engine--done { border-color: var(--green); }
.stk-engine--failed { border-color: var(--red); color: var(--red); }
.stk-engine--skipped { opacity: 0.7; }
.stk-engine--running { border-color: var(--blue); }

/* score */
.stk-teaser-main { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.stk-teaser-copy { flex: 1 1 320px; min-width: 0; }
.stk-teaser-copy h2 { margin: 4px 0 8px; }
.stk-teaser-message { font-size: 1.1rem; color: var(--text); margin: 0 0 8px; }
.stk-score-explainer { color: var(--muted); font-size: 0.9rem; margin: 0; }
.stk-score { position: relative; width: 168px; height: 168px; flex: none; --stk-score-color: var(--blue); }
.stk-score.is-high { --stk-score-color: var(--green); }
.stk-score.is-mid { --stk-score-color: var(--blue); }
.stk-score.is-low { --stk-score-color: var(--amber); }
.stk-score svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.stk-score-track { fill: none; stroke: var(--track); stroke-width: 10; }
.stk-score-fill { fill: none; stroke: var(--stk-score-color); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1.1s cubic-bezier(.2,.7,.2,1); }
.stk-score-value { position: absolute; inset: 0; display: flex; align-items: baseline; justify-content: center; padding-top: 58px; font-weight: 800; font-size: 3rem; color: var(--text); line-height: 1; }
.stk-score-value small { font-size: 1rem; color: var(--muted); font-weight: 600; margin-left: 2px; }
.stk-eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; font-weight: 700; color: var(--muted); margin: 0; }
.stk-badge-row { margin: 10px 0 0; }
.stk-badge { display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); }
.stk-badge--prelim { border-color: var(--amber); color: var(--amber); }
.stk-badge--new { border-color: var(--green); color: var(--green); }
.stk-badge--changed { border-color: var(--purple); color: var(--purple); }

.stk-teaser-software { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 20px; display: grid; gap: 10px; }
.stk-teaser-software h3 { margin: 0; }
.stk-teaser-software .secondary-btn { justify-self: start; width: auto; padding-inline: 20px; }

.stk-unlock { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 20px; text-align: center; }
.stk-unlock h3 { margin: 0 0 10px; }
.stk-unlock-list { text-align: left; max-width: 560px; margin: 0 auto 18px; color: var(--muted); }
.stk-unlock-btn { font-size: 1.05rem; padding: 14px 26px; }
.stk-login-line { color: var(--muted); font-size: 0.9rem; margin: 12px 0 0; }
.stk-link-btn { border: 0; background: none; color: var(--blue); cursor: pointer; padding: 0; font: inherit; text-decoration: underline; }

/* history */
.stk-history-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.stk-history-list li { display: flex; gap: 8px; align-items: stretch; }
.stk-history-list a { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; color: var(--text); text-decoration: none; }
.stk-history-list a:hover { background: var(--surface-hover); }
.stk-history-delete { flex: none; width: 44px; border: 1px solid var(--line); border-radius: 14px; background: none; color: var(--muted); cursor: pointer; }
.stk-history-delete:hover, .stk-history-delete:focus-visible { color: var(--red); border-color: var(--red); }
.stk-history-delete:disabled { opacity: 0.5; cursor: wait; }
.stk-report-nav .stk-delete-link { margin-left: auto; color: var(--muted); text-decoration: none; font-size: inherit; }
.stk-report-nav .stk-delete-link:hover { color: var(--red); }
.stk-history-list li.is-current a { border-color: var(--blue); }
.stk-history-score { font-weight: 800; font-size: 1.3rem; width: 2.6rem; text-align: center; }
.stk-history-main { display: grid; flex: 1; min-width: 0; }
.stk-history-main span { color: var(--muted); font-size: 0.875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stk-history-meta { color: var(--muted); font-size: 0.8rem; white-space: nowrap; }
.stk-empty { color: var(--muted); }

/* report */
.stk-report { display: grid; gap: 28px; padding-bottom: 40px; }
.stk-report-nav { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.9rem; position: sticky; top: 0; z-index: 5; padding: 10px 0; background: var(--bg); }
.stk-report-nav a { color: var(--muted); text-decoration: none; }
.stk-report-nav a:hover { color: var(--text); }
.stk-card { padding: 22px; }
.stk-overview { display: flex; gap: 28px; flex-wrap: wrap; }
.stk-overview-score { display: grid; justify-items: center; gap: 8px; flex: none; }
.stk-overview-main { flex: 1 1 380px; min-width: 0; }
.stk-overview-main h1 { margin: 0 0 8px; font-size: 1.6rem; }
.stk-lead { font-size: 1.05rem; color: var(--text); }
.stk-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 20px; margin: 16px 0; }
.stk-facts dt { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
.stk-facts dd { margin: 2px 0 0; color: var(--text); }
.stk-h3 { font-size: 1.05rem; margin: 18px 0 8px; }
.stk-h4 { font-size: 0.95rem; margin: 14px 0 6px; }
.stk-top-list { margin: 0; padding-left: 1.2rem; display: grid; gap: 6px; }
.stk-explain { margin-top: 14px; color: var(--muted); }
.stk-explain summary { cursor: pointer; color: var(--text); font-weight: 600; }
.stk-score-breakdown { list-style: none; padding: 0; display: grid; gap: 6px; }
.stk-score-breakdown li { display: grid; grid-template-columns: minmax(160px, 1fr) 2fr auto; gap: 10px; align-items: center; font-size: 0.875rem; }
.stk-meter { height: 8px; border-radius: 999px; background: var(--track); overflow: hidden; }
.stk-meter span { display: block; height: 100%; background: var(--blue); }
.stk-warn { color: var(--amber); }
.stk-muted { color: var(--muted); }
.stk-small { font-size: 0.875rem; color: var(--muted); margin: 6px 0; }
.stk-small strong { color: var(--text); }

.stk-section > h2 { margin: 0 0 4px; }
.stk-section-lead { color: var(--muted); margin: 0 0 16px; }
.stk-software-grid, .stk-integration-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.stk-software-card header { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.stk-software-card h3 { margin: 0; font-size: 1.15rem; }
.stk-basis { font-size: 0.75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.stk-basis--confirmed { background: var(--glow-green); color: var(--green); border: 1px solid var(--green); }
.stk-basis--suggested { border: 1px dashed var(--line); color: var(--muted); }
.stk-feature-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.stk-feature-list details { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.stk-feature-list summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.stk-feature-name { font-weight: 600; color: var(--text); margin-right: auto; }
.stk-feature-body p { margin: 8px 0 0; }

.stk-ver { font-size: 0.72rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.stk-ver--verified_official { border-color: var(--green); color: var(--green); }
.stk-ver--verified_secondary { border-color: var(--blue); color: var(--blue); }
.stk-ver--source_unavailable { border-color: var(--red); color: var(--red); }

.stk-evidence { margin: 10px 0 0; padding: 8px 12px; border-left: 3px solid var(--line); color: var(--muted); font-size: 0.85rem; font-style: italic; }
.stk-sources { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.stk-source { display: inline-grid; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 0.8rem; color: var(--blue); text-decoration: none; max-width: 100%; }
.stk-source span { color: var(--muted); font-size: 0.72rem; }
.stk-source:hover { background: var(--surface-hover); }

.stk-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.stk-type { font-size: 0.75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.stk-type--native_ai { background: var(--glow-green); color: var(--green); }
.stk-type--existing_integration { background: var(--glow-blue); color: var(--blue); }
.stk-type--additional_product { background: var(--glow-purple); color: var(--purple); }
.stk-type--custom_development { border: 1px solid var(--amber); color: var(--amber); }
.stk-pill { font-size: 0.75rem; color: var(--muted); padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; text-transform: capitalize; }

.stk-opp { margin-bottom: 12px; padding: 0; }
.stk-opp > summary { display: flex; gap: 14px; align-items: flex-start; padding: 18px 22px; cursor: pointer; list-style: none; }
.stk-opp > summary::-webkit-details-marker { display: none; }
.stk-opp-rank { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--btn-primary-bg); color: var(--btn-primary-text); font-weight: 800; }
.stk-opp-head { display: grid; gap: 8px; min-width: 0; }
.stk-opp-head strong { font-size: 1.05rem; color: var(--text); }
.stk-opp-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.stk-opp-body { padding: 0 22px 20px 70px; }
@media (max-width: 640px) { .stk-opp-body { padding: 0 18px 18px; } }

.stk-flow { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 8px; counter-reset: stk-flow; }
.stk-flow li { position: relative; display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; flex: 1 1 180px; font-size: 0.875rem; color: var(--text); counter-increment: stk-flow; }
.stk-flow li::before { content: counter(stk-flow); position: absolute; top: -9px; left: 10px; font-size: 0.7rem; font-weight: 800; background: var(--panel-solid); color: var(--muted); padding: 0 6px; border-radius: 999px; border: 1px solid var(--line); }
.stk-flow li.needs-approval { border-color: var(--amber); }
.stk-flow li em { font-style: normal; font-size: 0.72rem; font-weight: 700; color: var(--amber); }
.stk-flow-system { font-weight: 700; color: var(--blue); font-size: 0.8rem; }
.stk-steps { margin: 0; padding-left: 1.2rem; color: var(--text); font-size: 0.9rem; display: grid; gap: 4px; }

.stk-integration-ends { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.stk-integration-link { font-size: 0.75rem; font-weight: 600; color: var(--muted); padding: 2px 10px; border: 1px dashed var(--line); border-radius: 999px; }
.stk-workflow { margin-top: 12px; }

.stk-roadmap { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.stk-phase h3 { margin: 0 0 12px; font-size: 1.05rem; }
.stk-phase--quick_win { border-top: 4px solid var(--green); }
.stk-phase--moderate { border-top: 4px solid var(--blue); }
.stk-phase--strategic { border-top: 4px solid var(--purple); }
.stk-phase-item { padding: 10px 0; border-top: 1px solid var(--line); }
.stk-phase-item:first-of-type { border-top: 0; padding-top: 0; }

.stk-compare-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stk-compare h2 small { color: var(--muted); font-weight: 400; font-size: 0.9rem; }
.stk-chg { margin: 4px 0; font-size: 0.9rem; color: var(--text); }
.stk-chg--new::before { content: "+ "; color: var(--green); font-weight: 800; }
.stk-chg--gone { color: var(--muted); text-decoration: line-through; }

.stk-unverified summary, .stk-all-sources summary { cursor: pointer; font-weight: 600; color: var(--text); }
.stk-unverified ul, .stk-all-sources ul { display: grid; gap: 6px; font-size: 0.9rem; }
.stk-refresh { display: grid; gap: 12px; }
.stk-suggest-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.stk-suggest-add { border: 1px dashed var(--line); background: transparent; color: var(--text); border-radius: 999px; padding: 4px 12px; cursor: pointer; font-size: 0.85rem; }
.stk-suggest-add:hover { background: var(--surface-hover); }
.stk-check { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 0.9rem; }
.stk-empty-state { text-align: center; }
.stk-stale { border-left: 4px solid var(--amber); margin: 0; }
@media (max-width: 640px) {
  .stk-clock { justify-items: start; text-align: left; width: 100%; }
}
