/* The use cases page (use-cases.js): tiles in one row to click through, and under them the
   large screen with the use case you point at or pick (Magnus, 18 Nov 2026). No rules or numbers
   between the kinds: the kind is a word on each tile and the headline's grey line. The site's CI:
   white, Geist, hairlines, square corners; orange only for what is yours. */

.ag { overflow-x: clip; }

/* The headline: under "Use cases." the kind on screen in grey, changing with it as the home
   page's line does (Magnus, 19 Nov 2026: no row of kinds); the arrows at its right. */
.uc-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.uc-steps { display: flex; flex: none; gap: 8px; }
.uc-head .uc-steps { margin-bottom: calc(0.15 * clamp(38px, 5vw, 64px)); }   /* on the grey line's baseline (.h1's size) */
.uc-steps button { width: 40px; height: 40px; border: 0.5px solid var(--hair); background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1; cursor: pointer; transition: background 0.2s, color 0.2s, border-color 0.2s; }
@media (hover: hover) { .uc-steps button:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); } }

/* The row: it runs out to the window's right edge, so there is always more to the side. */
.uc-rail { position: relative; display: flex; gap: 8px; margin: 0 calc(50% - 50vw) 0 0; padding: 0 calc(50vw - 50%) 2px 0; list-style: none; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
.uc-rail::-webkit-scrollbar { display: none; }
/* A tile is a short strip: the icon at its left, its kind, name and state beside it, so the row
   stays low and the window under it shows whole (Magnus, 19 Nov 2026). */
.uc-tile { flex: none; width: 224px; scroll-snap-align: start; }
.uc-tile-in { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: auto auto 1fr; align-content: start; gap: 5px 14px; width: 100%; height: 72px; padding: 10px 12px 10px 14px; border: 0.5px solid transparent; background: var(--inset); font: inherit; text-align: left; color: var(--ink); text-decoration: none; cursor: pointer; transition: border-color 0.25s, background 0.3s; }
.uc-tile-in:focus-visible { outline-offset: -2px; }
.uc-tile.on .uc-tile-in { border-color: var(--ink); background: var(--bg); }
@media (hover: hover) { .uc-tile-in:hover { border-color: var(--ink); } }
.uc-pic { grid-row: 1 / -1; align-self: center; display: block; }
.uc-pic .px { display: block; width: 100%; height: auto; overflow: visible; transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s; }
.uc-tile.on .px { transform: scale(1.08); }
.uc-tile.soon .px { opacity: 0.4; }
.uc-tile.soon.on .px { opacity: 1; }
@media (hover: hover) { .uc-tile.soon .uc-tile-in:hover .px { opacity: 1; } }
.uc-tile-in > .uc-st { align-self: end; }
.uc-dwell { position: absolute; left: -0.5px; right: -0.5px; bottom: -0.5px; height: 2px; background: var(--ink); transform: scaleX(0); transform-origin: 0 50%; }
.auto .uc-tile.on .uc-dwell { animation: uc-dwell var(--dwell, 7s) linear both; }
@keyframes uc-dwell { to { transform: scaleX(1); } }
.uc-k { font: 10px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.uc-n { font-size: 15px; line-height: 1.2; letter-spacing: -0.005em; }
.uc-tile.yours { width: 264px; }
.uc-tile.yours .uc-tile-in { grid-template-rows: auto auto; align-content: center; padding-block: 0; border: 0.5px dashed var(--hair); background: var(--bg); }
@media (hover: hover) { .uc-tile.yours .uc-tile-in:hover { border-style: solid; border-color: var(--accent); } }

/* The icons, in the agents' pixels: a tile that plays draws its agent's work row by row, then
   turns what is yours orange; only the chosen tile keeps it. */
.px .p-k, .px .p-w, .px .p-y { fill: var(--ink); }
.px .p-g { fill: var(--faint); }
.px .p-u { fill: var(--accent); }
.play .px .p-w { animation: uc-px-a 0.25s steps(1, end) calc(var(--i) * 45ms) both; }
.play .px .p-y { animation: uc-px-o 0.25s steps(1, end) calc(var(--n) * 45ms + 150ms) both; }
@keyframes uc-px-a { from { fill: #dadada; } to { fill: var(--ink); } }
@keyframes uc-px-o { from { fill: var(--ink); } to { fill: var(--accent); } }
.px .eyes { transform-box: fill-box; transform-origin: 50% 50%; }
@media (prefers-reduced-motion: no-preference) { .px .eyes { animation: ag-blink 4.8s 1.4s infinite; } }
@media (prefers-reduced-motion: reduce) {
  .play .px .p-w { animation: none; }
  .play .px .p-y { animation: none; fill: var(--accent); }
}

/* The large screen: one window at a time, the next sliding in from below (or above). */
.uc-screen { margin-top: 20px; }
.uc-stage { position: relative; height: clamp(440px, 40vw, 560px); }
.uc-pane { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg); }
.uc-pane[hidden] { display: none; }
.uc-stage .ucw-body { flex: 1 1 auto; height: auto; min-height: 0; }
/* Match the home page's .lede: two equal columns, copy and actions together on the right. */
.uc-info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 24px; padding-top: 28px; }
.uc-name { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.uc-name h2 { margin: 0; font-size: 24px; font-weight: 400; letter-spacing: -0.015em; }
.uc-copy { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.uc-d { max-width: 400px; margin: 0 0 0 auto; font-size: 15px; line-height: 1.45; text-align: right; text-wrap: pretty; }
.uc-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: flex-start; gap: 8px; }
.uc-actions .btn { flex: none; max-width: 100%; }

/* Shared: the state and the team where there is no window yet. */
.uc-st { display: inline-flex; align-items: center; gap: 6px; font: 10px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.uc-st.live { color: var(--ink); }
.uc-st:not(.live)::before { content: ""; box-sizing: border-box; width: 6px; height: 6px; border: 0.5px solid var(--muted); }   /* in the works: the square open */
.uc-st.live::before { content: ""; width: 6px; height: 6px; background: var(--ink); }
.uc-crew { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 22px; border: 0.5px dashed var(--hair); }
.uc-crew p { margin: 0; font: 10px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.uc-team { display: flex; gap: 34px; }
.uc-mate { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.uc-mate b { font: 10px/1 var(--mono); font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.uc-fig { display: block; width: 25px; height: 45px; }

@media (max-width: 960px) {
  .uc-info { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .uc-head { gap: 16px; }
  .uc-stage { height: auto; }
  .uc-pane { position: relative; inset: auto; }
  .uc-crew { min-height: 260px; }
  .uc-team { gap: 22px; }
  .uc-info { gap: 16px; padding-top: 20px; }
  .uc-name h2 { font-size: 20px; }
}
