/* Parley — app styles on top of the kit design system (core.css).
   Tokens only; no raw colours outside the brand mark. */

:root { --mark-bg: var(--clay); }

/* assistant avatars: a tinted tile carrying the persona's icon */
.av { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 10px; background: var(--moss-soft); color: var(--moss-ink); }
.av .icon { width: 16px; height: 16px; }
.av.xs { width: 22px; height: 22px; border-radius: 7px; }
.av.xs .icon { width: 13px; height: 13px; }
.av.sm { width: 26px; height: 26px; border-radius: 8px; }
.av.sm .icon { width: 14px; height: 14px; }
.av.md { width: 40px; height: 40px; border-radius: 12px; }
.av.md .icon { width: 20px; height: 20px; }
.av.lg { width: 56px; height: 56px; border-radius: 17px; }
.av.lg .icon { width: 28px; height: 28px; }
.av.clay { background: var(--clay-soft); color: var(--clay-ink); }
.av.slate { background: var(--slate-soft); color: var(--slate); }
.av.ochre { background: var(--ochre-soft); color: var(--ochre); }
.av.rust { background: var(--rust-soft); color: var(--rust); }
.ws-item .av { margin-top: 1px; }

/* chat */
.bar-av { display: inline-flex; }
.bar-title { min-width: 0; text-align: start; border-radius: 8px; padding: 2px 6px; margin-inline-start: -2px; }
.bar-title:not([disabled]):hover { background: var(--surface-2); }
.asst-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }
.asst-chip { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 8px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface);
  font-size: 13.5px; color: var(--ink-2); transition: border-color 0.2s, background-color 0.2s, color 0.2s; }
.asst-chip:hover { color: var(--ink); border-color: var(--ink-3); }
.asst-chip[aria-pressed="true"] { border-color: var(--moss-line); background: var(--moss-soft); color: var(--moss-ink); font-weight: 560; }
.asst-chip.more { padding-inline-start: 12px; border-style: dashed; }
.asst-chip.more .icon { width: 15px; height: 15px; }

.ws-bar .title math, .ws-item b math { font-size: 1em; }

/* question bank */
.ws-filter { padding: 8px 14px 0; }
.ws-filter .select-wrap { width: 100%; }
.q-main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.q-view { max-width: 820px; margin-inline: auto; display: grid; gap: 18px; }
.q-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.q-body { font-size: 16.5px; line-height: 1.8; }
.q-body .md + .q-img { margin-top: 14px; }
.q-img { display: block; max-width: 100%; max-height: 520px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.q-stats { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); }
.q-stats .icon { margin-inline-start: 6px; }
.spoiler { display: none; }
.spoiler.open { display: grid; gap: 14px; animation: rise 0.35s var(--ease); }
.tutor .chat { flex: 1; min-height: 0; }
.tutor .msgs { padding: 16px 14px 10px; }
.tutor .composer { padding: 8px 10px 12px; }
.tutor .msg-body { font-size: 14.5px; }
.tutor .chat-starters .chip { font-size: 12.5px; }
.tutor .ws-head b { font-size: 14px; }

/* image picker (question / reference photos) */
.img-pick { position: relative; }
.img-pick > img { display: block; max-width: 100%; max-height: 260px; border-radius: 14px; border: 1px solid var(--line); }
.img-pick > img.is-busy { opacity: 0.5; }
.img-pick > .spinner { position: absolute; top: 12px; inset-inline-start: 12px; }
.img-pick .img-x { position: absolute; top: 8px; inset-inline-start: 8px; background: var(--surface); box-shadow: var(--shadow-sm); }
.img-pick .dropzone { padding: 22px 16px; }

/* markdown editor with preview */
.md-editor { display: grid; gap: 8px; }
.md-editor-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.md-editor-bar .hint { font-size: 12px; color: var(--ink-3); }
.md-preview { min-height: 120px; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--line-2); background: var(--surface); font-size: 15px; line-height: 1.7; }
.segmented.sm button { height: 26px; padding: 0 11px; font-size: 12.5px; }

/* assistants */
.asst-card { gap: 10px; }
.asst-card .tag { margin-top: 4px; }
.pcard-actions { padding-top: 4px; }
.asst-look { display: flex; gap: 16px; align-items: flex-start; }
.icon-pick { display: flex; flex-wrap: wrap; gap: 4px; }
.icon-pick button { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: var(--ink-2); border: 1px solid transparent; }
.icon-pick button:hover { background: var(--surface-2); color: var(--ink); }
.icon-pick button[aria-pressed="true"] { border-color: var(--moss-line); background: var(--moss-soft); color: var(--moss-ink); }
.icon-pick .icon { width: 16px; height: 16px; }
.tone-pick { display: flex; gap: 8px; }
.tone-pick .sw { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line-2); background: var(--moss); }
.tone-pick .sw.clay { background: var(--clay); }
.tone-pick .sw.slate { background: var(--slate); }
.tone-pick .sw.ochre { background: var(--ochre); }
.tone-pick .sw.rust { background: var(--rust); }
.tone-pick .sw[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); }

/* gallery */
.g-toolbar .search { flex: 1 1 280px; }
.g-card { gap: 10px; }
.g-thumb { width: 100%; max-height: 150px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.g-detail { gap: 16px; }
.g-title { font-size: clamp(26px, 4vw, 36px); line-height: 1.2; }

/* review */
.prompt-box { margin: 0; padding: 14px 16px; border-radius: 12px; background: var(--code-bg); border: 1px solid var(--line); font: 400 13px/1.65 var(--font-mono);
  white-space: pre-wrap; overflow-wrap: anywhere; max-height: 360px; overflow: auto; }

@media (max-width: 720px) {
  .asst-look { flex-direction: column; }
}
