/* LXSTAR handset demo - scoped styles. Everything lives under .lxd so it does not touch the rest of your site.
   Colours / fonts: change the variables below. Fonts: the page links Archivo + IBM Plex (Google Fonts); without them it
   falls back to the system fonts. */
.lxd, .lxsv {
  --lxd-bg: #ffffff;
  --lxd-btn: #f3f4f6;
  --lxd-btn-edge: #d6d9de;
  --lxd-ink: #111111;
  --lxd-dim: #5b6270;
  --lxd-accent: #FF3114;        /* ScopeBits orange (the site's #FF3114) */
  --lxd-accent-text: #d92810;   /* the site's orange hover - readable as small text on white */
  --lxd-accent-ink: #ffffff;
  --lxd-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --lxd-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --lxd-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
.lxd {
  background: var(--lxd-bg); color: var(--lxd-ink);
  font-family: inherit; font-size: 15px; line-height: 1.55;
  max-width: 1120px; margin: 0 auto; padding: 28px 16px 40px; box-sizing: border-box;
  display: grid; grid-template-columns: minmax(0, 540px) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start;
}
.lxd *, .lxd *::before, .lxd *::after { box-sizing: border-box; }
@media (max-width: 860px) { .lxd { grid-template-columns: minmax(0, 1fr); } .lxd .lxd-info { padding-top: 0; } }

.lxd .lxd-device { position: relative; width: 100%; max-width: 540px; margin: 0 auto; }
.lxd .lxd-device img { display: block; width: 100%; height: auto; filter: drop-shadow(0 24px 28px #0003); user-select: none; -webkit-user-drag: none; pointer-events: none; }
/* the glass of the render: x 108..634, y 78..428 of 780 x 1050 */
.lxd .lxd-device canvas { position: absolute; left: 13.846%; top: 7.4286%; width: 67.436%; height: 33.333%; display: block;
  border-radius: 1px; touch-action: none; cursor: pointer; background: #000; }

.lxd .lxd-info { display: flex; flex-direction: column; gap: 20px; min-width: 0; padding-top: clamp(0px, 3vw, 40px); }
.lxd .lxd-head { display: flex; flex-direction: column; gap: 6px; }
.lxd .lxd-eyebrow { font-family: inherit; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--lxd-accent-text); }
.lxd h2.lxd-title { font-family: inherit; font-weight: normal; font-size: clamp(28px, 6vw, 42px); line-height: 1.05; margin: 0; letter-spacing: -.01em; text-wrap: balance; color: var(--lxd-ink); }
.lxd .lxd-lede { color: var(--lxd-dim); max-width: 62ch; margin: 0; }

.lxd .lxd-badge { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-family: inherit; font-size: 12px; color: var(--lxd-dim); }
.lxd .lxd-badge b { color: var(--lxd-ink); font-weight: 500; }
.lxd .lxd-led { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #3fbf6a; box-shadow: 0 0 6px #3fbf6a88; margin-right: 6px; vertical-align: 1px; }
.lxd .lxd-led.off { background: #b7bcc6; box-shadow: none; }

.lxd .lxd-controls { display: flex; gap: 10px; flex-wrap: wrap; }
.lxd button.lxd-btn {
  font-family: inherit; font-weight: 700; font-size: 14px; letter-spacing: .02em; line-height: 1.2;
  border-radius: 10px; padding: 11px 16px; border: 1px solid var(--lxd-btn-edge); background: var(--lxd-btn); color: var(--lxd-ink); cursor: pointer; margin: 0;
}
.lxd button.lxd-btn.primary { background: var(--lxd-accent); color: var(--lxd-accent-ink); border-color: var(--lxd-accent); }
.lxd button.lxd-btn:hover { filter: brightness(1.06); }
.lxd button.lxd-btn:focus-visible, .lxd canvas:focus-visible { outline: 2px solid var(--lxd-accent); outline-offset: 3px; }

.lxd .lxd-notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.lxd .lxd-note { min-width: 0; }
.lxd .lxd-note h3 { font-family: inherit; font-size: 15px; font-weight: 700; margin: 0 0 4px; color: var(--lxd-ink); }
.lxd .lxd-note p { margin: 0; color: var(--lxd-dim); font-size: 14px; }
.lxd .lxd-foot { font-family: inherit; font-size: 12px; color: var(--lxd-dim); margin: 0; }
.lxd .lxd-err { color: var(--lxd-accent-text); font-family: inherit; font-size: 13px; }

/* ---- compact handset (beside the SkyView app): only the handset + one status line ---- */
.lxd.lxd-compact { display: block; max-width: 400px; padding: 0; margin: 0 auto; background: transparent; }
.lxd.lxd-compact .lxd-device img { filter: drop-shadow(0 14px 18px #0002); }
.lxd.lxd-compact .lxd-under { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px;
  font-family: inherit; font-size: 12px; color: var(--lxd-dim); }
.lxd.lxd-compact .lxd-under button.lxd-btn { font-size: 13px; padding: 8px 12px; }
.lxd.lxd-compact .lxd-cap { text-align: center; color: var(--lxd-dim); font-size: 13px; margin: 8px 0 0; }

/* ---- SkyView + handset page ---- */
.lxsv { background: var(--lxd-bg); color: var(--lxd-ink); font-family: inherit; font-size: 15px; line-height: 1.55;
  max-width: 1320px; margin: 0 auto; padding: 28px 16px 40px; box-sizing: border-box;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 360px); gap: clamp(20px, 3vw, 44px); align-items: start; }
.lxsv *, .lxsv *::before, .lxsv *::after { box-sizing: border-box; }
.lxsv .lxsv-head { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; max-width: 760px; }
.lxsv .lxd-eyebrow { font-family: inherit; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--lxd-accent-text); }
.lxsv h2.lxd-title { font-family: inherit; font-weight: normal; font-size: clamp(28px, 5vw, 42px); line-height: 1.05; margin: 0; letter-spacing: -.01em; text-wrap: balance; color: var(--lxd-ink); }
.lxsv .lxd-lede { color: var(--lxd-dim); max-width: 66ch; margin: 0; }
/* the app in a simple tablet frame */
.lxsv .lxsv-app { min-width: 0; }
.lxsv .lxsv-frame { background: #16181d; border-radius: 22px; padding: clamp(8px, 1.2vw, 14px); box-shadow: 0 24px 40px -18px #0006; }
.lxsv .lxsv-frame iframe { display: block; width: 100%; aspect-ratio: 16 / 10; min-height: 520px; border: 0; border-radius: 10px; background: #000; }
.lxsv .lxsv-cap { color: var(--lxd-dim); font-size: 13px; margin: 10px 4px 0; }
.lxsv .lxsv-side { min-width: 0; position: sticky; top: 16px; }
@media (max-width: 900px) {
  .lxsv { grid-template-columns: minmax(0, 1fr); }
  .lxsv .lxsv-frame iframe { aspect-ratio: 3 / 4; min-height: 0; }
  .lxsv .lxsv-side { position: static; }
  .lxd.lxd-compact { max-width: 320px; }
}

/* ---- SCREENS EXPLAINED (lxstar-screens.js): the handset with one screen, chapters, the screens of a chapter, the text ---- */
.lxs { --lxd-bg: #ffffff; --lxd-btn: #f3f4f6; --lxd-btn-edge: #d6d9de; --lxd-ink: #111111; --lxd-dim: #5b6270;
  --lxd-accent: #ff6a1a; --lxd-accent-text: #c2410c; --lxd-accent-ink: #ffffff;
  --lxd-display: "Archivo", "Helvetica Neue", Arial, sans-serif; --lxd-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --lxd-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  background: var(--lxd-bg); color: var(--lxd-ink); font-family: inherit; font-size: 15px; line-height: 1.55;
  max-width: 1120px; margin: 0 auto; padding: 24px 16px 32px; box-sizing: border-box; outline: none;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: clamp(20px, 4vw, 52px); align-items: start; }
.lxs .lxs-device { order: 2; }   /* handset on the right (text first); phones: handset on top, see below */
.lxs *, .lxs *::before, .lxs *::after { box-sizing: border-box; }
.lxs .lxs-device { position: relative; width: 100%; max-width: 420px; margin: 0 auto; }
.lxs .lxs-body { display: block; width: 100%; height: auto; filter: drop-shadow(0 20px 24px #0003); user-select: none; -webkit-user-drag: none; }
.lxs .lxs-shot { position: absolute; left: 13.846%; top: 7.4286%; width: 67.436%; height: 33.333%; object-fit: fill; background: #000; border-radius: 1px; }
.lxs .lxs-info { display: flex; flex-direction: column; gap: 16px; min-width: 0; padding-top: clamp(0px, 2vw, 24px); }
.lxs .lxs-chapters, .lxs .lxs-items { display: flex; flex-wrap: wrap; gap: 8px; }
.lxs .lxs-chapters button, .lxs .lxs-items button, .lxs .lxs-nav button {
  font-family: inherit; font-weight: 700; letter-spacing: .02em; line-height: 1.2; cursor: pointer; margin: 0;
  border-radius: 999px; border: 1px solid var(--lxd-btn-edge); background: var(--lxd-btn); color: var(--lxd-ink); }
.lxs .lxs-chapters button { font-size: 14px; padding: 8px 14px; }
.lxs .lxs-chapters button.on { background: var(--lxd-accent); border-color: var(--lxd-accent); color: var(--lxd-accent-ink); }
.lxs .lxs-items { padding-bottom: 14px; border-bottom: 1px dashed var(--lxd-btn-edge); }
.lxs .lxs-items button { font-size: 12.5px; font-weight: 500; font-family: inherit; padding: 5px 11px; background: transparent; }
.lxs .lxs-items button.on { border-color: var(--lxd-accent); color: var(--lxd-accent-text); font-weight: 700; }
.lxs .lxs-count { font-family: inherit; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--lxd-accent-text); }
.lxs h3.lxs-title { font-family: inherit; font-weight: normal; font-size: clamp(24px, 4vw, 34px); line-height: 1.1; margin: 6px 0 10px; color: var(--lxd-ink); text-wrap: balance; }
.lxs .lxs-desc { margin: 0; color: var(--lxd-dim); font-size: 16px; max-width: 60ch; min-height: 7.5em; }
.lxs .lxs-nav { display: flex; gap: 10px; }
.lxs .lxs-nav button { font-size: 14px; padding: 10px 16px; border-radius: 10px; }
.lxs .lxs-nav .lxs-next { background: var(--lxd-accent); border-color: var(--lxd-accent); color: var(--lxd-accent-ink); }
.lxs button:focus-visible { outline: 2px solid var(--lxd-accent); outline-offset: 2px; }
@media (max-width: 820px) { .lxs { grid-template-columns: minmax(0, 1fr); } .lxs .lxs-device { max-width: 340px; order: 0; } .lxs .lxs-desc { min-height: 0; } }

/* ---- ScopeBits site theme (template-style.css): the page's own fonts, headings at normal weight, #FF3114 orange,
   buttons as .orangebtn / .greybtn, chapter tabs as .tab-btn (grey, orange when active) ---- */
.lxd, .lxsv, .lxs { font-family: inherit; }
.lxd h2.lxd-title, .lxsv h2.lxd-title, .lxs h3.lxs-title { color: #111111; line-height: 1.3; letter-spacing: 0; }
.lxd button.lxd-btn, .lxs .lxs-nav button {
  border: none; border-radius: 10px; padding: 12px 20px; font-size: 16px; font-weight: normal; letter-spacing: 0;
  background: #333; color: #ccc; }                                                   /* .greybtn */
.lxd button.lxd-btn.primary, .lxs .lxs-nav .lxs-next { background: #FF3114; color: #ffffff; }   /* .orangebtn */
.lxd.lxd-compact .lxd-under button.lxd-btn { font-size: 14px; padding: 8px 14px; }
.lxs .lxs-chapters button { background: #888; color: #fff; border: none; border-radius: 30px; padding: 10px 18px; font-weight: 600; letter-spacing: 0; font-size: 15px; }   /* .tab-btn */
.lxs .lxs-chapters button.on { background: #FF3114; color: #fff; }
.lxs .lxs-items button { border-radius: 30px; }
.lxs .lxs-items button.on { border-color: #FF3114; color: #d92810; font-weight: 600; }
.lxd .lxd-eyebrow, .lxsv .lxd-eyebrow, .lxs .lxs-count { letter-spacing: .08em; font-size: 13px; }
.lxs .lxs-desc { font-size: 1.1rem; line-height: 1.5; color: #444; }

/* ---- SkyView in a tablet (user: "looks like it is just an enlargement of the handset screen"): an iPad-style body -
   aluminium edge, black glass bezel, front camera, side buttons, a soft reflection; landscape 4:3, portrait on phones ---- */
.lxsv .lxsv-frame {
  position: relative; background: #0d0f12; border-radius: clamp(22px, 3vw, 38px);
  padding: clamp(14px, 2.2vw, 26px);
  box-shadow:
    0 0 0 2px #2b2e33,                    /* the glass edge */
    0 0 0 5px #b9bdc4,                    /* aluminium band */
    0 0 0 6px #8e939b,
    0 30px 50px -22px #0007, 0 10px 18px -10px #0004;
  margin: 6px;                            /* room for the band */
}
.lxsv .lxsv-frame::before {               /* front camera, centred on the long edge (landscape: the left bezel) */
  content: ""; position: absolute; left: clamp(5px, 0.9vw, 10px); top: 50%; width: 7px; height: 7px; margin-top: -3.5px;
  border-radius: 50%; background: radial-gradient(circle at 35% 35%, #3a4552 0 25%, #11161c 60%); box-shadow: 0 0 0 1px #1e2328;
}
.lxsv .lxsv-frame::after {                /* top buttons on the aluminium band, and a faint glass reflection */
  content: ""; position: absolute; top: -8px; right: 16%; width: 46px; height: 3px; border-radius: 2px; background: #a4a9b1;
  box-shadow: -64px 0 0 #a4a9b1;
}
.lxsv .lxsv-frame iframe { aspect-ratio: 4 / 3; min-height: 480px; border-radius: 6px; }
.lxsv .lxsv-app { position: relative; }
.lxsv .lxsv-app::after {                  /* glass reflection over the bezel only (never over the app) */
  content: ""; pointer-events: none; position: absolute; inset: 6px 6px auto 6px; height: clamp(14px, 2.2vw, 26px);
  border-radius: clamp(22px, 3vw, 38px) clamp(22px, 3vw, 38px) 0 0; background: linear-gradient(180deg, #ffffff14, #ffffff00);
}
@media (max-width: 900px) {
  .lxsv .lxsv-frame::before { left: 50%; top: clamp(5px, 0.9vw, 10px); margin-top: 0; margin-left: -3.5px; }   /* portrait: camera on top */
  .lxsv .lxsv-frame iframe { aspect-ratio: 3 / 4; min-height: 0; }
}
/* tablet proportions (user: "looks a little high"): a real iPad in landscape is about 1.43:1 (2360 x 1640), with thinner
   bezels than our first try */
.lxsv .lxsv-frame { padding: clamp(10px, 1.5vw, 18px); border-radius: clamp(20px, 2.6vw, 32px); }
.lxsv .lxsv-frame iframe { aspect-ratio: 1.43 / 1; min-height: 400px; }
.lxsv .lxsv-app::after { height: clamp(10px, 1.5vw, 18px); }
@media (max-width: 900px) { .lxsv .lxsv-frame iframe { aspect-ratio: 1 / 1.3; min-height: 0; } }
/* the tablet gets the room (user: "make the handset a little smaller, and the iPad a bit bigger") - the SkyView align
   popup needs about 640 px of height to show without a scroll bar */
.lxsv { max-width: 1440px; grid-template-columns: minmax(0, 1fr) minmax(200px, 290px); }
.lxsv .lxsv-frame iframe { min-height: 600px; }
.lxd.lxd-compact { max-width: 290px; }
@media (max-width: 900px) { .lxsv .lxsv-frame iframe { min-height: 0; } .lxd.lxd-compact { max-width: 300px; } }
/* the tablet shows SkyView exactly as an iPad would (user: "now it looks too tall"): the app runs in an iPad-sized
   viewport (1180 x 820 CSS px landscape, 820 x 1180 portrait) and the whole screen is scaled to the frame - fixed iPad
   proportions at any page width, nothing cropped, no scroll bars. lxstar-demo.js adds .lxsv-screen and sets the scale. */
.lxsv .lxsv-screen { position: relative; width: 100%; aspect-ratio: 1180 / 820; overflow: hidden; border-radius: 6px; background: #000; }
.lxsv .lxsv-screen iframe { position: absolute; left: 0; top: 0; width: 1180px; height: 820px; min-height: 0; aspect-ratio: auto;
  transform-origin: 0 0; border: 0; border-radius: 0; }
@media (max-width: 900px) {
  .lxsv .lxsv-screen { aspect-ratio: 820 / 1180; }
  .lxsv .lxsv-screen iframe { width: 820px; height: 1180px; }
}
@media (max-width: 900px) { .lxsv { grid-template-columns: minmax(0, 1fr); } }   /* phones: one column (after the wider-tablet rule above) */
