/* /<game>/items/:slug (pages/item.js, markup pages/item-markup.js), spec/nav/UX.md "Item" (the owner's pick of
   2026-11-11, spec/item-layouts/03b-filter): the item (stage or tile, words, facts) with the panel beside it, the chart
   across the page, "What do you want to do?" and the picked part (on phones before the chart), past trades, items of
   similar value, the Trade web folded at the bottom. One frame per thing: the item's only box is its tier tile or
   stage, sections are split by space and a heading, the panel is the one card. The ad cards come from
   app/components/adcard.css, past trades from app/components/market.css, Check a trade's parts from
   pages/calculator.css. Prefix it-. Colours: tokens only; tier colours from pop.css. */

.it { min-width: 0; container: it / inline-size; }   /* the narrow layout follows the column, not the screen */
/* quick taps on the folds and the web's items are taps, never a zoom */
.it :is(.it-fold__head, .it-node, .it-step__item, .it-alert__off) { touch-action: manipulation; }
.it .u-val { gap: 2px; }   /* the coin sits right on its number */

/* ================================================================ the item: tier tile, kind, name, value */
.it-hero { display: flex; align-items: center; gap: 24px; }
.it-hero__tile { display: flex; flex-shrink: 0; }
/* the words: the kind and name on the left, the alert bell beside them (centred on the two lines), the value and the
   buttons across under them */
.it-hero__main { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; }
.it-hero__main > * { grid-column: 1 / -1; }
.it-hero__main > :is(.it-kind, .it-name) { grid-column: 1; }
.it-hero__main > :is(.it-bell, .it-skelbell) { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.it-kind { margin: 0 0 2px; color: var(--color-label); font: 700 15px/20px var(--font); }
.it-kind a { color: inherit; text-decoration: none; border-radius: 4px; }
@media (hover: hover) { .it-kind a:hover { color: var(--color-link); } }
.it-kind a:focus-visible { outline: 2px solid var(--color-macaw); outline-offset: 2px; }
.it-retired { color: var(--color-fire-ant); }
.it-name { margin: 0; color: var(--color-eel); font: 700 28px/34px var(--font); overflow-wrap: break-word; }
.it-value { margin: 6px 0 0; color: var(--color-wolf); font: 400 17px/24px var(--font); }
.it-value__num { display: inline-flex; align-items: center; gap: 3px; margin-right: 6px; vertical-align: middle; color: var(--color-eel); font: 700 40px/48px var(--font); font-variant-numeric: tabular-nums; }
.it-value__num .u-coin { width: 32px; height: 39px; }
.it-skelnum { height: auto; color: transparent; border-radius: 8px; }
.it-skelweek { display: inline; height: auto; color: transparent; border-radius: 6px; }   /* wraps as "the same this week" will */
.it-week { white-space: nowrap; }
.it-week .u-chg { vertical-align: -1px; }

/* ================================================================ the 3D stage (an MM2 item with a model; spec/item3d/SPEC.md)
   The tier tile grown into a stage: its soft face, the picture first (the server's paint), then the model on its lit
   floor in the same box (app/item3d/stage-ui.js), so nothing on the page moves. Beside it the kind, name, value and
   the facts. In a column under 640px (phones, a narrow tablet) the stage spans it, 6:5, and the words come under it. */
.it-hero--3d { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); align-items: center; gap: 32px; }
.it-stage {
  --it-fade: 350ms;
  position: relative; isolation: isolate; overflow: hidden; width: 100%; aspect-ratio: 1; border-radius: 24px;
  background: var(--tier-soft); container: stage / inline-size; user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.it[data-tier="Chroma"] .it-stage {
  background: linear-gradient(135deg, rgba(var(--color-super-gradient-green-variant1-rgb), .34), rgba(var(--color-super-gradient-blue-variant1-rgb), .30) 50%, rgba(var(--color-super-gradient-pink-variant1-rgb), .34)), var(--color-snow);
}
/* the picture: the tile's padding (18%), above the canvas until the model takes over; it fades out over the model posed
   under it (and back in for 2D) */
.it-stage__pic {
  position: absolute; inset: 0; z-index: 1; display: block; width: 100%; height: 100%; box-sizing: border-box; padding: 18%;
  object-fit: contain; pointer-events: none; -webkit-user-drag: none; transition: opacity var(--it-fade) var(--m-ease-out);
}
.it-stage.no-pic .it-stage__pic { opacity: 0; }
.it-stage.pic-gone .it-stage__pic { visibility: hidden; }
/* the canvas: shown at once (under the picture) once it has drawn the model in place; dragging it turns the item, a
   vertical swipe still scrolls the page (touch-action pan-y, set by the engine) */
.it-stage > canvas { position: absolute; inset: 0; z-index: 0; display: block; width: 100%; height: 100%; opacity: 0; outline: none; cursor: grab; }
.it-stage > canvas:active { cursor: grabbing; }
.it-stage.has-canvas > canvas { opacity: 1; }
/* Item / Try on (left) and 3D / 2D (right), over the stage's top; they fade in with the model */
.it-stage__ui { position: absolute; top: 12px; right: 12px; left: 12px; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; pointer-events: none; }
.it-stage__ui > * { pointer-events: auto; }
.it-stage__ui[hidden] { display: none; }
.it-stage__ui.is-in { animation: m-fade-in var(--m-base) var(--m-ease-out) both; }
.it-stage__seg { flex: none; }
.it-stage__seg .u-seg__opt { min-width: 48px; padding: 0 12px; text-transform: none; letter-spacing: 0; font-size: 15px; }
.it-stage__seg[data-seg="dim"] { margin-left: auto; }
.it-stage[data-mode="wear"] .it-stage__seg[data-seg="dim"] { display: none; }
.it-stage__signin { --h: 36px; flex: none; margin-left: auto; padding: 0 14px; font-size: 15px; letter-spacing: 0; text-transform: none; }
/* how to move it: one quiet line in the stage's corner (3D only; beside the slots only where there is room) */
.it-stage__hint { position: absolute; right: 16px; bottom: 12px; left: 16px; z-index: 2; margin: 0; color: var(--color-label); font: 700 13px/18px var(--font); text-align: right; pointer-events: none; }
.it-stage__hint.is-in { animation: m-fade-in var(--m-base) var(--m-ease-out) both; }
.it-stage[data-dim="2d"] .it-stage__hint, .it-stage.is-wait .it-stage__hint { display: none; }
@container stage (max-width: 379px) { .it-stage__hint-more { display: none; } }
/* Try on: what the figure wears, one tile a slot down the stage's left side (the figure stands in the middle, its feet
   on the floor below them); a tap picks another (the picker window) */
.it-stage__slots { position: absolute; top: 60px; left: 12px; z-index: 2; display: flex; flex-direction: column; gap: 8px; }
.it-stage__slots[hidden] { display: none; }
.it-slot {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; width: 64px; height: 72px; padding: 6px 0 0;
  border: 2px solid var(--color-swan); border-bottom-width: 4px; border-radius: 16px; background: var(--color-snow); color: var(--color-label);
  font: 700 12px/14px var(--font); cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: background-color var(--m-fast) var(--m-ease-out);
}
@media (hover: hover) { .it-slot:hover { background: var(--color-polar); } }
.it-slot:active { margin-top: 2px; border-bottom-width: 2px; height: 70px; }
.it-slot:focus-visible { outline: 2px solid var(--color-macaw); outline-offset: 2px; }
.it-slot.is-open { border-color: var(--color-blue-jay); background: var(--color-iguana); color: var(--color-whale); }
.it-slot__pic { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-top: 2px; }
.it-slot__pic > img { width: 100%; height: 100%; object-fit: contain; }
.it-slot__pic > svg { color: var(--color-hare); }
/* a figure on its way: the floor, and a spinner only if it takes a moment */
.it-stage__wait { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; color: var(--tier); pointer-events: none; animation: m-fade-in var(--m-base) var(--m-ease-out) both; }
.it-stage__wait .m-spin { width: 28px; height: 28px; }
/* a short stage (a phone's): smaller slots, so the three fit down its side */
@container stage (max-width: 459px) {
  .it-stage__slots { top: 56px; gap: 6px; }
  .it-slot { width: 56px; height: 62px; padding-top: 4px; border-radius: 14px; font-size: 11px; line-height: 13px; }
  .it-slot:active { height: 60px; }
  .it-slot__pic { width: 34px; height: 34px; margin-top: 1px; }
  .it-stage[data-mode="wear"] .it-stage__hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .it-stage { --it-fade: 1ms; }
  .it-stage__ui.is-in, .it-stage__hint.is-in, .it-stage__wait { animation: none; }
}
@container it (max-width: 639px) {
  .it-hero--3d { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .it-stage { aspect-ratio: 6 / 5; max-height: 380px; }
}

/* the facts under the value: label over value, two by two, no boxes (Demand with its small meter, Rank, Trades this
   week, From); the panel's prices read the same way */
.it-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; margin: 24px 0 0; }
.it-fact { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.it-fact dt { color: var(--color-wolf); font: 400 15px/20px var(--font); }
.it-fact dd { display: flex; align-items: center; gap: 10px; min-height: 24px; margin: 0; color: var(--color-eel); font: 700 19px/24px var(--font); font-variant-numeric: tabular-nums; }
/* words (where it came from) wrap, a word longer than the column too: a fact never pushes the page wider */
.it-fact dd.it-fact__words { overflow-wrap: anywhere; }
.it-fact .u-val { gap: 3px; color: var(--color-eel); }
.it-meter { position: relative; width: 56px; height: 8px; border-radius: 4px; background: var(--color-swan); overflow: hidden; }
.it-meter > span { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: var(--color-macaw); }

/* ================================================================ the panel beside the item (one card): Cheapest to get, Best
   offer for it (label over number, 16px apart, no hairline), Find trades and Post a trade 12px apart, 24px from the
   prices. It hugs what it holds, its top on the item's: both prices and the buttons are exactly as tall as the 3D
   stage beside it; fewer rows make a shorter card, never one with a gap inside */
.it-top { align-items: stretch; }
.it-aside.pg-aside { position: static; }
.it-panel { display: flex; flex-direction: column; padding: 24px; }
/* both prices: as tall as the item beside it, to the pixel (its 2px edge rounds to whole screen pixels under the 85%
   zoom: the card came 1-2px short of the stage); the few px between go above the buttons */
.it-panel:has(.it-prices > .it-fact + .it-fact) { height: 100%; }
.it-panel:has(.it-prices > .it-fact + .it-fact) > .it-panel__btns { margin-top: auto; padding-top: 24px; }
.it-prices { display: flex; flex-direction: column; gap: 16px; margin: 0; }
.it-panel__none { margin: 0; color: var(--color-wolf); font: 400 17px/24px var(--font); }
.it-panel__btns { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.it-panel__btns:first-child { margin-top: 0; }
.it-panel__btns .u-btn + .u-btn { margin-top: 0; }
.it-skelpanel { height: 100%; min-height: 200px; }   /* the row's height (the item's beside it): never taller than the panel that comes */
/* the alert bell, beside the name (a 44px tap, a white button's 4px lip in it) */
.it-bell { --pad: 0; --h: 44px; width: 44px; color: var(--color-wolf); }
.it-skelbell { width: 44px; height: 44px; border-radius: var(--u-radius-btn); }
.it-bell.is-on { --fg: var(--color-macaw); color: var(--color-macaw); }
.it-bell.is-on > svg path { fill: currentColor; }

/* the value chart, straight on the page (the tooltip says the value of a day; the big number is the item's own) */
.it-chartbox { margin-top: 40px; }
.it-chart .u-chart__head { margin-bottom: 8px; align-items: center; }
.it-chart .u-chart__value { display: none; }
/* "▲ 7.9% this month", read like the top's "▲ 3.1% this week": the change, one word space, its words */
.it-chart .u-chart__meta { flex-wrap: wrap; gap: 0 .28em; margin: 0; }
.it-chart .u-seg { flex-shrink: 0; }
.it-chart .u-chart__plot { min-height: 300px; }
/* lines that come after the page is on screen fade in (item.js valueChart): the first drawing only, a range change redraws
   the same drawing */
.it-chart--late .u-chart__svg, .it-chart--late .u-chart__empty { animation: m-fade-in var(--m-base) var(--m-ease-out) both; }
/* while its points load the plot keeps its height and stays blank: the line comes within a moment (a grey shimmer
   block there read as a flash) */
.it-chart .u-seg__opt { min-width: 48px; font-size: 15px; text-transform: none; letter-spacing: 0; }   /* the small control (36px, a 44px tap area: frame.css) */
.it-chart__retry { display: flex; justify-content: center; margin-top: 8px; }

/* ================================================================ sections: space and a heading */
.it-sec { margin-top: 48px; }
.it-sec__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.it-sec__title { margin: 0; min-width: 0; color: var(--color-eel); font: 700 22px/28px var(--font); overflow-wrap: break-word; }
.it-sec__all { flex-shrink: 0; color: var(--color-link); font: 700 15px/20px var(--font); text-decoration: none; border-radius: 4px; }
@media (hover: hover) { .it-sec__all:hover { text-decoration: underline; } }
.it-sec__all:focus-visible { outline: 2px solid var(--color-macaw); outline-offset: 2px; }
.it-ads { display: flex; flex-direction: column; gap: 16px; }   /* trades one per row (UX.md rule 19); the card is adcard's own */
/* a trade's place while they load, as tall as a usual card (two lines of tiles side by side on a wide page, the sides
   stacked under 1200px, a phone's card a screen tall), so the chart under them doesn't jump when they come */
.it-ads > .m-skel--card { --h: 205px; }
@media (max-width: 1199px) { .it-ads > .m-skel--card { --h: 269px; } }
@media (max-width: 699px) { .it-ads > .m-skel--card { --h: 480px; } }
/* ================================================================ What do you want to do? Three of Duolingo's choice cards (ui.css
   .u-tile.u-choice: the swan edge with its 2px lip, the picked one blue-jay on iguana, whale words), three across, each
   its art, a title over one line, the traders' faces at its end; one column where the page is narrow. The picked one's
   part under them; "See all" and Post a trade with it one quiet line under a list */
.it-do__opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.it-do__opt.u-choice { height: auto; min-height: 80px; padding: 14px 16px; }
.it-do__words { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.it-do__line { margin-top: 2px; color: var(--color-label); font: 400 15px/20px var(--font); }
.it-do__opt.is-picked .it-do__line { color: var(--color-whale); }
/* the faces overlap, a ring of the card's own face between them */
.it-do__faces { display: flex; flex: none; --ring: var(--color-snow); }
.it-do__faces > .u-avatar + .u-avatar { margin-left: -8px; }
.it-do__faces .u-avatar__img { box-shadow: 0 0 0 2px var(--ring); }
@media (hover: hover) { .it-do__opt:hover:not(.is-picked) .it-do__faces { --ring: var(--color-polar); } }
.it-do__opt.is-picked .it-do__faces { --ring: var(--color-iguana); }
.it-skelopt { height: 80px; border-radius: 16px; }
.it-panes { margin-top: 24px; }
.it-pane[hidden] { display: none; }
/* none in a list: no list (the card says so), what follows comes up to the cards */
.it-ads:empty { display: none; }
.it-ads:empty ~ :is(.it-fold--line, .it-pane__post) { margin-top: 0; }
.it-paneline { margin: 16px 0 0; font: 400 17px/24px var(--font); }
.it-paneline[hidden] { display: none; }
.it-pane__post { margin-top: 24px; }
/* Check a trade, right here: calculator.css's parts, without its page header */
.it-ck .ck-out { margin-top: 32px; }
.it-want { position: relative; display: inline-flex; align-items: center; gap: 2px; color: var(--color-link); font-weight: 700; text-decoration: none; border-radius: 4px; }
.it-want::after { content: ""; position: absolute; inset: -12px -4px; }   /* a 44px tap round the words; inline, nothing moves */
@media (hover: hover) { .it-want:hover { text-decoration: underline; text-underline-offset: 3px; } }
.it-want:focus-visible { outline: 2px solid var(--color-macaw); outline-offset: 2px; }
.it-more { display: flex; justify-content: center; padding: 16px 0 0; }
.it-more[hidden] { display: none; }

/* Similar value: one row of Shop tiles (up to 8: an eighth of the row each, never under 112px; fewer stay that size,
   left-aligned to the heading), the name and value under each as plain words. The padding keeps the focus ring
   inside the scroller; the negative margin keeps the tiles on the heading's edge */
.it-sims {
  display: grid; grid-auto-flow: column; grid-auto-columns: max(112px, calc((100% - 7 * 16px) / 8)); gap: 16px; justify-content: start;
  margin: -5px; padding: 5px 5px 7px; overflow-x: auto; scrollbar-width: none;
}
.it-sims::-webkit-scrollbar { display: none; }
.it-sims > .u-item { min-width: 0; }
/* a placeholder tile as tall as a tile with a one-line name: the bars sit in the name's and the value's 18px lines */
.it-sim.is-skel { display: flex; flex-direction: column; padding-bottom: 2px; }
.it-sim.is-skel > .m-skel--text { margin-top: 10px; }
.it-sim.is-skel > .m-skel--text + .m-skel--text { margin-top: 6px; }
.it-sim__pic { width: 100%; height: auto; aspect-ratio: 1; border-radius: 16px; }   /* a square, like the tile (m-skel sets 16px) */

/* ================================================================ folded at the bottom: How to get it, Trade web */
.it-fold { border-bottom: 2px solid var(--color-swan); }
.it-sec + .it-fold, .it-top + .it-fold { margin-top: 48px; border-top: 2px solid var(--color-swan); }
.it-fold__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; cursor: pointer; list-style: none; border-radius: 8px; }
.it-fold__head::-webkit-details-marker { display: none; }
.it-fold__head > svg { flex-shrink: 0; color: var(--color-hare); transition: rotate var(--m-fast) var(--m-ease-out); }
.it-fold[open] > .it-fold__head > svg { rotate: 180deg; }
@media (hover: hover) { .it-fold__head:hover .it-sec__title { color: var(--color-link); } }
.it-fold__head:focus-visible { outline: 2px solid var(--color-macaw); outline-offset: 2px; }
.it-fold__body { padding: 0 0 24px; }
.it-fold--line { margin-top: 24px; border: 0; }
.it-fold--line > .it-fold__head { justify-content: flex-start; gap: 4px; min-height: 44px; }
.it-fold--line > .it-fold__head .it-sec__title { color: var(--color-link); font: 700 17px/24px var(--font); }
.it-fold--line > .it-fold__head > svg { color: var(--color-link); }
.it-fold--line > .it-fold__body { padding: 12px 0 0; }
/* /web opens on the trade web: its room kept blank while it comes (the grey card only after 300 ms: item.js later()) */
.it-fold[data-land] [data-web] > .it-fold__wait { height: 240px; }
.it-fold__sub { margin: 0 0 16px; color: var(--color-wolf); font: 400 17px/24px var(--font); }
/* one line and maybe one button (nothing to show, or sign in) */
.it-ask { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; }
.it-ask p { flex: 1 1 280px; margin: 0; color: var(--color-wolf); font: 400 17px/24px var(--font); }
.it-ask .u-btn { --h: 44px; }

/* ================================================================ How to get it: each way is a card of numbered steps */
.it-ways { display: flex; flex-direction: column; gap: 16px; }
.it-way { padding: 18px 18px 8px; }
.it-way__head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.it-way__label { color: var(--color-eel); font: 700 19px/28px var(--font); }
.it-way__n { color: var(--color-label); font: 700 15px/20px var(--font); text-transform: uppercase; letter-spacing: .8px; }
.it-steps { list-style: none; margin: 0; padding: 0; }
.it-step { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; column-gap: 16px; row-gap: 12px; padding: 14px 0; }
.it-step + .it-step { border-top: 2px solid var(--color-swan); }
.it-step__n { align-self: start; }   /* the one step circle (pop.css) */
.it-step__main { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.it-step__who { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--color-wolf); font: 400 17px/22px var(--font); }
.it-step__who a { color: var(--color-eel); font-weight: 700; text-decoration: none; }
@media (hover: hover) { .it-step__who a:hover { color: var(--color-link); } }
/* two rows, like the ad card's halves: YOU GIVE [items] total / YOU GET [items] total */
.it-step__swap { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 6px 12px; }
.it-step__k { color: var(--color-label); font: 700 13px/16px var(--font); text-transform: uppercase; letter-spacing: .8px; white-space: nowrap; }
.it-step__items { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.it-step__item { display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 2px 10px 2px 2px; border-radius: 12px; color: var(--color-eel); font: 700 15px/20px var(--font); text-decoration: none; }
@media (hover: hover) { .it-step__item:hover { background: var(--color-polar); } }
.it-step__item.is-hit { color: var(--color-link); }
.it-step__total { color: var(--color-wolf); font-size: 15px; white-space: nowrap; }
.it-step__total .u-val { color: var(--color-eel); }
.it-step__go { align-self: center; }

/* ================================================================ the trade web: Get it with -> the item -> Trade it for */
.it-web { position: relative; overflow: hidden; }
.it-web__lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.it-web__lines path { fill: none; stroke: var(--color-swan); stroke-width: 3; stroke-linecap: round; }
.it-web__cols { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.it-web__col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.it-web__label { color: var(--color-label); font: 700 15px/20px var(--font); text-transform: uppercase; letter-spacing: .8px; }
/* stacked (a narrow column): the items in even columns, not a ragged wrap of one, one, two, one */
.it-web__nodes { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 8px; }
.it-web__none { margin: 0; color: var(--color-wolf); font: 400 17px/24px var(--font); }
.it-web__then { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; color: var(--color-wolf); font: 400 15px/20px var(--font); }
.it-web__then > span { margin-right: 4px; }
.it-web__then > a { display: flex; border-radius: 10px; }
.it-web__thenname { display: none; }   /* phones name them (no tooltip there) */
.it-web__then > a:focus-visible { outline: 2px solid var(--color-macaw); outline-offset: 2px; }
.it-web__mid { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.it-web__arrow { display: flex; color: var(--color-hare); transform: rotate(90deg); }
/* a node: the item's tier tile with its name and value beside it, no frame of its own (rule 15); a soft hover */
.it-node {
  display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 4px 12px 4px 4px; border-radius: 14px;
  background: var(--color-snow); color: var(--color-eel); text-decoration: none; position: relative;
}
@media (hover: hover) { a.it-node:hover { background: var(--color-polar); } }
a.it-node:focus-visible { outline: 2px solid var(--color-macaw); outline-offset: 2px; }
.it-node__text { display: flex; flex-direction: column; min-width: 0; }
.it-node__name { font: 700 15px/20px var(--font); overflow-wrap: normal; }   /* whole words: item.js stacks the web when they don't fit */
.it-node__text .u-val { color: var(--color-wolf); font-size: 15px; font-weight: 400; }
.it-node--centre { flex-direction: column; gap: 6px; padding: 10px 14px; text-align: center; }
.it-node--centre .it-node__text { align-items: center; }
.it-node--centre .it-node__name { font-size: 17px; }
/* a wide card: three columns joined by the curved lines */
.it-web.is-wide .it-web__cols { display: grid; grid-template-columns: minmax(min-content, 1fr) auto minmax(min-content, 1fr); column-gap: 40px; align-items: center; }
.it-web.is-wide .it-node--centre { max-width: 160px; }
.it-web.is-wide .it-web__arrow { display: none; }
.it-web.is-wide .it-web__nodes { display: flex; flex-direction: column; flex-wrap: nowrap; }
/* the lines leave from beside each item's words: an item as wide as the column hid them under its background */
.it-web.is-wide .it-web__col--from .it-web__nodes { align-items: flex-start; }
.it-web.is-wide .it-web__col--to { align-items: stretch; }
.it-web.is-wide .it-web__mid { align-self: center; }

/* ================================================================ "Alert me when…" popover: the shared form (alertform.css) inside */
.it-alertpop .u-pop__box { width: min(340px, calc(100vw / var(--zoom, 1) - 32px)); padding: 16px; }
.it-alert { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.it-alert__title { color: var(--color-eel); font: 700 19px/24px var(--font); overflow-wrap: break-word; }
.it-alert__err { margin: 0; color: var(--color-fire-ant); font: 700 15px/20px var(--font); }
/* alerts can't reach you: one plain line and its link (the popover is the one box: no yellow notice inside it) */
.it-alert__reach { margin: 0; color: var(--color-wolf); font: 400 15px/20px var(--font); }
.it-alert__reach a { position: relative; color: var(--color-link); font-weight: 700; text-decoration: none; border-radius: 4px; }
.it-alert__reach a::after { content: ""; position: absolute; inset: -12px -4px; }   /* a 44px tap round the words */
@media (hover: hover) { .it-alert__reach a:hover { text-decoration: underline; text-underline-offset: 3px; } }
.it-alert__reach a:focus-visible { outline: 2px solid var(--color-macaw); outline-offset: 2px; }
/* Turn alerts off: quiet words under Done (destructive actions are quiet, UX.md rule 5), red only under the pointer */
.it-alert__off {
  align-self: center; min-height: 44px; margin-top: -8px; padding: 0 12px; border: 0; border-radius: 12px; background: none;
  color: var(--color-label); font: 700 15px/20px var(--font); cursor: pointer;
}
@media (hover: hover) { .it-alert__off:hover { color: var(--color-cardinal); } }
.it-alert__off:focus-visible { outline: 2px solid var(--color-macaw); outline-offset: -2px; }
/* phones: the settings are taller than the room under the bell (they ran off the bottom of the screen), so they sit on
   the bottom of the screen above the tabs, as wide as the page (no arrow), scrolling inside a short screen. The
   !important beats the left/top the popover writes on itself. Typing a price, they stay in what the keyboard leaves
   visible (app/viewport.js). */
@media (max-width: 599px) {
  .it-alertpop { left: 12px !important; right: 12px; top: auto !important; bottom: calc(var(--f-tabs-h) + 12px); }
  .it-alertpop .u-pop__arrow { display: none; }
  .it-alertpop .u-pop__box {
    width: auto; max-height: calc(100dvh / var(--zoom, 1) - var(--f-top-h) - var(--f-tabs-h) - 24px); overflow-y: auto; overscroll-behavior: contain;
  }
  html.kb .it-alertpop { top: calc(var(--vv-top, 0px) + 12px) !important; bottom: auto; }
  html.kb .it-alertpop .u-pop__box { max-height: calc(var(--vv-h, calc(100dvh / var(--zoom, 1))) - 24px); }
}

/* ================================================================ phones and tablets (< 1024px, one column): the item, the panel
   under it, What do you want to do? and its part, then the chart: the job is trades. The top's two wrappers step aside
   so their parts line up with the sections (/web: the trade web right under the panel) */
@media (max-width: 1023px) {
  .it { display: flex; flex-direction: column; }
  .it-top, .it-top > .pg-main { display: contents; }
  .it-hero { order: -4; }
  .it-aside { order: -3; width: auto; margin-top: 24px; }
  .it--web #web { order: -2; }
  .it-do { order: -1; }
  /* the chart comes first in the markup but shows below: never the browser's scroll anchor, which kept the chart in
     place as the trade web above it filled in and pushed /web past its own heading */
  .it-chartbox { overflow-anchor: none; margin-top: 48px; }
  /* the prices side by side over the buttons */
  .it-prices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
}

/* ================================================================ a narrow column (tablets beside nothing, phones) */
@container it (max-width: 759px) {
  .it-do__opts { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}
@container it (max-width: 540px) {
  .it-hero { gap: 16px; }
  /* The item beside its tile (no 3D stage) leaves the words little room: the facts go under both, across the hero (two
     by two beside the tile, "#1 of 13,175" ran past a 360px phone's edge), and a long name (is-long, item-markup.js
     mainClass) over them all, across the hero, the bell by the kind line, the tile and the value side by side under
     it. The words' box steps aside (display: contents) so its parts take their places in the hero's grid; the empty
     rows round them centre the short name's words on the tile */
  .it-hero:not(.it-hero--3d) {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: 1fr auto auto auto 1fr auto;
    grid-template-areas: "tile . ." "tile kind bell" "tile name bell" "tile value value" "tile . ." "facts facts facts";
    gap: 0 16px;
  }
  .it-hero:not(.it-hero--3d) > .it-hero__main { display: contents; }
  .it-hero:not(.it-hero--3d) > .it-hero__tile { grid-area: tile; align-self: center; }
  .it-hero:not(.it-hero--3d) .it-kind { grid-area: kind; }
  .it-hero:not(.it-hero--3d) .it-name { grid-area: name; }
  .it-hero:not(.it-hero--3d) :is(.it-bell, .it-skelbell) { grid-area: bell; align-self: center; }
  .it-hero:not(.it-hero--3d) .it-value { grid-area: value; }
  .it-hero:not(.it-hero--3d) .it-facts { grid-area: facts; }
  .it-hero:not(.it-hero--3d):has(> .is-long) {
    grid-template-rows: none;
    grid-template-areas: "kind kind bell" "name name name" "tile value value" "facts facts facts";
  }
  .it-hero:not(.it-hero--3d):has(> .is-long) > .it-hero__tile { margin-top: 16px; }
  .it-hero:not(.it-hero--3d):has(> .is-long) .it-value { align-self: center; margin-top: 16px; }
  /* a long name under a 3D stage: the column's whole width, the bell by the kind line */
  .it-hero--3d > .it-hero__main.is-long > .it-name { grid-column: 1 / -1; }
  .it-hero--3d > .it-hero__main.is-long > :is(.it-bell, .it-skelbell) { grid-row: 1; }
  .it-chartbox { margin-top: 40px; }
  /* the change line on its own row, the six ranges under it across the column, equal (each one wider than its 44px tap) */
  .it-chart .u-chart__head { flex-wrap: wrap; gap: 12px; }
  .it-chart .u-chart__sum, .it-chart .u-seg { flex: 1 1 100%; }
  .it-chart .u-seg__opt { flex: 1 1 0; min-width: 0; padding: 0 4px; }
  .it-sec { margin-top: 40px; }
  .it-kind a { padding: 6px 0; }   /* a 32px tap round the words; inline, so nothing moves */
  .it-sec__all { position: relative; }
  .it-sec__all::after { content: ""; position: absolute; inset: -12px -8px; }   /* a 44px tap round "See all" */
  .it-sims { grid-auto-columns: 112px; gap: 12px; }   /* the desktop's tile; a part of the next one shows: there are more to swipe to */
  .it-step { grid-template-columns: 36px minmax(0, 1fr); column-gap: 12px; }
  .it-step__go { grid-column: 2; justify-self: stretch; }
}

/* ================================================================ phones (never smaller than a desktop)
   The item is the point of the page: its picture keeps the desktop's 120px (96 on the narrowest phones), its name and
   value their desktop sizes. The chart's ranges 44px tall; Find trades and Post a trade across the page; the trade
   web's items bigger, each named */
@media (max-width: 699px) {
  .it-sim.is-skel > .m-skel--text + .m-skel--text { margin-top: 5px; }   /* a phone's tile names are 17px lines (ui.css) */
  .it-chart .u-seg__opt { height: 44px; }
  .it-chart .u-seg__opt:active:not(.is-active) { height: 42px; }
  /* border-box said again: inside a fold (<details>) everything is content-box (it inherits from the fold's own inner
     part, which the site's border-box rule never reaches), so How to get it's Sign in ran 36px past a phone's edge */
  .it-ask .u-btn, .it-more .u-btn { width: 100%; box-sizing: border-box; }
  /* the trade web, stacked: each item's picture 56px with its name and value beside it; the ones further away ("Before
     that", "Then for") the same, named (a phone has no tooltip to say what a bare picture is) */
  .it-node { gap: 12px; min-height: 64px; }
  .it-node .u-pic { --s: 56px !important; }
  .it-node--centre .u-pic { --s: 120px !important; }
  .it-web__then { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-top: 8px; }
  .it-web__then > span { grid-column: 1 / -1; margin: 0; }
  .it-web__then > a { align-items: center; gap: 12px; min-height: 64px; padding: 4px 12px 4px 4px; border-radius: 14px; color: var(--color-eel); text-decoration: none; }
  .it-web__then > a .u-pic { --s: 56px !important; }
  .it-web__thenname { display: block; min-width: 0; font: 700 15px/20px var(--font); }
}
@media (max-width: 359px) {
  .it-hero__tile .u-pic { --s: 96px !important; }   /* UI.pic writes 120 on the element */
}
