/* =========================================================
   CM Group — Tungsten Price page stylesheet
   PART 1 is copied VERBATIM from tungsten.css (header, mega menu, sidebar,
   filters, chart cards, footer) so every tungsten page shares one template.
   Do NOT edit PART 1 here — change the template everywhere or not at all.
   PART 2 holds only what is specific to the price page.
   ========================================================= */

/* ===================== PART 1 — shared template ===================== */
*{margin:0;padding:0;box-sizing:border-box}

/* Segment toggle (Mine / APT) */
.segment-toggle{display:flex;background:#f0f0f0;border-radius:24px;padding:4px;gap:4px;margin-right:16px}
.seg-btn{padding:8px 20px;border:none;border-radius:20px;font-size:14px;font-weight:600;color:#5f6368;background:transparent;cursor:pointer;font-family:inherit;transition:all .15s}
.seg-btn:hover:not(.active){background:rgba(255,255,255,.5)}
.seg-btn.active{background:#fff;color:#024d8f;box-shadow:0 1px 3px rgba(0,0,0,.1)}

.header{background:#fff;border-bottom:1px solid #e0e0e0;position:sticky;top:0;z-index:1000}
.header-inner{max-width:1400px;margin:0 auto;padding:0 48px;display:flex;align-items:center;height:80px;gap:36px}
.header-logo img{height:40px}
.header-nav{display:flex;gap:32px;list-style:none;align-items:center}
.header-nav>li{position:relative}
.header-nav>li>a,.header-nav>li>a:visited,.header-nav>li>a:active{color:#333!important;text-decoration:none!important;font-size:15px;font-weight:500;cursor:pointer;display:inline-flex;align-items:center;gap:4px}
.header-nav>li>a:hover{color:#024d8f!important;text-decoration:none!important}
.header-nav>li>a.active{color:#024d8f;font-weight:600}
.header-nav>li>a .arrow{font-size:9px;color:#80868b;transition:transform .2s}
.header-nav>li.open>a .arrow{transform:rotate(180deg)}
.header-nav>li>a.locked{color:#b0b8c4;cursor:default}
.header-nav>li>a.locked:hover{color:#b0b8c4}
.soon-badge{font-size:8px;background:#dadce0;color:#8892a0;padding:2px 6px;border-radius:8px;font-weight:600;letter-spacing:.5px;text-transform:uppercase}
.mega-menu{display:none;position:fixed;top:64px;left:0;right:0;background:#fff;border-top:1px solid #e0e0e0;box-shadow:0 12px 40px rgba(0,0,0,.08);z-index:9999}
.header-nav>li.open .mega-menu{display:block}
.mega-inner{max-width:1400px;margin:0 auto;padding:40px 48px;display:grid;grid-template-columns:1fr 1fr 1fr;gap:48px;align-items:start}
.mega-col h4{font-size:14px;font-weight:600;color:#1a1a1a;margin-bottom:20px;padding-left:14px}
.mega-item{display:flex;align-items:flex-start;gap:14px;padding:12px 14px;border-radius:8px;text-decoration:none;color:inherit;transition:background .15s;margin-bottom:2px}
.mega-item:hover{background:#f4f7fc}
.mega-item-icon{width:40px;height:40px;border-radius:8px;background:#f0f4f9;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.mega-item-icon svg{width:20px;height:20px;stroke:#024d8f;fill:none;stroke-width:2}
.mega-item-text h5{font-size:14px;font-weight:500;color:#1a1a1a;margin-bottom:2px}
.mega-item-text p{font-size:12px;color:#80868b;line-height:1.4}
.mega-links h4{font-size:14px;font-weight:600;color:#1a1a1a;margin-bottom:16px}
.mega-links a{display:block;font-size:14px;color:#3c4043;text-decoration:none;padding:8px 0;transition:color .15s}
.mega-links a:hover{color:#024d8f}
.mega-links .section{margin-bottom:24px}
.mega-promo{background:#f8f9fb;border-radius:12px;padding:28px}
.mega-promo h5{font-size:16px;font-weight:500;color:#1a1a1a;margin-bottom:10px}
.mega-promo p{font-size:13px;color:#5f6368;line-height:1.7;margin-bottom:16px}
.mega-promo .promo-btn{color:#024d8f;font-size:14px;font-weight:600;text-decoration:none}
.mega-promo .promo-btn:hover{text-decoration:underline}
.header-signin{display:flex;align-items:center;font-size:14px;font-weight:400;text-decoration:none;color:#2a2a2a}
.header-right{display:flex;align-items:center;gap:20px;margin-left:auto}
.header-right a{color:#024d8f;text-decoration:none;font-size:13px;font-weight:400}
.header-right a:hover{text-decoration:underline}
.header-right .signout{color:#80868b}
.header-right .signout:hover{color:#c62828;text-decoration:none}
body{font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;background:#fff;color:#202124;font-size:14px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}
.main-layout{display:grid;grid-template-columns:280px 1fr;max-width:1400px;margin:0 auto;min-height:calc(100vh - 80px)}
.page-title{font-size:24px;font-weight:400;color:#202124;margin-bottom:2px}
.page-subtitle{font-size:13px;color:#80868b;font-weight:400;margin-bottom:20px}
.ccy-toggle{display:flex;gap:0;border:1px solid #dadce0;border-radius:20px;overflow:hidden}
.tb-btn{padding:6px 14px;border:1px solid #dadce0;border-radius:20px;font-size:12px;font-weight:500;color:#3c4043;background:#fff;cursor:pointer;display:inline-flex;align-items:center;gap:5px;font-family:inherit;transition:all .15s}
.tb-btn:hover{background:#f1f3f4}
.tb-btn.active{border-color:#1a1a1a;color:#1a1a1a;background:#f0f0f0}
.ccy-toggle button{padding:7px 16px;border:none;background:#fff;font-size:13px;font-weight:500;color:#5f6368;cursor:pointer;transition:all .15s;font-family:inherit}
.ccy-toggle button:not(:last-child){border-right:1px solid #dadce0}
.ccy-toggle button.active{background:#f0f0f0;color:#1a1a1a;font-weight:600}
.ccy-toggle button:hover:not(.active){background:#f1f3f4}
.sidebar-toggle-full{width:100%}
.sidebar-toggle-full button{flex:1;padding:7px 0;font-size:12px}
.mega-overlay{display:none;position:fixed;top:64px;left:0;right:0;bottom:0;background:rgba(0,0,0,.12);z-index:998}

.user-dropdown{position:relative;display:inline-flex}
.user-dropdown-btn{display:flex;align-items:center;gap:6px;font-size:14px;font-weight:400;color:#2a2a2a;background:none;border:none;outline:none;cursor:pointer;font-family:inherit;padding:4px 0}
.user-dropdown-btn:hover{color:#024d8f}
.user-dropdown-menu{visibility:hidden;opacity:0;pointer-events:none;position:absolute;top:calc(100% + 10px);right:0;background:#fff;border:1px solid #e0e0e0;border-radius:10px;box-shadow:0 8px 24px rgba(0,0,0,.10);min-width:180px;z-index:10000;overflow:hidden;transition:opacity .15s}
.user-dropdown-menu.open{visibility:visible;opacity:1;pointer-events:auto}
.user-dropdown-menu a{display:flex;align-items:center;gap:10px;padding:10px 16px;font-size:13px;color:#3c4043!important;text-decoration:none!important}
.user-dropdown-menu a:hover{background:#f8f9fa}
.dd-divider{height:1px;background:#f1f3f4;margin:4px 0}
.dd-logout{color:#c62828!important}

.sidebar{border-right:1px solid #ebebeb;overflow-y:auto;max-height:calc(100vh - 80px);position:sticky;top:80px;background:#fff;padding:20px 0}
.sb-section{padding:12px 22px 16px;margin-bottom:4px;border-bottom:1px solid #f1f3f4}
.sb-section:last-child{border-bottom:none}
.sb-label{font-size:11px;font-weight:600;color:#5f6368;text-transform:uppercase;letter-spacing:.5px;margin-bottom:10px;display:flex;justify-content:space-between;align-items:center}
.tab-row{display:flex;flex-direction:column;gap:2px}
.tab-btn{padding:10px 16px;border:none;border-radius:8px;font-size:13px;font-weight:500;color:#3c4043;background:transparent;cursor:pointer;font-family:inherit;transition:all .15s;text-align:left;display:flex;align-items:center;gap:8px}
.tab-btn:hover{background:#f1f3f4}
.tab-btn.active{background:#f0f0f0;color:#1a1a1a;font-weight:600}

.sidebar select{width:100%;padding:8px 14px;border:1px solid #dadce0;border-radius:20px;font-size:13px;font-family:inherit;background:#fff;outline:none;color:#3c4043;cursor:pointer;-webkit-appearance:none;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235f6368' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;padding-right:32px}
.sidebar select:focus{border-color:#1a1a1a;box-shadow:0 0 0 2px rgba(26,26,26,.15)}
.sidebar select:hover{background-color:#f8f9fa}

.quick-btn{padding:4px 10px;border:1px solid #dadce0;border-radius:20px;font-size:10px;font-weight:600;color:#8892a0;background:#fff;cursor:pointer;transition:all .15s}
.quick-btn:hover{border-color:#1a1a1a;color:#1a1a1a}
.quick-btn.active{background:#f0f0f0;color:#1a1a1a;border-color:#1a1a1a;font-weight:600}
.filter-label{font-size:9px;text-transform:uppercase;letter-spacing:1px;color:#b0b8c4;font-weight:600}
.content{padding:16px 28px 40px;min-width:0}
.chart-section{background:#f8f9fa;border-radius:16px;padding:20px 24px;margin-bottom:20px}
.chart-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.c1-curve-toggle{cursor:pointer}
.c1-arrow{font-size:12px;color:#80868b;display:inline-block;transition:transform .15s}
.c1CurveWrap-collapsed .c1-arrow{transform:rotate(-90deg)}
.chart-title{font-size:18px;font-weight:400;color:#202124}
.chart-subtitle{font-size:13px;color:#80868b;margin-top:2px;font-weight:400}
.chart-wrap{overflow:hidden;height:420px;position:relative}
.legend-row{display:flex;gap:6px;flex-wrap:wrap;margin-top:12px;justify-content:center}
.legend-item{display:inline-flex;align-items:center;gap:5px;font-size:12px;color:#3c4043;padding:4px 12px;border:1px solid #dadce0;border-radius:20px;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.04)}
.legend-swatch{width:10px;height:10px;border-radius:3px;border:1px solid #1a1a1a}
.legend-sortable{cursor:pointer}
.legend-sortable:hover{background:#f1f3f4}
.legend-sortable.active{border-color:#024d8f;font-weight:600;color:#024d8f}
.legend-reset{cursor:pointer;color:#80868b;font-size:11px}
.legend-reset:hover{background:#f1f3f4}

/* ===================== Mine Profile: Production Status Heatmap (Operations tab)
   Flat calendar-heatmap convention (GitHub-contributions style), not the page's pill/shadow
   skin — revised per semantic-review 2026-11-19-151925 (ac550c7). ===================== */
.mp-heatmap-card{padding:28px 32px}
.mp-heatmap{display:flex;flex-direction:column;gap:3px;overflow-x:auto;padding-bottom:4px}
.mp-heat-row{display:grid;grid-template-columns:52px repeat(12,minmax(40px,64px));gap:3px;align-items:center}
.mp-heat-head{margin-bottom:4px}
.mp-heat-ylabel{font-size:13px;color:#5b6472;font-variant-numeric:tabular-nums;text-align:right;padding-right:8px}
.mp-heat-mlabel{font-size:11px;color:#667085;text-align:center;text-transform:uppercase;letter-spacing:.4px}
.mp-heat-cell{height:36px;border-radius:1px;border:1px solid rgba(26,26,26,.08);cursor:pointer;display:flex;align-items:center;justify-content:center;overflow:hidden}
.mp-heat-cell:hover{outline:1px solid #1a1a1a;outline-offset:0;position:relative;z-index:1}
.mp-heat-empty{background:transparent;border:none;cursor:default}
.mp-heat-empty:hover{outline:none}
.mp-heat-cell-label{font-size:12.5px;font-weight:600;color:#1a1a1a;font-variant-numeric:tabular-nums;letter-spacing:-.2px;pointer-events:none}
.mp-heat-text-light .mp-heat-cell-label{color:#fff}
.mp-heat-shutdown{background-image:repeating-linear-gradient(45deg,rgba(255,255,255,.55) 0,rgba(255,255,255,.55) 2px,transparent 2px,transparent 6px)}
.mp-heat-suspended{background-image:repeating-linear-gradient(135deg,rgba(255,255,255,.4) 0,rgba(255,255,255,.4) 2px,transparent 2px,transparent 6px)}
.mp-heat-producing-zero{background:repeating-linear-gradient(45deg,#f1f3f5 0,#f1f3f5 3px,#e4e9f0 3px,#e4e9f0 6px)}
.mp-heat-producing-zero .mp-heat-cell-label{color:#98a2b3}
.mp-heat-forecast{border:1px dashed #344054}
/* Legend: flat swatch + label, no pill chrome, matches the cells it describes exactly
   (hatch classes reused so the legend never drifts out of sync with the grid). */
.mp-heatmap-legend{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-top:14px;font-size:11.5px;color:#3c4043}
.mp-heat-legend-group{display:inline-flex;align-items:center;gap:4px}
.mp-heat-legend-label{margin-right:2px}
.mp-heat-ramp-cell{display:inline-flex;align-items:center;justify-content:center;width:26px;height:16px;border:1px solid rgba(26,26,26,.08)}
.mp-heat-ramp-cell .mp-heat-cell-label{font-size:8.5px}
.mp-heat-legend-sub{color:#667085;margin-left:4px}
.mp-heat-legend-item{display:inline-flex;align-items:center;gap:5px}
.mp-heat-legend-swatch{display:inline-block;width:14px;height:14px;border:1px solid rgba(26,26,26,.08)}
.mp-heat-legend-swatch.mp-heat-forecast{border:1px dashed #344054}
/* Compact tooltip, distinct from the heavier .cc-tip card used for the cost-trend chart —
   this one has to stay light while sweeping across up to 120 adjacent cells. */
.mp-heat-tip{position:fixed;z-index:9999;pointer-events:none;opacity:0;transition:opacity .08s ease;background:#1a1a1a;color:#fff;border-radius:4px;padding:6px 9px;font-size:11.5px;line-height:1.5;box-shadow:0 2px 8px rgba(16,24,40,.25);max-width:180px}
.mp-heat-tip-hd{font-weight:600;margin-bottom:2px}
.mp-heat-tip-fc{font-weight:400;color:#c9ccd1;font-size:10px;text-transform:uppercase;letter-spacing:.4px}
.mp-heat-tip-row{display:flex;justify-content:space-between;gap:10px;color:#d7dae0}
.mp-heat-tip-pct{color:#8ba0ba}
.ranking-panel{background:#fff;border:1px solid #ebebeb;border-radius:16px;padding:24px;box-shadow:0 1px 3px rgba(0,0,0,.04);margin-bottom:20px;overflow:visible}
.ranking-panel .detail-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:16px}
.ranking-panel .detail-title{font-size:22px;font-weight:400;color:#202124}
.ranking-panel .detail-sub{font-size:13px;color:#80868b;margin-top:3px}
.rank-count{font-size:12px;color:#80868b;white-space:nowrap;margin-left:16px;padding-top:4px}
.rank-scroll{max-height:min(560px,70vh);overflow:auto;border:1px solid #f1f3f4;border-radius:8px}
.footer{max-width:1440px;margin:24px auto 0;padding:20px 40px 40px;text-align:center;border-top:1px solid #ebebeb}
.footer-text{font-size:11px;color:#9aa0a6}
.filter-dd{position:relative}
.filter-dd-btn{width:100%;padding:8px 14px;border:1px solid #dadce0;border-radius:20px;font-size:13px;background:#fff;cursor:pointer;text-align:left;color:#3c4043;display:flex;justify-content:space-between;align-items:center;box-sizing:border-box;transition:all .15s;outline:none}
.filter-dd-btn:hover{border-color:#1a1a1a}
.filter-dd-btn.active{border-color:#1a1a1a;background:#f5f5f5;font-weight:500}
.filter-dd-list{display:none;max-height:200px;overflow-y:auto;background:#fff;border:1px solid #dadce0;border-radius:12px;margin-top:4px;padding:4px 0;box-sizing:border-box;box-shadow:0 4px 16px rgba(0,0,0,.12);position:relative;left:0;right:0;z-index:500}
.filter-dd-list.open{display:block}
.filter-dd-item{display:flex;align-items:center;gap:8px;padding:7px 14px;font-size:13px;cursor:pointer;color:#3c4043;transition:background .1s}
.filter-dd-item:hover{background:#f1f3f4}
.filter-dd-item input{margin:0;accent-color:#1a1a1a;width:16px;height:16px}
.user-avatar{width:32px;height:32px;border-radius:50%;background:#024d8f;color:#fff;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:600;cursor:pointer;letter-spacing:.5px}

/* ===================== PART 2 — price-page specific ===================== */
.page-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:20px}
.page-actions{display:flex;gap:8px;align-items:center;padding-top:4px}
.tb-btn:disabled{opacity:.45;cursor:not-allowed}
.tb-btn:disabled:hover{background:#fff}
.preview-badge{background:#fbbc04;color:#202124;font-size:11px;padding:3px 10px;border-radius:12px;font-weight:600;vertical-align:middle;margin-left:8px}
.icon-16{width:16px;height:16px}

/* small layout utilities used instead of inline styles (HTML/CSS/JS stay separate) */
.full-width{width:100%}
.mb-8{margin-bottom:8px}
.mb-10{margin-bottom:10px}
.mb-12{margin-bottom:12px}
.quick-btn-row{display:flex;gap:4px}
.quick-btn-row .quick-btn{flex:1;text-align:center}
.dd-val-wrap{color:#555;font-weight:400}
.hl-input{width:100%;padding:8px 14px;border:1px solid #dadce0;border-radius:20px;font-size:12px;font-family:inherit;background:#fff;box-sizing:border-box;outline:none}

/* empty state shown over a chart until data is connected */
.empty-note{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;color:#80868b;font-size:13px;pointer-events:none;text-align:center}
.empty-note b{font-weight:500;color:#5f6368;font-size:14px}

/* section heading between blocks */
.section-title{font-size:18px;font-weight:400;color:#202124;margin:8px 0 4px}
.section-sub{font-size:13px;color:#80868b;margin-bottom:14px}

/* difference table */
.diff-table{width:100%;border-collapse:collapse;font-size:13px}
.diff-table th{text-align:left;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.5px;color:#80868b;padding:8px 12px;border-bottom:1px solid #e4e9f0;background:#f8fafc;position:sticky;top:0;z-index:2;box-shadow:0 1px 0 #e4e9f0}
.diff-table td{padding:6px 12px;border-bottom:1px solid #f1f3f4;color:#3c4043;font-variant-numeric:tabular-nums}
.diff-table th.r,.diff-table td.r{text-align:right}
.diff-table .empty-row td{text-align:center;color:#80868b;padding:28px 12px}
.diff-table th.rank-col,.diff-table td.rank-col{width:28px;color:#aab1ba;font-weight:400}
.diff-table th.sortable.sort-asc,.diff-table th.sortable.sort-desc{color:#024d8f;background:#eef3f9}
.diff-table td.cash-col{font-weight:600;color:#1a1a1a}
.diff-pos{color:#188038}
.diff-neg{color:#c62828}

/* ===================== cost-curve page additions ===================== */
.stats-row{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:20px}
.stat{text-align:center;padding:12px 16px;background:#f8f9fa;border-radius:12px;display:flex;flex-direction:column;align-items:center;justify-content:center}
.stat-val{font-size:22px;font-weight:400;color:#202124}
.stat-label{font-size:11px;color:#80868b;text-transform:uppercase;letter-spacing:.5px;margin-top:2px}
.rank-table-row{cursor:pointer}
.rank-table-row:hover{background:#eef3f9}
.rank-table-row:focus-visible{outline:2px solid #024d8f;outline-offset:-2px}
.sortable{cursor:pointer;user-select:none}
.sortable:hover{color:#1a1a1a}
.sortable.sort-asc::after{content:" ▲";font-size:9px}
.sortable.sort-desc::after{content:" ▼";font-size:9px}
.label-btn{padding:6px 14px;font-size:12px}
.curve-canvas{cursor:pointer}
.w46{width:46px}
.pct-100{color:#80868b;font-weight:600}

/* ===================== map (same template as tungsten.html / costs.html) ===================== */
.map-section{background:#fff;border:1px solid #ebebeb;border-radius:16px;overflow:hidden;box-shadow:0 1px 3px rgba(0,0,0,.04);margin-bottom:20px;height:380px;position:relative}
.map-toolbar{position:absolute;top:16px;right:16px;z-index:460;display:flex;flex-direction:column;gap:8px}
.map-tool{width:38px;height:38px;border-radius:9px;background:#1a1a2e;border:none;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 2px 8px rgba(0,0,0,.35);position:relative;transition:background .15s}
.map-tool:hover{background:#024d8f}
.map-tool.active{background:#2dd4a8}
.map-tool svg{width:19px;height:19px;stroke:#fff;stroke-width:2;fill:none}
.map-tool.active svg{stroke:#0a0e27}
.map-tool[data-tip]:hover::after{content:attr(data-tip);position:absolute;right:46px;top:50%;transform:translateY(-50%);background:#1a1a2e;color:#fff;font-size:11px;font-weight:500;padding:4px 8px;border-radius:6px;white-space:nowrap;box-shadow:0 2px 8px rgba(0,0,0,.35);pointer-events:none}
.mt-panel{position:absolute;top:16px;right:64px;z-index:461;width:210px;background:#2b3440;border:1px solid rgba(255,255,255,.08);border-radius:12px;box-shadow:0 8px 28px rgba(0,0,0,.45);display:none;overflow:hidden;font-family:inherit}
.mt-panel.open{display:block}
.mt-panel .mp-head{display:flex;align-items:center;gap:12px;padding:16px 18px 14px}
.mt-panel .mp-head svg{width:22px;height:22px;stroke:#fff;stroke-width:1.8;fill:none;flex:none}
.mt-panel .mp-head h4{font-size:16px;font-weight:600;color:#fff;margin:0}
.mt-panel .mp-divider{height:1px;background:rgba(255,255,255,.1);margin:0}
.mt-panel .mp-body{padding:10px 18px 14px}
.mp-opt{display:flex;align-items:center;gap:14px;padding:10px 2px;font-size:14px;color:#e6eaef;cursor:pointer;border-radius:8px;transition:background .12s}
.mp-opt:hover{background:rgba(255,255,255,.05)}
.mp-opt input{position:absolute;opacity:0;width:0;height:0}
.mp-opt .mp-radio{flex:none;width:22px;height:22px;border-radius:50%;border:2px solid #cfd6de;display:flex;align-items:center;justify-content:center;transition:border-color .12s}
.mp-opt input:checked ~ .mp-radio{border-color:#fff}
.mp-opt input:checked ~ .mp-radio::after{content:"";width:11px;height:11px;border-radius:50%;background:#fff}
#mineMap{height:100%;width:100%}
#mineMap .maplibregl-canvas{background:#02030a}
.map-legend{display:none;position:absolute;bottom:12px;right:12px;z-index:450;background:#fff;border:1px solid #ebebeb;border-radius:10px;padding:8px 12px;font-size:10px;max-height:180px;overflow-y:auto;box-shadow:0 2px 6px rgba(0,0,0,.08)}
.legend-head{font-weight:600;margin-bottom:4px;color:#202124}
.legend-row-item{display:flex;align-items:center;gap:4px;margin:2px 0;color:#3c4043}
.legend-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}
.map-legend-ramp{display:flex;margin-top:4px}
.map-legend-ramp-cell{flex:1;height:10px}
.map-legend-ramp-labels{display:flex;justify-content:space-between;font-size:9px;color:#80868b;margin-top:2px}
.map-legend-size-note{margin-top:6px;padding-top:6px;border-top:1px solid #f1f3f4;color:#80868b;font-size:9px}

/* ===================== right detail panel (same template as costs.html) ===================== */
.detail-panel{position:fixed;top:80px;right:0;width:320px;height:calc(100vh - 80px);background:#fff;border-left:1px solid #ebebeb;overflow-y:auto;z-index:600;box-shadow:-2px 0 12px rgba(0,0,0,.06);padding:0;display:none}
.detail-resize{position:absolute;left:-5px;top:0;bottom:0;width:10px;cursor:col-resize;z-index:601;display:flex;align-items:center;justify-content:center}
.detail-resize::after{content:"◀";font-size:12px;color:#80868b;width:20px;height:40px;border-radius:10px;background:#fff;border:1px solid #dadce0;display:flex;align-items:center;justify-content:center;transition:all .2s;box-shadow:0 1px 4px rgba(0,0,0,.1)}
.detail-resize:hover::after,.detail-resize.active::after{color:#024d8f;border-color:#024d8f}
.hover-section{display:none;padding:14px;margin:14px;background:#f0f6ff;border-radius:12px;border:1px solid #c2d9f2}
.hover-section.show{display:block}
.hover-label{font-size:9px;text-transform:uppercase;letter-spacing:1px;color:#1a73e8;margin-bottom:6px;font-weight:600}
.hover-title{font-size:14px;font-weight:600;margin-bottom:2px;color:#202124}
.hover-sub{font-size:11px;color:#80868b;margin-bottom:6px}
.hover-costs{font-size:12px}
.hover-costs .hc-row{display:flex;justify-content:space-between;padding:2px 0}
.hover-costs .hc-label{color:#5f6368}
.hover-costs .hc-val{font-weight:500;color:#202124}
.detail-hero{padding:24px 28px 20px;background:#f8f9fa;border-bottom:1px solid #f0f0f0}
.detail-hero .detail-header{display:flex;justify-content:space-between;align-items:flex-start}
.detail-hero .detail-title{font-size:18px;font-weight:500;color:#202124}
.detail-price{font-size:28px;font-weight:400;color:#202124;margin-top:6px;letter-spacing:-.5px}
.detail-panel.hover-mode .detail-hero{background:#fff;border-bottom:1px solid #f0f0f0;padding:16px 24px 12px}
.detail-panel.hover-mode .detail-title{font-size:15px}
.detail-panel.hover-mode .detail-price{font-size:22px;margin-top:4px}
.detail-panel.hover-mode .detail-body{padding:0 24px 20px}
.detail-price span{font-size:13px;color:#80868b;font-weight:400;margin-left:4px}
.detail-hero .detail-sub{font-size:12px;color:#5f6368;margin-top:6px;line-height:1.6}
.detail-body{padding:0 28px 24px}
.detail-table{width:100%;border-collapse:separate;border-spacing:0;font-size:13px;margin-top:0}
.detail-table th{text-align:left;padding:12px 0;font-size:11px;text-transform:uppercase;letter-spacing:.5px;color:#80868b;font-weight:600;border-bottom:2px solid #ebebeb}
.detail-table td{padding:11px 0;border-bottom:1px solid #f1f3f4;color:#3c4043}
.detail-table tbody tr{transition:background .08s}
.detail-table tbody tr:hover td{background:#f8f9fa}
.detail-table tbody tr:last-child td{border-bottom:none}
.detail-table tfoot td{border-top:2px solid #ebebeb;font-weight:600;color:#202124;padding:12px 0}

/* ===================== mine profile open button (in detail panel hero) ===================== */
.mine-profile-btn{margin-top:14px;width:100%;padding:10px;border:1px solid #024d8f;background:#fff;color:#024d8f;border-radius:8px;font-size:13px;font-weight:600;cursor:pointer;transition:all .15s}
.mine-profile-btn:hover{background:#024d8f;color:#fff}

/* ===================== full-screen mine profile (same template as costs.html #mineProfile) ===================== */
#mineProfile{display:none;position:fixed;top:80px;left:calc(max(0px,(100vw - 1400px)/2) + 280px);right:0;bottom:0;height:calc(100vh - 80px);z-index:900;background:#fff;overflow-y:auto}
#mineProfile.open{display:block}
#mineProfile .rpf-top{background:#1F3A5F;color:#fff;padding:20px 36px}
#mineProfile .rpf-top-row{display:flex;justify-content:space-between;align-items:flex-start;max-width:1400px;margin:0 auto}
#mineProfile .rpf-name{font-size:26px;font-weight:600;line-height:1.1}
#mineProfile .rpf-sub{font-size:13px;color:#b6c6db;margin-top:6px}
#mineProfile .rpf-x{background:rgba(255,255,255,.12);border:none;color:#fff;font-size:20px;width:40px;height:40px;border-radius:50%;cursor:pointer;flex-shrink:0;transition:background .15s}
#mineProfile .rpf-x:hover{background:rgba(255,255,255,.28)}
#mineProfile .rpf-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:0;max-width:1400px;margin:16px auto 0}
#mineProfile .rpf-kpi{padding:4px 20px 4px 0;border-left:1px solid rgba(255,255,255,.14);padding-left:20px}
#mineProfile .rpf-kpi:first-child{border-left:none;padding-left:0}
#mineProfile .rpf-kpi .v{font-size:22px;font-weight:600;line-height:1.05;letter-spacing:-.5px}
#mineProfile .rpf-kpi .l{font-size:10px;text-transform:uppercase;letter-spacing:.8px;color:#b6c6db;margin-bottom:5px}
#mineProfile .rpf-kpi .s{font-size:10px;color:#8ba0ba;margin-top:3px}
#mineProfile .rpf-body{max-width:1400px;margin:0 auto;padding:28px 36px 60px}
#mineProfile .rpf-tabs{position:sticky;top:0;z-index:4;background:#fff;border-bottom:1px solid #e4e9f0;padding:0 36px;display:flex;gap:4px;flex-wrap:wrap;box-shadow:0 1px 4px rgba(0,0,0,.04)}
#mineProfile .rpf-tab{background:none;border:none;padding:15px 18px;font-size:13px;font-weight:600;color:#80868b;cursor:pointer;border-bottom:3px solid transparent;transition:all .15s;margin-bottom:-1px}
#mineProfile .rpf-tab:hover{color:#1F3A5F}
#mineProfile .rpf-tab.active{color:#1F3A5F;border-bottom-color:#1F3A5F}
#mineProfile .rpf-card{background:#f8f9fa;border:1px solid #e4e9f0;border-radius:14px;padding:20px 22px;margin-bottom:22px}
#mineProfile .rpf-card h3{font-size:12px;text-transform:uppercase;letter-spacing:1.2px;color:#1F3A5F;font-weight:600;margin:0 0 16px}
#mineProfile .rpf-model{width:100%;border-collapse:collapse;font-size:12.5px}
#mineProfile .rpf-model td{padding:8px 0;border-bottom:1px solid #eef0f3;color:#3c4043}
#mineProfile .rpf-model td:nth-child(2){text-align:right;font-weight:600;color:#1a1a1a;font-variant-numeric:tabular-nums}
#mineProfile .rpf-model td:last-child{text-align:right;width:48px;color:#80868b;font-variant-numeric:tabular-nums}
/* Excel-style multi-column cost model (one column per month) — same pattern as alumina-costs.html's
   refineryModelTable/.rpf-model-scroll. Scoped under #mp-model-slot so it doesn't collide with the
   generic 3-column .rpf-model rules above (used by the flat Operations tab table). */
#mp-model-slot .rpf-model-scroll{overflow-x:auto;width:100%}
#mp-model-slot table.rpf-model{width:auto;min-width:480px;border-collapse:collapse;font-size:11.5px}
#mp-model-slot table.rpf-model td{padding:5px 14px 5px 0;border-bottom:1px solid #f5f6f8;color:#3c4043;white-space:nowrap}
#mp-model-slot table.rpf-model td:nth-child(2){text-align:left;font-weight:400;color:inherit}
#mp-model-slot table.rpf-model td:last-child{text-align:right;width:auto}
#mp-model-slot th.pc{width:0}
#mp-model-slot th.uc{text-align:left;font-size:9px;text-transform:uppercase;letter-spacing:.5px;color:#80868b;padding:4px 14px 4px 0}
#mp-model-slot th.vc{text-align:right;font-size:11px;font-weight:600;color:#1F3A5F;padding:4px 0 6px;width:90px}
#mp-model-slot tr.rpf-model-period th.vc{border-bottom:none}
#mp-model-slot thead tr:last-child th{border-bottom:1px solid #d0d7e0}
#mp-model-slot .rpf-item{color:#3c4043;min-width:120px}
#mp-model-slot .rpf-units{color:#9aa0a6;font-size:10px}
#mp-model-slot .rpf-val{text-align:right;font-variant-numeric:tabular-nums;color:#1a1a1a;width:90px}
#mp-model-slot .rpf-val .u{color:#c3c9d1}
#mp-model-slot tr.rpf-site .rpf-item{font-weight:600;font-style:italic;color:#1F3A5F}
#mp-model-slot tr.rpf-site .rpf-val{font-weight:600;color:#1F3A5F}
#mp-model-slot tr.rpf-site td{border-top:1px solid #202124;border-bottom:1px solid #202124}
#mp-model-slot tr.rpf-calc .rpf-item{font-weight:600;color:#1a1a1a}
#mineProfile .mp-costtrend-legend{display:flex;gap:14px;flex-wrap:wrap;margin:4px 0 10px;font-size:11px;color:#5f6368}
#mineProfile .cost-note{font-size:11px;color:#aab1ba;margin-top:10px;line-height:1.5}
#mineProfile .mp-chart-wrap{position:relative;height:260px}
#mineProfile .mp-prod-status{font-size:12px;color:#aab1ba;text-align:center;padding:16px 0}

/* ===================== cost-trend tooltip (same design as costs.html/alumina-costs.html .cc-tip) ===================== */
.cc-tip{position:fixed;z-index:9999;pointer-events:none;opacity:0;transition:opacity .12s ease;min-width:230px;max-width:280px;background:#fff;border-radius:12px;overflow:hidden;box-shadow:0 8px 28px rgba(16,24,40,.16),0 0 0 1px rgba(16,24,40,.06);font-size:12px;color:#1a1a1a}
.cc-tip-hd{padding:11px 14px 9px;border-bottom:1px solid #eef0f3;display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.cc-tip-period{font-size:13px;font-weight:600;letter-spacing:-.2px}
.cc-tip-unit{font-size:10px;color:#98a2b3;font-weight:600;text-transform:uppercase;letter-spacing:.5px;white-space:nowrap}
.cc-tip-body{padding:8px 14px 4px}
.cc-row{display:flex;align-items:center;gap:8px;padding:4px 0;font-variant-numeric:tabular-nums}
.cc-dot{width:9px;height:9px;border-radius:2px;flex-shrink:0}
.cc-name{flex:1;color:#475467;font-weight:500}
.cc-val{font-weight:600;color:#1a1a1a}
.cc-pct{width:42px;text-align:right;color:#98a2b3;font-size:11px}
.cc-tip-ft{margin:6px 14px 12px;padding-top:9px;border-top:1px solid #eef0f3;display:flex;align-items:baseline;justify-content:space-between}
.cc-tip-ft .lbl{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.5px;color:#667085}
.cc-tip-ft .amt{font-size:16px;font-weight:600;letter-spacing:-.3px;font-variant-numeric:tabular-nums}
.cc-tip::after{content:"";position:absolute;left:var(--cx,20px);bottom:-6px;width:12px;height:12px;background:#fff;transform:rotate(45deg);box-shadow:3px 3px 6px rgba(16,24,40,.06)}
.mp-hidden{display:none}

/* ===================== Margin Curve section ===================== */
.margin-curve-toggle{cursor:pointer}
.margin-arrow{font-size:12px;color:#80868b;display:inline-block;transition:transform .15s}
.marginCurveWrap-collapsed .margin-arrow{transform:rotate(-90deg)}
.margin-price-info{font-size:12px;color:#5f6368;background:#eef3f9;padding:6px 14px;border-radius:16px;white-space:nowrap}
.margin-price-info .price-val{font-weight:600;color:#024d8f}
.margin-price-info .price-date{color:#98a2b3;margin-left:6px;font-size:11px}
/* Margin tooltip similar to cost tooltip */
.margin-tip{position:fixed;z-index:9999;pointer-events:none;opacity:0;transition:opacity .12s ease;min-width:200px;max-width:260px;background:#fff;border-radius:12px;overflow:hidden;box-shadow:0 8px 28px rgba(16,24,40,.16),0 0 0 1px rgba(16,24,40,.06);font-size:12px;color:#1a1a1a}
.margin-tip-hd{padding:11px 14px 9px;border-bottom:1px solid #eef0f3}
.margin-tip-name{font-size:13px;font-weight:600;letter-spacing:-.2px}
.margin-tip-loc{font-size:11px;color:#98a2b3;margin-top:2px}
.margin-tip-body{padding:10px 14px}
.margin-tip-row{display:flex;justify-content:space-between;padding:3px 0;font-variant-numeric:tabular-nums}
.margin-tip-row .lbl{color:#667085}
.margin-tip-row .val{font-weight:600;color:#1a1a1a}
.margin-tip-row.margin-row .val{font-size:14px}
.margin-tip-row.margin-row .val.positive{color:#188038}
.margin-tip-row.margin-row .val.negative{color:#c62828}

/* ===================== Accessibility ===================== */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #024d8f;
  color: #fff;
  padding: 8px 16px;
  z-index: 10000;
  text-decoration: none;
  font-weight: 600;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  top: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #024d8f;
  outline-offset: 2px;
}

/* ===================== Enhanced Detail Panel — Investment Banking Style ===================== */
/* Clean, data-dense design inspired by Bloomberg Terminal / FactSet / Capital IQ */

/* Percentile position indicator — minimal monochrome bar */
.detail-percentile {
  margin-top: 14px;
  padding: 10px 0;
}
.percentile-bar {
  position: relative;
  height: 4px;
  background: #e4e9f0;
  border-radius: 0;
  overflow: visible;
}
.percentile-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: #1a1a1a;
  transition: width 0.2s ease;
}
.percentile-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: #1a1a1a;
  border: 2px solid #fff;
  border-radius: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: left 0.2s ease;
}
.percentile-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  font-size: 9px;
  color: #98a2b3;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 500;
}
.percentile-value {
  font-size: 11px;
  font-weight: 600;
  color: #1a1a1a;
  background: none;
  padding: 0;
  font-variant-numeric: tabular-nums;
}

/* Margin indicator — compact inline style */
.detail-margin {
  margin-top: 12px;
  padding: 12px 14px;
  background: #fafbfc;
  border-left: 3px solid #1a1a1a;
}
.detail-margin.profit { border-left-color: #1a1a1a; }
.detail-margin.loss { border-left-color: #1a1a1a; }
.margin-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #667085;
  margin-bottom: 2px;
  font-weight: 600;
}
.margin-value {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.5px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  color: #1a1a1a;
}
.margin-value.positive::before { content: "+"; }
.margin-value .unit { font-size: 11px; color: #667085; font-weight: 400; margin-left: 3px; }
.margin-breakdown {
  margin-top: 6px;
  font-size: 10px;
  color: #667085;
  display: flex;
  gap: 12px;
  font-variant-numeric: tabular-nums;
}
.margin-breakdown span { display: inline-flex; align-items: center; gap: 3px; }
.margin-breakdown .price-val,
.margin-breakdown .cost-val { color: #1a1a1a; font-weight: 500; }

/* Mini stacked bar — colors match main chart */
.detail-cost-bar {
  display: flex;
  height: 6px;
  overflow: hidden;
  margin-bottom: 10px;
  background: #f1f3f4;
}
.cost-bar-segment {
  height: 100%;
  transition: width 0.2s ease;
}
.cost-bar-segment[data-cost="mining"] { background: #024d8f; }
.cost-bar-segment[data-cost="processing"] { background: #59A14F; }
.cost-bar-segment[data-cost="other"] { background: #E15759; }

/* Detail table — Bloomberg-style data grid */
.detail-table tbody tr td:first-child {
  display: flex;
  align-items: center;
  gap: 6px;
}
.detail-table .legend-swatch {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 0;
  border: none;
}
.detail-c1-row td {
  color: #667085;
  font-size: 12px;
  border-bottom: 1px dashed #e4e9f0;
}

/* Industry benchmark — compact data rows */
.detail-benchmark {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #e4e9f0;
}
.benchmark-title {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #667085;
  margin-bottom: 8px;
  font-weight: 600;
}
.benchmark-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.benchmark-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  padding: 4px 0;
  border-bottom: 1px dotted #f1f3f4;
}
.benchmark-item:last-child { border-bottom: none; }
.benchmark-item .label { color: #667085; }
.benchmark-item .value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #1a1a1a;
}
.benchmark-item .diff {
  font-size: 9px;
  margin-left: 6px;
  padding: 1px 5px;
  font-weight: 600;
  color: #667085;
  background: #f1f3f4;
}
.benchmark-item .diff.better { color: #1a1a1a; background: #e4e9f0; }
.benchmark-item .diff.worse { color: #1a1a1a; background: #e4e9f0; }

/* Quartile badge — minimal tag */
.quartile-badge {
  display: inline-flex;
  align-items: center;
  font-size: 9px;
  font-weight: 600;
  padding: 2px 6px;
  margin-left: 8px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  background: #1a1a1a;
}
.quartile-badge.q1 { background: #1a1a1a; }
.quartile-badge.q2 { background: #3c4043; }
.quartile-badge.q3 { background: #667085; }
.quartile-badge.q4 { background: #98a2b3; }

