/* insights.css — takes, replay strips, the Today card and freshness bars. Uses the tokens from style.css
   (fallbacks given so the components also stand alone). Everything is prefixed .ins- */
.ins { --i-bg: var(--bg, #0d0c0f); --i-ink: var(--ink, #e8e4dc); --i-dim: var(--dim, #8f8a82); --i-faint: var(--faint, #5d5952);
  --i-line: var(--line, rgba(255, 255, 255, .08)); --i-line2: var(--line2, rgba(255, 255, 255, .14)); --i-raise: var(--raise, rgba(255, 255, 255, .04));
  --i-amber: var(--amber, #e2b04a); --i-rh: var(--rh, #58c4f0); --i-lh: var(--lh, #f07096); --i-bad: var(--bad, #c85446); --i-ghost: #f3e9d6; --i-r: var(--r, 4px);
  --i-display: var(--display, "Barlow Condensed", "Arial Narrow", system-ui, sans-serif);
  color: var(--i-ink); font-size: 14px; line-height: 1.45; }
.ins-label, .ins-kicker { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--i-faint); }
.ins-kicker { color: var(--i-amber); }
.ins-empty { color: var(--i-dim); padding: 14px 0; }
.ins-num { font-family: var(--i-display); font-weight: 700; }

/* ---- take list ---- */
.ins-takes { display: flex; flex-direction: column; }
.ins-takes-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 0 8px; }
.ins-takes-head h3 { font-size: 18px; }
.ins-take { display: grid; grid-template-columns: 22px minmax(84px, 1fr) minmax(76px, 1fr) 54px auto; grid-template-areas: "star when what acc tools" "star flags flags flags tools"; gap: 3px 10px; align-items: center; padding: 8px 8px 8px 4px; border-top: 1px solid var(--i-line); border-left: 2px solid transparent; transition: background .15s; }
.ins-take:hover { background: var(--i-raise); }
.ins-take.on { background: var(--amber-dim, rgba(226, 176, 74, .16)); border-left-color: var(--i-amber); }
.ins-take.cmp { border-left-color: var(--i-ghost); }
.ins-star { background: none; border: 0; padding: 0; font-size: 17px; line-height: 1; color: rgba(255, 255, 255, .16); transition: color .15s, transform .1s; }
.ins-star:hover { color: var(--i-dim); } .ins-star.on { color: var(--i-amber); text-shadow: 0 0 12px rgba(226, 176, 74, .45); }
.ins-when b { display: block; font-weight: 500; font-size: 14px; white-space: nowrap; } .ins-when small, .ins-what small { display: block; white-space: nowrap; }
.ins-what b { font-family: var(--i-display); font-weight: 600; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; }
.ins-acc { font-family: var(--i-display); font-weight: 700; font-size: 24px; line-height: 1; text-align: right; } .ins-acc i { font-style: normal; font-size: 13px; color: var(--i-dim); margin-left: 1px; }
.ins-star { grid-area: star; } .ins-when { grid-area: when; } .ins-what { grid-area: what; } .ins-acc { grid-area: acc; } .ins-take-tools { grid-area: tools; }
.ins-flags { grid-area: flags; display: flex; flex-wrap: wrap; gap: 4px; min-height: 0; } .ins-flags:empty { display: none; }
.ins-flag { font-size: 9.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--i-dim); border: 1px solid var(--i-line2); border-radius: 3px; padding: 0 5px; white-space: nowrap; }
.ins-flag.best { color: #111; background: var(--i-amber); border-color: var(--i-amber); } .ins-flag.warn { color: var(--i-amber); border-color: rgba(226, 176, 74, .4); }
.ins-take-tools { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; justify-content: flex-end; max-width: 168px; }
.ins-take-tools .btn { padding: 6px 10px; } .ins-take-tools .btn.ghost { padding: 4px 7px; font-size: 10.5px; } .ins-take-tools .btn:first-child { flex: 1 0 100%; }
.ins-takes-foot { padding: 10px 4px 0; border-top: 1px solid var(--i-line); color: var(--i-dim); font-size: 12px; }

/* ---- replay panel ---- */
.ins-replay { display: grid; gap: 12px; }
.ins-replay-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ins-replay-head h3 { font-size: 20px; line-height: 1.1; margin-top: 2px; }
.ins-transport { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ins-transport input[type=range] { flex: 1 1 160px; min-width: 120px; }
.ins-pos { font-family: var(--i-display); font-weight: 600; font-size: 16px; letter-spacing: .04em; text-transform: uppercase; min-width: 108px; text-align: right; color: var(--i-ink); }
.ins-strip { position: relative; border: 1px solid var(--i-line); border-radius: var(--i-r); background: rgba(0, 0, 0, .28); overflow: hidden; }
.ins-strip canvas { display: block; width: 100%; cursor: pointer; }
.ins-strip-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 7px 10px 0; }
.ins-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--i-dim); }
.ins-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.ins-legend i.rh { background: var(--i-rh); } .ins-legend i.lh { background: var(--i-lh); } .ins-legend i.you { background: var(--i-ghost); height: 4px; vertical-align: 2px; } .ins-legend i.fit { background: var(--i-amber); height: 2px; vertical-align: 3px; width: 14px; }
.ins-legend i.target { background: repeating-linear-gradient(90deg, var(--i-amber) 0 4px, transparent 4px 7px); height: 2px; vertical-align: 3px; width: 16px; opacity: .7; } .ins-legend i.miss { background: none; border: 1.5px solid var(--i-bad); border-radius: 50%; }
.ins-findings { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ins-findings li { display: grid; grid-template-columns: 92px 1fr; gap: 10px; align-items: baseline; padding: 7px 0; border-top: 1px solid var(--i-line); font-size: 14.5px; }
.ins-findings li:first-child { border-top: 0; }
.ins-compare { border: 1px dashed var(--i-line2); border-radius: var(--i-r); padding: 10px 12px; display: grid; gap: 4px; }
.ins-compare p { margin: 0; font-size: 14px; }

/* ---- today card ---- */
.ins-today { border: 1px solid rgba(226, 176, 74, .35); border-radius: var(--i-r); background: linear-gradient(150deg, rgba(226, 176, 74, .1), transparent 55%); padding: 16px 18px 14px; display: grid; gap: 12px; }
.ins-today-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ins-today-head h3 { font-size: 26px; line-height: 1.05; margin-top: 2px; }
.ins-budget { display: flex; height: 4px; border-radius: 2px; overflow: hidden; background: rgba(255, 255, 255, .08); }
.ins-budget i { display: block; height: 100%; } .ins-budget .review { background: var(--i-amber); } .ins-budget .trouble { background: var(--i-bad); } .ins-budget .new { background: var(--i-ghost); opacity: .55; }
.ins-budget-key { display: flex; gap: 14px; flex-wrap: wrap; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--i-dim); margin-top: -4px; }
.ins-budget-key i { display: inline-block; width: 9px; height: 4px; border-radius: 2px; margin-right: 5px; vertical-align: 2px; } .ins-budget-key .review { background: var(--i-amber); } .ins-budget-key .trouble { background: var(--i-bad); } .ins-budget-key .new { background: var(--i-ghost); opacity: .55; }
.ins-plan { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.ins-item { display: grid; grid-template-columns: 22px 1fr auto auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--i-line); }
.ins-item .n { font-family: var(--i-display); font-weight: 700; font-size: 16px; color: var(--i-faint); text-align: right; }
.ins-item.done { opacity: .45; } .ins-item.done .n { color: var(--i-amber); }
.ins-item p { margin: 2px 0 0; font-size: 15px; } .ins-item p.why { color: var(--i-dim); font-size: 13px; }
.ins-item .est { font-family: var(--i-display); font-weight: 600; font-size: 14px; color: var(--i-dim); white-space: nowrap; }
.ins-tag { font-size: 9.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--i-amber); }
.ins-tag.trouble { color: var(--i-bad); filter: brightness(1.25); } .ins-tag.new { color: var(--i-ghost); }
.ins-today-foot { color: var(--i-dim); font-size: 12.5px; }

/* ---- freshness ---- */
.ins-fresh { display: grid; gap: 4px; }
.ins-fresh-row { display: grid; grid-template-columns: minmax(150px, 220px) 1fr minmax(180px, 260px); gap: 14px; align-items: center; padding: 8px 8px; border: 0; border-top: 1px solid var(--i-line); background: none; text-align: left; width: 100%; transition: background .15s; }
button.ins-fresh-row:hover { background: var(--i-raise); }
.ins-fresh-row .name b { font: 700 16px var(--i-display); color: var(--i-amber); margin-right: 8px; } .ins-fresh-row .name em { font-style: normal; font-size: 14px; } .ins-fresh-row .name small { display: block; }
.ins-bar { display: flex; height: 12px; border-radius: 2px; overflow: hidden; background: rgba(255, 255, 255, .05); gap: 1px; }
.ins-bar i { display: block; height: 100%; min-width: 2px; }
.ins-bar .fresh { background: var(--i-amber); } .ins-bar .due { background: rgba(226, 176, 74, .38); } .ins-bar .lapsed { background: var(--i-bad); } .ins-bar .unseen { background: rgba(255, 255, 255, .07); }
.ins-fresh-row .txt { color: var(--i-dim); font-size: 13px; }
.ins-fresh-key { display: flex; gap: 16px; flex-wrap: wrap; padding: 10px 8px 0; border-top: 1px solid var(--i-line); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--i-dim); }
.ins-fresh-key i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.ins-fresh-key .fresh { background: var(--i-amber); } .ins-fresh-key .due { background: rgba(226, 176, 74, .38); } .ins-fresh-key .lapsed { background: var(--i-bad); } .ins-fresh-key .unseen { background: rgba(255, 255, 255, .1); }

@media (max-width: 720px) {
  .ins-take { grid-template-columns: 22px 1fr 54px auto; grid-template-areas: "star when acc tools" "star what what tools"; } .ins-take .ins-flags { display: none; }
  .ins-fresh-row { grid-template-columns: 1fr; gap: 6px; } .ins-findings li { grid-template-columns: 1fr; gap: 0; } .ins-item { grid-template-columns: 18px 1fr auto; } .ins-item .est { display: none; }
}

/* ---- in the app ---- */
.side.watching { position: relative; }
.replay-dock { position: absolute; inset: 0; z-index: 4; overflow-y: auto; background: var(--panel-solid, #121115); padding: 16px 16px 24px; display: grid; gap: 18px; align-content: start; animation: fade .25s both; }
.replay-dock .ins-findings li { grid-template-columns: 1fr; gap: 0; } .replay-dock .ins-take { grid-template-columns: 20px 1fr 50px auto; grid-template-areas: "star when acc tools" "star what what tools" "star flags flags tools"; }
.res-findings { display: grid; gap: 4px; border-top: 1px solid var(--line, rgba(255, 255, 255, .08)); padding-top: 12px; } .res-findings p { margin: 0; font-size: 14.5px; } .res-findings p.quiet { color: var(--dim, #8f8a82); font-size: 13px; }
.today-slot { padding: 12px 12px 0; }
.ins-today.compact { padding: 14px 14px 10px; gap: 10px; } .ins-today.compact .ins-today-head h3 { font-size: 20px; } .ins-today.compact .ins-today-head h3.quiet { font-size: 17px; text-transform: none; letter-spacing: 0; font-family: var(--body, inherit); font-weight: 500; line-height: 1.3; }
.ins-today.compact .ins-item { grid-template-columns: 16px 1fr auto; gap: 10px; padding: 8px 0; } .ins-today.compact .ins-item .est { display: none; } .ins-today.compact .ins-item p { font-size: 14px; } .ins-today.compact .ins-item .btn { padding: 6px 10px; }
.ins-today h3.quiet { font-size: 20px; }
.section.excluded { opacity: .45; }
.prog-review { padding-top: 26px; max-width: 1140px; } .prog-review .pane-head { padding-left: 0; }
.card-today { max-height: 0; overflow: hidden; opacity: 0; transition: max-height .3s ease, opacity .25s ease, margin .3s ease; border-left: 2px solid var(--amber, #e2b04a); padding-left: 10px; margin: 0; }
.card:hover .card-today.has, .card:focus-within .card-today.has { max-height: 120px; opacity: 1; margin: 2px 0 10px; }
.card-today p { margin: 0 0 2px; font-size: 13px; color: var(--ink, #e8e4dc); } .card-today .ins-kicker { display: block; margin-bottom: 2px; }
.res-card > .btnrow:last-child { position: sticky; bottom: -22px; margin-bottom: -22px; padding: 12px 0 22px; background: var(--panel-solid, #121115); border-top: 1px solid var(--line, rgba(255, 255, 255, .08)); }
