/* Markets block (economic calendar + desk watchlist) — additive stylesheet.
   Scoped entirely under #markets; site.css is untouched. The block sits in a
   dark .alt band, so it uses the site's dark-ground token set:
   ground #120C2E / --indigo-deep, panel #1E1748, ink --hero-ink #F3EDDA,
   soft ink --hero-ink-soft #C9C2A8, gold --gold #E8C15A,
   borders rgba(196,181,253,.30).
   Brief 1412 (2026-10-27): the two TradingView widgets are cross-origin
   iframes; their documents cannot be reached by this stylesheet. What this
   sheet owns is the section's colour scheme and the iframe ELEMENTS: the
   section is pinned to the dark scheme (site.css :root declares
   "light dark", under which a light-scheme visitor's browser paints an
   unpainted or transparent iframe white), and the widget holder + iframe
   carry the deep ground themselves, so no state of the embed — loading,
   transparent per its config, or painted — can show white from our side.
   The widgets' own theme parameters live in index.html (colorTheme dark,
   isTransparent true on both).
   Brief 1416 (2026-10-27): the widgets still painted white on the owner's
   phone after 1412 — a cross-origin interior is simply not ours to style.
   The widgets are GONE, replaced by the desk's own panels (the Hub's
   brief-1396 / assignment-1232 cure): .mq-* below, rendered by
   assets/markets-panels.js from the desk's own feeds (/feed/calendar.json
   and /feed/quotes.json). Everything in the section now lives in this
   document and takes the site tokens directly. The dark-scheme pin
   stays as belt-and-braces for any future embed. */
#markets .markets-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:28px;
  margin-top:44px;
}
#markets .markets-panel{
  background:#1E1748;
  border:1px solid rgba(196,181,253,.30);
  border-radius:18px;
  padding:26px 26px 18px;
  box-shadow:0 18px 44px rgba(0,0,0,.35);
}
#markets .markets-h{
  color:var(--hero-ink);
  font-size:1.35rem;
  margin:0 0 10px;
}
#markets .markets-note{
  color:var(--hero-ink-soft);
  font-size:.98rem;
  line-height:1.55;
  margin:0 0 18px;
}
#markets{color-scheme:dark}
/* Own-built panels (brief 1416) — calendar list + watchlist board.
   Direction colours carry the old widget's semantics in site kin:
   up = gold, down = violet (#B79CFF, lightened from the widget's
   #8B5CF6 for text contrast on the panel ground), flat = soft ink. */
#markets .mq-scroll{
  max-height:640px;
  overflow-y:auto;
  padding-right:6px;
  border-radius:12px;
}
#markets .mq-scroll:focus-visible{
  outline:3px solid var(--gold);
  outline-offset:2px;
}
#markets .mq-day,
#markets .mq-group{
  font-family:"Cinzel",serif;
  font-size:.82rem;
  font-weight:700;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:var(--gold);
  margin:18px 0 4px;
  padding-bottom:6px;
  border-bottom:1px solid rgba(196,181,253,.30);
}
#markets .mq-day:first-child,
#markets .mq-group:first-child{margin-top:2px}
#markets .mq-ev{
  display:flex;
  flex-wrap:wrap;
  gap:4px 12px;
  align-items:baseline;
  padding:8px 2px;
  border-bottom:1px solid rgba(196,181,253,.12);
}
#markets .mq-time{color:var(--hero-ink);font-weight:600;min-width:76px}
#markets .mq-cur{color:var(--gold);font-weight:700;letter-spacing:.05em;min-width:38px}
#markets .mq-title{color:var(--hero-ink);flex:1 1 170px;line-height:1.45}
#markets .mq-figs{color:var(--hero-ink-soft);font-size:.88rem;white-space:nowrap}
#markets .mq-row{
  display:flex;
  gap:12px;
  align-items:baseline;
  padding:7px 2px;
  border-bottom:1px solid rgba(196,181,253,.12);
}
#markets .mq-sym{color:var(--hero-ink);font-weight:700;letter-spacing:.04em;flex:1}
#markets .mq-basis{
  color:var(--hero-ink-soft);
  font-size:.76rem;
  border:1px solid rgba(196,181,253,.30);
  border-radius:999px;
  padding:1px 8px;
  white-space:nowrap;
}
#markets .mq-price{color:var(--hero-ink);font-variant-numeric:tabular-nums}
#markets .mq-chg{font-variant-numeric:tabular-nums;min-width:76px;text-align:right}
#markets .mq-up{color:var(--gold)}
#markets .mq-down{color:#B79CFF}
#markets .mq-flat{color:var(--hero-ink-soft)}
#markets .mq-na{color:var(--hero-ink-soft);font-style:italic;font-size:.88rem}
#markets .mq-asof{
  color:var(--hero-ink-soft);
  font-size:.85rem;
  line-height:1.55;
  margin:12px 0 4px;
}
#markets table.markets-table .mq-cell-price,
#markets table.markets-table .mq-cell-chg{font-variant-numeric:tabular-nums}
#markets table.markets-table .mq-cell-chg.mq-up{color:var(--gold)}
#markets table.markets-table .mq-cell-chg.mq-down{color:#B79CFF}
#markets table.markets-table .mq-cell-chg.mq-flat{color:var(--hero-ink-soft)}
#markets .markets-table-block{margin-top:52px}
#markets .markets-scroll{
  overflow-x:auto;
  border:1px solid rgba(196,181,253,.30);
  border-radius:14px;
  background:#1E1748;
}
#markets .markets-scroll:focus-visible{
  outline:3px solid var(--gold);
  outline-offset:2px;
}
#markets table.markets-table{
  width:100%;
  border-collapse:collapse;
  min-width:640px;
  color:var(--hero-ink);
  font-size:.95rem;
}
#markets table.markets-table caption{
  text-align:left;
  padding:16px 18px 4px;
  color:var(--hero-ink-soft);
  font-size:.9rem;
}
#markets table.markets-table th,
#markets table.markets-table td{
  padding:10px 14px;
  text-align:left;
  vertical-align:top;
  border-bottom:1px solid rgba(196,181,253,.16);
  white-space:nowrap;
}
#markets table.markets-table td:nth-child(5){white-space:normal;min-width:200px}
#markets table.markets-table thead th{
  color:var(--gold);
  font-weight:600;
  border-bottom:1px solid rgba(196,181,253,.30);
}
#markets table.markets-table .mkt-day th{
  background:rgba(139,92,246,.16);
  color:var(--hero-ink);
  font-weight:700;
  letter-spacing:.02em;
}
#markets table.markets-table tbody th[scope="row"]{
  color:var(--gold);
  font-weight:700;
}
#markets .mkt-desks{color:var(--hero-ink-soft);white-space:normal;min-width:180px}
#markets .mkt-pill{
  display:inline-block;
  padding:2px 9px;
  border-radius:999px;
  border:1px solid var(--lavender);
  color:var(--hero-ink);
  font-size:.8rem;
  line-height:1.4;
}
#markets .mkt-pill-high{
  background:var(--gold);
  border-color:var(--gold);
  color:#120C2E;
  font-weight:700;
}
@media (max-width:1023px){
  #markets .markets-grid{grid-template-columns:1fr}
}
@media (max-width:640px){
  #markets .markets-panel{padding:20px 16px 12px}
  #markets table.markets-table{font-size:.88rem}
}
@media (prefers-reduced-motion: reduce){
  #markets *{scroll-behavior:auto}
}
