@empoweredvote/ev-ui 0.8.14 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -50,6 +50,7 @@ __export(index_exports, {
50
50
  JudicialScorecard: () => JudicialScorecard,
51
51
  LegislativeInlineSummary: () => LegislativeInlineSummary,
52
52
  LegislativeRecord: () => LegislativeRecord,
53
+ PlaceholderRadar: () => PlaceholderRadar,
53
54
  PoliticianCard: () => PoliticianCard,
54
55
  PoliticianProfile: () => PoliticianProfile,
55
56
  RadarChartCore: () => RadarChartCore,
@@ -69,6 +70,7 @@ __export(index_exports, {
69
70
  defaultNavItems: () => defaultNavItems,
70
71
  duration: () => duration,
71
72
  easing: () => easing,
73
+ evAppLinks: () => evAppLinks,
72
74
  evContext: () => evContext,
73
75
  focus: () => focus,
74
76
  fontSizes: () => fontSizes,
@@ -469,8 +471,8 @@ function wrapLabel(label, maxChars = 12) {
469
471
  return lines;
470
472
  }
471
473
 
472
- // src/Header.jsx
473
- var import_react5 = __toESM(require("react"));
474
+ // src/PlaceholderRadar.jsx
475
+ var import_react4 = __toESM(require("react"));
474
476
 
475
477
  // src/tokens.js
476
478
  var colorScales = {
@@ -865,14 +867,95 @@ var breakpoints = {
865
867
  xl: "1280px"
866
868
  };
867
869
 
870
+ // src/PlaceholderRadar.jsx
871
+ function PlaceholderRadar({ size = 250, name = "", darkMode = false }) {
872
+ const cx = size / 2;
873
+ const cy = size / 2;
874
+ const r = size / 2 * 0.65;
875
+ const n = 8;
876
+ const surface = darkMode ? "#1e2a3a" : colorScales.teal["050"];
877
+ const stroke = darkMode ? "rgba(255,255,255,0.22)" : colorScales.gray["200"];
878
+ const vertices = Array.from({ length: n }, (_, i) => {
879
+ const a = 2 * Math.PI * i / n;
880
+ return [cx + r * Math.sin(a), cy - r * Math.cos(a)];
881
+ });
882
+ const outerPts = vertices.map(([x, y]) => `${x},${y}`).join(" ");
883
+ const midPts = vertices.map(([x, y]) => `${cx + (x - cx) * 0.6},${cy + (y - cy) * 0.6}`).join(" ");
884
+ const innerPts = vertices.map(([x, y]) => `${cx + (x - cx) * 0.3},${cy + (y - cy) * 0.3}`).join(" ");
885
+ return /* @__PURE__ */ import_react4.default.createElement(
886
+ "svg",
887
+ {
888
+ width: size,
889
+ height: size,
890
+ viewBox: `0 0 ${size} ${size}`,
891
+ role: "img",
892
+ "aria-label": name ? `${name} \u2014 compass data unavailable` : "compass data unavailable",
893
+ style: {
894
+ backgroundColor: surface,
895
+ borderRadius: borderRadius.sm,
896
+ flexShrink: 0
897
+ }
898
+ },
899
+ vertices.map(([x, y], i) => /* @__PURE__ */ import_react4.default.createElement(
900
+ "line",
901
+ {
902
+ key: i,
903
+ x1: cx,
904
+ y1: cy,
905
+ x2: x,
906
+ y2: y,
907
+ stroke,
908
+ strokeWidth: "1",
909
+ strokeDasharray: "2 3",
910
+ opacity: "0.6"
911
+ }
912
+ )),
913
+ /* @__PURE__ */ import_react4.default.createElement(
914
+ "polygon",
915
+ {
916
+ points: innerPts,
917
+ fill: "none",
918
+ stroke,
919
+ strokeWidth: "1",
920
+ strokeDasharray: "2 3",
921
+ opacity: "0.5"
922
+ }
923
+ ),
924
+ /* @__PURE__ */ import_react4.default.createElement(
925
+ "polygon",
926
+ {
927
+ points: midPts,
928
+ fill: "none",
929
+ stroke,
930
+ strokeWidth: "1",
931
+ strokeDasharray: "3 3",
932
+ opacity: "0.6"
933
+ }
934
+ ),
935
+ /* @__PURE__ */ import_react4.default.createElement(
936
+ "polygon",
937
+ {
938
+ points: outerPts,
939
+ fill: "none",
940
+ stroke,
941
+ strokeWidth: "1.5",
942
+ strokeDasharray: "4 3"
943
+ }
944
+ )
945
+ );
946
+ }
947
+
948
+ // src/Header.jsx
949
+ var import_react6 = __toESM(require("react"));
950
+
868
951
  // src/useMediaQuery.js
869
- var import_react4 = require("react");
952
+ var import_react5 = require("react");
870
953
  function useMediaQuery(query) {
871
- const [matches, setMatches] = (0, import_react4.useState)(() => {
954
+ const [matches, setMatches] = (0, import_react5.useState)(() => {
872
955
  if (typeof window === "undefined") return false;
873
956
  return window.matchMedia(query).matches;
874
957
  });
875
- (0, import_react4.useEffect)(() => {
958
+ (0, import_react5.useEffect)(() => {
876
959
  if (typeof window === "undefined") return;
877
960
  const mql = window.matchMedia(query);
878
961
  const handler = (e) => setMatches(e.matches);
@@ -894,14 +977,16 @@ function Header({
894
977
  currentPath,
895
978
  onNavigate,
896
979
  profileMenu,
980
+ darkMode = false,
981
+ navCollapseBreakpoint = 1024,
897
982
  style = {}
898
983
  }) {
899
- const [mobileMenuOpen, setMobileMenuOpen] = (0, import_react5.useState)(false);
900
- const [openDropdown, setOpenDropdown] = (0, import_react5.useState)(null);
901
- const [profileOpen, setProfileOpen] = (0, import_react5.useState)(false);
902
- const isMobile = useMediaQuery("(max-width: 768px)");
903
- const profileRef = (0, import_react5.useRef)(null);
904
- (0, import_react5.useEffect)(() => {
984
+ const [mobileMenuOpen, setMobileMenuOpen] = (0, import_react6.useState)(false);
985
+ const [openDropdown, setOpenDropdown] = (0, import_react6.useState)(null);
986
+ const [profileOpen, setProfileOpen] = (0, import_react6.useState)(false);
987
+ const isMobile = useMediaQuery(`(max-width: ${navCollapseBreakpoint}px)`);
988
+ const profileRef = (0, import_react6.useRef)(null);
989
+ (0, import_react6.useEffect)(() => {
905
990
  if (!profileOpen) return;
906
991
  const handleClickOutside = (e) => {
907
992
  if (profileRef.current && !profileRef.current.contains(e.target)) {
@@ -917,9 +1002,42 @@ function Header({
917
1002
  onNavigate(href);
918
1003
  }
919
1004
  };
1005
+ const t = darkMode ? {
1006
+ surface: semanticTokens.dark.layerBase.background,
1007
+ // #131416
1008
+ raised: semanticTokens.dark.layerOne.background,
1009
+ // #2F3237 (dropdowns)
1010
+ text: colors.evLightBlue,
1011
+ // #59B0C4 — AA on dark
1012
+ itemText: semanticTokens.dark.layerOne.text,
1013
+ // #D3D7DE (dropdown items)
1014
+ muted: semanticTokens.dark.layerBase.text,
1015
+ // #B3BBCC
1016
+ border: semanticTokens.dark.divider,
1017
+ // #41454E
1018
+ hoverBg: semanticTokens.dark.layerTwo.background,
1019
+ // #41454E
1020
+ ctaBg: semanticTokens.dark.buttonPrimary.background.default,
1021
+ // #005366
1022
+ ctaBgHover: semanticTokens.dark.buttonPrimary.background.hovered,
1023
+ ctaText: "#FFFFFF",
1024
+ shadow: "0 10px 40px rgba(0,0,0,0.5)"
1025
+ } : {
1026
+ surface: colors.bgWhite,
1027
+ raised: colors.bgWhite,
1028
+ text: colors.evTeal,
1029
+ itemText: colors.evTeal,
1030
+ muted: colors.textMuted,
1031
+ border: colors.borderLight,
1032
+ hoverBg: colors.bgLight,
1033
+ ctaBg: colors.evTeal,
1034
+ ctaBgHover: colors.evTealDark,
1035
+ ctaText: colors.textWhite,
1036
+ shadow: "0 10px 40px rgba(0,0,0,0.1)"
1037
+ };
920
1038
  const styles2 = {
921
1039
  header: {
922
- backgroundColor: colors.bgWhite,
1040
+ backgroundColor: t.surface,
923
1041
  position: "sticky",
924
1042
  top: 0,
925
1043
  zIndex: 50,
@@ -932,7 +1050,8 @@ function Header({
932
1050
  padding: isMobile ? `${spacing[3]} ${spacing[3]}` : `${spacing[4]} ${spacing[6]}`,
933
1051
  display: "flex",
934
1052
  alignItems: "center",
935
- justifyContent: "space-between"
1053
+ justifyContent: "space-between",
1054
+ gap: spacing[6]
936
1055
  },
937
1056
  logo: {
938
1057
  height: "43px",
@@ -940,20 +1059,24 @@ function Header({
940
1059
  },
941
1060
  nav: {
942
1061
  display: isMobile ? "none" : "flex",
1062
+ flex: "1 1 auto",
943
1063
  alignItems: "center",
944
- gap: spacing[10]
1064
+ justifyContent: "center",
1065
+ flexWrap: "nowrap",
1066
+ gap: spacing[8]
945
1067
  },
946
1068
  navItem: {
947
1069
  fontFamily: fonts.primary,
948
- fontWeight: fontWeights.bold,
949
- fontSize: fontSizes.xl,
950
- color: colors.evTeal,
1070
+ fontWeight: fontWeights.medium,
1071
+ fontSize: fontSizes.base,
1072
+ color: t.text,
951
1073
  textDecoration: "none",
952
1074
  cursor: "pointer",
953
1075
  display: "flex",
954
1076
  alignItems: "center",
955
1077
  gap: spacing[2],
956
- position: "relative"
1078
+ position: "relative",
1079
+ whiteSpace: "nowrap"
957
1080
  },
958
1081
  navItemActive: {
959
1082
  textDecoration: "underline"
@@ -970,9 +1093,9 @@ function Header({
970
1093
  zIndex: 100
971
1094
  },
972
1095
  dropdownInner: {
973
- backgroundColor: colors.bgWhite,
1096
+ backgroundColor: t.raised,
974
1097
  borderRadius: borderRadius.lg,
975
- boxShadow: "0 10px 40px rgba(0,0,0,0.1)",
1098
+ boxShadow: t.shadow,
976
1099
  minWidth: "200px",
977
1100
  padding: spacing[2]
978
1101
  },
@@ -982,14 +1105,14 @@ function Header({
982
1105
  fontFamily: fonts.primary,
983
1106
  fontWeight: fontWeights.medium,
984
1107
  fontSize: fontSizes.base,
985
- color: colors.evTeal,
1108
+ color: t.itemText,
986
1109
  textDecoration: "none",
987
1110
  borderRadius: borderRadius.md,
988
1111
  cursor: "pointer"
989
1112
  },
990
1113
  ctaButton: {
991
- backgroundColor: colors.evTeal,
992
- color: colors.textWhite,
1114
+ backgroundColor: t.ctaBg,
1115
+ color: t.ctaText,
993
1116
  fontFamily: fonts.primary,
994
1117
  fontWeight: fontWeights.bold,
995
1118
  fontSize: fontSizes.xl,
@@ -1004,13 +1127,13 @@ function Header({
1004
1127
  display: "inline-flex",
1005
1128
  alignItems: "center",
1006
1129
  backgroundColor: "transparent",
1007
- color: colors.evTeal,
1130
+ color: t.text,
1008
1131
  fontFamily: fonts.primary,
1009
1132
  fontWeight: fontWeights.bold,
1010
1133
  fontSize: fontSizes.base,
1011
1134
  padding: `${spacing[2]} ${spacing[5]}`,
1012
1135
  borderRadius: borderRadius.full || "999px",
1013
- border: `1.5px solid ${colors.evTeal}`,
1136
+ border: `1.5px solid ${t.text}`,
1014
1137
  cursor: "pointer",
1015
1138
  textDecoration: "none",
1016
1139
  lineHeight: 1.2,
@@ -1026,7 +1149,7 @@ function Header({
1026
1149
  hamburger: {
1027
1150
  width: "24px",
1028
1151
  height: "2px",
1029
- backgroundColor: colors.evTeal,
1152
+ backgroundColor: t.text,
1030
1153
  position: "relative"
1031
1154
  },
1032
1155
  mobileMenu: {
@@ -1036,25 +1159,25 @@ function Header({
1036
1159
  top: "100%",
1037
1160
  left: 0,
1038
1161
  right: 0,
1039
- backgroundColor: colors.bgWhite,
1162
+ backgroundColor: t.surface,
1040
1163
  padding: spacing[4],
1041
- boxShadow: "0 4px 20px rgba(0,0,0,0.1)"
1164
+ boxShadow: t.shadow
1042
1165
  },
1043
1166
  mobileNavItem: {
1044
1167
  fontFamily: fonts.primary,
1045
- fontWeight: fontWeights.bold,
1046
- fontSize: fontSizes.lg,
1047
- color: colors.evTeal,
1168
+ fontWeight: fontWeights.medium,
1169
+ fontSize: fontSizes.base,
1170
+ color: t.text,
1048
1171
  textDecoration: "none",
1049
1172
  padding: `${spacing[3]} 0`,
1050
- borderBottom: `1px solid ${colors.borderLight}`
1173
+ borderBottom: `1px solid ${t.border}`
1051
1174
  },
1052
1175
  profileButton: {
1053
1176
  width: "40px",
1054
1177
  height: "40px",
1055
1178
  borderRadius: borderRadius.full,
1056
- border: `2px solid ${colors.evTeal}`,
1057
- backgroundColor: colors.bgLight,
1179
+ border: `2px solid ${t.text}`,
1180
+ backgroundColor: darkMode ? t.raised : colors.bgLight,
1058
1181
  cursor: "pointer",
1059
1182
  display: "flex",
1060
1183
  alignItems: "center",
@@ -1069,9 +1192,9 @@ function Header({
1069
1192
  zIndex: 100
1070
1193
  },
1071
1194
  profileDropdownInner: {
1072
- backgroundColor: colors.bgWhite,
1195
+ backgroundColor: t.raised,
1073
1196
  borderRadius: borderRadius.lg,
1074
- boxShadow: "0 10px 40px rgba(0,0,0,0.1)",
1197
+ boxShadow: t.shadow,
1075
1198
  minWidth: "160px",
1076
1199
  padding: spacing[2]
1077
1200
  },
@@ -1082,7 +1205,7 @@ function Header({
1082
1205
  fontFamily: fonts.primary,
1083
1206
  fontWeight: fontWeights.medium,
1084
1207
  fontSize: fontSizes.base,
1085
- color: colors.evTeal,
1208
+ color: t.itemText,
1086
1209
  textDecoration: "none",
1087
1210
  borderRadius: borderRadius.md,
1088
1211
  cursor: "pointer",
@@ -1092,7 +1215,7 @@ function Header({
1092
1215
  },
1093
1216
  mobileDivider: {
1094
1217
  height: "1px",
1095
- backgroundColor: colors.borderLight,
1218
+ backgroundColor: t.border,
1096
1219
  margin: `${spacing[3]} 0`
1097
1220
  },
1098
1221
  profileLabel: {
@@ -1100,8 +1223,8 @@ function Header({
1100
1223
  fontFamily: fonts.primary,
1101
1224
  fontWeight: fontWeights.semibold,
1102
1225
  fontSize: fontSizes.sm,
1103
- color: colors.textMuted,
1104
- borderBottom: `1px solid ${colors.borderLight}`,
1226
+ color: t.muted,
1227
+ borderBottom: `1px solid ${t.border}`,
1105
1228
  marginBottom: spacing[1],
1106
1229
  overflow: "hidden",
1107
1230
  textOverflow: "ellipsis",
@@ -1109,17 +1232,23 @@ function Header({
1109
1232
  }
1110
1233
  };
1111
1234
  const NavLink = ({ item }) => {
1112
- const isActive = currentPath === item.href;
1235
+ const isActive = currentPath === item.href || typeof window !== "undefined" && /^https?:\/\//.test(item.href) && (() => {
1236
+ try {
1237
+ return new URL(item.href).hostname === window.location.hostname;
1238
+ } catch {
1239
+ return false;
1240
+ }
1241
+ })();
1113
1242
  const hasDropdown = item.dropdown && item.dropdown.length > 0;
1114
1243
  const isOpen = openDropdown === item.label;
1115
- return /* @__PURE__ */ import_react5.default.createElement(
1244
+ return /* @__PURE__ */ import_react6.default.createElement(
1116
1245
  "div",
1117
1246
  {
1118
1247
  style: { position: "relative" },
1119
1248
  onMouseEnter: () => hasDropdown && setOpenDropdown(item.label),
1120
1249
  onMouseLeave: () => hasDropdown && setOpenDropdown(null)
1121
1250
  },
1122
- /* @__PURE__ */ import_react5.default.createElement(
1251
+ /* @__PURE__ */ import_react6.default.createElement(
1123
1252
  "a",
1124
1253
  {
1125
1254
  href: item.href,
@@ -1130,7 +1259,7 @@ function Header({
1130
1259
  }
1131
1260
  },
1132
1261
  item.label,
1133
- hasDropdown && /* @__PURE__ */ import_react5.default.createElement(
1262
+ hasDropdown && /* @__PURE__ */ import_react6.default.createElement(
1134
1263
  "svg",
1135
1264
  {
1136
1265
  style: styles2.dropdownIcon,
@@ -1138,11 +1267,11 @@ function Header({
1138
1267
  fill: "none",
1139
1268
  xmlns: "http://www.w3.org/2000/svg"
1140
1269
  },
1141
- /* @__PURE__ */ import_react5.default.createElement(
1270
+ /* @__PURE__ */ import_react6.default.createElement(
1142
1271
  "path",
1143
1272
  {
1144
1273
  d: "M1 1L8 8L15 1",
1145
- stroke: colors.evTeal,
1274
+ stroke: t.text,
1146
1275
  strokeWidth: "2",
1147
1276
  strokeLinecap: "round",
1148
1277
  strokeLinejoin: "round"
@@ -1150,7 +1279,7 @@ function Header({
1150
1279
  )
1151
1280
  )
1152
1281
  ),
1153
- hasDropdown && isOpen && /* @__PURE__ */ import_react5.default.createElement("div", { style: styles2.dropdown }, /* @__PURE__ */ import_react5.default.createElement("div", { style: styles2.dropdownInner }, item.dropdown.map((dropdownItem, idx) => /* @__PURE__ */ import_react5.default.createElement(
1282
+ hasDropdown && isOpen && /* @__PURE__ */ import_react6.default.createElement("div", { style: styles2.dropdown }, /* @__PURE__ */ import_react6.default.createElement("div", { style: styles2.dropdownInner }, item.dropdown.map((dropdownItem, idx) => /* @__PURE__ */ import_react6.default.createElement(
1154
1283
  "a",
1155
1284
  {
1156
1285
  key: idx,
@@ -1158,7 +1287,7 @@ function Header({
1158
1287
  onClick: (e) => handleNavClick(e, dropdownItem.href),
1159
1288
  style: styles2.dropdownItem,
1160
1289
  onMouseEnter: (e) => {
1161
- e.target.style.backgroundColor = colors.bgLight;
1290
+ e.target.style.backgroundColor = t.hoverBg;
1162
1291
  },
1163
1292
  onMouseLeave: (e) => {
1164
1293
  e.target.style.backgroundColor = "transparent";
@@ -1168,26 +1297,26 @@ function Header({
1168
1297
  ))))
1169
1298
  );
1170
1299
  };
1171
- return /* @__PURE__ */ import_react5.default.createElement("header", { style: styles2.header }, /* @__PURE__ */ import_react5.default.createElement("div", { style: styles2.container }, /* @__PURE__ */ import_react5.default.createElement(
1300
+ return /* @__PURE__ */ import_react6.default.createElement("header", { style: styles2.header }, /* @__PURE__ */ import_react6.default.createElement("div", { style: styles2.container }, /* @__PURE__ */ import_react6.default.createElement(
1172
1301
  "a",
1173
1302
  {
1174
1303
  href: logoHref,
1175
1304
  onClick: (e) => handleNavClick(e, logoHref),
1176
- style: { display: "flex", alignItems: "center" }
1305
+ style: { display: "flex", alignItems: "center", flexShrink: 0 }
1177
1306
  },
1178
- logoSrc ? /* @__PURE__ */ import_react5.default.createElement("img", { src: logoSrc, alt: logoAlt, style: styles2.logo }) : /* @__PURE__ */ import_react5.default.createElement(
1307
+ logoSrc ? /* @__PURE__ */ import_react6.default.createElement("img", { src: logoSrc, alt: logoAlt, style: styles2.logo }) : /* @__PURE__ */ import_react6.default.createElement(
1179
1308
  "span",
1180
1309
  {
1181
1310
  style: {
1182
1311
  fontFamily: fonts.primary,
1183
1312
  fontWeight: fontWeights.bold,
1184
1313
  fontSize: fontSizes["2xl"],
1185
- color: colors.evTeal
1314
+ color: t.text
1186
1315
  }
1187
1316
  },
1188
1317
  "empowered.vote"
1189
1318
  )
1190
- ), /* @__PURE__ */ import_react5.default.createElement("nav", { style: styles2.nav, className: "ev-header-nav" }, navItems.map((item, idx) => /* @__PURE__ */ import_react5.default.createElement(NavLink, { key: idx, item }))), /* @__PURE__ */ import_react5.default.createElement("div", { style: { display: isMobile ? "none" : "flex", alignItems: "center", gap: spacing[3] } }, secondaryAction && import_react5.default.isValidElement(secondaryAction) && secondaryAction, secondaryAction && !import_react5.default.isValidElement(secondaryAction) && /* @__PURE__ */ import_react5.default.createElement(
1319
+ ), /* @__PURE__ */ import_react6.default.createElement("nav", { style: styles2.nav, className: "ev-header-nav" }, navItems.map((item, idx) => /* @__PURE__ */ import_react6.default.createElement(NavLink, { key: idx, item }))), /* @__PURE__ */ import_react6.default.createElement("div", { style: { display: isMobile ? "none" : "flex", alignItems: "center", gap: spacing[3], flexShrink: 0 } }, secondaryAction && import_react6.default.isValidElement(secondaryAction) && secondaryAction, secondaryAction && !import_react6.default.isValidElement(secondaryAction) && /* @__PURE__ */ import_react6.default.createElement(
1191
1320
  "a",
1192
1321
  {
1193
1322
  href: secondaryAction.href,
@@ -1201,16 +1330,16 @@ function Header({
1201
1330
  style: styles2.secondaryAction,
1202
1331
  className: "ev-header-secondary",
1203
1332
  onMouseEnter: (e) => {
1204
- e.currentTarget.style.backgroundColor = colors.evTeal;
1205
- e.currentTarget.style.color = colors.textWhite;
1333
+ e.currentTarget.style.backgroundColor = t.text;
1334
+ e.currentTarget.style.color = darkMode ? t.surface : colors.textWhite;
1206
1335
  },
1207
1336
  onMouseLeave: (e) => {
1208
1337
  e.currentTarget.style.backgroundColor = "transparent";
1209
- e.currentTarget.style.color = colors.evTeal;
1338
+ e.currentTarget.style.color = t.text;
1210
1339
  }
1211
1340
  },
1212
1341
  secondaryAction.label
1213
- ), ctaButton && /* @__PURE__ */ import_react5.default.createElement(
1342
+ ), ctaButton && /* @__PURE__ */ import_react6.default.createElement(
1214
1343
  "a",
1215
1344
  {
1216
1345
  href: ctaButton.href,
@@ -1218,14 +1347,14 @@ function Header({
1218
1347
  style: styles2.ctaButton,
1219
1348
  className: "ev-header-cta",
1220
1349
  onMouseEnter: (e) => {
1221
- e.target.style.backgroundColor = colors.evTealDark;
1350
+ e.target.style.backgroundColor = t.ctaBgHover;
1222
1351
  },
1223
1352
  onMouseLeave: (e) => {
1224
- e.target.style.backgroundColor = colors.evTeal;
1353
+ e.target.style.backgroundColor = t.ctaBg;
1225
1354
  }
1226
1355
  },
1227
1356
  ctaButton.label
1228
- ), profileMenu && /* @__PURE__ */ import_react5.default.createElement("div", { ref: profileRef, style: { position: "relative" } }, /* @__PURE__ */ import_react5.default.createElement(
1357
+ ), profileMenu && /* @__PURE__ */ import_react6.default.createElement("div", { ref: profileRef, style: { position: "relative" } }, /* @__PURE__ */ import_react6.default.createElement(
1229
1358
  "button",
1230
1359
  {
1231
1360
  style: styles2.profileButton,
@@ -1233,24 +1362,24 @@ function Header({
1233
1362
  "aria-label": "Profile menu",
1234
1363
  "aria-expanded": profileOpen
1235
1364
  },
1236
- /* @__PURE__ */ import_react5.default.createElement(
1365
+ /* @__PURE__ */ import_react6.default.createElement(
1237
1366
  "svg",
1238
1367
  {
1239
1368
  width: "20",
1240
1369
  height: "20",
1241
1370
  viewBox: "0 0 24 24",
1242
1371
  fill: "none",
1243
- stroke: colors.evTeal,
1372
+ stroke: t.text,
1244
1373
  strokeWidth: "2",
1245
1374
  strokeLinecap: "round",
1246
1375
  strokeLinejoin: "round"
1247
1376
  },
1248
- /* @__PURE__ */ import_react5.default.createElement("path", { d: "M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" }),
1249
- /* @__PURE__ */ import_react5.default.createElement("circle", { cx: "12", cy: "7", r: "4" })
1377
+ /* @__PURE__ */ import_react6.default.createElement("path", { d: "M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" }),
1378
+ /* @__PURE__ */ import_react6.default.createElement("circle", { cx: "12", cy: "7", r: "4" })
1250
1379
  )
1251
- ), profileOpen && /* @__PURE__ */ import_react5.default.createElement("div", { style: styles2.profileDropdown }, /* @__PURE__ */ import_react5.default.createElement("div", { style: styles2.profileDropdownInner }, profileMenu.label && /* @__PURE__ */ import_react5.default.createElement("div", { style: styles2.profileLabel }, profileMenu.label), profileMenu.items.map((item, idx) => {
1380
+ ), profileOpen && /* @__PURE__ */ import_react6.default.createElement("div", { style: styles2.profileDropdown }, /* @__PURE__ */ import_react6.default.createElement("div", { style: styles2.profileDropdownInner }, profileMenu.label && /* @__PURE__ */ import_react6.default.createElement("div", { style: styles2.profileLabel }, profileMenu.label), profileMenu.items.map((item, idx) => {
1252
1381
  if (item.href) {
1253
- return /* @__PURE__ */ import_react5.default.createElement(
1382
+ return /* @__PURE__ */ import_react6.default.createElement(
1254
1383
  "a",
1255
1384
  {
1256
1385
  key: idx,
@@ -1264,7 +1393,7 @@ function Header({
1264
1393
  },
1265
1394
  style: styles2.profileDropdownItem,
1266
1395
  onMouseEnter: (e) => {
1267
- e.target.style.backgroundColor = colors.bgLight;
1396
+ e.target.style.backgroundColor = t.hoverBg;
1268
1397
  },
1269
1398
  onMouseLeave: (e) => {
1270
1399
  e.target.style.backgroundColor = "transparent";
@@ -1273,7 +1402,7 @@ function Header({
1273
1402
  item.label
1274
1403
  );
1275
1404
  }
1276
- return /* @__PURE__ */ import_react5.default.createElement(
1405
+ return /* @__PURE__ */ import_react6.default.createElement(
1277
1406
  "button",
1278
1407
  {
1279
1408
  key: idx,
@@ -1284,7 +1413,7 @@ function Header({
1284
1413
  },
1285
1414
  style: styles2.profileDropdownItem,
1286
1415
  onMouseEnter: (e) => {
1287
- e.target.style.backgroundColor = colors.bgLight;
1416
+ e.target.style.backgroundColor = t.hoverBg;
1288
1417
  },
1289
1418
  onMouseLeave: (e) => {
1290
1419
  e.target.style.backgroundColor = "transparent";
@@ -1292,7 +1421,7 @@ function Header({
1292
1421
  },
1293
1422
  item.label
1294
1423
  );
1295
- }))))), /* @__PURE__ */ import_react5.default.createElement(
1424
+ }))))), /* @__PURE__ */ import_react6.default.createElement(
1296
1425
  "button",
1297
1426
  {
1298
1427
  style: styles2.mobileMenuButton,
@@ -1301,7 +1430,7 @@ function Header({
1301
1430
  "aria-label": "Toggle menu",
1302
1431
  "aria-expanded": mobileMenuOpen
1303
1432
  },
1304
- /* @__PURE__ */ import_react5.default.createElement("div", { style: styles2.hamburger }, /* @__PURE__ */ import_react5.default.createElement(
1433
+ /* @__PURE__ */ import_react6.default.createElement("div", { style: styles2.hamburger }, /* @__PURE__ */ import_react6.default.createElement(
1305
1434
  "span",
1306
1435
  {
1307
1436
  style: {
@@ -1310,10 +1439,10 @@ function Header({
1310
1439
  left: 0,
1311
1440
  width: "100%",
1312
1441
  height: "2px",
1313
- backgroundColor: colors.evTeal
1442
+ backgroundColor: t.text
1314
1443
  }
1315
1444
  }
1316
- ), /* @__PURE__ */ import_react5.default.createElement(
1445
+ ), /* @__PURE__ */ import_react6.default.createElement(
1317
1446
  "span",
1318
1447
  {
1319
1448
  style: {
@@ -1322,13 +1451,13 @@ function Header({
1322
1451
  left: 0,
1323
1452
  width: "100%",
1324
1453
  height: "2px",
1325
- backgroundColor: colors.evTeal
1454
+ backgroundColor: t.text
1326
1455
  }
1327
1456
  }
1328
1457
  ))
1329
- )), /* @__PURE__ */ import_react5.default.createElement("div", { style: styles2.mobileMenu, className: "ev-header-mobile-menu" }, navItems.map((item, idx) => {
1458
+ )), /* @__PURE__ */ import_react6.default.createElement("div", { style: styles2.mobileMenu, className: "ev-header-mobile-menu" }, navItems.map((item, idx) => {
1330
1459
  const hasDropdown = item.dropdown && item.dropdown.length > 0;
1331
- return /* @__PURE__ */ import_react5.default.createElement(import_react5.default.Fragment, { key: idx }, hasDropdown ? /* @__PURE__ */ import_react5.default.createElement(import_react5.default.Fragment, null, /* @__PURE__ */ import_react5.default.createElement(
1460
+ return /* @__PURE__ */ import_react6.default.createElement(import_react6.default.Fragment, { key: idx }, hasDropdown ? /* @__PURE__ */ import_react6.default.createElement(import_react6.default.Fragment, null, /* @__PURE__ */ import_react6.default.createElement(
1332
1461
  "span",
1333
1462
  {
1334
1463
  style: {
@@ -1338,7 +1467,7 @@ function Header({
1338
1467
  }
1339
1468
  },
1340
1469
  item.label
1341
- ), item.dropdown.map((sub, subIdx) => /* @__PURE__ */ import_react5.default.createElement(
1470
+ ), item.dropdown.map((sub, subIdx) => /* @__PURE__ */ import_react6.default.createElement(
1342
1471
  "a",
1343
1472
  {
1344
1473
  key: subIdx,
@@ -1355,7 +1484,7 @@ function Header({
1355
1484
  }
1356
1485
  },
1357
1486
  sub.label
1358
- ))) : /* @__PURE__ */ import_react5.default.createElement(
1487
+ ))) : /* @__PURE__ */ import_react6.default.createElement(
1359
1488
  "a",
1360
1489
  {
1361
1490
  href: item.href,
@@ -1367,7 +1496,7 @@ function Header({
1367
1496
  },
1368
1497
  item.label
1369
1498
  ));
1370
- }), secondaryAction && import_react5.default.isValidElement(secondaryAction) && /* @__PURE__ */ import_react5.default.createElement("div", { style: { marginTop: spacing[4], textAlign: "center" } }, secondaryAction), secondaryAction && !import_react5.default.isValidElement(secondaryAction) && /* @__PURE__ */ import_react5.default.createElement(
1499
+ }), secondaryAction && import_react6.default.isValidElement(secondaryAction) && /* @__PURE__ */ import_react6.default.createElement("div", { style: { marginTop: spacing[4], textAlign: "center" } }, secondaryAction), secondaryAction && !import_react6.default.isValidElement(secondaryAction) && /* @__PURE__ */ import_react6.default.createElement(
1371
1500
  "a",
1372
1501
  {
1373
1502
  href: secondaryAction.href,
@@ -1382,7 +1511,7 @@ function Header({
1382
1511
  style: { ...styles2.secondaryAction, marginTop: spacing[4], textAlign: "center", justifyContent: "center" }
1383
1512
  },
1384
1513
  secondaryAction.label
1385
- ), ctaButton && /* @__PURE__ */ import_react5.default.createElement(
1514
+ ), ctaButton && /* @__PURE__ */ import_react6.default.createElement(
1386
1515
  "a",
1387
1516
  {
1388
1517
  href: ctaButton.href,
@@ -1393,14 +1522,14 @@ function Header({
1393
1522
  style: { ...styles2.ctaButton, marginTop: spacing[4], textAlign: "center" }
1394
1523
  },
1395
1524
  ctaButton.label
1396
- ), profileMenu && /* @__PURE__ */ import_react5.default.createElement(import_react5.default.Fragment, null, /* @__PURE__ */ import_react5.default.createElement("div", { style: styles2.mobileDivider }), profileMenu.label && /* @__PURE__ */ import_react5.default.createElement(
1525
+ ), profileMenu && /* @__PURE__ */ import_react6.default.createElement(import_react6.default.Fragment, null, /* @__PURE__ */ import_react6.default.createElement("div", { style: styles2.mobileDivider }), profileMenu.label && /* @__PURE__ */ import_react6.default.createElement(
1397
1526
  "span",
1398
1527
  {
1399
1528
  style: {
1400
1529
  ...styles2.mobileNavItem,
1401
1530
  fontWeight: fontWeights.medium,
1402
1531
  fontSize: fontSizes.sm,
1403
- color: colors.textMuted,
1532
+ color: t.muted,
1404
1533
  cursor: "default",
1405
1534
  display: "block",
1406
1535
  borderBottom: "none"
@@ -1409,7 +1538,7 @@ function Header({
1409
1538
  profileMenu.label
1410
1539
  ), profileMenu.items.map((item, idx) => {
1411
1540
  if (item.href) {
1412
- return /* @__PURE__ */ import_react5.default.createElement(
1541
+ return /* @__PURE__ */ import_react6.default.createElement(
1413
1542
  "a",
1414
1543
  {
1415
1544
  key: idx,
@@ -1426,7 +1555,7 @@ function Header({
1426
1555
  item.label
1427
1556
  );
1428
1557
  }
1429
- return /* @__PURE__ */ import_react5.default.createElement(
1558
+ return /* @__PURE__ */ import_react6.default.createElement(
1430
1559
  "button",
1431
1560
  {
1432
1561
  key: idx,
@@ -1450,10 +1579,10 @@ function Header({
1450
1579
  }
1451
1580
 
1452
1581
  // src/SiteHeader.jsx
1453
- var import_react7 = __toESM(require("react"));
1582
+ var import_react8 = __toESM(require("react"));
1454
1583
 
1455
1584
  // src/FeedbackButton.jsx
1456
- var import_react6 = __toESM(require("react"));
1585
+ var import_react7 = __toESM(require("react"));
1457
1586
  var FEEDBACK_BASE_DEFAULT = "https://alpha.empowered.vote/feedback";
1458
1587
  var HOST_FEATURE_MAP = {
1459
1588
  "compass.empowered.vote": "compass",
@@ -1524,7 +1653,7 @@ function FeedbackButton({
1524
1653
  cursor: "pointer"
1525
1654
  };
1526
1655
  const baseStyle = variant === "link" ? linkStyle2 : pillStyle;
1527
- return /* @__PURE__ */ import_react6.default.createElement(
1656
+ return /* @__PURE__ */ import_react7.default.createElement(
1528
1657
  "a",
1529
1658
  {
1530
1659
  href,
@@ -1560,10 +1689,17 @@ var defaultNavItems = [
1560
1689
  { label: "Find Representatives", href: "https://essentials.empowered.vote" },
1561
1690
  { label: "Read & Rank", href: "https://readrank.empowered.vote" },
1562
1691
  { label: "Treasury Tracker", href: "https://treasurytracker.empowered.vote" },
1692
+ { label: "Civic Trivia", href: "https://ctc.empowered.vote" },
1563
1693
  { label: "Empowered Badges", href: "https://badges.empowered.vote" }
1564
1694
  ]
1565
1695
  }
1566
1696
  ];
1697
+ var evAppLinks = [
1698
+ { label: "Compass", href: "https://compass.empowered.vote" },
1699
+ { label: "Find Representatives", href: "https://essentials.empowered.vote" },
1700
+ { label: "Treasury Tracker", href: "https://treasurytracker.empowered.vote" },
1701
+ { label: "Civic Trivia", href: "https://ctc.empowered.vote" }
1702
+ ];
1567
1703
  var defaultCtaButton = {
1568
1704
  label: "Donate",
1569
1705
  href: "https://empowered.vote/donate"
@@ -1588,11 +1724,11 @@ function SiteHeader({
1588
1724
  if (secondaryAction === false) {
1589
1725
  resolvedSecondary = void 0;
1590
1726
  } else if (secondaryAction === void 0) {
1591
- resolvedSecondary = /* @__PURE__ */ import_react7.default.createElement(FeedbackButton, { feature: feedbackFeature });
1727
+ resolvedSecondary = /* @__PURE__ */ import_react8.default.createElement(FeedbackButton, { feature: feedbackFeature });
1592
1728
  } else {
1593
1729
  resolvedSecondary = secondaryAction;
1594
1730
  }
1595
- return /* @__PURE__ */ import_react7.default.createElement(
1731
+ return /* @__PURE__ */ import_react8.default.createElement(
1596
1732
  Header,
1597
1733
  {
1598
1734
  logoSrc,
@@ -1609,7 +1745,7 @@ function SiteHeader({
1609
1745
  }
1610
1746
 
1611
1747
  // src/FilterSidebar.jsx
1612
- var import_react8 = __toESM(require("react"));
1748
+ var import_react9 = __toESM(require("react"));
1613
1749
  function FilterSidebar({
1614
1750
  title = "Filter by",
1615
1751
  zipCode = "",
@@ -1763,14 +1899,14 @@ function FilterSidebar({
1763
1899
  fontSize: fontSizes.sm
1764
1900
  }
1765
1901
  };
1766
- return /* @__PURE__ */ import_react8.default.createElement("aside", { style: styles2.sidebar, className: "ev-filter-sidebar" }, !isMobile && /* @__PURE__ */ import_react8.default.createElement("h2", { style: styles2.title }, title), /* @__PURE__ */ import_react8.default.createElement("div", { style: isMobile ? void 0 : styles2.contentTop }, /* @__PURE__ */ import_react8.default.createElement("div", { style: isMobile ? { marginBottom: spacing[3] } : styles2.section }, !isMobile && /* @__PURE__ */ import_react8.default.createElement("label", { style: styles2.sectionLabel }, "Location"), autocompleteContainerRef ? /* @__PURE__ */ import_react8.default.createElement(
1902
+ return /* @__PURE__ */ import_react9.default.createElement("aside", { style: styles2.sidebar, className: "ev-filter-sidebar" }, !isMobile && /* @__PURE__ */ import_react9.default.createElement("h2", { style: styles2.title }, title), /* @__PURE__ */ import_react9.default.createElement("div", { style: isMobile ? void 0 : styles2.contentTop }, /* @__PURE__ */ import_react9.default.createElement("div", { style: isMobile ? { marginBottom: spacing[3] } : styles2.section }, !isMobile && /* @__PURE__ */ import_react9.default.createElement("label", { style: styles2.sectionLabel }, "Location"), autocompleteContainerRef ? /* @__PURE__ */ import_react9.default.createElement(
1767
1903
  "div",
1768
1904
  {
1769
1905
  ref: autocompleteContainerRef,
1770
1906
  style: styles2.zipInputWrapper,
1771
1907
  className: "ev-autocomplete-container"
1772
1908
  }
1773
- ) : /* @__PURE__ */ import_react8.default.createElement("div", { style: styles2.zipInputWrapper }, /* @__PURE__ */ import_react8.default.createElement(
1909
+ ) : /* @__PURE__ */ import_react9.default.createElement("div", { style: styles2.zipInputWrapper }, /* @__PURE__ */ import_react9.default.createElement(
1774
1910
  "input",
1775
1911
  {
1776
1912
  ref: zipInputRef,
@@ -1782,7 +1918,7 @@ function FilterSidebar({
1782
1918
  style: styles2.zipInput,
1783
1919
  "aria-label": "Search location"
1784
1920
  }
1785
- ), /* @__PURE__ */ import_react8.default.createElement(
1921
+ ), /* @__PURE__ */ import_react9.default.createElement(
1786
1922
  "button",
1787
1923
  {
1788
1924
  type: "button",
@@ -1791,7 +1927,7 @@ function FilterSidebar({
1791
1927
  "aria-label": "Clear ZIP code"
1792
1928
  },
1793
1929
  "\xD7"
1794
- ))), /* @__PURE__ */ import_react8.default.createElement("div", { style: isMobile ? {} : styles2.section }, !isMobile && /* @__PURE__ */ import_react8.default.createElement("label", { style: styles2.sectionLabel }, "Group"), /* @__PURE__ */ import_react8.default.createElement("div", { style: styles2.radioGroup, role: "radiogroup", "aria-label": "Filter by group" }, filterOptions.map((option) => /* @__PURE__ */ import_react8.default.createElement("label", { key: option.value, style: styles2.radioLabel }, /* @__PURE__ */ import_react8.default.createElement(
1930
+ ))), /* @__PURE__ */ import_react9.default.createElement("div", { style: isMobile ? {} : styles2.section }, !isMobile && /* @__PURE__ */ import_react9.default.createElement("label", { style: styles2.sectionLabel }, "Group"), /* @__PURE__ */ import_react9.default.createElement("div", { style: styles2.radioGroup, role: "radiogroup", "aria-label": "Filter by group" }, filterOptions.map((option) => /* @__PURE__ */ import_react9.default.createElement("label", { key: option.value, style: styles2.radioLabel }, /* @__PURE__ */ import_react9.default.createElement(
1795
1931
  "input",
1796
1932
  {
1797
1933
  type: "radio",
@@ -1801,18 +1937,18 @@ function FilterSidebar({
1801
1937
  onChange: () => onFilterChange == null ? void 0 : onFilterChange(option.value),
1802
1938
  style: styles2.radioInput
1803
1939
  }
1804
- ), option.label))))), !isMobile && /* @__PURE__ */ import_react8.default.createElement("div", { style: styles2.imageSection }, locationLabel && /* @__PURE__ */ import_react8.default.createElement("div", { style: styles2.locationLabel }, locationLabel), buildingImageSrc ? /* @__PURE__ */ import_react8.default.createElement(
1940
+ ), option.label))))), !isMobile && /* @__PURE__ */ import_react9.default.createElement("div", { style: styles2.imageSection }, locationLabel && /* @__PURE__ */ import_react9.default.createElement("div", { style: styles2.locationLabel }, locationLabel), buildingImageSrc ? /* @__PURE__ */ import_react9.default.createElement(
1805
1941
  "img",
1806
1942
  {
1807
1943
  src: buildingImageSrc,
1808
1944
  alt: `${selectedFilter} government building`,
1809
1945
  style: styles2.buildingImage
1810
1946
  }
1811
- ) : /* @__PURE__ */ import_react8.default.createElement("div", { style: styles2.buildingPlaceholder }, "No image")));
1947
+ ) : /* @__PURE__ */ import_react9.default.createElement("div", { style: styles2.buildingPlaceholder }, "No image")));
1812
1948
  }
1813
1949
 
1814
1950
  // src/PoliticianCard.jsx
1815
- var import_react9 = __toESM(require("react"));
1951
+ var import_react10 = __toESM(require("react"));
1816
1952
  function PoliticianCard({
1817
1953
  id,
1818
1954
  imageSrc,
@@ -1964,7 +2100,7 @@ function PoliticianCard({
1964
2100
  textTransform: "uppercase"
1965
2101
  }
1966
2102
  };
1967
- const CompassIcon2 = () => /* @__PURE__ */ import_react9.default.createElement(
2103
+ const CompassIcon2 = () => /* @__PURE__ */ import_react10.default.createElement(
1968
2104
  "svg",
1969
2105
  {
1970
2106
  style: styles2.compassIcon,
@@ -1972,7 +2108,7 @@ function PoliticianCard({
1972
2108
  fill: "none",
1973
2109
  xmlns: "http://www.w3.org/2000/svg"
1974
2110
  },
1975
- /* @__PURE__ */ import_react9.default.createElement(
2111
+ /* @__PURE__ */ import_react10.default.createElement(
1976
2112
  "polygon",
1977
2113
  {
1978
2114
  points: "12,1 21.5,6.5 21.5,17.5 12,23 2.5,17.5 2.5,6.5",
@@ -1982,13 +2118,13 @@ function PoliticianCard({
1982
2118
  strokeLinejoin: "round"
1983
2119
  }
1984
2120
  ),
1985
- /* @__PURE__ */ import_react9.default.createElement("line", { x1: "12", y1: "12", x2: "12", y2: "1", stroke: "currentColor", strokeWidth: "1" }),
1986
- /* @__PURE__ */ import_react9.default.createElement("line", { x1: "12", y1: "12", x2: "21.5", y2: "6.5", stroke: "currentColor", strokeWidth: "1" }),
1987
- /* @__PURE__ */ import_react9.default.createElement("line", { x1: "12", y1: "12", x2: "21.5", y2: "17.5", stroke: "currentColor", strokeWidth: "1" }),
1988
- /* @__PURE__ */ import_react9.default.createElement("line", { x1: "12", y1: "12", x2: "12", y2: "23", stroke: "currentColor", strokeWidth: "1" }),
1989
- /* @__PURE__ */ import_react9.default.createElement("line", { x1: "12", y1: "12", x2: "2.5", y2: "17.5", stroke: "currentColor", strokeWidth: "1" }),
1990
- /* @__PURE__ */ import_react9.default.createElement("line", { x1: "12", y1: "12", x2: "2.5", y2: "6.5", stroke: "currentColor", strokeWidth: "1" }),
1991
- /* @__PURE__ */ import_react9.default.createElement(
2121
+ /* @__PURE__ */ import_react10.default.createElement("line", { x1: "12", y1: "12", x2: "12", y2: "1", stroke: "currentColor", strokeWidth: "1" }),
2122
+ /* @__PURE__ */ import_react10.default.createElement("line", { x1: "12", y1: "12", x2: "21.5", y2: "6.5", stroke: "currentColor", strokeWidth: "1" }),
2123
+ /* @__PURE__ */ import_react10.default.createElement("line", { x1: "12", y1: "12", x2: "21.5", y2: "17.5", stroke: "currentColor", strokeWidth: "1" }),
2124
+ /* @__PURE__ */ import_react10.default.createElement("line", { x1: "12", y1: "12", x2: "12", y2: "23", stroke: "currentColor", strokeWidth: "1" }),
2125
+ /* @__PURE__ */ import_react10.default.createElement("line", { x1: "12", y1: "12", x2: "2.5", y2: "17.5", stroke: "currentColor", strokeWidth: "1" }),
2126
+ /* @__PURE__ */ import_react10.default.createElement("line", { x1: "12", y1: "12", x2: "2.5", y2: "6.5", stroke: "currentColor", strokeWidth: "1" }),
2127
+ /* @__PURE__ */ import_react10.default.createElement(
1992
2128
  "polygon",
1993
2129
  {
1994
2130
  points: "12,4 18,7.5 18,16 12,19.5 7,15 5,8",
@@ -1996,7 +2132,7 @@ function PoliticianCard({
1996
2132
  opacity: "0.35"
1997
2133
  }
1998
2134
  ),
1999
- /* @__PURE__ */ import_react9.default.createElement(
2135
+ /* @__PURE__ */ import_react10.default.createElement(
2000
2136
  "polygon",
2001
2137
  {
2002
2138
  points: "12,4 18,7.5 18,16 12,19.5 7,15 5,8",
@@ -2007,8 +2143,8 @@ function PoliticianCard({
2007
2143
  }
2008
2144
  )
2009
2145
  );
2010
- const [imgError, setImgError] = (0, import_react9.useState)(false);
2011
- (0, import_react9.useEffect)(() => {
2146
+ const [imgError, setImgError] = (0, import_react10.useState)(false);
2147
+ (0, import_react10.useEffect)(() => {
2012
2148
  setImgError(false);
2013
2149
  }, [imageSrc]);
2014
2150
  const getInitials = (n) => {
@@ -2017,7 +2153,7 @@ function PoliticianCard({
2017
2153
  const initials = parts.length >= 2 ? parts[0][0] + parts[parts.length - 1][0] : ((_a = parts[0]) == null ? void 0 : _a[0]) || "?";
2018
2154
  return initials.toUpperCase();
2019
2155
  };
2020
- return /* @__PURE__ */ import_react9.default.createElement(
2156
+ return /* @__PURE__ */ import_react10.default.createElement(
2021
2157
  "div",
2022
2158
  {
2023
2159
  style: styles2.card,
@@ -2042,8 +2178,8 @@ function PoliticianCard({
2042
2178
  }
2043
2179
  }
2044
2180
  },
2045
- badge && /* @__PURE__ */ import_react9.default.createElement("span", { style: styles2.badge }, badge),
2046
- /* @__PURE__ */ import_react9.default.createElement("div", { style: styles2.imageWrapper }, imageSrc && !imgError ? /* @__PURE__ */ import_react9.default.createElement(
2181
+ badge && /* @__PURE__ */ import_react10.default.createElement("span", { style: styles2.badge }, badge),
2182
+ /* @__PURE__ */ import_react10.default.createElement("div", { style: styles2.imageWrapper }, imageSrc && !imgError ? /* @__PURE__ */ import_react10.default.createElement(
2047
2183
  "img",
2048
2184
  {
2049
2185
  src: imageSrc,
@@ -2051,9 +2187,9 @@ function PoliticianCard({
2051
2187
  style: styles2.image,
2052
2188
  onError: () => setImgError(true)
2053
2189
  }
2054
- ) : /* @__PURE__ */ import_react9.default.createElement("div", { style: styles2.imagePlaceholder }, getInitials(name))),
2055
- /* @__PURE__ */ import_react9.default.createElement("div", { style: styles2.content }, /* @__PURE__ */ import_react9.default.createElement("h3", { style: styles2.name }, name), /* @__PURE__ */ import_react9.default.createElement("p", { style: styles2.title }, title), subtitle && /* @__PURE__ */ import_react9.default.createElement("p", { style: styles2.subtitle }, subtitle), footer && /* @__PURE__ */ import_react9.default.createElement("div", { style: { marginTop: "auto", marginLeft: "-5px" } }, footer)),
2056
- onCompassClick && /* @__PURE__ */ import_react9.default.createElement(
2190
+ ) : /* @__PURE__ */ import_react10.default.createElement("div", { style: styles2.imagePlaceholder }, getInitials(name))),
2191
+ /* @__PURE__ */ import_react10.default.createElement("div", { style: styles2.content }, /* @__PURE__ */ import_react10.default.createElement("h3", { style: styles2.name }, name), /* @__PURE__ */ import_react10.default.createElement("p", { style: styles2.title }, title), subtitle && /* @__PURE__ */ import_react10.default.createElement("p", { style: styles2.subtitle }, subtitle), footer && /* @__PURE__ */ import_react10.default.createElement("div", { style: { marginTop: "auto", marginLeft: "-5px" } }, footer)),
2192
+ onCompassClick && /* @__PURE__ */ import_react10.default.createElement(
2057
2193
  "button",
2058
2194
  {
2059
2195
  type: "button",
@@ -2068,7 +2204,7 @@ function PoliticianCard({
2068
2204
  },
2069
2205
  "aria-label": `View ${name}'s compass`
2070
2206
  },
2071
- /* @__PURE__ */ import_react9.default.createElement(CompassIcon2, null)
2207
+ /* @__PURE__ */ import_react10.default.createElement(CompassIcon2, null)
2072
2208
  )
2073
2209
  );
2074
2210
  }
@@ -2076,83 +2212,6 @@ function PoliticianCard({
2076
2212
  // src/CompassCardHorizontal.jsx
2077
2213
  var import_react15 = __toESM(require("react"));
2078
2214
 
2079
- // src/PlaceholderRadar.jsx
2080
- var import_react10 = __toESM(require("react"));
2081
- function PlaceholderRadar({ size = 250, name = "" }) {
2082
- const cx = size / 2;
2083
- const cy = size / 2;
2084
- const r = size / 2 * 0.65;
2085
- const n = 8;
2086
- const vertices = Array.from({ length: n }, (_, i) => {
2087
- const a = 2 * Math.PI * i / n;
2088
- return [cx + r * Math.sin(a), cy - r * Math.cos(a)];
2089
- });
2090
- const outerPts = vertices.map(([x, y]) => `${x},${y}`).join(" ");
2091
- const midPts = vertices.map(([x, y]) => `${cx + (x - cx) * 0.6},${cy + (y - cy) * 0.6}`).join(" ");
2092
- const innerPts = vertices.map(([x, y]) => `${cx + (x - cx) * 0.3},${cy + (y - cy) * 0.3}`).join(" ");
2093
- return /* @__PURE__ */ import_react10.default.createElement(
2094
- "svg",
2095
- {
2096
- width: size,
2097
- height: size,
2098
- viewBox: `0 0 ${size} ${size}`,
2099
- role: "img",
2100
- "aria-label": name ? `${name} \u2014 compass data unavailable` : "compass data unavailable",
2101
- style: {
2102
- backgroundColor: colorScales.teal["050"],
2103
- borderRadius: borderRadius.sm,
2104
- flexShrink: 0
2105
- }
2106
- },
2107
- vertices.map(([x, y], i) => /* @__PURE__ */ import_react10.default.createElement(
2108
- "line",
2109
- {
2110
- key: i,
2111
- x1: cx,
2112
- y1: cy,
2113
- x2: x,
2114
- y2: y,
2115
- stroke: colorScales.gray["200"],
2116
- strokeWidth: "1",
2117
- strokeDasharray: "2 3",
2118
- opacity: "0.6"
2119
- }
2120
- )),
2121
- /* @__PURE__ */ import_react10.default.createElement(
2122
- "polygon",
2123
- {
2124
- points: innerPts,
2125
- fill: "none",
2126
- stroke: colorScales.gray["200"],
2127
- strokeWidth: "1",
2128
- strokeDasharray: "2 3",
2129
- opacity: "0.5"
2130
- }
2131
- ),
2132
- /* @__PURE__ */ import_react10.default.createElement(
2133
- "polygon",
2134
- {
2135
- points: midPts,
2136
- fill: "none",
2137
- stroke: colorScales.gray["200"],
2138
- strokeWidth: "1",
2139
- strokeDasharray: "3 3",
2140
- opacity: "0.6"
2141
- }
2142
- ),
2143
- /* @__PURE__ */ import_react10.default.createElement(
2144
- "polygon",
2145
- {
2146
- points: outerPts,
2147
- fill: "none",
2148
- stroke: colorScales.gray["200"],
2149
- strokeWidth: "1.5",
2150
- strokeDasharray: "4 3"
2151
- }
2152
- )
2153
- );
2154
- }
2155
-
2156
2215
  // src/CompassCardHorizontalMeta.jsx
2157
2216
  var import_react14 = __toESM(require("react"));
2158
2217
 
@@ -6239,14 +6298,78 @@ function getDisplayUrl(url) {
6239
6298
  return url.length > 60 ? url.slice(0, 57) + "..." : url;
6240
6299
  }
6241
6300
  }
6301
+ var USER_DOT = "#7C6B9E";
6302
+ var POL_DOT_LIGHT = "#5A9A6E";
6303
+ var POL_DOT_DARK = "#6DD28C";
6304
+ function palette(darkMode) {
6305
+ return darkMode ? {
6306
+ rowBorder: "rgba(255,255,255,0.08)",
6307
+ rowHover: "#1e2a3a",
6308
+ // ev-navy-elevated
6309
+ title: "#f3f4f6",
6310
+ chipLabel: "#d1d5db",
6311
+ sectionLabel: "#9ca3af",
6312
+ // 6.24:1 on #1a2235 ✓ AA
6313
+ reasoning: "#d1d5db",
6314
+ chevron: "#9ca3af",
6315
+ // 6.24:1 — bumped from #6b7280 (3.28) for clarity
6316
+ pillActiveBg: "#1e2a3a",
6317
+ pillActiveBorder: "rgba(255,255,255,0.14)",
6318
+ pillIdleText: "#9ca3af",
6319
+ // 6.24:1 ✓ AA
6320
+ pillActiveText: "#f3f4f6",
6321
+ link: "#59b0c4",
6322
+ // 6.37:1 ✓ AA
6323
+ sourceText: "#9ca3af",
6324
+ quoteText: "#d1d5db",
6325
+ quoteBorder: "rgba(255,255,255,0.14)",
6326
+ emptyText: "#9ca3af",
6327
+ // 6.24:1 — bumped from #6b7280 (3.28, failed AA)
6328
+ spinnerTrack: "#374151",
6329
+ polDot: POL_DOT_DARK,
6330
+ agreedBg: "rgba(14,116,144,0.18)",
6331
+ agreedText: "#67e8f9",
6332
+ disagreedBg: "rgba(180,83,9,0.18)",
6333
+ disagreedText: "#fbbf24"
6334
+ } : {
6335
+ rowBorder: "#f1f1f1",
6336
+ rowHover: "#f9fafb",
6337
+ title: "#262626",
6338
+ chipLabel: "#525252",
6339
+ sectionLabel: "#6b7280",
6340
+ // 4.83:1 on white — bumped from #a3a3a3 (2.52, failed AA)
6341
+ reasoning: "#404040",
6342
+ chevron: "#6b7280",
6343
+ // 4.83:1 — bumped from #a3a3a3 (2.52, failed 3:1)
6344
+ pillActiveBg: "#fafafa",
6345
+ pillActiveBorder: "#e5e5e5",
6346
+ pillIdleText: "#737373",
6347
+ // 4.74:1 ✓ AA
6348
+ pillActiveText: "#171717",
6349
+ link: "#00657c",
6350
+ sourceText: "#737373",
6351
+ quoteText: "#374151",
6352
+ quoteBorder: "#e2e8f0",
6353
+ emptyText: "#6b7280",
6354
+ // 4.83:1 — bumped from #a3a3a3 (2.52, failed AA)
6355
+ spinnerTrack: "#e2e8f0",
6356
+ polDot: POL_DOT_LIGHT,
6357
+ agreedBg: "#ecfeff",
6358
+ agreedText: "#0e7490",
6359
+ disagreedBg: "#fffbeb",
6360
+ disagreedText: "#b45309"
6361
+ };
6362
+ }
6242
6363
  function StanceAccordion({
6243
6364
  topics,
6244
6365
  polAnswers,
6366
+ userAnswerMap = {},
6245
6367
  politicianId,
6246
6368
  allTopics,
6247
6369
  expandedTopics,
6370
+ darkMode = false,
6248
6371
  verdictsByTopic,
6249
- // Record<string, 'agreed' | 'disagreed'> | undefined — DEPRECATED, no longer rendered
6372
+ // DEPRECATED, no longer rendered
6250
6373
  verdictsByQuote,
6251
6374
  // Record<quote_id, 'agreed' | 'disagreed'> | undefined
6252
6375
  initialExpandedTopicId,
@@ -6258,6 +6381,7 @@ function StanceAccordion({
6258
6381
  const [showAll, setShowAll] = (0, import_react35.useState)(false);
6259
6382
  const contextCache = (0, import_react35.useRef)(/* @__PURE__ */ new Map());
6260
6383
  const quotesCache = (0, import_react35.useRef)(null);
6384
+ const c = palette(darkMode);
6261
6385
  const polAnswerMap = {};
6262
6386
  if (polAnswers) {
6263
6387
  polAnswers.forEach((a) => {
@@ -6349,201 +6473,314 @@ function StanceAccordion({
6349
6473
  visibleTopics = [pinned, ...baseTopics.filter((t) => String(t.id) !== String(initialExpandedTopicId))];
6350
6474
  }
6351
6475
  }
6476
+ const sectionLabelStyle = {
6477
+ fontSize: "11px",
6478
+ fontWeight: 600,
6479
+ color: c.sectionLabel,
6480
+ textTransform: "uppercase",
6481
+ letterSpacing: "0.06em"
6482
+ };
6352
6483
  return /* @__PURE__ */ import_react35.default.createElement(
6353
6484
  "div",
6354
6485
  {
6355
- className: "flex flex-col",
6486
+ className: "ev-stance-panel flex flex-col",
6356
6487
  style: { fontFamily: "'Manrope', sans-serif" }
6357
6488
  },
6358
- /* @__PURE__ */ import_react35.default.createElement(
6359
- "h3",
6360
- {
6361
- className: "text-sm font-semibold text-neutral-400 uppercase tracking-wider mb-2",
6362
- style: { fontSize: "12px" }
6363
- },
6364
- "Stance Breakdown"
6365
- ),
6489
+ /* @__PURE__ */ import_react35.default.createElement("h3", { style: { ...sectionLabelStyle, marginBottom: "8px" } }, "Stance Breakdown"),
6366
6490
  visibleTopics.map((topic) => {
6367
6491
  const topicId = String(topic.id);
6368
- const value = polAnswerMap[topicId];
6369
- const label = getStanceLabel(topicId, value);
6492
+ const polValue = polAnswerMap[topicId];
6493
+ const userValue = userAnswerMap[topicId];
6494
+ const label = getStanceLabel(topicId, polValue);
6370
6495
  const isExpanded = expandedTopicId === topicId;
6371
6496
  const isLoading = loadingId === topicId;
6372
6497
  const cached = contextCache.current.get(topicId);
6373
6498
  const fullTopic = topicById[topicId];
6374
6499
  const questionText = fullTopic == null ? void 0 : fullTopic.question_text;
6500
+ const titleText = questionText || topic.short_title;
6501
+ const stances = (fullTopic == null ? void 0 : fullTopic.stances) || topic.stances || [];
6375
6502
  const topicQuotes = quotesCache.current ? quotesCache.current.filter((q) => {
6376
6503
  if (!q.issue) return false;
6377
6504
  if (q.candidateId && q.candidateId !== politicianId) return false;
6378
6505
  if (topic.topic_key) return q.issue === topic.topic_key;
6379
6506
  return topic.short_title && q.issue.toLowerCase() === topic.short_title.toLowerCase();
6380
6507
  }) : [];
6381
- return /* @__PURE__ */ import_react35.default.createElement("div", { key: topicId, className: "border-b border-neutral-100" }, /* @__PURE__ */ import_react35.default.createElement(
6382
- "button",
6508
+ return /* @__PURE__ */ import_react35.default.createElement(
6509
+ "div",
6383
6510
  {
6384
- type: "button",
6385
- onClick: () => handleToggle(topicId),
6386
- className: "w-full flex items-center justify-between py-3 px-2 text-left cursor-pointer hover:bg-neutral-50 transition-colors"
6511
+ key: topicId,
6512
+ style: { borderBottom: `1px solid ${c.rowBorder}` }
6387
6513
  },
6388
- /* @__PURE__ */ import_react35.default.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ import_react35.default.createElement("span", { className: "text-sm font-medium text-neutral-800 truncate" }, topic.short_title), questionText && /* @__PURE__ */ import_react35.default.createElement("span", { className: "text-xs text-neutral-400 mt-0.5" }, questionText), /* @__PURE__ */ import_react35.default.createElement("span", { className: "text-xs text-neutral-500 mt-0.5" }, label)),
6389
6514
  /* @__PURE__ */ import_react35.default.createElement(
6390
- "svg",
6515
+ "button",
6391
6516
  {
6392
- width: "16",
6393
- height: "16",
6394
- viewBox: "0 0 24 24",
6395
- fill: "none",
6396
- stroke: "currentColor",
6397
- strokeWidth: "2",
6398
- strokeLinecap: "round",
6399
- strokeLinejoin: "round",
6400
- className: "text-neutral-400 flex-shrink-0 ml-2",
6517
+ type: "button",
6518
+ onClick: () => handleToggle(topicId),
6519
+ className: "w-full flex items-start justify-between text-left cursor-pointer",
6401
6520
  style: {
6402
- transform: isExpanded ? "rotate(90deg)" : "rotate(0deg)",
6403
- transition: "transform 0.2s ease"
6521
+ padding: "12px 8px",
6522
+ background: "transparent",
6523
+ border: "none",
6524
+ transition: "background 0.15s ease",
6525
+ borderRadius: "8px"
6526
+ },
6527
+ onMouseEnter: (e) => {
6528
+ e.currentTarget.style.background = c.rowHover;
6529
+ },
6530
+ onMouseLeave: (e) => {
6531
+ e.currentTarget.style.background = "transparent";
6404
6532
  }
6405
6533
  },
6406
- /* @__PURE__ */ import_react35.default.createElement("polyline", { points: "9 18 15 12 9 6" })
6407
- )
6408
- ), /* @__PURE__ */ import_react35.default.createElement(
6409
- "div",
6410
- {
6411
- style: {
6412
- display: "grid",
6413
- gridTemplateRows: isExpanded ? "1fr" : "0fr",
6414
- transition: "grid-template-rows 0.25s ease"
6415
- }
6416
- },
6417
- /* @__PURE__ */ import_react35.default.createElement("div", { style: { overflow: "hidden" } }, /* @__PURE__ */ import_react35.default.createElement("div", { className: "px-2 pb-4" }, isLoading && /* @__PURE__ */ import_react35.default.createElement("div", { className: "flex items-center py-3" }, /* @__PURE__ */ import_react35.default.createElement(
6418
- "div",
6419
- {
6420
- style: {
6421
- width: "20px",
6422
- height: "20px",
6423
- border: "2px solid #e2e8f0",
6424
- borderTopColor: "#00657c",
6425
- borderRadius: "50%",
6426
- animation: "ev-spin 0.8s linear infinite"
6534
+ /* @__PURE__ */ import_react35.default.createElement("div", { className: "flex flex-col min-w-0", style: { gap: "5px" } }, /* @__PURE__ */ import_react35.default.createElement(
6535
+ "span",
6536
+ {
6537
+ style: {
6538
+ fontSize: "14px",
6539
+ fontWeight: 600,
6540
+ color: c.title,
6541
+ lineHeight: 1.4
6542
+ }
6543
+ },
6544
+ titleText
6545
+ ), /* @__PURE__ */ import_react35.default.createElement("span", { style: { display: "flex", alignItems: "flex-start", gap: "8px" } }, /* @__PURE__ */ import_react35.default.createElement(
6546
+ "span",
6547
+ {
6548
+ style: {
6549
+ width: "8px",
6550
+ height: "8px",
6551
+ borderRadius: "50%",
6552
+ backgroundColor: c.polDot,
6553
+ flexShrink: 0,
6554
+ marginTop: "6px"
6555
+ }
6427
6556
  }
6428
- }
6429
- )), !isLoading && cached && /* @__PURE__ */ import_react35.default.createElement(import_react35.default.Fragment, null, cached.reasoning ? /* @__PURE__ */ import_react35.default.createElement(
6430
- "p",
6431
- {
6432
- className: "text-sm text-neutral-700 mb-3",
6433
- style: { whiteSpace: "pre-wrap", lineHeight: 1.6 }
6434
- },
6435
- cached.reasoning
6436
- ) : null, cached.sources && cached.sources.length > 0 && /* @__PURE__ */ import_react35.default.createElement("div", { className: "mt-2" }, /* @__PURE__ */ import_react35.default.createElement("p", { className: "text-xs font-semibold text-neutral-500 uppercase tracking-wider mb-1.5" }, "References"), /* @__PURE__ */ import_react35.default.createElement("ol", { className: "list-decimal list-inside space-y-1" }, cached.sources.map((src, i) => /* @__PURE__ */ import_react35.default.createElement("li", { key: i, className: "text-xs text-neutral-600" }, /* @__PURE__ */ import_react35.default.createElement(
6437
- "a",
6438
- {
6439
- href: src,
6440
- target: "_blank",
6441
- rel: "noreferrer",
6442
- className: "inline-flex items-center gap-1.5 hover:text-[#00657c] transition-colors"
6443
- },
6444
- /* @__PURE__ */ import_react35.default.createElement(Favicon, { url: src }),
6445
- /* @__PURE__ */ import_react35.default.createElement("span", { className: "underline underline-offset-2" }, getDisplayUrl(src))
6446
- ))))), topicQuotes.length > 0 && /* @__PURE__ */ import_react35.default.createElement("div", { style: { marginTop: "12px" } }, /* @__PURE__ */ import_react35.default.createElement(
6447
- "p",
6557
+ ), /* @__PURE__ */ import_react35.default.createElement(
6558
+ "span",
6559
+ {
6560
+ style: {
6561
+ fontSize: "13px",
6562
+ color: c.chipLabel,
6563
+ lineHeight: 1.45
6564
+ }
6565
+ },
6566
+ label
6567
+ ))),
6568
+ /* @__PURE__ */ import_react35.default.createElement(
6569
+ "svg",
6570
+ {
6571
+ width: "16",
6572
+ height: "16",
6573
+ viewBox: "0 0 24 24",
6574
+ fill: "none",
6575
+ stroke: c.chevron,
6576
+ strokeWidth: "2",
6577
+ strokeLinecap: "round",
6578
+ strokeLinejoin: "round",
6579
+ className: "flex-shrink-0 ml-2",
6580
+ style: {
6581
+ marginTop: "3px",
6582
+ transform: isExpanded ? "rotate(90deg)" : "rotate(0deg)",
6583
+ transition: "transform 0.2s ease"
6584
+ }
6585
+ },
6586
+ /* @__PURE__ */ import_react35.default.createElement("polyline", { points: "9 18 15 12 9 6" })
6587
+ )
6588
+ ),
6589
+ /* @__PURE__ */ import_react35.default.createElement(
6590
+ "div",
6448
6591
  {
6449
6592
  style: {
6450
- fontSize: "11px",
6451
- fontWeight: 600,
6452
- color: "#737373",
6453
- textTransform: "uppercase",
6454
- letterSpacing: "0.05em",
6455
- marginBottom: "8px"
6593
+ display: "grid",
6594
+ gridTemplateRows: isExpanded ? "1fr" : "0fr",
6595
+ transition: "grid-template-rows 0.25s ease"
6456
6596
  }
6457
6597
  },
6458
- "Quotes"
6459
- ), topicQuotes.map((quote) => {
6460
- const verdict = verdictsByQuote ? verdictsByQuote[quote.id] : void 0;
6461
- const borderColor = verdict === "agreed" ? "#0e7490" : verdict === "disagreed" ? "#b45309" : "#e2e8f0";
6462
- const sourceName = quote.source_name || quote.sourceName;
6463
- return /* @__PURE__ */ import_react35.default.createElement(
6598
+ /* @__PURE__ */ import_react35.default.createElement("div", { style: { overflow: "hidden" } }, /* @__PURE__ */ import_react35.default.createElement("div", { style: { padding: "4px 8px 16px" } }, stances.length > 0 && /* @__PURE__ */ import_react35.default.createElement(import_react35.default.Fragment, null, (userValue > 0 || polValue > 0) && /* @__PURE__ */ import_react35.default.createElement(
6464
6599
  "div",
6465
6600
  {
6466
- key: quote.id,
6467
6601
  style: {
6468
- borderLeft: `3px solid ${borderColor}`,
6469
- paddingLeft: "10px",
6470
- paddingTop: "6px",
6471
- paddingBottom: "6px",
6472
- marginBottom: "8px"
6602
+ display: "flex",
6603
+ alignItems: "center",
6604
+ gap: "14px",
6605
+ marginBottom: "8px",
6606
+ fontSize: "12px",
6607
+ color: c.sourceText
6473
6608
  }
6474
6609
  },
6475
- /* @__PURE__ */ import_react35.default.createElement(
6476
- "p",
6610
+ userValue > 0 && /* @__PURE__ */ import_react35.default.createElement("span", { style: { display: "inline-flex", alignItems: "center", gap: "6px" } }, /* @__PURE__ */ import_react35.default.createElement("span", { style: { width: "9px", height: "9px", borderRadius: "50%", backgroundColor: USER_DOT } }), "You"),
6611
+ /* @__PURE__ */ import_react35.default.createElement("span", { style: { display: "inline-flex", alignItems: "center", gap: "6px" } }, /* @__PURE__ */ import_react35.default.createElement("span", { style: { width: "9px", height: "9px", borderRadius: "50%", backgroundColor: c.polDot } }), "Their stance")
6612
+ ), /* @__PURE__ */ import_react35.default.createElement("div", { style: { display: "flex", flexDirection: "column", gap: "6px", marginBottom: "14px" } }, stances.map((stance, i) => {
6613
+ const stanceNum = i + 1;
6614
+ const isUser = userValue === stanceNum;
6615
+ const isPol = polValue === stanceNum;
6616
+ const isActive = isUser || isPol;
6617
+ return /* @__PURE__ */ import_react35.default.createElement(
6618
+ "div",
6477
6619
  {
6620
+ key: i,
6478
6621
  style: {
6622
+ display: "flex",
6623
+ alignItems: "flex-start",
6624
+ gap: "10px",
6625
+ padding: "10px 12px",
6626
+ borderRadius: "12px",
6479
6627
  fontSize: "13px",
6480
- fontStyle: "italic",
6481
- color: "#374151",
6482
- margin: 0,
6483
- lineHeight: 1.5
6484
- }
6485
- },
6486
- quote.text
6487
- ),
6488
- verdict === "agreed" && /* @__PURE__ */ import_react35.default.createElement(
6489
- "span",
6490
- {
6491
- style: {
6492
- display: "inline-flex",
6493
- alignItems: "center",
6494
- gap: "4px",
6495
- backgroundColor: "#ecfeff",
6496
- color: "#0e7490",
6497
- padding: "2px 8px",
6498
- borderRadius: "9999px",
6499
- fontSize: "11px",
6500
- fontWeight: 500,
6501
- marginTop: "4px",
6502
- flexShrink: 0
6503
- }
6504
- },
6505
- /* @__PURE__ */ import_react35.default.createElement("svg", { width: "11", height: "11", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react35.default.createElement("path", { d: "M5 13l4 4L19 7" })),
6506
- "Agreed"
6507
- ),
6508
- verdict === "disagreed" && /* @__PURE__ */ import_react35.default.createElement(
6509
- "span",
6510
- {
6511
- style: {
6512
- display: "inline-flex",
6513
- alignItems: "center",
6514
- gap: "4px",
6515
- backgroundColor: "#fffbeb",
6516
- color: "#b45309",
6517
- padding: "2px 8px",
6518
- borderRadius: "9999px",
6519
- fontSize: "11px",
6520
- fontWeight: 500,
6521
- marginTop: "4px",
6522
- flexShrink: 0
6628
+ lineHeight: 1.4,
6629
+ border: `1px solid ${isActive ? c.pillActiveBorder : "transparent"}`,
6630
+ backgroundColor: isActive ? c.pillActiveBg : "transparent"
6523
6631
  }
6524
6632
  },
6525
- /* @__PURE__ */ import_react35.default.createElement("svg", { width: "11", height: "11", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react35.default.createElement("path", { d: "M6 18L18 6M6 6l12 12" })),
6526
- "Disagreed"
6527
- ),
6528
- sourceName && /* @__PURE__ */ import_react35.default.createElement(
6529
- "a",
6633
+ /* @__PURE__ */ import_react35.default.createElement(
6634
+ "span",
6635
+ {
6636
+ style: {
6637
+ flexShrink: 0,
6638
+ width: "30px",
6639
+ display: "flex",
6640
+ alignItems: "center",
6641
+ gap: "5px",
6642
+ paddingTop: "3px"
6643
+ }
6644
+ },
6645
+ isUser && /* @__PURE__ */ import_react35.default.createElement("span", { style: { width: "9px", height: "9px", borderRadius: "50%", backgroundColor: USER_DOT, boxShadow: `0 0 0 3px ${USER_DOT}33` } }),
6646
+ isPol && /* @__PURE__ */ import_react35.default.createElement("span", { style: { width: "9px", height: "9px", borderRadius: "50%", backgroundColor: c.polDot, boxShadow: `0 0 0 3px ${c.polDot}33` } })
6647
+ ),
6648
+ /* @__PURE__ */ import_react35.default.createElement(
6649
+ "span",
6650
+ {
6651
+ style: {
6652
+ flex: 1,
6653
+ color: isActive ? c.pillActiveText : c.pillIdleText,
6654
+ fontWeight: isActive ? 500 : 400
6655
+ }
6656
+ },
6657
+ stance.text
6658
+ )
6659
+ );
6660
+ }))), isLoading && /* @__PURE__ */ import_react35.default.createElement("div", { className: "flex items-center", style: { padding: "12px 0" } }, /* @__PURE__ */ import_react35.default.createElement(
6661
+ "div",
6662
+ {
6663
+ style: {
6664
+ width: "20px",
6665
+ height: "20px",
6666
+ border: `2px solid ${c.spinnerTrack}`,
6667
+ borderTopColor: "#00657c",
6668
+ borderRadius: "50%",
6669
+ animation: "ev-spin 0.8s linear infinite"
6670
+ }
6671
+ }
6672
+ )), !isLoading && cached && /* @__PURE__ */ import_react35.default.createElement(import_react35.default.Fragment, null, cached.reasoning ? /* @__PURE__ */ import_react35.default.createElement(
6673
+ "p",
6674
+ {
6675
+ style: {
6676
+ fontSize: "14px",
6677
+ color: c.reasoning,
6678
+ marginBottom: "12px",
6679
+ whiteSpace: "pre-wrap",
6680
+ lineHeight: 1.6
6681
+ }
6682
+ },
6683
+ cached.reasoning
6684
+ ) : null, cached.sources && cached.sources.length > 0 && /* @__PURE__ */ import_react35.default.createElement("div", { style: { marginTop: "8px" } }, /* @__PURE__ */ import_react35.default.createElement("p", { style: { ...sectionLabelStyle, marginBottom: "6px" } }, "References"), /* @__PURE__ */ import_react35.default.createElement("ol", { style: { listStyle: "decimal", listStylePosition: "inside", display: "flex", flexDirection: "column", gap: "4px" } }, cached.sources.map((src, i) => /* @__PURE__ */ import_react35.default.createElement("li", { key: i, style: { fontSize: "12px", color: c.sourceText } }, /* @__PURE__ */ import_react35.default.createElement(
6685
+ "a",
6686
+ {
6687
+ href: src,
6688
+ target: "_blank",
6689
+ rel: "noreferrer",
6690
+ className: "inline-flex items-center gap-1.5",
6691
+ style: { color: c.link }
6692
+ },
6693
+ /* @__PURE__ */ import_react35.default.createElement(Favicon, { url: src }),
6694
+ /* @__PURE__ */ import_react35.default.createElement("span", { style: { textDecoration: "underline", textUnderlineOffset: "2px" } }, getDisplayUrl(src))
6695
+ ))))), topicQuotes.length > 0 && /* @__PURE__ */ import_react35.default.createElement("div", { style: { marginTop: "14px" } }, /* @__PURE__ */ import_react35.default.createElement("p", { style: { ...sectionLabelStyle, marginBottom: "8px" } }, "Quotes"), topicQuotes.map((quote) => {
6696
+ const verdict = verdictsByQuote ? verdictsByQuote[quote.id] : void 0;
6697
+ const borderColor = verdict === "agreed" ? c.agreedText : verdict === "disagreed" ? c.disagreedText : c.quoteBorder;
6698
+ const sourceName = quote.source_name || quote.sourceName;
6699
+ return /* @__PURE__ */ import_react35.default.createElement(
6700
+ "div",
6530
6701
  {
6531
- href: quote.source_url || quote.sourceUrl,
6532
- target: "_blank",
6533
- rel: "noreferrer",
6702
+ key: quote.id,
6534
6703
  style: {
6535
- display: "block",
6536
- fontSize: "11px",
6537
- color: "#00657c",
6538
- marginTop: "3px",
6539
- textDecoration: "none"
6704
+ borderLeft: `3px solid ${borderColor}`,
6705
+ paddingLeft: "10px",
6706
+ paddingTop: "6px",
6707
+ paddingBottom: "6px",
6708
+ marginBottom: "8px"
6540
6709
  }
6541
6710
  },
6542
- sourceName
6543
- )
6544
- );
6545
- })), !cached.reasoning && (!cached.sources || cached.sources.length === 0) && topicQuotes.length === 0 && /* @__PURE__ */ import_react35.default.createElement("p", { className: "text-sm text-neutral-400 italic py-2" }, "No detailed reasoning available for this topic."))))
6546
- ));
6711
+ /* @__PURE__ */ import_react35.default.createElement(
6712
+ "p",
6713
+ {
6714
+ style: {
6715
+ fontSize: "13px",
6716
+ fontStyle: "italic",
6717
+ color: c.quoteText,
6718
+ margin: 0,
6719
+ lineHeight: 1.5
6720
+ }
6721
+ },
6722
+ quote.text
6723
+ ),
6724
+ verdict === "agreed" && /* @__PURE__ */ import_react35.default.createElement(
6725
+ "span",
6726
+ {
6727
+ style: {
6728
+ display: "inline-flex",
6729
+ alignItems: "center",
6730
+ gap: "4px",
6731
+ backgroundColor: c.agreedBg,
6732
+ color: c.agreedText,
6733
+ padding: "2px 8px",
6734
+ borderRadius: "9999px",
6735
+ fontSize: "11px",
6736
+ fontWeight: 500,
6737
+ marginTop: "4px",
6738
+ flexShrink: 0
6739
+ }
6740
+ },
6741
+ /* @__PURE__ */ import_react35.default.createElement("svg", { width: "11", height: "11", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react35.default.createElement("path", { d: "M5 13l4 4L19 7" })),
6742
+ "Agreed"
6743
+ ),
6744
+ verdict === "disagreed" && /* @__PURE__ */ import_react35.default.createElement(
6745
+ "span",
6746
+ {
6747
+ style: {
6748
+ display: "inline-flex",
6749
+ alignItems: "center",
6750
+ gap: "4px",
6751
+ backgroundColor: c.disagreedBg,
6752
+ color: c.disagreedText,
6753
+ padding: "2px 8px",
6754
+ borderRadius: "9999px",
6755
+ fontSize: "11px",
6756
+ fontWeight: 500,
6757
+ marginTop: "4px",
6758
+ flexShrink: 0
6759
+ }
6760
+ },
6761
+ /* @__PURE__ */ import_react35.default.createElement("svg", { width: "11", height: "11", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ import_react35.default.createElement("path", { d: "M6 18L18 6M6 6l12 12" })),
6762
+ "Disagreed"
6763
+ ),
6764
+ sourceName && /* @__PURE__ */ import_react35.default.createElement(
6765
+ "a",
6766
+ {
6767
+ href: quote.source_url || quote.sourceUrl,
6768
+ target: "_blank",
6769
+ rel: "noreferrer",
6770
+ style: {
6771
+ display: "block",
6772
+ fontSize: "11px",
6773
+ color: c.link,
6774
+ marginTop: "3px",
6775
+ textDecoration: "none"
6776
+ }
6777
+ },
6778
+ sourceName
6779
+ )
6780
+ );
6781
+ })), !cached.reasoning && (!cached.sources || cached.sources.length === 0) && topicQuotes.length === 0 && /* @__PURE__ */ import_react35.default.createElement("p", { style: { fontSize: "14px", color: c.emptyText, fontStyle: "italic", padding: "8px 0" } }, "No detailed reasoning available for this topic."))))
6782
+ )
6783
+ );
6547
6784
  }),
6548
6785
  hasToggle && /* @__PURE__ */ import_react35.default.createElement(
6549
6786
  "button",
@@ -6551,7 +6788,7 @@ function StanceAccordion({
6551
6788
  type: "button",
6552
6789
  onClick: () => setShowAll((v) => !v),
6553
6790
  className: "text-sm font-medium mt-2 px-2 py-1 self-start cursor-pointer hover:underline",
6554
- style: { color: "#00657c" }
6791
+ style: { color: c.link }
6555
6792
  },
6556
6793
  showAll ? "Show fewer" : `Show all ${expandedTopics.length} topics`
6557
6794
  )
@@ -6580,6 +6817,7 @@ function StanceAccordion({
6580
6817
  JudicialScorecard,
6581
6818
  LegislativeInlineSummary,
6582
6819
  LegislativeRecord,
6820
+ PlaceholderRadar,
6583
6821
  PoliticianCard,
6584
6822
  PoliticianProfile,
6585
6823
  RadarChartCore,
@@ -6599,6 +6837,7 @@ function StanceAccordion({
6599
6837
  defaultNavItems,
6600
6838
  duration,
6601
6839
  easing,
6840
+ evAppLinks,
6602
6841
  evContext,
6603
6842
  focus,
6604
6843
  fontSizes,