/* ═══════════════════════════════════════════════════════════════════════════
 * del.css — Delbet design system
 *
 * Written with **logical properties** throughout (margin-inline, padding-inline,
 * inset-inline, text-align: start/end). That is deliberate: this one sheet
 * serves both the RTL Persian edition and the LTR English one, and the browser
 * mirrors it from `dir` alone. There is no flipped second copy to keep in sync,
 * and no physical left/right to get backwards.
 *
 * Palette measured off the reference skin rather than guessed: the page sits
 * on a near-black that is warm of true black, the panels step up twice, and
 * the single accent is a saturated green used for every affirmative control.
 *
 *   #0c0c0e  page            #17181c  panel
 *   #23242a  card            #2e3038  line
 *   #00a63d  accent          #008a33  accent, pressed
 *   #db9101  amber, used once, on the age badge
 *   #74788d  muted text      rgba(255,255,255,.88) body text
 *
 * Corners are tighter than the blue sibling (10px against 14px) and the type
 * is a notch smaller: two cheap levers that stop two dark sites built from one
 * script reading as the same site.
 * ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --db-bg: #0c0c0e;
  --db-bg-2: #121318;
  --db-panel: #17181c;
  --db-card: #23242a;
  --db-line: #2e3038;
  --db-line-2: #3a3d47;
  --db-accent: #00a63d;
  --db-accent-2: #22c75a;
  --db-green: #00a63d;
  --db-amber: #db9101;
  --db-txt: rgba(255, 255, 255, .88);
  --db-txt-2: #a7abbd;
  --db-txt-3: #74788d;
  --db-rail: 56px;
  --db-wrap: 1240px;
  --db-r: 10px;
  --db-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Noto Sans", "Noto Sans Arabic", sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--db-bg);
  color: var(--db-txt);
  font-family: var(--db-font);
  font-size: 15px;
  line-height: 1.75;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--db-accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.35; margin: 0 0 .5em; }

/* ── accessibility ───────────────────────────────────────────────────────── */
/* Parked off the top rather than off to the side. Moving it sideways with a
   large negative inline offset is the classic recipe, but it widens the page
   in one of the two directions — which is exactly the kind of bug that only
   shows up after mirroring an RTL layout to LTR. */
.db-skip {
  position: absolute; inset-inline-start: 12px; top: -64px; z-index: 300;
  background: var(--db-accent); color: #fff; padding: 10px 18px;
  border-radius: 0 0 10px 10px; transition: top .15s ease;
}
.db-skip:focus { top: 0; }
@media (prefers-reduced-motion: reduce) { .db-skip { transition: none; } }
.db-sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
:focus-visible { outline: 2px solid var(--db-accent-2); outline-offset: 2px; }

/* ── layout shell ────────────────────────────────────────────────────────── */
.db-wrap { max-width: var(--db-wrap); margin-inline: auto; padding-inline: 16px; }
.db-body { padding-inline-end: var(--db-rail); }
@media (max-width: 860px) { .db-body { padding-inline-end: 0; } }

/* ── header ──────────────────────────────────────────────────────────────── */
.db-hdr {
  position: sticky; top: 0; z-index: 90;
  background: rgba(12, 12, 14, .94);
  backdrop-filter: blur(8px);
  border-block-end: 1px solid var(--db-line);
}
.db-hdr__in {
  display: flex; align-items: center; gap: 14px;
  height: 58px; max-width: var(--db-wrap); margin-inline: auto; padding-inline: 16px;
}
.db-logo { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.db-logo__t {
  font-size: 20px; font-weight: 800; letter-spacing: .5px; color: #fff;
}
.db-logo__t em { color: var(--db-accent); font-style: normal; }
.db-nav { display: flex; align-items: center; gap: 2px; margin-inline-start: 10px; flex: 1 1 auto; }
.db-nav a {
  color: var(--db-txt-2); padding: 8px 12px; border-radius: 9px;
  font-size: 14px; white-space: nowrap;
}
.db-nav a:hover { background: var(--db-card); color: #fff; text-decoration: none; }
.db-hdr__cta { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.db-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 16px; border-radius: 10px; font-weight: 700; font-size: 14px;
  border: 1px solid var(--db-line-2); color: var(--db-txt); background: var(--db-card);
  cursor: pointer; white-space: nowrap;
}
.db-btn:hover { border-color: var(--db-accent); text-decoration: none; }
.db-btn--go { background: var(--db-accent); border-color: var(--db-accent); color: #fff; }
.db-btn--go:hover { background: var(--db-accent-2); border-color: var(--db-accent-2); }
.db-lang {
  font-size: 12px; font-weight: 700; color: var(--db-txt-3);
  border: 1px solid var(--db-line-2); border-radius: 8px; padding: 5px 9px;
}
.db-burger {
  display: none; width: 40px; height: 36px; border-radius: 9px;
  border: 1px solid var(--db-line-2); background: var(--db-card); cursor: pointer;
}
.db-burger i, .db-burger i::before, .db-burger i::after {
  display: block; width: 16px; height: 2px; background: var(--db-txt);
  margin-inline: auto; position: relative;
}
.db-burger i::before { content: ""; position: absolute; top: -5px; }
.db-burger i::after { content: ""; position: absolute; top: 5px; }

@media (max-width: 1000px) {
  .db-nav { display: none; }
  .db-burger { display: block; }
}

/* The header row is the one place where the English labels are materially
   longer than the Persian ones, and at 375px the logo + chip + two pills +
   burger simply do not fit — the row stops shrinking and widens the document
   instead. Below 760px the language chip and the secondary pill drop; the
   primary call to action and the burger are enough, and both of the dropped
   links are in the drawer underneath. */
@media (max-width: 760px) {
  .db-hdr__in { gap: 10px; }
  .db-hdr__cta .db-lang,
  .db-hdr__cta .db-btn:not(.db-btn--go) { display: none; }
}
@media (max-width: 420px) {
  .db-logo__t { font-size: 18px; }
  .db-hdr__cta .db-btn--go { padding: 9px 12px; }
}

/* mobile drawer */
.db-drawer {
  display: none; border-block-end: 1px solid var(--db-line); background: var(--db-panel);
}
.db-drawer.is-open { display: block; }
.db-drawer a {
  display: block; padding: 12px 18px; color: var(--db-txt);
  border-block-end: 1px solid var(--db-line);
}

/* ── right icon rail ─────────────────────────────────────────────────────── */
.db-rail {
  position: fixed; inset-block: 58px 0; inset-inline-end: 0; width: var(--db-rail);
  background: var(--db-panel); border-inline-start: 1px solid var(--db-line);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding-block: 12px; z-index: 80;
}
.db-rail a {
  display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 10px; color: var(--db-txt-2);
}
.db-rail a:hover { background: var(--db-card); color: #fff; }
.db-rail svg { width: 20px; height: 20px; fill: currentColor; }
@media (max-width: 860px) { .db-rail { display: none; } }

/* ── hero ────────────────────────────────────────────────────────────────── */
.db-hero {
  position: relative; overflow: hidden; border-radius: var(--db-r);
  margin-block: 18px; min-height: 260px;
  /* The reference leads with a dark green bloom rather than a photo. Reproduced
     as a gradient so it costs no request and cannot fail to load. */
  background:
    radial-gradient(105% 150% at 50% 0%, #0d3d22 0%, #0f1a14 48%, #0c0c0e 100%);
  border: 1px solid var(--db-line);
  display: grid; place-items: center; text-align: center; padding: 42px 20px;
}
.db-hero__k {
  color: var(--db-accent-2); font-size: 13px; font-weight: 800;
  letter-spacing: 3px; margin: 0 0 10px;
}
.db-hero__h { font-size: clamp(25px, 4.2vw, 40px); font-weight: 800; color: #fff; margin: 0 0 10px; }
.db-hero__s { color: var(--db-txt-2); margin: 0 0 20px; }

/* ── panels ──────────────────────────────────────────────────────────────── */
/* `align-items: start` rather than the grid default: the two panels hold
   different amounts of copy, and stretching the short one to match the tall
   one leaves an obvious block of dead space under its tiles. */
.db-row2 { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; align-items: start; }
@media (max-width: 860px) { .db-row2 { grid-template-columns: 1fr; } }

.db-panel {
  background: var(--db-panel); border: 1px solid var(--db-line);
  border-radius: var(--db-r); padding: 20px;
}
.db-panel__h { font-size: 19px; font-weight: 800; color: #fff; margin: 0 0 6px; }
.db-panel__s { color: var(--db-txt-2); margin: 0 0 16px; }

.db-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 520px) { .db-tiles { grid-template-columns: repeat(2, 1fr); } }
.db-tile {
  display: grid; place-items: center; gap: 8px; text-align: center;
  padding: 16px 8px; border-radius: 12px;
  background: var(--db-card); border: 1px solid var(--db-line);
  color: var(--db-txt); font-size: 13px; font-weight: 600;
}
.db-tile:hover { border-color: var(--db-accent); text-decoration: none; }
.db-tile svg { width: 26px; height: 26px; fill: var(--db-accent-2); }

/* ── sections ────────────────────────────────────────────────────────────── */
.db-sec { margin-block: 30px; }
.db-sec__h {
  font-size: 20px; font-weight: 800; color: #fff; margin: 0 0 4px;
  display: flex; align-items: center; gap: 10px;
}
.db-sec__h::before {
  content: ""; width: 4px; height: 20px; border-radius: 3px;
  background: var(--db-accent); flex: 0 0 auto;
}
.db-sec__s { color: var(--db-txt-2); margin: 0 0 14px; }

/* ── game grid + cards ───────────────────────────────────────────────────── */
.db-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
.db-gcard {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--db-card); border: 1px solid var(--db-line);
  border-radius: 12px; color: var(--db-txt); text-decoration: none;
  transition: border-color .18s ease, transform .18s ease;
}
.db-gcard:hover { border-color: var(--db-accent); transform: translateY(-3px); text-decoration: none; }
.db-gcard__img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; background: var(--db-bg-2); }
.db-gcard__b { padding: 12px 13px 14px; display: flex; flex-direction: column; gap: 5px; }
.db-gcard__t { font-size: 15px; font-weight: 700; color: #fff; }
.db-gcard__d { font-size: 12.5px; line-height: 1.6; color: var(--db-txt-3); }
.db-gcard__cta { font-size: 12.5px; font-weight: 700; color: var(--db-accent-2); margin-top: 2px; }

/* ── link grids ──────────────────────────────────────────────────────────── */
.db-links { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.db-links a {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 16px; border-radius: 12px; color: var(--db-txt); font-weight: 600;
  background: var(--db-panel); border: 1px solid var(--db-line);
}
.db-links a:hover { border-color: var(--db-accent); text-decoration: none; }
.db-links span { font-size: 12.5px; font-weight: 400; color: var(--db-txt-3); }

/* ── search ──────────────────────────────────────────────────────────────── */
.db-find { display: flex; align-items: center; gap: 10px; margin-block: 16px; }
.db-find input {
  flex: 1 1 auto; min-width: 0;
  background: var(--db-panel); border: 1px solid var(--db-line-2);
  border-radius: 11px; padding: 11px 14px; color: var(--db-txt);
  font-family: inherit; font-size: 14px;
}
.db-find input::placeholder { color: var(--db-txt-3); }
.db-find__n { font-size: 13px; color: var(--db-txt-3); white-space: nowrap; }

/* ── prose ───────────────────────────────────────────────────────────────── */
.db-prose { color: var(--db-txt-2); }
.db-prose p { margin: 0 0 1em; }
.db-prose h2 { font-size: 18px; color: #fff; margin: 1.4em 0 .5em; }
.db-prose ul, .db-prose ol { margin: 0 0 1em; padding-inline-start: 1.3em; }
.db-prose li { margin-bottom: .45em; }
.db-prose b { color: var(--db-txt); }

.db-h1 { font-size: clamp(23px, 3.4vw, 32px); font-weight: 800; color: #fff; margin: 0 0 10px; }
.db-lead { color: var(--db-txt-2); font-size: 16px; margin: 0 0 18px; }

.db-note {
  background: var(--db-panel); border: 1px solid var(--db-line);
  border-inline-start: 3px solid var(--db-accent);
  border-radius: 10px; padding: 14px 16px; margin-block: 16px; color: var(--db-txt-2);
}
.db-warn {
  background: #1a1410; border: 1px solid #4a3418;
  border-inline-start: 3px solid #d08a1e;
  border-radius: 10px; padding: 14px 16px; margin-block: 16px; color: #e8d9c0;
}

/* ── spec table ──────────────────────────────────────────────────────────── */
.db-specs { display: grid; gap: 0; margin: 0; }
.db-specs > div {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 11px 0; border-block-end: 1px solid var(--db-line);
}
.db-specs dt { color: var(--db-txt-3); font-size: 13.5px; margin: 0; }
.db-specs dd { color: var(--db-txt); font-size: 13.5px; margin: 0; text-align: end; font-weight: 600; }

/* ── breadcrumb ──────────────────────────────────────────────────────────── */
.db-crumb { margin-block: 14px 8px; font-size: 13px; color: var(--db-txt-3); }
.db-crumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.db-crumb li + li::before { content: "›"; margin-inline-end: 6px; color: var(--db-txt-3); }

/* ── game stage ──────────────────────────────────────────────────────────── */
.db-stagewrap { margin-block: 18px; }
.db-stagebar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--db-panel); border: 1px solid var(--db-line);
  border-radius: var(--db-r) var(--db-r) 0 0; border-block-end: 0; padding: 10px 14px;
}
.db-stagebar__tag {
  font-size: 12.5px; font-weight: 700; color: var(--db-green);
  background: rgba(23, 178, 106, .1); border: 1px solid rgba(23, 178, 106, .3);
  border-radius: 999px; padding: 4px 11px;
}
.db-stagebar__sp { flex: 1 1 auto; }
.db-stagebar button, .db-stagebar a {
  font-size: 13px; font-weight: 600; color: var(--db-txt);
  background: var(--db-card); border: 1px solid var(--db-line-2);
  border-radius: 9px; padding: 6px 12px; cursor: pointer; font-family: inherit;
}
.db-stagebar button:hover, .db-stagebar a:hover { border-color: var(--db-accent); text-decoration: none; }

#db-stage {
  position: relative; background: var(--db-panel);
  border: 1px solid var(--db-line); border-radius: 0 0 var(--db-r) var(--db-r);
  overflow: hidden;
}
.db-stageload {
  position: absolute; inset: 0; display: grid; place-content: center;
  gap: 12px; justify-items: center; background: var(--db-panel); z-index: 5;
  color: var(--db-txt-2);
}
.db-stageload__ring {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--db-line-2); border-top-color: var(--db-accent);
  animation: db-spin .9s linear infinite;
}
@keyframes db-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .db-stageload__ring { animation: none; } }
#db-stage[data-ready="1"] .db-stageload { display: none; }
.db-stageload__err { color: #ff8e8e; font-weight: 700; }

/* ── FAQ ─────────────────────────────────────────────────────────────────── */
.db-faq__list { display: grid; gap: 8px; }
.db-faq__item {
  background: var(--db-panel); border: 1px solid var(--db-line); border-radius: 11px;
}
.db-faq__item summary {
  cursor: pointer; padding: 13px 16px; font-weight: 600; color: var(--db-txt);
  list-style: none;
}
.db-faq__item summary::-webkit-details-marker { display: none; }
.db-faq__item summary::after { content: "+"; float: inline-end; color: var(--db-txt-3); }
.db-faq__item[open] summary::after { content: "−"; }
.db-faq__a { padding: 0 16px 14px; color: var(--db-txt-2); }
.db-faq__a p { margin: 0; }

/* ── steps ───────────────────────────────────────────────────────────────── */
.db-steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 10px; }
.db-steps li {
  counter-increment: s; position: relative;
  padding: 14px 16px; padding-inline-start: 56px;
  background: var(--db-panel); border: 1px solid var(--db-line); border-radius: 12px;
}
.db-steps li::before {
  content: counter(s); position: absolute; inset-inline-start: 16px; top: 13px;
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  background: var(--db-accent); color: #fff; font-weight: 800; font-size: 13px;
}
.db-steps b { display: block; color: #fff; }
.db-steps span { color: var(--db-txt-3); font-size: 13.5px; }

/* ── footer ──────────────────────────────────────────────────────────────── */
.db-foot {
  margin-top: 40px; background: var(--db-panel);
  border-block-start: 1px solid var(--db-line); padding-block: 32px 22px;
}
.db-foot__grid {
  display: grid; gap: 22px; grid-template-columns: repeat(4, 1fr);
  max-width: var(--db-wrap); margin-inline: auto; padding-inline: 16px;
}
@media (max-width: 760px) { .db-foot__grid { grid-template-columns: repeat(2, 1fr); } }
.db-foot__h { font-size: 14px; font-weight: 700; color: #fff; margin: 0 0 10px; }
.db-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.db-foot a { color: var(--db-txt-3); font-size: 13.5px; }
.db-foot a:hover { color: var(--db-txt); }
.db-foot__bot {
  max-width: var(--db-wrap); margin-inline: auto; padding: 22px 16px 0;
  margin-top: 22px; border-block-start: 1px solid var(--db-line);
  display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap;
  color: var(--db-txt-3); font-size: 12.5px;
}
.db-foot__bot p { margin: 0; flex: 1 1 320px; }

/* ═══════════════════════════════════════════════════════════════════════════
 * Delbet-specific components
 *
 * These four exist because the reference layout leads with them, and they are
 * what stops this reading as a recoloured copy of the blue sibling: a search
 * field living in the header rather than on the hub page, a chip row that
 * filters in place, a two-pane split, and a results board.
 * ═══════════════════════════════════════════════════════════════════════════ */

/* ── search, in the header ───────────────────────────────────────────────── */
.db-search { flex: 1 1 260px; min-width: 0; position: relative; display: flex; }
.db-search input {
  width: 100%; min-width: 0;
  background: var(--db-card); border: 1px solid var(--db-line);
  color: var(--db-txt); font: inherit; font-size: 14px;
  border-radius: 999px; padding: 9px 38px 9px 16px;
}
.db-search input::placeholder { color: var(--db-txt-3); }
.db-search input:focus { border-color: var(--db-accent); outline: none; }
.db-search__i {
  position: absolute; inset-inline-end: 12px; top: 50%; translate: 0 -50%;
  width: 16px; height: 16px; fill: var(--db-txt-3); pointer-events: none;
}
/* Below the drawer breakpoint the field would squeeze the logo off the row,
   so it moves into the drawer instead of shrinking to nothing. */
@media (max-width: 1000px) { .db-hdr .db-search { display: none; } }
.db-drawer .db-search { display: flex; padding: 12px 18px; }
.db-drawer .db-search input { border-radius: 999px; }

/* ── filter chips ───────────────────────────────────────────────────────── */
.db-chips {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  margin-block: 0 16px;
}
.db-chip {
  border: 1px solid var(--db-line); background: var(--db-panel);
  color: var(--db-txt-2); border-radius: 999px; padding: 7px 15px;
  font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.db-chip:hover { color: #fff; border-color: var(--db-line-2); text-decoration: none; }
.db-chip[aria-pressed="true"],
.db-chip.is-on {
  background: var(--db-accent); border-color: var(--db-accent); color: #fff;
}

/* ── two-pane split ─────────────────────────────────────────────────────── */
.db-split {
  display: grid; gap: 14px; grid-template-columns: 1.25fr 1fr; align-items: stretch;
}
@media (max-width: 900px) { .db-split { grid-template-columns: 1fr; } }
.db-split__art {
  position: relative; overflow: hidden; border-radius: var(--db-r);
  border: 1px solid var(--db-line); min-height: 220px;
  background: radial-gradient(90% 120% at 50% 35%, #0f5c2e 0%, #0c2a19 55%, #0c0c0e 100%);
  display: grid; place-items: center; text-align: center; padding: 28px 22px;
}
.db-split__art h3 { color: #fff; font-size: 20px; margin: 0 0 8px; }
.db-split__art p { color: var(--db-txt-2); margin: 0 0 16px; }

/* ── results board ──────────────────────────────────────────────────────── */
.db-board {
  background: var(--db-panel); border: 1px solid var(--db-line);
  border-radius: var(--db-r); overflow: hidden;
}
/* A table that is allowed to scroll must be focusable, or a keyboard user can
   never reach the columns that are off-screen. */
.db-board__scroll { overflow-x: auto; }
.db-board table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 420px; }
.db-board th, .db-board td {
  padding: 11px 14px; text-align: start; border-block-end: 1px solid var(--db-line);
  white-space: nowrap;
}
.db-board th {
  background: var(--db-card); color: var(--db-txt-3);
  font-size: 12px; font-weight: 700; letter-spacing: .3px;
}
.db-board tbody tr:last-child td { border-block-end: 0; }
.db-board td b { color: #fff; font-weight: 700; }
.db-pill {
  display: inline-block; background: rgba(0, 166, 61, .16); color: #4ade80;
  border: 1px solid rgba(0, 166, 61, .4);
  border-radius: 999px; padding: 3px 11px; font-size: 12px; font-weight: 700;
}

/* ── age badge ──────────────────────────────────────────────────────────── */
.db-age {
  display: inline-grid; place-items: center; width: 42px; height: 42px;
  border-radius: 50%; border: 2px solid var(--db-amber); color: var(--db-amber);
  font-weight: 800; font-size: 13px; flex: 0 0 auto;
}
