/* ── Device page (#asset/ARM-..., staging QA 2026-10-07) ─────────────────────
   static/lib/assets/drawer.js devicePageHtml: the drawer's sections at full
   width, all open. Head card first (one primary element), then two columns
   (the device and its holder; purchase, tickets and history), the sources
   table below.
   One column under 900px. On wide screens (staging, 2026-10-08: "wonky and
   bad for bigger screens": a 1240px column left half a 2000px screen empty)
   it grows to 1680px; History sits in the side column under the tickets
   (it left a tall empty gap there) and Sources side by side spans the full
   width below. Colours only via tokens. */

.ast-device-page { display: flex; flex-direction: column; gap: 16px; max-width: 1680px; outline: none; }
.ast-dp-back {
    display: inline-flex; align-items: center; gap: 2px; align-self: flex-start;
    font-size: var(--fs-13); font-weight: 500; color: var(--text-2); text-decoration: none;
}
.ast-dp-back:hover { color: var(--text); }
.ast-dp-head {
    padding: 16px 20px;
    border: 1px solid var(--border-sub); border-radius: var(--radius-lg);
    background: var(--surface);
}
.ast-dp-ids { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.ast-dp-serial { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-13); color: var(--text-2); }
.ast-dp-serial .mono { color: var(--text); }
.ast-hero h1 { margin: 0; font-size: var(--fs-title); line-height: 28px; font-weight: 650; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.ast-dp-head .ast-drawer-actions { max-width: 560px; }
.ast-device-page > .ast-dialog {
    max-width: 640px; padding: 12px;
    border: 1px solid var(--border-sub); border-radius: var(--radius-md);
    background: var(--surface-2); box-shadow: none;
}
.ast-device-page > .ast-dialog[hidden] { display: none; }
.ast-dp-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.ast-dp-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ast-dp-col > .ast-sec, .ast-dp-history > .ast-sec {
    padding: 16px 20px;
    border: 1px solid var(--border-sub); border-radius: var(--radius-lg);
    background: var(--surface);
}
.ast-dp-col .ast-facts { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
/* The tickets card brings its own heading (lib/assets/tickets.js). */
.ast-device-page [data-tickets] > h3 {
    display: flex; align-items: center; gap: 8px; margin: 0 0 8px;
    font-size: var(--fs-13); font-weight: 600; color: var(--text);
}
.ast-device-page .ph { padding: 4px 0; }
@media (max-width: 900px) {
    .ast-dp-grid { grid-template-columns: minmax(0, 1fr); }
    .ast-dp-head { padding: 14px 16px; }
}
/* Sources side by side: a row whose sources disagree is marked (shape and
   word, not colour alone). */
.ast-compare th[scope="row"] { white-space: nowrap; font-weight: 500; color: var(--text-2); }
/* The field names stay in view when the sources scroll sideways; long
   hostnames and emails wrap instead of stretching one column. */
.ast-compare th[scope="row"] { position: sticky; left: 0; z-index: 1; background: var(--surface); }
.ast-compare td { overflow-wrap: anywhere; min-width: 120px; }
.ast-compare thead small { display: block; }
.ast-cmp-asof { margin-top: 6px; font-size: var(--fs-12); }
.ast-compare tr.is-conflict th[scope="row"], .ast-compare tr.is-conflict td { background: var(--conflict-dim); }
.ast-cmp-flag { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; font-size: var(--fs-12); color: var(--conflict); }
