/* Flux Deals. Flux design system (see flux-site/style.css) with the app's rose as the one accent.
   Signature: each code is a coupon stub with a perforated edge. No external fonts or scripts. */
:root {
  --bg: #F5F5F7; --surface: #FFFFFF; --ink: #1D1D1F; --ink2: #5E5E63;   /* 15.5:1, 5.9:1 on bg */
  --line: #D2D2D7;
  --accent: #C0264A;                                                    /* 5.4:1 on bg, 5.8:1 on white */
  --on-accent: #FFFFFF; --tint: rgba(192, 38, 74, .08); --ok: #1F7A45;  /* ok 5.3:1 on white */
  --radius: 22px;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --arabic: "Segoe UI", "SF Arabic", "Noto Sans Arabic", "Noto Naskh Arabic", Tahoma, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "DejaVu Sans Mono", Menlo, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #000; --surface: #1C1C1E; --ink: #F5F5F7; --ink2: #A1A1A6; --line: #38383A;  /* 19.3:1, 8.2:1 */
          --accent: #FF7A93; --on-accent: #2A0710; --tint: rgba(255, 122, 147, .14); --ok: #4CD787; }  /* 8.5:1, 7.6:1 */
}
@media (prefers-contrast: more) { :root { --ink2: var(--ink); --line: var(--ink2); } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
html[lang="ar"] body { font-family: var(--arabic); line-height: 1.75; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 10px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }
h1, h2, h3, p { margin: 0; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; padding-block: 14px; }
.mark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 19px; min-height: 44px; }
.mark img { width: 30px; height: 30px; }
.lang { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 8px; text-decoration: none; }

/* Hero: one sentence, then search right away */
.hero { padding-block: clamp(20px, 6vw, 56px) 18px; }
.hero h1 { font-size: clamp(32px, 6vw, 52px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 800; margin-bottom: 10px; }
html[lang="ar"] .hero h1 { letter-spacing: 0; line-height: 1.3; }
.hero p { color: var(--ink2); font-size: clamp(17px, 2.2vw, 19px); }

/* Search and scope: the primary control */
.find { position: sticky; top: 0; z-index: 5; padding-block: 10px; background: color-mix(in srgb, var(--bg) 86%, transparent);
        backdrop-filter: saturate(1.6) blur(14px); }
@media (prefers-reduced-transparency: reduce) { .find { background: var(--bg); backdrop-filter: none; } }
.search { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line);
          border-radius: 14px; padding-inline: 14px; min-height: 50px; }
.search svg { width: 20px; height: 20px; flex: none; stroke: var(--ink2); fill: none; stroke-width: 2.2; stroke-linecap: round; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 17px; padding: 12px 0; }
.search input::placeholder { color: var(--ink2); }
.search input:focus { outline: none; }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--tint); }
.scope { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; flex: 1; padding-block: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
        color: var(--ink); font: 500 15px var(--sans); cursor: pointer; }
html[lang="ar"] .chip, html[lang="ar"] .seg button { font-family: var(--arabic); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.seg { flex: none; display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button { min-height: 32px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--ink2);
              font: 600 14px var(--sans); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--tint); color: var(--accent); }

/* Results */
.disclose { font-size: 15px; color: var(--ink2); padding-block: 14px 4px; }
.group h2 { font-size: 15px; font-weight: 600; color: var(--ink2); padding-block: 22px 8px; text-transform: uppercase; letter-spacing: .04em; }
html[lang="ar"] .group h2 { text-transform: none; letter-spacing: 0; font-size: 16px; }
.store { background: var(--surface); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 12px; }
.store-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.store-head .cat { display: block; }
.store h3 { font-size: 20px; letter-spacing: -0.01em; }
.store .cat { font-size: 14px; color: var(--ink2); }
.deal { display: grid; grid-template-columns: 1fr; gap: 10px; align-items: center; padding-block: 12px; border-top: 1px solid var(--line); }
.store-head + .deal { border-top: 0; }
.offer { font-weight: 600; }
.when { font-size: 14px; color: var(--ink2); }
.when .checked { color: var(--ok); }

/* Signature: the coupon stub. Notches on both ends, a perforation before the button. */
.stub { grid-column: 1 / -1; display: flex; align-items: stretch; min-height: 50px; border-radius: 12px; background: var(--tint);
        -webkit-mask: radial-gradient(circle 8px at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat,
                      radial-gradient(circle 8px at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
                mask: radial-gradient(circle 8px at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat,
                      radial-gradient(circle 8px at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat; }
.code { flex: 1; display: flex; align-items: center; padding-inline: 22px; font: 700 18px var(--mono); letter-spacing: .08em;
        color: var(--ink); direction: ltr; user-select: all; overflow-wrap: anywhere; }
html[lang="ar"] .code { justify-content: flex-end; }
.copy { flex: none; min-width: 104px; border: 0; border-inline-start: 2px dashed color-mix(in srgb, var(--accent) 45%, transparent);
        background: transparent; color: var(--accent); font: 700 16px var(--sans); cursor: pointer; padding-inline: 18px 22px; }
html[lang="ar"] .copy { font-family: var(--arabic); }
.copy.done { color: var(--ok); }
.go { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 999px;
      background: var(--accent); color: var(--on-accent); font-weight: 600; text-decoration: none; white-space: nowrap; }
.empty { text-align: center; color: var(--ink2); padding: 48px 16px; }
.empty strong { display: block; color: var(--ink); font-size: 19px; margin-bottom: 4px; }

footer { margin-top: 40px; border-top: 1px solid var(--line); padding-block: 20px 40px; color: var(--ink2); font-size: 15px; }
footer p + p { margin-top: 8px; }

@media (max-width: 560px) {
  .scope { flex-direction: column; align-items: stretch; }
  .seg { align-self: flex-start; }
}
.view-cat .store-head .cat { display: none; }  /* the group title already says it */

/* How it works: four facts as a numbered list (they are a real sequence of promises), quiet cards */
.how { margin-top: 36px; }
.how h2 { font-size: 22px; letter-spacing: -0.01em; margin-bottom: 12px; }
.how ol { list-style: none; margin: 0; padding: 0; counter-reset: h; display: grid; gap: 10px; }
.how li { counter-increment: h; position: relative; background: var(--surface); border-radius: 16px; padding: 16px 18px 16px 58px; color: var(--ink2); }
html[lang="ar"] .how li { padding: 16px 58px 16px 18px; }
.how li::before { content: counter(h); position: absolute; inset-inline-start: 16px; top: 14px; width: 30px; height: 30px; border-radius: 50%;
                  display: grid; place-items: center; font-weight: 700; font-size: 15px; color: var(--accent); background: var(--tint); }
.how strong { color: var(--ink); }
.how .soon { margin-top: 14px; color: var(--ink2); font-size: 15px; }

/* Privacy page */
.doc { padding-block: 24px 48px; max-width: 680px; }
.doc h1 { font-size: clamp(30px, 5vw, 42px); letter-spacing: -0.02em; margin-bottom: 6px; }
html[lang="ar"] .doc h1 { letter-spacing: 0; }
.doc h2 { font-size: 20px; margin: 28px 0 8px; }
.doc p, .doc li { color: var(--ink2); }
.doc p + p { margin-top: 12px; }
.doc ul { padding-inline-start: 22px; margin: 0; }
.doc li { margin-bottom: 6px; }
.doc strong { color: var(--ink); }
.stamp { font-size: 14px; margin-bottom: 18px; }
