From c00ce6a58ded7db32cb5e2330b46837ae5ba2d57 Mon Sep 17 00:00:00 2001 From: Mehboob Khan Date: Wed, 2 Sep 2026 23:00:44 +0500 Subject: [PATCH] Replace Mobile SDK hero demo with the Guardian explorer widget MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ports the 9-tab Guardian Mobile SDK phone-demo mockup (mobile-sdk.html) into a React component and swaps it into #mobile-sdk-demo-mount in place of ThreatDemosSlider, keeping the site's real header/nav/footer around it. - Adds voiceover per module, spoken via speechSynthesis and paced to the actual speech (each step waits for its utterance to finish before advancing, instead of a fixed guess at timing), plus a per-module mute toggle and a spoken announcement on tab click. - Never autoplays — playback only starts on an explicit tap, matching the rest of the embedded demos on the site. - Enhances the Location safety zones module with a full create-a- boundary -> leave-the-zone -> notified-of-the-alert flow (banner, breach-colored geofence, updated activity feed). - Layout polish: floating/glow phone, centred max-width content, fading tab-strip edges; fixes a CSS grid min-width bug that blew the hero out to ~1450px on narrow viewports. Co-Authored-By: Claude Sonnet 5 --- src/demo/mobile-sdk.html | 1289 +++++++++++++++++++++++++ src/site/SiteApp.tsx | 8 +- src/site/demos/MobileSdkExplorer.tsx | 451 +++++++++ src/site/demos/mobileSdkExplorer.css | 301 ++++++ src/site/demos/mobileSdkExplorer.html | 597 ++++++++++++ src/site/styles.css | 27 + src/vite-env.d.ts | 5 + 7 files changed, 2674 insertions(+), 4 deletions(-) create mode 100644 src/demo/mobile-sdk.html create mode 100644 src/site/demos/MobileSdkExplorer.tsx create mode 100644 src/site/demos/mobileSdkExplorer.css create mode 100644 src/site/demos/mobileSdkExplorer.html diff --git a/src/demo/mobile-sdk.html b/src/demo/mobile-sdk.html new file mode 100644 index 0000000..eb02ab3 --- /dev/null +++ b/src/demo/mobile-sdk.html @@ -0,0 +1,1289 @@ + + + + + +Guardian Mobile SDK — BlackDice + + + + + + + +
+
+ Guardian Mobile SDK +

Consumer-grade protection,
inside your own app

+

Guardian ships as a drop-in Android & iOS SDK. Nine on-device protection modules, + one safety score, and a UI layer your subscribers actually understand — all white-labelled to your brand.

+
+ + +
+
+
9Protection modules
+
< 4 MBBinary footprint
+
On-deviceSignal processing
+
Android + iOSNative SDKs
+
+
+
+ +
+
+
+

Watch each module work

+

Nine demo reels recorded from the Guardian reference build. Each one runs the real flow — + a typosquat getting blocked, a scam call being labelled, a geofence firing — and loops.

+
+ +
+ + + + + + + + + +
+ + +
+
+
+ Demo +
+
14:54
+
+
+ +

Hi, Jason

+
+
Here's how you're protected today.
+
+
+
+ + + + +
81/100Safety score
+
+
▲ 12 since last check ›
+
Last check you were at 81.
+
+
How to improve
+
Device trust
Good

Your device is verified and up to date.

+
Apps & permissions
Good

No risky app permissions detected.

+
Wi-Fi security
Good

BT-T5F97X — Low risk.

+
+
+
+
Home
+
Protection
+
Identity
+
Settings
+
+
+
+
+
+ +
+ 0:00/0:07 + +
+

+
+
+ Module 01 · Home +

One number your subscribers understand

+

Guardian collapses every protection signal on the handset into a single 0–100 safety score, + with a delta against the previous check so users can see the effect of acting on advice. Underneath it, + each contributing module reports its own plain-English status — no jargon, no CVE numbers, no dead ends.

+
What the module exposes
+
    +
  • Composite score — 0–100, weighted across all enabled modules
  • +
  • Delta since last check — signed change plus the previous value
  • +
  • Per-module status — Good / Attention / At risk, each with a one-line reason
  • +
  • Remediation queue — ordered, tappable actions behind "How to improve"
  • +
+
score.observe()score.deltascore.breakdown[]
+
+
+ + +
+
+
+ Demo +
+
14:47
+
+
+ +

Hi, Jason

+
+
Here's how you're protected today.
+
+
+
+ + +
93/100Safety score
+
▲ 12 since last check ›
+
Last check you were at 81.
+
+
How to improve
+
Safe browsing
Good

Safe browsing is on — 0 unsafe requests blocked today.

+
Calls
Good

No scam calls today.

+
SIM & carrier
Good
+
+
+
+
Home
+
Protection
+
Identity
+
Settings
+
+
+
+
+
+ +
+ 0:00/0:07 + +
+

+
+
+ Module 02 · Protection tab +

Network and telephony threats in one view

+

The Protection tab groups the modules that defend the connection itself — DNS filtering, + scam-call screening and SIM integrity. Each card is a live status with today's counts, and taps + through to a detail screen with the underlying event log.

+
What the module exposes
+
    +
  • Safe browsing status — on/off plus unsafe requests blocked today
  • +
  • Call screening status — scam calls flagged in the current period
  • +
  • SIM integrity status — swap detection state
  • +
  • Drill-down events — timestamped log per module for support and dispute handling
  • +
+
protection.summary()protection.events()
+
+
+ + +
+
+
+ Demo +
+
14:52
+
+

Safe browsing

+
+
+
DNS-level phishing
protection
+
+
285Blocked today
+
1116Requests today
+
+
+
Refresh
+
Blocked today
+
+
+
whtaspp-group.pages.dev
2 Sep, 14:51
+ Blocked +
+
fxjn-web-whatsapp.hk.cn
2 Sep, 14:50
Blocked
+
malicious.com
2 Sep, 12:31
Blocked
+
+
+
+
+
+
+ +
+ 0:00/0:08 + +
+

+
+
+ Module 03 · Safe browsing +

Malicious DNS detection

+

Guardian resolves DNS through a filtering layer that scores every lookup against + live phishing, malware and command-and-control intelligence. Lookalike domains — the + whtaspp-group and fxjn-web-whatsapp class of + typosquats — are blocked before the handset ever opens a connection. The user sees a plain list of what + was stopped and when, which is what turns a silent security control into something they'll pay for.

+
What the module exposes
+
    +
  • Blocked / total counts — per day, per device, with on-demand refresh
  • +
  • Blocked-domain log — domain, timestamp, verdict and threat category
  • +
  • Live verdicts — subscribe to block events as they happen
  • +
  • Allow-list control — user or operator override for false positives
  • +
+
safeBrowsing.stats()safeBrowsing.blocked()safeBrowsing.allow(domain)
+
+
+ + +
+
+
+ Demo +
+
15:05
+
+ +
+
+
07813996004Incoming call · unknown number
+ Checking… +
+ +
+
+
+
How was that… • now +
+
07813996004
+ ⌄ +
+
SpamScamOK
+
✓ Reported — thanks, that helps everyone
+
+ +
+
+
+ + +
93/100Safety score
+
▲ 12 since last check ›
+
Last check you were at 81.
+
+
How to improve
+
Safe browsing
Good

Safe browsing is on — 288 unsafe requests blocked today.

+
+
+
+
+
+ +
+ 0:00/0:09 + +
+

+
+
+ Module 04 · Call screening +

Scam call warnings, rated by the user

+

Guardian screens inbound numbers against reputation intelligence and warns before the + user engages. Immediately after the call ends, a heads-up prompt asks how it went — + Spam, Scam or OK. That one tap is the feedback loop: it feeds a crowd-sourced + reputation graph that sharpens detection for every other subscriber on your network.

+
What the module exposes
+
    +
  • Pre-answer verdict — reputation score and category for the calling number
  • +
  • Post-call prompt — Spam / Scam / OK, returned as a user report
  • +
  • Daily scam count — feeds the Calls card on the Protection tab
  • +
  • Network learning — reports aggregate into shared reputation intelligence
  • +
+
calls.verdict(msisdn)calls.report(verdict)calls.today()
+
+
+ + +
+
+
+ Demo +
+
15:09
+
+

SIM & carrier

+
+
+
Checking SIM status…
+

Reading phone state.

+
+
+
DETAILS
+
CarrierEE
+
SIM slotsSingle SIM
+
Previous changeNone on record
+
+
+
+
+
+
+ +
+ 0:00/0:06 + +
+

+
+
+ Module 05 · SIM integrity +

SIM-swap detection at the device layer

+

SIM swap is the pivot for most account-takeover fraud: move the number, intercept the OTP, + drain the account. Guardian watches phone-state on the handset and records carrier, slot configuration + and any change event — so a swap is detected from the victim's own device, independently of the + network-side signal, and can be surfaced to your fraud team in real time.

+
What the module exposes
+
    +
  • Change verdict — whether a SIM change has been detected
  • +
  • Carrier and slot state — current operator, single vs dual SIM
  • +
  • Change history — timestamp of the previous change, or none on record
  • +
  • Out-of-band alerting — routed to the recovery email, not just an on-device toast
  • +
+
sim.state()sim.onChange()sim.history()
+
+
+ + +
+
+
+ Demo +
+
15:11
+
+

Apps & permissions

+
+

We scan installed apps for permissions fraudsters commonly abuse. Tap a card to see which apps hold it.

+
+
MicrophoneHigh
Can turn on your microphone.
1 app · 1 to review
+
Phone stateMedium
Can read your phone number and call state.
1 app · all accepted
+
ContactsMedium
Can read your contacts list.
1 app · 1 to review
+
Post notificationsLow
Can post notifications to your device.
1 app · all accepted
+
Scan again
+
+
+
+
+
+ +
+ 0:00/0:08 + +
+

+
+
+ Module 06 · Apps & permissions +

Permission risk, ranked by how fraud actually works

+

Rather than dumping the full Android permission table on the user, Guardian scans installed + apps for the specific grants fraudsters abuse and ranks them High / Medium / Low. Each card explains the + capability in one sentence — "can turn on your microphone" — and tapping it reveals exactly which apps + hold that grant, with a review-or-accept decision the user can actually make.

+
What the module exposes
+
    +
  • Risk-ranked permission set — High / Medium / Low against a fraud-abuse model
  • +
  • Holder attribution — which installed apps hold each grant
  • +
  • Review state — per-permission accepted vs still to review
  • +
  • On-demand rescan — user-triggered, results feed the safety score
  • +
+
permissions.scan()permissions.holders(p)permissions.accept(p)
+
+
+ + +
+
+
+ Demo +
+
14:55
+
+

Location safety zones

+
+
+ + + + + + + + + + + + + + + Pos Penitipan + Paket Balaikota + + Google +
+
+
📍
1 zone configured1 active
+
+
Zones+ Add
+
+
📍
+
Jakarta Town Hall200m radius
+ Active✕ +
+
Recent activity
+
No recent events
+
+
→
+
Entered Jakarta Town Hall2 Sep, 14:58
+
+
+
+
+
+
+ +
+ 0:00/0:08 + +
+

+
+
+ Module 07 · Location safety zones +

Geofences the user sets themselves

+

Users define named zones with a radius — home, school, a parent's address — and Guardian + reports arrival and departure against them. It's the consumer-friendly half of location intelligence: + the same signal that flags impossible travel for your fraud engine is presented here as reassurance + rather than surveillance, with the user in control of every zone.

+
What the module exposes
+
    +
  • Zone CRUD — create, activate, delete named zones with a metre radius
  • +
  • Enter / exit events — timestamped, per zone
  • +
  • Impossible-travel signal — feeds the Identity tab's Location status
  • +
  • Configured / active counts — summary for the zone list header
  • +
+
zones.add(name, latLng, r)zones.events()zones.list()
+
+
+ + +
+
+
+ Demo +
+
14:54
+
+
+ +

Hi, Jason

+
+
Here's how you're protected today.
+
+
+
+ + +
93/100Safety score
+
▲ 12 since last check ›
+
Last check you were at 81.
+
+
How to improve
+
+
Location
Checking…
+

Comparing against travel history.

+
+
+
Identity monitoring
Checking…
+

Querying breach corpora.

+
+
+
+
Home
+
Protection
+
Identity
+
Settings
+
+
+
+
+
+ +
+ 0:00/0:07 + +
+

+
+
+ Module 08 · Identity +

Breach exposure and travel anomalies

+

The Identity tab pairs two long-running checks: continuous breach monitoring for the + identifiers the user has registered, and behavioural location analysis that flags travel patterns + inconsistent with the device's history. Both report as plain status lines — "no breaches found", + "no unusual travel detected" — and both escalate out-of-band when they don't.

+
What the module exposes
+
    +
  • Monitored identity count — registered emails and numbers under watch
  • +
  • Breach findings — source, date and exposed field classes
  • +
  • Travel anomaly verdict — impossible-travel and velocity checks
  • +
  • Escalation hooks — webhook to your fraud platform on any positive finding
  • +
+
identity.monitor(email)identity.breaches()location.anomalies()
+
+
+ + +
+
+
+ Demo +
+
14:55
+
+

Settings

+
+
PROTECTION
+
+
+
+
Safe browsingDNS-level phishing protection.
+
+
+
+
+
Scam call warningsNo scam calls today.
+
+
+
+
+
SIM & carrierPhone-state access on — checking for SIM swaps.
+
+
+
+

Your protection runs out on 31 Oct 2026

+
RECOVERY EMAIL
+
+

If this phone is stolen, a notification shown on it won't help. We'll email this address instead when we detect a location or SIM-card change.

+
Recovery email address
+
Send code
+
+
LANGUAGE
+
+
+
+
Home
+
Protection
+
Identity
+
Settings
+
+
+
+
+
+ +
+ 0:00/0:09 + +
+

+
+
+ Module 09 · Consent & settings +

Every module is opt-in, and says why

+

Each protection module has its own toggle and its own justification — "phone-state access + on — checking for SIM swaps" — so consent is informed and revocable at module granularity. The recovery + email is the deliberate design choice worth noting: a stolen handset can't be warned on its own screen, + so location and SIM-change alerts go out-of-band to a verified address instead.

+
What the module exposes
+
    +
  • Per-module consent — independent toggles with rationale strings you can localise
  • +
  • Entitlement expiry — subscription end date surfaced in-app
  • +
  • Verified recovery channel — email with code verification for out-of-band alerts
  • +
  • Localisation — all strings externalised, RTL supported
  • +
+
consent.set(module, on)recovery.verify(email)entitlement.expiry
+
+
+ +
+
+ +
+
+

What ships in the box

+

Nine modules, one score, one consent model. Enable the subset your market and regulator allow.

+
+

Malicious DNS detection

Phishing, malware and C2 domains blocked at resolution, with a user-visible block log.

+

Scam call screening

Reputation verdicts before answer, plus a one-tap post-call Spam / Scam / OK report.

+

SIM-swap detection

Device-side carrier and slot monitoring, with out-of-band alerting on change.

+

Permission risk scanning

Installed-app grants ranked by fraud-abuse likelihood, with holder attribution.

+

Location safety zones

User-defined geofences with enter/exit events and impossible-travel analysis.

+

Identity monitoring

Continuous breach exposure checks against registered emails and numbers.

+

Device trust

Root, emulator, patch-level and integrity attestation feeding the composite score.

+

Wi-Fi security

SSID risk scoring for open, captive and known-hostile networks.

+

Composite safety score

One 0–100 number, a delta, and a ranked remediation queue behind it.

+
+
+
+ +
+
+

Wired in under a day

+

Initialise once, subscribe to the signals you care about, and either drop in the reference UI + or bind the data to your own components.

+
+
GuardianSetup.kt
+
// 1 — initialise once, in Application.onCreate()
+Guardian.init(
+    context  = this,
+    apiKey   = BuildConfig.GUARDIAN_KEY,
+    modules  = setOf(SAFE_BROWSING, CALLS, SIM, PERMISSIONS, ZONES, IDENTITY),
+    branding = Branding(accent = "#3BB586", logo = R.drawable.operator_mark)
+)
+
+// 2 — the composite score, and everything behind it
+Guardian.score.observe(lifecycleOwner) { s ->
+    scoreRing.bind(s.value, s.delta)        // 93, +12
+    moduleList.submit(s.breakdown)          // per-module status + reason
+}
+
+// 3 — react to a live DNS block
+Guardian.safeBrowsing.onBlock { event ->
+    log("blocked " + event.domain + " · " + event.category)
+}
+
+// 4 — or skip the UI entirely and forward signals to your fraud platform
+Guardian.webhook(url = "https://fraud.operator.net/guardian", events = ALL)
+
+
+
+ +
+

Put Guardian in your app

+

Get SDK access, the Figma reference kit, and a sandbox tenant with synthetic threat traffic.

+
+ + +
+
+ +
© 2026 BlackDice. Guardian Mobile SDK — Android & iOS.
+ + + + diff --git a/src/site/SiteApp.tsx b/src/site/SiteApp.tsx index 9e42c34..fbbbc32 100644 --- a/src/site/SiteApp.tsx +++ b/src/site/SiteApp.tsx @@ -7,9 +7,9 @@ import './styles.css' import siteHtml from './siteMarkup.txt?raw' // Ported vanilla controller (navigation, modal, live feed, count-up). import { configureForms, initSite, setSiteNavigator, showPage, teardownSite } from './siteController' -// Live threat-detection demos, embedded in the Mobile SDK hero (same slider -// — all scenarios, autoplaying with tabs/arrows — used at /threat-demos). -import ThreatDemosSlider from '../demo/threats/ThreatDemosSlider' +// Guardian Mobile SDK explorer — the 9-tab interactive phone-demo widget +// embedded in the Mobile SDK hero's #mobile-sdk-demo-mount. +import MobileSdkExplorer from './demos/MobileSdkExplorer' import NewsGrid from './blog/NewsGrid' import ArticlePage from './blog/ArticlePage' import NotFoundPage from './NotFoundPage' @@ -184,7 +184,7 @@ export default function SiteApp({ <>
- {mounts['mobile-sdk-demo-mount'] && createPortal(, mounts['mobile-sdk-demo-mount'])} + {mounts['mobile-sdk-demo-mount'] && createPortal(, mounts['mobile-sdk-demo-mount'])} {mounts['news-grid-mount'] && createPortal(, mounts['news-grid-mount'])} diff --git a/src/site/demos/MobileSdkExplorer.tsx b/src/site/demos/MobileSdkExplorer.tsx new file mode 100644 index 0000000..30866e6 --- /dev/null +++ b/src/site/demos/MobileSdkExplorer.tsx @@ -0,0 +1,451 @@ +import { useEffect, useRef } from 'react' +import explorerHtml from './mobileSdkExplorer.html?raw' +import './mobileSdkExplorer.css' + +// ── Reel scripts — one per module tab, ported verbatim from mobile-sdk.html ── +// `s` sets the .ap[data-stage] value (drives the CSS reveal system), `cap` is +// the caption line, and the rest are small DOM ops the Reel engine below +// applies at time `t` (ms) into the reel. +const C = 326.73 +const off = (v: number) => C * (1 - v / 100) + +type Step = { + t: number + s?: number + cap?: string + set?: [string, string][] + add?: [string, string][] + rm?: [string, string][] + flash?: [string, string, number?][] + num?: [string, number, number, number][] + ring?: [string, number, number, number][] + type?: [string, string, number][] +} +type Spec = { dur: number; steps: Step[] } + +const SCRIPTS: Record = { + score: { + dur: 26546, + steps: [ + { t: 0, s: 0, cap: 'Guardian opens with the score from the last check — 81.' }, + { t: 4711, s: 1, cap: 'Re-scanning all nine protection modules on device.', add: [['.js-ring', 'scanning']] }, + { t: 7909, s: 2, cap: 'Device trust — verified, patch level current.' }, + { t: 11107, s: 3, cap: 'Apps & permissions — no risky grants detected.' }, + { t: 14683, s: 4, cap: 'Wi-Fi security — BT-T5F97X assessed as low risk.' }, + { t: 18259, s: 5, cap: 'Score recomputed and the delta shown: 81 → 93.', rm: [['.js-ring', 'scanning']], num: [['.js-score', 81, 93, 900]], ring: [['.js-arc', 81, 93, 900]] }, + { t: 22213, cap: 'Ranked remediation sits behind one tap — no dead ends.', flash: [['.js-improve', 'glow', 900]] }, + ], + }, + protection: { + dur: 17503, + steps: [ + { t: 0, s: 0, cap: 'The Protection tab covers the connection itself.' }, + { t: 3198, s: 1, cap: "DNS filter reports the day's blocks.", num: [['.js-n', 0, 40, 1100]] }, + { t: 6018, s: 2, cap: 'Call screening — no scam calls today.' }, + { t: 9216, s: 3, cap: 'SIM integrity — no carrier or slot change detected.' }, + { t: 13170, cap: 'Any card taps through to its full timestamped event log.', flash: [['.js-sb', 'tap', 1300]] }, + ], + }, + dns: { + dur: 22591, + steps: [ + { t: 0, s: 0, cap: '285 blocked of 1,116 lookups so far today.' }, + { t: 3576, s: 1, cap: 'User taps a link in a WhatsApp group message.', set: [['.js-chip', 'Resolving…']], add: [['.js-chip', 'wait'], ['.js-chip', 'pulse']] }, + { t: 7530, s: 2, cap: 'whtaspp-group.pages.dev — typosquat, matched in 40 ms.', set: [['.js-chip', 'Blocked']], rm: [['.js-chip', 'wait'], ['.js-chip', 'pulse']] }, + { t: 10728, s: 3, cap: 'Connection never opens. The block is logged and shown to the user.', add: [['.js-newrow', 'in'], ['.js-newrow', 'hot']], num: [['.js-blocked', 285, 288, 800], ['.js-req', 1116, 1119, 800]] }, + { t: 15817, s: 4, cap: 'Counts refresh on demand.', flash: [['.js-refresh', 'press', 300]], rm: [['.js-newrow', 'hot']] }, + { t: 17880, cap: 'Every verdict is also available to your fraud platform by webhook.' }, + ], + }, + calls: { + dur: 24654, + steps: [ + { t: 0, s: 0, cap: 'Home screen. An unknown number starts ringing.' }, + { t: 3198, s: 1, cap: 'Inbound call from 07813996004 — reputation lookup fires.', add: [['.js-verdict', 'pulse']] }, + { t: 6774, s: 2, cap: 'Verdict returned before answer: likely scam, confidence 91.', set: [['.js-verdict', 'Likely scam · 91']], add: [['.js-verdict', 'bad']], rm: [['.js-verdict', 'pulse']] }, + { t: 10350, s: 3, cap: 'Call ends. Guardian asks how it went.' }, + { t: 13548, s: 4, cap: 'One tap: the user labels it Scam.', flash: [['.js-scam', 'hit', 1400]] }, + { t: 16746, s: 5, cap: 'Report accepted and folded into the shared reputation graph.' }, + { t: 20700, s: 6, cap: 'Detection sharpens for every other subscriber on your network.' }, + ], + }, + sim: { + dur: 18431, + steps: [ + { t: 0, s: 0, cap: 'Screen opens and reads phone state.', add: [['.js-simh', 'pulse']] }, + { t: 2820, s: 1, cap: 'Read completes — no SIM changes detected.', set: [['.js-simh', 'No SIM changes detected'], ['.js-simp', 'No SIM changes detected.']], rm: [['.js-simh', 'pulse']], flash: [['.js-simh', 'swap', 600]] }, + { t: 6018, s: 2, cap: 'Carrier recorded: EE.' }, + { t: 7703, s: 3, cap: 'Slot configuration: single SIM.' }, + { t: 9766, s: 4, cap: 'Change history: none on record.' }, + { t: 12207, cap: 'Had this changed, the alert would go to the recovery email — not this screen.' }, + ], + }, + perms: { + dur: 25789, + steps: [ + { t: 0, s: 0, cap: 'User taps Scan again.', flash: [['.js-scan', 'press', 300]] }, + { t: 2063, s: 1, cap: 'Scanning installed apps for the grants fraudsters abuse.' }, + { t: 5639, s: 2, cap: 'Microphone — high risk. 1 app holds it, 1 to review.' }, + { t: 10350, s: 3, cap: 'Phone state — medium. Can read your number and call state.' }, + { t: 15061, s: 4, cap: 'Contacts — medium, and 1 app still to review.' }, + { t: 19015, s: 5, cap: 'Post notifications — low risk, already accepted.' }, + { t: 22213, cap: 'Ranked by how fraud actually works, not alphabetically.' }, + ], + }, + zones: { + dur: 32013, + steps: [ + { t: 0, s: 0, cap: 'Empty map. No zones configured yet.' }, + { t: 2820, s: 1, cap: "User drops a pin and draws the boundary — Jakarta Town Hall." }, + { t: 7909, s: 2, cap: 'Radius set to 200 m. The geofence is armed.', num: [['.js-rad', 0, 200, 700]] }, + { t: 11863, s: 3, cap: "Zone saved. It now appears in the user's list." }, + { t: 15817, s: 4, cap: 'They arrive — an enter event is logged, timestamped.', add: [['.js-noev', 'gone']] }, + { t: 19771, s: 5, cap: 'Later, they cross back out of the boundary.' }, + { t: 23347, s: 6, cap: 'Guardian notifies the parent the moment they leave the zone.' }, + { t: 27680, cap: 'The same signal drives impossible-travel checks for your fraud engine.' }, + ], + }, + identity: { + dur: 19771, + steps: [ + { t: 0, s: 0, cap: 'Both identity checks are long-running and start on open.', add: [['.js-locb', 'pulse'], ['.js-idb', 'pulse']] }, + { t: 3954, s: 1, cap: 'Location analysis resolves — no unusual travel detected.', set: [['.js-locb', 'Good'], ['.js-locp', 'No unusual travel detected.']], add: [['.js-locb', 'good']], rm: [['.js-locb', 'pulse'], ['.js-locb', 'wait']], flash: [['.js-locb', 'swap', 600]] }, + { t: 7530, s: 2, cap: 'Breach monitoring resolves — 1 monitored identity, no breaches.', set: [['.js-idb', 'Good'], ['.js-idp', '1 monitored identity — no breaches found.']], add: [['.js-idb', 'good']], rm: [['.js-idb', 'pulse'], ['.js-idb', 'wait']], flash: [['.js-idb', 'swap', 600]] }, + { t: 11484, cap: 'Re-checked continuously as new breach corpora land.' }, + { t: 14682, cap: 'A positive finding escalates by webhook — not just an on-device toast.' }, + ], + }, + settings: { + dur: 29572, + steps: [ + { t: 0, s: 0, cap: 'Every module is opt-in and starts off.' }, + { t: 3198, s: 1, cap: 'Safe browsing on — DNS-level phishing protection.', add: [['.js-sw1', 'on']] }, + { t: 6396, s: 2, cap: 'Scam call warnings on.', add: [['.js-sw2', 'on']] }, + { t: 8459, s: 3, cap: 'SIM & carrier on — and the reason for phone-state access is stated.', add: [['.js-sw3', 'on']] }, + { t: 13926, s: 4, cap: "A stolen phone can't warn you on its own screen — so alerts go out-of-band.", type: [['.js-email', 'jason.reid@icloud.com', 1500]], add: [['.js-email', 'filled']] }, + { t: 20150, s: 5, cap: 'Address verified by code. That channel now carries SIM and location alerts.', flash: [['.js-send', 'press', 300]] }, + { t: 25239, cap: 'Consent is revocable per module, and every string is localisable.' }, + ], + }, +} + +const fmt = (ms: number) => '0:' + String(Math.floor(ms / 1000)).padStart(2, '0') + +/** Strips markup/entities from a caption so it can be handed to speechSynthesis. */ +function captionToText(html: string): string { + const div = document.createElement('div') + div.innerHTML = html + return (div.textContent || '').trim() +} + +type MutedRef = { current: boolean } + +/** Speaks plain text with a soft, natural tone, resolving `onDone` once the + * utterance actually finishes (or errors) — never on a guessed timeout, so + * callers can advance only once the voice has truly caught up. */ +function speakText(text: string, onDone?: () => void): void { + const finish = () => onDone?.() + const synth = window.speechSynthesis + if (!text || !synth) { finish(); return } + let done = false + const once = () => { if (done) return; done = true; finish() } + let started = false + const speakNow = () => { + if (started) return + started = true + synth.cancel() + const u = new SpeechSynthesisUtterance(text) + u.lang = 'en-GB'; u.rate = 1; u.pitch = 0.92; u.volume = 0.78 + u.onend = once + u.onerror = once + const vs = synth.getVoices() + const v = vs.find((x) => /en-GB/i.test(x.lang) && /natural|neural|online/i.test(x.name) && /libby|sonia|hazel|serena/i.test(x.name)) + || vs.find((x) => /en-GB/i.test(x.lang) && /natural|neural|online/i.test(x.name)) + || vs.find((x) => /en-GB/i.test(x.lang) && /libby|sonia|hazel|serena/i.test(x.name)) + || vs.find((x) => /en-GB/i.test(x.lang) && /female|google uk english female|samantha/i.test(x.name)) + || vs.find((x) => /en-GB/i.test(x.lang)) + || vs.find((x) => /female|zira|samantha|susan|karen/i.test(x.name) && /^en/i.test(x.lang)) + || vs.find((x) => /^en/i.test(x.lang)) + if (v) u.voice = v + synth.speak(u) + } + // getVoices() often returns an empty list on the very first call — the + // browser loads voices asynchronously. + if (synth.getVoices().length === 0) { + const onReady = () => { synth.removeEventListener('voiceschanged', onReady); speakNow() } + synth.addEventListener('voiceschanged', onReady) + // Safety net: if voiceschanged never fires (some browsers), speak anyway. + setTimeout(() => { if (!done && synth.getVoices().length === 0) speakNow() }, 400) + } else { + speakNow() + } +} + +class Reel { + root: ParentNode + p: HTMLElement + ap: HTMLElement + spec: Spec + fill: HTMLElement + cap: HTMLElement + el: HTMLElement + pp: HTMLButtonElement + applied: [Element, string][] = [] + timers: ReturnType[] = [] + tweens: number[] = [] + base = new Map() + t = 0 + i = 0 + playing = false + playToken = 0 + pendingUnstick: (() => void) | null = null + reduced: boolean + muted: MutedRef + + constructor(panel: HTMLElement, spec: Spec, reduced: boolean, muted: MutedRef) { + this.root = panel + this.p = panel + this.ap = panel.querySelector('.ap')! + this.spec = spec + this.reduced = reduced + this.muted = muted + this.fill = panel.querySelector('.reel-fill')! + this.cap = panel.querySelector('.reel-cap')! + this.el = panel.querySelector('.js-el')! + this.pp = panel.querySelector('.js-pp')! + panel.querySelector('.js-du')!.textContent = fmt(spec.dur) + this.pp.onclick = () => this.toggle() + const rs = panel.querySelector('.js-rs')! + rs.onclick = () => { this.reset(); this.play() } + const track = panel.querySelector('.js-track')! + track.onclick = (e: MouseEvent) => { + const r = track.getBoundingClientRect() + this.seek(Math.max(0, Math.min(1, (e.clientX - r.left) / r.width)) * spec.dur) + } + this.reset() + } + q(sel: string) { return this.ap.querySelector(sel) } + remember(elx: Element) { if (!this.base.has(elx)) this.base.set(elx, elx.textContent || '') } + clear() { + this.playToken++ + this.timers.forEach(clearTimeout); this.timers = [] + this.tweens.forEach((id) => cancelAnimationFrame(id)); this.tweens = [] + this.applied.forEach(([elx, c]) => elx.classList.remove(c)); this.applied = [] + this.base.forEach((txt, elx) => { elx.textContent = txt }) + try { window.speechSynthesis?.cancel() } catch { /* noop */ } + } + /** Speaks a caption's plain text, calling onDone once it actually finishes. */ + speak(html: string, onDone?: () => void) { + if (this.reduced || this.muted.current) { onDone?.(); return } + speakText(captionToText(html), onDone) + } + reset() { + this.clear(); this.t = 0; this.i = 0; this.playing = false + this.pp.textContent = '▶'; this.fill.style.width = '0%' + this.el.textContent = '0:00'; this.cap.innerHTML = '' + this.stage(0) + if (this.reduced) { this.seek(this.spec.dur - 1); this.pause() } + } + stage(n: number) { + this.ap.dataset.stage = String(n) + this.ap.querySelectorAll('[data-at]').forEach((elx) => elx.classList.toggle('in', n >= Number(elx.dataset.at))) + } + apply(st: Step) { + if (st.s !== undefined) this.stage(st.s) + if (st.cap) this.cap.innerHTML = st.cap + ;(st.set || []).forEach(([s, v]) => { const elx = this.q(s); if (elx) { this.remember(elx); elx.textContent = v } }) + ;(st.add || []).forEach(([s, c]) => { const elx = this.q(s); if (elx) { elx.classList.add(c); this.applied.push([elx, c]) } }) + ;(st.rm || []).forEach(([s, c]) => { const elx = this.q(s); if (elx) elx.classList.remove(c) }) + ;(st.flash || []).forEach(([s, c, d]) => { + const elx = this.q(s); if (!elx) return + elx.classList.add(c); this.applied.push([elx, c]) + this.timers.push(setTimeout(() => elx.classList.remove(c), d || 300)) + }) + ;(st.num || []).forEach(([s, a, b, d]) => { const elx = this.q(s); if (elx) { this.remember(elx); this.tween(a, b, d, (v) => { elx.textContent = String(Math.round(v)) }) } }) + ;(st.ring || []).forEach(([s, a, b, d]) => { const elx = this.q(s); if (elx) this.tween(a, b, d, (v) => elx.setAttribute('stroke-dashoffset', off(v).toFixed(2))) }) + ;(st.type || []).forEach(([s, txt, d]) => { const elx = this.q(s); if (elx) { this.remember(elx); this.tween(0, txt.length, d, (v) => { elx.textContent = txt.slice(0, Math.round(v)) }) } }) + } + tween(a: number, b: number, d: number, fn: (v: number) => void) { + const t0 = performance.now() + const step = (now: number) => { + const k = Math.min(1, (now - t0) / d), e = 1 - Math.pow(1 - k, 3) + fn(a + (b - a) * e) + if (k < 1) this.tweens.push(requestAnimationFrame(step)) + } + this.tweens.push(requestAnimationFrame(step)) + } + seek(ms: number) { + this.clear(); this.t = ms; this.i = 0 + const steps = this.spec.steps + let last: Step | null = null + for (const st of steps) { if (st.t <= ms) { this.apply({ ...st, num: undefined, ring: undefined, type: undefined, flash: undefined }); last = st; this.i++ } } + steps.filter((s) => s.t <= ms).forEach((st) => { + ;(st.num || []).forEach(([s, , b]) => { const elx = this.q(s); if (elx) { this.remember(elx); elx.textContent = String(b) } }) + ;(st.ring || []).forEach(([s, , b]) => { const elx = this.q(s); if (elx) elx.setAttribute('stroke-dashoffset', off(b).toFixed(2)) }) + ;(st.type || []).forEach(([s, txt]) => { const elx = this.q(s); if (elx) { this.remember(elx); elx.textContent = txt } }) + }) + if (last && last.cap) { this.cap.innerHTML = last.cap; this.speak(last.cap) } + this.paint() + } + paint() { + this.fill.style.width = (100 * this.t / this.spec.dur).toFixed(1) + '%' + this.el.textContent = fmt(Math.min(this.t, this.spec.dur)) + } + /** Advances step by step, waiting for each caption's voiceover to actually + * finish (plus a small settle beat) before moving on — so playback paces + * itself to the voice instead of a fixed guess at how long speech takes. */ + async play() { + if (this.playing) return + if (this.t >= this.spec.dur) this.reset() + this.playing = true; this.pp.textContent = '▮▮' + const token = ++this.playToken + const steps = this.spec.steps + while (this.playing && token === this.playToken && this.i < steps.length) { + const st = steps[this.i] + this.apply(st) + const nextT = this.i + 1 < steps.length ? steps[this.i + 1].t : this.spec.dur + this.i++ + this.t = st.t + this.paint() + const minGap = Math.max(500, (nextT - st.t) * 0.3) + await this.awaitStep(st.cap, minGap, token) + if (token !== this.playToken) return + } + if (token !== this.playToken || !this.playing) return + this.t = this.spec.dur + this.paint() + this.playing = false; this.pp.textContent = '↻' + this.timers.push(setTimeout(() => { if (token === this.playToken) { this.reset(); this.play() } }, 1100)) + } + /** Resolves once a step's voiceover finishes (or the minimum visual dwell + * time elapses, if muted/reduced-motion/no caption) — always resolves. A + * safety timer guards against a stuck browser voice engine, and `skipSpeech` + * lets an explicit user action (e.g. muting) unstick it immediately, since + * speechSynthesis.cancel() doesn't reliably fire end/error in every browser. */ + awaitStep(cap: string | undefined, minGap: number, token: number): Promise { + return new Promise((resolve) => { + const startedAt = performance.now() + let settled = false + const settle = () => { + if (settled) return + settled = true + this.pendingUnstick = null + const remaining = minGap - (performance.now() - startedAt) + if (remaining > 0) this.timers.push(setTimeout(resolve, remaining)) + else resolve() + } + this.pendingUnstick = settle + const text = cap ? captionToText(cap) : '' + if (!text || this.reduced || this.muted.current) { + this.timers.push(setTimeout(settle, minGap)) + return + } + speakText(text, () => { if (token === this.playToken) settle() }) + this.timers.push(setTimeout(settle, minGap + 5000)) + }) + } + /** Cancels any speech in flight and immediately unblocks a pending step + * wait — used when the user mutes mid-playback. */ + skipSpeech() { + try { window.speechSynthesis?.cancel() } catch { /* noop */ } + this.pendingUnstick?.() + } + pause() { + this.playing = false; this.pp.textContent = '▶' + try { window.speechSynthesis?.cancel() } catch { /* noop */ } + } + toggle() { this.playing ? this.pause() : this.play() } + destroy() { this.clear() } +} + +/** Guardian Mobile SDK "explorer" — nine tabbed phone-demo reels, ported + * from the standalone mobile-sdk.html mockup and scoped to this container + * so it can drop into any page without touching global DOM/CSS. */ +export default function MobileSdkExplorer() { + const rootRef = useRef(null) + + useEffect(() => { + const root = rootRef.current + if (!root) return + + const reduced = matchMedia('(prefers-reduced-motion:reduce)').matches + const muted: MutedRef = { current: false } + const reels: Record = {} + root.querySelectorAll('.panel').forEach((p) => { + const k = p.dataset.p + if (k && SCRIPTS[k]) reels[k] = new Reel(p, SCRIPTS[k], reduced, muted) + }) + + // Mute is shared across every panel's own button — muting on one tab + // keeps the next tab muted too. + const muteBtns = [...root.querySelectorAll('.js-mute')] + const syncMuteUI = () => { + muteBtns.forEach((b) => { + b.textContent = muted.current ? '🔇' : '🔊' + b.classList.toggle('muted', muted.current) + const label = muted.current ? 'Unmute voiceover' : 'Mute voiceover' + b.setAttribute('aria-label', label) + b.title = label + }) + } + muteBtns.forEach((b) => { + b.onclick = () => { + muted.current = !muted.current + if (muted.current) { reels[cur]?.skipSpeech() } + syncMuteUI() + } + }) + syncMuteUI() + + const tabs = [...root.querySelectorAll('.tab')] + const panels = [...root.querySelectorAll('.panel')] + let cur = 'score' + function show(k: string) { + tabs.forEach((t) => t.classList.toggle('on', t.dataset.p === k)) + panels.forEach((p) => p.classList.toggle('on', p.dataset.p === k)) + Object.entries(reels).forEach(([n, r]) => { if (n !== k) { r.pause(); r.reset() } }) + cur = k + // Switching tabs only stages the reel — playback waits for an explicit + // tap on that reel's own play button — but announce the module by voice + // right away so a click always gets a spoken response. + reels[k]?.reset() + if (!reduced && !muted.current) { + const headline = panels.find((p) => p.dataset.p === k)?.querySelector('.copy h3')?.textContent + if (headline) speakText(headline) + } + } + const onTabClick = (t: HTMLButtonElement) => () => { + if (t.dataset.p) show(t.dataset.p) + t.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'center' }) + } + tabs.forEach((t) => { t.onclick = onTabClick(t) }) + + const tabsEl = root.querySelector('#tabs') + const onKeydown = (e: KeyboardEvent) => { + if (e.key !== 'ArrowRight' && e.key !== 'ArrowLeft') return + e.preventDefault() + const i = tabs.findIndex((t) => t.classList.contains('on')) + const n = e.key === 'ArrowRight' ? (i + 1) % tabs.length : (i - 1 + tabs.length) % tabs.length + tabs[n].click() + } + tabsEl?.addEventListener('keydown', onKeydown) + + // Never autoplay — only pause if the user scrolls away mid-playback. + const io = new IntersectionObserver((es) => es.forEach((e) => { + if (e.isIntersecting) return + reels[cur]?.pause() + }), { threshold: .12 }) + io.observe(root) + + return () => { + io.disconnect() + tabsEl?.removeEventListener('keydown', onKeydown) + tabs.forEach((t) => { t.onclick = null }) + muteBtns.forEach((b) => { b.onclick = null }) + Object.values(reels).forEach((r) => r.destroy()) + try { window.speechSynthesis?.cancel() } catch { /* noop */ } + } + }, []) + + return
+} diff --git a/src/site/demos/mobileSdkExplorer.css b/src/site/demos/mobileSdkExplorer.css new file mode 100644 index 0000000..5eaf389 --- /dev/null +++ b/src/site/demos/mobileSdkExplorer.css @@ -0,0 +1,301 @@ +/* Guardian Mobile SDK explorer — ported from the standalone mobile-sdk.html + mockup. Everything is scoped under .bd-mse so it can drop into any page + without touching global element styles or colliding with site CSS vars. */ +.bd-mse, .bd-mse * { box-sizing: border-box; } +.bd-mse h3, .bd-mse h4, .bd-mse h5 { margin: 0; font-weight: 700; letter-spacing: -.5px; line-height: 1.18; } +.bd-mse p, .bd-mse ul { margin: 0; padding: 0; } +.bd-mse a { color: var(--mse-accent); text-decoration: none; } +.bd-mse { + --mse-accent: #3BB586; --mse-accent-2: #6bd6ad; + --mse-accent-soft: rgba(59,181,134,.16); --mse-accent-glow: rgba(59,181,134,.30); + --mse-surface: #0f5a66; --mse-surface-2: #126777; + --mse-border: rgba(255,255,255,.08); --mse-border-strong: rgba(255,255,255,.14); + --mse-text: #e8f4f3; --mse-text-2: #a8b9ba; --mse-text-mute: #6d7f80; + --mse-shadow-lg: 0 8px 32px rgba(0,0,0,.40); --mse-shadow-xl: 0 24px 70px rgba(0,0,0,.55); + font-family: 'Ubuntu', -apple-system, system-ui, sans-serif; + color: var(--mse-text); +} + +/* ============================================================ + EXPLORER + TABS + ============================================================ */ +.bd-mse .tabstrip { + display: flex; gap: .5rem; overflow-x: auto; padding: .4rem; + background: var(--mse-surface); border: 1px solid var(--mse-border); border-radius: 18px; margin-bottom: 2.5rem; + -webkit-mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 20px), transparent); + mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 20px), transparent); +} +.bd-mse .tabstrip::-webkit-scrollbar { height: 5px; } +.bd-mse .tabstrip::-webkit-scrollbar-thumb { background: var(--mse-border-strong); border-radius: 3px; } +.bd-mse .tab { flex: 0 0 auto; display: flex; align-items: center; gap: .5rem; padding: .7rem 1.1rem; border: none; background: transparent; color: var(--mse-text-2); font-family: inherit; font-size: .9rem; font-weight: 600; border-radius: 13px; cursor: pointer; transition: .22s; white-space: nowrap; } +.bd-mse .tab:hover { color: var(--mse-text); background: var(--mse-surface-2); } +.bd-mse .tab.on { background: var(--mse-accent); color: #fff; box-shadow: 0 6px 18px var(--mse-accent-glow); } +.bd-mse .tab svg { width: 16px; height: 16px; flex-shrink: 0; } + +.bd-mse .panel { display: none; grid-template-columns: 340px 1fr; gap: 4rem; align-items: start; max-width: 1180px; margin: 0 auto; } +.bd-mse .panel.on { display: grid; animation: mse-fade .45s ease; } +@keyframes mse-fade { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } } + +.bd-mse .copy { max-width: 640px; padding-top: 6px; } +.bd-mse .copy .kicker { display: inline-flex; align-items: center; gap: .5rem; font-family: 'Ubuntu Mono', monospace; font-size: .78rem; letter-spacing: 1.4px; text-transform: uppercase; color: var(--mse-accent); font-weight: 700; } +.bd-mse .copy .kicker::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--mse-accent); box-shadow: 0 0 0 3px var(--mse-accent-soft); } +.bd-mse .copy h3 { font-size: 1.9rem; margin: .6rem 0 1rem; } +.bd-mse .copy .desc { color: var(--mse-text-2); font-size: 1.03rem; line-height: 1.65; margin-bottom: 1.8rem; } +.bd-mse .sig-title { font-size: .78rem; letter-spacing: 1.2px; text-transform: uppercase; color: var(--mse-text-mute); font-weight: 700; margin-bottom: .9rem; } +.bd-mse .sigs { list-style: none; display: grid; gap: .6rem; margin-bottom: 1.9rem; } +.bd-mse .sigs li { display: flex; gap: .75rem; align-items: flex-start; padding: .8rem 1rem; background: var(--mse-surface); border: 1px solid var(--mse-border); border-radius: 12px; font-size: .92rem; color: var(--mse-text-2); } +.bd-mse .sigs li b { color: var(--mse-text); font-weight: 600; } +.bd-mse .sigs li::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--mse-accent); flex-shrink: 0; margin-top: .55rem; } +.bd-mse .pillrow { display: flex; flex-wrap: wrap; gap: .5rem; } +.bd-mse .pill { padding: .4rem .85rem; border-radius: 100px; background: var(--mse-accent-soft); border: 1px solid var(--mse-accent); color: var(--mse-accent); font-size: .78rem; font-weight: 600; font-family: 'Ubuntu Mono', monospace; } +.bd-mse .mono { font-family: 'Ubuntu Mono', monospace; color: var(--mse-accent); } + +/* ============================================================ + PHONE + REEL CHROME + ============================================================ */ +.bd-mse .stage { width: 340px; } +.bd-mse .phone { + position: relative; width: 340px; padding: 11px; border-radius: 46px; + background: linear-gradient(160deg,#3a3f45,#191c20 45%,#2c3137); + box-shadow: var(--mse-shadow-xl), 0 0 0 1px rgba(255,255,255,.07) inset; + animation: mse-float 5s ease-in-out infinite; +} +.bd-mse .phone::before { + content: ''; position: absolute; inset: -8% -16%; z-index: -1; border-radius: 50%; + background: var(--mse-accent); opacity: .16; filter: blur(60px); pointer-events: none; +} +@keyframes mse-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } } +.bd-mse .phone-inner { position: relative; border-radius: 36px; overflow: hidden; background: #141218; aspect-ratio: 318/672; } +.bd-mse .demo-badge { position: absolute; top: 20px; right: -9px; z-index: 20; display: flex; align-items: center; gap: 5px; padding: 4px 10px 4px 8px; background: #e03a2f; color: #fff; border-radius: 100px; font-size: 9.6px; font-weight: 700; letter-spacing: .9px; text-transform: uppercase; box-shadow: 0 4px 14px rgba(224,58,47,.5); } +.bd-mse .demo-badge i { width: 5px; height: 5px; border-radius: 50%; background: #fff; animation: mse-rec 1.4s ease-in-out infinite; } +@keyframes mse-rec { 0%, 100% { opacity: 1; } 50% { opacity: .25; } } + +.bd-mse .reel-bar { display: flex; align-items: center; gap: .7rem; margin-top: 1.1rem; padding: .5rem .7rem; background: var(--mse-surface); border: 1px solid var(--mse-border); border-radius: 100px; } +.bd-mse .reel-btn { width: 28px; height: 28px; flex-shrink: 0; border: none; border-radius: 50%; background: var(--mse-accent); color: #fff; font-size: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: .2s; font-family: inherit; line-height: 1; } +.bd-mse .reel-btn:hover { background: var(--mse-accent-2); } +.bd-mse .reel-btn.ghost { background: transparent; color: var(--mse-text-2); font-size: 14px; } +.bd-mse .reel-btn.ghost:hover { background: var(--mse-surface-2); color: var(--mse-text); } +.bd-mse .reel-btn.js-mute { font-size: 12px; } +.bd-mse .reel-btn.js-mute.muted { color: var(--mse-text-mute); } +.bd-mse .reel-track { flex: 1; height: 4px; border-radius: 100px; background: var(--mse-border-strong); position: relative; cursor: pointer; } +.bd-mse .reel-fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 100px; background: var(--mse-accent); transition: width .35s ease; } +.bd-mse .reel-time { font-family: 'Ubuntu Mono', monospace; font-size: .72rem; color: var(--mse-text-mute); flex-shrink: 0; letter-spacing: -.3px; } +.bd-mse .reel-cap { margin-top: .85rem; min-height: 2.9rem; font-size: .87rem; color: var(--mse-text-2); line-height: 1.5; border-left: 2px solid var(--mse-accent); padding-left: .7rem; transition: opacity .3s; } +.bd-mse .reel-cap b { color: var(--mse-text); font-weight: 600; } + +/* ============================================================ + APP TOKENS (the phone-screen UI itself) + ============================================================ */ +.bd-mse .ap { + --a-bg: #141218; --a-card: #221f28; --a-card-2: #1c1a21; + --a-line: rgba(255,255,255,.055); + --a-tx: #f3f0f6; --a-tx2: #9c96a6; --a-tx3: #736d7e; + --a-purple: #8b7ef0; --a-purple-on: #3a1f7a; + --a-lav: #e9e4f7; --a-lav-on: #4a2d9c; + --a-green: #82c99a; --a-green-bg: #1b3526; + --a-coral: #e8765c; --a-coral-bg: #3b2320; + --a-amber: #e0b355; --a-amber-bg: #3a2f1c; + --a-blue: #7ab8e8; --a-blue-bg: #1e2c3a; + position: absolute; inset: 0; background: var(--a-bg); color: var(--a-tx); + font-size: 11.6px; line-height: 1.42; display: flex; flex-direction: column; overflow: hidden; +} +.bd-mse .ap [data-at] { opacity: 0; transform: translateY(9px); transition: opacity .48s ease, transform .48s cubic-bezier(.22,.85,.28,1); } +.bd-mse .ap [data-at].in { opacity: 1; transform: none; } +.bd-mse .ap .swap { animation: mse-swap .5s ease; } +@keyframes mse-swap { 0% { opacity: 0; transform: translateY(-4px); } 100% { opacity: 1; transform: none; } } +.bd-mse .ap .pulse { animation: mse-pulse 1.05s ease-in-out infinite; } +@keyframes mse-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .42; } } +.bd-mse .ap .press { transform: scale(.955) !important; filter: brightness(.88); } +.bd-mse .ap-btn, .bd-mse .ap-card { transition: transform .18s ease, filter .18s ease, box-shadow .25s ease, outline-color .25s ease; } +.bd-mse .ap .tap { outline: 1.6px solid var(--a-purple); outline-offset: -1px; box-shadow: 0 0 0 5px rgba(139,126,240,.14); } + +.bd-mse .ap-status { display: flex; align-items: center; justify-content: space-between; padding: 11px 17px 4px; flex-shrink: 0; } +.bd-mse .ap-status .t { font-size: 13px; font-weight: 500; } +.bd-mse .ap-status .l, .bd-mse .ap-status .r { display: flex; align-items: center; gap: 5px; } +.bd-mse .ap-status svg { width: 11px; height: 11px; fill: #fff; opacity: .92; } +.bd-mse .ap-status .dot { width: 3px; height: 3px; border-radius: 50%; background: #fff; opacity: .75; } +.bd-mse .ap-batt { width: 17px; height: 9px; border: 1.1px solid rgba(255,255,255,.55); border-radius: 2.6px; position: relative; display: flex; align-items: center; padding: 1px; } +.bd-mse .ap-batt::after { content: ''; width: 100%; height: 100%; background: #31d158; border-radius: 1.4px; } +.bd-mse .ap-batt::before { content: ''; position: absolute; right: -3px; width: 1.6px; height: 4px; background: rgba(255,255,255,.55); border-radius: 0 1px 1px 0; } + +.bd-mse .ap-top { display: flex; align-items: center; gap: 11px; padding: 16px 17px 10px; flex-shrink: 0; } +.bd-mse .ap-top .back { width: 17px; height: 17px; stroke: var(--a-tx); stroke-width: 2; fill: none; flex-shrink: 0; } +.bd-mse .ap-top h4 { font-size: 17px; font-weight: 700; letter-spacing: -.3px; } +.bd-mse .ap-greet { padding: 14px 17px 2px; flex-shrink: 0; } +.bd-mse .ap-greet .hi { display: flex; align-items: center; justify-content: space-between; } +.bd-mse .ap-greet .hi-l { display: flex; align-items: center; gap: 8px; } +.bd-mse .ap-greet .hi-l svg { width: 16px; height: 16px; } +.bd-mse .ap-greet h4 { font-size: 17px; font-weight: 700; } +.bd-mse .ap-greet .sub { color: var(--a-tx2); font-size: 11.4px; margin-top: 1px; } +.bd-mse .ap-bell { width: 15px; height: 15px; stroke: var(--a-tx); stroke-width: 1.7; fill: none; } +.bd-mse .ap-body { flex: 1; overflow: hidden; padding: 0 17px 8px; display: flex; flex-direction: column; } +.bd-mse .ap-body.pt { padding-top: 12px; } + +.bd-mse .ap-score { display: flex; flex-direction: column; align-items: center; padding: 14px 0 4px; flex-shrink: 0; } +.bd-mse .ap-ring { position: relative; width: 118px; height: 118px; } +.bd-mse .ap-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); } +.bd-mse .ap-ring .arc { transition: stroke .5s ease; } +.bd-mse .ap-ring .val { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; } +.bd-mse .ap-ring .val b { font-size: 26px; font-weight: 700; letter-spacing: -.5px; } +.bd-mse .ap-ring .val b i { font-size: 14px; font-style: normal; font-weight: 400; color: var(--a-tx2); } +.bd-mse .ap-ring .val span { font-size: 10.6px; color: var(--a-tx2); margin-top: -2px; } +.bd-mse .ap-ring.scanning::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--a-purple); animation: mse-spin .95s linear infinite; } +@keyframes mse-spin { to { transform: rotate(360deg); } } +.bd-mse .ap-delta { color: var(--a-green); font-size: 12.6px; font-weight: 600; margin-top: 11px; } +.bd-mse .ap-lastchk { color: var(--a-tx2); font-size: 11.2px; } + +.bd-mse .ap-btn { display: block; width: 100%; text-align: center; border: none; border-radius: 100px; font-family: inherit; font-weight: 600; font-size: 13px; padding: 11px; margin: 13px 0 4px; } +.bd-mse .ap-btn.purple { background: var(--a-purple); color: var(--a-purple-on); } +.bd-mse .ap-btn.lav { background: var(--a-lav); color: var(--a-lav-on); } +.bd-mse .ap-btn.glow { box-shadow: 0 0 0 6px rgba(139,126,240,.16); } + +.bd-mse .ap-card { background: var(--a-card); border-radius: 17px; padding: 13px 14px; margin-top: 10px; } +.bd-mse .ap-card h5 { font-size: 13.4px; font-weight: 700; letter-spacing: -.2px; } +.bd-mse .ap-card p { color: var(--a-tx2); font-size: 11.4px; margin-top: 2px; } +.bd-mse .ap-cardhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; } +.bd-mse .ap-badge { flex-shrink: 0; padding: 3px 9px; border-radius: 100px; font-size: 10.4px; font-weight: 700; } +.bd-mse .ap-badge.good { background: var(--a-green-bg); color: var(--a-green); } +.bd-mse .ap-badge.high, .bd-mse .ap-badge.blocked { background: var(--a-coral-bg); color: var(--a-coral); } +.bd-mse .ap-badge.med { background: var(--a-amber-bg); color: var(--a-amber); } +.bd-mse .ap-badge.low { background: var(--a-blue-bg); color: var(--a-blue); } +.bd-mse .ap-badge.active { background: #2a2440; color: var(--a-purple); } +.bd-mse .ap-badge.wait { background: #2b2833; color: var(--a-tx3); } + +.bd-mse .ap-stats { display: flex; gap: 6px; margin-top: 12px; } +.bd-mse .ap-stats div { flex: 1; text-align: center; } +.bd-mse .ap-stats b { display: block; font-size: 23px; font-weight: 700; letter-spacing: -.5px; font-variant-numeric: tabular-nums; } +.bd-mse .ap-stats b.bad { color: var(--a-coral); } +.bd-mse .ap-stats span { font-size: 10.6px; color: var(--a-tx2); } + +.bd-mse .ap-h6 { font-size: 13.4px; font-weight: 700; margin: 16px 0 8px; } +.bd-mse .ap-h6.spread { display: flex; align-items: center; justify-content: space-between; } +.bd-mse .ap-h6.spread a { color: var(--a-purple); font-size: 12px; font-weight: 600; } +.bd-mse .ap-caps { font-size: 10px; font-weight: 700; letter-spacing: 1.1px; color: var(--a-tx3); margin: 16px 0 7px; } + +.bd-mse .ap-list { background: var(--a-card); border-radius: 17px; overflow: hidden; } +.bd-mse .ap-li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 14px; border-top: 1px solid var(--a-line); } +.bd-mse .ap-li:first-child { border-top: none; } +.bd-mse .ap-li .dom { font-size: 12.2px; font-weight: 600; word-break: break-all; line-height: 1.28; } +.bd-mse .ap-li .when { font-size: 10.8px; color: var(--a-tx2); margin-top: 1px; } +.bd-mse .ap-li.fresh { max-height: 0; padding-top: 0; padding-bottom: 0; opacity: 0; overflow: hidden; border-top: none; transition: max-height .5s cubic-bezier(.22,.85,.28,1), padding .5s, opacity .4s .1s; } +.bd-mse .ap-li.fresh.in { max-height: 52px; padding-top: 11px; padding-bottom: 11px; opacity: 1; } +.bd-mse .ap-li.fresh.in.hot { background: rgba(232,118,92,.1); } +.bd-mse .ap-kv { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; font-size: 12px; } +.bd-mse .ap-kv .k { color: var(--a-tx2); } +.bd-mse .ap-kv .v { font-weight: 700; } + +.bd-mse .ap-perm { background: var(--a-card); border-radius: 15px; padding: 11px 13px; margin-top: 9px; } +.bd-mse .ap-perm .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; } +.bd-mse .ap-perm .nm { font-size: 13px; font-weight: 700; } +.bd-mse .ap-perm .ds { color: var(--a-tx2); font-size: 11px; margin-top: 1px; } +.bd-mse .ap-perm .mt { font-size: 11px; margin-top: 4px; font-weight: 600; } +.bd-mse .ap-perm .mt.warn { color: var(--a-coral); } +.bd-mse .ap-perm .mt.ok { color: var(--a-purple); } +.bd-mse .ap-sk { background: var(--a-card); border-radius: 15px; padding: 13px; margin-top: 9px; display: grid; gap: 7px; } +.bd-mse .ap-sk i { display: block; height: 8px; border-radius: 100px; background: linear-gradient(90deg,#26232c,#37333f,#26232c); background-size: 220% 100%; animation: mse-sk 1.2s linear infinite; } +.bd-mse .ap-sk i:nth-child(1) { width: 46%; } .bd-mse .ap-sk i:nth-child(2) { width: 78%; } .bd-mse .ap-sk i:nth-child(3) { width: 34%; } +@keyframes mse-sk { 0% { background-position: 120% 0; } 100% { background-position: -120% 0; } } + +.bd-mse .ap-tog { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-top: 1px solid var(--a-line); } +.bd-mse .ap-tog:first-child { border-top: none; } +.bd-mse .ap-tog .ic { width: 29px; height: 29px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; } +.bd-mse .ap-tog .ic svg { width: 15px; height: 15px; } +.bd-mse .ap-tog .tx { flex: 1; min-width: 0; } +.bd-mse .ap-tog .tx b { display: block; font-size: 12.6px; font-weight: 700; } +.bd-mse .ap-tog .tx span { font-size: 10.8px; color: var(--a-tx2); display: block; line-height: 1.3; } +.bd-mse .ap-sw { width: 38px; height: 22px; border-radius: 100px; background: #3a3646; position: relative; flex-shrink: 0; transition: background .35s ease; } +.bd-mse .ap-sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #6d6779; transition: left .35s cubic-bezier(.3,1.5,.5,1), background .35s; } +.bd-mse .ap-sw.on { background: var(--a-purple); } +.bd-mse .ap-sw.on::after { left: 19px; background: var(--a-purple-on); } +.bd-mse .ap-input { border: 1px solid rgba(255,255,255,.28); border-radius: 9px; padding: 10px 12px; color: var(--a-tx3); font-size: 12px; margin-top: 11px; transition: border-color .3s, color .3s; } +.bd-mse .ap-input.filled { color: var(--a-tx); border-color: var(--a-purple); } +.bd-mse .ap-input.filled::after { content: ''; display: inline-block; width: 1.2px; height: 12px; background: var(--a-purple); margin-left: 1px; vertical-align: -2px; animation: mse-caret .85s step-end infinite; } +@keyframes mse-caret { 50% { opacity: 0; } } + +.bd-mse .ap-map { border-radius: 15px; overflow: hidden; height: 112px; position: relative; background: #b9b6bf; } +.bd-mse .ap-map svg { width: 100%; height: 100%; display: block; } +.bd-mse .ap-map .gl { position: absolute; left: 8px; bottom: 6px; font-size: 9.5px; font-weight: 700; color: #5b5b60; } +.bd-mse .js-pin { opacity: 0; transform: translateY(-26px); transition: opacity .3s, transform .6s cubic-bezier(.3,1.7,.5,1); } +.bd-mse .ap[data-stage="1"] .js-pin, .bd-mse .ap[data-stage="2"] .js-pin, .bd-mse .ap[data-stage="3"] .js-pin, .bd-mse .ap[data-stage="4"] .js-pin, .bd-mse .ap[data-stage="5"] .js-pin, .bd-mse .ap[data-stage="6"] .js-pin { opacity: 1; transform: none; } +.bd-mse .js-fence { opacity: 0; transform: scale(.2); transform-origin: 150px 50px; transition: opacity .5s, transform .85s cubic-bezier(.22,.9,.25,1), stroke .3s ease; } +.bd-mse .ap[data-stage="2"] .js-fence, .bd-mse .ap[data-stage="3"] .js-fence, .bd-mse .ap[data-stage="4"] .js-fence, .bd-mse .ap[data-stage="5"] .js-fence, .bd-mse .ap[data-stage="6"] .js-fence { opacity: 1; transform: scale(1); } +.bd-mse .ap[data-stage="6"] .js-fence { stroke: #e8765c; } +.bd-mse .js-trav { opacity: 0; } +.bd-mse .ap[data-stage="4"] .js-trav, .bd-mse .ap[data-stage="5"] .js-trav { opacity: 1; animation: mse-trav 2.6s cubic-bezier(.4,0,.5,1) forwards; } +.bd-mse .js-trav-out { opacity: 0; } +.bd-mse .ap[data-stage="6"] .js-trav-out { opacity: 1; animation: mse-trav-out 1.5s cubic-bezier(.4,0,.5,1) forwards; } +@keyframes mse-trav-out { 0% { transform: translate(0,0); } 100% { transform: translate(56px,-40px); } } +.bd-mse .ap-zalert { + background: #2b2833; border-radius: 19px; padding: 11px 12px; margin: 8px 12px 0; + box-shadow: 0 10px 26px rgba(0,0,0,.5); display: flex; align-items: center; gap: 10px; + opacity: 0; transform: translateY(-70px); transition: opacity .35s, transform .55s cubic-bezier(.22,.9,.28,1); +} +.bd-mse .ap[data-stage="6"] .ap-zalert { opacity: 1; transform: none; } +.bd-mse .ap-zalert .nh { display: flex; align-items: flex-start; gap: 9px; width: 100%; } +.bd-mse .ap-zalert .av { width: 29px; height: 29px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; } +.bd-mse .ap-zalert .av svg { width: 17px; height: 17px; } +.bd-mse .ap-zalert .nt { flex: 1; min-width: 0; } +.bd-mse .ap-zalert .nt .l1 { display: flex; align-items: center; gap: 6px; font-size: 12.4px; font-weight: 700; } +.bd-mse .ap-zalert .nt .l1 .ago { font-weight: 400; color: var(--a-tx2); } +.bd-mse .ap-zalert .nt .l2 { font-size: 11.4px; color: var(--a-coral); margin-top: 1px; } +@keyframes mse-trav { 0% { transform: translate(-96px,44px); } 100% { transform: translate(0,0); } } +.bd-mse .ap-zone { display: flex; align-items: center; gap: 10px; background: var(--a-card); border-radius: 15px; padding: 11px 13px; margin-top: 10px; } +.bd-mse .ap-zone .pin { width: 28px; height: 28px; border-radius: 9px; background: #2a2440; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 13px; } +.bd-mse .ap-zone .zt { flex: 1; min-width: 0; } +.bd-mse .ap-zone .zt b { display: block; font-size: 12.6px; font-weight: 700; line-height: 1.25; } +.bd-mse .ap-zone .zt span { font-size: 10.8px; color: var(--a-tx2); } +.bd-mse .ap-zone .x { color: var(--a-coral); font-size: 14px; flex-shrink: 0; } +.bd-mse .ap-empty { background: var(--a-card-2); border-radius: 15px; padding: 14px; color: var(--a-tx3); font-size: 11.4px; margin-top: 9px; transition: max-height .45s ease, opacity .3s, padding .45s; max-height: 60px; overflow: hidden; } +.bd-mse .ap-empty.gone { max-height: 0; padding-top: 0; padding-bottom: 0; opacity: 0; margin-top: 0; } + +.bd-mse .ap-incoming { background: #2b2833; border-radius: 19px; padding: 11px 12px; margin: 8px 12px 0; box-shadow: 0 10px 26px rgba(0,0,0,.5); display: flex; align-items: center; gap: 10px; opacity: 0; transform: translateY(-70px); transition: opacity .35s, transform .55s cubic-bezier(.22,.9,.28,1); } +.bd-mse .ap[data-stage="1"] .ap-incoming, .bd-mse .ap[data-stage="2"] .ap-incoming { opacity: 1; transform: none; } +.bd-mse .ap-incoming .rings { width: 31px; height: 31px; border-radius: 50%; background: #3d3947; display: flex; align-items: center; justify-content: center; flex-shrink: 0; } +.bd-mse .ap-incoming .rings svg { width: 16px; height: 16px; fill: #b9aef7; animation: mse-shake .9s ease-in-out infinite; } +@keyframes mse-shake { 0%, 100% { transform: rotate(-9deg); } 50% { transform: rotate(9deg); } } +.bd-mse .ap-incoming .ct { flex: 1; min-width: 0; } +.bd-mse .ap-incoming .ct b { display: block; font-size: 13px; font-weight: 700; } +.bd-mse .ap-incoming .ct span { font-size: 10.8px; color: var(--a-tx2); } +.bd-mse .ap-verdict { flex-shrink: 0; padding: 4px 9px; border-radius: 100px; font-size: 10px; font-weight: 700; background: #3d3947; color: var(--a-tx2); transition: background .35s, color .35s; } +.bd-mse .ap-verdict.bad { background: var(--a-coral-bg); color: var(--a-coral); } + +.bd-mse .ap-notif { background: #2b2833; border-radius: 19px; padding: 11px 12px; margin: 8px 12px 0; box-shadow: 0 10px 26px rgba(0,0,0,.5); opacity: 0; transform: translateY(-70px); transition: opacity .35s, transform .55s cubic-bezier(.22,.9,.28,1); } +.bd-mse .ap[data-stage="3"] .ap-notif, .bd-mse .ap[data-stage="4"] .ap-notif, .bd-mse .ap[data-stage="5"] .ap-notif, .bd-mse .ap[data-stage="6"] .ap-notif { opacity: 1; transform: none; } +.bd-mse .ap-notif .nh { display: flex; align-items: flex-start; gap: 9px; } +.bd-mse .ap-notif .av { width: 29px; height: 29px; border-radius: 50%; background: #0d3b45; display: flex; align-items: center; justify-content: center; flex-shrink: 0; } +.bd-mse .ap-notif .av svg { width: 19px; height: 19px; } +.bd-mse .ap-notif .nt { flex: 1; min-width: 0; } +.bd-mse .ap-notif .nt .l1 { display: flex; align-items: center; gap: 6px; font-size: 12.4px; font-weight: 700; } +.bd-mse .ap-notif .nt .l1 .ago { font-weight: 400; color: var(--a-tx2); } +.bd-mse .ap-notif .nt .l2 { font-size: 13px; font-weight: 500; margin-top: 1px; } +.bd-mse .ap-notif .chev { background: #3d3947; border-radius: 100px; padding: 3px 9px; font-size: 10px; flex-shrink: 0; } +.bd-mse .ap-notif .acts { display: flex; gap: 24px; padding: 9px 4px 2px; margin-top: 6px; } +.bd-mse .ap-notif .acts span { color: #b9aef7; font-size: 13px; font-weight: 600; padding: 2px 6px; border-radius: 8px; transition: background .25s, color .25s; } +.bd-mse .ap-notif .acts span.hit { background: var(--a-coral-bg); color: var(--a-coral); } +.bd-mse .ap-thanks { display: none; align-items: center; gap: 7px; padding: 3px 4px 1px; margin-top: 6px; font-size: 12px; color: var(--a-green); font-weight: 600; } +.bd-mse .ap[data-stage="5"] .ap-thanks, .bd-mse .ap[data-stage="6"] .ap-thanks { display: flex; } +.bd-mse .ap[data-stage="5"] .acts, .bd-mse .ap[data-stage="6"] .acts { display: none; } + +.bd-mse .ap-tabbar { display: flex; align-items: center; justify-content: space-around; padding: 7px 6px 4px; background: #1e1b24; border-top: 1px solid var(--a-line); flex-shrink: 0; } +.bd-mse .ap-tabbar .it { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 12px; border-radius: 12px; color: var(--a-tx3); } +.bd-mse .ap-tabbar .it svg { width: 17px; height: 17px; } +.bd-mse .ap-tabbar .it span { font-size: 9.6px; font-weight: 600; } +.bd-mse .ap-tabbar .it.on { background: #2a2440; color: var(--a-purple); } +.bd-mse .ap-home-ind { height: 14px; display: flex; align-items: center; justify-content: center; background: #1e1b24; flex-shrink: 0; } +.bd-mse .ap-home-ind::after { content: ''; width: 96px; height: 3.4px; border-radius: 100px; background: rgba(255,255,255,.5); } +.bd-mse .ap-body-fade { position: absolute; left: 0; right: 0; bottom: 52px; height: 56px; background: linear-gradient(transparent, var(--a-bg)); pointer-events: none; } + +/* ============================================================ + RESPONSIVE + ============================================================ */ +@media (max-width: 1080px) { + .bd-mse .panel.on { grid-template-columns: 1fr; justify-items: center; gap: 2.5rem; } + .bd-mse .copy { max-width: 620px; } +} +@media (max-width: 420px) { + .bd-mse .stage, .bd-mse .phone { width: 100%; max-width: 332px; } +} +@media (prefers-reduced-motion: reduce) { + .bd-mse .ap [data-at] { transition: none; } + .bd-mse .demo-badge i, .bd-mse .ap-sk i, .bd-mse .ap .pulse, .bd-mse .phone { animation: none; } +} diff --git a/src/site/demos/mobileSdkExplorer.html b/src/site/demos/mobileSdkExplorer.html new file mode 100644 index 0000000..31bb8ab --- /dev/null +++ b/src/site/demos/mobileSdkExplorer.html @@ -0,0 +1,597 @@ +
+ + + + + + + + + +
+ + +
+
+
+ Demo +
+
14:54
+
+
+ +

Hi, Jason

+
+
Here's how you're protected today.
+
+
+
+ + + + +
81/100Safety score
+
+
▲ 12 since last check ›
+
Last check you were at 81.
+
+
How to improve
+
Device trust
Good

Your device is verified and up to date.

+
Apps & permissions
Good

No risky app permissions detected.

+
Wi-Fi security
Good

BT-T5F97X — Low risk.

+
+
+
+
Home
+
Protection
+
Identity
+
Settings
+
+
+
+
+
+ +
+ 0:00/0:07 + + +
+

+
+
+ Module 01 · Home +

One number your subscribers understand

+

Guardian collapses every protection signal on the handset into a single 0–100 safety score, + with a delta against the previous check so users can see the effect of acting on advice. Underneath it, + each contributing module reports its own plain-English status — no jargon, no CVE numbers, no dead ends.

+
What the module exposes
+
    +
  • Composite score — 0–100, weighted across all enabled modules
  • +
  • Delta since last check — signed change plus the previous value
  • +
  • Per-module status — Good / Attention / At risk, each with a one-line reason
  • +
  • Remediation queue — ordered, tappable actions behind "How to improve"
  • +
+
score.observe()score.deltascore.breakdown[]
+
+
+ + +
+
+
+ Demo +
+
14:47
+
+
+ +

Hi, Jason

+
+
Here's how you're protected today.
+
+
+
+ + +
93/100Safety score
+
▲ 12 since last check ›
+
Last check you were at 81.
+
+
How to improve
+
Safe browsing
Good

Safe browsing is on — 0 unsafe requests blocked today.

+
Calls
Good

No scam calls today.

+
SIM & carrier
Good
+
+
+
+
Home
+
Protection
+
Identity
+
Settings
+
+
+
+
+
+ +
+ 0:00/0:07 + + +
+

+
+
+ Module 02 · Protection tab +

Network and telephony threats in one view

+

The Protection tab groups the modules that defend the connection itself — DNS filtering, + scam-call screening and SIM integrity. Each card is a live status with today's counts, and taps + through to a detail screen with the underlying event log.

+
What the module exposes
+
    +
  • Safe browsing status — on/off plus unsafe requests blocked today
  • +
  • Call screening status — scam calls flagged in the current period
  • +
  • SIM integrity status — swap detection state
  • +
  • Drill-down events — timestamped log per module for support and dispute handling
  • +
+
protection.summary()protection.events()
+
+
+ + +
+
+
+ Demo +
+
14:52
+
+

Safe browsing

+
+
+
DNS-level phishing
protection
+
+
285Blocked today
+
1116Requests today
+
+
+
Refresh
+
Blocked today
+
+
+
whtaspp-group.pages.dev
2 Sep, 14:51
+ Blocked +
+
fxjn-web-whatsapp.hk.cn
2 Sep, 14:50
Blocked
+
malicious.com
2 Sep, 12:31
Blocked
+
+
+
+
+
+
+ +
+ 0:00/0:08 + + +
+

+
+
+ Module 03 · Safe browsing +

Malicious DNS detection

+

Guardian resolves DNS through a filtering layer that scores every lookup against + live phishing, malware and command-and-control intelligence. Lookalike domains — the + whtaspp-group and fxjn-web-whatsapp class of + typosquats — are blocked before the handset ever opens a connection. The user sees a plain list of what + was stopped and when, which is what turns a silent security control into something they'll pay for.

+
What the module exposes
+
    +
  • Blocked / total counts — per day, per device, with on-demand refresh
  • +
  • Blocked-domain log — domain, timestamp, verdict and threat category
  • +
  • Live verdicts — subscribe to block events as they happen
  • +
  • Allow-list control — user or operator override for false positives
  • +
+
safeBrowsing.stats()safeBrowsing.blocked()safeBrowsing.allow(domain)
+
+
+ + +
+
+
+ Demo +
+
15:05
+
+ +
+
+
07813996004Incoming call · unknown number
+ Checking… +
+ +
+
+
+
How was that… • now +
+
07813996004
+ ⌄ +
+
SpamScamOK
+
✓ Reported — thanks, that helps everyone
+
+ +
+
+
+ + +
93/100Safety score
+
▲ 12 since last check ›
+
Last check you were at 81.
+
+
How to improve
+
Safe browsing
Good

Safe browsing is on — 288 unsafe requests blocked today.

+
+
+
+
+
+ +
+ 0:00/0:09 + + +
+

+
+
+ Module 04 · Call screening +

Scam call warnings, rated by the user

+

Guardian screens inbound numbers against reputation intelligence and warns before the + user engages. Immediately after the call ends, a heads-up prompt asks how it went — + Spam, Scam or OK. That one tap is the feedback loop: it feeds a crowd-sourced + reputation graph that sharpens detection for every other subscriber on your network.

+
What the module exposes
+
    +
  • Pre-answer verdict — reputation score and category for the calling number
  • +
  • Post-call prompt — Spam / Scam / OK, returned as a user report
  • +
  • Daily scam count — feeds the Calls card on the Protection tab
  • +
  • Network learning — reports aggregate into shared reputation intelligence
  • +
+
calls.verdict(msisdn)calls.report(verdict)calls.today()
+
+
+ + +
+
+
+ Demo +
+
15:09
+
+

SIM & carrier

+
+
+
Checking SIM status…
+

Reading phone state.

+
+
+
DETAILS
+
CarrierEE
+
SIM slotsSingle SIM
+
Previous changeNone on record
+
+
+
+
+
+
+ +
+ 0:00/0:06 + + +
+

+
+
+ Module 05 · SIM integrity +

SIM-swap detection at the device layer

+

SIM swap is the pivot for most account-takeover fraud: move the number, intercept the OTP, + drain the account. Guardian watches phone-state on the handset and records carrier, slot configuration + and any change event — so a swap is detected from the victim's own device, independently of the + network-side signal, and can be surfaced to your fraud team in real time.

+
What the module exposes
+
    +
  • Change verdict — whether a SIM change has been detected
  • +
  • Carrier and slot state — current operator, single vs dual SIM
  • +
  • Change history — timestamp of the previous change, or none on record
  • +
  • Out-of-band alerting — routed to the recovery email, not just an on-device toast
  • +
+
sim.state()sim.onChange()sim.history()
+
+
+ + +
+
+
+ Demo +
+
15:11
+
+

Apps & permissions

+
+

We scan installed apps for permissions fraudsters commonly abuse. Tap a card to see which apps hold it.

+
+
MicrophoneHigh
Can turn on your microphone.
1 app · 1 to review
+
Phone stateMedium
Can read your phone number and call state.
1 app · all accepted
+
ContactsMedium
Can read your contacts list.
1 app · 1 to review
+
Post notificationsLow
Can post notifications to your device.
1 app · all accepted
+
Scan again
+
+
+
+
+
+ +
+ 0:00/0:08 + + +
+

+
+
+ Module 06 · Apps & permissions +

Permission risk, ranked by how fraud actually works

+

Rather than dumping the full Android permission table on the user, Guardian scans installed + apps for the specific grants fraudsters abuse and ranks them High / Medium / Low. Each card explains the + capability in one sentence — "can turn on your microphone" — and tapping it reveals exactly which apps + hold that grant, with a review-or-accept decision the user can actually make.

+
What the module exposes
+
    +
  • Risk-ranked permission set — High / Medium / Low against a fraud-abuse model
  • +
  • Holder attribution — which installed apps hold each grant
  • +
  • Review state — per-permission accepted vs still to review
  • +
  • On-demand rescan — user-triggered, results feed the safety score
  • +
+
permissions.scan()permissions.holders(p)permissions.accept(p)
+
+
+ + +
+
+
+ Demo +
+
14:55
+
+

Location safety zones

+
+
+
+
Left Jakarta Town Hall • now
+
0.4 km outside the 200m boundary
+
+
+
+
+ + + + + + + + + + + + + + + + Pos Penitipan + Paket Balaikota + + Google +
+
+
📍
1 zone configured1 active
+
+
Zones+ Add
+
+
📍
+
Jakarta Town Hall200m radius
+ Active✕ +
+
Recent activity
+
No recent events
+
+
←
+
Left Jakarta Town Hall2 Sep, 15:42
+
+
+
→
+
Entered Jakarta Town Hall2 Sep, 14:58
+
+
+
+
+
+
+ +
+ 0:00/0:08 + + +
+

+
+
+ Module 07 · Location safety zones +

Geofences the user sets themselves

+

Users define named zones with a radius — home, school, a parent's address — and Guardian + reports arrival and departure against them. It's the consumer-friendly half of location intelligence: + the same signal that flags impossible travel for your fraud engine is presented here as reassurance + rather than surveillance, with the user in control of every zone.

+
What the module exposes
+
    +
  • Zone CRUD — create, activate, delete named zones with a metre radius
  • +
  • Enter / exit events — timestamped, per zone
  • +
  • Impossible-travel signal — feeds the Identity tab's Location status
  • +
  • Configured / active counts — summary for the zone list header
  • +
+
zones.add(name, latLng, r)zones.events()zones.list()
+
+
+ + +
+
+
+ Demo +
+
14:54
+
+
+ +

Hi, Jason

+
+
Here's how you're protected today.
+
+
+
+ + +
93/100Safety score
+
▲ 12 since last check ›
+
Last check you were at 81.
+
+
How to improve
+
+
Location
Checking…
+

Comparing against travel history.

+
+
+
Identity monitoring
Checking…
+

Querying breach corpora.

+
+
+
+
Home
+
Protection
+
Identity
+
Settings
+
+
+
+
+
+ +
+ 0:00/0:07 + + +
+

+
+
+ Module 08 · Identity +

Breach exposure and travel anomalies

+

The Identity tab pairs two long-running checks: continuous breach monitoring for the + identifiers the user has registered, and behavioural location analysis that flags travel patterns + inconsistent with the device's history. Both report as plain status lines — "no breaches found", + "no unusual travel detected" — and both escalate out-of-band when they don't.

+
What the module exposes
+
    +
  • Monitored identity count — registered emails and numbers under watch
  • +
  • Breach findings — source, date and exposed field classes
  • +
  • Travel anomaly verdict — impossible-travel and velocity checks
  • +
  • Escalation hooks — webhook to your fraud platform on any positive finding
  • +
+
identity.monitor(email)identity.breaches()location.anomalies()
+
+
+ + +
+
+
+ Demo +
+
14:55
+
+

Settings

+
+
PROTECTION
+
+
+
+
Safe browsingDNS-level phishing protection.
+
+
+
+
+
Scam call warningsNo scam calls today.
+
+
+
+
+
SIM & carrierPhone-state access on — checking for SIM swaps.
+
+
+
+

Your protection runs out on 31 Oct 2026

+
RECOVERY EMAIL
+
+

If this phone is stolen, a notification shown on it won't help. We'll email this address instead when we detect a location or SIM-card change.

+
Recovery email address
+
Send code
+
+
LANGUAGE
+
+
+
+
Home
+
Protection
+
Identity
+
Settings
+
+
+
+
+
+ +
+ 0:00/0:09 + + +
+

+
+
+ Module 09 · Consent & settings +

Every module is opt-in, and says why

+

Each protection module has its own toggle and its own justification — "phone-state access + on — checking for SIM swaps" — so consent is informed and revocable at module granularity. The recovery + email is the deliberate design choice worth noting: a stolen handset can't be warned on its own screen, + so location and SIM-change alerts go out-of-band to a verified address instead.

+
What the module exposes
+
    +
  • Per-module consent — independent toggles with rationale strings you can localise
  • +
  • Entitlement expiry — subscription end date surfaced in-app
  • +
  • Verified recovery channel — email with code verification for out-of-band alerts
  • +
  • Localisation — all strings externalised, RTL supported
  • +
+
consent.set(module, on)recovery.verify(email)entitlement.expiry
+
+
diff --git a/src/site/styles.css b/src/site/styles.css index 023f869..6327de8 100644 --- a/src/site/styles.css +++ b/src/site/styles.css @@ -553,6 +553,33 @@ textarea { background: #071318; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45); } +/* The Guardian explorer widget is a wide, multi-tab section rather than a + phone-shaped hero visual — break it out of the 2-col hero grid to full + width instead of squeezing it into the narrow phone-sized slot above. */ +#pg-p2 .bd-hero-sh .bd-hero-in { + grid-template-columns: 1fr; + height: auto; + padding-bottom: 40px; +} +/* Grid items default to min-width:auto, which lets the tabstrip's + unwrapped flex content (9 tabs) blow out the track instead of + scrolling internally — force the mount's grid cell back down to the + column width so it scrolls internally instead of widening the page. */ +#pg-p2 .bd-hero-sh .bd-hero-in > div:last-child { + min-width: 0; + width: 100%; +} +#pg-p2 .bd-mobile-demo-mount { + height: auto; + max-height: none; + border: none; + background: transparent; + box-shadow: none; + border-radius: 0; + overflow: visible; + margin-top: 32px; + min-width: 0; +} .bd-phone-cta { display: flex; align-items: center; diff --git a/src/vite-env.d.ts b/src/vite-env.d.ts index c22a810..5cf6fe4 100644 --- a/src/vite-env.d.ts +++ b/src/vite-env.d.ts @@ -4,3 +4,8 @@ declare module '*.txt?raw' { const content: string export default content } + +declare module '*.html?raw' { + const content: string + export default content +}