:root{
  --bg:#040a12;
  --bg2:#07111d;
  --panel:#0c1624;
  --panel2:#111d2d;
  --panel3:#0a1320;
  --line:#233247;
  --line2:#2f4562;
  --text:#f7f9fc;
  --muted:#9eb0c5;
  --cyan:#20d7f0;
  --blue:#2f7cf5;
  --purple:#7c3cff;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  background:
    radial-gradient(circle at 30% -10%,rgba(31,111,235,.13),transparent 28%),
    radial-gradient(circle at 85% 12%,rgba(124,60,255,.08),transparent 24%),
    var(--bg);
  color:var(--text);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
button,input{font:inherit}
button{cursor:pointer}
a{color:inherit}
.app-shell{max-width:1500px;margin:0 auto;padding:22px 36px 54px}
.topbar{min-height:92px;display:flex;align-items:center;justify-content:space-between;gap:28px;padding:8px 10px 14px}

.topbar nav{display:flex;align-items:center;gap:34px;margin-left:auto}
.topbar nav a{color:#eef3f8;text-decoration:none;font-weight:650}
.search-wrap{margin-top:8px}
.searchbar{
  display:grid;grid-template-columns:auto 1fr auto auto;align-items:center;gap:12px;
  background:linear-gradient(180deg,#111d2d,#0c1624);border:1px solid var(--line);
  border-radius:15px;padding:14px 16px;box-shadow:0 18px 48px rgba(0,0,0,.18)
}
.search-icon{font-size:30px;color:#b7c5d8;line-height:1}
.searchbar input{
  width:100%;background:transparent;border:0;outline:0;color:white;font-size:21px;padding:9px 2px
}
.icon-btn{
  background:transparent;border:0;color:#a9b6c8;font-size:32px;padding:0 10px
}
.primary-btn{
  border:0;border-radius:9px;padding:13px 34px;color:white;font-size:18px;font-weight:800;
  background:linear-gradient(100deg,var(--cyan),var(--blue),var(--purple));
  box-shadow:0 0 26px rgba(62,111,255,.18)
}
.prompt-chips{display:flex;flex-wrap:wrap;gap:16px;margin:16px 16px 25px}
.chip{
  border:1px solid #121f30;background:#0b1522;color:#d4ddea;border-radius:999px;
  padding:11px 22px;font-weight:520
}
.chip:hover,.example-card:hover{border-color:var(--line2);transform:translateY(-1px)}
.status{
  border:1px solid var(--line);background:var(--panel);border-radius:13px;padding:15px 18px;color:var(--muted);margin-bottom:20px
}
.status.error{color:#ffc2c2;border-color:#6d2d39}
.dashboard{display:grid;grid-template-columns:minmax(0,2.45fr) minmax(330px,1fr);gap:22px}
.panel{
  background:linear-gradient(180deg,rgba(16,29,45,.97),rgba(9,19,31,.98));
  border:1px solid var(--line);border-radius:15px;box-shadow:0 20px 55px rgba(0,0,0,.15)
}
.chart-panel{padding:24px 26px 20px}
.panel-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-start}
.eyebrow{font-size:10px;font-weight:900;letter-spacing:.16em;color:var(--cyan)}
.panel-head h1{font-size:25px;margin:7px 0 0}
.view-tabs{
  display:flex;gap:4px;padding:3px;border:1px solid var(--line);border-radius:9px;background:#0b1522
}
.tab{
  background:transparent;color:#d6dfec;border:1px solid transparent;border-radius:7px;padding:10px 14px;font-weight:650
}
.tab.active{border-color:#614bd1;background:rgba(94,63,204,.12);color:white}
#chart{min-height:510px;margin-top:10px}
.chart-footer{
  border-top:1px solid rgba(40,57,79,.65);display:flex;justify-content:space-between;gap:20px;align-items:end;padding-top:18px
}
.source-block{line-height:1.55}
.source-block a{text-decoration:none}
.muted{color:var(--muted);font-size:13px}
.chart-actions{display:flex;gap:20px}
.text-btn{border:0;background:transparent;color:white;font-weight:700;padding:5px}
.side-panel{padding:25px 24px;align-self:start}
.side-section h2{margin:0 0 15px;font-size:18px}
.side-section p{color:#eef2f8;line-height:1.58;font-size:16px;margin:0}
.divider{height:1px;background:var(--line);margin:22px 0}
.side-section label{display:block;font-size:13px;margin:16px 0 7px;color:#e0e7ef}
.copy-row{
  display:grid;grid-template-columns:1fr auto;border:1px solid var(--line);border-radius:9px;overflow:hidden;background:#172335
}
.copy-row input{min-width:0;border:0;background:transparent;color:#cbd6e4;padding:11px 12px;outline:0}
.copy-btn{width:45px;border:0;border-left:1px solid #5f3fd7;background:#152034;color:#a88cff;font-size:20px}
.share-buttons{display:grid;grid-template-columns:1fr 1.1fr;gap:10px;margin-top:14px}
.secondary-btn{
  text-align:center;text-decoration:none;border:1px solid var(--line2);background:#0d1826;color:white;border-radius:9px;
  padding:10px 12px;font-weight:650
}
.accent-outline{border-color:#7b46ed;box-shadow:inset 0 0 0 1px rgba(32,215,240,.2)}
.copy-status{min-height:20px;color:var(--cyan);font-size:12px;padding-top:8px}
.examples-panel{
  margin-top:26px;border:1px solid var(--line);border-radius:15px;background:linear-gradient(180deg,#0c1624,#09131f);padding:18px
}
.examples-title{font-size:18px;font-weight:850;margin-bottom:14px}
.example-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
.example-card{
  border:1px solid #1b2b41;background:#101b2a;border-radius:11px;color:white;min-height:74px;
  padding:14px;text-align:left;display:flex;align-items:center;gap:14px;font-weight:650;transition:.15s ease
}
.card-icon{font-size:25px;color:var(--cyan)}
.about-strip{
  margin-top:22px;border:1px solid var(--line);border-radius:15px;background:#09131f;padding:22px 24px;
  display:grid;grid-template-columns:1fr 2fr;gap:26px
}
.about-strip h3{font-size:23px;margin:6px 0 0}
.about-strip p{margin:0;color:var(--muted);line-height:1.7}
.table-wrap{max-height:520px;overflow:auto;margin-top:18px;border:1px solid var(--line);border-radius:10px}
.table-wrap table{width:100%;border-collapse:collapse}
.table-wrap th,.table-wrap td{padding:12px 14px;border-bottom:1px solid #1e2e43;text-align:right}
.table-wrap th:first-child,.table-wrap td:first-child{text-align:left}
.table-wrap thead th{position:sticky;top:0;background:#132033;z-index:1}
dialog{
  width:min(1050px,92vw);height:min(720px,88vh);border:1px solid var(--line2);border-radius:14px;background:#07111d;padding:14px
}
dialog::backdrop{background:rgba(0,0,0,.72)}
#embed-preview{width:100%;height:100%;border:0;border-radius:10px}
.dialog-close{
  position:absolute;right:22px;top:20px;z-index:2;width:36px;height:36px;border-radius:999px;border:1px solid var(--line2);
  background:#111d2d;color:white;font-size:24px
}
.hidden{display:none!important}

.embed-body{min-height:100vh;background:var(--bg)}
.embed-shell{max-width:980px;margin:0 auto;padding:18px}

.embed-card{border:1px solid var(--line);background:var(--panel);border-radius:14px;padding:18px}
.embed-card h2{margin:0;font-size:22px}
#embed-chart{min-height:420px}
.embed-footer{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;border-top:1px solid var(--line);padding-top:13px}
.embed-footer a{color:var(--cyan);text-decoration:none;font-size:13px}

@media(max-width:1050px){
  .dashboard{grid-template-columns:1fr}
  .example-grid{grid-template-columns:repeat(2,1fr)}
  
}
@media(max-width:720px){
  .app-shell{padding:15px}
  .topbar{min-height:92px;display:flex;align-items:center;justify-content:space-between;gap:28px;padding:8px 10px 14px}
  .topbar nav{display:flex;align-items:center;gap:34px;margin-left:auto}
  
  .searchbar{grid-template-columns:auto 1fr auto}
  .searchbar .primary-btn{grid-column:1/-1}
  .prompt-chips{margin-left:0;margin-right:0}
  .panel-head{flex-direction:column}
  .view-tabs{width:100%;overflow:auto}
  .chart-panel,.side-panel{padding:18px}
  #chart{min-height:390px}
  .chart-footer{flex-direction:column;align-items:flex-start}
  .example-grid{grid-template-columns:1fr}
  .about-strip{grid-template-columns:1fr}
  .share-buttons{grid-template-columns:1fr}
}


.theme-icon{font-size:28px;color:#eef3f8;line-height:1;margin-left:8px}
.site-footer{
  display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:18px;
  color:#8fa0b4;font-size:13px;padding:28px 10px 4px
}
.site-footer a{color:#aab7c7;text-decoration:none}
.site-footer a:hover{color:white}
.footer-sep{color:#42536a}


.logo-wrap{
  display:inline-flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  color:var(--text);
  flex:0 0 auto;
}
.logo-mark{
  width:58px;
  height:58px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
}
.logo-mark svg{
  width:100%;
  height:100%;
  display:block;
  overflow:visible;
}
.logo-copy{
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-width:0;
}
.wordmark{
  display:flex;
  align-items:baseline;
  font-size:31px;
  line-height:1;
  font-weight:500;
  letter-spacing:.08em;
  white-space:nowrap;
}
.data-word{color:#fff}
.envision-word{
  margin-left:5px;
  background:linear-gradient(90deg,#21d7ef 0%,#2f7cf5 50%,#7c3cff 100%);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.tagline{
  margin-top:7px;
  padding-left:2px;
  color:#d5dfeb;
  font-size:8.5px;
  line-height:1;
  letter-spacing:.31em;
  font-weight:700;
  white-space:nowrap;
}
.logo-wrap.compact{
  gap:8px;
}
.logo-wrap.compact .logo-mark{
  width:34px;
  height:34px;
}
.logo-wrap.compact .wordmark{
  font-size:18px;
}
.logo-wrap.compact .tagline{
  display:none;
}
.embed-brand{
  display:flex;
  align-items:center;
  margin-bottom:12px;
}


@media(max-width:720px){
  .logo-mark{width:46px;height:46px}
  .wordmark{font-size:22px;letter-spacing:.055em}
  .tagline{font-size:6.7px;letter-spacing:.22em;margin-top:5px}
}
@media(max-width:460px){
  .wordmark{font-size:18px}
  .tagline{display:none}
  .logo-mark{width:42px;height:42px}
}


/* v0.6 branding + multi-dataset controls */
.logo-mark.brand-v2{width:66px;height:66px}
.wordmark{font-weight:600;letter-spacing:.07em}
.tagline{letter-spacing:.24em;font-size:9px;color:#c8d0dd}

.dataset-toolbar{display:flex;align-items:center;gap:12px;margin:14px 2px 12px;color:#aab8ca;font-size:13px}
.dataset-label{display:flex;align-items:center;gap:8px;font-weight:700;white-space:nowrap}
.dataset-dot{width:8px;height:8px;border-radius:999px;background:linear-gradient(135deg,#15d8ee,#7c3cff);box-shadow:0 0 14px rgba(30,210,238,.4)}
.select-wrap{position:relative;min-width:310px;max-width:520px;flex:0 1 520px}
.select-wrap::after{content:"⌄";position:absolute;right:14px;top:50%;transform:translateY(-54%);pointer-events:none;color:#91a2b7;font-size:16px}
#dataset-select{width:100%;appearance:none;border:1px solid #263a54;background:#0b1624;color:#eaf2fb;border-radius:12px;padding:11px 38px 11px 14px;font:inherit;outline:none}
#dataset-select:focus{border-color:#3c82ff;box-shadow:0 0 0 3px rgba(47,124,245,.12)}
.datasets-toggle{margin-left:auto;border:1px solid #283b55;background:#0b1624;color:#dce7f5;border-radius:12px;padding:10px 14px;font-weight:700;cursor:pointer}
.dataset-cards{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:0 0 14px}
.dataset-card{text-align:left;border:1px solid #22354d;background:linear-gradient(180deg,#0d1928,#09131f);color:#dce7f5;border-radius:14px;padding:13px;cursor:pointer;min-height:86px}
.dataset-card:hover{border-color:#496df0;transform:translateY(-1px)}
.dataset-card-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.dataset-card strong{font-size:14px}
.dataset-card em{font-style:normal;font-size:10px;color:#8fa4bb;border:1px solid #2b405a;border-radius:999px;padding:3px 7px}
.dataset-card > span:last-child{display:block;color:#8ea1b6;font-size:12px;line-height:1.35}
@media(max-width:980px){
  .dataset-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
  .datasets-toggle{margin-left:0}
  .dataset-toolbar{flex-wrap:wrap}
}
@media(max-width:620px){
  .select-wrap{min-width:0;flex:1 1 100%}
  .dataset-cards{grid-template-columns:1fr}
  .dataset-toolbar{align-items:stretch}
  .datasets-toggle{width:100%}
  .logo-mark.brand-v2{width:50px;height:50px}
}


/* v0.7 projection UI */
.projection-badge{
  display:inline-flex;align-items:center;margin-top:8px;
  border:1px solid rgba(138,77,255,.55);
  background:linear-gradient(90deg,rgba(47,124,245,.12),rgba(138,77,255,.15));
  color:#b99cff;border-radius:999px;padding:5px 9px;
  font-size:10px;font-weight:800;letter-spacing:.13em
}
.forecast-note{
  margin-top:16px;padding:13px 14px;border:1px solid #2a3f5a;
  border-radius:12px;background:#0a1522;display:flex;flex-direction:column;gap:5px
}
.forecast-note strong{color:#bda7ff;font-size:13px}
.forecast-note span{color:#c9d5e3;font-size:12px}
.forecast-note small{color:#8294aa;font-size:11px;line-height:1.45}
.table-projection{
  display:inline-block;border:1px solid #6e50c8;color:#bca5ff;
  border-radius:999px;padding:2px 7px;font-size:10px;font-weight:700
}
