/* Screen 6, unclouded: the page's big quiet moment, on a lilac ground that rises on a rim.
   The title and its line stand centred over the cabin (their middle at x 560 of 1440);
   the porthole reaches up beside the title. Under the cabin, the switch and the line for
   the picked way; on the right, under the porthole, the answers on the side. */
.uc { background: var(--lilac); }
.uc-board { position: relative; max-width: 1440px; margin: 0 auto; padding: calc(36 * var(--u)) 0 calc(96 * var(--u)); }
.uc-head { width: calc(680 * var(--u)); margin-left: calc(220 * var(--u)); text-align: center; }
.uc-mid { max-width: 20em; margin-left: auto; margin-right: auto; }
.uc-stage { margin-top: calc(40 * var(--u)); }

/* The foot: the switch under the cabin, the answers beside it under the porthole. */
.uc-foot {
  display: grid; grid-template-columns: calc(680 * var(--u)) calc(400 * var(--u)); column-gap: calc(70 * var(--u));
  align-items: start; margin: calc(36 * var(--u)) 0 0 calc(220 * var(--u));
}
.uc-try { text-align: center; }

/* The app's question over its switch. A fieldset, drawn as nothing but its words. */
.uc-set { margin: 0; padding: 0; border: 0; min-width: 0; }
.uc-ask { display: block; width: 100%; padding: 0; margin-bottom: 14px; font-size: var(--fs-body); line-height: 1.35; font-weight: 700; color: var(--ink); }
/* The app's switch, drawn: both ways in one ink ring, the picked one in Blue. Each way is
   a radio button whose label is drawn as its half. */
.uc-switch { display: inline-flex; gap: 4px; padding: 4px; border: 2px solid var(--ink); border-radius: 999px; background: var(--cream); font-size: max(15px, calc(17 * var(--u))); line-height: 1; font-weight: 700; color: var(--ink); white-space: nowrap; }
.uc-opt { position: relative; cursor: pointer; border-radius: 999px; }
.uc-opt span { display: block; padding: max(11px, calc(13 * var(--u))) max(18px, calc(24 * var(--u))); border-radius: 999px; }
.uc-opt:hover span { background: var(--haze); }
.uc-opt:has(input:checked) span { background: var(--blue); color: var(--cream); }
.uc-opt:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: 3px; }
/* The picked way's line: both stand in one cell, so a switch never moves the page. */
.uc-lines { display: grid; max-width: 31em; margin: 18px auto 0; }
.uc-line { grid-area: 1 / 1; visibility: hidden; }
.uc:has(:where(input[value="local"]:checked)) .uc-line[data-way="local"],
.uc:has(:where(input[value="cloud"]:checked)) .uc-line[data-way="cloud"] { visibility: visible; }

/* The answers on the side: a cream card, a question in Ink over its answer, a rule between. */
.uc-aside { padding: calc(26 * var(--u)) calc(30 * var(--u)) calc(28 * var(--u)); border-radius: var(--radius-card); background: var(--cream); }
.uc-aside dl { margin: 0; }
.uc-qa + .uc-qa { margin-top: 14px; padding-top: 14px; border-top: 1.5px solid var(--lilac); }
.uc-qa dt { font-size: 16px; line-height: 1.35; font-weight: 700; color: var(--ink); }
.uc-qa dd { margin: 4px 0 0; font-size: 15px; line-height: 1.5; color: var(--body); text-wrap: pretty; }

/* ---------------------------------------------------------------- the two ways, drawn
   Only the picked way shows: its stream of dots, and with Cloud, OpenAI's ring, the way
   back and the tag. */
.uc-way > * { opacity: 0; }
.uc:has(:where(input[value="local"]:checked)) .uc-way[data-way="local"] > *,
.uc:has(:where(input[value="cloud"]:checked)) .uc-way[data-way="cloud"] > * { opacity: 1; }
.uc-ring { transform-box: fill-box; transform-origin: center; }
/* The tag on OpenAI's mark: at its left on desktop, its right on the phone. */
.uc-tag {
  position: absolute; left: calc(var(--x) * var(--s)); top: calc(var(--y) * var(--s)); translate: -100% -50%;
  padding: 7px 12px; border: 2px dashed var(--ink); border-radius: 999px; background: var(--cream);
  font-size: 14px; line-height: 1.2; font-weight: 700; color: var(--ink); white-space: nowrap; opacity: 0;
}
.uc:has(:where(input[value="cloud"]:checked)) .uc-tag { opacity: 1; }

@media (max-width: 1023.98px) {
  /* The title and its line, then the switch right over the drawing, so a tap shows its
     way in view; the picked way's line under the drawing, the answers last. The foot and
     its switch block step aside (display: contents) so their parts take these places. */
  .uc-board { display: flex; flex-direction: column; padding: 56px var(--m) 64px; }
  .uc-head { width: auto; margin-left: 0; }
  .uc-head h2 { max-width: 7em; margin: 0 auto; }
  .uc-foot, .uc-try { display: contents; }
  .uc-set { order: 1; margin-top: 24px; text-align: center; }
  .uc-stage { order: 2; margin-top: 24px; }
  .uc-lines { order: 3; margin-top: 18px; text-align: center; }
  .uc-aside { order: 4; margin-top: 32px; padding: 20px 20px 22px; border-radius: 20px; }
  .uc-switch { font-size: 15px; }
  .uc-opt span { padding: 11px 16px; }
  .uc-tag {
    left: calc(var(--px) * var(--s)); top: calc(var(--py) * var(--s)); translate: 0 -50%;
    max-width: calc(108 * var(--s)); padding: 5px 9px; border-width: 1.5px; border-radius: 14px; font-size: 12px; white-space: normal;
  }
}

/* ---------------------------------------------------------------- motion
   js/pages/dictation/unclouded.js: the clouds drift one pass low in the pane and hold.
   The picked way plays in: its dots one after another from her mouth (--i), with Cloud
   the ring, the way back and the tag after them, and then the machine's lines are written
   (--after: once the way has played). Until the scene first plays (.is-held) the way and
   the lines wait; a switch writes the lines again (.is-writing). The picked way's rules
   wrap their test in :where(), so these later, plainer rules win while they hold. */
/* Each bank of cloud drifts its own way (the nearer, the farther), in the drawing's units. */
.motion .uc.is-still .uc-bank { transform: translateX(var(--drift)); }
.motion .uc.is-still.is-drifting .uc-bank { transform: none; transition: transform 14s cubic-bezier(0.3, 0.1, 0.3, 1); }
.motion .uc { --after: 380ms; }
.motion .uc:has(:where(input[value="cloud"]:checked)) { --after: 1180ms; }
.motion .uc-way > *, .motion .uc-tag { transition: opacity 0.15s ease; }
.motion .uc:has(:where(input[value="local"]:checked)) .uc-way[data-way="local"] > *,
.motion .uc:has(:where(input[value="cloud"]:checked)) .uc-way[data-way="cloud"] > * { transition: opacity 0.22s ease calc(var(--i, 0) * 50ms), transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) calc(var(--i, 0) * 50ms); }
.motion .uc:has(:where(input[value="cloud"]:checked)) .uc-tag { transition: opacity 0.3s ease 1s; }
.motion .uc:has(:where(input[value="local"]:checked)) .uc-ring { transform: scale(0.6); }
.motion .uc-w circle { transition: opacity 0.2s ease calc(var(--after) + var(--i) * 22ms); }
.motion .uc.is-held .uc-way > *, .motion .uc.is-held .uc-tag,
.motion .uc.is-held .uc-w circle, .motion .uc.is-writing .uc-w circle { opacity: 0; transition: none; }
.motion .uc.is-held .uc-ring { transform: scale(0.6); }
.motion .uc.is-pre .station { opacity: 0; }
