/* Your data, screen 2, where your words go: the stage over the list, the answers beside them.
   The stage is drawn at 860 x 296 and scales with the demo's column; the list is the whole
   map, one row per thing you do. The pick is native radios, and the stage follows it with
   :has, so it works with no script. */

/* ---------------------------------------------------------------- the stage */
.dm-stage { position: relative; width: 100%; aspect-ratio: 860 / 296; }
.dm-art { display: block; width: 100%; height: auto; overflow: visible; }
/* The voice at home: the said row's full stop, the map's station. */
.dm-rest { position: absolute; left: calc((var(--x) - var(--d) / 2) / 860 * 100%); top: calc((var(--y) - var(--d) / 2) / 296 * 100%); width: calc(var(--d) / 860 * 100%); aspect-ratio: 1; }
.dm-rest .station { width: 100%; height: 100%; border-radius: 50%; }
/* The places' names, under the ground, each centred under its place. */
.dm-places { position: absolute; left: 0; right: 0; top: calc(270 / 296 * 100%); height: 0; font-size: 13px; line-height: 1; font-weight: 700; color: var(--plum); }
.dm-places > span { position: absolute; left: calc(var(--x) / 860 * 100%); translate: -50% 0; display: inline-flex; align-items: center; white-space: nowrap; }
.dm-places .dt-mark { width: 22px; height: 14px; margin-right: 6px; vertical-align: 0; }

/* What goes, by the picked row: one traveller at OpenAI's door, the note's file in the
   folder, or nothing at all; and, for what goes to OpenAI, what it writes back inside the
   ring. Unused, OpenAI's ring stands back. */
.dm-map .tr, .dm-map .dm-back { opacity: 0; }
.dm-map .dm-oa { transition: opacity 0.3s ease; }
.dm-map:has(.dm-row[data-go="voice"] input:checked) .tr-voice,
.dm-map:has(.dm-row[data-go="text"] input:checked) .tr-text,
.dm-map:has(.dm-row[data-go="transcript"] input:checked) .tr-transcript,
.dm-map:has(.dm-row[data-go="question"] input:checked) .tr-question,
.dm-map:has(.dm-row[data-go="template"] input:checked) .tr-template,
.dm-map:has(.dm-row[data-go="note"] input:checked) .tr-note { opacity: 1; }
.dm-map:has(.dm-row:is([data-go="voice"], [data-go="text"], [data-go="transcript"], [data-go="question"], [data-go="template"]) input:checked) .dm-back { opacity: 1; }
.dm-map:has(.dm-row:is([data-go="none"], [data-go="note"]) input:checked) .dm-oa { opacity: 0.35; }

/* ---------------------------------------------------------------- the list */
.dm-pick { margin: calc(40 * var(--u)) 0 0; padding: 0; border: 0; min-inline-size: 0; }
.dm-cols, .dm-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr); column-gap: 20px; align-items: center; }
.dm-cols { padding: 0 14px 10px; border-bottom: 2px solid var(--ink); font-size: var(--fs-label); line-height: 1.2; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.dm-cols > span:first-child { grid-column: 2; }
.dm-group { margin: 22px 14px 6px; color: var(--plum); }
/* A row: the radio's ring, what you do, what goes and where it is done; the picked row's
   sentence under them. The radio itself is hidden; its row draws its state and its focus. */
.dm-row { position: relative; padding: 14px; border-bottom: 1.5px solid var(--line); cursor: pointer; transition: background-color 0.15s ease; }
.dm-radio { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.dm-row:hover { background: var(--haze); }
.dm-row:has(.dm-radio:checked) { background: var(--haze); box-shadow: inset 4px 0 0 var(--navy); }
.dm-row:has(.dm-radio:focus-visible) { outline: 3px solid var(--blue); outline-offset: 2px; }
.dm-ring { width: 20px; height: 20px; border: 2px solid var(--ink); border-radius: 50%; display: grid; place-items: center; }
.dm-ring::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--navy); scale: 0; transition: scale 0.15s ease; }
.dm-row:has(.dm-radio:checked) .dm-ring::after { scale: 1; }
.dm-act { font-size: 17px; line-height: 1.3; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.dm-what { font-size: 15.5px; line-height: 1.35; font-weight: 600; color: var(--ink); }
.dm-what.is-none { color: var(--muted); }
.dm-where { display: flex; align-items: center; font-size: 15px; line-height: 1.35; color: var(--body); }
.dm-where .dt-mark { width: 24px; height: 15px; }
.dm-line { grid-column: 2 / -1; margin-top: 8px; max-width: 46em; font-size: 15px; line-height: 1.5; color: var(--plum); text-wrap: pretty; }
/* With the page's script the picked row alone says its sentence; with none, every row does:
   the whole map, written out. */
.js .dm-row:not(:has(.dm-radio:checked)) .dm-line { display: none; }

@media (max-width: 1023.98px) {
  .dm-places { font-size: 11.5px; }
  .dm-places .dt-mark { width: 16px; height: 10px; margin-right: 4px; }
  .dm-pick { margin-top: 36px; }
  .dm-cols { display: none; }
  .dm-group { margin: 20px 0 6px; }
  /* One column: what you do on the first line, then what goes and where, then the sentence. */
  .dm-row { grid-template-columns: 20px minmax(0, 1fr); column-gap: 12px; row-gap: 4px; padding: 12px 10px; align-items: start; }
  .dm-ring { width: 18px; height: 18px; margin-top: 2px; }
  .dm-ring::after { width: 8px; height: 8px; }
  .dm-act { font-size: 16px; }
  .dm-what, .dm-where, .dm-line { grid-column: 2; }
  .dm-what { font-size: 15px; }
  .dm-where { font-size: 14.5px; }
  .dm-line { margin-top: 4px; font-size: 14.5px; }
}

/* ---------------------------------------------------------------- motion
   A new pick plays its way: what goes slides out of your machine to OpenAI's door, and
   OpenAI's answer comes up inside the ring after it; a note's file rises into the folder;
   with nothing going, what you said holds still a beat, at home. */
.dm-said, .tr-note { transform-box: fill-box; }
.motion .dm-map:has(.dm-row[data-go="voice"] input:checked) .tr-voice,
.motion .dm-map:has(.dm-row[data-go="text"] input:checked) .tr-text,
.motion .dm-map:has(.dm-row[data-go="transcript"] input:checked) .tr-transcript,
.motion .dm-map:has(.dm-row[data-go="question"] input:checked) .tr-question,
.motion .dm-map:has(.dm-row[data-go="template"] input:checked) .tr-template { animation: dm-go 1s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes dm-go { 0% { opacity: 0; transform: translate(-150px, -40px); } 25% { opacity: 1; } 100% { opacity: 1; transform: none; } }
.motion .dm-map:has(.dm-row:is([data-go="voice"], [data-go="text"], [data-go="transcript"], [data-go="question"], [data-go="template"]) input:checked) .dm-back { animation: dm-back 0.5s ease 0.9s both; }
@keyframes dm-back { from { opacity: 0; } }
.motion .dm-map:has(.dm-row[data-go="note"] input:checked) .tr-note { animation: dm-file 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes dm-file { from { opacity: 0; transform: translateY(26px); } }
.motion .dm-map:has(.dm-row[data-go="none"] input:checked) .dm-said { animation: dm-hold 0.9s ease both; transform-origin: left center; }
@keyframes dm-hold { 0% { transform: scale(0.94); opacity: 0.5; } 100% { transform: none; opacity: 1; } }
