/* ==========================================================================
   $PAM — POLICY ANALYSIS MARKET  |  circa 2003 revival skin
   Palette pulled straight off the logo: black space, brushed chrome,
   blue Earth, and the full prism spectrum.
   ========================================================================== */

:root{
  --space:#000000;
  --steel-hi:#f4f6f8;
  --steel:#b9c0c8;
  --steel-lo:#6c757e;
  --steel-dk:#3a3f45;
  --ink:#0b0d10;
  --panel:#c9ced4;
  --panel-lo:#a9b0b8;
  --line:#5a616a;
  --blue:#1560c8;
  --earth:#2e78d2;
  --amber:#ffcf3f;
  --red:#e23b2e;
  --green:#1f9d4d;
  --link:#0b3f9e;
  --link-vis:#5c2c92;
}

*{box-sizing:border-box}

html,body{margin:0;padding:0}

body{
  background:#1b1e22 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect width='4' height='4' fill='%231b1e22'/%3E%3Crect width='1' height='1' fill='%23222528'/%3E%3C/svg%3E");
  color:#12151a;
  font-family:Verdana, Geneva, Tahoma, sans-serif;
  font-size:12px;
  line-height:1.5;
}

a{color:var(--link);text-decoration:underline}
a:visited{color:var(--link-vis)}
a:hover{color:var(--red)}

/* ---- Page frame (fixed 2003-style width) --------------------------------*/
.wrap{
  width:960px;
  margin:0 auto;
  background:linear-gradient(180deg,#d6dbe0,#c2c8cf);
  border-left:2px solid #7d848c;
  border-right:2px solid #7d848c;
  box-shadow:0 0 40px rgba(0,0,0,.6);
}

/* ==========================================================================
   HEADER — recreation of the P A M logo
   ========================================================================== */
.banner{
  position:relative;
  height:190px;
  background:radial-gradient(circle at 30% 40%, #141821 0%, #000 70%);
  overflow:hidden;
  border-bottom:3px solid #2a2e34;
}
/* starfield */
.banner .stars{position:absolute;inset:0;opacity:.9}
.banner .stars i{position:absolute;background:#fff;border-radius:50%;opacity:.8}

/* prism beam sweeping right out of the A */
.beam{
  position:absolute;
  left:46%;
  top:38%;
  width:60%;
  height:120px;
  transform:translateY(-50%);
  background:linear-gradient(90deg,
     rgba(255,255,255,0) 0%,
     rgba(255,255,255,.9) 6%,
     rgba(255,40,40,.85) 22%,
     rgba(255,150,20,.8) 34%,
     rgba(255,225,20,.8) 46%,
     rgba(40,210,90,.8) 60%,
     rgba(30,120,235,.8) 74%,
     rgba(150,60,220,.75) 88%,
     rgba(150,60,220,0) 100%);
  clip-path:polygon(0 44%, 8% 46%, 100% 0, 100% 100%, 8% 54%);
  filter:blur(.4px);
  opacity:.9;
}
.flash{
  position:absolute;left:45%;top:38%;
  width:70px;height:70px;transform:translate(-50%,-50%);
  background:radial-gradient(circle,#fff 0%,rgba(255,255,255,.6) 30%,rgba(255,255,255,0) 70%);
}

/* the big chrome letters */
.logo-letters{
  position:absolute;inset:0;
  display:flex;align-items:center;justify-content:space-between;
  padding:0 26px;
  z-index:3;
}
.pam-letter{
  font-family:"Arial Black","Arial",sans-serif;
  font-weight:900;
  font-size:150px;
  line-height:1;
  letter-spacing:-4px;
  background:linear-gradient(180deg,#ffffff 0%,#e4eaef 26%,#b3bdc6 44%,#5b646d 53%,#9aa4ad 60%,#e9eef3 78%,#ffffff 100%);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  -webkit-text-stroke:1.2px #2b3036;
  text-shadow:1px 2px 0 rgba(0,0,0,.55), 0 0 16px rgba(150,175,200,.4);
  user-select:none;
}

/* blue Earth tucked into the P */
.earth{
  position:absolute;left:70px;top:74px;
  width:66px;height:66px;border-radius:50%;
  background:
     radial-gradient(circle at 34% 30%, #7fb5ff 0%, #2e78d2 40%, #0b3f8f 78%, #06264f 100%);
  box-shadow:0 0 14px rgba(60,140,230,.7), inset -6px -6px 12px rgba(0,0,0,.5);
  z-index:4;
}
.earth::after{
  content:"";position:absolute;inset:0;border-radius:50%;
  background:
    radial-gradient(ellipse at 60% 45%, rgba(40,170,90,.9) 0 8%, transparent 9%),
    radial-gradient(ellipse at 40% 62%, rgba(40,170,90,.85) 0 10%, transparent 11%),
    radial-gradient(ellipse at 30% 35%, rgba(40,170,90,.8) 0 6%, transparent 7%);
  mix-blend-mode:screen;opacity:.85;
}

/* little supply/demand chart glyph riding the M */
.sd-chart{
  position:absolute;right:40px;top:56px;z-index:4;
  width:96px;height:70px;background:#e9edf1;border:1px solid #333;
  box-shadow:0 0 10px rgba(90,150,220,.5);
}

.subtitle{
  position:relative;z-index:5;
  background:linear-gradient(180deg,#101317,#000);
  color:#fff;
  text-align:center;
  letter-spacing:.42em;
  font-weight:bold;
  font-size:15px;
  padding:8px 0 9px;
  text-indent:.42em;
  border-top:1px solid #2a2e34;
}
.subtitle span{color:#8fc0ff}

/* ---- Government-style meta bar ------------------------------------------*/
.gov-bar{
  background:linear-gradient(180deg,#20252b,#0d0f12);
  color:#c9d2db;
  font-size:10px;
  letter-spacing:.05em;
  padding:4px 12px;
  display:flex;justify-content:space-between;align-items:center;
  border-bottom:1px solid #000;
}
.gov-bar .ticker{color:var(--amber);font-weight:bold;font-family:"Courier New",monospace}
.gov-bar .blink{animation:blink 1.1s steps(1) infinite}
@keyframes blink{50%{opacity:0}}
.gov-bar #chg.up{color:#33ff5a}
.gov-bar #chg.down{color:#ff6a5a}

/* ---- Contract-address strip (memecoin staple) ---------------------------*/
.ca-bar{
  display:flex;align-items:center;gap:10px;
  background:linear-gradient(180deg,#0c1016,#05070a);
  border-bottom:1px solid #000;
  padding:5px 12px;font-family:"Courier New",monospace;font-size:11px;
}
.ca-label{color:var(--amber);font-weight:bold;letter-spacing:.04em;white-space:nowrap}
.ca-bar code{
  color:#7fff9a;background:#000;border:1px solid #2a3a2a;
  padding:3px 8px;border-radius:2px;
  flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.ca-copy{
  font-family:"Courier New",monospace;font-weight:bold;font-size:10px;cursor:pointer;
  border:2px solid;border-color:#fff #6b727a #6b727a #fff;
  background:linear-gradient(180deg,#eef1f4,#c6ccd2);color:#12151a;padding:3px 12px;
}
.ca-copy:active{border-color:#6b727a #fff #fff #6b727a}
.ca-copy.done{background:linear-gradient(180deg,#bff0c8,#7fd89a);color:#0a3a1a}
.ca-x{
  font-family:Verdana,sans-serif;font-weight:bold;font-size:10px;white-space:nowrap;
  text-decoration:none;color:#fff;background:#000;border:1px solid #3a3f45;
  padding:4px 11px;border-radius:2px;
}
.ca-x:hover{background:#111;color:#7fb5ff}
.ca-x:visited{color:#fff}

/* ---- Navigation tabs ----------------------------------------------------*/
.nav{
  display:flex;gap:3px;
  background:#8b9299;
  padding:5px 8px 0;
  border-bottom:2px solid #4a4f55;
}
.nav a{
  display:block;
  padding:5px 16px;
  background:linear-gradient(180deg,#eef1f4,#c3c9cf);
  border:1px solid #6b727a;border-bottom:none;
  border-radius:5px 5px 0 0;
  color:#1a1d21;text-decoration:none;font-weight:bold;font-size:11px;
}
.nav a:hover{background:linear-gradient(180deg,#fff,#dfe4e8)}
.nav a.active{background:linear-gradient(180deg,#fff,#e8ebc8);color:#000}

/* ==========================================================================
   BODY LAYOUT
   ========================================================================== */
.main{display:flex;gap:0}
.content{flex:1;padding:14px 16px;min-width:0}
.side{
  width:210px;flex:none;
  background:linear-gradient(180deg,#b7bec6,#9aa2ab);
  border-left:2px solid #7d848c;
  padding:12px 10px;
}

/* ---- Beveled panels (the classic inset/outset look) ---------------------*/
.panel{
  background:#e7eaed;
  border:2px solid;
  border-color:#fff #7a8088 #7a8088 #fff;
  margin-bottom:14px;
}
.panel > h2{
  margin:0;
  background:linear-gradient(180deg,#2f4a86,#16294f);
  color:#fff;
  font-size:12px;letter-spacing:.08em;
  padding:5px 10px;
  border-bottom:1px solid #0a1730;
  display:flex;justify-content:space-between;align-items:center;
}
.panel > h2 .pill{
  background:var(--amber);color:#3a2a00;font-size:9px;font-weight:bold;
  padding:1px 6px;border-radius:8px;letter-spacing:0;
}
.panel .body{padding:10px}

/* intro block */
.intro{
  background:#fffef0;
  border:2px solid #c9b458;
  padding:10px 12px;
  margin-bottom:14px;
  font-size:11.5px;
}
.intro b{color:#7a5a00}
.declassified{
  float:right;
  transform:rotate(7deg);
  border:2px solid #b3231a;color:#b3231a;
  font-weight:bold;letter-spacing:.1em;font-size:11px;
  padding:3px 8px;margin:-4px 0 6px 10px;
  opacity:.85;
}

/* ==========================================================================
   MARKET CARDS
   ========================================================================== */
.market{
  background:linear-gradient(180deg,#f4f6f8,#e2e6ea);
  border:2px solid;border-color:#fff #808790 #808790 #fff;
  margin-bottom:14px;
}
.market .head{
  padding:8px 10px;
  border-bottom:1px solid #b7bdc4;
  display:flex;justify-content:space-between;gap:10px;align-items:flex-start;
}
.market .q{font-weight:bold;font-size:13px;color:#101828;line-height:1.35}
.market .lore{color:#556; font-style:italic;font-size:10.5px;margin-top:3px;max-width:560px}
.market .closes{
  flex:none;text-align:right;font-size:9.5px;color:#445;
  border:1px solid #9aa2ab;background:#d7dce0;padding:3px 7px;white-space:nowrap;
}
.market .closes b{display:block;font-size:11px;color:#12325f}

.market .grid{display:flex;gap:12px;padding:10px}
.chartbox{
  width:200px;flex:none;background:#0c1016;border:1px solid #333;padding:6px;
}
.chartbox canvas{display:block;width:100%;height:90px}
.chartbox .cap{color:#7fd0ff;font-size:9px;text-align:center;margin-top:3px;font-family:"Courier New",monospace}

.outcomes{flex:1;min-width:0}
.outcome{
  display:flex;align-items:center;gap:8px;
  padding:5px 6px;border-bottom:1px dotted #b0b7bf;
}
.outcome:last-child{border-bottom:none}
.outcome .name{width:130px;font-weight:bold;font-size:11px;color:#1a2230;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.outcome .bar{flex:1;height:16px;background:#cdd3d9;border:1px solid #98a0a8;position:relative;overflow:hidden}
.outcome .bar i{position:absolute;left:0;top:0;bottom:0;display:block}
.outcome .pct{width:44px;text-align:right;font-family:"Courier New",monospace;font-weight:bold;font-size:12px}
.outcome .pos{width:74px;text-align:right;font-size:9.5px;color:#367}
.outcome .acts{display:flex;gap:4px}

/* prism-tinted bars by index */
.c0 i{background:linear-gradient(180deg,#3fae5f,#1f8d43)}
.c1 i{background:linear-gradient(180deg,#e8564a,#c8352a)}
.c2 i{background:linear-gradient(180deg,#f0a832,#d6871a)}
.c3 i{background:linear-gradient(180deg,#4f8be6,#2f6bd0)}
.c4 i{background:linear-gradient(180deg,#9a6bd8,#7a45c0)}

/* ---- Buttons (beveled steel) --------------------------------------------*/
.btn{
  font-family:Verdana,sans-serif;font-size:10px;font-weight:bold;
  padding:3px 8px;cursor:pointer;
  border:2px solid;border-color:#fff #6b727a #6b727a #fff;
  background:linear-gradient(180deg,#eef1f4,#c6ccd2);
  color:#12151a;
}
.btn:hover{background:linear-gradient(180deg,#fff,#dbe0e5)}
.btn:active{border-color:#6b727a #fff #fff #6b727a;background:#bfc5cb}
.btn.buy{color:#0a5a24}
.btn.sell{color:#8a2018}
.btn.big{font-size:12px;padding:6px 16px}
.btn.gold{background:linear-gradient(180deg,#ffe27a,#f0b400);border-color:#fff8d0 #a67c00 #a67c00 #fff8d0;color:#4a3400}
.btn:disabled{opacity:.5;cursor:not-allowed}

/* ---- Sidebar widgets ----------------------------------------------------*/
.acct{
  background:#0c1016;border:2px solid #444;color:#d6e2ee;
  padding:10px;margin-bottom:12px;font-family:"Courier New",monospace;
}
.acct .bal{font-size:22px;color:var(--amber);font-weight:bold}
.acct .row{display:flex;justify-content:space-between;font-size:11px;margin-top:4px;color:#9fb4c8}
.acct .row b{color:#eaf2fa}

.side h3{
  font-size:11px;margin:0 0 6px;color:#1a2230;
  border-bottom:1px solid #7d848c;padding-bottom:3px;letter-spacing:.05em;
}
.ticker-list{list-style:none;margin:0 0 12px;padding:0;font-size:10px;font-family:"Courier New",monospace}
.ticker-list li{padding:3px 0;border-bottom:1px dotted #8b9299;color:#233}
.ticker-list .t{font-weight:bold}
.ticker-list .buy{color:#0a5a24}
.ticker-list .sell{color:#8a2018}
.ticker-list .res{color:#7a45c0}

.hitcounter{
  background:#000;color:#33ff5a;font-family:"Courier New",monospace;
  font-size:14px;letter-spacing:3px;padding:4px 8px;text-align:center;
  border:1px solid #333;margin-bottom:12px;
}
.badges img,.badges div{margin-bottom:6px}
.badge88{
  width:88px;height:31px;font-size:8px;font-weight:bold;color:#fff;
  display:flex;align-items:center;justify-content:center;text-align:center;
  border:1px solid #000;line-height:1.1;padding:2px;
}

/* ---- Trade dialog -------------------------------------------------------*/
.modal-back{
  position:fixed;inset:0;background:rgba(0,0,0,.55);
  display:none;align-items:center;justify-content:center;z-index:50;
}
.modal-back.open{display:flex}
.modal{
  width:420px;background:linear-gradient(180deg,#e9ecef,#d2d7dc);
  border:2px solid;border-color:#fff #5a616a #5a616a #fff;
  box-shadow:0 8px 30px rgba(0,0,0,.6);
}
.modal .title{
  background:linear-gradient(180deg,#2f4a86,#16294f);color:#fff;
  padding:6px 10px;font-weight:bold;font-size:12px;
  display:flex;justify-content:space-between;align-items:center;
}
.modal .title .x{cursor:pointer;background:#c33;color:#fff;border:1px solid #fff;
  width:16px;height:16px;line-height:14px;text-align:center;font-size:11px}
.modal .mbody{padding:14px}
.modal .field{margin-bottom:10px}
.modal label{display:block;font-size:11px;font-weight:bold;margin-bottom:4px}
.modal input[type=number]{
  width:100%;font-size:16px;padding:6px;font-family:"Courier New",monospace;
  border:2px solid;border-color:#7a8088 #fff #fff #7a8088;
}
.slider{width:100%}
.quote{
  background:#0c1016;color:#d6e2ee;font-family:"Courier New",monospace;
  padding:10px;font-size:12px;margin:10px 0;border:1px solid #444;
}
.quote .big{font-size:20px;color:var(--amber);font-weight:bold}
.quote .warn{color:#ff6a5a}
.presets{display:flex;gap:5px;margin-bottom:8px}
.presets .btn{flex:1}

/* ---- Footer -------------------------------------------------------------*/
.footer{
  background:linear-gradient(180deg,#20252b,#0d0f12);
  color:#8b96a2;font-size:9.5px;text-align:center;padding:14px 20px;line-height:1.7;
  border-top:2px solid #000;
}
.footer a{color:#7fb5ff}
.footer .big{color:#c9d2db;font-size:10.5px;font-weight:bold;letter-spacing:.1em}

.toast{
  position:fixed;left:50%;bottom:24px;transform:translateX(-50%);
  background:#0c1016;color:#7fff9a;border:1px solid #33ff5a;
  font-family:"Courier New",monospace;font-size:12px;padding:8px 16px;z-index:60;
  display:none;box-shadow:0 4px 20px rgba(0,0,0,.6);
}
.toast.err{color:#ff8a7a;border-color:#e23b2e}
.toast.show{display:block}

hr.rule{border:none;border-top:1px solid #7d848c;border-bottom:1px solid #fff;margin:14px 0}

.section-head{
  display:flex;justify-content:space-between;align-items:baseline;margin-bottom:8px;
}
.section-head h1{font-size:17px;margin:0;color:#16294f;letter-spacing:.02em}
.section-head .sub{font-size:10px;color:#556}
