/* DAC badges: the mark button, the card and the written-out blocks (contoureq.app).
   Markup: android/tools/site/devices/badges.py. Behaviour: dac-badges.js; the chrome marks are drawn by dac-marks.js (load it before dac-badges.js).
   Two looks, chosen by a class:
   - the site look (default): the page's own tokens (--surface, --text, --accent, --bg, --sunken, --lift-hero, --r-card);
   - the home look: add class "dacb-home" to the container of the tiles (flat, orange ground, black card).
   Every place gives a mark only its size (--ms); the page-specific layout (where the button sits) is in the page's own CSS. */

.spr{position:absolute;width:0;height:0;overflow:hidden}

/* the marks: `full` is the flat seal (shape = currentColor, tick = var(--cut), the colour under it); the others are chrome pictures
   (.dmk) with 12 % of overhang; dac-marks.js puts a canvas with live light over the picture (.live hides the picture under it) */
.m{display:block;flex:none;width:var(--ms,24px);height:var(--ms,24px);fill:currentColor}
.dmk{position:relative;display:inline-block;flex:none;width:var(--ms,30px);height:var(--ms,30px);-webkit-tap-highlight-color:transparent;transition:transform .35s cubic-bezier(.2,1.7,.4,1)}
.dmk img,.dmk-c{position:absolute;left:-6%;top:-6%;width:112%;height:112%;max-width:none;pointer-events:none}
.dmk.live img{visibility:hidden}
.mkb:is(:hover,:focus-visible,[aria-expanded=true]) .dmk{transform:scale(1.18)}
.mcard .dmk,.dacb-here .dmk{cursor:pointer}
@media (prefers-reduced-motion:reduce){.dmk{transition:none}.mkb:is(:hover,:focus-visible,[aria-expanded=true]) .dmk{transform:none}}

.mkb{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:var(--mg,4px);height:32px;min-width:32px;padding:0 4px;margin:0;border:0;border-radius:8px;background:none;color:inherit;font:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
@media (pointer:coarse){.mkb::before{content:"";position:absolute;inset:-6px}}
.mkb:focus-visible{outline:3px solid var(--accent,currentColor);outline-offset:2px}
.dacb-home .mkb:focus-visible{outline-color:currentColor}

/* the card: static HTML per device in the page source, shown in the top layer (Popover API), unfolds from the mark; it does not clip the marks */
.mcard{position:fixed;inset:auto;margin:0;padding:24px 24px 26px;width:min(404px,calc(100vw - 24px));max-height:calc(100vh - 24px);overflow:visible;box-sizing:border-box;border:0;border-radius:var(--r-card,20px);
  font-family:var(--font);font-size:15px;font-weight:400;line-height:1.4;letter-spacing:normal;text-align:left;white-space:normal;text-transform:none;
  background:var(--surface);color:var(--text-dim);box-shadow:var(--lift-hero);
  opacity:0;transform:scale(.9);
  transition:opacity .18s cubic-bezier(.16,1,.3,1),transform .18s cubic-bezier(.16,1,.3,1),overlay .18s allow-discrete,display .18s allow-discrete}
.mcard:popover-open{opacity:1;transform:none}
@starting-style{.mcard:popover-open{opacity:0;transform:scale(.9)}}
@media (prefers-reduced-motion:reduce){.mcard{transition:none}}
@supports not selector(:popover-open){.mcard{display:none}}
.dacb-home .mcard{border-radius:8px;font-size:16px;font-weight:500;line-height:1.35;background:#000;color:var(--o,#F07A3A);box-shadow:none;outline:2px solid #3a3531}

/* the blocks: the same in the card and written out on a device page; the mark column is as wide as the chrome mark, the seal is centred in it */
.dacb-here{color:var(--text-dim);font-size:15px;line-height:1.4}
:is(.mcard,.dacb-here) .mc-b{display:flex;align-items:flex-start;gap:14px}
.mcard .mc-b + .mc-b{margin-top:26px}
.dacb-home .mcard .mc-b + .mc-b{margin-top:28px}
:is(.mcard,.dacb-here) .mc-t{min-width:0;flex:1}
:is(.mcard,.dacb-here) .mc-t p{margin:0}
:is(.mcard,.dacb-here) .mc-t .mc-l{font-size:12px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;line-height:1.3;margin-bottom:4px}
:is(.mcard,.dacb-here) .mc-n{display:block;color:var(--text);font-size:25px;font-weight:700;line-height:1.12;letter-spacing:-.02em;white-space:nowrap}
:is(.mcard,.dacb-here) .mc-n a{color:inherit;text-decoration:none;overflow-wrap:normal}
:is(.mcard,.dacb-here) .mc-n a:hover,:is(.mcard,.dacb-here) .mc-n a:focus-visible{text-decoration:underline;text-decoration-color:var(--accent);text-decoration-thickness:2px;text-underline-offset:4px}
:is(.mcard,.dacb-here) .mc-t .mc-s{font-size:14.5px;line-height:1.45;margin-top:8px}
:lang(zh) :is(.mcard,.dacb-here) .mc-t .mc-l{letter-spacing:0;font-size:13px}
.mcard a:focus-visible,.dacb-here a:focus-visible{outline:3px solid var(--accent,currentColor);outline-offset:3px;border-radius:2px}
.dacb-home .mcard .mc-t .mc-l{font-size:13px;letter-spacing:normal;text-transform:none;line-height:1.2;margin-bottom:3px}
.dacb-home .mcard .mc-n{color:#fff;font-size:28px;line-height:1.1;letter-spacing:-.015em;-webkit-text-stroke:.014em currentColor}
.dacb-home .mcard .mc-t .mc-s{font-size:14px;font-weight:500;line-height:1.4;margin-top:9px}
.dacb-home .mcard a:focus-visible{outline-color:currentColor}
.mcard .dmk.mc-m{--ms:88px}
.mcard .m.mc-m{--ms:62px;margin:13px 13px 0;color:var(--text);--cut:var(--surface)}
.dacb-here .dmk.mc-m{--ms:96px}
.dacb-here .m.mc-m{--ms:68px;margin:14px 14px 0;color:var(--text);--cut:var(--bg)}
.dacb-home .mcard .m.mc-m{color:#fff;--cut:#000}

/* the seal (`full`) where it sits next to the chrome marks: its size, its colour and the colour under it */
.dacb-home .mkb .m-full{color:#000;--cut:var(--tile)}
.dv .dv-row .mkb .m-full{--ms:24px;margin:0 3px;color:var(--text);--cut:var(--sunken)}
.dv .dv-row:hover .mkb .m-full,.dv .dv-row:focus-within .mkb .m-full{--cut:var(--surface)}
.dv .dv-dev .mkb .m-full,.dacb-list .mkb .m-full{--ms:22px;margin:0 2px;color:var(--text);--cut:var(--surface)}
.dacb-list .mkb .m-full{--cut:var(--bg)}
