/* Cut Grading Tool: layout. The whole tool sits on the always-black stage, like Brightness & Tilt:
   the tiles, the chart and the panel are designed for #000; only the disclaimer band follows the Black/White
   theme (the header and footer are the site's black chrome). Breakpoints 1100 and 700 (SPEC-UI §3). */

.wrap.page-hero.cg-hero{padding-top:28px;padding-bottom:26px}
.cg-hero .ver{margin-top:10px}

/* ---------- The bench ---------- */
.cg-bench{padding:8px 0 44px;overflow:visible}        /* .stage hides overflow; sticky needs it visible */
.cg-bench .wrap{min-width:0}

/* the four tiles: square drawing area, one-line caption */
.cg-tiles{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.cg-tiles li{margin:0;min-width:0}
.cg-tile{margin:0;background:#0A0C0E;border:1px solid rgba(255,255,255,.14);border-radius:var(--r-inner);overflow:hidden;display:flex;flex-direction:column}
.cg-view{position:relative;aspect-ratio:1;width:100%;min-width:0;overflow:hidden;background:#0A0C0E}
.cg-view>svg,.cg-view>img,.cg-view>canvas{display:block;width:100%;height:100%}
.cg-tile figcaption{padding:9px 12px 11px;border-top:1px solid rgba(255,255,255,.1);display:flex;flex-direction:column;gap:1px;background:#0A0C0E}
.cg-tile figcaption b{font-weight:600;font-size:.9375rem}
/* The captions are server-rendered with the default stone's text, so the first paint has their final height
   (no layout shift when the modules run); min-height holds one full line if a caption is ever empty. The light
   map's shares line reserves two lines, and so does its second line (the stone the map is traced on).
   The light map's two lines also share one grid cell with two invisible copies (.cg-caps-ghost, server-rendered,
   aria-hidden): the default stone's two lines, whose "T73 Round Brilliant as cut: pavilion 40.75°, lower half 77%"
   takes one or two lines more below 1100px than a moved stone's "Traced on the T73 with lower half 77%"; and the
   tallest caption a lattice stone shows short of a culet change (lightmap.js captionReserve: the widest shares
   line over "… with 53% table, star 50%, lower half 77%, girdle 2.5%", a reference stone's line). The caption is
   the tallest of the three stacks, so the tile row keeps one height from the default through every slider, every
   reference stone and any nudge from one: the chart and the panel do not move. Only the line naming all five T73
   values (table, star and girdle changed and a culet chosen) can still grow it, by one line (SPEC-UI §5). */
.cg-cap,.cg-cap-2,.cg-cap-g{font-size:.8125rem;color:#A3A3A3;font-variant-numeric:tabular-nums}
.cg-cap{min-height:1.5em}
#cg-map .cg-cap,#cg-map .cg-cap-2,#cg-map .cg-cap-g{min-height:3em}
.cg-caps{display:grid}
.cg-caps>*{grid-area:1/1;display:flex;flex-direction:column;gap:1px;min-width:0}
.cg-caps-ghost{visibility:hidden;pointer-events:none;user-select:none}
/* a part that could not be loaded says so where it would have been */
.cg-fail{margin:0;padding:16px 22px;color:#A3A3A3;font-size:.8125rem;line-height:1.4;text-align:center}
.cg-view>.cg-fail{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}
.cg-failed .cg-tiles,.cg-failed .cg-chart{display:none}
.cg-failed .cg-panel{max-width:520px}
.cg-failed .sg button[aria-checked="true"]{color:#fff}      /* no thumb was ever placed under it */
.cg-failed .cg-grade-sub{display:none}

/* chart (2fr) beside the panel (1fr, sticky) */
.cg-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:24px;align-items:start;margin-top:16px}
.cg-grid>*{min-width:0}
.cg-chart{margin:0}
/* the chart host is empty until its module draws: hold its measured height (660px from 700px up, where the
   44px cells cap; about 500 below) so the panel under it does not shift on load (CLS) */
.cg-chart:empty{min-height:660px}
@media (max-width:699.98px){.cg-chart:empty{min-height:500px}}
.cg-panel{position:sticky;top:16px}
/* taller than the screen (Breakdown or More proportions open): the panel scrolls inside itself, so the chart
   and the tiles its lower controls change stay in view */
.cg-panel{max-height:calc(100vh - 32px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.28) transparent}

/* the mobile bar: grade word and the three key values, sticky while the page scrolls (< 700px) */
.cg-mobilebar{display:none}
.cg-mobilebar>*{position:relative}

/* below the bench: follows the theme */
.cg-after{padding-top:22px;padding-bottom:72px}
.cg-disclaimer,.cg-attribution{font-size:.8125rem;line-height:1.45;color:var(--muted);max-width:80ch}
.cg-attribution{margin-top:6px}

/* without JavaScript: the takeaway and four still images */
.cg-static .cg-takeaway{margin:0 0 16px;max-width:70ch;color:rgba(255,255,255,.86);font-size:.9375rem}

/* utilities */
.visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.cg :focus-visible{outline:2px solid currentColor;outline-offset:2px}
.cg-bench :focus-visible{outline-color:#fff}

/* ---------- Breakpoints ---------- */
@media (max-width:1099.98px){
  .cg-grid{grid-template-columns:1fr}
  .cg-panel{position:relative;top:auto;max-height:none;overflow:visible}   /* relative, not static: the glass highlight is positioned on it */
}
@media (max-width:699.98px){
  .cg-tiles{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .cg-tile figcaption{padding:7px 9px 9px}
  .cg-tile figcaption b{font-size:.8125rem}
  .cg-cap,.cg-cap-2,.cg-cap-g{font-size:.75rem}
  .cg-mobilebar{display:flex;position:sticky;top:8px;z-index:5;align-items:baseline;justify-content:space-between;gap:12px;margin:0 0 12px;padding:9px 16px;border-radius:var(--r-pill);font-size:.875rem}
  .cg-mobilebar b{font-weight:620;font-size:1rem;letter-spacing:-.01em;flex:none;min-height:1.5em}   /* holds the bar while a shared link's grade is blank */
  .cg-mobilebar span{color:#A3A3A3;min-width:0;text-align:right;overflow-wrap:anywhere}   /* wraps at a large text size instead of widening the page */
  /* the sticky bar (52px from the top) must not cover a control the browser scrolls into view for focus */
  .cg-panel :is(button,input,select,summary),.cg-cell,.cg-iso{scroll-margin-top:64px}
}
@media (prefers-reduced-motion:reduce){
  .cg *,.cg *::before,.cg *::after{transition-duration:0s!important;animation-duration:0s!important}
}
/* Windows high contrast: the bench keeps its designed colours (the SVG drawings, the chart fills and the
   segmented control would otherwise lose their grounds while keeping their strokes); it passes on its own */
@media (forced-colors:active){
  .cg-bench{forced-color-adjust:none}
}

/* Cut Grading Tool: the chart figure (#cg-chart). Sits on the black bench beside the glass panel: the same
   ground and hairline as the tiles, the chart itself the one bold element. Only .cg-chart-scroll may scroll
   horizontally; the page never does. Layout of the surrounding grid belongs to base.css. */

.cg-chart{position:relative;margin:0;min-width:0;background:#0A0C0E;border:1px solid rgba(255,255,255,.14);border-radius:var(--r-panel);padding:14px 14px 12px;color:#fff;
  overflow-anchor:none}   /* when the chart grows (full range), the browser keeps the panel below it in place */
.cg-chart [hidden]{display:none!important}
/* the plot: a fixed label gutter, then the scroll container; the pair is centred when the plot is narrower */
.cg-chart-body{position:relative;display:flex;justify-content:center;align-items:flex-start}
.cg-rows{flex:none;display:block;max-width:none;overflow:visible;font-family:var(--font)}   /* the axis title runs past the gutter */
.cg-chart-scroll{flex:0 1 auto;min-width:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.3) transparent;padding-bottom:2px}
/* more columns beyond the right edge (a 320px phone, or the full range): a fade over the plot rows says so */
.cg-chart-body.has-more::after{content:"";position:absolute;right:0;top:22px;bottom:36px;width:28px;pointer-events:none;background:linear-gradient(90deg,rgba(10,12,14,0),#0A0C0E)}
.cg-svg{display:block;max-width:none;font-family:var(--font);-webkit-user-select:none;user-select:none;touch-action:pan-x pan-y}   /* dg.css caps svg at 100%: this one scrolls instead */

/* cells and their overlays */
.cg-cell{cursor:pointer;stroke:transparent;stroke-width:1;outline:none}
.cg-chart .cg-cell:focus-visible,.cg-chart .cg-svg:focus{outline:none}      /* base.css outlines .cg :focus-visible; the chart draws its own ring */
.cg-cell:hover{stroke:rgba(255,255,255,.8)}
.cg-zones,.cg-over{pointer-events:none}
.cg-halo{fill:none;stroke:rgba(0,0,0,.55);stroke-linejoin:round;stroke-linecap:round}
.cg-halo.cg-ex,.cg-halo.cg-tolk,.cg-halo.cg-vg{stroke-width:4.5}
.cg-halo.cg-mark{stroke-width:3.6}
.cg-ex-line{fill:none;stroke:#fff;stroke-width:2.5;stroke-linejoin:round;stroke-linecap:round}
.cg-vg-line{fill:none;stroke:#fff;stroke-width:1.25;stroke-dasharray:4 3;stroke-linejoin:round;stroke-linecap:round}
.cg-tolk-ring{fill:none;stroke:#ffd36e;stroke-width:2;stroke-linejoin:round}
.cg-mark-ring{fill:none;stroke:#fff;stroke-width:1.6;stroke-linejoin:round}
.cg-guide{stroke:rgba(255,255,255,.35);stroke-width:1;shape-rendering:crispEdges}
.cg-focus{fill:none;stroke:#fff;stroke-width:2;stroke-linejoin:round;filter:drop-shadow(0 0 1.5px rgba(0,0,0,.9))}

/* axes */
.cg-ax{fill:#A3A3A3;font-size:11px;font-variant-numeric:tabular-nums}
.cg-ax.is-cur{fill:#fff;font-weight:600}
.cg-axt{fill:#A3A3A3;font-size:11px;letter-spacing:.01em}

/* tooltip: HTML, positioned by the module, never in the way of the pointer */
.cg-tip{position:absolute;left:0;top:0;z-index:3;pointer-events:none;max-width:calc(100% - 8px);padding:8px 11px 9px;border-radius:var(--r-chip);background:rgba(10,12,14,.96);border:1px solid rgba(255,255,255,.18);box-shadow:0 8px 24px rgba(0,0,0,.5);font-size:.8125rem;line-height:1.4;color:rgba(255,255,255,.86);white-space:nowrap}
.cg-tip > *{display:block}
.cg-tip b{color:#fff;font-weight:600}
@media (max-width:420px){.cg-tip{white-space:normal}}

/* under the chart: the outside-the-tables note, then the legend */
.cg-outside{margin:10px auto 0;font-size:.8125rem;line-height:1.35;color:#fff;text-align:center;max-width:60ch}
.cg-legend{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:7px 12px;margin-top:12px;font-size:.8125rem;line-height:1.35;color:#A3A3A3}
/* a key never wraps between its swatch and its text: a long text (the cap clause) wraps inside its own span */
.cg-key{display:inline-flex;flex-wrap:nowrap;justify-content:center;align-items:center;gap:6px 7px;min-height:1.4em;max-width:min(100%,58ch)}
.cg-key>span{min-width:0}
.cg-key>i{flex:none}
.cg-kname{color:#fff;font-weight:560;white-space:nowrap}
.cg-ramp{display:inline-flex;align-items:center;gap:7px;white-space:nowrap}
.cg-bar{display:inline-block;width:64px;height:9px;border-radius:5px;background:#e8cf9e;box-shadow:inset 0 0 0 1px rgba(255,255,255,.12)}
.cg-sws{display:inline-flex;flex-wrap:wrap;gap:4px 12px}
.cg-sw{display:inline-flex;align-items:center;gap:6px}
.cg-sw i{display:inline-block;width:11px;height:11px;border-radius:3px;box-shadow:inset 0 0 0 1px rgba(255,255,255,.12)}
.cg-ln{display:inline-block;width:22px;height:0;border-top:2.5px solid #fff;box-shadow:0 0 0 1px rgba(0,0,0,.55);border-radius:2px}
.cg-ln-vg{border-top:1.25px dashed #fff;box-shadow:none}
.cg-ring{display:inline-block;width:12px;height:12px;border-radius:3px;border:2px solid #ffd36e;box-shadow:0 0 0 1px rgba(0,0,0,.55)}
.cg-lnote{flex-basis:100%;margin:2px auto 0;font-size:.75rem;line-height:1.4;color:#A3A3A3;max-width:72ch;text-align:center}

@media (max-width:699.98px){
  .cg-legend{gap:6px 14px}
}
/* phones: the chart band runs edge to edge (the wrap's 16px gutter is given back), so 360–390px phones fit the
   default window at 24px cells without scrolling; 4px of air keeps the axis title and row labels off the screen
   edge; the text under it keeps the page gutter */
@media (max-width:560px){
  .cg-chart{margin:0 -16px;padding:10px 0 8px;border-left:0;border-right:0;border-radius:0}
  .cg-chart-body{padding-left:4px}
  .cg-outside,.cg-legend{padding-left:16px;padding-right:16px}
}
@media (prefers-reduced-motion:no-preference){
  .cg-cell{transition:stroke .12s}
}

/* Cut Grading Tool: the settings panel and the grade card. One glass surface, no nested cards; fields
   follow the Brightness & Tilt panel (label, control, one hint only where it earns its place). */

/* --pmuted: the muted text inside the panel. The glass highlight (dg.css .glass::before, a screen-blended white
   radial at the top left) lifts the panel's ground to about #535353 near the top when the panel is tall, where
   #A3A3A3 falls to 3:1; rgba(255,255,255,.8) composites to about #DCDCDC there (5.6:1) and stays quiet lower down. */
.cg-panel{--track:rgba(255,255,255,.07);--pmuted:rgba(255,255,255,.8);--ease:cubic-bezier(.3,1.4,.5,1);--glide:cubic-bezier(.2,.8,.2,1);
  border-radius:var(--r-panel);padding:18px 18px 16px;display:flex;flex-direction:column;gap:16px}
.cg-panel>*,.cg-col>*{position:relative;margin:0}        /* above the glass highlight (::before) */
.cg-col{display:contents}                                 /* the two column wrappers only exist at 700-1100px */
.cg-field{display:flex;flex-direction:column;gap:7px}
.cg-field label,.cg-label{font-size:.875rem;font-weight:560;color:#fff}
.cg-hint{font-size:.75rem;line-height:1.35;color:var(--pmuted);margin:0}
.cg-hint[hidden]{display:none}

/* ---------- Chart view: a segmented radio group (sim.css .sg, copied: sim.css is not loaded here) ---------- */
.sg{position:relative;display:grid;grid-template-columns:repeat(var(--n),minmax(0,1fr));gap:2px;padding:3px;
  border-radius:var(--r-pill);background:var(--track);isolation:isolate}
.sg button{position:relative;z-index:1;font:inherit;font-size:.8125rem;font-weight:500;border:0;background:none;color:var(--muted);
  border-radius:var(--r-pill);min-height:34px;padding:0 2px;cursor:pointer;white-space:nowrap;font-variant-numeric:tabular-nums}
.sg button:hover{color:var(--fg)}
.sg button[aria-checked="true"]{color:var(--bg);font-weight:600}
.sg-thumb{position:absolute;left:0;top:0;width:0;height:0;border-radius:var(--r-pill);background:var(--fg);z-index:0;opacity:0;
  box-shadow:0 1px 2px rgba(0,0,0,.25),0 4px 12px rgba(0,0,0,.18)}
/* the slide and the label fade only after the first placement (added a frame later), so nothing moves on load */
.sg.ready .sg-thumb{opacity:1;transition:transform .38s var(--ease),width .38s var(--ease),height .2s var(--glide)}
.sg.ready button{transition:color .25s var(--glide)}
/* This group sits under the glass highlight, the brightest part of the panel: the pill takes the selects' dark
   ground and the unchecked labels are white (the white thumb and weight 600 mark the checked one), which holds
   4.5:1 however tall the panel is. Five labels never fit one 313px row: the pill wraps into 3 + 2 where it must. */
.cg-sg{--track:rgba(0,0,0,.35);display:flex;flex-wrap:wrap}
.cg-sg button{flex:1 1 0;font-size:.75rem;padding:0 6px;color:#fff}
.cg-sg button[aria-checked="true"]{color:#000}
.cg-sg button[hidden]{display:none}
@media (min-width:1100px),(min-width:700px) and (max-width:819.98px),(max-width:440px){.cg-sg button{flex-basis:30%}}
@media (max-width:359px){.cg-sg button{font-size:.6875rem;padding:0 5px}}

/* ---------- Grade card ---------- */
.cg-card{display:flex;flex-direction:column;gap:2px;padding-top:2px}
.cg-grade{font-size:2rem;line-height:1.05;font-weight:620;letter-spacing:-.02em;color:#fff;margin:0;min-height:1.05em}   /* holds its line while a shared link's grade is still loading */
.cg-grade-sub{font-size:.8125rem;color:var(--pmuted);margin:0}
.cg-limit{font-size:.875rem;line-height:1.4;color:rgba(255,255,255,.86);margin:8px 0 0;min-height:4.2em}   /* three lines held, so the sliders below do not move under a dragging pointer as the line changes */
.cg-breakdown{margin-top:6px}
.cg-breakdown summary,.cg-more summary{cursor:pointer;font-size:.875rem;font-weight:560;padding:6px 0;color:#fff}
.cg-table{width:100%;border-collapse:collapse;font-size:.75rem;line-height:1.3;margin-top:4px}
.cg-table th,.cg-table td{text-align:left;vertical-align:top;padding:5px 7px 5px 0;border-bottom:1px solid rgba(255,255,255,.1)}
.cg-table th:last-child,.cg-table td:last-child{padding-right:0;white-space:nowrap}   /* the grade word stays whole */
.cg-table th{font-weight:560;color:var(--pmuted)}
.cg-table td{color:rgba(255,255,255,.86)}
.cg-table tr.is-limiting td{font-weight:600;color:#fff}           /* limiting rows: bold and a left rule, not colour */
.cg-table tr.is-limiting td:first-child{box-shadow:inset 3px 0 0 #fff;padding-left:8px}
/* the component's reason, directly under its name (why a ceiling is not binding, how a value was rounded) */
.cg-note{display:block;margin-top:2px;font-size:.6875rem;line-height:1.35;font-weight:400;color:var(--pmuted)}
.cg-note[hidden]{display:none}
.cg-table tbody tr:last-child td{border-bottom:0}
.cg-known{margin-top:10px}

/* ---------- Sliders: label, live readout, native range between two steppers ---------- */
.cg-range-l{display:flex;align-items:baseline;gap:10px}
.cg-range-l label{flex:1}
.cg-range-l output{font-size:.9375rem;font-weight:600;color:#fff;min-width:3.5ch;text-align:right}
.cg-range-row{display:grid;grid-template-columns:32px minmax(0,1fr) 32px;gap:8px;align-items:center}
.cg-range input[type=range]{width:100%;accent-color:#fff;margin:0;min-height:28px;background:none;cursor:pointer}
.cg-step{width:32px;height:32px;border-radius:50%;border:1px solid rgba(255,255,255,.24);background:rgba(255,255,255,.06);color:#fff;
  font:inherit;font-size:1.125rem;line-height:1;cursor:pointer;display:grid;place-items:center;padding:0;transition:background .15s}
.cg-step:hover{background:rgba(255,255,255,.14)}
.cg-step:disabled{opacity:.3;cursor:default;background:none}
.cg-chip{font-size:.75rem;font-weight:500;padding:2px 9px;border-radius:var(--r-chip);background:rgba(255,255,255,.1);color:rgba(255,255,255,.85);white-space:nowrap}

/* ---------- Selects and checkboxes ---------- */
.cg-field select{font:inherit;font-size:.9375rem;color:#fff;background:rgba(0,0,0,.35);border:1px solid rgba(255,255,255,.24);
  border-radius:var(--r-chip);padding:9px 12px;min-height:42px;width:100%}
.cg-field select option{color:#000;background:#fff}
.cg-more-body{display:flex;flex-direction:column;gap:16px;padding-top:12px}
.cg-checks{display:flex;flex-direction:column;gap:8px;margin-top:2px;padding-top:12px;border-top:1px solid rgba(255,255,255,.1)}
.cg-check{display:flex;align-items:center;gap:10px;font-size:.875rem;font-weight:560;color:#fff;cursor:pointer;min-height:28px}
.cg-check input{width:18px;height:18px;margin:0;accent-color:#fff;cursor:pointer;flex:none}
.cg-check input:disabled{cursor:default;opacity:.55}
.cg-check:has(input:disabled){cursor:default;color:var(--pmuted)}
.cg-checks .cg-hint{margin-top:-4px}

/* ---------- Actions and status ---------- */
.cg-acts{display:flex;gap:8px;flex-wrap:wrap}
.cg-buy{display:flex;flex-direction:column;align-items:flex-start;gap:6px;margin:0}
.cg-sm{padding:9px 16px;min-height:40px;font-size:.875rem}
.cg-status{font-size:.8125rem;color:var(--pmuted);margin:-6px 0 0;min-height:1.2em;overflow-wrap:anywhere}
.cg-status:empty{display:none}

/* ---------- 700–1100px: the panel is full width: view and grade card on the left, the controls on the right ---------- */
@media (min-width:700px) and (max-width:1099.98px){
  .cg-panel{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 28px;align-items:start}
  .cg-col{display:flex;flex-direction:column;gap:16px;min-width:0}
  .cg-acts,.cg-status{grid-column:1/-1}
  .cg-status{margin-top:-8px}
}
@media (prefers-reduced-motion:reduce){
  .sg-thumb,.sg button,.cg-step{transition:none}
}

/* Cut Grading Tool: what goes inside the four tiles (3D view, crown plan, profile, light map).
   The tile frame, its square .cg-view and the figcaption are laid out in base.css; this file only adds
   what the views need. The bench is black, so the colours are fixed: hairlines, greys and white.
   The only colour is the light map itself and its key (the DG Light Return colours). */

/* Equal tile heights when one caption wraps (the light map's shares line does at 260px): the square stays a
   square, the caption's hairline sits directly under it in every tile of a row, and the slack lands under the
   caption text, as the Brightness & Tilt tiles do. */
.cg-tiles>li{display:flex}
.cg-tile{flex:1 1 auto}
.cg-view{flex:none}
.cg-tile figcaption{flex:1 0 auto}
.cg-cap[hidden],.cg-cap-2[hidden]{display:none}

/* 3D view: drag to turn, arrow keys when focused */
.cg-iso{cursor:grab;touch-action:pan-y;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent}
.cg-iso.is-dragging{cursor:grabbing}
.cg-iso:focus-visible{outline:2px solid #fff;outline-offset:-3px}

/* Light map: the square image, lifted 7% so its empty bottom band holds the key. Lifted with a transform, not
   `top`: an async-decoded <img> that sits partly outside its clip can miss its repaint after decoding in
   Chrome, and then stays blank until something else repaints. */
.cg-lm-img,.cg-lm-ring{position:absolute;left:0;top:0;width:100%;height:100%;display:block;transform:translateY(-7%)}
.cg-lm-ring{pointer-events:none}
.cg-lm-none{display:none;position:absolute;inset:0;margin:0;align-items:center;justify-content:center;text-align:center;padding:16px 22px;color:#A3A3A3;font-size:.8125rem;line-height:1.4}
/* off the lattice (is-off) or a map that failed to load (is-missing): the note instead of the picture */
.cg-lm.is-off .cg-lm-img,.cg-lm.is-off .cg-lm-ring,.cg-lm.is-off .cg-lm-key,.cg-lm.is-missing .cg-lm-img,.cg-lm.is-missing .cg-lm-ring,.cg-lm.is-missing .cg-lm-key{display:none}
.cg-lm.is-off .cg-lm-none,.cg-lm.is-missing .cg-lm-none{display:flex}
.cg-lm-key{position:absolute;left:0;right:0;bottom:0;margin:0;padding:0 6px 7px;list-style:none;display:flex;flex-wrap:wrap;justify-content:center;gap:2px 8px;font-size:.6875rem;line-height:1.3;color:#A3A3A3;pointer-events:none}
.cg-lm-key li{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
/* Below 1100px the tile is under 258px and the four words no longer fit one row: two even rows (never 3 + 1),
   and the image is lifted a little more so the disc clears the taller key by at least 5px at every width. */
@media (max-width:1099.98px){
  .cg-lm-img,.cg-lm-ring{transform:translateY(-11%)}
  .cg-lm-key{display:grid;grid-template-columns:auto auto;justify-content:center;column-gap:12px;row-gap:1px;line-height:1.2}
  .cg-lm-key li{justify-self:start}
}
/* .cg-lm-sw, not .cg-sw: chart.css owns .cg-sw for the legend swatches */
.cg-lm-sw{display:inline-block;width:9px;height:9px;border-radius:50%;flex:none}
.cg-lm-sw-direct{background:var(--lr-red,#FF2D20)}
.cg-lm-sw-indirect{background:var(--lr-green,#12C84E)}
.cg-lm-sw-contrast{background:var(--lr-blue,#2350FF)}
.cg-lm-sw-leakage{background:#050508;box-shadow:inset 0 0 0 1px rgba(255,255,255,.4)}

@media (max-width:699.98px){
  .cg-lm-key{font-size:.625rem;padding:0 6px 6px;gap:1px 8px}
}
