/* =====================================================================
   Talking to an LLM — page-specific styles.
   The request builder, and the token strip in section 02.
   ===================================================================== */

/* ---------- token demo ---------- */
.tokenDemo{margin:14px 0 6px; line-height:2.2}
.tok{
  display:inline-block; padding:3px 1px; border-radius:4px;
  background:rgba(46,208,192,.14); box-shadow:inset 0 0 0 1px rgba(94,236,208,.28);
  font-family:var(--mono); font-size:12.5px; white-space:pre;
}
.tok:nth-child(even){background:rgba(167,139,250,.16); box-shadow:inset 0 0 0 1px rgba(167,139,250,.3)}
.tokenNote{font-size:12px; color:var(--muted2); margin:0}

/* ---------- request builder ---------- */
.reqLab{display:grid; grid-template-columns:250px minmax(0,1fr) 250px; gap:14px; align-items:start}
@media (max-width:1080px){ .reqLab{grid-template-columns:1fr} }
.reqLab > *{min-width:0}

.reqSide{border:1px solid var(--line); border-radius:var(--radius); background:var(--glass); padding:14px}
.reqMain{min-width:0}

.reqTabs{display:flex; gap:7px; margin-bottom:10px}
.reqTab{
  border:1px solid var(--line); background:rgba(6,14,22,.7); color:var(--muted2);
  border-radius:999px; padding:6px 15px; font-size:12.5px; cursor:pointer; font-weight:600;
  transition:all .18s var(--ease);
}
.reqTab:hover{color:var(--text)}
.reqTab.is-on{background:rgba(46,208,192,.18); color:#fff; border-color:rgba(94,236,208,.55)}

.reqOut{margin:0; max-height:560px; overflow:auto}
.reqOut code{white-space:pre}

/* the changing parts of the payload, so edits are visible at a glance */
.reqOut .hl{color:#6EE7B7}
.reqOut .hlv{color:#C4B5FD}
.reqOut .hlc{color:var(--muted2)}
.reqOut .hlcache{background:rgba(251,191,36,.14); border-radius:3px}

.f{display:block; margin-bottom:11px}
.f > span{
  display:block; font-family:var(--mono); font-size:9px; letter-spacing:.12em;
  text-transform:uppercase; color:var(--muted2); margin-bottom:5px;
}
.f textarea{
  width:100%; background:rgba(6,14,22,.85); color:var(--text); border:1px solid var(--line);
  border-radius:7px; padding:7px 9px; font-family:var(--mono); font-size:11px; line-height:1.55;
  resize:vertical;
}
.f textarea:focus{outline:none; border-color:rgba(94,236,208,.55)}
.f input[type=range]{width:100%; accent-color:var(--b); cursor:pointer}
.fVal{display:block; font-size:11px; color:var(--muted2); margin-top:3px}
.fVal b{color:var(--b); font-family:var(--mono)}

.chk{display:flex; align-items:center; gap:8px; padding:4px 0; font-size:12.5px; cursor:pointer}
.chk input{accent-color:var(--b); width:15px; height:15px; cursor:pointer; flex:0 0 auto}

/* ---------- cost readout ---------- */
.meter{margin-bottom:12px}
.meterBar{
  display:flex; height:9px; border-radius:999px; overflow:hidden;
  background:rgba(255,255,255,.07); margin-bottom:6px;
}
.meterBar span{display:block; height:100%; transition:width .25s var(--ease)}
.mIn{background:linear-gradient(90deg,rgba(46,208,192,.75),rgba(94,236,208,.95))}
.mOut{background:linear-gradient(90deg,rgba(167,139,250,.8),rgba(196,181,253,.95))}
.meterNote{margin:0; font-size:11px; color:var(--muted2)}
.meterNote b{color:var(--text); font-family:var(--mono)}
.meterNote.warn b{color:#FDE68A}
.meterNote.bad b{color:#FCA5A5}

.costList{list-style:none; margin:0; padding:0; font-size:12px}
.costList li{display:flex; justify-content:space-between; gap:10px; padding:4px 0; color:var(--muted2)}
.costList li b{color:var(--text); font-family:var(--mono); font-size:11.5px}
.costList li.tot{border-top:1px solid var(--line); margin-top:5px; padding-top:7px}
.costList li.tot b{color:var(--b)}

.rqNotes{list-style:none; margin:0; padding:0; font-size:11.5px}
.rqNotes li{
  position:relative; padding:5px 0 5px 15px; color:var(--muted2); line-height:1.5;
  animation:fade .3s var(--ease);
}
.rqNotes li::before{content:'›'; position:absolute; left:2px; color:var(--b)}
.rqNotes li.good::before{content:'✓'; color:#6EE7B7}
.rqNotes li.warn::before{content:'!'; color:#FDE68A}
.rqNotes li.warn{color:#FDE68A}
