/* oops! Industrial Neon (brand v2.1, F:\OOPS\brand). Wall 70%, tube 20% for headlines, red only for the "!"
   moments, blue only for tech (verification). Red and blue never sit side by side as equals. */
@font-face { font-family: 'Baloo Bhaijaan 2'; src: url(fonts/BalooBhaijaan2-ExtraBold.ttf) format('truetype'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans Arabic'; src: url(fonts/IBMPlexSansArabic-Regular.ttf) format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans Arabic'; src: url(fonts/IBMPlexSansArabic-SemiBold.ttf) format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; src: url(fonts/BarlowCondensed-SemiBold.ttf) format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Permanent Marker'; src: url(fonts/PermanentMarker-Regular.ttf) format('truetype'); font-weight: 400; font-display: swap; }

:root {
  --wall: #1C1D1F;
  --steel: #2B2D30;
  --tube: #FFE3A3;
  --red: #FF3B1F;
  --blue: #2F7BFF;
  --concrete: #8A8781;
  --plaster: #DAD7D1;
  --pipe: #0E0F10;
  --line: #3A3C40;
  --r: 6px;
  --head: 'Baloo Bhaijaan 2', 'IBM Plex Sans Arabic', sans-serif;
  --body: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --label: 'Barlow Condensed', 'IBM Plex Sans Arabic', sans-serif;
  --glow: 0 0 2px #fff6dc, 0 0 10px rgba(255, 227, 163, .75), 0 0 28px rgba(255, 196, 92, .45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body { margin: 0; background: var(--wall); color: var(--plaster); font: 400 16px/1.65 var(--body); overflow-x: hidden; }
a { color: var(--tube); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--tube); outline-offset: 3px; border-radius: 2px; }
h1, h2 { line-height: 1.2; margin: 0 0 .4em; color: var(--tube); }
h2 { font: 800 1.35rem var(--head); }
.plain { font: 800 1.7rem var(--head); }
.hint { color: var(--concrete); font-size: .92rem; margin: 0 0 1rem; }
.empty { color: var(--concrete); padding: 1rem 0; }
.label { font: 600 .82rem var(--label); letter-spacing: .14em; text-transform: uppercase; color: var(--concrete); margin: 0; }

/* ---------- co-brand bar: oops! × sponsor, same height ---------- */
.cobrand { display: flex; align-items: center; gap: .7rem; height: 38px; margin-bottom: 1.5rem; }
.cobrand img { height: 38px; width: auto; display: block; }
.cobrand .x { font: 600 1rem var(--label); color: var(--concrete); }
.cobrand .sponsor-name { font: 800 1.35rem/38px var(--head); color: var(--plaster); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- visitor pages ---------- */
.scan { max-width: 30rem; margin: 0 auto; padding: 1.1rem 16px 2rem; }

/* The signature: a steel conduit enters from outside the frame, bends 90° and ends in a junction box
   above the venue name. The name is an unlit tube until the visitor's entry is verified. */
.hero { position: relative; padding-top: 4.3rem; margin-bottom: 1.6rem; }
.conduit { position: absolute; inset: 0; pointer-events: none; }
.conduit .pipe {
  position: absolute; top: .9rem; right: -50vw; width: calc(50vw + 4.6rem); height: 2rem;
  border-top: 9px solid var(--pipe); border-left: 9px solid var(--pipe); border-top-left-radius: 18px;
  filter: drop-shadow(0 -1px 0 #505257) drop-shadow(1px 0 0 #3d3f43) drop-shadow(0 2px 2px rgba(0, 0, 0, .6));
}
.conduit .clamp { position: absolute; top: calc(.9rem - 3px); right: -.4rem; width: 7px; height: 15px; background: #505257; border-radius: 1px; }
.conduit .jbox {
  position: absolute; top: 2.5rem; right: 3.3rem; width: 2.4rem; height: 1.9rem;
  background: linear-gradient(#26282b, var(--pipe)); border: 1px solid #505257; border-radius: 3px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, .6);
}
.conduit .jbox::after {
  content: ''; position: absolute; inset: 50% auto auto 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px;
  border-radius: 50%; background: #3b3a36;
}
.hero h1 {
  font: 800 clamp(2.5rem, 12vw, 3.4rem)/1.05 var(--head); margin: .25rem 0 .35rem;
  color: #6f6c66; /* unlit tube */
  transition: color .2s;
}
.hero .prize-line { margin: 0; color: var(--plaster); font-weight: 600; }
.hero.lit h1 { color: var(--tube); text-shadow: var(--glow); animation: neon-on 1.1s steps(1) both; }
.hero.lit .jbox::after { background: var(--tube); box-shadow: 0 0 8px var(--tube); }
@keyframes neon-on {
  0% { opacity: .35; text-shadow: none; } 12% { opacity: 1; text-shadow: var(--glow); } 20% { opacity: .4; text-shadow: none; }
  32% { opacity: 1; text-shadow: var(--glow); } 40% { opacity: .55; } 48%, 100% { opacity: 1; text-shadow: var(--glow); }
}

.card { background: var(--steel); border-radius: var(--r); padding: 1.25rem; margin-bottom: 1rem; }
.notice.bad { border-inline-start: 4px solid var(--red); }
.notice.good { border-inline-start: 4px solid var(--tube); }

label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .95rem; color: var(--plaster); }
input:not([type="checkbox"]) {
  display: block; width: 100%; margin-top: .35rem; padding: .8rem .9rem;
  font: inherit; font-weight: 600; color: var(--tube); background: var(--wall);
  border: 1px solid var(--line); border-radius: var(--r);
}
input::placeholder { color: #5d5b57; }
input:focus { border-color: var(--tube); outline: none; }
input[type="tel"] { text-align: right; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
.check input { width: 1.15rem; height: 1.15rem; margin-top: .25rem; accent-color: var(--tube); flex: none; }
.check small { color: var(--concrete); }
.otp { font-family: var(--label) !important; font-size: 2.2rem !important; letter-spacing: .45em; text-align: center; }
.code-in { letter-spacing: .2em; }

button {
  display: block; width: 100%; padding: .85rem 1rem; margin-top: .6rem;
  font: 800 1.2rem var(--head); color: var(--wall); background: var(--tube);
  border: 0; border-radius: var(--r); cursor: pointer;
}
button:hover { box-shadow: 0 0 18px rgba(255, 227, 163, .35); }
button:disabled { opacity: .5; cursor: progress; box-shadow: none; }
button.link { display: inline; width: auto; padding: 0; margin: 0; background: none; color: var(--concrete); font: 600 .95rem var(--label); letter-spacing: .1em; text-transform: uppercase; }
.status { min-height: 1.4em; margin: .75rem 0 0; font-weight: 600; color: var(--concrete); }
.status.bad { color: #ff7a66; }

/* Verification is the tech part of the night: blue, and only here. */
.step-tech { display: flex; align-items: center; gap: .5rem; font: 600 .8rem var(--label); letter-spacing: .14em; text-transform: uppercase; color: var(--blue); margin: 0 0 .5rem; }
.step-tech::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 6px var(--blue); }

.result h2 { font-size: 2rem; }
.prize { font-weight: 600; font-size: 1.1rem; margin: 0 0 1rem; color: var(--plaster); }
/* The claim ticket follows the printed oops! ticket: plaster body, a stub, and the red "!" moment. */
.ticket { display: grid; grid-template-columns: 1fr auto; background: var(--plaster); color: var(--wall); border-radius: var(--r); overflow: hidden; }
.ticket-main { padding: 1rem 1.1rem; display: grid; gap: .25rem; }
.ticket .label { color: #5d5a55; }
.ticket .code { font: 600 2.4rem/1 var(--label); letter-spacing: .08em; color: var(--wall); }
.ticket-note { font-size: .85rem; color: #45433f; }
.ticket-stub { width: 3.6rem; background: var(--wall); display: grid; place-items: center; border-inline-start: 2px dashed rgba(218, 215, 209, .7); }
.ticket-stub img { width: 2.6rem; height: auto; }
.places { font-weight: 600; color: var(--tube); }

.fine { display: grid; gap: .5rem; justify-items: center; font-size: .82rem; color: var(--concrete); text-align: center; margin-top: 2rem; }
.tagline { font: 400 1.05rem var(--label); letter-spacing: .02em; color: var(--concrete); }
.tagline b { font: 400 1.15rem 'Permanent Marker', cursive; color: var(--tube); letter-spacing: .02em; }
.doc ul { padding-inline-start: 1.2rem; }
.doc h2 { margin-top: 1.4rem; font-size: 1.15rem; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem; margin: 0 0 1rem; }
.facts dt { color: var(--concrete); }
.facts dd { margin: 0; font-weight: 600; color: var(--tube); }

/* ---------- venue tablet ---------- */
.screen { min-height: 100vh; display: grid; place-content: center; justify-items: center; text-align: center; padding: 24px 16px; gap: .7rem; position: relative; }
.screen .cobrand { margin: 0 0 .5rem; justify-content: center; }
.screen h1 { font: 800 clamp(2.2rem, 6vw, 3.6rem)/1.1 var(--head); margin: 0; text-shadow: var(--glow); }
.screen .qr { background: var(--plaster); padding: 14px; border-radius: var(--r); width: min(70vw, 56vh); aspect-ratio: 1; }
.screen .qr svg { width: 100%; height: 100%; display: block; }
.screen-hint { margin: .2rem 0 0; font-weight: 600; }
.countdown { width: min(70vw, 56vh); height: 4px; background: var(--steel); border-radius: 2px; overflow: hidden; }
.countdown i { display: block; height: 100%; background: var(--blue); transform-origin: right; transition: transform 1s linear; }
.screen .label { color: var(--concrete); }

/* ---------- sponsor dashboard ---------- */
.board { max-width: 72rem; margin: 0 auto; padding: 1.25rem 16px 3rem; }
.board-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.25rem; }
.board-head .cobrand { margin-bottom: .9rem; }
.board-nav { display: flex; flex-wrap: wrap; gap: 1.1rem; align-items: center; font-weight: 600; }
.board-nav form { margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.kpis div { background: var(--steel); border-radius: var(--r); padding: 1rem 1.1rem; }
.kpis b { display: block; font: 600 2.1rem/1.1 var(--label); color: var(--tube); }
.kpis span { color: var(--concrete); font-size: .9rem; }
.kpis .reject b { color: var(--red); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: 1rem; }
.panel { background: var(--steel); border-radius: var(--r); padding: 1.25rem; margin-bottom: 1rem; min-width: 0; }
.panel h2 { font-size: 1.25rem; }
.funnel { list-style: none; margin: 0; padding: 0; }
.funnel li { display: grid; grid-template-columns: 1fr auto 3.5rem; gap: .75rem; align-items: baseline; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.funnel li:last-child { border-bottom: 0; }
.funnel b { font: 600 1.35rem var(--label); color: var(--tube); }
.funnel small { color: var(--concrete); font: 600 .95rem var(--label); text-align: left; }
.bars, .days { width: 100%; height: auto; display: block; }
.bars .bl { font: 400 13px var(--body); fill: var(--plaster); }
.bars .br { fill: var(--concrete); }
.bars .br.top { fill: var(--red); }
.bars .bn { font: 600 14px var(--label); fill: var(--plaster); }
.days .ds, .legend .ds { fill: #46484c; background: #46484c; }
.days .dv, .legend .dv { fill: var(--blue); background: var(--blue); }
.days .dl { font: 600 11px var(--label); fill: var(--concrete); }
.legend { font-size: .85rem; color: var(--concrete); display: flex; gap: .4rem; align-items: center; }
.legend i { display: inline-block; width: .8rem; height: .8rem; border-radius: 2px; margin-inline-start: .6rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: right; padding: .6rem .5rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--concrete); font: 600 .8rem var(--label); letter-spacing: .1em; }
td { font: 600 1.05rem var(--label); }
td:first-child, td:nth-child(2), td:last-child { font: 400 .95rem var(--body); }
td b { color: var(--tube); font-weight: 600; }
td small { color: var(--concrete); }
td.rej { color: var(--red); }
.list { padding-inline-start: 1.2rem; }

/* ---------- printable stickers: flat logo, no glow (brand rule for print) ---------- */
.sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 1rem; }
.print-sticker { margin: 0; background: var(--wall); color: var(--plaster); border: 5px solid var(--plaster); border-radius: 14px; padding: 1rem 1rem .9rem; text-align: center; break-inside: avoid; }
.print-sticker .ps-logo { height: 30px; width: auto; display: block; margin: 0 auto .3rem; }
.ps-call { font: 800 2rem/1.15 var(--head); margin: 0 0 .55rem; color: var(--tube); }
.print-sticker .qr { background: var(--plaster); border-radius: 6px; padding: 6px; }
.print-sticker .qr svg { width: 100%; height: auto; display: block; }
.ps-domain { font: 600 .95rem var(--label); letter-spacing: .08em; margin: .55rem 0 0; color: var(--tube); }
.ps-venue { font-size: .85rem; margin: .1rem 0 0; color: var(--concrete); }
.screen-card { background: var(--steel); border-color: var(--steel); }
.ps-link { font: 600 .9rem var(--label); word-break: break-all; }
@media print {
  .noprint { display: none !important; }
  body { background: #fff; }
  .board { padding: 0; max-width: none; }
  .sheet { grid-template-columns: repeat(3, 1fr); }
  .print-sticker { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.expires, .last4 { white-space: nowrap; unicode-bidi: isolate; }

/* ---------- public demo ---------- */
.demo-bar { border: 1px dashed var(--concrete); border-radius: var(--r); padding: 1rem 1.1rem; margin-bottom: 1rem; }
.demo-bar p { margin: 0 0 .6rem; }
.demo-bar .label { color: var(--tube); }
button.ghost { background: transparent; color: var(--plaster); border: 1px solid var(--line); font-size: 1.05rem; }
button.ghost:hover { box-shadow: none; border-color: var(--concrete); }
.demo-link { display: block; text-align: center; margin-top: 1rem; font-weight: 600; }
.demo-back { text-align: center; margin: 1.5rem 0 0; font-weight: 600; }
.demo-note { border: 1px dashed var(--concrete); border-radius: var(--r); padding: .7rem .9rem; color: var(--concrete); font-size: .9rem; }
.demo-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.demo-list a { display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; align-items: center; background: var(--steel); border-radius: var(--r); padding: .9rem 1rem; text-decoration: none; color: var(--plaster); }
.demo-list a:hover { box-shadow: inset 0 0 0 1px var(--tube); }
.demo-list b { font: 800 1.25rem var(--head); color: var(--tube); }
.demo-list span { color: var(--concrete); font-size: .9rem; grid-column: 1; }
.demo-list i { font-style: normal; font: 600 .8rem var(--label); letter-spacing: .12em; color: var(--concrete); grid-row: 1 / span 2; grid-column: 2; }
.demo h2 { margin-top: 1.8rem; }
.demo .qr-small { width: 9rem; background: var(--plaster); padding: 6px; border-radius: var(--r); }
.demo .qr-small svg { display: block; width: 100%; height: auto; }
.demo .phone-try { display: flex; gap: 1rem; align-items: center; }
