/* css/otter/cards.css (4 November 2026, marigold otter, Phase 2: design-research/marigold-otter/SPEC.md 2.1 to 2.4). Linked LAST in index.html, after topics.css.
   WHAT IT DOES, on the four map levels' right-hand card (#lv-map .info) and the bottom strip (#ctx):
     1 · "More": a card shows one headline number, at most three fact rows and one "why it matters" line; everything else is folded under one quiet button (js/plus/mm.js anatomy, `more:`),
         which expands the card in place (js/levels.js moreToggle). Folded blocks are direct children of the card with .ot-fold, so every card rule that reads `.info.mm > ...` keeps working on them;
         they are display: none until the card has .ot-open. The card's own open state is cleared by the next card (js/levels.js card()).
     2 · the strip's "+N more" chip (the Area lists show the nearest places first and keep the rest one tap away).
   Tokens are R13's (css/r13/tokens.css: --q-chip, --q-ctl, --ty-callout, --s*, --ui-scale, --r-capsule, --hairline, --fg); no custom property on <body>, no [style*=], no :has(), no attribute selector on an ancestor. */

/* ---------- 1 · More ---------- */
html.r13 body #lv-map .info:not(.ot-open) > .ot-fold { display: none !important; }   /* !important: the card's own `.info.mm > .mm-kpis.n3 { display: grid }` rules are heavier than any class chain written here */
html.r13 body #lv-map .info :is(.info-ghost, .mm-ghost) .ot-fold, html.r13 body #lv-map .info :is(.info-ghost, .mm-ghost) .ot-more-b { display: none !important; }   /* a card leaving as a copy shows what the guest was reading, never the folded part */
/* the foot row: the More button, and the card's disclaimer line beside it */
html.r13 body #lv-map .info > .ot-foot { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
html.r13 body #lv-map .info > .ot-foot > .mm-src { flex: 1 1 0; min-width: 0; margin: 0; }
html.r13 body #lv-map .info .ot-more-b { position: relative; flex: none; display: inline-flex; align-items: center; gap: var(--s2); min-height: var(--q-chip); margin: 0; padding: 0 var(--s3) 0 var(--s4);
  border: 0; border-radius: var(--r-capsule); background: none; box-shadow: inset 0 0 0 1px var(--hairline); color: var(--fg); font: var(--ty-callout); letter-spacing: var(--tr-callout); cursor: pointer; -webkit-tap-highlight-color: transparent; }
html.r13 body #lv-map .info .ot-more-b::after { content: ""; position: absolute; inset: calc(-6px * var(--ui-scale)) calc(-8px * var(--ui-scale)); }   /* a 44px hit box around the 32px capsule, as the Full table button has */
html.r13 body #lv-map .info .ot-more-b svg { width: calc(16px * var(--ui-scale)); height: calc(16px * var(--ui-scale)); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 240ms var(--mc-ease-fade, ease-out); }
html.r13 body #lv-map .info.ot-open .ot-more-b svg { transform: rotate(180deg); }
html.r13 body #lv-map .info .ot-more-b:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
@media (prefers-contrast: more) { html.r13 body #lv-map .info .ot-more-b { box-shadow: inset 0 0 0 1.5px currentColor; } }
@media (prefers-reduced-motion: reduce) { html.r13 body #lv-map .info .ot-more-b svg { transition: none; } }

/* ---------- 2 · (the strip's "+N more" chip is gone: review fixes, A-S7, replaced by the "N more ›" control, css/otter/review.css) ---------- */

/* ---------- 3 · the 2, 5, 10 km rings toggle in the Map filters panel (js/levels.js syncFilters, rings()) ---------- */
/* it is a switch, not a category: no colour dot, and when the rings are on it is filled whatever the category toggles do (the panel's own .on rule only fills a toggle while the row is partly filtered) */
html.r13 body .gm-flt .gf-row .gf-x::before { display: none; }
html.r13 body .gm-flt .gf-row .gf-x.on { opacity: 1; background-color: rgba(255, 255, 255, .20); background-image: none; color: var(--lg-fg); box-shadow: none; }
html.r13 body.glass-day .gm-flt .gf-row .gf-x.on { background-color: #fff; color: #16161b; box-shadow: var(--mf-sh-thumb); }

/* ---------- 4 · the ring sizes in the radius card ---------- */
html.r13 body #lv-map .info .pl-peak.ot-rings { padding-top: var(--s2); }

/* ---------- 5 · an open card never reaches the next button or the knob ---------- */
/* js/levels.js moreToggle writes --ot-room (px) on the card when it opens: its top down to 10px above the highest of #cta and the sun dial under it. The open card is capped there (the TV cap
   in css/r13/cards.css, and the other sizes' orb-zone one, stop short of what they read: at 1366x1024 and on the TV the sun dial sits higher than they allow) and scrolls inside itself beyond it */
@media (orientation: landscape) {
  html.r13 body:is([data-level=century], [data-level=city], [data-level=market], [data-level=area]) #lv-map .info.ot-open { max-height: min(calc(100dvh - var(--title-top) - var(--orb-zone) * 1.8), var(--ot-room, 100dvh)); }
}

/* ---------- 6 · Nearby projects: the Full table button rides the figure's row (it had a row of its own under the unit: 40px) ---------- */
html.r13 body #lv-map .info.mm > .mm-fig[data-cmp-row] { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
html.r13 body #lv-map .info.mm > .mm-fig[data-cmp-row] > b { grid-column: 1; grid-row: 1; }
html.r13 body #lv-map .info.mm > .mm-fig[data-cmp-row] > span { grid-column: 1 / -1; grid-row: 2; }
html.r13 body #lv-map .info.mm > .mm-fig[data-cmp-row] > .mm-tbl-b { grid-column: 2; grid-row: 1; justify-self: end; }

/* ---------- 7 · TV: the cards fit the room above the next button and the knob ---------- */
/* On the TV the room for a card is 163px (the title line) to about 750px: the sun dial sits at 760 and the capsule at 773 (Micro-market). The card's own scale was 1.4 (css/r13/cards.css), which left Prices
   at 727px and Nearby projects at 737px (cut off and under both), and Metro and Jobs reaching the dial. 1.25 with three trims that rem-based rules made too tall once the page is x1.7 (the sparkline,
   the comparison bars) brings every card to 590px or less at rest (the numbers are in log-P2.md). Type on the TV card is 1.25 / 1.4 = 89% of what it was; the page's own type (title, row, strip) is untouched. */
html.r13.tv body #lv-map .info { --ui-scale: 1.25; }
html.r13.tv body #lv-map .info .spark svg { height: calc(40px * var(--ui-scale)); }
html.r13.tv body #lv-map .info.mm .cb { min-height: calc(32px * var(--ui-scale)); }

/* ---------- 8 · the landmarks are named on the map in an Area list ---------- */
/* A landmark is a charcoal badge whose name opens only on hover, when chosen and for the guest's own office (css/ux/area.css 19, its .gm-lab is display: none !important). Nearby, the first screen of the Area, asks for the 16 landmarks named: while a list is on
   (#lv-map.ot-named, js/levels.js catLens) a badge that is not crowded into a dot, not open and not the guest's own shows its name beside it through the label engine (js/ux/labels.js: nearest first, as many as fit, none over another) */
html.r13 body #lv-map.ot-named .gm[data-k="lm"].lab:not(.cdot):not(.hov):not(.mine):not(.on) .gm-lab:not([data-lbl-hide]) { display: block !important; }   /* (4 November, otter, third pass, A2-N2) :not([data-lbl-hide]): the engine's own hide (css/ux/markers.css .lbl[data-lbl-hide]) was beaten by this !important, and a name it had cut (no room, over another, past the cap of 16) was printed over the one beside it at 1180x820 */

/* ---------- 9 · an open card that scrolls keeps its More / Less in reach ---------- */
/* The folded blocks open above the foot row, so the button that closed them moved off the bottom of a card taller than its room. While a card is open its foot row sticks to the bottom of the card's own scroll
   (an opaque band in the card's colour, a hairline above it), and the card's bottom fade (css/ux/map.css .ux-scroll.ux-more) steps aside so the foot is never half faded. A card that does not scroll is unchanged. */
html.r13 body #lv-map .info.ot-open > .ot-foot { position: sticky; bottom: calc(var(--s3) - 2.4rem); z-index: 2; padding: var(--s2) 0; margin: 0 0 calc(var(--s2) * -1); background: none; box-shadow: none; }   /* bottom: the card's own 2.4rem of bottom padding (.ux-scroll) is outside the sticky box: the foot ends 12px above the card's edge. (4 November, otter, review fixes, item 10) no band of its own: its backdrop is css/otter/review.css 4 */
html.r13 body #lv-map .info.ux-scroll.ot-open { -webkit-mask-image: none; mask-image: none; }
