/* Section 3, the live market: the v2 hero's field (heroes/diggby-mm-v2, assets/hero.css), scoped under .mk and
   re-headed. Same canvas, ask bar, trade switch, answer card, tip and legend, same clocks. The section has no
   background of its own: it sits on the page ground, which has faded to night by the time it is in view. */
@property --sweep { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

.mk {
  --mk-line: rgba(242, 233, 219, .12); --mk-line-2: rgba(242, 233, 219, .2);
  --bone-70: rgba(242, 233, 219, .7); --bone-55: rgba(242, 233, 219, .55); --bone-40: rgba(242, 233, 219, .4);
  --navy-2: #0D1A29; --fade: cubic-bezier(.33, 1, .68, 1); --mk-ease: cubic-bezier(.16, 1, .3, 1);
  position: relative; color: var(--fg); --mk-col: clamp(480px, 34vw, 520px); /* r3 11-02: one width for the controls and the card below them */
  padding: calc(var(--nav-h, 64px) + clamp(28px, 4.5vh, 64px)) 0 0;
}
.mk-head {
  display: grid; grid-template-columns: minmax(0, 1fr) var(--mk-col); column-gap: 48px; align-items: end;
  padding: 0 var(--side);
}
.mk-h { margin: 0; font: 300 clamp(48px, 5.4vw, 96px)/1 var(--serif); letter-spacing: -.03em; }
.mk-h .ln { display: block; white-space: nowrap; }
.mk-side { display: flex; flex-direction: column; gap: 12px; }
.mk-eye { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; font: 400 11.5px/1.35 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--fg-2); }
.mk-eye b { font-weight: 400; color: var(--fg); }
.mk .live { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); flex: none; animation: mk-live 2.4s var(--fade) infinite; }
@keyframes mk-live { 0% { box-shadow: 0 0 0 0 rgba(244, 124, 34, .5); } 70%, 100% { box-shadow: 0 0 0 9px rgba(244, 124, 34, 0); } }
.mk-ctl { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
/* the city: a native select laid over a pill, so phones get their own picker */
.mk-city { position: relative; display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 14px 0 16px; border-radius: 12px; border: 1px solid var(--mk-line-2); background: rgba(13, 26, 41, .6); color: #F2E9DB; cursor: pointer; transition: border-color .25s var(--fade), background-color .25s var(--fade); }
.mk-city:hover { border-color: rgba(244, 124, 34, .45); }
.mk-city:focus-within { border-color: rgba(244, 124, 34, .7); background: rgba(13, 26, 41, .9); }
.mk-city-k { font: 400 10.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--bone-55); }
.mk-city-v { font: 500 15.5px/1.35 var(--sans); /* r3 11-02: was /1 with overflow hidden, which cut the g and y (Eric) */ letter-spacing: -.005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mk-city-n { margin-left: auto; font: 400 11px/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--signal); white-space: nowrap; }
.mk-city-chev { width: 12px; height: 12px; flex: none; color: var(--bone-55); }
.mk-city select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.mk.is-switching .field { opacity: .25; transition: opacity .2s var(--fade); }
/* r3 11-02: city and trade share one row above the ask bar, so the controls stand two rows high beside the two-line title */
.mk-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.mk-row .mk-city { gap: 10px; padding: 0 12px 0 14px; }
.mk-row .trades button { padding: 0 12px; }
.mk-row .mk-city { flex: 1 1 200px; min-width: 0; }
.mk-row .trades { flex: none; }
.mk-city .live { margin-right: -2px; }

/* ---------- the field ---------- */
.mk .field { position: relative; margin-top: clamp(20px, 3vh, 34px); height: clamp(560px, calc(100svh - var(--nav-h, 64px) - 210px), 860px); }
.mk .field::before { content: ""; position: absolute; left: var(--side); right: var(--side); top: 0; height: 1px; background: linear-gradient(90deg, rgba(244, 124, 34, .9), rgba(242, 233, 219, .3) 60%, transparent); transform-origin: 0 50%; transform: scaleX(0); }
.mk.is-ready .field::before { animation: mk-rule 1.6s var(--mk-ease) .1s forwards; }
@keyframes mk-rule { to { transform: scaleX(1); } }
.mk .dots { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle, rgba(242, 233, 219, .09) 1px, transparent 1.4px) 0 0 / 24px 24px; -webkit-mask: radial-gradient(75% 85% at 42% 55%, #000 30%, transparent 100%); mask: radial-gradient(75% 85% at 42% 55%, #000 30%, transparent 100%); opacity: 0; }
.mk.is-ready .dots { animation: mk-fadein 1.6s var(--fade) .2s forwards; }
.mk #cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: manipulation; }

/* ask bar (v2, unchanged clocks) */
.mk .ask {
  position: relative; flex: none; width: 100%; min-width: 0; height: 52px; display: flex; align-items: center; gap: 12px;
  padding: 0 16px; border-radius: 12px; background: rgba(13, 26, 41, .82); border: 1px solid var(--mk-line-2); color: #F2E9DB;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .6); transition: border-color .25s var(--fade), background-color .25s var(--fade);
}
.mk .ask::after {
  content: ""; position: absolute; inset: -1px; border-radius: 12px; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--sweep), transparent 0 62%, rgba(244, 124, 34, .95) 76%, rgba(255, 210, 170, .9) 80%, transparent 86%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .4s var(--fade);
}
.mk .ask.is-thinking::after { opacity: 1; animation: mk-sweep 1.4s linear infinite; }
@keyframes mk-sweep { to { --sweep: 360deg; } }
.mk .ask:focus-within { border-color: rgba(244, 124, 34, .6); background: rgba(13, 26, 41, .94); }
.mk .ask-ico { width: 18px; height: 18px; flex: none; color: var(--bone-55); }
.mk #q { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font: 400 15.5px/1 var(--sans); color: #F2E9DB; caret-color: var(--signal); letter-spacing: -.005em; }
.mk #q::placeholder { color: var(--bone-40); }
.mk .ask.has-ghost #q::placeholder { color: transparent; }
.mk .ask-ghost { position: absolute; left: 46px; right: 16px; top: 0; bottom: 0; display: flex; align-items: center; pointer-events: none; font: 400 15.5px/1 var(--sans); color: #F2E9DB; letter-spacing: -.005em; white-space: nowrap; overflow: hidden; opacity: 0; transition: opacity .2s; }
.mk .ask.has-ghost .ask-ghost { opacity: 1; }
.mk #ghostTxt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk .caret { flex: none;  display: inline-block; width: 2px; height: 19px; margin-left: 2px; background: var(--signal); animation: mk-blink 1s steps(2, jump-none) infinite; }
@keyframes mk-blink { 50% { opacity: 0; } }
.mk .ask-ans { flex: none; font: 400 11.5px/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--signal); padding: 7px 9px; border-radius: 6px; background: rgba(244, 124, 34, .1); opacity: 0; transform: translateX(6px); transition: opacity .35s var(--fade), transform .45s var(--mk-ease); white-space: nowrap; }
.mk .ask-ans.is-on { opacity: 1; transform: none; }
.mk .sugs {
  position: absolute; z-index: 20; left: -1px; right: -1px; top: calc(100% + 8px); margin: 0; padding: 6px; list-style: none; border-radius: 12px;
  background: rgba(13, 26, 41, .97); border: 1px solid var(--mk-line-2); box-shadow: 0 24px 50px -16px rgba(0, 0, 0, .7);
  opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .2s var(--fade), transform .3s var(--mk-ease); max-height: 320px; overflow: auto;
}
.mk .ask.is-open .sugs { opacity: 1; transform: none; pointer-events: auto; }
.mk .sugs li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 10px 12px; border-radius: 8px; cursor: pointer; font-size: 14.5px; color: #F2E9DB; }
.mk .sugs li small { font: 400 11px/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--bone-40); white-space: nowrap; }
.mk .sugs li[aria-selected="true"], .mk .sugs li:hover { background: rgba(242, 233, 219, .07); }
.mk .sugs li.is-q { color: var(--signal); }

.mk .trades { position: relative; flex: none; display: flex; padding: 4px; border-radius: 11px; background: rgba(13, 26, 41, .82); border: 1px solid var(--mk-line-2); height: 46px; align-items: center; }
.mk .trades button { position: relative; z-index: 1; height: 36px; padding: 0 14px; border: 0; background: none; border-radius: 8px; cursor: pointer; font: 400 14px/1 var(--sans); color: var(--bone-55); transition: color .25s var(--fade); }
.mk .trades button:hover { color: #F2E9DB; }
.mk .trades button:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.mk .trades button[aria-selected="true"] { color: #0A1420; }
.mk .trades-pill { position: absolute; top: 4px; left: 0; height: 36px; width: 0; border-radius: 8px; background: #F2E9DB; transition: transform .5s var(--mk-ease), width .5s var(--mk-ease); }

/* answer card */
.mk .card {
  position: absolute; z-index: 5; top: 22px; right: var(--side); bottom: 52px; width: var(--mk-col, 420px);
  display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; color: #F2E9DB;
  background: rgba(13, 26, 41, .78); border: 1px solid var(--mk-line-2); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7);
}
.mk .card-tabs { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid var(--mk-line); flex: none; }
.mk .card-tabs button { flex: 1; height: 34px; border: 0; border-radius: 7px; background: none; cursor: pointer; font: 400 11.5px/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--bone-55); transition: background-color .2s var(--fade), color .2s var(--fade); white-space: nowrap; }
.mk .card-tabs button:hover { color: #F2E9DB; }
.mk .card-tabs button:focus-visible { outline: 2px solid var(--signal); outline-offset: -2px; }
.mk .card-tabs button[aria-pressed="true"] { background: rgba(242, 233, 219, .08); color: #F2E9DB; }
.mk .card-tabs button b { font-weight: 400; color: var(--signal); margin-left: 6px; }
.mk .card-body { flex: 1; min-height: 0; overflow: auto; -webkit-mask: linear-gradient(#000 calc(100% - 36px), transparent); mask: linear-gradient(#000 calc(100% - 36px), transparent); padding-bottom: 18px; scrollbar-width: thin; scrollbar-color: rgba(242, 233, 219, .2) transparent; }
.mk .card-head { padding: 20px 20px 14px; }
.mk .card-k { margin: 0 0 8px; font: 400 11px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--bone-40); }
.mk .card-h { margin: 0; font: 300 27px/1.1 var(--serif); letter-spacing: -.015em; color: #F2E9DB; }
.mk .card-sub { margin: 8px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--bone-55); }
.mk .card-back { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 0; border: 0; background: none; cursor: pointer; font: 400 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--bone-55); transition: color .2s; }
.mk .card-back:hover { color: var(--signal); }
/* r3 11-02: the way back and what this is share one line */
.mk .card-back { margin-right: 14px; } .mk .card-back + .card-k { display: inline-block; vertical-align: baseline; margin: 0 0 12px; }
.mk .rows { list-style: none; margin: 0; padding: 0 8px 10px; }
.mk .row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 3px; padding: 10px 12px; border-radius: 9px; cursor: pointer; transition: background-color .2s var(--fade); animation: mk-rowin .55s var(--mk-ease) both; animation-delay: calc(var(--i, 0) * 32ms); }
@keyframes mk-rowin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.mk .row:hover, .mk .row.is-hot { background: rgba(242, 233, 219, .065); }
.mk .row-n { font-size: 14.5px; line-height: 1.25; color: #F2E9DB; text-wrap: balance; }
.mk .row-v { font: 400 12px/1.25 var(--mono); color: var(--bone-55); text-align: right; white-space: nowrap; align-self: baseline; }
.mk .row-s { grid-column: 1 / -1; font-size: 12.5px; line-height: 1.35; color: var(--bone-55); }
.mk .row-s em { font-style: normal; color: var(--signal); }
.mk .row.is-open .row-n::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); margin-right: 8px; transform: translateY(-2px); }
.mk .trade { padding: 14px 20px 6px; border-top: 1px solid var(--mk-line); animation: mk-rowin .55s var(--mk-ease) both; animation-delay: calc(var(--i, 0) * 50ms); }
.mk .trade-k { display: flex; justify-content: space-between; margin: 0 0 10px; font: 400 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--bone-40); }
.mk .trade-k b { font-weight: 400; color: var(--signal); }
.mk .firm { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: baseline; padding: 6px 8px; margin: 0 -8px 4px; border-radius: 7px; cursor: pointer; border: 0; background: none; color: inherit; font: inherit; width: calc(100% + 16px); text-align: left; transition: background-color .2s var(--fade); }
.mk .firm:hover { background: rgba(242, 233, 219, .065); }
.mk .firm-n { font-size: 14px; color: #F2E9DB; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk .firm-v { font: 400 12px/1 var(--mono); color: var(--bone-55); white-space: nowrap; }
.mk .firm-bar { grid-column: 1 / -1; height: 3px; border-radius: 2px; background: rgba(242, 233, 219, .08); overflow: hidden; }
.mk .firm-bar i { display: block; height: 100%; background: #F2E9DB; border-radius: 2px; transform-origin: 0 50%; animation: mk-bar .9s var(--mk-ease) both; animation-delay: calc(var(--i, 0) * 60ms + 120ms); }
.mk .is-hotcard .firm-bar i { background: var(--signal); }
@keyframes mk-bar { from { transform: scaleX(0); } }
.mk .mk-note { margin: 6px 20px 16px; padding: 12px 14px; border-radius: 9px; background: rgba(244, 124, 34, .09); font-size: 13px; line-height: 1.45; color: var(--bone-70); animation: mk-rowin .55s var(--mk-ease) .2s both; }
.mk .mk-note b { font-weight: 500; color: #F2E9DB; }
.mk .mk-note .pin { display: inline-block; width: 7px; height: 7px; background: var(--signal); margin-right: 8px; transform: translateY(-1px); }
.mk .card-foot { flex: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 10px 10px 20px; border-top: 1px solid var(--mk-line); font: 400 11px/1.4 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--bone-40); }
.mk .card-foot .cf-src { flex: 1 1 auto; min-width: 0; }
.mk .card-foot a { flex: none; color: var(--signal); text-decoration: none; padding: 8px 10px; border-radius: 7px; transition: background-color .2s var(--fade); white-space: nowrap; }
.mk .card-foot a:hover { background: rgba(244, 124, 34, .1); }

.mk .tip {
  position: absolute; z-index: 6; left: 0; top: 0; pointer-events: none; padding: 10px 12px; border-radius: 10px; min-width: 180px;
  background: rgba(10, 20, 32, .94); border: 1px solid var(--mk-line-2); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .7);
  opacity: 0; transition: opacity .18s var(--fade); will-change: transform;
}
.mk .tip.is-on { opacity: 1; }
.mk .tip b { display: block; font-weight: 500; font-size: 14px; color: #F2E9DB; white-space: nowrap; }
.mk .tip span { display: block; margin-top: 4px; font: 400 11.5px/1.35 var(--mono); color: var(--bone-55); white-space: nowrap; }
.mk .tip span em { font-style: normal; color: var(--signal); }

.mk .legend { position: absolute; z-index: 4; left: var(--side); bottom: 18px; display: flex; flex-wrap: wrap; gap: 8px 22px; font: 400 11px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--bone-40); pointer-events: none; }
.mk .lg { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; transition: opacity .4s var(--fade); }
.mk .lg i { display: inline-block; flex: none; }
.mk .lg-ring { width: 11px; height: 11px; border-radius: 50%; border: 2.5px solid rgba(242, 233, 219, .7); }
.mk .lg-arc { width: 11px; height: 11px; border-radius: 50%; border: 2.5px solid transparent; border-top-color: rgba(242, 233, 219, .85); border-right-color: rgba(242, 233, 219, .4); }
.mk .lg-open { width: 11px; height: 11px; border-radius: 50%; border: 2.5px solid var(--signal); box-shadow: 0 0 8px rgba(244, 124, 34, .6); }
.mk .lg-pin { width: 7px; height: 7px; background: var(--signal); }
.mk.is-trade-other .lg-swk { opacity: 0; }
.mk .readout { display: none; }

/* entrance: once, when the section first comes into view */
.js .mk .card, .js .mk .legend { opacity: 0; }
.mk.is-ready .card { animation: mk-rise 1.1s var(--mk-ease) .55s forwards; }
.mk.is-ready .legend { animation: mk-fadein 1s var(--fade) .9s forwards; }
@keyframes mk-fadein { to { opacity: 1; } }
@keyframes mk-rise { from { opacity: 0; transform: translateY(18px); filter: blur(5px); } to { opacity: 1; transform: none; filter: none; } }

@media (max-width: 1180px) {
  .mk { --mk-col: 340px; }
  .mk .trades button { padding: 0 10px; }
}
@media (max-width: 960px) and (min-width: 761px) {
  .mk-head { grid-template-columns: 1fr; row-gap: 22px; }
  .mk { --mk-col: 300px; }
  .mk .legend .lg:nth-child(1) { display: none; }
}

/* ---------- phones and narrow tablets: no card, a readout line, tap a ring ---------- */
@media (max-width: 760px), (max-width: 1024px) and (orientation: portrait) {
  .mk { padding-top: calc(var(--nav-h, 56px) + 34px); }
  .mk-head { grid-template-columns: 1fr; row-gap: 20px; padding: 0 var(--side); }
  .mk-h { font-size: clamp(38px, 10.6vw, 56px); line-height: 1.02; }
  .mk-eye { font-size: 10.5px; }
  .mk-ctl { gap: 8px; }
  .mk-row { flex-direction: column; gap: 8px; }
  .mk-row .mk-city { flex: 0 0 46px; } /* 11-03: the desktop flex-basis (200px) became its height in a column */
  .mk-ctl .trades { align-self: stretch; }
  .mk .ask { width: 100%; height: 48px; flex: none; }
  .mk .ask-ans { display: none; }
  .mk .ask-ghost { right: 14px; }
  .mk #q, .mk .ask-ghost { font-size: 15px; }
  .mk .trades { height: 44px; } .mk .trades button { flex: 1; height: 36px; font-size: 13.5px; padding: 0 8px; } .mk .trades-pill { height: 36px; }
  .mk .field { height: 470px; margin-top: 10px; }
  .mk .card, .mk .legend, .mk .tip { display: none; }
  .mk .readout { display: block; position: absolute; z-index: 4; left: var(--side); right: var(--side); bottom: 6px; margin: 0; font: 400 11px/1.4 var(--mono); letter-spacing: .03em; text-transform: uppercase; color: var(--bone-55); min-height: 2.8em; }
  .mk .readout b { font-weight: 400; color: #F2E9DB; }
  .mk .readout em { font-style: normal; color: var(--signal); }
}
@media (prefers-reduced-motion: reduce) {
  .js .mk .card, .js .mk .legend { opacity: 1 !important; animation: none !important; }
  .mk .row, .mk .trade, .mk .firm-bar i, .mk .mk-note { animation: none !important; }
  .mk .field::before { transform: none; }
}
.mk .sugs li.is-miss { display: block; cursor: default; color: var(--bone-70); }
.mk .sugs li.is-miss small { display: block; margin-top: 6px; white-space: normal; }
