.programme-history { color: var(--ink, #16324d); }
.history-toolbar,.history-detail-heading,.history-row-heading,.history-pagination { display:flex; gap:16px; align-items:center; justify-content:space-between; }
.history-toolbar { align-items:flex-start; margin-bottom:20px; }
.history-toolbar h3,.history-detail h4,.history-row-change h5,.history-metadata h5 { margin:0 0 8px; }
.history-toolbar .muted { margin-bottom:0; max-width:800px; }
.history-toolbar button,.history-detail-heading button { flex-shrink:0; }
.history-filters { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)) minmax(200px,1.5fr); gap:12px; }
.history-filters label { display:flex; flex-direction:column; gap:6px; font-size:13px; color:#527087; min-width:0; }
.history-filters select,.history-filters input { width:100%; min-width:0; padding:10px; border:1px solid #ccdce7; border-radius:10px; background:#fff; color:#16324d; font:inherit; }
.history-status { min-height:20px; font-size:13px; }
.history-table-wrap { max-width:100%; overflow-x:auto; border:1px solid #d6e3ec; border-radius:12px; }
.history-table,.history-fields { width:100%; border-collapse:collapse; font-size:14px; }
.history-table { min-width:720px; }
.history-table th,.history-fields th { text-align:left; background:#f0f6fa; font-size:12px; letter-spacing:.03em; }
.history-table td,.history-table th,.history-fields td,.history-fields th { padding:12px; border-bottom:1px solid #e0eaf1; vertical-align:top; }
.history-table tr:last-child td,.history-fields tr:last-child td,.history-fields tr:last-child th { border-bottom:0; }
.history-table tr.is-selected { background:#eef7f6; }
.history-table small { display:block; color:#527087; margin-top:5px; }
.history-table .compact-button { white-space:nowrap; }
.history-pagination { justify-content:flex-end; margin-top:16px; font-size:13px; }
.history-detail { background:#fbfdfd; border:1px solid #c3dcd8; border-top:4px solid #24856d; border-radius:14px; padding:22px; margin:20px 0; scroll-margin-top:20px; }
.history-detail[hidden] { display:none; }
.history-detail h4 { font-size:21px; }
.history-detail h5 { font-size:16px; }
.history-summary { font-weight:600; }
.history-row-change,.history-metadata { background:#fff; border:1px solid #d6e3ec; border-radius:12px; padding:16px; margin:16px 0; }
.history-kind { font-size:12px; background:#e5f1ee; border-radius:16px; padding:4px 9px; white-space:nowrap; }
.history-fields { table-layout:fixed; }
.history-fields th:first-child { width:23%; }
.history-fields td { white-space:pre-wrap; overflow-wrap:anywhere; }
.history-fields .history-before { background:#fff5f2; }
.history-fields .history-after { background:#eff8f3; }
.history-row-change details { margin-top:14px; }
.history-row-change summary { cursor:pointer; color:#245f7c; }
.history-row-context { display:grid; grid-template-columns:1fr 1fr; gap:16px; padding-top:14px; }
.history-row-context>div { min-width:0; }
.history-row-context dt { font-size:12px; color:#527087; margin-top:10px; }
.history-row-context dd { margin:4px 0; white-space:pre-wrap; overflow-wrap:anywhere; }
.history-restore { margin-top:20px; border-top:1px solid #d6e3ec; padding-top:10px; font-size:13px; }
.programme-history button:focus-visible,.programme-history summary:focus-visible,.programme-history h4:focus-visible { outline:3px solid #3f8fb8; outline-offset:3px; }
.programme-history button:disabled { opacity:.55; cursor:default; }
@media(max-width:1000px) { .history-filters { grid-template-columns:repeat(2,minmax(0,1fr)); } .history-search { grid-column:1/-1; } }
@media(max-width:600px) { .history-toolbar,.history-detail-heading { flex-wrap:wrap; } .history-detail { padding:14px; } .history-row-change,.history-metadata { padding:10px; } .history-fields th:first-child { width:26%; } .history-fields th,.history-fields td { padding:8px 6px; font-size:12px; } .history-row-heading { align-items:flex-start; flex-wrap:wrap; gap:6px; } .history-row-context { gap:10px; } .history-pagination { justify-content:space-between; gap:8px; } }
