/* The one details layout (details.js) inside the panel: the panel's own title becomes a small kind line, and the thing's
   head, facts, sections and foot read the same for a form, an agent, a library item and a sync. */

#panel:has(.dt) .p-head { padding: 16px 18px 0 22px; align-items: center; }
#panel:has(.dt) .p-head h2 { font-size: 12.5px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
#panel:has(.dt) .p-sub { display: none; }
#panel:has(.dt) .p-body { padding: 6px 22px 22px; gap: 0; }
.dt { display: flex; flex-direction: column; gap: 22px; }

/* the head */
.dt-head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.dt-ic { flex: none; width: 46px; height: 46px; border-radius: 13px; background: var(--col); color: var(--ink-2); display: grid; place-items: center; }
.dt-ic svg { width: 22px; height: 22px; }
.dt-ic img.ui-logo { width: 24px !important; height: 24px !important; }
.dt-hm { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.dt-name { margin: 0 -8px; padding: 3px 8px; border: 0; border-radius: 8px; background: none; font: 600 19px/1.3 var(--sans); letter-spacing: -0.015em; color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: background .15s, box-shadow .15s; }
input.dt-name:hover { background: var(--col); }
input.dt-name:focus { background: var(--card); outline: none; box-shadow: 0 0 0 1px var(--line), var(--shadow); }
.dt-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); }
.dt-status .dot { display: inline-block; }

/* a preview above the head */
.dt-media { background: #121214; border-radius: 12px; overflow: hidden; display: flex; justify-content: center; height: min(44vh, 460px); }
.dt-media video, .dt-media img { height: 100%; width: auto; max-width: 100%; object-fit: contain; display: block; }

/* facts: label and value, one quiet action at the end of a row */
.dt-facts { margin: 0; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.dt-facts > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: center; min-height: 44px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.dt-facts dt { font-size: 13px; color: var(--ink-3); }
.dt-facts dd { margin: 0; display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 13.5px; }
.dt-v { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; line-height: 1.45; }
.dt-v .seg, .dt-v .chips { flex-wrap: wrap; }
.dt-v > span:not(.pill):not(.dot) { flex: 1; min-width: 0; }
.dt-v > img.ui-logo, .dt-v > .head { align-self: flex-start; margin-top: 2px; }
.dt-act { flex: none; display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 5px 8px; margin: -5px -8px -5px 0; border-radius: 7px; font: 500 12.5px/1 var(--sans); color: var(--ink-3); }
.dt-act:hover { background: var(--col); color: var(--ink); }

/* sections */
.dt-sec { display: flex; flex-direction: column; gap: 10px; }
.dt-sh { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--ink-3); letter-spacing: .02em; }
.dt-sh small { font-weight: 500; font-variant-numeric: tabular-nums; }
.dt-sh .dt-act { margin-left: auto; }
.dt-copy { display: flex; align-items: center; gap: 4px; padding: 5px 5px 5px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfaf8; }
.dt-copy code { flex: 1; min-width: 0; font: 12.5px/1.4 var(--mono); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dt-ib { flex: none; width: 30px; height: 30px; border: 0; border-radius: 7px; background: none; color: var(--ink-3); display: grid; place-items: center; }
.dt-ib:hover { background: var(--col); color: var(--ink); }
.dt details.dt-more summary { cursor: pointer; font-size: 13px; color: var(--ink-3); }
.dt details.dt-more pre { margin-top: 8px; }
.dt-list { display: flex; flex-direction: column; margin: 0 -8px; }
.dt-list a, .dt-list button { display: flex; align-items: center; gap: 10px; padding: 8px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 13.5px; text-align: left; color: var(--ink); }
.dt-list a:hover, .dt-list button:hover { background: var(--col); }
.dt-list .ui-ico, .dt-list .mini-ic { flex: none; color: var(--ink-3); }
.dt-list span:not(.pill):not(.mini-ic) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dt-q { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; }
.dt-q div { display: flex; gap: 10px; padding: 9px 12px; font-size: 13.5px; }
.dt-q div + div { border-top: 1px solid var(--line); }
.dt-q b { font-weight: 500; flex: 1; }
.dt-q span { color: var(--ink-3); font-size: 12.5px; }
.dt-none { font-size: 13px; color: var(--ink-3); }
.dt .fe-note { margin: 0; }

/* the foot */
#panel:has(.dt) .p-act { padding: 12px 18px 14px; }
.dt-foot { display: flex; align-items: center; gap: 8px; }
.dt-btn, .dt-danger { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px; border-radius: 9px; font-weight: 500; font-size: 13.5px; white-space: nowrap; }
.dt-btn { border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.dt-btn:hover { border-color: var(--ink-3); }
.dt-btn.primary { border-color: var(--ink); background: var(--ink); color: #fff; }
.dt-btn.primary:hover { background: #2a2a2e; }
.dt-danger { border: 0; background: none; color: var(--bad); padding: 0 10px; margin-left: -10px; }
.dt-danger:hover { background: var(--bad-soft); }
.dt-danger:disabled { color: var(--ink-3); background: none; cursor: default; opacity: .6; }
.dt-btn .ui-ico, .dt-danger .ui-ico { flex: none; }

@media (max-width: 520px) {
  .dt-facts > div { grid-template-columns: 92px minmax(0, 1fr); }
  .dt-btn span { display: none; }
  .dt-btn { padding: 0 10px; }
  .dt-btn.primary span { display: inline; }
}

/* a project card's agent: its portrait at the start of the card's foot */
.card-who { display: inline-flex; align-items: flex-end; justify-content: center; width: 24px; height: 24px; margin: -4px 2px -4px -2px; border-radius: 7px; background: radial-gradient(90% 70% at 50% 100%, #ece7dd, #f5f2ec 70%); overflow: hidden; flex: none; }
.card-who img, .card-who .head { max-width: 22px; max-height: 22px; }
