.rd-page { width: var(--page); margin: 0 auto; }
.rd-page [hidden] { display: none !important; }
.rd-page.page-columns, .rd-page .page-columns, #rd-explorer.page-columns { display: block !important; }
.rd-page .page-columns > * { grid-column: auto !important; }
.rd-heading { max-width: 820px; margin: 3rem 0 1.5rem; }
.rd-heading .eyebrow { color: var(--gold); margin-bottom: .7rem; }
.rd-heading h1 { color: var(--paper); font-size: clamp(2.2rem, 7vw, 4.6rem); line-height: 1.06; margin: 0 0 1rem; }
.rd-heading h1 em { color: var(--gold); }
.rd-heading > p:last-child { color: var(--soft); font-size: 1.05rem; max-width: 64ch; }
.rd-loading { color: var(--soft); }
.rd-page button { font-family: var(--sans); }
.rd-page button:focus-visible, .rd-page input:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }

.rd-panel { position: relative; margin-bottom: 1.5rem; padding: clamp(1.25rem, 3vw, 1.9rem); border-radius: var(--radius); background: var(--paper); color: var(--ink); box-shadow: 0 24px 70px rgba(0,0,0,.35); }
.rd-panel::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; border-radius: var(--radius) var(--radius) 0 0; background: var(--rainbow); }
.rd-panel .eyebrow { margin-bottom: .3rem; }
.rd-panel h2 { margin: 0 0 .5rem; padding: 0; border: 0; color: var(--ink); font-size: clamp(1.7rem, 3vw, 2.3rem); }
.rd-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: .8rem 1.5rem; }
.rd-transport { display: flex; flex-wrap: wrap; gap: .5rem; }
.rd-play { padding: .6rem 1.4rem; border: 0; border-radius: 999px; background: var(--gold); color: var(--ink); font-size: 1rem; font-weight: 600; cursor: pointer; }
.rd-btn { padding: .55rem 1rem; border: 1.5px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink); font-size: .88rem; cursor: pointer; }
.rd-btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.rd-btn[aria-pressed="true"]::before { content: "✓ "; }

.rd-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* The radio set: a 1960s valve table radio in a wooden cabinet, sitting on the mixing desk */
@property --rd-gap { syntax: '<angle>'; inherits: true; initial-value: 90deg; }
.rd-set { --rd-pulse: 0; position: relative; margin-top: 1.2rem; padding: 0 0 0; }
.rd-cab { position: relative; z-index: 1; display: grid; grid-template-columns: 96px minmax(0, 1fr) 96px; grid-template-areas: "grille grille grille" "vol face tune"; gap: .9rem .6rem; align-items: center; padding: 1rem 1rem 1.1rem; border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255,236,200,.16), transparent 14%, transparent 80%, rgba(0,0,0,.28)),
    repeating-linear-gradient(91deg, rgba(40,18,6,.16) 0 2px, transparent 2px 9px, rgba(255,214,160,.07) 9px 11px, transparent 11px 25px),
    repeating-linear-gradient(88deg, transparent 0 37px, rgba(40,18,6,.12) 37px 40px, transparent 40px 61px),
    linear-gradient(100deg, #7b4c27, #93603a 28%, #6d4221 58%, #87552f 85%, #6f4424);
  box-shadow: inset 0 0 0 2px rgba(255,220,170,.18), inset 0 2px 0 4px rgba(255,220,170,.05), inset 0 -7px 0 rgba(0,0,0,.22), 0 3px 0 #3d2614, 0 22px 26px -14px rgba(0,0,0,.6); }
/* the feet, and the edge of the desk it stands on */
.rd-cab::before, .rd-cab::after { content: ""; position: absolute; bottom: -9px; width: 54px; height: 12px; border-radius: 0 0 8px 8px; background: linear-gradient(#2a180b, #120a04); z-index: -1; }
.rd-cab::before { left: 9%; } .rd-cab::after { right: 9%; }
.rd-deskedge { height: 26px; margin: 0 -.4rem; border-radius: 6px 6px 10px 10px;
  background: radial-gradient(circle at 50% 55%, #d9d4c8 0 3px, #6d7177 3.5px 5px, transparent 5.5px) 0 0 / 34px 100% repeat-x, linear-gradient(180deg, #8c9198, #5d6168 30%, #4a4e54); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 6px 14px -6px rgba(0,0,0,.5); }

/* the speaker: grille cloth with a gold thread, behind wooden louvres; the cone breathes with the sound */
.rd-grille { grid-area: grille; position: relative; height: 112px; padding: 7px; border-radius: 16px; background: linear-gradient(180deg, #3d2614, #5a381d); box-shadow: inset 0 2px 4px rgba(0,0,0,.6), 0 1px 0 rgba(255,220,170,.2); }
.rd-cloth { position: relative; height: 100%; overflow: hidden; border-radius: 11px;
  background:
    repeating-linear-gradient(0deg, transparent 0 30px, rgba(255,222,140,.38) 30px 31px, transparent 31px 37px),
    repeating-linear-gradient(0deg, rgba(70,42,18,.42) 0 1px, transparent 1px 2px, rgba(255,240,200,.14) 2px 3px),
    repeating-linear-gradient(90deg, rgba(70,42,18,.36) 0 1px, transparent 1px 2px, rgba(255,240,200,.12) 2px 3px),
    linear-gradient(180deg, #cfb27c, #b39462 60%, #9f8152);
  box-shadow: inset 0 3px 10px rgba(0,0,0,.45); }
.rd-cone { position: absolute; left: 50%; top: 50%; width: 150px; height: 150px; margin: -75px 0 0 -75px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(40,22,8,.32) 0 12%, rgba(40,22,8,.08) 13% 40%, rgba(40,22,8,.2) 41% 47%, rgba(40,22,8,.05) 48% 66%, transparent 70%);
  transform: scale(calc(1 + var(--rd-pulse) * .07)); }
.rd-cloth::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 70%, rgba(255,150,50,.55), transparent 65%); mix-blend-mode: soft-light; opacity: calc(var(--rd-on, 0) * (.35 + var(--rd-pulse) * .6)); transition: opacity .1s; }
.rd-grille::after { content: ""; position: absolute; inset: 7px; border-radius: 11px; pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 94px, rgba(0,0,0,.35) 94px 95px, #5d3a1d 95px, #a0703f 98px, #6d4423 102px, rgba(0,0,0,.3) 102px 103px, transparent 103px 112px); background-position: 40px 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.2); }
.rd-set.is-on { --rd-on: 1; }

/* knobs: fluted Bakelite with a cream pointer; the cap turns, the light on it does not */
.rd-knob { position: relative; display: flex; flex-direction: column; align-items: center; gap: .35rem; }
.rd-knob-vol { grid-area: vol; } .rd-knob-tune { grid-area: tune; }
.rd-knob-cap { position: relative; display: block; width: 68px; height: 68px; border-radius: 50%; transform: rotate(var(--rd-turn, 0deg)); transition: transform .12s ease-out;
  background: radial-gradient(circle, #4a2d17 0 52%, transparent 53%), repeating-conic-gradient(#2a180b 0 7deg, #5d3a1f 7deg 12deg, #3a2312 12deg 15deg);
  box-shadow: 0 5px 0 #1e1006, 0 9px 12px rgba(0,0,0,.45); }
.rd-knob-cap::after { content: ""; position: absolute; left: 50%; top: 9px; width: 5px; height: 20px; margin-left: -2.5px; border-radius: 3px; background: #f1e3bf; box-shadow: 0 0 2px rgba(0,0,0,.5); }
.rd-knob::before { content: ""; position: absolute; top: 0; left: 50%; z-index: 1; width: 68px; height: 68px; margin-left: -34px; border-radius: 50%; pointer-events: none; background: radial-gradient(circle at 34% 26%, rgba(255,240,215,.4), rgba(255,240,215,.08) 30%, transparent 46%), radial-gradient(circle, transparent 50%, rgba(0,0,0,.25) 53%, transparent 58%); }
.rd-knob small { color: #f1e3bf; font-family: var(--serif); font-size: .74rem; font-style: italic; letter-spacing: .04em; text-shadow: 0 1px 0 rgba(0,0,0,.5); }

/* the dial glass, lit from behind by a lamp that warms up */
.rd-face { grid-area: face; position: relative; isolation: isolate; transition: box-shadow 1.6s ease-in; padding: 1rem 1.2rem .9rem; border-radius: 12px; background: radial-gradient(ellipse at 50% 30%, #eadbb2, #cfb47a 70%, #b99a5e); box-shadow: inset 0 2px 10px rgba(0,0,0,.4), 0 0 0 3px #c9a45e, 0 0 0 5px #5a381d, 0 1px 0 6px rgba(255,220,170,.2); }
.rd-face::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: radial-gradient(ellipse at 50% 22%, rgba(255,246,214,.95), rgba(255,206,120,.55) 45%, rgba(255,160,60,.18) 80%, transparent); opacity: .12; transition: opacity 1.2s ease-in; }
.rd-face::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(172deg, rgba(255,255,255,.28), rgba(255,255,255,0) 32%), linear-gradient(180deg, transparent 70%, rgba(60,30,10,.1)); }
.rd-set.is-on .rd-face { box-shadow: inset 0 2px 10px rgba(0,0,0,.3), 0 0 0 3px #c9a45e, 0 0 0 5px #5a381d, 0 1px 0 6px rgba(255,220,170,.2), 0 0 26px 6px rgba(255,170,70,.35); }
.rd-set.is-on .rd-face::before { opacity: 1; animation: rd-warm 2.2s ease-in; }
@keyframes rd-warm { 0% { opacity: .12; } 18% { opacity: .5; } 26% { opacity: .32; } 40% { opacity: .62; } 100% { opacity: 1; } }
.rd-scale { position: relative; height: 64px; margin: 0 .6rem; border-bottom: 2px solid #5a381d; }
.rd-ticks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.rd-khz { bottom: 2px; color: #4a2c14; font-family: var(--mono); font-size: .72rem; }
.rd-khz::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 1.5px; height: 8px; background: #5a381d; }
.rd-station { top: 0; color: #8a1f2c; font-family: var(--serif); font-size: .74rem; font-style: italic; }
.rd-needle { position: absolute; z-index: 1; top: -4px; bottom: -6px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: #c23b4b; box-shadow: 0 0 4px rgba(194,59,75,.5); pointer-events: none; transition: box-shadow 1.2s; }
.rd-set.is-on .rd-needle { box-shadow: 0 0 8px 1px rgba(255,90,70,.7); }
/* the dial's range input: a brass rail and a round Bakelite pointer, big enough for a thumb */
.rd-tune { position: relative; z-index: 1; display: block; margin: .2rem .3rem 0; }
.rd-tune input { display: block; width: 100%; height: 40px; margin: 0; background: transparent; cursor: grab; -webkit-appearance: none; appearance: none; touch-action: pan-y; }
.rd-tune input:active { cursor: grabbing; }
.rd-tune input::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(180deg, #f3d792, #a87c32 60%, #6e4f1e); box-shadow: inset 0 1px 1px rgba(0,0,0,.35); }
.rd-tune input::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(180deg, #f3d792, #a87c32 60%, #6e4f1e); box-shadow: inset 0 1px 1px rgba(0,0,0,.35); }
.rd-tune input::-webkit-slider-thumb { width: 30px; height: 30px; margin-top: -12px; border: 0; border-radius: 50%; -webkit-appearance: none; appearance: none; background: radial-gradient(circle at 36% 30%, #b0303f, #7a1a26 55%, #4a0d15); box-shadow: 0 0 0 2px #f1e3bf, 0 3px 5px rgba(0,0,0,.45); }
.rd-tune input::-moz-range-thumb { width: 30px; height: 30px; border: 0; border-radius: 50%; background: radial-gradient(circle at 36% 30%, #b0303f, #7a1a26 55%, #4a0d15); box-shadow: 0 0 0 2px #f1e3bf, 0 3px 5px rgba(0,0,0,.45); }
.rd-row { position: relative; z-index: 1; display: grid; grid-template-columns: auto 62px minmax(0, 1fr) auto; gap: .7rem; align-items: center; margin-top: .5rem; }
.rd-nudge { width: 44px; height: 44px; border: 0; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #8e6338, #3d2614); color: #f3e9c8; font-size: 1rem; cursor: pointer; box-shadow: 0 3px 0 #2a180b; }
.rd-nudge:active { transform: translateY(2px); box-shadow: 0 1px 0 #2a180b; }
/* the magic eye: a green phosphor fan with a dark wedge that closes as a station locks on */
.rd-eye { position: relative; width: 62px; height: 62px; padding: 6px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f4f0e6, #9a9890 45%, #4c4a45); box-shadow: 0 2px 3px rgba(0,0,0,.5); }
.rd-eye span { --rd-gap: 90deg; position: relative; display: block; width: 100%; height: 100%; border-radius: 50%; overflow: hidden;
  background: conic-gradient(from calc(var(--rd-gap) * -.5), #061209 0deg, #061209 var(--rd-gap), #b9ffb0 calc(var(--rd-gap) + 1deg), #49e070 calc(var(--rd-gap) + 14deg), #23a548 50%, #49e070 calc(346deg), #b9ffb0 359deg, #061209 360deg);
  box-shadow: inset 0 0 0 2px #0c0c0c, inset 0 0 6px 2px rgba(0,0,0,.7); filter: brightness(.45) saturate(.6); transition: --rd-gap .15s, filter 1.2s, box-shadow 1.2s; }
.rd-eye span::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, #151515 0 20%, #2b2b2b 23%, rgba(0,0,0,.35) 26%, transparent 40%, rgba(255,255,255,.1) 70%, transparent 74%, rgba(0,0,0,.35) 100%); }
.rd-eye span::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 38% 30%, rgba(255,255,255,.35), transparent 30%); }
.rd-set.is-on .rd-eye span { filter: brightness(1.05) saturate(1.1); box-shadow: inset 0 0 0 2px #0c0c0c, inset 0 0 6px 2px rgba(0,0,0,.5), 0 0 12px 2px rgba(90,255,120,.45); }
.rd-now { margin: 0; color: #3d2614; font-family: var(--mono); font-size: .85rem; }

@media (prefers-reduced-motion: reduce) {
  .rd-knob-cap, .rd-eye span, .rd-needle, .rd-face, .rd-face::before, .rd-cloth::after { transition: none; }
  .rd-set.is-on .rd-face::before { animation: none; }
  .rd-cone { transform: none; }
}
@media (max-width: 680px) {
  .rd-cab { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "grille grille" "face face" "vol tune"; padding: .8rem .75rem 1rem; border-radius: 22px; }
  .rd-grille { height: 84px; }
  .rd-face { padding: .8rem .7rem .8rem; }
}

/* The desk */
.rd-desk { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem 1.5rem; align-items: end; margin-top: 1rem; }
.rd-slider { display: flex; flex-direction: column; gap: .3rem; font-size: .92rem; font-weight: 600; }
.rd-slider output { margin-left: .4rem; color: var(--pink-ink); font-weight: 400; }
.rd-slider input { width: 100%; accent-color: var(--purple); }
.rd-mode { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.rd-mode button { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; padding: .6rem .8rem; border: 1.5px solid var(--paper-line); border-radius: 12px; background: #fffaf0; color: var(--ink); text-align: left; cursor: pointer; }
.rd-mode strong { font-size: .95rem; }
.rd-mode span { color: var(--muted); font-size: .78rem; }
.rd-mode button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.rd-mode button[aria-pressed="true"] span { color: var(--gold); }
.rd-status { margin: 1rem 0 0; padding: .55rem .8rem; border-radius: 8px; background: #fdf0cf; font-size: .88rem; }
.rd-fine { margin: .8rem 0 0; color: var(--muted); font-size: .78rem; }
.rd-btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* The story */
.rd-story > p:not(.eyebrow) { max-width: 80ch; }
.rd-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin: 1rem 0 1.2rem; }
.rd-step { padding: 1rem 1.1rem; border: 1px solid var(--paper-line); border-radius: 10px; background: #fffaf0; font-size: .9rem; }
.rd-step h3 { margin: .4rem 0 .3rem; color: var(--ink); font-size: 1.15rem; }
.rd-step p { margin: 0; }
.rd-n { display: inline-block; padding: .1rem .55rem; border-radius: 999px; background: var(--ink); color: var(--gold); font-family: var(--mono); font-size: .72rem; }
.rd-story a { color: var(--pink-ink); }
.rd-method { max-width: 90ch; margin: 1.75rem 0; color: var(--soft); font-size: .82rem; }
.rd-method a { color: var(--gold); }
.rd-signoff { margin: 2rem 0; text-align: center; font-family: var(--serif); font-size: 1.2rem; }

@media (max-width: 1000px) { .rd-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .rd-desk { grid-template-columns: minmax(0, 1fr); } .rd-khz:nth-child(even) { display: none; } .rd-station { font-size: .62rem; } }
@media (max-width: 560px) { .rd-steps { grid-template-columns: minmax(0, 1fr); } .rd-station { display: none; } .rd-row { grid-template-columns: auto 1fr auto; justify-items: center; } .rd-scale { margin: 0 .2rem; } .rd-now { grid-column: 1 / -1; grid-row: 2; text-align: center; } }
