.home .llm-head p { margin-top: 8px; color: var(--muted); font: 450 14px/1.4 var(--ui); }
.text-studies {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 3.9fr) minmax(0, 3.1fr);
  grid-template-rows: clamp(230px, 20vw, 292px) clamp(190px, 16.3vw, 234px);
  grid-template-areas: "qwen astra astra" "qwen claude groq";
  gap: clamp(8px, 1.05vw, 16px);
}
#text-qwen { grid-area: qwen; background: #11272d; }
#text-astra { grid-area: astra; background: #0a1b20; }
#text-claude { grid-area: claude; background: #ede3cb; }
#text-groq { grid-area: groq; color: #172712; background: linear-gradient(135deg,#def530,#accd00 50%,#cced00); }
.text-study {
  position: relative; isolation: isolate; display: flex; align-items: end;
  min-width: 0; overflow: hidden; border-radius: 10px; color: #fff;
}
.study-stage, .study-scene img, .study-scene iframe, .study-scene > sociaro-phase-shift { display: block; position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.study-scene > sociaro-phase-shift { pointer-events: none; }
.study-scene img { object-fit: contain; }
.phase-scene img { object-fit: cover; }
.text-study::before {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(0deg, #08100de8, #08100d4f 23%, transparent 46%);
}
#text-claude::before { background: linear-gradient(0deg,#30281ded, #30281d75 24%,transparent 54%); }
#text-groq::before { display: none; }
.study-caption {
  z-index: 2; margin: clamp(12px,1.35vw,20px); min-width: 0; pointer-events: none;
}
.home .study-caption p { margin: 4px 0 0; font: 500 clamp(11px,.99vw,14px)/1.3 var(--ui); }
.study-caption h3 { font: 565 clamp(19px,1.9vw,29px)/1.04 var(--ui); letter-spacing: -.045em; }
#text-qwen h3 { font-size: clamp(32px, 3.4vw, 50px); }
.study-caption .model-name { display: inline-flex; align-items: center; gap: .31em; pointer-events: auto; color: inherit; text-decoration: none; }
.study-mark { flex: none; width: 1em; height: 1em; background: currentColor; mask: var(--mark) center / contain no-repeat; }
.mark-qwen { --mark: url("/shared/promo/text/logos/qwen.svg"); }
.mark-openai { --mark: url("/shared/promo/text/logos/openai.svg"); }
.mark-claude { --mark: url("/shared/promo/text/logos/claude.svg"); }
.mark-groq { --mark: url("/shared/promo/text/logos/groq.svg"); }
.study-rates {
  position: absolute; z-index: 3; left: 11px; top: 11px;
  display: flex; align-items: center; gap: 7px; padding: 6px 9px;
  border: 1px solid #ffffff54; border-radius: 7px; color: #fff; background: #15201bdd;
  text-decoration: none; font: 500 10px/1.2 var(--ui); font-variant-numeric: tabular-nums;
}
.study-rates > span { white-space: nowrap; }
.study-rates > span + span { border-left: 1px solid #ffffff60; padding-left: 7px; }
.study-rates b { margin-left: 1px; font: 560 13px/1.2 var(--ui); }
.study-rates:is(:hover,:focus-visible) { background: #fff; color: #171a16; }
.study-rates:is(:hover,:focus-visible) > span + span { border-color: #0003; }
#text-groq .study-rates { background: #f7ffdced; border-color: #78984c90; color: #203112; }
#text-groq .study-rates > span + span { border-color: #78984c77; }
.study-caption .model-name:is(:hover,:focus-visible) { text-decoration: underline; text-underline-offset: .14em; text-decoration-thickness: .065em; }
#text-groq .model-name::after { content: ''; position: absolute; inset: 0; }
.playfield-link { position: absolute; inset: 0; }
.playfield-link:is(:hover,:focus-visible) .scene-action { color: #141c20; background: #fff; }
.text-study:has(.playfield-link:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.text-study:has(.model-name:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.scene-action {
  position: absolute; z-index: 3; top: 11px; right: 11px;
  display: grid; place-items: center; width: 38px; height: 38px;
  border: 1px solid #ffffff88; border-radius: 50%; color: #fff;
  background: #101713b8; backdrop-filter: blur(6px);
}
.scene-action::before {
  content: ''; width: 14px; height: 14px;
  background: linear-gradient(to right,currentColor 1.5px,transparent 1.5px) 0 0,linear-gradient(to bottom,currentColor 1.5px,transparent 1.5px) 0 0,
              linear-gradient(to left,currentColor 1.5px,transparent 1.5px) 100% 100%,linear-gradient(to top,currentColor 1.5px,transparent 1.5px) 100% 100%;
  background-size: 6px 6px; background-repeat: no-repeat;
}
.scene-action:is(:hover,:focus-visible) { color: #141c20; background: #fff; }
.speed-stage img { display: block; width: 100%; height: 100%; object-fit: cover; }
.speed-stage .scene-action { color: #213318; background: #ffffff38; border-color: #526b3994; }
.speed-stage .scene-action::before { width: 9px; height: 11px; margin-left: 2px; background: currentColor; clip-path: polygon(0 0,100% 50%,0 100%); }
.speed-stage .scene-action:is(:hover,:focus-visible) { background: #fff; }
.study-dialog { width: min(1040px,calc(100% - 24px)); }
.study-dialog:has(sociaro-phase-shift) { width: min(720px,calc(100% - 24px)); }
.scene-canvas { height: min(66dvh,600px); background: #121a20; }
.scene-canvas:has(sociaro-phase-shift) { height: min(72dvh,680px); }
.scene-canvas > sociaro-phase-shift:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.scene-canvas:has(iframe[src*="/text/claude/"]) { height: auto; aspect-ratio: 16/9; max-height: 66dvh; }
.scene-canvas iframe, .scene-canvas > sociaro-phase-shift { display: block; width: 100%; height: 100%; border: 0; }
.home #scene-instruction { padding: 9px 14px; color: var(--muted); font-size: 13px; }
.stream-dialog { width: min(610px, calc(100% - 24px)); }
.stream-report { color: #162511; background: #d9f667; padding: clamp(17px,3vw,32px); }
.stream-transcript { position: relative; margin-block: 18px; padding-block: 14px; border-block: 1px solid #63823978; }
.stream-transcript pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 500 clamp(12px,1.15vw,15px)/1.5 var(--mono); }
.stream-live { position: absolute; inset: 14px 0 auto; }
.stream-transcript.is-replaying .stream-static { opacity: 0; }
.stream-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 7px; font: 500 12px/1.3 var(--mono); }
.study-control { border: 1px solid #557137; color: inherit; background: transparent; border-radius: 20px; padding: 7px 12px; font: 550 13px/1.3 var(--ui); cursor: pointer; }
.study-control:hover { background: #effcb4; }
.study-control[hidden], .stream-live[hidden] { display: none; }
.stream-prompt { font: 550 17px/1.3 var(--ui); }
.home .stream-source { margin-top: 14px; font-size: 13px; }
.stream-source a { color: inherit; text-underline-offset: 3px; }
@media (min-width: 761px) and (max-width: 980px) {
  .text-studies { grid-template-columns: minmax(0,4.8fr) minmax(0,3.9fr) minmax(0,3.3fr); grid-template-rows: 198px 172px; }
}
@media (max-width: 760px) {
  .text-studies {
    grid-template-columns: minmax(0,1.24fr) minmax(0,1fr);
    grid-template-rows: auto;
    grid-template-areas: "qwen qwen" "astra astra" "claude groq";
    gap: 9px;
  }
  #text-qwen { aspect-ratio: 1.5; }
  #text-astra { aspect-ratio: 2.7; }
  #text-claude, #text-groq { min-height: clamp(185px,31vw,220px); }
}
@media (max-width: 560px) {
  #text-qwen { aspect-ratio: 1.15; }
  #text-astra { aspect-ratio: 1.94; }
  #text-claude, #text-groq { min-height: clamp(195px,52vw,235px); }
  #text-claude .study-rates, #text-groq .study-rates { top: auto; left: 9px; bottom: 8px; padding: 4px 6px; gap: 5px; font-size: 9px; }
  #text-claude .study-rates > span + span, #text-groq .study-rates > span + span { padding-left: 5px; }
  #text-claude .study-rates b, #text-groq .study-rates b { font-size: 10px; }
  #text-claude .study-caption, #text-groq .study-caption { margin-bottom: 36px; }
  #text-claude .study-caption h3 { font-size: clamp(16px,4.0vw,21px); }
  .study-rates { left: 7px; top: 7px; }
  .study-rates b { font-size: 12px; }
  .scene-canvas:has(sociaro-phase-shift) { height: auto; aspect-ratio: 600/760; max-height: 72dvh; }
  .study-caption .model-name { gap: .25em; }
  #text-claude::before { background: linear-gradient(0deg,#221d16f5,#221d16a8 27%,transparent 57%); }
  .text-study { border-radius: 8px; }
  .scene-action { width: 30px; height: 30px; top: 7px; right: 7px; }
  .scene-action::before { width: 12px; height: 12px; background-size: 5px 5px; }
  .study-caption { margin: 10px; }
  .home .study-caption p { font-size: 10px; }
  .study-caption h3 { font-size: clamp(17px,4.2vw,22px); }
  #text-qwen h3 { font-size: 30px; }
  .speed-stage img { height: 68%; mask-image: linear-gradient(#000 80%,transparent); }
}
