/* /pallas (27 Oct 2026): the instrument is Pallas's own chat window (pallas.aspx.vb), one layer per state,
   shown by the run (sub.js) from .pw[data-st]. Scenes are CSS animations; reduced motion shows the end state.
   The 06 questions are plain <details>. Tokens only. */
.pw { --pw-r: 14px; width: 100%; max-width: 620px; margin-inline: auto; }
.pw-win { border: 1px solid var(--lp-rule-2); border-radius: var(--pw-r); background: var(--lp-paper); overflow: hidden; box-shadow: 0 18px 50px -28px color-mix(in srgb, var(--lp-ink) 45%, transparent); }
.pw-bar { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--lp-rule); }
.pw-name { display: flex; align-items: center; gap: 8px; margin-inline-end: auto; font: 600 12px var(--tos-font-mono); letter-spacing: .14em; color: var(--lp-ink-2); }
.pw-name::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--lp-accent); opacity: .55; }
.pw-chip { font-size: 12px; padding: 5px 10px; border: 1px solid var(--lp-rule-2); border-radius: 7px; color: var(--lp-ink); background: var(--lp-paper); white-space: nowrap; }
.pw-chip.mv { color: var(--lp-accent); border-color: color-mix(in srgb, var(--lp-accent) 40%, transparent); background: color-mix(in srgb, var(--lp-accent) 9%, var(--lp-paper)); }
.pw-chip.mv b { margin-inline-start: 4px; }
.pw-chip.nt { background: var(--lp-ink); color: var(--lp-paper); border-color: var(--lp-ink); }
.pw-body { position: relative; height: 330px; background: color-mix(in srgb, var(--lp-paper-2) 55%, var(--lp-paper)); }
.pw-ly { position: absolute; inset: 0; padding: 18px; display: flex; flex-direction: column; gap: 12px; opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility 0s linear .2s; }
.pw[data-st="hd"] .ly-hd, .pw[data-st="ask"] .ly-ask, .pw[data-st="draft"] .ly-draft, .pw[data-st="agents"] .ly-agents,
.pw[data-st="models"] .ly-models, .pw[data-st="data"] .ly-data { opacity: 1; visibility: visible; transition: opacity .3s ease .1s, visibility 0s; }
.pw-comp { margin: 0 12px 12px; border: 1px solid color-mix(in srgb, var(--lp-accent) 35%, var(--lp-rule)); border-radius: 12px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; background: var(--lp-paper); }
.pw-comp .ic { width: 26px; height: 26px; border-radius: 7px; background: color-mix(in srgb, var(--lp-accent) 12%, var(--lp-paper)); flex: none; display: grid; place-items: center; }
.pw-comp .ic::after { content: ""; width: 10px; height: 10px; border: 2px solid var(--lp-accent); border-radius: 3px; transform: rotate(45deg); }
.pw-comp .ph { flex: 1; font-size: 14px; color: var(--lp-muted); white-space: nowrap; overflow: hidden; }
.pw-comp .go { width: 30px; height: 30px; border-radius: 8px; background: var(--lp-muted); opacity: .55; flex: none; }

/* cards */
.pw-card { border: 1px solid var(--lp-rule); border-radius: 12px; background: var(--lp-paper); padding: 14px 16px; display: grid; gap: 6px; }
.pw-k { display: flex; justify-content: space-between; gap: 10px; font: 600 11px var(--tos-font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--lp-accent); }
.pw-k span { color: var(--lp-muted); letter-spacing: 0; text-transform: none; font-weight: 400; }
.pw-card b { font-size: 16px; line-height: 1.3; }
.pw-card p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--lp-ink-2); }
.pw-foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--lp-rule); padding-top: 10px; margin-top: 4px; font: 400 12px var(--tos-font-mono); color: var(--lp-muted); }
.pw-btn { font: 600 12.5px var(--tos-font-body); padding: 6px 12px; border: 1px solid var(--lp-rule-2); border-radius: 8px; color: var(--lp-ink); background: var(--lp-paper); }
.pw-btn.p { background: var(--lp-accent); border-color: var(--lp-accent); color: var(--lp-on-accent); }

/* messages */
.pw-me { align-self: flex-end; max-width: 80%; background: var(--lp-ink); color: var(--lp-paper); border-radius: 12px 12px 3px 12px; padding: 9px 13px; font-size: 14px; }
.pw-ai { align-self: flex-start; max-width: 88%; display: grid; gap: 8px; }
.pw-ai p { margin: 0; font-size: 14px; line-height: 1.5; background: var(--lp-paper); border: 1px solid var(--lp-rule); border-radius: 12px 12px 12px 3px; padding: 10px 13px; }
.pw-src { display: flex; flex-wrap: wrap; gap: 6px; }
.pw-src span { font: 400 11px var(--tos-font-mono); padding: 4px 8px; border-radius: 6px; border: 1px solid var(--lp-rule-2); color: var(--lp-ink-2); background: var(--lp-paper); }
.pw-dots { display: inline-flex; gap: 4px; padding: 10px 13px; border: 1px solid var(--lp-rule); border-radius: 12px; background: var(--lp-paper); align-self: flex-start; }
.pw-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--lp-muted); }
.pw-pill { justify-self: start; font: 600 11px var(--tos-font-mono); padding: 3px 8px; border-radius: 999px; color: var(--lp-accent); background: color-mix(in srgb, var(--lp-accent) 10%, var(--lp-paper)); }
.pw-lines { display: grid; gap: 5px; margin: 4px 0; }
.pw-lines i { height: 7px; border-radius: 4px; background: var(--lp-rule); }
.pw-lines i:nth-child(2) { width: 88%; } .pw-lines i:nth-child(3) { width: 64%; }
.pw-acts { display: flex; gap: 8px; }

/* moves */
.pw-move { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 10px; align-items: center; border: 1px solid var(--lp-rule); border-radius: 10px; background: var(--lp-paper); padding: 10px 12px; font-size: 13.5px; }
.pw-move .who { font: 600 11px var(--tos-font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--lp-accent); }

/* models: the engine changes, the memory stays */
.pw-eng { display: flex; gap: 8px; justify-content: center; }
.pw-eng span { font: 500 12px var(--tos-font-mono); padding: 6px 12px; border-radius: 8px; border: 1px solid var(--lp-rule-2); color: var(--lp-muted); background: var(--lp-paper); }
.pw-mem { margin-top: 6px; border: 1px solid var(--lp-ink); border-radius: 12px; padding: 16px; text-align: center; background: var(--lp-paper); }
.pw-mem b { display: block; font-size: 15px; }
.pw-mem small { color: var(--lp-ink-2); }
.pw-mem .d { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.pw-mem .d i { width: 8px; height: 8px; border-radius: 50%; background: var(--lp-accent); }
.pw-arrow { text-align: center; font: 400 11px var(--tos-font-mono); color: var(--lp-muted); }

/* data */
.pw-facts { display: grid; gap: 8px; }
.pw-facts div { display: flex; align-items: center; gap: 10px; border: 1px solid var(--lp-rule); border-radius: 10px; background: var(--lp-paper); padding: 11px 13px; font-size: 14px; }
.pw-facts div::before { content: ""; width: 8px; height: 8px; background: var(--lp-accent); flex: none; }

/* the scenes: each state's pieces arrive in order when the state is reached */
@keyframes pw-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pw-type { from { max-width: 0; } to { max-width: 100%; } }
@keyframes pw-gone { 0%, 70% { opacity: 1; } 100% { opacity: 0; height: 0; padding: 0; border-width: 0; } }
@keyframes pw-blink { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
@keyframes pw-eng { 0%, 30% { color: var(--lp-ink); border-color: var(--lp-ink); } 34%, 100% { color: var(--lp-muted); border-color: var(--lp-rule-2); } }
@keyframes pw-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--lp-accent) 45%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
@media (prefers-reduced-motion: no-preference) {
  .pw[data-st] .pw-ly .s1 { animation: pw-in .45s ease .25s both; }
  .pw[data-st] .pw-ly .s2 { animation: pw-in .45s ease 1.1s both; }
  .pw[data-st] .pw-ly .s3 { animation: pw-in .45s ease 1.9s both; }
  .pw[data-st] .pw-ly .s4 { animation: pw-in .45s ease 2.6s both; }
  .pw[data-st="ask"] .ly-ask .pw-dots { animation: pw-in .3s ease .7s both, pw-gone 1.2s ease .7s both; }
  .pw[data-st="ask"] .ly-ask .pw-dots i { animation: pw-blink .8s ease infinite; }
  .pw[data-st="ask"] .ly-ask .pw-dots i:nth-child(2) { animation-delay: .15s; } .pw[data-st="ask"] .ly-ask .pw-dots i:nth-child(3) { animation-delay: .3s; }
  .pw[data-st="ask"] .ly-ask .pw-me { overflow: hidden; white-space: nowrap; animation: pw-type .7s steps(30, end) .1s both; }
  .pw[data-st="agents"] .pw-chip.mv { animation: pw-pulse 1.2s ease .2s 2; }
  .pw[data-st="draft"] .ly-draft .pw-btn.p { animation: pw-pulse 1.4s ease 2.2s 2; }
  .pw[data-st="models"] .pw-eng span { animation: pw-eng 4.5s linear infinite; }
  .pw[data-st="models"] .pw-eng span:nth-child(2) { animation-delay: 1.5s; } .pw[data-st="models"] .pw-eng span:nth-child(3) { animation-delay: 3s; }
}
@media (prefers-reduced-motion: reduce) { .pw .pw-dots { display: none; } .pw-eng span:first-child { color: var(--lp-ink); border-color: var(--lp-ink); } }

/* on a phone the chapter copies do not pin: a chat window is too tall for the reading band */
.sp.js .run .inst.pw:not(.is-hero) { position: static; border: 0; padding: 0; margin-inline: 0; background: transparent; }
.pw .pw-body { height: 330px; }
@media (max-width: 520px) { .pw-chip:not(.mv):not(.nt) { display: none; } .pw-body { height: 320px; } .pw-move { grid-template-columns: 62px minmax(0, 1fr); } .pw-move .pw-btn { display: none; } }
.pw .ro-set { text-align: start; }
/* a narrow window types no question: one line would run past the bubble, so it simply arrives, wrapped */
@media (max-width: 520px) { .pw[data-st="ask"] .ly-ask .pw-me { white-space: normal; animation: pw-in .45s ease .1s both; } .pw-comp .ph { text-overflow: ellipsis; } }

/* 06 questions */
.pq-list { display: grid; border-top: 1px solid var(--lp-ink); }
.pq { border-bottom: 1px solid var(--lp-rule); }
.pq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; font-weight: 600; font-size: 17px; color: var(--lp-ink); }
.pq summary::-webkit-details-marker { display: none; }
.pq summary::after { content: "+"; font-weight: 400; color: var(--lp-muted); }
.pq[open] summary::after { content: "\2212"; }
.pq p { margin: 0 0 18px; color: var(--lp-ink-2); max-width: 60ch; }
