.arc-root { margin-top: 18px; }
.arc-root[hidden], .arc-progress[hidden], .arc-pwrow[hidden], .arc-enc[hidden], .arc-toolbar[hidden] { display: none; }
.arc-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 10px; }
.arc-title { font-weight: 700; font-size: 15px; color: var(--fg); overflow-wrap: anywhere; }
.arc-summary { color: var(--fg-muted); font-size: 12px; }
.arc-notes { display: grid; gap: 6px; margin-bottom: 10px; }
.arc-notes:empty { display: none; }
.arc-note { font-size: 12px; padding: 7px 11px; border: 1px solid var(--rule); border-left: 2px solid var(--fg-muted); border-radius: 3px; background: var(--bg-2); color: var(--fg-dim); overflow-wrap: anywhere; }
.arc-note.warn { border-left-color: var(--hl); }
.arc-note.err { border-left-color: var(--accent); color: var(--fg); }
.arc-enc { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--fg-dim); margin-bottom: 10px; }
.arc-enc select, .arc-search, .arc-pwrow input { background: var(--bg-2); border: 1px solid var(--rule); border-radius: 3px; color: var(--fg); font: inherit; font-size: 12px; padding: 7px 10px; }
.arc-enc select:focus, .arc-search:focus, .arc-pwrow input:focus { outline: none; border-color: var(--hl); }
.arc-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.arc-search { margin-left: auto; width: 190px; min-width: 120px; }
.arc-btn { background: var(--hl); border: 1px solid var(--hl); border-radius: 3px; color: var(--bg); font: inherit; font-size: 12px; font-weight: 600; padding: 7px 12px; cursor: pointer; }
.arc-btn:hover { background: var(--accent); border-color: var(--accent); color: var(--fg); }
.arc-btn.ghost { background: transparent; color: var(--fg-dim); border-color: var(--rule); font-weight: 400; }
.arc-btn.ghost:hover { color: var(--hl); border-color: var(--hl); background: transparent; }
.arc-btn:disabled { opacity: 0.45; cursor: default; pointer-events: none; }
.arc-btn:focus-visible, .arc-icon:focus-visible, .arc-name:focus-visible, .arc-crumb:focus-visible, .arc-link:focus-visible, .arc-row:focus-visible { outline: 1px solid var(--hl); outline-offset: 1px; }
.arc-link { background: none; border: none; padding: 0; font: inherit; font-size: 12px; color: var(--hl); cursor: pointer; }
.arc-link:hover { color: var(--accent); }
.arc-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font-size: 12px; margin-bottom: 8px; min-height: 22px; }
.arc-crumb { background: none; border: none; padding: 1px 2px; font: inherit; font-size: 12px; color: var(--link); cursor: pointer; overflow-wrap: anywhere; text-align: left; }
.arc-crumb:hover { color: var(--hl); }
.arc-crumb.cur { color: var(--fg-muted); cursor: default; }
.arc-crumb.arch { font-weight: 600; }
.arc-sep { color: var(--fg-muted); opacity: 0.6; }
.arc-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13px; }
.arc-table th { text-align: left; font-size: 11px; font-weight: 400; text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-muted); padding: 6px 8px; border-bottom: 1px solid var(--rule); }
.arc-table th button { background: none; border: none; padding: 0; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; }
.arc-table th button:hover { color: var(--hl); }
.arc-table th[aria-sort="ascending"] button::after { content: ' ↑'; color: var(--hl); }
.arc-table th[aria-sort="descending"] button::after { content: ' ↓'; color: var(--hl); }
.arc-table td { padding: 5px 8px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.arc-row:hover td { background: var(--bg-2); }
.arc-c-sel { width: 34px; }
.arc-c-size { width: 96px; text-align: right; color: var(--fg-muted); font-size: 12px; white-space: nowrap; }
.arc-table th.arc-c-size { text-align: right; }
.arc-c-date { width: 138px; color: var(--fg-muted); font-size: 12px; white-space: nowrap; }
.arc-c-act { width: 68px; text-align: right; white-space: nowrap; }
.arc-table input[type=checkbox] { accent-color: var(--hl); width: 14px; height: 14px; margin: 0; vertical-align: middle; cursor: pointer; }
.arc-name { display: flex; align-items: center; gap: 7px; width: 100%; background: none; border: none; padding: 2px 0; font: inherit; color: var(--fg); cursor: pointer; text-align: left; min-width: 0; }
.arc-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.arc-name:hover span { color: var(--hl); }
.arc-ico { flex: none; color: var(--fg-muted); }
.arc-row.dir .arc-ico { color: var(--hl); }
.arc-icon { background: none; border: none; padding: 3px; color: var(--fg-muted); cursor: pointer; line-height: 0; border-radius: 3px; }
.arc-icon:hover { color: var(--hl); }
.arc-empty { color: var(--fg-muted); font-size: 12px; padding: 18px 8px; }
.arc-more { margin: 10px 8px; }
.arc-foot { display: flex; align-items: center; gap: 14px; min-height: 26px; margin-top: 8px; font-size: 12px; color: var(--fg-muted); }
.arc-status { margin-top: 14px; color: var(--fg-dim); font-size: 12px; overflow-wrap: anywhere; }
.arc-status:empty { display: none; }
.arc-status.err { color: var(--accent); }
.arc-status.ok { color: var(--ok); }
.arc-progress { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; align-items: center; margin-top: 16px; font-size: 12px; color: var(--fg-dim); }
.arc-plabel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.arc-track { grid-column: 1 / -1; height: 3px; background: var(--rule); border-radius: 2px; overflow: hidden; }
.arc-bar { height: 100%; width: 0; background: var(--hl); transition: width .12s linear; }
.arc-bar.ind { width: 35% !important; animation: arc-slide 1.1s ease-in-out infinite alternate; }
@keyframes arc-slide { from { margin-left: 0; } to { margin-left: 65%; } }
@media (prefers-reduced-motion: reduce) { .arc-bar.ind { animation: none; width: 100% !important; opacity: 0.5; } .arc-bar { transition: none; } }
.arc-pwrow { margin-top: 16px; }
.arc-pwmsg { font-size: 12px; color: var(--fg-dim); margin-bottom: 8px; }
.arc-pwmsg.err { color: var(--accent); }
.arc-pwline { display: flex; gap: 8px; flex-wrap: wrap; }
.arc-pwrow input { width: 240px; font-size: 13px; }
.arc-dlg { width: min(960px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 1px solid var(--rule); border-radius: 6px; background: var(--bg); color: var(--fg); font: inherit; }
.arc-dlg[open] { display: flex; flex-direction: column; }
.arc-dlg::backdrop { background: rgba(10, 6, 9, 0.72); }
.arc-dlg-head { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--rule); background: var(--bg-2); }
.arc-dlg-titles { flex: 1; min-width: 0; }
.arc-dlg-title { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arc-dlg-meta { color: var(--fg-muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arc-dlg-body { flex: 1; min-height: 120px; overflow: auto; padding: 12px; }
.arc-dlg-foot { border-top: 1px solid var(--rule); padding: 10px 12px; background: var(--bg-2); }
.arc-dlg-path { color: var(--fg-muted); font-size: 11px; overflow-wrap: anywhere; margin-bottom: 8px; }
.arc-dlg-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.arc-dlg-hash { margin: 8px 0 0; font: inherit; font-size: 11px; color: var(--fg-dim); white-space: pre-wrap; overflow-wrap: anywhere; }
.arc-dlg-hash:empty { display: none; }
.arc-pv-img { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto; background: repeating-conic-gradient(#2b2128 0% 25%, #221a20 0% 50%) 50% / 16px 16px; }
.arc-pv-video { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto; }
.arc-pv-audio { display: block; width: 100%; margin: 24px 0; }
.arc-pv-page { display: block; max-width: 100%; height: auto; margin: 0 auto 10px; background: #fff; }
.arc-pv-meta { color: var(--fg-muted); font-size: 11px; margin-bottom: 8px; }
.arc-pv-text, .arc-pv-hex { margin: 0; font: inherit; font-size: 12px; line-height: 1.5; color: var(--fg-dim); white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 4; }
.arc-pv-hex { white-space: pre; overflow-x: auto; }
.arc-pv-text .hljs-comment, .arc-pv-text .hljs-quote { color: var(--fg-muted); }
.arc-pv-text .hljs-keyword, .arc-pv-text .hljs-selector-tag, .arc-pv-text .hljs-literal, .arc-pv-text .hljs-built_in { color: #d8992f; }
.arc-pv-text .hljs-string, .arc-pv-text .hljs-attr, .arc-pv-text .hljs-symbol { color: #9ec27a; }
.arc-pv-text .hljs-number, .arc-pv-text .hljs-title, .arc-pv-text .hljs-name, .arc-pv-text .hljs-type { color: #e0a58f; }
@media (max-width: 620px) {
  .arc-c-date { display: none; }
  .arc-c-size { width: 78px; }
  .arc-search { margin-left: 0; width: 100%; }
}
.arc-fmt { background: var(--bg-2); border: 1px solid var(--rule); border-radius: 3px; color: var(--fg); font: inherit; font-size: 12px; padding: 6px 6px; margin-left: -4px; }
.arc-fmt[hidden] { display: none; }
.arc-fmt:focus { outline: none; border-color: var(--hl); }
.arc-note .arc-link { margin-left: 4px; }
