/* B671 Games - site stylesheet. Prefix: bg-. Mobile first; breakpoints 600 / 768 / 900 / 1100 / 1280. */

:root {
  --blue: #0b63c5;
  --blue-d: #084b96;
  --blue-l: #e8f1fc;
  --navy: #0d2b4e;
  --ink: #16191d;
  --text: #2b3138;
  --muted: #5c6670;
  --line: #e2e6ea;
  --soft: #f3f5f7;
  --page: #eceff3;
  --white: #fff;
  --radius: 6px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 130px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--page);
  overflow-x: hidden;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #6aa7ee; outline-offset: 2px;
}
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
button, input, select, textarea { font: inherit; }

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

/* container: inline padding only; vertical rhythm lives on .bg-page */
.bg-wrap { width: 100%; max-width: 1320px; margin-inline: auto; padding-inline: 16px; }
.bg-page { background: var(--white); padding-block: 16px 48px; }
@media (min-width: 768px) {
  .bg-wrap { padding-inline: 24px; }
  .bg-page { padding-block: 24px 64px; }
}

/* ---------- top trending strip ---------- */
.bg-strip { background: var(--white); border-bottom: 1px solid var(--line); font-size: 13px; }
.bg-strip__in { display: flex; align-items: center; gap: 10px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.bg-strip__in::-webkit-scrollbar { display: none; }
.bg-strip__label { font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: .06em; font-size: 11px; flex: none; }
.bg-strip__list { display: flex; list-style: none; flex-wrap: nowrap; }
.bg-strip__list li + li { border-left: 1px solid #c7ced6; }
.bg-strip__list a { display: block; padding: 8px 10px; color: var(--ink); line-height: 1.3; }
.bg-strip__list li:first-child a { padding-left: 0; }

/* ---------- header ---------- */
.bg-hd { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--line); }
.bg-hd__row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 60px; padding-block: 8px; }
.bg-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--blue); min-height: 44px; }
.bg-logo:hover { text-decoration: none; }
.bg-logo img { height: 40px; width: auto; }
.bg-logo__mark {
  width: 38px; height: 38px; border-radius: 9px; flex: none;
  background: url(../images/logo.png) center / cover no-repeat, linear-gradient(135deg, #1d7fe6, #0b4fa0);
}
.bg-logo__text { font-weight: 800; font-size: 24px; letter-spacing: -.01em; text-transform: uppercase; line-height: 1; }

.bg-search {
  display: none; align-items: center; flex: 1 1 100%; order: 3;
  border: 1px solid #c3ccd6; border-radius: 999px; background: var(--white); padding: 3px 3px 3px 14px;
}
.bg-search__icon { color: var(--muted); flex: none; }
.bg-search input {
  flex: 1; min-width: 0; border: 0; background: transparent; padding: 8px 10px; min-height: 40px; font-size: 16px; color: var(--ink);
}
.bg-search input:focus { outline: none; }
.bg-search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11, 99, 197, .15); }
.bg-search button, .bg-btn {
  border: 0; border-radius: 999px; background: var(--blue); color: #fff; font-weight: 700;
  padding: 0 20px; min-height: 40px; cursor: pointer;
}
.bg-search button:hover, .bg-btn:hover { background: var(--blue-d); text-decoration: none; }

.bg-burger {
  margin-left: auto; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--white); display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; cursor: pointer;
}
.bg-burger span { display: block; width: 20px; height: 2px; background: var(--navy); border-radius: 2px; transition: transform .2s; }
.bg-hd.is-open .bg-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.bg-hd.is-open .bg-burger span:nth-child(2) { opacity: 0; }
.bg-hd.is-open .bg-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
html:not(.js) .bg-burger { display: none; }
html:not(.js) .bg-search, .bg-hd.is-open .bg-search { display: flex; }

/* category menu: single row, never wraps */
.bg-nav { border-top: 1px solid var(--line); position: relative; }
.bg-nav__wrap { position: relative; }
.bg-nav__list {
  display: flex; flex-wrap: nowrap; list-style: none; overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch; gap: 4px;
}
.bg-nav__list::-webkit-scrollbar { display: none; }
.bg-nav__list a {
  display: flex; align-items: center; min-height: 46px; padding: 0 10px; white-space: nowrap;
  font-weight: 800; font-size: 17px; color: var(--blue); border-bottom: 3px solid transparent;
}
.bg-nav__list li:first-child a { padding-left: 0; }
.bg-nav__list a:hover { text-decoration: none; color: var(--blue-d); border-bottom-color: #b8d3f3; }
.bg-nav__list a.is-on { color: var(--navy); border-bottom-color: var(--blue); }
.bg-nav__wrap::before, .bg-nav__wrap::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 36px; pointer-events: none; opacity: 0; transition: opacity .2s; z-index: 1;
}
.bg-nav__wrap::before { left: 0; background: linear-gradient(90deg, #fff 30%, rgba(255, 255, 255, 0)); }
.bg-nav__wrap::after { right: 0; background: linear-gradient(270deg, #fff 30%, rgba(255, 255, 255, 0)); }
.bg-nav.fade-l .bg-nav__wrap::before, .bg-nav.fade-r .bg-nav__wrap::after { opacity: 1; }

/* phones: hamburger drawer */
@media (max-width: 767px) {
  .js .bg-nav { display: none; }
  .js .bg-hd.is-open .bg-nav { display: block; max-height: calc(100vh - 150px); overflow-y: auto; }
  .js .bg-hd.is-open .bg-nav__list { flex-direction: column; overflow: visible; gap: 0; padding-bottom: 8px; }
  .js .bg-hd.is-open .bg-nav__list li + li { border-top: 1px solid var(--line); }
  .js .bg-hd.is-open .bg-nav__list a { padding-left: 0; border-bottom: 0; }
  .js .bg-hd.is-open .bg-nav__wrap::before, .js .bg-hd.is-open .bg-nav__wrap::after { display: none; }
  .bg-hd.is-open .bg-hd__row { padding-bottom: 12px; }
}
@media (min-width: 768px) {
  .bg-burger { display: none; }
  .bg-hd__row { flex-wrap: nowrap; min-height: 76px; gap: 32px; }
  .bg-search { display: flex; order: 0; flex: 0 1 460px; margin-inline: auto; }
  .bg-logo__text { font-size: 28px; }
  .bg-logo__mark { width: 44px; height: 44px; }
}
@media (min-width: 1100px) {
  .bg-search { flex-basis: 520px; }
  .bg-nav__list { gap: 10px; }
  .bg-nav__list a { font-size: 18px; }
}

/* ---------- shared bits ---------- */
.bg-sec {
  font-size: 15px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--navy);
}
.bg-sec::after { content: " |"; color: var(--blue); }
.bg-block { margin-top: 36px; }
.bg-block__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding-bottom: 10px; margin-bottom: 16px; border-bottom: 1px solid var(--line);
}
.bg-more { font-size: 14px; font-weight: 700; white-space: nowrap; display: inline-flex; align-items: center; min-height: 44px; }
.bg-more::after { content: " \203A"; margin-left: 4px; }
.bg-empty { color: var(--muted); font-size: 15px; }
.bg-empty--lead { font-size: 17px; color: var(--text); padding: 16px 18px; background: var(--soft); border-left: 3px solid var(--blue); margin-bottom: 20px; }
.bg-meta { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.bg-time { font-size: 13px; color: var(--muted); }
.bg-flag { font-size: 11px; font-weight: 700; text-transform: uppercase; background: var(--blue-l); color: var(--blue-d); padding: 2px 6px; border-radius: 3px; }

.bg-kicker { color: var(--blue); font-weight: 800; }
span.bg-kicker::after { content: " |"; font-weight: 400; color: currentColor; }
.bg-kicker-line { margin-bottom: 6px; }
.bg-kicker-line .bg-kicker::after { content: ""; }
.bg-kicker-line .bg-kicker { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
[data-cat*="/reviews/"], .bg-kicker--review { color: #c2410c; }
[data-cat*="/guides/"], .bg-kicker--guide { color: #1e7f46; }
[data-cat*="/releases/"] { color: #7c3aed; }
[data-cat*="/hardware/"] { color: #475569; }
[data-cat*="/mobile/"] { color: #0e7490; }
[data-cat*="/indie/"] { color: #be185d; }
[data-cat*="/esports/"] { color: #b91c1c; }

/* image fallback: generated art over a gradient, never a broken icon */
.bg-noimg {
  display: block; width: 100%; height: 100%; min-height: 100%; aspect-ratio: 16 / 9;
  background: url(../images/thumb-default.jpg) center / cover no-repeat, linear-gradient(135deg, #1d7fe6 0%, #0d2b4e 100%);
}
.bg-noimg--topic { background: url(../images/topic-default.jpg) center / cover no-repeat, linear-gradient(135deg, #5aa7f5 0%, #0b63c5 60%, #0d2b4e 100%); }

/* ---------- layout ---------- */
.bg-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
.bg-col { min-width: 0; }
@media (min-width: 1100px) {
  .bg-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; }
  .bg-layout--read { grid-template-columns: minmax(0, 760px) 300px; justify-content: space-between; }
}
@media (min-width: 1280px) {
  .bg-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; }
  .bg-layout--read { grid-template-columns: minmax(0, 760px) 320px; }
}

/* ---------- home hero ---------- */
.bg-hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
@media (min-width: 768px) { .bg-hero { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 28px; } }
@media (min-width: 1280px) { .bg-hero { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 36px; } }
.bg-top > .bg-sec, .bg-latest > .bg-sec { display: block; padding-bottom: 10px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }

.bg-story {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 40%;
  background: var(--white); border: 1px solid var(--line); margin-bottom: 14px; min-height: 150px;
}
.bg-story__text { display: flex; flex-direction: column; padding: 12px 14px 0; }
.bg-story__title { font-size: 17px; font-weight: 800; line-height: 1.25; }
.bg-story__title a { color: var(--ink); }
.bg-story__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.bg-story:hover .bg-story__title a { color: var(--blue); text-decoration: none; }
.bg-story__dek { font-size: 14px; color: var(--muted); margin-top: 6px; display: none; }
.bg-story__title { margin-bottom: 12px; }
.bg-story__dek { margin: -4px 0 12px; }
.bg-story__meta { margin: auto -14px 0; padding: 7px 14px; background: var(--soft); }
.bg-story__media { position: relative; overflow: hidden; background: linear-gradient(135deg, #1d7fe6, #0d2b4e); }
.bg-story__media img, .bg-story__media .bg-noimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; aspect-ratio: auto; }
.bg-story--lead { grid-template-columns: minmax(0, 1fr); }
.bg-story--lead .bg-story__media { order: -1; position: relative; aspect-ratio: 16 / 9; }
.bg-story--lead .bg-story__title { font-size: 23px; }
.bg-story--lead .bg-story__dek { display: block; font-size: 15px; }
@media (min-width: 600px) {
  .bg-story { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); min-height: 190px; }
  .bg-story__text { padding: 16px 18px 0; }
  .bg-story__meta { margin-inline: -18px; padding-inline: 18px; }
  .bg-story__dek { display: block; }
  .bg-story__title { font-size: 19px; }
  .bg-story--lead { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); min-height: 300px; }
  .bg-story--lead .bg-story__media { order: 0; aspect-ratio: auto; }
  .bg-story--lead .bg-story__title { font-size: 26px; }
}
@media (min-width: 768px) and (max-width: 1099px) {
  .bg-story--lead { grid-template-columns: minmax(0, 1fr); }
  .bg-story--lead .bg-story__media { order: -1; aspect-ratio: 16 / 9; }
}
@media (min-width: 1280px) { .bg-story--lead .bg-story__title { font-size: 30px; } }

.bg-latest__list { list-style: none; }
.bg-latest__item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.bg-latest__item:first-child { padding-top: 0; }
.bg-latest__link { display: block; color: var(--ink); font-weight: 800; font-size: 15px; line-height: 1.3; margin-bottom: 4px; }
.bg-latest__link:hover { color: var(--blue); text-decoration: none; }

/* ---------- card grids ---------- */
.bg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
@media (max-width: 419px) { .bg-grid { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 900px) { .bg-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 20px; } }
.bg-grid--related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .bg-grid--related { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 419px) { .bg-grid--related { grid-template-columns: minmax(0, 1fr); } }

.bg-card { position: relative; display: flex; flex-direction: column; min-width: 0; }
.bg-card__media { aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, #1d7fe6, #0d2b4e); }
.bg-card__media img { width: 100%; height: 100%; object-fit: cover; }
.bg-card__body { padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.bg-card__title { font-size: 16px; font-weight: 800; line-height: 1.3; }
.bg-card__title a { color: var(--ink); }
.bg-card__title a::after { content: ""; position: absolute; inset: 0; }
.bg-card:hover .bg-card__title a { color: var(--blue); text-decoration: none; }
.bg-card__dek { font-size: 14px; color: var(--muted); }

/* 1-2 items: compact horizontal cards instead of half-empty rows */
.bg-grid--c1, .bg-grid--c2 { grid-template-columns: minmax(0, 1fr); }
.bg-grid--c1 .bg-card, .bg-grid--c2 .bg-card { display: grid; grid-template-columns: 38% minmax(0, 1fr); gap: 14px; align-items: start; }
.bg-grid--c1 .bg-card__body, .bg-grid--c2 .bg-card__body { padding-top: 0; }
@media (min-width: 768px) {
  .bg-grid--c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bg-grid--c1 .bg-card { grid-template-columns: 280px minmax(0, 1fr); }
}
@media (min-width: 900px) { .bg-grid--c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* guides: compact cards */
.bg-minis { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 600px) { .bg-minis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; } }
@media (min-width: 1280px) { .bg-minis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.bg-mini { position: relative; display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.bg-mini__media { aspect-ratio: 3 / 2; overflow: hidden; background: linear-gradient(135deg, #1e7f46, #0d2b4e); }
.bg-mini__media img, .bg-mini__media .bg-noimg { width: 100%; height: 100%; object-fit: cover; aspect-ratio: auto; }
.bg-mini__title { font-size: 15px; font-weight: 800; line-height: 1.3; margin-bottom: 4px; }
.bg-mini__title a { color: var(--ink); }
.bg-mini__title a::after { content: ""; position: absolute; inset: 0; }
.bg-mini:hover .bg-mini__title a { color: var(--blue); text-decoration: none; }

/* release dates: dated list */
.bg-dated { list-style: none; }
.bg-dated__item { position: relative; display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.bg-dated__item:first-child { padding-top: 0; }
.bg-dated__date {
  display: flex; flex-direction: column; align-items: center; justify-content: center; height: 60px;
  border: 1px solid #d9ccf7; border-radius: var(--radius); background: #f5f1fe; color: #5b21b6; line-height: 1;
}
.bg-dated__m { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.bg-dated__d { font-size: 24px; font-weight: 800; margin-top: 3px; }
.bg-dated__title { font-size: 16px; font-weight: 800; line-height: 1.3; }
.bg-dated__title a { color: var(--ink); }
.bg-dated__title a::after { content: ""; position: absolute; inset: 0; }
.bg-dated__item:hover .bg-dated__title a { color: var(--blue); text-decoration: none; }
.bg-dated__dek { font-size: 14px; color: var(--muted); margin-top: 4px; }

/* topics strip */
.bg-topics { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 600px) { .bg-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .bg-topics { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.bg-topic { position: relative; padding: 14px 16px 16px; border: 1px solid var(--line); border-top: 3px solid var(--blue); background: var(--white); }
.bg-topic:hover { background: var(--blue-l); }
.bg-topic__name { font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.bg-topic__name a { color: var(--navy); }
.bg-topic__name a::after { content: ""; position: absolute; inset: 0; }
.bg-topic__intro { font-size: 14px; color: var(--muted); }

/* ---------- sidebar ---------- */
.bg-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-content: start; min-width: 0; }
@media (min-width: 600px) and (max-width: 1099px) { .bg-side { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; } }
.bg-box > .bg-sec { display: block; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.bg-rank { list-style: none; }
.bg-rank li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.bg-rank li.bg-empty { display: block; }
.bg-rank__n { font-size: 26px; font-weight: 800; color: var(--blue); line-height: 1; }
.bg-rank a { color: var(--ink); font-weight: 700; font-size: 15px; line-height: 1.3; }
.bg-rank a:hover { color: var(--blue); }
.bg-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.bg-cloud a, .bg-taglist a {
  display: inline-flex; align-items: center; min-height: 36px; padding: 4px 12px; border: 1px solid #cfd8e3; border-radius: 999px;
  font-size: 14px; color: var(--navy); background: var(--white);
}
.bg-cloud a:hover, .bg-taglist a:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }
.bg-sidelist { list-style: none; }
.bg-sidelist li { border-bottom: 1px solid var(--line); }
.bg-sidelist a { display: flex; align-items: center; min-height: 44px; color: var(--ink); font-weight: 600; font-size: 15px; }
.bg-sidelist a:hover, .bg-sidelist a.is-on { color: var(--blue); }
.bg-sidelist--cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
.bg-box--about p { font-size: 14px; color: var(--muted); }
@media (min-width: 1100px) { .bg-side { position: sticky; top: 140px; } }

/* ---------- breadcrumb & page heads ---------- */
.bg-crumb ol { list-style: none; display: flex; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.bg-crumb li + li::before { content: "\203A"; margin: 0 8px; color: #9aa5b1; }
.bg-crumb a { color: var(--muted); display: inline-block; padding-block: 4px; }
.bg-crumb a:hover { color: var(--blue); }
.bg-pagehead { padding-bottom: 16px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.bg-pagehead__title { font-size: 30px; font-weight: 800; letter-spacing: -.01em; }
.bg-pagehead__intro { margin-top: 8px; font-size: 17px; color: var(--muted); max-width: 760px; }
.bg-pagehead .bg-meta { margin-top: 8px; }
@media (min-width: 768px) { .bg-pagehead__title { font-size: 38px; } }
.bg-subcats { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.bg-subcats a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--blue-l); font-weight: 700; font-size: 14px; }

/* ---------- list rows (thumb left) ---------- */
.bg-rows { display: flex; flex-direction: column; }
.bg-row { display: grid; grid-template-columns: 34% minmax(0, 1fr); gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.bg-row:first-child { padding-top: 0; }
.bg-row__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, #1d7fe6, #0d2b4e); align-self: start; }
.bg-row__media img, .bg-row__media .bg-noimg { width: 100%; height: 100%; object-fit: cover; }
.bg-row__title { font-size: 16px; font-weight: 800; line-height: 1.3; }
.bg-row__title a { color: var(--ink); }
.bg-row__title a:hover { color: var(--blue); }
.bg-row__title em { font-style: normal; background: #fff3b0; }
.bg-row__dek { display: none; font-size: 15px; color: var(--muted); margin-top: 6px; }
.bg-row__dek em { font-style: normal; background: #fff3b0; color: var(--ink); }
.bg-row .bg-meta { margin-top: 6px; }
@media (min-width: 600px) {
  .bg-row { grid-template-columns: 220px minmax(0, 1fr); gap: 20px; }
  .bg-row__title { font-size: 19px; }
  .bg-row__dek { display: block; }
}
@media (min-width: 1280px) { .bg-row { grid-template-columns: 260px minmax(0, 1fr); } }

/* ---------- pager ---------- */
.bg-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 32px; }
.bg-pager__list { display: flex; flex-wrap: wrap; list-style: none; gap: 6px; justify-content: center; }
.bg-pager a, .bg-pager span[aria-current] {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--radius); font-weight: 700; color: var(--navy); background: var(--white);
}
.bg-pager a:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }
.bg-pager span[aria-current] { background: var(--blue); border-color: var(--blue); color: #fff; }
.bg-pager__info { width: 100%; text-align: center; font-size: 13px; color: var(--muted); }

/* ---------- article ---------- */
.bg-article { max-width: 760px; }
.bg-article__head { margin-bottom: 20px; }
.bg-article__kicker { margin-bottom: 8px; }
.bg-article__kicker a { font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.bg-article__title { font-size: 30px; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; }
@media (min-width: 768px) { .bg-article__title { font-size: 40px; } }
.bg-article__dek { font-size: 19px; color: var(--muted); margin-top: 12px; line-height: 1.45; }
.bg-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.bg-byline__author { font-weight: 700; color: var(--ink); }
.bg-byline__cm { display: inline-flex; align-items: center; min-height: 32px; }
.bg-source { margin-top: 6px; font-size: 13px; color: var(--muted); }
.bg-source a { color: var(--muted); text-decoration: underline; text-decoration-color: #b7c1cc; }
.bg-source a:hover { color: var(--blue); }
.bg-article__figure { margin: 0 0 24px; background: linear-gradient(135deg, #1d7fe6, #0d2b4e); aspect-ratio: 16 / 9; overflow: hidden; }
.bg-article__figure img { width: 100%; height: 100%; object-fit: cover; }

/* reading column */
.bg-prose { font-size: 18px; line-height: 1.7; color: var(--text); max-width: 720px; overflow-wrap: break-word; }
.bg-prose > * + * { margin-top: 1.1em; }
.bg-prose h2 { font-size: 25px; font-weight: 800; margin-top: 1.8em; line-height: 1.25; }
.bg-prose h3 { font-size: 20px; font-weight: 800; margin-top: 1.5em; }
.bg-prose h4 { font-size: 18px; font-weight: 800; margin-top: 1.3em; }
.bg-prose a { text-decoration: underline; text-underline-offset: 2px; }
.bg-prose img { margin-inline: auto; height: auto; }
.bg-prose figure { margin: 1.4em 0; }
.bg-prose figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }
.bg-prose ul { padding-left: 1.3em; }
.bg-prose li + li { margin-top: .4em; }
.bg-prose ol { list-style: none; counter-reset: step; padding: 0; }
.bg-prose ol > li { counter-increment: step; position: relative; padding-left: 48px; min-height: 34px; }
.bg-prose ol > li::before {
  content: counter(step); position: absolute; left: 0; top: .1em; width: 32px; height: 32px; border-radius: 50%;
  background: var(--blue); color: #fff; font-weight: 800; font-size: 15px; line-height: 32px; text-align: center;
}
.bg-prose blockquote { margin: 1.4em 0; padding: 4px 0 4px 18px; border-left: 4px solid var(--blue); color: var(--navy); font-style: italic; }
.bg-prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.bg-prose code { font-size: .9em; background: var(--soft); padding: 1px 5px; border-radius: 3px; }
.bg-prose pre { overflow-x: auto; background: var(--soft); padding: 14px; font-size: 15px; }
.bg-prose iframe, .bg-prose video { max-width: 100%; }
.bg-prose table, .bg-table table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.45; }
.bg-prose > table { display: block; overflow-x: auto; }
.bg-table { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.4em 0; border: 1px solid var(--line); }
.bg-table table { min-width: 520px; }
.bg-prose th, .bg-prose td, .bg-table th, .bg-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.bg-prose th, .bg-table th { background: var(--soft); color: var(--navy); font-weight: 800; white-space: nowrap; }
.bg-prose tr:nth-child(even) td { background: #fafbfc; }

/* callouts: spoiler / notice */
.bg-callout, .bg-prose .callout, .bg-prose .notice, .bg-prose .note, .bg-prose .spoiler, .bg-prose .warning,
.bg-prose .bg-callout--notice, .bg-prose .bg-callout--spoiler {
  padding: 14px 16px 14px 48px; border-radius: var(--radius); position: relative; font-size: 16px; line-height: 1.55;
  background: var(--blue-l); border: 1px solid #c4dbf6; color: var(--navy);
}
.bg-callout::before, .bg-prose .callout::before, .bg-prose .notice::before, .bg-prose .note::before, .bg-prose .bg-callout--notice::before {
  content: "i"; position: absolute; left: 14px; top: 14px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--blue); color: #fff; font-weight: 800; font-size: 13px; line-height: 22px; text-align: center; font-style: normal;
}
.bg-prose .spoiler, .bg-prose .warning, .bg-prose .bg-callout--spoiler { background: #fff6e5; border-color: #f5d49a; color: #6b4200; }
.bg-prose .spoiler::before, .bg-prose .warning::before, .bg-prose .bg-callout--spoiler::before {
  content: "!"; position: absolute; left: 14px; top: 14px; width: 22px; height: 22px; border-radius: 50%;
  background: #d97706; color: #fff; font-weight: 800; font-size: 13px; line-height: 22px; text-align: center;
}

/* model-specific facts */
.bg-facts { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 24px; background: var(--soft); }
.bg-facts__h { font-size: 18px; font-weight: 800; margin-bottom: 10px; }
.bg-facts__list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px 16px; font-size: 15px; }
.bg-facts__list span { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.bg-facts__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.bg-facts__note { font-size: 14px; color: var(--muted); margin-top: 8px; }
.bg-facts__price { font-size: 26px; font-weight: 800; color: var(--ink); margin-bottom: 10px; }
.bg-facts__price del { font-size: 16px; color: var(--muted); font-weight: 400; }
.bg-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; }
.bg-btn--ghost { background: var(--white); color: var(--blue); border: 1px solid var(--blue); }
.bg-btn--ghost:hover { background: var(--blue-l); color: var(--blue-d); }
.bg-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 24px; }
.bg-gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--soft); }
.bg-video { margin-bottom: 24px; }
.bg-video video { width: 100%; aspect-ratio: 16 / 9; background: #000; }

.bg-taglist { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 28px; }
.bg-taglist--topics { margin-top: 12px; }
.bg-taglist--topics a { background: var(--blue-l); border-color: transparent; font-weight: 700; }
.bg-taglist__label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-right: 4px; min-width: 52px; }

.bg-prevnext { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 32px; }
@media (min-width: 600px) { .bg-prevnext { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bg-prevnext__item { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); font-weight: 700; line-height: 1.35; }
.bg-prevnext__item span { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--blue); margin-bottom: 4px; font-weight: 800; }
a.bg-prevnext__item:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }
.bg-prevnext__item--next { text-align: right; }
.bg-prevnext__item.is-empty { color: var(--muted); font-weight: 400; background: var(--soft); }
.bg-prevnext__item.is-empty span { color: var(--muted); }

/* ---------- comments ---------- */
.bg-comments { margin-top: 40px; max-width: 760px; }
.bg-comments > .bg-sec { display: block; padding-bottom: 10px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.bg-cmlist { list-style: none; }
.bg-cm { padding: 14px 0; border-bottom: 1px solid var(--line); }
.bg-cm__head { font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.bg-cm__head strong { color: var(--ink); margin-right: 6px; }
.bg-cm__body { font-size: 16px; line-height: 1.6; overflow-wrap: break-word; }
.bg-cmlist--replies { margin: 10px 0 0 16px; padding-left: 14px; border-left: 3px solid var(--blue-l); }
.bg-cmlist--replies .bg-cm:last-child { border-bottom: 0; }
.bg-cmform { margin-top: 24px; padding: 18px; background: var(--soft); border-radius: var(--radius); display: grid; gap: 14px; }
.bg-cmform__h { font-size: 19px; font-weight: 800; }
.bg-cmform__row { display: flex; flex-direction: column; gap: 6px; }
.bg-cmform label { font-size: 14px; font-weight: 700; color: var(--navy); }
.bg-cmform label small { font-weight: 400; color: var(--muted); }
.bg-cmform input, .bg-cmform textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #c3ccd6; border-radius: var(--radius); background: #fff; font-size: 16px; color: var(--ink);
}
.bg-cmform textarea { resize: vertical; min-height: 120px; }
.bg-cmform__hint { font-size: 13px; color: var(--muted); }
.bg-cmform__msg { font-size: 15px; font-weight: 600; }
.bg-cmform__msg.is-ok { color: #1e7f46; }
.bg-cmform__msg.is-err { color: #b91c1c; }
.bg-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
@media (min-width: 768px) {
  .bg-cmform { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 22px; }
  .bg-cmform__h, .bg-cmform__row:has(textarea), .bg-cmform__hint, .bg-cmform__actions, .bg-cmform__msg { grid-column: 1 / -1; }
}

/* ---------- single page (document) ---------- */
.bg-doc { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; }
.bg-doc__main { min-width: 0; max-width: 760px; }
@media (min-width: 1024px) { .bg-doc { grid-template-columns: minmax(0, 760px) 280px; justify-content: space-between; } }
.bg-toc { border: 1px solid var(--line); border-left: 3px solid var(--blue); padding: 14px 18px; margin-bottom: 24px; background: var(--soft); }
.bg-toc__h { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--navy); margin-bottom: 6px; }
.bg-toc__list { padding-left: 1.2em; font-size: 15px; }
.bg-toc__list li { padding-block: 2px; }
.bg-toc__list a { display: inline-block; padding-block: 5px; }
.bg-toc__list .is-sub { margin-left: 1em; list-style: circle; }

/* ---------- topics / tags ---------- */
.bg-tcards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
@media (min-width: 600px) { .bg-tcards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .bg-tcards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.bg-tcard { border: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; }
.bg-tcard__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, #5aa7f5, #0d2b4e); }
.bg-tcard__media img, .bg-tcard__media .bg-noimg { width: 100%; height: 100%; object-fit: cover; }
.bg-tcard__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.bg-tcard__name { font-size: 20px; font-weight: 800; }
.bg-tcard__name a { color: var(--navy); }
.bg-tcard__intro { font-size: 15px; color: var(--muted); }

.bg-topichead { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding-bottom: 20px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.bg-topichead__media { aspect-ratio: 16 / 6; overflow: hidden; background: linear-gradient(135deg, #5aa7f5, #0d2b4e); }
.bg-topichead__media img, .bg-topichead__media .bg-noimg { width: 100%; height: 100%; object-fit: cover; aspect-ratio: auto; }
.bg-topichead__intro { font-size: 17px; color: var(--muted); margin-top: 8px; max-width: 760px; }
.bg-topichead .bg-meta { margin-top: 8px; }
@media (max-width: 599px) { .bg-topichead__media { aspect-ratio: 16 / 9; } }
@media (min-width: 900px) {
  .bg-topichead { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: center; gap: 32px; }
  .bg-topichead__media { order: 2; aspect-ratio: 16 / 9; }
}
.bg-prose--topic { margin-bottom: 12px; }

.bg-tagcloud { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.bg-tagcloud__item {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 16px; border: 1px solid #cfd8e3; border-radius: 999px;
  color: var(--navy); font-weight: 700; background: #fff;
}
.bg-tagcloud__item:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }
.bg-tagcloud__n { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--soft); border-radius: 999px; padding: 2px 8px; }
.bg-w1 { font-size: 14px; }
.bg-w2 { font-size: 16px; }
.bg-w3 { font-size: 18px; }
.bg-w4 { font-size: 21px; color: var(--blue-d); }
.bg-w5 { font-size: 24px; color: var(--blue); border-color: #9cc2ef; }

/* ---------- search ---------- */
.bg-bigsearch { margin-bottom: 24px; }
.bg-bigsearch__row { display: flex; gap: 8px; }
.bg-bigsearch__row input {
  flex: 1; min-width: 0; min-height: 48px; padding: 10px 16px; border: 1px solid #c3ccd6; border-radius: 999px; font-size: 17px; color: var(--ink);
}
.bg-bigsearch__row input:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(11, 99, 197, .15); }
.bg-bigsearch__row .bg-btn { min-height: 48px; }
.bg-bigsearch__filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 12px; font-size: 14px; }
.bg-bigsearch__filters label { font-weight: 700; color: var(--navy); }
.bg-bigsearch__filters select { min-height: 44px; padding: 0 10px; border: 1px solid #c3ccd6; border-radius: var(--radius); background: #fff; max-width: 100%; }
.bg-results-count { margin-bottom: 14px; }

/* ---------- 404 ---------- */
.bg-404 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: center; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.bg-404__art {
  aspect-ratio: 16 / 9; border-radius: var(--radius); display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .25) 0 8%, transparent 9%),
              repeating-linear-gradient(90deg, rgba(255, 255, 255, .07) 0 2px, transparent 2px 28px),
              linear-gradient(135deg, #1d7fe6, #0d2b4e);
}
.bg-404__art span { font-size: 88px; font-weight: 900; color: rgba(255, 255, 255, .92); letter-spacing: .04em; }
.bg-404 .bg-pagehead__intro { margin-bottom: 18px; }
.bg-404__links { display: flex; flex-wrap: wrap; gap: 10px; }
.bg-404__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 40px; }
@media (min-width: 900px) {
  .bg-404 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 40px; }
  .bg-404__art { order: 2; }
  .bg-404__grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
}

/* ---------- footer ---------- */
.bg-ft { background: var(--navy); color: #c9d6e6; padding-block: 40px 28px; font-size: 14px; }
.bg-ft a { color: #fff; }
.bg-ft__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
@media (min-width: 600px) { .bg-ft__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .bg-ft__grid { grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 36px; } }
.bg-logo--ft { color: #fff; margin-bottom: 10px; }
.bg-logo--ft .bg-logo__text { font-size: 22px; }
.bg-ft__h { color: #fff; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.bg-ft__col ul { list-style: none; }
.bg-ft__col a { display: inline-flex; align-items: center; min-height: 36px; color: #dbe6f3; }
.bg-ft__col a:hover { color: #fff; }
.bg-ft__note { margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .15); color: #a9bad0; font-size: 13px; max-width: 900px; }
.bg-ft__copy { margin-top: 8px; color: #a9bad0; font-size: 13px; }
@media (max-width: 767px) { .bg-ft__col a { min-height: 44px; } }

/* motion preference */
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
