/* The Day dial style of the glucose chart (views/chart-dial.js; the pilot docs/mockups/charts/b-dial.html): the
   dial floats on the card, its face a soft disc; its colours, glow and night strengths are the --dial-* tokens of
   style.css, light and dark. */
.ins-box[data-style=dial]{background:none;border:0;border-radius:0;color:var(--dial-ink);cursor:default}
.dial-wrap{position:relative;height:100%}
.ins-curve.dial{display:block;width:100%;height:100%;overflow:visible}
.ins-curve.dial text{font-family:var(--sans);font-weight:700}
.dial .dial-face{stroke:var(--dial-rim);stroke-width:1;filter:drop-shadow(var(--dial-shadow))}
.dial .dial-nsec{fill:var(--dial-night);opacity:var(--dial-night-o)}
.dial .dial-night.faint{opacity:.55}
.dial .dial-star{fill:var(--dial-star);opacity:var(--dial-star-o)}
.dial .dial-narc{fill:none;stroke:var(--dial-moon);stroke-linecap:round;opacity:.5}
.dial .dial-band{fill:var(--dial-band);opacity:var(--dial-band-o)}
.dial .dial-edge{fill:none;stroke:var(--dial-band);stroke-width:.8;stroke-dasharray:1 4;stroke-linecap:round;opacity:.6}
.dial .dial-range{fill:var(--dial-mut);letter-spacing:.06em;text-transform:uppercase}
.dial .dial-ring{fill:none;stroke:var(--dial-mut);stroke-width:.6;stroke-dasharray:1 5;stroke-linecap:round;opacity:.45}
/* the rings' and the edges' values along the quiet spoke, on a halo of the face */
.ins-curve.dial text.dial-yl{fill:var(--dial-mut);font-weight:700;paint-order:stroke;stroke:var(--dial-face);stroke-width:3px;stroke-linejoin:round}
.ins-curve.dial text.dial-yl.edge{fill:var(--dial-ink);font-weight:800}
.dial .win{fill:var(--dial-hi);opacity:0;transition:opacity .2s}
.dial .win.on{opacity:.12}
.dial .dial-warc{fill:none;stroke:var(--dial-lo);stroke-linecap:round}
.dial .dial-tick{stroke:var(--dial-mut);stroke-width:1;stroke-linecap:round;opacity:.35}
.dial .dial-tick.six{stroke-width:1.6;opacity:.7}
.dial .dial-hour{fill:var(--dial-mut);opacity:.75}
.dial .dial-ghost-b{fill:var(--dial-mid);opacity:.12}
.dial .dial-ghost-l{fill:none;stroke:var(--dial-mut);stroke-width:1.3;stroke-dasharray:2 4;opacity:.6}
.dial .dial-glow,.dial .dial-spk{fill:none;stroke-linecap:round}
.dial .dial-glow{opacity:var(--dial-glow-o)}
.dial .dial-lead{fill:none;stroke:var(--dial-hi);stroke-width:1.2;stroke-dasharray:1.5 2.5;stroke-linecap:round;opacity:.8}
/* a meal's hit circle under its chip: the tap's target (views/chart-taps.js), never seen */
.dial .dial-dot{fill:var(--dial-hi);opacity:0}
.dial .dial-nowh{opacity:.22}
.dial .dial-nowh.live{animation:dial-pulse 2.4s ease-in-out infinite}
.dial .dial-now{fill:var(--dial-face)}
.dial .dial-when{fill:var(--dial-mut);font-weight:800;letter-spacing:.14em;text-transform:uppercase}
.ins-curve.dial text.dial-val{fill:var(--dial-ink);font-family:var(--serif);font-weight:600;letter-spacing:-.03em}
.dial .dial-grade{fill:var(--dial-mut)}
.dial .dial-sweep{fill:none;stroke:var(--dial-mask)}
@media (prefers-reduced-motion:no-preference){
  .dial .dial-sweep{stroke-dasharray:1;stroke-dashoffset:1;animation:ins-draw 1s cubic-bezier(.3,.6,.3,1) forwards}
  .dial-chips{animation:ins-fade .6s .5s ease-out both}
}
@keyframes dial-pulse{50%{opacity:.08}}
/* the ring reads under a finger (touch-action none), the hub lets a swipe scroll the page (pan-y): both round */
.dial-touch,.dial-hubt{position:absolute;border-radius:50%}
.dial-touch{touch-action:none;cursor:crosshair}
.dial-hubt{touch-action:pan-y;cursor:pointer}
/* the chips on the rim: a meal's (its icon and rise) magenta, the night's moon violet, an entry's teal */
.dial-chips{position:absolute;inset:0;pointer-events:none}
.dial-chip{position:absolute;display:inline-flex;align-items:center;justify-content:center;gap:3px;padding:0 6px;border:0;border-radius:var(--pill);background:var(--dial-hi);color:var(--dial-on);font:800 .68rem/1 var(--sans);white-space:nowrap;cursor:pointer;pointer-events:auto;box-shadow:0 0 0 2px var(--dial-face)}
.dial-chip::before{content:"";position:absolute;inset:-12px -4px}
.dial-chip small{font-size:.58rem;font-weight:700;opacity:.85}
.dial-chip .i{width:12px;height:12px;stroke-width:2.2}
.dial-chip.night{padding:0;background:var(--dial-moon)}
.dial-chip.ent{padding:0;background:var(--dial-lo)}
.dial-chip.ent.pt{background:var(--dial-face);color:var(--dial-lo);box-shadow:inset 0 0 0 1.5px var(--dial-lo),0 0 0 2px var(--dial-face)}
.dial-chip:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
/* the reading: a spoke from the hub to the rim and a dot on the reading's tip; the bubble in a corner */
.ins-box[data-style=dial] .ins-scrub .cursor{stroke:var(--dial-mid);stroke-width:1.4;stroke-dasharray:none;stroke-linecap:round;opacity:.8}
.ins-box[data-style=dial] .ins-scrub .hx{display:none}
.ins-box[data-style=dial] .ins-scrub .now{fill:var(--dial-face);stroke:var(--dial-mid);stroke-width:2.4;filter:drop-shadow(0 0 5px var(--dial-mid))}
.ins-box[data-style=dial] .ins-ro{background:color-mix(in srgb,var(--surface) 88%,transparent);border-color:color-mix(in srgb,var(--dial-mid) 35%,transparent);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.ins-box[data-style=dial].scrubbing .dial-chips{opacity:.35}
/* a span zoomed in under a day: the face outside it, dimmed (views/chart-dial.js) */
.dial .dial-dim{fill:var(--dial-face2);opacity:.75;pointer-events:none}
