Spaces:
Running on Zero
Running on Zero
File size: 32,082 Bytes
4019a80 face158 4019a80 face158 559bb4c face158 0798069 face158 0798069 face158 0798069 face158 4019a80 face158 4019a80 face158 4019a80 face158 0798069 face158 559bb4c face158 47ed5dd face158 47ed5dd face158 e863a67 face158 281cd85 face158 1ed61a1 face158 1ed61a1 face158 1ed61a1 face158 1ed61a1 face158 281cd85 face158 56d75f0 4019a80 0798069 | 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 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 | /* OUROBOROS Kernel Mint design system
Apple-minimal: SF system type, one emerald accent on layered near-black, hairlines,
restrained motion. No emoji, no em-dashes, one accent, one radius scale. */
:root {
--bg: #0b0c0e;
--surface: #131519;
--surface-2: #181b20;
--surface-3: #1e2227;
--line: rgba(255,255,255,0.07);
--line-2: rgba(255,255,255,0.12);
--text: #f4f6f7;
--muted: #aab1bb;
--faint: #828892;
--accent: #34e0a1;
--accent-deep: #10b981;
--accent-ink: #052b1e;
--accent-soft: rgba(52,224,161,0.12);
--accent-line: rgba(52,224,161,0.32);
--danger: #ff7a7a;
--danger-soft: rgba(255,122,122,0.10);
--amber: #f1c47a;
--r: 14px;
--r-sm: 10px;
--r-pill: 980px;
--sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", system-ui, sans-serif;
--mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
--ease: cubic-bezier(0.16, 1, 0.3, 1);
--shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 12px 40px rgba(0,0,0,0.42);
--shadow-sm: 0 1px 0 rgba(255,255,255,0.04) inset, 0 4px 16px rgba(0,0,0,0.30);
}
/* Gradio host: let our surface own the page */
.gradio-container, .gradio-container * { font-family: var(--sans); }
.gradio-container { max-width: 100% !important; padding: 0 !important; background: var(--bg) !important; }
gradio-app { background: var(--bg); }
footer, .footer, #footer { display: none !important; }
/* The page background is forced dark above, so force gradio's TEXT tokens light too. Otherwise a
visitor whose browser/system is in LIGHT mode gets gradio's dark default text on our dark
background (the verdict card renders dark-on-dark, unreadable). This makes text readable in BOTH
modes, since the app only ever uses its own dark palette. */
.gradio-container, gradio-app {
--body-text-color: var(--text);
--body-text-color-subdued: var(--muted);
--block-title-text-color: var(--text);
--block-label-text-color: var(--muted);
color: var(--text);
}
#km-verdict, #km-app, .km-card { color: var(--text); }
/* hide the python bridge components but keep them in the DOM */
#km_recipe, #km_result, #km_lb, #km_go, #km_lb_btn { position: absolute !important; width: 1px; height: 1px;
overflow: hidden; clip: rect(0 0 0 0); opacity: 0; pointer-events: none; }
#km {
--pad: clamp(16px, 4vw, 48px);
color: var(--text); background: var(--bg);
font: 15px/1.55 var(--sans); letter-spacing: -0.01em;
max-width: 1280px; margin: 0 auto; padding: 0 var(--pad) 64px;
-webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
#km *, #km *::before, #km *::after { box-sizing: border-box; }
#km h1, #km h2, #km h3 { margin: 0; font-weight: 600; letter-spacing: -0.025em; }
#km p { margin: 0; }
#km code, #km .mono, #km .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
/* ---------- top bar ---------- */
#km-top {
display: flex; align-items: center; justify-content: space-between; gap: 20px;
padding: 22px 0 18px; flex-wrap: wrap;
}
#km-brand { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
#km-brand .mark {
font-size: 19px; font-weight: 600; letter-spacing: -0.03em; color: var(--text);
display: inline-flex; align-items: center; gap: 9px;
}
#km-brand .dot {
width: 9px; height: 9px; border-radius: 50%; background: var(--accent);
box-shadow: 0 0 0 4px var(--accent-soft); flex: none;
}
#km-brand .sub { color: var(--faint); font-size: 13px; letter-spacing: -0.01em; }
/* segmented tab control (Apple style) */
#km-tabs {
display: inline-flex; gap: 2px; padding: 4px; border-radius: var(--r-pill);
background: var(--surface); border: 1px solid var(--line); position: relative;
}
#km-tabs .km-tab {
appearance: none; border: 0; background: transparent; color: var(--muted);
font: 500 13.5px/1 var(--sans); letter-spacing: -0.01em; cursor: pointer;
padding: 9px 16px; border-radius: var(--r-pill); position: relative; z-index: 1;
transition: color 0.25s var(--ease); box-shadow: none;
}
#km-tabs .km-tab:hover { color: var(--text); background: transparent; }
#km-tabs .km-tab.on { color: var(--text); background: transparent; }
#km-tab-pill {
position: absolute; top: 4px; left: 4px; height: calc(100% - 8px);
background: var(--surface-3); border: 1px solid var(--line-2); border-radius: var(--r-pill);
box-shadow: var(--shadow-sm); transition: transform 0.34s var(--ease), width 0.34s var(--ease);
z-index: 0;
}
/* ---------- page + layout ---------- */
.km-page[hidden] { display: none; }
.km-page { animation: km-fade 0.4s var(--ease); }
@keyframes km-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
#km-grid { display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,0.95fr); gap: 20px; align-items: start; }
#km-grid > section:last-child { position: sticky; top: 18px; }
@media (max-width: 880px) { #km-grid { grid-template-columns: 1fr; } #km-grid > section:last-child { position: static; } }
.km-card {
background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
padding: 22px; box-shadow: var(--shadow-sm);
}
.km-eyebrow { font-size: 12px; font-weight: 600; color: var(--faint); letter-spacing: 0.02em;
margin-bottom: 14px; }
.km-h { font-size: 21px; font-weight: 600; letter-spacing: -0.03em; margin-bottom: 6px; }
.km-lede { color: var(--muted); font-size: 14px; max-width: 64ch; }
/* ---------- intro / hero strip ---------- */
#km-hero { padding: 8px 0 26px; max-width: 70ch; }
#km-hero h1 { font-size: clamp(28px, 5vw, 42px); font-weight: 600; letter-spacing: -0.035em; line-height: 1.05; }
#km-hero h1 .g { color: var(--accent); }
#km-hero p { color: var(--muted); font-size: clamp(15px, 2vw, 17px); margin-top: 14px; max-width: 60ch; }
/* ---------- segmented (compose/classics, model) ---------- */
.km-seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2);
border: 1px solid var(--line); border-radius: var(--r-sm); }
.km-seg button {
appearance: none; border: 0; background: transparent; color: var(--muted);
font: 500 13px/1 var(--sans); cursor: pointer; padding: 8px 13px; border-radius: 7px;
transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.km-seg button.on { background: var(--surface-3); color: var(--text); box-shadow: var(--shadow-sm); }
/* ---------- the pipeline composer ---------- */
.km-section-label { font-size: 12.5px; font-weight: 600; color: var(--faint); margin: 22px 0 10px; }
.km-section-label:first-child { margin-top: 4px; }
#km-pipe { display: flex; flex-direction: column; gap: 0; }
.km-stage {
display: flex; align-items: center; gap: 12px; padding: 13px 15px;
background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm);
transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.km-stage + .km-stage { margin-top: 8px; }
.km-stage .km-stage-k { font-size: 11px; color: var(--faint); width: 64px; flex: none; font-weight: 600; }
.km-stage.fixed { background: transparent; border-style: dashed; }
.km-stage .km-pick {
flex: 1; display: flex; gap: 6px; flex-wrap: wrap;
}
.km-opt {
appearance: none; border: 1px solid var(--line); background: var(--surface-3); color: var(--muted);
font: 500 13px/1 var(--sans); cursor: pointer; padding: 8px 12px; border-radius: var(--r-pill);
transition: all 0.18s var(--ease); white-space: nowrap;
}
.km-opt:hover { color: var(--text); border-color: var(--line-2); transform: translateY(-1px); }
.km-opt.on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.km-opt.off { opacity: 0.5; }
.km-flow { color: var(--faint); text-align: center; font-size: 13px; line-height: 1; margin: 6px 0; }
.km-toggle {
display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none;
font-size: 13px; color: var(--muted);
}
.km-switch { width: 38px; height: 22px; border-radius: var(--r-pill); background: var(--surface-3);
border: 1px solid var(--line-2); position: relative; transition: background 0.24s var(--ease); flex: none; }
.km-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px;
border-radius: 50%; background: #c9ced6; transition: transform 0.24s var(--ease); }
.km-toggle input { position: absolute; opacity: 0; }
.km-toggle input:checked + .km-switch { background: var(--accent-deep); border-color: transparent; }
.km-toggle input:checked + .km-switch::after { transform: translateX(16px); background: #fff; }
.km-toggle input:disabled + .km-switch { opacity: 0.42; }
.km-local-toggle { color: var(--text); }
.km-mode-help { color: var(--muted); font-size: 12.5px; line-height: 1.45; margin-top: -4px; }
/* info / knowledge line */
#km-info, #km-xinfo { margin-top: 16px; padding: 13px 15px; border-radius: var(--r-sm);
background: var(--surface-2); border: 1px solid var(--line); color: var(--muted);
font-size: 13px; line-height: 1.5; min-height: 44px; }
/* parameters */
.km-params { margin-top: 18px; display: grid; gap: 14px; }
.km-field { display: flex; flex-direction: column; gap: 7px; }
.km-field > label { font-size: 12.5px; color: var(--faint); font-weight: 600; display: flex;
justify-content: space-between; align-items: center; }
.km-field > label b { color: var(--text); font-family: var(--mono); font-size: 12.5px; }
.km-input, .km-textarea {
appearance: none; width: 100%; background: var(--surface-2); border: 1px solid var(--line);
border-radius: var(--r-sm); color: var(--text); font: 14px/1.5 var(--sans); padding: 11px 13px;
transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.km-textarea { font-family: var(--mono); font-size: 13px; resize: vertical; min-height: 96px; }
.km-input::placeholder, .km-textarea::placeholder { color: var(--faint); }
.km-input:focus, .km-textarea:focus { outline: none; border-color: var(--accent-line);
box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=range].km-range { -webkit-appearance: none; appearance: none; width: 100%; height: 4px;
border-radius: 4px; background: var(--surface-3); outline: none; }
input[type=range].km-range::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px;
border-radius: 50%; background: var(--text); cursor: pointer; border: 0;
box-shadow: 0 1px 4px rgba(0,0,0,0.4); transition: transform 0.15s var(--ease); }
input[type=range].km-range::-webkit-slider-thumb:active { transform: scale(1.15); }
input[type=range].km-range::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%;
background: var(--text); cursor: pointer; border: 0; }
/* segmented stepper for attempts */
.km-stepper { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-2);
border: 1px solid var(--line); border-radius: var(--r-sm); }
.km-stepper button { appearance: none; border: 0; background: transparent; color: var(--muted);
font: 500 13px var(--mono); cursor: pointer; width: 30px; height: 30px; border-radius: 7px;
transition: all 0.16s var(--ease); }
.km-stepper button.on { background: var(--accent-soft); color: var(--accent); }
.km-stepper button:hover:not(.on) { color: var(--text); }
/* ---------- buttons ---------- */
.km-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.km-btn {
appearance: none; border: 1px solid var(--line-2); background: var(--surface-3); color: var(--text);
font: 600 14px/1 var(--sans); letter-spacing: -0.01em; cursor: pointer; padding: 13px 18px;
border-radius: var(--r-sm); transition: transform 0.16s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
display: inline-flex; align-items: center; gap: 8px;
}
.km-btn:hover { border-color: var(--line-2); transform: translateY(-1px); }
.km-btn:active { transform: scale(0.985); }
.km-btn.primary {
background: linear-gradient(180deg, var(--accent), var(--accent-deep)); color: var(--accent-ink);
border-color: transparent; flex: 1; justify-content: center; min-width: 180px;
box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 8px 24px rgba(16,185,129,0.22);
}
.km-btn.primary:hover { filter: brightness(1.04); }
.km-btn.ghost { background: transparent; }
.km-btn .ic { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; }
/* ---------- visualisation ---------- */
#km-viz { position: relative; background: var(--surface-2); border: 1px solid var(--line);
border-radius: var(--r-sm); height: 168px; overflow: hidden; margin-bottom: 14px; }
#km-svg { width: 100%; height: 100%; display: block; }
#km-stage-label { position: absolute; left: 14px; bottom: 12px; font-size: 12px; color: var(--muted);
font-family: var(--mono); letter-spacing: -0.01em; }
/* ---------- verdict / result ---------- */
#km-verdict .km-card, .km-result-card { padding: 20px; }
.km-card.ok { border-color: var(--accent-line); background:
radial-gradient(120% 130% at 0% 0%, rgba(52,224,161,0.07), transparent 60%), var(--surface); }
.km-card.err, .km-card.miss { border-color: rgba(255,122,122,0.28); }
.km-card.building, .km-card.replaying { border-color: var(--accent-line); }
.km-result-top { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 4px; }
.km-verdict-icon { width: 34px; height: 34px; border-radius: 9px; flex: none; display: grid;
place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 17px;
border: 1px solid var(--accent-line); }
.km-verdict-icon.bad { background: var(--danger-soft); color: var(--danger); border-color: rgba(255,122,122,0.28); }
.km-run-label { display: block; font-size: 11px; color: var(--faint); font-weight: 600;
letter-spacing: 0.02em; text-transform: uppercase; margin-bottom: 2px; }
.km-result-top b { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.km-result-top > div > span:last-child { display: block; color: var(--muted); font-size: 13px;
font-family: var(--mono); margin-top: 2px; }
.km-speed-hero { text-align: center; padding: 22px 0 16px; border: 1px solid var(--line);
border-radius: var(--r-sm); background: var(--surface-2); margin: 16px 0; }
.km-speed-hero big { display: block; font: 600 52px/1 var(--mono); letter-spacing: -0.04em;
font-variant-numeric: tabular-nums; color: var(--text); }
.km-speed-hero span { display: block; font-size: 11.5px; color: var(--faint); font-weight: 600;
letter-spacing: 0.04em; text-transform: uppercase; margin-top: 8px; }
.km-ref-summary { font-size: 13.5px; color: var(--muted); margin: 4px 0 10px; }
.km-ref-summary b { color: var(--text); font-family: var(--mono); }
.km-attempts { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 2px; }
.km-attempt { display: inline-flex; align-items: center; gap: 5px; font-size: 12px;
font-family: var(--mono); padding: 5px 10px; border-radius: var(--r-pill); border: 1px solid var(--line);
background: var(--surface-2); color: var(--muted); }
.km-attempt.ok { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.km-attempt.bad { color: var(--danger); border-color: rgba(255,122,122,0.24); background: var(--danger-soft); }
.km-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 4px; }
.km-stats > div { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 13px;
background: var(--surface-2); text-align: center; }
.km-stats big { display: block; font: 600 30px/1 var(--mono); letter-spacing: -0.03em; color: var(--text);
font-variant-numeric: tabular-nums; }
.km-stats span { display: block; color: var(--faint); font-size: 11px; margin-top: 6px; }
/* Comparison grid: every baseline is a big number. The strongest/most-honest one (max-autotune,
or torch.compile if that's all we have) is accented green as the headline claim, but all are big. */
.km-cmp-key { border-color: var(--accent-line) !important; background: var(--accent-soft) !important; }
.km-cmp-key big { color: var(--accent); }
.km-dim { color: var(--muted); font-size: 13px; line-height: 1.5; }
.km-baseline-guard { margin: 12px 0; border: 1px solid rgba(255, 196, 87, .35);
background: rgba(255, 196, 87, .08); border-radius: var(--r-sm); padding: 10px 12px;
color: #f8d38a; font-size: 12.5px; line-height: 1.45; }
.km-rawerr { color: var(--faint); font-size: 12px; font-family: var(--mono); margin-top: 10px;
word-break: break-word; }
.km-pill-note { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 5px 11px;
border-radius: var(--r-pill); margin-bottom: 12px; letter-spacing: -0.01em; }
.km-pill-note.recorded { background: var(--surface-3); color: var(--muted); border: 1px solid var(--line); }
.km-pill-note.hit { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-line); }
.km-pill-note.miss { background: var(--danger-soft); color: var(--danger); border: 1px solid rgba(255,122,122,0.24); }
.km-crown { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 5px 11px; margin-bottom: 12px;
border-radius: var(--r-pill); background: rgba(241,196,122,0.12); color: var(--amber);
border: 1px solid rgba(241,196,122,0.28); margin-left: 8px; }
.km-board { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 5px 11px; margin-bottom: 12px;
border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent);
border: 1px solid var(--accent-line); margin-left: 8px; }
/* build progress */
.km-build-steps { display: grid; gap: 6px; margin: 14px 0; }
.km-build-steps span { font-family: var(--mono); font-size: 12px; color: var(--faint);
padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2);
transition: all 0.25s var(--ease); }
.km-build-steps span.on { color: var(--text); border-color: var(--accent-line); background: var(--accent-soft); }
.km-build-steps span.done { color: var(--accent); }
.km-bar { height: 5px; border-radius: 4px; background: var(--surface-3); overflow: hidden; margin: 13px 0; }
.km-bar i { display: block; height: 100%; width: 6%; border-radius: 4px;
background: linear-gradient(90deg, var(--accent-deep), var(--accent)); transition: width 0.5s var(--ease); }
.km-bstage { font-size: 14px; font-weight: 600; }
.km-replay-stage { font-size: 13px; color: var(--text); font-weight: 600; margin: 8px 0 4px; }
/* kernel source */
.km-source { margin-top: 14px; border: 1px solid var(--line); border-radius: var(--r-sm);
background: #08090b; overflow: hidden; }
.km-source summary { cursor: pointer; padding: 12px 15px; font-size: 13px; font-weight: 600;
color: var(--text); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.km-source summary::-webkit-details-marker { display: none; }
.km-source summary::after { content: "+"; color: var(--accent); font-family: var(--mono); }
.km-source[open] summary::after { content: "\2212"; }
#km-code, .km-code { margin: 0; border-top: 1px solid var(--line); padding: 14px; color: #b9e6d3;
font: 12px/1.6 var(--mono); overflow: auto; max-height: 320px; white-space: pre; }
/* history */
#km-hist .km-hrow { border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px;
background: var(--surface-2); font-size: 13px; margin-bottom: 6px; color: var(--muted);
display: flex; justify-content: space-between; }
#km-hist code { color: var(--text); }
/* recorded replay callout */
.km-replay-callout { display: flex; align-items: center; justify-content: space-between; gap: 14px;
margin-top: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-sm);
background: var(--surface-2); }
.km-replay-callout b { font-size: 13.5px; font-weight: 600; display: block; margin-bottom: 2px; }
.km-replay-callout span { color: var(--muted); font-size: 12.5px; }
.km-replay-picks { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.km-rpick { appearance: none; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted);
font: 500 12.5px var(--sans); cursor: pointer; padding: 8px 12px; border-radius: var(--r-pill);
transition: all 0.18s var(--ease); }
.km-rpick:hover { color: var(--text); border-color: var(--line-2); }
.km-rpick.on { border-color: var(--accent-line); color: var(--accent); background: var(--accent-soft); }
.km-rpick span { font-family: var(--mono); color: var(--accent); margin-left: 5px; }
.km-inline-replay { appearance: none; margin-top: 12px; background: var(--surface-3); border: 1px solid var(--line-2);
color: var(--text); font: 500 13px var(--sans); cursor: pointer; padding: 9px 14px; border-radius: var(--r-sm);
transition: all 0.18s var(--ease); }
.km-inline-replay:hover { border-color: var(--accent-line); color: var(--accent); }
/* ---------- expert mode ---------- */
.km-expert-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,0.9fr); gap: 18px; }
@media (max-width: 880px) { .km-expert-grid { grid-template-columns: 1fr; } }
.km-resolved { margin-top: 14px; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--r-sm);
background: var(--surface-2); font-size: 13px; }
.km-resolved .k { color: var(--faint); font-size: 11.5px; font-weight: 600; text-transform: uppercase;
letter-spacing: 0.03em; }
.km-resolved .v { color: var(--accent); font-family: var(--mono); font-size: 14px; margin-top: 4px; }
.km-resolved.unknown .v { color: var(--amber); }
.km-limits { font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.km-limits b { color: var(--text); }
.km-oplist { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.km-optag { font: 500 11.5px var(--mono); padding: 5px 9px; border-radius: 7px; background: var(--surface-2);
border: 1px solid var(--line); color: var(--muted); cursor: pointer; transition: all 0.16s var(--ease); }
.km-optag:hover { color: var(--accent); border-color: var(--accent-line); }
/* ---------- leaderboard ---------- */
.km-lbt { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.km-lbt th { text-align: left; color: var(--faint); font-weight: 600; font-size: 11.5px;
text-transform: uppercase; letter-spacing: 0.04em; padding: 0 12px 12px; }
.km-lbt th:nth-child(4), .km-lbt td:nth-child(4), .km-lbt th:nth-child(5), .km-lbt td:nth-child(5) { text-align: right; }
.km-lbt td { padding: 12px; border-top: 1px solid var(--line); }
.km-lbt tbody tr { transition: background 0.15s var(--ease); }
.km-lbt tbody tr:hover { background: var(--surface-2); }
.km-lbt tr.champ td { background: rgba(241,196,122,0.05); }
.km-lbt code { color: var(--text); font-size: 12.5px; }
.km-lbt .hot { color: var(--accent); font-family: var(--mono); font-weight: 600; font-variant-numeric: tabular-nums; }
.km-lbt td:nth-child(5) { color: var(--muted); font-family: var(--mono); font-variant-numeric: tabular-nums; }
.km-rank { color: var(--faint); font-family: var(--mono); }
.km-lb-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.km-lb-tools .km-mini { margin-top: 0; }
.km-lb-status { color: var(--faint); font-size: 12.5px; line-height: 1.45; }
.km-lb-status.warn { color: var(--amber); }
.km-lb-status.bad { color: var(--danger); }
/* ---------- run + verify docs ---------- */
.km-docs { width: 100%; }
.km-docs a { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent;
transition: border-color 0.16s var(--ease), color 0.16s var(--ease); }
.km-docs a:hover { border-color: var(--accent-line); }
.km-docs h2 { margin: 0; font-size: clamp(30px, 5vw, 48px); line-height: 1.02; letter-spacing: -0.04em; }
.km-docs h3 { margin: 0 0 10px; font-size: 20px; line-height: 1.18; letter-spacing: -0.025em; }
.km-docs p { color: var(--muted); font-size: 14.5px; line-height: 1.65; margin: 0 0 14px; max-width: 72ch; }
.km-docs b { color: var(--text); font-weight: 600; }
.km-docs code { color: var(--text); background: var(--surface-3); border: 1px solid var(--line);
border-radius: 6px; padding: 1px 5px; font-size: 0.92em; }
.km-doc-hero { padding: 8px 0 22px; max-width: 900px; }
.km-doc-kicker { display: inline-block; margin: 0 0 12px; color: var(--accent);
font: 600 12px/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; }
.km-doc-hero p { margin-top: 16px; font-size: clamp(15px, 2vw, 17px); color: var(--muted); }
.km-doc-metrics { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin: 0 0 18px; }
.km-doc-metrics > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
padding: 14px 15px; min-height: 82px; }
.km-doc-metrics b { display: block; font-size: 13.5px; margin-bottom: 5px; }
.km-doc-metrics span { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.km-doc-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; align-items: start; }
.km-doc-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
padding: 20px; box-shadow: var(--shadow-sm); min-width: 0; }
.km-doc-panel.wide { grid-column: 1 / -1; }
.km-doc-label { color: var(--faint); font: 600 11.5px/1 var(--sans); letter-spacing: 0.06em;
text-transform: uppercase; margin-bottom: 12px; }
.km-doc-steps { counter-reset: kmstep; list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 10px; }
.km-doc-steps li { position: relative; padding: 12px 14px 12px 46px; border: 1px solid var(--line);
background: var(--surface-2); border-radius: var(--r-sm); color: var(--muted); font-size: 14px; line-height: 1.55; }
.km-doc-steps li::before { counter-increment: kmstep; content: counter(kmstep);
position: absolute; left: 13px; top: 12px; width: 22px; height: 22px; border-radius: 7px;
display: grid; place-items: center; background: var(--accent-soft); color: var(--accent);
font: 700 12px/1 var(--mono); border: 1px solid var(--accent-line); }
.km-doc-callout { border: 1px solid var(--accent-line); background: var(--accent-soft);
border-radius: var(--r-sm); padding: 13px 15px; color: var(--text); font-size: 13.5px;
line-height: 1.55; margin: 12px 0 0; }
.km-prompt-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; align-items: start; }
.km-prompt-grid > div > b { display: block; margin: 0 0 8px; font-size: 13px; }
.km-doc-chiprow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.km-doc-chip { display: inline-flex; align-items: center; min-height: 30px; border-radius: var(--r-sm);
border: 1px solid var(--line); background: var(--surface-2); color: var(--muted);
font: 600 12px/1 var(--sans); padding: 8px 10px; }
.km-codeblock { background: #08090b; border: 1px solid var(--line); border-radius: var(--r-sm);
padding: 15px 16px; font: 12.5px/1.7 var(--mono); color: #b9e6d3; overflow: auto; margin: 0 0 16px;
white-space: pre; position: relative; max-width: 100%; }
.km-copy { position: absolute; top: 9px; right: 9px; appearance: none; border: 1px solid var(--line-2);
background: var(--surface-3); color: var(--muted); font: 500 11px var(--sans); cursor: pointer;
padding: 5px 9px; border-radius: 7px; transition: all 0.16s var(--ease); }
.km-copy:hover { color: var(--accent); border-color: var(--accent-line); }
.km-gloss { display: grid; grid-template-columns: 130px 1fr; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); }
.km-gloss b { color: var(--text); font-size: 13.5px; font-weight: 600; }
.km-gloss span { color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.km-callout { border: 1px solid var(--accent-line); background: var(--accent-soft); border-radius: var(--r-sm);
padding: 14px 16px; font-size: 13.5px; color: var(--text); margin: 0 0 16px; }
@media (max-width: 900px) {
.km-doc-grid, .km-doc-metrics, .km-prompt-grid { grid-template-columns: 1fr; }
.km-doc-panel.wide { grid-column: auto; }
}
@media (max-width: 560px) {
.km-doc-panel { padding: 16px; }
.km-doc-steps li { padding-left: 42px; }
.km-codeblock { font-size: 11.5px; padding: 14px 13px; }
.km-gloss { grid-template-columns: 1fr; gap: 3px; }
}
/* ---------- misc ---------- */
.km-mini { appearance: none; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted);
font: 500 12.5px var(--sans); cursor: pointer; padding: 8px 13px; border-radius: var(--r-sm); margin-top: 14px;
transition: all 0.18s var(--ease); }
.km-mini:hover { color: var(--text); border-color: var(--line-2); }
.km-mini:disabled { opacity: 0.62; cursor: wait; transform: none; }
@media (prefers-reduced-motion: reduce) {
#km *, #km *::before, #km *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
/* ---------- Gradio button-default override ----------
Gradio styles all <button> via `.gradio-container button` (specificity 0,1,1), which beats
bare class selectors. Re-assert our button surfaces with #km-scoped selectors (1,1,0) so the
dark theme wins. Keep this block last. */
#km button { font-family: var(--sans); box-shadow: none; min-width: 0; }
#km .km-tab { background: transparent; border: 0; }
#km .km-seg button { background: transparent; border: 0; color: var(--muted); }
#km .km-seg button.on { background: var(--surface-3); color: var(--text); box-shadow: var(--shadow-sm); }
#km .km-opt { background: var(--surface-3); border: 1px solid var(--line); color: var(--muted); }
#km .km-opt:hover { background: var(--surface-3); border-color: var(--line-2); color: var(--text); }
#km .km-opt.on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
#km .km-btn { background: var(--surface-3); border: 1px solid var(--line-2); color: var(--text); }
#km .km-btn.primary { background: linear-gradient(180deg, var(--accent), var(--accent-deep));
border-color: transparent; color: var(--accent-ink);
box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 8px 24px rgba(16,185,129,0.22); }
#km .km-btn.ghost { background: transparent; }
#km .km-stepper button { background: transparent; border: 0; color: var(--muted); }
#km .km-stepper button.on { background: var(--accent-soft); color: var(--accent); }
#km .km-rpick { background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
#km .km-rpick.on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
#km .km-optag { background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
#km .km-optag:hover { color: var(--accent); border-color: var(--accent-line); }
#km .km-mini { background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
#km .km-copy { background: var(--surface-3); border: 1px solid var(--line-2); color: var(--muted); }
#km .km-inline-replay { background: var(--surface-3); border: 1px solid var(--line-2); color: var(--text); }
#km .km-lb-refresh, #km #km-lb-refresh { background: var(--surface-2); }
#km .km-rpick span { color: var(--accent); }
/* build/replay progress card: flex column so the inline-replay button never overlaps the
progress bar or the explainer text (inline-block + margin-top was fragile when text wrapped). */
#km .km-card.building, #km .km-card.replaying { display: flex; flex-direction: column; align-items: stretch; gap: 2px; }
#km .km-card.building .km-dim, #km .km-card.replaying .km-dim { margin: 6px 0 0; }
#km .km-card.building .km-inline-replay, #km .km-card.replaying .km-inline-replay { align-self: flex-start; }
/* optional second activation: collapsed behind a toggle to keep the composer compact */
#km #km-act2-wrap { margin-top: 8px; }
#km .km-add2 { appearance: none; background: transparent; border: 1px dashed var(--line-2); color: var(--muted);
font: 500 12.5px var(--sans); cursor: pointer; padding: 9px 13px; border-radius: var(--r-sm); width: 100%;
text-align: left; transition: all 0.18s var(--ease); }
#km .km-add2:hover { color: var(--text); border-color: var(--accent-line); }
#km #km-act2-wrap.open .km-add2 { display: none; }
#km #km-act2-stage { display: none; }
#km #km-act2-wrap.open #km-act2-stage { display: flex; }
|