/* Blueprint — Admin, Ask log (asklog.js). Loaded after styles.css; uses its
   tokens, .kpis, .toolbar, .panel, .pill, .fb-dates and .table-wrap. */
.al-kpis{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
.al-tools select.std{flex:0 1 auto;max-width:260px}
.al-quiet{color:var(--muted)}
.al-unsure{display:inline-block;margin-left:6px;font-size:11px;font-weight:700;color:#7a5b00;background:#fff4d6;border-radius:20px;padding:1px 7px}
.al-pad{margin:0;padding:10px 14px}
.table-wrap:has(>.al-t){max-height:70vh;border-radius:0}
.al-t td.al-q,.al-fix-t td.al-q{max-width:420px;overflow:hidden;text-overflow:ellipsis}
.al-t td.al-out .pill,.al-fix-t .pill{white-space:nowrap}

/* The fold: a panel whose navy bar opens it. */
details.al-fix{margin-bottom:16px}
details.al-fix>summary{list-style:none;cursor:pointer;display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 10px}
details.al-fix>summary::-webkit-details-marker{display:none}
details.al-fix>summary::after{content:"▾";margin-left:auto;font-size:11px}
details.al-fix[open]>summary::after{content:"▴"}
details.al-fix>summary:focus-visible{outline:2px solid #fff;outline-offset:-3px}
details.al-fix .table-wrap{max-height:50vh;border-radius:0;border-top:1px solid var(--line)}
.al-fix-empty{padding:18px}

[data-theme="dark"] .al-unsure{background:#33280f;color:#e9b866}

/* Model use: today's neurons against the free 10,000, a tick at the cutoff. */
.al-model{margin-bottom:16px}
.al-mkpis{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}
.al-meter{position:relative;height:8px;margin:12px 0 0;border-radius:20px;background:var(--line)}
.al-meter span{position:absolute;left:0;top:0;bottom:0;border-radius:20px;background:var(--blue)}
.al-meter i{position:absolute;top:-3px;bottom:-3px;width:2px;background:var(--bad)}
.al-mline{margin:8px 0 0}

@media (max-width:700px){
  .al-tools input.up-search{flex:1 1 100%}
  .al-tools select.std,.al-tools .shell-ss{flex:1 1 140px;max-width:none}
  .fb-dates input[type=date]{font-size:16px;min-height:40px}
  details.al-fix>summary{min-height:40px;align-items:center}
  /* Both tables as cards: the question first, the rest under it. */
  .al-t thead,.al-fix-t thead{display:none}
  .al-t,.al-t tbody,.al-t tr,.al-t td,.al-fix-t,.al-fix-t tbody,.al-fix-t tr,.al-fix-t td{display:block}
  .table-wrap:has(>.al-t){max-height:none;overflow:visible}
  details.al-fix .table-wrap{max-height:none;overflow:visible}
  .al-t tr,.al-fix-t tr{position:relative;display:flex;flex-wrap:wrap;align-items:baseline;gap:0 6px;padding:10px 12px;border-bottom:1px solid var(--line)}
  .al-t td,.al-fix-t td{padding:1px 0;border:0;white-space:normal;text-align:left}
  .al-t td.al-q,.al-fix-t td.al-q{order:1;flex:1 1 100%;max-width:none;font-weight:600;padding-right:100px;overflow-wrap:anywhere}
  .al-t td.al-out{position:absolute;top:10px;right:12px}
  .al-t td:not(.al-q):not(.al-out),.al-fix-t td:not(.al-q){order:2;color:var(--muted);font-size:13px}
  .al-t td[data-l="Time taken"]::before,.al-t td[data-l="Rows"]::before,.al-fix-t td[data-l="Times"]::before,.al-fix-t td[data-l="People"]::before,
  .al-fix-t td[data-l="Last asked"]::before{content:"· " attr(data-l) " ";color:var(--muted)}
  .al-t td[data-l="Who"]::before,.al-t td[data-l="Read as"]::before,.al-t td[data-l="Read by"]::before{content:"· ";color:var(--muted)}
  .al-fix-t td[data-l="How it ended"]{flex:1 1 100%;order:3}
  .al-fix-t td.al-q{padding-right:0}
}
@media (prefers-reduced-motion:reduce){ details.al-fix>summary{transition:none} }
@media print{ details.al-fix{display:none} }
