/* Ask Madison.
   The rail and the chat, built to the prototype's own measurements. Where the prototype carries an
   inline style, the value here is that value — the layout is the deliverable, not an approximation
   of it. Only the pieces the prototype does not have are invention: the rename control, which
   appears on hover, and the lookup and held-reply blocks, which are what this build actually knows
   and the prototype never did. */

/* The prototype computes its height from the viewport, because it stands alone. Inside the app
   the screen sits in .ag-body, which already has a definite height from its flex parent — so 100%
   is the same intent and survives the deployment banner, which a viewport calc does not. */
.ask-shell{display:grid;grid-template-columns:240px minmax(0,1fr);height:100%;min-height:calc(100vh - var(--top) - 120px)}

/* ---- the rail ---- */
.ask-rail{border-right:1px solid var(--line);background:var(--surface);overflow:auto;padding:14px 10px}
.ask-new{width:100%;justify-content:center;margin-bottom:12px}
.ask-rail-eyebrow{padding:0 6px;margin-bottom:6px}
.ask-rail-none{padding:6px 10px;line-height:1.55}
.ask-row{position:relative;padding:8px 10px;border-radius:var(--r-md);cursor:pointer;background:transparent;margin-bottom:2px}
.ask-row:hover{background:var(--surface-2)}
.ask-row.on{background:var(--tint-blue)}
.ask-row-title{font-size:12.5px;font-weight:500;color:var(--text)}
.ask-row.on .ask-row-title{font-weight:600;color:var(--blue-deep)}
/* Resting, the row is the prototype's exactly. The control is only there when it is wanted. */
.ask-row-rename{position:absolute;top:6px;right:6px;display:none;align-items:center;justify-content:center;
  width:22px;height:22px;border:0;border-radius:6px;background:var(--surface);color:var(--text-muted);cursor:pointer;padding:0}
.ask-row:hover .ask-row-rename,.ask-row-rename:focus-visible{display:inline-flex}
.ask-row-rename:hover{color:var(--text)}
.ask-row-editing{padding:4px 6px}
.ask-row-input{width:100%;font:inherit;font-size:12.5px;font-weight:500;color:var(--text);
  border:1px solid var(--blue);border-radius:6px;padding:5px 7px;background:var(--surface)}

/* ---- the chat ---- */
.ask-pane{min-height:0}
.ask-head{padding:14px 24px;border-bottom:1px solid var(--line);background:var(--surface);gap:12px}
.ask-head-name{font-size:15px;font-weight:600}
.ask-mark{width:32px;height:32px;border-radius:999px;background:var(--night);color:#fff;display:grid;place-items:center;flex:0 0 32px}
.ask-mark-lg{width:32px;height:32px}
.ask-live{color:var(--green-deep)}
.ask-live .d{background:var(--green)}

.ask-scroll{overflow:auto;padding:20px 24px}
.ask-column{max-width:760px;margin:0 auto}
.ask-open{margin-bottom:22px}
.ask-open-row{align-items:flex-start;gap:10px}
.ask-open .ask-mark{width:28px;height:28px;flex:0 0 28px;margin-top:2px}
.ask-open-body{min-width:0}
.ask-body{color:var(--text);font-size:14px;line-height:1.6;max-width:none}
.ask-open-src{gap:10px;margin-top:8px}
.ask-chips{margin-top:4px;padding-left:38px}
.ask-chip{cursor:pointer}
.ask-chip:disabled{cursor:default;opacity:.6}
/* The chips are uniform, as the prototype has them. A question this org cannot answer still goes
   to Madison, which says why it cannot — so the reason is the chip's tooltip rather than a colour
   that would make the screen look different from the one that was asked for. */

.ask-live-thread{display:flex;flex-direction:column;gap:14px;margin-top:22px;padding-left:38px}
.ask-checking{margin:14px 0 0 38px;font-size:12.5px;color:var(--text-muted)}
.ask-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* ---- the composer ---- */
.ask-composer-bar{padding:12px 24px 16px;border-top:1px solid var(--line);background:var(--surface)}
.ask-composer-row{gap:8px;max-width:760px;margin:0 auto}
.ask-input{height:40px;border-radius:20px;padding:0 16px;font-size:14px}
.ask-send{height:40px;border-radius:20px}
.ask-disclaimer{max-width:760px;margin:6px auto 0}

/* ---- a turn, and what stood behind it ---- */
.ask-asked{align-self:flex-end;max-width:min(560px,80%);background:var(--tint-blue);color:var(--text);
  border-radius:14px 14px 4px 14px;padding:9px 13px;font-size:13.5px;line-height:1.55}
.ask-asked p{margin:0}
.ask-inflight{display:block;margin-top:4px;font-size:11px;color:var(--text-muted)}
.ask-said{display:flex;align-items:flex-start;gap:10px}
.ask-said .ask-avatar{width:28px;height:28px;border-radius:999px;background:var(--night);color:#fff;
  display:grid;place-items:center;flex:0 0 28px;margin-top:2px}
.ask-bubble{min-width:0;flex:1}
.ask-says{margin:0;font-size:14px;line-height:1.6;color:var(--text)}

.ask-lookups{border:1px solid var(--line);border-radius:9px;background:var(--surface-2);padding:9px 12px;font-size:12px}
.ask-lookups summary{cursor:pointer;color:var(--text-muted)}
.ask-lookups ul{list-style:none;margin:10px 0 2px;padding:0;display:flex;flex-direction:column;gap:9px}
.ask-lookup b{display:flex;gap:8px;align-items:baseline;flex-wrap:wrap;font-weight:500}
.ask-lookup-args{font-size:11px;color:var(--text-muted)}
.ask-lookup span{display:block;margin-top:3px;font-size:11.5px;line-height:1.55;color:var(--text-muted)}
.ask-lookup-off b code{color:var(--red)}
.ask-held{margin-top:8px;border-left:3px solid var(--amber);background:var(--tint-amber,#fff9ee);
  border-radius:0 8px 8px 0;padding:10px 12px}
.ask-held p{margin:0 0 6px;font-size:12.5px;line-height:1.6}
.ask-held summary{cursor:pointer;font-size:12px;color:var(--text-muted)}
.ask-held-text{margin-top:6px;color:var(--text-muted);font-style:italic}

/* ---- a withheld panel keeps its slot ---- */
.ask-off-why{margin:0;font-size:13px;line-height:1.6;color:var(--text-muted)}

@media(max-width:860px){
  .ask-shell{grid-template-columns:1fr;height:auto}
  .ask-rail{border-right:0;border-bottom:1px solid var(--line)}
  .ask-chips,.ask-live-thread{padding-left:0}
  .ask-checking{margin-left:0}
}
