/* Guide pages: the website's look (tokens.css + ui.css), set for reading. */
:root { --line: rgba(255, 255, 255, 0.13); --gut-l: max(16px, env(safe-area-inset-left, 0px)); --gut-r: max(16px, env(safe-area-inset-right, 0px)); }
body { background-color: var(--backdrop); background-image: linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px); background-size: 56px 56px; }
.g-top { position: sticky; top: 0; z-index: 10; background: #050506; border-bottom: 1px solid var(--line); }
.g-top-in { max-width: 1040px; margin: 0 auto; height: 60px; padding-left: var(--gut-l); padding-right: var(--gut-r); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.g-top img { width: 136px; height: auto; display: block; }
.g-main { max-width: 760px; margin: 0 auto; padding: 48px var(--gut-r) 40px var(--gut-l); }
.crumb { color: var(--soft); font-weight: 700; font-size: 14px; }
.crumb a { color: var(--soft); text-decoration: underline; text-underline-offset: 3px; }
.g-main h1 { font-size: clamp(40px, 7vw, 68px); line-height: 0.95; letter-spacing: -0.032em; margin: 14px 0 18px; text-wrap: balance; }
.g-lede { font-size: 19px; line-height: 1.5; color: var(--soft); }
.g-main h2 { font-size: 26px; letter-spacing: -0.01em; margin: 40px 0 10px; }
.g-main p, .g-main li { font-size: 17px; line-height: 1.6; color: rgb(214, 216, 222); }
.g-main p + p { margin-top: 12px; }
.g-main ul, .g-main ol { padding-left: 22px; margin: 10px 0 0; display: flex; flex-direction: column; gap: 8px; }
.g-main b { color: #fff; }
.g-main .note { margin-top: 36px; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--hairline); color: var(--soft); font-size: 14.5px; }
.g-cta { margin-top: 44px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.g-more { margin-top: 40px; border-top: 1px solid var(--line); padding-top: 22px; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.g-more a { color: var(--soft); font-weight: 900; }
.g-more a:hover { color: #fff; }
.g-foot { max-width: 760px; margin: 0 auto; padding: 0 var(--gut-r) calc(40px + env(safe-area-inset-bottom, 0px)) var(--gut-l); color: var(--faint); font-size: 13px; }

/* touch: every link a full thumb tall (layout check, 16 Nov) */
@media (max-width: 760px) {
  .g-more { gap: 0 22px; }
  .g-more a, .crumb a, .g-top a { display: inline-flex; align-items: center; min-height: 40px; }
  .g-more a { min-width: 40px; justify-content: center; }   /* short labels like "TV" still get a full thumb */
}

/* positions drawn by the game's own board painter (web/tools/board-shots.mjs) */
.g-fig { margin: 20px 0 8px; }
.g-fig img { display: block; width: 100%; max-width: 420px; height: auto; aspect-ratio: 1; border-radius: 18px; }
.g-fig figcaption { margin-top: 12px; max-width: 520px; color: var(--soft); font-size: 14.5px; line-height: 1.55; }
.g-fig figcaption a { color: #fff; font-weight: 900; text-decoration: underline; text-underline-offset: 3px; display: inline-block; margin-top: 4px; }
@media (max-width: 760px) { .g-fig figcaption a { min-height: 40px; display: inline-flex; align-items: center; } }

/* the rank badges row and simple tables (ranking guide) */
.g-main .g-ranks { list-style: none; padding: 0; margin: 26px 0 8px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 8px; }
.g-ranks li { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.g-ranks img { width: 56px; height: 56px; display: block; }
.g-ranks span { color: var(--soft); font-size: 13px; font-weight: 900; }
@media (min-width: 640px) { .g-main .g-ranks { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
.wrap-x { overflow-x: auto; }
.g-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.g-table th, .g-table td { text-align: left; padding: 11px 10px; border-top: 1px solid var(--line); font-size: 16px; color: rgb(214, 216, 222); }
.g-table th { color: #fff; font-weight: 900; }

/* landing pages: a call to action under the intro, and the live top 10 on /leaderboard/ */
.g-cta-top { margin-top: 22px; }
.g-live { margin: 22px 0 6px; padding: 8px 4px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.g-live-note { color: var(--soft); font-size: 15px; }
.g-main .g-lb { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0; }
.g-lb li { display: grid; grid-template-columns: 30px 28px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; min-height: 44px; border-top: 1px solid var(--line); }
.g-lb li:first-child { border-top: 0; }
.g-lb-rank { color: var(--soft); font-weight: 900; text-align: right; }
.g-lb a { color: #fff; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-lb-label { color: var(--soft); font-size: 13px; font-weight: 700; }
.g-lb b { font-variant-numeric: tabular-nums; }
@media (max-width: 420px) { .g-lb-label { display: none; } .g-lb li { grid-template-columns: 26px 28px minmax(0, 1fr) auto; } }

/* the language switcher the release adds to every page's footer (web/tools/i18n.mjs) */
.langs { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 14px; }
.langs a { color: var(--faint); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; min-height: 32px; }
.langs a:hover, .langs a[aria-current] { color: #fff; }
/* right-to-left (Arabic): lists indent from the right */
[dir="rtl"] .g-main ul, [dir="rtl"] .g-main ol { padding-left: 0; padding-right: 22px; }
[dir="rtl"] .g-table th, [dir="rtl"] .g-table td { text-align: right; }
/* long single words (German "Datenschutzerklärung") break with a hyphen instead of running off a phone screen */
.g-main h1, .g-main h2 { hyphens: auto; overflow-wrap: break-word; }
.langs a { min-width: 32px; justify-content: center; }

/* ad slots on reading pages (only in an --ads release, filled by web/js/site-ads.js): the height is reserved from the
   first paint, so an ad arriving never moves the text */
.ad-slot { display: block; min-height: 300px; margin: 32px 0; padding: 32px 0 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); position: relative; }
.ad-slot .ad-k { position: absolute; top: 9px; inset-inline-start: 0; color: var(--faint); font-size: 11px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.ad-slot .ad-remove { position: absolute; top: 2px; inset-inline-end: 0; display: inline-flex; align-items: center; min-height: 28px; padding-inline-start: 12px; color: var(--soft); font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.ad-slot .ad-remove:hover { color: var(--white); }
/* call-to-action pills may wrap onto two lines on the narrowest phones (long words in Russian, Polish, German) rather than push the page sideways */
.g-cta .btn, .g-cta .ghost { max-width: 100%; white-space: normal; text-align: center; padding-top: 10px; padding-bottom: 10px; line-height: 1.25; }
/* a paragraph straight after a list gets the same breathing room as one after a paragraph */
.g-main ul + p, .g-main ol + p { margin-top: 14px; }
/* text after a table gets the same breathing room as after a paragraph */
.g-main .wrap-x + p, .g-main table + p { margin-top: 14px; }
