// GENERATED by export_tokens.py from tokens.css (Planet Heroes design system, 2026-12-02). Do not edit by hand - // change tokens.css, then run the exporter again. Web (ph-front, landings) and this file share the same values. // Planet Heroes design tokens for Flutter (Material 3). Uses WidgetStateProperty (Flutter >= 3.22). // NOT COMPILED at generation time (no Flutter SDK) - check with `flutter analyze` before merging. import 'package:flutter/material.dart'; /// Semantic colours. Light = .ph-theme, dark = .ph-theme--dark (mobile app only, decisions D5 / D10). /// Read in widgets: `final c = Theme.of(context).extension()!;` @immutable class PhColors extends ThemeExtension { const PhColors({ required this.bg, required this.bgPaper, required this.surface, required this.surfaceMuted, required this.statusMuted, required this.overlay, required this.text, required this.textSecondary, required this.eyebrow, required this.eyebrowOnDark, required this.textOnDark, required this.ink, required this.inverse, required this.onInverse, required this.stat, required this.action, required this.actionHover, required this.onAction, required this.link, required this.focus, required this.accent, required this.info, required this.success, required this.successBg, required this.green, required this.error, required this.errorHover, required this.errorBg, required this.errorBgStrong, required this.statusError, required this.statusErrorBg, required this.statusSuccess, required this.statusSuccessBg, required this.rewardAction, required this.warning, required this.warningBg, required this.rating, required this.mint, required this.mintSolid, required this.sky, required this.sand, required this.borderField, required this.border, this.surfaceAlt, this.tonalBlue, this.tonalBlueStrong, this.tonalGreen, this.tonalGreenStrong, this.tonalViolet, this.skeleton, this.skeletonHighlight, }); /// --ph-color-bg: Decision 2026-11-15. Text 14.24:1, text-secondary 6.75:1, link 4.61:1 final Color bg; /// --ph-color-bg-paper: Alternative background - switch with .ph-theme--paper, one per site final Color bgPaper; /// --ph-color-surface: Cards, fields, panels, dialogs. 1.12:1 on bg - the shadow does the work final Color surface; /// --ph-color-surface-muted: Decision 2026-11-15 (mist): progress tracks, quiet panels. Only text / text-secondary on it final Color surfaceMuted; /// --ph-color-status-muted: mist for statuses wait / ended / private - fixed in both modes (D10 P4) final Color statusMuted; /// --ph-color-overlay: behind dialogs final Color overlay; /// --ph-color-text: ink: 14.24 bg, 15.97 white, 12.79 mist final Color text; /// --ph-color-text-secondary: ink-2: 6.75 bg, 7.58 white, 6.07 mist; 2.11 on ink - never on dark final Color textSecondary; /// --ph-color-eyebrow: Decision 2026-11-16: eyebrow on light surfaces #475569 final Color eyebrow; /// --ph-color-eyebrow-on-dark: Decision 2026-11-17 (Q1): eyebrow on ink 5.61:1. Never on light (2.54:1 on bg) final Color eyebrowOnDark; /// --ph-color-text-on-dark: 15.97 on ink final Color textOnDark; /// --ph-color-ink: Fixed ink for text on pastels, statuses and tags - does NOT switch in dark mode (pastels stay light) final Color ink; /// --ph-color-inverse: filled active filter, toast; dark: white final Color inverse; final Color onInverse; /// --ph-color-stat: stat numbers on ink 11.38:1 final Color stat; /// --ph-color-action: Decision 2026-11-16: primary button. White label 5.17:1 final Color action; /// --ph-color-action-hover: Decision 2026-11-16: hover; also action-coloured text on pastels and mist (5.37-5.62:1) final Color actionHover; final Color onAction; /// --ph-color-link: Decision 2026-11-17 (Q2): 4.61 bg, 5.17 white; on pastels/mist use action-hover final Color link; /// --ph-color-focus: Decision 2026-11-17 (Q2): 3 px ring, 4.61 bg / 5.17 white final Color focus; /// --ph-color-accent: Decision 2026-11-16: accents and illustrations only, never text or button fill (2.97:1) final Color accent; /// --ph-color-info: info text on sky 5.47:1 final Color info; /// --ph-color-success: text 6.36 bg / 7.13 white / 6.49 on success-bg final Color success; final Color successBg; /// --ph-color-green: Decision A4 2026-11-29: backgrounds and decoration under ink text (7.01:1); never text (2.28 on white) - text uses success. Replaces ph-front $green-light #2FE7A0 final Color green; /// --ph-color-error: text 5.86 bg / 6.57 white / 6.05 on error-bg / 5.45 on error-bg-strong final Color error; /// --ph-color-error-hover: hover of a danger button, white 8.66:1 final Color errorHover; final Color errorBg; final Color errorBgStrong; /// --ph-color-status-error: rejected status text on error-bg-strong, fixed in both modes (D10 P4) final Color statusError; /// --ph-color-status-error-bg: rejected status pill, fixed in both modes (D10 P4) final Color statusErrorBg; /// --ph-color-status-success: verified status pill text, fixed in both modes (D10 P4) final Color statusSuccess; final Color statusSuccessBg; /// --ph-color-reward-action: EXCEPTION D10 P3 2026-12-01 (one colour for light and dark, team decision 2026-12-01): mobile app Rewards tab only (buttons, „Oferty / Moje kody”), white text 1.85:1 - below AA, accepted. Never in ph-front or on landings final Color rewardAction; /// --ph-color-warning: docs v3: text 6.32 bg / 7.09 white / 5.94 on sand final Color warning; final Color warningBg; /// --ph-color-rating: star fill only, never text (1.59:1 on white) final Color rating; /// --ph-color-mint: Decision 2026-11-16: events, eco. Translucent: #C4F3EE on white, #BDEDEC on bg. Ink 12.54-13.24 final Color mint; /// --ph-color-mint-solid: mint as rendered on white - use over photos or other colours final Color mintSolid; /// --ph-color-sky: Decision 2026-11-16: movement, the app, cleanup-action tags. Ink 13.04 final Color sky; /// --ph-color-sand: rewards, numbers, "Promowane", warnings. Ink 13.39 final Color sand; /// --ph-color-border-field: Decision 2026-11-17 (Q3): fields, selects, inactive filters, ghost button. 3.63 white / 3.24 bg (WCAG 1.4.11) final Color borderField; /// --ph-color-border: decorative lines and separators only - 1.34:1, carries no meaning final Color border; /// --ph-color-surface-alt: darkLight final Color? surfaceAlt; final Color? tonalBlue; final Color? tonalBlueStrong; final Color? tonalGreen; final Color? tonalGreenStrong; /// --ph-color-tonal-violet: white 8.50-15.45 on all tonal backgrounds final Color? tonalViolet; final Color? skeleton; final Color? skeletonHighlight; static const light = PhColors( bg: Color(0xFFEEF2FA), bgPaper: Color(0xFFF7F5EF), surface: Color(0xFFFFFFFF), surfaceMuted: Color(0xFFDFE7EF), statusMuted: Color(0xFFDFE7EF), overlay: Color(0x7314213D), text: Color(0xFF14213D), textSecondary: Color(0xFF475569), eyebrow: Color(0xFF475569), eyebrowOnDark: Color(0xFF999999), textOnDark: Color(0xFFFFFFFF), ink: Color(0xFF14213D), inverse: Color(0xFF14213D), onInverse: Color(0xFFFFFFFF), stat: Color(0xFF9FE9C7), action: Color(0xFF2563EB), actionHover: Color(0xFF1D4ED8), onAction: Color(0xFFFFFFFF), link: Color(0xFF2563EB), focus: Color(0xFF2563EB), accent: Color(0xFF4798F5), info: Color(0xFF1D4ED8), success: Color(0xFF166534), successBg: Color(0xFFDCFCE7), green: Color(0xFF22C55E), error: Color(0xFFB42318), errorHover: Color(0xFF912018), errorBg: Color(0xFFFEF3F2), errorBgStrong: Color(0xFFFEE4E2), statusError: Color(0xFFB42318), statusErrorBg: Color(0xFFFEE4E2), statusSuccess: Color(0xFF166534), statusSuccessBg: Color(0xFFDCFCE7), rewardAction: Color(0xFF2FD6AD), warning: Color(0xFF92400E), warningBg: Color(0xFFFFE9B8), rating: Color(0xFFF2C94C), mint: Color(0x8C94E9E0), mintSolid: Color(0xFFC4F3EE), sky: Color(0xFFD1ECFE), sand: Color(0xFFFFE9B8), borderField: Color(0xFF7C8799), border: Color(0xFFE2DED3), ); static const dark = PhColors( bg: Color(0xFF14161C), bgPaper: Color(0xFFF7F5EF), surface: Color(0xFF1E222A), surfaceMuted: Color(0xFF262A32), statusMuted: Color(0xFFDFE7EF), overlay: Color(0x7314213D), text: Color(0xFFFFFFFF), textSecondary: Color(0xFFC1C5CC), eyebrow: Color(0xFFC1C5CC), eyebrowOnDark: Color(0xFF999999), textOnDark: Color(0xFFFFFFFF), ink: Color(0xFF14213D), inverse: Color(0xFFFFFFFF), onInverse: Color(0xFF14161C), stat: Color(0xFF9FE9C7), action: Color(0xFF2563EB), actionHover: Color(0xFF1D4ED8), onAction: Color(0xFFFFFFFF), link: Color(0xFF4798F5), focus: Color(0xFF4798F5), accent: Color(0xFF4798F5), info: Color(0xFF1D4ED8), success: Color(0xFF2FE7A0), successBg: Color(0xFF10352A), green: Color(0xFF22C55E), error: Color(0xFFEB5757), errorHover: Color(0xFF912018), errorBg: Color(0xFF3A1A17), errorBgStrong: Color(0xFF3A1A17), statusError: Color(0xFFB42318), statusErrorBg: Color(0xFFFEE4E2), statusSuccess: Color(0xFF166534), statusSuccessBg: Color(0xFFDCFCE7), rewardAction: Color(0xFF2FD6AD), warning: Color(0xFF92400E), warningBg: Color(0xFFFFE9B8), rating: Color(0xFFF2C94C), mint: Color(0x8C94E9E0), mintSolid: Color(0xFFC4F3EE), sky: Color(0xFFD1ECFE), sand: Color(0xFFFFE9B8), borderField: Color(0xFF7C8799), border: Color(0xFF363A43), surfaceAlt: Color(0xFF181B21), tonalBlue: Color(0xFF16324A), tonalBlueStrong: Color(0xFF1C3A55), tonalGreen: Color(0xFF10352A), tonalGreenStrong: Color(0xFF155741), tonalViolet: Color(0xFF2E1B45), skeleton: Color(0xFF363A43), skeletonHighlight: Color(0xFF4A4E57), ); @override PhColors copyWith({Color? bg, Color? bgPaper, Color? surface, Color? surfaceMuted, Color? statusMuted, Color? overlay, Color? text, Color? textSecondary, Color? eyebrow, Color? eyebrowOnDark, Color? textOnDark, Color? ink, Color? inverse, Color? onInverse, Color? stat, Color? action, Color? actionHover, Color? onAction, Color? link, Color? focus, Color? accent, Color? info, Color? success, Color? successBg, Color? green, Color? error, Color? errorHover, Color? errorBg, Color? errorBgStrong, Color? statusError, Color? statusErrorBg, Color? statusSuccess, Color? statusSuccessBg, Color? rewardAction, Color? warning, Color? warningBg, Color? rating, Color? mint, Color? mintSolid, Color? sky, Color? sand, Color? borderField, Color? border, Color? surfaceAlt, Color? tonalBlue, Color? tonalBlueStrong, Color? tonalGreen, Color? tonalGreenStrong, Color? tonalViolet, Color? skeleton, Color? skeletonHighlight}) => PhColors( bg: bg ?? this.bg, bgPaper: bgPaper ?? this.bgPaper, surface: surface ?? this.surface, surfaceMuted: surfaceMuted ?? this.surfaceMuted, statusMuted: statusMuted ?? this.statusMuted, overlay: overlay ?? this.overlay, text: text ?? this.text, textSecondary: textSecondary ?? this.textSecondary, eyebrow: eyebrow ?? this.eyebrow, eyebrowOnDark: eyebrowOnDark ?? this.eyebrowOnDark, textOnDark: textOnDark ?? this.textOnDark, ink: ink ?? this.ink, inverse: inverse ?? this.inverse, onInverse: onInverse ?? this.onInverse, stat: stat ?? this.stat, action: action ?? this.action, actionHover: actionHover ?? this.actionHover, onAction: onAction ?? this.onAction, link: link ?? this.link, focus: focus ?? this.focus, accent: accent ?? this.accent, info: info ?? this.info, success: success ?? this.success, successBg: successBg ?? this.successBg, green: green ?? this.green, error: error ?? this.error, errorHover: errorHover ?? this.errorHover, errorBg: errorBg ?? this.errorBg, errorBgStrong: errorBgStrong ?? this.errorBgStrong, statusError: statusError ?? this.statusError, statusErrorBg: statusErrorBg ?? this.statusErrorBg, statusSuccess: statusSuccess ?? this.statusSuccess, statusSuccessBg: statusSuccessBg ?? this.statusSuccessBg, rewardAction: rewardAction ?? this.rewardAction, warning: warning ?? this.warning, warningBg: warningBg ?? this.warningBg, rating: rating ?? this.rating, mint: mint ?? this.mint, mintSolid: mintSolid ?? this.mintSolid, sky: sky ?? this.sky, sand: sand ?? this.sand, borderField: borderField ?? this.borderField, border: border ?? this.border, surfaceAlt: surfaceAlt ?? this.surfaceAlt, tonalBlue: tonalBlue ?? this.tonalBlue, tonalBlueStrong: tonalBlueStrong ?? this.tonalBlueStrong, tonalGreen: tonalGreen ?? this.tonalGreen, tonalGreenStrong: tonalGreenStrong ?? this.tonalGreenStrong, tonalViolet: tonalViolet ?? this.tonalViolet, skeleton: skeleton ?? this.skeleton, skeletonHighlight: skeletonHighlight ?? this.skeletonHighlight, ); @override PhColors lerp(ThemeExtension? other, double t) { if (other is! PhColors) return this; return PhColors( bg: Color.lerp(bg, other.bg, t)!, bgPaper: Color.lerp(bgPaper, other.bgPaper, t)!, surface: Color.lerp(surface, other.surface, t)!, surfaceMuted: Color.lerp(surfaceMuted, other.surfaceMuted, t)!, statusMuted: Color.lerp(statusMuted, other.statusMuted, t)!, overlay: Color.lerp(overlay, other.overlay, t)!, text: Color.lerp(text, other.text, t)!, textSecondary: Color.lerp(textSecondary, other.textSecondary, t)!, eyebrow: Color.lerp(eyebrow, other.eyebrow, t)!, eyebrowOnDark: Color.lerp(eyebrowOnDark, other.eyebrowOnDark, t)!, textOnDark: Color.lerp(textOnDark, other.textOnDark, t)!, ink: Color.lerp(ink, other.ink, t)!, inverse: Color.lerp(inverse, other.inverse, t)!, onInverse: Color.lerp(onInverse, other.onInverse, t)!, stat: Color.lerp(stat, other.stat, t)!, action: Color.lerp(action, other.action, t)!, actionHover: Color.lerp(actionHover, other.actionHover, t)!, onAction: Color.lerp(onAction, other.onAction, t)!, link: Color.lerp(link, other.link, t)!, focus: Color.lerp(focus, other.focus, t)!, accent: Color.lerp(accent, other.accent, t)!, info: Color.lerp(info, other.info, t)!, success: Color.lerp(success, other.success, t)!, successBg: Color.lerp(successBg, other.successBg, t)!, green: Color.lerp(green, other.green, t)!, error: Color.lerp(error, other.error, t)!, errorHover: Color.lerp(errorHover, other.errorHover, t)!, errorBg: Color.lerp(errorBg, other.errorBg, t)!, errorBgStrong: Color.lerp(errorBgStrong, other.errorBgStrong, t)!, statusError: Color.lerp(statusError, other.statusError, t)!, statusErrorBg: Color.lerp(statusErrorBg, other.statusErrorBg, t)!, statusSuccess: Color.lerp(statusSuccess, other.statusSuccess, t)!, statusSuccessBg: Color.lerp(statusSuccessBg, other.statusSuccessBg, t)!, rewardAction: Color.lerp(rewardAction, other.rewardAction, t)!, warning: Color.lerp(warning, other.warning, t)!, warningBg: Color.lerp(warningBg, other.warningBg, t)!, rating: Color.lerp(rating, other.rating, t)!, mint: Color.lerp(mint, other.mint, t)!, mintSolid: Color.lerp(mintSolid, other.mintSolid, t)!, sky: Color.lerp(sky, other.sky, t)!, sand: Color.lerp(sand, other.sand, t)!, borderField: Color.lerp(borderField, other.borderField, t)!, border: Color.lerp(border, other.border, t)!, surfaceAlt: Color.lerp(surfaceAlt, other.surfaceAlt, t), tonalBlue: Color.lerp(tonalBlue, other.tonalBlue, t), tonalBlueStrong: Color.lerp(tonalBlueStrong, other.tonalBlueStrong, t), tonalGreen: Color.lerp(tonalGreen, other.tonalGreen, t), tonalGreenStrong: Color.lerp(tonalGreenStrong, other.tonalGreenStrong, t), tonalViolet: Color.lerp(tonalViolet, other.tonalViolet, t), skeleton: Color.lerp(skeleton, other.skeleton, t), skeletonHighlight: Color.lerp(skeletonHighlight, other.skeletonHighlight, t), ); } } /// Base palette from the Figma frame DESIGN SYSTEM v2.0 (decision D12). Prefer PhColors (semantic) in widgets; /// purple* accepted 2026-12-01 (D13). abstract final class PhPalette { static const blue50 = Color(0xFFE9F6FE); static const blue100 = Color(0xFFD1ECFE); static const blue200 = Color(0xFF9DD3F7); static const blue300 = Color(0xFF39C3F8); static const blue400 = Color(0xFF4798F5); static const blue500 = Color(0xFF517EE9); static const blue600 = Color(0xFF3655D0); static const blue700 = Color(0xFF2840B0); static const blue800 = Color(0xFF1C2D8A); static const blue900 = Color(0xFF111D63); static const teal50 = Color(0xFFF0FDFA); static const teal100 = Color(0xFFCCFBF1); static const teal200 = Color(0xFF99F6E4); static const teal300 = Color(0xFF5EEAD4); static const teal400 = Color(0xFF2FD1B1); static const teal500 = Color(0xFF14B8A6); static const teal600 = Color(0xFF0D9488); static const teal700 = Color(0xFF0F766E); static const teal800 = Color(0xFF115E59); static const teal900 = Color(0xFF134E4A); static const green50 = Color(0xFFF0FDF4); static const green100 = Color(0xFFDCFCE7); static const green200 = Color(0xFFBBF7D0); static const green300 = Color(0xFF86EFAC); static const green400 = Color(0xFF4ADE80); static const green500 = Color(0xFF22C55E); static const green600 = Color(0xFF16A34A); static const green700 = Color(0xFF15803D); static const green800 = Color(0xFF166534); static const green900 = Color(0xFF14532D); static const pink50 = Color(0xFFFEF0F9); static const pink100 = Color(0xFFFBCCE9); static const pink200 = Color(0xFFF89FD8); static const pink300 = Color(0xFFF36EC9); static const pink400 = Color(0xFFEE46BC); static const pink500 = Color(0xFFD42EA3); static const pink600 = Color(0xFFA82283); static const grey50 = Color(0xFFFAFAFA); static const grey100 = Color(0xFFF1F5F9); static const grey200 = Color(0xFFE2E8F0); static const grey300 = Color(0xFFCBD5E1); static const grey400 = Color(0xFF94A3B8); static const grey500 = Color(0xFF64748B); static const grey600 = Color(0xFF475569); static const grey700 = Color(0xFF334155); static const grey800 = Color(0xFF1E293B); static const grey900 = Color(0xFF0F172A); static const purple50 = Color(0xFFF4F1FF); static const purple100 = Color(0xFFB8A1FF); static const purple200 = Color(0xFF7F6BFF); static const purple300 = Color(0xFF615FFF); static const purple400 = Color(0xFF9810FA); static const purple500 = Color(0xFF7C3AED); static const purple600 = Color(0xFF6D28D9); static const purple700 = Color(0xFF5B21B6); static const purple800 = Color(0xFF4C1D95); static const purple900 = Color(0xFF2E1065); static const gcGreen = Color(0xFF2FD6AD); // GreenCoin (app); not a button fill (D1), reward-action in both modes (P3) static const gold = Color(0xFFFFD700); // Coin icon in the frame - NOT USED: no gold coin (decision C4) static const errorRed = Color(0xFFEF4444); // Errors in the frame - text uses --ph-color-error #B42318 (3.76:1 on white fails AA) static const warning = Color(0xFFF59E0B); // Alerts in the frame - text uses --ph-color-warning #92400E (2.15:1 on white fails AA) static const darkNavy = Color(0xFF0F172A); // Text/BG dark in the frame - ink is #14213D (decision A7) static const offWhite = Color(0xFFF8FAFC); // Page BG in the frame - page bg is #EEF2FA (decision 2026-11-15) } /// Named gradients - each has one place (skill rule 3). CSS angles mapped to Alignment; /// `to bottom right` = corner to corner, as in the app code (decision D4). abstract final class PhGradients { /// #1F63E0 lives only here (Q2); end #6FC8AA per Figma set A6 (2026-11-29) static const band = LinearGradient(begin: Alignment.centerLeft, end: Alignment.centerRight, colors: [Color(0xFF1F63E0), Color(0xFF16A6C9), Color(0xFF6FC8AA)], stops: [0, 0.55, 1]); static const brand = LinearGradient(begin: Alignment.topLeft, end: Alignment.bottomRight, colors: [Color(0xFF14B8A6), Color(0xFF2563EB)], stops: [0, 1]); static const eco = LinearGradient(begin: Alignment.topLeft, end: Alignment.bottomRight, colors: [Color(0xFF22C55E), Color(0xFF14B8A6)], stops: [0, 1]); /// Decision A5/A6 2026-11-29: Green Coins cards; WHITE text as an accepted exception to AA (2.26-3.81:1) static const card = LinearGradient(begin: Alignment(-0.7, -1), end: Alignment(0.7, 1), colors: [Color(0xFF1DBFC4), Color(0xFF517EE9)], stops: [0, 1]); /// Decision D4 2026-11-30, values from app code 2026-12-01: invites, referrals, teams, group challenges only; white text 4.58-5.54 (AA); inverse button; max one block per screen static const community = LinearGradient(begin: Alignment.topLeft, end: Alignment.bottomRight, colors: [Color(0xFF615FFF), Color(0xFF9810FA)], stops: [0, 1]); /// hero section; white text 5.17-5.70 static const hero = LinearGradient(begin: Alignment.topLeft, end: Alignment.bottomRight, colors: [Color(0xFF2563EB), Color(0xFF7C3AED)], stops: [0, 1]); static const progress = LinearGradient(begin: Alignment.centerLeft, end: Alignment.centerRight, colors: [Color(0xFF22C55E), Color(0xFF14B8A6)], stops: [0, 1]); /// Decision 2026-11-15: blue under the text static const cta = LinearGradient(begin: Alignment.bottomRight, end: Alignment.topLeft, colors: [Color(0xFF14B8A6), Color(0xFF2563EB)], stops: [0, 1]); static const ctaMobile = LinearGradient(begin: Alignment.bottomCenter, end: Alignment.topCenter, colors: [Color(0xFF14B8A6), Color(0xFF2563EB)], stops: [0, 1]); /// Decision A6 2026-11-29: logo only, no text static const logo = LinearGradient(begin: Alignment.bottomCenter, end: Alignment.topCenter, colors: [Color(0xFF624FE6), Color(0xFF3BBBEC)], stops: [0.1, 1]); } /// Spacing, 4/8 grid (logical px). abstract final class PhSpace { static const double s0 = 0; static const double s1 = 4; static const double s2 = 8; static const double s3 = 12; static const double s4 = 16; static const double s5 = 20; static const double s6 = 24; static const double s8 = 32; static const double s10 = 40; static const double s12 = 48; static const double s16 = 64; static const double s20 = 80; static const double gutter = 24; // 16px on small screens (media query below) static const double gap = 24; // grid gap; 16px on small screens } /// Radii (logical px). pill = StadiumBorder. abstract final class PhRadius { static const double sm = 8; static const double field = 12; static const double card = 16; // Decision A2 2026-11-29 (Q6): 16 px, as Figma and B2B static const double block = 24; // CTA, form panel, dialog, profile header static const double pill = 999; // Decision 2026-11-17: buttons, tags, filters, status } /// Component sizes (logical px). Values that are clamp()/ch on the web are left out. abstract final class PhSize { static const double controlMd = 52; // Decision 2026-11-17: standard button static const double controlSm = 42; // Decision 2026-11-17: small button static const double field = 48; // Decision 2026-11-17: text field, select static const double filter = 40; static const double iconButton = 40; static const double container = 1342; // Decision A3 2026-11-29 (Q7): 1342 px everywhere - ph-front, landing, new pages static const double h1Gap = 22; static const double h1DetailGap = 18; static const double band = 64; // gradient band under a light hero; 40px on small screens static const double coinMarker = 18; // Green Coin: assets/coin.svg static const double coinNav = 22; static const double coinCounter = 44; } /// Switch geometry (decision D10 / P5): Material 3 defaults, kept on purpose. abstract final class PhSwitchSize { static const double width = 52; static const double height = 32; static const double thumbOff = 16; static const double thumbOn = 24; } /// Durations and the standard easing (prefers-reduced-motion -> MediaQuery.disableAnimations). abstract final class PhMotion { static const instant = Duration(milliseconds: 80); static const fast = Duration(milliseconds: 120); static const base = Duration(milliseconds: 200); static const slow = Duration(milliseconds: 300); static const slower = Duration(milliseconds: 400); static const standard = Cubic(0.2, 0.7, 0.2, 1); } /// Shadows. Dark mode has no card shadow (Z13) - use PhShadows.card(brightness). abstract final class PhShadows { static const community = [BoxShadow(offset: Offset(0, 6), blurRadius: 18, color: Color(0x1F000000))]; static const cardLight = [BoxShadow(offset: Offset(0, 8), blurRadius: 24, color: Color(0x1214213D))]; static const action = [BoxShadow(offset: Offset(0, 6), blurRadius: 18, color: Color(0x472563EB))]; static const menu = [BoxShadow(offset: Offset(0, 18), blurRadius: 48, color: Color(0x2914213D))]; static const dialog = [BoxShadow(offset: Offset(0, 24), blurRadius: 60, color: Color(0x4014213D))]; static List card(Brightness b) => b == Brightness.dark ? const [] : cardLight; } /// Typography. Font: Poppins (bundle the TTF files as family 'Poppins'). /// App roles from docs v5, chapter 26, rule Z3. Colours come from PhColors (text / textSecondary). abstract final class PhText { static const family = 'Poppins'; /// h1 of a tab screen static const tabTitle = TextStyle(fontFamily: family, fontSize: 28, fontWeight: FontWeight.w600, letterSpacing: -0.56, height: 1.12); /// title of a sub-screen, centred static const subscreenTitle = TextStyle(fontFamily: family, fontSize: 18, fontWeight: FontWeight.w600, letterSpacing: 0, height: 1.4); /// h2 static const sectionTitle = TextStyle(fontFamily: family, fontSize: 20, fontWeight: FontWeight.w600, letterSpacing: 0, height: 1.12); /// eyebrow, uppercase (Konto, Preferencje) static const groupLabel = TextStyle(fontFamily: family, fontSize: 13, fontWeight: FontWeight.w600, letterSpacing: 1.04, height: 1.4); /// card / row title static const rowTitle = TextStyle(fontFamily: family, fontSize: 16, fontWeight: FontWeight.w600, letterSpacing: 0, height: 1.4); /// body static const body = TextStyle(fontFamily: family, fontSize: 16, fontWeight: FontWeight.w400, letterSpacing: 0, height: 1.4); /// date, category static const meta = TextStyle(fontFamily: family, fontSize: 13, fontWeight: FontWeight.w500, letterSpacing: 0, height: 1.4); /// Witaj, Anna! static const greeting = TextStyle(fontFamily: family, fontSize: 24, fontWeight: FontWeight.w600, letterSpacing: 0, height: 1.12); /// +12 GC, tabular figures static const amount = TextStyle(fontFamily: family, fontSize: 16, fontWeight: FontWeight.w600, letterSpacing: 0, height: 1.4, fontFeatures: [FontFeature.tabularFigures()]); /// button label static const button = TextStyle(fontFamily: family, fontSize: 16, fontWeight: FontWeight.w600, letterSpacing: 0, height: 1.4); /// field label above the field static const label = TextStyle(fontFamily: family, fontSize: 14, fontWeight: FontWeight.w600, letterSpacing: 0, height: 1.4); } /// ThemeData for the app. Seed = system action blue #2563EB with explicit overrides (decision D10 / P6), /// switch in Material 3 shape with system colours (P5), pill buttons 52 / 42 px, field 48 px with radius 12. ThemeData phTheme(Brightness brightness) { final c = brightness == Brightness.dark ? PhColors.dark : PhColors.light; final scheme = ColorScheme.fromSeed(seedColor: PhColors.light.action, brightness: brightness).copyWith( primary: c.action, onPrimary: c.onAction, error: c.error, surface: c.surface, onSurface: c.text, onSurfaceVariant: c.textSecondary, outline: c.borderField, ); return ThemeData( useMaterial3: true, brightness: brightness, colorScheme: scheme, scaffoldBackgroundColor: c.bg, fontFamily: PhText.family, extensions: >[c], filledButtonTheme: FilledButtonThemeData( style: FilledButton.styleFrom( backgroundColor: c.action, foregroundColor: c.onAction, minimumSize: const Size(64, PhSize.controlMd), shape: const StadiumBorder(), textStyle: PhText.button, ), ), outlinedButtonTheme: OutlinedButtonThemeData( style: OutlinedButton.styleFrom( foregroundColor: c.text, minimumSize: const Size(64, PhSize.controlMd), shape: const StadiumBorder(), side: BorderSide(color: c.borderField, width: 2), textStyle: PhText.button, ), ), inputDecorationTheme: InputDecorationTheme( filled: true, fillColor: c.surface, contentPadding: const EdgeInsets.symmetric(horizontal: 14, vertical: 12), border: OutlineInputBorder(borderRadius: BorderRadius.circular(PhRadius.field), borderSide: BorderSide(color: c.borderField)), enabledBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(PhRadius.field), borderSide: BorderSide(color: c.borderField)), focusedBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(PhRadius.field), borderSide: BorderSide(color: c.focus, width: 2)), errorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(PhRadius.field), borderSide: BorderSide(color: c.error, width: 2)), ), switchTheme: SwitchThemeData( thumbColor: WidgetStateProperty.all(Colors.white), trackColor: WidgetStateProperty.resolveWith((s) => s.contains(WidgetState.selected) ? c.action : c.borderField), trackOutlineColor: WidgetStateProperty.resolveWith((s) => s.contains(WidgetState.selected) ? c.action : c.borderField), ), ); } /// Card surface: white (dark: #1E222A), radius 16, shadow only in light mode. BoxDecoration phCardDecoration(BuildContext context) { final c = Theme.of(context).extension()!; return BoxDecoration( color: c.surface, borderRadius: BorderRadius.circular(PhRadius.card), boxShadow: PhShadows.card(Theme.of(context).brightness), ); }