/* In-browser playground (assets/playground.js). Dark console panel in the style of the animation panels. */
.pgPanel { border-radius: 26px; background: var(--ethos-surface); color: var(--vz-text, #f2eadc); padding: clamp(18px, 3vw, 40px); }
.pgTabs { display: flex; gap: 8px; margin-bottom: 26px; flex-wrap: wrap; }
.pgTab {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 170px; padding: 12px 16px;
  border: 1px solid rgba(242,234,220,.18); border-radius: 14px; background: transparent; color: inherit; font: inherit;
  font-size: .95rem; font-weight: 600; letter-spacing: -.01em; text-align: left; cursor: pointer; transition: background .2s, border-color .2s;
}
.pgTab small { font-size: .56rem; font-weight: 400; letter-spacing: .12em; text-transform: uppercase; color: #b3a999; }
.pgTab[aria-selected="true"] { background: #f2eadc; color: #201c18; border-color: #f2eadc; }
.pgTab[aria-selected="true"] small { color: #82786d; }
.pgGrid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(260px, 1fr); gap: clamp(20px, 3vw, 44px); align-items: start; }
.pgMain { min-width: 0; }
.pgLabel { display: block; margin-bottom: 8px; font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; color: #b3a999; }
.pgPanel textarea {
  width: 100%; padding: 14px 16px; border: 1px solid rgba(242,234,220,.18); border-radius: 12px; background: rgba(242,234,220,.04);
  color: #f2eadc; font: inherit; font-size: .95rem; line-height: 1.55; resize: vertical; outline: none; transition: border-color .2s;
}
.pgPanel textarea:focus { border-color: var(--orange); }
.pgPanel textarea::placeholder { color: #8f8577; }
.pgExamples { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.pgEx {
  padding: 6px 11px; border: 1px solid rgba(242,234,220,.18); border-radius: 999px; background: transparent; color: #d9cfc2;
  font: inherit; font-size: .72rem; cursor: pointer; transition: border-color .2s, color .2s;
}
.pgEx:hover:not(:disabled) { border-color: rgba(242,234,220,.6); color: #f2eadc; }
.pgActions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.pgBtn {
  padding: 11px 16px; border: 1px solid rgba(242,234,220,.25); border-radius: 999px; background: transparent; color: #f2eadc;
  font: inherit; font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; cursor: pointer;
  transition: background .2s, border-color .2s, color .2s, opacity .2s;
}
.pgBtn:hover:not(:disabled) { border-color: rgba(242,234,220,.7); }
.pgBtn.primary { background: var(--orange); border-color: var(--orange); color: #201c18; font-weight: 600; }
.pgBtn.primary:hover:not(:disabled) { filter: brightness(1.08); }
.pgBtn:disabled, .pgEx:disabled { opacity: .35; cursor: default; }
.pgBtn kbd { font: inherit; opacity: .6; margin-left: 6px; letter-spacing: 0; }
.pgDoc {
  min-height: 240px; max-height: 460px; overflow-y: auto; padding: 18px 20px; border: 1px solid rgba(242,234,220,.12); border-radius: 14px;
  background: rgba(0,0,0,.22); font-size: .95rem; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere;
}
.pgHint { color: #8f8577; }
.pgPrompt { color: #b3a999; }
.pgTok { color: #f2eadc; border-radius: 3px; cursor: default; transition: background .15s; }
.pgTok:nth-child(odd) { background: rgba(255,139,76,.07); }
.pgTok:hover, .pgTok.sel { background: rgba(255,139,76,.32); }
.pgEnd { display: inline-block; margin-left: 6px; padding: 1px 7px; border: 1px solid rgba(242,234,220,.3); border-radius: 999px; font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: #b3a999; white-space: nowrap; }
.pgCaret { display: inline-block; width: 8px; height: 1.05em; margin-left: 1px; vertical-align: -2px; background: var(--orange); animation: pg-blink 1s steps(2) infinite; }
@keyframes pg-blink { 50% { opacity: 0; } }
.pgSide { display: grid; gap: 14px; align-content: start; }
.pgModels { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pgModel {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border: 1px solid rgba(242,234,220,.18);
  border-radius: 12px; background: transparent; color: inherit; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; text-align: left;
}
.pgModel small { font-size: .52rem; font-weight: 400; letter-spacing: .12em; text-transform: uppercase; color: #b3a999; }
.pgModel[aria-pressed="true"] { border-color: var(--orange); background: rgba(255,139,76,.14); }
.pgModel:disabled { opacity: .4; cursor: default; }
.pgReady { margin: 0; padding: 10px 12px; border-radius: 10px; background: rgba(51,181,212,.12); color: #9fd9e6; font-size: .78rem; }
.pgProgress { height: 6px; border-radius: 3px; background: rgba(242,234,220,.1); overflow: hidden; }
.pgProgress b { display: block; height: 100%; width: 0; background: var(--orange); transition: width .2s; }
.pgStatus { min-height: 1.2em; margin: 0; font-size: .76rem; line-height: 1.5; color: #b3a999; }
.pgStatus.err { color: #ff9b84; }
.pgSet { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid rgba(242,234,220,.14); }
.pgSet label { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; font-size: .72rem; color: #d9cfc2; }
.pgSet output { font-variant-numeric: tabular-nums; color: #f2eadc; }
.pgSet input[type=range] { grid-column: 1 / -1; width: 100%; accent-color: var(--orange); }
.pgSet .pgCheck { display: flex; gap: 8px; align-items: center; }
.pgSet .pgCheck code, .pgFoot code { font-size: .9em; }
.pgSet .pgArea { display: grid; grid-template-columns: 1fr; }
.pgSet .pgArea textarea { font-size: .8rem; padding: 10px 12px; }
.pgStats { margin: 0; border-top: 1px solid rgba(242,234,220,.14); }
.pgStats div { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid rgba(242,234,220,.1); font-size: .76rem; }
.pgStats dt { text-transform: uppercase; letter-spacing: .12em; font-size: .56rem; color: #b3a999; padding-top: 2px; }
.pgStats dd { margin: 0; font-variant-numeric: tabular-nums; }
.pgInspect { padding: 12px; border: 1px solid rgba(242,234,220,.12); border-radius: 12px; font-size: .74rem; min-height: 150px; }
.pgInspect > span { display: block; margin-bottom: 8px; color: #b3a999; font-size: .66rem; }
.pgInspect div { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 48px; gap: 8px; align-items: center; padding: 4px 6px; margin-top: 3px; border-radius: 6px; overflow: hidden; }
.pgInspect div i { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(242,234,220,.08); z-index: 0; }
.pgInspect div.chosen i { background: rgba(255,139,76,.3); }
.pgInspect code, .pgInspect b { position: relative; z-index: 1; white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.pgInspect b { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.pgInspect p { margin: 8px 0 0; color: #b3a999; }
.pgLog {
  height: 460px; overflow-y: auto; padding: 18px; border: 1px solid rgba(242,234,220,.12); border-radius: 14px; background: rgba(0,0,0,.22);
  display: flex; flex-direction: column; gap: 14px;
}
.pgEmpty { margin: auto; max-width: 440px; text-align: center; color: #b3a999; font-size: .85rem; line-height: 1.6; }
.pgEmpty b { display: block; margin-bottom: 8px; font-family: var(--font-serif); font-weight: 400; font-size: 2.2rem; color: #f2eadc; }
.pgMsg { max-width: 86%; padding: 12px 15px; border-radius: 16px; font-size: .92rem; line-height: 1.6; }
.pgMsg .who { display: block; margin-bottom: 4px; font-size: .54rem; letter-spacing: .14em; text-transform: uppercase; opacity: .7; }
.pgMsg .txt { white-space: pre-wrap; overflow-wrap: anywhere; }
.pgMsg.user { align-self: flex-end; background: #f2eadc; color: #201c18; border-bottom-right-radius: 5px; }
.pgMsg.assistant { align-self: flex-start; background: rgba(242,234,220,.07); border: 1px solid rgba(242,234,220,.12); border-bottom-left-radius: 5px; }
.pgMsg.assistant .who { color: var(--orange); opacity: 1; }
.pgMsg.typing .txt::after { content: ""; display: inline-block; width: 7px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--orange); animation: pg-blink 1s steps(2) infinite; }
.pgInput { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: end; }
.pgInput textarea { resize: none; }
.pgFoot { margin: 24px 0 0; color: #b3a999; font-size: .76rem; line-height: 1.55; max-width: 980px; }
.pgFoot code { color: #d9cfc2; }
@media (max-width: 900px) {
  .pgGrid { grid-template-columns: 1fr; }
  .pgLog { height: 380px; }
  .pgMsg { max-width: 94%; }
  .pgInput { grid-template-columns: 1fr 1fr; }
  .pgInput textarea { grid-column: 1 / -1; }
}
