/* How radar sees into concrete (/how-it-works) and the one-scene embed ([data-radar-embed]). Scoped to .rd.
   Calibration sheet: paper, graph grid, ink, mono labels; the finish colour marks the scanner and the slider thumbs.
   Without JavaScript the canvases and controls are hidden and each figure shows its written description. */
.rd { --r-ink: #14181C; --r-ink2: #47505A; --r-ink3: #69737C; --r-rule: #CBD1D6; --r-sheet: #F3F2EE; --r-graph: rgba(27,32,38,.055);
  --r-red: #C8312A; --r-mono: var(--mono, ui-monospace, "SF Mono", Menlo, Consolas, monospace); --r-sans: var(--sans, "Archivo", Arial, sans-serif); }
.rd *, .rd *::before, .rd *::after { box-sizing: border-box; }

/* ---------------- head */
.rd-head { padding: 1.4rem 0 2rem; border-bottom: 1px solid var(--r-rule);
  background-color: var(--r-sheet); background-image: linear-gradient(var(--r-graph) 1px, transparent 1px), linear-gradient(90deg, var(--r-graph) 1px, transparent 1px); background-size: 24px 24px; }
.rd-head .eyebrow { margin-bottom: .7rem; }
.rd-head h1 { font-size: clamp(2.1rem, 6vw, 4rem); max-width: 15ch; margin: 0 0 .8rem; }
.rd-lead { font: 400 1.12rem/1.5 var(--serif, Georgia, serif); color: var(--r-ink2); max-width: 38rem; margin: 0 0 1.2rem; }
.rd-model { max-width: 40rem; margin: 0 0 1.5rem; padding: .7rem .9rem; background: #fff; border: 1px solid var(--r-ink); border-left-width: 4px; border-radius: 0 4px 4px 0; }
.rd-model p { margin: 0; font: 400 .95rem/1.45 var(--r-sans); color: var(--r-ink2); }
.rd-model b { display: inline-block; margin-right: .5rem; font: 700 .66rem/1 var(--r-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--r-sheet); background: var(--r-ink); padding: .3rem .42rem; border-radius: 2px; vertical-align: .12em; }
.rd-reglist ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1.5px solid var(--r-ink); border-radius: 4px; overflow: hidden; background: var(--r-ink); gap: 1px; max-width: 46rem; }
.rd-reglist li { min-width: 0; }
.rd-reglist a { display: flex; flex-direction: column; gap: .3rem; padding: .55rem .55rem .6rem; min-height: 3.4rem; background: #fff; text-decoration: none; color: var(--r-ink); }
.rd-reglist a:hover { background: #ECEBE6; }
.rd-reglist b { font: 700 .66rem/1 var(--r-mono); letter-spacing: .08em; color: var(--r-ink3); }
.rd-reglist span { font: 700 .86rem/1.1 var(--r-sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 760px) { .rd-reglist ol { grid-template-columns: repeat(8, minmax(0, 1fr)); } }

/* ---------------- scenes */
.rd-scene { padding: 2.6rem 0 2.8rem; border-bottom: 1px solid var(--r-rule); scroll-margin-top: .5rem; }
.rd-grid { display: grid; gap: 1.1rem; grid-template-columns: minmax(0, 1fr); }
.rd-k { display: flex; align-items: center; gap: .6rem; margin: 0 0 .6rem; font: 500 .72rem/1 var(--r-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--r-ink3); }
.rd-k b { color: var(--r-ink); font-weight: 700; padding: .22rem .4rem; border: 1px solid currentColor; border-radius: 2px; }
.rd-k span { color: var(--r-ink); font-weight: 700; }
.rd-k i { font-style: normal; }
.rd-copy h2 { font-size: clamp(1.55rem, 3.6vw, 2.25rem); margin: 0 0 .8rem; max-width: 20ch; }
.rd-copy p { font-size: 1.06rem; line-height: 1.6; color: var(--r-ink2); margin: 0 0 .8rem; max-width: 36rem; }
.rd-copy p:last-of-type { margin-bottom: 0; }
.rd-next { margin-top: 1rem !important; font: 600 .74rem/1.3 var(--r-mono) !important; letter-spacing: .06em; text-transform: uppercase; }
.rd-next a { text-decoration: none; color: var(--r-ink3); border-bottom: 1px solid var(--r-rule); padding-bottom: .15rem; }
.rd-next a:hover { color: var(--r-ink); border-color: var(--r-red); }
.rd-next b { color: var(--r-ink); }
.rd-lim { list-style: none; margin: .9rem 0 0; padding: 0; border-top: 2px solid var(--r-ink); max-width: 36rem; }
.rd-lim li { padding: .6rem 0; border-bottom: 1px solid var(--r-rule); font: 400 .98rem/1.5 var(--r-sans); color: var(--r-ink2); }
.rd-lim li b { color: var(--r-ink); }

/* the drawing sheet */
.rd-fig { margin: 0; min-width: 0; }
.rd-sheet { position: relative; overflow: hidden; border: 1px solid var(--r-rule); border-radius: 4px;
  background-color: var(--r-sheet); background-image: linear-gradient(var(--r-graph) 1px, transparent 1px), linear-gradient(90deg, var(--r-graph) 1px, transparent 1px); background-size: 20px 20px; }
.rd-a-wide { aspect-ratio: 4 / 3.15; }
.rd-a-tall { aspect-ratio: 3 / 4.1; }
.rd-a-mid { aspect-ratio: 4 / 4.5; }
@media (min-width: 600px) { .rd-a-wide { aspect-ratio: 16 / 10; } .rd-a-tall { aspect-ratio: 1 / 1.02; } .rd-a-mid { aspect-ratio: 16 / 11.5; } }
.rd-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
[data-scene="arch"] .rd-cv, [data-scene="echoes"] .rd-cv, [data-scene="picture"] .rd-cv { cursor: ew-resize; }
.rd-reg { position: absolute; width: 14px; height: 14px; border: 0 solid var(--r-ink3); pointer-events: none; z-index: 2; }
.rd-reg.g1 { top: 6px; left: 6px; border-top-width: 1.5px; border-left-width: 1.5px; }
.rd-reg.g2 { top: 6px; right: 6px; border-top-width: 1.5px; border-right-width: 1.5px; }
.rd-reg.g3 { bottom: 6px; left: 6px; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.rd-reg.g4 { bottom: 6px; right: 6px; border-bottom-width: 1.5px; border-right-width: 1.5px; }
.rd-chip { position: absolute; top: 7px; left: 26px; z-index: 3; pointer-events: none; font: 700 .58rem/1 var(--r-mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--r-ink); background: var(--r-sheet); border: 1px solid var(--r-ink); border-radius: 2px; padding: .28rem .38rem; }
.rd-alt { margin: 0; padding: 1rem 1.1rem; font: 400 .95rem/1.5 var(--r-sans); color: var(--r-ink2); }
.rd-alt b { display: block; margin-bottom: .3rem; font: 700 .62rem/1 var(--r-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--r-ink3); }
.rd-live .rd-alt { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* without JavaScript (or canvas): the written description in place of the drawing, no controls */
.rd:not(.rd-live) .rd-cv, .rd:not(.rd-live) .rd-ctl, .rd:not(.rd-live) .rd-out, .rd-off .rd-cv, .rd-off .rd-ctl, .rd-off .rd-out { display: none; }
.rd:not(.rd-live) .rd-sheet, .rd-off .rd-sheet { aspect-ratio: auto; padding-top: 1.6rem; }
.rd-off .rd-alt { position: static; width: auto; height: auto; margin: 0; clip: auto; white-space: normal; padding: 1rem 1.1rem; }

/* controls */
.rd-ctl { display: grid; gap: .5rem 1.4rem; margin-top: .7rem; grid-template-columns: minmax(0, 1fr); align-items: end; }
.rd-ctl > .rd-btn { justify-self: start; }
@media (min-width: 600px) { .rd-ctl { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); } }
.rd-range { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: .1rem .6rem; min-width: 0; }
.rd-rl { grid-row: 1; grid-column: 1; font: 600 .68rem/1.3 var(--r-mono); letter-spacing: .07em; text-transform: uppercase; color: var(--r-ink3); }
.rd-rv { grid-row: 1; grid-column: 2; font: 700 .86rem/1 var(--r-mono); font-variant-numeric: tabular-nums; color: var(--r-ink); text-align: right; white-space: nowrap; }
.rd-sym { font-style: normal; text-transform: none; font-family: var(--r-sans); font-size: 1.1em; }
.rd-range input { grid-row: 2; grid-column: 1 / -1; width: 100%; margin: 0; height: 40px; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; touch-action: pan-y; }
.rd-range input::-webkit-slider-runnable-track { height: 4px; background: linear-gradient(90deg, var(--r-ink) 0 1px, transparent 1px) 0 0 / 10% 100% repeat-x, #BFC5CA; border-radius: 2px; }
.rd-range input::-moz-range-track { height: 4px; background: #BFC5CA; border-radius: 2px; }
.rd-range input::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -11px; border-radius: 50%; background: var(--fin, #ADA076); border: 2px solid var(--r-ink); box-shadow: 0 0 0 3px var(--r-sheet), 0 4px 10px -4px rgba(20,24,28,.6); }
.rd-range input::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--fin, #ADA076); border: 2px solid var(--r-ink); box-shadow: 0 0 0 3px var(--r-sheet); }
.rd-range input:focus-visible { outline: none; }
.rd-range input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--r-sheet), 0 0 0 6px var(--r-ink); }
.rd-range input:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px var(--r-sheet), 0 0 0 6px var(--r-ink); }
.rd-btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; padding: .4rem .9rem; border: 1.5px solid var(--r-ink); border-radius: 3px; background: #fff; color: var(--r-ink); font: 700 .86rem/1.1 var(--r-sans); cursor: pointer; }
.rd-btn:hover { background: #ECEBE6; }
.rd-btn:active { transform: translateY(1px); }
.rd-btn:focus-visible, .rd-seg button:focus-visible { outline: 3px solid var(--r-ink); outline-offset: 2px; }
.rd-go { background: var(--r-ink); color: var(--r-sheet); }
.rd-go::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--r-red); box-shadow: 0 0 0 2px rgba(200,49,42,.3); }
.rd-go:hover { background: #262C33; }
.rd-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1.5px solid var(--r-ink); border-radius: 3px; overflow: hidden; background: var(--r-ink); gap: 1px; grid-column: 1 / -1; }
.rd-seg button { min-width: 0; min-height: 44px; padding: .3rem .4rem; border: 0; border-radius: 0; background: #fff; color: var(--r-ink); font: 700 .8rem/1.15 var(--r-sans); cursor: pointer; }
.rd-seg button[aria-pressed="true"] { background: var(--r-ink); color: var(--r-sheet); }
.rd-ticks { display: block; position: relative; height: 2.1rem; margin: -.45rem 13px 0; grid-row: 3; grid-column: 1 / -1; font: 500 .6rem/1.25 var(--r-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--r-ink3); }
.rd-ticks > span { position: absolute; top: 0; left: calc(var(--p) * 100%); transform: translateX(-50%); text-align: center; white-space: nowrap; padding-top: .3rem; }
.rd-ticks > span::before { content: ""; position: absolute; top: 0; left: 50%; width: 1px; height: .25rem; background: var(--r-ink3); }
.rd-ticks > span:first-child { transform: translateX(-13px); text-align: left; }
.rd-ticks > span:first-child::before { left: 13px; }
.rd-ticks > span:last-child { transform: translateX(calc(-100% + 13px)); text-align: right; }
.rd-ticks > span:last-child::before { left: auto; right: 13px; }

/* caption and readout */
.rd-fig figcaption { display: flex; flex-direction: column; gap: .5rem; margin-top: .7rem; font: 400 .74rem/1.45 var(--r-mono); color: var(--r-ink3); }
.rd-fig figcaption b { color: var(--r-ink); font-weight: 700; margin-right: .35rem; }
.rd-out { order: -1; display: block; min-height: 2.9em; padding: .1rem 0 .1rem .65rem; border-left: 3px solid var(--r-red); font: 500 .95rem/1.42 var(--r-sans); color: var(--r-ink); }
.rd-out:empty { display: none; }

/* wide screens: words left (they stay in view), drawing right */
@media (min-width: 980px) {
  .rd-head { padding: 2rem 0 2.6rem; }
  .rd-scene { padding: 3.6rem 0; }
  .rd-grid { grid-template-columns: minmax(0, 22.5rem) minmax(0, 1fr); gap: 3.25rem; align-items: start; }
  .rd-copy { position: sticky; top: calc(var(--head-h) + 1.5rem); }
  .rd-chip { font-size: .62rem; }
}

/* ---------------- after the scenes */
.rd-notes { padding: 3rem 0 2.5rem; border-bottom: 1px solid var(--r-rule); background: var(--r-sheet); }
.rd-notes h2, .rd-faq h2 { font-size: clamp(1.5rem, 3vw, 2rem); padding-bottom: .7rem; border-bottom: 2px solid var(--r-ink); margin: 0; max-width: 46rem; }
.rd-ours { list-style: none; margin: 0; padding: 0; max-width: 46rem; }
.rd-ours li { position: relative; padding: .65rem 0 .65rem 1.6rem; border-bottom: 1px solid var(--r-rule); font: 400 1rem/1.5 var(--r-sans); color: var(--r-ink2); }
.rd-ours li::before { content: "M"; position: absolute; left: 0; top: .8rem; font: 700 .6rem/1 var(--r-mono); color: var(--r-ink); border: 1px solid var(--r-ink); border-radius: 2px; padding: .16rem .22rem; }
.rd-more { margin: 1.2rem 0 0; max-width: 46rem; font: 400 1rem/1.5 var(--r-sans); color: var(--r-ink2); }
.rd-faq { padding: 3rem 0 1rem; }
.rd-faq .faq { border-top: 0; }
.rd-end { padding: 0 0 3rem; }
.rd-buy { max-width: 42rem; }
.rd-buy p { font: 400 1.02rem/1.5 var(--r-sans); color: var(--r-ink2); }
.rd-src { margin-top: 3rem; max-width: 52rem; }
.rd-src h2 { font-size: 1.3rem; padding-bottom: .6rem; border-bottom: 2px solid var(--r-ink); }

/* ---------------- the embed: one scene on another page */
.rd-embed { display: block; max-width: 46rem; margin: 1.5rem 0; }
.rd-embed .rd-fig figcaption b { display: block; margin-bottom: .15rem; font-size: .8rem; }
.rd-embed .rd-fig figcaption a { color: var(--r-ink); }
@media (min-width: 600px) { .rd-embed .rd-a-tall { aspect-ratio: 1 / .95; } }

@media print { .rd-ctl, .rd-next { display: none !important; } }
