﻿:root {
  color-scheme: dark;
  --bg: #071226;
  --line: #74c8f044;
  --muted: #a7b9d4;
  --green: #a8e8bd;
  --cyan: #24dcff;
  --control: #123459;
  --control-hover: #1a4876;
  --gold: #d4b779;
  --red: #f18b89;
  --glass: #18345383;
  --glass-shadow: 0 12px 32px #0004;
  --glass-radius: 18px;
}
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 82% 0, #163863, transparent 48%),
              radial-gradient(ellipse at 8% 58%, #0d2b4c, transparent 55%), var(--bg);
  color: #edf6ff;
  font: 15px Tahoma, system-ui, sans-serif;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #08172fe8;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.site-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  max-width: 1460px;
  margin: auto;
  padding: 12px clamp(12px, 3vw, 24px);
}
.site-bar nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.site-bar a { text-decoration: none; white-space: nowrap; }
.site-brand { display:flex; align-items:center; gap:.55rem; color:var(--cyan); line-height:1.35; }
.site-brand img { flex:none; }
.site-brand strong { display:block; font-size:20px; }
.site-brand small { display:block; color:var(--muted); font-size:12px; }
.site-domain { color:var(--muted); font-size:11px; border-inline-start:1px solid var(--line); padding-inline-start:.6rem; }
@media(max-width:900px){.site-domain{display:none}}
.site-bar nav a, .site-account {
  color: var(--muted);
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 11px;
}
.site-bar nav a[aria-current], .site-account[aria-current], .site-bar nav a:hover {
  background: #24dcff1f;
  color: var(--cyan);
}
.site-account { border-color: var(--line); color: var(--cyan); }
.site-bar a:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; }
.card, .panel, .industry-btn, .subcard, .account-dashboard section, .quote, .account-login {
  border-color: var(--line);
  border-radius: var(--glass-radius);
  background: var(--glass);
  backdrop-filter: blur(14px);
  box-shadow: var(--glass-shadow);
}
.card.gold { background: #875f2d30; }
.industry-btn.selected { background: #875f2d38; }
.symbol-row.positive td, .quote.positive { background: #169a6333; }
.symbol-row.negative td, .quote.negative { background: #cb42543b; }
.symbol-row .link { color: inherit; }
.quote.neutral { background: #a4b4b023; }
#industries { scroll-margin-top: 120px; }
@media (max-width: 650px) {
  .site-bar { gap: 8px; justify-content: space-between; }
  .site-bar nav { order: 3; flex-basis: 100%; }
  .site-bar nav a { padding: 7px 10px; }
}

.policy-main { max-width: 52rem; margin: 2rem auto; padding: 0 1rem; line-height: 1.85; }
.policy-main .panel { border: 1px solid var(--line); padding: clamp(1rem,4vw,2rem); }
.policy-main a,.site-footer a { color: var(--cyan); }
.policy-price { color: var(--cyan); font-size: 1.35rem; font-weight: 700; }
.site-footer { text-align: center; color: var(--muted); border-top: 1px solid var(--line); padding: 1rem; }
.site-footer .site-version { font-size: .75rem; color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; }

@font-face {
  font-family: Vazirmatn;
  src: url("/assets/vazirmatn.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --bg: #071A2B;
  --cyan: #22D3EE;
  --ink: #eef8ff;
  --line: #9bdef23b;
  --muted: #a9c1d2;
  --green: #6ee7b7;
  --red: #fda4a0;
  --up-glass: #10b98128;
  --down-glass: #fb71852c;
  --glass: linear-gradient(145deg,#16476688,#0b2a4288);
  --header: #071a2be8;
  --glow: #12415d;
  --control: #143c55;
  --control-hover: #1b4e6b;
  --surface: #102c42;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #ebf7fc;
  --ink: #102e43;
  --cyan: #08798b;
  --line: #17607f38;
  --muted: #3e5d73;
  --green: #087650;
  --red: #a32e3b;
  --up-glass: #10b98124;
  --down-glass: #fb718526;
  --glass: linear-gradient(145deg,#fffdfdce,#e2f3faac);
  --header: #edf9fbe6;
  --glow: #bdeaf7;
  --control: #d4eaf4;
  --control-hover: #badfec;
  --surface: #daedf6;
  --glass-shadow: 0 12px 30px #18446719;
}
body {
  color: var(--ink);
  font-family: Vazirmatn, Tahoma, system-ui, sans-serif;
  background: radial-gradient(ellipse at 85% 0,var(--glow),transparent 55%),var(--bg);
}
.site-header { background: var(--header); }
.site-bar { gap: .65rem; }
.site-tools { display: flex; align-items: center; gap: .55rem; }
.theme-switch { cursor:pointer; border:1px solid var(--line); border-radius:11px; padding:8px 11px;
  background:var(--surface); color:var(--ink); font:inherit; white-space:nowrap; }
.theme-switch:focus-visible { outline:2px solid var(--cyan); outline-offset:2px; }
.symbol-row.positive td, .quote.positive { background:var(--up-glass); }
.symbol-row.negative td, .quote.negative { background:var(--down-glass); }
.positive, .positive .change { color:var(--green); }
.negative, .negative .change { color:var(--red); }
.controls input,.controls select,.theme-switch { background:var(--surface); color:var(--ink); }
.account-dashboard button,.account-dashboard select,.account-dashboard input,.account-dashboard .button { color:var(--ink); }
.account-dashboard form input[type=hidden] { display:none; }
:root[data-theme="light"] th, :root[data-theme="light"] tbody tr:hover,
:root[data-theme="light"] .analysis-choice:hover, :root[data-theme="light"] .question-chip,
:root[data-theme="light"] .notice, :root[data-theme="light"] .sidebar-plans {
  background: var(--surface); color:var(--ink); border-color:var(--line);
}
:root[data-theme="light"] .industry-btn, :root[data-theme="light"] .industry-btn .industry-value,
:root[data-theme="light"] .analysis-choice, :root[data-theme="light"] .modal-close,
:root[data-theme="light"] .live-pill, :root[data-theme="light"] .choice-badge {
  color:var(--ink)!important;
}
:root[data-theme="light"] .live-pill { background:var(--surface); box-shadow:none; }
:root[data-theme="light"] .status, :root[data-theme="light"] .plan-mini span,
:root[data-theme="light"] .industry-arrow { color:#70541f; }
:root[data-theme="light"] .question-chip:has(input:checked) { background:var(--control-hover); }
:root[data-theme="light"] .market-chart-svg text { fill:var(--ink); }
@media(max-width:650px) {
  .site-brand strong { font-size:18px; }
  .site-brand small { font-size:10px; }
  .site-tools { gap:.3rem; }
  .site-account,.theme-switch { padding:6px 8px; }
}

/* Market deck: compact workspace with market depth and localized detail pages. */
:root {
  --panel-rim:#85cbef54;
  --deck-glass:linear-gradient(150deg,#38678697 0%,#102e4abd 58%,#0b2339a6 100%);
  --deck-shadow:0 10px 28px #0006,inset 0 1px 1px #d4f7ff20;
}
body {
  background:
    radial-gradient(ellipse at 38% 8%,#12557d80,transparent 36%),
    radial-gradient(ellipse at 15% 67%,#07547e70,transparent 42%),
    linear-gradient(153deg,#173958,#071a2b 58%,#102c45);
  background-attachment:fixed;
}
.site-header { background:#04192bdb; }
.site-bar { max-width:1600px; min-height:66px; padding:9px clamp(12px,2vw,25px); }
.site-bar nav { justify-content:center; }
.site-bar nav a[aria-current] { border-bottom:2px solid var(--cyan); }
.site-brand small,.site-domain { display:none; }
.site-search { display:flex; align-items:center; gap:0; border:1px solid var(--panel-rim);
  border-radius:10px; background:#b0d9ef20; overflow:hidden; }
.site-search input { width:clamp(110px,13vw,215px); min-width:0; border:0; background:transparent;
  color:var(--ink); padding:.48rem .65rem; font:inherit; direction:rtl; }
.site-search input::placeholder { color:var(--muted); font-size:.78rem; }
.site-search button { border:0; background:transparent; color:var(--cyan); padding:0 .65rem; font-size:1.22rem; }
.site-search:focus-within { outline:2px solid var(--cyan); outline-offset:1px; }
.panel,.card,.account-dashboard section,.quote,.account-login,.policy-main .panel {
  background:var(--deck-glass); border:1px solid var(--panel-rim);
  backdrop-filter:blur(19px) saturate(125%); box-shadow:var(--deck-shadow);
}
main:has(.market-deck) { max-width:1600px; padding:14px clamp(12px,2vw,25px) 55px; }
.market-deck { display:grid; gap:12px; grid-template-columns:minmax(192px,1fr) minmax(0,2.4fr) minmax(245px,1.55fr);
  grid-template-areas:"watch core side" "industries industries side"; align-items:stretch; }
.deck-watch {grid-area:watch}.deck-core{grid-area:core}.deck-side{grid-area:side}.deck-industries{grid-area:industries}
.deck-core,.deck-side { display:flex; flex-direction:column; gap:10px; min-width:0; }
.market-deck .panel,.market-deck .card { padding:10px; border-radius:13px; min-width:0; }
.market-deck .cards { margin:0!important; gap:8px; grid-template-columns:repeat(4,minmax(0,1fr)); }
.market-deck .card { min-height:88px; text-align:center; display:flex; flex-direction:column; justify-content:center; }
.market-deck .card .metric { margin:4px 0; font-size:clamp(13px,1.5vw,21px); text-align:center; overflow-wrap:anywhere; }
.market-deck .card .small { font-size:10px; }
.deck-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:7px; }
.deck-heading h1,.deck-heading h2 { font-size:1rem; margin:0; }
.deck-heading a,.deck-icon { color:var(--cyan); font-size:.8rem; }
.deck-heat { flex:1; display:flex; flex-direction:column; }
.heatmap { height:clamp(155px,15.5vw,235px); position:relative; }
.heat-split { display:flex; width:100%; height:100%; gap:3px; min-width:0; min-height:0; }
.heat-split.vertical { flex-direction:column; }
.heat-split>div { flex:1 1 0; min-width:0; min-height:0; }
.heat-split>div:first-child { flex-grow:0; }
.heat-tile { width:100%; height:100%; border:1px solid #a8e2ff28; border-radius:5px;
 display:flex; flex-direction:column; justify-content:center; align-items:center; overflow:hidden;
 background:linear-gradient(155deg,#385773,#203a52); color:#fff; font:inherit; padding:1px; }
.heat-tile.positive { background:linear-gradient(155deg,#34bb73,#0b684d); }
.heat-tile.negative { background:linear-gradient(155deg,#dd6875,#833746); }
.heat-tile strong,.heat-tile bdi { white-space:nowrap; max-width:100%; overflow:hidden; text-overflow:ellipsis; }
.heat-tile bdi { font-size:.82em; }.heat-tile:hover { filter:brightness(1.2); }
.deck-table { width:100%; min-width:0; font-size:.84rem; }.deck-table th,.deck-table td { padding:.42rem .34rem; }
.deck-table th { background:transparent; cursor:default; }.deck-table td:first-child { border-radius:0 6px 6px 0; }
.deck-chart .small { margin:.25rem 0; }.deck-chart .live-pill { font-size:.65rem; padding:4px 7px; }
.deck-plot svg { width:100%; display:block; border-radius:7px; background:#0d365357; }
.plot-line { fill:none; stroke:#8cf5ff; stroke-width:2; filter:drop-shadow(0 0 5px #22d3ee); }
.plot-grid { fill:none; stroke:#91ceff30; stroke-width:1; }
.deck-summary { flex:1; }.deck-summary dl { margin:0; display:block; }
.deck-summary dl>div { display:flex; justify-content:space-between; align-items:center; gap:8px; padding:.5rem .35rem; border-bottom:1px solid var(--line); }
.deck-summary dd { margin:0; font-weight:700; }
#deck-industry-cards { display:grid; gap:7px; grid-template-columns:repeat(5,minmax(0,1fr)); }
#deck-industry-cards .industry-btn { padding:7px; min-height:62px; text-align:center; border-color:var(--panel-rim); }
#deck-industry-cards i { color:var(--cyan); font-style:normal; margin-inline-end:4px; }
#deck-industry-cards strong { display:inline; font-size:.78rem; }
#deck-industry-cards bdi { display:block; font-weight:700; }
#deck-industry-cards .positive { background:var(--up-glass); color:var(--green); }
#deck-industry-cards .negative { background:var(--down-glass); color:var(--red); }
.account-dashboard { max-width:1400px; }.account-heading { border-bottom:1px solid var(--panel-rim); padding-bottom:12px; }
.account-dashboard section { padding:clamp(14px,2vw,25px); }.account-login,.policy-main .panel { border-radius:16px; }
:root[data-theme="light"] { --deck-glass:linear-gradient(150deg,#ffffffe8,#e4f3f9b0); --deck-shadow:0 8px 22px #104b6b16,inset 0 1px 1px #fff; --panel-rim:#4383a145; }
:root[data-theme="light"] body { background:radial-gradient(ellipse at 32% 5%,#c4edff,transparent 48%),var(--bg); }
:root[data-theme="light"] .site-header { background:#eefaffeb; }
:root[data-theme="light"] .plot-line { stroke:#08798b; }
@media(max-width:1100px) {
 .site-bar nav { order:3; flex-basis:100%; justify-content:flex-start; }
 .site-tools { margin-inline-start:auto; }
}
@media(max-width:900px) {
 .market-deck { grid-template-columns:minmax(0,1fr) minmax(0,2fr); grid-template-areas:"watch core" "side side" "industries industries"; }
 .deck-side { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:600px) {
 .market-deck { display:flex; flex-direction:column; gap:10px; }
 .deck-core { order:-1; }.deck-side{display:flex;}.market-deck .cards{grid-template-columns:repeat(2,minmax(0,1fr));}
 #deck-industry-cards{grid-template-columns:repeat(2,minmax(0,1fr));}
 .site-bar{gap:.55rem}.site-search{order:3;flex-basis:100%}.site-search input{width:auto;flex:1}
 .site-tools{flex-wrap:wrap}.site-brand strong{font-size:16px}.site-brand img{width:32px;height:32px}
 .deck-table td,.deck-table th { padding:.4rem .5rem; }
}

.market-deck .card .metric { white-space:nowrap; }
.market-deck .card .muted { font-size:.82rem; }
.market-deck .card { min-height:77px; }
@media(max-width:600px) {
 .heat-tile { font-size:.72rem; }
 .site-tools { margin-inline-start:0; }
}

/* Optical glass surfaces. Lighting lives behind the panels so it remains
   visible through their tint, including across the dashboard gutters. */
:root {
  --glass-clear: linear-gradient(150deg,#addef136 0%,#3f93b622 30%,#0b2f4e28 68%,#08273d48 100%);
  --glass-raised: linear-gradient(150deg,#c6edff45,#548db626 28%,#10355231 82%);
  --glass-rim: #a9dcf65f;
  --glass-depth: 0 13px 27px #0007,0 2px 5px #020b164d,inset 0 1px 0 #daf6ff62,inset 1px 0 0 #b9ecff25;
  --glass-positive: linear-gradient(145deg,#42f39858,#12ab6c2e 55%,#00734b4a);
  --glass-negative: linear-gradient(145deg,#ff909064,#d9556a30 55%,#862b514c);
}
:root:not([data-theme="light"]) body {
  background:
    radial-gradient(ellipse at 8% 57%,#20d9fc89 0%,#0c8ca758 11%,transparent 33%),
    radial-gradient(ellipse at 36% 13%,#3599d089 0%,#125d9363 10%,transparent 29%),
    radial-gradient(ellipse at 68% 36%,#18b6da7d 0%,#1078a940 14%,transparent 40%),
    radial-gradient(ellipse at 92% 6%,#3576a99e 0%,transparent 39%),
    linear-gradient(147deg,transparent 24%,#0d3b5c20 40%,#0a81a54e 50%,#47e8ff50 51%,#0a374f4a 60%,transparent 72%),
    linear-gradient(151deg,#102e4b 0%,#071a2b 43%,#0b2840 100%);
  background-attachment:fixed;
}
:root[data-theme="light"] {
  --glass-clear: linear-gradient(150deg,#ffffff9c,#f6fcff62 48%,#dceff686);
  --glass-raised: linear-gradient(150deg,#ffffffbf,#e4f6fb70);
  --glass-rim:#608da34c;
  --glass-depth:0 10px 25px #0d4b661f,inset 0 1px 0 #fff;
  --glass-positive:linear-gradient(145deg,#79e8ad74,#b9f4d56b);
  --glass-negative:linear-gradient(145deg,#ff9f9d71,#fbd7dc71);
}
.site-header,.panel,.card,.industry-btn,.subcard,.quote,.account-dashboard section,.account-login,.policy-main .panel,
.tablewrap,.modal,.heat-tile,.notice {
  -webkit-backdrop-filter:blur(24px) saturate(160%);
  backdrop-filter:blur(24px) saturate(160%);
}
.panel,.card,.industry-btn,.subcard,.quote,.account-dashboard section,.account-login,.policy-main .panel,.modal {
  background:var(--glass-clear);
  border:1px solid var(--glass-rim);
  box-shadow:var(--glass-depth);
}
.site-header { background:color-mix(in srgb,var(--header) 58%,transparent); border-color:var(--glass-rim);
 box-shadow:0 5px 20px #0611204d,inset 0 -1px 0 #a3dfff26; }
.market-deck .card,.deck-chart,.deck-summary,.deck-industries,.account-login { background:var(--glass-raised); }
.market-deck .card.gold { background:linear-gradient(146deg,#ecce933d,#69808a25 55%,#17456e47); }
.tablewrap { background:#08304a26; border-color:var(--glass-rim); }
:root:not([data-theme="light"]) th { background:#417a9d29; }
:root:not([data-theme="light"]) tbody tr:hover { background:#55bcec22; }
.deck-table th { background:transparent; }
.deck-plot svg {background:linear-gradient(180deg,#2b70a126,#08314917);border:1px solid #a1e3f432;}
.notice { background:#dbb46b1b; border-color:#f5cc7764; }
.industry-btn.selected { border-color:var(--cyan); background:var(--glass-raised); }
.heat-tile { background:var(--glass-raised); box-shadow:inset 0 1px 0 #d4f5ff59,0 2px 4px #06182963; }
.heat-tile.positive,.quote.positive,#deck-industry-cards .positive { background:var(--glass-positive); }
.heat-tile.negative,.quote.negative,#deck-industry-cards .negative { background:var(--glass-negative); }
.quote.neutral { background:var(--glass-clear); }
.symbol-row.positive td { background:linear-gradient(90deg,#24c88122,#20b77d15); }
.symbol-row.negative td { background:linear-gradient(90deg,#ff78892b,#fb6b8820); }
:root[data-theme="light"] .heat-tile { color:#13364a; }

:root:not([data-theme="light"]) {
  --glass-positive:linear-gradient(145deg,#3ee9829e,#07944b82 58%,#006c3b9c);
  --glass-negative:linear-gradient(145deg,#ff81899c,#d9475e88 58%,#8c294a9c);
}
:root:not([data-theme="light"]) #deck-industry-cards .positive,
:root:not([data-theme="light"]) #deck-industry-cards .negative { color:#f3ffff; }

/* Clear glass: limit surface tint to 10–20%; lighting stays on the canvas. */
:root {
  --glass-clear:linear-gradient(150deg,#b6eaff30,#50a5d327 36%,#133e5b1a);
  --glass-raised:linear-gradient(150deg,#d1efff33,#6daeca24 40%,#17466b1a);
  --glass-positive:linear-gradient(145deg,#45ed8a33,#0dc06a28 60%,#0896501a);
  --glass-negative:linear-gradient(145deg,#ff8e9633,#ee54712a 60%,#c331581a);
  --glass-rim:#bbebff45;
  --glass-depth:0 11px 24px #020b164d,inset 0 1px 0 #e0f7ff38;
}
:root[data-theme="light"] {
  --glass-clear:linear-gradient(150deg,#fff3,#f5fcff1a);
  --glass-raised:linear-gradient(150deg,#fff3,#d6f3ff24);
  --glass-positive:linear-gradient(145deg,#05ac6133,#16bb7b1a);
  --glass-negative:linear-gradient(145deg,#ed526e33,#e978891a);
  --glass-rim:#3a738b46;
  --glass-depth:0 9px 20px #11445c21,inset 0 1px 0 #ffffff70;
}
:root:not([data-theme="light"]) {
  --glass-positive:linear-gradient(145deg,#45ed8a33,#0dc06a28 60%,#0896501a);
  --glass-negative:linear-gradient(145deg,#ff8e9633,#ee54712a 60%,#c331581a);
}
.site-header,.panel,.card,.industry-btn,.subcard,.quote,.account-dashboard section,.account-login,.policy-main .panel,
.tablewrap,.modal,.heat-tile,.notice {
  -webkit-backdrop-filter:blur(12px) saturate(125%);
  backdrop-filter:blur(12px) saturate(125%);
}
.site-header { background:var(--glass-clear); }
.market-deck .card.gold { background:linear-gradient(145deg,#ffe0a233,#d6b7751a); }
.tablewrap,.account-dashboard .table-wrap,.deck-plot svg { background:transparent; }
:root:not([data-theme="light"]) th,
:root[data-theme="light"] th { background:color-mix(in srgb,var(--ink) 10%,transparent); }
.deck-table th { background:transparent!important; }
.notice { background:#dbb46b1b; }
.symbol-row.positive td { background:#2adc8320; }
.symbol-row.negative td { background:#f9738724; }
.heat-tile { box-shadow:inset 0 1px 0 #dcf7ff37,0 2px 5px #07162536; }
.heat-tile.positive bdi { color:#91ffc0; }
.heat-tile.negative bdi { color:#ffc3cb; }
:root[data-theme="light"] .heat-tile.positive bdi { color:#075838; }
:root[data-theme="light"] .heat-tile.negative bdi { color:#842f3e; }

/* Edge lighting for FinMonitor's existing clear glass surfaces. */
:root:not([data-theme="light"]) {
  --glass-depth:0 12px 28px #01091459,inset 0 1px 0 #e2f8ff54,inset 0 -1px 0 #9ed9ff11;
}
.panel,.card,.industry-btn,.subcard,.quote,.account-dashboard section,.account-login,.policy-main .panel,.modal {
  background-image:linear-gradient(114deg,#ceefff12,transparent 22%),var(--glass-clear);
}
.market-deck .card,.deck-chart,.deck-summary,.deck-industries,.account-login,.industry-btn.selected {
  background-image:linear-gradient(113deg,#dcf7ff17,transparent 30%),var(--glass-raised);
}
.market-deck .card.gold { background-image:linear-gradient(145deg,#d2f0ff30,#81b8d21a); }
.heat-tile.positive,.quote.positive,#deck-industry-cards .positive {
  background-image:linear-gradient(116deg,#c3ffdc0e,transparent 24%),var(--glass-positive);
}
.heat-tile.negative,.quote.negative,#deck-industry-cards .negative {
  background-image:linear-gradient(116deg,#ffd0d60e,transparent 24%),var(--glass-negative);
}

/* Data-driven lookup, personal watchlist, and linked historical views. */
.market-deck { grid-template-areas:"watch core side"; }
.deck-watch #watch-status:empty { display:none; }
.watch-star { border:0; background:none; color:var(--cyan); padding:0 .2rem; font:inherit; font-size:1.15rem; }
.watch-star[aria-pressed="true"] { color:var(--gold); }
.autocomplete-anchor { position:relative; overflow:visible; }
.symbol-suggestions { position:absolute; inset:100% 0 auto; z-index:15; min-width:min(17rem,85vw);
 border:1px solid var(--glass-rim); border-radius:13px; background:var(--surface);
 box-shadow:var(--glass-depth); color:var(--ink); max-height:20rem; overflow:auto; }
.symbol-suggestions[hidden] { display:none; }
.symbol-suggestions [role="option"] { cursor:pointer; padding:.55rem .7rem; overflow-wrap:anywhere; }
.symbol-suggestions [role="option"]:hover,.symbol-suggestions [aria-selected="true"] { background:var(--control-hover); }
.symbol-suggestions span { color:var(--muted); font-size:.82rem; }
.home-industries { margin-top:18px; }
.home-industries h2 { margin-top:0; }
#industrycards .positive { background-image:var(--glass-positive); }
#industrycards .negative { background-image:var(--glass-negative); }
#industrycards .industry-btn bdi { display:block; margin-block:.3rem; }
.symbol-history { margin-top:16px; }
.history-more,#news-retry { color:var(--cyan); background:var(--control); border:1px solid var(--glass-rim); border-radius:10px; padding:.45rem .8rem; margin-top:.5rem; }
#analysis .analysis-layout.v4-layout { display:grid; grid-template-columns:minmax(210px, .8fr) minmax(0,2.2fr);
 grid-template-areas:"selection history" "selection comparison"; align-items:start; gap:14px; direction:rtl; }
#analysis .analysis-sidebar { grid-area:selection; }
#analysis .history-chart-panel { grid-area:history; }
#analysis .market-chart-panel { grid-area:comparison; }
.chart-history svg { display:block; width:100%; min-height:110px; direction:ltr; color:var(--cyan); }
.chart-history input[type=range] { width:100%; direction:ltr; accent-color:var(--cyan); }
.history-chart-scale { display:flex; justify-content:space-between; direction:ltr; color:var(--muted); font-size:.8rem; }
#codal-news td:nth-child(2) { min-width:18rem; white-space:normal; }
#codal-news a { color:var(--cyan); }
@media(max-width:900px){ .market-deck{grid-template-areas:"watch core" "side side";} }
@media(max-width:650px){
 #analysis .analysis-layout.v4-layout{grid-template-columns:minmax(0,1fr);grid-template-areas:"history" "comparison" "selection";}
 .site-search .symbol-suggestions { min-width:100%; }
}

.market-deck #totalvalue { white-space:normal; overflow-wrap:anywhere; font-size:clamp(14px,1.75vw,22px); margin-bottom:0; }
.kpi-unit { color:var(--muted); font-size:.73rem; line-height:1.3; text-align:center; }
.symbol-suggestions .suggestion-line { display:flex; align-items:center; gap:.35rem; padding-inline-end:.4rem; }
.suggestion-line [role=option] { flex:1; min-width:0; }
.suggestion-line .watch-star { flex:none; }
#symbol-history { scroll-margin-top:105px; }
#analysis .analysis-layout.v4-layout { grid-template-areas:"selection history"; }
.candle-controls { display:flex; align-items:center; gap:.35rem; margin:.25rem 0; }
.candle-controls[hidden],#news-pagination[hidden] { display:none; }
.candle-controls button,#news-search button,#news-pagination button {
 border:1px solid var(--glass-rim); border-radius:8px; color:var(--cyan); background:var(--control); padding:.3rem .7rem;
}
#news-pagination button:disabled { opacity:.42; cursor:default; }
.candle-body.up,.candle-volume.up { fill:var(--green); }.candle-wick.up { stroke:var(--green); }
.candle-body.down,.candle-volume.down { fill:var(--red); }.candle-wick.down { stroke:var(--red); }
.candle-body.flat,.candle-volume.flat { fill:var(--cyan); }.candle-wick.flat { stroke:var(--cyan); }
.candle-wick,.candle-crosshair { stroke-width:1; vector-effect:non-scaling-stroke; }
.candle-volume { opacity:.5; }
.candle-crosshair { stroke:var(--muted); stroke-dasharray:4 3; pointer-events:none; }
.candle-price-range { margin:.2rem 0; }
.codal-company { display:block; color:var(--muted); }
#history-tooltip { overflow-wrap:anywhere; }
@media(max-width:650px){
 #analysis .analysis-layout.v4-layout{grid-template-areas:"history" "selection";}
 #symbol-history { scroll-margin-top:155px; }
}

/* FinMonitor's curved market header, with the glass layer behind controls. */
.notch-header {
  --notch-left:calc(50% - 116px);
  --notch-right:calc(50% + 116px);
  position:relative; isolation:isolate; max-width:1560px; margin:18px auto 6px;
  width:calc(100% - 36px); background:none!important; border:0; box-shadow:none; backdrop-filter:none;
}
.header-glass { position:absolute; inset:0; z-index:-1; pointer-events:none; overflow:visible; }
.header-glass::before,.header-glass::after { content:""; position:absolute; border-radius:27px; }
.header-glass::before {
  inset:0; background:linear-gradient(163deg,#bcecff69,#8bdcff14 39%,#4696b222 74%,#b1eaff3b);
}
.header-glass::after {
  inset:1px; background:linear-gradient(165deg,#1b456a77,#07223566 55%,#0d2a4988);
  -webkit-backdrop-filter:blur(12px) saturate(125%); backdrop-filter:blur(12px) saturate(125%);
  box-shadow:inset 0 1px 0 #e4faff50,0 15px 37px #020c1b50;
}
@supports (clip-path:shape(from 0 0,line to 100% 0,close)) {
  .header-glass::before,.header-glass::after {
    clip-path:shape(from 0 0, line to var(--notch-left) 0,
      curve to calc(50% - 61px) 35px with calc(50% - 86px) 0 / calc(50% - 86px) 35px,
      line to calc(50% + 61px) 35px,
      curve to var(--notch-right) 0 with calc(50% + 86px) 35px / calc(50% + 86px) 0,
      line to 100% 0,line to 100% 100%,line to 0 100%,close);
  }
}
:root[data-theme="light"] .header-glass::before { background:#3b799344; }
:root[data-theme="light"] .header-glass::after { background:linear-gradient(145deg,#f9fdfff0,#dcedf59c); }
.notch-header .site-bar {
  position:relative; display:grid; grid-template-columns:minmax(0,1fr) 230px minmax(0,1fr);
  align-items:start; min-height:80px; padding:13px clamp(12px,2.5vw,34px) 0; gap:7px;
}
.header-start { display:flex; align-items:center; gap:.8rem; min-width:0; }
.notch-header .site-tools { grid-column:3; margin:0; justify-content:flex-end; flex-wrap:wrap; gap:7px; }
.notch-header .site-brand strong { white-space:nowrap; }
.header-menu { position:relative; flex:none; }
.header-menu summary,.notch-header .site-account {
  display:grid; place-items:center; width:40px;height:40px; padding:0;
  background:var(--glass-clear); border:1px solid var(--glass-rim); border-radius:12px;
  cursor:pointer; color:var(--cyan); list-style:none;
}
.header-menu summary::-webkit-details-marker { display:none; }
.header-menu summary span { font-size:19px; }
.header-menu summary:focus-visible,.intro-notch:focus-visible,.header-ai:focus-visible,.header-subscribe:focus-visible {
  outline:2px solid var(--cyan); outline-offset:2px;
}
.notch-header .header-menu nav {
  position:absolute; inset:calc(100% + 8px) 0 auto auto; display:flex; flex-direction:column;
  min-width:172px; padding:6px; background:var(--surface); border:1px solid var(--glass-rim);
  border-radius:13px; box-shadow:var(--glass-depth); overflow:visible; z-index:4;
}
.account-glyph { position:relative; width:19px;height:20px; }
.account-glyph::before,.account-glyph::after { content:"";position:absolute; border:1.6px solid currentColor; }
.account-glyph::before { width:6px;height:6px;border-radius:50%;top:0;left:5px; }
.account-glyph::after { width:15px;height:8px;border-radius:9px 9px 3px 3px;bottom:1px;left:1px; }
.header-ai,.header-subscribe {
  padding:.45rem .65rem; border:1px solid var(--glass-rim); border-radius:10px;
  color:var(--ink); font-size:.83rem; background:var(--glass-clear); text-decoration:none;
}
.header-subscribe { color:var(--cyan); border-color:color-mix(in srgb,var(--cyan) 42%,transparent); }
.header-ai:hover,.header-subscribe:hover { background:var(--control-hover); }
.intro-notch {
 position:absolute; inset:12px 50% auto auto; translate:50% 0;
 min-height:42px; padding:.45rem 1.1rem; font:inherit; font-weight:700; cursor:pointer; white-space:nowrap;
 color:var(--cyan); background:var(--surface); border:1px solid var(--glass-rim); border-radius:999px;
 box-shadow:0 5px 19px #00122266,inset 0 1px 0 #cbf7ff32;
}
.intro-dialog { width:min(34rem,calc(100% - 32px)); padding:24px; color:var(--ink);
 background:var(--surface); border:1px solid var(--glass-rim); border-radius:18px; box-shadow:var(--glass-depth); }
.intro-dialog::backdrop { background:#041324a6; backdrop-filter:blur(4px); }
.intro-dialog form { float:left; margin:0; }.intro-dialog h2 { margin:0 0 .8rem; }.intro-dialog p { line-height:1.9; }
.intro-dialog video { display:block;width:100%;border-radius:10px;margin-top:1rem; }
.intro-close { border:1px solid var(--glass-rim); background:var(--control); color:var(--ink); border-radius:8px; padding:.15rem .5rem; font:inherit; cursor:pointer; }
.header-market { padding:0 clamp(12px,2.5vw,34px) 16px; display:grid; gap:12px; }
.header-market .site-search { width:min(100%,310px); justify-self:start; margin:0; }
.header-market .site-search input { width:100%; flex:1; min-width:0; }
.header-market .header-kpis { grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:0; }
.header-kpis .card { display:grid; grid-template-rows:1fr auto 18px; min-width:0; min-height:83px;
  padding:.6rem .45rem .3rem; align-items:center; text-align:center; border-radius:13px; }
.header-kpis .metric { margin:0; text-align:center; font-size:clamp(13px,1.8vw,23px); overflow-wrap:anywhere; }
.header-kpis .muted { font-size:.82rem; }
.header-kpis .kpi-unit { grid-row:3; }
@media(max-width:990px) {
 .notch-header .site-bar { grid-template-columns:minmax(0,1fr) 168px minmax(0,1fr); }
 .notch-header { --notch-left:calc(50% - 92px); --notch-right:calc(50% + 92px); }
 .header-ai,.header-subscribe { font-size:.73rem; padding:.35rem .5rem; }
}
@media(max-width:680px) {
 .notch-header { width:calc(100% - 20px); margin-top:11px;
  --notch-left:calc(50% - 84px); --notch-right:calc(50% + 84px); }
 .notch-header .site-bar { min-height:0; grid-template-columns:minmax(0,1fr) 130px minmax(0,1fr);
  padding:9px 10px 0; gap:7px; }
 .header-start { gap:5px; }.notch-header .site-brand img{height:29px;width:29px;}
 .notch-header .site-brand span,.notch-header .site-domain { display:none; }
 .header-menu summary,.notch-header .site-account { width:31px;height:32px;border-radius:9px; }
 .intro-notch { inset-block-start:8px; min-height:36px; padding:.35rem .6rem; font-size:.74rem; }
 .notch-header .site-tools { display:contents; }
 .notch-header .site-account { grid-column:3; grid-row:1; justify-self:end; }
 .notch-header .theme-switch { grid-column:3; grid-row:2; justify-self:end; padding:5px 7px; }
 .header-subscribe { grid-column:2; grid-row:2; justify-self:center; }
 .header-ai { grid-column:1; grid-row:2; justify-self:start; white-space:nowrap; }
 .header-market { padding:8px 10px 11px; gap:8px; }
 .header-market .site-search { width:100%; }
 .header-market .header-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
 .header-kpis .card { min-height:64px; grid-template-rows:1fr auto 13px; }
}

.deck-watch td[colspan] { white-space:normal; overflow-wrap:anywhere; line-height:1.65; text-align:center; }

.market-freshness { max-width:1560px; width:calc(100% - 36px); margin:6px auto 0;
 display:flex; gap:10px; flex-wrap:wrap; align-items:center; color:var(--muted); font-size:.77rem; }
.market-freshness .live-pill { padding:3px 8px; }
.market-freshness + .notch-header { margin-top:8px; }
.notch-header { --notch-left:calc(50% - 156px); --notch-right:calc(50% + 156px); }
.header-start { grid-row:1;grid-column:1; }
.notch-header .site-tools { grid-row:1; }
.notch-header .site-bar { grid-template-columns:minmax(0,1fr) 250px minmax(0,1fr); min-height:0; padding-bottom:8px; }
.notch-header .notch-nav { grid-row:2; display:flex; align-items:center; gap:5px; padding:0; overflow:visible; }
.notch-nav-right { grid-column:1; justify-self:end; }.notch-nav-left { grid-column:3; justify-self:start; }
.notch-header .notch-nav a { padding:.35rem .55rem; font-size:.8rem; }
.notch-header .intro-notch,.notch-header .header-subscribe {
 background:#EF4444; border:1px solid #ff9a9a; color:#fff;
 box-shadow:0 5px 17px #ef44444d,inset 0 1px 0 #ffffff42;
}
.notch-header .intro-notch:hover,.notch-header .header-subscribe:hover { background:#dc3535; }
.notch-header .theme-icon-switch {
 display:inline-flex; align-items:center; justify-content:space-around; width:54px; height:30px; gap:2px;
 padding:2px; border-radius:999px; background:var(--control); color:var(--muted);
}
.theme-icon-switch[hidden] { display:none; }
.theme-icon-switch span { display:grid; place-items:center; width:22px; height:22px; border-radius:50%; font-size:15px; line-height:1; }
.theme-icon-switch[aria-pressed="false"] .moon,.theme-icon-switch[aria-pressed="true"] .sun { color:var(--cyan); background:var(--surface); }
.technical-workspace .technical-tools { align-items:center; gap:.45rem; }
.technical-workspace button,#indicator-configs input {
 padding:.4rem .65rem; border:1px solid var(--glass-rim); border-radius:8px; background:var(--control); color:var(--ink);
}
#indicator-search { flex:1; min-width:145px; }
#indicator-configs { display:flex; flex-wrap:wrap; gap:.5rem; }
#indicator-configs fieldset { border:1px solid var(--glass-rim); border-radius:10px; display:flex; flex-wrap:wrap; gap:.3rem; align-items:center; }
#indicator-configs input { width:68px; margin-inline:.25rem; direction:ltr; }
.technical-workspace .chart-mounted { height:360px; direction:ltr; }
.technical-oscillator { margin-top:8px; }.technical-oscillator h3 { margin:.2rem 0;font-size:.85rem; }
.technical-oscillator>div { height:140px; direction:ltr; }
.technical-workspace a { color:var(--cyan); }
.technical-workspace:fullscreen { background:var(--bg); overflow:auto; padding:15px; }
.technical-workspace:fullscreen .chart-mounted { height:65vh; }
@media(max-width:990px) {
 .notch-header { --notch-left:calc(50% - 122px); --notch-right:calc(50% + 122px); }
 .notch-header .site-bar { grid-template-columns:minmax(0,1fr) 155px minmax(0,1fr); }
}
@media(max-width:680px) {
 .market-freshness { width:calc(100% - 20px); gap:6px; font-size:.69rem; }
 .notch-header { --notch-left:calc(50% - 110px); --notch-right:calc(50% + 110px); }
 .notch-header .site-bar { grid-template-columns:minmax(0,1fr) 125px minmax(0,1fr); }
 .notch-header .notch-nav { grid-row:3; gap:1px; }
 .notch-nav-right { grid-column:1 / 3; justify-self:start; }
 .notch-nav-left { grid-column:2 / 4; justify-self:end; }
 .notch-header .notch-nav a { padding:.28rem .26rem; font-size:.67rem; }
 .notch-header .site-account { grid-column:3; grid-row:2; justify-self:end; }
 .notch-header .theme-icon-switch { grid-column:3; grid-row:1; justify-self:end; }
 .technical-workspace .chart-mounted { height:280px; }
 .technical-oscillator>div { height:110px; }
}

.technical-workspace.expanded { position:fixed; inset:0; z-index:30; background:var(--bg); overflow:auto; padding:15px; }
.technical-workspace.expanded .chart-mounted { height:65vh; }
.history-chart-panel:has(.technical-workspace.expanded) { backdrop-filter:none; }
body:has(.technical-workspace.expanded) { overflow:hidden; }

#analysis .history-chart-panel { padding:clamp(.6rem,2vw,1.4rem); min-width:0; }
#chart-controls { padding:0; border:0; margin:0; min-width:0; }
.chart-control-group { display:flex; align-items:center; flex-wrap:wrap; gap:.45rem; min-width:0; margin:0; }
#chart-custom-range[hidden], #drawing-editor[hidden] { display:none; }
#chart-symbol-title { color:var(--cyan); }
#chart-fullscreen { margin-inline-start:auto; }
#analysis .chart-mounted { height:clamp(440px,63vh,800px); }
#history-tooltip { min-height:1.7em; font-variant-numeric:tabular-nums; }
#drawing-list:empty { display:none; }
.drawing-item { padding:.3rem .5rem; border:1px solid var(--line); border-radius:.6rem; }
#drawing-editor input { width:8rem; }
#chart-controls button:disabled { opacity:.5; cursor:default; }
@media(max-width:600px) {
 #analysis .chart-mounted { height:clamp(360px,57vh,520px); }
 #history-symbol { width:clamp(9rem,42vw,14rem); }
 #analysis .technical-tools { gap:.35rem; }
}

#analysis .analysis-desktop { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,3fr); gap:14px; align-items:start; }
#analysis .history-chart-panel { grid-column:2; grid-row:1; }
#analysis .analysis-sidebar { grid-column:1; grid-row:1; min-width:0; }
#indicator-values { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:.35rem .8rem; padding:.4rem 0; }
#indicator-values:empty { display:none; }
#indicator-values bdi { white-space:nowrap; }
#indicator-values bdi::before { content:""; display:inline-block; width:.55rem; height:.55rem; border-radius:50%; background:var(--indicator-color); margin-inline-end:.3rem; }
#indicator-configs:empty { display:none; }
@media(max-width:850px) {
 #analysis .analysis-desktop { grid-template-columns:minmax(0,1fr); }
 #analysis .history-chart-panel { grid-column:1; grid-row:1; }
 #analysis .analysis-sidebar { grid-row:2; }
}

#technical-workspace .chart-plot { position:relative; min-width:0; }
#chart-pointer { position:absolute; inset-block-start:.5rem; inset-inline-end:5.75rem; pointer-events:none; z-index:2; padding:.3rem .5rem; color:var(--ink); background:var(--control); border:1px solid var(--glass-rim); border-radius:.45rem; }
#chart-market-label { margin:.35rem 0; color:var(--muted); }
#history-tooltip { display:flex; flex-wrap:wrap; gap:.25rem .8rem; margin:.35rem 0; }
#history-tooltip bdi { font-weight:700; }

.analysis-modal { width:min(680px,calc(100vw - 2rem)); max-height:85dvh; overflow:auto; color:var(--ink); background:var(--bg); border:1px solid var(--glass-rim); border-radius:1rem; padding:1.25rem; }
.analysis-modal::backdrop { background:#020919a8; backdrop-filter:blur(5px); }
.analysis-modal form { float:inline-end; }
#ai-analysis-content section { margin-block:.8rem; padding:.5rem .8rem; border:1px solid var(--line); border-radius:.65rem; }
#ai-analysis-content li { margin-block:.25rem; }
.analysis-symbol-search { display:block; width:100%; min-width:0; }

.analysis-history { margin-block-start:1rem; }
.analysis-history summary { cursor:pointer; }
#analysis-history { display:grid; gap:.35rem; margin-block:.4rem; }
#analysis-history button { text-align:start; }
