/* The shared feature demos (see js/widgets.js). Sharp corners, hairlines and mono type, like the rest of the Ullage family. */

/* ───────── Detectors ───────── */
.det { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.det__c { padding: 22px 22px 24px; display: grid; gap: 12px; align-content: start; overflow: hidden; }
.det__c.card { background: #000; }                          /* pure black like the page, with the hairline border */
.det__c.card--lift:hover { background: var(--panel); }
.det__c p { color: var(--dim); font-size: 14px; line-height: 1.55; }
.det__viz { position: relative; height: 92px; margin-bottom: 8px; }
.det__viz--dup i, .det__viz--zip i { position: absolute; top: 14px; width: 54%; padding: 10px; border: 1px solid var(--line2); background: var(--raised2); font: 400 10.5px/1.2 var(--mono); font-style: normal; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: transform .7s var(--ease), border-color .3s, color .3s, opacity .5s; }
.det__viz--dup i:first-child { left: 0; } .det__viz--dup i:last-child { left: 34%; top: 40px; border-color: var(--k-document); }
.det__c:hover .det__viz--dup i:last-child { transform: translate(-63%, -26px); opacity: .25; border-color: var(--danger); color: var(--danger); }
.det__viz--zip i:first-child { left: 0; border-color: var(--k-archive); color: var(--k-archive); }
.det__viz--zip i:last-child { right: 0; top: 40px; width: 44%; }
.det__c:hover .det__viz--zip i:first-child { transform: translate(0, 26px) scale(.9); opacity: .3; }
.det__viz--stall i { position: absolute; left: 0; right: 0; top: 30px; height: 6px; background: var(--line); }
.det__viz--stall i::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 63%; background: var(--warn); animation: stall 2.4s steps(1) infinite; }
.det__viz--stall i::after { content: ""; position: absolute; left: 63%; top: -4px; bottom: -4px; width: 2px; background: #fff; animation: blink 1s steps(1) infinite; }
.det__viz--stall span { position: absolute; left: 0; top: 50px; font-size: 10.5px; color: var(--faint); }
@keyframes stall { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes blink { 50% { opacity: 0; } }
.det__viz--big { display: flex; align-items: flex-end; gap: 8px; padding-bottom: 0; }
.det__viz--big i { flex: 1; height: calc(var(--h) * 82px); background: var(--line2); transform-origin: bottom; transition: background .3s, transform .6s var(--ease); }
.det__viz--big i:nth-child(3) { background: var(--k-video); }
.det__c:hover .det__viz--big i:nth-child(3) { transform: scaleY(1.06); box-shadow: 0 0 24px -4px var(--k-video); }
/* the reveal plays each card's hover move once (js/site.js adds .is-play), so it's seen without a pointer too */
.det__c.is-play .det__viz--dup i:last-child { transform: translate(-63%, -26px); opacity: .25; border-color: var(--danger); color: var(--danger); }
.det__c.is-play .det__viz--zip i:first-child { transform: translate(0, 26px) scale(.9); opacity: .3; }
.det__c.is-play .det__viz--big i:nth-child(3) { transform: scaleY(1.06); box-shadow: 0 0 24px -4px var(--k-video); }

/* ───────── Hold to confirm: modelled on Airlock's confirm dialog ───────── */
.hold { position: relative; display: grid; gap: 12px; align-content: start; }
/* the gas vents on its own canvas, larger than the dialog, so the cloud is never clipped to the dial */
.hold__gas { position: absolute; left: -160px; top: -160px; width: calc(100% + 320px); height: calc(100% + 320px); pointer-events: none; z-index: 2;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 22%, #000 78%, transparent), linear-gradient(to bottom, transparent, #000 22%, #000 78%, transparent); -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 22%, #000 78%, transparent), linear-gradient(to bottom, transparent, #000 22%, #000 78%, transparent); mask-composite: intersect; }
/* as in the app: a red glow like the blue one on the screenshots, and a top edge that runs grey → red at the middle → grey */
.hold__dlg { position: relative; display: grid; gap: 22px; padding: clamp(20px, 2.4vw, 30px); border: 1px solid var(--line2); background: #0a0b0d;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9), 0 0 280px -10px rgba(255, 79, 69, .26); }
.hold__dlg::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 79, 69, .8) 50%, transparent); }
/* the red corner brackets, as in the app */
.hold__c { position: absolute; width: 12px; height: 12px; border: 2px solid var(--danger); }
.hold__c:nth-child(1) { left: -7px; top: -7px; border-right: 0; border-bottom: 0; }
.hold__c:nth-child(2) { right: -7px; top: -7px; border-left: 0; border-bottom: 0; }
.hold__c:nth-child(3) { left: -7px; bottom: -7px; border-right: 0; border-top: 0; }
.hold__c:nth-child(4) { right: -7px; bottom: -7px; border-left: 0; border-top: 0; }
.hold__head { display: grid; grid-template-columns: clamp(96px, 9vw, 128px) 1fr; gap: clamp(16px, 2vw, 26px); align-items: center; }
.hold__hatch { width: 100%; aspect-ratio: 1; }
.hold__copy { display: grid; gap: 8px; }
.hold__title { font: 700 clamp(20px, 2vw, 27px)/1.15 var(--display); letter-spacing: .01em; }
.hold__sub { color: var(--dim); font-size: 14.5px; line-height: 1.45; }
.hold__man { border: 1px solid var(--line); }
.hold__mh { display: flex; justify-content: space-between; align-items: baseline; padding: 11px 16px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .02); font: 600 11px/1 var(--display); letter-spacing: .18em; text-transform: uppercase; color: var(--faint); }
.hold__mh i { font-style: normal; font-family: var(--mono); letter-spacing: 0; margin-left: 4px; }
.hold__mh em { font: 500 12px/1 var(--mono); font-style: normal; letter-spacing: .04em; color: var(--tx); }
.hold__man ul { display: grid; padding: 4px 0; max-height: calc(6 * 33px + 8px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
.hold__man li { display: grid; grid-template-columns: 6px minmax(0, 1fr) auto 64px; gap: 12px; align-items: center; height: 33px; padding: 0 16px; font-size: 13.5px; color: var(--tx); }
.hold__man li i { width: 6px; height: 6px; border-radius: 50%; }
.hold__man li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hold__man li b { font: 600 10px/1 var(--display); letter-spacing: .18em; text-transform: uppercase; color: var(--dim); white-space: nowrap; }
.hold__man li b.acc { color: var(--accent); } .hold__man li b.ok { color: var(--ok); }
.hold__man li em { font: 400 12px/1 var(--mono); font-style: normal; color: var(--dim); text-align: right; white-space: nowrap; }
.hold__man li.is-gone span { text-decoration: line-through; text-decoration-color: var(--danger); }
.hold__foot { display: flex; align-items: center; gap: 12px; padding-top: 20px; border-top: 1px solid var(--line); }
.hold__cancel, .hold__undo { flex: 0 0 33%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; border: 1px solid var(--line3); background: transparent; font: 700 12.5px/1 var(--display); letter-spacing: .2em; text-transform: uppercase; color: var(--tx); }
.hold__undo svg { width: 14px; height: 14px; }
.hold__undo[hidden] { display: none; }
.hold.is-done .hold__cancel { display: none; }
.hold__bar { position: relative; flex: 1 1 auto; height: 46px; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 0 16px; border: 1px solid var(--danger); background: rgba(255, 79, 69, .06); color: var(--danger); overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none;
  font: 700 12.5px/1 var(--display); letter-spacing: .18em; text-transform: uppercase; transition: box-shadow .3s; }
.hold__bar > i { position: absolute; inset: 0; background: var(--danger); transform: scaleX(0); transform-origin: left; z-index: 0; }
.hold__lbl { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; }
.hold__lbl svg { width: 15px; height: 15px; }
.hold__lbl em { font-style: normal; }
.hold__bar .key { position: relative; z-index: 1; height: 24px; min-width: 28px; border-radius: 2px; border-bottom-width: 1px; border-color: rgba(255, 255, 255, .35); color: var(--tx); background: transparent; }
.hold.is-holding .hold__bar { box-shadow: 0 0 40px -6px rgba(255, 79, 69, .8); }
.hold.is-holding .hold__lbl, .hold.is-done .hold__lbl { color: #fff; }
.hold.is-done .hold__bar > i { transform: scaleX(1) !important; }
.hold.is-done .hold__bar .key { color: #fff; border-color: rgba(255, 255, 255, .6); }
.hold__out { font-size: 11.5px; color: var(--faint); padding-left: 2px; }
@media (max-width: 560px) {
  .hold__head { grid-template-columns: 1fr; } .hold__hatch { max-width: 110px; justify-self: center; }   /* the airlock sits centred above the title */
  .hold__man li { grid-template-columns: 6px minmax(0, 1fr) 64px; } .hold__man li b { display: none; }
  .hold__foot { flex-wrap: wrap; } .hold__bar { flex-basis: 100%; } .hold__cancel, .hold__undo { flex-basis: 100%; order: 2; }
}
