/* Animated conversation player (src/animatedConversation.js), in the portal's look (Fresco,
   styles/fresco-tokens.css): DM Sans and Sora, one indigo for actions, white cards with a thin line,
   indigo soft for what is active, and flat colours only (styles/no-gradients.css removes every
   background-image in the portal). Sizes inside the stage use container units so the scene scales
   as one picture. Leo/Marta keep the green and pink of the printed cards. */
.ac {
  --ac-leo: #3b8a35;
  --ac-marta: #e0457b;
  --ac-purple: var(--fresco-primary);
  --ac-navy: var(--fresco-ink);
  --ac-line: var(--fresco-line);
  --ac-soft: var(--fresco-primary-soft);
  --ac-ink: var(--fresco-ink);
  --ac-pl: var(--fresco-muted);
  font-family: var(--fresco-font);
  font-synthesis: none;
  display: grid;
  gap: 14px;
}
.ac [hidden] { display: none !important; }

/* In the animated view the scene gets the whole width; the teacher flow returns with the card view. */
.conversation-workspace-layout:has(.ac-player:not([hidden])) { grid-template-columns: minmax(0, 1fr); }
.conversation-workspace-layout:has(.ac-player:not([hidden])) > .conversation-teacher-guide { display: none; }

/* View switch, like the materials view tabs */
.ac-view-switch {
  display: inline-flex; gap: 6px; justify-self: start; padding: 6px;
  border: 1px solid rgba(74, 47, 186, 0.14); border-radius: 999px; background: #fff;
  box-shadow: 0 10px 26px rgba(36, 16, 111, 0.07);
}
.ac-view-switch button {
  min-height: 40px; padding: 0 18px; border: 2px solid transparent; border-radius: 999px;
  background: transparent; color: var(--muted, #605a78); font: inherit; font-weight: 900; cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}
.ac-view-switch button:hover { border-color: rgba(106, 54, 216, 0.24); }
.ac-view-switch button[aria-pressed="true"] { border-color: rgba(106, 54, 216, 0.34); background: var(--ac-soft); color: var(--ac-navy); }
/* The scene and its controls fit one screen: the width follows the viewport height (16:9 stage plus the
   switch, controls and toggles, ~360 px), at most 960 px and never wider than the column. */
.ac-player { display: grid; gap: 12px; width: min(100%, 960px, max(560px, calc((100dvh - 360px) * 16 / 9))); justify-self: center; }
.ac-view-switch { justify-self: center; }

/* Stage: framed like the bilingual card */
.ac-stage {
  /* clip, not hidden: focusing the name field must not scroll the scene inside its frame */
  position: relative; aspect-ratio: 16 / 9; max-width: 100%; overflow: hidden; overflow: clip;
  border: 1px solid var(--ac-line); border-radius: 24px; background: #efe9dc;
  box-shadow: 0 12px 30px rgba(36, 16, 111, 0.08);
  container-type: inline-size;
}
.ac-stage:fullscreen { border: 0; border-radius: 0; width: 100vw; height: 100vh; aspect-ratio: auto; background: #000; }
.ac-camera {
  position: absolute; inset: 0; transform-origin: 50% 45%;
  transition: transform 1.4s cubic-bezier(.3, .7, .2, 1), transform-origin 1.4s cubic-bezier(.3, .7, .2, 1);
}
.ac-camera img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; max-width: none; }
/* Spotlight without gradients: a soft-edged hole in a wide shadow, centred on the speaker's face. */
.ac-spot {
  position: absolute; left: var(--spot-x, 50%); top: var(--spot-y, 40%); width: 36cqw; aspect-ratio: 1; border-radius: 50%;
  transform: translate(-50%, -50%); pointer-events: none; opacity: 0;
  box-shadow: 0 0 9cqw 200cqw rgba(36, 16, 111, .2);
  transition: opacity .6s ease, left 1.2s cubic-bezier(.3, .7, .2, 1), top 1.2s cubic-bezier(.3, .7, .2, 1);
}
.ac-stage.has-spot .ac-spot { opacity: 1; }

/* "Your turn": the classroom gives way to the asking child alone, facing the student, on the brand backdrop */
.ac-closeup {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; z-index: 1;
  opacity: 0; transform: scale(1.06); pointer-events: none;
  transition: opacity .9s ease .2s, transform 3.2s cubic-bezier(.2, .7, .2, 1);
}
.ac-stage.is-practice .ac-closeup { opacity: 1; transform: none; }

/* The shared mascot intro covers the stage while it plays */
.ac-intro-video { position: absolute; inset: 0; z-index: 6; background-color: #2b1287; }
.ac-intro-video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ac-skip {
  position: absolute; right: 2%; bottom: 3%; border: 0; border-radius: 999px; padding: .8cqw 1.8cqw; cursor: pointer;
  background-color: rgba(255, 255, 255, .88); color: var(--ac-navy); font: inherit; font-weight: 1000; font-size: 1.5cqw;
}
.ac-skip:focus-visible { outline: .4cqw solid var(--brand-yellow, #ffeb3f); outline-offset: .2cqw; }

/* Brand: an opening card with the logo and the title, then a small mark in the corner */
.ac-intro {
  position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.1cqw;
  padding: 3cqw; text-align: center; background-color: rgba(247, 247, 251, .86);
}
.ac-intro-brand { display: flex; flex-direction: column; align-items: center; gap: .2cqw; }
.ac-intro-brand img { width: 24cqw; height: auto; margin: -3cqw 0 -4cqw; }
.ac-intro-brand span {
  border-radius: 999px; padding: .5cqw 1.6cqw; background: var(--ac-navy); color: var(--brand-yellow, #ffeb3f);
  font-weight: 1000; font-size: 1.6cqw; letter-spacing: .3em; text-transform: uppercase;
}
.ac-intro-title { margin: 1cqw 0 0; color: var(--ac-navy); font-weight: 1000; font-size: 4.6cqw; line-height: 1.05; text-wrap: balance; }
.ac-intro-title-pl { margin: 0; color: var(--ac-pl); font-weight: 800; font-size: 2.3cqw; }
.ac-brand {
  position: absolute; left: 1.4%; bottom: 2.4%; z-index: 4; display: flex; align-items: center; gap: .6cqw;
  padding: .4cqw 1.2cqw .4cqw .4cqw; border-radius: 999px; background: rgba(255, 255, 255, .86);
  color: var(--ac-navy); font-weight: 1000; font-size: 1.25cqw; box-shadow: 0 .4cqw 1.2cqw rgba(36, 16, 111, .14);
  opacity: 0; transition: opacity .6s ease;
}
.ac-brand img { width: 2.6cqw; height: 2.6cqw; }
.ac-brand span { color: var(--ac-purple); }
.ac-stage.is-started .ac-brand { opacity: 1; }

/* Speech bubbles */
.ac-bubble {
  position: absolute; left: var(--x); top: var(--y); width: max-content; max-width: var(--w); z-index: 2;
  --c: var(--ac-leo);
  background: #fff; border: .32cqw solid var(--c); border-radius: 2.4cqw; padding: 1.1cqw 1.6cqw 1.2cqw;
  box-shadow: 0 .5cqw 1.4cqw rgba(36, 16, 111, .16); pointer-events: none;
  opacity: 0; transform: scale(.6) translateY(1cqw); transform-origin: 50% 110%;
  transition: opacity .25s ease, transform .45s cubic-bezier(.2, 1.5, .4, 1), filter .4s ease;
}
.ac-bubble[data-who="marta"], .ac-bubble[data-who="girl"] { --c: var(--ac-marta); }
.ac-bubble::after {
  content: ""; position: absolute; width: 2.2cqw; height: 2.2cqw; background: #fff;
  border-right: .32cqw solid var(--c); border-bottom: .32cqw solid var(--c); top: 62%;
}
.ac-bubble.tail-right::after { left: 100%; transform: translate(-45%, -50%) rotate(-45deg); }
.ac-bubble.tail-left::after { left: 0; transform: translate(-55%, -50%) rotate(135deg); }
.ac-bubble[data-side="right"] { left: auto; right: var(--r); }
.ac-bubble.is-shown { opacity: 1; transform: none; }
.ac-bubble.is-past { opacity: .55; filter: saturate(.6); }
.ac-num {
  position: absolute; top: -1.4cqw; width: 3.2cqw; height: 3.2cqw; border-radius: 50%;
  background: var(--c); color: #fff; font-weight: 1000; font-size: 2cqw; line-height: 3.2cqw; text-align: center;
}
.ac-bubble[data-side="left"] .ac-num { left: -1.2cqw; }
.ac-bubble[data-side="right"] .ac-num { right: -1.2cqw; }
.ac-es { margin: 0; color: var(--ac-ink); font-weight: 900; font-size: 2.2cqw; line-height: 1.2; }
.ac .ac-pl { display: block; margin: .4cqw 0 0; color: var(--ac-pl); font-weight: 600; font-size: 1.6cqw; line-height: 1.25; }
.ac.is-no-polish .ac-pl, .ac.is-no-polish .ac-line-pl { display: none; }
.ac-w { transition: color .15s ease; }
.ac-bubble.is-speaking .ac-w { color: #a8a2bd; }
.ac-bubble.is-speaking .ac-w.is-said { color: var(--ac-ink); }
.ac-bubble.is-speaking .ac-w.is-now { color: var(--c); }

/* Practice panel: the card's practice, inside the scene beside the character who asks */
.ac-panel {
  position: absolute; top: 3%; bottom: 3%; z-index: 3; display: flex; flex-direction: column; gap: 1.1cqw;
  background: rgba(255, 255, 255, .97); border: 1px solid var(--ac-line); border-radius: 2.4cqw;
  padding: 1.6cqw 1.8cqw; color: var(--ac-ink); box-shadow: 0 1.2cqw 3cqw rgba(36, 16, 111, .2);
  animation: ac-panel-in .7s cubic-bezier(.2, 1.1, .4, 1) .5s both;
}
.ac-panel.is-right { left: 46%; right: 2%; top: 27%; bottom: 3%; }
.ac-bubble.is-practice::after { top: 50%; }
@keyframes ac-panel-in { from { opacity: 0; transform: translateY(4%); } to { opacity: 1; transform: none; } }
.ac-panel-head { display: flex; align-items: center; gap: 1.2cqw; }
.ac-tag {
  flex: none; border: .2cqw solid rgba(255, 235, 63, .6); border-radius: 999px; padding: .5cqw 1.3cqw;
  background: var(--brand-yellow, #ffeb3f); color: var(--ac-navy); font-weight: 1000; font-size: 1.5cqw; letter-spacing: .04em;
}
/* The question in the bubble already says what to do; the written help stays in the data for other views. */
.ac-help { display: none; }
.ac-sentence { border: .2cqw solid transparent; border-radius: 1.8cqw; padding: 1.2cqw 1.6cqw; background: var(--ac-soft); text-align: center; transition: border-color .3s ease; }
.ac-sentence.is-ready { border-color: rgba(106, 54, 216, .5); }
.ac-sentence-es { margin: 0; color: var(--ac-navy); font-weight: 1000; font-size: 2.3cqw; line-height: 1.45; }
.ac-slot { display: inline-block; min-width: 8cqw; padding: 0 .6cqw; border-bottom: .3cqw dashed var(--ac-purple); color: var(--ac-purple); line-height: 1.15; }
.ac-slot.is-filled { border-bottom-style: solid; animation: ac-pop .4s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes ac-pop { from { transform: scale(.6); } to { transform: none; } }
.ac-free {
  width: 13cqw; padding: 0 .4cqw; border: 0; border-bottom: .3cqw dashed var(--ac-purple); border-radius: 0;
  background: transparent; color: var(--ac-purple); font: inherit; font-size: 2.3cqw; font-weight: 1000; text-align: center;
}
.ac-free::placeholder { color: #ab9ee0; font-weight: 700; }
.ac-free:focus { outline: none; background: rgba(106, 54, 216, .08); }
.ac-choices { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 1cqw; flex: 1; min-height: 0; }
.ac-choice {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3cqw; min-height: 0;
  border: .2cqw solid var(--ac-line); border-radius: 1.8cqw; background: #fff; color: var(--ac-ink);
  padding: .7cqw; cursor: pointer; font: inherit; box-shadow: 0 .6cqw 1.6cqw rgba(36, 16, 111, .07); overflow: hidden;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}
.ac-choice:hover { transform: translateY(-.3cqw); border-color: rgba(106, 54, 216, .24); }
.ac-choice[aria-pressed="true"] { border-color: rgba(106, 54, 216, .5); background: var(--ac-soft); }
/* The picture gives way when a label needs two or three lines. */
.ac-choice img { flex: 0 1 auto; width: auto; height: 9cqw; min-height: 3cqw; max-width: 100%; object-fit: contain; border-radius: 1.2cqw; }
.ac-choice-es { flex: none; font-weight: 1000; font-size: 1.8cqw; line-height: 1.05; text-align: center; }
.ac-choice-art { position: relative; display: flex; flex: 0 1 auto; min-height: 0; justify-content: center; }
.ac-choice-symbol { position: absolute; left: 50%; top: 56%; transform: translate(-50%, -50%); border-radius: .8cqw; padding: 0 .6cqw; background: #fffaf0f0; color: var(--ac-ink); font-size: 2cqw; font-weight: 1000; }
.ac-choice .ac-pl { flex: none; font-size: 1.2cqw; line-height: 1.15; text-align: center; margin: 0; }
.ac-challenge {
  flex: 1; display: flex; flex-direction: column; justify-content: center; gap: .6cqw; padding: 1.2cqw 1.6cqw;
  border: .2cqw dashed rgba(74, 47, 186, .3); border-radius: 1.8cqw; background: var(--brand-yellow-soft, #fff7bf);
}
.ac-challenge-label { color: var(--ac-navy); font-weight: 1000; font-size: 1.4cqw; letter-spacing: .08em; text-transform: uppercase; }
.ac-challenge p { margin: 0; font-weight: 900; font-size: 2cqw; line-height: 1.3; }
.ac-challenge .ac-pl { font-size: 1.5cqw; }
.ac-panel-foot { display: flex; align-items: center; justify-content: space-between; gap: 1.2cqw; }
.ac-say { color: var(--ac-purple); font-weight: 1000; font-size: 1.5cqw; opacity: 0; transition: opacity .3s ease; }
.ac-say .ac-pl { display: inline; font-size: 1.3cqw; }
.ac-sentence.is-ready ~ .ac-panel-foot .ac-say { opacity: 1; }

/* Primary actions inside the scene use the portal's primary button look, scaled with the stage */
.ac-ask-back, .ac-start {
  display: inline-flex; align-items: center; gap: .8cqw; border: 0; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 1000;
  color: var(--ac-navy); background-color: var(--accent-green, #93f586);
  box-shadow: 0 .5cqw 0 rgba(36, 16, 111, .18), 0 1.2cqw 2.2cqw rgba(74, 47, 186, .18);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.ac-ask-back { flex: none; font-size: 1.7cqw; padding: 1cqw 1.9cqw; }
.ac-ask-back:hover:not(:disabled) { transform: translateY(-.15cqw); }
.ac-ask-back:disabled { background-color: #ece8f7; color: #a49dbb; box-shadow: none; cursor: default; }
.ac-ask-back small { font-size: 1.2cqw; font-weight: 800; opacity: .75; }
.ac-start { margin-top: 1.4cqw; padding: 1.6cqw 3cqw; font-size: 2.6cqw; }
.ac-start:hover { transform: translateY(-.15cqw); }
.ac-start svg { width: 2.6cqw; height: 2.6cqw; }
.ac-choice:focus-visible, .ac-ask-back:focus-visible, .ac-start:focus-visible { outline: .45cqw solid var(--ac-purple); outline-offset: .3cqw; }
.ac-repeat {
  position: absolute; left: 50%; bottom: 4%; z-index: 4; transform: translateX(-50%);
  border-radius: 999px; padding: 1cqw 2.2cqw; background: var(--ac-navy); color: #fff;
  font-weight: 1000; font-size: 2cqw; box-shadow: 0 .6cqw 2cqw rgba(36, 16, 111, .3);
}
.ac-repeat span { color: var(--brand-yellow, #ffeb3f); }

/* Narrow stage (phones, small windows): one bubble at a time at the top, practice over the lower part */
@container (max-width: 620px) {
  .ac-bubble, .ac-bubble[data-side="right"] { width: auto; max-width: none; left: 18% !important; right: 18% !important; top: 4% !important; padding: 2cqw 2.6cqw; border-radius: 3.4cqw; }
  .ac-bubble.is-past { opacity: 0; }
  .ac-bubble::after { display: none; }
  .ac-es { font-size: 4.2cqw; }
  .ac .ac-bubble .ac-pl { font-size: 3.2cqw; }
  .ac-num { width: 5.4cqw; height: 5.4cqw; font-size: 3.4cqw; line-height: 5.4cqw; top: -2.2cqw; }
  .ac-stage.is-practice .ac-bubble { left: 4% !important; right: 4% !important; top: 2% !important; padding: 1.2cqw 2cqw; }
  .ac-stage.is-practice .ac-es { font-size: 3.6cqw; }
  .ac-stage.is-practice .ac-bubble .ac-pl { display: none; }
  .ac-panel, .ac-panel.is-left, .ac-panel.is-right { left: 2%; right: 2%; top: 24%; bottom: 2%; padding: 1.6cqw 2cqw; gap: 1.2cqw; border-radius: 3cqw; }
  .ac-panel-head, .ac-panel .ac-pl, .ac-say { display: none; }
  .ac-sentence-es, .ac-free { font-size: 3.6cqw; }
  .ac-free { width: 18cqw; }
  .ac-choice { flex-direction: row; gap: 1.4cqw; padding: .6cqw 1cqw; }
  .ac-choice img { height: 10cqw; }
  .ac-choice-es { font-size: 3.2cqw; }
  .ac-ask-back { font-size: 3.4cqw; padding: 1.6cqw 3cqw; margin: 0 auto; }
  .ac-ask-back small { display: none; }
  .ac-challenge-label { font-size: 2.8cqw; }
  .ac-challenge p { font-size: 3.4cqw; }
  .ac-start { font-size: 4.4cqw; padding: 2.6cqw 4.6cqw; }
  .ac-intro-brand img { width: 40cqw; margin: -5cqw 0 -6cqw; }
  .ac-intro-brand span { font-size: 2.8cqw; }
  .ac-intro-title { font-size: 7cqw; }
  .ac-intro-title-pl { font-size: 3.8cqw; }
  .ac-brand { font-size: 2.2cqw; padding: .6cqw 1.8cqw .6cqw .6cqw; }
  .ac-brand img { width: 4.4cqw; height: 4.4cqw; }
  .ac-stage.is-practice .ac-brand { display: none; }
  .ac-start svg { width: 4.4cqw; height: 4.4cqw; }
  .ac-repeat { font-size: 3.4cqw; }
  .ac-skip { font-size: 3cqw; padding: 1.4cqw 3cqw; }
}

/* Controls (portal .button pills) and script */
.ac-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.ac-transport { display: flex; flex-wrap: wrap; gap: 8px; }
.ac-transport svg { width: 18px; height: 18px; flex: none; }
.ac-transport .ac-icon-button { width: 48px; padding: 0; }
.ac-transport .ac-icon-button .ui-icon { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ac-transport .ac-play { min-width: 132px; }
.ac-transport .button:disabled { opacity: .5; cursor: default; transform: none; }
.ac-progress { display: flex; gap: 6px; margin-left: auto; }
.ac-progress span { width: 22px; height: 8px; border-radius: 4px; background: rgba(74, 47, 186, .14); transition: background .3s ease; }
.ac-progress span.is-done { background: var(--ac-purple); }
.ac-toggles { display: flex; flex-wrap: wrap; gap: 8px 20px; width: 100%; }
.ac-toggle { position: relative; display: inline-flex; align-items: center; gap: 9px; color: var(--muted, #605a78); font-size: .92rem; font-weight: 800; cursor: pointer; }
.ac-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.ac-toggle span { position: relative; flex: none; width: 36px; height: 22px; border-radius: 11px; background: rgba(74, 47, 186, .16); transition: background .2s; }
.ac-toggle span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(36, 16, 111, .25); }
.ac-toggle input:checked + span { background: var(--ac-purple); }
.ac-toggle input:checked + span::after { transform: translateX(14px); }
.ac-toggle input:focus-visible + span, .ac-line:focus-visible, .ac-view-switch button:focus-visible, .ac-script summary:focus-visible { outline: 3px solid var(--ac-purple); outline-offset: 2px; }
.ac-script { border: 1px solid var(--ac-line); border-radius: 24px; background: #fff; padding: 12px 18px; box-shadow: 0 12px 30px rgba(36, 16, 111, .06); }
.ac-script summary { cursor: pointer; color: var(--ac-navy); font-weight: 1000; }
.ac-script ol { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; }
.ac-line {
  width: 100%; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: start; text-align: left;
  padding: 9px 10px; border: 2px solid transparent; border-radius: 16px; background: transparent; color: var(--text, #2d2a35); font: inherit; cursor: pointer;
}
.ac-line:hover { border-color: rgba(106, 54, 216, .18); }
.ac-line.is-current { border-color: rgba(106, 54, 216, .34); background: var(--ac-soft); }
.ac-line-num { width: 28px; height: 28px; border-radius: 50%; background: var(--brand-yellow, #ffeb3f); color: var(--ac-navy); font-weight: 1000; font-size: .85rem; line-height: 28px; text-align: center; }
.ac-line-who { display: block; color: var(--ac-purple); font-size: .72rem; font-weight: 1000; letter-spacing: .08em; text-transform: uppercase; }
.ac-line-es { display: block; font-weight: 900; }
.ac-line-pl { display: block; color: var(--muted, #605a78); font-size: .9rem; font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  .ac-camera, .ac-bubble, .ac-spot, .ac-closeup, .ac-brand { transition: none; }
  .ac-camera { transform: none !important; }
  .ac-panel, .ac-slot.is-filled { animation: none; }
}

/* A class's Conversation tab (src/classConversation.js) */
.class-conversation { display: grid; gap: 14px; padding: 18px 0 6px; }
.class-conversation-picker { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.class-conversation-picker button {
  min-height: 42px; padding: 0 18px; border: 2px solid rgba(74, 47, 186, .14); border-radius: 999px; background: #fff;
  color: var(--muted, #605a78); font: inherit; font-weight: 900; cursor: pointer;
}
.class-conversation-picker button[aria-pressed="true"] { border-color: rgba(106, 54, 216, .34); background: #f3efff; color: var(--brand-navy, #26107a); }
.class-conversation-picker button:focus-visible { outline: 3px solid var(--accent-purple, #6b35d6); outline-offset: 2px; }

/* ---- Fresco (design unification, 2026-11-04) ----
   Weights 500/600 instead of 800-1000, flat indigo actions instead of lime green with a 3D edge,
   the portal's button family under the stage, and the same radii as every other card. */
.ac :is(.ac-skip, .ac-intro-brand span, .ac-brand, .ac-num, .ac-es, .ac-tag, .ac-sentence-es, .ac-free, .ac-choice-es,
  .ac-choice-symbol, .ac-challenge-label, .ac-challenge p, .ac-say, .ac-ask-back, .ac-start, .ac-repeat, .ac-line-num,
  .ac-line-who, .ac-line-es, .ac-script summary, .ac-view-switch button) {
  font-weight: 600;
}

.ac :is(.ac-intro-title-pl, .ac-ask-back small, .ac-toggle) {
  font-weight: 500;
}

.ac .ac-intro-title {
  font-family: var(--fresco-display);
  font-weight: 600;
  letter-spacing: -0.015em;
}

.ac .ac-stage {
  border-radius: var(--fresco-radius-lg);
  box-shadow: var(--fresco-shadow);
}

.ac .ac-stage:fullscreen {
  border-radius: 0;
}

/* Start, ask back and repeat: the one action colour, flat */
.ac :is(.ac-start, .ac-ask-back) {
  border-radius: 1.2cqw;
  background-color: var(--fresco-primary);
  color: #fff;
  box-shadow: none;
}

.ac :is(.ac-start, .ac-ask-back):hover:not(:disabled) {
  background-color: var(--fresco-primary-hover);
}

.ac .ac-ask-back:disabled {
  background-color: var(--fresco-ground);
  color: var(--fresco-muted);
}

.ac .ac-repeat {
  background: var(--fresco-primary);
  box-shadow: var(--fresco-shadow-hover);
}

.ac .ac-repeat span {
  color: #fff;
}

/* Labels inside the practice panel: indigo soft, like every chip in the portal */
.ac :is(.ac-tag, .ac-line-num) {
  border-color: transparent;
  background: var(--fresco-primary-soft);
  color: var(--fresco-primary);
}

.ac .ac-challenge {
  border-color: var(--fresco-line-strong);
  background: var(--fresco-ground);
}

/* Under the stage: the portal's buttons and toggles */
.ac .ac-transport .button {
  min-height: var(--fresco-control);
  border: 1px solid var(--fresco-line) !important;
  border-radius: var(--fresco-radius-sm) !important;
  background-color: var(--fresco-surface) !important;
  color: var(--fresco-ink) !important;
  font: 600 0.9375rem / 1.2 var(--fresco-font) !important;
  box-shadow: none !important;
  transform: none !important;
}

.ac .ac-transport .button:hover:not(:disabled) {
  border-color: var(--fresco-line-strong) !important;
  background-color: var(--fresco-ground) !important;
}

.ac .ac-transport .button.primary {
  border-color: var(--fresco-primary) !important;
  background-color: var(--fresco-primary) !important;
  color: #fff !important;
}

.ac .ac-transport .button.primary:hover:not(:disabled) {
  background-color: var(--fresco-primary-hover) !important;
}

.ac .ac-transport .ac-icon-button {
  width: var(--fresco-control);
}

.ac :is(.ac-transport .button, .ac-start, .ac-ask-back, .ac-choice, .ac-line):focus-visible {
  outline: 2px solid var(--fresco-primary);
  outline-offset: 2px;
}

.ac .ac-view-switch {
  border-color: var(--fresco-line);
  border-radius: var(--fresco-radius);
  box-shadow: none;
}

.ac .ac-view-switch button {
  border: 1px solid transparent;
  border-radius: var(--fresco-radius-sm);
}

.ac .ac-view-switch button[aria-pressed="true"] {
  border-color: var(--fresco-primary);
  color: var(--fresco-primary);
}

.ac .ac-progress span {
  background: var(--fresco-line);
}

.ac .ac-toggle span {
  background: var(--fresco-line-strong);
}

.ac .ac-script {
  border-radius: var(--fresco-radius);
  box-shadow: var(--fresco-shadow);
}

.ac .ac-line {
  border-width: 1px;
  border-radius: var(--fresco-radius-sm);
  color: var(--fresco-ink);
}

/* The class's conversation picker (two or more conversations in one class) */
.class-conversation-picker button {
  min-height: var(--fresco-control);
  border: 1px solid var(--fresco-line);
  border-radius: var(--fresco-radius-sm);
  color: var(--fresco-ink);
  font: 600 0.9375rem / 1.2 var(--fresco-font);
}

.class-conversation-picker button[aria-pressed="true"] {
  border-color: var(--fresco-primary);
  background: var(--fresco-primary-soft);
  color: var(--fresco-primary);
}
