/* BidDesk Quant v3: the Alerts block (Settings, F and O) and Truth's "Measured in production" (the owner's). The rooms'
   own tokens; GO green only for the one action and a live state; no gold (nothing here is money); tabular figures. */
.al { gap: 14px 40px; padding: 24px; }
.al-main, .al-side { display: grid; gap: 14px; align-content: start; min-width: 0; }
.set.has-al { max-width: 1120px; }
.set.has-al .blk p { max-width: 72ch; }
.al-devs { display: grid; gap: 10px; align-content: start; min-width: 0; }
/* Wide: the devices under the main column, the rules beside both; a phone: main, rules, then devices (rooms.js holds). */
@media (min-width: 1100px) { .al { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-areas: "main side" "devs side"; grid-template-rows: auto 1fr; }
  .al-main { grid-area: main; } .al-side { grid-area: side; padding-top: 28px; } .al-devs { grid-area: devs; } }
/* Settings' first paint (alerts.js alertsSkeleton): the answers veiled at their drawn size; the rules as saved. */
.al.al-skel :is(.al-state, .al-meas, .al-here, .al-dev) { color: transparent; -webkit-text-fill-color: transparent; user-select: none; border-radius: var(--r-2); background: linear-gradient(90deg, var(--surface), var(--raise), var(--surface)); background-size: 200% 100%; animation: pv-sheen 1.6s var(--ease) infinite; }
.al.al-skel :is(.al-state, .al-meas, .al-here, .al-dev) > * { visibility: hidden; }
.al-meas { margin: -4px 0 0; font-size: 13.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.al-meas b { color: var(--ink); font-weight: 500; }
.al .eyebrow { margin: 0; }
.al-title { font: 300 28px/1.15 var(--serif); letter-spacing: -.02em; margin: 0; color: var(--ink); max-width: 24ch; }
.al-state { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 14px; color: var(--ink-2); }
.al-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); flex: none; }
.al-state.on .al-dot, .pv-live .al-dot { background: var(--go); box-shadow: 0 0 0 4px var(--go-soft); animation: al-pulse 2.4s var(--ease) infinite; }
/* Not running, or no device takes alerts: a still grey dot, never the live pulse. */
.pv-live.off .al-dot { background: var(--ink-4); box-shadow: none; animation: none; }
@keyframes al-pulse { 50% { box-shadow: 0 0 0 7px rgba(63, 178, 127, 0); } }
.al-here { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: var(--r-2); background: var(--surface-2); }
.al-here > div { display: grid; gap: 4px; }
.al-here b { font-weight: 500; }
.al-here p { margin: 4px 0 0; }
.al-list, .al-rules { display: grid; border-top: 1px solid var(--line); }
.al-dev { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.al-carry p { font-size: 14px; color: var(--ink-2); max-width: 64ch; }
.al-carry b { color: var(--ink); font-weight: 500; }
.al-sub { margin: 4px 0 0; font: 500 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.al-rule { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; cursor: pointer; }
.al-sw { appearance: none; -webkit-appearance: none; margin: 0; width: 42px; height: 24px; border-radius: 999px; background: var(--raise); border: 1px solid var(--line-2); position: relative; flex: none; cursor: pointer; transition: background var(--fast) var(--ease); }
.al-sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink-3); transition: transform var(--fast) var(--ease), background var(--fast) var(--ease); }
.al-sw:checked { background: var(--go-soft); border-color: rgba(63, 178, 127, .5); }
.al-sw:checked::after { transform: translateX(18px); background: var(--go); }
.al-why { margin: -6px 0 0; max-width: 60ch; }
.al-rule .tag { margin-left: 6px; }
.al-test { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.al-foot { margin: 0; }
/* Truth: measured in production (owner) */
.pv { display: grid; gap: 18px; margin-bottom: 40px; }
.pv-head h2 { font: 300 32px/1.12 var(--serif); letter-spacing: -.02em; margin: 0; max-width: 26ch; }
.pv-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pv-card { border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); padding: 18px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pv-skel { min-height: 297px; background: linear-gradient(90deg, var(--surface), var(--raise), var(--surface)); background-size: 200% 100%; animation: pv-sheen 1.6s var(--ease) infinite; }
@keyframes pv-sheen { to { background-position: -200% 0; } }
.pv-k { font: 500 11px/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.pv-v { font: 300 40px/1 var(--serif); letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--ink); }
.pv-v small { font: 400 14px var(--sans); color: var(--ink-3); letter-spacing: 0; margin-left: 4px; }
.pv-s { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.pv-bar { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); width: max-content; }
.pv-bar.go { border-color: rgba(63, 178, 127, .5); color: var(--go); }
.pv-bar.kill { border-color: rgba(229, 83, 75, .5); color: var(--kill); }
.pv-legs { display: grid; gap: 4px; margin-top: 4px; font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.pv-legs span { display: flex; justify-content: space-between; gap: 10px; }
.pv-run { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.pv-prog { height: 3px; border-radius: 3px; background: var(--raise); overflow: hidden; }
.pv-prog i { display: block; height: 100%; background: var(--go); width: 0; transition: width .3s var(--ease); }
.pv-live { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); margin: auto 0 0; padding-top: 6px; }
@media (prefers-reduced-motion: reduce) { .al-state.on .al-dot, .pv-live .al-dot, .pv-skel, .al-skel * { animation: none; } }
@media (max-width: 1100px) { .pv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pv-skel { min-height: 280px; } }
@media (max-width: 640px) {
  .al { padding: 16px; } .al-title { font-size: 23px; } .al-state { min-height: 3.1em; } .pv-head h2 { font-size: 25px; } .pv-v { font-size: 34px; }
  .al-here { flex-direction: column; align-items: stretch; } .al-here .btn { width: 100%; }
  .al-dev { grid-template-columns: 1fr auto; } .al-dev .faint { grid-column: 1; grid-row: 2; } .al-dev .btn { grid-row: 1 / span 2; grid-column: 2; }
  .pv-grid { grid-template-columns: 1fr; } .pv-skel { min-height: 230px; }
}

/* Settings holds its other blocks back while the Alerts block is read (rooms.js), so they never shift down under it. */
.set.al-wait > :not(#set-alerts) { visibility: hidden; }
