/* =============================================================================
   appstar.css - one stylesheet for the APPSTAR page: the live handset demo
   (appstar-demo.js) and the guide to the keypad (same file).
   Built on touchstar.css so both product pages look the same.
   Everything is scoped to .appstar and the custom properties are --as-*, so it
   can sit inside the site's page without touching the site's own styles.
   Light only, to sit on the site's white background. Fonts and headings
   (h1-h6) come from the site.
   ============================================================================= */
.appstar {
  --as-bg: #ffffff;                 /* the page: white, like the site */
  --as-panel: #f1f2f4;              /* text boxes, cards, the step tip, buttons */
  --as-ink: #16181c; --as-muted: #5d636d; --as-line: #dfe2e6;
  --as-accent: #e85a0c; --as-accent-ink: #ffffff; --as-accent-soft: #fde5d6; --as-bezel: #141517;
}

/* ---------------------------------------------------------------- base */
.appstar { background: var(--as-bg); color: var(--as-ink); text-align: left;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 28px 18px; }
.appstar *, .appstar *::before, .appstar *::after { box-sizing: border-box; }
.appstar img { max-width: 100%; }
.appstar .as-wrap { max-width: 1200px; margin: 0 auto; display: grid; gap: 64px; }
/* headings (h1-h6) are left entirely to the site's own styles */
.appstar p { margin: 0; }
.appstar section { display: grid; gap: 22px; scroll-margin-top: 16px; }
.appstar .as-intro { display: grid; gap: 6px; max-width: 70ch; }
.appstar .as-intro p { color: var(--as-muted); }
.appstar [hidden] { display: none !important; }

/* buttons: pill (Sound, Restart) and segmented (Autostar 2 / 3 preview) */
.appstar .as-btn { font-weight: 600; font-size: .95rem; font-family: inherit; color: var(--as-ink); background: var(--as-panel); border: 1px solid var(--as-line);
  border-radius: 999px; padding: 8px 18px; cursor: pointer; }
.appstar .as-btn:hover:not(:disabled) { border-color: var(--as-accent); }
.appstar .as-btn[aria-pressed="true"] { background: var(--as-accent-soft); border-color: var(--as-accent); }
.appstar .as-seg { font-weight: 600; font-size: .86rem; font-family: inherit; color: var(--as-ink); background: var(--as-bg); border: 1px solid var(--as-line);
  border-radius: 999px; padding: 5px 13px; cursor: pointer; }
.appstar .as-seg[aria-pressed="true"] { background: var(--as-accent); color: var(--as-accent-ink); border-color: var(--as-accent); }
.appstar a:focus-visible, .appstar button:focus-visible, .appstar .card:focus-visible { outline: 2px solid var(--as-accent); outline-offset: 2px; }

/* =============================================================================
   LIVE DEMO: the real APPSTAR handset page in a phone, talking to a simulated
   APPSTAR and telescope (handset/appstar-sim.js).
   ============================================================================= */
.appstar .as-bench { display: grid; gap: 18px; justify-items: center; }
.appstar .as-phone { position: relative; width: min(100%, 360px); aspect-ratio: 9 / 18.5; background: var(--as-bezel);
  border-radius: 44px; padding: 14px; box-shadow: 0 18px 30px rgba(0,0,0,.25); }
.appstar .as-phone::before { content: ""; position: absolute; top: 5px; left: 50%; width: 64px; height: 4px; margin-left: -32px;
  border-radius: 4px; background: #2b2d31; }
.appstar .as-phone { display: flex; flex-direction: column; }
.appstar .as-screen { position: relative; flex: 1; min-height: 0; overflow: hidden; border-radius: 0 0 32px 32px; background: #000; }
.appstar .as-phone iframe { position: absolute; left: 0; top: 0; width: 100%; height: 100%; border: 0; background: #000; display: block; transform-origin: 0 0; }
/* the browser's address bar, so it's clear which page the phone is showing */
.appstar .as-addr { margin: 4px 0 0; padding: 7px 12px 6px; border-radius: 32px 32px 0 0; background: #232529; color: #c9ccd1;
  font-size: .74rem; font-family: inherit; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appstar .as-phone.bfy .as-addr { order: 2; margin: 0 0 4px; border-radius: 0 0 32px 32px; }
.appstar .as-phone.bfy .as-screen { border-radius: 32px 32px 0 0; }
.appstar .as-addr::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #8b929c; margin-right: 7px; vertical-align: 1px; }

/* Bluetooth / Wi-Fi switch */
.appstar .as-modes { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.appstar .as-mode { display: grid; gap: 1px; text-align: center; font-family: inherit; color: var(--as-ink); background: var(--as-panel);
  border: 1px solid var(--as-line); border-radius: 14px; padding: 8px 16px; cursor: pointer; min-width: 190px; }
.appstar .as-mode b { font-weight: 600; font-size: .95rem; }
.appstar .as-mode small { font-size: .8rem; color: var(--as-muted); }
.appstar .as-mode:hover { border-color: var(--as-accent); }
.appstar .as-mode[aria-pressed="true"] { background: var(--as-accent); border-color: var(--as-accent); color: var(--as-accent-ink); }
.appstar .as-mode[aria-pressed="true"] small { color: var(--as-accent-ink); opacity: .9; }
.appstar .as-under { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: center; }
.appstar .as-demofoot { display: grid; gap: 12px; width: 100%; max-width: 560px; justify-items: center; }
.appstar .as-small { color: var(--as-muted); font-size: .9rem; text-align: center; }

/* the one-step-at-a-time tip above the demo */
.appstar .as-tip { width: 100%; max-width: 760px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 18px; align-items: center;
  padding: 12px 18px; background: var(--as-panel); border: 1px solid var(--as-accent); border-radius: 14px; }
.appstar .as-dots { display: flex; gap: 6px; grid-row: span 2; }
.appstar .as-dots span { width: 1.9rem; height: 1.9rem; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .95rem; font-family: inherit;
  color: var(--as-muted); background: var(--as-bg); border: 1px solid var(--as-line); transition: background .3s, color .3s, border-color .3s; }
.appstar .as-dots span.done { color: var(--as-accent); border-color: var(--as-accent); }
.appstar .as-dots span.now { background: var(--as-accent); color: var(--as-accent-ink); border-color: var(--as-accent); }
.appstar .as-tip b { font-weight: 600; font-size: 1.1rem; font-family: inherit; letter-spacing: .02em; }
.appstar .as-tip b small { font-weight: 600; font-size: .75rem; font-family: inherit; letter-spacing: .1em; text-transform: uppercase; color: var(--as-accent); margin-right: 8px; }
.appstar .as-tip p { color: var(--as-muted); }
.appstar .as-tip.flash { animation: as-flash .6s ease; }
@keyframes as-flash { from { background: var(--as-accent-soft); } to { background: var(--as-panel); } }
@media (max-width: 560px) { .appstar .as-tip { grid-template-columns: minmax(0, 1fr); } .appstar .as-dots { grid-row: auto; } }

/* =============================================================================
   GUIDE: still picture of the keypad with numbered markers, linked both ways
   to the explanation cards.
   ============================================================================= */
.appstar .split { display: grid; grid-template-columns: minmax(250px, 360px) minmax(0, 1fr); gap: 36px; align-items: start; }
.appstar .stick { position: sticky; top: max(16px, env(safe-area-inset-top, 0px)); display: grid; gap: 12px; justify-items: center; }
@media (max-width: 820px) { .appstar .split { grid-template-columns: minmax(0, 1fr); } .appstar .stick { position: static; } }

.appstar .shot { position: relative; width: min(100%, 320px); margin: 0 auto; background: var(--as-bezel); border-radius: 40px; padding: 12px;
  box-shadow: 0 16px 24px rgba(0,0,0,.25); }
.appstar .shot .scr { position: relative; aspect-ratio: 390 / 780; border-radius: 30px; background: #000; }   /* markers may overhang the edge */
.appstar .shot .scr img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 30px; transition: opacity .3s; }
.appstar .spot { position: absolute; border: 2px solid transparent; border-radius: 8px; cursor: pointer; background: none; padding: 0;
  transition: border-color .2s, background .2s; }
.appstar .spot b { position: absolute; left: -9px; top: -9px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: .72rem; font-family: inherit; background: var(--as-accent); color: var(--as-accent-ink); box-shadow: 0 1px 3px rgba(0,0,0,.5); }
.appstar .spot:hover, .appstar .spot.on { border-color: #ffb27d; background: rgba(255,122,46,.16); }
.appstar .caption { color: var(--as-muted); font-size: .88rem; text-align: center; max-width: 34ch; }

.appstar .cards { display: grid; gap: 12px; min-width: 0; }
.appstar .card { position: relative; display: grid; gap: 4px; padding: 16px 18px 16px 64px; background: var(--as-panel);
  border: 1px solid var(--as-line); border-radius: 14px; transition: border-color .2s, background .2s; }
.appstar .card > .n { position: absolute; left: 18px; top: 14px; width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: .95rem; font-family: inherit; background: var(--as-bg); color: var(--as-muted); border: 1px solid var(--as-line); }
.appstar .card.on { border-color: var(--as-accent); }
.appstar .card.on > .n { background: var(--as-accent); color: var(--as-accent-ink); border-color: var(--as-accent); }
.appstar .card p { color: var(--as-muted); }
.appstar .opts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.appstar .tag { font-weight: 600; font-size: .78rem; font-family: inherit; letter-spacing: .06em; text-transform: uppercase; color: var(--as-ink);
  border: 1px solid var(--as-line); border-radius: 6px; padding: 2px 8px; background: var(--as-bg); }
.appstar .tag.led { border-color: var(--as-accent); color: var(--as-accent); }
.appstar .tbl { overflow-x: auto; }
.appstar .keymap { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: .92rem; }
.appstar .keymap th, .appstar .keymap td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--as-line); }
.appstar .keymap th { font-weight: 600; font-size: .78rem; font-family: inherit; letter-spacing: .06em; text-transform: uppercase; color: var(--as-muted); }
.appstar .keymap td:first-child { font-family: inherit; font-weight: 600; }

.appstar .good { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.appstar .good div { background: var(--as-panel); border: 1px solid var(--as-line); border-radius: 14px; padding: 16px 18px; display: grid; gap: 4px; align-content: start; }
.appstar .good p { color: var(--as-muted); }

@media (prefers-reduced-motion: reduce) {
  .appstar .as-tip.flash { animation: none; }
}
