/* /history page — editorial timeline of recent tool runs. */

.ed-history {
    max-width: 760px;
    margin: 0 auto;
    padding: clamp(var(--space-xl), 8vh, 96px) clamp(var(--space-md), 4vw, var(--space-2xl)) var(--space-3xl);
    color: var(--text-primary);
    font-family: 'Inter', var(--font-body), sans-serif;
}

.ed-history__hero { margin-bottom: var(--space-xl); }

.ed-history__title {
    font-family: 'Erode', serif;
    font-weight: 500;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.1;
    margin: var(--space-md) 0 var(--space-sm);
    letter-spacing: -0.02em;
}

.ed-history__lead {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    max-width: 56ch;
}

.ed-history__actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: var(--space-md);
}

.ed-history__clear {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: var(--border-thin) solid var(--border-default);
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.ed-history__clear:hover {
    color: var(--accent-red);
    border-color: var(--accent-red);
}

.ed-history__list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: var(--border-thin) solid var(--border-subtle);
}

.ed-history__item {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    align-items: start;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    border-bottom: var(--border-thin) solid var(--border-subtle);
}

.ed-history__icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    border: var(--border-thin) solid var(--border-default);
    color: var(--text-muted);
    font-size: 18px;
}

.ed-history__body { min-width: 0; }

.ed-history__head {
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.ed-history__tool {
    font-family: 'Erode', serif;
    font-weight: 500;
    font-size: var(--text-base);
    color: var(--text-primary);
    text-decoration: none;
}

.ed-history__tool:hover { color: var(--accent-blue); }

.ed-history__time {
    font-family: 'JetBrains Mono', monospace;
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.ed-history__params {
    margin: 4px 0 0;
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.ed-history__meta {
    margin: 4px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    font-family: 'JetBrains Mono', monospace;
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.ed-history__meta strong { color: var(--text-secondary); font-weight: 500; }

.ed-history__rowactions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.ed-history__rerun {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-secondary);
    border: var(--border-thin) solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: var(--text-xs);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.ed-history__rerun:hover {
    background: var(--bg-elevated);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.ed-history__remove {
    width: 26px;
    height: 26px;
    background: transparent;
    border: 0;
    border-radius: var(--radius-xs);
    color: var(--text-muted);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all var(--transition-fast);
}

.ed-history__remove:hover {
    background: var(--bg-secondary);
    color: var(--accent-red);
}

@media (max-width: 540px) {
    .ed-history__item { grid-template-columns: 28px 1fr; }
    .ed-history__rowactions { grid-column: 1 / -1; justify-content: flex-end; margin-top: var(--space-xs); }
}
