* { box-sizing: border-box; }
html, body {
    margin: 0; padding: 0; height: 100%;
    font-family: -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
    color: #e6e6e6;
    background: #1c1c1c;
}
body {
    display: grid;
    grid-template-columns: 320px 1fr;
    grid-template-rows: 100vh;
    overflow: hidden;
}

aside#sidebar {
    border-right: 1px solid #333;
    background: #232323;
    padding: 18px 16px;
    overflow-y: auto;
}
aside#sidebar h1 {
    margin: 0 0 16px;
    font-size: 16px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #ddd;
}
aside#sidebar h2 {
    font-size: 12px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #aaa;
    margin: 0 0 8px;
    border-bottom: 1px solid #333;
    padding-bottom: 4px;
}
aside section {
    margin-bottom: 22px;
}
aside label {
    display: block;
    margin: 6px 0;
    font-size: 13px;
    color: #ccc;
}
aside label input[type="number"],
aside label input[type="range"] {
    margin-left: 8px;
    background: #1c1c1c;
    color: #e6e6e6;
    border: 1px solid #444;
    padding: 3px 6px;
    border-radius: 3px;
    width: 70px;
}
aside label select {
    display: block;
    margin-top: 4px;
    width: 100%;
    background: #1c1c1c;
    color: #e6e6e6;
    border: 1px solid #444;
    padding: 4px 6px;
    border-radius: 3px;
    font-size: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
aside label select:disabled {
    color: #888;
    cursor: not-allowed;
}
aside label input[type="range"] {
    width: 140px;
    vertical-align: middle;
}
aside label.checkbox {
    cursor: pointer;
}
aside .file-input {
    display: block;
    cursor: pointer;
}
aside .file-input input { display: none; }
aside .file-input span {
    display: inline-block;
    background: #2a82d6;
    color: white;
    padding: 7px 12px;
    border-radius: 4px;
    font-size: 13px;
}
aside .file-input span:hover { background: #3895ee; }
aside button {
    background: #2a82d6;
    color: white;
    border: 0;
    padding: 7px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}
aside button:hover:not(:disabled) { background: #3895ee; }
aside button:disabled {
    background: #444;
    cursor: not-allowed;
}
.muted { color: #999; }
.small { font-size: 11px; }
kbd {
    background: #333;
    border: 1px solid #555;
    border-radius: 3px;
    padding: 1px 4px;
    font-size: 11px;
    color: #ddd;
}

main#canvas-host {
    position: relative;
    overflow: hidden;
    background: #111;
}
canvas#canvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: grab;
}
canvas#canvas.panning  { cursor: grabbing; }
canvas#canvas.querying { cursor: crosshair; }
#hint {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    color: #777;
    pointer-events: none;
}
#hint.hidden { display: none; }

/* Architecture flag tags in #model-info */
.tag-on, .tag-off {
    display: inline-block;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 3px;
    margin-right: 3px;
    margin-bottom: 2px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.tag-on  { background: #2a8d4a; color: #f0fff0; }
.tag-off { background: #3a3a3a; color: #888; text-decoration: line-through; }
.ckpt-path {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 10px;
    color: #888;
    word-break: break-all;
}

/* Probability stats panel */
#prob-stats {
    margin-top: 6px;
    padding: 6px 8px;
    background: #1a1a1a;
    border-radius: 3px;
    line-height: 1.5;
}
#prob-stats:empty { display: none; }
#prob-stats .warn { color: #f0b15a; }
