/* TradingMSX — one font, four text sizes, fixed alignment on every device */
:root{
  --ink:#0d1b2a; --ink-2:#1b2b3d; --text:#16202b; --muted:#66727f; --line:#e3e8ee;
  --bg:#f3f5f8; --card:#ffffff; --accent:#0f766e; --accent-2:#e7f3f1; --gold:#b8892d;
  --up:#13803b; --down:#c42b2b; --flat:#6b7682;
  --fs-h1:24px; --fs-h2:16px; --fs-body:15px; --fs-row:14px; --fs-head:12px; --fs-small:12px;
  --r:12px; --pad:18px; --font:"Roboto",system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
}
.tmsx-ar{ --font:"Noto Sans Arabic","Roboto",system-ui,Arial,sans-serif; }
body.tmsx{ background:var(--bg); color:var(--text); font-family:var(--font); font-size:var(--fs-body); line-height:1.5; margin:0; -webkit-font-smoothing:antialiased; }
body.tmsx .site-header, body.tmsx .site-footer, body.tmsx .page-header{ display:none !important; }
body.tmsx .site-main, body.tmsx main#content{ max-width:none !important; padding:0 !important; margin:0 !important; width:100% !important; }
.tmsx a{ color:inherit; text-decoration:none; }
.tm-wrap{ max-width:1240px; margin:0 auto; padding:0 20px; box-sizing:border-box; }
.tm-wrap *, .tm-header *, .tm-footer *{ box-sizing:border-box; }

/* Header */
.tm-header{ background:var(--ink); color:#fff; position:sticky; top:0; z-index:50; }
.admin-bar .tm-header{ top:32px; }
.tm-header-in{ display:flex; align-items:center; gap:24px; height:62px; }
.tm-brand{ display:flex; align-items:center; gap:10px; font-size:20px; letter-spacing:.2px; color:#fff !important; font-weight:400; white-space:nowrap; }
.tm-brand b{ font-weight:700; color:var(--gold); }
.tm-mark{ width:26px; height:26px; border-radius:7px; background:linear-gradient(135deg,var(--accent) 0 50%,var(--gold) 50% 100%); display:inline-block; }
.tm-nav{ display:flex; align-items:center; gap:4px; margin-inline-start:auto; }
.tm-nav-a{ color:#c9d3de !important; padding:8px 12px; border-radius:8px; font-size:var(--fs-row); font-weight:500; }
.tm-nav-a:hover{ color:#fff !important; background:var(--ink-2); }
.tm-nav-a.is-active{ color:#fff !important; background:var(--accent); }
.tm-lang{ color:var(--gold) !important; border:1px solid #3a4a5c; padding:6px 10px; border-radius:8px; font-size:var(--fs-small); margin-inline-start:6px; }
.tm-burger{ display:none; margin-inline-start:auto; background:none; border:0; padding:8px; cursor:pointer; }
.tm-burger span{ display:block; width:22px; height:2px; background:#fff; margin:5px 0; border-radius:2px; }

/* Ticker */
.tm-ticker{ background:#fff; border-bottom:1px solid var(--line); overflow:hidden; white-space:nowrap; font-size:var(--fs-small); }
.tm-ticker-track{ display:inline-flex; gap:28px; padding:8px 0; animation:tm-scroll 70s linear infinite; }
.tm-ticker:hover .tm-ticker-track{ animation-play-state:paused; }
.tm-ticker a b{ font-weight:700; margin-inline-end:4px; }
.tmsx-ar .tm-ticker-track{ animation-name:tm-scroll-rtl; }
@keyframes tm-scroll{ from{ transform:translateX(0);} to{ transform:translateX(-50%);} }
@keyframes tm-scroll-rtl{ from{ transform:translateX(0);} to{ transform:translateX(50%);} }

/* Page */
.tm-page{ padding-top:24px; padding-bottom:40px; }
.tm-narrow{ max-width:900px; }
.tm-toolbar{ display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:16px; }
.tm-h1{ font-size:var(--fs-h1); font-weight:700; margin:0; color:var(--ink); line-height:1.25; }
.tm-tools{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.tm-updated{ font-size:var(--fs-small); color:var(--muted); }
.tm-msg{ background:#fff7e6; border:1px solid #f1d9a6; color:#7a5300; padding:8px 12px; border-radius:8px; font-size:var(--fs-row); margin-bottom:12px; }

.tm-btn{ display:inline-flex; align-items:center; gap:8px; background:var(--accent); color:#fff !important; border:1px solid var(--accent); border-radius:9px; padding:8px 14px; font:500 var(--fs-row)/1.2 var(--font); cursor:pointer; }
.tm-btn:hover{ filter:brightness(1.08); }
.tm-btn-line{ background:#fff; color:var(--accent) !important; }
.tm-btn[disabled]{ opacity:.6; cursor:wait; }
.tm-spin{ width:14px; height:14px; border:2px solid rgba(255,255,255,.45); border-top-color:#fff; border-radius:50%; display:none; }
.tm-btn.is-busy .tm-spin{ display:inline-block; animation:tm-rot .8s linear infinite; }
@keyframes tm-rot{ to{ transform:rotate(360deg);} }
.tm-link{ background:none; border:0; color:var(--accent); font:500 var(--fs-small) var(--font); cursor:pointer; padding:4px 6px; }
.tm-del{ color:var(--down); }

/* Stats strip */
.tm-stats{ display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:16px; }
.tm-stats > div{ background:var(--card); border:1px solid var(--line); border-radius:var(--r); padding:12px 16px; display:flex; flex-direction:column; gap:2px; }
.tm-stats span{ font-size:var(--fs-small); color:var(--muted); }
.tm-stats b{ font-size:20px; font-weight:700; font-variant-numeric:tabular-nums; }

/* Cards & grid */
.tm-grid{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.tm-card{ background:var(--card); border:1px solid var(--line); border-radius:var(--r); padding:var(--pad); min-width:0; }
.tm-card.tm-wide{ grid-column:1 / -1; margin-bottom:16px; }
.tm-grid .tm-card.tm-wide{ margin-bottom:0; }
.tm-h2{ font-size:var(--fs-h2); font-weight:700; margin:0 0 12px; color:var(--ink); }
.tm-muted{ color:var(--muted); font-size:var(--fs-row); margin:0 0 12px; }

/* Tables */
.tm-scroll{ overflow-x:auto; -webkit-overflow-scrolling:touch; margin:0 calc(-1 * var(--pad)); padding:0 var(--pad); }
.tm-table{ width:100%; border-collapse:collapse; font-size:var(--fs-row); font-variant-numeric:tabular-nums; }
body.tmsx .tm-table, body.tmsx .tm-table th, body.tmsx .tm-table td{ border:0; background:transparent; }
body.tmsx .tm-table tbody > tr:nth-child(odd) > td, body.tmsx .tm-table tbody > tr:nth-child(odd) > th{ background:transparent; }
body.tmsx .tm-table tbody > tr:hover > td{ background:#f8fafb; }
body.tmsx .tm-table{ margin:0; }
.tm-table th{ font-size:var(--fs-head); font-weight:500; color:var(--muted); text-transform:uppercase; letter-spacing:.4px; text-align:start; padding:8px 10px; border-bottom:1px solid var(--line); white-space:nowrap; background:#fff; }
.tm-table td{ padding:9px 10px; border-bottom:1px solid #eef1f5; vertical-align:middle; text-align:start; }
.tm-table tr:last-child td{ border-bottom:0; }
.tm-table tfoot td{ border-top:2px solid var(--line); padding-top:12px; }
.tm-table .n{ text-align:end; white-space:nowrap; }
.tm-table tbody tr:hover{ background:#f8fafb; }
.tm-sortable th[data-sort]{ cursor:pointer; user-select:none; }
.tm-sortable th[data-sort].is-asc::after{ content:" ▲"; font-size:9px; }
.tm-sortable th[data-sort].is-desc::after{ content:" ▼"; font-size:9px; }
.tm-sym{ display:flex; flex-direction:column; line-height:1.25; min-width:0; }
.tm-sym b{ font-weight:700; color:var(--ink); }
.tm-sym small{ font-size:var(--fs-small); color:var(--muted); max-width:240px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tm-why{ font-size:var(--fs-small); color:var(--muted); min-width:200px; }
.tm-score{ display:inline-block; min-width:36px; text-align:center; padding:2px 8px; border-radius:6px; background:var(--accent-2); color:var(--accent); font-weight:700; }
.tm-up{ color:var(--up); } .tm-down{ color:var(--down); } .tm-flat{ color:var(--flat); }
.tm-range{ display:inline-block; width:64px; height:6px; background:#e7ebf0; border-radius:3px; position:relative; vertical-align:middle; }
.tm-range span{ position:absolute; top:-3px; inset-inline-start:var(--p); width:4px; height:12px; margin-inline-start:-2px; background:var(--ink); border-radius:2px; }
.tm-range-n{ display:inline-block; min-width:34px; font-size:var(--fs-small); color:var(--muted); margin-inline-start:6px; }

/* Filters */
.tm-filters{ display:flex; gap:12px; flex-wrap:wrap; align-items:center; margin-bottom:12px; font-size:var(--fs-row); color:var(--muted); }
.tm-filters label{ display:flex; align-items:center; gap:6px; }
.tm-filters select, .tm-filters input, .tm-picker select{ font:var(--fs-row) var(--font); padding:7px 10px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--text); min-height:36px; }
.tm-filters input[type=search]{ min-width:200px; flex:1; max-width:320px; }
.tm-picker select{ max-width:320px; }

/* News */
.tm-news{ list-style:none; margin:0; padding:0; }
.tm-news li{ border-bottom:1px solid #eef1f5; }
.tm-news li:last-child{ border-bottom:0; }
.tm-news a{ display:flex; flex-direction:column; gap:2px; padding:9px 0; }
.tm-news-meta{ font-size:var(--fs-small); color:var(--muted); }
.tm-news-meta b{ color:var(--accent); margin-inline-end:6px; }
.tm-news-t{ font-size:var(--fs-row); }

/* Stock page */
.tm-quote{ display:flex; justify-content:space-between; align-items:flex-end; gap:16px; flex-wrap:wrap; background:var(--card); border:1px solid var(--line); border-radius:var(--r); padding:var(--pad); margin-bottom:16px; }
.tm-quote-name{ font-size:var(--fs-h2); font-weight:700; display:flex; flex-direction:column; }
.tm-quote-name small{ font-size:var(--fs-small); color:var(--muted); font-weight:400; }
.tm-quote-px b{ font-size:30px; font-weight:700; font-variant-numeric:tabular-nums; }
.tm-quote-px .tm-quote-chg{ font-size:var(--fs-body); margin-inline-start:6px; unicode-bidi:isolate; }
.tm-kv{ display:grid; grid-template-columns:repeat(6,1fr); gap:1px; background:var(--line); border:1px solid var(--line); border-radius:var(--r); overflow:hidden; margin:0 0 16px; }
.tm-kv > div{ background:#fff; padding:10px 14px; }
.tm-kv dt{ font-size:var(--fs-small); color:var(--muted); }
.tm-kv dd{ margin:0; font-size:var(--fs-row); font-weight:500; font-variant-numeric:tabular-nums; }
.tm-seg{ display:inline-flex; border:1px solid var(--line); border-radius:9px; overflow:hidden; margin-bottom:12px; flex-wrap:wrap; }
.tm-seg button{ background:#fff; border:0; border-inline-end:1px solid var(--line); padding:6px 12px; font:500 var(--fs-small) var(--font); color:var(--muted); cursor:pointer; }
.tm-seg button:last-child{ border-inline-end:0; }
.tm-seg button.is-on{ background:var(--ink); color:#fff; }
.tm-chart{ position:relative; width:100%; }
.tm-chart-empty{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; color:var(--muted); }

/* Watchlist */
.tm-in{ width:78px; font:var(--fs-row) var(--font); padding:5px 7px; border:1px solid transparent; border-radius:6px; background:transparent; text-align:end; font-variant-numeric:tabular-nums; color:var(--text); }
.tm-in:hover{ border-color:var(--line); }
.tm-in:focus{ border-color:var(--accent); background:#fff; outline:0; }
.tm-in-wide{ width:150px; text-align:start; }
.tm-watch tr.is-hit{ background:#fff8e8; }
.tm-actions{ white-space:nowrap; text-align:end; }

/* Forms (JetFormBuilder + login) */
.tm-form .jet-form-builder__field-wrap input, .tm-form .jet-form-builder__field-wrap select,
.tm-login input[type=text], .tm-login input[type=password]{ width:100%; font:var(--fs-body) var(--font); padding:10px 12px; border:1px solid var(--line); border-radius:9px; background:#fff; min-height:42px; }
.tm-form .jet-form-builder__label-text, .tm-login label{ font-size:var(--fs-row); font-weight:500; color:var(--ink); }
.tm-form .jet-form-builder-row{ margin-bottom:12px; }
.tm-form-watch .jet-form-builder{ display:grid; grid-template-columns:2fr repeat(4,1fr); gap:12px; align-items:end; }
.tm-form-watch .jet-form-builder-row{ margin:0; }
.tm-form-watch .field-type-text-field, .tm-form-watch .field-type-submit-field{ grid-column:span 2; }
.tm-form .jet-form-builder__action-button, .tm-login input[type=submit]{ background:var(--accent); color:#fff; border:0; border-radius:9px; padding:11px 18px; font:500 var(--fs-row) var(--font); cursor:pointer; min-height:42px; }
.tm-login p{ margin:0 0 12px; }
.tm-form .select2-container{ width:100% !important; }
.tm-form .select2-container .select2-selection--single{ height:42px; border:1px solid var(--line); border-radius:9px; display:flex; align-items:center; }

/* Footer */
.tm-footer{ background:var(--ink); color:#9aa8b6; font-size:var(--fs-small); padding:22px 0; margin-top:24px; }
.tm-footer p{ margin:0 0 4px; }

/* Tablet */
@media (max-width:1024px){
  .tm-kv{ grid-template-columns:repeat(4,1fr); }
  .tm-form-watch .jet-form-builder{ grid-template-columns:repeat(3,1fr); }
  .tm-form-watch .jet-form-builder-row{ grid-column:auto !important; }
  .tm-form-watch .field-type-select-field{ grid-column:1 / -1 !important; }
}
@media (max-width:860px){
  .tm-grid{ grid-template-columns:1fr; }
  .tm-stats{ grid-template-columns:repeat(2,1fr); }
}
/* Mobile */
@media (max-width:700px){
  :root{ --fs-h1:20px; --fs-h2:15px; --fs-body:15px; --fs-row:14px; --fs-head:11px; --pad:14px; }
  .tm-wrap{ padding:0 14px; }
  .tm-header-in{ height:56px; }
  .tm-burger{ display:block; }
  .tm-nav{ display:none; position:absolute; top:56px; inset-inline:0; background:var(--ink); flex-direction:column; align-items:stretch; padding:8px 14px 14px; gap:2px; }
  .tm-nav.is-open{ display:flex; }
  .tm-nav-a{ padding:12px; }
  .tm-lang{ align-self:flex-start; margin:8px 0 0; }
  .tm-toolbar{ align-items:flex-start; }
  .tm-tools{ width:100%; justify-content:space-between; }
  .tm-picker{ width:100%; } .tm-picker select{ max-width:none; width:100%; }
  .tm-kv{ grid-template-columns:repeat(2,1fr); }
  .tm-quote-px b{ font-size:26px; }
  .tm-filters input[type=search]{ max-width:none; min-width:0; width:100%; }
  .tm-sym small{ max-width:150px; }
  .tm-table td, .tm-table th{ padding:8px 7px; }
  .tm-scroll .tm-table td:first-child, .tm-scroll .tm-table th:first-child{ position:sticky; inset-inline-start:0; background:#fff; z-index:1; }
  .tm-form-watch .jet-form-builder{ grid-template-columns:1fr 1fr; }
  .tm-form-watch .field-type-text-field, .tm-form-watch .field-type-submit-field, .tm-form-watch .field-type-select-field{ grid-column:1 / -1 !important; }
  .tm-why{ min-width:170px; }
}

/* fixes */
.tmsx [hidden]{ display:none !important; }
.tm-page{ min-height:calc(100vh - 300px); }
.tm-brand-t{ display:inline; }
body.tmsx .tm-in{ border:1px solid transparent; box-shadow:none; }
body.tmsx .tm-in:hover{ border-color:var(--line); }
body.tmsx .tm-in:focus{ border-color:var(--accent); }

.tmsx-ar .tm-table .n, .tmsx-ar .tm-kv dd, .tmsx-ar .tm-ticker a{ unicode-bidi:plaintext; }

/* 10-year range */
.tm-range10{ display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-bottom:12px; }
.tm-range10 > div{ border:1px solid var(--line); border-radius:10px; padding:10px 12px; display:flex; flex-direction:column; gap:2px; }
.tm-range10 span{ font-size:var(--fs-small); color:var(--muted); }
.tm-range10 b{ font-size:18px; font-weight:700; font-variant-numeric:tabular-nums; }
.tm-range10 small{ font-size:var(--fs-small); color:var(--muted); }
@media (max-width:700px){ .tm-range10{ grid-template-columns:1fr 1fr; } .tm-range10 > div:last-child{ grid-column:1 / -1; } }

/* =====================  Visual refresh (v1.0.4)  ===================== */
body.tmsx{ background:
  radial-gradient(1200px 420px at 100% -10%, rgba(184,137,45,.10), transparent 60%),
  radial-gradient(900px 380px at -10% 0%, rgba(15,118,110,.10), transparent 60%),
  var(--bg); background-attachment:fixed; }

/* Header + ticker */
.tm-header{ background:linear-gradient(90deg,#0b1726 0%,#10243a 60%,#0d2a33 100%); box-shadow:0 2px 14px rgba(13,27,42,.25); }
.tm-ticker{ background:#0f1f30; border-bottom:0; color:#c9d3de; }
.tm-ticker a b{ color:#fff; }
.tm-ticker .tm-up{ color:#4ade80; } .tm-ticker .tm-down{ color:#f87171; } .tm-ticker .tm-flat{ color:#8b98a6; }
.tm-ticker-track{ padding:9px 0; }

/* Hero toolbar */
.tm-hero{ background:linear-gradient(120deg,#0f766e 0%,#115e59 45%,#0d2a33 100%); color:#fff; border-radius:18px; padding:22px 24px; margin-bottom:18px; position:relative; overflow:hidden; box-shadow:0 10px 30px rgba(15,118,110,.22); }
.tm-hero::after{ content:""; position:absolute; inset-inline-end:-60px; top:-60px; width:240px; height:240px; border-radius:50%; background:radial-gradient(circle,rgba(184,137,45,.45),transparent 70%); pointer-events:none; }
.tm-hero .tm-h1{ color:#fff; font-size:calc(var(--fs-h1) + 4px); }
.tm-hero-t{ display:flex; flex-direction:column; gap:6px; position:relative; z-index:1; }
.tm-hero .tm-tools{ position:relative; z-index:1; }
.tm-hero .tm-updated{ color:rgba(255,255,255,.78); }
.tm-hero .tm-btn{ background:#fff; color:var(--accent) !important; border-color:#fff; box-shadow:0 4px 14px rgba(0,0,0,.15); }
.tm-hero .tm-btn .tm-spin{ border-color:rgba(15,118,110,.3); border-top-color:var(--accent); }
.tm-hero .tm-picker select{ background:rgba(255,255,255,.95); border-color:transparent; }
.tm-status{ display:inline-flex; align-items:center; gap:7px; font-size:var(--fs-small); font-weight:500; background:rgba(255,255,255,.14); padding:4px 10px; border-radius:20px; width:max-content; }
.tm-status i{ width:8px; height:8px; border-radius:50%; background:#94a3b8; }
.tm-status.is-open i{ background:#4ade80; box-shadow:0 0 0 0 rgba(74,222,128,.7); animation:tm-pulse 1.8s infinite; }
@keyframes tm-pulse{ 0%{ box-shadow:0 0 0 0 rgba(74,222,128,.6);} 70%{ box-shadow:0 0 0 8px rgba(74,222,128,0);} 100%{ box-shadow:0 0 0 0 rgba(74,222,128,0);} }

/* Cards */
.tm-card{ border:1px solid rgba(13,27,42,.06); box-shadow:0 1px 2px rgba(13,27,42,.04),0 8px 24px rgba(13,27,42,.05); transition:box-shadow .2s, transform .2s; }
.tm-card:hover{ box-shadow:0 2px 4px rgba(13,27,42,.05),0 14px 34px rgba(13,27,42,.08); }
.tm-h2{ display:flex; align-items:center; gap:10px; }
.tm-h2::before{ content:""; width:4px; height:18px; border-radius:3px; background:linear-gradient(180deg,var(--accent),var(--gold)); }

/* Stats */
.tm-stats > div{ border:1px solid rgba(13,27,42,.06); box-shadow:0 6px 18px rgba(13,27,42,.05); position:relative; overflow:hidden; }
.tm-stats > div::before{ content:""; position:absolute; inset-inline-start:0; top:0; bottom:0; width:4px; background:var(--accent); }
.tm-stats > div:nth-child(1)::before{ background:var(--up); }
.tm-stats > div:nth-child(2)::before{ background:var(--down); }
.tm-stats > div:nth-child(3)::before{ background:var(--gold); }
.tm-stats b{ font-size:24px; }

/* Symbol cell with avatar */
.tm-sym{ flex-direction:row; align-items:center; gap:10px; }
.tm-sym-t{ display:flex; flex-direction:column; min-width:0; }
.tm-av{ flex:0 0 34px; width:34px; height:34px; border-radius:10px; display:inline-flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; letter-spacing:.3px; color:#fff; background:#64748b; }
.tm-sec-Financial{ background:linear-gradient(135deg,#0f766e,#14b8a6); }
.tm-sec-Industrial{ background:linear-gradient(135deg,#b45309,#f59e0b); }
.tm-sec-Services{ background:linear-gradient(135deg,#1d4ed8,#60a5fa); }
.tm-sec-Funds{ background:linear-gradient(135deg,#7c3aed,#a78bfa); }
.tm-sym:hover b{ color:var(--accent); }

/* Pills & score */
.tm-pill{ display:inline-block; min-width:64px; text-align:center; padding:3px 8px; border-radius:20px; font-size:var(--fs-small); font-weight:600; font-variant-numeric:tabular-nums; }
.tm-pill-up{ background:#e7f6ec; color:var(--up); }
.tm-pill-down{ background:#fdecec; color:var(--down); }
.tm-pill-flat{ background:#eef1f5; color:var(--flat); }
.tm-score{ position:relative; overflow:hidden; min-width:44px; padding:3px 9px; border-radius:8px; }
.tm-score i{ position:absolute; inset-block:auto 0; inset-inline-start:0; height:3px; width:var(--s); background:currentColor; opacity:.55; }
.tm-score-hi{ background:#e3f5ee; color:#0b7a4b; }
.tm-score-mid{ background:#fdf4e3; color:#9a6a12; }
.tm-score-lo{ background:#f1f3f6; color:#5b6672; }

/* Tables */
body.tmsx .tm-table thead th{ background:#f7f9fb; }
body.tmsx .tm-table thead th:first-child{ border-start-start-radius:8px; }
body.tmsx .tm-table thead th:last-child{ border-start-end-radius:8px; }
body.tmsx .tm-table tbody > tr:hover > td{ background:#f4faf9; }
.tm-dash{ color:#c3cad3; }

/* Dividend heat map */
.tm-divs th.n, .tm-divs td.n{ width:7.5%; }
.tm-divs td:first-child{ min-width:200px; }
body.tmsx .tm-divs td.tm-heat[style]{ background:rgba(184,137,45,var(--h)); color:#3d2a05; font-weight:500; }
body.tmsx .tm-divs tbody > tr:hover > td.tm-heat[style]{ background:rgba(184,137,45,calc(var(--h) + .08)); }
.tm-divs td.tm-heat{ border-inline-start:2px solid #fff; }

/* Quote card on stock page */
.tm-quote{ background:linear-gradient(180deg,#fff,#fbfcfd); box-shadow:0 8px 24px rgba(13,27,42,.05); }
.tm-quote-px b{ background:linear-gradient(90deg,var(--ink),var(--accent)); -webkit-background-clip:text; background-clip:text; color:transparent; }
.tm-kv{ box-shadow:0 8px 24px rgba(13,27,42,.04); }
.tm-seg{ background:#f3f5f8; padding:3px; border:0; gap:2px; }
.tm-seg button{ border:0 !important; border-radius:7px; background:transparent; }
.tm-seg button.is-on{ background:var(--ink); box-shadow:0 2px 6px rgba(13,27,42,.25); }

/* Filters */
.tm-filters select, .tm-filters input{ background:#f7f9fb; border-color:#e6ebf0; }
.tm-filters select:focus, .tm-filters input:focus{ outline:0; border-color:var(--accent); background:#fff; box-shadow:0 0 0 3px rgba(15,118,110,.12); }

/* 10-year boxes */
.tm-range10 > div{ background:#f8fafb; border-color:#edf1f4; }

/* Footer */
.tm-footer{ background:linear-gradient(90deg,#0b1726,#0d2a33); }

@media (max-width:700px){
  .tm-hero{ padding:18px 16px; border-radius:14px; }
  .tm-hero .tm-h1{ font-size:var(--fs-h1); }
  .tm-av{ flex-basis:30px; width:30px; height:30px; font-size:10px; border-radius:8px; }
  .tm-pill{ min-width:56px; }
  .tm-divs td:first-child{ min-width:150px; }
}

/* =====================  Advanced chart (v1.1)  ===================== */
.tm-card-pro{ padding-bottom:14px; }
.tmp{ font-family:var(--font); }
.tmp-bar{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-bottom:10px; }
.tmp-bar .tm-seg{ margin:0; }
.tmp-btn{ display:inline-flex; align-items:center; gap:6px; background:#f3f5f8; border:1px solid #e6ebf0; color:var(--ink); border-radius:9px; padding:6px 12px; font:500 var(--fs-small) var(--font); cursor:pointer; min-height:32px; }
.tmp-btn:hover{ background:#e9f4f2; border-color:#cfe7e3; color:var(--accent); }
.tmp-new{ margin-inline-start:auto; background:var(--ink); color:#fff; border-color:var(--ink); }
.tmp-new:hover{ background:var(--accent); color:#fff; border-color:var(--accent); }
.tmp-addwrap{ position:relative; }
.tmp-menu{ position:absolute; top:calc(100% + 6px); left:0; z-index:30; width:340px; max-width:86vw; background:#fff; border:1px solid var(--line); border-radius:12px; box-shadow:0 18px 40px rgba(13,27,42,.18); padding:8px; }
.tmp-search{ width:100%; box-sizing:border-box; padding:8px 10px; border:1px solid var(--line); border-radius:8px; font:var(--fs-row) var(--font); margin-bottom:6px; }
.tmp-list{ max-height:320px; overflow:auto; display:flex; flex-direction:column; }
.tmp-list button{ display:grid; grid-template-columns:64px 1fr auto; gap:8px; align-items:center; text-align:left; background:none; border:0; border-radius:8px; padding:8px; cursor:pointer; font:var(--fs-row) var(--font); color:var(--text); }
.tmp-list button:hover{ background:#f1f8f7; }
.tmp-list b{ color:var(--accent); }
.tmp-list em{ font-style:normal; font-size:11px; color:var(--muted); background:#f3f5f8; border-radius:6px; padding:2px 6px; }
.tmp-chips{ display:flex; flex-wrap:wrap; gap:6px; margin-bottom:10px; }
.tmp-chip{ display:inline-flex; align-items:center; gap:6px; background:#f7f9fb; border:1px solid #e6ebf0; border-radius:20px; padding:3px 6px 3px 4px; font-size:var(--fs-small); }
.tmp-chip input[type=color]{ width:20px; height:20px; border:0; padding:0; border-radius:50%; background:none; cursor:pointer; }
.tmp-chip label{ display:inline-flex; align-items:center; gap:3px; color:var(--muted); }
.tmp-chip input[type=number]{ width:48px; padding:2px 4px; border:1px solid #e3e8ee; border-radius:6px; font:12px var(--font); }
.tmp-x{ background:none; border:0; cursor:pointer; color:var(--muted); font-size:16px; line-height:1; padding:0 4px; }
.tmp-x:hover{ color:var(--down); }
.tmp-stage{ position:relative; border:1px solid #edf1f4; border-radius:12px; overflow:hidden; background:#fff; }
.tmp-legend{ position:absolute; top:8px; left:10px; z-index:5; display:flex; flex-wrap:wrap; gap:10px; align-items:center; font-size:12px; color:var(--muted); pointer-events:none; background:rgba(255,255,255,.85); padding:2px 6px; border-radius:6px; }
.tmp-legend b{ color:var(--ink); font-size:13px; }
.tmp-last{ color:var(--ink); font-weight:600; font-variant-numeric:tabular-nums; }
.tmp-lg{ display:inline-flex; align-items:center; gap:4px; }
.tmp-lg i{ width:10px; height:3px; border-radius:2px; display:inline-block; }
.tmp-main{ height:420px; }
.tmp-pane{ position:relative; height:150px; border-top:1px solid #edf1f4; }
.tmp-pane-t{ position:absolute; top:4px; left:10px; z-index:5; font-size:11px; color:var(--muted); background:rgba(255,255,255,.85); padding:1px 5px; border-radius:4px; }
.tmp-empty{ padding:40px; text-align:center; color:var(--muted); }
.tmp-loading{ display:none; position:absolute; inset:0; background:rgba(255,255,255,.55); }
.tmp.is-loading .tmp-loading{ display:block; }
.tmp.is-loading .tmp-loading::after{ content:""; position:absolute; top:50%; left:50%; width:28px; height:28px; margin:-14px; border:3px solid #d8e9e6; border-top-color:var(--accent); border-radius:50%; animation:tm-rot .8s linear infinite; }
.tmp-note{ font-size:11px; color:var(--muted); margin:8px 0 0; }
.tmp-note a{ color:var(--accent); }

/* Script editors */
.tmp-editors{ display:flex; flex-direction:column; gap:10px; margin-top:12px; }
.tmp-ed{ border:1px solid #2a3b4f; border-radius:12px; overflow:hidden; background:#0f1b29; box-shadow:0 8px 22px rgba(13,27,42,.18); }
.tmp-ed.is-pinned{ border-color:var(--gold); box-shadow:0 0 0 2px rgba(184,137,45,.25),0 8px 22px rgba(13,27,42,.18); }
.tmp-ed-h{ display:flex; flex-wrap:wrap; gap:6px; align-items:center; padding:8px 10px; background:#14263a; }
.tmp-ed-h input[type=color]{ width:22px; height:22px; border:0; padding:0; background:none; cursor:pointer; }
.tmp-ed-name{ background:#0f1b29; border:1px solid #2a3b4f; color:#fff; border-radius:7px; padding:5px 8px; font:500 13px var(--font); min-width:140px; }
.tmp-ed-pane{ background:#0f1b29; border:1px solid #2a3b4f; color:#c9d3de; border-radius:7px; padding:5px 6px; font:12px var(--font); }
.tmp-ed-on{ color:#c9d3de; font-size:12px; display:inline-flex; align-items:center; gap:4px; }
.tmp-ed-sp{ flex:1; }
.tmp-ed-h button{ background:#22374d; color:#e2e8f0; border:0; border-radius:7px; padding:5px 10px; font:500 12px var(--font); cursor:pointer; }
.tmp-ed-h button:hover{ background:#2d4862; }
.tmp-ed-run{ background:var(--accent) !important; color:#fff !important; }
.tmp-ed.is-pinned .tmp-ed-pin{ background:var(--gold); color:#1f1503; }
.tmp-ed-del:hover{ background:#b42318 !important; }
.tmp-ed-code{ display:block; width:100%; box-sizing:border-box; min-height:200px; resize:vertical; background:#0f1b29; color:#e6edf3; border:0; padding:12px 14px; font:13px/1.55 "JetBrains Mono","Fira Code",Consolas,Menlo,monospace; tab-size:2; white-space:pre; outline:0; }
.tmp-ed.is-collapsed .tmp-ed-code{ display:none; }
.tmp-ed-err{ background:#3b1219; color:#fecaca; font:12px Consolas,monospace; padding:8px 12px; }

@media (max-width:700px){
  .tmp-main{ height:300px; }
  .tmp-pane{ height:120px; }
  .tmp-new{ margin-inline-start:0; }
  .tmp-ed-name{ min-width:0; flex:1; }
  .tmp-ed-sp{ display:none; }
}

/* =====================  Search  ===================== */
.tm-search-btn{ display:inline-flex; align-items:center; gap:8px; margin-inline-start:auto; background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.14); color:#c9d3de; border-radius:10px; padding:7px 10px; font:500 var(--fs-small) var(--font); cursor:pointer; min-width:180px; }
.tm-search-btn:hover{ background:rgba(255,255,255,.14); color:#fff; }
.tm-search-btn span{ flex:1; text-align:start; }
.tm-search-btn kbd, .tm-sm kbd{ font:11px var(--font); background:rgba(255,255,255,.12); border-radius:5px; padding:1px 6px; color:inherit; }
.tm-header .tm-nav{ margin-inline-start:12px; }
.tm-combo{ position:relative; min-width:300px; }
.tm-combo-i{ position:absolute; top:50%; inset-inline-start:12px; transform:translateY(-50%); color:var(--muted); pointer-events:none; }
.tm-combo input{ width:100%; box-sizing:border-box; padding:10px 12px; padding-inline-start:36px; border:1px solid transparent; border-radius:10px; background:rgba(255,255,255,.96); font:var(--fs-row) var(--font); color:var(--text); min-height:42px; }
.tm-combo input:focus{ outline:0; box-shadow:0 0 0 3px rgba(255,255,255,.35); }
.tm-combo input::placeholder{ color:var(--ink); opacity:.85; }
.tm-combo-list{ position:absolute; top:calc(100% + 6px); inset-inline:0; z-index:40; background:#fff; border:1px solid var(--line); border-radius:12px; box-shadow:0 18px 40px rgba(13,27,42,.2); max-height:380px; overflow:auto; padding:6px; color:var(--text); }
.tm-combo-o{ display:flex; align-items:center; gap:10px; padding:8px; border-radius:9px; }
.tm-combo-o:hover, .tm-combo-o.is-act{ background:#eef7f5; }
.tm-combo-n{ display:flex; flex-direction:column; flex:1; min-width:0; }
.tm-combo-n b{ color:var(--ink); font-size:var(--fs-row); }
.tm-combo-n small{ color:var(--muted); font-size:var(--fs-small); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tm-combo-p{ font-size:var(--fs-small); font-weight:600; white-space:nowrap; font-variant-numeric:tabular-nums; }
.tm-combo-p i{ font-style:normal; min-width:0; margin-inline-start:4px; }
.tm-combo-empty{ padding:14px; text-align:center; color:var(--muted); font-size:var(--fs-row); }
.tm-sm{ position:fixed; inset:0; z-index:9999; background:rgba(9,18,30,.55); backdrop-filter:blur(3px); display:flex; justify-content:center; align-items:flex-start; padding:10vh 16px 16px; }
.tm-sm[hidden]{ display:none !important; }
.tm-sm-box{ width:100%; max-width:620px; background:#fff; border-radius:16px; box-shadow:0 30px 80px rgba(0,0,0,.35); overflow:hidden; }
.tm-sm-in{ display:flex; align-items:center; gap:10px; padding:14px 16px; border-bottom:1px solid var(--line); color:var(--muted); }
.tm-sm-in input{ flex:1; border:0; outline:0; font:500 17px var(--font); color:var(--text); background:none; }
.tm-sm-in kbd{ background:#f1f4f7; color:var(--muted); }
.tm-sm-list{ position:static; box-shadow:none; border:0; border-radius:0; max-height:60vh; }
html.tm-noscroll{ overflow:hidden; }
@media (max-width:860px){ .tm-search-btn{ min-width:0; } .tm-search-btn span, .tm-search-btn kbd{ display:none; } }
@media (max-width:700px){ .tm-search-btn{ margin-inline-start:auto; } .tm-burger{ margin-inline-start:4px; } .tm-combo{ min-width:0; width:100%; } }

/* Dividends page */
.tm-filterbar{ display:flex; flex-wrap:wrap; gap:12px; align-items:center; justify-content:space-between; }
.tm-filterbar .tm-filters{ margin-bottom:12px; }
.tm-tag{ display:inline-block; background:#fdf4e3; color:#9a6a12; border-radius:6px; padding:1px 7px; font-size:11px; font-weight:600; margin-inline-start:6px; }
.tm-more{ text-align:center; margin:4px 0 0; }
@media (max-width:700px){ .tm-header-in{ gap:10px; } .tm-search-btn{ order:2; margin-inline-start:auto; } .tm-burger{ order:3; margin-inline-start:0; } .tm-nav{ order:4; } }

/* =====================  AI analyst  ===================== */
.tm-agent{ display:flex; flex-wrap:wrap; align-items:center; gap:10px 18px; background:#fff; border:1px solid rgba(13,27,42,.06); border-radius:12px; padding:10px 16px; margin-bottom:16px; font-size:var(--fs-row); color:var(--muted); box-shadow:0 6px 18px rgba(13,27,42,.04); }
.tm-agent b{ color:var(--ink); }
.tm-agent-dot{ width:10px; height:10px; border-radius:50%; background:#94a3b8; }
.tm-agent-dot.is-live{ background:#22c55e; animation:tm-pulse 1.8s infinite; }
.tm-grid-ai{ grid-template-columns:3fr 2fr; margin-bottom:16px; }
.tm-brief{ font-size:var(--fs-body); line-height:1.7; }
.tm-brief h3{ font-size:18px; margin:4px 0 10px; color:var(--ink); }
.tm-brief p{ margin:0 0 10px; }
.tm-brief-meta{ font-size:var(--fs-small); color:var(--muted); }
.tm-brief-card{ background:linear-gradient(180deg,#ffffff,#f9fbfb); }
.tm-linkstats{ display:grid; grid-template-columns:1fr; gap:10px; margin-bottom:14px; }
.tm-linkstats > div{ border:1px solid #edf1f4; background:#f8fafb; border-radius:10px; padding:10px 12px; display:grid; grid-template-columns:1fr auto; align-items:center; }
.tm-linkstats span{ font-size:var(--fs-small); color:var(--muted); }
.tm-linkstats b{ font-size:20px; grid-row:span 2; }
.tm-linkstats small{ font-size:11px; color:var(--muted); }
.tm-h3{ font-size:var(--fs-row); font-weight:700; color:var(--ink); margin:14px 0 8px; }
.tm-ask{ display:flex; gap:8px; align-items:stretch; }
.tm-ask textarea{ flex:1; resize:vertical; min-height:44px; border:1px solid var(--line); border-radius:10px; padding:10px 12px; font:var(--fs-row) var(--font); }
.tm-ask textarea:focus{ outline:0; border-color:var(--accent); box-shadow:0 0 0 3px rgba(15,118,110,.12); }
.tm-answer{ margin-top:10px; background:#f1f8f7; border:1px solid #d5ebe7; border-radius:10px; padding:12px 14px; font-size:var(--fs-row); line-height:1.65; white-space:pre-wrap; }
.tm-answer small{ display:block; margin-top:6px; color:var(--muted); font-size:11px; }
.tm-answer.is-loading{ color:var(--muted); }
.tm-impact-t{ min-width:280px; max-width:520px; }
.tm-impact-t b{ display:block; font-weight:500; color:var(--ink); }
.tm-impact-t small{ display:block; color:var(--muted); font-size:var(--fs-small); margin-top:3px; line-height:1.5; }
.tm-nowrap{ white-space:nowrap; }
.tm-dots{ display:inline-flex; gap:3px; }
.tm-dots i{ width:7px; height:7px; border-radius:50%; background:#e3e8ee; }
.tm-dots i.on{ background:var(--gold); }
.tm-agree{ display:inline-block; font-size:11px; font-weight:600; padding:2px 8px; border-radius:6px; white-space:nowrap; }
.tm-agree.yes{ background:#e3f5ee; color:#0b7a4b; }
.tm-agree.no{ background:#fdecec; color:#b42318; }
.tm-agree.wait{ background:#f1f3f6; color:#5b6672; }
.tm-ainote{ display:flex; gap:12px; align-items:flex-start; background:#f8fafb; border:1px solid #edf1f4; border-radius:10px; padding:12px 14px; margin-bottom:12px; }
.tm-ainote p{ margin:0; flex:1; line-height:1.6; }
.tm-ainote small{ color:var(--muted); font-size:11px; white-space:nowrap; }
.tm-disclaimer{ text-align:center; font-size:var(--fs-small); }
@media (max-width:860px){ .tm-grid-ai{ grid-template-columns:1fr; } }
@media (max-width:700px){ .tm-ask{ flex-direction:column; } .tm-ainote{ flex-direction:column; } .tm-impact-t{ min-width:220px; } }

/* Watchlist: latest news + expected impact */
body.tmsx .tm-watch tr.tm-watch-ai > td{ background:#f8fafb; padding:0 10px 12px; border-bottom:1px solid var(--line); }
body.tmsx .tm-watch tbody > tr:hover + tr.tm-watch-ai > td, body.tmsx .tm-watch tbody > tr.tm-watch-ai:hover > td{ background:#f4faf9; }
.tm-watch tr:has(+ tr.tm-watch-ai) > td{ border-bottom:0; }
.tm-watch-ai-in{ display:flex; flex-direction:column; gap:6px; padding:10px 12px; border-radius:10px; background:#fff; border:1px solid #edf1f4; }
.tm-watch-news{ display:flex; flex-wrap:wrap; align-items:baseline; gap:6px 10px; }
.tm-watch-news b{ font-weight:600; color:var(--ink); font-size:var(--fs-row); }
.tm-watch-news small{ color:var(--muted); font-size:11px; }
.tm-watch-ai-row{ display:flex; flex-wrap:wrap; align-items:center; gap:6px 12px; }
.tm-watch-ai-l{ font-size:11px; text-transform:uppercase; letter-spacing:.4px; color:var(--muted); font-weight:600; min-width:96px; }
.tmsx-ar .tm-watch-ai-l{ text-transform:none; letter-spacing:0; }
.tm-watch-ai-t{ flex:1; min-width:220px; font-size:var(--fs-row); color:var(--text); white-space:normal; }
.tm-watch-ai-m{ font-size:11px; color:var(--muted); white-space:nowrap; }
.tm-outlook{ display:inline-flex; align-items:center; gap:6px; padding:3px 10px; border-radius:20px; font-size:var(--fs-small); font-weight:600; white-space:nowrap; }
.tm-outlook i{ font-style:normal; font-size:10px; }
.tm-outlook-up{ background:#e7f6ec; color:var(--up); }
.tm-outlook-down{ background:#fdecec; color:var(--down); }
.tm-outlook-flat{ background:#eef1f5; color:var(--flat); }
.tm-outlook .tm-dots{ margin-inline-start:2px; }
@media (max-width:700px){ .tm-watch-ai-in{ position:sticky; inset-inline-start:0; max-width:calc(100vw - 60px); } .tm-watch-ai-t{ min-width:0; } }
