/* Page-specific pieces, in the same language as styles.css: use cases, insights and workflow cards. */

/* use cases: team mix bars and chips */
.mix { display: flex; gap: 2px; height: 6px; margin-bottom: 6px; overflow: hidden; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }

/* insights: half-width cards; badge, title and summary, then the chart beside the money, the numbers, what to do, where */
.insights { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.insight { padding: 16px; }
.ins-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.insight h2 { margin: 10px 0 0; font-size: 15px; line-height: 22px; font-weight: 500; }
.ins-sum { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.ins-fig { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 20px; margin-top: 16px; padding: 16px; border-radius: 10px;
  background: var(--subtle); }
.ins-fig svg { display: block; overflow: visible; }
.ins-fig .fig { font: 500 20px var(--sans); fill: var(--text); } .ins-fig .word { font: 11px var(--sans); fill: var(--faint); }
.ins-fig .axis { font: 10px var(--mono); fill: var(--faint); }
.ins-fig b { display: block; font-size: 24px; line-height: 32px; font-weight: 500; letter-spacing: -.01em; }
.ins-fig small { display: block; margin-bottom: 10px; font-size: 12px; line-height: 16px; color: var(--faint); }
.ins-fig .key { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; line-height: 20px; color: var(--muted); }
.ins-fig .key i { display: inline-block; width: 8px; height: 8px; margin-right: 6px; }
.ins-fig .key .num { color: var(--text); }
.ins-fig p { margin: 6px 0 0; font-size: 12px; line-height: 16px; }
.ins-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 12px; }
.ins-stats > div { padding: 2px 0 2px 12px; box-shadow: inset 1px 0 0 var(--line-soft); }
.ins-stats > div:first-child { padding-left: 0; box-shadow: none; }
.ins-stats span, .ins-sec > span { display: block; font-size: 12px; line-height: 16px; color: var(--faint); }
.ins-stats b { font-size: 16px; line-height: 24px; font-weight: 500; }
.ins-sec { margin-top: 14px; padding-top: 12px; font-size: 13px; box-shadow: inset 0 var(--hair) 0 var(--line-soft); }
.ins-sec p { margin: 2px 0 0; }
.where { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 6px 0; }
.where b { font-weight: 500; }

/* provider keys on the Keys page */
.conns { margin: -4px 0 14px; }
.conn { display: grid; grid-template-columns: 120px minmax(0, 1fr) 90px 140px auto; align-items: center; gap: 12px; padding: 10px 0; font-size: 13px;
  box-shadow: inset 0 calc(-1 * var(--hair)) 0 var(--line-soft); }
.conn b { font-weight: 500; }
.none-yet { margin: 0 0 14px; font-size: 13px; color: var(--amber); }
#providers .form select { min-width: 240px; }
@media (max-width: 760px) { .conn { grid-template-columns: minmax(0, 1fr) auto; } .conn > span { grid-column: 1; } }

/* workflows: one row per workflow inside a single card, Browserbase list rows */
.note { margin: -4px 0 12px; max-width: 760px; font-size: 13px; color: var(--muted); }
.wf { display: grid; grid-template-columns: minmax(0, 1fr) 120px 232px; align-items: center; gap: 8px 24px; padding: 14px 16px;
  box-shadow: inset 0 var(--hair) 0 var(--line-soft); }
.wf:first-child { box-shadow: none; }
.wf-t { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.wf h3 { margin: 0; font-size: 14px; line-height: 20px; font-weight: 500; }
.wf p { margin: 2px 0 0; max-width: 720px; font-size: 13px; color: var(--muted); }
.wf .count { font-size: 13px; color: var(--faint); text-align: right; white-space: nowrap; }
.wf-actions { display: flex; justify-content: flex-end; gap: 6px; }
.wf.denied h3, .wf.denied p { color: var(--faint); }
.wf-edit { display: grid; grid-column: 1 / -1; gap: 10px; }
.wf-edit label { display: block; min-width: 0; }
.wf-edit label > span { display: block; margin-bottom: 4px; font-size: 12px; line-height: 16px; color: var(--faint); }
.wf-edit .input { width: 100%; }
textarea.input { height: auto; min-height: 56px; padding: 7px 10px; line-height: 18px; resize: vertical; }

/* models: price card on hover, and the add dialog (a command menu: search on top, options, key hints below) */
.btn svg { width: 16px; height: 16px; margin-left: -2px; }
.hovercard { position: fixed; z-index: 60; width: 240px; padding: 10px 12px; border-radius: 10px; background: var(--pop); font-size: 12px; line-height: 16px;
  box-shadow: 0 0 0 var(--hair) var(--line), var(--shadow-pop); opacity: 0; pointer-events: none; transition: opacity .12s; }
.hovercard.on { opacity: 1; }
.hovercard .hc-h { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.hovercard .hc-h b { font-weight: 500; font-size: 13px; } .hovercard .hc-h span { color: var(--faint); }
.hovercard .row { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); }
.hovercard .row + .row { margin-top: 4px; } .hovercard .row .num { color: var(--text); }
.hovercard .hc-sep { height: 1px; margin: 8px 0; background: var(--line-soft); }
.hovercard .hc-note { margin-top: 6px; color: var(--faint); }
[data-price] { cursor: default; }
td.actions .btn + .btn { margin-left: 6px; }
table.models th, table.models td { padding-left: 12px; padding-right: 12px; }   /* ten columns and two buttons fit a laptop screen */
table.models th:first-child, table.models td:first-child { padding-left: 16px; }
.btn.chosen { color: var(--green); background: var(--green-bg); box-shadow: 0 0 0 var(--hair) var(--green-line); }
tr.fresh td { animation: fresh 2.4s ease-out; }
@keyframes fresh { from { background: var(--blue-bg); } to { background: transparent; } }
.dialog-back { position: fixed; inset: 0; z-index: 70; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px;
  background: rgba(16, 12, 8, .28); }
.dialog { display: flex; flex-direction: column; width: min(680px, 100%); max-height: 76vh; overflow: hidden; border-radius: 12px; background: var(--pop);
  box-shadow: 0 0 0 var(--hair) var(--line), var(--shadow-pop); }
.dialog .search { display: flex; flex: none; align-items: center; gap: 10px; height: 52px; padding: 0 16px; box-shadow: inset 0 calc(-1 * var(--hair)) 0 var(--line-soft); }
.dialog .search svg { width: 18px; height: 18px; color: var(--faint); }
.dialog .search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 15px; }
.dialog .search input::placeholder { color: var(--faint); }
.opts { position: relative; flex: 1; overflow-y: auto; padding: 4px; }
.opt { display: grid; grid-template-columns: minmax(0, 1fr) 84px 68px 68px 60px; align-items: center; gap: 12px; min-height: 48px; padding: 6px 10px;
  border-radius: 8px; font-size: 13px; cursor: pointer; }
.opt.on { background: var(--active); }
.opt.here { cursor: default; opacity: .55; }
.opt .name { min-width: 0; }
.opt .name b { display: flex; align-items: center; gap: 6px; font-weight: 500; }
.opt .name small { display: block; overflow: hidden; color: var(--faint); font-size: 12px; line-height: 16px; white-space: nowrap; text-overflow: ellipsis; }
.opt .name .mono { font-size: 11px; }
.opt .r { text-align: right; }
.opt-hd { flex: none; min-height: 0; padding: 10px 14px 6px; color: var(--faint); font-size: 12px; cursor: default; }
.opt-hd button { justify-self: start; padding: 0; border: 0; background: none; color: inherit; font-size: 12px; cursor: pointer; }
.opt-hd button.r { justify-self: end; }
.opt-hd button:hover, .opt-hd button.on { color: var(--text); }
.opts-note { padding: 40px 16px; text-align: center; color: var(--faint); font-size: 13px; }
.dialog.account { width: min(420px, 100%); }
.dialog-h { padding: 18px 16px 0; } .dialog-h h2 { margin: 0; font-size: 15px; line-height: 22px; font-weight: 500; }
.dialog-h p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.dialog-b { display: grid; gap: 12px; padding: 16px; }
.dialog-b label > span { display: block; margin-bottom: 4px; font-size: 12px; line-height: 16px; color: var(--faint); }
.dialog-b .input { width: 100%; } .dialog-b .gate-err { margin: 0; } .dialog-b .gate-err:empty { display: none; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.dialog-foot { display: flex; flex: none; justify-content: space-between; gap: 12px; padding: 10px 16px; font-size: 12px; color: var(--faint);
  box-shadow: inset 0 var(--hair) 0 var(--line-soft); }

@media (max-width: 980px) { .insights { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .ins-fig { grid-template-columns: minmax(0, 1fr); justify-items: center; } .ins-fig > div { width: 100%; } }
@media (max-width: 760px) {
  .wf { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .wf .count { text-align: left; }
  .wf-actions { justify-content: flex-start; }
  .opt { grid-template-columns: minmax(0, 1fr) 56px 56px 56px; }
  .dialog-back { padding-top: 8vh; } .dialog-foot > span:first-child { display: none; }
}

/* report: one page for leadership; spend against volume per kind of work, the business split, the team scorecard */
:root { --k-business: #2f9e8f; --k-general: #c9c4bd; --k-unrelated: #e0835e; }
:root[data-theme="dark"] { --k-business: #52bfae; --k-general: #5a534e; --k-unrelated: #efa985; }
.halves { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kpi .value small { margin-left: 2px; font-size: 15px; color: var(--faint); letter-spacing: 0; }
.where-money { display: grid; gap: 4px; padding-top: 12px; }
.wm { display: grid; grid-template-columns: 112px minmax(0, 1fr) 44px 120px; align-items: center; gap: 12px; height: 34px; font-size: 13px; }
.wm .r { text-align: right; } .wm small { margin-left: 4px; font-size: 11px; color: var(--faint); }
.bars { display: grid; gap: 3px; }
.bars span { display: block; height: 5px; min-width: 2px; background: var(--track); }
.kbar { display: flex; gap: 2px; height: 10px; margin-top: 4px; overflow: hidden; }
.kbar span { min-width: 2px; } .k-business { background: var(--k-business); } .k-general { background: var(--k-general); } .k-unrelated { background: var(--k-unrelated); }
.kinds { display: grid; gap: 12px; margin-top: 16px; }
.k-h { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; } .k-h b { margin-left: auto; font-weight: 500; }
.kinds small { display: block; margin: 2px 0 0 16px; font-size: 12px; line-height: 16px; color: var(--faint); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.about-ask { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.about-form { flex-direction: column; align-items: flex-start; } .about-form textarea { width: 100%; min-height: 72px; }
.about-note { margin: 16px 0 0; font-size: 12px; line-height: 16px; color: var(--faint); }
.about-edit { margin-top: 12px; }
.linkish { padding: 0; border: 0; background: none; color: var(--text); font-size: inherit; font-weight: 500; cursor: pointer; }
@media (max-width: 980px) { .halves { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .wm { grid-template-columns: 96px minmax(0, 1fr) 40px; } .wm > :last-child { display: none; } }
@page { size: A4 landscape; margin: 12mm; }   /* the report as a one-pager: wide enough for the desktop layout */
@media print {
  .side, .demo-bar, #print, .about-note button, .menu, .sec .link { display: none !important; }
  .app { display: block; height: auto; background: none; } .cols { margin: 0; overflow: visible; }
  main { max-width: none; padding: 0; zoom: .7; } .card, .kpi, .strip, .table-wrap { break-inside: avoid; } .sec { break-after: avoid; }
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } .halves { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { min-height: 0; } .sec { margin-top: 20px; } .hide-sm { display: table-cell !important; }
}
.kinds > div { min-width: 0; }
#connect .inputs { display: flex; flex: 1; flex-wrap: wrap; gap: 8px; min-width: 220px; }
#connect .inputs .input { flex: 1; min-width: 180px; }
#connect .inputs textarea.input { flex-basis: 100%; min-height: 72px; font: 12px var(--mono); }
#providers .hint { margin: 8px 0 0; font-size: 12px; line-height: 16px; color: var(--faint); } #providers .hint:empty { display: none; }

.workspace-setup { padding:16px; margin-bottom:8px; }
.workspace-setup p { margin:0 0 16px; font-size:13px; color:var(--muted); }
.workspace-command { display:flex; gap:12px; align-items:center; margin-bottom:16px; }
.workspace-command:has(> code), .workspace-command:has(> pre) { padding:12px; border-radius:8px; background:var(--subtle); box-shadow:0 0 0 var(--hair) var(--line-soft); }
.workspace-command code { overflow-wrap:anywhere; flex:1; font-family:var(--mono); font-size:12px; }
.workspace-command .input { flex:1; min-width:0; }
.workspace-command .btn { flex-shrink:0; }
@media(max-width:640px) { .workspace-command { flex-direction:column; align-items:stretch; } .workspace-command .input { flex:none; } .workspace-setup { padding:16px; } }
.connect-list { overflow:hidden; }
.connect-choice { display:flex; justify-content:space-between; align-items:center; gap:16px; width:100%; min-height:48px; padding:12px 16px; border:0; border-radius:0; background:transparent; box-shadow:inset 0 calc(-1 * var(--hair)) 0 var(--line-soft); font:inherit; font-size:13px; color:var(--text); cursor:pointer; text-align:left; }
.connect-choice:last-child { box-shadow:none; }
.connect-choice span { color:var(--faint); }
.connect-choice:hover { background:var(--hover); }
.connect-choice:active { background:var(--active); }
.connect-choice:focus-visible { outline:1px solid var(--faint); outline-offset:-2px; }
.workspace-setup .stack { display:grid; gap:12px; max-width:480px; }
.workspace-setup .stack .input { width:100%; }
.workspace-setup .stack > button { justify-self:start; }
.workspace-setup .gate-err { margin:0; color:var(--red); }
.workspace-setup .gate-err:empty { display:none; }
.workspace-command pre { white-space:pre-wrap; overflow-wrap:anywhere; flex:1; min-width:0; margin:0; }
