:root {
    --llok-bg: #1e1e1e;
    --llok-panel-bg: #2a2a2a;
    --llok-panel-disabled: #222;
    --llok-text: #eaeaea;
    --llok-text-muted: #aaa;
    --llok-accent: oklch(66% 0.2 250);
    --llok-accent-hover:oklch(76% 0.2 250);;
    --llok-border: #444;
    --llok-selection: rgba(255, 0, 0, 0.3);
    --llok-selection-border: #ff0000;
    --llok-ghost: rgba(255, 255, 0, 0.2);
    --llok-ghost-border: #ffff00;
    --llok-highlight-bg: #343a40;
}

body {
	font-family: 'Montserrat', sans-serif,  -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--llok-bg);
    color: var(--llok-text);
}

/* --- LEGACY CORPORATE PRE-HEADER --- */
#mainhead {
    background: #000;
    padding: 20px 20px 15px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    line-height: 1.6em;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

#mainhead NAV {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0;
    max-width: none;
}

.bc-trail {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    color: #fff;
}

#mainhead NAV A {
    text-decoration: none;
    color: white;
}

/* --- LENSKEY MAIN APPLICATION --- */
.llok-app {
    padding: 20px;
}

a {
    color: var(--llok-accent);
    text-decoration: none;
}

a:hover {
    color: var(--llok-accent-hover);
    text-decoration: underline;
}

.llok-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--llok-border);
}

.llok-main-title {
    margin: 0;
    font-size: 1.6rem;
    font-weight: normal;
}

.llok-main-title strong {
    font-weight: 700;
}

/* Three-Column Asymmetric Master Grid Blueprint */
.llok-workspace-grid {
    display: grid;
    grid-template-columns: 320px 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.llok-panel {
    background: var(--llok-panel-bg);
    border: 2px solid transparent;
    border-radius: 8px;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.llok-panel.active {
    border-color: var(--llok-accent);
    box-shadow: 0 0 15px rgba(0, 122, 204, 0.15);
}

.llok-panel-step1 .llok-panel-body {
    background: rgba(0, 0, 0, 0.15);
}

.llok-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    border-bottom: 1px solid var(--llok-border);
    padding: 20px;
}

.llok-panel-title {
    margin: 0;
    font-size: 1.2rem;
}

.llok-panel-instructions {
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid var(--llok-border);
    box-sizing: border-box;
}

.llok-panel-body {
    padding: 20px;
    box-sizing: border-box;
}

/* --- INLINE TYPOGRAPHY & KEY INTERACTION STRINGS --- */
.llok-instructions-intro {
    font-size: 0.88rem;
    line-height: 160%;
    color: var(--llok-text-muted);
    margin: 0 0 12px 0;
}

.llok-instructions-intro.llok-label-highlight {
    color: var(--llok-text);
    font-weight: bold;
    border-top: 1px solid var(--llok-border);
    padding-top: 12px;
    margin-top: 15px;
}

.llok-instructions {
    margin: 0;
    color: var(--llok-text-muted);
    font-size: 0.9rem;
    line-height: 160%;
}

.llok-highlight {
    color: var(--llok-text);
    background: #333;
    padding: 8px;
    border-left: 4px solid var(--llok-accent);
    margin-bottom: 15px;
}

/* --- COMMAND OVERLAYS & CONTROLS --- */
.llok-instructions code,
.llok-dropzone-text code {
    font-family: 'Montserrat', sans-serif;
    background: #ffffff33;
    padding: 2px 8px;
    border-radius: 4px;
    color: #ccc;
    border: 1px solid #666;
    font-weight: bold;
}

.llok-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
	border-top: 1px solid #666;
    padding-top: 10px;
}

.llok-radio-label {
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
	    border-bottom: 1px solid #666;
    padding: 0px 0 10px;

}

.llok-radio-label input[type="radio"] {
    cursor: pointer;
    accent-color: var(--llok-accent);
}

.llok-method-selector-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px dotted var(--llok-border);
}

.llok-select-secondary {
    padding: 4px 8px;
    background: #1a1a1a;
    color: var(--llok-accent);
    border: 1px solid var(--llok-accent);
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
}

/* --- FILE MANAGEMENT INTERFACES --- */
.llok-dropzone {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--llok-border);
    border-radius: 8px;
    padding: 40px 20px;
    background-color: var(--llok-bg);
    cursor: pointer;
    text-align: center;
    box-sizing: border-box;
}

.llok-dropzone:hover,
.llok-dropzone.dragover {
    border-color: var(--llok-accent);
    background-color: #333;
}

.llok-file-input {
    display: none;
}

.llok-instructions-action-block {
    margin-top: 10px;
}

.llok-button {
    padding: 8px 16px;
    background: var(--llok-accent);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.llok-button:hover {
    background: var(--llok-accent-hover);
}

.llok-button-secondary {
    display: inline-block;
    background: transparent;
    border: 1px solid var(--llok-accent);
    color: var(--llok-accent);
}

/* --- GRAPHIC GRAPH WORKSPACE --- */
.llok-canvas-container {
    position: relative;
    background: var(--llok-bg);
    border: 1px solid var(--llok-border);
    overflow: hidden;
    user-select: none;
    touch-action: none;
    margin-bottom: 15px;
}

.llok-source-canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

.llok-selection-box {
    position: absolute;
    top: 0; left: 0; width: 0; height: 0;
    border: 1px dashed var(--llok-selection-border);
    background-color: var(--llok-selection);
    pointer-events: auto;
    display: none;
}

.llok-ghost-box {
    border-color: var(--llok-ghost-border);
    background-color: var(--llok-ghost);
    pointer-events: none;
}

/* --- MATH DECODER CANVAS VIEWERS --- */
.llok-viewer-wrapper {
    background: #000;
    border: 1px solid var(--llok-border);
    padding: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 4px;
}

.llok-viewer-label {
    color: var(--llok-accent);
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.llok-viewer-canvas {
    width: 128px;
    height: 64px;
    image-rendering: pixelated;
    background: #111;
}