/* css/otter/topics.css (3 November 2026, marigold otter, Phase 1: design-research/marigold-otter/SPEC.md). Linked LAST in index.html: it sits over css/r13/* and css/ux/*, whose selectors are long, so every rule here is written one step heavier than the rule it meets.
   WHAT IT DOES, on the four map levels only (century, city, market, area):
     1 · the topic row: #sdock is one capsule of labelled chips in the top row (js/app.js renderRow), right of the autoplay capsule and left of the tally; the current chip is filled, a topic already opened wears a quiet dot;
         the row rests dimmed (.6) while the interface is idle instead of hiding, and a tap on it works the first time (js/app.js overFadedControl lets a visible control through);
     2 · room for it: Back is its chevron alone (the aria-label keeps the destination), the autoplay capsule is Play alone (no ring, no 01/06);
     3 · the one-line explanation (#place .pl-f) shows again, the "Map width" readout (.tv-dist) goes.
   The Site keeps its pill and dropdown (#sdock without .ot) and every later level is untouched: nothing here matches them.
   Tokens are R13's (css/r13/tokens.css: --q-ctl, --ty-callout, --s*, --ui-scale, --r-capsule) and the glass roles (--lg-*); no custom property is written on <body>, no [style*=], no :has(). */

/* ---------- 1 · the topic row ---------- */
html.r13 body #ui > #sdock.ot { margin: 0; }
html.r13 body #ui > #sdock.ot .ot-cap { display: block; width: max-content; max-width: 100%; height: var(--q-ctl); border-radius: var(--r-capsule);
  background-color: var(--lg-tint); background-image: none; color: var(--lg-fg); box-shadow: var(--lg-hi), var(--lg-shade), var(--lg-shadow-s); }   /* the same skin as Back, the autoplay capsule and the tally (css/ux/glass.css §1) */
html.r13 body #ui > #sdock.ot .ot-row { position: relative; display: flex; align-items: center; gap: calc(var(--s1) * var(--ui-scale)); width: 100%; height: 100%; padding: 0 calc(var(--s2) * var(--ui-scale)); box-sizing: border-box;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior: contain; scroll-padding-inline: calc(var(--s6) * var(--ui-scale)); }
html.r13 body #ui > #sdock.ot .ot-row::-webkit-scrollbar { display: none; }
/* a row wider than its room scrolls sideways under the same soft edge as the other strips; the edge that has more fades (js/app.js markOverflow sets .more-l / .more-r) */
html.r13 body #ui > #sdock.ot .ot-row.more-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 2.2rem), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 2.2rem), transparent); }
html.r13 body #ui > #sdock.ot .ot-row.more-l { -webkit-mask-image: linear-gradient(90deg, transparent, #000 2.2rem); mask-image: linear-gradient(90deg, transparent, #000 2.2rem); }
html.r13 body #ui > #sdock.ot .ot-row.more-l.more-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 2.2rem, #000 calc(100% - 2.2rem), transparent); mask-image: linear-gradient(90deg, transparent, #000 2.2rem, #000 calc(100% - 2.2rem), transparent); }
html.r13 body #ui > #sdock.ot .ot-chip { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; height: var(--q-ctl); padding: 0 calc(var(--s3) * var(--ui-scale)); border: 0; border-radius: var(--r-capsule);
  background: none; box-shadow: none; color: var(--lg-fg3); font: var(--ty-callout); letter-spacing: var(--tr-callout); white-space: nowrap; cursor: pointer; -webkit-tap-highlight-color: transparent; }
/* the chip is the full 44px of the capsule (the touch target); what is seen is a 36px pill inside it, drawn by ::before so the press scales both */
html.r13 body #ui > #sdock.ot .ot-chip::before { content: ""; position: absolute; inset: calc(4px * var(--ui-scale)) 0; border-radius: var(--r-capsule); background: transparent; transition: background-color 220ms var(--mc-ease-fade, ease-out); }
html.r13 body #ui > #sdock.ot .ot-chip > span { position: relative; }
html.r13 body #ui > #sdock.ot .ot-chip:hover { color: var(--lg-fg); }
html.r13 body #ui > #sdock.ot .ot-chip.on { color: var(--lg-sel-fg); font-weight: 600; cursor: default; }
html.r13 body #ui > #sdock.ot .ot-chip.on::before { background-color: var(--lg-sel); box-shadow: var(--lg-sel-sh); }
html.r13 body.glass-day:is([data-level=century], [data-level=city], [data-level=market], [data-level=area]) #ui > #sdock.ot .ot-chip.on::before { background-color: #fff; box-shadow: var(--mf-sh-thumb); }   /* the Day map's chosen chip; (15 November, v1) the white thumb with its soft shadow, as the other tools' segmented controls (--lg-sel-sh in Day glass, css/tokens.css): the dark 1.5px ring of the old picker's rows is gone */
/* the covered mark: a small quiet dot at the chip's right, in the padding, so the label never moves when it appears */
html.r13 body #ui > #sdock.ot .ot-dot { position: absolute; right: calc(4px * var(--ui-scale)); top: 50%; width: calc(4px * var(--ui-scale)); height: calc(4px * var(--ui-scale)); margin-top: calc(-2px * var(--ui-scale)); border-radius: 50%; background: currentColor; opacity: 0; pointer-events: none; transition: opacity 220ms var(--mc-ease-fade, ease-out); }
html.r13 body #ui > #sdock.ot .ot-chip.seen .ot-dot { opacity: .55; }
html.r13 body #ui > #sdock.ot .ot-chip:focus-visible::before { box-shadow: inset 0 0 0 2px var(--lg-fg); }
/* idle: the row stays on screen, dimmed (css/ux/map.css:412 hides #sdock under body.clean with an important opacity, and showroom.css:96 hides every #ui child). A faded control swallows the tap that wakes it (js/app.js overFadedControl),
   so the row must not be "hidden": it is visible and takes the tap at once. Everything that hides it for a reason keeps doing so: Present (.cine), the open action ring, a map move (.navmove), a hand-over (.swapping) and the presentation bar (#sdock.ot-mb) */
html.r13 body.clean:not(.cine):not(.ring-open):not(.navmove):not(.swapping):not(.at-attract) #ui > #sdock.ot:not(.ot-mb) {   /* (4 November, otter, review fixes, B-M7) not under the attract screen: the row was visible and focusable behind it */ opacity: .6 !important; visibility: visible !important; pointer-events: auto !important; transition: opacity 480ms var(--mc-ease-fade, ease-out); }
html.r13 body.cine #ui > #sdock.ot, html.r13 body.ring-open #ui > #sdock.ot, html.r13 body #ui > #sdock.ot.ot-mb { opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; }
@media (prefers-reduced-transparency: reduce) { html.r13 body #ui > #sdock.ot .ot-cap { background-color: var(--lg-solid) !important; } }   /* as css/ux/apple.css gives every other capsule */
@media (prefers-contrast: more) { html.r13 body #ui > #sdock.ot .ot-chip { color: var(--lg-fg); } html.r13 body #ui > #sdock.ot .ot-chip.on::before { box-shadow: inset 0 0 0 1.5px currentColor; } }
@media (prefers-reduced-motion: reduce) { html.r13 body #ui > #sdock.ot .ot-dot, html.r13 body #ui > #sdock.ot .ot-chip::before, html.r13 body.clean:not(.cine) #ui > #sdock.ot { transition: none; } }

/* ---------- 2 · room for it ---------- */
/* Back is its chevron alone: a 44px capsule; the label stays in the DOM (visually hidden), the aria-label names the destination */
html.r13 body:is([data-level=century], [data-level=city], [data-level=market], [data-level=area]) #ui > #back { width: var(--q-ctl); min-width: var(--q-ctl); padding: 0; justify-content: center; gap: 0; }
html.r13 body:is([data-level=century], [data-level=city], [data-level=market], [data-level=area]) #ui > #back > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* the autoplay capsule is Play alone (js/app.js renderChapters leaves the ring and the count out on these levels): the Play button takes the capsule's own fill */
html.r13 body #ui > #chap.ot-play .rail-pill { padding: 0; gap: 0; }
html.r13 body #ui > #chap.ot-play .chap-play { background-color: transparent; background-image: none; box-shadow: none; padding: 0 calc(var(--s5) * var(--ui-scale)) 0 calc(var(--s4) * var(--ui-scale)); }

/* ---------- 3 · the one-line explanation ---------- */
/* showroom.css:844 hid #place .pl-f on every screen 820px high or less (the 1280x800 tablet); the first three levels' one-liner is shown again, a calm line under the title */
html.r13 body:is([data-level=century], [data-level=city], [data-level=market], [data-level=area]) #ui > #place .pl-f { display: block; max-width: min(24rem, 40vw); margin-top: calc(6px * var(--ui-scale)); }
html.r13.tv body:is([data-level=century], [data-level=city], [data-level=market], [data-level=area]) #ui > #place .pl-f { max-width: min(34rem, 40vw); }
/* the "Map width" readout (css/ux/motion-tv.css) is gone from these levels; it was never shown on the Site or later */
html.r13 body:is([data-level=century], [data-level=city], [data-level=market], [data-level=area]) #ui > #place .tv-dist { display: none; }
