/* Interactives kit (2026-10-20). Each page links, in this order:
     ../../brand/brand.css, ../../platform/src/web/styles.css (the app's own rules: type scale, buttons, .kicker, .note,
     .segmented, .opts/.opt/.letter, .feedback, .chip, .sr-only), then this file for the few pieces the app does not have.
   App rules that apply here (design.md): mostly neutral; violet only for the current state and the one main action;
   subject colours only as a small dot; radii --r-md for controls, --r-lg for the stage; at most two radii per screen.
   Avoid the app's scoped class names: .panel, .rail, .home-hero, .tabbar (they switch to night tokens). */

main.ix { padding-bottom: var(--s7); }
main.ix [hidden] { display: none; }   /* the app's button { display: inline-flex } beats the browser's [hidden] */
.ix-back { display: inline-block; margin-bottom: var(--s3); color: var(--muted); }
.ix-kicker { display: flex; align-items: center; gap: var(--s2); }
.ix-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--muted)); flex: none; }
.ix-lead { color: var(--muted); margin: 0 0 var(--s4); }

/* the stage: the canvas or the 3D view, in the video frame's shape */
.ix-stage { position: relative; margin: 0; background: var(--card); border-radius: var(--r-lg); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.ix-stage canvas { display: block; width: 100%; height: 100%; }
.ix-stage.ratio { aspect-ratio: 8 / 5; }
/* what you can move or tap on the stage (UX review 2026-11-05). SVG or HTML parts take a class; a canvas or 3D stage uses
   IX.cursor (kit.js). Mouse: the cursor says it before you try, and a hover lights the part up. Touch has no hover, so a
   draggable part must look like a handle by itself (a ring, a grip, a filled knob), and the guide says «Arrasta». */
.ix-stage .ix-drag { cursor: grab; touch-action: none; }
.ix-stage .ix-drag:active, .ix-stage.ix-dragging, .ix-stage.ix-dragging * { cursor: grabbing; }
.ix-stage .ix-tap { cursor: pointer; }
@media (hover: hover) {
  .ix-stage .ix-drag:hover, .ix-stage .ix-tap:hover { filter: drop-shadow(0 0 2px var(--accent)) drop-shadow(0 0 1px var(--accent)); }
}
.ix-hint { position: absolute; right: 10px; bottom: 8px; font-size: var(--fs-label); color: var(--muted); pointer-events: none; }
/* labels placed over the stage */
.ix-tag { position: absolute; transform: translate(-50%, -50%); pointer-events: none; font-weight: 700; font-size: var(--fs-sm);
  padding: 1px 7px; border-radius: var(--r-xs); background: color-mix(in srgb, var(--card) 88%, transparent); color: var(--fg); white-space: nowrap; }

/* controls under the stage */
.ix-controls { display: grid; gap: var(--s4); margin: var(--s4) 0; }
.ix-label { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; margin-bottom: var(--s1); }
.ix-label output { font-variant-numeric: tabular-nums; }
.ix-controls input[type=range] { width: 100%; height: 32px; margin: 0; accent-color: var(--accent); }
.ix-controls .segmented { grid-template-columns: repeat(var(--n, 3), 1fr); margin: 0; }
.ix-controls .segmented button { font-size: var(--fs-sm); padding: 6px 8px; }
.ix-check { display: flex; align-items: center; gap: var(--s3); min-height: 44px; font-weight: 700; cursor: pointer; }
.ix-check input { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); }
.ix-check small { font-weight: 400; color: var(--muted); }

/* what is happening: one .note with a short list and the reason */
.ix-readout dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: var(--s1) var(--s3); font-size: var(--fs-sm); }
.ix-readout dt { color: var(--muted); }
.ix-readout dd { margin: 0; font-weight: 700; }
.ix-readout p { margin: var(--s3) 0 0; }
.ix-meter { height: 8px; border-radius: var(--r-xs); background: var(--line); overflow: hidden; margin-top: 4px; }
.ix-meter i { display: block; height: 100%; background: var(--fg); transition: width .25s; }

/* the explainer under the stage: one step at a time, an optional action, then «Seguinte» */
.ix-guide { margin: var(--s4) 0; }
.ix-guide-head { display: flex; justify-content: space-between; align-items: center; margin: 0 0 var(--s2); }
.ix-guide-head .kicker { margin: 0; white-space: nowrap; }
.ix-guide-dots { display: flex; gap: 5px; }
.ix-guide-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.ix-guide-dots i.seen { background: var(--muted); }
.ix-guide-dots i.on { background: var(--accent); }
.ix-guide-text p { margin: 0 0 var(--s2); }
.ix-guide-try { display: flex; gap: var(--s2); align-items: flex-start; margin: var(--s3) 0 0; font-size: var(--fs-sm); }
.ix-guide-try .mark { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--line-strong); font-weight: 700; font-size: 13px; }
.ix-guide-try.ok .mark { background: var(--ok-deep); color: #fff; box-shadow: none; }
.ix-guide-nav { display: flex; justify-content: space-between; align-items: center; margin-top: var(--s3); }

/* challenges: a plain list, like the app's lists */
.ix-tasks { list-style: none; margin: 0; padding: 0; }
.ix-tasks li { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.ix-tasks .mark { flex: none; width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-strong); display: grid; place-items: center; font-size: 14px; font-weight: 700; }
.ix-tasks li.done .mark { background: var(--ok-deep); box-shadow: none; color: #fff; }
.ix-tasks small { display: block; color: var(--muted); font-size: var(--fs-sm); }
.ix-tasks li.done small { color: var(--ok-deep); font-weight: 700; }

.ix-foot { margin-top: var(--s6); font-size: var(--fs-sm); color: var(--muted); }
.ix-foot p { margin: 0 0 var(--s2); }

/* The page is the thing plus one card (owner, 2026-10-20: «UX and experience should be simple, less controls outside of
   the interactive part itself»). <div class="ix-play"> holds the stage and the guide: on a phone the card sits right
   under the stage, and both fit on one screen; on a wide screen they sit side by side, the card always in view. */
main.ix:has(.ix-play) { max-width: 1120px; }
.ix-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s2); }
.ix-top .ix-back { margin: 0; }
.ix-ai { color: var(--muted); white-space: nowrap; }
main.ix:has(.ix-play) h1 { font-size: var(--fs-h2); margin: 0 0 var(--s3); }
@media (max-width: 560px) { main.ix:has(.ix-play) h1 { font-size: var(--fs-h3); margin-bottom: var(--s2); } }
.ix-play { display: grid; gap: var(--s3); align-items: start; }
.ix-play > .ix-guide { margin: 0; }
@media (min-width: 900px) {
  .ix-play { grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); }
  .ix-play > .ix-guide { position: sticky; top: var(--s4); }
}
/* a phone held sideways: the title, «← Explorar» and the chip share one short row, and the stage takes the height
   left under it, so the whole stage is on screen from the start (the tallest stage is 1.12 times as wide as it is
   tall); the card sits beside it, always in view, instead of below the screen */
@media (orientation: landscape) and (max-height: 500px) {   /* after the wide rule, so it wins on a big phone too */
  main.ix:has(.ix-play) { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--s3); align-items: center; padding-top: 8px; }
  main.ix:has(.ix-play) > * { grid-column: 1 / -1; }
  main.ix:has(.ix-play) > h1 { grid-row: 1; grid-column: 1; font-size: var(--fs-h3); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  main.ix:has(.ix-play) > .ix-top { grid-row: 1; grid-column: 2; gap: var(--s3); margin: 0; }
  main.ix:has(.ix-play) > .ix-play { margin-top: 8px; }
  .ix-play { grid-template-columns: minmax(0, calc((100svh - 56px) * 1.12)) minmax(min(290px, 45vw), 1fr); }   /* room for the card on a small phone (r7 C-R7-1) */
  .ix-play > .ix-guide { position: sticky; top: 8px; }
  .ix-play > .ix-guide .ix-guide-text { font-size: var(--fs-sm); }   /* so the card, «Seguinte» too, fits the short screen */
}
/* the few controls that cannot be an action on the thing sit small on the stage itself */
.ix-onstage { position: absolute; z-index: 2; display: flex; gap: 6px; pointer-events: none; }
.ix-onstage > * { pointer-events: auto; }
.ix-onstage.tl { left: 8px; top: 8px; } .ix-onstage.bl { left: 8px; bottom: 8px; }
/* as wide as its options (the app's .segmented is a 4-column grid) */
.ix-onstage .segmented { margin: 0; padding: 3px; gap: 2px; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: auto; background: color-mix(in srgb, var(--soft) 92%, transparent); }
.ix-onstage .segmented button { min-height: 36px; padding: 0 10px; font-size: var(--fs-sm); font-weight: 700; white-space: nowrap; }
/* what the last tap or move did: one short line in the card */
.ix-say:empty { display: none; }
/* while «Vê comigo» plays, the card is just its caption: on a phone a long step would push the caption off the screen */
.ix-touring .ix-guide-text, .ix-touring .ix-guide-try { display: none; }
.ix-touring .ix-say { border-top: 0; padding-top: 0; }
.ix-say { margin: var(--s3) 0 0; padding-top: var(--s3); border-top: 1px solid var(--line); font-size: var(--fs-sm); }
/* «Testa-te»: challenges and exam-style questions, closed by default, after the thing */
details.ix-more { margin-top: var(--s6); border-top: 1px solid var(--line); }
details.ix-more > summary { cursor: pointer; list-style: none; min-height: 48px; display: flex; align-items: center; gap: var(--s2); font-weight: 700; }
details.ix-more > summary::-webkit-details-marker { display: none; }
details.ix-more > summary::after { content: "+"; margin-left: auto; color: var(--muted); font-size: var(--fs-lead); }
details.ix-more[open] > summary::after { content: "–"; }
details.ix-more > summary small { font-weight: 400; color: var(--muted); }
details.ix-more h3 { margin: var(--s4) 0 var(--s2); }

/* ?embed (kit.js): the stage alone, filling the frame of the page that hosts it, and see-through, so the host page shows
   behind the thing. While the host plays the scene (html.ix-demo), the stage has no controls of its own */
.ix-embed, .ix-embed body { height: 100%; margin: 0; background: transparent; }
.ix-embed main.ix { display: block; padding: 0; margin: 0; max-width: none; height: 100%; }
.ix-embed main.ix > :not(.ix-play), .ix-embed .ix-play > :not(.ix-stage) { display: none; }
.ix-embed main.ix > .ix-play { display: block; height: 100%; margin: 0; }   /* main.ix > …: beats the short-landscape rule's 8 px, which cut the stage */
.ix-embed .ix-play > .ix-stage { aspect-ratio: auto; }   /* the frame sets the size: a page's own stage ratio would make it wider than the frame */
.ix-embed .ix-stage { height: 100%; border-radius: 0; box-shadow: none; background: transparent; }
.ix-embed .ix-stage > .view { aspect-ratio: auto; height: 100%; }
.ix-embed .ix-onstage.bl { bottom: 14px; }
.ix-autoplay .ix-tour { visibility: hidden; }   /* ?embed&play (kit.js): the tour plays by itself, so no button */
.ix-demo .ix-onstage, .ix-demo .ix-hint { display: none; }
