@sparkvault/sdk-js 8.6.0 → 8.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1347,14 +1347,25 @@ class VerificationState {
1347
1347
  *
1348
1348
  * The single transfer path: synchronous `window.open` inside the user gesture
1349
1349
  * (so the browser never blocks it), strict `event.origin` + `data.type`
1350
- * validation against the caller-supplied trusted origin, a 60s timeout, and a
1351
- * `window.closed` poll that surfaces a manual close as a cancellation.
1350
+ * validation against the caller-supplied trusted origin, a 30-minute
1351
+ * abandoned-window backstop, and a `window.closed` poll that surfaces a manual
1352
+ * close as a cancellation.
1352
1353
  */
1353
1354
  /** Default popup dimensions — a centered login/ceremony window. */
1354
1355
  const DEFAULT_WIDTH = 480;
1355
1356
  const DEFAULT_HEIGHT = 640;
1356
- /** Default timeout for popup operations (60 seconds). */
1357
- const DEFAULT_TIMEOUT_MS = 60000;
1357
+ /**
1358
+ * Default timeout for popup operations: 30 minutes. This is an
1359
+ * abandoned-window backstop — never a liveness gate. A person mid-login is
1360
+ * often slow for legitimate reasons (waiting out an OTP resend backoff,
1361
+ * fetching their phone for a cross-device passkey, hunting for an alternative
1362
+ * method), and yanking the window away from them mid-flow is far worse than
1363
+ * letting an orphaned promise linger. Active cancellation is handled
1364
+ * elsewhere: the `window.closed` poll catches a manual close within 500ms and
1365
+ * an explicit in-popup cancel posts back immediately; server-side challenge
1366
+ * TTLs (OTP expiry, auth-request lifetime) bound how stale a completion can be.
1367
+ */
1368
+ const DEFAULT_TIMEOUT_MS = 30 * 60 * 1000;
1358
1369
  /** How often to check whether the user closed the popup manually. */
1359
1370
  const CLOSED_POLL_INTERVAL_MS = 500;
1360
1371
  /**
@@ -1944,12 +1955,12 @@ class SparkLinkHandler {
1944
1955
  /**
1945
1956
  * Identity Modal Styles
1946
1957
  *
1947
- * Enterprise-grade styling following Stripe/Adobe design principles:
1948
- * - Clean, minimal aesthetic with purposeful whitespace
1958
+ * SparkVault design system, product register:
1959
+ * - Quiet slate neutrals; Action Blue carries all interactivity
1949
1960
  * - 4px base spacing unit for consistency
1950
- * - Subtle depth through shadows and borders (not gradients)
1951
- * - Professional typography with clear hierarchy
1952
- * - Refined color palette with single accent
1961
+ * - Hairline borders over shadows; shadows minimal and DS-weighted
1962
+ * - Restrained motion: 120-280ms, standard/decelerate curves only
1963
+ * - One accent per surface; tenant-tintable via --sv-primary
1953
1964
  */
1954
1965
  const STYLE_ID$1 = 'sparkvault-identity-styles';
1955
1966
  /**
@@ -2012,56 +2023,69 @@ function getStyles(options) {
2012
2023
  // The brand accent is driven by the `--sv-primary` / `--sv-primary-hover`
2013
2024
  // CSS custom properties so a host page (e.g. the SparkVault sign-in page) can
2014
2025
  // tint the whole flow to the tenant's brand color by setting them on `:root`.
2015
- // The literals are the fallback - when no host sets the variables the UI is
2016
- // pixel-identical to before. The focus glow is derived from the same accent
2017
- // via color-mix so it tracks the brand too.
2018
- const accent = 'var(--sv-primary, #4F46E5)';
2026
+ // The literals are the fallback - when no host sets the variables the flow
2027
+ // renders in SparkVault Action Blue. The soft focus glow and the two-tone
2028
+ // focus ring are both derived from the same accent via color-mix so they
2029
+ // track the tenant tint too.
2030
+ const accent = 'var(--sv-primary, #216bde)';
2031
+ const surface = isDark ? '#030712' : '#ffffff';
2032
+ // Lightened accent for the outer ring of the two-tone focus indicator
2033
+ // (lands on the design system's #4383eb at the default accent).
2034
+ const focusRingColor = `color-mix(in srgb, ${accent} 80%, white)`;
2019
2035
  const tokens = {
2020
2036
  // Colors
2021
2037
  primary: accent,
2022
- primaryHover: 'var(--sv-primary-hover, #4338CA)',
2038
+ primaryHover: 'var(--sv-primary-hover, #0d5bcd)',
2023
2039
  primaryLight: `color-mix(in srgb, ${accent} ${isDark ? '20%' : '9%'}, transparent)`,
2024
- error: '#DC2626',
2025
- errorLight: isDark ? 'rgba(220, 38, 38, 0.15)' : '#FEF2F2',
2026
- errorBorder: isDark ? 'rgba(220, 38, 38, 0.3)' : '#FECACA',
2040
+ error: isDark ? '#e6443d' : '#b02b27',
2041
+ errorLight: isDark ? 'rgba(230, 68, 61, 0.12)' : '#fee2e2',
2042
+ errorBorder: isDark ? 'rgba(230, 68, 61, 0.35)' : '#fecaca',
2043
+ // Filled danger buttons stay on the fixed danger tier (white label, AA in
2044
+ // both themes).
2045
+ danger: '#b02b27',
2046
+ dangerHover: '#9a221f',
2047
+ warningIcon: isDark ? '#e6ad00' : '#8a5600',
2027
2048
  // Backgrounds
2028
- bg: isDark ? '#0F0F0F' : '#FFFFFF',
2029
- bgSubtle: isDark ? '#171717' : '#FAFAFA',
2030
- bgHover: isDark ? '#1A1A1A' : '#F5F5F5',
2031
- bgInput: isDark ? '#0F0F0F' : '#FFFFFF',
2049
+ bg: surface,
2050
+ bgSubtle: isDark ? 'rgba(255, 255, 255, 0.05)' : '#f8fafc',
2051
+ bgHover: isDark ? 'rgba(255, 255, 255, 0.08)' : '#f1f5f9',
2052
+ bgInput: isDark ? 'rgba(255, 255, 255, 0.04)' : '#ffffff',
2032
2053
  // Borders
2033
- border: isDark ? '#262626' : '#E5E5E5',
2034
- borderHover: isDark ? '#404040' : '#D4D4D4',
2054
+ border: isDark ? 'rgba(255, 255, 255, 0.10)' : '#e2e8f0',
2055
+ borderHover: isDark ? 'rgba(255, 255, 255, 0.18)' : '#cbd5e1',
2035
2056
  borderFocus: accent,
2057
+ chevron: isDark ? 'rgba(255, 255, 255, 0.35)' : '#cbd5e1',
2036
2058
  // Text
2037
- textPrimary: isDark ? '#FAFAFA' : '#0A0A0A',
2038
- textSecondary: isDark ? '#A3A3A3' : '#525252',
2039
- textMuted: isDark ? '#737373' : '#737373',
2040
- textOnPrimary: '#FFFFFF',
2041
- // Shadows
2059
+ textPrimary: isDark ? 'rgba(255, 255, 255, 0.92)' : '#0f172a',
2060
+ textSecondary: isDark ? 'rgba(255, 255, 255, 0.62)' : '#475569',
2061
+ textMuted: isDark ? 'rgba(255, 255, 255, 0.45)' : '#64748b',
2062
+ textOnPrimary: '#ffffff',
2063
+ // Focus — two-tone ring: inner surface gap + accent-derived outer ring.
2064
+ focusRing: `0 0 0 2px ${surface}, 0 0 0 4px ${focusRingColor}`,
2065
+ // Shadows — DS-weight: lean on hairlines, keep elevation subtle.
2042
2066
  shadowSm: isDark
2043
2067
  ? '0 1px 2px rgba(0, 0, 0, 0.4)'
2044
- : '0 1px 2px rgba(0, 0, 0, 0.04)',
2068
+ : '0 1px 2px 0 rgba(0, 0, 0, 0.05)',
2045
2069
  shadowLg: isDark
2046
- ? '0 8px 24px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05)'
2047
- : '0 8px 24px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04)',
2070
+ ? '0 8px 24px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.10)'
2071
+ : '0 8px 24px rgba(15, 23, 42, 0.12)',
2048
2072
  };
2049
2073
  return `
2050
2074
  /* ========================================
2051
2075
  MOTION SYSTEM — shared duration/easing tokens so every transition in
2052
- the flow is consistent. Enters decelerate (ease-out-expo), exits
2053
- accelerate, spring is reserved for the success moment.
2076
+ the flow is consistent. 120/180/280ms tiers; standard and decelerate
2077
+ curves only, never overshoot.
2054
2078
  ======================================== */
2055
2079
  :root {
2056
- --sv-dur-instant: 80ms;
2057
- --sv-dur-fast: 140ms;
2058
- --sv-dur-base: 220ms;
2059
- --sv-dur-slow: 320ms;
2060
- --sv-dur-slower: 480ms;
2080
+ --sv-dur-instant: 120ms;
2081
+ --sv-dur-fast: 120ms;
2082
+ --sv-dur-base: 180ms;
2083
+ --sv-dur-slow: 280ms;
2084
+ --sv-dur-slower: 280ms;
2061
2085
  --sv-ease-standard: cubic-bezier(0.2, 0, 0, 1);
2062
- --sv-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
2063
- --sv-ease-accelerate: cubic-bezier(0.3, 0, 1, 1);
2064
- --sv-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
2086
+ --sv-ease-out: cubic-bezier(0, 0, 0.2, 1);
2087
+ --sv-ease-accelerate: cubic-bezier(0.2, 0, 0, 1);
2088
+ --sv-ease-spring: cubic-bezier(0.2, 0, 0, 1);
2065
2089
  }
2066
2090
 
2067
2091
  /* Each mounted view enters with a calm fade + rise. Applied by the renderer
@@ -2086,7 +2110,7 @@ function getStyles(options) {
2086
2110
  .sv-overlay {
2087
2111
  position: fixed;
2088
2112
  inset: 0;
2089
- background: rgba(0, 0, 0, ${isDark ? '0.7' : '0.5'});
2113
+ background: ${isDark ? 'rgba(0, 0, 0, 0.7)' : 'rgba(15, 23, 42, 0.6)'};
2090
2114
  display: flex;
2091
2115
  align-items: center;
2092
2116
  justify-content: center;
@@ -2105,7 +2129,7 @@ function getStyles(options) {
2105
2129
 
2106
2130
  .sv-modal {
2107
2131
  background: ${tokens.bg};
2108
- border-radius: 16px;
2132
+ border-radius: 12px;
2109
2133
  box-shadow: ${tokens.shadowLg};
2110
2134
  width: 100%;
2111
2135
  max-width: 400px;
@@ -2126,7 +2150,7 @@ function getStyles(options) {
2126
2150
  padding: 14px 20px;
2127
2151
  border-bottom: 1px solid ${tokens.border};
2128
2152
  background: ${tokens.bg};
2129
- border-radius: 16px 16px 0 0;
2153
+ border-radius: 12px 12px 0 0;
2130
2154
  flex-shrink: 0;
2131
2155
  }
2132
2156
 
@@ -2164,10 +2188,10 @@ function getStyles(options) {
2164
2188
  justify-content: center;
2165
2189
  background: ${tokens.bgSubtle};
2166
2190
  border: none;
2167
- border-radius: 8px;
2191
+ border-radius: 6px;
2168
2192
  cursor: pointer;
2169
2193
  color: ${tokens.textSecondary};
2170
- transition: background 0.15s ease, color 0.15s ease;
2194
+ transition: background var(--sv-dur-fast) var(--sv-ease-standard), color var(--sv-dur-fast) var(--sv-ease-standard);
2171
2195
  }
2172
2196
 
2173
2197
  .sv-close-btn:hover {
@@ -2176,12 +2200,8 @@ function getStyles(options) {
2176
2200
  }
2177
2201
 
2178
2202
  .sv-close-btn:focus-visible {
2179
- outline: 2px solid ${tokens.borderFocus};
2180
- outline-offset: 2px;
2181
- }
2182
-
2183
- .sv-close-btn:active {
2184
- transform: scale(0.96);
2203
+ outline: none;
2204
+ box-shadow: ${tokens.focusRing};
2185
2205
  }
2186
2206
 
2187
2207
  /* ========================================
@@ -2201,10 +2221,10 @@ function getStyles(options) {
2201
2221
  .sv-title {
2202
2222
  font-size: 21px;
2203
2223
  font-weight: 600;
2204
- letter-spacing: -0.021em;
2224
+ letter-spacing: -0.02em;
2205
2225
  line-height: 1.22;
2206
2226
  margin: 0 0 7px 0;
2207
- text-align: center;
2227
+ text-align: left;
2208
2228
  color: ${tokens.textPrimary};
2209
2229
  }
2210
2230
 
@@ -2214,10 +2234,17 @@ function getStyles(options) {
2214
2234
  line-height: 1.5;
2215
2235
  color: ${tokens.textSecondary};
2216
2236
  margin: 0 0 16px 0;
2217
- text-align: center;
2237
+ text-align: left;
2218
2238
  text-wrap: balance;
2219
2239
  }
2220
2240
 
2241
+ /* Icon-led ceremony screens (passkey set-up / sign-in) are a fully
2242
+ centered composition: the headline and subtitle follow the glyph. */
2243
+ div:has(> .sv-passkey-icon) ~ .sv-title,
2244
+ div:has(> .sv-passkey-icon) ~ .sv-subtitle {
2245
+ text-align: center;
2246
+ }
2247
+
2221
2248
  .sv-subtitle strong {
2222
2249
  color: ${tokens.textPrimary};
2223
2250
  font-weight: 500;
@@ -2246,12 +2273,12 @@ function getStyles(options) {
2246
2273
  font-size: 15px;
2247
2274
  font-weight: 400;
2248
2275
  line-height: 1.4;
2249
- border: 1px solid ${tokens.borderHover};
2250
- border-radius: 10px;
2276
+ border: 1px solid ${tokens.border};
2277
+ border-radius: 8px;
2251
2278
  background: ${tokens.bgInput};
2252
2279
  color: ${tokens.textPrimary};
2253
2280
  box-sizing: border-box;
2254
- box-shadow: 0 1px 1px ${isDark ? 'rgba(0,0,0,0.3)' : 'rgba(10,10,10,0.04)'};
2281
+ box-shadow: ${tokens.shadowSm};
2255
2282
  transition: border-color var(--sv-dur-fast) var(--sv-ease-standard), box-shadow var(--sv-dur-fast) var(--sv-ease-standard);
2256
2283
  }
2257
2284
 
@@ -2281,7 +2308,7 @@ function getStyles(options) {
2281
2308
 
2282
2309
  .sv-input.sv-input-error:focus,
2283
2310
  .sv-input.sv-email-input-error:focus {
2284
- box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
2311
+ box-shadow: 0 0 0 3px ${tokens.errorLight};
2285
2312
  }
2286
2313
 
2287
2314
  /* ========================================
@@ -2300,15 +2327,15 @@ function getStyles(options) {
2300
2327
  letter-spacing: -0.006em;
2301
2328
  line-height: 1.35;
2302
2329
  border: none;
2303
- border-radius: 10px;
2330
+ border-radius: 8px;
2304
2331
  cursor: pointer;
2305
- transition: background var(--sv-dur-fast) var(--sv-ease-standard), transform var(--sv-dur-instant) var(--sv-ease-standard), box-shadow var(--sv-dur-fast) var(--sv-ease-standard);
2332
+ transition: background var(--sv-dur-fast) var(--sv-ease-standard), box-shadow var(--sv-dur-fast) var(--sv-ease-standard);
2306
2333
  box-sizing: border-box;
2307
2334
  }
2308
2335
 
2309
2336
  .sv-btn:focus-visible {
2310
- outline: 2px solid ${tokens.borderFocus};
2311
- outline-offset: 2px;
2337
+ outline: none;
2338
+ box-shadow: ${tokens.focusRing};
2312
2339
  }
2313
2340
 
2314
2341
  .sv-btn:disabled {
@@ -2316,8 +2343,9 @@ function getStyles(options) {
2316
2343
  cursor: not-allowed;
2317
2344
  }
2318
2345
 
2346
+ /* Press = visual compression via an inset shadow, never scale. */
2319
2347
  .sv-btn:active:not(:disabled) {
2320
- transform: scale(0.98);
2348
+ box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.2);
2321
2349
  }
2322
2350
 
2323
2351
  /* Primary Button */
@@ -2333,7 +2361,7 @@ function getStyles(options) {
2333
2361
  background: ${tokens.primaryHover};
2334
2362
  }
2335
2363
 
2336
- /* Secondary Button */
2364
+ /* Secondary Button — quiet: subtle fill, hairline border */
2337
2365
  .sv-btn-secondary {
2338
2366
  background: ${tokens.bgSubtle};
2339
2367
  color: ${tokens.textPrimary};
@@ -2345,25 +2373,26 @@ function getStyles(options) {
2345
2373
  border-color: ${tokens.borderHover};
2346
2374
  }
2347
2375
 
2348
- /* Method Button — a full-width row that lifts on hover with a nudging
2349
- chevron affordance (added via ::after so no DOM change is needed). */
2376
+ /* Method Button — a full-width row with a nudging chevron affordance
2377
+ (added via ::after so no DOM change is needed). The card itself stays
2378
+ planted: hover is a quiet fill + border shift, no translate. */
2350
2379
  .sv-btn-method {
2351
2380
  position: relative;
2352
2381
  background: ${tokens.bg};
2353
- border: 1px solid ${tokens.borderHover};
2354
- border-radius: 12px;
2382
+ border: 1px solid ${tokens.border};
2383
+ border-radius: 10px;
2355
2384
  color: ${tokens.textPrimary};
2356
2385
  text-align: left;
2357
2386
  padding: 15px 40px 15px 14px;
2358
2387
  margin-bottom: 9px;
2359
- /* Inset 2px on either side so the focus outline (drawn outside the
2388
+ /* Inset 2px on either side so the focus ring (drawn outside the
2360
2389
  border-box) has room to render without clipping against the
2361
2390
  dialog's container edges. width:auto pairs with this to prevent
2362
2391
  the row from forcing horizontal overflow. */
2363
2392
  margin-left: 2px;
2364
2393
  margin-right: 2px;
2365
2394
  width: calc(100% - 4px);
2366
- transition: transform var(--sv-dur-base) var(--sv-ease-out), background var(--sv-dur-fast) var(--sv-ease-standard), border-color var(--sv-dur-fast) var(--sv-ease-standard);
2395
+ transition: background var(--sv-dur-fast) var(--sv-ease-standard), border-color var(--sv-dur-fast) var(--sv-ease-standard);
2367
2396
  }
2368
2397
 
2369
2398
  .sv-btn-method::after {
@@ -2373,29 +2402,25 @@ function getStyles(options) {
2373
2402
  top: 50%;
2374
2403
  width: 8px;
2375
2404
  height: 8px;
2376
- border-right: 1.6px solid ${tokens.textMuted};
2377
- border-top: 1.6px solid ${tokens.textMuted};
2405
+ border-right: 1.6px solid ${tokens.chevron};
2406
+ border-top: 1.6px solid ${tokens.chevron};
2378
2407
  transform: translateY(-50%) rotate(45deg);
2379
2408
  transition: transform var(--sv-dur-base) var(--sv-ease-out), border-color var(--sv-dur-fast) var(--sv-ease-standard);
2380
2409
  }
2381
2410
 
2382
2411
  .sv-btn-method:hover:not(:disabled)::after {
2383
2412
  transform: translateY(-50%) translateX(3px) rotate(45deg);
2384
- border-color: ${tokens.textSecondary};
2413
+ border-color: ${tokens.primary};
2385
2414
  }
2386
2415
 
2387
- /* The shared .sv-btn focus rule sets outline-offset:2px which sits
2388
- outside the row's edges and gets clipped by the parent. Method
2389
- rows are full-width by design, so render the focus indicator
2390
- flush against the border instead. */
2391
2416
  .sv-btn-method:focus-visible {
2392
- outline-offset: 0;
2417
+ outline: none;
2418
+ box-shadow: ${tokens.focusRing};
2393
2419
  }
2394
2420
 
2395
2421
  .sv-btn-method:hover:not(:disabled) {
2396
2422
  background: ${tokens.bgSubtle};
2397
- border-color: ${tokens.border};
2398
- transform: translateY(-2px);
2423
+ border-color: ${tokens.borderHover};
2399
2424
  }
2400
2425
 
2401
2426
  .sv-btn-method:last-child {
@@ -2404,13 +2429,13 @@ function getStyles(options) {
2404
2429
 
2405
2430
  /* Error Buttons */
2406
2431
  .sv-btn-error-primary {
2407
- background: ${tokens.error};
2432
+ background: ${tokens.danger};
2408
2433
  color: ${tokens.textOnPrimary};
2409
2434
  box-shadow: ${tokens.shadowSm};
2410
2435
  }
2411
2436
 
2412
2437
  .sv-btn-error-primary:hover:not(:disabled) {
2413
- background: #B91C1C;
2438
+ background: ${tokens.dangerHover};
2414
2439
  }
2415
2440
 
2416
2441
  .sv-btn-error-secondary {
@@ -2435,26 +2460,26 @@ function getStyles(options) {
2435
2460
  width: 100%;
2436
2461
  }
2437
2462
 
2463
+ /* Bare glyph slot — no container chrome. Quiet slate stroke that takes
2464
+ the accent on row hover. */
2438
2465
  .sv-method-icon {
2439
- width: 36px;
2440
- height: 36px;
2466
+ width: 20px;
2467
+ height: 20px;
2441
2468
  flex-shrink: 0;
2442
2469
  display: flex;
2443
2470
  align-items: center;
2444
2471
  justify-content: center;
2445
- border-radius: 9px;
2446
- background: ${tokens.bgSubtle};
2447
- color: ${tokens.textSecondary};
2448
- transition: background var(--sv-dur-fast) var(--sv-ease-standard);
2472
+ color: ${tokens.textMuted};
2473
+ transition: color var(--sv-dur-fast) var(--sv-ease-standard);
2449
2474
  }
2450
2475
 
2451
2476
  .sv-btn-method:hover:not(:disabled) .sv-method-icon {
2452
- background: ${tokens.bg};
2477
+ color: ${tokens.primary};
2453
2478
  }
2454
2479
 
2455
2480
  .sv-method-icon svg {
2456
- width: 19px;
2457
- height: 19px;
2481
+ width: 20px;
2482
+ height: 20px;
2458
2483
  }
2459
2484
 
2460
2485
  .sv-method-text {
@@ -2463,13 +2488,13 @@ function getStyles(options) {
2463
2488
  }
2464
2489
 
2465
2490
  .sv-method-name {
2466
- font-weight: 500;
2467
- font-size: 14px;
2491
+ font-weight: 600;
2492
+ font-size: 15px;
2468
2493
  color: ${tokens.textPrimary};
2469
2494
  }
2470
2495
 
2471
2496
  .sv-method-description {
2472
- font-size: 12px;
2497
+ font-size: 13px;
2473
2498
  color: ${tokens.textMuted};
2474
2499
  margin-top: 1px;
2475
2500
  }
@@ -2494,12 +2519,12 @@ function getStyles(options) {
2494
2519
  letter-spacing: 0;
2495
2520
  font-variant-numeric: tabular-nums;
2496
2521
  caret-color: transparent;
2497
- border: 1px solid ${tokens.borderHover};
2498
- border-radius: 11px;
2522
+ border: 1px solid ${tokens.border};
2523
+ border-radius: 8px;
2499
2524
  background: ${tokens.bgInput};
2500
2525
  color: ${tokens.textPrimary};
2501
2526
  box-sizing: border-box;
2502
- transition: border-color var(--sv-dur-fast) var(--sv-ease-standard), box-shadow var(--sv-dur-fast) var(--sv-ease-standard), transform var(--sv-dur-fast) var(--sv-ease-spring);
2527
+ transition: border-color var(--sv-dur-fast) var(--sv-ease-standard), box-shadow var(--sv-dur-fast) var(--sv-ease-standard);
2503
2528
  }
2504
2529
 
2505
2530
  .sv-otp-digit:hover:not(:focus):not(:disabled) {
@@ -2510,7 +2535,6 @@ function getStyles(options) {
2510
2535
  outline: none;
2511
2536
  border-color: ${tokens.borderFocus};
2512
2537
  box-shadow: 0 0 0 3px ${tokens.primaryLight};
2513
- transform: translateY(-2px);
2514
2538
  }
2515
2539
 
2516
2540
  .sv-otp-digit:disabled {
@@ -2535,7 +2559,7 @@ function getStyles(options) {
2535
2559
  border: none;
2536
2560
  padding: 0;
2537
2561
  margin-bottom: 16px;
2538
- transition: color 0.15s ease;
2562
+ transition: color var(--sv-dur-fast) var(--sv-ease-standard);
2539
2563
  }
2540
2564
 
2541
2565
  .sv-back-link:hover:not(:disabled) {
@@ -2563,7 +2587,7 @@ function getStyles(options) {
2563
2587
  padding: 10px 12px;
2564
2588
  border-radius: 8px;
2565
2589
  font-size: 13px;
2566
- font-weight: 450;
2590
+ font-weight: 500;
2567
2591
  margin-bottom: 16px;
2568
2592
  }
2569
2593
 
@@ -2619,7 +2643,7 @@ function getStyles(options) {
2619
2643
  color: ${tokens.textSecondary};
2620
2644
  text-decoration: none;
2621
2645
  font-weight: 500;
2622
- transition: color 0.15s ease;
2646
+ transition: color var(--sv-dur-fast) var(--sv-ease-standard);
2623
2647
  }
2624
2648
 
2625
2649
  .sv-footer-link:hover {
@@ -2679,7 +2703,7 @@ function getStyles(options) {
2679
2703
  background: ${tokens.bgInput};
2680
2704
  color: ${tokens.textPrimary};
2681
2705
  box-sizing: border-box;
2682
- transition: border-color 0.15s ease, box-shadow 0.15s ease;
2706
+ transition: border-color var(--sv-dur-fast) var(--sv-ease-standard), box-shadow var(--sv-dur-fast) var(--sv-ease-standard);
2683
2707
  }
2684
2708
 
2685
2709
  .sv-email-input:hover:not(:focus):not(:disabled) {
@@ -2701,7 +2725,7 @@ function getStyles(options) {
2701
2725
  }
2702
2726
 
2703
2727
  .sv-email-input-error:focus {
2704
- box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
2728
+ box-shadow: 0 0 0 3px ${tokens.errorLight};
2705
2729
  }
2706
2730
 
2707
2731
  /* ========================================
@@ -2756,14 +2780,14 @@ function getStyles(options) {
2756
2780
  .sv-error-code-label {
2757
2781
  font-size: 10px;
2758
2782
  font-weight: 600;
2759
- color: ${isDark ? '#F87171' : '#991B1B'};
2783
+ color: ${isDark ? '#e6443d' : '#991b1b'};
2760
2784
  text-transform: uppercase;
2761
2785
  letter-spacing: 0.05em;
2762
2786
  }
2763
2787
 
2764
2788
  .sv-error-code-value {
2765
2789
  font-size: 11px;
2766
- font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Monaco, 'Cascadia Mono', monospace;
2790
+ font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Monaco, 'Cascadia Mono', monospace;
2767
2791
  color: ${tokens.error};
2768
2792
  font-weight: 500;
2769
2793
  }
@@ -2860,10 +2884,10 @@ function getStyles(options) {
2860
2884
  justify-content: center;
2861
2885
  background: transparent;
2862
2886
  border: none;
2863
- border-radius: 8px;
2887
+ border-radius: 6px;
2864
2888
  cursor: pointer;
2865
2889
  color: ${tokens.textMuted};
2866
- transition: background 0.15s ease, color 0.15s ease;
2890
+ transition: background var(--sv-dur-fast) var(--sv-ease-standard), color var(--sv-dur-fast) var(--sv-ease-standard);
2867
2891
  z-index: 1;
2868
2892
  }
2869
2893
 
@@ -2873,12 +2897,8 @@ function getStyles(options) {
2873
2897
  }
2874
2898
 
2875
2899
  .sv-floating-close:focus-visible {
2876
- outline: 2px solid ${tokens.borderFocus};
2877
- outline-offset: 2px;
2878
- }
2879
-
2880
- .sv-floating-close:active {
2881
- transform: scale(0.96);
2900
+ outline: none;
2901
+ box-shadow: ${tokens.focusRing};
2882
2902
  }
2883
2903
 
2884
2904
  /* ========================================
@@ -2938,7 +2958,7 @@ function getStyles(options) {
2938
2958
 
2939
2959
  .sv-not-activated-title {
2940
2960
  font-size: 22px;
2941
- font-weight: 700;
2961
+ font-weight: 600;
2942
2962
  letter-spacing: -0.02em;
2943
2963
  line-height: 1.2;
2944
2964
  margin: 0 0 10px 0;
@@ -2960,7 +2980,7 @@ function getStyles(options) {
2960
2980
  gap: 4px;
2961
2981
  padding: 14px 16px;
2962
2982
  border: 1px solid ${tokens.border};
2963
- border-radius: 12px;
2983
+ border-radius: 10px;
2964
2984
  background: ${tokens.bgSubtle};
2965
2985
  text-align: left;
2966
2986
  margin-bottom: 22px;
@@ -3008,7 +3028,7 @@ function getStyles(options) {
3008
3028
  font-size: 13px;
3009
3029
  font-weight: 500;
3010
3030
  color: ${tokens.textMuted};
3011
- transition: color 0.15s ease;
3031
+ transition: color var(--sv-dur-fast) var(--sv-ease-standard);
3012
3032
  align-self: center;
3013
3033
  }
3014
3034
 
@@ -3017,8 +3037,8 @@ function getStyles(options) {
3017
3037
  }
3018
3038
 
3019
3039
  .sv-not-activated-dismiss:focus-visible {
3020
- outline: 2px solid ${tokens.borderFocus};
3021
- outline-offset: 2px;
3040
+ outline: none;
3041
+ box-shadow: ${tokens.focusRing};
3022
3042
  border-radius: 6px;
3023
3043
  }
3024
3044
 
@@ -3063,7 +3083,7 @@ function getStyles(options) {
3063
3083
  border: none;
3064
3084
  padding: 12px 0 0 0;
3065
3085
  margin-top: 8px;
3066
- transition: color 0.15s ease;
3086
+ transition: color var(--sv-dur-fast) var(--sv-ease-standard);
3067
3087
  }
3068
3088
 
3069
3089
  .sv-fallback-link:hover {
@@ -3124,7 +3144,7 @@ function getStyles(options) {
3124
3144
  background: none;
3125
3145
  border: none;
3126
3146
  padding: 12px 0 0 0;
3127
- transition: color 0.15s ease;
3147
+ transition: color var(--sv-dur-fast) var(--sv-ease-standard);
3128
3148
  }
3129
3149
 
3130
3150
  .sv-skip-link:hover {
@@ -3142,14 +3162,11 @@ function getStyles(options) {
3142
3162
  margin-bottom: 16px;
3143
3163
  }
3144
3164
 
3165
+ /* Bare glyph — no tinted circle container. */
3145
3166
  .sv-sparklink-icon {
3146
- width: 56px;
3147
- height: 56px;
3148
- color: ${tokens.primary};
3149
- background: ${tokens.primaryLight};
3150
- padding: 14px;
3151
- border-radius: 50%;
3152
- box-sizing: content-box;
3167
+ width: 48px;
3168
+ height: 48px;
3169
+ color: ${tokens.textSecondary};
3153
3170
  }
3154
3171
 
3155
3172
  .sv-sparklink-waiting {
@@ -3175,7 +3192,7 @@ function getStyles(options) {
3175
3192
 
3176
3193
  .sv-sparklink-waiting-text {
3177
3194
  font-size: 13px;
3178
- font-weight: 450;
3195
+ font-weight: 500;
3179
3196
  color: ${tokens.textSecondary};
3180
3197
  }
3181
3198
 
@@ -3190,9 +3207,10 @@ function getStyles(options) {
3190
3207
  }
3191
3208
 
3192
3209
  .sv-sparklink-countdown-time {
3193
- font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Monaco, 'Cascadia Mono', monospace;
3210
+ font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Monaco, 'Cascadia Mono', monospace;
3194
3211
  font-weight: 600;
3195
3212
  font-size: 14px;
3213
+ font-variant-numeric: tabular-nums;
3196
3214
  color: ${tokens.textPrimary};
3197
3215
  min-width: 40px;
3198
3216
  }
@@ -3387,7 +3405,7 @@ function getStyles(options) {
3387
3405
  margin-bottom: 0;
3388
3406
  border-width: 0;
3389
3407
  overflow: hidden;
3390
- transition: opacity 0.25s ease;
3408
+ transition: opacity var(--sv-dur-slow) var(--sv-ease-standard);
3391
3409
  }
3392
3410
 
3393
3411
  .sv-bridge-alert.sv-shown {
@@ -3404,7 +3422,7 @@ function getStyles(options) {
3404
3422
  width: 17px;
3405
3423
  height: 17px;
3406
3424
  margin-top: 1px;
3407
- color: #d97706;
3425
+ color: ${tokens.warningIcon};
3408
3426
  }
3409
3427
 
3410
3428
  /* Text stacked over the action, so the message keeps the full width and
@@ -3435,7 +3453,7 @@ function getStyles(options) {
3435
3453
  }
3436
3454
 
3437
3455
  .sv-bridge-retry:hover { color: ${tokens.primaryHover}; }
3438
- .sv-bridge-retry:focus-visible { outline: 2px solid ${tokens.borderFocus}; outline-offset: 2px; border-radius: 4px; }
3456
+ .sv-bridge-retry:focus-visible { outline: none; box-shadow: ${tokens.focusRing}; border-radius: 4px; }
3439
3457
 
3440
3458
  @media (prefers-reduced-motion: reduce) {
3441
3459
  .sv-bridge-dots span { animation: none; opacity: 0.5; }
@@ -3488,8 +3506,9 @@ function getStyles(options) {
3488
3506
  /**
3489
3507
  * SVG Icon Factory
3490
3508
  *
3491
- * Enterprise-grade icons with clean, minimal design.
3492
- * Uses proper DOM element creation for security.
3509
+ * Bare outline glyphs per the SparkVault design system: stroke `currentColor`
3510
+ * so the stylesheet drives color, no tinted container backgrounds, round
3511
+ * caps/joins. Uses proper DOM element creation for security.
3493
3512
  */
3494
3513
  function createSvgElement(viewBox, width = 16, height = 16) {
3495
3514
  const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
@@ -3557,88 +3576,63 @@ function createCloseIcon() {
3557
3576
  return svg;
3558
3577
  }
3559
3578
  /**
3560
- * Passkey icon - simple key design
3579
+ * Passkey icon - bare outline key design
3561
3580
  */
3562
3581
  function createPasskeyIcon() {
3563
3582
  const svg = createSvgElement('0 0 56 56', 56, 56);
3564
3583
  svg.classList.add('sv-passkey-icon');
3565
- // Circle background
3566
- svg.appendChild(createCircle(28, 28, 26, {
3567
- fill: '#EEF2FF',
3568
- stroke: '#E0E7FF',
3569
- 'stroke-width': '1',
3570
- }));
3571
- // Key icon - centered at 28,28
3584
+ // Key glyph optically centered in the 56px box (footprint unchanged)
3572
3585
  const group = document.createElementNS('http://www.w3.org/2000/svg', 'g');
3573
- group.setAttribute('transform', 'translate(28, 28)');
3586
+ group.setAttribute('transform', 'translate(29.5, 26.5)');
3574
3587
  const strokeAttrs = {
3575
- stroke: '#4F46E5',
3576
- 'stroke-width': '2.5',
3588
+ stroke: 'currentColor',
3589
+ 'stroke-width': '3',
3577
3590
  'stroke-linecap': 'round',
3578
3591
  'stroke-linejoin': 'round',
3579
3592
  fill: 'none',
3580
3593
  };
3581
3594
  // Key head (circle)
3582
- group.appendChild(createCircle(-6, -6, 6, strokeAttrs));
3595
+ group.appendChild(createCircle(-9.5, -9.5, 9.5, strokeAttrs));
3583
3596
  // Key shaft
3584
- group.appendChild(createPath('M-1.5 -1.5L10 10', strokeAttrs));
3597
+ group.appendChild(createPath('M-2.8 -2.8L16 16', strokeAttrs));
3585
3598
  // Key teeth
3586
- group.appendChild(createPath('M6 6L6 10', strokeAttrs));
3587
- group.appendChild(createPath('M10 10L10 14', strokeAttrs));
3599
+ group.appendChild(createPath('M9.5 9.5L9.5 15.5', strokeAttrs));
3600
+ group.appendChild(createPath('M16 16L16 22', strokeAttrs));
3588
3601
  svg.appendChild(group);
3589
3602
  return svg;
3590
3603
  }
3591
3604
  /**
3592
- * Error icon - clean triangle alert
3605
+ * Bare outline alert triangle shared by the error and expired icons.
3606
+ * Color comes from `currentColor` via the class-specific stylesheet rules.
3593
3607
  */
3594
- function createErrorIcon() {
3608
+ function createAlertTriangleIcon(className) {
3595
3609
  const svg = createSvgElement('0 0 48 48', 48, 48);
3596
- svg.classList.add('sv-error-icon');
3597
- // Circle background
3598
- svg.appendChild(createCircle(24, 24, 22, {
3599
- fill: '#FEF2F2',
3600
- stroke: '#FECACA',
3601
- 'stroke-width': '1',
3602
- }));
3603
- // Alert triangle
3604
- const group = document.createElementNS('http://www.w3.org/2000/svg', 'g');
3605
- group.setAttribute('transform', 'translate(10, 12)');
3606
- group.appendChild(createPath('M14 4L2 24h24L14 4z', { fill: '#DC2626' }));
3607
- // Exclamation
3608
- group.appendChild(createPath('M14 10v5', {
3609
- stroke: '#FFFFFF',
3610
- 'stroke-width': '2',
3610
+ svg.classList.add(className);
3611
+ const strokeAttrs = {
3612
+ stroke: 'currentColor',
3613
+ 'stroke-width': '2.5',
3611
3614
  'stroke-linecap': 'round',
3612
- }));
3613
- group.appendChild(createCircle(14, 19, 1, { fill: '#FFFFFF' }));
3614
- svg.appendChild(group);
3615
+ 'stroke-linejoin': 'round',
3616
+ fill: 'none',
3617
+ };
3618
+ // Triangle outline
3619
+ svg.appendChild(createPath('M24 9L5.5 39h37L24 9z', strokeAttrs));
3620
+ // Exclamation
3621
+ svg.appendChild(createPath('M24 20v8', strokeAttrs));
3622
+ svg.appendChild(createCircle(24, 33.5, 1.5, { fill: 'currentColor' }));
3615
3623
  return svg;
3616
3624
  }
3617
3625
  /**
3618
- * Expired icon - grayscale triangle alert for expired states
3626
+ * Error icon - alert triangle for error states
3627
+ */
3628
+ function createErrorIcon() {
3629
+ return createAlertTriangleIcon('sv-error-icon');
3630
+ }
3631
+ /**
3632
+ * Expired icon - alert triangle for expired states
3619
3633
  */
3620
3634
  function createExpiredIcon() {
3621
- const svg = createSvgElement('0 0 48 48', 48, 48);
3622
- svg.classList.add('sv-expired-icon');
3623
- // Circle background - muted gray
3624
- svg.appendChild(createCircle(24, 24, 22, {
3625
- fill: '#F5F5F5',
3626
- stroke: '#E5E5E5',
3627
- 'stroke-width': '1',
3628
- }));
3629
- // Alert triangle - gray
3630
- const group = document.createElementNS('http://www.w3.org/2000/svg', 'g');
3631
- group.setAttribute('transform', 'translate(10, 12)');
3632
- group.appendChild(createPath('M14 4L2 24h24L14 4z', { fill: '#737373' }));
3633
- // Exclamation
3634
- group.appendChild(createPath('M14 10v5', {
3635
- stroke: '#FFFFFF',
3636
- 'stroke-width': '2',
3637
- 'stroke-linecap': 'round',
3638
- }));
3639
- group.appendChild(createCircle(14, 19, 1, { fill: '#FFFFFF' }));
3640
- svg.appendChild(group);
3641
- return svg;
3635
+ return createAlertTriangleIcon('sv-expired-icon');
3642
3636
  }
3643
3637
  /**
3644
3638
  * Method icons