:root{
    --bg:#171717; --panel:#1f1f1f; --panel2:#303030; --border:#252525;
    --text:#d8d8d8; --muted:#a0a0a0; --accent:#1fa9f4;
    --green:#17b65f; --red:#ff2a17; --amber:#d8921f; --purple:#8b5fe8;
  }
  *{box-sizing:border-box}
  /* His page: flat #1a1a1a, 'Inter' then the system sans (he never loads Inter). */
  body{margin:0;background:#1a1a1a;color:var(--text);
       font-family:'Inter',-apple-system,"Segoe UI",Roboto,Arial,sans-serif;min-height:100vh;overflow-x:hidden}
  /* His sidebar: fixed, 10% wide, #191919 with a soft shadow; a white brand over a rule,
     plain white links with no hover or active style, and Disclaimer in grey at the
     bottom under its own rule. Ours keeps a minimum width so it stays readable. */
  header{position:fixed;inset:0 auto 0 0;width:10%;min-width:170px;background:#191919;
         box-shadow:5px 0 15px rgba(0,0,0,.2);padding:20px;
         display:flex;flex-direction:column;align-items:stretch;z-index:10}
  .sidebar-top{display:flex;align-items:center;justify-content:space-between;width:100%}
  .brand{display:block;font-size:1.5em;font-weight:700;color:#fff;text-decoration:none;margin:.83em 0 0}
  .brand:hover,.brand.active{color:#fff}
  .menu-toggle{display:none}
  .side-nav{flex:1;display:flex;flex-direction:column;gap:20px;width:100%;font-size:16px;font-weight:400;color:#fff;
            border-top:2px solid rgba(255,255,255,.5);margin-top:1rem;padding-top:1rem}
  .side-nav a{white-space:nowrap;color:#fff;text-decoration:none}
  .side-nav a.side-disclaimer{margin-top:auto;margin-bottom:10px;border-top:2px solid rgba(255,255,255,.5);
                              padding-top:1rem;color:#8a8a8a;font-size:20px}
  .screen-bar{display:flex;gap:18px;align-items:flex-end;justify-content:center;flex-wrap:wrap;
              background:#1a1a1a;padding:15px 18px;margin:0 auto 10px;max-width:800px;border-radius:8px}
  .ticker-form{display:flex;align-items:flex-end;gap:8px;flex-wrap:wrap}
  .ticker-form label{display:flex;flex-direction:column;gap:4px;font-size:14px;color:#d0d0d0;font-weight:700}
  .ticker-form input{width:180px;text-transform:uppercase}
  .ticker-form button{align-self:flex-end}
  .ticker-status{flex-basis:100%;min-height:15px;color:#9da7af;font-size:11px;font-weight:700}
  .ticker-status.error{color:#ff8e86}
  .ticker-status:empty{display:none}
  .ctrl{display:flex;flex-direction:column;gap:4px}
  .ctrl label,.ctrl .ctrl-label{font-size:14px;color:#d0d0d0;font-weight:700}
  .coming-soon{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;
               min-height:calc(100vh - 160px);background:#202020;border-radius:8px;color:var(--muted);text-align:center}
  .coming-soon h2{margin:0;color:#e2e2e2;font-size:26px}
  .coming-soon p{margin:0;font-size:16px}
  .app-view > .coming-soon:first-child{margin-top:10px;min-height:calc(100vh - 32px)}
  /* His inputs: #3a3a3a, no border, 6px corners, 10px padding, 16px white text. */
  select,input{background:#3a3a3a;color:#fff;border:none;outline:none;
               border-radius:6px;padding:10px;font-size:16px;min-width:112px;max-width:100%}
  button{background:#3a3a3a;color:#fff;border:none;border-radius:6px;
         padding:9px 18px;font-weight:700;cursor:pointer;align-self:flex-end;font-size:14px;font-family:inherit}
  button:hover{filter:brightness(1.1)}
  /* His Search button: a cyan-to-blue gradient with dark bold text and a cyan glow. */
  .ticker-form button{background:linear-gradient(135deg,#00ffcc,#008cff);color:#1e1e1e;font-size:16px;font-weight:700;
                      border-radius:8px;padding:10px 18px;box-shadow:0 4px 12px rgba(0,255,204,.25);
                      transition:all .3s ease}
  .ticker-form button:hover{filter:none;background:linear-gradient(135deg,#66ffd9,#00b894);transform:translateY(-1px)}
  main{margin-left:max(10%,170px);padding:0 20px 22px;max-width:none}
  .app-view{display:none}
  .app-view.active{display:block}
  .card{background:#1e1e1e;border:0;border-radius:12px;padding:16px;box-shadow:0 4px 10px rgba(0,0,0,.7)}
  table{width:100%;border-collapse:collapse;font-size:12.5px}
  th,td{padding:7px 8px;text-align:center;border-bottom:1px solid var(--border);font-variant-numeric:tabular-nums}
  th{color:var(--muted);font-weight:600;font-size:11px;text-transform:uppercase;letter-spacing:.4px}
  canvas{width:100%;display:block}

  /* Quant-Power style */
  /* His Parameters box: a centred 800px card with the label above the buttons. */
  .params{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;
          background:#1a1a1a;border:0;border-radius:8px;padding:15px;margin:0 auto 10px;max-width:800px}
  .plabel{flex-basis:100%;color:#d0d0d0;font-size:14px;font-weight:700}
  /* His parameter buttons: 16px text, 10px padding, 6px corners, at least 70px wide;
     the active one shrinks a little with a soft inner glow. */
  .pbtn{background:var(--c);color:var(--t,#fff);border:none;border-radius:6px;
        padding:10px;min-width:70px;font-size:16px;font-weight:700;cursor:pointer;
        transition:all .3s ease;align-self:auto}
  .pbtn:hover{filter:brightness(1.2)}
  .pbtn.active{transform:scale(.92);box-shadow:inset 0 0 8px rgba(255,255,255,.5)}
  .chartcard{min-height:calc(100vh - 205px);padding:44px 34px 28px}
  .charttop{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
  .symlabel{font-size:18px;font-weight:800;color:#d5d5d5;letter-spacing:.5px;margin-left:72px}
  .chartlegend{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:700;color:#d0d0d0;margin-right:78px}
  .chartlegend .sq{width:12px;height:12px;border-radius:2px;display:inline-block}
  .chartwrap{position:relative;overflow:hidden}
  .chart-tooltip{position:absolute;z-index:5;display:none;min-width:190px;max-width:260px;
                 background:rgba(18,18,18,.94);border:1px solid #555;border-radius:7px;
                 padding:10px 11px;color:#e7e7e7;font-size:12px;line-height:1.5;
                 box-shadow:0 12px 30px rgba(0,0,0,.45);pointer-events:none}
  .chart-tooltip .tt-title{font-weight:800;color:#fff;margin-bottom:5px}
  .chart-tooltip .tt-row{display:flex;justify-content:space-between;gap:18px}
  .chart-tooltip .pos{color:#22b5ff;font-weight:800}
  .chart-tooltip .neg{color:#ff3b2f;font-weight:800}
  .chart-crosshair-x{position:absolute;top:0;bottom:0;display:none;border-left:1px dashed rgba(255,255,255,.55);
                     z-index:4;pointer-events:none}
  /* Expiration picker, like his multi-date dropdown: chips with ×, a clear-all × and an arrow. */
  .exp-ctrl{min-width:min(460px,100%)}
  .multi-select{position:relative}
  .ms-control{display:flex;align-items:center;gap:4px;min-height:42px;background:#3a3a3a;border-radius:6px;
              padding:4px 6px;cursor:pointer}
  .ms-values{flex:1;display:flex;flex-wrap:wrap;gap:4px;min-width:0}
  .ms-chip{display:inline-flex;align-items:center;gap:4px;background:rgba(0,140,255,.12);border:1px solid rgba(0,140,255,.25);
           color:#3da5ff;border-radius:2px;padding:2px 6px 2px 0;font-size:13px;white-space:nowrap}
  .ms-remove{background:none;color:#3da5ff;padding:0 4px;font-size:14px;font-weight:400;line-height:1;border-right:1px solid rgba(0,140,255,.25);border-radius:0}
  .ms-placeholder{color:#a0a0a0;font-size:14px;padding:0 4px}
  .ms-clear,.ms-toggle{background:none;color:#bdbdbd;padding:4px 6px;font-size:16px;font-weight:400;line-height:1;align-self:center}
  .ms-menu{position:absolute;left:0;right:0;top:calc(100% + 4px);z-index:20;margin:0;padding:4px 0;list-style:none;
           background:#3a3a3a;border-radius:6px;box-shadow:0 8px 20px rgba(0,0,0,.5);max-height:260px;overflow-y:auto}
  .ms-option{display:block;width:100%;text-align:left;background:none;color:#fff;font-weight:400;font-size:14px;padding:8px 12px;border-radius:0}
  .ms-option:hover,.ms-option:focus{background:linear-gradient(135deg,#00ffcc,#008cff);color:#1e1e1e;filter:none}
  .ms-none{padding:8px 12px;color:#a0a0a0;font-size:13px}
  /* Price charts under the strike chart: side by side, stacked on narrow screens */
  .price-charts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:10px}
  .price-card.chartcard{min-height:0;padding:22px 18px 16px}
  .price-card .symlabel{margin-left:56px;font-size:16px}
  .price-card .chartlegend{margin-right:18px}
  .home-price-empty{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
                    color:var(--muted);font-size:14px;font-weight:700;pointer-events:none}
  .home-price-empty:empty{display:none}
  .watermark{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
             font-size:72px;font-weight:800;color:rgba(255,255,255,.055);
             pointer-events:none;letter-spacing:2px;user-select:none}

  /* Key Levels: price chart with the four levels, and the Forecast under it */
  .kl-card{min-height:auto}
  .kl-legend{flex-wrap:wrap;justify-content:flex-end;gap:12px}
  .kl-legend span{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
  .kl-legend i{display:inline-block;width:16px;height:0;border-top:2px solid}
  .kl-legend i.dashed{border-top-style:dashed}
  /* His #market-forecast: a #1a1a1a card under the chart, 2rem in. */
  .forecast-card{margin-top:2rem;padding:2rem;background:#1a1a1a;border:1px solid #2a2a2a;border-radius:12px;
                 color:#d6d6d6;font-size:15px;line-height:1.6}
  .forecast-card:empty{display:none}
  .forecast-card h3{margin:0 0 14px;font-size:24px;font-weight:800;
                    background:linear-gradient(90deg,#00ffcc,#008cff);-webkit-background-clip:text;background-clip:text;color:transparent}
  .forecast-card h4{margin:22px 0 8px;font-size:18px;font-weight:800;color:#f5f5f5}
  .forecast-card h5{margin:14px 0 4px;font-size:15px;font-weight:800;
                    background:linear-gradient(90deg,#00ffcc,#008cff);-webkit-background-clip:text;background-clip:text;color:transparent}
  .forecast-card p{margin:0 0 8px}
  .forecast-card ul{margin:0 0 8px;padding-left:20px}
  .forecast-card .pos{color:#22b5ff;font-weight:800}
  .forecast-card .neg{color:#ff3b2f;font-weight:800}
  /* P/C Ratio screen */
  .pc-card{margin-top:10px;background:#1a1a1a;border:1px solid #2a2a2a;border-radius:12px;box-shadow:none;padding:2.5rem}
  .pc-table-wrap{overflow-x:auto}
  .pc-table{font-size:14px;min-width:640px}
  .pc-table th{font-size:12px;padding:10px 8px;border-bottom:1px solid #3a3a3a}
  .pc-table td{padding:11px 8px}
  .pc-table td.pc-ticker{font-weight:800;color:#f0f0f0}
  .pc-table td.pc-ratio{font-weight:800}
  .pc-table td.pc-missing{color:var(--muted)}
  .pc-status{margin:12px 0 0;min-height:16px;color:#9da7af;font-size:12px;font-weight:700}
  .pc-status.error{color:#ff8e86}
  .pc-status:empty{display:none}
  @media(max-width:1200px){
    .price-charts{grid-template-columns:minmax(0,1fr)}
  }
  @media(max-width:900px){
    header{position:sticky;top:0;width:auto;min-width:0;padding:12px 16px;box-shadow:none;border-bottom:1px solid #252525;z-index:30}
    .brand{width:auto;font-size:22px;padding:0;margin:0;border:0}
    .menu-toggle{display:flex;flex-direction:column;justify-content:center;gap:5px;width:42px;height:38px;padding:9px;
                 background:#242424;border:1px solid #353535;border-radius:6px;align-self:auto}
    .menu-toggle span{display:block;height:2px;background:#d8d8d8;border-radius:1px}
    .side-nav{display:none;margin-top:12px;padding-top:12px;gap:14px;font-size:15px}
    header.menu-open .side-nav{display:flex}
    .side-nav a.side-disclaimer{width:auto;margin-top:4px;padding:12px 0 0;font-size:16px}
    .screen-bar{justify-content:flex-start;padding:12px;margin:0 -8px 8px}
    .ticker-form{width:100%}
    .ticker-form label{flex:1;min-width:0}
    .ticker-form input{width:100%}
    .ctrl{width:100%;min-width:0}
    .price-charts{grid-template-columns:minmax(0,1fr);gap:8px;margin-top:8px}
    .price-card.chartcard{padding:12px 6px 10px}
    .price-card .symlabel{margin-left:0}
    select,input{width:100%;min-width:0;font-size:16px;padding:9px 8px}
    main{margin-left:0;padding:0 8px 12px}
    .coming-soon,.app-view > .coming-soon:first-child{min-height:50vh}
    .params{justify-content:flex-start;flex-wrap:nowrap;overflow-x:auto;gap:8px;padding:10px 8px;margin-bottom:8px;scrollbar-width:thin}
    .plabel{flex:0 0 auto;font-size:13px;margin-right:0}
    .pbtn{flex:0 0 auto;padding:9px 12px;font-size:13px}
    .chartcard{min-height:auto;padding:16px 8px 12px;border-radius:6px}
    .charttop{margin-bottom:4px;padding:0 4px}
    .symlabel{margin-left:0;font-size:16px}
    .chartlegend{margin-right:0;font-size:12px}
    .watermark{font-size:44px}
    .kl-legend{justify-content:flex-start;gap:8px}
    .forecast-card{padding:18px 14px 20px;font-size:14px}
    .pc-card{padding:16px 10px}
  }
  @media(max-width:520px){
    .chartcard{padding-left:4px;padding-right:4px}
    .watermark{font-size:34px}
  }

  /* OI Volume */
  .pricecard{min-height:auto;margin-top:10px}
  .price-empty{position:absolute;inset:0;display:none;align-items:center;justify-content:center;
               color:var(--muted);font-size:15px;font-weight:700;text-align:center;padding:0 16px}
  .price-empty.show{display:flex}
  #oivExpiry{min-width:170px}

  /* GEX Board ("GEX Analysis"), like his: a "Select Ticker:" card, then one card with the
     board (title, summary line, expiry buttons, table) beside a 480px column of three
     charts, stacked below 1000px the way his adjustGEXLayout() does it. */
  .gb-card{background:#1e1e1e;border-radius:12px;padding:16px 18px;margin:0 0 16px;box-shadow:0 4px 10px rgba(0,0,0,.7)}
  .gb-ticker-card{margin-top:10px}
  .gb-label{margin:0 0 10px;font-size:15px;font-weight:700;color:#fff}
  .gb-title{margin:0 0 6px;font-size:20px;font-weight:700;color:#fff}
  .gb-buttons{display:flex;flex-wrap:wrap;gap:8px}
  .gb-btn{background:#3a3a3a;color:#b8b8b8;border:0;border-radius:6px;padding:8px 18px;
          font-size:13px;font-weight:700;align-self:auto;white-space:nowrap}
  .gb-btn.active{background:#4a4a4a;color:#fff}
  /* Expiry buttons: date over its share of the gamma; chosen ones light blue. */
  .gb-expiries{display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:8px;margin:12px 0 10px}
  .gb-exp{display:flex;flex-direction:column;align-items:center;gap:2px;background:#3a3a3a;color:#cfcfcf;border:0;
          border-radius:6px;padding:8px 4px;font-size:12px;font-weight:600;align-self:auto}
  .gb-exp small{font-size:11px;font-weight:400;opacity:.8}
  .gb-exp.active{background:#b0c4de;color:#1e1e1e}
  .gb-select-row{display:flex;gap:10px;margin-bottom:14px}
  .gb-small-btn{background:#3a3a3a;color:#fff;padding:7px 14px;font-size:12px;font-weight:700;align-self:auto}
  .gb-status{flex-basis:100%;margin:8px 0 0;min-height:15px;color:#9da7af;font-size:11px;font-weight:700}
  .gb-status.error{color:#ff8e86}
  .gb-status:empty{display:none}
  .gex-main{display:flex;align-items:flex-start;gap:0}
  .gb-board{flex:1;min-width:0}
  .gb-charts{width:480px;min-width:480px;margin-left:16px;display:flex;flex-direction:column;gap:16px}
  .gb-spot{font-size:13px;color:#b0b0b0;margin:0 0 4px;line-height:1.5}
  .gb-table-wrap{max-height:850px;overflow:auto;border:1px solid #3a3a3e;border-radius:12px;background:#1e1e1e;
                 scrollbar-width:thin;scrollbar-color:#555 transparent}
  .gb-table-wrap::-webkit-scrollbar{width:5px;height:5px}
  .gb-table-wrap::-webkit-scrollbar-thumb{background:#555;border-radius:3px}
  .gb-table-wrap::-webkit-scrollbar-thumb:hover{background:#777}
  .gb-table{font-size:13px;min-width:860px}
  .gb-table th,.gb-table td{text-align:right;padding:10px 12px;border-bottom:1px solid #3a3a3e;white-space:nowrap;color:#e0e0e0}
  .gb-table th{position:sticky;top:0;z-index:2;background:#1e1e1e;color:#aaa;font-weight:600;font-size:12px;
               text-transform:uppercase;cursor:pointer;user-select:none}
  .gb-table th[aria-sort]{color:#fff}
  .gb-table th:first-child,.gb-table td:first-child{position:sticky;left:0;z-index:1;background:#1e1e1e;text-align:left;font-weight:700;color:#fff}
  .gb-table th:first-child{z-index:3}
  .gb-table td.pos{color:#22b5ff} .gb-table td.neg{color:#f32d35}
  .gb-table td.gb-call{color:#7ec8ff} .gb-table td.gb-put{color:#ff7a7a} .gb-table td.gb-strong{font-weight:700}
  /* A row holding any column's largest value is shaded green-grey; a green dot marks the cell. */
  .gb-table tr.gb-max-row td{background:#647865;color:#fff}
  .gb-dot{display:inline-block;width:11px;height:11px;margin-left:6px;border-radius:50%;background:#2ecc40;
          vertical-align:-1px;box-shadow:0 0 0 1px rgba(0,0,0,.25)}
  .gb-table tr:hover td{background:#2a2a2a}
  .gb-table tr.gb-max-row:hover td{background:#6f846f}
  .gb-empty{padding:28px 10px;text-align:center !important;color:var(--muted)}
  .gb-chart{position:relative;background:#1e1e1e;border-radius:12px;padding:14px 8px 8px}
  .gb-chart .charttop{flex-direction:column;align-items:flex-start;gap:4px;padding-right:44px}
  .gb-chart .symlabel{margin-left:6px;font-size:14px;font-weight:600;letter-spacing:0}
  .gb-chart .chartlegend{margin:0 0 0 6px;font-size:11px;flex-wrap:wrap;gap:10px}
  .gb-chart .chartlegend > span{display:inline-flex;align-items:center;gap:4px}
  .gb-line{display:inline-block;width:16px;height:0;border-top:2px solid}
  .gb-expand{position:absolute;top:8px;right:8px;z-index:6;background:#3a3a3a;border:0;color:#e0e0e0;
             font-size:16px;padding:4px 10px;line-height:1}
  .gb-chart.gb-full{position:fixed;inset:0;z-index:9999;border-radius:0;padding:16px 16px 12px}
  .gb-chart.gb-full .gb-expand{top:12px;right:12px;font-size:20px;padding:6px 14px}
  body.gb-locked{overflow:hidden}
  @media(max-width:1000px){
    .gex-main{flex-direction:column;gap:16px}
    .gb-board{width:100%}
    .gb-charts{width:100%;min-width:0;margin-left:0}
  }
  @media(max-width:900px){
    .gb-card{padding:12px 10px}
    .gb-expiries{grid-template-columns:repeat(auto-fill,minmax(92px,1fr));max-height:236px;overflow-y:auto;scrollbar-width:thin}
    .gb-table-wrap{max-height:70vh}
  }

  /* How to use GEX and Disclaimer: laid out like his guide page (h1, h2, h3, lists,
     a table, highlighted terms), in our colours. */
  .guide-page{max-width:980px;margin:10px auto 0;padding:2.5rem;background:#1a1a1a;border:1px solid #2a2a2a;border-radius:12px;box-shadow:none;
              color:#d6d6d6;font-size:15px;line-height:1.65}
  .guide-page h1{margin:0 0 18px;text-align:center;font-size:34px;font-weight:800;
                 background:linear-gradient(90deg,#00ffcc,#008cff);-webkit-background-clip:text;background-clip:text;color:transparent}
  .guide-page h2{margin:32px 0 12px;font-size:23px;font-weight:700;
                 background:linear-gradient(90deg,#00ffcc,#008cff);-webkit-background-clip:text;background-clip:text;color:transparent}
  .guide-page h3{margin:22px 0 8px;font-size:17px;font-weight:700;color:#66ffd9}
  .guide-page p{margin:0 0 12px}
  .guide-page ul{margin:8px 0 14px;padding-left:22px}
  .guide-page li{margin-bottom:6px}
  .guide-page strong{color:#fff;font-weight:700}
  .guide-table-wrap{overflow-x:auto;margin:14px 0 6px}
  .guide-page table{min-width:640px;font-size:14px}
  .guide-page th,.guide-page td{text-align:left;padding:10px 12px;border-bottom:1px solid #3a3a3a;vertical-align:top}
  .guide-page th{font-size:12px;background:linear-gradient(90deg,#00ffcc,#008cff);-webkit-background-clip:text;background-clip:text;color:transparent}
  .guide-page td{border-bottom-color:#2a2a2a;padding:.75rem}
  .disclaimer-page{max-width:820px}
  .disclaimer-page h1{font-size:30px}
  @media(max-width:900px){
    .guide-page{padding:20px 14px 24px;font-size:14px}
    .guide-page h1{font-size:26px}
    .guide-page h2{font-size:20px}
  }

  /* Strike Chart price legend: one entry per Price Line */
  .price-legend{flex-wrap:wrap;justify-content:flex-end;gap:8px;font-size:11px}
  .price-legend > span{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}
