/* ALHARITM Bozor — same brand palette as alharitm.com */
:root {
  --teal: #05a090; --teal-bright: #2fd3bd; --teal-ink: #036b60; --teal-tint: #e3f5f2;
  --navy: #0a2540; --ink: #011412; --paper: #fff; --paper-2: #f5f7f8; --line: #dde2e7;
  --text: #1b2733; --muted: #52606d; --up: #0a8a5c; --down: #c4372a; --warn: #a66b00;
  --on-dark: #e9f1f5; --on-dark-muted: #a9bccb;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --r: 16px; --shadow: 0 1px 2px rgba(10, 37, 64, .06), 0 8px 24px rgba(10, 37, 64, .06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 var(--font); color: var(--text); background: var(--paper-2); -webkit-font-smoothing: antialiased; }
a { color: var(--teal-ink); }
h1, h2, h3 { color: var(--navy); letter-spacing: -.02em; line-height: 1.2; margin: 0 0 .5em; }
.wrap { width: min(1240px, 100% - 32px); margin-inline: auto; }
.skip-link { position: absolute; left: 12px; top: -80px; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip-link:focus { top: 10px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 6px; }

/* header */
.top { position: sticky; top: 0; z-index: 30; background: rgba(10, 37, 64, .96); backdrop-filter: blur(10px); color: #fff; }
.top-in { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; letter-spacing: .05em; white-space: nowrap; }
.brand b { color: var(--teal-bright); font-weight: 800; }
.logo-mark { width: 18px; height: 25px; color: #fff; }
.nav { margin-left: auto; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav a { color: var(--on-dark-muted); text-decoration: none; padding: 7px 12px; border-radius: 9px; font-weight: 550; font-size: .93rem; white-space: nowrap; }
.nav a:hover, .nav a[aria-current] { color: #fff; background: rgba(255, 255, 255, .08); }
@media (max-width: 720px) { .nav .ext { display: none; } .top-in { gap: 12px; } .brand span { font-size: .9rem; } }

/* hero */
.hero { background: radial-gradient(800px 400px at 85% 0%, rgba(5, 160, 144, .25), transparent 60%), linear-gradient(160deg, #0a2540, #061a2e); color: var(--on-dark); padding: 48px 0 56px; }
.hero.slim { padding: 36px 0 40px; }
.hero h1 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.8rem); max-width: 860px; }
.grad { background: linear-gradient(92deg, #2fd3bd, #b5f3ea); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kicker { font-family: var(--mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--teal-bright); margin: 0 0 12px; }
.kicker a { color: var(--teal-bright); text-decoration: none; }
.lead { color: var(--on-dark-muted); font-size: 1.08rem; max-width: 760px; margin: 0; }
.stats { display: flex; flex-wrap: wrap; gap: 8px 32px; list-style: none; padding: 0; margin: 26px 0 0; color: var(--on-dark-muted); }
.stats b { display: block; color: #fff; font-size: 1.6rem; letter-spacing: -.02em; }

/* controls */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: -26px 0 16px; padding: 14px; background: #fff; border-radius: var(--r); box-shadow: var(--shadow); position: relative; }
.search { flex: 1 1 260px; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line); font: inherit; }
.search:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(5, 160, 144, .15); }
.chips, .seg { display: flex; flex-wrap: wrap; gap: 4px; }
.chip, .seg button { font: 600 .85rem var(--font); padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--muted); cursor: pointer; }
.chip.on, .seg button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.seg .sep { width: 1px; background: var(--line); margin: 0 6px; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 999px; background: var(--teal); color: var(--ink); font-weight: 650; text-decoration: none; white-space: nowrap; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--navy); cursor: pointer; font: inherit; font-weight: 600; }

/* tables */
.table-wrap { overflow-x: auto; background: #fff; border-radius: var(--r); box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
.grid th, .grid td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.grid thead th { position: sticky; top: 0; background: var(--paper-2); color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; cursor: pointer; user-select: none; }
.grid thead th[aria-sort]::after { content: " ↓"; color: var(--teal-ink); }
.grid thead th[aria-sort="ascending"]::after { content: " ↑"; }
.grid tbody tr:hover { background: #f0f8f6; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: .86rem; }
.up { color: var(--up); } .down { color: var(--down); }
.co { display: grid; gap: 2px; text-decoration: none; color: var(--navy); max-width: 360px; white-space: normal; }
.co strong { font-weight: 650; }
.co span { color: var(--muted); font-size: .8rem; }
.tk { font-family: var(--mono); font-size: .75rem; padding: 1px 6px; border-radius: 5px; background: var(--teal-tint); color: var(--teal-ink); margin-right: 4px; }
.tk.pref { background: var(--paper-2); color: var(--muted); }
.empty, .note { color: var(--muted); font-size: .85rem; }
.list-sec { padding-bottom: 48px; }

/* screener */
.scr { display: grid; grid-template-columns: 280px 1fr; gap: 20px; align-items: start; padding: 24px 0 48px; }
.filters { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow: auto; }
.filters h3 { font-size: .78rem; font-family: var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--teal-ink); margin: 16px 0 8px; }
.filters h3:first-child { margin-top: 0; }
.f-row { display: grid; gap: 4px; margin-bottom: 10px; }
.f-row label { font-size: .85rem; font-weight: 600; color: var(--navy); }
.f-row .rng { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.f-row input[type="number"] { width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: .85rem; }
.f-check { display: flex; gap: 8px; align-items: flex-start; font-size: .85rem; margin: 6px 0; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; }
.scr-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 12px; }
.count { margin: 0; font-weight: 650; color: var(--navy); }
.cols-pick { position: relative; }
.cols-pick summary { cursor: pointer; font-weight: 600; color: var(--teal-ink); list-style: none; }
.cols-pick > div { position: absolute; right: 0; top: 28px; z-index: 5; width: 260px; max-height: 360px; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 10px; }
@media (max-width: 900px) { .scr { grid-template-columns: 1fr; } .filters { position: static; max-height: none; } }

/* company */
.co-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; flex-wrap: wrap; }
.tks { margin: 0; }
.quote { display: grid; justify-items: end; gap: 2px; text-align: right; }
.quote b { font-size: 2rem; color: #fff; font-variant-numeric: tabular-nums; }
.quote small { font-size: .9rem; color: var(--on-dark-muted); }
.quote .up { color: #7ee8b6; } .quote .down { color: #ffb0a6; }
.q-label, .q-date { font-size: .8rem; color: var(--on-dark-muted); }
.co-body { padding: 24px 0 56px; display: grid; gap: 20px; }
.card { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 18px 20px; min-width: 0; }
.card h2 { font-size: 1.05rem; margin: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card .table-wrap { box-shadow: none; border-radius: 0; }
.warn { margin: 0; padding: 10px 14px; border-radius: 10px; background: #fff6dc; color: var(--warn); font-weight: 600; font-size: .9rem; }
.sec-title { font-size: 1.1rem; margin: 6px 0 -8px; }
.metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.metric { background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 14px 16px; display: grid; gap: 2px; }
.metric span { font-size: .8rem; color: var(--muted); }
.metric b { font-size: 1.35rem; color: var(--navy); font-variant-numeric: tabular-nums; }
.metric small { font-size: .72rem; color: var(--muted); font-family: var(--mono); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .two { grid-template-columns: 1fr; } }
.fin th, .fin td { padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.fin thead th { color: var(--muted); font-size: .78rem; font-weight: 600; text-align: right; }
.fin thead th:first-child { text-align: left; }
.fin tbody th { text-align: left; font-weight: 500; white-space: normal; min-width: 220px; }
.fin tr.b th, .fin tr.b td { font-weight: 700; }
.fin tr.t th, .fin tr.t td { font-weight: 800; background: var(--teal-tint); color: var(--navy); }
.links { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 6px; }

/* charts */
.chart { position: relative; height: 340px; }
.chart.small { height: 240px; margin-top: 10px; }
.chart svg { display: block; width: 100%; height: 100%; }
.chart .tip { position: absolute; pointer-events: none; background: rgba(1, 20, 18, .92); color: #fff; padding: 6px 10px; border-radius: 8px; font-size: .8rem; font-family: var(--mono); white-space: nowrap; transform: translate(-50%, -110%); }
.chart .legend { display: flex; gap: 14px; font-size: .8rem; color: var(--muted); margin-top: 6px; }
.chart .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
@media (max-width: 640px) { .chart { height: 260px; } }

.prose { padding: 28px 0 56px; max-width: 820px; }
.prose h2 { margin-top: 1.6em; font-size: 1.3rem; }
.foot { background: var(--ink); color: var(--on-dark-muted); font-size: .85rem; padding: 22px 0; }
.foot a { color: var(--teal-bright); }
.foot-in { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; }
.foot p { margin: 0; }

/* protection layer (same rules as alharitm.com) */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea, select { -webkit-user-select: text; user-select: text; }
.sec-toast { position: fixed; right: 20px; bottom: 20px; z-index: 200; max-width: min(420px, calc(100vw - 40px)); padding: 12px 16px; border-radius: 14px; background: rgba(1, 20, 18, .95); color: #fff; border: 1px solid rgba(47, 211, 189, .4); font-size: .85rem; font-weight: 650; opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .25s, transform .25s; }
.sec-toast.show { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
