/* ============================================================
   SkinSignal / css / market-room.css
   The market as ONE ROOM (the fix pass, 2026-10-10): the member's room
   with the power on, the free reader's with it off. Same steel, same
   screens, same desk; only the light differs.

     the readout   the sweep's own facts in a recessed steel strip
                   (js/market.js readout), Overdue said in words
     the desk      two monitors on the dashboard's desk (assets/intel,
                   the member intel pictures, measured in
                   tools/make-intel.py), screens off for a free reader:
                   dark glass, scanlines, the lock disc, the real count
     the wall      seventeen small screens, each index's name engraved
                   on its bezel; a short flicker under the pointer
     the plate     the dashboard's lock plate (css/convert.css .ulk)
     the member    the same steel bezel round the boards, the index
                   tiles and the terminal; screens lit
   NO SKELETON BARS AND NO PLACEHOLDER ROWS anywhere: a locked screen is
   off, not loading (tools/test-market-truth.js). Motion is transform
   and opacity only, on hover only; nothing loops. Gold is the lock and
   the Unlock (the dashboard's), green and red are data only.
   ============================================================ */

[data-page="market"] {
  --mk-steel:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.022) 0 1px, rgba(255, 255, 255, 0) 1px 3px),
    linear-gradient(180deg, #3a3f48 0%, #23272e 14%, #16191e 52%, #1b1e24 86%, #2c3038 100%);
  --mk-glass-off:
    linear-gradient(160deg, rgba(255, 255, 255, 0.055) 0%, rgba(255, 255, 255, 0) 38%),
    radial-gradient(90% 80% at 50% 50%, #0a0d13, #030407 80%);
  --mk-scan: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0 1px, rgba(255, 255, 255, 0) 1px 3px);
  --mk-engrave: #b7bfcb;
}

.mk-lock__icon { display: inline-block; flex: none; vertical-align: -1px; margin-right: 7px; color: #e4ae39; }

/* ---------- The readout ---------- */
[data-page="market"] .market-meta { align-items: center; }
.mk-readout {
  display: flex;
  flex-wrap: wrap;
  margin: 12px 0 0;
  border-radius: 6px;
  overflow: hidden;
  background: linear-gradient(180deg, #07090d, #0c0f14);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.85),
    inset 0 0 0 1px rgba(0, 0, 0, 0.9),
    0 1px 0 rgba(255, 255, 255, 0.07),
    0 0 0 3px #15181d,
    0 0 0 4px rgba(255, 255, 255, 0.06);
  font-size: 11.5px;
  letter-spacing: 0.06em;
}
.mk-readout:empty { display: none; }
.mk-readout__cell { display: inline-flex; align-items: baseline; gap: 8px; padding: 8px 14px; border-right: 1px solid rgba(0, 0, 0, 0.9); box-shadow: 1px 0 0 rgba(255, 255, 255, 0.04); white-space: nowrap; }
.mk-readout__cell:last-child { border-right: 0; box-shadow: none; }
.mk-readout__cell b { font-weight: 500; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: #7d8696; }
.mk-readout__v { color: #dfe4ec; font-variant-numeric: tabular-nums; }
.mk-readout__v i { font-style: normal; color: #7d8696; }
.mk-readout__late { margin-left: 6px; padding: 1px 6px; border: 1px solid rgba(239, 90, 97, 0.55); border-radius: 3px; font-style: normal; font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: #f08a8f; }

/* ---------- Section heads ---------- */
.mk-sechead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 18px; margin: 0 0 clamp(14px, 2vw, 22px); }
.mk-sechead__title { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(20px, 2vw, 26px); line-height: 1; letter-spacing: 0.06em; text-transform: uppercase; color: #f1f3f6; }
.mk-sechead__note { margin: 0; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: #8a92a0; }

/* ============================================================
   THE DESK: two monitors. Measured (tools/make-intel.py INTEL_ART): the
   monitor is 1.8661:1, its screen [0.0136, 0.0314, 0.9729, 0.737], its
   light at [0.956, 0.7935]; the desk 12.113:1, end caps 2.282 and 2.277
   of its height, groove 0.6328 to 0.7232 down; the bases stand 0.246 of
   the way down the desk. Every size comes from --mw.
   ============================================================ */
.mkd { padding: clamp(6px, 1.4vw, 14px) 0 clamp(24px, 4vw, 40px); }
.mkd__floor {
  container-type: inline-size;
  --mw: calc(100cqw / 2.5);
  --mh: calc(var(--mw) / 1.8661);
  --dh: calc(var(--mw) * 0.22);
  --dtop: calc(var(--mh) - var(--dh) * 0.246);
  position: relative;
  width: 100%;
}
.mkd__mons { position: relative; z-index: 1; display: flex; justify-content: center; gap: calc(var(--mw) * 0.12); margin: 0; padding: 0; list-style: none; }
.mkd__desk {
  position: absolute;
  left: calc(50% - var(--mw) * 1.22);
  right: calc(50% - var(--mw) * 1.22);
  top: var(--dtop);
  display: block;
  height: var(--dh);
  box-sizing: border-box;
  border-style: solid;
  border-color: transparent;
  border-width: 0 calc(var(--dh) * 2.277) 0 calc(var(--dh) * 2.282);
  border-image-source: image-set(url('/assets/intel/intel-desk.webp') 1x, url('/assets/intel/intel-desk@2x.webp') 2x);
  border-image-slice: 0 18.8% 0 18.84% fill;
  border-image-repeat: stretch;
  pointer-events: none;
}
.mkd__groove { position: absolute; left: calc(var(--dh) * (0.774 - 2.282)); right: calc(var(--dh) * (0.774 - 2.277)); top: 63.28%; height: 9.04%; display: block; border-radius: 2px; background: linear-gradient(90deg, rgba(61, 127, 255, 0), rgba(61, 127, 255, 0.4) 8%, rgba(61, 127, 255, 0.4) 92%, rgba(61, 127, 255, 0)); mix-blend-mode: screen; opacity: 0.1; }
.mkd__desk--solo { display: none; }

.mkm { position: relative; flex: none; width: var(--mw); }
.mkm__set { position: relative; display: block; width: 100%; aspect-ratio: 1.8661; }
.mkm__img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.mkm__screen {
  position: absolute;
  left: 1.36%;
  top: 3.14%;
  width: 97.29%;
  height: 73.7%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 2px;
  background: var(--mk-glass-off);
  text-align: center;
}
.mkm__scan, .mkm__glass { position: absolute; inset: 0; display: block; pointer-events: none; }
.mkm__scan { background: var(--mk-scan); opacity: 0.6; }
.mkm__glass { background: linear-gradient(115deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.035) 48%, rgba(255, 255, 255, 0) 60%); }
/* The dashboard's lock disc (css/convert.css .ulk__lock). */
.mkm__lock, .mk-plate__lock, .mkw__lock {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #2b2f37, #111317 70%);
  box-shadow: inset 0 0 0 1px rgba(228, 174, 57, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 2px 6px rgba(0, 0, 0, 0.6);
  color: #e4ae39;
}
.mkm__lock .mk-lock__icon, .mk-plate__lock .mk-lock__icon, .mkw__lock .mk-lock__icon { margin: 0; }
.mkm__read { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; margin: 0; padding: 0 8%; }
.mkm__fig { font-size: clamp(26px, 3.2cqw, 38px); font-weight: 500; line-height: 1; letter-spacing: -0.01em; color: #eef1f6; font-variant-numeric: tabular-nums; }
.mkm__what { font-size: 13px; line-height: 1.35; color: #b8bfcb; }
.mkm__sub { font-size: 9.5px; letter-spacing: 0.2em; text-transform: uppercase; color: #7d8696; }
/* Standby: the status light dark. */
.mkm__led { position: absolute; left: 95.6%; top: 79.35%; display: block; width: max(3px, 1.15%); aspect-ratio: 1; border-radius: 50%; background: #1b2029; box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.12); transform: translate(-50%, -50%); }
.mkm__cap { display: flex; align-items: center; justify-content: center; gap: 9px; margin: calc(var(--dh) * 0.754 + 14px) 0 0; font-family: var(--font-mono, "JetBrains Mono", monospace); font-weight: 500; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--mk-engrave); text-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 -1px 0 rgba(0, 0, 0, 0.9); }
.mkm__tone { display: block; width: 6px; height: 6px; border-radius: 50%; }
.mkm--up .mkm__tone { background: #4bd68a; }
.mkm--down .mkm__tone { background: #ef5a61; }

/* ---------- The plate (the dashboard's .ulk) ---------- */
.mk-plate {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 14px;
  max-width: 680px;
  margin: clamp(22px, 3vw, 32px) auto 0;
  padding: 12px 14px 12px 12px;
  border: 1px solid rgba(0, 0, 0, 0.8);
  border-radius: 4px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.012) 0 1px, rgba(255, 255, 255, 0) 1px 3px), linear-gradient(180deg, #16191f, #0d0f13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), inset 0 -1px 0 rgba(0, 0, 0, 0.6), 0 12px 24px -18px #000;
}
.mk-plate__line { margin: 0; font-size: 13.5px; font-weight: 500; line-height: 1.4; color: #dfe4ec; }
.mk-plate__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 18px;
  border: 1px solid #f6cf6e;
  border-radius: 3px;
  background: linear-gradient(180deg, #f3c860 0%, #e4ae39 55%, #c98f1d 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -1px 0 rgba(0, 0, 0, 0.25), 0 8px 16px -10px rgba(228, 174, 57, 0.7);
  color: #1b1305;
  font-family: var(--font-display, 'Saira', sans-serif);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.mk-plate__cta:hover { filter: brightness(1.08); }
.mk-plate__cta:focus-visible { outline: 2px solid rgba(118, 166, 255, 0.9); outline-offset: 2px; }
.mk-plate__risk { grid-column: 2 / -1; margin: 0; font-size: 10px; letter-spacing: 0.05em; color: #7d8696; }
.mk-plate__risk a { color: inherit; text-decoration: underline; }

/* ============================================================
   THE WALL: one small screen per index, its name on the bezel.
   ============================================================ */
.mkw { margin-top: clamp(16px, 3vw, 30px); padding-bottom: clamp(30px, 5vw, 56px); }
.mkw__line { display: flex; align-items: baseline; flex-wrap: wrap; margin: 0 0 14px; font-size: 14px; color: #b8bfcb; }
.mkw__line b { margin: 0 4px; color: #f1f3f6; font-weight: 600; }
.mkw__line b:first-of-type { margin-left: 0; }
.mkw__wall {
  padding: clamp(12px, 2vw, 20px);
  border-radius: 10px;
  background:
    radial-gradient(60% 120% at 50% 0%, rgba(61, 127, 255, 0.04), rgba(61, 127, 255, 0) 70%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.012) 0 1px, rgba(255, 255, 255, 0) 1px 4px),
    linear-gradient(180deg, #0e1116, #0a0c10);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), inset 0 0 0 1px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.04), 0 24px 50px -24px #000;
}
.mkw__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: clamp(10px, 1.4vw, 16px); margin: 0; padding: 0; list-style: none; }
.mkw__scr { position: relative; display: block; padding: 6px 6px 0; border-radius: 7px; background: var(--mk-steel); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 -1px 0 rgba(0, 0, 0, 0.7), 0 0 0 1px #000, 0 10px 18px -12px #000; }
.mkw__glass { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 8; overflow: hidden; border-radius: 3px; background: var(--mk-scan), var(--mk-glass-off); box-shadow: inset 0 0 0 1px #000, inset 0 0 18px rgba(0, 0, 0, 0.9); }
.mkw__lock { width: 24px; height: 24px; opacity: 0.8; }
/* The flicker: a short pale wash over the glass, opacity only. */
.mkw__glass::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(160, 190, 255, 0) 30%, rgba(160, 190, 255, 0.16) 50%, rgba(160, 190, 255, 0) 70%), rgba(160, 190, 255, 0.05); opacity: 0; pointer-events: none; }
.mkw__name {
  display: block;
  overflow: hidden;
  padding: 6px 18px 7px 2px;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.04em;
  color: var(--mk-engrave);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.07), 0 -1px 0 rgba(0, 0, 0, 0.9);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.mkw__led { position: absolute; right: 9px; bottom: 11px; display: block; width: 4px; height: 4px; border-radius: 50%; background: #1b2029; box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.14); }

@media (prefers-reduced-motion: no-preference) {
  .mkw__scr:hover .mkw__glass::after { animation: mkwFlick 520ms steps(1, end) 1; }
  .mkw__scr:hover .mkw__lock { animation: mkwLock 520ms steps(1, end) 1; }
}
@keyframes mkwFlick { 0% { opacity: 1; } 14% { opacity: 0; } 26% { opacity: 0.7; } 38% { opacity: 0; } 52% { opacity: 0.35; } 64%, 100% { opacity: 0; } }
@keyframes mkwLock { 0% { opacity: 0.35; } 14% { opacity: 0.8; } 26% { opacity: 0.5; } 38%, 100% { opacity: 0.8; } }

/* ============================================================
   THE MEMBER'S ROOM, the power on: the same steel bezel round the
   boards, the index sections, the index tiles and the terminal; the
   glass lit, the status light on in the brand blue.
   ============================================================ */
[data-page="market"] .market-col,
[data-page="market"] .idx-section {
  border: 7px solid transparent;
  border-radius: 12px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.016) 1px, transparent 1px) 0 0 / 100% 28px padding-box,
    radial-gradient(80% 60% at 50% 0%, rgba(61, 127, 255, 0.05), rgba(61, 127, 255, 0) 70%) padding-box,
    linear-gradient(180deg, #0b0f16, #06090e) padding-box,
    var(--mk-steel) border-box;
  box-shadow:
    inset 0 0 0 1px #000,
    inset 0 0 28px rgba(0, 0, 0, 0.55),
    0 0 0 1px #000,
    0 1px 0 1px rgba(255, 255, 255, 0.05),
    0 22px 50px rgba(0, 0, 0, 0.45);
}
[data-page="market"] .market-col::before { top: 0; }
[data-page="market"] .idx-section { position: relative; }
[data-page="market"] .idx-section::after { content: ""; position: absolute; right: 2px; bottom: -5px; width: 4px; height: 4px; border-radius: 50%; background: #3d7fff; box-shadow: 0 0 4px 1px rgba(61, 127, 255, 0.9), 0 0 9px 2px rgba(61, 127, 255, 0.4); }
[data-page="market"] .idx {
  border: 5px solid transparent;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.006)) padding-box,
    linear-gradient(180deg, #0c1018, #070a0f) padding-box,
    var(--mk-steel) border-box;
  box-shadow: inset 0 0 0 1px #000, 0 0 0 1px #000, 0 10px 22px -14px #000;
}
[data-page="market"] .idx:hover { box-shadow: inset 0 0 0 1px #000, 0 0 0 1px #000, 0 0 0 4px var(--tone-wash), 0 14px 30px -14px var(--tone-glow); }
[data-page="market"] .mmon { border: 6px solid transparent; background: linear-gradient(180deg, #0a0e15, #06090e) padding-box, var(--mk-steel) border-box; box-shadow: inset 0 0 0 1px #000, 0 0 0 1px #000, 0 20px 46px -20px rgba(0, 0, 0, 0.9); }

/* ---------- Narrow ---------- */
@media (max-width: 768px) {
  .mkd__floor { --mw: calc(100cqw * 0.86); --dh: calc(var(--mw) * 0.15); }
  .mkd__mons { flex-direction: column; align-items: center; gap: clamp(26px, 7vw, 40px); }
  .mkd__floor > .mkd__desk { display: none; }
  .mkd__desk--solo { display: block; left: calc(var(--mw) * -0.07); right: calc(var(--mw) * -0.07); }
  .mkm__fig { font-size: 30px; }
  .mk-plate { grid-template-columns: auto minmax(0, 1fr); }
  .mk-plate__cta { grid-column: 1 / -1; width: 100%; min-height: 44px; }
  .mk-plate__risk { grid-column: 1 / -1; text-align: center; }
  .mk-plate__risk a { display: inline-flex; align-items: center; min-height: 44px; }
  .mkw__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mkw__glass { aspect-ratio: 16 / 6; }
  .mk-readout__cell { padding: 7px 11px; }
}
@media (max-width: 420px) {
  .mk-readout { width: 100%; }
  .mk-readout__cell { flex: 1 1 50%; border-right: 0; box-shadow: none; border-bottom: 1px solid rgba(0, 0, 0, 0.9); }
}
