/* The home page: the TV is the page (DESIGN 33). The live guide in a set with
   its own buttons, a decade dial under it, a now-showing card beside it.
   Everything else stays quiet. Loaded after the site stylesheet. */

.nx {
  --card-w: 272px; --gap: 32px; --pad: 14px; --bz-h: 48px; --top-h: 80px;
  --plastic: #1C1A24; --plastic-2: #0F0E15; --plastic-edge: #3A3747; --key: #2A2735; --key-2: #1D1B26; --key-ink: #E9E3CC;
  --amber: #FFB23E; --amber-dim: #B5894A; --glass: #0A0910; --needle: #FF3B2F;
  /* The set: as wide as the window allows beside the card, and short
     enough that the set and the dial's names fit under the header and the
     headline. The 84 px: the cabinet's top edge, the stand, the dial's
     legend, and the dial down to its names. In a short window the set
     keeps 832 px where the width allows: a narrower screen would take the
     taller tablet layout. */
  --tv-w: min(1240px, 100vw - 48px - var(--card-w) - var(--gap), max(832px, (100svh - var(--hdr-h) - var(--top-h) - var(--bz-h) - 84px) * 1.7778 + 2 * var(--pad)));
  background:
    radial-gradient(ellipse 70% 55% at 42% 38%, rgb(74 68 198 / .38), transparent 70%),
    linear-gradient(var(--ink), #0B0826 85%);
  padding: 0 0 8px;
}

/* The first screen (owner, 2026-11-15): what the app is and what it runs
   on. The h1, the tagline, one sentence and the button on the left; a flat
   TV with the real Apple TV capture, on a low console with a drawn Apple TV
   box and remote, on the right; the three steps under both. Static: the
   same with scripts off. */
.hero {
  display: grid; align-items: center; gap: 20px 56px; max-width: 1320px; margin: 0 auto;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-areas: "text fig" "steps steps";
  padding: clamp(24px, 5svh, 56px) 32px 28px;
}
.hero-text { grid-area: text; }
.hero-h1 { margin: 0; font-size: clamp(40px, 4.6vw, 72px); line-height: .92; text-wrap: balance; }
.hero-tag { margin: 14px 0 0; font: 800 clamp(24px, 2.2vw, 34px)/1 var(--f-site); font-stretch: 70%; text-transform: uppercase; color: var(--cream); letter-spacing: .01em; }
.hero-what { margin: 18px 0 0; max-width: 34ch; font: 500 clamp(17px, 1.4vw, 21px)/1.45 var(--f-site); color: var(--lilac); }
.hero-go { margin: 24px 0 0; }
.hero-btn { font-size: 18px; min-height: 52px; }
.hero-fig { grid-area: fig; margin: 0; }
/* A flat set: a thin dark bezel round the capture. */
.hero-tv { padding: 7px; border-radius: 8px; background: linear-gradient(#26232E, #0B0A0F); box-shadow: 0 0 0 1px #3A3747, 0 28px 50px -16px rgb(0 0 0 / .7); }
.hero-shot { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 2px; background: #000; }
/* The console, the set's foot, the box and the remote: one drawing. */
.hero-atv { display: block; width: 100%; height: auto; margin-top: -1px; }
.a-neck { fill: #0E0D13; }
.a-foot { fill: #2A2230; }
.a-shadow { fill: #000; opacity: .35; }
.a-top { fill: #3A2E3A; }
.a-front { fill: #241C26; }
.a-seam { stroke: #140F16; stroke-width: 3; fill: none; }
.a-leg { fill: #120E14; }
.a-box { fill: #2C2C31; stroke: #48484F; stroke-width: 1.5; }
.a-box-top { fill: #4A4A52; stroke: #5C5C64; stroke-width: 1; }
.a-led { fill: #F2F2F2; }
.a-remote { fill: #C9CBD0; stroke: #8D9097; stroke-width: 1; }
.a-pad { fill: #DADCE0; stroke: #9A9DA4; stroke-width: 1; }
.a-pad-c { fill: #B8BBC1; }
.a-key { fill: #3A3B40; }
.hero-cap { margin: 8px 0 0; font-size: 15px; color: var(--lilac); text-align: center; }
.hero-steps { grid-area: steps; list-style: none; margin: 8px 0 0; padding: 0; display: flex; justify-content: center; align-items: center; gap: 12px 0;
  font: 700 17px/1.2 var(--f-site); color: var(--cream); }
.hero-steps li { position: relative; display: flex; align-items: center; padding: 10px 16px; border: 2px solid var(--rule); border-radius: 6px; background: rgb(13 10 42 / .6); text-align: center; }
.hero-steps li + li::before { content: "\2192" / ""; position: absolute; right: 100%; margin-right: 2px; width: 40px; text-align: center; color: var(--spite); font-size: 22px; }
.hero-steps li + li { margin-left: 40px; }

/* Under 1000 px: one column, the h1 first. The set narrows so the whole
   first screen still fits a tablet held upright. */
@media (max-width: 999px) {
  .hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "text" "fig" "steps"; gap: 22px; padding: 28px 32px 24px; }
  .hero-what { max-width: 46ch; }
  .hero-fig { width: min(100%, 600px, (100svh - 560px) * 1.5); min-width: min(100%, 300px); justify-self: center; }
}
@media (max-width: 600px) {
  .hero { gap: 16px; padding: 18px 16px 20px; }
  .hero-h1 { font-size: clamp(34px, 9.4vw, 44px); }
  .hero-tag { margin-top: 10px; font-size: 23px; }
  .hero-what { margin-top: 12px; font-size: 16px; }
  .hero-go { margin-top: 16px; }
  .hero-btn { width: 100%; }
  .hero-fig { width: 100%; }
  .hero-tv { padding: 4px; border-radius: 6px; }
  .hero-cap { font-size: 13px; margin-top: 4px; }
  .hero-steps { margin: 0; gap: 0; font-size: 13px; align-items: stretch; }
  .hero-steps li { flex: 1 1 0; justify-content: center; padding: 6px 6px; border-width: 1px; }
  .hero-steps li + li { margin-left: 20px; }
  .hero-steps li + li::before { width: 20px; margin-right: 1px; font-size: 16px; }
}
/* Under 360 px the button's one line is wider than the screen: let it wrap. */
@media (max-width: 359px) {
  .hero-btn { white-space: normal; text-align: center; line-height: 1.15; padding: 10px 16px; }
}

/* The demo: its heading, set, card, dial. */
.nx-stage {
  display: grid; justify-content: center; column-gap: var(--gap);
  grid-template-columns: var(--tv-w) var(--card-w);
  grid-template-areas: "top ." "tv card" "dial ." "note .";
  padding: 0 24px;
}
.nx-top { grid-area: top; min-height: var(--top-h); display: flex; flex-direction: column; justify-content: flex-end; padding: 2px 0 8px; }
.nx-h2 { margin: 0; font-size: clamp(26px, 2.4vw, 36px); }

/* The set */
.nx .tv { grid-area: tv; width: 100%; margin: 0; }
.nx .tv:focus { outline: none; }
.nx .tv-cab { border-radius: 18px 18px 14px 14px; padding: var(--pad) var(--pad) 0;
  background: linear-gradient(180deg, #24212E, var(--plastic) 30%, var(--plastic-2));
  box-shadow: inset 0 1px 0 var(--plastic-edge), inset 0 -2px 0 #07060A, 0 30px 60px -10px rgb(0 0 0 / .65), 0 0 0 1px #07060A; }
/* The cabinet ring shows only for focus inside the screen; the buttons
   have their own. */
.nx .tv-cab:focus-within { box-shadow: inset 0 1px 0 var(--plastic-edge), 0 30px 60px -10px rgb(0 0 0 / .65), 0 0 0 1px #07060A; }
.nx .tv-cab:has(.screen :focus-visible, #tv-screen:focus-visible) { box-shadow: 0 0 0 3px var(--deep), 0 0 0 6px var(--spite), 0 30px 60px -10px rgb(0 0 0 / .65); }
.nx .screen { border-radius: 6px; box-shadow: 0 0 0 2px #050408, 0 0 0 5px #24212E; }
.nx .tv-stand { width: 22%; height: 6px; margin: 0 auto; background: linear-gradient(#17151E, #0A090E); border-radius: 0 0 10px 10px; box-shadow: 0 10px 18px rgb(0 0 0 / .45); }
.nx .p, .nx .g-ch { cursor: pointer; }
.nx .tv:not([data-state="guide"]) .p { cursor: default; }
/* The tune static is dark: no bright frame. */
.nx .tv-tuning { background-color: #161616; }
.nx .tv-tuning canvas { filter: brightness(.45) contrast(.9); }

/* The bezel: the set's own buttons, under the screen. */
.bezel { position: relative; height: var(--bz-h); display: flex; align-items: center; gap: 16px; padding: 0 6px 0 4px; }
.bz-plate { font: 800 15px/1 var(--f-site); font-stretch: 70%; letter-spacing: .12em; text-transform: uppercase; color: #ABA6BD;
  text-shadow: 0 -1px 0 #000, 0 1px 0 rgb(255 255 255 / .06); margin-right: auto; padding-left: 8px; }
.bz-keys { display: flex; align-items: center; gap: 8px; }
.bz { min-width: 52px; min-height: 44px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid #07060A; border-radius: 7px; cursor: pointer; color: var(--key-ink);
  font: 800 13px/1 var(--f-site); font-stretch: 75%; letter-spacing: .1em;
  background: linear-gradient(180deg, #34303F, var(--key) 45%, var(--key-2));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .12), 0 2px 0 #07060A, 0 3px 6px rgb(0 0 0 / .4); }
.bz:hover { background: linear-gradient(180deg, #3C3849, #312D3E 45%, #221F2C); }
.bz:active, .bz[aria-expanded="true"] { transform: translateY(2px); box-shadow: inset 0 2px 4px rgb(0 0 0 / .6), 0 0 0 #07060A; }
.bz-word { min-width: 76px; }
.bz-small { min-width: 60px; font-size: 12px; color: #B9B3C9; }
/* The CH arrows: a small printed triangle beside the word. */
.bz-a { width: 0; height: 0; border: 5px solid transparent; border-top: 7px solid currentColor; border-bottom-width: 0; }
.bz-a.bz-up { border-top-width: 0; border-bottom: 7px solid currentColor; }
.bz-a.bz-left, .bz-a.bz-right { border: 5px solid transparent; }
.bz-a.bz-left { border-left-width: 0; border-right: 7px solid currentColor; }
.bz-a.bz-right { border-right-width: 0; border-left: 7px solid currentColor; }
/* The time rocker: Earlier and Later beside a printed TIME. */
.bz-time { display: flex; align-items: center; gap: 4px; }
.bz-t { min-width: 44px; padding: 0; }
.bz-tlabel { font: 800 12px/1 var(--f-site); font-stretch: 75%; letter-spacing: .12em; color: #ABA6BD; padding: 0 2px; }
.bz-theme-item { display: none; }
.nx .tv-led { position: static; flex: none; width: 7px; height: 7px; margin: 0 6px 0 4px; }

/* More: a small panel above its button with Motion, Full screen, Power. */
.bz-more { position: relative; }
.bz-menu { position: absolute; right: 0; bottom: calc(100% + 10px); z-index: 20; min-width: 180px; padding: 6px; display: grid; gap: 4px;
  background: var(--plastic); border: 1px solid var(--plastic-edge); border-radius: 10px; box-shadow: 0 16px 30px rgb(0 0 0 / .55); }
.bz-item { min-height: 44px; padding: 0 12px 0 32px; position: relative; text-align: left; border: 0; border-radius: 6px; background: transparent; color: var(--cream);
  font: 600 15px/1.2 var(--f-site); cursor: pointer; }
.bz-item:hover { background: var(--key); }
.bz-item[aria-pressed]::before { content: ""; position: absolute; left: 12px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%;
  background: var(--led-off); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .2); }
.bz-item[aria-pressed="true"]::before { background: var(--led); box-shadow: 0 0 6px var(--led); }
.tv:is(:fullscreen, [data-full]) .bezel, .tv:is(:fullscreen, [data-full]) .tv-stand { display: none; }
.nx .tv:is(:fullscreen, [data-full]) .tv-cab { padding: 0; border-radius: 0; box-shadow: none; background: #000; }
.nx .tv:is(:fullscreen, [data-full]) .screen { border-radius: 0; box-shadow: none; }

/* The now-showing card: beside the set, one line at a time. */
.nx-card { grid-area: card; align-self: start; position: relative; margin-top: 10px; padding: 18px 20px 16px;
  background: linear-gradient(180deg, #13306A, #0E2552); color: var(--cream); border-radius: 4px;
  box-shadow: inset 1px 1px 0 #58759E, inset -1px -1px 0 #0A1C36, 0 18px 30px -8px rgb(0 0 0 / .55); }
.nx-card::before { content: ""; position: absolute; left: -12px; top: 30px; border: 6px solid transparent; border-right-color: #13306A; }
.nx-card-label { margin: 0 0 10px; display: flex; align-items: center; gap: 8px; font: 800 13px/1 var(--f-site); font-stretch: 75%; letter-spacing: .14em;
  text-transform: uppercase; color: var(--spite); }
.nx-card-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--now); box-shadow: 0 0 6px var(--now); }
.nx-card-ch { margin-left: auto; color: #A8C8E8; letter-spacing: .06em; }
.nx-card-line { margin: 0; font: 600 19px/1.4 var(--f-site); min-height: 4.2em; }
.nx-card-more { margin: 10px 0 0; font-size: 15px; }
.nx-card-more a { display: inline-flex; align-items: center; min-height: 44px; }
.nx-card-more:not(:has(a:not([hidden]))) { display: none; }
.nx-card-static, .nx-still { display: none; }
/* With the module a short (narrow) program shows its title cut with an
   ellipsis; a cell with room for fewer than three letters and the
   ellipsis (the module sets data-tiny) shows none. The name stays in
   aria-label. */
.nx #tv-grid[role="grid"] .p.narrow:not([data-tiny]) .t { visibility: visible; }
.nx .p[data-tiny] .t { visibility: hidden; }

/* The decade dial: a tuning window with a needle. Six radios. */
.dial { grid-area: dial; justify-self: center; width: min(100%, 760px); margin: 4px 0 0; }
.dial-set { border: 0; margin: 0; padding: 0; min-width: 0; }
.dial-legend { padding: 0; margin: 0 auto 4px; font: 800 13px/1 var(--f-site); font-stretch: 75%; letter-spacing: .14em; text-transform: uppercase; color: var(--lilac); }
.dial-face { --at: 0; position: relative; isolation: isolate; display: grid; grid-template-columns: repeat(6, 1fr); padding: 18px 6px 8px; border-radius: 12px;
  background: var(--glass);
  box-shadow: inset 0 2px 10px rgb(0 0 0 / .9), inset 0 0 0 1px rgb(255 255 255 / .05), 0 0 0 5px #2A2733, 0 0 0 6px #4A4657, 0 0 0 7px #0A090E, 0 14px 24px rgb(0 0 0 / .5); }
/* The printed scale: fine ticks, and a long one over each stop. */
.dial-face::before { content: ""; position: absolute; left: 6px; right: 6px; top: 5px; height: 12px; pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgb(255 178 62 / .35) 0 1px, transparent 1px calc(100% / 36)) 0 2px / 100% 7px no-repeat,
    repeating-linear-gradient(90deg, rgb(255 178 62 / .6) 0 1px, transparent 1px calc(100% / 6)) calc(100% / 12) 0 / 100% 10px no-repeat; }
.dial-face::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  z-index: -1; background: radial-gradient(ellipse at 50% 120%, rgb(255 178 62 / .14), transparent 70%); }
.dial-stop { position: relative; display: grid; justify-items: center; align-content: start; gap: 4px; padding: 4px 2px 0; min-height: 44px; cursor: pointer;
  color: var(--amber-dim); text-align: center; }
.dial-stop input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.dial-name { font: 800 15px/1.05 var(--f-site); font-stretch: 70%; letter-spacing: .08em; text-transform: uppercase; }
.dial-tier { font: 700 12px/1 var(--f-site); letter-spacing: .14em; text-transform: uppercase; color: #6FCF7F; }
.dial-stop:hover { color: #D79A45; }
.dial-stop:has(:checked) { color: var(--amber); text-shadow: 0 0 10px rgb(255 178 62 / .6); }
.dial-stop:has(:focus-visible) { outline: 3px solid var(--spite); outline-offset: 2px; border-radius: 6px; }
.dial-needle { position: absolute; top: 2px; height: 17px; left: calc((var(--at) + .5) * (100% - 12px) / 6 + 6px); width: 3px; margin-left: -1.5px; pointer-events: none;
  background: var(--needle); border-radius: 2px; box-shadow: 0 0 8px rgb(255 59 47 / .8);
  transition: left .45s cubic-bezier(.3, 1.35, .5, 1); }
.dial-face:has([value="cable-box"]:checked) { --at: 1; } .dial-face:has([value="satellite"]:checked) { --at: 2; }
.dial-face:has([value="motel"]:checked) { --at: 3; } .dial-face:has([value="y2k"]:checked) { --at: 4; }
.dial-face:has([value="modern"]:checked) { --at: 5; }
/* "Premium" under the five paid stops, as one printed bracket, its word
   on the line of 1998's "Free". */
.dial-bracket { position: absolute; left: calc(100% / 2 + 10px); right: 10px; bottom: 22px; height: 7px; border: 1px solid rgb(255 178 62 / .4); border-top: 0;
  pointer-events: none; font: 700 12px/1 var(--f-site); letter-spacing: .14em; text-transform: uppercase; color: var(--amber-dim); text-align: center; }
/* The word sits on the bracket's line, on the glass. */
.dial-bracket { display: flex; justify-content: center; align-items: flex-end; }
.dial-bracket span { margin-bottom: -6px; padding: 0 8px; background: var(--glass); }
.dial-go { display: none; }
.nx-note { grid-area: note; margin: 18px 0 0; text-align: center; font-size: 14px; color: var(--lilac); }

/* Below the first screen: one short section in the owner's lines. */
.nx-more { max-width: 1120px; margin: 72px auto 0; padding: 0 24px 24px; }
.nx-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.nx-col h2 { margin: 0 0 12px; font-size: clamp(26px, 2.4vw, 34px); }
.nx-col p { margin: 0 0 12px; color: var(--lilac); }
.nx-col-plain p { color: var(--cream); }
.nx-links { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 32px; font-weight: 700; }
.nx-links a { display: inline-flex; align-items: center; min-height: 44px; }
.nx-cta { margin: 24px 0 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 24px; }
.nx-last { margin: 0; font-weight: 700; color: var(--cream); }

/* One column under 1000 px: the set is full width, the card under it. */
@media (max-width: 999px) {
  .nx { --tv-w: 100%; --top-h: 0px; }
  .nx-stage { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "tv" "card" "dial" "note"; padding: 0 16px; }
  .nx-top { padding: 20px 0 16px; }
  .nx-card { margin-top: 18px; }
  .nx-card::before { left: 30px; top: -12px; border-right-color: transparent; border-bottom-color: #13306A; }
  .nx-card-line { min-height: 0; }
  .nx-cols { grid-template-columns: 1fr; gap: 8px; }
  .nx-more { margin-top: 48px; }
}
/* A narrow set (a phone) gets a taller screen: exactly 7 rows of 44 px
   under the 14 px info line and time bar, not 4. The set's container is
   the screen plus its two 6 px sides. */
@container tv (max-width: 612px) { .nx .screen { aspect-ratio: auto; height: 338px; } }
@container screen (max-width: 600px) { .nx .guide { --grid-h: 324px; } }
/* Phones: the time bar, clock and info times at 12 px or more. */
@container screen (max-width: 600px) {
  .nx .g-bar th, .nx .g-clock, .nx .g-info-meta { font-size: 12px; }
}
/* Touch layout on tablets (design audit M4): a screen 601 to 800 px wide,
   or a coarse pointer under 1100 px, gets 44 px rows, larger text, and a
   4:3 screen. Phones keep the 7-row layout above. */
@container screen (min-width: 601px) and (max-width: 800px) {
  .nx .guide { --padx: 0px; --pady: 0px; --mins: 90; --ch-w: 22cqw; --head-h: 28px; --foot-h: 0px; --bar-h: 24px;
    --grid-h: calc(75cqw - 28px); --row-h: 44px; grid-template-areas: "info clock" "grid grid" "grid grid"; grid-template-columns: 1fr auto;
    grid-template-rows: minmax(28px, auto) minmax(0, 1fr) 0px; column-gap: 8px; font-size: 15px; }
  .nx :is(.g-preview, .g-info-ch, .g-info-sum, .g-tag) { display: none; }
  .nx :is(.g-info, .tv[data-theme="y2k"] .g-info) { display: flex; gap: 10px; align-items: center; background: var(--tbar); color: var(--tbar-text);
    padding: 0 8px; margin: 0; min-height: 28px; height: auto; border-radius: 0; white-space: nowrap; overflow: hidden; }
  .nx .g-info-title { font-size: 15px; margin: 0 !important; overflow: hidden; text-overflow: ellipsis; }
  .nx :is(.g-info-meta, .g-clock, .g-bar th) { font-size: 14px; color: inherit; }
  .nx .g-clock { align-self: center; padding-right: 8px; }
  .nx .g-ch { white-space: normal; line-height: 1.05; }
  .nx .g-scroll { align-self: start; height: calc(var(--bar-h) + round(down, 100% - var(--bar-h) + 2px, 44px)); }
}
@container tv (min-width: 613px) and (max-width: 812px) { .nx .screen { aspect-ratio: 4 / 3; } }
@container tv (min-width: 613px) {
  @media (pointer: coarse) and (max-width: 1099px) { .nx .screen { aspect-ratio: 4 / 3; } }
}
@container screen (min-width: 801px) {
  @media (pointer: coarse) and (max-width: 1099px) {
    .nx .guide { --padx: 0px; --pady: 0px; --mins: 90; --ch-w: 20cqw; --head-h: 28px; --foot-h: 0px; --bar-h: 24px;
      --grid-h: calc(75cqw - 28px); --row-h: 44px; grid-template-areas: "info clock" "grid grid" "grid grid"; grid-template-columns: 1fr auto;
      grid-template-rows: minmax(28px, auto) minmax(0, 1fr) 0px; column-gap: 8px; font-size: 15px; }
    .nx :is(.g-preview, .g-info-ch, .g-info-sum, .g-tag) { display: none; }
    .nx :is(.g-info, .tv[data-theme="y2k"] .g-info) { display: flex; gap: 10px; align-items: center; background: var(--tbar); color: var(--tbar-text);
      padding: 0 8px; margin: 0; min-height: 28px; height: auto; border-radius: 0; white-space: nowrap; overflow: hidden; }
    .nx .g-info-title { font-size: 15px; margin: 0 !important; overflow: hidden; text-overflow: ellipsis; }
    .nx :is(.g-info-meta, .g-clock, .g-bar th) { font-size: 14px; color: inherit; }
    .nx .g-clock { align-self: center; padding-right: 8px; }
    .nx .g-ch { white-space: normal; line-height: 1.05; }
    .nx .g-scroll { align-self: start; height: calc(var(--bar-h) + round(down, 100% - var(--bar-h) + 2px, 44px)); }
  }
}
/* Short windows in one column: the set scales by height. */
@media (max-width: 999px) and (max-height: 559px) { .nx .tv { max-width: calc((100svh - 70px) * 1.6); justify-self: center; } }

/* A narrow set: the bezel drops its nameplate, TIME label and power
   light, and THEME moves into More, so the buttons fit at 320 px. */
@media (max-width: 820px) {
  .bz-plate, .bz-tlabel, .bz-theme, .nx .tv-led { display: none; }
  .bz-theme-item { display: block; }
  .bezel { justify-content: center; gap: 0; padding: 0 2px; }
  .bz-keys { gap: 6px; width: 100%; justify-content: space-between; }
  .bz { min-width: 44px; padding: 0 9px; }
  .bz-word { min-width: 0; }
  .bz-time { gap: 6px; }
}

/* Phones: the set goes edge to edge. */
@media (max-width: 600px) {
  .nx { --pad: 6px; --bz-h: 60px; }
  .nx-stage { padding: 0 8px; }
  .nx-top { padding: 14px 8px 12px; }
  .nx-h2 { font-size: 26px; }
  .nx .tv-cab { border-radius: 12px; }
  .nx-card, .dial, .nx-note { margin-left: 8px; margin-right: 8px; width: auto; }
  .nx-card { padding: 14px 16px 12px; }
  .nx-card-line { font-size: 17px; }
  .dial { margin-top: 22px; }
  /* Names may take two lines here: the bracket goes back under them. */
  .dial-face { padding: 22px 2px 26px; }
  .dial-name { font-size: 13px; letter-spacing: .04em; }
  .dial-bracket { left: calc(100% / 2 + 4px); right: 4px; bottom: 10px; }
}
/* Short phones (an iPhone SE): 5 rows, so the set's buttons stay in the
   first screen. */
@media (max-width: 600px) and (max-height: 700px) {
  .nx .screen { height: 250px; }
  .nx .guide { --grid-h: 236px; }
  .nx-top { padding-top: 10px; }
}
@media (max-width: 360px) {
  .bz { padding: 0 5px; gap: 3px; font-size: 12px; letter-spacing: .04em; }
  .bz-keys, .bz-time { gap: 3px; }
  .dial-name { font-size: 12px; }
  /* Every key keeps 44 x 44 px with its label inside (verify V5): the
     row wraps when the set is too narrow for all six. */
  .bezel { height: auto; min-height: var(--bz-h); padding: 4px 2px; }
  .bz-keys { flex-wrap: wrap; justify-content: center; row-gap: 4px; }
  .bz, .bz-word { min-width: 44px; flex: none; }
}

/* Reduced motion, or the Motion switch off: the needle jumps. */
@media (prefers-reduced-motion: reduce) { .dial-needle { transition: none; } }

/* Scripts off: the real 1998 capture fills the screen, the card holds one
   fixed line, and the controls that need the module are left out. */
@media (scripting: none) {
  .nx .bezel, .dial, .nx .guide, .nx-card-line, .nx-card-ch { display: none; }
  .nx .tv-cab { padding-bottom: var(--pad); }
  .nx .screen { aspect-ratio: 16 / 9; height: auto; }
  .nx-still { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .nx-card-static { display: block; margin: 0; font: 600 19px/1.4 var(--f-site); }
}

/* The guide cell with keyboard focus gets a ring as well as its fill
   (a11y audit A3). */
.nx .p:focus-visible, .nx .g-ch:focus-visible { outline: 3px solid #F3ECD2; outline-offset: -3px; }
