Skip to content

po4yka/RIPDPI / docs/design/rds

ripdpi-design

Verified

Use this skill to generate well-branded interfaces and assets for RIPDPI (an Android-native, Compose-first VPN and DPI-bypass app), either for production or throwaway prototypes/mocks/etc. Contains essential design guidelines, colors, type, fonts, brand-ship icons, and an interactive UI kit of every public composable from the live ui/components tree.

FileKindSize
COVERAGE.mdmarkdown23.0 KB
README.mdmarkdown19.6 KB
SKILL.mdskill md4.0 KB
assets/ic_launcher.pngbinary9.7 KB
assets/ic_launcher.svgother3.0 KB
assets/icons/ic_article_outline.svgother315 B
assets/icons/ic_launcher_foreground_ripdpi_clean.svgother3.0 KB
assets/icons/ic_launcher_foreground_ripdpi_cracked.svgother6.6 KB
assets/icons/ic_launcher_foreground_ripdpi_disintegrate.svgother9.5 KB
assets/icons/ic_launcher_foreground_ripdpi_glitch.svgother8.4 KB
assets/icons/ic_launcher_foreground_ripdpi_rubble.svgother7.8 KB
assets/icons/ic_launcher_foreground_ripdpi_stitch.svgother13.3 KB
assets/icons/ic_launcher_monochrome_ripdpi.svgother3.0 KB
assets/icons/ic_notification.svgother270 B
assets/icons/ic_settings_outline.svgother1.0 KB
assets/icons/ic_stop_outline.svgother153 B
assets/icons/ic_tune_outline.svgother244 B
assets/icons/ic_vpn_key_outline.svgother296 B
assets/icons/ripdpi_wordmark.svgother34.6 KB
assets/raw/ic_article_outline.xmlconfig552 B
assets/raw/ic_launcher_foreground_ripdpi_clean.xmlconfig3.4 KB
assets/raw/ic_launcher_foreground_ripdpi_cracked.xmlconfig7.0 KB
assets/raw/ic_launcher_foreground_ripdpi_disintegrate.xmlconfig10.1 KB
assets/raw/ic_launcher_foreground_ripdpi_glitch.xmlconfig8.7 KB
assets/raw/ic_launcher_foreground_ripdpi_rubble.xmlconfig8.4 KB
assets/raw/ic_launcher_foreground_ripdpi_stitch.xmlconfig13.5 KB
assets/raw/ic_launcher_monochrome_ripdpi.xmlconfig3.4 KB
assets/raw/ic_notification.xmlconfig3.4 KB
assets/raw/ic_settings_outline.xmlconfig1.2 KB
assets/raw/ic_stop_outline.xmlconfig338 B
assets/raw/ic_tune_outline.xmlconfig429 B
assets/raw/ic_vpn_key_outline.xmlconfig481 B
colors_and_type.cssother12.2 KB
diagnostic-reports-index.htmlother4.8 KB
fonts/geist_mono_bold.ttfbinary146.8 KB
fonts/geist_mono_medium.ttfbinary145.7 KB
fonts/geist_mono_regular.ttfbinary144.9 KB
fonts/geist_sans_bold.ttfbinary125.7 KB
fonts/geist_sans_medium.ttfbinary124.6 KB
fonts/geist_sans_regular.ttfbinary123.0 KB
mobile-diagnostic-report.htmlother12.0 KB
mobile-elements-showcase.htmlother19.3 KB
mobile-vpn-connection.htmlother12.2 KB
preview/a11y-color-contrast.htmlother8.3 KB
preview/a11y-focus-rings.htmlother6.5 KB
preview/android-crash-screen.htmlother2.3 KB
preview/android-customization.htmlother3.0 KB
preview/android-glance-widget.htmlother4.0 KB
preview/android-history.htmlother2.3 KB
preview/android-nav-bar.htmlother1.6 KB
preview/android-nav-rail.htmlother3.2 KB
preview/android-notif-foreground.htmlother3.4 KB
preview/android-notif-heads-up.htmlother2.5 KB
preview/android-notif-lock-screen.htmlother2.3 KB
preview/android-permission-rationale.htmlother3.0 KB
preview/android-qs-tile.htmlother2.3 KB
preview/android-scanner.htmlother1.9 KB
preview/android-splash.htmlother1.4 KB
preview/android-split-columns.htmlother2.1 KB
preview/android-status-bar.htmlother2.9 KB
preview/android-vpn-permission.htmlother2.0 KB
preview/brand-launcher-variants.htmlother4.7 KB
preview/brand-mark.htmlother3.4 KB
preview/color-anchors.htmlother2.0 KB
preview/color-destructive.htmlother1.9 KB
preview/color-edges.htmlother3.4 KB
preview/color-info.htmlother1.8 KB
preview/color-neutrals.htmlother3.3 KB
preview/color-restricted.htmlother1.9 KB
preview/color-success.htmlother1.8 KB
preview/color-warning.htmlother1.8 KB
preview/components-accordion.htmlother6.2 KB
preview/components-actuator-states.htmlother8.8 KB
preview/components-actuator.htmlother6.6 KB
preview/components-analysis-progress.htmlother2.1 KB
preview/components-bottom-nav.htmlother2.1 KB
preview/components-bottom-sheet.htmlother2.0 KB
preview/components-brand-badge.htmlother2.6 KB
preview/components-buttons.htmlother2.5 KB
preview/components-card.htmlother2.1 KB
preview/components-chips.htmlother1.6 KB
preview/components-cidr-input.htmlother5.0 KB
preview/components-combobox.htmlother6.8 KB
preview/components-command-palette.htmlother7.3 KB
preview/components-dialog.htmlother2.1 KB
preview/components-diff-viewer.htmlother6.6 KB
preview/components-dropdown.htmlother2.6 KB
preview/components-empty-state.htmlother1.5 KB
preview/components-filter-bar.htmlother5.9 KB
preview/components-heartbeat-indicator.htmlother6.4 KB
preview/components-icon-buttons.htmlother3.9 KB
preview/components-json-tree.htmlother7.7 KB
preview/components-kbd-shortcut.htmlother4.2 KB
preview/components-live-counter.htmlother7.3 KB
preview/components-log-row.htmlother2.5 KB
preview/components-log-stream.htmlother7.5 KB
preview/components-metric-pill.htmlother1.7 KB
preview/components-page-indicators.htmlother1.4 KB
preview/components-preset-card.htmlother2.0 KB
preview/components-progress-bar.htmlother4.8 KB
preview/components-section-header.htmlother1.7 KB
preview/components-segmented.htmlother4.3 KB
preview/components-settings-row.htmlother2.0 KB
preview/components-shimmer.htmlother3.9 KB
preview/components-slider.htmlother6.6 KB
preview/components-snackbar.htmlother3.0 KB
preview/components-spinner.htmlother1.8 KB
preview/components-stage-progress.htmlother1.9 KB
preview/components-stale-data-badge.htmlother5.8 KB
preview/components-status-indicator.htmlother1.9 KB
preview/components-stepper.htmlother7.0 KB
preview/components-switch.htmlother1.8 KB
preview/components-tabs.htmlother4.6 KB
preview/components-text-action.htmlother2.2 KB
preview/components-text-field.htmlother1.8 KB
preview/components-toggle-alternatives.htmlother2.4 KB
preview/components-tooltip.htmlother2.0 KB
preview/components-top-app-bar.htmlother2.3 KB
preview/components-warning-banner.htmlother3.1 KB
preview/diagnostic-censorship-signature.htmlother8.1 KB
preview/diagnostic-dns-resolvers.htmlother10.1 KB
preview/diagnostic-hop-trace.htmlother7.1 KB
preview/diagnostic-mtu-scan.htmlother7.4 KB
preview/diagnostic-port-matrix.htmlother7.5 KB
preview/diagnostic-report-summary.htmlother5.2 KB
preview/gesture-long-press-menu.htmlother6.9 KB
preview/gesture-pull-to-refresh.htmlother8.5 KB
preview/gesture-swipe-actions.htmlother7.4 KB
preview/icon-set.htmlother2.9 KB
preview/motion-connection-states.htmlother7.5 KB
preview/motion-data-ticker.htmlother5.5 KB
preview/motion-easing-curves.htmlother4.6 KB
preview/motion-page-transitions.htmlother6.0 KB
preview/motion-probe-pulse.htmlother5.4 KB
preview/motion-reduced-motion.htmlother6.7 KB
preview/motion-skeleton-shimmer.htmlother5.8 KB
preview/motion-toast-choreography.htmlother8.4 KB
preview/motion-tokens.htmlother2.8 KB
preview/onboarding-coach-mark.htmlother7.6 KB
preview/onboarding-tour-cards.htmlother5.6 KB
preview/preview.cssother1.9 KB
preview/radii.htmlother3.8 KB
preview/share-bottom-sheet.htmlother5.6 KB
preview/share-link-preview.htmlother5.1 KB
preview/share-qr-code.htmlother5.2 KB
preview/share-result-viewer.htmlother3.5 KB
preview/share-stats-card.htmlother3.5 KB
preview/spacing-scale.htmlother3.6 KB
preview/strokes.htmlother1.3 KB
preview/touch-targets.htmlother1.9 KB
preview/type-body.htmlother1.4 KB
preview/type-brand.htmlother1.1 KB
preview/type-display.htmlother1.4 KB
preview/type-mono.htmlother1.4 KB
preview/type-section-title.htmlother1.3 KB
preview/vpn-awg-editor.htmlother12.6 KB
preview/vpn-block-check.htmlother3.5 KB
preview/vpn-confirm-disconnect.htmlother2.4 KB
preview/vpn-data-transparency.htmlother3.9 KB
preview/vpn-degradation-strip.htmlother5.5 KB
preview/vpn-detection-check.htmlother3.7 KB
preview/vpn-dns-picker.htmlother3.4 KB
preview/vpn-export-consent.htmlother3.6 KB
preview/vpn-first-run-test.htmlother5.1 KB
preview/vpn-handshake-timeline.htmlother9.7 KB
preview/vpn-identity-card.htmlother2.8 KB
preview/vpn-in-app-browser.htmlother3.9 KB
preview/vpn-kill-switch.htmlother3.7 KB
preview/vpn-latency-graph.htmlother2.9 KB
preview/vpn-network-change.htmlother2.9 KB
preview/vpn-oom-recovery.htmlother2.4 KB
preview/vpn-pcap-viewer.htmlother3.1 KB
preview/vpn-per-app-routing.htmlother3.9 KB
preview/vpn-permission-summary.htmlother3.4 KB
preview/vpn-presets-gallery.htmlother3.3 KB
preview/vpn-probe-live.htmlother3.0 KB
preview/vpn-profile-switcher.htmlother2.9 KB
preview/vpn-quick-vs-advanced.htmlother3.0 KB
preview/vpn-reconnect-toast.htmlother5.9 KB
preview/vpn-relay-picker.htmlother4.0 KB
preview/vpn-replay-failure.htmlother3.6 KB
preview/vpn-session-card.htmlother7.2 KB
preview/vpn-snooze.htmlother2.9 KB
preview/vpn-state-history.htmlother9.2 KB
preview/vpn-state-machine.htmlother11.4 KB
preview/vpn-strategy-ab.htmlother5.0 KB
preview/vpn-strategy-editor.htmlother4.2 KB
preview/vpn-strategy-import.htmlother3.6 KB
preview/vpn-strategy-probe-wizard.htmlother3.8 KB
preview/vpn-throughput-graph.htmlother3.5 KB
preview/whats-new-card.htmlother6.1 KB
ui_kits/android/MobileDiagnosticReport.jsxother33.4 KB
ui_kits/android/MobileElements.jsxother34.1 KB
ui_kits/android/MobileVpnConnection.jsxother36.6 KB
ui_kits/android/README.mdmarkdown3.5 KB
ui_kits/android/RipDpiComponents.jsxother27.1 KB
ui_kits/android/RipDpiScreens.jsxother17.7 KB
ui_kits/android/android-frame.jsxother9.2 KB
ui_kits/android/index.htmlother14.2 KB

ui_kits/android/MobileVpnConnection.jsx

View on GitHub
/* ui_kits/android/MobileVpnConnection.jsx
   Mobile adoption of the 6 VPN connection-state preview elements.
   Composed from existing RipDpi kit primitives (RipDpiCard, MetricPill,
   SectionHeader, RipDpiButton, WarningBanner) plus view-specific bits.

   Source elements:
     preview/vpn-state-machine.html
     preview/vpn-handshake-timeline.html
     preview/vpn-session-card.html
     preview/vpn-reconnect-toast.html
     preview/vpn-degradation-strip.html
     preview/vpn-state-history.html
*/

// ─────────────────────────────────────────────────────────────
// 1. State machine — vertical lifecycle flow with current ring
// ─────────────────────────────────────────────────────────────
function MobileStateMachine() {
  const { c } = useTheme();
  // Linear traversal of the state machine; same set of states as the
  // desktop diagram but expressed as a top-to-bottom lifecycle, which is
  // the natural mobile shape. Current state ringed; degraded / recover
  // pair shown as a two-arrow bidirectional row.
  const steps = [
    { id: 'disc',  name: 'Disconnected',  meta: 'idle',          tone: 'idle',  trigger: 'tap connect' },
    { id: 'perm',  name: 'Permissioning', meta: 'os prompt',     tone: 'conn',  trigger: 'allowed' },
    { id: 'conn',  name: 'Connecting',    meta: 'handshake',     tone: 'conn',  trigger: 'handshake ok', active: true,
      branch: { name: 'Failed', meta: 'timeout 8 s', tone: 'fail' } },
    { id: 'tunl',  name: 'Tunneling',     meta: '12 m 14 s',     tone: 'tunl',  current: true,
      pair: { downLabel: 'loss > 3% · 30 s', upLabel: 'loss < 0.5%' },
      trigger: null /* see pair handling below */ },
    { id: 'degr',  name: 'Degraded',      meta: '2 in 24 h',     tone: 'degr',  trigger: 'network change' },
    { id: 'recon', name: 'Reconnecting',  meta: 'backoff',       tone: 'recon', trigger: 're-handshake → Tunneling',
      branch: { name: 'Failed', meta: '3 attempts', tone: 'fail',
                next: { name: '(Disconnected)', meta: 'dismiss', tone: 'idle' } } },
  ];

  const toneStyle = (tone) => {
    switch (tone) {
      case 'tunl':  return { bg: c.successContainer,     border: c.success,     fg: c.successContainerFg,     dot: c.success,           pulse: true };
      case 'degr':  return { bg: c.warningContainer,     border: c.warning,     fg: c.warningContainerFg,     dot: c.warning };
      case 'recon': return { bg: c.infoContainer,        border: c.info,        fg: c.infoContainerFg,        dot: c.info };
      case 'fail':  return { bg: c.destructiveContainer, border: c.destructive, fg: c.destructiveContainerFg, dot: c.destructive };
      case 'conn':  return { bg: c.card,                 border: c.border,      fg: c.foreground,             dot: c.info };
      default:      return { bg: c.card,                 border: c.border,      fg: c.foreground,             dot: c.mutedForeground };
    }
  };

  const StateRow = ({ step, indent = 0, branchTone = null }) => {
    const t = toneStyle(step.tone);
    return (
      <div style={{ display: 'flex', alignItems: 'stretch', gap: 10, marginLeft: indent }}>
        {/* rail spine */}
        <div style={{ width: 18, display: 'flex', flexDirection: 'column', alignItems: 'center', flexShrink: 0 }}>
          <div style={{ width: 10, height: 10, borderRadius: 9999, background: t.dot,
                        boxShadow: t.pulse ? `0 0 0 3px ${c.card}, 0 0 0 4px ${t.border}` : 'none',
                        animation: t.pulse ? 'rdpPulse 1.6s ease-in-out infinite' : 'none' }}/>
        </div>
        {/* state pill */}
        <div style={{
          flex: 1,
          background: t.bg,
          border: `1px solid ${t.border}`,
          borderRadius: 10,
          padding: '10px 12px',
          display: 'flex', justifyContent: 'space-between', alignItems: 'center', gap: 8,
          position: 'relative',
          outline: step.current ? `1.5px solid ${c.foreground}` : 'none',
          outlineOffset: step.current ? 3 : 0,
        }}>
          <div style={{ display: 'flex', flexDirection: 'column', gap: 1, minWidth: 0 }}>
            <span style={{ font: `500 13px/16px ${RDP.type.mono}`, color: t.fg, letterSpacing: 0.2 }}>{step.name}</span>
            <span style={{ font: `9.5px ${RDP.type.mono}`, color: c.mutedForeground, letterSpacing: 0.4, textTransform: 'uppercase' }}>{step.meta}</span>
          </div>
          {step.current && (
            <span style={{ font: `9px ${RDP.type.mono}`, padding: '2px 6px', borderRadius: 3, background: c.foreground, color: c.background, letterSpacing: 0.5, flexShrink: 0 }}>CURRENT</span>
          )}
        </div>
      </div>
    );
  };

  const Connector = ({ label, branchLabel, dashed = false, color = c.outlineVariant }) => (
    <div style={{ display: 'flex', alignItems: 'center', gap: 10, marginLeft: 0 }}>
      <div style={{ width: 18, display: 'flex', justifyContent: 'center', flexShrink: 0 }}>
        <div style={{ width: 2, height: 22, background: dashed
          ? `repeating-linear-gradient(to bottom, ${color} 0 3px, transparent 3px 6px)`
          : color }}/>
      </div>
      <div style={{ font: `9.5px ${RDP.type.mono}`, color: c.mutedForeground, letterSpacing: 0.3, padding: '4px 0', flex: 1 }}>
        {label && <span>↓ {label}</span>}
        {branchLabel && (
          <span style={{ marginLeft: 14, color: c.destructive }}>↘ {branchLabel}</span>
        )}
      </div>
    </div>
  );

  return (
    <RipDpiCard>
      <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'baseline' }}>
        <span style={{ font: `500 14px/20px ${RDP.type.sans}` }}>Connection lifecycle</span>
        <span style={{ font: `400 11px/14px ${RDP.type.mono}`, color: c.mutedForeground }}>9 transitions / 24 h</span>
      </div>

      <div style={{ display: 'flex', flexDirection: 'column' }}>
        {/* Disconnected */}
        <StateRow step={steps[0]}/>
        <Connector label={steps[0].trigger}/>

        {/* Permissioning */}
        <StateRow step={steps[1]}/>
        <Connector label={steps[1].trigger}/>

        {/* Connecting (branches to Failed on timeout) */}
        <StateRow step={steps[2]}/>
        <Connector label={steps[2].trigger} branchLabel={steps[2].branch.meta} dashed/>

        {/* Tunneling — current */}
        <StateRow step={steps[3]}/>
        {/* Tunneling ↔ Degraded — bidirectional row */}
        <div style={{ display: 'flex', alignItems: 'center', gap: 10 }}>
          <div style={{ width: 18, display: 'flex', justifyContent: 'space-between', flexShrink: 0, padding: '6px 4px' }}>
            <span style={{ font: `12px ${RDP.type.mono}`, color: c.warning }}>↓</span>
            <span style={{ font: `12px ${RDP.type.mono}`, color: c.success }}>↑</span>
          </div>
          <div style={{ display: 'flex', justifyContent: 'space-between', flex: 1, font: `9.5px ${RDP.type.mono}`, color: c.mutedForeground, letterSpacing: 0.3 }}>
            <span>{steps[3].pair.downLabel}</span>
            <span>{steps[3].pair.upLabel}</span>
          </div>
        </div>

        {/* Degraded */}
        <StateRow step={steps[4]}/>
        <Connector label={steps[4].trigger}/>

        {/* Reconnecting (branches to Failed) */}
        <StateRow step={steps[5]}/>
        <Connector label="re-handshake → Tunneling" branchLabel="3 attempts" dashed/>

        {/* Failed (terminal branch) */}
        <StateRow step={{ name: 'Failed', meta: 'last 6 h: 0', tone: 'fail' }} indent={20}/>
        <div style={{ marginLeft: 20 }}>
          <Connector label="dismiss"/>
        </div>
        <StateRow step={{ name: '(Disconnected)', meta: 'loops back', tone: 'idle' }} indent={20}/>
      </div>

      <div style={{ display: 'flex', flexWrap: 'wrap', gap: 8, paddingTop: 10, borderTop: `0.5px solid ${c.divider}`, marginTop: 4, font: `10.5px ${RDP.type.mono}`, color: c.mutedForeground }}>
        {[
          ['Idle',      c.card,                 c.border],
          ['Transition',c.infoContainer,        c.info],
          ['Healthy',   c.successContainer,     c.success],
          ['Degraded',  c.warningContainer,     c.warning],
          ['Failed',    c.destructiveContainer, c.destructive],
        ].map(([nm, bg, br]) => (
          <span key={nm} style={{ display: 'inline-flex', alignItems: 'center', gap: 5 }}>
            <span style={{ width: 10, height: 10, borderRadius: 3, background: bg, border: `1px solid ${br}` }}/>{nm}
          </span>
        ))}
      </div>
    </RipDpiCard>
  );
}

// ─────────────────────────────────────────────────────────────
// 2. Handshake timeline — compact Gantt
// ─────────────────────────────────────────────────────────────
function MobileHandshakeTimeline() {
  const { c } = useTheme();
  const rows = [
    { name: 'DNS',             sub: 'cloudflare',           left: 0,    width: 1.6,  dur: '24 ms',  tone: 'ok' },
    { name: 'TCP / QUIC init', sub: 'UDP 443 · I_INITIAL',  left: 1.6,  width: 3.0,  dur: '45 ms',  tone: 'info' },
    { name: 'TLS ClientHello', sub: 'ECH outer · grease',   left: 4.6,  width: 12.8, dur: '192 ms', tone: 'info' },
    { name: 'Key exchange',    sub: 'X25519 · Noise IK',    left: 17.4, width: 7.6,  dur: '114 ms', tone: 'info' },
    { name: 'Auth',            sub: 'PSK + device cert',    left: 25.0, width: 5.4,  dur: '81 ms',  tone: 'info' },
    { name: 'MTU probe',       sub: '576 → 1380 (DF set)',  left: 30.4, width: 28.2, dur: '423 ms', tone: 'warn' },
    { name: 'Route install',   sub: 'VpnService.Builder',   left: 58.6, width: 4.6,  dur: '69 ms',  tone: 'ok' },
    { name: 'First packet',    sub: 'echo · 1 RTT',         left: 63.2, width: 3.6,  dur: '54 ms',  tone: 'ok' },
    { name: 'Keepalive',       sub: 'queued · t+25 s',      left: 66.8, width: 33.2, dur: '—',      tone: 'queued', dim: true },
  ];
  const barColor = (tone) => tone === 'ok' ? c.success : tone === 'info' ? c.info : tone === 'warn' ? c.warning : tone === 'bad' ? c.destructive : null;
  const NOW = 66.8;

  return (
    <RipDpiCard>
      <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'flex-end' }}>
        <div>
          <div style={{ font: `500 14px/18px ${RDP.type.sans}` }}>Handshake timeline</div>
          <div style={{ font: `10.5px ${RDP.type.mono}`, color: c.mutedForeground, marginTop: 2 }}>cloudflare-dns.com · attempt 1/3</div>
        </div>
        <div style={{ textAlign: 'right' }}>
          <div style={{ font: `500 22px/24px ${RDP.type.mono}`, fontVariantNumeric: 'tabular-nums' }}>1.42<span style={{ font: `10.5px ${RDP.type.mono}`, color: c.mutedForeground, marginLeft: 3 }}>s</span></div>
          <div style={{ font: `9.5px ${RDP.type.mono}`, letterSpacing: 0.4, textTransform: 'uppercase', color: c.mutedForeground, marginTop: 2 }}>1st packet</div>
        </div>
      </div>

      {/* Axis */}
      <div style={{ position: 'relative', height: 16, marginTop: 6 }}>
        {[0, 500, 1000, 1500].map((ms, i) => (
          <span key={ms} style={{ position: 'absolute', left: `${(ms / 1500) * 100}%`, transform: 'translateX(-50%)', font: `9.5px ${RDP.type.mono}`, color: c.mutedForeground, fontVariantNumeric: 'tabular-nums' }}>
            <span style={{ position: 'absolute', left: '50%', bottom: -4, transform: 'translateX(-50%)', width: 1, height: 4, background: c.outlineVariant }}/>
            {ms}{i === 3 ? ' ms' : ''}
          </span>
        ))}
      </div>

      {/* Rows: compact two-line — label on top, bar + duration on bottom */}
      <div style={{ position: 'relative' }}>
        {rows.map((r, i) => (
          <div key={r.name} style={{
            display: 'grid', gridTemplateColumns: '1fr 60px', gap: 10, alignItems: 'center',
            padding: '8px 0', borderTop: i === 0 ? `0.5px solid ${c.divider}` : `0.5px solid ${c.divider}`,
            opacity: r.dim ? 0.6 : 1,
          }}>
            <div style={{ display: 'flex', flexDirection: 'column', gap: 4, minWidth: 0 }}>
              <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'baseline', gap: 6 }}>
                <span style={{ font: `12px ${RDP.type.mono}`, color: c.foreground, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>{r.name}</span>
                <span style={{ font: `9.5px ${RDP.type.mono}`, color: c.mutedForeground, flexShrink: 0 }}>{r.sub}</span>
              </div>
              <div style={{ position: 'relative', height: 10, background: c.muted, borderRadius: 2 }}>
                {r.tone === 'queued' ? (
                  <span style={{ position: 'absolute', left: `${r.left}%`, width: `${r.width}%`, top: 0, bottom: 0, background: `repeating-linear-gradient(135deg, ${c.outlineVariant} 0 3px, transparent 3px 6px)`, borderRadius: 2 }}/>
                ) : (
                  <span style={{ position: 'absolute', left: `${r.left}%`, width: `${r.width}%`, top: 0, bottom: 0, background: barColor(r.tone), borderRadius: 2 }}/>
                )}
              </div>
            </div>
            <span style={{ font: `500 11.5px/14px ${RDP.type.mono}`,
                           color: r.tone === 'warn' ? c.warning : r.tone === 'bad' ? c.destructive : c.foreground,
                           fontVariantNumeric: 'tabular-nums', textAlign: 'right' }}>{r.dur}</span>
          </div>
        ))}

        {/* NOW marker — pinned to the bar column. The grid is 1fr | 60px with
            10 px gap, so the bar column ends at: full width - 60 px - 10 px.
            NOW lives at `left: NOW% of bar-column`. */}
        <div style={{ position: 'absolute', top: 0, bottom: 0, left: 0, right: 70 /* 60px col + 10px gap */, pointerEvents: 'none' }}>
          <span style={{ position: 'absolute', top: 8, bottom: 8, left: `${NOW}%`, width: 1, background: c.foreground }}>
            <span style={{ position: 'absolute', top: -8, left: '50%', transform: 'translate(-50%, -100%)', font: `8.5px ${RDP.type.mono}`, letterSpacing: 0.5, background: c.foreground, color: c.background, padding: '1px 4px', borderRadius: 2 }}>NOW</span>
          </span>
        </div>
      </div>

      <div style={{ display: 'flex', justifyContent: 'space-between', font: `10.5px ${RDP.type.mono}`, color: c.mutedForeground, paddingTop: 8, borderTop: `0.5px solid ${c.divider}` }}>
        <span>Slowest <span style={{ color: c.foreground }}>MTU probe</span></span>
        <span>Budget <span style={{ color: c.foreground }}>2.0 s</span></span>
      </div>
    </RipDpiCard>
  );
}

// ─────────────────────────────────────────────────────────────
// 3. Session card — currently connected
// ─────────────────────────────────────────────────────────────
function MobileSessionCard() {
  const { c } = useTheme();
  return (
    <RipDpiCard variant="status">
      <div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
        <span style={{ position: 'relative', width: 8, height: 8, borderRadius: 9999, background: c.success }}>
          <span style={{ position: 'absolute', inset: -3, borderRadius: 9999, border: `1.5px solid ${c.success}`, opacity: 0.35, animation: 'rdpRing 1.6s ease-out infinite' }}/>
        </span>
        <span style={{ font: `10.5px ${RDP.type.mono}`, letterSpacing: 0.4, textTransform: 'uppercase', color: c.mutedForeground }}>Connected · Tunneling</span>
      </div>

      <div style={{ font: `500 34px/38px ${RDP.type.mono}`, fontVariantNumeric: 'tabular-nums' }}>00:12:14</div>
      <div style={{ font: `10.5px ${RDP.type.mono}`, color: c.mutedForeground, marginTop: -4 }}>Since 18:30 UTC</div>

      {/* Exit row */}
      <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', gap: 10, padding: '10px 0', borderTop: `0.5px solid ${c.divider}`, borderBottom: `0.5px solid ${c.divider}` }}>
        <div style={{ display: 'flex', alignItems: 'center', gap: 8, minWidth: 0 }}>
          <span style={{ width: 22, height: 16, background: 'linear-gradient(to bottom, #AE1C28 0 33%, #FFFFFF 33% 66%, #21468B 66% 100%)', border: `0.5px solid ${c.outlineVariant}`, borderRadius: 2, flexShrink: 0 }}/>
          <div style={{ display: 'flex', flexDirection: 'column', gap: 1, minWidth: 0 }}>
            <span style={{ font: `500 13px/16px ${RDP.type.sans}`, whiteSpace: 'nowrap' }}>AMS · Amsterdam</span>
            <span style={{ font: `10.5px ${RDP.type.mono}`, color: c.mutedForeground, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>AS13335 · Cloudflare</span>
          </div>
        </div>
        <span style={{ font: `10.5px ${RDP.type.mono}`, color: c.mutedForeground, flexShrink: 0 }}>141.101.65.232</span>
      </div>

      {/* Sparklines */}
      <div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 12 }}>
        <Spark dir="in"  v="2.4" unit="MB/s" color={c.success}
               path="M0,28 L20,22 L40,24 L60,18 L80,20 L100,14 L120,16 L140,10 L160,12 L180,8 L200,12 L220,6 L240,10 L260,4 L280,8 L300,5 L320,3" muted={c.muted}/>
        <Spark dir="out" v="340" unit="KB/s" color={c.info}
               path="M0,30 L20,28 L40,30 L60,26 L80,30 L100,28 L120,30 L140,26 L160,28 L180,30 L200,28 L220,26 L240,30 L260,28 L280,30 L300,26 L320,28" muted={c.muted}/>
      </div>

      {/* KPI row */}
      <div style={{ display: 'grid', gridTemplateColumns: 'repeat(4, 1fr)', gap: 0, paddingTop: 8, borderTop: `0.5px solid ${c.divider}` }}>
        {[
          ['Sent',     '128 MiB', c.foreground],
          ['Received', '1.4 GiB', c.foreground],
          ['RTT p50',  '32 ms',   c.foreground],
          ['Loss',     '0.2%',    c.success],
        ].map(([k, v, col], i) => (
          <div key={k} style={{ padding: '0 8px', borderRight: i < 3 ? `0.5px solid ${c.divider}` : 'none', display: 'flex', flexDirection: 'column', gap: 2 }}>
            <span style={{ font: `9.5px ${RDP.type.mono}`, letterSpacing: 0.4, textTransform: 'uppercase', color: c.mutedForeground }}>{k}</span>
            <span style={{ font: `500 13px/16px ${RDP.type.mono}`, color: col, fontVariantNumeric: 'tabular-nums' }}>{v}</span>
          </div>
        ))}
      </div>

      <div style={{ display: 'flex', gap: 8, alignItems: 'center', paddingTop: 8, borderTop: `0.5px solid ${c.divider}`, flexWrap: 'wrap' }}>
        <span style={{ flex: 1, font: `10.5px ${RDP.type.mono}`, color: c.mutedForeground, minWidth: 0, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>
          <code style={{ padding: '1px 5px', background: c.muted, borderRadius: 3, color: c.foreground }}>tlsrec_split_host</code>
        </span>
        <RipDpiButton text="Pause 5 m" variant="outline" style={{ minHeight: 36, padding: '6px 12px', fontSize: 12 }}/>
        <RipDpiButton text="Disconnect" variant="outline" style={{ minHeight: 36, padding: '6px 12px', fontSize: 12, color: c.destructive, borderColor: c.destructive }}/>
      </div>
    </RipDpiCard>
  );
}

function Spark({ dir, v, unit, color, path, muted }) {
  const { c } = useTheme();
  return (
    <div style={{ display: 'flex', flexDirection: 'column', gap: 4 }}>
      <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'baseline' }}>
        <span style={{ font: `9.5px ${RDP.type.mono}`, letterSpacing: 0.4, textTransform: 'uppercase', color: c.mutedForeground }}>{dir === 'in' ? '↓ Down' : '↑ Up'}</span>
        <span style={{ font: `500 14px/1 ${RDP.type.mono}`, fontVariantNumeric: 'tabular-nums' }}>{v}<span style={{ font: `10px ${RDP.type.mono}`, color: c.mutedForeground, marginLeft: 3 }}>{unit}</span></span>
      </div>
      <svg viewBox="0 0 320 36" preserveAspectRatio="none" style={{ width: '100%', height: 30 }}>
        <path d={`${path} L320,36 L0,36 Z`} fill={color} opacity="0.12"/>
        <path d={path} fill="none" stroke={color} strokeWidth="1.5"/>
      </svg>
    </div>
  );
}

// ─────────────────────────────────────────────────────────────
// 4. Reconnect toast — 3 variants stacked
// ─────────────────────────────────────────────────────────────
function MobileReconnectToast() {
  const { c } = useTheme();
  return (
    <div style={{ display: 'flex', flexDirection: 'column', gap: 12 }}>
      <Toast tone="primary">
        <ToastIcon spin tone="primary">
          <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round"><path d="M23 4v6h-6"/><path d="M1 20v-6h6"/><path d="M3.51 9a9 9 0 0114.85-3.36L23 10"/><path d="M20.49 15A9 9 0 015.64 18.36L1 14"/></svg>
        </ToastIcon>
        <ToastBody title="Reconnecting…" desc={<>Wi-Fi → mobile · attempt <b>2 of 3</b></>} />
        <ToastActions tone="primary">
          <ToastCount text="00:03"/>
          <ToastBtn>Cancel</ToastBtn>
          <ToastBtn solid>Retry</ToastBtn>
        </ToastActions>
        <ToastCountdown/>
      </Toast>

      <Toast tone="bad">
        <ToastIcon tone="bad">
          <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="3" strokeLinecap="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>
        </ToastIcon>
        <ToastBody title="Could not reconnect" desc={<>3 attempts failed · <b>MTU probe timeout</b></>} />
        <ToastActions tone="bad">
          <ToastBtn>Diagnose</ToastBtn>
          <ToastBtn solid>Switch strategy</ToastBtn>
        </ToastActions>
      </Toast>

      <Toast tone="ok">
        <ToastIcon tone="ok">
          <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="3" strokeLinecap="round" strokeLinejoin="round"><polyline points="20 6 9 17 4 12"/></svg>
        </ToastIcon>
        <ToastBody title="Tunnel restored" desc={<>Recovered in <b>4.8 s</b> · no kill-switch trip</>}/>
        <ToastActions tone="ok">
          <ToastBtn>Dismiss</ToastBtn>
        </ToastActions>
      </Toast>
    </div>
  );
}

const ToastToneCtx = React.createContext('primary');

function Toast({ tone, children }) {
  const { c } = useTheme();
  const map = {
    primary: { bg: c.foreground,           fg: c.background },
    bad:     { bg: c.destructiveContainer, fg: c.destructiveContainerFg },
    ok:      { bg: c.successContainer,     fg: c.successContainerFg },
  };
  const { bg, fg } = map[tone];
  return (
    <ToastToneCtx.Provider value={tone}>
      <div style={{
        background: bg, color: fg, borderRadius: 14,
        padding: '12px 14px 10px',
        display: 'grid', gridTemplateColumns: '32px 1fr', gridTemplateRows: 'auto auto', columnGap: 12, rowGap: 6,
        position: 'relative',
        boxShadow: tone === 'primary' ? '0 8px 24px rgba(0,0,0,0.18)' : 'none',
      }}>
        {children}
      </div>
    </ToastToneCtx.Provider>
  );
}
function ToastIcon({ children, tone, spin }) {
  const { c } = useTheme();
  const innerBg = tone === 'primary' ? c.background : tone === 'bad' ? c.destructive : c.success;
  const innerFg = tone === 'primary' ? c.foreground : c.background;
  return (
    <span style={{ width: 32, height: 32, borderRadius: 9999, background: innerBg, color: innerFg, display: 'grid', placeItems: 'center', gridRow: '1', position: 'relative' }}>
      {spin && <span style={{ position: 'absolute', inset: -2, borderRadius: 9999, border: '2px solid rgba(255,255,255,0.2)', borderTopColor: 'rgba(255,255,255,0.85)', animation: 'rdpSpin 1.2s linear infinite' }}/>}
      {children}
    </span>
  );
}
function ToastBody({ title, desc }) {
  return (
    <div style={{ gridColumn: '2', display: 'flex', flexDirection: 'column', gap: 2, minWidth: 0 }}>
      <div style={{ font: `500 14px/18px ${RDP.type.sans}` }}>{title}</div>
      <div style={{ font: `400 11px/14px ${RDP.type.mono}`, opacity: 0.78 }}>{desc}</div>
    </div>
  );
}
function ToastActions({ children, tone }) {
  return (
    <div style={{ gridColumn: '2', display: 'flex', alignItems: 'center', gap: 6, flexWrap: 'wrap' }}>{children}</div>
  );
}
function ToastBtn({ children, solid }) {
  const { c } = useTheme();
  const tone = React.useContext(ToastToneCtx);

  // Each toast tone needs its own button palette so SOLID has real contrast
  // (the failed toast was rendering destructive-red text on destructive-red
  // background — invisible — when solid was just "currentColor").
  let solidBg, solidFg, outlineBorder;
  if (tone === 'primary') {
    solidBg = c.background;        solidFg = c.foreground;             outlineBorder = 'rgba(255,255,255,0.28)';
  } else if (tone === 'bad') {
    solidBg = c.destructive;       solidFg = c.destructiveForeground || '#FFFFFF'; outlineBorder = 'rgba(0,0,0,0.2)';
  } else if (tone === 'ok') {
    solidBg = c.success;           solidFg = c.successForeground || '#FFFFFF';     outlineBorder = 'rgba(0,0,0,0.2)';
  } else {
    solidBg = c.foreground;        solidFg = c.background;             outlineBorder = 'rgba(0,0,0,0.2)';
  }

  return (
    <button style={{
      background: solid ? solidBg : 'transparent',
      color: solid ? solidFg : 'currentColor',
      border: `1px solid ${solid ? solidBg : outlineBorder}`,
      padding: '5px 10px', borderRadius: 9999,
      font: `10px ${RDP.type.mono}`, letterSpacing: 0.3, textTransform: 'uppercase',
      cursor: 'pointer', whiteSpace: 'nowrap',
    }}>{children}</button>
  );
}
function ToastCount({ text }) { return <span style={{ font: `500 12px ${RDP.type.mono}`, marginRight: 'auto', fontVariantNumeric: 'tabular-nums' }}>{text}</span>; }
function ToastCountdown() {
  return (
    <span style={{ position: 'absolute', left: 14, right: 14, bottom: 4, height: 2, background: 'rgba(255,255,255,0.14)', borderRadius: 2, overflow: 'hidden' }}>
      <span style={{ display: 'block', height: '100%', background: 'rgba(255,255,255,0.85)', width: '100%', transformOrigin: 'right center', animation: 'rdpCountdown 4s linear forwards' }}/>
    </span>
  );
}

// ─────────────────────────────────────────────────────────────
// 5. Degradation strip — warn + critical variants
// ─────────────────────────────────────────────────────────────
function MobileDegradationStrip() {
  const { c } = useTheme();
  return (
    <div style={{ display: 'flex', flexDirection: 'column', gap: 12 }}>
      <Strip tone="warn"
        title="Quality degraded · still connected"
        desc="Three indicators outside their normal range; SNI handshakes slower and loss rising."
        chips={[
          ['Loss',    '4.1%',   '↑ +3.2 pp',   c.destructive],
          ['RTT p50', '168 ms', '↑ +44 ms',    c.destructive],
          ['Jitter',  '22 ms',  '↑ +18 ms',    c.destructive],
        ]}
        actions={['Switch relay', 'Re-probe']}
        since="3 m 12 s · since 18:39 UTC"/>

      <Strip tone="bad"
        title="Tunnel about to drop"
        desc="Loss above kill-switch threshold for 30 s. Tunnel tears down unless a new strategy is applied."
        chips={[
          ['Loss',      '21.4%',     '↑ threshold 10%', c.destructive],
          ['Last byte', '14 s ago', null,               null],
        ]}
        actions={['Disconnect', 'Find a strategy']}/>
    </div>
  );
}

function Strip({ tone, title, desc, chips, actions, since }) {
  const { c } = useTheme();
  const accent = tone === 'bad' ? c.destructive       : c.warning;
  const bg     = tone === 'bad' ? c.destructiveContainer : c.warningContainer;
  const fg     = tone === 'bad' ? c.destructiveContainerFg : c.warningContainerFg;
  return (
    <div style={{
      background: bg, color: fg,
      borderRadius: 12,
      padding: '14px 14px 12px',
      borderLeft: `4px solid ${accent}`,
      display: 'flex', flexDirection: 'column', gap: 8,
    }}>
      <div style={{ display: 'flex', gap: 10, alignItems: 'flex-start' }}>
        <span style={{ width: 24, height: 24, borderRadius: 6, background: accent, color: tone === 'bad' ? c.destructiveContainer : c.warningContainerFg, display: 'grid', placeItems: 'center', font: `500 11px/1 ${RDP.type.mono}`, flexShrink: 0 }}>
          {tone === 'bad' ? '×' : '!'}
        </span>
        <div style={{ minWidth: 0, flex: 1 }}>
          <div style={{ font: `500 14px/18px ${RDP.type.sans}` }}>{title}</div>
          <div style={{ font: `400 12.5px/18px ${RDP.type.sans}`, marginTop: 3, opacity: 0.88 }}>{desc}</div>
        </div>
      </div>
      <div style={{ display: 'flex', flexWrap: 'wrap', gap: 6 }}>
        {chips.map(([k, v, delta, deltaCol]) => (
          <span key={k} style={{ font: `10.5px ${RDP.type.mono}`, padding: '3px 8px', borderRadius: 9999, background: 'rgba(0,0,0,0.06)', border: '0.5px solid rgba(0,0,0,0.12)', whiteSpace: 'nowrap', display: 'inline-flex', alignItems: 'center', gap: 5, fontVariantNumeric: 'tabular-nums' }}>
            {k} <b style={{ fontWeight: 500 }}>{v}</b>{delta && <span style={{ color: deltaCol }}>{delta}</span>}
          </span>
        ))}
      </div>
      {since && (
        <div style={{ font: `10.5px ${RDP.type.mono}`, opacity: 0.78 }}>Degraded for <b style={{ fontWeight: 500 }}>{since}</b></div>
      )}
      <div style={{ display: 'flex', gap: 6, marginTop: 2 }}>
        <RipDpiButton text={actions[0]} variant="outline" style={{ flex: 1, minHeight: 36, padding: '6px 10px', fontSize: 12, color: fg, borderColor: fg }}/>
        <RipDpiButton text={actions[1]}                       style={{ flex: 1, minHeight: 36, padding: '6px 10px', fontSize: 12, background: fg, color: bg, borderColor: fg }}/>
      </div>
    </div>
  );
}

// ─────────────────────────────────────────────────────────────
// 6. State history — 24h ribbon + recent transitions
// ─────────────────────────────────────────────────────────────
function MobileStateHistory() {
  const { c } = useTheme();
  const segs = [
    ['tunl',  91.4],
    ['degr',  4.2],
    ['recon', 2.1],
    ['fail',  1.3],
    ['off',   1.0],
  ];
  const segColor = (k) => k === 'tunl' ? c.success : k === 'degr' ? c.warning : k === 'recon' ? c.info : k === 'fail' ? c.destructive : c.mutedForeground;
  const cells = [
    'tunl','tunl','tunl','tunl','tunl','tunl',
    'off','off',
    'recon','tunl','tunl','tunl','tunl',
    'mixed-degr','degr','fail','recon',
    'tunl','tunl','tunl',
    'mixed-degr','degr','tunl','tunl',
  ];
  const cellBg = (k) => {
    if (k.startsWith('mixed-')) return null;
    return segColor(k);
  };

  const tx = [
    { ts: '18:30', from: 'RECON', to: 'TUNL', reason: 're-handshake · MTU 1380', dur: '4.8 s' },
    { ts: '18:28', from: 'DEGR',  to: 'RECON', reason: 'Wi-Fi → mobile',          dur: '2.1 s' },
    { ts: '14:02', from: 'TUNL',  to: 'FAIL',  reason: 'MTU probe timeout',       dur: '19 m'  },
    { ts: '02:14', from: 'OFF',   to: 'RECON', reason: 'manual connect',          dur: '1.4 s' },
  ];
  const pillStyle = (k) => {
    if (k === 'TUNL')  return { bg: c.successContainer,     fg: c.success };
    if (k === 'DEGR')  return { bg: c.warningContainer,     fg: c.warning };
    if (k === 'RECON') return { bg: c.infoContainer,        fg: c.info };
    if (k === 'FAIL')  return { bg: c.destructiveContainer, fg: c.destructive };
    return                     { bg: c.muted,               fg: c.mutedForeground };
  };

  return (
    <RipDpiCard>
      <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'baseline' }}>
        <div>
          <div style={{ font: `500 14px/18px ${RDP.type.sans}` }}>State history</div>
          <div style={{ font: `10.5px ${RDP.type.mono}`, color: c.mutedForeground, marginTop: 2 }}>Last 24 h · <span style={{ color: c.foreground }}>91.4%</span> connected</div>
        </div>
        <div style={{ display: 'inline-flex', gap: 0, border: `0.5px solid ${c.border}`, borderRadius: 9999, overflow: 'hidden' }}>
          {['1 h','6 h','24 h','7 d'].map(r => (
            <span key={r} style={{ padding: '3px 8px', font: `10px ${RDP.type.mono}`, letterSpacing: 0.3, color: r === '24 h' ? c.background : c.mutedForeground, background: r === '24 h' ? c.foreground : 'transparent' }}>{r}</span>
          ))}
        </div>
      </div>

      {/* Stacked summary bar */}
      <div style={{ display: 'flex', height: 8, borderRadius: 4, overflow: 'hidden', background: c.muted, marginTop: 2 }}>
        {segs.map(([k, w]) => (
          <span key={k} style={{ width: `${w}%`, background: segColor(k) }}/>
        ))}
      </div>
      <div style={{ display: 'flex', flexWrap: 'wrap', gap: '4px 12px', font: `10.5px ${RDP.type.mono}`, color: c.mutedForeground }}>
        {[
          ['Tunneling',    '21h 56m', 'tunl'],
          ['Degraded',     '1h 1m',   'degr'],
          ['Reconnecting', '30m',     'recon'],
          ['Failed',       '19m',     'fail'],
          ['Off',          '14m',     'off'],
        ].map(([nm, v, k]) => (
          <span key={nm} style={{ display: 'inline-flex', alignItems: 'center', gap: 4 }}>
            <span style={{ width: 8, height: 8, borderRadius: 2, background: segColor(k), opacity: k === 'off' ? 0.5 : 1 }}/>{nm} <b style={{ fontWeight: 500, color: c.foreground }}>{v}</b>
          </span>
        ))}
      </div>

      {/* Hour ribbon */}
      <div>
        <div style={{ display: 'grid', gridTemplateColumns: 'repeat(24, 1fr)', height: 18, borderRadius: 4, overflow: 'hidden' }}>
          {cells.map((k, i) => {
            if (k.startsWith('mixed-')) {
              const sub = k.split('-')[1];
              return (
                <div key={i} style={{ position: 'relative', background: c.success }}>
                  <div style={{ position: 'absolute', right: 0, top: 0, bottom: 0, width: '30%', background: segColor(sub) }}/>
                </div>
              );
            }
            return <div key={i} style={{ background: cellBg(k), opacity: k === 'off' ? 0.3 : 1 }}/>;
          })}
        </div>
        <div style={{ display: 'grid', gridTemplateColumns: 'repeat(24, 1fr)', marginTop: 4, font: `9px ${RDP.type.mono}`, color: c.mutedForeground }}>
          {['18','','','','','','00','','','','','','06','','','','','','12','','','','',''].map((h, i) => (
            <span key={i} style={{ textAlign: 'center', color: h ? c.foreground : c.mutedForeground }}>{h}</span>
          ))}
        </div>
      </div>

      {/* Recent transitions */}
      <div style={{ paddingTop: 12, borderTop: `0.5px solid ${c.divider}` }}>
        <div style={{ font: `9.5px ${RDP.type.mono}`, letterSpacing: 0.5, textTransform: 'uppercase', color: c.mutedForeground, marginBottom: 6 }}>Recent · 4 of 11</div>
        {tx.map((t, i) => {
          const from = pillStyle(t.from);
          const to = pillStyle(t.to);
          return (
            <div key={i} style={{ display: 'flex', alignItems: 'center', gap: 8, padding: '7px 0', borderTop: i === 0 ? 'none' : `0.5px solid ${c.divider}`, font: `11px ${RDP.type.mono}` }}>
              <span style={{ color: c.mutedForeground, minWidth: 36, fontVariantNumeric: 'tabular-nums' }}>{t.ts}</span>
              <span style={{ display: 'inline-flex', alignItems: 'center', gap: 4, flexShrink: 0 }}>
                <span style={{ font: `9.5px ${RDP.type.mono}`, padding: '2px 5px', borderRadius: 3, background: from.bg, color: from.fg, letterSpacing: 0.4 }}>{t.from}</span>
                <span style={{ color: c.mutedForeground }}>→</span>
                <span style={{ font: `9.5px ${RDP.type.mono}`, padding: '2px 5px', borderRadius: 3, background: to.bg, color: to.fg, letterSpacing: 0.4 }}>{t.to}</span>
              </span>
              <span style={{ color: c.mutedForeground, flex: 1, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>{t.reason}</span>
              <span style={{ color: c.foreground, fontVariantNumeric: 'tabular-nums', flexShrink: 0 }}>{t.dur}</span>
            </div>
          );
        })}
      </div>
    </RipDpiCard>
  );
}

Object.assign(window, {
  MobileStateMachine, MobileHandshakeTimeline, MobileSessionCard,
  MobileReconnectToast, MobileDegradationStrip, MobileStateHistory,
});
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 322kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 198kUpdated Claude CodeCodexVerifiedInstall