/* /demo (owner, 2026-11-15): the home page's demo set, as large as one
   screen allows, with a drawn remote beside it (under it below 1000 px).
   The remote is our own drawing of a slim aluminium remote: a clickpad
   ring with up, down, left, right and select, then back, power, and a
   channel rocker. Every key is a real button. Loaded after home.css,
   whose set, bezel, and guide styles it uses. */

.dmo {
  --rm-w: 164px; --rm-gap: 32px; --head: 112px;
  /* The set: as wide as the window allows beside the remote, and short
     enough that the set fits under the header and the headline. */
  --tv-w: min(1240px, 100vw - 48px - var(--rm-w) - var(--rm-gap), (100svh - var(--hdr-h) - var(--head) - var(--pad) - var(--bz-h) - 14px) * 1.7778 + 2 * var(--pad));
  padding: 14px 24px 32px;
}
.dmo-head { max-width: calc(var(--tv-w) + var(--rm-w) + var(--rm-gap)); margin: 0 auto 12px; }
.dmo-h1 { margin: 0; font-size: clamp(24px, 2.2vw, 34px); line-height: 1.05; text-wrap: balance; }
.dmo-say { margin: 6px 0 0; font: 600 16px/1.4 var(--f-site); color: var(--cream); }
.dmo-keys { color: var(--lilac); font-weight: 500; }
.dmo-off { display: none; margin: 6px 0 0; color: var(--lilac); }
@media (scripting: none) { .dmo-off { display: block; } .dmo-say { display: none; } }

.dmo-stage { display: grid; grid-template-columns: var(--tv-w) var(--rm-w); gap: 0 var(--rm-gap); justify-content: center; align-items: center; position: relative; }
.dmo-set { min-width: 0; }
.dmo .tv { width: 100%; }
/* The theme dial and the card stay in the page for keyboards and screen
   readers; the set's THEME button and More panel change the theme. */
.dmo .dial, .dmo .nx-note { display: none; }
.dmo .nx-card { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.dmo-full { position: absolute; right: 0; top: -52px; min-height: 44px; padding: 0 14px; border: 1px solid #07060A; border-radius: 7px; cursor: pointer;
  color: #E9E3CC; font: 800 13px/1 var(--f-site); font-stretch: 75%; letter-spacing: .1em; text-transform: uppercase;
  background: linear-gradient(180deg, #34303F, #2A2735 45%, #1D1B26); box-shadow: inset 0 1px 0 rgb(255 255 255 / .12), 0 2px 0 #07060A; }

/* The remote: a slim brushed-metal bar. */
.remote { position: relative; display: grid; justify-items: center; gap: 18px; width: var(--rm-w); padding: 20px 14px 28px; border-radius: 30px;
  background: linear-gradient(90deg, #A9ACB3, #D6D8DD 30%, #C7C9CF 70%, #9EA1A8), #C3C5CB;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .6), inset 0 -2px 0 rgb(0 0 0 / .25), 0 24px 40px -12px rgb(0 0 0 / .7); }
.remote[hidden] { display: none; }
.rm-b { position: relative; display: grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0; border: 0; cursor: pointer; color: #E9E9EE;
  background-color: #1B1B1F;
  font: 700 11px/1 var(--f-site); letter-spacing: .04em; -webkit-tap-highlight-color: transparent; }
.rm-l { pointer-events: none; }
.rm-b:focus-visible { outline: 3px solid var(--spite); outline-offset: 2px; box-shadow: 0 0 0 2px var(--deep); z-index: 1; }
.rm-power { width: 44px; height: 44px; border-radius: 50%; justify-self: end; background-image: radial-gradient(circle at 40% 35%, #3A3A42, #1B1B1F 70%); }
/* The clickpad: a dark disc; the four edges and the centre are buttons. */
.rm-pad { position: relative; width: 132px; height: 132px; }
.rm-pad .rm-l { font-size: 11px; }
.rm-ring { position: absolute; inset: 0; width: 100%; height: 100%; }
/* Each key 44 x 44 px on the disc's own colour. */
.rm-pad .rm-b { position: absolute; width: 44px; height: 44px; border-radius: 12px; }
.rm-up { left: 44px; top: 0; }
.rm-down { left: 44px; bottom: 0; }
.rm-left { left: 0; top: 44px; }
.rm-right { right: 0; top: 44px; }
.rm-select { left: 44px; top: 44px; border-radius: 50%; background-color: #26262B; }
.rm-row { display: grid; justify-items: center; gap: 14px; }
.rm-back { width: 48px; height: 48px; border-radius: 50%; background-image: radial-gradient(circle at 40% 35%, #3A3A42, #1B1B1F 70%); }
.rm-rocker { display: grid; width: 48px; border-radius: 24px; overflow: hidden; background: linear-gradient(#2A2A30, #1B1B1F); box-shadow: 0 1px 0 rgb(255 255 255 / .4); }
.rm-chu, .rm-chd { width: 48px; height: 52px; background-color: #222227; }
.rm-chu { border-bottom: 1px solid #000; }
/* Pressed: the key sinks and lights. */
.rm-b:active, .rm-b.is-down { color: #FFB23E; }
.rm-power:active, .rm-power.is-down, .rm-back:active, .rm-back.is-down { box-shadow: inset 0 2px 5px rgb(0 0 0 / .8); }
.rm-pad .rm-b:active, .rm-pad .rm-b.is-down, .rm-rocker .rm-b:active, .rm-rocker .rm-b.is-down { background-color: #3B3022; }
.rm-select:active, .rm-select.is-down { background-color: #4A3A22; }

.dmo-foot { max-width: calc(var(--tv-w) + var(--rm-w) + var(--rm-gap)); margin: 18px auto 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.dmo-pd { margin: 0; color: var(--lilac); font-size: 15px; }
.dmo-pd a { display: inline-flex; align-items: center; min-height: 44px; }
.dmo-beta { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; font: 800 20px/1.1 var(--f-site); font-stretch: 70%; text-transform: uppercase; color: var(--spite); }

/* Full screen: the set and the remote fill the screen. */
.dmo-stage:fullscreen { background: var(--deep); align-content: center; padding: 24px;
  --tv-w: min(100vw - 48px - var(--rm-w) - var(--rm-gap), (100vh - 48px - var(--pad) - var(--bz-h) - 14px) * 1.7778 + 2 * var(--pad)); }
.dmo-stage:fullscreen .dmo-full { top: 16px; right: 16px; }

/* Under 1000 px: the set full width, the remote under it, laid sideways. */
@media (max-width: 999px) {
  .dmo { --tv-w: 100%; padding: 12px 16px 28px; }
  .dmo-stage { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .dmo-full { position: static; justify-self: end; order: -1; }
  .remote { width: auto; justify-self: center; grid-template-columns: auto auto auto; align-items: center; gap: 22px; padding: 12px 22px; border-radius: 26px; }
  .rm-power { justify-self: center; }
  .rm-row { grid-auto-flow: column; }
  .rm-rocker { grid-auto-flow: column; width: auto; }
  .rm-chu { border-bottom: 0; border-right: 1px solid #000; }
}
@media (max-width: 600px) {
  .dmo-h1 { font-size: 22px; }
  .dmo-say { font-size: 15px; }
  .remote { gap: 14px; padding: 10px 14px; }
  .dmo-foot { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 360px) {
  .remote { gap: 10px; padding: 10px 10px; }
  .rm-row { grid-auto-flow: row; gap: 8px; }
  .rm-rocker { grid-auto-flow: row; }
  .rm-chu { border-right: 0; border-bottom: 1px solid #000; }
  .rm-chu, .rm-chd { width: 44px; }
  .rm-back { width: 44px; height: 44px; }
}
@media (pointer: coarse) { .dmo-keys { display: none; } }
@media (scripting: none) { .remote, .dmo-full { display: none !important; } }

/* /demo reads as one full-width screen: the header and footer run at the
   set's 24 px gutters. */
.demo-page .hdr .wrap, .demo-page .ftr .wrap { max-width: none; padding: 0 24px; }
.dmo-foot { margin-top: 40px; }
/* The set's keys stay together with one gap on a narrow set. */
@media (max-width: 820px) { .dmo .bz-keys { justify-content: center; gap: 8px; } }
