SuhasGholkar commited on
Commit
3600a4e
·
verified ·
1 Parent(s): b93f3b2

Update src/brand.py

Browse files
Files changed (1) hide show
  1. src/brand.py +160 -358
src/brand.py CHANGED
@@ -1,381 +1,183 @@
1
  # src/brand.py
2
  from __future__ import annotations
3
  import streamlit as st
4
-
5
- PRIMARY = "#2563EB" # Indigo 600
6
- PRIMARY_DARK = "#1E40AF" # Indigo 800
7
- SUCCESS = "#10B981" # Emerald 500
8
- WARNING = "#F59E0B" # Amber 500
9
- DANGER = "#DC2626" # Red 600
10
- TEXT = "#111827" # Gray 900
11
- MUTED = "#6B7280" # Gray 500
12
- BG = "#F9FAFB" # Gray 50
13
- CARD = "#FFFFFF"
14
- BORDER = "#E5E7EB"
 
 
 
15
 
16
  def inject_brand_css() -> None:
17
- """Inject once per run. Safe to call multiple times."""
18
- st.markdown(f"""
19
  <style>
20
- :root {{
21
- --brand-primary: #2563EB; /* primary blue */
22
- --brand-primary-dark: {PRIMARY_DARK};
23
- --brand-success: {SUCCESS};
24
- --brand-warning: {WARNING};
25
- --brand-danger: {DANGER};
26
- --brand-text: {TEXT};
27
- --brand-muted:{MUTED};
28
- --brand-bg: {BG};
29
- --brand-card: {CARD};
30
- --brand-border:{BORDER};
31
- --brand-radius-lg: 14px;
32
- --brand-radius-md: 10px;
33
- --brand-shadow: 0 10px 30px rgba(0,0,0,.05);
34
- --ink-900:#0f172a;
35
- --ink-700:#334155;
36
- --ink-500:#64748b;
37
- --success-50:#ecfdf5;
38
- --success-600:#059669;
39
- --info-50:#eef6ff;
40
- --info-600:#2563eb;
41
- --brand-primary-600: #1E40AF;
42
- --brand-primary-700: #1B2F7A;
43
- --brand-accent: #10B981; /* accent mint */
44
- --page-bg: #F7F8FB; /* softer background */
45
- --card-bg: #FFFFFF;
46
- --card-border: #E7E9F1;
47
- --muted-text: #6B7280;
48
- --title-text: #0F172A;
49
- --bubble-user: #E8F1FF; /* lighter blue */
50
- --bubble-bot: #E9FAF2; /* lighter mint */
51
  --shadow-sm: 0 4px 14px rgba(15, 23, 42, .06);
52
  --shadow-md: 0 10px 30px rgba(15, 23, 42, .08);
53
- }}
54
-
55
- html, body {{
56
- background: var(--page-bg) !important;
57
- }}
58
-
59
- .block-container {{ padding-top: 1.2rem !important; }}
60
-
61
- .brand-page-wrap{{
62
- padding: 6px 8px 22px;
63
- }}
64
-
65
- .brand-page-header{{
66
- display:flex; align-items:center; gap:14px; margin:0 0 12px 0;
67
- }}
68
-
69
- .brand-page-title{{
70
- font-weight:800; letter-spacing:.2px; color:var(--ink-900);
71
- font-size: clamp(26px, 2.7vw, 40px);
72
- }}
73
-
74
- .brand-page-sub{{
75
- color:var(--ink-500); font-size:14px; margin-top:-6px;
76
- }}
77
-
78
- /* Fixed height hero for a stable side-by-side layout */
79
- .login-hero img {{
80
- width: 100%;
81
- height: 560px; /* pick 540–620 to taste */
82
- object-fit: cover;
83
- border-radius: 12px;
84
- }}
85
-
86
- /* Streamlit forms have generous top margins; tighten them */
87
- [data-testid="stForm"] {{
88
- margin-top: 0 !important;
89
- }}
90
-
91
- /* Slightly round inputs */
92
- [data-testid="stForm"] input,
93
- [data-testid="stForm"] textarea,
94
- [data-testid="stForm"] select {{
95
- border-radius: 10px;
96
- }}
97
-
98
- /* Make primary buttons full width inside forms */
99
- [data-testid="stForm"] .stButton > button {{
100
- width: 100%;
101
- }}
102
-
103
- /* Whole row behaves like two panels with the same height */
104
- .login-row {{ display:flex; gap: 28px; }}
105
-
106
- /* Left: force hero panel height and make image fill it */
107
- .login-hero {{ height: 620px; width: 100%; }}
108
- .login-hero img {{ height: 100%; width: 100%; object-fit: cover; border-radius: 12px; }}
109
-
110
- /* Right: a fixed-height shell that contains the Streamlit card */
111
- .login-card-shell {{ height: 620px; width: 100%; display:flex; align-items:center; }}
112
-
113
- /* Make the inner Streamlit container fill and center its content */
114
- .login-card-shell > div[data-testid="stVerticalBlock"] {{
115
- width:100%;
116
- display:flex;
117
- flex-direction:column;
118
- justify-content:center; /* vertically center the form */
119
- }}
120
-
121
- /* Tidy form look */
122
- [data-testid="stForm"] {{ margin-top: 0 !important; }}
123
- [data-testid="stForm"] input, [data-testid="stForm"] textarea, [data-testid="stForm"] select {{ border-radius:10px; }}
124
- [data-testid="stForm"] .stButton > button {{ width:100%; }}
125
-
126
- /* Match login/signup form height with hero image */
127
- .login-box {{
128
- min-height: 620px; /* adjust to match hero image height */
129
- display: flex;
130
- flex-direction: column;
131
- justify-content: center; /* center the form vertically */
132
- }}
133
 
134
- /* Buttons */
135
- .stButton > button {{
136
- background: var(--brand-primary) !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
137
  color: #fff !important;
138
- border: 1px solid var(--brand-primary) !important;
139
- border-radius: 10px !important;
140
- padding: 0.55rem 1rem !important;
141
- box-shadow: 0 3px 10px rgba(37,99,235,.15);
142
- }}
143
- .stButton > button:hover {{
144
- background: var(--brand-primary-dark) !important;
145
- border-color: var(--brand-primary-dark) !important;
146
- }}
147
-
148
- /* Streamlit tabs */
149
- [data-baseweb="tab-list"]{{
150
- background: var(--brand-card);
151
- border:1px solid var(--brand-border);
152
- border-radius: var(--brand-radius);
153
- box-shadow: var(--brand-shadow);
154
- padding: 6px 8px;
155
- margin-bottom: 18px;
156
- }}
157
-
158
- [data-baseweb="tab"]{{
159
- padding:10px 14px !important;
160
- font-weight:600;
161
- color: var(--ink-700);
162
- }}
163
-
164
- [data-baseweb="tab"][aria-selected="true"]{{
165
- color: var(--brand-primary) !important;
166
- background:#eef5ff;
167
- border-radius:12px;
168
- }}
169
-
170
-
171
- /* ---------- CHAT TAB STYLES ---------- */
172
- .chat-header{{
173
- display:flex; align-items:center; gap:12px; margin-bottom:8px;
174
- }}
175
-
176
- .chat-title{{
177
- font-size: clamp(22px, 2.2vw, 34px);
178
- font-weight:800; color:var(--ink-900);
179
- }}
180
-
181
- .chat-input-card{{
182
- background:var(--brand-card);
183
- border:1px solid var(--brand-border);
184
- border-radius:var(--brand-radius);
185
- box-shadow:var(--brand-shadow);
186
- padding:14px 14px 10px;
187
- margin-bottom:14px;
188
- }}
189
-
190
- .chat-controls-row{{
191
- display:flex; align-items:center; gap:10px; margin-top:4px;
192
- }}
193
-
194
- .chat-submit-btn > button{{
195
- width: 160px; height:42px;
196
- background: var(--brand-primary) !important;
197
- border: none !important; color: white !important;
198
- font-weight:700; border-radius:12px;
199
- }}
200
-
201
- .chat-submit-btn > button:hover{{
202
- background: var(--brand-primary-600) !important;
203
- }}
204
-
205
- .chat-stream{{
206
- display:flex; flex-direction:column; gap:12px;
207
- }}
208
-
209
- .badge.green{{ background:#dcfce7; color:var(--success-600); }}
210
-
211
- /* Make Streamlit markdown in chat messages breathe less */
212
- .msg p{{ margin:0.25rem 0; }}
213
-
214
- /* Cards */
215
- .card {{
216
- background: var(--brand-card);
217
- border: 1px solid var(--brand-border);
218
- border-radius: var(--brand-radius-lg);
219
- box-shadow: 0 6px 18px rgba(0,0,0,.06);
220
  padding: 18px;
221
- }}
222
-
223
- /* Dataframes / tables */
224
- div[data-testid="stDataFrame"] {{
225
  border-radius: 12px;
226
- border: 1px solid var(--brand-border);
227
- overflow: hidden;
228
- background: var(--brand-card);
229
- }}
230
- .stTable thead th {{
231
- background: #F3F4F6;
232
- color: #111827;
233
- font-weight: 600;
234
- }}
235
-
236
- /* Badges */
237
- .badge {{
238
- display:inline-block;
239
- font-size:12px;
240
- padding: 2px 8px;
241
- border-radius: 999px;
242
- border: 1px solid var(--brand-border);
243
- color: var(--brand-text);
244
- background: #F3F4F6;
245
- }}
246
- .badge.success {{ background: rgba(16,185,129,.12); color: #065F46; border-color: rgba(16,185,129,.25); }}
247
- .badge.warn {{ background: rgba(245,158,11,.12); color: #7C2D12; border-color: rgba(245,158,11,.25); }}
248
- .badge.danger {{ background: rgba(220,38,38,.12); color: #7F1D1D; border-color: rgba(220,38,38,.25); }}
249
-
250
- /* Sidebar header spacing */
251
- [data-testid="stSidebar"] .stMarkdown h3 {{
252
- margin-top: .25rem; margin-bottom: .5rem;
253
- }}
254
-
255
- /* ===== Header block ===== */
256
- .brand-page-wrap .chat-header {{
257
- display:flex; align-items:center; gap:14px; margin: 0 0 14px 0;
258
- }}
259
-
260
- .brand-page-wrap .chat-title{{
261
- font-size: 26px; font-weight: 800; color: var(--title-text);
262
- }}
263
-
264
- .brand-card{{
265
- background: var(--card-bg); border:1px solid var(--card-border);
266
- border-radius:16px; padding:18px; box-shadow: var(--shadow-sm);
267
- }}
268
-
269
- /* ===== Input card ===== */
270
- .chat-input-card {{
271
- background: var(--card-bg); border:1px solid var(--card-border);
272
- border-radius:16px; padding:14px 16px; box-shadow: var(--shadow-sm);
273
- margin-bottom:16px;
274
- }}
275
-
276
- .chat-input-card input[type="text"]{{
277
- border-radius:12px !important;
278
- }}
279
-
280
- /* ===== Conversation stream ===== */
281
- .chat-stream {{ display:flex; flex-direction:column; gap:12px; }}
282
-
283
- .msg {{ border-radius:14px; padding:12px 14px; box-shadow: var(--shadow-sm); }}
284
-
285
- .msg-user {{
286
- background: var(--bubble-user); border:1px solid #dbe7ff;
287
- }}
288
-
289
- .msg-bot {{
290
- background: var(--bubble-bot); border:1px solid #c7f4df;
291
- }}
292
-
293
- .msg-header{{
294
- display:flex; justify-content:space-between; align-items:center;
295
- font-size:12px; color:var(--muted-text); margin-bottom:6px;
296
- }}
297
-
298
- .msg-role{{ font-weight:700; color: var(--title-text); }}
299
-
300
- .badge{{
301
- background:#fff; border:1px solid var(--card-border); border-radius:999px;
302
- padding:3px 10px; font-size:11px; box-shadow: var(--shadow-sm);
303
- }}
304
-
305
- /* ===== Analysis card ===== */
306
- .analysis-card{{
307
- background:linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
308
- border:1px solid var(--card-border); border-left:4px solid var(--brand-accent);
309
- border-radius:14px; padding:12px 14px; box-shadow: var(--shadow-sm);
310
- }}
311
-
312
- .analysis-card h4{{ margin:0 0 8px 0; font-size:15px; color: var(--title-text); }}
313
-
314
- .analysis-grid{{
315
- display:grid; grid-template-columns: repeat(2, minmax(0,1fr));
316
- gap:8px; color:#111827;
317
- }}
318
-
319
- @media (max-width: 900px){{ .analysis-grid{ grid-template-columns:1fr; } }}
320
-
321
- /* ===== Buttons (primary + secondary) ===== */
322
- [data-testid="stButton"] > button {{
323
- border-radius:12px !important; font-weight:700 !important;
324
- border: none !important; box-shadow: var(--shadow-sm) !important;
325
- }}
326
-
327
- [data-testid="stButton"] > button[kind="primary"]{{
328
- background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-600) 100%) !important;
329
- color: #fff !important;
330
- }}
331
-
332
- [data-testid="stButton"] > button[kind="primary"]:hover{{
333
- transform: translateY(-1px);
334
- box-shadow: var(--shadow-md) !important;
335
- filter: brightness(1.02);
336
- }}
337
-
338
- [data-testid="stButton"] > button[kind="secondary"]{{
339
- background: #fff !important; color: var(--brand-primary) !important;
340
- border: 1px solid var(--card-border) !important;
341
- }}
342
-
343
- /* ===== Submit button inside forms ===== */
344
- form [type="submit"]{{
345
- width: 100%; border-radius:12px; height: 42px;
346
- font-weight: 800; letter-spacing:.15px;
347
- background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-700) 100%);
348
- color:#fff; box-shadow: var(--shadow-sm); border:none;
349
- }}
350
-
351
- form [type="submit"]:hover{{ box-shadow: var(--shadow-md); transform: translateY(-1px); }
352
-
353
- /* ===== Tables from results ===== */
354
- [data-testid="stDataFrame"] {{
355
- border:1px solid var(--card-border); border-radius:12px; box-shadow: var(--shadow-sm);
356
- }}
357
-
358
- /* ===== Section headings ===== */
359
- .brand-section-title{{
360
- font-weight:800; font-size:22px; margin: 10px 0 8px 0; color: var(--title-text);
361
- }}
362
-
363
- /* Optional: smaller top blank textinput (st.text_input label) */
364
- label[for="user_input"] + div input {{ background: #fff; }}
365
-
366
- </style>", unsafe_allow_html=True)
367
-
368
 
369
  def page_header(title: str, subtitle: str | None = None, icon: str | None = None) -> None:
370
  ico = f"<span style='font-size:26px;margin-right:8px'>{icon}</span>" if icon else ""
371
  sub = f"<div style='color:var(--brand-muted);margin-top:4px'>{subtitle}</div>" if subtitle else ""
372
  st.markdown(
373
  f"<div style='margin-bottom:10px'><div style='font-weight:800;font-size:26px'>{ico}{title}</div>{sub}</div>",
374
- unsafe_allow_html=True
375
  )
376
 
377
- def card_start():
378
  st.markdown("<div class='card'>", unsafe_allow_html=True)
379
 
380
- def card_end():
381
  st.markdown("</div>", unsafe_allow_html=True)
 
1
  # src/brand.py
2
  from __future__ import annotations
3
  import streamlit as st
4
+ from string import Template
5
+
6
+ # Brand palette
7
+ PRIMARY = "#2563EB" # Indigo 600
8
+ PRIMARY_DARK = "#1E40AF" # Indigo 800
9
+ PRIMARY_700 = "#1B2F7A"
10
+ SUCCESS = "#10B981" # Emerald 500
11
+ WARNING = "#F59E0B" # Amber 500
12
+ DANGER = "#DC2626" # Red 600
13
+ TEXT = "#111827" # Gray 900
14
+ MUTED = "#6B7280" # Gray 500
15
+ PAGE_BG = "#F7F8FB"
16
+ CARD_BG = "#FFFFFF"
17
+ CARD_BORDER = "#E7E9F1"
18
 
19
  def inject_brand_css() -> None:
20
+ """Inject brand/theme CSS once per run (safe to call multiple times)."""
21
+ css_tpl = Template("""
22
  <style>
23
+ :root {
24
+ --brand-primary: $PRIMARY;
25
+ --brand-primary-dark: $PRIMARY_DARK;
26
+ --brand-primary-700: $PRIMARY_700;
27
+ --brand-success: $SUCCESS;
28
+ --brand-warning: $WARNING;
29
+ --brand-danger: $DANGER;
30
+ --brand-text: $TEXT;
31
+ --brand-muted: $MUTED;
32
+ --page-bg: $PAGE_BG;
33
+ --card-bg: $CARD_BG;
34
+ --card-border: $CARD_BORDER;
35
+
36
+ --radius-lg: 14px;
37
+ --radius-md: 10px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
  --shadow-sm: 0 4px 14px rgba(15, 23, 42, .06);
39
  --shadow-md: 0 10px 30px rgba(15, 23, 42, .08);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
 
41
+ --ink-900:#0F172A; --ink-700:#334155; --ink-500:#64748B;
42
+ --bubble-user:#E8F1FF; --bubble-bot:#E9FAF2;
43
+ }
44
+
45
+ html, body { background: var(--page-bg) !important; }
46
+ .block-container { padding-top: 1.2rem !important; }
47
+
48
+ /* ---------- Tabs Shell ---------- */
49
+ [data-baseweb="tab-list"] {
50
+ background: var(--card-bg);
51
+ border: 1px solid var(--card-border);
52
+ border-radius: 14px;
53
+ box-shadow: var(--shadow-sm);
54
+ padding: 6px 8px;
55
+ margin-bottom: 18px;
56
+ }
57
+ [data-baseweb="tab"] {
58
+ padding: 10px 14px !important;
59
+ font-weight: 600;
60
+ color: #334155;
61
+ }
62
+ [data-baseweb="tab"][aria-selected="true"] {
63
+ color: var(--brand-primary) !important;
64
+ background: #EEF5FF;
65
+ border-radius: 12px;
66
+ }
67
+
68
+ /* ---------- Buttons ---------- */
69
+ [data-testid="stButton"] > button {
70
+ border-radius: 12px !important;
71
+ font-weight: 700 !important;
72
+ border: none !important;
73
+ box-shadow: var(--shadow-sm) !important;
74
+ }
75
+ [data-testid="stButton"] > button[kind="primary"]{
76
+ background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%) !important;
77
  color: #fff !important;
78
+ }
79
+ [data-testid="stButton"] > button[kind="primary"]:hover{
80
+ transform: translateY(-1px);
81
+ box-shadow: var(--shadow-md) !important;
82
+ filter: brightness(1.02);
83
+ }
84
+ [data-testid="stButton"] > button[kind="secondary"]{
85
+ background: #fff !important; color: var(--brand-primary) !important;
86
+ border: 1px solid var(--card-border) !important;
87
+ }
88
+
89
+ /* ---------- Cards & Tables ---------- */
90
+ .card {
91
+ background: var(--card-bg);
92
+ border: 1px solid var(--card-border);
93
+ border-radius: var(--radius-lg);
94
+ box-shadow: var(--shadow-sm);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95
  padding: 18px;
96
+ }
97
+ [data-testid="stDataFrame"] {
98
+ border: 1px solid var(--card-border);
 
99
  border-radius: 12px;
100
+ box-shadow: var(--shadow-sm);
101
+ background: var(--card-bg);
102
+ }
103
+
104
+ /* ---------- Chat Header ---------- */
105
+ .brand-page-wrap .chat-header {
106
+ display:flex; align-items:center; gap:14px; margin: 0 0 14px 0;
107
+ }
108
+ .brand-page-wrap .chat-title {
109
+ font-size: clamp(22px, 2.2vw, 34px);
110
+ font-weight:800; color: var(--ink-900);
111
+ }
112
+
113
+ /* ---------- Chat Input Card ---------- */
114
+ .chat-input-card {
115
+ background: var(--card-bg); border:1px solid var(--card-border);
116
+ border-radius:16px; padding:14px 16px; box-shadow: var(--shadow-sm);
117
+ margin-bottom:16px;
118
+ }
119
+ .chat-controls-row { display:flex; align-items:center; gap:10px; margin-top:6px; }
120
+ .chat-submit-btn > button {
121
+ width: 160px; height: 42px;
122
+ background: var(--brand-primary) !important;
123
+ color:#fff !important; border:none !important; border-radius:12px;
124
+ font-weight:800;
125
+ }
126
+ .chat-submit-btn > button:hover { background: var(--brand-primary-dark) !important; }
127
+
128
+ /* ---------- Conversation Stream ---------- */
129
+ .chat-stream { display:flex; flex-direction:column; gap:12px; }
130
+ .msg { border-radius:14px; padding:12px 14px; box-shadow: var(--shadow-sm); }
131
+ .msg-user { background: var(--bubble-user); border:1px solid #DBE7FF; }
132
+ .msg-bot { background: var(--bubble-bot); border:1px solid #C7F4DF; }
133
+
134
+ .msg-header{
135
+ display:flex; justify-content:space-between; align-items:center;
136
+ font-size:12px; color:#6B7280; margin-bottom:6px;
137
+ }
138
+ .msg-role{ font-weight:700; color:#0F172A; }
139
+
140
+ /* ---------- Login layout helpers (used by auth UI) ---------- */
141
+ .login-row { display:flex; gap:28px; }
142
+ .login-hero { height:620px; width:100%; }
143
+ .login-hero img { height:100%; width:100%; object-fit:cover; border-radius:12px; }
144
+ .login-card-shell { height:620px; width:100%; display:flex; align-items:center; }
145
+ .login-card-shell > div[data-testid="stVerticalBlock"] {
146
+ width:100%; display:flex; flex-direction:column; justify-content:center;
147
+ }
148
+ [data-testid="stForm"] { margin-top:0 !important; }
149
+ [data-testid="stForm"] input,
150
+ [data-testid="stForm"] textarea,
151
+ [data-testid="stForm"] select { border-radius:10px; }
152
+ [data-testid="stForm"] .stButton > button { width:100%; }
153
+ form [type="submit"]{
154
+ width:100%; height:42px; border-radius:12px; font-weight:800;
155
+ letter-spacing:.15px; color:#fff; border:none;
156
+ background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-700) 100%);
157
+ box-shadow: var(--shadow-sm);
158
+ }
159
+ form [type="submit"]:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
160
+ </style>
161
+ """)
162
+
163
+ css = css_tpl.substitute(
164
+ PRIMARY=PRIMARY, PRIMARY_DARK=PRIMARY_DARK, PRIMARY_700=PRIMARY_700,
165
+ SUCCESS=SUCCESS, WARNING=WARNING, DANGER=DANGER,
166
+ TEXT=TEXT, MUTED=MUTED, PAGE_BG=PAGE_BG,
167
+ CARD_BG=CARD_BG, CARD_BORDER=CARD_BORDER,
168
+ )
169
+ st.markdown(css, unsafe_allow_html=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
170
 
171
  def page_header(title: str, subtitle: str | None = None, icon: str | None = None) -> None:
172
  ico = f"<span style='font-size:26px;margin-right:8px'>{icon}</span>" if icon else ""
173
  sub = f"<div style='color:var(--brand-muted);margin-top:4px'>{subtitle}</div>" if subtitle else ""
174
  st.markdown(
175
  f"<div style='margin-bottom:10px'><div style='font-weight:800;font-size:26px'>{ico}{title}</div>{sub}</div>",
176
+ unsafe_allow_html=True,
177
  )
178
 
179
+ def card_start() -> None:
180
  st.markdown("<div class='card'>", unsafe_allow_html=True)
181
 
182
+ def card_end() -> None:
183
  st.markdown("</div>", unsafe_allow_html=True)