:root {
  --bg: #0e0f11; --panel: #15171a; --panel-2: #1a1d21; --line: #262a30; --line-2: #343941;
  --text: #e7e4dc; --mute: #8d9199; --faint: #5d6169;
  --gold: #c8a85a; --gold-soft: rgba(200, 168, 90, .14); --gold-dim: #8f7a40;
  --pos: #5bc48a; --neg: #dc6a5f; --warn: #d9a441; --info: #7aa2d6;
  --radius: 6px; --font: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, system-ui, -apple-system, sans-serif;
  --serif: 'Noto Naskh Arabic', 'Amiri', 'Traditional Arabic', serif;
  --gutter: clamp(16px, 4vw, 40px); --max: 1180px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.75 var(--font); min-height: 100vh; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.4; letter-spacing: 0; }
p { margin: 0 0 1em; }
.serif { font-family: var(--serif); font-weight: 500; letter-spacing: 0; }
.mute { color: var(--mute); } .faint { color: var(--faint); } .small { font-size: .875rem; } .xs { font-size: .78rem; }
.pos { color: var(--pos); } .neg { color: var(--neg); } .gold { color: var(--gold); }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.row { display: flex; gap: 12px; align-items: center; } .row.wrap-r { flex-wrap: wrap; } .between { justify-content: space-between; } .grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 16px; } .stack-s > * + * { margin-top: 8px; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* buttons & forms */
.btn { font: 600 .95rem/1 var(--font); display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--radius); border: 1px solid var(--line-2); background: transparent; color: var(--text); cursor: pointer; transition: background .15s, border-color .15s; text-decoration: none; }
.btn:hover { background: var(--panel-2); text-decoration: none; border-color: var(--mute); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: #17140a; }
.btn.primary:hover { background: #d6b868; border-color: #d6b868; }
.btn.danger { color: var(--neg); border-color: rgba(220, 106, 95, .4); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: .85rem; } .btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
label { display: block; font-size: .85rem; color: var(--mute); margin-bottom: 6px; }
input, select, textarea { width: 100%; min-height: 44px; padding: 10px 12px; background: var(--bg); color: var(--text); border: 1px solid var(--line-2); border-radius: var(--radius); font: inherit; }
input[type=checkbox] { width: 18px; min-height: 18px; height: 18px; accent-color: var(--gold); flex: none; }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--mute); } .check label { margin: 0; color: inherit; }
.field + .field { margin-top: 14px; }

/* top bar */
.bar { position: sticky; top: 0; z-index: 20; background: rgba(14, 15, 17, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 16px; }
.brand { font: 600 1.15rem var(--font); color: var(--text); letter-spacing: 0; display: inline-flex; align-items: center; gap: 10px; }
.brand:hover { text-decoration: none; }
.mark { width: 22px; height: 22px; border: 2px solid var(--gold); border-radius: 50%; position: relative; flex: none; }
.mark::after { content: ''; position: absolute; inset-inline-start: 50%; top: 50%; width: 8px; height: 2px; background: var(--gold); transform: translate(-30%, -50%) rotate(-35deg); transform-origin: left; } [dir=rtl] .mark::after { transform: translate(30%, -50%) rotate(35deg); transform-origin: right; }
.nav { display: flex; gap: 20px; align-items: center; } .nav a { color: var(--mute); font-size: .92rem; } .nav a:hover { color: var(--text); text-decoration: none; }
@media (max-width: 760px) { .nav .hide-m { display: none; } }

/* panels */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-h { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-b { padding: 18px; }
.panel h3 { font-size: 1rem; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 99px; font-size: .75rem; font-weight: 600; border: 1px solid var(--line-2); color: var(--mute); white-space: nowrap; }
.chip.live { color: var(--pos); border-color: rgba(91, 196, 138, .45); } .chip.live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--pos); }
.chip.gold { color: var(--gold); border-color: var(--gold-dim); } .chip.neg { color: var(--neg); border-color: rgba(220, 106, 95, .45); }
.chip.pos { color: var(--pos); border-color: rgba(91, 196, 138, .45); } .chip.warn { color: var(--warn); border-color: rgba(217, 164, 65, .45); }
.notice { border: 1px solid var(--line-2); border-inline-start: 3px solid var(--warn); background: var(--panel); padding: 12px 16px; border-radius: var(--radius); font-size: .9rem; }
.notice.demo { border-inline-start-color: var(--info); } .notice.bad { border-inline-start-color: var(--neg); } .notice.good { border-inline-start-color: var(--pos); }
.empty { padding: 36px 18px; text-align: center; color: var(--mute); }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--panel-2); border: 1px solid var(--line-2); padding: 12px 18px; border-radius: var(--radius); z-index: 50; max-width: calc(100vw - 32px); box-shadow: 0 8px 30px rgba(0, 0, 0, .5); }
.toast.bad { border-color: var(--neg); }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line-2); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* tables */
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; } .tbl th { text-align: start; color: var(--mute); font-weight: 500; font-size: .8rem; padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; } .tbl tr:last-child td { border-bottom: 0; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-size: .92rem; } .kv dt { color: var(--mute); } .kv dd { margin: 0; }

/* probability ledger */
.ledger > * + * { margin-top: 14px; }
.lrow .top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; font-size: .92rem; }
.lrow .pct { font-weight: 600; font-size: 1.05rem; }
.track { position: relative; height: 10px; background: var(--panel-2); border-radius: 2px; }
.track .fill { position: absolute; inset-block: 0; inset-inline-start: 0; width: var(--w, 0%); background: var(--gold); border-radius: 2px; }
.track .tick { position: absolute; top: -4px; bottom: -4px; inset-inline-start: var(--w, 0%); width: 2px; background: var(--text); }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: .8rem; color: var(--mute); margin-top: 12px; }
.legend i { display: inline-block; vertical-align: middle; margin-inline-end: 6px; } .legend .a { width: 14px; height: 8px; background: var(--gold); } .legend .b { width: 2px; height: 14px; background: var(--text); }

/* match list */
.match { display: grid; grid-template-columns: 92px 1fr auto; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.match:last-child { border-bottom: 0; }
.match .time { font-weight: 600; font-size: 1.05rem; white-space: nowrap; } .match .time small { display: block; font-weight: 400; color: var(--mute); font-size: .75rem; }
.match .teams { font-weight: 600; min-width: 0; } .match .teams span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .match .meta { color: var(--mute); font-size: .82rem; margin-top: 3px; }
.match .score { font-weight: 700; margin-inline: 10px; }
.match .acts { display: flex; gap: 8px; align-items: center; }
.star { background: none; border: 0; color: var(--faint); font-size: 1.35rem; cursor: pointer; min-width: 36px; min-height: 36px; } .star.on { color: var(--gold); }
.comp-head { padding: 8px 18px; background: var(--panel-2); border-bottom: 1px solid var(--line); font-size: .8rem; color: var(--mute); font-weight: 600; }
@media (max-width: 600px) { .match { grid-template-columns: 80px 1fr; } .match .acts { grid-column: 1 / -1; justify-content: flex-end; } }

/* dashboard layout */
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; } .tabs::-webkit-scrollbar { display: none; }
.tab { padding: 14px 16px; color: var(--mute); font-weight: 600; font-size: .92rem; border-bottom: 2px solid transparent; white-space: nowrap; background: none; border-top: 0; border-left: 0; border-right: 0; cursor: pointer; font-family: inherit; }
.tab:hover { color: var(--text); text-decoration: none; } .tab[aria-current=page], .tab.on { color: var(--gold); border-bottom-color: var(--gold); }
.page { padding-top: 28px; padding-bottom: 80px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; } .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.stat { padding: 16px 18px; } .stat .n { font-size: 1.9rem; font-weight: 600; letter-spacing: 0; line-height: 1.1; } .stat .l { color: var(--mute); font-size: .85rem; margin-top: 4px; }
.filters { display: grid; grid-template-columns: 170px 1fr 1fr; gap: 12px; } @media (max-width: 700px) { .filters { grid-template-columns: 1fr; } }
.verdict { font-family: var(--serif); font-size: 1.35rem; line-height: 1.4; }
.section-t { font-size: .8rem; color: var(--gold); font-weight: 600; margin-bottom: 10px; }
ul.plain { margin: 0; padding-inline-start: 1.1em; } ul.plain li + li { margin-top: 6px; }
details.fold summary { cursor: pointer; font-weight: 600; padding: 12px 0; } pre.data { background: var(--bg); border: 1px solid var(--line); padding: 14px; border-radius: var(--radius); overflow: auto; max-height: 420px; font-size: .78rem; }
footer.site { border-top: 1px solid var(--line); padding: 36px 0 60px; color: var(--mute); font-size: .85rem; }

/* RTL: keep numerals, times, emails and codes left-to-right inside Arabic text */
.ltr, input[type=email], input[type=password], pre.data, .pct, .time { direction: ltr; unicode-bidi: plaintext; }
input[type=email], input[type=password] { text-align: end; }
.pct, .time { unicode-bidi: isolate; }
.hero h1 { line-height: 1.35; }
