/* The home page's example: one email from Sam turns into four changes for Anna to approve.
   Only index.html loads this file, after site.css, and it uses site.css's colors and spacing.
   The HTML holds the finished state: the done card on its stage, and the five-step guide.
   That is the whole example when JavaScript is off, so it must look complete on its own.
   assets/demo.js adds the scenes and the controls on top, and sets .is-ready once it runs. */

:root {
  --demo-shadow: 0 1px 2px rgba(31, 27, 23, 0.06), 0 16px 40px -12px rgba(31, 27, 23, 0.22);
  /* A soft light behind the card: white in the light theme, sea glass in the dark. */
  --demo-glow: color-mix(in srgb, var(--surface) 80%, transparent);
  /* The shadow under a key word while it flies, so it reads as lifted off the page. */
  --demo-lift: 0 8px 18px -6px rgba(31, 27, 23, 0.28);
}
@media (prefers-color-scheme: dark) {
  :root {
    --demo-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 20px 48px -12px rgba(0, 0, 0, 0.7);
    --demo-glow: color-mix(in srgb, var(--sea-glass) 85%, transparent);
    --demo-lift: 0 8px 18px -6px rgba(0, 0, 0, 0.7);
  }
}

/* Hidden on screen, still read by screen readers. */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

/* ---------------------------------------------------------------- the hero: one column of copy above the example */

.hero { padding-block: var(--space-12) var(--space-8); }

/* ---------------------------------------------------------------- the layout: the guide beside the stage */

.demo { padding-bottom: var(--space-16); }
.demo-layout {
  display: grid; grid-template-columns: 216px minmax(0, 1fr); grid-template-areas: "side stage";
  gap: var(--space-8); align-items: center;
}
.demo-side { grid-area: side; display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }

/* The stage keeps its size, so nothing below it moves while the example plays. */
.demo-stage {
  grid-area: stage; position: relative; isolation: isolate; overflow: hidden;
  display: grid; place-items: center; min-width: 0; min-height: 560px; padding: var(--space-6) var(--space-8);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: radial-gradient(60% 60% at 50% 45%, var(--demo-glow), transparent), var(--surface-sunken);
}
.demo-final { width: 100%; max-width: 600px; }

/* ---------------------------------------------------------------- the approval card */

.demo-card { box-shadow: var(--demo-shadow); }
.demo-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-4); }
.demo-card .title { font-size: 20px; line-height: 28px; letter-spacing: -0.2px; }
.demo-source { display: flex; align-items: center; gap: 6px; }
.demo-example {
  flex: none; margin-top: 3px; padding: 2px var(--space-2); border: 1px solid var(--border); border-radius: var(--radius-pill);
  color: var(--ink-muted); font: 600 11px/16px var(--font-sans); letter-spacing: 0.6px; text-transform: uppercase;
}

/* One row per change: the app, what changes, and a tick, so Anna can leave a change out. */
.demo-changes { border: 1px solid var(--border); border-radius: var(--radius-md); }
.demo-change {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) 22px; gap: var(--space-3); align-items: center;
  padding: var(--space-3) var(--space-4);
}
.demo-change + .demo-change { border-top: 1px solid var(--border); }
.demo-app { display: grid; place-items: center; width: 40px; height: 40px; }
.demo-app img { display: block; width: 40px; height: 40px; }
/* Our own mark fills the same share of its box as the app icons do (each has a 5% margin). */
.demo-app .brand-mark { width: 36px; height: 36px; border-radius: 9px; }
.demo-change-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.demo-change-title { font: 600 15px/22px var(--font-sans); overflow-wrap: anywhere; }
.demo-change-diff { color: var(--ink-muted); font: 400 14px/22px var(--font-sans); font-variant-numeric: tabular-nums; }
/* When a line wraps, the arrow stays with the new value, and Q-118 stays whole. */
.demo-to, .demo-keep { white-space: nowrap; }
.demo-arrow { padding-inline: 2px; }
.demo-now {
  padding: 1px 6px; border-radius: 5px; white-space: nowrap;
  background: var(--sea-glass); color: var(--on-sea-glass); font-weight: 600;
}
.demo-tick {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: var(--radius-sm);
  background: var(--harbor); color: var(--on-harbor);
}
.demo-tick .ic { stroke-width: 3; }
.demo-approve .ic { stroke-width: 2; }

/* The card has two layers in each place: the done card, once Anna approves, and the card that waits
   for her, with the old wording, the two buttons and the old footnote. The HTML shows the done
   layer. The waiting layer keeps its room but stays hidden, so the larger of the two always sets the
   card's size: the stage is the same size with or without JavaScript, and in every scene. demo.js
   shows the waiting layer in the approve scene, then crossfades each part to its done layer. */
.demo-layers, .demo-mark { display: grid; min-width: 0; }
.demo-layers > *, .demo-mark > * { grid-area: 1 / 1; min-width: 0; }
.demo-waiting { visibility: hidden; }
/* A row's two lines sit in the middle of the room, which may be a line taller than they need. */
.demo-change-text.demo-layers > * { display: flex; flex-direction: column; justify-content: center; gap: 2px; }
/* Once Anna approves, each row's tick becomes a done check: filled, in a circle. */
.demo-check {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--harbor); color: var(--on-harbor);
}
.demo-check .ic { stroke-width: 3; }
/* The line that takes the buttons' place. It fills the room the buttons keep. */
.demo-confirm {
  display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md); background: var(--sea-glass); color: var(--on-sea-glass);
  font: 600 14px/20px var(--font-sans);
}
.demo-confirm .demo-check { flex: none; width: 20px; height: 20px; }
.demo-confirm .demo-check .ic { width: 12px; height: 12px; }
/* demo.js adds this ring to "Approve 4 changes" and makes it glow once before Anna presses it. */
.demo-glow {
  position: absolute; inset: -4px; border-radius: calc(var(--radius-md) + 4px); pointer-events: none;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--harbor) 24%, transparent), 0 0 28px 6px color-mix(in srgb, var(--harbor) 50%, transparent);
  opacity: 0; visibility: hidden;
}

/* ---------------------------------------------------------------- the guide: five steps, numbered */

.demo-guide { counter-reset: demo-step; display: flex; flex-direction: column; gap: var(--space-1); }
.demo-guide li { counter-increment: demo-step; position: relative; }
.demo-guide button {
  display: flex; align-items: flex-start; gap: var(--space-3); width: 100%;
  padding: 11px var(--space-3) 11px var(--space-2);
  border: 1px solid transparent; border-radius: var(--radius-md); background: none;
  color: var(--ink); font: 500 15px/22px var(--font-sans); text-align: left; cursor: default;
}
/* The number is decoration: the list already says which step this is. */
.demo-guide button::before {
  content: counter(demo-step); content: counter(demo-step) / "";
  display: grid; place-items: center; flex: none; width: 28px; height: 28px; margin-block: -3px; border-radius: var(--radius-pill);
  background: var(--sea-glass); color: var(--on-sea-glass); font: 600 13px/16px var(--font-sans); font-variant-numeric: tabular-nums;
}
/* A short line joins each number to the next, however many lines its label takes. */
.demo-guide li:not(:last-child)::after {
  content: ""; position: absolute; left: 22px; top: 40px; bottom: -10px; width: 1px;
  background: var(--border-strong); opacity: 0.5;
}
/* The step that is playing. The animation script sets aria-current. */
.demo-guide button[aria-current="step"] { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow-card); font-weight: 600; }
.demo-guide button[aria-current="step"]::before { background: var(--harbor); color: var(--on-harbor); }
/* The steps act as buttons only once the animation script is running. */
.demo.is-ready .demo-guide button { cursor: pointer; }
.demo.is-ready .demo-guide button:not([aria-current="step"]):hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }

/* ---------------------------------------------------------------- the controls: pause, replay, and play with reduced motion */

/* Hidden in the HTML. demo.js shows them once the example can play. The toggle is named "Pause" while
   the example plays and "Play" while it is paused or finished; demo.js shows the icon that matches. */
.demo-controls { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.demo-controls[hidden], .demo-controls [hidden] { display: none; }
/* While demo.js loads, the hidden row keeps its height, so the guide does not move when the controls
   appear. Without JavaScript nothing will appear, so the row takes no room. The row shows at once,
   with no transition: with reduced motion, site.css gives every change a very short transition, and
   Chromium can leave a visibility transition waiting at its start, so the row would stay hidden. */
@media (scripting: enabled) {
  .demo-controls[hidden] { display: flex; visibility: hidden; }
  .demo-controls, .demo-controls * { transition-property: none; }
}
.demo-controls button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 7px 14px 7px 11px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-pill); background: var(--surface);
  color: var(--ink); font: 500 13px/20px var(--font-sans); cursor: pointer;
}
.demo-controls button:hover { background: var(--surface-sunken); }
@media (pointer: coarse) { .demo-controls button { min-height: 44px; } }

/* ---------------------------------------------------------------- the scenes: only while demo.js runs */

/* demo.js copies the scenes from the <template> into the stage. They sit on top of the finished card,
   which stays in the layout, so the stage keeps the card's size in every scene and nothing below it
   moves. Every part of every scene is in the layout from the start; the script changes only opacity
   and transform, plus the words of the counters and the typing. On wide screens the email sits on the left and what HandcraftedAI finds on the right. */
.demo-scenes { display: none; }
.demo.is-ready .demo-scenes {
  position: absolute; inset: 0; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 12fr); grid-template-rows: auto auto;
  grid-template-areas: "inbox keys" "email tiles";
  gap: var(--space-3) var(--space-8); align-content: center; align-items: start;
  padding: var(--space-6) var(--space-8); pointer-events: none;
}
.demo-sc-card {
  min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}
/* Every app icon in the scenes has the same 32 px box. Our mark fills the same share of it as on the card. */
.demo-logo { display: grid; place-items: center; flex: none; width: 32px; height: 32px; }
.demo-logo img { display: block; width: 32px; height: 32px; }
.demo-logo .brand-mark { width: 29px; height: 29px; border-radius: 7px; }

/* Scene 1: a new row in the inbox, then Sam's email. */
.demo-inbox { grid-area: inbox; display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-3); }
.demo-inbox-head { display: flex; align-items: center; gap: var(--space-2); font: 600 14px/20px var(--font-sans); }
.demo-inbox-row {
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); transform-origin: 50% 0;
  background: var(--sea-glass); color: var(--on-sea-glass); font: 400 14px/20px var(--font-sans);
}
.demo-inbox-from { font-weight: 600; }
.demo-new { color: var(--harbor); font-weight: 600; }
/* The email unfolds downward from the inbox, so it grows from its top edge. */
.demo-email { grid-area: email; display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4); transform-origin: 50% 0; }
.demo-email-head { display: flex; flex-direction: column; gap: 2px; padding-bottom: var(--space-3); border-bottom: 1px solid var(--border); }
.demo-email-from { font: 600 14px/20px var(--font-sans); }
.demo-email-subject { color: var(--ink-muted); font: 400 13px/18px var(--font-sans); }
/* Two copies of the text sit on top of each other. demo.js makes the back one, where only Sam's
   two asks have a color, and splits each ask into one span per character in both copies. Each
   character's color fades in on its own, so the highlight sweeps from left to right. The small
   shadow to the right of each character closes the hairline gaps between them. */
.demo-email-body { display: grid; font: 400 14px/22px var(--font-sans); }
.demo-email-body > * { grid-area: 1 / 1; display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.demo-email-marks { color: transparent; }
.demo-email-marks .demo-char { padding-block: 2px; background: var(--sea-glass); box-shadow: 1px 0 0 var(--sea-glass); }
.demo-email-marks .demo-char:first-child { border-radius: 4px 0 0 4px; }
.demo-email-marks .demo-char:last-child { border-radius: 0 4px 4px 0; box-shadow: none; }

/* Scene 2: Sam's two asks, each as a numbered chip. A chip lifts out of the email and grows from its left edge. */
.demo-asks { grid-column: 2; grid-row: 1 / -1; align-self: center; display: flex; flex-direction: column; gap: var(--space-3); counter-reset: demo-ask; }
.demo-ask {
  counter-increment: demo-ask; display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4); font: 600 15px/22px var(--font-sans); transform-origin: 0 50%;
}
.demo-ask::before {
  content: counter(demo-ask); content: counter(demo-ask) / "";
  display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: var(--radius-pill);
  background: var(--harbor); color: var(--on-harbor); font: 600 12px/16px var(--font-sans);
}

/* Scene 3: the key words, and the record each app holds. A copy of each key word, a ghost, flies to its app. */
.demo-keywords { grid-area: keys; align-self: end; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.demo-keyword, .demo-ghost {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 10px; border-radius: var(--radius-pill);
  background: var(--sea-glass); color: var(--on-sea-glass); font: 500 13px/18px var(--font-sans);
}
.demo-keyword .ic, .demo-ghost .ic { stroke-width: 2; }
/* The ghosts' own layer covers the scenes, above everything in them. demo.js moves each ghost from
   its key word to its app with transforms alone, from this layer's top-left corner. */
.demo-ghosts { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.demo-ghost { position: absolute; top: 0; left: 0; white-space: nowrap; box-shadow: var(--demo-lift); transform-origin: 0 50%; }
.demo-tiles { grid-area: tiles; display: flex; flex-direction: column; gap: var(--space-3); }
.demo-tile { display: grid; grid-template-columns: 32px minmax(0, 1fr) 22px; gap: var(--space-3); align-items: start; padding: var(--space-3); }
.demo-tile-text { position: relative; }
.demo-tile-app { color: var(--ink-muted); font: 500 12px/16px var(--font-sans); }
.demo-tile-record { font: 500 14px/20px var(--font-sans); overflow-wrap: anywhere; }
.demo-tile .demo-tick { margin-top: 5px; }
/* Two grey bars hold the record's place while the app is searched. */
.demo-skeleton { position: absolute; top: 22px; left: 0; right: 0; display: flex; flex-direction: column; gap: 6px; }
.demo-skeleton i { display: block; height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--ink) 10%, transparent); }
.demo-skeleton i:first-child { width: 88%; }
.demo-skeleton i:last-child { width: 56%; }

/* Scene 4: the four changes, each in its own app. The reply takes the right-hand column. They cover
   the whole scene area, outside the grid, so they never stretch the rows of the earlier scenes. */
.demo-panels {
  position: absolute; inset: var(--space-6) var(--space-8);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-content: center; gap: var(--space-3) var(--space-4);
}
/* At the end each change shrinks into its row on the card, from its left edge. */
.demo-panel { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4); transform-origin: 0 50%; }
.demo-panel[data-panel="reply"] { grid-column: 2; grid-row: 1 / span 3; }
/* The invoice's total keeps one width while it counts from $720 to $1,080, so the line never shifts. */
.demo-panel[data-panel="invoice"] .demo-total { min-width: 6.2ch; text-align: center; }
/* The task's quantity flips: the old one rolls up and out of a window, and the new one rolls in. */
.demo-flip { display: inline-grid; overflow: hidden; vertical-align: bottom; }
.demo-flip > * { grid-area: 1 / 1; justify-self: end; }
.demo-task-was { padding: 1px 6px; color: var(--ink-muted); }
/* The reply's words keep their place while they type, so the panel never changes size. */
.demo-untyped { visibility: hidden; }
.demo-caret {
  position: absolute; width: 2px; height: 15px; margin: 3px 0 0 1px; border-radius: 1px;
  background: var(--harbor);
}
.demo-panel-head { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.demo-panel-title { font: 600 15px/20px var(--font-sans); }
.demo-panel-meta { color: var(--ink-muted); font: 400 13px/18px var(--font-sans); }
.demo-line {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-3); padding-top: var(--space-2);
  border-top: 1px solid var(--border); font: 400 14px/22px var(--font-sans); font-variant-numeric: tabular-nums;
}
.demo-line-item { flex: 1 1 auto; min-width: 0; }
.demo-line-total { font-weight: 600; }
.demo-reply-body { display: flex; flex-direction: column; gap: var(--space-1); font: 400 13px/20px var(--font-sans); overflow-wrap: anywhere; }
.demo-attach {
  align-self: flex-start; margin-top: auto; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px;
  border: 1px solid var(--border); border-radius: var(--radius-pill); color: var(--ink-muted); font: 500 12px/18px var(--font-sans);
}

/* ---------------------------------------------------------------- narrower screens: the guide goes under the stage */

@media (max-width: 960px) {
  .demo-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "stage" "side"; gap: var(--space-6); }
  .demo-guide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
  .demo-guide li:not(:last-child)::after { display: none; }
}
@media (max-width: 720px) {
  .hero { padding-block: var(--space-8) var(--space-6); }
  .demo { padding-bottom: var(--space-12); }
  .demo-stage { min-height: 640px; padding: var(--space-3); }
  .demo-guide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .demo-change { padding: var(--space-3); }
  /* Phones: one column, and each scene takes the stage in turn. The key words and records take the
     email's place, and the four changes show one at a time in the same spot. */
  .demo.is-ready .demo-scenes {
    grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto;
    grid-template-areas: "inbox" "email" "asks"; gap: var(--space-3); padding: var(--space-3);
  }
  .demo-asks { grid-area: asks; align-self: start; }
  .demo-keywords { grid-area: inbox; }
  .demo-tiles { grid-column: 1; grid-row: 2 / -1; }
  .demo-panels { inset: var(--space-3); grid-template-columns: minmax(0, 1fr); }
  .demo-panel, .demo-panel[data-panel="reply"] { grid-area: 1 / 1; align-self: center; }
}
@media (max-width: 480px) {
  /* The label goes above the title, so the title has the card's full width. */
  .demo-card-head { flex-direction: column-reverse; gap: var(--space-2); }
  .demo-example { margin-top: 0; }
  .demo-card .approval-actions .btn { flex: 1 1 auto; }
}

/* ---------------------------------------------------------------- hero: the potter, with three moments from the example around her */

.hero-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-12); align-items: center; }
.hero-person { position: relative; height: 560px; margin: 0; min-width: 0; }
.hero-arch {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 78%; height: 88%;
  border-radius: var(--radius-pill) var(--radius-pill) var(--radius-lg) var(--radius-lg); background: var(--sea-glass);
}
.hero-photo {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); height: 100%; width: auto; max-width: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent 100%); mask-image: linear-gradient(to bottom, #000 80%, transparent 100%);
}
.hero-chips { position: absolute; inset: 0; pointer-events: none; }
.hero-chip {
  position: absolute; display: flex; gap: var(--space-3); align-items: center; max-width: 250px; margin: 0; padding: 10px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-card);
  color: var(--ink-muted); font: 400 13px/18px var(--font-sans);
}
.hero-chip b { display: block; color: var(--ink); font-weight: 600; }
.hero-chip img { flex: none; width: 28px; height: 28px; }
.hero-tick { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--harbor); color: var(--on-harbor); }
.hero-tick .ic { stroke-width: 2.5; }
.chip-email { top: 28px; right: 0; }
.chip-invoice { top: 214px; right: 0; }
.chip-ready { bottom: 104px; left: 0; }

@media (max-width: 960px) {
  .hero-layout { grid-template-columns: minmax(0, 1fr); gap: var(--space-8); }
  .hero-person { width: 100%; max-width: 520px; justify-self: center; }
}
@media (max-width: 720px) {
  .hero-person { height: min(440px, calc((100vw - 32px) * 1.3)); overflow: clip; }
  .hero-chip { max-width: 210px; padding: 8px 10px; font-size: 12px; line-height: 16px; }
  .chip-invoice { display: none; }
  .chip-email { top: 8px; }
  .chip-ready { bottom: 72px; }
}

/* ---------------------------------------------------------------- the three examples, drawn like the example above */

.example-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); align-items: stretch; }
.example-card {
  display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; padding: var(--space-6);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
}
.example-card h3 a { color: inherit; text-decoration-color: var(--harbor); text-underline-offset: 3px; }
.example-email {
  display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: var(--space-3); align-items: start;
  padding: var(--space-3) var(--space-4); background: var(--surface-sunken); border-radius: var(--radius-md);
  color: var(--ink); font: 400 14px/20px var(--font-sans);
}
.example-email img { width: 24px; height: 24px; margin-top: 2px; }
.example-email b { display: block; color: var(--ink-muted); font: 500 13px/18px var(--font-sans); }
.example-step { display: flex; align-items: center; gap: var(--space-2); color: var(--harbor); font: 600 12px/16px var(--font-sans); letter-spacing: 0.4px; text-transform: uppercase; }
.example-step::before { content: "↓"; font-size: 14px; }
.example-card .demo-change { grid-template-columns: 32px minmax(0, 1fr) 22px; padding: var(--space-3); }
.example-card .demo-app, .example-card .demo-app img { width: 32px; height: 32px; }
.example-card .demo-change-title { font-size: 14px; line-height: 20px; }
.example-card .demo-change-diff { font-size: 13px; line-height: 20px; }
.example-status { margin-top: auto; color: var(--ink-muted); font: 400 13px/18px var(--font-sans); }
@media (max-width: 1080px) {
  .example-cards { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
}

/* ---------------------------------------------------------------- the scrolling row of apps (CSS only) */

.app-row {
  display: flex; gap: var(--space-4); overflow: hidden; max-width: 100%;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.app-track { display: flex; flex: none; gap: var(--space-4); min-width: 100%; justify-content: space-around; animation: app-scroll 40s linear infinite; }
.app-row:hover .app-track, .app-row:focus-within .app-track { animation-play-state: paused; }
.app-pill {
  display: flex; flex: none; align-items: center; gap: var(--space-2); padding: 10px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-pill);
  color: var(--ink); font: 500 15px/20px var(--font-sans); white-space: nowrap;
}
.app-pill img { width: 28px; height: 28px; }
.app-pill.is-soon { color: var(--ink-muted); border-style: dashed; }
.soon-tag { font: 600 10px/14px var(--font-sans); letter-spacing: 0.6px; text-transform: uppercase; color: var(--harbor); }
@keyframes app-scroll { to { transform: translateX(calc(-100% - var(--space-4))); } }
@media (prefers-reduced-motion: reduce) {
  .app-row { flex-wrap: wrap; -webkit-mask-image: none; mask-image: none; }
  .app-track { animation: none; flex-wrap: wrap; min-width: 0; justify-content: flex-start; }
  .app-track[aria-hidden="true"] { display: none; }
}
