/* tartalk.css — styles for /tartalk/ only.
   Design tokens come from site.css. Scoped under .tt- so nothing here can reach into
   avatar.css, which is SHARED with the internal MAX build. */

.tt-wrap { max-width: 1080px; margin: 0 auto; padding: 8px 20px 40px; }

.tt-head h1 { font-size: 26px; letter-spacing: -.02em; margin: 0 0 6px; }
.tt-head p { margin: 0 0 26px; color: var(--ink-soft); max-width: 64ch; font-size: 14.5px; }
.tt-head strong { color: var(--ink); }

.tt-grid { display: grid; grid-template-columns: 400px 1fr; gap: 30px; align-items: start; }
@media (max-width: 880px) { .tt-grid { grid-template-columns: 1fr; } }

/* ---- stage ---- */
.tt-stage {
  width: 100%; max-width: 400px; aspect-ratio: 1;
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: #000;
}
.tt-stage svg { display: block; width: 100%; height: 100%; }

.tt-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
/* avatar.css sizes .av-btn for the builder's full-width action bar. Inside a TarTalk
   row they should be content-width, or two buttons split the line 50/50. */
.tt-row .av-btn { flex: 0 0 auto; width: auto; }
.tt-wrap .av-btn:disabled { opacity: .45; cursor: not-allowed; }
.tt-field { margin-top: 18px; }
.tt-field label { display: block; font-size: 13px; color: var(--ink-soft); margin-bottom: 6px; }
.tt-code-row { display: flex; gap: 8px; }

.tt-inline { font-size: 13px; color: var(--ink-soft); }

/* ---- blocks ---- */
.tt-block { margin-bottom: 26px; }
.tt-block h2 {
  font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); margin: 0 0 6px; font-weight: 700;
}
.tt-sub { margin: 0 0 10px; font-size: 13px; color: var(--ink-soft); max-width: 60ch; }
.tt-sub code { font-family: var(--mono); font-size: 12px; color: var(--ink); }

/* ---- inputs ---- */
.tt-wrap textarea,
.tt-wrap input[type="text"],
.tt-wrap select {
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 9px 11px; font-family: var(--sans); font-size: 14px;
}
.tt-wrap textarea {
  width: 100%; resize: vertical; min-height: 76px; line-height: 1.45;
}
.tt-wrap input[type="text"] {
  flex: 1; min-width: 0; font-family: var(--mono); font-size: 12.5px;
}
.tt-wrap textarea:focus,
.tt-wrap input[type="text"]:focus,
.tt-wrap select:focus {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}
.tt-wrap select { max-width: 210px; }
.tt-wrap input[type="range"] { width: 110px; accent-color: var(--accent); }

.tt-count { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-left: auto; }
.tt-count.tt-full { color: var(--accent); }

.tt-note { font-size: 12.5px; color: var(--muted); margin-top: 6px; min-height: 1.2em; }
.tt-note.tt-bad { color: #ff8a7a; }
.tt-note.tt-ok  { color: var(--accent); }

/* ---- starters ---- */
.tt-starters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 9px; }
.tt-starters .av-btn { flex: 0 0 auto; width: auto; font-size: 12.5px; }

/* ---- clip buttons ---- */
.tt-clips { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.tt-clip {
  text-align: left; white-space: normal; line-height: 1.35;
  max-width: 100%; font-size: 13px;
}
.tt-clip[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }

.tt-foot-note {
  margin: 34px 0 0; padding-left: 13px; border-left: 2px solid var(--line);
  color: var(--muted); font-size: 12.5px; max-width: 68ch;
}
.tt-foot-note strong { color: var(--ink-soft); }
.tt-foot-note code { font-family: var(--mono); font-size: 12px; }

/* The engine binds its builder controls at boot; TarTalk has its own UI and only needs
   the render pipeline, so they're taken out of flow and out of the a11y tree. */
#av-host {
  position: absolute; left: -99999px; top: 0;
  width: 1px; height: 1px; overflow: hidden;
}
