/* מתורגם - shared styles. RTL first, dark theme by default, light theme on request. */

:root {
  --bg: #0c0e13;
  --bg-glow: #1a1206;
  --surface: #141821;
  --surface-2: #1b2130;
  --border: rgba(255, 255, 255, 0.09);
  --text: #eef1f6;
  --muted: #a9b2c3;
  --accent: #ff7a1a;
  --accent-strong: #ff9a4a;
  --accent-ink: #1a0d03;
  --accent-soft: rgba(255, 122, 26, 0.14);
  --ok: #3ddc97;
  --warn: #ffc857;
  --ring: #ffd08a;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --max: 1160px;
  --font: "Rubik", "Segoe UI", "Arial Hebrew", system-ui, sans-serif;
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff9a4a' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f6f3ee;
  --bg-glow: #ffe2c7;
  --surface: #ffffff;
  --surface-2: #f1ece4;
  --border: rgba(20, 22, 28, 0.1);
  --text: #15171d;
  --muted: #4f5767;
  --accent: #b8440a;
  --accent-strong: #9a3605;
  --accent-ink: #ffffff;
  --accent-soft: rgba(184, 68, 10, 0.1);
  --ok: #0f7a4d;
  --warn: #8a5a00;
  --ring: #b8440a;
  --shadow: 0 18px 40px rgba(60, 40, 20, 0.12);
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239a3605' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* keyboard focus never lands under the sticky header or the accessibility button */
  scroll-padding-top: 88px;
  scroll-padding-bottom: 72px;
}

/* game pages also have the sticky section tabs under the header */
html:has(.page-tabs) {
  scroll-padding-top: 140px;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 85% -10%, var(--bg-glow), transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent-strong);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--text);
}

:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  font-weight: 750;
}

h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

p {
  margin: 0 0 1em;
}

.container {
  width: min(var(--max), 100% - 32px);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  inset-inline-start: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.3rem;
}

.brand svg {
  width: 36px;
  height: 36px;
}

.brand small {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.1;
}

.nav {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 10px;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text);
  background: var(--surface-2);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.icon-button svg {
  width: 20px;
  height: 20px;
}

.menu-toggle {
  display: none;
}

@media (max-width: 760px) {
  .menu-toggle {
    display: inline-grid;
    margin-inline-start: auto;
  }

  .nav {
    position: absolute;
    inset-inline: 16px;
    top: 72px;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: none;
  }

  .nav.open {
    display: flex;
  }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 14px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.btn svg {
  width: 20px;
  height: 20px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #ffb547);
  color: var(--accent-ink);
  box-shadow: 0 10px 30px rgba(255, 122, 26, 0.28);
}

:root[data-theme="light"] .btn-primary {
  background: var(--accent);
}

.btn-primary:hover {
  transform: translateY(-2px);
  color: var(--accent-ink);
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text);
}

.btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: clamp(56px, 10vw, 120px) 0 clamp(48px, 8vw, 96px);
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 48px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 18px;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--accent), #ffcf6b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

:root[data-theme="light"] .hero h1 .highlight {
  background: none;
  color: var(--accent);
}

.lead {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--muted);
  max-width: 34em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-art {
  position: relative;
  aspect-ratio: 1;
  max-width: 420px;
  justify-self: center;
  width: 100%;
}

.hero-art svg {
  width: 100%;
  height: 100%;
}

@media (max-width: 880px) {
  .hero .container {
    grid-template-columns: 1fr;
  }

  .hero-art {
    max-width: 280px;
    order: -1;
  }
}

/* ---------- sections ---------- */

.section {
  padding: clamp(48px, 8vw, 96px) 0;
}

.section-head {
  max-width: 44em;
  margin-bottom: 36px;
}

.section-head p {
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 20px;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}

.step-number {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 800;
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.card p:last-child {
  margin-bottom: 0;
}

.card .muted,
.muted {
  color: var(--muted);
}

/* ---------- game cards ---------- */

.games {
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.game-card:hover,
.game-card:focus-within {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
}

.game-card a.stretched::after {
  content: "";
  position: absolute;
  inset: 0;
}

.cover {
  position: relative;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: end start;
  padding: 18px;
  background:
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.05) 0 2px, transparent 2px 14px),
    var(--cover, linear-gradient(135deg, #ff7a1a, #7a1f0b));
  color: #fff;
}

.cover-title {
  font-weight: 800;
  font-size: 1.35rem;
  line-height: 1.15;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
  direction: ltr;
  text-align: left;
}

.cover-badge {
  position: absolute;
  top: 14px;
  inset-inline-start: 14px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
}

.game-body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.game-body h3 {
  margin: 0;
}

.game-body h3 a {
  color: var(--text);
  text-decoration: none;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.chip.status-testing {
  background: rgba(255, 200, 87, 0.14);
  color: var(--warn);
}

.chip.status-done {
  background: rgba(61, 220, 151, 0.14);
  color: var(--ok);
}

/* on the light theme the tinted chips need darker text to keep 4.5:1 */
:root[data-theme="light"] .chip.status-done {
  color: #0b6640;
}

:root[data-theme="light"] .chip.status-testing {
  color: #6f4700;
}

.progress {
  display: grid;
  gap: 6px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--muted);
}

.progress-track {
  height: 10px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffb547, var(--accent));
}

.card-soon {
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 260px;
  border-style: dashed;
  color: var(--muted);
}

/* ---------- method / languages ---------- */

.method {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 16px;
  align-items: stretch;
}

.lang {
  text-align: center;
  padding: 22px;
}

.lang .flag {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent-strong);
  letter-spacing: 0.04em;
}

.lang.result {
  background: linear-gradient(160deg, var(--accent-soft), var(--surface));
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}

/* ---------- FAQ ---------- */

.faq {
  display: grid;
  gap: 12px;
  max-width: 820px;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 20px;
}

.faq summary {
  cursor: pointer;
  font-weight: 650;
  padding: 14px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

/* Accordion arrow: a chevron in a soft circle that turns over as the answer opens */
.faq summary {
  align-items: center;
}

.faq summary::after {
  content: "";
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--chevron) center / 16px no-repeat, var(--accent-soft);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.2s ease;
}

.faq summary:hover::after {
  background-color: color-mix(in srgb, var(--accent) 24%, transparent);
}

.faq details {
  transition: border-color 0.2s ease;
}

.faq details[open] {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}

.faq details[open] summary::after {
  transform: rotate(180deg);
}

/* The answer slides in; where the browser can animate to height: auto, it also unfolds smoothly */
.faq details[open] > :not(summary) {
  animation: faq-reveal 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes faq-reveal {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@supports (interpolate-size: allow-keywords) {
  :root {
    interpolate-size: allow-keywords;
  }

  .faq details::details-content {
    height: 0;
    overflow: clip;
    transition: height 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), content-visibility 0.35s allow-discrete;
  }

  .faq details[open]::details-content {
    height: auto;
  }
}

.faq details p {
  color: var(--muted);
}

/* ---------- game page ---------- */

.breadcrumb {
  padding: 24px 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.breadcrumb li + li::before {
  content: "‹";
  margin-inline-end: 8px;
}

.game-hero {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 36px;
  align-items: center;
  padding: 28px 0 48px;
}

.game-hero .cover {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

@media (max-width: 880px) {
  .game-hero {
    grid-template-columns: 1fr;
  }
}

.layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  align-items: start;
  padding-bottom: 80px;
}

/* Grid items default to min-width: auto, so a long path would widen the whole column. */
.layout > *,
.game-hero > *,
.grid > *,
.steps > * {
  min-width: 0;
}

.steps {
  grid-template-columns: minmax(0, 1fr);
}

.toc {
  position: sticky;
  top: 92px;
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.toc a {
  display: block;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
}

.toc a:hover {
  background: var(--surface-2);
  color: var(--text);
}

@media (max-width: 880px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
  }

  .toc ol {
    display: flex;
    flex-wrap: wrap;
  }
}

.content > section {
  scroll-margin-top: 92px;
  margin-bottom: 56px;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.checklist li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.checklist li::before {
  content: "";
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 4px;
  border-radius: 7px;
  background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23101010' stroke-width='3'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.checklist li.todo::before {
  background: var(--surface-2);
  border: 2px dashed var(--muted);
}

.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

.steps > li {
  counter-increment: step;
  position: relative;
  padding: 20px 22px;
  padding-inline-start: 76px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  inset-inline-start: 20px;
  top: 18px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
}

.steps h3 {
  margin-bottom: 6px;
}

.steps p {
  margin: 0;
  color: var(--muted);
}

.path {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  direction: ltr;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.92rem;
  overflow-x: auto;
}

.path code {
  flex: 1;
  white-space: nowrap;
}

.copy-btn {
  flex: none;
  font: inherit;
  font-family: var(--font);
  font-size: 0.85rem;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
}

.callout {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  margin: 18px 0;
}

.callout strong {
  display: block;
  margin-bottom: 2px;
}

.callout p {
  margin: 0;
  color: var(--muted);
}

.callout.warn {
  border-color: color-mix(in srgb, var(--warn) 45%, var(--border));
  background: color-mix(in srgb, var(--warn) 8%, var(--surface));
}

.callout.info {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
}

.callout-icon {
  flex: none;
  font-size: 1.3rem;
  line-height: 1.4;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  gap: 12px;
  margin: 22px 0;
}

.stat {
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
}

.stat b {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
}

.stat span {
  color: var(--muted);
  font-size: 0.9rem;
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  border-inline-start: 2px solid var(--border);
}

.timeline li {
  position: relative;
  padding: 0 0 22px 0;
  padding-inline-start: 22px;
}

.timeline li::before {
  content: "";
  position: absolute;
  inset-inline-start: -7px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline time {
  font-weight: 700;
}

/* ---------- prose pages ---------- */

.prose {
  max-width: 760px;
  padding: 40px 0 80px;
}

.prose h2 {
  margin-top: 1.6em;
}

.prose ul {
  padding-inline-start: 1.2em;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 48px;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer .container {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
}

.site-footer nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--text);
}

@media (max-width: 760px) {
  .site-footer .container {
    grid-template-columns: 1fr;
  }
}

/* ---------- motion ---------- */

/* Only hidden when the page script runs (it adds .js to <html>), so no-JS visitors see everything. */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Contact form (about.html) */
.contact-form {
  display: grid;
  gap: 16px;
  max-width: 640px;
  margin: 18px 0 8px;
}

.contact-form .field label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.contact-form textarea {
  resize: vertical;
  min-height: 140px;
}

.contact-form input:focus-visible,
.contact-form select:focus-visible,
.contact-form textarea:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}

.contact-form .hint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.contact-form button {
  justify-self: start;
}

.contact-form .hp {
  position: absolute;
  inset-inline-start: -9999px;
}

.form-status {
  min-height: 1.6em;
  margin: 0;
  color: var(--muted);
}

code.hash {
  word-break: break-all;
  font-size: 0.85rem;
}

/* Advantages of a translation: grid on the game page, chips on the home page cards */
.perks-title {
  margin: 28px 0 12px;
}

.perks {
  list-style: none;
  padding: 0;
  margin: 0 0 26px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: 12px;
}

.perk {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
}

.perk-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.perk-icon svg {
  width: 22px;
  height: 22px;
}

.perk strong {
  display: block;
  margin-bottom: 2px;
}

.perk p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.perks-mini {
  list-style: none;
  padding: 0;
  margin: auto 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.perks-mini li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
}

.perks-mini li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 800;
}

/* A cover with a screenshot from the game. The game's name is right under it (card title,
   page heading), so the picture is shown clean, with only a light shade at the edges. */
.cover.has-image {
  background:
    linear-gradient(to top, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0) 35%),
    var(--cover-image) center / cover no-repeat,
    var(--cover, #1a1206);
}

.cover.has-image .cover-title {
  display: none;
}

/* Screenshot gallery on a game page */
.shots {
  list-style: none;
  padding: 0;
  margin: 16px 0 8px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 12px;
}

.shots a {
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}

.shots img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.shots a:hover img,
.shots a:focus-visible img {
  transform: scale(1.03);
}

@media (prefers-reduced-motion: reduce) {
  .shots img {
    transition: none;
  }
}

/* On a picture, the platform tag goes to the bottom corner so it doesn't cover the game's logo */
.cover.has-image .cover-badge {
  top: auto;
  bottom: 12px;
}

/* "בעברית" badge with the Israeli flag, bottom corner of a game card's cover (the top holds the
   game's logo; the other bottom corner holds the platform tag) */
.cover-flag {
  position: absolute;
  bottom: 12px;
  inset-inline-end: 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px 4px 5px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.2;
}

.cover-flag svg {
  width: 30px;
  height: 22px;
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.7);
}

/* ---------- game page, compact layout ---------- */

.hero-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-note a {
  color: var(--accent-strong);
}

.btn-sm {
  margin-top: 14px;
  padding: 10px 18px;
  font-size: 0.95rem;
}

/* Section tabs that stay under the site header */
.page-tabs {
  position: sticky;
  top: 69px;
  z-index: 40;
  margin-bottom: 40px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.page-tabs .container {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.page-tabs a {
  flex: none;
  padding: 14px 14px 12px;
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.page-tabs a:hover {
  color: var(--text);
}

.page-tabs a[aria-current="true"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.page-body {
  padding-bottom: 48px;
}

.page-body > section {
  scroll-margin-top: 140px;
  margin-bottom: 64px;
}

.page-body .faq {
  max-width: none;
  margin-top: 16px;
}

.page-body .faq details > :last-child {
  margin-bottom: 16px;
}

.section-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
}

.section-row p {
  margin: 0;
}

/* Screenshots as a strip that scrolls sideways */
.shots {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: min(80%, 380px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 2px 14px;
  scrollbar-width: thin;
}

.shots li {
  scroll-snap-align: start;
}

/* Help: known issues and links side by side */
.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 14px;
}

.help-card {
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
}

.help-card h3 {
  margin: 0 0 10px;
}

.help-card .checklist li {
  font-size: 0.95rem;
}

.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.link-list a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.link-list li:last-child a {
  border-bottom: 0;
}

.link-list a::after {
  content: "←";
  color: var(--accent-strong);
  transition: transform 0.2s ease;
}

.link-list a:hover::after {
  transform: translateX(-4px);
}

/* Screenshot viewer */
.lightbox {
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 24px 72px;
  border: 0;
  background: transparent;
  color: #fff;
}

.lightbox[open] {
  display: grid;
  place-items: center;
}

.lightbox::backdrop {
  background: rgba(5, 6, 10, 0.92);
}

.lightbox figure {
  margin: 0;
  display: grid;
  gap: 12px;
  justify-items: center;
}

.lightbox img {
  max-width: 100%;
  max-height: calc(100dvh - 130px);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  animation: lightbox-in 0.25s ease;
}

.lightbox figcaption {
  color: #d7dbe3;
  font-size: 0.95rem;
}

.lightbox-close,
.lightbox-nav {
  position: fixed;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(20, 24, 33, 0.85);
  color: #fff;
  cursor: pointer;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(255, 122, 26, 0.35);
}

.lightbox-close svg,
.lightbox-nav svg {
  width: 22px;
  height: 22px;
}

.lightbox-close {
  top: 16px;
  inset-inline-end: 16px;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev {
  inset-inline-start: 14px;
}

.lightbox-next {
  inset-inline-end: 14px;
}

@keyframes lightbox-in {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 640px) {
  .lightbox {
    padding: 72px 10px;
  }

  .lightbox-nav {
    top: auto;
    bottom: 18px;
    transform: none;
  }
}

/* Grid items default to min-width: auto, so the long folder path inside an answer would widen
   the whole page; let the items shrink and the path scroll inside its own box */
.faq > *,
.faq details > * {
  min-width: 0;
}

.faq .path {
  max-width: 100%;
}

/* a link that leaves the site gets the outward arrow instead */
.link-list a[target="_blank"]::after {
  content: "↗";
}

/* ---------- accessibility menu (assets/js/main.js wireA11y) ---------- */

/* A small see-through round button in the bottom-left corner; it turns solid on hover, focus or while open */
.a11y-toggle {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--text) 25%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 45%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text);
  opacity: 0.75;
  cursor: pointer;
  transition: opacity 0.2s, background-color 0.2s;
}

.a11y-toggle:hover,
.a11y-toggle:focus-visible,
.a11y-toggle[aria-expanded="true"] {
  opacity: 1;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
}

.a11y-toggle svg {
  width: 26px;
  height: 26px;
}

.a11y-toggle:focus-visible,
.a11y-panel :focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}

/* Opens upward from the button */
.a11y-panel {
  position: fixed;
  left: 16px;
  bottom: 72px;
  z-index: 95;
  width: min(330px, calc(100vw - 32px));
  max-height: calc(100dvh - 160px);
  overflow: auto;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.a11y-panel[hidden] {
  display: none;
}

.a11y-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.a11y-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.a11y-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
}

.a11y-close svg {
  width: 18px;
  height: 18px;
}

.a11y-size {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-weight: 600;
}

.a11y-size div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.a11y-size button {
  min-width: 42px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.a11y-size button:disabled {
  opacity: 0.4;
  cursor: default;
}

.a11y-size output {
  min-width: 48px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.a11y-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.a11y-option {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 12px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}

.a11y-option svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.a11y-option[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.a11y-option[aria-pressed="true"] svg {
  color: var(--accent-strong);
}

.a11y-reset {
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.a11y-statement {
  display: block;
  margin-top: 10px;
  text-align: center;
  color: var(--accent-strong);
  font-size: 0.92rem;
}

/* the modes, as classes on <html> */
:root.a11y-text-1 {
  font-size: 115%;
}

:root.a11y-text-2 {
  font-size: 130%;
}

:root.a11y-text-3 {
  font-size: 145%;
}

:root.a11y-contrast,
:root[data-theme="light"].a11y-contrast {
  --bg: #000;
  --bg-glow: #000;
  --surface: #000;
  --surface-2: #111;
  --border: rgba(255, 255, 255, 0.75);
  --text: #fff;
  --muted: #fff;
  --accent: #ffd400;
  --accent-strong: #ffd400;
  --accent-ink: #000;
  --accent-soft: rgba(255, 212, 0, 0.2);
  --ok: #ffd400;
  --warn: #ffd400;
  --ring: #ffd400;
  color-scheme: dark;
}

:root.a11y-contrast a:not(.btn) {
  color: #ffd400;
}

:root.a11y-contrast .a11y-toggle {
  background: #ffd400;
  color: #000;
  border-color: #000;
  opacity: 1;
}

:root.a11y-gray body > :not(.a11y) {
  filter: grayscale(1);
}

:root.a11y-links a {
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
  text-underline-offset: 3px;
}

:root.a11y-links a:not(.btn) {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  border-radius: 3px;
}

:root.a11y-font body,
:root.a11y-font button,
:root.a11y-font input,
:root.a11y-font select,
:root.a11y-font textarea {
  font-family: Arial, "Segoe UI", sans-serif !important;
  letter-spacing: 0.02em;
  word-spacing: 0.1em;
}

:root.a11y-font body {
  line-height: 1.9;
}

:root.a11y-still *,
:root.a11y-still *::before,
:root.a11y-still *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

:root.a11y-still .reveal {
  opacity: 1 !important;
  transform: none !important;
}

:root.a11y-cursor,
:root.a11y-cursor * {
  cursor: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='40'%20height='40'%20viewBox='0%200%2040%2040'%3E%3Cpath%20d='M6%204v30l8-8%206%2012%205-2.5-6-11.5h11z'%20fill='black'%20stroke='white'%20stroke-width='2.5'%20stroke-linejoin='round'/%3E%3C/svg%3E") 6 4, auto !important;
}

/* ---------- donations (assets/js/main.js wireDonate) ---------- */

.site-footer .donate-line a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-strong);
  font-weight: 600;
}

.site-footer .donate-line a:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

.donate-line svg {
  width: 18px;
  height: 18px;
}

/* A quiet box after the install steps, not a banner */
.donate-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin: 8px 0 28px;
  padding: 14px 18px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}

.donate-note[hidden] {
  display: none;
}

.donate-note p {
  flex: 1 1 260px;
  margin: 0;
  color: var(--muted);
}

.donate-note strong {
  color: var(--text);
}
