.tk-history-panel {
    position: absolute;
    z-index: 1001;
    inset-block-start: 100%;
    inset-inline: 0;
    box-sizing: border-box;
    max-height: min(24rem, 55vh);
    margin: 0.4rem 0 0;
    padding: 0.85rem 1rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--site-border, #adbacb);
    border-radius: 0.8rem;
    background: var(--site-elevated, #fff);
    box-shadow: 0 0.6rem 1.6rem rgb(0 0 0 / 0.18);
    color: var(--site-ink, #17263a);
    font: 400 0.9375rem/1.45 system-ui, sans-serif;
    text-align: left;
}

.tk-history-entry:hover,
.tk-history-clear:hover {
    text-decoration: underline;
}

.tk-history-panel :is(a, button):focus-visible {
    outline: 2px solid var(--site-accent, #194caa);
    outline-offset: 3px;
}

.tk-history-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
    gap: 0.875rem 1.25rem;
}

.tk-history-heading {
    margin: 0 0 0.3rem;
    color: var(--site-ink, #17263a);
    font: inherit;
    font-weight: 700;
}

.tk-history-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.tk-history-entry {
    display: block;
    padding: 0.3rem 0;
    color: var(--site-accent, #194caa);
    text-decoration: none;
    overflow-wrap: anywhere;
}

.tk-history-footer {
    margin-top: 0.7rem;
    padding-top: 0.55rem;
    border-top: 1px solid var(--site-border, #adbacb);
}

.tk-history-clear {
    box-sizing: border-box;
    padding: 0.25rem 0;
    border: 0;
    background: transparent;
    color: var(--site-accent, #194caa);
    cursor: pointer;
    font: inherit;
}

@media print {
    .tk-history-panel {
        display: none;
    }
}
