/* Peaky Markets Board 1.3.0 — compact desktop + MarketWatch-style mobile ticker */
.peaky-markets{
  --pm-border:#d9dde1;--pm-text:#151515;--pm-muted:#707070;--pm-up:#07852e;--pm-down:#d81721;
  --pm-blue:#207bb3;--pm-row:#fff;--pm-row-alt:#f3f3f3;--pm-active:#ececec;
  position:relative;isolation:isolate;contain:layout paint;width:100%;max-width:100%;min-width:0;overflow:hidden;
  box-sizing:border-box;background:#fff;color:var(--pm-text);font-family:Arial,Helvetica,sans-serif;line-height:1.15;
}
.peaky-markets,.peaky-markets *,.peaky-markets *::before,.peaky-markets *::after{box-sizing:border-box}
.peaky-markets .pm-title{display:block;font:800 20px/1 Arial,Helvetica,sans-serif;letter-spacing:-.025em;margin:0 0 8px;padding:0;color:#171717}
.peaky-markets .pm-tabs{display:flex;align-items:flex-end;gap:0;width:100%;max-width:100%;min-width:0;margin:0;padding:0;border:0;border-bottom:2px solid #dedede;overflow-x:auto;overflow-y:hidden;white-space:nowrap;scrollbar-width:none;-ms-overflow-style:none}
.peaky-markets .pm-tabs::-webkit-scrollbar{display:none;width:0;height:0}
.peaky-markets button.pm-tab,.peaky-markets button.pm-range,.peaky-markets button.pm-row{box-shadow:none!important;border-radius:0!important;text-transform:none!important;letter-spacing:normal!important}
.peaky-markets button.pm-tab{appearance:none;-webkit-appearance:none;flex:0 0 auto;border:0;background:transparent;padding:7px 12px 6px;margin:0 0 -2px;font:700 14px/1 Arial,Helvetica,sans-serif;color:#333;cursor:pointer;border-bottom:2px solid transparent;min-width:0;min-height:0}
.peaky-markets button.pm-tab.is-active{background:#efefef;border-bottom-color:#222;color:#111}
.peaky-markets button.pm-tab:hover{background:#f6f6f6}
.peaky-markets button.pm-tab:focus-visible,.peaky-markets button.pm-range:focus-visible,.peaky-markets button.pm-row:focus-visible,.peaky-markets .pm-mobile-region:focus-visible{outline:2px solid #2271b1;outline-offset:-2px}

/* Mobile-only ticker is hidden on desktop. */
.peaky-markets .pm-mobile-bar{display:none}

/* Compact desktop board: rows and chart share roughly the same height. */
.peaky-markets .pm-body{display:grid;grid-template-columns:minmax(0,57%) minmax(0,43%);width:100%;max-width:100%;min-width:0;height:174px;min-height:174px;margin:0;padding:0;overflow:hidden}
.peaky-markets .pm-table-wrap{width:100%;max-width:100%;min-width:0;overflow:hidden;border-right:1px solid var(--pm-border)}
.peaky-markets .pm-table-head,.peaky-markets button.pm-row{display:grid;grid-template-columns:minmax(108px,1.30fr) minmax(72px,.86fr) minmax(70px,.82fr) minmax(62px,.72fr);align-items:center;width:100%;max-width:100%;min-width:0}
.peaky-markets .pm-table-head{height:24px;min-height:24px;border-bottom:1px solid var(--pm-border);font:400 12px/1 Arial,Helvetica,sans-serif;text-align:right;color:#222;background:#fff}
.peaky-markets .pm-table-head span{display:block;min-width:0;padding:0 6px;white-space:nowrap}
.peaky-markets .pm-table-head span:first-child{text-align:left}
.peaky-markets .pm-rows{height:150px;overflow:auto;scrollbar-width:thin;overscroll-behavior:contain}
.peaky-markets button.pm-row{position:relative;height:25px;min-height:25px;border:0;border-bottom:1px solid #e3e3e3;background:var(--pm-row);padding:0;margin:0;text-align:left;cursor:pointer;font:15px/1.05 Georgia,'Times New Roman',serif;color:#111;overflow:hidden}
.peaky-markets button.pm-row:nth-child(even){background:var(--pm-row-alt)}
.peaky-markets button.pm-row.is-selected{box-shadow:inset 3px 0 0 #191919!important}
.peaky-markets button.pm-row:hover{background:#eaeaea}
.peaky-markets .pm-cell{display:block;min-width:0;padding:3px 6px;overflow:hidden}
.peaky-markets .pm-name{display:flex;align-items:center;gap:7px;white-space:nowrap;text-overflow:ellipsis}
.peaky-markets .pm-name-text{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.peaky-markets .pm-price,.peaky-markets .pm-change,.peaky-markets .pm-pct{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.peaky-markets .pm-change.is-up,.peaky-markets .pm-pct.is-up{color:var(--pm-up)}
.peaky-markets .pm-change.is-down,.peaky-markets .pm-pct.is-down{color:var(--pm-down)}
.peaky-markets .pm-arrow{width:13px;height:18px;position:relative;display:inline-block;flex:0 0 13px}
.peaky-markets .pm-arrow::before{content:'';position:absolute;left:6px;top:1px;width:1.25px;height:12px;background:currentColor}
.peaky-markets .pm-arrow::after{content:'';position:absolute;width:6px;height:6px;border-right:1.25px solid currentColor;border-bottom:1.25px solid currentColor;left:3.5px;bottom:1px;transform:rotate(45deg)}
.peaky-markets .pm-arrow.is-down{color:var(--pm-down)}
.peaky-markets .pm-arrow.is-up{color:var(--pm-up);transform:rotate(180deg)}
.peaky-markets .pm-arrow.is-flat{opacity:.35}
.peaky-markets .pm-loading,.peaky-markets .pm-error,.peaky-markets .pm-empty{padding:18px 12px;font:13px/1.35 Arial,Helvetica,sans-serif;color:var(--pm-muted)}
.peaky-markets .pm-error{color:#b32d2e}

.peaky-markets .pm-chart-wrap{display:grid;grid-template-columns:minmax(0,1fr) 42px;width:100%;max-width:100%;min-width:0;height:174px;overflow:hidden}
.peaky-markets .pm-chart{position:relative;width:100%;max-width:100%;min-width:0;height:174px;overflow:hidden;background:#fff}
.peaky-markets svg.pm-chart-svg{display:block;width:100%!important;max-width:100%!important;height:174px!important;min-width:0;overflow:hidden}
.peaky-markets .pm-chart-empty{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#777;font:12px/1.35 Arial,Helvetica,sans-serif;padding:12px;text-align:center}
.peaky-markets .pm-chart-empty[hidden]{display:none}
.peaky-markets .pm-ranges{position:relative;z-index:2;width:42px;max-width:42px;min-width:42px;height:174px;overflow:hidden;border-left:2px solid #dedede;background:#fff;display:flex;flex-direction:column;align-items:stretch;margin:0;padding:0}
.peaky-markets button.pm-range{appearance:none;-webkit-appearance:none;width:100%;min-width:0;flex:1 1 0;border:0;background:#fff;margin:0;padding:0 4px;font:700 13px/1 Arial,Helvetica,sans-serif;color:#333;cursor:pointer;text-align:center}
.peaky-markets button.pm-range.is-active{background:#efefef;color:#111}
.peaky-markets button.pm-range:hover{background:#f3f3f3}

.peaky-markets .pm-foot{width:100%;max-width:100%;min-width:0;overflow:hidden;border-top:1px solid var(--pm-border);display:flex;justify-content:space-between;gap:12px;padding:7px 0 0;margin:0;color:#777;font:12px/1.15 Arial,Helvetica,sans-serif;min-height:23px}
.peaky-markets .pm-status{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.peaky-markets .pm-grid{stroke:#e4e7ea;stroke-width:1;vector-effect:non-scaling-stroke}
.peaky-markets .pm-axis-text{fill:#666;font:10px Arial,Helvetica,sans-serif}
.peaky-markets .pm-line{fill:none;stroke:var(--pm-blue);stroke-width:1.35;vector-effect:non-scaling-stroke}
.peaky-markets .pm-ref{stroke:#e52129;stroke-width:1.15;vector-effect:non-scaling-stroke}
.peaky-markets .pm-dot{fill:var(--pm-blue)}

@media(max-width:900px) and (min-width:681px){
  .peaky-markets button.pm-tab{font-size:13px;padding-left:9px;padding-right:9px}
  .peaky-markets .pm-table-head,.peaky-markets button.pm-row{grid-template-columns:minmax(98px,1.25fr) minmax(67px,.85fr) minmax(63px,.78fr) minmax(57px,.68fr)}
  .peaky-markets button.pm-row{font-size:15px}
  .peaky-markets .pm-cell,.peaky-markets .pm-table-head span{padding-left:5px;padding-right:5px}
}

/* MarketWatch-style mobile: region dropdown + one-line horizontal ticker, no chart. */
@media(max-width:680px){
  .peaky-markets{contain:layout paint;overflow:visible}
  .peaky-markets .pm-title{font-size:15px;margin:0 0 7px;letter-spacing:0}
  .peaky-markets .pm-tabs,.peaky-markets .pm-body,.peaky-markets .pm-foot{display:none!important}
  .peaky-markets .pm-mobile-bar{
    display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;width:100%;height:58px;
    border-top:1px solid #e2e2e2;border-bottom:1px solid #e2e2e2;background:#fff;overflow:hidden;
  }
  .peaky-markets .pm-mobile-region-wrap{display:block;position:relative;margin:0 10px 0 0;padding:0;flex:0 0 auto}
  .peaky-markets .pm-mobile-region-wrap::after{
    content:'';position:absolute;right:14px;top:50%;width:8px;height:8px;border-right:2px solid #222;border-bottom:2px solid #222;
    transform:translateY(-65%) rotate(45deg);pointer-events:none
  }
  .peaky-markets .pm-mobile-region{
    appearance:none;-webkit-appearance:none;height:44px;min-width:126px;max-width:145px;margin:0;padding:0 38px 0 12px;
    border:2px solid #0866ff;border-radius:8px;background:#fff;color:#171717;font:500 15px/1 Arial,Helvetica,sans-serif;box-shadow:none!important;
  }
  .peaky-markets .pm-mobile-ticker{
    display:flex;align-items:center;gap:0;min-width:0;width:100%;height:58px;overflow-x:auto;overflow-y:hidden;
    white-space:nowrap;scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;touch-action:pan-x;
  }
  .peaky-markets .pm-mobile-ticker::-webkit-scrollbar{display:none;width:0;height:0}
  .peaky-markets .pm-mobile-item{
    display:inline-flex;align-items:center;gap:6px;flex:0 0 auto;height:58px;padding:0 14px;border:0;background:#fff;
    color:#171717;font:500 13px/1 Arial,Helvetica,sans-serif;font-variant-numeric:tabular-nums;text-decoration:none;cursor:default;
  }
  .peaky-markets .pm-mobile-item:first-child{padding-left:4px}
  .peaky-markets .pm-mobile-item .pm-arrow{width:12px;height:17px;flex-basis:12px}
  .peaky-markets .pm-mobile-item .pm-arrow::before{left:5.5px;height:11px}
  .peaky-markets .pm-mobile-item .pm-arrow::after{width:5px;height:5px;left:3px}
  .peaky-markets .pm-mobile-name{font-weight:500}
  .peaky-markets .pm-mobile-price{display:none}
  .peaky-markets .pm-mobile-pct{font-weight:500}
  .peaky-markets .pm-mobile-pct.is-up{color:var(--pm-up)}
  .peaky-markets .pm-mobile-pct.is-down{color:var(--pm-down)}
  .peaky-markets .pm-mobile-loading,.peaky-markets .pm-mobile-error{display:inline-flex;align-items:center;height:58px;padding:0 14px;color:#777;font:13px/1 Arial,Helvetica,sans-serif;white-space:nowrap}
  .peaky-markets .pm-mobile-error{color:#b32d2e}
}

@media(max-width:420px){
  .peaky-markets .pm-mobile-region{min-width:112px;max-width:125px;height:42px;font-size:14px;padding-left:10px;padding-right:34px}
  .peaky-markets .pm-mobile-region-wrap{margin-right:7px}
  .peaky-markets .pm-mobile-region-wrap::after{right:12px}
  .peaky-markets .pm-mobile-item{padding-left:10px;padding-right:10px;font-size:12px;gap:5px}
  .peaky-markets .pm-mobile-price{display:none}
}
