/* top.bukhamseengroup.com — redesign 2026-12-02 (Alex spec) */
:root {
  --bg: #FAF7F2; --surface: #FFFDF8; --surface-2: #F2ECE1;
  --ink: #1B2140; --ink-2: #4A4F66; --ink-3: #646878;
  --line: #E8E1D4; --gold: #C99A2E; --gold-ink: #7A5814; --gold-line: #E3CF9F;
  --gold-tint: #FBF1D9; --gold-tint-2: #F6E6BF; --voucher-paper: #F5E9CC;
  --perf: rgb(201 154 46 / .7); --indigo: #23305E;
  --up: #1E7A45; --new: #9E2B25; --trophy-edge: #8A6418;
  --shadow: 0 12px 32px rgb(122 88 20 / .16);
  --shadow-soft: 0 2px 8px rgb(27 33 64 / .08);
  --font: "IBM Plex Sans Arabic", "SF Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
  --font-display: "Noto Kufi Arabic", "IBM Plex Sans Arabic", "SF Arabic", Tahoma, sans-serif;
  --stub: 64px;
}
[data-theme="dark"] {
  --bg: #0F1528; --surface: #18203D; --surface-2: #1F2849;
  --ink: #F3EEE4; --ink-2: #C9C3B6; --ink-3: #A8A3B3;
  --line: #2A3354; --gold: #E3B341; --gold-ink: #E2BC5A; --gold-line: #4A3F22;
  --gold-tint: #2A2415; --gold-tint-2: #221E12; --voucher-paper: #2A2617;
  --perf: rgb(227 179 65 / .55); --indigo: #23305E;
  --up: #5CC48A; --new: #E0756D; --trophy-edge: #3A2C0A;
  --shadow: 0 12px 32px rgb(0 0 0 / .45);
  --shadow-soft: 0 2px 8px rgb(0 0 0 / .35);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] {
    --bg: #0F1528; --surface: #18203D; --surface-2: #1F2849;
    --ink: #F3EEE4; --ink-2: #C9C3B6; --ink-3: #A8A3B3;
    --line: #2A3354; --gold: #E3B341; --gold-ink: #E2BC5A; --gold-line: #4A3F22;
    --gold-tint: #2A2415; --gold-tint-2: #221E12; --voucher-paper: #2A2617;
    --perf: rgb(227 179 65 / .55);
    --up: #5CC48A; --new: #E0756D; --trophy-edge: #3A2C0A;
    --shadow: 0 12px 32px rgb(0 0 0 / .45);
    --shadow-soft: 0 2px 8px rgb(0 0 0 / .35);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--font);
  font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(640px 360px at 50% 120px, color-mix(in srgb, var(--gold) 16%, transparent), transparent 70%);
}
.band { background: var(--indigo); color: #F7F1E3; }
.band-in { max-width: 760px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wordmark { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.toggles { display: flex; gap: 8px; }
.tgl { min-width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px;
  color: #F7F1E3; text-decoration: none; border: 1px solid rgb(247 241 227 / .25); font-size: 14px; font-weight: 600; }

.wrap { max-width: 760px; margin: 0 auto; padding: 40px 16px calc(56px + env(safe-area-inset-bottom)); }
@media (max-width: 899px) { .band-in { padding-block: 8px; } .wrap { padding-top: 16px; } }
@media (min-width: 600px) { .wrap { padding-inline: 24px; padding-top: 48px; } }

.hero { text-align: center; }
.title { font-family: var(--font-display); font-weight: 700; font-size: 26px; line-height: 1.23; margin: 0; text-wrap: balance; }
@media (min-width: 600px) { .title { font-size: 44px; line-height: 52px; } }
.meta-line { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; margin: 12px 0 0; }
@media (max-width: 899px) { .meta-line { margin-top: 8px; } }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: 14px; font-weight: 600; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); }
.pill.state-live { color: var(--up); border-color: color-mix(in srgb, var(--up) 40%, var(--line)); }
.pill.state-closing { color: var(--gold-ink); border-color: var(--gold-line); }
.pill.state-results { background: var(--indigo); color: #F7F1E3; border-color: var(--indigo); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill.state-live .live-dot { animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.week { color: var(--ink-2); font-size: 15px; }
.strip { display: inline-flex; align-items: center; gap: 10px; margin-top: 16px; min-height: 48px; white-space: nowrap;
  padding: 0 16px; border-radius: 999px; background: var(--surface-2); }
.strip .cap { font-size: 13px; color: var(--ink-2); }
.strip .cd { font-family: var(--font-display); font-weight: 700; font-size: 24px; font-variant-numeric: tabular-nums; }
.strip.ended { font-size: 15px; color: var(--ink-2); }
@media (max-width: 899px) {
  .strip { min-height: 40px; }
  .strip .cd { font-size: 17px; }
  .strip .cap { font-size: 12px; }
}
.prize-rule { margin: 12px 0 0; font-size: 15px; font-weight: 700; color: var(--gold-ink); }
@media (max-width: 899px) { .strip { margin-top: 12px; } .prize-rule { margin-top: 10px; } .title { font-size: 24px; line-height: 30px; } }
@media (min-width: 600px) { .prize-rule { font-size: 18px; } }
.body-note { margin: 10px 0 0; color: var(--ink-2); font-size: 15px; }
.banner { margin: 12px auto 0; max-width: 560px; padding: 10px 12px; border-radius: 12px;
  background: color-mix(in srgb, var(--gold) 12%, var(--surface)); color: var(--gold-ink); font-size: 14px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- winners: podium + tickets ---------- */
.winners { list-style: none; margin: 32px 0 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1.2fr 1fr; column-gap: 16px; row-gap: 10px; align-items: end; }
.winners > li { position: relative; min-width: 0; }
.winners > li:nth-child(1) { grid-column: 2; grid-row: 1; }
.winners > li:nth-child(2) { grid-column: 1; grid-row: 1; }
.winners > li:nth-child(3) { grid-column: 3; grid-row: 1; }
.winners > li:nth-child(n+4) { grid-column: 1 / -1; }
.winners > li:nth-child(4) { margin-top: 22px; }
@media (max-width: 899px) {
  .winners { grid-template-columns: 1fr 1fr; column-gap: 12px; row-gap: 12px; align-items: stretch; margin-top: 12px; }
  .winners > li:nth-child(1) { grid-column: 1 / -1; grid-row: 1; }
  .winners > li:nth-child(2) { grid-column: 1; grid-row: 2; }
  .winners > li:nth-child(3) { grid-column: 2; grid-row: 2; }
  .winners > li:nth-child(4) { margin-top: 20px; }
}

/* ticket shell */
.ticket { position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-soft); overflow: visible; }
.tier-podium .ticket { display: flex; flex-direction: column; min-height: 236px; padding-bottom: var(--stub); }
.tier-podium:first-child .ticket { min-height: 280px; border: 1.5px solid var(--gold); background: linear-gradient(180deg, var(--gold-tint-2), var(--gold-tint)); box-shadow: var(--shadow); }
.tier-podium:first-child .body { padding-top: 40px; }
.tier-podium .body { flex: 1; display: grid; place-content: center; gap: 4px; text-align: center; padding: 16px; }
.tier-podium .name { font-size: 20px; font-weight: 700; line-height: 26px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tier-podium:first-child .name { font-size: 26px; line-height: 32px; }
@media (max-width: 899px) {
  .tier-podium .ticket { min-height: 176px; padding-bottom: 48px; }
  .tier-podium:first-child .ticket { min-height: 160px; }
  .tier-podium:first-child .body { padding-top: 32px; }
  .tier-podium .name { font-size: 17px; line-height: 22px; }
  .tier-podium:first-child .name { font-size: 22px; line-height: 28px; }
  :root { --stub: 48px; }
}

/* mark: trophy / medal / numeral */
.mark { display: flex; justify-content: center; }
.tier-podium .mark { position: absolute; inset-inline: 0; top: 12px; z-index: 2; }
.tier-podium .medal { width: 40px; height: 40px; }
.trophy { position: absolute; inset-inline: 0; margin-inline: auto; top: -28px; width: 56px; height: 60px; overflow: visible; }
@media (max-width: 899px) { .trophy { top: -22px; width: 44px; height: 48px; } }
.caption { margin: 0; text-align: center; font-size: 12px; font-weight: 600; color: var(--gold-ink);
  position: absolute; inset-inline: 0; top: 40px; z-index: 2; }
.winners > li:nth-child(n+2) .caption { display: none; }
@media (max-width: 899px) { .caption { top: 34px; font-size: 11px; } }

.medal { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 14px; }
.medal.silver { background: linear-gradient(145deg, #E3E7ED, #B7BFCB 55%, #9AA3B1); color: #1B2140; }
.medal.bronze { background: linear-gradient(145deg, #E8B183, #C07C4C 55%, #A8643A); color: #FFFDF8; }
.tier-ticket .mark, .tier-chase .mark { align-items: center; }
.tier-ticket .num { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--gold-ink); }
.tier-chase .num { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--ink-3); }

/* body text */
.winners > li.tier-ticket { display: flex; align-items: stretch; gap: 12px; }
.tier-ticket .mark { width: 36px; flex: none; }
.tier-ticket .ticket { flex: 1; display: flex; align-items: stretch; min-height: 76px; padding-inline-end: 132px; }
.tier-ticket .body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 2px;
  padding: 12px 16px; min-width: 0; }
.tier-ticket .name { font-size: 19px; font-weight: 700; line-height: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 899px) {
  .tier-ticket .ticket { min-height: 68px; padding-inline-end: 96px; }
  .tier-ticket .name { font-size: 17px; line-height: 22px; }
}
.meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); min-height: 0; }
.tier-podium .meta { justify-content: center; }
.mv.up { color: var(--up); }
.mv.down { color: var(--ink-3); }
.tag { color: var(--new); }

/* ---------- the voucher ---------- */
.voucher { position: relative; overflow: hidden; background: var(--voucher-paper); color: var(--gold-ink);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 0 0 12px 12px; }
.tier-podium .voucher { position: absolute; inset-inline: 0; bottom: 0; height: var(--stub);
  border-top: 0; }
.tier-podium .voucher::before { content: ""; position: absolute; inset-inline: 16px; top: 0; height: 2px;
  background: repeating-linear-gradient(90deg, var(--perf) 0 4px, transparent 4px 8px); }
.tier-podium .ticket::before, .tier-podium .ticket::after { content: ""; position: absolute;
  width: 16px; height: 16px; border-radius: 50%; background: var(--bg); z-index: 3;
  bottom: calc(var(--stub) - 8px); }
.tier-podium .ticket::before { inset-inline-start: -8px; }
.tier-podium .ticket::after { inset-inline-end: -8px; }

.tier-ticket .voucher { position: absolute; inset-block: 0; inset-inline-end: 0; width: 132px;
  flex-direction: column; gap: 0; border-radius: 12px 0 0 12px; }
.tier-ticket .voucher::before { content: ""; position: absolute; inset-block: 16px; inset-inline-start: 0;
  width: 2px; background: repeating-linear-gradient(180deg, var(--perf) 0 4px, transparent 4px 8px); }
.tier-ticket .ticket::before, .tier-ticket .ticket::after { content: ""; position: absolute;
  width: 14px; height: 14px; border-radius: 50%; background: var(--bg); z-index: 3;
  inset-inline-end: calc(132px - 7px); }
.tier-ticket .ticket::before { top: -7px; }
.tier-ticket .ticket::after { bottom: -7px; }
@media (max-width: 899px) {
  .tier-ticket .voucher { width: 96px; }
  .tier-ticket .ticket::before, .tier-ticket .ticket::after { inset-inline-end: calc(96px - 7px); }
}

.voucher .vlabel { font-size: 12px; font-weight: 600; letter-spacing: .02em; }
.tier-podium .voucher .vlabel { position: absolute; inset-inline-start: 16px; }
.voucher .amount { font-family: var(--font-display); font-weight: 700; font-size: 24px; line-height: 1; }
.tier-podium .voucher .amount { font-size: 30px; }
.tier-podium:first-child .voucher .amount { font-size: 30px; }
.voucher .unit { font-size: 12px; font-weight: 600; }
.tier-podium .voucher .unit { font-size: 14px; }
.voucher .serial { position: absolute; inset-inline-end: 12px; font-size: 12px; font-weight: 500; color: var(--ink-3); }
.tier-ticket .voucher .serial { inset-inline: 0; bottom: 7px; text-align: center; font-size: 13px; }
.tier-ticket .voucher .vlabel { margin-bottom: 2px; font-size: 13px; }
.tier-ticket .voucher .amount { font-size: 22px; }
.tier-ticket .voucher .unit { font-size: 11px; }
@media (max-width: 899px) {
  .tier-podium .voucher .vlabel { font-size: 12px; }
  .tier-podium:first-child .voucher .amount { font-size: 26px; }
  .tier-podium .voucher .amount { font-size: 20px; }
  .tier-podium:not(:first-child) .voucher .vlabel { display: none; }
  .tier-podium .voucher .serial { font-size: 10px; }
}
/* star watermark */
.voucher .star { position: absolute; inset: 0; margin: auto; width: 30px; height: 30px; opacity: .16; pointer-events: none; }
.voucher .star::before, .voucher .star::after { content: ""; position: absolute; inset: 0; border: 1px solid currentColor; }
.voucher .star::after { transform: rotate(45deg); }
/* results */
.winners > li.won .voucher { background: linear-gradient(180deg, #D8AE48, #C99A2E); color: #23305E; }
.winners > li.won .voucher .serial { color: #23305E; opacity: .75; }
[data-theme="dark"] .winners > li.won .voucher { color: #0F1528; }
@media (prefers-color-scheme: dark) { [data-theme="system"] .winners > li.won .voucher { color: #0F1528; } }
/* open placeholders */
.winners > li.open .voucher.ghost { opacity: .35; }
.winners > li.open .name { color: var(--ink-3); font-weight: 600; }

/* ---------- chase list ---------- */
.chase-label { margin: 48px 0 12px; text-align: center; font-size: 14px; font-weight: 600; color: var(--ink-2); }
@media (max-width: 899px) { .chase-label { margin-top: 40px; } }
.chasers { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px;
  background: transparent; }
.chasers > li { display: flex; align-items: center; gap: 12px; height: 60px; padding-inline: 16px;
  border-bottom: 1px solid var(--line); }
.chasers > li:last-child { border-bottom: 0; }
.chasers .mark { width: 28px; flex: none; }
.chasers .ticket { flex: 1; min-width: 0; background: transparent; border: 0; box-shadow: none; border-radius: 0; }
.chasers .body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.chasers .name { font-size: 17px; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 899px) {
  .chasers > li { height: 56px; }
  .chasers .name { font-size: 16px; }
}

.updated { margin: 24px 0 0; text-align: center; font-size: 12px; color: var(--ink-3); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* redesign v2: rank integrated inside ticket rows, brighter silver */
.winners > li.tier-ticket { display: flex; align-items: stretch; gap: 0; position: relative;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-soft); }
.tier-ticket .mark { width: 48px; padding-inline-start: 10px; flex: none; display: flex; align-items: center; justify-content: center; }
.tier-ticket .ticket { border: 0; box-shadow: none; background: transparent; border-radius: 0; }
.tier-ticket .ticket::before, .tier-ticket .ticket::after { display: none; }
.winners > li.tier-ticket::before, .winners > li.tier-ticket::after { content: ""; position: absolute;
  width: 14px; height: 14px; border-radius: 50%; background: var(--bg); z-index: 3;
  inset-inline-end: calc(132px - 7px); }
.winners > li.tier-ticket::before { top: -7px; }
.winners > li.tier-ticket::after { bottom: -7px; }
@media (max-width: 899px) {
  .winners > li.tier-ticket::before, .winners > li.tier-ticket::after { inset-inline-end: calc(96px - 7px); }
  .tier-ticket .mark { width: 40px; padding-inline-start: 8px; }
}
.medal.silver { background: linear-gradient(145deg, #F1F4F8, #C9D0DA 55%, #AAB2BE);
  color: #141A2E; box-shadow: inset 0 0 0 1px rgb(20 26 46 / .12); }

/* voucher legibility fix: amount row wrapper, serial clear of the watermark */
.voucher .amt { display: inline-flex; align-items: baseline; gap: 4px; position: relative; z-index: 1; }
.voucher .star { z-index: 0; opacity: .10; width: 26px; height: 26px; }
.tier-podium .voucher .star { top: -6px; }
.tier-ticket .voucher { display: flex; flex-direction: column; justify-content: center; gap: 0;
  padding-bottom: 10px; }
.tier-ticket .voucher .vlabel { margin-bottom: 0; line-height: 16px; }
.tier-ticket .voucher .amt { line-height: 1; }
.tier-ticket .voucher .serial { position: static; margin-top: 3px; text-align: center; line-height: 14px; }
.tier-ticket .voucher .star { display: none; }

/* mobile-first pass (<=599): single column, compact hero, stacked podium, chip vouchers */
@media (max-width: 899px) {
  .wrap { padding-top: 12px; }
  .title { font-size: 20px; line-height: 26px; }
  .meta-line { margin-top: 6px; gap: 8px; }
  .week { font-size: 13px; }
  .pill { font-size: 12px; padding: 2px 8px; }
  .strip { margin-top: 8px; min-height: 0; padding: 0; background: none; gap: 6px; }
  .strip .cap { font-size: 12px; }
  .strip .cd { font-size: 13px; font-family: var(--font); font-weight: 600; }
  .prize-rule { font-size: 12px; margin-top: 6px; }
  .winners { display: block; margin-top: 14px; }
  .winners > li { display: block; margin: 0 0 8px !important; }
  .winners > li.tier-ticket::before, .winners > li.tier-ticket::after,
  .tier-podium .ticket::before, .tier-podium .ticket::after { display: none; }

  /* first place */
  .winners > li:nth-child(1) .ticket { min-height: 0; padding-bottom: 52px; }
  .winners > li:nth-child(1) .body { padding: 34px 14px 12px; gap: 2px; }
  .winners > li:nth-child(1) .name { font-size: 19px; line-height: 24px; }
  .winners > li:nth-child(1) .meta { font-size: 11px; justify-content: center; }
  .trophy { width: 38px; height: 41px; top: -19px; }
  .caption { top: 28px; font-size: 10px; }

  /* 2nd to 6th: full-width rows, rank inside, compact chip */
  .winners > li:nth-child(n+2) { display: flex; align-items: stretch; }
  .winners > li:nth-child(n+2) .ticket { flex: 1; display: flex; align-items: center; min-height: 64px;
    padding: 0; padding-inline-end: 74px; }
  .winners > li:nth-child(n+2) .mark { position: static; width: 44px; display: flex; align-items: center; justify-content: center; }
  .winners > li:nth-child(n+2) .body { padding: 8px; text-align: start; align-content: center; }
  .winners > li:nth-child(n+2) .name { font-size: 16px; line-height: 20px; -webkit-line-clamp: 1; }
  .winners > li:nth-child(n+2) .meta { justify-content: flex-start; font-size: 10px; gap: 6px; flex-wrap: nowrap; overflow: hidden; white-space: nowrap; }
  .winners > li:nth-child(n+2) .medal { width: 26px; height: 26px; font-size: 12px; }
  .winners > li:nth-child(n+2) .num { font-size: 16px; }

  /* compact side chip for 2-6 */
  .winners > li:nth-child(n+2) .voucher { position: absolute; inset-block: 0; inset-inline-end: 0;
    inset-inline-start: auto; width: 74px; height: 100%; padding: 0; flex-direction: column;
    justify-content: center; gap: 0; border-radius: 0 0 0 12px; }
  .winners > li:nth-child(n+2) .voucher::before { content: ""; position: absolute; inset-block: 10px;
    inset-inline-start: 0; top: 10px; bottom: 10px; width: 1px; height: auto;
    background: repeating-linear-gradient(180deg, var(--perf) 0 3px, transparent 3px 6px); }
  .winners > li:nth-child(1) .voucher { position: absolute; inset-inline: 0; bottom: 0; height: 52px;
    width: auto; flex-direction: row; gap: 6px; border-radius: 0 0 12px 12px; }
  .winners > li:nth-child(1) .voucher::before { inset-inline: 14px; top: 0; height: 2px; width: auto;
    bottom: auto; background: repeating-linear-gradient(90deg, var(--perf) 0 4px, transparent 4px 8px); }
  .winners > li:nth-child(1) .voucher .vlabel { display: block; position: static; font-size: 12px; }
  .winners > li:nth-child(n+2) .voucher .vlabel { display: none; }
  .winners > li:nth-child(1) .voucher .amount { font-size: 22px; }
  .winners > li:nth-child(n+2) .voucher .amount { font-size: 17px; }
  .winners > li:nth-child(1) .voucher .unit { font-size: 12px; }
  .voucher .unit { font-size: 9px; }
  .winners > li:nth-child(n+2) .voucher .serial { position: static; font-size: 9px; margin-top: 1px; text-align: center; }
  .winners > li:nth-child(1) .voucher .serial { position: static; font-size: 11px; margin-inline-start: 6px; }
  .winners > li:nth-child(n+2) .voucher .star { display: block; width: 22px; height: 22px; top: 6px; opacity: .08; }

  /* chase */
  .chase-label { margin: 20px 0 8px; font-size: 12px; }
  .chasers > li { height: 52px; }
  .chasers .name { font-size: 15px; }
}

/* mobile polish: readable secondary text */
@media (max-width: 899px) {
  .winners > li:nth-child(n+2) .meta { font-size: 11px; }
  .winners > li:nth-child(n+2) .voucher .serial { font-size: 10px; }
  .winners > li:nth-child(n+2) .voucher .star { display: none; }
  .chasers .meta { font-size: 11px; }
}

/* tablet band 600-899: same mobile layout, narrower measure */
@media (min-width: 600px) and (max-width: 899px) {
  .hero, .winners, .chasers, .chase-label, .updated { max-width: 560px; margin-inline: auto; }
  .winners { margin-top: 16px; }
}
