/* Home and Curator: Home's cards; the Curator's inbox (rail, list, pane), its History, 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: 1440px; margin: 0 auto; }
.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; min-width: 0; }
.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); } }

/* Review's filters, and at the right end the Auto-accept switch and Accept all (when more than one proposal shows) */
.cu-auto { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 12.5px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.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-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-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-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-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 */
.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-ph { display: grid; gap: 10px; padding: 12px 0; }
.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; }

@media (max-width: 760px) {
	.hm-cols { grid-template-columns: minmax(0, 1fr); }
	.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-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-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-set { flex-wrap: wrap; gap: 10px; }
	.cu-run { width: 100%; }
	.cu-set:has(> .switch) { flex-wrap: nowrap; }
	.cu-run .btn { margin-left: auto; }
}
@media (max-width: 480px) {
	.cu-run { flex-wrap: wrap; row-gap: 10px; padding: 12px; }
	.cu-run > span:nth-child(2) { flex: 1 1 calc(100% - 24px); }
	.cu-run .btn { flex: 1 1 0; margin-left: 0; justify-content: center; }
}

/* 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 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: 0 0 14px; }
.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; }

/* 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); }
/* A row draws its keyboard focus inside itself (a tint and an accent bar on the left), so the table's edges never crop it, back from an opened proposal too */
.hx-row:focus-visible { outline: none; border-radius: 0; background: var(--hover); box-shadow: inset 3px 0 0 var(--accent); }
.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; }
/* Every row the same height: room for one line of title and two of description (cut after two), the text centred in it */
.hx-what { min-height: 57px; }
.hx-what small { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; line-height: 1.5; }
.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; min-height: 24px; display: flex; align-items: center; }
.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 */
dialog.dlg.hx-dlg { width: min(700px, calc(100vw - 24px)); }
.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-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-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-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; }

/* Review and Intake as lists; the question and intake dialogs */
.hx-ico.is-warn, .dlg-ico.is-warn { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
@keyframes rv-spin { to { transform: rotate(360deg); } }
.in-out { display: grid; gap: 8px; }
.rv-why { margin: 0; color: var(--text-2); font-size: 13.5px; line-height: 1.6; }
.rv-src { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); text-align: left; transition: border-color .15s, background-color .15s; }
button.rv-src:hover { border-color: var(--line-3); background: var(--hover); }
.rv-src > span:nth-child(2) { display: grid; flex: 1; min-width: 0; }
.rv-src b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-src small { color: var(--muted); font-size: 12px; }
.rv-src-go { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-text); font-size: 12.5px; font-weight: 600; flex: none; }
.rv-src-go .ico { width: 14px; height: 14px; }
.rv-list-facts { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; font-size: 13.5px; }
.rv-list-facts li { display: flex; gap: 9px; align-items: flex-start; }
.rv-list-facts .ico { width: 15px; height: 15px; margin-top: 3px; color: #4ac578; flex: none; }
.rv-list-facts .is-skip, .rv-list-facts .is-skip .ico { color: var(--muted); }
.rv-raw { margin: 0; padding: 14px; border-radius: 12px; background: var(--panel-2); white-space: pre-wrap; overflow-wrap: anywhere; font: 12.5px/1.6 var(--mono); color: var(--text-2); max-height: 360px; overflow-y: auto; }
.rv-acts { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.rv-quick { height: auto; min-height: 34px; padding: 6px 12px; border-color: color-mix(in srgb, var(--accent) 40%, var(--line-2)); }
.rv-quick small { color: var(--muted); font-weight: 500; margin-left: 4px; }
.rv-done { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 6px 12px; border-radius: 10px; background: color-mix(in srgb, #4ac578 10%, transparent); color: #4ac578; font-size: 13px; font-weight: 600; }
.rv-done .ico { width: 16px; height: 16px; flex: none; }
.rv-answer textarea { min-height: 72px; padding: 10px 12px; border-radius: var(--r-in); border: 1px solid var(--line-2); background: var(--input); color: var(--text); font: inherit; font-size: 13.5px; resize: vertical; }

@media (max-width: 520px) {
	dialog.dlg .dlg-foot { flex-wrap: wrap; }
	dialog.dlg .dlg-foot .grow { display: none; }
	dialog.dlg .dlg-foot .btn { flex: 1 1 auto; justify-content: center; }
}

/* The health check: the status box red, the band under the head, the check button */
.cu-dot.is-down { background: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 20%, transparent); }
.cu-check { flex: none; }

/* Curated items: their chip, and a request's two sides */
.cu-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cu-side { padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--hover); }
.cu-side-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 13px; }
.cu-side-head .ico { width: 16px; height: 16px; color: var(--muted); }
.cu-side ul { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 12.5px; line-height: 1.6; }
.cu-sec-line { margin: -2px 0 6px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }

@media (max-width: 640px) {
	.cu-sides { grid-template-columns: 1fr; }
}

/* Curator: the inbox. The rail with the two queues, a dense list, the picked item in the pane. */
.cr-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.cr-head h1 { font-size: 26px; }
.hb-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-weight: 600; font-size: 13px; transition: color .2s var(--ease); }
.hb-link:hover { color: var(--text); }
.hb-link .ico { width: 15px; height: 15px; }
.cr-inbox { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; height: calc(100vh - 166px); min-height: 520px; }
.wrap:has(.cr-inbox) { padding-bottom: 24px; }
.cr-main { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 16px; min-height: 0; }
.cr-main.is-span { display: block; overflow-y: auto; }
.cr-rail { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.cr-rail-s { display: flex; flex-direction: column; gap: 12px; flex: 1; min-height: 0; overflow-y: auto; }
.cr-sect { padding: 6px 10px 0; color: var(--muted); font: 600 10.5px var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.cr-status { display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 12px; border-radius: 12px; text-align: left; background: linear-gradient(110deg, color-mix(in srgb, var(--accent) 14%, var(--panel)) 0%, var(--panel) 70%); border: 1px solid var(--line); transition: border-color .2s var(--ease); }
.cr-status:hover, .cr-status.is-on { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.cr-status > span:not(.cr-orb) { display: grid; gap: 1px; flex: 1; min-width: 0; }
.cr-status b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-status small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-status > .ico { width: 16px; height: 16px; color: var(--muted); flex: none; }
.cr-status.is-down { background: linear-gradient(110deg, color-mix(in srgb, var(--danger) 14%, var(--panel)) 0%, var(--panel) 70%); }
.cr-orb { position: relative; display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); }
.cr-orb .ico { width: 17px; height: 17px; }
.is-busy .cr-orb::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--accent); animation: cr-spin 2.4s linear infinite; }
.is-down .cr-orb { background: var(--danger-soft); color: var(--danger); }
.cr-orb.is-big { width: 48px; height: 48px; }
.cr-orb.is-big .ico { width: 22px; height: 22px; }
@keyframes cr-spin { to { transform: rotate(360deg); } }
.cr-folders { display: grid; gap: 2px; }
.cr-folders.is-more { padding-top: 12px; border-top: 1px solid var(--line-2); }
.cr-folders button { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: var(--r-btn); color: var(--text-2); font-weight: 600; font-size: 13.5px; text-align: left; transition: background-color .2s var(--ease), color .2s var(--ease); }
.cr-folders button:hover { background: var(--hover); color: var(--text); }
.cr-folders button.is-on { background: var(--accent-soft); color: var(--accent-text); }
.cr-folders button .ico { width: 17px; height: 17px; flex: none; }
.cr-folders button span { flex: 1; white-space: nowrap; }
.cr-folders b { min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-size: 11.5px; line-height: 20px; text-align: center; }
.cr-folders b.is-mute { background: var(--hover-strong); color: var(--text-2); }
.cu-auto.cr-auto { justify-content: space-between; padding: 4px 10px; }
.cr-auto > span { display: inline-flex; align-items: center; gap: 8px; }
.cr-auto > span .ico { width: 16px; height: 16px; }
.cr-list { display: flex; flex-direction: column; padding: 0; overflow: hidden; min-height: 0; }
.cr-list-h { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); }
.cr-list-h > b { flex: none; font-size: 14px; white-space: nowrap; }
.cr-list-h small { min-width: 0; overflow: hidden; color: var(--muted); font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.cr-list-h > .cr-all { flex: none; margin-left: auto; }
.cr-list-h:has(.cr-all) .cr-hint { display: none; }
.cr-selbar { display: flex; align-items: center; gap: 8px; width: 100%; margin: -4px 0; }
.cr-selbar > b { flex: 1; font-size: 13.5px; }
.cr-selbar > small { flex: 1; }
.cr-why { flex: 1; min-width: 0; height: 32px; padding: 0 10px; border-radius: var(--r-btn); border: 1px solid var(--line-2); background: var(--bg); color: var(--text); font: inherit; font-size: 13px; }
.cr-rows { flex: 1; overflow-y: auto; scrollbar-gutter: stable; }
.cr-row { position: relative; display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); user-select: none; transition: background-color .2s var(--ease); }
.cr-row:hover { background: var(--hover); }
.cr-row.is-on { background: var(--accent-soft); }
.cr-row.is-sel { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.cr-row.is-on::before, .cr-row.is-sel::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.cr-row-t { display: grid; gap: 2px; flex: 1; min-width: 0; }
.cr-row-t b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-row-t small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-row-at { color: var(--muted); font: 500 11.5px var(--mono); flex: none; }
.cr-row-ico { --k: #a78bfa; display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 9px; background: color-mix(in srgb, var(--k) 16%, transparent); color: var(--k); }
.cr-row-ico .ico { width: 15px; height: 15px; }
.cr-row-ico.is-note, .cr-row-ico.is-due { --k: #e9c46a; }
.cr-row-ico.is-gap { --k: #fb923c; }
.cr-row-ico.is-ask { --k: #f472b6; }
.cr-row-ico.is-conflict { --k: #f87171; }
.cr-row-ico.is-raw { --k: #5fd4c4; }
.cr-row-ico.is-scratch { --k: #c4a7f0; }
.cr-row-ico.is-req { --k: #60a5fa; }
.cr-row-ico.is-archive { --k: #8f8c85; }
.cr-pane { display: flex; flex-direction: column; padding: 20px 22px 0; min-height: 0; overflow: hidden; }
.cr-pane-h { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.cr-pane-h > div { display: grid; gap: 4px; min-width: 0; }
.cr-title { font-size: 21px; line-height: 1.3; letter-spacing: -.01em; overflow-wrap: anywhere; }
.cr-pane-b { display: grid; align-content: start; flex: 1; overflow-y: auto; min-height: 0; margin: 0 -22px; padding: 0 22px 18px; }
.cr-pane-f { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 -22px; padding: 14px 22px; border-top: 1px solid var(--line); }
.cr-pane-f:not(:has(.btn)) { display: none; }
.cr-blank { min-height: 100%; }
.cr-empty { display: grid; justify-items: center; align-content: center; gap: 8px; min-height: 420px; padding: 40px 24px; text-align: center; }
.cr-empty-art { display: grid; place-items: center; width: 76px; height: 76px; margin-bottom: 8px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--ok) 26%, transparent), color-mix(in srgb, var(--ok) 8%, transparent) 70%); color: var(--ok); box-shadow: 0 0 0 10px color-mix(in srgb, var(--ok) 6%, transparent); }
.cr-empty-art .ico { width: 34px; height: 34px; }
.cr-empty > b { font-size: 19px; }
.cr-empty > small { max-width: 380px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.cr-today { display: flex; margin: 18px 0 6px; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.cr-today span { display: grid; gap: 1px; padding: 12px 22px; }
.cr-today span + span { border-left: 1px solid var(--line); }
.cr-today b { display: flex; align-items: center; justify-content: center; height: 28px; font-size: 20px; line-height: 28px; }
.cr-today small { color: var(--muted); font-size: 12px; }
.cr-empty-a { display: flex; gap: 8px; margin-top: 6px; }
.cr-hist { padding-right: 4px; }
.cr-settings { max-width: 980px; padding-right: 4px; }
.cr-set-hero { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 20px; margin-bottom: 22px; background: linear-gradient(110deg, color-mix(in srgb, var(--accent) 14%, var(--panel)) 0%, var(--panel) 55%); }
.cr-set-t { display: grid; gap: 2px; flex: 1; min-width: 200px; }
.cr-set-t b { font-size: 16.5px; }
.cr-set-t small { color: var(--muted); font-size: 12.5px; }

@media (max-width: 1100px) {
	.cr-inbox { grid-template-columns: 220px minmax(0, 1fr); height: auto; }
	.wrap:has(.cr-inbox) { padding-bottom: 96px; }
	.cr-main { grid-template-columns: minmax(0, 1fr); }
	.cr-main.is-span { overflow: visible; }
	.cr-list { max-height: 420px; }
	.cr-pane { min-height: 420px; overflow: visible; }
	.cr-pane-b { overflow: visible; }
	.cr-hint { display: none; }
}
@media (max-width: 700px) {
	.cr-inbox { grid-template-columns: minmax(0, 1fr); }
	.cr-rail, .cr-rail-s { overflow: visible; gap: 8px; }
	.cu-auto.cr-auto { display: flex; height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r-btn); }
	.cr-rail .cr-folders { display: flex; flex-wrap: wrap; gap: 6px; }
	.cr-rail .cr-folders button { height: 34px; padding: 0 12px; border: 1px solid var(--line-2); }
	.cr-rail .cr-folders button.is-on { border-color: transparent; }
	.cr-sect { display: none; }
	.cr-folders.is-more { padding-top: 0; border-top: 0; }
	.cr-list { max-height: 360px; }
	.cr-pane { padding: 16px 16px 0; }
	.cr-pane-b, .cr-pane-f { margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
	.cr-today span { padding: 10px 14px; }
}
