/* Iso glow block: a dark hairline panel with one glowing accent colour.
   Scoped to .iso-glow so it looks the same in the site's light and dark themes.
   The glow colour comes from data-accent, set from the block's "Glow colour" dropdown. */
.iso-glow {
  --panel: #141516; --edge: #222426; --line: #3d4144; --detail: #2b2e30; --body: #17181a; --deck: #1b1d1f;
  --ink: #868b8f; --ink-hi: #e6e8e9; --glass: #0f1011; --recess: #0e0f10;
  --accent: #ff7a1a; --accent-hi: #ffb070;
  --accent-dim: color-mix(in srgb, var(--accent) 10%, transparent);
  --glass-on: color-mix(in srgb, var(--accent) 9%, #101112);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  display: grid; gap: 6px; min-width: 0; margin: 2rem 0; padding: 16px 20px;
  background: var(--panel); border: 1px solid var(--edge); border-radius: 22px;
  color: var(--ink); font-family: var(--mono); font-size: 12px;
}
/* glow colours: Ember palette, then City palette */
.iso-glow[data-accent="ember"]    { --accent: #ff7a1a; --accent-hi: #ffb070; }
.iso-glow[data-accent="cyan"]     { --accent: #22d3ee; --accent-hi: #9beefa; }
.iso-glow[data-accent="lime"]     { --accent: #a3e635; --accent-hi: #d6f79f; }
.iso-glow[data-accent="violet"]   { --accent: #a78bfa; --accent-hi: #d6caff; }
.iso-glow[data-accent="rose"]     { --accent: #fb7185; --accent-hi: #fdb8c2; }
.iso-glow[data-accent="ice"]      { --accent: #dfe9ef; --accent-hi: #ffffff; }
.iso-glow[data-accent="sodium"]   { --accent: #ff9a2e; --accent-hi: #ffc77a; }
.iso-glow[data-accent="tungsten"] { --accent: #ffd166; --accent-hi: #ffe7a8; }
.iso-glow[data-accent="neon"]     { --accent: #ff4fa3; --accent-hi: #ff9fcb; }
.iso-glow[data-accent="signal"]   { --accent: #3ee8a0; --accent-hi: #a3f5cf; }
.iso-glow[data-accent="dusk"]     { --accent: #6f9dff; --accent-hi: #b5ccff; }
.iso-glow[data-accent="moon"]     { --accent: #dfe7f5; --accent-hi: #ffffff; }

.iso-glow__stage { aspect-ratio: 4 / 3; border-radius: 14px; transition: background .5s; }
.iso-glow__stage.glow { background: radial-gradient(ellipse 50% 45% at 50% 52%, var(--accent-dim), transparent 72%); }
.iso-glow__stage[data-state="error"] { display: grid; place-items: center; text-align: center; }
.iso-glow__stage svg { width: 100%; height: 100%; display: block; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.iso-glow__stage svg:focus { outline: none; }
.iso-glow__stage svg:focus-visible { outline: 1px dashed var(--line); outline-offset: 4px; border-radius: 8px; }
.iso-glow__cap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 18px; text-transform: uppercase; letter-spacing: .1em; }
.iso-glow__readout { color: var(--ink-hi); }
.iso-glow figcaption { color: var(--ink-hi); font-size: 13px; letter-spacing: .02em; }
.iso-glow noscript { display: block; padding: 24px 0; text-align: center; }

/* drawing vocabulary shared by every figure */
.iso-glow svg text { font-family: var(--mono); }
.iso-glow .face { fill: var(--body); stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.iso-glow .face.top { fill: var(--deck); }
.iso-glow .face.recess { fill: var(--recess); }
.iso-glow .detail { fill: none; stroke: var(--detail); stroke-width: 1; vector-effect: non-scaling-stroke; }
.iso-glow .label { fill: var(--ink); }
.iso-glow .glass { fill: var(--glass); transition: fill .3s, stroke .3s; }
.iso-glow .glass.hot { fill: var(--glass-on); stroke: var(--accent); }
.iso-glow .halo { fill: var(--accent); opacity: 0; transition: opacity .4s; }
.iso-glow .halo.hot { opacity: .22; }
.iso-glow .scr { fill: var(--accent-hi); }
.iso-glow .scr-accent { fill: var(--accent); }
.iso-glow .led { fill: var(--detail); transition: fill .2s; }
.iso-glow .led.hot { fill: var(--accent); }
.iso-glow .wire { fill: none; stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; transition: stroke .4s; }
.iso-glow .wire.hot { stroke: var(--accent); }
.iso-glow .wire-under { fill: none; stroke: var(--panel); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.iso-glow .pulse { fill: none; stroke: var(--accent-hi); stroke-width: 2.2; stroke-linecap: round; vector-effect: non-scaling-stroke;
                   stroke-dasharray: 70 1200; stroke-dashoffset: 70; opacity: 0; }
.iso-glow .pulse.go { animation: iso-glow-flow .55s linear; }
@keyframes iso-glow-flow { 0% { stroke-dashoffset: 70; opacity: 1; } 90% { opacity: 1; } 100% { stroke-dashoffset: -1000; opacity: 0; } }
.iso-glow .press { cursor: pointer; transition: transform 60ms ease-out; }
.iso-glow .press.down { transform: translateY(3px); }
.iso-glow .press .face { transition: fill .6s ease-out, stroke .6s ease-out; }
.iso-glow .press.lit .face, .iso-glow .press.latched .face { fill: var(--accent); stroke: var(--accent-hi); transition: none; }
.iso-glow .press.lit .face.top, .iso-glow .press.latched .face.top { fill: var(--accent-hi); }
.iso-glow .press.lit { filter: url(#glow); }
.iso-glow .press.latched { filter: url(#soft); }
.iso-glow .press:hover .face.top { stroke: var(--ink); }
.iso-glow .blink { animation: iso-glow-blink 1s steps(1) infinite; }
@keyframes iso-glow-blink { 50% { opacity: 0; } }

@media (max-width: 600px) { .iso-glow { padding: 12px; border-radius: 16px; } }
@media (prefers-reduced-motion: reduce) {
  .iso-glow .glass, .iso-glow .halo, .iso-glow .wire, .iso-glow .press, .iso-glow .press .face { transition: none; }
  .iso-glow .blink, .iso-glow .pulse.go { animation: none; }
}
