/* answer cards (app/answers.js) */

.answers { display: grid; gap: 12px; }
.answer {
  position: relative; display: grid; gap: 10px; align-content: start; padding: 14px 16px 12px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0) 60%), var(--surface-2);
  border: 1px solid var(--border); overflow: hidden;
}
.answer::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--accent);
  opacity: 0.7; border-radius: 3px 0 0 3px;
}
.answer.a-noul::before { background: var(--muted); }
.answer.a-noul.is-yes::before { background: var(--accent-2); }
.answer.a-score::before { background: #45e0c0; }
.answers.busy .answer { opacity: 0.72; transition: opacity 0.2s; }

.a-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.a-question { margin: 0; font-size: 0.9rem; line-height: 1.4; color: var(--text-2); }
.a-question code { font-size: 0.82em; padding: 0.05em 0.3em; }
.a-type {
  flex: none; font: 700 0.62rem/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
  border: 1px solid var(--border-2); border-radius: 99px; padding: 4px 7px; margin-top: 1px;
}
.a-id { margin-top: -6px; font: 0.7rem var(--mono); color: var(--faint); }
.a-verdict { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; min-width: 0; }
.a-word { font-size: 1.3rem; line-height: 1.2; letter-spacing: -0.015em; color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.a-prob { font: 600 0.82rem var(--mono); color: var(--muted); white-space: nowrap; }

/* yes / no: one split bar, the winning side lit */
.a-noul.is-yes .a-word { color: var(--accent-2); }
.a-noul:not(.is-yes) .a-split { background: rgba(170, 182, 202, 0.5); }
.a-noul:not(.is-yes) .a-split-yes { background: rgba(69, 224, 192, 0.32); }
.a-split { position: relative; height: 10px; border-radius: 99px; background: rgba(133, 145, 165, 0.28); overflow: hidden; }
.a-split::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: rgba(7, 9, 13, 0.7); }
.a-split-yes { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #45e0c0, #7ef0d6); border-radius: 99px 0 0 99px; transition: width 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.a-ends { display: flex; justify-content: space-between; font: 0.74rem var(--mono); color: var(--muted); margin-top: -4px; }
.a-noul.is-yes .a-end-yes, .a-noul:not(.is-yes) .a-end-no { color: var(--text); }

/* pick one: a ranked list */
.a-rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.a-row { display: grid; grid-template-columns: minmax(70px, 38%) 1fr 52px; gap: 10px; align-items: center; font-size: 0.8rem; }
.a-name { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-value { text-align: right; font: 0.76rem var(--mono); color: var(--muted); }
.a-track { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.a-track i { display: block; height: 100%; width: 0; border-radius: 99px; background: rgba(122, 162, 255, 0.75); transition: width 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.a-row.top .a-name { color: var(--text); font-weight: 600; }
.a-row.top .a-value { color: var(--text); }
.a-row.top .a-track i { background: linear-gradient(90deg, #7aa2ff, #45e0c0); }
.a-more {
  justify-self: start; margin-top: -2px; padding: 2px 0; border: 0; background: none; cursor: pointer;
  font: 0.74rem var(--sans); color: var(--muted); text-decoration: underline dotted; text-underline-offset: 3px;
}
.a-more:hover { color: var(--text-2); }

/* scale: a histogram of the levels on a baseline, with the expected value marked on it */
.a-scale {
  display: grid; grid-template-columns: repeat(var(--levels), minmax(0, 1fr)); grid-template-rows: auto 72px auto auto;
  column-gap: 8px; text-align: center;
}
.a-col-value { font: 0.72rem var(--mono); color: var(--muted); padding-bottom: 4px; }
.a-col-bar { display: flex; align-items: flex-end; border-radius: 7px 7px 0 0; background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.035)); }
.a-col-bar i {
  display: block; width: 100%; height: 0; min-height: 2px; border-radius: 7px 7px 0 0;
  background: linear-gradient(180deg, rgba(122, 162, 255, 0.55), rgba(122, 162, 255, 0.3)); transition: height 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.a-col-bar.top i { background: linear-gradient(180deg, #7ef0d6, #45e0c0 60%, #2fb89c); box-shadow: 0 0 22px -6px rgba(69, 224, 192, 0.8); }
.a-col-value.top { color: var(--text); font-weight: 600; }
.a-axis { grid-column: 1 / -1; position: relative; height: 1px; background: var(--border-2); margin: 0 -2px; }
.a-mark {
  position: absolute; top: -4px; left: 0; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%;
  background: var(--text); box-shadow: 0 0 0 3px var(--surface-2), 0 0 0 4px rgba(231, 236, 243, 0.25);
  transition: left 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.a-col-label {
  padding-top: 8px; font-size: 0.7rem; line-height: 1.25; color: var(--muted);
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.a-col-label.top { color: var(--text-2); }

/* confidence and act */
.a-foot { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.a-foot:empty { display: none; }
.a-pill {
  position: relative; display: inline-flex; align-items: baseline; gap: 5px; padding: 3px 8px 5px; border-radius: 8px;
  background: var(--surface-3); font: 0.7rem var(--sans); color: var(--muted); overflow: hidden; cursor: help;
}
.a-pill b { font: 600 0.72rem var(--mono); color: var(--text-2); }
.a-pill i { position: absolute; left: 0; bottom: 0; height: 2px; width: var(--v); background: var(--accent-2); opacity: 0.8; }

/* compact cards (the home demo) */
.answers.mini .answer { padding: 11px 13px 10px; gap: 8px; }
.answers.mini .a-id, .answers.mini .a-foot { display: none; }
.answers.mini .a-question { font-size: 0.8rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.answers.mini .a-word { font-size: 1.05rem; }
.answers.mini .a-scale { grid-template-rows: auto 52px auto auto; column-gap: 6px; }
.answers.mini .a-col-label { font-size: 0.64rem; }
.answers.mini .a-row { grid-template-columns: minmax(60px, 40%) 1fr 44px; }
