#process-list > .section-inner{padding-top:8px}
.process-heading-actions{display:flex;gap:2px;margin-left:auto;flex:none}
.process-heading>small+.process-heading-actions{margin-left:6px}
.process-heading-actions [data-action="delete-process"]{color:var(--red)}
.office-process-status{
 display:flex;align-items:center;flex-wrap:wrap;gap:5px 9px;margin:0 14px;
 padding:6px 10px;border:1px solid var(--line);border-radius:8px;
 background:color-mix(in srgb,var(--soft),transparent 40%);font-size:12px;color:var(--ink)
}
.office-process-status small{font-size:11px;color:var(--muted)}
.process-timeline .timeline-heading{padding:11px 0;border-top:0}
.process-timeline .timeline-heading h4{margin:0}
/* Timeline cards share the native modal surfaces and use a type accent. */
.process-history-timeline .timeline-list{
 --history-date-width:89px;
 --history-track-width:38px;
 --history-card-base:color-mix(in srgb,var(--md-panel,var(--soft)) 70%,var(--paper));
 --history-motion:#147859;--history-publication:#966316;--history-document:#6351a4;
 --history-internal:#266d94;--history-derived:#567064;
 display:grid;gap:10px;padding:0
}
[data-theme=dark] .process-history-timeline .timeline-list{
 --history-card-base:color-mix(in srgb,var(--md-panel,var(--soft)) 35%,#203b37);
 --history-motion:#74deb4;--history-publication:#f2cb80;--history-document:#c8bef8;
 --history-internal:#a2d7f2;--history-derived:#b1d4c4
}
.process-history-timeline .history-entry{
 --history-accent:var(--history-derived);
 --history-border:color-mix(in srgb,var(--history-accent) 36%,var(--line));
 --history-card-start:color-mix(in srgb,var(--history-accent) 10%,var(--history-card-base));
 display:grid;grid-template-columns:var(--history-date-width) var(--history-track-width) minmax(0,1fr);
 align-items:start;border:0;padding:0
}
.process-history-timeline .history-entry--movement{--history-accent:var(--history-motion)}
.process-history-timeline .history-entry--publication{--history-accent:var(--history-publication)}
.process-history-timeline .history-entry--document{--history-accent:var(--history-document)}
.process-history-timeline .history-entry--internal{--history-accent:var(--history-internal)}
.history-entry:not(:last-child)::before{
 content:"";position:absolute;z-index:0;top:23px;bottom:-32px;width:2px;
 left:calc(var(--history-date-width) + var(--history-track-width) / 2 - 1px);
 background:linear-gradient(var(--history-accent),color-mix(in srgb,var(--history-motion) 45%,transparent))
}
.history-entry-date{
 padding:14px 3px 0 0;color:var(--ink);font-size:14px;font-weight:700;
 font-variant-numeric:tabular-nums;line-height:1.4
}
.history-entry-marker{
 position:relative;z-index:1;display:grid;place-items:center;justify-self:center;
 width:24px;height:24px;margin-top:11px;border-radius:50%;
 background:linear-gradient(135deg,var(--history-card-start),var(--history-card-base));
 border:1px solid var(--history-border);color:var(--history-accent);
 box-shadow:0 0 0 3px color-mix(in srgb,var(--history-accent) 14%,transparent)
}
.history-entry-marker svg{width:13px;height:13px}
.history-entry-card{
 position:relative;min-width:0;padding:10px 13px;border:1px solid var(--history-border);border-radius:11px;
 background:linear-gradient(113deg,var(--history-card-start),var(--history-card-base))
}
.history-entry-card::before{
 content:"";position:absolute;top:17px;left:-5px;width:8px;height:8px;transform:rotate(45deg);
 background:var(--history-card-start);border-bottom:1px solid var(--history-border);
 border-left:1px solid var(--history-border)
}
.history-entry .history-entry-type{
 display:inline-block;margin:0 0 4px;padding:1px 7px;border:1px solid var(--history-border);
 border-radius:7px;background:color-mix(in srgb,var(--history-accent) 12%,transparent);
 color:var(--ink);font-size:12px;font-weight:650;line-height:1.5
}
[data-theme=dark] .history-entry :is(.history-entry-date,.history-entry-type){color:#fff}
.history-entry-summary{margin:2px 0 4px;color:var(--ink);font-size:13px;font-weight:600;overflow-wrap:anywhere}
.history-entry .timeline-body{font-size:13px;line-height:1.6;color:var(--ink)}
.history-text-preview{
 display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:var(--history-visible-lines,3);overflow:hidden
}
.history-text-toggle{min-height:28px;margin-top:3px;padding:2px 0;color:var(--history-accent);font-weight:650}
.history-text-toggle[hidden]{display:none}
.history-entry-document{display:inline-block;margin-top:6px}
@media(max-width:600px){
 .process-history-timeline .timeline-list{--history-date-width:0px;--history-track-width:30px;gap:8px}
 .history-entry-marker{grid-area:1 / 2}
 .history-entry-card{grid-area:1 / 3;padding:34px 10px 9px}
 .history-entry-date{grid-area:1 / 3;position:relative;z-index:2;margin:9px 10px 0;padding:0;font-size:13px;pointer-events:none}
}
.timeline-actions,.history-filter-actions{display:flex;align-items:center;gap:6px}
.history-filter-control{position:relative}
.history-filter-active{width:6px;height:6px;border-radius:50%;background:currentColor}
.history-filters{
 position:absolute;top:calc(100% + 5px);right:-72px;z-index:6;
 width:min(320px,calc(100vw - 88px));padding:13px;border:1px solid var(--line);
 border-radius:12px;background:var(--panel,#fff);color:var(--ink);box-shadow:0 10px 28px #10261e33
}
.history-filters[hidden]{display:none}
.history-filter-period,.process-editor-new-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.history-filter-period input{width:100%;min-width:0}
.history-filter-actions{justify-content:flex-end}
.process-editor-dialog{width:min(900px,calc(100vw - 28px));max-width:none}
.process-editor-dialog[open]{display:flex;flex-direction:column;overflow:hidden}
.process-editor-dialog .dialog-header{flex:none}
.process-editor-dialog .dialog-body{min-height:0;display:flex;flex-direction:column;overflow:hidden;padding-bottom:0}
.process-editor-dialog form{min-height:0;display:flex;flex-direction:column;gap:0}
.process-editor-scroll{min-height:0;overflow:auto;overscroll-behavior:contain;padding:0 4px 15px}
.process-editor-footer{flex:none;padding:10px 0 15px;border-top:1px solid var(--line)}
.process-editor-footer .form-error:empty{display:none}
.process-editor-footer .form-footer{margin-top:0}
.process-editor-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.process-editor-heading h3{margin:0;font-size:1rem}
.process-editor-timeline [data-editor-loading]{font-size:13px;color:var(--muted)}
.process-editor-event{
 margin:8px 0;border:1px solid var(--line);border-radius:9px;
 background:color-mix(in srgb,var(--soft),transparent 55%);overflow-wrap:anywhere
}
.process-editor-event summary{padding:9px 12px;cursor:pointer}
.process-editor-event summary small{display:block;margin:3px 0 0 16px;color:var(--muted)}
.process-editor-event [data-event-fields],.process-editor-new{padding:10px 12px}
.process-editor-event textarea{resize:vertical}
@media(max-width:560px){
 .process-heading>small{order:1;width:100%;margin-left:0}
 .process-heading>small+.process-heading-actions{margin-left:auto}
 .history-filters{width:min(300px,calc(100vw - 64px));right:-65px}
 .timeline-actions{gap:0}
 .timeline-actions .quiet{padding-inline:5px}
}
