:root{
  --bg:#0b1220;
  --card:#0f1b33;
  --border: rgba(255,255,255,.10);
  --text:#eef3ff;
  --muted: rgba(238,243,255,.72);
  --accent:#7c5cff;
  --accent2:#06b6d4;
  --good:#22c55e;
  --bad:#fb7185;
  --r: 18px;
  --shadow: 0 18px 55px rgba(0,0,0,.40);
  --max: 1100px;
}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0; font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; background: radial-gradient(900px 650px at 15% 0%, rgba(124,92,255,.20), transparent 55%), radial-gradient(900px 650px at 85% -10%, rgba(6,182,212,.16), transparent 55%), var(--bg); color:var(--text)}

.top{max-width:var(--max); margin: 18px auto 0; padding: 12px 16px;}
.brand{display:flex; align-items:center; gap:12px}
.logo{width:44px; height:44px; border-radius:14px; display:grid; place-items:center; font-weight:1000; background: linear-gradient(135deg, rgba(124,92,255,1), rgba(6,182,212,.95)); box-shadow: var(--shadow);}
.title{font-weight:1000}
.subtitle{color:var(--muted); font-weight:800; font-size:.92rem; margin-top:2px}

.container{max-width:var(--max); margin:0 auto; padding: 0 16px 40px;}
.card{margin-top: 12px; background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04)); border:1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px;}
.card h1{margin:0 0 8px 0; font-size:1.45rem}
.muted{color:var(--muted)}

.form{margin-top:12px}
.label{display:block; font-weight:900; margin-bottom:8px}
.row{display:flex; gap:10px; flex-wrap:wrap}
.input{flex:1; min-width:220px; padding: 12px 12px; border-radius: 14px; border:1px solid rgba(255,255,255,.16); background: rgba(0,0,0,.18); color:var(--text); font-size: 1rem; font-weight:800; outline:none}
.input:focus{border-color: rgba(124,92,255,.75); box-shadow: 0 0 0 4px rgba(124,92,255,.16)}
.btn{border:none; cursor:pointer; padding: 12px 14px; border-radius: 14px; font-weight:1000; color:white; background: linear-gradient(135deg, rgba(124,92,255,1), rgba(6,182,212,.95));}
.hint{margin-top:10px; color:var(--muted); font-weight:800}

.chip{border:1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: var(--text); font-weight:1000; padding: 6px 10px; border-radius: 999px; cursor:pointer}

.error{margin-top:12px; padding: 10px 12px; border-radius: 14px; border:1px solid rgba(251,113,133,.35); background: rgba(251,113,133,.12); color: rgba(255,255,255,.92); font-weight:900}

.result{margin-top:14px}
.resultTop{display:flex; gap:14px; justify-content:space-between; align-items:flex-end; flex-wrap:wrap}
.kicker{color:var(--muted); font-weight:900}
.big{font-weight:1100; font-size: 1.6rem; letter-spacing:.2px}
.priceBox{text-align:right}
.price{font-size:2rem; font-weight:1100}
.delta{font-weight:1000}
.delta.good{color: var(--good)}
.delta.bad{color: var(--bad)}

.grid{display:grid; gap: 12px; grid-template-columns: repeat(2, minmax(0,1fr)); margin-top: 12px}
@media (max-width: 900px){ .grid{grid-template-columns: 1fr} }
.panel{background: rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.12); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow)}
.panelTitle{font-weight:1100; margin-bottom:10px}

/* chart is full-width now */
.panel.full{margin-top: 12px}

.signalRow{display:flex; gap:12px; align-items:center}
.badge{display:inline-flex; align-items:center; justify-content:center; font-weight:1100; padding: 8px 10px; border-radius: 999px; border:1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.08); min-width: 92px}
.badge.good{border-color: rgba(34,197,94,.45); background: rgba(34,197,94,.12)}
.badge.bad{border-color: rgba(251,113,133,.45); background: rgba(251,113,133,.12)}
.badge.neutral{border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.06)}
.disclaimer{margin-top:10px; color: rgba(238,243,255,.60); font-weight:800; font-size:.92rem}

.news{display:flex; flex-direction:column; gap:10px}
.newsItem{display:flex; flex-direction:column; gap:4px; padding: 10px 10px; border-radius: 14px; border:1px solid rgba(255,255,255,.10); background: rgba(0,0,0,.14)}
.newsItem a{color: rgba(238,243,255,.92); text-decoration:none; font-weight:1000}
.newsItem a:hover{text-decoration:underline}
.newsMeta{color: rgba(238,243,255,.65); font-weight:800; font-size:.92rem}

.kv{display:grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items:baseline}
.k{color:var(--muted); font-weight:900}
.v{font-weight:1000}

#chart{width:100%; border-radius: 14px; background: rgba(0,0,0,.18); border: 1px solid rgba(255,255,255,.10)}

.tvBox{min-height: 140px; border-radius: 14px; background: rgba(0,0,0,.18); border: 1px solid rgba(255,255,255,.10); overflow:hidden}
#tvChart.tvBox{min-height: 520px;}
.tvSmall{min-height: 240px;}

/* Make TradingView tables easier to compare years */
.tvBox{
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Default: don't force horizontal scroll */
.tvBox iframe{min-width: 0; width: 100%;}

/* Only the Financials/Ratios table benefits from extra width */
#tvFinancials iframe{min-width: 920px;}

.footnote{margin-top: 10px; color: rgba(238,243,255,.60); font-weight:800; font-size:.92rem}
