/* Mind Engine site: the redesigned app's colors, type and radii. Light by
   default, dark when the device asks for it. */

@font-face { font-family: Figtree; font-weight: 400; font-display: swap; src: url(/fonts/Figtree-400.ttf); }
@font-face { font-family: Figtree; font-weight: 500; font-display: swap; src: url(/fonts/Figtree-500.ttf); }
@font-face { font-family: Figtree; font-weight: 600; font-display: swap; src: url(/fonts/Figtree-600.ttf); }
@font-face { font-family: Figtree; font-weight: 700; font-display: swap; src: url(/fonts/Figtree-700.ttf); }
@font-face { font-family: Bricolage; font-weight: 600; font-display: swap; src: url(/fonts/BricolageGrotesque-600.ttf); }
@font-face { font-family: Bricolage; font-weight: 800; font-display: swap; src: url(/fonts/BricolageGrotesque-800.ttf); }

:root {
  --bg: #F6F5FA; --s: #FFFFFF; --line: #E4E2EE; --fg: #1E1A3A; --s2: #ECEAF3; --s3: #E1DFEA; --muted: #5E5880;
  --gold: #B87800; --goldSoft: #FAEFD6; --goldText: #8A5A00; --filou: #FFF4D6;
  --hint: #6A4BCF; --hintSoft: #ECE7FB; --success: #23794A; --successSoft: #DDF0E4;
  --flame: #D9621C; --flameSoft: #FCE9DC; --ice: #2B7DB8; --iceSoft: #E1F0FA;
  --danger: #C23B25; --dangerSoft: #FBE3DE; --ink: #1E1A3A; --onInk: #FFFFFF;
  --shadow: rgba(20, 16, 50, 0.10);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111114; --s: #1B1B20; --line: #2E2E36; --fg: #F3F2F7; --s2: #24242B; --s3: #33333C; --muted: #A9A6B8;
    --gold: #F2B13C; --goldSoft: #372C17; --goldText: #F2B13C; --filou: #2E2716;
    --hint: #B79CFF; --hintSoft: #29233F; --success: #5CC98A; --successSoft: #17311F;
    --flame: #FF8A4C; --flameSoft: #3A2416; --ice: #7CC4F0; --iceSoft: #17293A;
    --danger: #FF7A63; --dangerSoft: #3A1F1B; --ink: #F3F2F7; --onInk: #111114;
    --shadow: rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { background: var(--bg); overflow-x: clip; scroll-padding-top: 96px; }
body { margin: 0; color: var(--fg); background: var(--bg); font: 16px/1.55 Figtree, system-ui, -apple-system, "Segoe UI", sans-serif; overflow-x: clip; }
h1, h2, h3 { font-family: Bricolage, Figtree, system-ui, sans-serif; font-weight: 800; margin: 0; letter-spacing: -0.015em; text-wrap: balance; line-height: 1.08; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2.5px solid var(--hint); outline-offset: 2px; border-radius: 6px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
.card { background: var(--s); border: 1.5px solid var(--line); border-radius: 20px; }
.over { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.display { font-family: Bricolage, Figtree, sans-serif; font-weight: 800; }
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.grid { display: grid; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 54px; padding: 0 24px; border-radius: 16px;
       font: 600 16px Figtree, sans-serif; text-decoration: none; white-space: nowrap; border: 2px solid transparent; cursor: pointer;
       background: none; color: var(--fg); transition: transform .1s, filter .15s; }
.btn:active { transform: scale(.98); }
.btn-ink { background: var(--ink); color: var(--onInk); }
.btn-ink:hover { filter: brightness(1.15); }
.btn-out { border-color: var(--line); background: var(--s); }
.btn-out:hover { border-color: var(--fg); }
.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; border-radius: 12px; }
.btn-game { height: 56px; padding: 0 26px; background: var(--gm); color: var(--onGm); box-shadow: 0 4px 0 color-mix(in srgb, var(--gm) 70%, #000); }
.btn svg { flex: none; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px; border-radius: 999px; background: var(--s);
        border: 1.5px solid var(--line); font-size: 14px; font-weight: 600; }
.path { display: inline-block; padding: 1px 8px; border-radius: 8px; background: var(--s2); color: var(--fg); font-weight: 600; font-size: 14px; }
.todo { display: inline-block; padding: 1px 8px; border-radius: 8px; background: var(--goldSoft); color: var(--goldText); font-weight: 600; }
.disc { border-radius: 50%; background: var(--filou); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent);
               backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1.5px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 11px; display: block; }
.brand span { font-family: Bricolage, sans-serif; font-weight: 800; font-size: 20px; letter-spacing: -0.01em; }
.nav { display: flex; gap: 2px; margin-left: 12px; }
.nav a { padding: 8px 14px; border-radius: 12px; text-decoration: none; font-weight: 600; font-size: 15px; color: var(--muted); }
.nav a:hover, .nav a[aria-current] { color: var(--fg); background: var(--s2); }
.header-end { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.langs { position: relative; }
.langs summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px;
                 border: 1.5px solid var(--line); border-radius: 999px; background: var(--s); font: 600 13px Figtree, sans-serif; color: var(--fg); }
.langs summary::-webkit-details-marker { display: none; }
.langs summary svg { color: var(--muted); }
.langs-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 180px; padding: 6px; display: grid; gap: 2px;
              background: var(--s); border: 1.5px solid var(--line); border-radius: 16px; box-shadow: 0 12px 32px var(--shadow); }
.langs.up .langs-menu { top: auto; bottom: calc(100% + 6px); }
.langs-menu a { padding: 8px 12px; border-radius: 10px; text-decoration: none; font-size: 15px; font-weight: 500; }
.langs-menu a:hover { background: var(--s2); }
.langs-menu a[aria-current] { background: var(--ink); color: var(--onInk); font-weight: 600; }
.round { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--s); color: var(--fg);
         display: none; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.menu { display: none; border-top: 1.5px solid var(--line); padding: 12px 16px 20px; flex-direction: column; gap: 4px; }
.menu > a:not(.btn) { padding: 12px 14px; border-radius: 12px; text-decoration: none; font-weight: 600; font-size: 17px; }
.menu > a[aria-current] { background: var(--s2); }
.menu .langs { align-self: flex-start; margin: 8px 0; }
.menu .langs-menu { left: 0; right: auto; }
.site-header.open .menu { display: flex; }

/* Footer */
.site-footer { background: var(--s); border-top: 1.5px solid var(--line); }
.site-footer .wrap { padding-top: 48px; padding-bottom: 32px; display: flex; flex-direction: column; gap: 36px; }
.fgrid { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: 32px; }
.fcol { display: flex; flex-direction: column; gap: 6px; }
.fcol a { display: block; text-decoration: none; font-size: 15px; padding: 4px 0; }
.fcol a:hover { text-decoration: underline; }
.fbottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; border-top: 1.5px solid var(--line); padding-top: 20px; }

/* Shared bits */
.scene { display: block; width: 100%; height: auto; border-radius: 12px; }
.gicon { flex: none; display: block; }
.ico { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex: none; }
.bar { height: 6px; border-radius: 3px; background: var(--s3); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 3px; }
.av { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; display: flex; align-items: flex-end; justify-content: center; flex: none; }
.av img { width: 92%; height: 92%; object-fit: contain; }
.bubble { position: absolute; padding: 14px 18px; border-radius: 22px 22px 22px 6px; max-width: 250px; box-shadow: 0 8px 24px var(--shadow); }
.lift { box-shadow: 0 8px 24px var(--shadow); }
.section-band { background: var(--s); border-top: 1.5px solid var(--line); border-bottom: 1.5px solid var(--line); }
.band-card { background: var(--bg); }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5px; background: var(--line); }
.fact { padding: 22px 24px; background: var(--s); display: flex; flex-direction: column; gap: 2px; }
.hero-disc { position: absolute; inset: 20px 30px 10px 60px; }
.fact b { font-family: Bricolage, sans-serif; font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; }
.game-link { display: flex; align-items: center; gap: 10px; text-decoration: none; border-radius: 10px; }
.game-link:hover span { text-decoration: underline; }

/* Games */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line);
          background: var(--s); font: 600 14px Figtree, sans-serif; color: var(--fg); cursor: pointer; text-decoration: none; }
.filter span { color: var(--muted); font-weight: 500; }
.filter[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: var(--onInk); }
.filter[aria-pressed=true] span { color: var(--onInk); opacity: .7; }
.search { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line);
          background: var(--s); width: 280px; color: var(--muted); }
.search input { border: 0; outline: 0; background: none; font: 15px Figtree, sans-serif; color: var(--fg); flex: 1; min-width: 0; }
.search:focus-within { border-color: var(--fg); }
.search.big { height: 54px; padding: 0 18px; width: 100%; max-width: 560px; }
.search.big input { font-size: 16px; }
.gcard { background: var(--s); border: 1.5px solid var(--line); border-radius: 20px; padding: 10px; display: flex; flex-direction: column; gap: 12px; text-decoration: none; }
.gcard:hover { border-color: var(--fg); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }

/* One game */
.crumb { font-size: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.crumb a { text-decoration: none; color: var(--muted); }
.crumb a:hover { text-decoration: underline; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step b { width: 32px; height: 32px; border-radius: 50%; background: var(--gs); color: var(--gInk); display: flex; align-items: center; justify-content: center; flex: none; }
.lv { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 12px; padding: 14px 20px; align-items: center; }
.lv + .lv { border-top: 1.5px solid var(--line); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 10px; }
.other { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--s); border: 1.5px solid var(--line); text-decoration: none; }
.other:hover { border-color: var(--fg); }
.figure { display: flex; gap: 24px; align-items: center; padding: 20px; border-radius: 16px; background: var(--bg); }
.figure picture { width: 280px; flex: none; }
.figure img { width: 100%; display: block; border-radius: 12px; }

/* Links received */
.copy { height: 40px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--s); color: var(--fg);
        font: 600 14px Figtree, sans-serif; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.gtag { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 12px; background: var(--s2); font-weight: 600; font-size: 14px; }
.gtag img { width: 28px; height: 28px; display: block; }

/* Records */
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--s3); gap: 2px; }
.seg button { border: 0; background: none; height: 36px; padding: 0 18px; border-radius: 999px; font: 600 14px Figtree, sans-serif; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed=true] { background: var(--s); color: var(--fg); box-shadow: 0 1px 3px var(--shadow); }
.rrow { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(5, minmax(0, 1fr)); gap: 4px; align-items: center; padding: 10px 16px; }
.rrow + .rrow { border-top: 1.5px solid var(--line); }
.rrow .v { text-align: center; font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 600; }
.rrow .v.none { color: var(--muted); font-weight: 400; }
.rrow .v.best { color: var(--goldText); }
.rrow .gi { width: 34px; height: 34px; flex: none; }

/* iPhone */
.num { width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--onInk); display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.phone { height: 250px; border-radius: 26px 26px 0 0; border: 1.5px solid var(--line); border-bottom: 0; background: var(--bg); margin: 0 18px; padding: 12px;
         display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.ring { outline: 2.5px solid #FFC83D; outline-offset: 3px; }
.ok { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; }
.qr { width: 148px; height: 148px; display: block; border-radius: 8px; background: #fff; padding: 8px; }

/* Help */
.topic { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--s);
         font: 600 14px Figtree, sans-serif; color: var(--fg); text-decoration: none; cursor: pointer; }
.topic[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: var(--onInk); }
.faq + .faq { border-top: 1.5px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; font-weight: 600; font-size: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { flex: none; color: var(--muted); transition: transform .15s; }
.faq[open] summary svg { transform: rotate(180deg); }
.faq .ans { padding: 0 22px 20px; color: var(--muted); }

/* News */
.ver { font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--s2); font-variant-numeric: tabular-nums; }
.tag { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.entry { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 28px; }
.when { padding-top: 22px; color: var(--muted); font-size: 14px; font-weight: 600; text-align: right; }
.list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

/* Legal pages */
.doc-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; align-items: start; }
.toc { display: flex; flex-direction: column; gap: 2px; padding-top: 8px; position: sticky; top: 100px; }
.toc a { display: block; padding: 7px 12px; border-radius: 10px; text-decoration: none; font-size: 15px; color: var(--muted); }
.toc a:hover, .toc a[aria-current] { color: var(--fg); background: var(--s2); }
.doc { display: flex; flex-direction: column; min-width: 0; }
.doc section { display: flex; flex-direction: column; gap: 12px; padding-top: 36px; }
.doc h2 { font-size: 26px; }
.doc h3 { font-size: 18px; font-weight: 700; padding-top: 6px; font-family: Figtree, sans-serif; letter-spacing: 0; }
.doc p, .doc li { max-width: 68ch; }
.sum { padding: 18px; border-radius: 16px; display: flex; flex-direction: column; gap: 8px; }
.kv { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 10px 20px; padding: 20px 22px; margin: 0; }
.kv dt { color: var(--muted); font-size: 15px; }
.kv dd { margin: 0; font-weight: 600; }
.tw { overflow-x: auto; border: 1.5px solid var(--line); border-radius: 16px; background: var(--s); }
.tw table { border-collapse: collapse; width: 100%; min-width: 480px; font-size: 15px; }
.tw th, .tw td { text-align: left; padding: 12px 16px; border-bottom: 1.5px solid var(--line); }
.tw tr:last-child td { border-bottom: 0; }
.tw th { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--s2); }
.tw td.n { font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .nav, .header-end .langs, .header-end .btn { display: none; }
  .round { display: inline-flex; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .hide-s { display: none !important; }
  .stack-s { flex-direction: column !important; align-items: stretch !important; }
  .g1-s { grid-template-columns: minmax(0, 1fr) !important; }
  .g2-s { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
  .full-s { width: 100% !important; }
  .h1-s { font-size: 40px !important; }
  .h2-s { font-size: 30px !important; }
  .pad-s { padding: 24px !important; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact { padding: 18px 16px; }
  .fact b { font-size: 28px; }
  .hero-art { height: 380px !important; }
  .hero-disc { inset: auto; left: 50%; bottom: 0; transform: translateX(-50%); width: min(330px, 88%); aspect-ratio: 1; }
  .fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fbrand { grid-column: 1 / -1; }
  .gcard .desc { display: none; }
  .filters.scroll-s { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .filters.scroll-s > * { flex: none; }
  .lv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .figure { flex-direction: column; align-items: stretch; }
  .figure picture { width: 100%; }
  .rrow { grid-template-columns: minmax(0, 1.25fr) repeat(5, minmax(0, 1fr)); padding: 9px 10px; gap: 2px; }
  .rrow .v { font-size: 12px; }
  .rrow .gname { font-size: 13px !important; }
  .rrow .gi { width: 26px; height: 26px; }
}
@media (max-width: 420px) {
  .rrow picture { display: none; }
  .entry { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .when { padding-top: 0; text-align: left; }
  .doc-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc { display: none; }
  .doc h2 { font-size: 22px; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .kv dd { margin-bottom: 10px; }
  .faq summary { padding: 16px; }
  .faq .ans { padding: 0 16px 18px; }
}
