/* The homepage's live demo (#demo, public/assets/dashboard-demo.js): a browser window on desktop, a
   black Galaxy S-series phone on small screens. Uses the homepage's own tokens (--surface, --brand...). */
.dash-tabs { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.dash-tab { background: var(--surface); border: 1px solid var(--border-strong); color: var(--text-muted); font: inherit; font-size: 14px; font-weight: 700; padding: 10px 18px; min-width: 168px; border-radius: 999px; cursor: pointer; }
.dash-tab:hover { color: var(--text); }
.dash-tab[aria-selected="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.dash-tab .tab-short { display: none; }
.dash-frame { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 14px; box-shadow: 0 24px 60px -24px rgba(28, 25, 23, 0.35), var(--shadow); overflow: hidden; }
.dash-browser-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #f7f8fa; border-bottom: 1px solid #eceef1; }
.dash-dots { display: none; }
.dash-dots span { width: 12px; height: 12px; border-radius: 50%; }
.dash-dots span:nth-child(1) { background: #ff5f57; }
.dash-dots span:nth-child(2) { background: #febc2e; }
.dash-dots span:nth-child(3) { background: #28c840; }
.dash-nav { display: flex; align-items: center; gap: 6px; flex-shrink: 0; color: #5f6368; }
.dash-nav svg { width: 18px; height: 18px; padding: 3px; box-sizing: content-box; }
.dash-nav .dash-nav-dim { color: #b6bcc4; }
.dash-url { flex: 1; min-width: 0; background: #e9ecf0; border: 1px solid transparent; border-radius: 999px; padding: 6px 14px; font-size: 13px; color: #1f2328; display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; }
.dash-url > svg { width: 12px; height: 12px; flex-shrink: 0; color: #5f6368; }
.dash-url-path { color: #6b7280; }
.dash-url > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dash-phone-top { display: none; }
.dash-screen { position: relative; aspect-ratio: 16 / 10; background: #fff; overflow: hidden; }
.dash-play { position: absolute; inset: 0; z-index: 3; width: 100%; border: 0; padding: 0; margin: 0; background: linear-gradient(180deg, rgba(255,255,255,0.55), rgba(28,25,23,0.35)); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); cursor: pointer; display: flex; align-items: center; justify-content: center; font: inherit; }
.dash-play-pill { display: inline-flex; align-items: center; gap: 10px; background: var(--brand); color: var(--brand-ink); font-weight: 800; font-size: 16px; padding: 14px 24px; border-radius: 999px; box-shadow: 0 10px 30px -8px rgba(0,0,0,0.45); transition: transform 0.15s, background 0.15s; }
.dash-play-pill svg { width: 18px; height: 18px; }
.dash-play:hover .dash-play-pill, .dash-play:focus-visible .dash-play-pill { background: var(--brand-hover); transform: scale(1.04); }
.dash-screen.is-active .dash-play { display: none; }
/* The pages render at a fixed logical size and are scaled to the frame - see fit() */
/* A pixel wider than the screen on each side: the scale rounds down, and the screen behind must never show as a sliver down the edges. */
.dash-iframe { position: absolute; top: 0; left: -1px; z-index: 1; display: block; width: calc(var(--dash-base-w, 1280px) + 3px); height: calc(var(--dash-base-h, 800px) + 2px); border: 0; background: #fff; transform-origin: 0 0; transform: scale(var(--dash-scale, 1)); }
.dash-screen.is-loading .dash-iframe { opacity: 0; }
.demo-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-top: 16px; }
.demo-caption { margin: 0; max-width: 720px; color: var(--text-muted); font-size: 15px; }
.demo-caption strong { color: var(--text); }
.dash-open { margin: 0; font-size: 14px; white-space: nowrap; }
.dash-open a { color: var(--brand); font-weight: 700; text-decoration: none; }
.dash-open a:hover { text-decoration: underline; }
@media (max-width: 600px) {
  .dash-tab { font-size: 13px; padding: 9px 14px; min-width: 0; flex: 1 1 auto; }
  /* Phone: a black Galaxy S-series. Thin black bezels (a slightly deeper chin), a bright metal edge
     line around a dark frame, a centred punch-hole camera, volume + Bixby buttons on the left, power on the right */
  .dash-frame { position: relative; overflow: visible; max-width: 292px; margin: 0 auto; border: 5px solid #08090b; border-bottom-width: 8px; border-top-width: 6px; border-radius: 30px; box-shadow: 0 0 0 1px #1c1e22, 0 0 0 2px #9ea2a8, 0 0 0 3px #2c2f34, 0 30px 60px -22px rgba(16, 24, 40, 0.55); }
  .dash-frame::before, .dash-frame::after { content: ""; position: absolute; width: 3px; border-radius: 2px; }
  .dash-frame::before { left: -11px; top: 92px; height: 110px; background: linear-gradient(#4a4d53 0 58px, transparent 58px 72px, #4a4d53 72px 98px, transparent 98px); }
  .dash-frame::after { right: -11px; top: 126px; height: 40px; background: linear-gradient(90deg, #3a3d42, #6c7076 50%, #2a2d31); border-radius: 0 2px 2px 0; }
  /* Under the status bar, the phone's own browser address bar (no back/forward/reload, like Chrome on Android). */
  .dash-frame { display: flex; flex-direction: column; }
  .dash-phone-top { order: -1; }
  .dash-browser-bar { padding: 4px 10px 6px; background: #fff; border-bottom: 1px solid #eceef1; }
  .dash-browser-bar .dash-nav { display: none; }
  .dash-url { padding: 5px 12px; font-size: 11.5px; gap: 6px; }
  .dash-url > svg { width: 10px; height: 10px; }
  .dash-phone-top { display: flex; align-items: center; justify-content: space-between; height: 30px; padding: 2px 18px 0; background: #fff; border-radius: 25px 25px 0 0; font-size: 11px; font-weight: 700; color: #1f2328; position: relative; }
  .dash-phone-top::before { content: ""; position: absolute; left: 50%; top: 7px; transform: translateX(-50%); width: 11px; height: 11px; border-radius: 50%; background: #08090b; box-shadow: inset 0 0 0 2px #1d2024, 0 0 0 1px #e9ebee; }
  .dash-phone-top .dash-phone-status { display: flex; gap: 4px; align-items: center; }
  .dash-phone-top svg { width: 14px; height: 12px; }
  .dash-screen { border-radius: 0 0 24px 24px; aspect-ratio: 1 / 2; }
  .dash-play-pill { font-size: 14px; padding: 12px 18px; }
  /* One segmented control: three equal segments in a single pill, short one-line labels. */
  .dash-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; padding: 4px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 999px; }
  .dash-tab { min-width: 0; padding: 9px 4px; font-size: 14px; line-height: 1.2; white-space: nowrap; border: 0; border-radius: 999px; background: transparent; }
  .dash-tab[aria-selected="true"] { background: var(--brand); color: var(--brand-ink); }
  .dash-tab .tab-long { display: none; }
  .dash-tab .tab-short { display: inline; }
  .demo-foot { justify-content: center; text-align: center; }
}

/* The hero's guided-tour menu (public/index.html #heroMenu, public/assets/demo-tours.js). */
.dash-menu { position: absolute; inset: 0; z-index: 4; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(14, 27, 46, 0.42); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.dash-menu[hidden], .dash-screen.is-active .dash-menu { display: none; }
.dash-menu-card { width: 100%; max-width: 520px; max-height: 100%; overflow: auto; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.5); padding: 22px; }
.dash-menu-title { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.dash-menu-sub { margin: 2px 0 14px; font-size: 14px; color: var(--text-muted); }
.dash-menu-list { display: grid; gap: 8px; }
.dash-menu-list button { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.dash-menu-list button:hover, .dash-menu-list button:focus-visible { border-color: var(--brand); background: var(--brand-soft); }
.dash-menu-list i { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); }
.dash-menu-list i svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dash-menu-list span { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.dash-menu-list b { font-size: 15px; }
.dash-menu-list small { font-size: 13px; color: var(--text-faint); }
.dash-menu-list button::after { content: "\25B6"; margin-left: auto; font-size: 11px; color: var(--brand); }
.dash-menu-list button.seen::after { content: "\2713"; font-size: 14px; font-weight: 800; color: var(--ok); }

/* A stand-in for Stripe's checkout (always light, like the real one). */
@media (max-width: 600px) {
  .dash-menu { padding: 10px; }
  .dash-menu-card { padding: 14px 12px; border-radius: 14px; display: flex; flex-direction: column; justify-content: center; }
  .dash-menu-title { font-size: 17px; }
  .dash-menu-sub { font-size: 12.5px; margin-bottom: 10px; }
  .dash-menu-list { gap: 6px; }
  .dash-menu-list button { gap: 9px; padding: 8px 9px; }
  .dash-menu-list i { width: 30px; height: 30px; border-radius: 8px; }
  .dash-menu-list i svg { width: 16px; height: 16px; }
  .dash-menu-list b { font-size: 13.5px; }
  .dash-menu-list small { display: none; }
  .dash-menu-list button::after { display: none; }
}
