/* KI-Konsole (Startseite) – Beispiel-Dialoge, die sich selbst tippen. Port aus dem Tempteria-MVC. */
.tk-lab {
    /* Farben aus der Blocksy-Palette (Customizer), Fallbacks = Stand 29.09.2026 */
    --tk-blue: var(--theme-palette-color-1, #007f5f);
    --tk-ink: var(--theme-palette-color-4, #192c27);
    --tk-muted: var(--theme-palette-color-3, #365951);
    --tk-surface: var(--theme-palette-color-8, #ffffff);
    --tk-surface-2: var(--theme-palette-color-6, #f2f7f6);
    --tk-bg-soft: var(--theme-palette-color-7, #fbfcfc);
    --tk-border: var(--theme-palette-color-5, #e6f0ee);
    --tk-ai: var(--theme-palette-color-2, #55a630);
    --tk-ai-2: var(--theme-palette-color-1, #007f5f);
    --tk-ai-grad: linear-gradient(135deg, var(--theme-palette-color-2, #55a630) 0%, var(--theme-palette-color-1, #007f5f) 100%);
    --tk-shadow: 0 24px 60px rgba(25, 44, 39, .08);
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: clamp(24px, 4vw, 56px);
    align-items: center;
    margin: 0 auto;
}
html[data-theme="dark"] .tk-lab {
    --tk-ink: #e6f0ee;
    --tk-muted: #a9c2bb;
    --tk-surface: #14241f;
    --tk-surface-2: #1a2e28;
    --tk-bg-soft: #101d19;
    --tk-border: #24403a;
    --tk-shadow: 0 24px 60px rgba(0, 0, 0, .55);
}
@media (max-width: 860px) {
    .tk-lab { grid-template-columns: 1fr; }
}

.tk-kicker {
    display: inline-block;
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    background: var(--tk-ai-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 10px;
}
.tk-lab h2 {
    font-size: clamp(28px, 3.6vw, 42px);
    line-height: 1.15;
    margin: 0 0 14px;
    font-weight: 900;
    letter-spacing: -.02em;
    color: var(--tk-ink);
}
.tk-grad {
    background: var(--tk-ai-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.tk-lead { color: var(--tk-muted); font-size: 17px; margin: 0 0 22px; }
.tk-btn {
    display: inline-block;
    padding: 14px 24px;
    border-radius: 999px;
    background: var(--tk-ai-grad);
    color: #fff !important;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(0, 127, 95, .25);
    transition: transform .18s, box-shadow .18s;
}
.tk-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(85, 166, 48, .32); }

.tk-console {
    position: relative;
    border-radius: 25px;
    background: linear-gradient(180deg, var(--tk-surface), var(--tk-bg-soft));
    border: 1px solid var(--tk-border);
    box-shadow: var(--tk-shadow);
    overflow: hidden;
}
.tk-console::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(85, 166, 48, .55), rgba(0, 127, 95, .4) 60%, transparent);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}
.tk-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--tk-border);
    background: rgba(127, 127, 127, .04);
}
.tk-dots { display: flex; gap: 6px; }
.tk-dots i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.tk-dots i:nth-child(1) { background: #ff5f57; }
.tk-dots i:nth-child(2) { background: #febc2e; }
.tk-dots i:nth-child(3) { background: #28c840; }
.tk-title {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--tk-muted);
    letter-spacing: .4px;
    display: flex;
    align-items: center;
    gap: 7px;
}
.tk-live {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 10px #22c55e;
    animation: tk-pulse 1.6s ease-in-out infinite;
}
.tk-demo {
    margin-left: auto;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: var(--tk-muted);
    border: 1px solid var(--tk-border);
    border-radius: 999px;
    padding: 2px 8px;
}
.tk-body {
    padding: 20px;
    min-height: 230px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    font-size: 15px;
}
.tk-msg { max-width: 88%; padding: 12px 15px; border-radius: 16px; line-height: 1.5; }
.tk-msg.user {
    align-self: flex-end;
    background: var(--tk-blue);
    color: #fff;
    border-bottom-right-radius: 5px;
}
.tk-msg.bot {
    align-self: flex-start;
    background: var(--tk-surface-2);
    border: 1px solid var(--tk-border);
    border-bottom-left-radius: 5px;
    color: var(--tk-ink);
}
.tk-who {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .6px;
    text-transform: uppercase;
    margin-bottom: 7px;
}
.tk-av {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: var(--tk-ai-grad);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
}
.tk-cursor {
    display: inline-block;
    width: 8px;
    height: 1.05em;
    background: var(--tk-ai);
    margin-left: 2px;
    vertical-align: -2px;
    animation: tk-blink 1s steps(2) infinite;
}
.tk-suggest { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 20px 20px; }
.tk-chip {
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--tk-muted);
    border: 1px solid var(--tk-border);
    background: var(--tk-surface);
    border-radius: 999px;
    padding: 7px 13px;
    cursor: pointer;
    transition: all .18s;
}
.tk-chip:hover,
.tk-chip.active {
    border-color: var(--tk-ai-2);
    color: var(--tk-ink);
    box-shadow: 0 0 0 3px rgba(0, 127, 95, .14);
}
.tk-chip:focus-visible { outline: 2px solid var(--tk-ai-2); outline-offset: 2px; }

@keyframes tk-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes tk-blink { to { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
    .tk-live, .tk-cursor { animation: none; }
    .tk-btn { transition: none; }
}
