Spaces:
Running
Running
File size: 8,173 Bytes
d465270 6ef61b6 d465270 6ef61b6 d465270 a692682 d465270 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 | /* css/styles.css — layout + colour tokens.
*
* Contrast targets (WCAG AA, 4.5:1):
* --fg #1a1f2c on --bg #fafbfc → 14.5:1
* --fg-muted #4a5063 on --bg → 7.4:1
* --accent #2456c9 on --bg → 6.8:1
*/
* { box-sizing: border-box; }
:root {
--bg: #fafbfc;
--bg-elev: #ffffff;
--fg: #1a1f2c;
--fg-muted: #4a5063;
--border: #d6dae3;
--accent: #2456c9;
--accent-fg: #ffffff;
--chip-bg: #eef0f5;
--chip-on-bg: #d8e2f7;
--chip-on-fg: #102a66;
--shadow: 0 1px 2px rgba(20, 25, 40, 0.06), 0 4px 12px rgba(20, 25, 40, 0.04);
--radius: 10px;
--radius-sm: 6px;
--gap: 12px;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #11141b;
--bg-elev: #1a1e28;
--fg: #f0f2f6;
--fg-muted: #b5bcc9;
--border: #2c3140;
--accent: #6f9bff;
--accent-fg: #0b1224;
--chip-bg: #232838;
--chip-on-bg: #2c4a8a;
--chip-on-fg: #e0e9ff;
}
}
html, body {
margin: 0;
padding: 0;
background: var(--bg);
color: var(--fg);
font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
font-size: 15px;
line-height: 1.45;
-webkit-font-smoothing: antialiased;
}
main {
max-width: 1100px;
margin: 0 auto;
padding: 24px 20px 80px;
}
header {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: var(--gap);
margin-bottom: 18px;
flex-wrap: wrap;
}
header h1 {
margin: 0;
font-size: 22px;
font-weight: 600;
letter-spacing: -0.01em;
}
#engine-label {
font-size: 13px;
color: var(--fg-muted);
}
.search-row {
display: flex;
gap: var(--gap);
margin-bottom: 14px;
flex-wrap: wrap;
}
#query {
flex: 1 1 360px;
min-width: 0;
font: inherit;
padding: 11px 14px;
border: 1px solid var(--border);
background: var(--bg-elev);
color: var(--fg);
border-radius: var(--radius);
box-shadow: var(--shadow);
}
#query:focus {
outline: 2px solid var(--accent);
outline-offset: 1px;
border-color: transparent;
}
#query:disabled {
opacity: 0.6;
cursor: progress;
}
#topk, #model-select {
font: inherit;
padding: 11px 14px;
border: 1px solid var(--border);
background: var(--bg-elev);
color: var(--fg);
border-radius: var(--radius);
cursor: pointer;
}
#topk:focus, #model-select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
#model-select { flex: 1 1 260px; min-width: 0; }
#model-select option:disabled { color: var(--fg-muted); }
#quality-panel {
background: var(--bg-elev);
border: 1px solid var(--border);
border-radius: var(--radius);
margin-bottom: 16px;
box-shadow: var(--shadow);
}
#quality-panel > summary {
cursor: pointer;
padding: 12px 16px;
font-weight: 600;
font-size: 14px;
user-select: none;
list-style: none;
}
#quality-panel > summary::-webkit-details-marker { display: none; }
#quality-panel > summary::before {
content: "▸ ";
font-size: 11px;
color: var(--fg-muted);
transition: transform 120ms ease;
display: inline-block;
}
#quality-panel[open] > summary::before { transform: rotate(90deg); }
.quality-body { padding: 0 16px 16px; }
#model-blurb {
font-size: 13px;
color: var(--fg-muted);
margin: 0 0 14px;
line-height: 1.55;
}
.quality-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
gap: 10px;
margin-bottom: 14px;
}
.quality-card {
border: 1px solid var(--border);
border-radius: var(--radius-sm);
padding: 10px 12px;
background: var(--bg);
}
.quality-card-label {
font-size: 11px;
text-transform: uppercase;
letter-spacing: 0.04em;
color: var(--fg-muted);
font-weight: 600;
}
.quality-card-value {
font-size: 20px;
font-weight: 600;
font-variant-numeric: tabular-nums;
margin: 2px 0 1px;
color: var(--accent);
}
.quality-card-sub {
font-size: 11px;
color: var(--fg-muted);
line-height: 1.4;
}
.leaderboard-details > summary {
cursor: pointer;
font-size: 12px;
color: var(--fg-muted);
padding: 6px 0;
list-style: none;
user-select: none;
}
.leaderboard-details > summary::-webkit-details-marker { display: none; }
.leaderboard-details > summary::before {
content: "▸ ";
font-size: 10px;
display: inline-block;
transition: transform 120ms ease;
}
.leaderboard-details[open] > summary::before { transform: rotate(90deg); }
table.leaderboard {
width: 100%;
border-collapse: collapse;
font-size: 12px;
margin: 8px 0;
}
table.leaderboard th, table.leaderboard td {
text-align: left;
padding: 6px 8px;
border-bottom: 1px solid var(--border);
font-variant-numeric: tabular-nums;
}
table.leaderboard th { color: var(--fg-muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.03em; }
table.leaderboard td:nth-child(3), table.leaderboard td:nth-child(4),
table.leaderboard th:nth-child(3), table.leaderboard th:nth-child(4) { text-align: right; width: 80px; }
table.leaderboard tr.active { background: var(--chip-on-bg); color: var(--chip-on-fg); font-weight: 500; }
.leaderboard-foot {
font-size: 11px;
color: var(--fg-muted);
margin: 8px 0 0;
}
.leaderboard-foot a { color: var(--accent); text-decoration: none; }
.leaderboard-foot a:hover { text-decoration: underline; }
#libraries {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-bottom: 14px;
}
.chip {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 6px 11px;
background: var(--chip-bg);
color: var(--fg);
border-radius: 999px;
cursor: pointer;
user-select: none;
font-size: 13px;
border: 1px solid transparent;
transition: background 80ms ease, border-color 80ms ease;
}
.chip:hover { border-color: var(--border); }
.chip input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:checked) {
background: var(--chip-on-bg);
color: var(--chip-on-fg);
}
.chip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip-count { color: var(--fg-muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.chip:has(input:checked) .chip-count { color: inherit; opacity: 0.8; }
.chip-disabled {
opacity: 0.4;
pointer-events: none;
cursor: not-allowed;
}
#status-row {
display: flex;
justify-content: space-between;
align-items: center;
gap: var(--gap);
margin-bottom: 14px;
min-height: 20px;
}
#status { color: var(--fg-muted); font-size: 13px; }
#status.error { color: #c01717; }
@media (prefers-color-scheme: dark) {
#status.error { color: #ff8a8a; }
}
#progress {
width: 100%;
height: 4px;
background: var(--chip-bg);
border-radius: 999px;
overflow: hidden;
margin-bottom: 14px;
}
#progress-bar {
height: 100%;
width: 0%;
background: var(--accent);
transition: width 120ms ease;
}
#empty-state {
padding: 40px 0;
text-align: center;
color: var(--fg-muted);
font-size: 14px;
}
#results {
list-style: none;
margin: 0;
padding: 0;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
gap: 12px;
}
.result {
background: var(--bg-elev);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 14px;
display: flex;
flex-direction: column;
gap: 10px;
box-shadow: var(--shadow);
transition: transform 80ms ease, border-color 80ms ease;
}
.result:focus, .result:hover {
border-color: var(--accent);
outline: none;
transform: translateY(-1px);
}
.result-svg {
display: flex;
align-items: center;
justify-content: center;
height: 64px;
color: var(--fg);
}
.result-svg svg { width: 40px; height: 40px; }
.result-name {
font-weight: 500;
font-size: 14px;
word-break: break-word;
}
.result-row {
display: flex;
justify-content: space-between;
font-size: 12px;
color: var(--fg-muted);
font-variant-numeric: tabular-nums;
}
.result-lib { font-weight: 500; }
.result-score { color: var(--accent); }
footer {
margin-top: 60px;
padding-top: 20px;
border-top: 1px solid var(--border);
color: var(--fg-muted);
font-size: 12px;
display: flex;
flex-wrap: wrap;
gap: 12px;
justify-content: space-between;
}
footer a { color: var(--accent); text-decoration: none; }
footer a:hover, footer a:focus { text-decoration: underline; }
|