/* ============================================================
   _shared/options.css — surface-agnostic option card styles.
   Used by both /agent and /workspace surfaces.
   Depends on design-tokens.css (--primary, --border, etc.).
   ============================================================ */

/* ── Alternative / option cards ────────────────────────────────────────── */

.alt-card {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto auto;
  grid-template-areas:
    "title chev"
    "bullets chev"
    "gauge chev";
  gap: var(--space-sm);
  align-items: start;
  padding: var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  cursor: pointer;
  margin-bottom: var(--space-sm);
  transition: border-color var(--motion-fast), background var(--motion-fast);
}

.alt-card:hover,
.alt-card:focus-visible {
  border-color: var(--primary);
  background: var(--bg-subtle);
  outline: none;
}

.alt-card:focus-visible {
  box-shadow: 0 0 0 2px var(--primary-soft);
}

.alt-card .opt-title {
  grid-area: title;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text);
}

.alt-card .bullets {
  grid-area: bullets;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.alt-card .bullets li {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.4;
  padding-left: 10px;
  position: relative;
}

.alt-card .bullets li::before {
  content: "•";
  color: var(--text-muted);
  position: absolute;
  left: 0;
  font-weight: 700;
}

.alt-card .bullets strong {
  font-weight: 600;
  color: var(--text);
}

.alt-card .gauge-block {
  grid-area: gauge;
  margin: 0;
}

.alt-card .chev {
  grid-area: chev;
  align-self: center;
  font-size: 22px;
  color: var(--text-soft);
  font-family: var(--font-heading);
  line-height: 1;
  padding: 0 4px;
}

.alt-card:hover .chev,
.alt-card:focus-visible .chev {
  color: var(--primary);
}

/* De-Tailwind helpers: reproduce the option-card's former Tailwind utilities
   exactly so /agent renders identically and workspace (no Tailwind) works too. */
.alt-card__row  { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; }
.alt-card__main { min-width:0; }
.alt-card__meta { display:flex; align-items:center; gap:0.5rem; flex-shrink:0; margin-top:0.25rem; }
.alt-card__count{ font-size:0.65rem; line-height:1rem; color:var(--ink-400, #7a7163); }
.alt-card__desc {
  font-size:0.875rem; line-height:1.625; color:var(--ink-400, #7a7163); margin-top:0.25rem;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}

/* ============================================================
   Enhanced result-page cards (2026-06-14) — workspace surface only.
   Opt-in via hero / enhanced on the option_card macro; /agent's
   m.option_alt passes neither, so its cards are byte-identical.
   ============================================================ */

/* Drop the vestigial grid for enhanced cards: the foot row needs to stack
   under the title/desc row, not fight grid-template-areas. */
.alt-card--enhanced {
  display: flex;
  flex-direction: column;
  gap: 9px;
  position: relative;
  transition: border-color var(--motion-fast), box-shadow var(--motion-fast),
              transform var(--motion-fast), background var(--motion-fast);
}
.alt-card--enhanced .alt-card__desc { -webkit-line-clamp: 3; }
/* Recommended and alternatives share ONE title size (no hero-is-bigger). */
.alt-card--enhanced .opt-title { font-size: 13.5px; letter-spacing: -0.006em; }

/* Recommended showpiece — full periwinkle border + faint wash. The single
   "Top pick" tag is the only badge; no confidence pill, no CTA. */
.alt-card--hero {
  border: 1.5px solid var(--primary);
  background: linear-gradient(180deg, var(--primary-50) 0%, var(--surface) 58%);
  padding: calc(var(--space-md) + 3px);
  padding-top: calc(var(--space-md) + 12px);   /* room for the tag */
}
.alt-card--hero:hover,
.alt-card--hero:focus-visible {
  border-color: var(--primary);
  background: linear-gradient(180deg, var(--primary-50) 0%, var(--surface) 46%);
  box-shadow: 0 6px 20px -10px rgba(46, 46, 171, 0.35);
  transform: translateY(-2px);
  outline: none;
}
/* Alternatives get a quieter lift so the whole list feels interactive. */
.alt-card--enhanced:not(.alt-card--hero):hover,
.alt-card--enhanced:not(.alt-card--hero):focus-visible {
  box-shadow: 0 4px 14px -10px rgba(31, 26, 15, 0.3);
  transform: translateY(-1px);
}

/* "Top pick" tag — small periwinkle marker pinned top-left of the hero. */
.opt-tag {
  position: absolute;
  top: -9px;
  left: var(--space-md);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fff;
  background: var(--primary);
  padding: 2px 8px 3px;
  border-radius: var(--r-pill);
  box-shadow: 0 1px 0 rgba(46, 46, 171, 0.25);
}

/* Foot row — verb breakdown, sitting under a hairline. */
.alt-card__foot {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding-top: 9px;
  border-top: 1px solid var(--parch-200);
}
.alt-card--enhanced:not(.alt-card--hero) .alt-card__foot { border-top-color: var(--parch-100); }

.opt-breakdown {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 7px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.01em;
  color: var(--ink-500);
}
.opt-breakdown__item strong { color: var(--ink-900); font-weight: 600; }
.opt-breakdown__sep { color: var(--ink-300); }
