:root {
  color-scheme: dark;
  --bg: #11151b;
  --surface: #1a2028;
  --surface-2: #172635;
  --text: #f3eee4;
  --muted: #a9b6bc;
  --line: #2b4052;
  --accent: #bd4942;
  --accent-strong: #77f2e6;
  --warm: #ffffff;
  --success: #77d58a;
  --radius: 0.75rem;
  --shadow: 0 1rem 2.5rem rgb(0 0 0 / 22%);
  --max-width: 74rem;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: radial-gradient(circle at 80% 0, #173047 0, var(--bg) 34rem); color: var(--text); font-size: 1rem; line-height: 1.7; }
a { color: var(--accent-strong); text-underline-offset: 0.2em; }
a:hover { color: #fff; }
img, svg { max-width: 100%; }
button, input, textarea, select { font: inherit; }
:focus-visible { outline: 3px solid var(--warm); outline-offset: 3px; }
.container { width: min(calc(100% - 2rem), var(--max-width)); margin-inline: auto; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; padding: 0.6rem 1rem; background: #fff; color: #000; }
.skip-link:focus { top: 1rem; }

.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid rgb(255 255 255 / 10%); background: rgb(7 16 24 / 92%); backdrop-filter: blur(12px); }
.nav-row { min-height: 4rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { color: var(--text); font-weight: 800; text-decoration: none; letter-spacing: 0.02em; }
.primary-nav { display: flex; align-items: center; gap: .25rem; font-size: .9rem; }
.primary-nav a { display: flex; align-items: center; min-height: 2.75rem; padding: .5rem .65rem; color: var(--muted); text-decoration: none; font-weight: 700; }
.primary-nav > a[aria-current] { color: var(--accent-strong); box-shadow: inset 0 -2px var(--accent-strong); }
.primary-nav a:hover, .language-switcher summary:hover { color: var(--text); background: var(--surface-2); border-radius: .5rem; }
.primary-nav [data-source-type="official-website"] { font-weight: 400; }
.menu-button { display: none; border: 1px solid var(--line); border-radius: 0.5rem; background: var(--surface); color: var(--text); padding: 0.45rem 0.75rem; }

.hero { padding: clamp(4rem, 9vw, 8rem) 0 4rem; }
.hero--compact { padding: clamp(2.5rem, 6vw, 4.5rem) 0 2.5rem; }
.hero--entry { padding: clamp(1.75rem, 4vw, 3rem) 0 1.5rem; }
.hero--entry h1 { max-width: 22ch; font-size: clamp(2.25rem, 5vw, 4rem); }
.entry-choices { padding-block: 1.5rem; }
.hero--site-home h1 { max-width: 23ch; font-size: clamp(2.25rem, 5vw, 4.1rem); }
.home-overview p { max-width: 48rem; }
.table-scroll { max-width: 100%; overflow-x: auto; scrollbar-color: var(--muted) var(--surface); }
.comparison-table { width: 100%; border-collapse: collapse; font-size: .95rem; line-height: 1.55; }
.comparison-table caption { text-align: left; color: var(--muted); padding-bottom: .75rem; }
.comparison-table th, .comparison-table td { padding: .7rem .8rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.comparison-table thead { background: var(--surface-2); }
.comparison-table th[scope="row"] { font-weight: 600; }
@media (max-width: 600px) { .comparison-table { min-width: 31rem; } }
.task-route { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); padding: 0; list-style: none; }
.task-card, .official-video { padding: 1.25rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--surface); }
.task-card > span { color: var(--accent); font-weight: 700; }
.video-wrap { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: .5rem; background: #000; }
.video-wrap img, .video-wrap iframe { display: block; width: 100%; height: 100%; border: 0; object-fit: cover; }
.video-wrap button { position: absolute; inset: auto 1rem 1rem auto; }
.eyebrow { margin: 0 0 0.75rem; color: var(--accent-strong); font-size: 0.82rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
h1, h2, h3 { line-height: 1.15; text-wrap: balance; }
h1 { max-width: 15ch; margin: 0; font-size: clamp(2.5rem, 7vw, 5.5rem); letter-spacing: -0.04em; }
h2 { margin-top: 0; font-size: clamp(1.65rem, 4vw, 2.5rem); }
.lede { max-width: 44rem; color: var(--muted); font-size: clamp(1.05rem, 2.3vw, 1.3rem); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.button { display: inline-flex; min-height: 2.75rem; align-items: center; justify-content: center; border: 1px solid var(--accent); border-radius: 0.5rem; padding: 0.6rem 1rem; background: var(--accent); color: #031414; font-weight: 800; text-decoration: none; }
.button.secondary { background: transparent; color: var(--accent-strong); }

.section { padding: 4rem 0; }
.section.alt { border-block: 1px solid var(--line); background: rgb(16 28 39 / 72%); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; background: linear-gradient(145deg, var(--surface-2), var(--surface)); box-shadow: var(--shadow); }
.card h2, .card h3 { margin-top: 0; }
.card p { color: var(--muted); }
.tag { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 0.15rem 0.55rem; color: var(--success); font-size: 0.82rem; font-weight: 800; }
.tag.muted { color: var(--muted); }
.breadcrumbs { padding-top: 1.5rem; color: var(--muted); font-size: 0.9rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0; padding: 0; list-style: none; }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 0.45rem; color: #66798b; }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 17rem; gap: 2rem; align-items: start; }
.article-body { min-width: 0; }
.article-body section { scroll-margin-top: 5rem; margin-bottom: 3rem; }
.sidebar { position: sticky; top: 5.5rem; border-left: 1px solid var(--line); padding-left: 1.25rem; }
.sidebar ul { margin: 0; padding-left: 1.1rem; }
.sidebar a[aria-current="location"] { color: var(--warm); font-weight: 800; }
.article-navigation { position: sticky; top: 5.5rem; display: grid; gap: 1rem; max-height: calc(100vh - 7rem); overflow-y: auto; border-left: 1px solid var(--line); padding-left: 1.25rem; }
.article-navigation nav, .mobile-directory nav { display: grid; gap: 0.5rem; }
.article-navigation a[aria-current="location"] { color: var(--warm); font-weight: 800; }
.mobile-directories { display: none; }
.mobile-directory { border: 1px solid var(--line); border-radius: var(--radius); padding: 0.75rem 1rem; background: var(--surface); }
.mobile-directory summary { cursor: pointer; font-weight: 800; }
.article-adjacent { display: flex; justify-content: space-between; }
.callout { border-left: 4px solid var(--warm); border-radius: 0 var(--radius) var(--radius) 0; padding: 1rem 1.25rem; background: var(--surface); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--line); padding: 0.75rem; text-align: left; }
th { color: var(--accent-strong); }
.faq-item { border-bottom: 1px solid var(--line); padding: 0.8rem 0; }
.faq-item summary { cursor: pointer; font-weight: 800; }
.site-footer { border-top: 1px solid var(--line); padding: 2rem 0; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; }

/* Player requests stay quiet, readable, and native to the existing PBZ system. */
.home-request-link { margin: 1rem 0 0; color: var(--muted); }
.request-prompt { margin-top: 2.5rem; border-top: 1px solid var(--line); padding-top: 1.25rem; }
.request-prompt p { margin: 0 0 .5rem; color: var(--muted); }
.request-width { max-width: 48rem; }
.request-hero { padding-bottom: 1rem; }
.request-hero h1 { max-width: 22ch; font-size: clamp(2.25rem, 5vw, 4rem); }
.request-section { padding-top: 1rem; }
.request-form { display: grid; gap: 2rem; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.25rem, 4vw, 2rem); background: var(--surface); box-shadow: var(--shadow); }
.request-form fieldset { min-width: 0; margin: 0; border: 0; padding: 0; }
.request-form legend, .request-form label[for] { display: block; color: var(--text); font-size: 1.125rem; font-weight: 800; }
.optional { color: var(--muted); font-size: .875rem; font-weight: 500; }
.field-hint, .form-privacy { margin: .35rem 0 .75rem; color: var(--muted); font-size: .9375rem; }
.request-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .625rem; }
.request-option { display: flex; min-height: 3rem; align-items: center; gap: .625rem; border: 1px solid var(--line); border-radius: .5rem; padding: .55rem .75rem; cursor: pointer; }
.request-option:hover, .request-option:has(input:checked) { border-color: var(--accent-strong); background: var(--surface-2); }
.request-option input { width: 1.125rem; height: 1.125rem; margin: 0; accent-color: var(--accent-strong); }
.request-form textarea { width: 100%; min-height: 10rem; resize: vertical; border: 1px solid var(--line); border-radius: .5rem; padding: .75rem; background: var(--bg); color: var(--text); }
.request-form textarea[aria-invalid="true"], .request-option input[aria-invalid="true"] { border-color: #ff8d85; }
.field-meta { display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .875rem; }
.field-error { min-height: 1.5em; margin: .35rem 0 0; color: #ffaaa4; font-size: .875rem; }
.turnstile-wrap { min-height: 5rem; }
.form-status { min-height: 1.7em; margin: 0; color: var(--success); font-weight: 700; }
.request-form .button { justify-self: start; min-width: 9rem; }
.request-form .button:disabled { cursor: wait; opacity: .7; }
.qa-notice { border-left: 4px solid var(--accent-strong); padding: .75rem 1rem; background: var(--surface-2); }
@media (max-width: 560px) { .request-options { grid-template-columns: 1fr; } .request-form .button { width: 100%; } }

@media (max-width: 760px) {
  .grid, .article-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; border-left: 0; border-top: 1px solid var(--line); padding: 1rem 0 0; }
  h1 { font-size: clamp(2.3rem, 13vw, 4rem); }
}

@media (max-width: 1120px) {
  .article-navigation { display: none; }
  .mobile-directories { display: grid; gap: 0.75rem; grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Source-backed editorial articles share the existing site theme. */
.article-languages { padding-top: 1rem; font-size: .9rem; }
.article-toc { margin-bottom: 2.5rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.article-toc h2 { font-size: 1.25rem; }
.article-toc ul { margin-bottom: 0; padding-left: 1.25rem; }
.article-toc a, .related-card { overflow-wrap: anywhere; }
.related-card { padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; }
.related-card strong, .related-card small { display: block; }
.related-card small { margin-top: .75rem; color: var(--muted); }
.editor-byline { color: var(--muted); font-size: .9rem; }
.breadcrumbs { display: flex; gap: .5rem; flex-wrap: wrap; }

/* Navigation stays within the established PBZ palette and type system. */
.menu-button, .language-switcher summary { cursor: pointer; }
.menu-button:hover { background: var(--surface-2); }
.menu-button[hidden] { display: none; }
.language-switcher { position: relative; color: var(--muted); }
.language-switcher summary { display: flex; align-items: center; min-height: 2.75rem; gap: .25rem; padding: .5rem .65rem; list-style: none; }
.language-switcher summary::-webkit-details-marker { display: none; }
.language-options { position: absolute; right: 0; top: calc(100% + .5rem); min-width: 10rem; padding: .5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.language-options a[aria-current] { color: var(--accent-strong); }
#guides, #game-info, #behind-the-game, #traditional-chinese { scroll-margin-top: 5rem; }
@media (max-width: 960px) {
  .site-header { position: relative; }
  .nav-row { flex-wrap: wrap; }
  .menu-button:not([hidden]) { display: inline-flex; min-height: 2.75rem; align-items: center; }
  .nav-row:has([data-menu-ready]) { flex-wrap: nowrap; }
  .site-header:has([data-menu-ready]) { position: sticky; }
  .primary-nav { width: 100%; flex-direction: column; align-items: stretch; padding-block: .5rem; }
  .primary-nav[data-menu-ready] { position: absolute; width: auto; inset: 4rem 1rem auto; max-height: calc(100dvh - 5rem); overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem; background: var(--surface); box-shadow: var(--shadow); }
  .primary-nav[data-menu-ready][data-open="false"] { display: none; }
  .primary-nav > a[aria-current] { box-shadow: inset 2px 0 var(--accent-strong); }
  .language-switcher { border-top: 1px solid var(--line); margin-top: .25rem; padding-top: .25rem; }
  .language-options { position: static; min-width: 0; border: 0; box-shadow: none; padding: 0 .5rem; }
}

.primary-nav [data-source-type="official-website"]::after { content: " ↗"; margin-left: .3rem; }

/* Keep the compact Traditional Chinese landing title readable as one content unit. */
.hero--language-landing h1 { max-width: 24ch; font-size: clamp(2rem, 5vw, 3.25rem); }

/* Article contents: use the existing reading column and reserve the right rail. */
.article-toc-sidebar { position: sticky; top: 5.5rem; max-width: 15rem; max-height: calc(100dvh - 7rem); overflow-y: auto; padding: .25rem .5rem .5rem 1rem; border-left: 1px solid var(--line); }
.article-toc-sidebar h2 { font-size: 1rem; margin-bottom: .75rem; }
.article-toc-sidebar ul, .article-toc-mobile ul { list-style: none; padding: 0; margin: 0; }
.article-toc-sidebar a, .article-toc-mobile a { display: block; padding: .5rem .6rem; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: .9rem; line-height: 1.5; overflow-wrap: anywhere; }
.article-toc-sidebar a:hover, .article-toc-mobile a:hover { color: var(--text); background: var(--surface-2); }
.article-toc-sidebar a[aria-current], .article-toc-mobile a[aria-current] { color: var(--accent-strong); border-left-color: var(--accent-strong); }
.article-toc-mobile { display: none; }
@media (max-width: 1120px) {
  .article-layout--with-toc { grid-template-columns: minmax(0, 1fr); }
  .article-toc-sidebar { display: none; }
  .article-toc-mobile { display: block; padding: .5rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
  .article-toc-mobile summary { cursor: pointer; min-height: 2.75rem; align-content: center; font-weight: 700; }
  .article-toc-mobile a { min-height: 2.75rem; }
}

/* PBZ article reading profile; landing heroes retain their existing scale. */
.hero--article, .breadcrumbs--article, .article-layout--reading {
  --article-reading-width: 48.75rem;
  --article-frame-width: calc(var(--article-reading-width) + 15rem + 2rem);
}
.hero--article { padding: clamp(1.5rem, 3vw, 2.5rem) 0 1.25rem; }
.hero--article .container, .breadcrumbs--article, .article-layout--reading { max-width: var(--article-frame-width); }
.breadcrumbs--article { padding-top: 1rem; }
.hero--article .eyebrow { margin-bottom: .5rem; }
.hero--article h1 { max-width: 20ch; font-size: clamp(2.5rem, 5.2vw, 4.625rem); line-height: 1.05; }
.hero--article .lede { max-width: var(--article-reading-width); margin: .75rem 0 0; font-size: 1.375rem; line-height: 1.5; }
.hero--article .editor-byline { margin: .75rem 0 0; }
.section--article { padding-top: 1.5rem; }
.article-layout--reading { --article-body-size: 1.125rem; --article-body-leading: 1.7; grid-template-columns: minmax(0, 1fr) 15rem; }
.article-layout--reading .article-body { max-width: var(--article-reading-width); font-size: var(--article-body-size); line-height: var(--article-body-leading); }
.article-layout--reading .article-body h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); line-height: 1.15; }
.article-layout--reading .article-body h3 { font-size: clamp(1.25rem, 2.2vw, 1.625rem); line-height: 1.2; }
@media (max-width: 1120px) {
  .hero--article .container, .breadcrumbs--article, .article-layout--reading { max-width: var(--article-reading-width); }
  .article-layout--reading { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .hero--article h1 { font-size: clamp(2.25rem, 9.5vw, 2.75rem); line-height: 1.08; }
  .hero--article .lede { font-size: 1.125rem; line-height: 1.55; }
}

/* Content hierarchy: compact introductions, practical guides first. */
:root { --scroll-thumb: #a9b6bc; --scroll-track: #1a2028; --scroll-hover: #f3eee4; }
* { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) var(--scroll-track); }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: var(--scroll-track); }
*::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border: 2px solid var(--scroll-track); border-radius: 6px; }
*::-webkit-scrollbar-thumb:hover, *::-webkit-scrollbar-thumb:active { background: var(--scroll-hover); }
.hero--content-home { padding: 2.5rem 0 1.5rem; }
.hero--content-home h1 { max-width: 27ch; font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.1; }
.hero--content-home .lede { max-width: 52rem; font-size: 1.125rem; line-height: 1.6; margin-block: 1rem; }
.hero--content-home .actions { margin-top: 1rem; }
.home-jumps { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; padding-block: .5rem; }
.home-jumps a { display: inline-flex; align-items: center; min-height: 2.75rem; font-size: .875rem; text-decoration: none; }
.home-jumps a:hover { text-decoration: underline; }
.home-layout .section { padding-block: 2.5rem; }
.home-layout .section h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); }
.task-route--priority { grid-template-columns: repeat(3,minmax(0,1fr)); }
.task-route .task-card h2 { font-size: 1.5rem; margin-bottom: .75rem; }
.task-card a { text-decoration: none; }
.task-card a:hover { text-decoration: underline; }
.task-card p { margin-bottom: 0; font-size: 1rem; line-height: 1.55; color: var(--muted); }
.task-route--secondary { margin-top: 1.25rem; gap: .75rem; grid-template-columns: repeat(auto-fit,minmax(12rem,1fr)); }
.task-route--secondary .task-card { background: transparent; padding: 1rem; }
.task-route--secondary .task-card h2 { font-size: 1.125rem; }
.task-route--secondary .task-card p { font-size: .875rem; }
.hero--article h1 { max-width: 28ch; font-size: clamp(2rem, 3.5vw, 3.125rem); line-height: 1.12; }
.hero--article .lede { font-size: 1.125rem; line-height: 1.6; }
.hero--article { padding-block: 1.25rem 1rem; }
.breadcrumbs--article [aria-current="page"] { max-width: 60ch; }
.article-layout--reading .article-body h2 { font-size: clamp(1.5rem,2.5vw,1.875rem); line-height: 1.25; }
.article-body section { margin-bottom: 2.25rem; }
.table-hint { display: none; font-size: .875rem; color: var(--muted); }
.comparison-table th[scope="col"] { overflow-wrap: normal; }
#overview, #latest, #official-sources { scroll-margin-top: 5rem; }
@media (max-width: 760px) {
  .hero--content-home { padding-block: 1.5rem 1rem; }
  .hero--content-home h1, .hero--article h1 { font-size: 2rem; line-height: 1.15; }
  .hero--content-home .lede, .hero--article .lede { font-size: 1rem; line-height: 1.65; }
  .home-layout .section { padding-block: 1.75rem; }
  .task-route--priority { grid-template-columns: minmax(0,1fr); gap: .75rem; }
  .task-route--priority .task-card { padding: 1rem; }
  .task-route--secondary { grid-template-columns: minmax(0,1fr); }
  .breadcrumbs--article [aria-current="page"], .breadcrumbs--article > span:last-of-type { display: none; }
  .article-body section { margin-bottom: 2rem; }
  .table-hint { display: block; margin-block: 0 .5rem; }
}
@media (forced-colors: active) { * { scrollbar-color: auto; } }

/* Shared reading scale; article body keeps its established 18px profile. */
:root { --text-label: .875rem; --text-control: 1rem; --text-summary: 1.0625rem; }
.primary-nav, .article-languages, .editor-byline, .breadcrumbs { font-size: var(--text-control); }
.eyebrow, .tag { font-size: var(--text-label); line-height: 1.6; }
.home-jumps a, .article-toc-sidebar a, .article-toc-mobile a, .table-hint { font-size: var(--text-control); }
.task-card p, .task-route--secondary .task-card p, .related-card small { font-size: var(--text-summary); line-height: 1.65; }
.task-route--secondary .task-card h2 { font-size: 1.25rem; line-height: 1.3; }
.related-card strong { font-size: 1.125rem; line-height: 1.4; }
.comparison-table { font-size: var(--text-control); line-height: 1.65; }
.home-overview p, .home-layout #latest li, .home-layout #game-info p, .home-layout #behind-the-game p { font-size: var(--text-summary); }
.task-card, .related-card { overflow-wrap: anywhere; }
.home-jumps { gap: .5rem 1.25rem; }
@media (max-width: 760px) {
  .hero--content-home .lede, .hero--article .lede { font-size: 1.125rem; line-height: 1.65; }
}
