/* Inside an analogue (il-analogue.js): a matched period opened in place under its row,
   and what followed each side by side. Every colour is a token; figures in the mono face.
   The tested verdict reuses the Fear & Greed vocabulary in il-pulse.css. */

.ana-detail { margin: 2px 0 10px; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-xs); background: var(--surface-1); }
.ana-cols { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px 22px; }
.ana-sec { min-width: 0; }
.ana-wide { margin-top: 12px; }
.ana-h { margin: 0 0 .35rem; font-family: var(--font); font-size: 13px; font-weight: 600;
  color: var(--text-primary); }

.ana-rows { display: flex; flex-direction: column; gap: 2px; margin-top: .4rem; }
.ana-row { display: grid; grid-template-columns: 9.5em minmax(80px, 1fr) 9.5em 7em; gap: 10px;
  align-items: center; padding: 3px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.ana-row-ctx { grid-template-columns: 13em minmax(80px, 1fr) 11em; }
.ana-l { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ana-v { text-align: right; white-space: nowrap; }

/* One 0-100 track, two markers: then hollow, today filled. Shape and fill carry the
   difference, so it is never colour alone. */
.ana-track { position: relative; display: block; height: 14px; }
.ana-track::before { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 2px;
  border-radius: 1px; background: color-mix(in oklab, var(--text-muted) 22%, transparent); }
.ana-track i, .ana-key i { position: absolute; top: 2px; width: 10px; height: 10px; margin-left: -5px;
  border-radius: 50%; box-sizing: border-box; }
.ana-then { border: 2px solid var(--text-muted); background: var(--surface-1); }
.ana-now { background: var(--brand); box-shadow: 0 0 0 2px var(--surface-1); }
.ana-key { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: .4rem; }
.ana-key span { display: inline-flex; align-items: center; gap: 6px; }
.ana-key i { position: static; margin: 0; display: inline-block; }

.ana-share { display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; }
.ana-share i { display: block; width: 3.6em; height: 6px; border-radius: 3px; overflow: hidden;
  background: color-mix(in oklab, var(--text-muted) 14%, transparent); }
.ana-share b { display: block; height: 100%; background: var(--text-muted); }

.ana-kv { display: grid; grid-template-columns: 9.5em 1fr 1fr; gap: 8px; align-items: center;
  padding: 4px 0; border-bottom: 1px solid var(--border); }

.ana-ctx { margin-top: 12px; }
.ana-ctx summary { cursor: pointer; padding: 4px 0; }
.ana-g { margin: .6rem 0 .1rem; }

.ana-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; }
.ana-stat { display: flex; flex-direction: column; gap: 1px; padding: 6px 8px;
  border: 1px solid var(--border); border-radius: var(--radius-xs); background: var(--surface-2); }
.ana-stat > span:first-child { min-height: 2.7em; }      /* values line up when a label wraps */
.ana-stat b { font-size: 15px; color: var(--text-primary); }
.ana-paths .mhc-grid { margin-top: .2rem; }

.ana-foot { margin-top: .9rem; padding-top: .3rem; border-top: 1px solid var(--border); }
.ana-table td, .ana-table th { white-space: nowrap; }
.ana-table tr.ana-sum td { border-top: 1px solid var(--border-strong); }
.ana-tested { margin-top: 1rem; }

@media (max-width: 820px) {
  .ana-cols { grid-template-columns: 1fr; }
  .ana-row { grid-template-columns: 7.5em minmax(60px, 1fr) 8.5em; }
  .ana-row .ana-share { grid-column: 1 / -1; justify-content: flex-start; }
  .ana-row-ctx { grid-template-columns: 8.5em minmax(60px, 1fr) 8em; }
}
@media (max-width: 520px) {
  .ana-detail { padding: 10px; }
  .ana-row, .ana-row-ctx { grid-template-columns: 1fr 7.5em; }
  .ana-row .ana-track, .ana-row-ctx .ana-track { grid-column: 1 / -1; grid-row: 2; }
  .ana-kv { grid-template-columns: 1fr 1fr; }
  .ana-kv > :first-child { grid-column: 1 / -1; }
}
