/* Home and Curator: Home's cards, Curator's status, tabs (review, intake, chat, settings) and dialogs. */

/* Home */
.hm { max-width: 1100px; margin: 0 auto; }
.hm-hello h1 { font-size: 26px; }
.hm-hello p { margin-top: 4px; color: var(--muted); font-size: 13.5px; }
.hm-needs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 22px 0 26px; }
.hm-need { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 4px 12px; padding: 16px; border-radius: var(--r-card); border: 1px solid var(--line-2); background: var(--panel); text-align: left; transition: border-color .15s, background-color .15s; }
.hm-need:hover { border-color: var(--line-3); background: var(--panel-2); }
.hm-need-ico { grid-row: span 2; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-text); }
.hm-need-ico .ico { width: 18px; height: 18px; }
.hm-need.is-calm .hm-need-ico { background: var(--hover); color: var(--muted); }
.hm-need b { display: block; font-size: 15px; }
.hm-need small { color: var(--muted); font-size: 12.5px; }
.hm-need i { grid-column: 2; display: inline-flex; align-items: center; gap: 4px; color: var(--accent-text); font-size: 12px; font-style: normal; font-weight: 600; }
.hm-need i .ico { width: 13px; height: 13px; transition: transform .2s var(--ease); }
.hm-need:hover i .ico[data-ico="arrow-right"], .hm-need:hover i .ico[data-ico="chevron-right"] { transform: translateX(2px); }
.hm-cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.hm-card { padding: 6px 18px 16px; border-radius: var(--r-card); border: 1px solid var(--line); background: var(--panel); }
.hm-card-head { display: flex; align-items: center; justify-content: space-between; height: 46px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.hm-card-head b { font-size: 14px; }
.hm-act { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 0; text-align: left; }
.hm-act + .hm-act { border-top: 1px solid var(--line); }
button.hm-act:hover .hm-act-main b { color: var(--accent-text); }
.hm-act-ico { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: var(--hover); color: var(--muted); flex: none; }
.hm-act-ico .ico { width: 15px; height: 15px; }
.hm-act-main { display: grid; flex: 1; min-width: 0; }
.hm-act-main b { font-weight: 500; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color .15s; }
.hm-act-main small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-spaces { display: grid; gap: 6px; padding-top: 8px; }
.hm-sp { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 8px; border: 1px solid var(--line); text-align: left; transition: border-color .15s, background-color .15s; }
.hm-sp:hover { border-color: var(--line-3); background: var(--hover); }
.hm-sp > .ico { width: 18px; height: 18px; color: var(--c); flex: none; }
.hm-sp span { display: grid; min-width: 0; }
.hm-sp b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-sp small { color: var(--muted); font-size: 12px; }
.hm-apps { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.hm-apps > span { color: var(--muted); font-size: 12px; margin-right: 4px; }
.hm-app { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line-2); font-size: 12.5px; font-weight: 600; color: var(--text-2); transition: border-color .15s, background-color .15s; }
.hm-app:hover { border-color: var(--line-3); background: var(--hover); }
.hm-app .ico { width: 14px; height: 14px; color: var(--muted); }
.hm-none { padding: 18px 0 8px; color: var(--muted); font-size: 13px; }

/* Curator: head and status */
.cu { max-width: 1100px; margin: 0 auto; }
.cu-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cu-head h1 { font-size: 26px; }
.cu-head p { margin-top: 4px; max-width: 560px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.cu-run { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); }
.cu-run > span:nth-child(2) { display: grid; }
.cu-run b { display: block; font-size: 13px; }
.cu-run small { color: var(--muted); font-size: 12px; }
.cu-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--line-3); box-shadow: 0 0 0 3px var(--hover); flex: none; }
.cu-dot.is-running, .cu-dot.is-answering, .cu-dot.is-compacting { background: #4ac578; box-shadow: 0 0 0 3px rgba(74, 197, 120, .2); animation: cu-pulse 1.4s ease-in-out infinite; }
.cu-dot.is-off { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 20%, transparent); }
@keyframes cu-pulse { 50% { box-shadow: 0 0 0 6px rgba(74, 197, 120, .08); } }
.cu .btn:disabled, .cu-dlg .btn:disabled { opacity: .45; cursor: default; }
.cu-tabs { margin: 22px 0 18px; }
.cu-tabs button { gap: 7px; }
.cu-tabs .ico { width: 15px; height: 15px; }
.cu-n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }

/* Lists */
.cu-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.cu-filters button { height: 28px; padding: 0 12px; border-radius: 14px; border: 1px solid var(--line-2); color: var(--text-2); font-size: 12.5px; font-weight: 500; transition: border-color .15s, background-color .15s, color .15s; }
.cu-filters button:hover { border-color: var(--line-3); }
.cu-filters button.is-on { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: var(--accent-soft); color: var(--accent-text); }
.cu-sub { display: flex; align-items: center; gap: 8px; margin: 18px 0 8px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.cu-sub .ico { width: 15px; height: 15px; }
.cu-list { border-radius: var(--r-card); border: 1px solid var(--line); background: var(--panel); overflow: hidden; }
.cu-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; text-align: left; transition: background-color .15s; }
.cu-row + .cu-row { border-top: 1px solid var(--line); }
button.cu-row:hover, .cu-row.is-click:hover { background: var(--hover); }
.cu-row.is-click { cursor: pointer; }
.cu-row:focus-visible, .cu-row.is-click:focus-visible { outline: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: -1px; border-radius: 0; background: var(--hover); }
.cu-savebar { position: sticky; bottom: 16px; z-index: 5; display: flex; align-items: center; gap: 8px; width: max-content; max-width: 100%; margin: 16px 0 0 auto; padding: 8px 8px 8px 16px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--menu); box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .2s, transform .25s var(--ease); }
.cu-savebar.is-on { opacity: 1; transform: none; pointer-events: auto; }
.cu-savebar > span { display: inline-flex; align-items: center; gap: 8px; margin-right: 8px; color: var(--text-2); font-size: 13px; font-weight: 600; }
.cu-savebar > span .ico { width: 15px; height: 15px; color: var(--accent-text); }
.cu-row > .ico { width: 16px; height: 16px; color: var(--muted); flex: none; }
.cu-kind { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--hover); color: var(--accent-text); flex: none; }
.cu-kind .ico { width: 16px; height: 16px; }
.cu-main { display: grid; gap: 3px; flex: 1; min-width: 0; }
.cu-main b { font-weight: 500; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cu-main small { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cu-main small .ico { width: 13px; height: 13px; flex: none; }
.cu-row.is-ph .cu-main { gap: 6px; }
.cu-space { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px 0 6px; border-radius: 6px; background: color-mix(in srgb, var(--c) 13%, transparent); color: var(--text); font-size: 12px; font-weight: 500; white-space: nowrap; flex: none; }
.cu-space .ico { width: 13px; height: 13px; color: var(--c); }
.cu-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cu-signin { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.cu-steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.cu-steps li { display: flex; align-items: center; gap: 12px; counter-increment: step; }
.cu-steps li::before { content: counter(step); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-size: 12px; font-weight: 700; flex: none; }
.cu-steps li > span { display: grid; gap: 2px; flex: 1; min-width: 0; }
.cu-steps small { color: var(--muted); font-size: 12.5px; }
.cu-steps .btn { flex: none; }
.cu-row-chips { flex-wrap: nowrap; flex: none; }
@media (max-width: 640px) { .cu-row-chips { display: none; } }
.cu-out { display: flex; gap: 4px; min-width: 0; max-width: 280px; color: var(--text-2); font-size: 12.5px; }
.cu-out-note { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cu-out-note .ico { width: 14px; height: 14px; margin-right: 5px; vertical-align: -2px; color: var(--muted); }
.cu-ptag { display: inline-flex; flex: none; white-space: nowrap; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-text); font: 500 12px var(--mono); transition: background-color .15s; }
.cu-ptag .ico { width: 12px; height: 12px; }
.cu-ptag:hover { background: color-mix(in srgb, var(--accent) 28%, transparent); }
.cu-state { display: inline-flex; align-items: center; gap: 5px; min-width: 104px; justify-content: flex-end; color: var(--muted); font-size: 12.5px; font-weight: 500; white-space: nowrap; flex: none; }
.cu-state .ico { width: 14px; height: 14px; }
.cu-state.is-curated, .cu-state.is-skipped, .cu-state.is-merged { color: #4ac578; }
.cu-state.is-waiting, .cu-state.is-open, .cu-state.is-flagged { color: var(--warn); }
.cu-who { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 12px; background: var(--hover); color: var(--text); font-size: 12px; font-weight: 600; white-space: nowrap; flex: none; }
.cu-who .ico { width: 14px; height: 14px; color: var(--muted); }
.cu-who.is-curator { background: var(--accent-soft); color: var(--accent-text); }
.cu-who.is-curator .ico, .cu-who.is-auto .ico { color: inherit; }
.cu-who.is-auto { color: var(--warn); }
.cu-handle { display: flex; align-items: center; gap: 8px; }
.cu-handle input { flex: 1; min-width: 0; }
.cu-empty { display: grid; justify-items: center; gap: 6px; padding: 40px 24px; color: var(--muted); font-size: 13px; text-align: center; }
.cu-empty > .ico { width: 24px; height: 24px; margin-bottom: 4px; color: var(--line-3); }
.cu-empty b { color: var(--text); font-size: 14px; font-weight: 600; }
.cu-empty span { max-width: 520px; line-height: 1.5; }
.cu-copy { width: auto; max-width: 100%; margin-top: 10px; font-family: inherit; font-weight: 600; }
.cu-flow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 14px 16px; border-radius: var(--r-card); border: 1px dashed var(--line-3); }
.cu-step { display: flex; align-items: center; gap: 8px; flex: 1 1 150px; padding: 8px 12px; border-radius: 8px; background: var(--panel); }
.cu-step .ico { width: 16px; height: 16px; color: var(--accent-text); flex: none; }
.cu-step span { display: grid; }
.cu-step b { font-size: 12.5px; }
.cu-step small { color: var(--muted); font-size: 11.5px; }
.cu-arrow { display: grid; place-items: center; color: var(--muted); }
.cu-arrow .ico { width: 14px; height: 14px; }
.cu-note { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.cu-note .ico { width: 15px; height: 15px; flex: none; }
.cu-note.is-warn, .cu-note.is-warn .ico { color: var(--warn); }

/* Chat */
.cu-chat { display: flex; flex-direction: column; height: min(600px, calc(100dvh - 300px)); min-height: 420px; border-radius: var(--r-card); border: 1px solid var(--line); background: var(--panel); overflow: hidden; }
.cu-ctx { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cu-ctx > span:first-child { display: flex; align-items: center; gap: 8px; margin-right: auto; min-width: 0; }
.cu-ctx > span:first-child .ico { width: 16px; height: 16px; color: var(--accent-text); flex: none; }
.cu-ctx b { font-size: 13px; }
.cu-ctx small { color: var(--muted); font-size: 12px; }
.cu-meter { width: 120px; height: 6px; border-radius: 3px; background: var(--hover); overflow: hidden; }
.cu-meter i { display: block; height: 100%; border-radius: 3px; background: var(--accent); transition: width .4s var(--ease); }
.cu-log { flex: 1; overflow-y: auto; scrollbar-gutter: stable; padding: 16px calc(20px - var(--sb)) 16px 20px; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 10px; }
.cu-sys { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 12px; text-align: center; }
.cu-sys .ico { width: 13px; height: 13px; flex: none; }
.cu-sys small { margin-left: 4px; opacity: .8; }
.cu-sys.is-compact { padding: 6px; border-radius: 8px; border: 1px dashed var(--line-3); }
.cu-sys.is-error, .cu-sys.is-error .ico { color: var(--warn); }
.cu-tool { display: flex; align-items: center; gap: 8px; width: fit-content; max-width: 100%; padding: 6px 10px; border-radius: 7px; background: var(--code); color: var(--text-2); font: 12px var(--mono); }
.cu-tool span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cu-tool .ico { width: 13px; height: 13px; color: var(--muted); flex: none; }
.cu-msg { max-width: 78%; padding: 10px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.55; overflow-wrap: anywhere; }
.cu-msg small { display: block; margin-top: 4px; color: var(--muted); font-size: 11.5px; }
.cu-msg.is-bot { background: var(--panel-2); border-top-left-radius: 4px; }
.cu-msg.is-me { justify-self: end; background: var(--accent-soft); color: var(--text); border-top-right-radius: 4px; }
.cu-msg.is-me small { text-align: right; }
.cu-msg.is-typing { padding: 12px 16px; }
.cu-msg.is-live { display: grid; gap: 8px; min-width: 180px; }
.cu-now { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; }
.cu-msg.is-live p[hidden] { display: none; }
.cu-msg.is-live p { white-space: pre-wrap; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: cu-dot 1.2s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes cu-dot { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
.cu-compose { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.cu-compose input { flex: 1; min-width: 0; height: 34px; padding: 0 12px; border-radius: var(--r-in); border: 1px solid var(--line-2); background: var(--input); color: var(--text); font-size: 13px; }
.cu-compose input:focus { border-color: var(--accent); outline: none; }
.cu-compose input:disabled { opacity: .6; }
.cu-empty.is-chat { padding: 60px 24px; }

/* Settings */
.cu-settings { display: grid; gap: 14px; }
.cu-sec { padding: 4px 18px 8px; border-radius: var(--r-card); border: 1px solid var(--line); background: var(--panel); }
.cu-sec h3 { padding: 12px 0 6px; font-size: 13px; color: var(--text); }
.cu-set { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 56px; padding: 8px 0; }
.cu-set + .cu-set { border-top: 1px solid var(--line); }
.cu-set > span:first-child { display: grid; gap: 2px; min-width: 0; }
.cu-set b { font-weight: 500; font-size: 13.5px; }
.cu-set small { color: var(--muted); font-size: 12.5px; }
.cu-set .switch { width: 28px; height: 16px; border-radius: 8px; }
.cu-set .switch span { top: 2px; left: 2px; width: 12px; height: 12px; }
.cu-set .switch[aria-checked="true"] span { transform: translateX(12px); }
.cu-set .switch:disabled, .cu-segs button:disabled, .cu-dd .dp-chipbtn:disabled { opacity: .55; cursor: default; }
.cu-segs { display: inline-flex; gap: 2px; padding: 2px; border-radius: 8px; background: var(--seg); flex: none; }
.cu-segs button { height: 26px; padding: 0 10px; border-radius: 6px; color: var(--muted); font-size: 12.5px; font-weight: 500; white-space: nowrap; transition: color .15s, background-color .15s; }
.cu-segs button:not(.is-on):not(:disabled):hover { color: var(--text); }
.cu-segs button.is-on { background: var(--accent-soft); color: var(--accent-text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); }
.cu-dd { flex: none; }
.cu-dd .dp-chipbtn { margin: 0; padding: 0 8px 0 10px; }
.cu-dd .dp-chipbtn .ico { order: 2; transition: transform .2s; }
.cu-dd.is-open .dp-chipbtn .ico { transform: rotate(180deg); }
.cu-dd .dd-menu { left: auto; right: 0; min-width: 170px; transform-origin: top right; }
.cu-val { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); white-space: nowrap; flex: none; }
.cu-val .ico { width: 15px; height: 15px; color: var(--muted); }

/* Dialogs */
.cu-dlg.dlg-compact { width: min(640px, calc(100vw - 32px)); }
.cu-dlg-body { padding: 8px calc(18px - var(--sb)) 14px 18px; gap: 0; }
.cu-dlg-body > .cu-note { margin: 8px 0; }
.cu-dlg-ph { display: grid; gap: 10px; padding: 12px 0; }
.cu-why { white-space: normal; line-height: 20px; }
.cu-diff { margin-top: 8px; padding: 10px 0; border-radius: 8px; background: var(--code); font: 12.5px/1.7 var(--mono); overflow-x: auto; }
.cu-diff div { display: flex; gap: 10px; padding: 0 12px; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.cu-diff i { width: 10px; font-style: normal; color: var(--muted); flex: none; }
.cu-diff .d-add { background: rgba(74, 197, 120, .12); color: var(--text); }
.cu-diff .d-del { background: rgba(248, 113, 113, .1); color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(248, 113, 113, .5); }
.cu-edit { width: 100%; margin-top: 8px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--input); color: var(--text); font: 12.5px/1.6 var(--mono); resize: vertical; }
.cu-edit:focus { border-color: var(--accent); outline: none; }
.cu-refuse { margin-top: 12px; }
.cu-dlg-foot { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); flex: none; }
.cu-dlg-foot:empty { display: none; }
.cu-text { margin-top: 10px; padding: 12px 14px; border-radius: 8px; background: var(--code); color: var(--text-2); font: 12.5px/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 760px) {
	.hm-cols { grid-template-columns: minmax(0, 1fr); }
	.cu-tabs { display: flex; width: 100%; }
	.cu-tabs button { flex: 1; justify-content: center; padding: 0 6px; }
	.cu-tabs button > span { display: none; }
	.cu-row { gap: 10px; padding: 12px; flex-wrap: wrap; }
	.cu-main { flex-basis: calc(100% - 46px); }
	.cu-row > .ico { display: none; }
	.cu-row .cu-space, .cu-out, .cu-row .cu-state, .cu-row .cu-who { margin-left: 42px; }
	.cu-row .cu-who + .cu-state { margin-left: 8px; }
	.cu-row .cu-space + .cu-who { margin-left: 0; }
	.cu-handle { flex-wrap: wrap; }
	.cu-handle input { flex-basis: 100%; }
	.cu-out:empty { display: none; }
	.cu-row .cu-space + .cu-state { margin-left: 8px; }
	.cu-row .cu-space + .cu-space { margin-left: 0; }
	.cu-state { min-width: 0; justify-content: flex-start; }
	.cu-out:not(:empty) { flex-basis: calc(100% - 42px); max-width: none; }
	.cu-set { flex-wrap: wrap; gap: 10px; }
	.cu-msg { max-width: 92%; }
	.cu-arrow { display: none; }
	.cu-head > [data-slot] { width: 100%; }
	.cu-run { width: 100%; }
	.cu-ctx > span:first-child { flex-basis: 100%; }
	.cu-ctx .cu-meter { flex: 1; }
	.cu-ctx-at { display: none; }
	.cu-set:has(> .switch) { flex-wrap: nowrap; }
	.cu-run .btn { margin-left: auto; }
	.cu-dlg-foot { flex-wrap: wrap; }
}

/* A script proposal's files */
.cu-files { display: grid; gap: 10px; margin-top: 4px; }
.cu-files .cu-sub { margin: 14px 0 0; }
.cu-file { display: grid; gap: 0; }
.cu-file-head { display: flex; align-items: center; gap: 8px; padding: 6px 2px; }
.cu-file-head .ico { width: 15px; height: 15px; color: var(--muted); flex: none; }
.cu-file-head b { font: 500 12.5px var(--mono); }
.cu-file-change { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 500; }
.cu-file-change.is-new { color: #4ac578; }
.cu-file-change.is-changed { color: var(--accent-text); }
.cu-file-change.is-removed { color: var(--warn); }
.cu-file .cu-diff { margin-top: 0; max-height: 360px; overflow: auto; }
@media (max-width: 640px) {
	.cu-savebar { margin-right: 68px; max-width: calc(100% - 68px); bottom: 20px; padding-left: 12px; }
	.cu-savebar > span { font-size: 12px; margin-right: 2px; }
	.cu-savebar > span .ico { display: none; }
}

/* The History table and the dialogs every curator record opens in: the band, the steps, the sections */
/* The bar over the table: who, and the dates */
.hx-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 18px 0 12px; }
.hx-bar .cu-filters { margin: 0; }
.hx-range .dp-chipbtn { height: 32px; gap: 7px; }
.hx-range .dp-chipbtn > .ico:first-child { width: 15px; height: 15px; color: var(--muted); }
.hx-range .dd-menu { right: 0; left: auto; min-width: 240px; }
.hx-hr { border: 0; height: 1px; margin: 4px 6px; background: var(--line); }
.hx-custom { display: grid; gap: 6px; padding: 6px 10px 8px; }
.hx-custom small { color: var(--muted); font-size: 12px; }
.hx-custom > div { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.hx-date { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--input); color: var(--text); font-size: 12.5px; }
.hx-date .ico { width: 14px; height: 14px; color: var(--muted); }

/* The table: fixed columns, so nothing moves from row to row */
.hx-table { padding: 0; overflow: hidden; }
.hx-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 170px 130px 112px 24px; align-items: center; gap: 16px; width: 100%; min-height: 60px; padding: 10px 16px; text-align: left; border-top: 1px solid var(--line); transition: background-color .15s; }
.hx-th { min-height: 40px; border-top: 0; color: var(--muted); font: 600 10.5px var(--mono); text-transform: uppercase; letter-spacing: .08em; background: var(--panel-2); }
button.hx-row:hover { background: var(--hover); }
.hx-when { display: grid; }
.hx-when b { font-size: 13px; font-weight: 600; }
.hx-when small, .hx-what small { color: var(--muted); font-size: 12px; }
.hx-what { display: flex; align-items: center; gap: 12px; min-width: 0; }
.hx-what > span { display: grid; min-width: 0; }
.hx-what b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; font-weight: 600; }
.hx-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--hover); color: var(--text-2); flex: none; }
.hx-ico .ico { width: 16px; height: 16px; }
.hx-where, .hx-whocol { min-width: 0; overflow: hidden; }
.hx-res { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.hx-res .ico { width: 14px; height: 14px; }
.hx-res.is-ok { color: #4ac578; }
.hx-res.is-bad { color: var(--danger); }
.hx-res.is-mute { color: var(--muted); }
.hx-go { color: var(--muted); display: grid; place-items: center; }
.hx-go .ico { width: 16px; height: 16px; }

.hx-pages { display: flex; align-items: center; gap: 4px; margin-top: 12px; }
.hx-count { color: var(--muted); font-size: 12.5px; }
.hx-pg { min-width: 30px; height: 30px; padding: 0 8px; border-radius: 8px; color: var(--muted); font-size: 12.5px; font-weight: 600; transition: background-color .15s, color .15s; }
.hx-pg:hover { background: var(--hover); color: var(--text); }
.hx-pg.is-on { background: var(--accent-soft); color: var(--accent-text); }

/* The dialog: the band first, then the steps, then what changed */
.hx-dlg { width: min(680px, calc(100vw - 32px)); }
.hx-dlg .dlg-title small { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.hx-dlg .dlg-title small > .ico { width: 14px; height: 14px; margin-right: -4px; }
.hx-body { gap: 20px; }
.hx-band { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; border: 1px solid; }
.hx-band > span:nth-child(2) { display: grid; flex: 1; gap: 2px; font-size: 13.5px; }
.hx-band b { font-size: 14px; }
.hx-band small { color: var(--muted); font-size: 12px; white-space: nowrap; align-self: flex-start; }
.hx-band-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.hx-band-ico .ico { width: 18px; height: 18px; }
.hx-band.is-ok { border-color: color-mix(in srgb, #4ac578 35%, var(--line)); background: color-mix(in srgb, #4ac578 7%, transparent); }
.hx-band.is-ok .hx-band-ico, .hx-band.is-ok b { color: #4ac578; }
.hx-band.is-ok .hx-band-ico { background: color-mix(in srgb, #4ac578 15%, transparent); }
.hx-band.is-bad { border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); background: color-mix(in srgb, var(--danger) 7%, transparent); }
.hx-band.is-bad .hx-band-ico, .hx-band.is-bad b { color: var(--danger); }
.hx-band.is-bad .hx-band-ico { background: color-mix(in srgb, var(--danger) 15%, transparent); }
.hx-band.is-mute { border-color: var(--line-2); background: var(--hover); }
.hx-band.is-mute .hx-band-ico { background: var(--hover-strong); color: var(--muted); }

.hx-sec { display: grid; gap: 10px; }
.hx-sec h3 { margin: 0; color: var(--muted); font: 600 10.5px var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.hx-steps { list-style: none; margin: 0; padding: 0; display: grid; }
.hx-steps li { position: relative; display: flex; gap: 12px; padding-bottom: 14px; }
.hx-steps li:not(.is-last)::before { content: ''; position: absolute; left: 13px; top: 30px; bottom: 2px; width: 2px; border-radius: 1px; background: var(--line-2); }
.hx-steps li.is-last { padding-bottom: 0; }
.hx-step-ico { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--hover-strong); color: var(--text-2); flex: none; }
.hx-step-ico .ico { width: 14px; height: 14px; }
.hx-steps li > span:last-child { display: grid; gap: 1px; padding-top: 4px; font-size: 13.5px; }
.hx-steps small { color: var(--muted); font-size: 12.5px; }

.hx-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hx-side { border-radius: 12px; border: 1px solid var(--line-2); overflow: hidden; transition: opacity .2s; }
.hx-side.is-dropped { opacity: .6; }
.hx-side-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.hx-side-head .ico { width: 15px; height: 15px; color: var(--muted); }
.hx-kept { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; color: #4ac578; font-size: 12px; font-weight: 700; }
.hx-dropped { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 600; }
.hx-side pre, .hx-src pre { margin: 0; padding: 12px; white-space: pre-wrap; font: 12.5px/1.6 var(--mono); color: var(--text-2); }
.hx-kv { display: grid; grid-template-columns: 110px 1fr; gap: 10px 14px; padding: 14px; border-radius: 12px; border: 1px solid var(--line-2); font-size: 13.5px; }
.hx-kv > span { color: var(--muted); }
.hx-kv b { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; }
.hx-kv b .ico { width: 15px; height: 15px; color: var(--accent-text); flex: none; }
.hx-src { border-radius: 12px; border: 1px solid var(--line-2); }
.hx-src summary { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; list-style: none; cursor: pointer; color: var(--text-2); font-size: 13px; font-weight: 600; }
.hx-src summary::-webkit-details-marker { display: none; }
.hx-src summary .ico { width: 15px; height: 15px; color: var(--muted); }
.hx-src summary .ico:last-child { margin-left: auto; transition: transform .2s var(--ease); }
.hx-src[open] summary .ico:last-child { transform: rotate(180deg); }
.hx-src pre { border-top: 1px solid var(--line); }

@media (max-width: 760px) {
	.hx-th { display: none; }
	.hx-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'what what' 'where result' 'when who'; gap: 8px 10px; }
	.hx-what { grid-area: what; }
	.hx-where { grid-area: where; }
	.hx-result { grid-area: result; justify-self: end; }
	.hx-when { grid-area: when; display: flex; gap: 6px; align-items: baseline; }
	.hx-whocol { grid-area: who; justify-self: end; }
	.hx-go { display: none; }
	.hx-sides { grid-template-columns: 1fr; }
	.hx-band { flex-wrap: wrap; }
	.hx-band small { order: -1; width: 100%; padding-left: 46px; }
	.hx-pages .hx-pg:not(.is-on) { display: none; }
}

.hx-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; color: var(--muted); }
.hx-sub > .ico { width: 14px; height: 14px; margin-right: -4px; }
.hx-sub .cu-space, .hx-sub .cu-chips { font-size: 12px; }
.hx-steps b { display: flex; align-items: baseline; gap: 8px; font-weight: 600; }
.hx-steps time { color: var(--muted); font-size: 12px; font-weight: 500; }
.hx-steps small .cu-chips { display: inline-flex; margin-top: 4px; }
.hx-body .cu-diff, .hx-body .cu-files { margin: 0; }
.hx-body .cu-handle { margin: 0; }
.hx-sec h3 { display: flex; align-items: center; gap: 8px; }
#dlg-conflict.hx-dlg { width: min(860px, calc(100vw - 32px)); }
.hx-rows { display: block; }
.hx-rows > .cu-empty { padding: 40px 16px; }
.cu-who.is-auto { color: var(--warn); }

/* The month under the date presets */
.hx-range .dd-menu { width: 268px; }
.hx-cal { display: grid; gap: 6px; }
.hx-cal-head { display: flex; align-items: center; justify-content: space-between; }
.hx-cal-head b { font-size: 13px; }
.hx-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.hx-cal-grid small { text-align: center; color: var(--muted); font-size: 11px; padding: 2px 0; }
.hx-day { height: 30px; border-radius: 8px; font-size: 12.5px; color: var(--text-2); transition: background-color .12s, color .12s; }
.hx-day:hover:not(:disabled) { background: var(--hover-strong); color: var(--text); }
.hx-day:disabled { opacity: .35; cursor: default; }
.hx-day.is-today { box-shadow: inset 0 0 0 1px var(--line-3); }
.hx-day.is-on { background: var(--accent-soft); color: var(--text); border-radius: 0; }
.hx-day.is-end { background: var(--accent); color: #fff; border-radius: 8px; }
.hx-cal-hint { color: var(--muted); font-size: 11.5px; }

.hx-band.is-warn { border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); background: color-mix(in srgb, var(--warn) 8%, transparent); }
.hx-band.is-warn .hx-band-ico, .hx-band.is-warn b { color: var(--warn); }
.hx-band.is-warn .hx-band-ico { background: color-mix(in srgb, var(--warn) 16%, transparent); }
.hx-rows { transition: opacity .2s; }
.hx-rows.is-loading { opacity: .55; }
.hx-row.is-ph { pointer-events: none; }
.hx-gap { min-width: 18px; text-align: center; color: var(--muted); font-size: 12.5px; }
