/* Native market readout; quotes come from the website’s server endpoint. */
.page .header-right.has-markets { gap:22px; }
.markets-header-control { order:4; display:flex; align-items:center; flex:none; }
.ai-markets { position:relative; flex:none; color:var(--ink); font:inherit; font-size:11px; line-height:1.4; text-transform:none; letter-spacing:normal; --market-up:#81c995; --market-down:#f28b82; }
.markets-pill { position:relative; display:flex; align-items:center; justify-content:center; gap:8px; width:172px; height:30px; padding:0 11px; margin:0; border:1px solid #eeece718; border-radius:999px; background:#eeece703; list-style:none; cursor:pointer; font-variant-numeric:proportional-nums; transition:border-color .18s,background-color .18s; }
.markets-pill::after { content:''; position:absolute; inset:-6px 0; border-radius:999px; }
.markets-pill::-webkit-details-marker { display:none; }
.markets-quote { display:inline-flex; align-items:center; justify-content:center; gap:inherit; white-space:nowrap; }
.markets-pill:hover,.ai-markets[open] .markets-pill { border-color:#eeece735; background-color:#eeece707; }
.markets-pill:focus-visible,.markets-row:focus-visible,.markets-close:focus-visible,.markets-pause:focus-visible { outline:1px solid var(--ink); outline-offset:3px; }
.markets-symbol { color:var(--muted); font-size:10px; font-weight:500; line-height:1.2; letter-spacing:normal; }
.markets-price { color:var(--ink); font-size:11px; font-weight:500; line-height:1.2; letter-spacing:normal; text-align:right; white-space:nowrap; }
.markets-pill .markets-price { padding:0; }
.markets-change { display:inline-flex; align-items:center; justify-content:flex-end; gap:4px; color:var(--muted); font-size:10px; font-weight:400; line-height:1.2; letter-spacing:0; white-space:nowrap; }
.markets-change[data-direction=up] { color:var(--market-up); }
.markets-change[data-direction=down] { color:var(--market-down); }
.markets-direction { flex:none; width:0; height:0; border-left:2.5px solid transparent; border-right:2.5px solid transparent; }
.markets-change[data-direction=up] .markets-direction { border-bottom:3.5px solid currentColor; }
.markets-change[data-direction=down] .markets-direction { border-top:3.5px solid currentColor; }
.markets-change[data-direction=flat] .markets-direction { width:5px; height:1px; background:currentColor; border:0; }
.markets-panel { position:absolute; top:calc(100% + 10px); right:0; z-index:85; width:292px; overflow:hidden; border:1px solid #eeece71c; border-radius:14px; background:var(--paper); -webkit-backdrop-filter:blur(22px); backdrop-filter:blur(22px); box-shadow:0 12px 36px #0005; }
.ai-markets[open] .markets-panel { animation:markets-panel-enter .5s cubic-bezier(.25,.1,.25,1) both; }
@keyframes markets-panel-enter {
  from { opacity:0; transform:translateY(-10px); }
  to { opacity:1; transform:translateY(0); }
}
.markets-panel-heading { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:15px 18px 12px; border-bottom:1px solid #eeece711; }
.markets-title { margin:0; color:var(--ink); font:500 10px/1.4 var(--type-sans,'Instrument Sans',sans-serif); letter-spacing:.09em; text-transform:uppercase; }
.markets-caption { margin:4px 0 0; color:var(--muted); font-size:8px; line-height:1.3; }
.markets-close { display:grid; place-items:center; width:24px; height:24px; padding:0; background:none; border:0; border-radius:50%; color:var(--muted); cursor:pointer; font:300 17px/1 var(--type-sans,'Instrument Sans',sans-serif); }
.markets-close:hover { color:var(--ink); background:#eeece706; }
.markets-list { max-height:min(42svh,285px); overflow-y:auto; padding:0 10px 10px; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:#eeece71a transparent; }
.markets-list:focus-visible { outline:1px solid #eeece72a; outline-offset:-2px; border-radius:5px; }
.markets-group { margin:0; padding-top:12px; }
.markets-group + .markets-group { border-top:1px solid #eeece70d; margin-top:8px; }
.markets-group h3 { margin:0 8px 5px; color:var(--muted); font:400 8px/1.4 var(--type-sans,'Instrument Sans',sans-serif); letter-spacing:.055em; text-transform:uppercase; }
.markets-row { position:relative; display:grid; grid-template-columns:52px minmax(0,1fr) 58px; align-items:center; gap:14px; width:100%; min-height:32px; padding:0 8px; border:0; border-radius:5px; background:none; color:inherit; font:inherit; font-variant-numeric:proportional-nums; text-align:left; cursor:pointer; }
.markets-row .markets-symbol { position:relative; color:var(--muted); font-size:11px; letter-spacing:normal; }
.markets-row .markets-price { font-size:11px; font-weight:400; }
.markets-row .markets-change { font-size:10px; }
.markets-row:hover { background:#eeece706; }
.markets-row[aria-pressed=true] .markets-symbol { color:var(--ink); }
.markets-row[aria-pressed=true] .markets-symbol::before { content:''; position:absolute; left:-7px; top:calc(50% - 1px); width:2px; height:2px; border-radius:50%; background:var(--ink); }
.markets-panel-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; border-top:1px solid #eeece711; padding:10px 18px 11px; color:var(--muted); font-size:8px; }
.markets-pause { padding:3px 0; border:0; background:none; color:var(--muted); font:inherit; cursor:pointer; text-decoration:none; white-space:nowrap; }
.markets-pause:hover { color:var(--ink); }
@media (max-width:1200px) { .has-markets .location { display:none; } }
@media (max-width:700px) { .page .header-right.has-markets { gap:12px; } .markets-panel { width:min(292px,88vw); } }
@media (max-width:480px) {
  .page .header-right.has-markets { flex-wrap:nowrap; gap:10px; }
  .markets-pill { width:172px; height:28px; padding:0 10px; gap:8px; }
  .has-markets .motion-control { position:relative; display:grid; place-items:center; flex:none; width:24px; height:28px; padding:0; font-size:0; }
  .page .header-right.has-markets .motion-control { font-size:0; line-height:0; letter-spacing:0; }
  .has-markets .motion-control::before { content:''; box-sizing:content-box; width:5px; height:8px; border-left:1px solid currentColor; border-right:1px solid currentColor; }
  .has-markets .motion-control[aria-pressed=true]::before { width:0; height:0; margin-left:2px; border:4px solid transparent; border-right:0; border-left:6px solid currentColor; }
}
@media (max-width:350px) { .markets-pill { width:160px; padding:0 9px; gap:7px; } .markets-pill .markets-price { font-size:10px; } }
@media (prefers-reduced-motion:reduce) { .markets-pill { transition:none; } .ai-markets[open] .markets-panel { animation:none; } }
@media print { .markets-header-control { display:none; } }

/* The tooltip sits outside the scrolling panel so names are never clipped. */
.markets-tooltip { position:fixed; z-index:90; width:max-content; max-width:240px; padding:6px 9px; border:1px solid #eeece722; border-radius:6px; background:var(--paper); color:var(--ink); box-shadow:0 4px 12px #0003; font:400 11px/1.4 var(--type-sans,'Instrument Sans',sans-serif); letter-spacing:normal; text-transform:none; overflow-wrap:anywhere; }
.markets-tooltip[hidden] { display:none; }
.markets-change[data-direction=missing] { color:var(--muted); }
.markets-row[data-stale=true] .markets-price,.markets-price[data-stale=true] { color:var(--muted); }
