:root {
  color-scheme: dark;
  --bg: #0e1116;
  --bg-2: #12161d;
  --surface: #161b23;
  --surface-2: #1c222c;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.15);
  --text: #e8ecf2;
  --muted: #9aa4b2;
  --faint: #6b7382;
  --accent: #38bdf8;
  --accent-2: #7c6cff;
  --card-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
  --radius: 14px;
  --on-dark: #0b1016;
  --on-light: #e8ecf2;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(900px 500px at 100% -10%, rgba(124, 108, 255, 0.12), transparent 60%),
    radial-gradient(800px 460px at -10% 0%, rgba(56, 189, 248, 0.10), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(14, 17, 22, 0.72);
  backdrop-filter: blur(14px);
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 12px 20px;
  margin: 0;
  box-shadow: none;
  color: var(--text);
}

.wrap {
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 26px 20px 56px;
}

.grid {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
  min-width: 0;
}

.header-row {
  display: grid;
  row-gap: 10px;
  align-items: center;
  margin: 0;
}

.page-brand-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  column-gap: 14px;
  align-items: center;
  min-width: 0;
}

.page-brand-wrap {
  grid-column: 1;
  justify-self: start;
  display: grid;
  grid-template-areas: "brand";
  align-items: center;
  min-width: 0;
}

.page-brand {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: transparent;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  background-image: linear-gradient(100deg, #7fd3ff, #38bdf8 45%, #7c6cff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bitcount-brand {
  font-family: "Bitcount", system-ui;
  font-optical-sizing: auto;
  font-style: normal;
  font-variation-settings:
    "slnt" 0,
    "CRSV" 0.5,
    "ELSH" 0,
    "ELXP" 0;
}

.page-brand-short {
  display: none;
}

.page-brand-full {
  display: inline-flex;
}

.page-filter-shell {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(28ch, 42vw);
  max-width: 28ch;
  min-width: 0;
  margin: 0;
  flex: 0 0 auto;
  justify-self: center;
}

.page-filter-control {
  display: flex;
  align-items: center;
  min-width: 0;
  width: 100%;
  flex: 0 0 auto;
}

.page-filter-input {
  width: 100%;
  max-width: none;
  min-width: 0;
  flex: 0 0 auto;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--accent);
  caret-color: var(--accent);
  font: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.page-filter-input::placeholder {
  color: var(--faint);
}

.page-filter-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}

.page-menu-row {
  grid-column: 3;
  justify-self: end;
  display: flex;
  min-width: 0;
}

.page-menu-shell {
  display: flex;
  align-items: center;
  margin: 0;
  flex: 0 0 auto;
}

.page-menu-shell > summary {
  list-style: none;
}

.page-menu-shell > summary::-webkit-details-marker {
  display: none;
}

.page-menu-button {
  display: none !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}

.page-menu-button:focus-visible,
.page-menu-link:focus-visible {
  outline: 2px solid rgba(127, 211, 255, 0.9);
  outline-offset: 2px;
}

.page-menu-icon {
  width: 16px;
  height: 2px;
  position: relative;
  flex: 0 0 auto;
  background: currentColor;
  border-radius: 999px;
  transform: translateY(-6px);
  box-shadow: 0 5px 0 currentColor, 0 10px 0 currentColor;
}

.page-menu {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
}

.page-menu-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  line-height: 1.2;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.page-menu-link:hover {
  color: var(--text);
  background: var(--surface-2);
}

.page-menu-link[aria-current="page"] {
  color: var(--on-dark);
  background: linear-gradient(135deg, #7fd3ff, #38bdf8);
  border-color: transparent;
  font-weight: 600;
}

.footer-stats {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-start;
  margin-top: 16px;
  overflow-x: auto;
  padding-bottom: 0;
}

.stat {
  flex: 0 0 auto;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  padding: 5px 9px;
  font-size: 0.85rem;
  line-height: 1.15;
  white-space: nowrap;
}

.stat a {
  color: inherit;
  text-decoration: none;
}

.stat a:hover {
  text-decoration: none;
}

.topic-group {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: none;
}

.topic-group > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
}

.topic-group > summary::-webkit-details-marker {
  display: none;
}

.group-items {
  border-top: 1px solid var(--line);
  padding: 8px;
  display: grid;
  gap: 6px;
  background: rgba(255, 255, 255, 0.015);
}

.item {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  box-shadow: none;
  overflow: hidden;
}

.item:hover {
  border-color: var(--line-2);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
}

.item > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 10px 14px;
}

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

.item > summary .toggle {
  order: -1;
}

.item-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
}

.item-static .summary-main {
  min-width: 0;
  flex: 1 1 auto;
}

.summary-main {
  min-width: 0;
  flex: 1 1 auto;
}

.summary-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.article-summary-row {
  flex-wrap: wrap;
  align-items: center;
}

.article-summary-row h2 {
  flex: 1 1 18rem;
}

.article-summary-row .article-meta-line {
  margin-top: 0;
  margin-left: auto;
  justify-content: flex-end;
}

.topic-group .summary-row {
  align-items: center;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  margin: 0;
  color: var(--text);
  text-align: right;
}

.badge {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--text);
}

.badge.lang {
  font-size: 1rem;
  padding: 4px 8px;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1;
}

.badge.group-count {
  text-transform: none;
  letter-spacing: 0;
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.25);
  color: var(--accent);
}

.badge.source {
  display: inline-flex;
  width: fit-content;
  max-width: max-content;
  white-space: nowrap;
  letter-spacing: 0;
  text-transform: none;
  padding-inline: 6px;
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.24);
  color: #8fdcff;
}

.badge.group {
  display: inline-flex;
  width: fit-content;
  max-width: max-content;
  white-space: nowrap;
  letter-spacing: 0;
  text-transform: none;
  padding-inline: 6px;
  background: rgba(255, 184, 77, 0.14);
  border-color: rgba(255, 184, 77, 0.28);
  color: #ffd48a;
}

.badge.group.topic-badge {
  background: hsl(var(--topic-badge-hue, 210) 78% 92%);
  border-color: hsl(var(--topic-badge-hue, 210) 60% 76%);
  color: hsl(var(--topic-badge-hue, 210) 60% 28%);
}

.badge.group.topic-badge.topic-badge--nintendo {
  background: #d22f2f;
  border-color: #b81f1f;
  color: #fff;
}

.badge.group.topic-badge.topic-badge--playstation {
  background: #6bbdff;
  border-color: #4da9f0;
  color: #fff;
}

.badge.group.topic-badge.topic-badge--xbox {
  background: #19a34a;
  border-color: #12803b;
  color: #fff;
}

.badge.group.topic-badge.topic-badge--valve {
  background: #163d77;
  border-color: #102f5d;
  color: #fff;
}

.date {
  color: var(--text);
}

.date {
  font-size: 0.88rem;
  color: var(--faint);
}

.article-meta-line {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
}

.article-meta-line .badge.source,
.article-meta-line .date {
  flex: 0 1 auto;
  min-width: 0;
}

h2 {
  margin: 0;
  font-size: 1.04rem;
  line-height: 1.25;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

h2 a {
  color: var(--text);
  text-decoration: none;
}

h2 a:hover {
  text-decoration: underline;
  color: var(--accent);
}

.topic-group > summary h2 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.toggle {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  margin-top: 2px;
  position: relative;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.toggle::before,
.toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 2px;
  background: var(--muted);
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

.toggle::after {
  transform: translate(-50%, -50%) rotate(90deg);
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.item[open] > summary .toggle,
.topic-group[open] > summary .toggle,
.filtered-out[open] > summary .toggle {
  background: var(--surface-2);
  border-color: var(--line-2);
}

.item[open] > summary .toggle::after,
.topic-group[open] > summary .toggle::after,
.filtered-out[open] > summary .toggle::after {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(90deg) scaleY(0);
}

.details-body {
  border-top: 1px solid var(--line);
  padding: 12px 14px 14px;
  background: rgba(255, 255, 255, 0.02);
}

.article-copy {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.article-text {
  color: rgba(165, 211, 255, 0.92);
  font-size: 0.94rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.article-description {
  margin: 0;
}

.article-body {
  margin: 0;
}

@media (max-width: 760px) {
  .article-body {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 10;
    overflow: hidden;
  }
}

.article-image {
  margin: 0;
  display: block;
}

.article-image a {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
}

.article-image img {
  display: block;
  max-width: min(350px, 100%);
  width: auto;
  height: auto;
}

.yt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}

.yt-link-item {
  margin: 0;
  display: flex;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  overflow: visible;
}

.yt-link-item a.yt-card-link {
  display: flex;
  flex-direction: column;
  width: 100%;
  text-decoration: none;
  font-weight: 400;
  color: inherit;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.yt-link-item a.yt-card-link:hover {
  transform: translateY(-3px);
  text-decoration: none;
  border-color: var(--line-2);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
}

.yt-card-body {
  padding: 12px 14px 14px;
  display: grid;
  gap: 9px;
}

.yt-title-link {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.12s;
}

.yt-link-item a.yt-card-link:hover .yt-title-link {
  color: var(--accent);
}

.yt-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  min-width: 0;
}

.yt-card-source {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.yt-card-source::after {
  content: "·";
  margin-left: 8px;
  color: var(--faint);
}

.yt-card-date {
  color: var(--faint);
  white-space: nowrap;
}

.yt-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  overflow: hidden;
}

.yt-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.yt-link-item a.yt-card-link:hover .yt-thumb img {
  transform: scale(1.04);
}

.yt-thumb::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(10, 12, 16, 0.6);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: 0.18s;
  z-index: 2;
}

.yt-thumb::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-38%, -50%);
  border-left: 15px solid #fff;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  opacity: 0;
  transition: 0.18s;
  z-index: 3;
}

.yt-link-item a.yt-card-link:hover .yt-thumb::before {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.yt-link-item a.yt-card-link:hover .yt-thumb::after {
  opacity: 1;
}

.topic-group.filtered,
.filtered-out {
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line-2);
  border-radius: 18px;
  overflow: hidden;
  color: var(--text);
}

.topic-group.filtered > summary,
.filtered-out > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 10px 14px;
}

.topic-group.filtered > summary::-webkit-details-marker,
.filtered-out > summary::-webkit-details-marker {
  display: none;
}

.topic-group.filtered h2,
.filtered-out h2 {
  font-size: 0.98rem;
  color: var(--text);
}

.topic-group.filtered > summary .toggle,
.filtered-out > summary .toggle {
  order: -1;
}

.topic-group.filtered .group-items,
.filtered-list {
  border-top: 1px solid var(--line);
  padding: 10px 14px 12px;
  display: grid;
  gap: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.topic-group.filtered .filtered-item,
.filtered-out .filtered-item {
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 10px 12px;
  background: var(--surface);
}

.topic-group.filtered .filtered-item h3,
.filtered-out .filtered-item h3 {
  margin: 0 0 4px;
  font-size: 0.98rem;
  line-height: 1.3;
}

.topic-group.filtered .filtered-item h3 a,
.filtered-out .filtered-item h3 a {
  color: var(--text);
  text-decoration: none;
}

.topic-group.filtered .filtered-item h3 a:hover,
.filtered-out .filtered-item h3 a:hover {
  text-decoration: underline;
}

.topic-group.filtered .filtered-item p,
.filtered-out .filtered-item p {
  margin: 0;
  color: rgba(165, 211, 255, 0.82);
  font-size: 0.9rem;
  line-height: 1.45;
}

.topic-group.filtered + .footer-stats,
.filtered-out + .footer-stats {
  margin-top: 18px;
}

.filtered-empty {
  margin: 0;
  padding: 10px 12px;
  border: 1px dashed var(--line-2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
}

.show-highlight {
  background: rgba(37, 99, 235, 0.95);
  color: #fff;
}

@media (max-width: 720px) {
  .header-row {
    row-gap: 8px;
  }

  .page-brand-full {
    display: none;
  }

  .page-brand-short {
    display: inline-flex;
  }

  .page-menu-row {
    justify-self: start;
  }

  .page-filter-shell {
    width: min(100%, 18ch);
    max-width: 18ch;
  }

  .article-summary-row {
    flex-wrap: wrap;
  }

  .article-meta-line .date {
    display: none;
  }
}

@media (min-width: 721px) {
  .article-summary-row {
    flex-wrap: nowrap;
  }
}

@media (max-width: 520px) {
  .page-brand-row {
    column-gap: 8px;
  }

  .page-menu-button {
    padding-inline: 10px;
  }
}

@media (max-width: 420px) {
  .page-brand-row {
    column-gap: 6px;
  }

  .page-filter-shell {
    width: min(100%, 14ch);
    max-width: 14ch;
  }

  .page-menu-shell {
    display: block;
    position: relative;
    align-self: center;
  }

  .page-menu-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  .page-menu {
    display: none !important;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: auto;
    min-width: 210px;
    flex-direction: column;
    padding: 10px;
    border: 1px solid var(--line-2);
    border-radius: 18px;
    background: rgba(14, 17, 22, 0.96);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
    z-index: 20;
  }

  .page-menu-shell[open] .page-menu {
    display: flex !important;
  }

  .page-menu-link {
    width: 100%;
    justify-content: flex-start;
  }

  .yt-grid {
    grid-template-columns: 1fr;
  }
}
