/* The assistant's chat (app/components/assistant-markup.js, assistant.js): the one values.io AI on the landing (/) and
   on Post a trade (/post). The box to write in (Duolingo's 2px card with its 4px lip, the green send arrow), the
   questions to tap, and the chat itself, which is the page: your words in the app's chat bubble, the AI's words on the
   page with the coin as its face, and what an answer shows, one frame each. A page puts these in its own root (class
   `as`; `is-chat` once someone asked) and keeps its own first screen (title, spacing). Tokens only.
   Class prefix as-. Reading width 720px. */

/* ================================================================ the box to write in */
.as-dock { width: 100%; max-width: 720px; }
.as-ask {
  display: flex; align-items: flex-end; gap: 8px; padding: 8px 8px 8px 20px;
  background: var(--color-snow); border: 2px solid var(--color-swan); border-bottom-width: 4px; border-radius: 20px;
  transition: border-color var(--m-fast) var(--m-ease-out);
}
.as-ask:focus-within { border-color: var(--color-macaw); }
/* focused by the page as it shows (Post on a computer): blue at once, no fade from grey on a page just up */
.as-ask.is-still { transition: none; }
/* one line of 28px in the send button's 48px; it grows a line at a time to four (assistant.js fit), then scrolls */
.as-ask__field {
  flex: 1 1 auto; display: block; box-sizing: border-box; min-width: 0; height: 48px; max-height: 132px; padding: 10px 0;
  border: 0; border-radius: 0; outline: 0; background: transparent; resize: none; overflow-y: hidden;
  color: var(--color-eel); font: 400 19px/28px var(--font);
}
.as-ask__field::placeholder { color: var(--color-placeholder); opacity: 1; }   /* the readable hint colour (pop.css) */
/* shut: no messages left today (assistant.js paintLeft), as the design system's off field (ui.css .u-field.is-off); same
   size, so nothing moves */
.as-ask:has(> .as-ask__field:disabled) { background: var(--color-polar); border-color: var(--color-polar); cursor: not-allowed; }
.as-ask__field:disabled { cursor: not-allowed; color: var(--color-hare); -webkit-text-fill-color: var(--color-hare); }
.as-ask__field:disabled::placeholder { color: var(--color-hare); }
.as-ask__send { --h: 48px; flex-shrink: 0; width: 48px; padding: 0; border-radius: 14px; }
/* a trade screenshot (the mode's screenshot, assistant.js shots): the picture button in the send arrow's place while the
   box is empty (one of the two hidden at a time: the box never narrower, nothing moves); the box as a drop target while
   a picture is dragged over the chat; the note told once above the box; the picture as your bubble */
.as-ask__shot {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 48px; height: 48px; padding: 0;
  border: 0; border-radius: 14px; background: var(--color-polar); color: var(--color-macaw); cursor: pointer;
}
@media (hover: hover) { .as-ask__shot:hover:not(:disabled) { background: var(--color-swan); } }
.as-ask__shot:focus-visible { outline: 2px solid var(--color-macaw); outline-offset: 2px; }
.as-ask__shot:disabled { cursor: not-allowed; color: var(--color-hare); }
/* (the 2px sides dashed, the lip too; its 4px kept, so nothing moves; blue at once, no fade from grey) */
.as-ask.is-drop { border-style: dashed; border-color: var(--color-macaw); transition: none; }
.as-shotnote {
  margin: 0 0 8px; padding: 12px 16px; border: 2px solid var(--color-swan); border-radius: 16px; background: var(--color-snow);
}
.as-shotnote__text { margin: 0; color: var(--color-eel); font: 400 15px/22px var(--font); }
.as-shotnote__acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* the questions to tap under the box (first screen), and after an answer. However long a question is, it never
   widens the page: its words wrap (two lines at most, then "…") and the chip grows to fit them */
.as-qs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 100%; margin-top: 16px; }
.as-q { max-width: 100%; height: auto; min-height: 44px; padding-top: 6px; padding-bottom: 6px; white-space: normal; text-align: left; }
.as-q--small { padding: 6px 12px 6px 8px; }
.as-q:not(:has(> .as-q__pic)) { padding: 6px 14px; }   /* words only: even on both sides */
.as-q--small:not(:has(> .as-q__pic)) { padding: 6px 12px; }
.as-q > .as-q__pic { flex-shrink: 0; }
.as-q > span:not(.as-q__pic) { display: -webkit-box; min-width: 0; overflow: hidden; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.as-next { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; max-width: 100%; }

.as-link { color: var(--color-link); font-weight: 700; text-decoration: none; }
@media (hover: hover) { .as-link:hover { text-decoration: underline; text-underline-offset: 3px; } }
.as-link:focus-visible { outline: 2px solid var(--color-macaw); outline-offset: 2px; border-radius: 4px; }

/* ================================================================ the chat: the page itself */
.as.is-chat .as-qs { display: none; }
.as-thread { display: flex; flex-direction: column; gap: 24px; width: 100%; max-width: 720px; flex: 1 0 auto; padding: 32px 0 24px; }
/* the box stays at the bottom of the window while the chat scrolls above it; its colour reaches under the screen's
   bottom edge and beside it (iOS Safari draws the page under its own bar): an outer shadow, offset and spread equal so
   nothing above the box is covered. A shadow, not a 100vh ::after: that added a whole empty screen of scroll */
.as.is-chat .as-dock {
  position: sticky; bottom: 0; z-index: 5; padding: 12px 0 max(16px, env(safe-area-inset-bottom, 0px));
  background: var(--color-snow); box-shadow: 0 calc(100vh / var(--zoom, 1)) 0 calc(100vh / var(--zoom, 1)) var(--color-snow);
}
/* what scrolls under the box fades into it, never cut through a line */
.as.is-chat .as-dock::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 24px; pointer-events: none;
  background: linear-gradient(to bottom, rgba(var(--color-snow-rgb), 0), var(--color-snow));
}
/* one answer's next steps at a time: the questions under older answers go (a retry, "Try again", stays: the question
   that failed can be asked again whenever), and their green and blue buttons turn into the white one (one primary on
   screen, UX.md rule 5). The trade post being made keeps its green Post it wherever it was drawn (/post: words change
   it from later messages, and it is the one thing to do) */
.as-thread > .as-msg:has(~ .as-msg) .as-next:not(:has(> .as-q--retry)) { display: none; }
.as-thread > .as-msg:has(~ .as-msg) .as-next > .as-q:not(.as-q--retry) { display: none; }
.as-thread > .as-msg:has(~ .as-msg) :is(.u-btn--green, .u-btn--blue):not(.pa-postit) {
  --bg: var(--color-snow); --edge: var(--color-swan); --fg: var(--color-macaw); --hover: brightness(.9); --lip: 2px; border-width: 2px 2px 4px;
}
.as-thread > .as-msg:has(~ .as-msg) :is(.u-btn--green, .u-btn--blue):not(.pa-postit)::before { inset: -2px; border: 2px solid var(--edge); box-shadow: 0 2px 0 var(--edge); }
/* typing on a phone (app/viewport.js): the box sits on the keyboard, wherever iOS has slid the page */
html.kb .as.is-chat .as-dock {
  position: fixed; left: 0; right: 0; top: calc(var(--vv-top, 0px) + var(--vv-h, calc(100vh / var(--zoom, 1)))); bottom: auto; transform: translateY(-100%); max-width: none;
  padding: 8px max(var(--f-gutter), env(safe-area-inset-right, 0px)) 8px max(var(--f-gutter), env(safe-area-inset-left, 0px));
}
html.kb .as.is-chat .as-dock > * { max-width: 720px; margin-left: auto; margin-right: auto; }
/* the box is out of the page's flow then: the chat keeps room under its last line for the keyboard (the window's height
   less what the keyboard leaves visible) and the box (86px and a 16px gap), so the newest answer can always scroll up
   above the box */
html.kb .as.is-chat .as-thread { padding-bottom: 104px; padding-bottom: calc(100dvh / var(--zoom, 1) - var(--vv-h, calc(100dvh / var(--zoom, 1))) + 104px); }
/* the quiet line over the box (messages left today) makes it 24px taller */
html.kb .as.is-chat.has-left .as-thread { padding-bottom: 128px; padding-bottom: calc(100dvh / var(--zoom, 1) - var(--vv-h, calc(100dvh / var(--zoom, 1))) + 128px); }
/* the first question: the first screen's title and questions fade where they were while the chat already shows */
.as-ghosts { position: fixed; inset: 0; z-index: 4; pointer-events: none; }

.as-msg { display: flex; }
.as-msg--you { justify-content: flex-end; padding-left: 15%; }
.as-you {
  margin: 0; padding: 8px 16px; border: 2px solid var(--color-blue-jay); border-radius: 20px;
  background: var(--color-iguana); color: var(--color-eel); font: 400 17px/24px var(--font); overflow-wrap: anywhere;
}
.as-you--shot { padding: 6px; }
.as-shot { display: block; max-width: 200px; max-height: 150px; width: auto; height: auto; object-fit: contain; border-radius: 12px; }
.as-shot__gone { display: block; padding: 2px 10px; }
.as-msg--ai { align-items: flex-start; gap: 12px; }
.as-face { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 32px; height: 32px; }
.as-face > img { display: block; width: 32px; height: 32px; }
.as-msg__col { container-type: inline-size; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.as-say { margin: 0; padding-top: 3px; color: var(--color-eel); font: 400 17px/26px var(--font); text-wrap: pretty; }   /* no word alone on a last line */
.as-say .u-val { display: inline; }   /* in a sentence: on the text's baseline */
.as-say .u-coin { margin-right: 2px; }
.as-say--late:empty { padding: 0; }   /* the model's line still to come (brain.js lateLine): no room until it does */
/* a line after a card leads into what follows, not out of the card: more room above it */
.as-msg__col > .as-card + .as-say { margin-top: 12px; }

/* thinking (assistant-markup.js thinkHTML): the coin bobbing gently and one playful word with a soft shimmer sweeping
   across it, from the label colour to the text colour and back; one line's height, the answers' left edge, no box */
.as-think { display: flex; align-items: center; height: 32px; margin: 0; }
.as-think__word {
  background: linear-gradient(90deg, var(--color-label) 0%, var(--color-label) 35%, var(--color-eel) 50%, var(--color-label) 65%, var(--color-label) 100%);
  background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  font: 400 17px/26px var(--font); white-space: nowrap;
  animation: as-shimmer 1.8s linear infinite; transition: opacity 150ms ease;
}
.as-think__word.is-out { opacity: 0; }
@keyframes as-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
.as-msg--think .as-face > img { animation: as-bob 1.2s ease-in-out infinite; }
@keyframes as-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

/* ---------------------------------------------------------------- what an answer shows: one frame each */
.as-card { display: block; width: 100%; border: 2px solid var(--color-swan); border-radius: 16px; background: var(--color-snow); color: var(--color-eel); }
.as-card :focus-visible, a.as-card:focus-visible { outline: 2px solid var(--color-macaw); outline-offset: 2px; }

/* an item: no frame, its tier tile is its box (UX.md rule 15) */
.as-item { display: flex; align-items: center; gap: 14px; width: 100%; color: var(--color-eel); text-decoration: none; border-radius: 12px; }
@media (hover: hover) { .as-item:hover .as-item__name { color: var(--color-link); } }
.as-item:focus-visible { outline: 2px solid var(--color-macaw); outline-offset: 4px; }
.as-item__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.as-item__name { font: 700 19px/24px var(--font); }
.as-item__tier { color: var(--color-label); font: 400 15px/20px var(--font); }
.as-item__num { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; }
.as-item__num > .u-val { gap: 2px; font: 700 19px/24px var(--font); font-variant-numeric: tabular-nums; }
.as-item__chg { display: inline-flex; align-items: center; gap: 4px; color: var(--color-label); font: 400 14px/18px var(--font); }

/* trades: one row each, hairlines between, every row read the same way: "You give 🔥1,450 [a]" over "You get 🔥1,500
   [b][c]", labels, totals and pictures in columns; what you don't have is faded. The whole row is the link to the trade
   (its name's ::after covers it), with a hover; Offer sits on top of it */
.as-trades { overflow: hidden; }   /* the rows' hover fills the card's round corners */
.as-trow {
  position: relative; display: grid; grid-template-columns: 160px minmax(0, 1fr) auto; align-items: center; column-gap: 16px;
  padding: 12px 16px; transition: background-color var(--m-fast) var(--m-ease-out);
}
.as-trow + .as-trow { border-top: 2px solid var(--color-swan); }
@media (hover: hover) { .as-trow:has(> .as-trow__who:hover) { background: var(--color-polar); } }
.as-trow__who { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--color-eel); text-decoration: none; }
.as-trow__who::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.as-trow__who:focus-visible { outline: 0; }
.as-trow__who:focus-visible::after { outline: 2px solid var(--color-macaw); outline-offset: -4px; border-radius: 12px; }
.as-trow__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 16px/20px var(--font); }
.as-trow__deal { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 6px 12px; min-width: 0; }
.as-trow__word { color: var(--color-label); font: 700 15px/20px var(--font); white-space: nowrap; }
.as-trow__open { color: var(--color-label); font: 400 15px/20px var(--font); }
.as-trow__btn { --h: 40px; position: relative; z-index: 2; }
/* the 40px row buttons (Offer, Bump) take taps 2px past their edges: a 44px target, the row's height unchanged */
:is(.as-trow__btn, .as-mine__btn)::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 44px; translate: 0 -50%; }
.as-trow__btn:disabled { gap: 6px; }
/* live (app/assistant/live.js): a trade that just came in joins the top of its list lit for a moment, with "New" under
   the name (the who column keeps its width, so the columns still line up); one that went away keeps its place, its
   deal faded and "Gone" where Offer was */
.as-trow.is-glow { animation: as-glow var(--m-glow) var(--m-ease-out) var(--m-glow) backwards; }
@keyframes as-glow { from { background-color: var(--color-iguana); } }
.as-trow.is-new > .as-trow__who { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 8px; row-gap: 2px; }
.as-trow.is-new > .as-trow__who > .u-avatar { grid-row: span 2; }
.as-trow__new { justify-self: start; }
.as-trow__deal { transition: opacity var(--m-base) var(--m-ease-out); }
.as-trow.is-gone > .as-trow__deal { opacity: .5; }
.as-trades__all { position: relative; display: block; padding: 12px 16px; border-top: 2px solid var(--color-swan); color: var(--color-macaw); font: 700 15px/20px var(--font); text-align: center; text-decoration: none; }
@media (hover: hover) { .as-trades__all:hover { background: var(--color-polar); } }
.as-trades__all:focus-visible { outline: 2px solid var(--color-macaw); outline-offset: -4px; border-radius: 12px; }

/* a side: total, then its pictures (totals line up: tabular figures, one width) */
.as-side { display: flex; align-items: center; gap: 12px; min-width: 0; }
.as-side > .u-val { gap: 2px; min-width: 70px; color: var(--color-eel); font: 700 17px/22px var(--font); font-variant-numeric: tabular-nums; }
.as-side__pics { display: flex; flex-wrap: wrap; gap: 4px; }
.as-side__more { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; color: var(--color-wolf); font: 700 15px/1 var(--font); }
/* an item you don't have: an empty dashed slot with its picture a little faded (the dashed "+" slot is where you still
   add something); next to the filled tiles of what you get it reads as "not yours yet" */
.as-need { position: relative; display: flex; border-radius: max(8px, calc(40px * .22)); }
.as-need > .u-pic { background: none; }
.as-need > .u-pic > img { opacity: .75; }
.as-need::after { content: ""; position: absolute; inset: 0; z-index: 1; border: 2px dashed var(--color-hare); border-radius: inherit; pointer-events: none; }

/* ---------------------------------------------------------------- the trade finder and best trades (spec/assistant/
   FINDER.md, BEST.md): the same trade rows. An answer's parts sit in one column like the answer's own (no frame) */
.as-finder, .as-best, .as-paths, .as-lockview { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; width: 100%; }
/* a route: one card, a small step number in front of each row in the label colour (only the first row has Offer) */
.as-route > .as-trow { grid-template-columns: 12px 160px minmax(0, 1fr) auto; }
.as-trow__step { color: var(--color-label); font: 700 15px/20px var(--font); font-variant-numeric: tabular-nums; text-align: center; }
/* a close one: its row, then the gap in one line under its deal; hairlines between the close ones only */
.as-close + .as-close { border-top: 2px solid var(--color-swan); }
.as-close > .as-trow { padding-bottom: 6px; }
.as-gap { margin: 0; padding: 0 16px 12px 192px; color: var(--color-label); font: 400 15px/20px var(--font); }
/* the one quiet line under the trades (today's check), the number line of a locked way, what unlocks it */
.as-quiet, .as-unlock { margin: 0; color: var(--color-label); font: 400 15px/20px var(--font); }
p.as-gain { margin: 0; color: var(--color-eel); font: 400 17px/26px var(--font); }
.as-group { margin: 0; color: var(--color-label); font: 700 15px/20px var(--font); }
.as-group > .as-gain { color: inherit; font: inherit; }
:is(.as-gap, .as-quiet, .as-unlock, .as-gain, .as-group) .u-val { display: inline; }   /* on the text's baseline */
:is(.as-gap, .as-quiet, .as-unlock, .as-gain, .as-group) .u-coin { margin-right: 2px; }
/* the primary and the quiet button side by side (Post this trade · the bell, tradealert.css) */
.as-acts { flex-wrap: wrap; gap: 12px; }
/* behind the invite, Chegg's way (assistant-markup.js paywallHTML): the answer's shape blurred (a decoy of the kid's
   own items, never the answer: its colours plainly there, nothing readable), and on top, centred, one card that says we
   have it. The decoy and the card share one grid cell; the card keeps 40px from the top and the bottom, so the lock is
   at least that much taller than the card and blurred rows show above and below it (the decoy's rows grow to fill it,
   and it has DECOY_ROWS rows at least), fading out at the bottom. Nothing moves: no blur animation */
.as-lock { display: grid; width: 100%; border-radius: 16px; overflow: hidden; }
.as-lock > .as-decoy, .as-lock > .as-lock__card { grid-area: 1 / 1; }
.as-decoy {
  display: flex; flex-direction: column; gap: 12px; filter: blur(5px); pointer-events: none; user-select: none; -webkit-user-select: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent); mask-image: linear-gradient(to bottom, #000 70%, transparent);
}
.as-decoy__card { display: flex; flex-direction: column; flex: 1 0 auto; }
.as-decoy__group { margin: 0; color: var(--color-label); font: 700 15px/20px var(--font); }
.as-decoy__group .u-val { display: inline; }
.as-decoy__row { flex: 1 0 auto; display: grid; grid-template-columns: 160px minmax(0, 1fr) auto; align-items: center; column-gap: 16px; padding: 12px 16px; }
.as-decoy__row.has-step { grid-template-columns: 12px 160px minmax(0, 1fr) auto; }
.as-decoy__row + .as-decoy__row { border-top: 2px solid var(--color-swan); }
.as-decoy__who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.as-decoy__ava { flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--color-swan); }
.as-decoy__name { width: 88px; height: 14px; border-radius: 7px; background: var(--color-hare); }
.as-lock__card {
  z-index: 1; align-self: center; justify-self: center; display: flex; flex-direction: column; align-items: center; gap: 8px;
  box-sizing: border-box; width: calc(100% - 32px); max-width: 480px; margin: 40px 16px; padding: 20px 20px 16px;
  border: 2px solid var(--color-swan); border-bottom-width: 4px; border-radius: 16px; background: var(--color-snow); text-align: center;
}
/* no orphan on any line (UX.md rule 18) */
.as-lock__card > p { text-wrap: balance; }
.as-lock__title { margin: 0; color: var(--color-eel); font: 700 19px/24px var(--font); }
.as-lock__card > p.as-gain { font-size: 17px; line-height: 24px; }
.as-lock__card > .as-act { align-self: stretch; justify-content: center; margin-top: 8px; }
.as-lock__card > .as-act > .as-act__btn { width: 100%; }

/* ================================================================ phones */
@media (max-width: 599px) {
  .as-route > .as-trow { grid-template-columns: 12px minmax(0, 1fr) auto; }
  .as-route > .as-trow > .as-trow__deal { grid-column: 2 / -1; }
  .as-gap { padding: 0 12px 12px; }
  .as-decoy__row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 8px; padding: 12px; }
  .as-decoy__row.has-step { grid-template-columns: 12px minmax(0, 1fr) auto; }
  .as-decoy__row.has-step > .as-trow__deal { grid-column: 2 / -1; }
  .as-lock__card { padding: 16px; }
  .as-ask { padding-left: 16px; border-radius: 18px; }
  .as-ask__field { font-size: 17px; }
  .as-qs { flex-direction: column; align-items: stretch; gap: 8px; }   /* one under another, the same width: a tidy list for a thumb */
  /* an answer's questions the same way as the first screen's (one chip, one look); a button among them keeps its own
     width */
  .as-next:has(> .u-chip) { align-self: stretch; flex-direction: column; align-items: stretch; }
  .as-next > :not(.u-chip) { align-self: flex-start; }
  :is(.as-qs, .as-next) > .u-chip { justify-content: flex-start; }
  /* stacked, the questions are flat rows: the box to write in is the only thing with a lip (four boxes alike read
     as four places to type) */
  :is(.as-qs, .as-next) > .u-chip { border-bottom-width: 2px; }
  :is(.as-qs, .as-next) > .u-chip::before { box-shadow: none; }
  :is(.as-qs, .as-next) > .u-chip:active { transform: none; }
  :is(.as-qs, .as-next) > .u-chip:active::before { background: var(--color-polar); }
  .as-msg--ai { gap: 8px; }
  .as-face { width: 24px; }
  .as-face > img { width: 24px; height: 24px; }
  .as-trow { grid-template-columns: minmax(0, 1fr) auto; row-gap: 8px; padding: 12px; }
  /* the two lines share their columns (label · total · pictures), so "You get"'s pictures start under "You give"'s
     whatever the totals' widths ("🔥980" over "🔥1,050"); the totals keep one width (🔥14,750 fits), so every row's
     pictures start in the same column too (UX.md rule 19) */
  .as-trow__deal { grid-column: 1 / -1; grid-row: 2; grid-template-columns: auto auto minmax(0, 1fr); }
  .as-side { display: contents; }
  .as-trow__open { grid-column: span 2; }
}

@media (prefers-reduced-motion: reduce) {
  .as-think__word { animation: none; transition: none; background: none; color: var(--color-label); }
  .as-msg--think .as-face > img { animation: none; }
  .as-trow.is-glow { animation: none; }
}

/* ================================================================ the brain's cards (app/assistant/brain.js; markup:
   assistant-markup.js itemsHTML … linkHTML). Owned by the answers: the parts above are the chat's. One frame each
   (UX.md rule 15), rows split by hairlines, numbers right-aligned in tabular figures, tokens only. */

/* items as rows in one card: picture, name over tier, what the list is about, the value at the right edge */
.as-items { overflow: hidden; }   /* the rows' hover fills the card's round corners */
.as-irow {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px; color: var(--color-eel); text-decoration: none;
  transition: background-color var(--m-fast) var(--m-ease-out);
}
.as-irow + .as-irow { border-top: 2px solid var(--color-swan); }
@media (hover: hover) { .as-irow:hover { background: var(--color-polar); } }
.as-irow:focus-visible { outline: 2px solid var(--color-macaw); outline-offset: -4px; border-radius: 12px; }
.as-irow > .u-pic { flex-shrink: 0; }
.as-irow__n { flex-shrink: 0; width: 20px; color: var(--color-label); font: 700 15px/20px var(--font); font-variant-numeric: tabular-nums; text-align: center; }
.as-irow__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.as-irow__name { overflow-wrap: break-word; font: 700 16px/20px var(--font); }   /* a long name wraps, never cut */
.as-irow__qty { margin-left: 6px; color: var(--color-label); }
.as-irow__tier { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--color-label); font: 400 14px/18px var(--font); }
/* the value, and what the list is about under it (this week's change, demand), right-aligned like the item's own row */
.as-irow__end { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; }
.as-irow__val > .u-val { gap: 2px; font: 700 17px/22px var(--font); }
.as-irow__meta { color: var(--color-label); font: 400 14px/18px var(--font); }
.as-irow__meta > .u-chg { font: 700 14px/18px var(--font); }
.as-irow__word { color: var(--color-eel); font-weight: 700; }
/* ways to split an item (assistant-markup.js splitsHTML): a row each, its number, pictures and total; the row asks its
   check when tapped, so it reads like the item rows (hover, focus ring) */
.as-split {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 16px; border: 0; background: none;
  color: var(--color-eel); font: inherit; text-align: left; cursor: pointer; transition: background-color var(--m-fast) var(--m-ease-out);
}
.as-split + .as-split { border-top: 2px solid var(--color-swan); }
@media (hover: hover) { .as-split:hover { background: var(--color-polar); } }
.as-split:focus-visible { outline: 2px solid var(--color-macaw); outline-offset: -4px; border-radius: 12px; }
.as-split__pics { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.as-split__val { flex-shrink: 0; white-space: nowrap; }
.as-split__val > .u-val { gap: 2px; font: 700 17px/22px var(--font); font-variant-numeric: tabular-nums; }
.as-items__total {
  display: flex; align-items: baseline; justify-content: flex-end; gap: 6px; margin: 0; padding: 10px 16px;
  border-top: 2px solid var(--color-swan); color: var(--color-label); font: 700 15px/20px var(--font);
}
.as-items__total > .u-val { gap: 2px; color: var(--color-eel); font-size: 17px; }

/* two items side by side: no frame, each its tile, name, tier and value; "vs" quiet between */
.as-vs { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: start; gap: 8px; width: 100%; max-width: 360px; }
.as-vs__it { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; padding: 4px; border-radius: 12px; color: var(--color-eel); text-align: center; text-decoration: none; }
.as-vs__it > .u-pic { margin-bottom: 6px; }
.as-vs__name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 17px/22px var(--font); }
.as-vs__tier { color: var(--color-label); font: 400 14px/18px var(--font); }
.as-vs__it > .u-val { gap: 2px; margin-top: 2px; font: 700 19px/24px var(--font); }
@media (hover: hover) { .as-vs__it:hover .as-vs__name { color: var(--color-link); } }
.as-vs__it:focus-visible { outline: 2px solid var(--color-macaw); outline-offset: 2px; }
/* "vs" level with the pictures' middle (a 56px picture, 4px padding: 32px down) */
.as-vs__mid { margin-top: 22px; color: var(--color-label); font: 700 15px/20px var(--font); }

/* "Harvester = Candy ×8": the two Shop tiles with "=" between */
.as-ratio { display: flex; align-items: center; gap: 16px; }
.as-ratio__it { width: 104px; }
.as-ratio__eq { color: var(--color-label); font: 700 28px/1 var(--font); padding-bottom: 40px; }   /* level with the pictures, not the names */

/* a trade checked: You give over You get, each side's total, then its items by name; a quiet foot (the usual range,
   Check a trade). The plain difference is the sentence above it */
.as-check { padding: 0 16px; }
.as-check__row { padding: 12px 0; }
.as-check__row + .as-check__row { border-top: 2px solid var(--color-swan); }
.as-check__head { display: flex; align-items: baseline; gap: 5px; margin: 0 0 8px; color: var(--color-label); font: 700 15px/20px var(--font); }
.as-check__head > .u-val { gap: 2px; color: var(--color-eel); font-size: 17px; }
.as-check__items { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.as-check__item { display: flex; align-items: center; gap: 10px; }
.as-check__item > .u-pic { flex-shrink: 0; }
.as-check__name { flex: 1 1 auto; min-width: 0; font: 700 16px/20px var(--font); }
.as-check__qty { margin-left: 6px; color: var(--color-label); }
.as-check__name .u-val { display: inline; }
.as-check__name .u-coin { margin-right: 2px; }
.as-check__item > .u-val { gap: 2px; color: var(--color-label); font: 700 15px/20px var(--font); }
/* a value standing for items, or something on top: the dashed slot (a place still to fill) */
.as-check__slot { flex-shrink: 0; width: 32px; height: 32px; border: 2px dashed var(--color-hare); border-radius: 8px; }
.as-check__foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; padding: 12px 0; border-top: 2px solid var(--color-swan); }
.as-check__diff:empty { display: none; }
.as-check__diff { margin: 0; font: 700 17px/22px var(--font); }
.as-check__note { flex: 1 1 260px; margin: 0; color: var(--color-label); font: 400 15px/20px var(--font); }
.as-check__open { display: inline-block; padding: 12px 0; margin: -12px 0; font-size: 15px; line-height: 20px; white-space: nowrap; }   /* a 44px tap target, the line's height unchanged */
/* Share beside it, the same quiet link (a button: it opens the share window) */
.as-check__links { display: inline-flex; flex-wrap: wrap; column-gap: 24px; }
.as-check__share { display: inline-block; padding: 12px 0; margin: -12px 0; border: 0; background: none; font: 700 15px/20px var(--font); white-space: nowrap; cursor: pointer; }

/* trades that just happened: one side ⇄ the other, then when. The columns line up from row to row (UX.md rule 19):
   "when" has one width (right-aligned), so the ⇄ never shifts with "1 day ago" over "14 days ago" */
.as-done { overflow: hidden; }
.as-drow { display: grid; grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr) 88px; align-items: center; column-gap: 12px; padding: 12px 16px; }
.as-drow + .as-drow { border-top: 2px solid var(--color-swan); }
.as-drow__mark { display: flex; color: var(--color-hare); }
.as-drow__when { color: var(--color-label); font: 400 14px/18px var(--font); white-space: nowrap; text-align: right; }

/* someone's facts: picture, name, numbers; the row opens their page */
.as-person { display: flex; align-items: center; gap: 14px; width: 100%; color: var(--color-eel); text-decoration: none; border-radius: 12px; }
.as-person > .u-avatar { flex-shrink: 0; }
.as-person__text { display: flex; flex-direction: column; min-width: 0; }
.as-person__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 19px/24px var(--font); }
.as-person__facts, .as-person__badges { color: var(--color-label); font: 400 15px/20px var(--font); }
.as-person__badges { font-weight: 700; }
@media (hover: hover) { .as-person:hover .as-person__name { color: var(--color-link); } }
.as-person:focus-visible { outline: 2px solid var(--color-macaw); outline-offset: 4px; }

/* label: value pairs on one line (UX.md rules 3 and 16: one string, plain " · ") */
.as-facts { margin: 0; color: var(--color-eel); font: 400 15px/24px var(--font); }
.as-facts__label { color: var(--color-label); }
.as-facts__pair { white-space: nowrap; }
.as-facts__pair > .u-val, .as-facts__pair > .u-chg { display: inline-flex; vertical-align: -1px; }
.as-facts__pair > .u-val { gap: 2px; }
.as-facts__dot { color: var(--color-label); }

/* an item's month: a small line from 30 days ago to now */
.as-trend { width: 100%; max-width: 320px; }
.as-trend > .u-spark { width: 100%; height: 56px; }
.as-trend__axis { display: flex; justify-content: space-between; margin-top: 4px; color: var(--color-label); font: 400 13px/16px var(--font); }

/* the one button an answer offers (Sign in with Roblox, Star Harvester, Sign out); a page to go to is a quiet link */
.as-act { display: flex; }
.as-act__btn { --h: 48px; }
.as-act__btn > .u-ic { margin-right: 2px; }

/* numbered steps (how a trade goes) */
.as-steps { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: as-step; }
.as-steps__step { display: flex; gap: 12px; color: var(--color-eel); font: 400 17px/26px var(--font); counter-increment: as-step; }
.as-steps__step::before {
  content: counter(as-step); flex-shrink: 0; width: 26px; height: 26px; margin-top: 0; border-radius: 50%;
  background: var(--color-polar); color: var(--color-wolf); font: 700 14px/26px var(--font); text-align: center;
}

/* a quiet link to the page that says more */
.as-more { margin: 0; font: 400 15px/20px var(--font); }
.as-more > .as-link { display: inline-block; padding: 12px 0; margin: -12px 0; }   /* a 44px tap target */

/* your trades up: each with Bump and a quiet Take down (it asks first). Every row is yours, so the who column is only
   as wide as "You" and the trade keeps room beside the two buttons (with the 160px column its pictures stood one a line) */
@media (min-width: 600px) { .as-mine > .as-trow { grid-template-columns: auto minmax(0, 1fr) auto; } }
.as-mine__btns { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; }
.as-mine__btn { --h: 40px; }
.as-mine__down {
  padding: 12px 0; margin: -12px 0; border: 0; border-radius: 4px; background: none; color: var(--color-label);   /* a 44px tap target, the line's height unchanged */
  font: 700 15px/20px var(--font); white-space: nowrap; cursor: pointer;
}
@media (hover: hover) { .as-mine__down:not(:disabled):hover { color: var(--color-cardinal); } }
.as-mine__down:focus-visible { outline: 2px solid var(--color-macaw); outline-offset: 2px; }
.as-mine__down:disabled { color: var(--color-hare); cursor: default; }

/* the narrow chat column (phones): rows keep their columns, the trade sides stack */
@container (max-width: 519px) {
  .as-irow { padding: 10px 12px; gap: 10px; }
  .as-check { padding: 0 12px; }
  .as-drow { grid-template-columns: 24px minmax(0, 1fr) auto; row-gap: 8px; padding: 12px; }
  .as-drow > .as-side:first-child { grid-column: 1 / 3; grid-row: 1; }
  .as-drow__when { grid-column: 3; grid-row: 1; }
  .as-drow__mark { grid-column: 1; grid-row: 2; }
  .as-drow > .as-side:nth-child(3) { grid-column: 2 / 4; grid-row: 2; }
  .as-ratio { gap: 12px; }
  .as-ratio__it { width: 88px; }
  .as-mine__btns { gap: 8px; }
}
/* a side in a done row stays one block on phones too (the trade rows' sides open up into their grid there) */
.as-drow > .as-side { display: flex; }

/* messages a day (app/assistant/limit.js): the quiet line over the box once 3 or fewer are left today (signed in, a link
   to Settings → Friends in the same quiet colour). Its words start where the box's do (its 2px edge and its padding).
   Empty, it takes no room (it stays in the page: a live region). On the first screen it sits just over the box without
   taking room there either, so the title and the box never move when the count comes: the page keeps 40px between
   its title's line and the box at every width (16px, the line, 8px) */
.as-left { margin: 0 0 8px; padding: 0 22px; color: var(--color-label); font: 700 13px/16px var(--font); }
.as-left:empty { margin: 0; }
.as:not(.is-chat) .as-dock { position: relative; }
.as:not(.is-chat) .as-left { position: absolute; left: 0; right: 0; bottom: 100%; height: 16px; margin-bottom: 8px; }   /* one place, empty or not */
/* the draft's other side when nothing is asked for */
.as-draft__open { margin: 8px 0 0; color: var(--color-label); font: 400 15px/20px var(--font); }
.as-draft__open > .as-irow__word { margin-right: 4px; color: inherit; font: inherit; }
@media (max-width: 599px) { .as-left { padding: 0 18px; } }   /* the phone's box: 16px padding */
.as-left__go { position: relative; border-radius: 4px; color: inherit; text-decoration: none; }
.as-left__go::after { content: ""; position: absolute; inset: -14px -4px; }   /* a 44px target */
@media (hover: hover) { .as-left__go:hover { color: var(--color-link); } }
.as-left__go:focus-visible { outline: 2px solid var(--color-macaw); outline-offset: 2px; }

/* the limit message (the owner's pick, spec/limit-variations D: a game's "out of lives"): one centred piece beside the
   AI's coin. Your picture greyed in a ring of the day's messages, the red count's 0 on it (ui.css .u-count, grown),
   "Out of messages", the countdown, then "Can't wait?" and its one button. Coming in (.m-in: never when the chat is
   drawn again, never under reduced motion) the last message's segment goes out with your picture's colour, then the 0
   pops in: under a second, opacity and scale only. An older one, or one with room again, puts its countdown away */
.as-limit { display: flex; flex-direction: column; align-items: center; align-self: stretch; text-align: center; }
.as-limit__face { position: relative; display: flex; align-items: center; justify-content: center; width: 104px; height: 104px; }
.as-limit__ring { position: absolute; inset: 0; }
.as-limit__seg { stroke: var(--color-swan); }
.as-limit__lit { stroke: var(--color-macaw); opacity: 0; }   /* today's colour in Settings → Friends */
.as-limit__face > .u-avatar { filter: grayscale(1); opacity: .7; }
.as-limit__was { position: absolute; inset: 12px; display: flex; opacity: 0; }   /* the picture in colour, over the grey one */
.as-limit__you { display: flex; align-items: center; justify-content: center; width: 80px; height: 80px; border-radius: 50%; background: var(--color-swan); color: var(--color-hare); }
.as-limit__zero {
  position: absolute; right: 2px; bottom: 2px; display: flex; align-items: center; justify-content: center; min-width: 32px; height: 32px;
  box-sizing: border-box; border: 3px solid var(--color-snow); border-radius: 16px; background: var(--color-count); color: var(--color-snow-always-light);
  font: 700 17px/1 var(--font);
}
.as-limit__title { margin: 12px 0 0; color: var(--color-eel); font: 700 22px/28px var(--font); }
.as-limit__when { margin: 4px 0 0; color: var(--color-label); font: 400 17px/24px var(--font); font-variant-numeric: tabular-nums; }
.as-limit__when b { color: var(--color-eel); }
.is-past .as-limit__when { display: none; }
.as-limit__text { max-width: 400px; margin: 16px 0 0; color: var(--color-eel); font: 400 17px/26px var(--font); text-wrap: balance; }
.as-limit > .as-act { margin-top: 16px; }
.m-in .as-limit__lit, .m-in .as-limit__was { animation: as-limit-out var(--m-slow) var(--m-ease-in) 350ms both; }
.m-in .as-limit__zero { animation: u-pop-icon var(--m-slow) var(--m-ease-in-out) 600ms both; }
@keyframes as-limit-out { from { opacity: 1; } to { opacity: 0; } }

/* ================================================================ round 7's cards (the act loop: assistant-markup.js
   tradeCardHTML … recallCardHTML, drawn from the server's answer object by app/assistant/act-render.js). They read like
   round 6's cards above: one frame each, rows split by hairlines, "You give" / "You get" in the label colour, totals in
   tabular figures, item pictures on their tier tiles, a round number badge in front of a numbered row (the numbered
   steps' own, .as-steps__step). Their marks are small tags, never sentences; tokens only */

/* a card with a part of its own beside it (a trade checked: its chip; a draft: Post this trade): the answer's width */
.as-acts-trade, .as-acts-draft { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; width: 100%; }
.as-msg__col > :is(.as-acts-trade, .as-acts-draft) + .as-say { margin-top: 12px; }

/* a verdict or stance chip: a small pill, its colour the verdict's (green a W, red an L, amber a stance: a big jump, a
   post that asks a lot, not enough), its edge a little of its own colour */
.as-verdict {
  display: inline-flex; align-items: center; height: 26px; margin: 0; padding: 0 10px; border-radius: 13px;
  background: var(--color-polar); color: var(--color-eel); box-shadow: inset 0 0 0 2px color-mix(in srgb, currentColor 22%, transparent);
  font: 700 14px/18px var(--font); white-space: nowrap;
}
.as-verdict:empty { display: none; }
:is(.as-acts-trade:is([data-verdict="w"], [data-verdict="big_w"]) > .as-verdict, .as-verdict:is([data-verdict="w"], [data-verdict="big_w"])) { background: var(--color-sea-sponge); color: var(--color-up); }
:is(.as-acts-trade:is([data-verdict="l"], [data-verdict="big_l"]) > .as-verdict, .as-verdict:is([data-verdict="l"], [data-verdict="big_l"])) { background: var(--color-walking-fish); color: var(--color-down); }
.as-acts-trade[data-chip] > .as-verdict { background: var(--color-canary); color: var(--color-guinea-pig); }
/* a trade checked: the chip in the card's top-right corner, level with "You give" and its total */
.as-acts-trade > .as-verdict { position: absolute; z-index: 1; top: 10px; right: 14px; }
.as-acts-trade > .as-check > .as-check__row:first-child > .as-check__head { padding-right: 112px; }

/* a step's or a row's two sides, as a trade row reads them: "You give 🔥250 [pic] Harvester" over "You get 🔥340 [pic]
   Heart Wand"; the words, the totals and the pictures in columns, so the steps line up under each other */
.as-deal { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px 12px; min-width: 0; }
.as-deal--one { grid-template-columns: minmax(0, 1fr); }
.as-deal__side { display: flex; align-items: center; gap: 12px; min-width: 0; }
.as-deal__side > .u-val { flex-shrink: 0; gap: 2px; min-width: 66px; color: var(--color-eel); font: 700 17px/22px var(--font); font-variant-numeric: tabular-nums; }
.as-deal__its { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; min-width: 0; }
.as-deal__it { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.as-deal__it > .u-pic { flex-shrink: 0; }
.as-step__name { min-width: 0; overflow-wrap: break-word; color: var(--color-eel); font: 700 16px/20px var(--font); }   /* a long name wraps, never cut */
.as-step__name > .as-check__qty { white-space: nowrap; }
.as-deal__each > .u-val { gap: 2px; color: var(--color-label); font: 700 14px/18px var(--font); }

/* the round number badge in front of a numbered row (a step, an option) */
:is(.as-step__n, .as-option__n, .as-ladder .as-trow__step) {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  background: var(--color-polar); color: var(--color-wolf); font: 700 14px/1 var(--font); font-variant-numeric: tabular-nums;
}

/* small tags: a step's marks (a big jump's add, none open now, an open trade, a locked count) */
.as-tag {
  display: inline-flex; align-items: center; min-height: 24px; box-sizing: border-box; padding: 3px 10px; border-radius: 12px;
  background: var(--color-polar); color: var(--color-wolf); font: 700 13px/16px var(--font); white-space: nowrap;
}
.as-tag--jump { background: var(--color-canary); color: var(--color-guinea-pig); }
.as-tag--open { background: var(--color-iguana); color: var(--color-macaw); }

/* a route: its head says once what every row would (how many steps in all; built from values, not real ads), then a row
   a step: the badge, the two sides, its tags at the right edge */
.as-ladder { overflow: hidden; }
.as-ladder__head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin: 0; padding: 10px 16px;
  border-bottom: 2px solid var(--color-swan); background: var(--color-polar); color: var(--color-label); font: 700 14px/18px var(--font);
}
.as-ladder__head > * + *::before { content: "·"; margin-right: 8px; }
.as-ladder__steps { gap: 0; }
.as-step { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; column-gap: 14px; padding: 12px 16px; }
.as-step + .as-step { border-top: 2px solid var(--color-swan); }
.as-step__mark { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.as-step__ads { display: none; }
/* a step done: its badge green, its sides quiet */
.as-step.is-done :is(.as-step__n, .as-trow__step) { background: var(--color-sea-sponge); color: var(--color-up); }
.as-step.is-done :is(.as-step__deal, .as-trow__deal) { opacity: .6; }
/* "+17 more steps": in the sides' column, a dotted line down from the badges above to the one below */
.as-step--more { display: block; padding: 10px 16px 10px 58px; color: var(--color-label); font: 700 15px/20px var(--font); }
.as-step--more::before { content: ""; position: absolute; top: 6px; bottom: 6px; left: 29px; border-left: 2px dotted var(--color-hare); }
/* an open ad's step: that ad's trade row, the badge in front */
.as-step--ad { display: block; padding: 0; }
.as-step--ad > .as-trow { grid-template-columns: 28px 160px minmax(0, 1fr) auto; column-gap: 14px; }

/* options: a row each, its badge, its items (the item rows' own card drawn flat inside this one) */
.as-acts-options, .as-acts-facts, .as-acts-recall { overflow: hidden; }
:is(.as-options, .as-recall, .as-acts-facts > .as-facts) { margin: 0; padding: 0; list-style: none; }
.as-option { display: flex; align-items: center; padding-left: 16px; }
.as-option + .as-option { border-top: 2px solid var(--color-swan); }
:is(.as-option, .as-acts-facts) > .as-items { flex: 1 1 auto; min-width: 0; border: 0; border-radius: 0; background: none; }
.as-option > .as-items > .as-irow { padding-left: 12px; }

/* an item's facts: its row, then the facts asked, one quiet line each */
.as-acts-facts > .as-facts { display: flex; flex-direction: column; gap: 6px; padding: 10px 16px 12px; border-top: 2px solid var(--color-swan); color: var(--color-eel); font: 400 15px/20px var(--font); }
.as-fact { display: flex; gap: 10px; }
.as-fact::before { content: ""; flex-shrink: 0; width: 6px; height: 6px; margin-top: 7px; border-radius: 50%; background: var(--color-hare); }
.as-acts-facts > .as-facts + .as-items { border-top: 2px solid var(--color-swan); }

/* rows said back: each its label and chip on one line, then its sides */
.as-recall__row { display: flex; flex-direction: column; gap: 10px; padding: 12px 16px; }
.as-recall__row + .as-recall__row { border-top: 2px solid var(--color-swan); }
.as-recall__row--one { flex-direction: row; align-items: center; gap: 14px; }
.as-recall__row--one > .as-deal { flex: 1 1 auto; }
.as-recall__label { font: 700 15px/20px var(--font); }
.as-recall__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 26px; margin: 0; color: var(--color-eel); font: 700 15px/20px var(--font); }

/* phones: an ad's step keeps its badge in front, its sides under its trader */
@media (max-width: 599px) {
  .as-step--ad > .as-trow { grid-template-columns: 24px minmax(0, 1fr) auto; column-gap: 10px; }
  .as-step--ad > .as-trow > .as-trow__deal { grid-column: 2 / -1; }
}
/* the narrow chat column (phones): a step's tags go under its sides; a side's items go under its total when they need
   the room */
@container (max-width: 519px) {
  .as-step { grid-template-columns: 24px minmax(0, 1fr); row-gap: 8px; column-gap: 10px; padding: 12px; }
  :is(.as-step__n, .as-option__n, .as-ladder .as-trow__step) { width: 24px; height: 24px; font-size: 13px; }
  .as-step__mark { grid-column: 2; flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
  .as-tag { white-space: normal; }
  .as-step--more { padding: 10px 12px 10px 46px; }
  .as-step--more::before { left: 23px; }
  .as-ladder__head { padding: 10px 12px; }
  /* the two lines share their columns (word · total · items), like the trade rows on phones, so "You get"'s items start
     under "You give"'s whatever the totals' widths */
  .as-deal { grid-template-columns: auto auto minmax(0, 1fr); column-gap: 10px; }
  .as-deal--one { grid-template-columns: auto minmax(0, 1fr); }
  .as-deal__side { display: contents; }
  .as-deal__side > .u-val { min-width: 0; font-size: 16px; }
  .as-deal__its { gap: 6px 12px; }
  .as-deal__it { gap: 6px; }
  .as-step__name { font-size: 15px; line-height: 18px; }
  .as-option { padding-left: 12px; }
  .as-option > .as-items > .as-irow { padding-left: 10px; }
  .as-acts-facts > .as-facts { padding: 10px 12px 12px; }
  .as-recall__row { padding: 12px; }
  /* a list's row: its badge and chip on one line, its items under them, as the other rows read (beside the chip its
     names broke a letter a line) */
  .as-recall__row--one { flex-wrap: wrap; justify-content: space-between; row-gap: 10px; }
  .as-recall__row--one > .as-deal { order: 1; flex-basis: 100%; }
}

/* ================================================================ the trade calculator's cards (assistant-markup.js
   calcTradeHTML, calcRowsHTML, calcMatchesHTML: the chat with assistant.calc, docs/CALC.md §7). Round 7's cards: the
   trade card's chip in its corner (Fair a calm blue, Depends gold), a set as one row with its pieces under its name,
   the percent and the fair range in the foot; rows that put a trade on the table read like the split rows (hover, focus
   ring), each its number, its words or its sides, its chip and percent at the end; matches as trade rows in groups,
   each group's name in the card's head. Tokens only */
:is(.as-acts-trade[data-verdict="even"] > .as-verdict, .as-verdict[data-verdict="even"]) { background: var(--raised); color: var(--blue-strong); }
:is(.as-acts-trade[data-verdict="depends"] > .as-verdict, .as-verdict[data-verdict="depends"]) { background: var(--gold-soft); color: var(--gold); }
.as-check__item--set > .as-check__name { display: flex; flex-direction: column; }
.as-check__set { color: var(--text-muted); font: 500 13px/18px var(--font-body); }
.as-acts-trade[data-calc] .as-check__note { flex: 0 1 auto; text-align: right; }

.as-calc-rows { overflow: hidden; }
.as-calc-li + .as-calc-li { border-top: 1px solid var(--border); }
.as-calc-row {
  display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; column-gap: 14px; width: 100%; min-height: 56px;
  padding: 10px 16px; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer;
  transition: background-color var(--m-fast) var(--m-ease-out);
}
@media (hover: hover) { .as-calc-row:hover { background: var(--row-hover); } }
.as-calc-row:focus-visible { outline: 2px solid var(--gold); outline-offset: -4px; border-radius: var(--radius); }
.as-calc-row__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.as-calc-row__line { color: var(--text); font: 600 15px/20px var(--font); overflow-wrap: break-word; }
.as-calc-row__pics { display: flex; flex-wrap: wrap; gap: 4px; }
.as-calc-row__end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
:is(.as-calc-row__pct, .as-calc-match__pct) { color: var(--text-muted); font: 600 13px/18px var(--font); font-variant-numeric: tabular-nums; white-space: nowrap; }

.as-calc-group { overflow: hidden; }
.as-calc-group + .as-calc-group, .as-calc-group + .as-say { margin-top: 12px; }
.as-calc-match > .as-gap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.as-calc-match__need { color: var(--text-body); }
.as-calc-open { font: 600 14px/20px var(--font); white-space: nowrap; }

@container (max-width: 519px) {
  .as-calc-row { grid-template-columns: 24px minmax(0, 1fr) auto; column-gap: 10px; padding: 10px 12px; }
  .as-calc-row__line { font-size: 14px; }
}
.as-calc-row__line > .u-val { display: inline-flex; margin-left: 6px; color: var(--text-muted); font-weight: 600; }
.as-calc-row__for { display: block; color: var(--text-muted); font: 500 13px/18px var(--font-body); }

/* ================================================================ the calculator's market insights (assistant-markup.js
   marketLineHTML, calcRowsHTML's tags and foot, a match's trust under its poster: the mode's calc_market, docs/CALC.md
   §8). Quiet on purpose: one small muted line under the card it speaks of, its dated source smaller still; a tag the
   size of "New" (u-new) on a row, green for wanted a lot, orange for slow to trade; the poster's reviews under their
   name, the star gold. Tokens only */
.as-mkt { display: flex; flex-direction: column; gap: 2px; max-width: 560px; margin: 0; padding: 0 2px; color: var(--text-muted); font: 500 13px/18px var(--font-body); text-wrap: pretty; }
.as-msg__col > :is(.as-card, .as-acts-trade, .as-item) + .as-mkt { margin-top: -4px; }
.as-mkt__src { color: var(--text-dim); font: 500 12px/16px var(--font-body); }
.as-mkt__foot { margin: 0; padding: 8px 16px 10px; border-top: 1px solid var(--border); color: var(--text-dim); font: 500 12px/16px var(--font-body); }
.as-mkt-tag {
  display: inline-flex; align-self: flex-start; align-items: center; height: 20px; padding: 0 7px; border-radius: var(--radius-sm);
  background: var(--green-soft); color: var(--green-text); font: 600 12px/16px var(--font); white-space: nowrap;
}
.as-mkt-tag[data-mkt-tag="hard"] { background: color-mix(in srgb, var(--orange) 12%, transparent); color: var(--orange); }
.as-trow__who--sub { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 8px; }
.as-trow__who--sub > .u-avatar { grid-row: span 2; }
.as-trow__sub { min-width: 0; overflow: hidden; color: var(--text-muted); font: 500 12px/16px var(--font-body); text-overflow: ellipsis; white-space: nowrap; }
.as-trow__star { margin-right: 2px; color: var(--gold); }
@container (max-width: 519px) {
  .as-mkt__foot { padding: 8px 12px 10px; }
}
.as-calc-row__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }

/* (calc_v2, round 4) items as rows of the calculator's row card (assistant-markup.js itemRowsHTML): a market list, the
   newest event's items, how several items are doing. The fair-trades row as it is, its body a picture beside the name
   and value; the week's move at the end in the up / down colours (u-chg). New classes only: no other card changes */
.as-calc-row__item { flex-direction: row; align-items: center; gap: 10px; }
.as-calc-row__item > .u-pic { flex-shrink: 0; }
.as-calc-row--item .as-calc-row__pct > .u-chg { font: inherit; font-weight: 700; }
