/* radio page (v8): "radio", the frequency and a metal volume knob on one line (half the old size); under it a dial twice as long and twice as thick, almost edge to edge, numbers only */
.radio8__fx { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }

/* one line: radio · frequency · knob */
.radio8__line { display: flex; align-items: center; flex-wrap: wrap; gap: 10px clamp(14px, 2.6vw, 40px); min-width: 0; }
.radio8__line .display { flex: none; font-size: clamp(32px, 6vw, 94px); text-wrap: nowrap; }
.radio8__line .radio__freq { flex: none; font-size: clamp(38px, 7vw, 105px); gap: 7px; transition: color 0.18s, -webkit-text-stroke-width 0.18s; -webkit-text-stroke: 0 currentColor; }
.radio8__line .radio__freq small { font-size: max(11px, 0.2em); }
/* exactly on a station, no static: the number turns warm and a little bolder */
.radio8__line .radio__freq.lock { color: #f6c27a; -webkit-text-stroke-width: 0.022em; text-shadow: -0.02em 0 rgba(212, 42, 32, 0.8), 0.02em 0 rgba(154, 106, 214, 0.8), 0 0 0.28em rgba(224, 138, 46, 0.45); }
.radio8__line .radio__freq.lock small { -webkit-text-stroke-width: 0; color: var(--garland); }

/* the word "radio", more broken than the other page titles: stronger warp, wider colour fringes, a sideways tear now and then */
.radio8__line .display, .radio8__line .display.hot { filter: url(#radio8warp) hue-rotate(var(--hr, 0deg)); }
.radio8__line .display[data-split] { animation: fringe 21s linear infinite, r8tear 5.3s steps(1) infinite; }
.radio8__line .display[data-split] .c { text-shadow: calc(-0.055em - var(--sp, 0px) - var(--k, 0) * 0.14em) 0 var(--ca), calc(0.055em + var(--sp, 0px) + var(--k, 0) * 0.14em) calc(0.012em + var(--k, 0) * 0.03em) var(--cb), 0.01em 0.035em 0 rgba(11, 10, 9, 0.55); }
@keyframes r8tear {
  0%, 81%, 100% { transform: none; }
  82% { transform: translateX(-0.05em) skewX(-9deg); }
  84% { transform: translateX(0.06em) skewX(6deg) scaleY(1.05); }
  86% { transform: translateX(-0.025em); }
  88% { transform: none; }
  93% { transform: translateX(0.03em) skewX(-4deg); }
  94% { transform: none; }
}

/* the dial: 2x the v7 length and thickness, from (almost) edge to edge */
.radio8__dial { padding-inline: max(8px, env(safe-area-inset-left, 0px)) max(8px, env(safe-area-inset-right, 0px)); margin-bottom: clamp(22px, 3vw, 36px); }
@media (min-width: 1100px) { .radio8__dial { padding-inline: 16px; } }
.radio8__dial .tuner { height: 304px; touch-action: pan-y; -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.radio8__dial .tuner__scale { background:
  repeating-linear-gradient(90deg, rgba(236, 228, 212, 0.95) 0 3px, transparent 3px var(--px, 232px)) calc(var(--px, 232px) * 0.5 - 1.5px) 80px / 100% 72px no-repeat,
  repeating-linear-gradient(90deg, rgba(236, 228, 212, 0.5) 0 2px, transparent 2px calc(var(--px, 232px) / 2)) -1px 92px / 100% 52px no-repeat,
  repeating-linear-gradient(90deg, rgba(236, 228, 212, 0.22) 0 1px, transparent 1px calc(var(--px, 232px) / 10)) 0 108px / 100% 28px no-repeat; }
.radio8__dial .tuner__num { top: 168px; font-size: 44px; }
.radio8__dial .tuner__needle { top: 12px; bottom: 12px; width: 3px; margin-left: -1.5px; }

/* the knob: knurled black skirt and a brushed aluminium cap; the light stays put while the knurl and the pointer turn */
.vol { position: relative; flex: none; width: clamp(80px, 8.6vw, 128px); aspect-ratio: 1; }
.vol__ticks { position: absolute; inset: 0; width: 100%; height: 100%; stroke: #d6cdb8; stroke-linecap: round; opacity: 0.75; filter: sepia(0.5); pointer-events: none; }
.vol__knob { position: absolute; inset: 15%; border-radius: 50%; cursor: grab; touch-action: none; background: #1c1b1a;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.8), 0 2px 1px rgba(0, 0, 0, 0.75), 0 7px 12px rgba(0, 0, 0, 0.7), 0 14px 22px rgba(0, 0, 0, 0.35); }
.vol__knob > i { position: absolute; border-radius: 50%; pointer-events: none; }
.vol__knurl { inset: 0; transform: rotate(var(--a, 81deg)); transition: transform 0.07s linear;
  background: repeating-conic-gradient(#171615 0 2.4deg, #5d5a55 2.9deg 3.6deg, #262523 4.1deg 6deg); }
/* light on the skirt from the top left, it does not turn */
.vol__knob::before { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 28% 20%, rgba(255, 250, 240, 0.42), rgba(255, 250, 240, 0) 44%), linear-gradient(155deg, rgba(255, 255, 255, 0.12), rgba(0, 0, 0, 0.6) 78%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3), inset 0 -3px 5px rgba(0, 0, 0, 0.75); }
.vol__cap { inset: 17%; z-index: 2;
  background:
    radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.75) 0, rgba(255, 255, 255, 0) 30%),
    repeating-radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.07) 0 1px, rgba(0, 0, 0, 0.06) 1px 2px),
    conic-gradient(from 15deg, #d8d5cf, #8c8983 10%, #eeebe5 22%, #9f9c95 34%, #d4d1cb 47%, #7b7872 60%, #e8e5df 72%, #94918b 85%, #d8d5cf);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 2px 3px rgba(0, 0, 0, 0.65), inset 0 1px 1px rgba(255, 255, 255, 0.85), inset 0 -2px 3px rgba(0, 0, 0, 0.4);
  filter: sepia(0.2); }
.vol__cap::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 30% 72%, rgba(60, 45, 20, 0.22) 0 2px, transparent 3px), radial-gradient(circle at 70% 36%, rgba(60, 45, 20, 0.16) 0 1.5px, transparent 2.5px), radial-gradient(ellipse at 50% 50%, transparent 58%, rgba(40, 32, 18, 0.2) 100%); }
/* the pointer: an engraved line filled with cream paint, from the rim into the cap */
.vol__ptr { inset: 0; z-index: 3; transform: rotate(var(--a, 81deg)); transition: transform 0.07s linear; }
.vol__ptr::after { content: ""; position: absolute; left: 50%; top: 5%; width: 4px; height: 38%; margin-left: -2px; border-radius: 2px;
  background: linear-gradient(90deg, #a9a291, #f4ecdc 45%, #c9c0ae); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.12); }
.vol__knob:focus-visible { outline: 2px dashed #9bff7a; outline-offset: 8px; }
.vol.turning .vol__knob { cursor: grabbing; filter: drop-shadow(-1.5px 0 rgba(212, 42, 32, 0.7)) drop-shadow(1.5px 0 rgba(154, 106, 214, 0.7)); }
.vol.turning .vol__knurl, .vol.turning .vol__ptr { transition: none; }
.vol__led { --l: 0; position: absolute; right: 0; top: 2%; width: 9px; height: 9px; border-radius: 50%; background: #3a1210; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.6); }
.vol.on .vol__led { background: rgb(calc(120 + var(--l) * 135), calc(24 + var(--l) * 40), 18); box-shadow: 0 0 calc(4px + var(--l) * 14px) rgba(255, 59, 47, calc(0.35 + var(--l) * 0.6)); }
.vol__lbl { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); font: 10px/1 "Courier New", monospace; letter-spacing: 0.3em; text-transform: uppercase; color: #a39d92; opacity: 0.85; pointer-events: none; }

@media (max-width: 640px) {
  .radio8__line { gap: 8px 12px; }
  .radio8__dial .tuner { height: 272px; }
  .radio8__dial .tuner__scale { background-position: calc(var(--px, 128px) * 0.5 - 1.5px) 72px, -1px 84px, 0 100px; background-size: 100% 68px, 100% 48px, 100% 26px; }
  .radio8__dial .tuner__num { top: 152px; font-size: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .vol__knurl, .vol__ptr { transition: none; }
  .radio8__line .display, .radio8__line .display.hot { filter: url(#radio8still) hue-rotate(var(--hr, 0deg)); }
  .radio8__line .display[data-split] { animation: none; }
}

/* v7: no scope line; the three help sentences sit at the very bottom of the page */
.radio6 .radio__help { margin-top: clamp(16px, 4vw, 56px); }
