:root {
  color-scheme: light;
  --bg: #f6f1e7;
  --bg-strong: #e6dcc8;
  --surface: rgba(255, 252, 246, 0.9);
  --surface-strong: #fff8ec;
  --ink: #1f1b16;
  --muted: #61574a;
  --line: rgba(62, 47, 33, 0.18);
  --accent: #986f2d;
  --accent-strong: #6f4c15;
  --error: #9e2a2b;
  --empty: #5a6b3b;
  --canvas: #fff9ef;
  --page-glow: rgba(255, 245, 221, 0.85);
  --page-gradient-start: #f7f1e8;
  --page-gradient-end: #efe5d4;
  --chrome: rgba(255, 249, 239, 0.88);
  --status-recent: #2f7a3d;
  --status-stale: #a14a3b;
  --shadow: 0 20px 48px rgba(64, 42, 20, 0.12);
  font-family: Georgia, "Times New Roman", serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #17140f;
  --bg-strong: #262017;
  --surface: rgba(28, 24, 19, 0.92);
  --surface-strong: #201b15;
  --ink: #f2e9d8;
  --muted: #baaf9b;
  --line: rgba(239, 227, 204, 0.14);
  --accent: #c6974a;
  --accent-strong: #e5b967;
  --error: #d46a6b;
  --empty: #8db56b;
  --canvas: #120f0b;
  --page-glow: rgba(87, 65, 31, 0.24);
  --page-gradient-start: #16120d;
  --page-gradient-end: #0e0b08;
  --chrome: rgba(21, 17, 13, 0.88);
  --status-recent: #77c884;
  --status-stale: #df8476;
  --shadow: 0 22px 56px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top, var(--page-glow), transparent 45%),
    linear-gradient(180deg, var(--page-gradient-start) 0%, var(--page-gradient-end) 100%);
  color: var(--ink);
}

a {
  color: var(--accent-strong);
}

.shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.shell-wide {
  width: min(1840px, calc(100% - 3rem));
}

.page-stack {
  display: grid;
  gap: 1.5rem;
  padding: 2rem 0 3rem;
}

.site-header,
.site-footer {
  background: var(--chrome);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-footer {
  border-bottom: 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 1rem 0;
}

.site-footer p {
  margin: 0;
}

.site-footer .shell {
  display: grid;
  gap: 0.45rem;
}

.site-footer-note {
  font-size: 0.9rem;
  line-height: 1.45;
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
}

.site-header-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  font-size: 1.2rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.site-nav a,
.site-nav summary {
  text-decoration: none;
  color: var(--muted);
}

.site-nav .is-active {
  color: var(--ink);
  font-weight: 700;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.85rem;
  height: 2.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  padding: 0;
  cursor: pointer;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    transform 140ms ease;
}

.theme-toggle-icon {
  position: absolute;
  width: 1.2rem;
  height: 1.2rem;
  object-fit: contain;
  transition:
    opacity 140ms ease,
    transform 140ms ease;
}

.theme-toggle-icon-sun {
  opacity: 0;
  transform: scale(0.82) rotate(-18deg);
}

.theme-toggle-icon-moon {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.theme-toggle[data-theme-state="dark"] .theme-toggle-icon-sun {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.theme-toggle[data-theme-state="dark"] .theme-toggle-icon-moon {
  opacity: 0;
  transform: scale(0.82) rotate(18deg);
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  background: var(--surface-strong);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}

.theme-toggle:active {
  transform: translateY(1px);
}

.site-nav-group {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  font-weight: 400;
}

.site-nav-group-link {
  padding-right: 0.1rem;
}

.site-nav-group-link.is-active {
  font-weight: 700;
}

.site-nav-dropdown {
  position: relative;
}

.site-nav-dropdown summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.site-nav-dropdown summary::-webkit-details-marker {
  display: none;
}

.site-nav-dropdown summary::after {
  content: " \25be";
  font-size: 0.8em;
}

.site-nav-group .site-nav-dropdown summary::after {
  content: "\25be";
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  min-width: 13rem;
  display: grid;
  gap: 0.15rem;
  padding: 0.5rem;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  z-index: 10;
}

.site-nav-dropdown:not([open]) .site-nav-dropdown-menu {
  display: none;
}

.site-nav-dropdown-menu a {
  padding: 0.45rem 0.6rem;
  border-radius: 10px;
}

.site-nav-dropdown-menu a:hover,
.site-nav-dropdown-menu a:focus-visible {
  background: var(--bg-strong);
  outline: none;
}

.hero-panel,
.feature-card,
.guide-card,
.guide-article,
.stream-card,
.page-heading,
.status-card,
.filter-bar,
.tier-list-table-wrapper {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.tier-list-sticky-header-shell {
  position: fixed;
  top: var(--tier-sticky-top, 0);
  left: 0;
  width: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  pointer-events: none;
  z-index: 15;
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0s linear 0.16s;
}

.tier-list-sticky-header-shell.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0s linear 0s;
}

.tier-list-sticky-header-viewport {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--chrome) 94%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.tier-list-sticky-header-track {
  will-change: transform;
}

.tier-list-sticky-header-table {
  table-layout: fixed;
  border-collapse: collapse;
  color: var(--ink);
  font-size: inherit;
}

.tier-list-sticky-header-table th {
  height: auto;
  max-height: none;
  padding: 0.7rem 0.35rem;
  text-align: center;
  vertical-align: middle;
  color: var(--muted);
  background: transparent;
  border-bottom: 1px solid var(--line);
}

.tier-list-sticky-header-table .tier-header-hero {
  text-align: center;
  padding-left: 0.3rem;
  padding-right: 0.3rem;
}

.tier-list-sticky-header-table .tier-header-mode,
.tier-list-sticky-header-table .tier-header-investment,
.tier-list-sticky-header-table .tier-header-release,
.tier-list-sticky-header-table .tier-header-notes,
.tier-list-sticky-header-table .tier-header-rank,
.tier-list-sticky-header-table .tier-header-score {
  white-space: normal;
}

.hero-panel,
.guide-card,
.guide-article,
.stream-card,
.page-heading,
.status-card,
.tier-list-table-wrapper {
  padding: 1.5rem;
}

.eyebrow,
.guide-meta,
.live-label,
.inline-status {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

.tier-list-last-updated-recent {
  color: var(--status-recent);
}

.tier-list-last-updated-aging {
  color: var(--muted);
}

.tier-list-last-updated-stale {
  color: var(--status-stale);
}

.lede {
  font-size: 1.05rem;
  color: var(--muted);
}

.tier-list-intro {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
  display: grid;
  gap: 0.35rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.feature-card {
  padding: 1.25rem;
}

.guide-list {
  display: grid;
  gap: 1rem;
}

.guide-filter-bar {
  margin-bottom: 0.25rem;
}

.guide-search-empty {
  margin-top: -0.25rem;
}

.guide-card-layout,
.guide-hero {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.guide-copy {
  min-width: 0;
}

.guide-copy h1,
.guide-copy h2 {
  margin-top: 0;
}

.guide-card-meta-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.guide-title-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.guide-title-row h1,
.guide-title-row h2 {
  margin: 0;
}

.guide-new-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.18rem 0.48rem;
  border-radius: 999px;
  border: 1px solid rgba(165, 82, 46, 0.22);
  background: rgba(202, 120, 80, 0.12);
  color: #8b3f1f;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.guide-media-frame {
  width: 128px;
  height: 128px;
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255, 248, 236, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

html[data-theme="dark"] .guide-media-frame {
  background: rgba(48, 48, 48, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.guide-media {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.guide-image-shell {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(110deg, rgba(255, 248, 236, 0.94) 8%, rgba(244, 231, 205, 0.96) 18%, rgba(255, 248, 236, 0.94) 33%),
    rgba(255, 248, 236, 0.92);
  background-size: 220% 100%;
}

html[data-theme="dark"] .guide-image-shell {
  background:
    linear-gradient(110deg, rgba(43, 43, 43, 0.96) 8%, rgba(62, 62, 62, 0.96) 18%, rgba(43, 43, 43, 0.96) 33%),
    rgba(48, 48, 48, 0.92);
}

.guide-image-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.48) 50%, transparent 75%);
  background-size: 220% 100%;
  animation: guide-image-shimmer 1.35s linear infinite;
  pointer-events: none;
}

html[data-theme="dark"] .guide-image-shell::before {
  background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.1) 50%, transparent 75%);
}

.guide-image-shell img {
  opacity: 0;
  transition: opacity 220ms ease;
}

.guide-image-shell.is-loaded::before {
  opacity: 0;
  animation: none;
}

.guide-image-shell.is-loaded img {
  opacity: 1;
}

.guide-thumbnail-image {
  object-fit: contain;
  padding: 0.15rem;
}

.guide-media-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.guide-hero {
  margin-bottom: 1.5rem;
}

.guide-hero .tag-list {
  margin-top: 0.8rem;
}

.guide-feature {
  display: grid;
  gap: 0.75rem;
  justify-items: center;
  margin-bottom: 1.75rem;
}

.guide-feature-link {
  display: block;
  width: min(100%, 900px);
}

.guide-feature-gallery {
  justify-items: stretch;
}

.guide-feature-gallery .guide-feature-link {
  margin-inline: auto;
}

.guide-feature-trigger {
  cursor: zoom-in;
}

.guide-gallery-stack {
  position: relative;
}

.guide-gallery-stack-sheet {
  position: absolute;
  inset: 0;
  border: 1px solid var(--line);
  background: rgba(255, 248, 236, 0.92);
  box-shadow: var(--shadow);
  pointer-events: none;
}

.guide-gallery-stack-sheet-back {
  transform: translate(0, 14px) rotate(-1deg);
  opacity: 0.42;
}

.guide-gallery-stack-sheet-mid {
  transform: translate(0, 7px) rotate(0.6deg);
  opacity: 0.72;
}

.guide-feature-image {
  width: min(100%, 900px);
  display: block;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  border-radius: 0px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: rgba(255, 248, 236, 0.92);
}

.guide-gallery-count {
  position: absolute;
  right: 0.9rem;
  bottom: 0.9rem;
  z-index: 2;
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(255, 248, 236, 0.55);
  background: rgba(30, 24, 17, 0.78);
  color: #fff7e8;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  pointer-events: none;
}

.guide-gallery-source {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@keyframes guide-image-shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -20% 0;
  }
}

.guide-feature-caption {
  margin: 0;
  text-align: center;
  color: var(--muted);
}

.tag-list {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  padding: 0;
  margin: 1rem 0 0;
  flex-wrap: wrap;
}

.tag-list li {
  background: var(--bg-strong);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.85rem;
}

.rich-content {
  line-height: 1.7;
}

.guide-content-section {
  width: min(100%, 900px);
  margin: 0 auto;
}

.guide-content-header {
  margin-bottom: 0.85rem;
}

.guide-content-header .eyebrow {
  margin: 0;
}

.related-guides {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.related-guides-header {
  display: grid;
  gap: 0.25rem;
}

.related-guides-header .eyebrow,
.related-guides-header h2 {
  margin: 0;
}

.related-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.related-guide-card {
  padding: 1rem;
}

.related-guide-card-layout {
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 0.85rem;
}

.related-guide-card .guide-media-frame {
  width: 96px;
  height: 96px;
}

.related-guide-card .guide-copy h2 {
  font-size: 1.05rem;
  line-height: 1.25;
}

.related-guides-empty {
  padding: 1rem;
}

.related-guides-empty .eyebrow {
  text-align: center;
  margin: 0;
}

.rich-content h2,
.rich-content h3 {
  margin-top: 1.75rem;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: end;
  padding: 1rem;
}

.filter-bar label {
  display: grid;
  gap: 0.35rem;
  min-width: 180px;
}

.filter-bar input,
.filter-bar select,
.filter-bar button {
  font: inherit;
  padding: 0.6rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
}

.tier-list-page {
  --tier-hero-col: 266px;
  --tier-rank-col: 70px;
  --tier-score-col: 78px;
  --tier-investment-col: 94px;
  --tier-mode-col: 92px;
  --tier-release-col: 104px;
  --tier-notes-col: 180px;
  --tier-table-width: calc(
    var(--tier-hero-col) +
    var(--tier-rank-col) +
    var(--tier-score-col) +
    (3 * var(--tier-investment-col)) +
    (8 * var(--tier-mode-col)) +
    var(--tier-release-col) +
    var(--tier-notes-col)
  );
}

.tier-list-table {
  width: max(100%, var(--tier-table-width));
  min-width: var(--tier-table-width);
  border-collapse: collapse;
  table-layout: fixed;
}

.tier-list-table th,
.tier-list-table td {
  text-align: left;
  padding: 0.9rem 0.75rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.tier-list-table th {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.2;
}

.tier-list-table th:last-child {
  text-align: left;
}

.filter-actions {
  display: flex;
  gap: 0.75rem;
  align-items: end;
  flex-wrap: wrap;
}

.comment-toggle {
  min-width: 140px;
}

.tier-list-dense-table {
  min-width: var(--tier-table-width);
  font-size: 0.92rem;
}

.tier-list-dense-table th,
.tier-list-dense-table td {
  padding: 0.7rem 0.35rem;
  height: 116px;
  max-height: 116px;
  vertical-align: middle;
  overflow: hidden;
}

.tier-list-dense-table tbody tr {
  height: 116px;
  max-height: 116px;
  transition: background-color 0.16s ease;
}

.tier-list-dense-table tbody tr:hover,
.tier-list-dense-table tbody tr:focus-within,
.tier-list-dense-table tbody tr:active {
  background: rgba(230, 220, 200, 0.9);
}

.tier-list-dense-table tbody tr.is-recently-updated {
  background: rgba(233, 223, 192, 0.28);
}

html[data-theme="dark"] .tier-list-dense-table tbody tr:hover,
html[data-theme="dark"] .tier-list-dense-table tbody tr:focus-within,
html[data-theme="dark"] .tier-list-dense-table tbody tr:active {
  background: rgba(72, 56, 32, 0.5);
}

html[data-theme="dark"] .tier-list-dense-table tbody tr.is-recently-updated {
  background: rgba(109, 82, 40, 0.18);
}

@media (prefers-reduced-motion: reduce) {
  .tier-list-sticky-header-shell {
    transition: none;
    transform: none;
  }
}

.center-cell {
  text-align: center !important;
}

.hero-cell {
  padding-right: 0.85rem !important;
}

.hero-cell-content {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.7rem;
  min-width: 0;
}

.hero-cell-content strong {
  flex: 1 1 auto;
  min-width: 0;
}

.hero-cell-text {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.hero-cell-text strong {
  display: block;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.tier-hero-link-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.tier-hero-link {
  color: inherit;
  font-style: italic;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
}

.tier-hero-link:hover,
.tier-hero-link:focus-visible {
  color: inherit;
  outline: none;
}

.tier-hero-guide-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  font-style: normal;
  line-height: 1;
  text-indent: 0.01em;
}

.hero-faction-label {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.2;
}

.tier-entry-updated-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 0.16rem 0.48rem;
  border-radius: 999px;
  border: 1px solid rgba(170, 112, 52, 0.2);
  background: rgba(204, 152, 92, 0.14);
  color: #955223;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.hero-list-icon {
  border: 1px solid rgba(62, 47, 33, 0.16);
  border: 1px solid rgba(62, 47, 33, 0.16);
  background: rgba(255, 248, 236, 0.95);
}

html[data-theme="dark"] .tier-list-source-pets .hero-list-icon-primary {
  background: rgba(48, 48, 48, 0.92);
}

.hero-list-icon-primary {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 12px;
}

.hero-list-icon-faction {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 999px;
}

.multiline-cell {
  min-width: 130px;
  white-space: pre-line;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tier-list-dense-table td.changed-cell {
  position: relative;
  overflow: visible !important;
  z-index: 2;
  background:
    linear-gradient(0deg, rgba(209, 177, 112, 0.15), rgba(209, 177, 112, 0.15)),
    transparent;
  box-shadow: inset 0 0 0 1px rgba(175, 129, 53, 0.12);
  cursor: help;
}

.tier-list-dense-table tbody tr:hover td.changed-cell,
.tier-list-dense-table tbody tr:focus-within td.changed-cell,
.tier-list-dense-table tbody tr:active td.changed-cell {
  background:
    linear-gradient(0deg, rgba(209, 177, 112, 0.2), rgba(209, 177, 112, 0.2)),
    rgba(230, 220, 200, 0.9);
}

html[data-theme="dark"] .tier-list-dense-table td.changed-cell {
  background:
    linear-gradient(0deg, rgba(191, 149, 74, 0.16), rgba(191, 149, 74, 0.16)),
    transparent;
  box-shadow: inset 0 0 0 1px rgba(183, 134, 54, 0.18);
}

html[data-theme="dark"] .tier-list-dense-table tbody tr:hover td.changed-cell,
html[data-theme="dark"] .tier-list-dense-table tbody tr:focus-within td.changed-cell,
html[data-theme="dark"] .tier-list-dense-table tbody tr:active td.changed-cell {
  background:
    linear-gradient(0deg, rgba(191, 149, 74, 0.2), rgba(191, 149, 74, 0.2)),
    rgba(72, 56, 32, 0.5);
}

.tier-list-dense-table td.changed-cell:focus {
  outline: 2px solid rgba(149, 82, 35, 0.35);
  outline-offset: -2px;
  z-index: 9;
}

.tier-list-dense-table td.changed-cell[data-change-detail]:hover::after,
.tier-list-dense-table td.changed-cell[data-change-detail]:focus::after,
.tier-list-dense-table td.changed-cell[data-change-detail]:focus-within::after,
.tier-list-dense-table td.changed-cell[data-change-detail].is-open::after {
  content: attr(data-change-detail);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.45rem);
  transform: translateX(-50%);
  z-index: 8;
  width: max-content;
  max-width: min(260px, 70vw);
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: 0.76rem;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  pointer-events: none;
}

.tier-list-dense-table td.changed-cell.has-rich-change-popover:hover::after,
.tier-list-dense-table td.changed-cell.has-rich-change-popover:focus::after,
.tier-list-dense-table td.changed-cell.has-rich-change-popover:focus-within::after,
.tier-list-dense-table td.changed-cell.has-rich-change-popover.is-open::after {
  display: none;
}

.tier-change-popover {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.45rem);
  transform: translateX(-50%);
  z-index: 9;
  min-width: 132px;
  max-width: min(260px, 70vw);
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  color: var(--ink);
  display: none;
}

.tier-list-dense-table td.changed-cell:hover .tier-change-popover,
.tier-list-dense-table td.changed-cell:focus .tier-change-popover,
.tier-list-dense-table td.changed-cell:focus-within .tier-change-popover,
.tier-list-dense-table td.changed-cell.is-open .tier-change-popover {
  display: grid;
  gap: 0.45rem;
}

.tier-change-label {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-transform: uppercase;
  text-align: center;
}

.tier-change-rank-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.tier-change-arrow {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1;
}

.investment-cell {
  white-space: nowrap;
}

.investment-main,
.investment-sub {
  display: block;
}

.investment-main {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.investment-sub {
  margin-top: 0.25rem;
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-pill {
  display: inline-block;
  min-width: 2.4rem;
  text-align: center;
  padding: 0.2rem 0.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  color: #111111;
}

.score-value {
  display: inline-block;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.rank-cell,
.score-cell {
  white-space: nowrap;
}

.rank-cell,
.tier-header-rank,
.score-cell,
.tier-header-score {
  padding-left: 0.15rem;
  padding-right: 0.15rem;
}

.tier-col-hero {
  width: var(--tier-hero-col);
}

.tier-col-rank {
  width: var(--tier-rank-col);
}

.tier-col-score {
  width: var(--tier-score-col);
}

.tier-col-investment {
  width: var(--tier-investment-col);
}

.mode-rank-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.8rem;
  padding: 0.28rem 0.45rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 700;
  line-height: 1;
  color: #111111;
}

.rank-pill[data-rank="SSS"],
.mode-rank-box[data-rank="SSS"] {
  background: #4472c4;
  border-color: #355aa0;
}

.rank-pill[data-rank="SS"],
.mode-rank-box[data-rank="SS"] {
  background: #5b9bd5;
  border-color: #417fb7;
}

.rank-pill[data-rank="S+"],
.mode-rank-box[data-rank="S+"] {
  background: #7fb6de;
  border-color: #5e9fcf;
}

.rank-pill[data-rank="S"],
.mode-rank-box[data-rank="S"] {
  background: #9cc2e5;
  border-color: #7fa8ce;
}

.rank-pill[data-rank="S-"],
.mode-rank-box[data-rank="S-"] {
  background: #70ad47;
  border-color: #56893a;
}

.rank-pill[data-rank="A+"],
.mode-rank-box[data-rank="A+"] {
  background: #89bf65;
  border-color: #6ea14d;
}

.rank-pill[data-rank="A"],
.mode-rank-box[data-rank="A"] {
  background: #a8d08d;
  border-color: #86b26a;
}

.rank-pill[data-rank="B"],
.mode-rank-box[data-rank="B"] {
  background: #ffff71;
  border-color: #d9d957;
}

.rank-pill[data-rank="C"],
.mode-rank-box[data-rank="C"] {
  background: #ffc000;
  border-color: #d79f00;
}

.rank-pill[data-rank="D"],
.mode-rank-box[data-rank="D"] {
  background: #c55a11;
  border-color: #a6490d;
}

.rank-pill[data-rank="E"],
.mode-rank-box[data-rank="E"] {
  background: #a54c0f;
  border-color: #8a3f0c;
}

.rank-pill[data-rank="F"],
.mode-rank-box[data-rank="F"] {
  background: #c00000;
  border-color: #970000;
}

.rank-pill[data-rank="X"],
.rank-pill[data-rank="-"],
.mode-rank-box[data-rank="X"],
.mode-rank-box[data-rank="-"] {
  background: #d8d1c6;
  border-color: #bfb6a6;
}

.tier-col-mode {
  width: var(--tier-mode-col);
}

.notes-cell {
  text-align: left;
  position: relative;
  overflow: visible !important;
  z-index: 1;
}

.notes-cell:hover,
.notes-cell:focus-within {
  z-index: 6;
}

.tier-list-dense-table tbody tr.has-open-comment {
  position: relative;
  z-index: 30;
}

.notes-cell.has-open-comment {
  z-index: 31;
}

.release-cell {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.tier-col-release {
  width: var(--tier-release-col);
}

.tier-col-notes {
  width: var(--tier-notes-col);
}

.mode-cell,
.tier-header-mode {
  white-space: nowrap;
}

.notes-preview,
.comment-panel {
  white-space: pre-line;
  line-height: 1.45;
}

.note-trigger {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
  overflow: hidden;
}

.notes-preview {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--muted);
}

.comment-panel {
  position: absolute;
  top: calc(100% - 0.4rem);
  right: 0;
  z-index: 32;
  width: min(420px, 75vw);
  max-height: 240px;
  overflow: auto;
  margin-top: 0;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.notes-cell:hover .comment-panel:not([hidden]),
.notes-cell:focus-within .comment-panel:not([hidden]) {
  display: block;
}

.stream-card {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.stream-featured-card {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 1.2fr);
  grid-template-areas: "copy video";
  align-items: start;
}

.stream-featured-copy {
  grid-area: copy;
  gap: 1rem;
}

.stream-featured-header {
  gap: 0.55rem;
}

.stream-featured-header h3 {
  margin: 0;
  line-height: 1.22;
}

.stream-featured-footer {
  gap: 0.6rem;
}

.stream-featured-card .embed-frame {
  grid-area: video;
}

.stream-creator-overview {
  grid-template-columns: 1fr;
}

.stream-section {
  display: grid;
  gap: 1rem;
}

.stream-section h2,
.stream-section .eyebrow {
  margin: 0;
}

.stream-creator-card-layout {
  grid-template-columns: 1fr;
}

.stream-creator-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.stream-creator-heading h3 {
  margin: 0;
}

.stream-creator-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 999px;
  object-fit: cover;
}

.stream-copy {
  display: grid;
  gap: 0.9rem;
  align-content: start;
}

.stream-copy p {
  margin: 0;
}

.stream-featured-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.stream-featured-nav {
  display: inline-flex;
  gap: 0.45rem;
}

.stream-featured-nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--accent-strong);
  font: inherit;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
}

.stream-featured-nav-icon {
  width: 1rem;
  height: 1rem;
  object-fit: contain;
  pointer-events: none;
}

html[data-theme="dark"] .stream-featured-nav-icon {
  filter: invert(83%) sepia(37%) saturate(674%) hue-rotate(345deg) brightness(96%) contrast(87%);
}

.stream-featured-nav-button:hover,
.stream-featured-nav-button:focus-visible {
  background: var(--bg-strong);
  outline: none;
}

.stream-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.stream-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.65rem 0.95rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 700;
}

.stream-link-button:hover,
.stream-link-button:focus-visible {
  background: var(--bg-strong);
  outline: none;
}

.stream-video-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: stretch;
}

.stream-video-card {
  display: grid;
  gap: 1rem;
  grid-template-rows: auto 1fr;
  height: 100%;
}

.stream-video-card .stream-copy {
  height: 100%;
  grid-template-rows: auto minmax(3.2rem, 1fr) auto;
}

.stream-video-card .stream-copy h3 {
  margin: 0;
  line-height: 1.3;
}

.stream-video-card .stream-actions {
  margin-top: auto;
}

.stream-video-thumbnail-link {
  display: block;
}

.stream-video-thumbnail {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  object-fit: cover;
}

.embed-frame iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 18px;
  background: #111;
}

.status-card.is-error {
  border-color: rgba(158, 42, 43, 0.3);
}

.status-card.is-empty {
  border-color: rgba(90, 107, 59, 0.3);
}

.next-step {
  font-weight: 700;
}

@media (max-width: 720px) {
  .shell-wide {
    width: min(100%, calc(100% - 1.5rem));
  }

  .header-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-header-controls {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
  }

  .theme-toggle {
    width: 2.5rem;
    height: 2.5rem;
    flex: 0 0 auto;
  }

  .site-nav {
    gap: 0.75rem;
    flex: 1 1 auto;
  }

  .guide-card {
    padding: 0.85rem;
  }

  .guide-card-layout {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 0.75rem;
    align-items: center;
  }

  .guide-card .guide-media-frame {
    width: 82px;
    height: 82px;
    border-radius: 14px;
    align-self: center;
    justify-self: center;
  }

  .guide-card .guide-copy h2 {
    font-size: 1rem;
    line-height: 1.24;
  }

  .guide-card .guide-meta {
    font-size: 0.68rem;
  }

  .guide-card .tag-list {
    gap: 0.35rem;
    margin-top: 0.65rem;
  }

  .guide-card .tag-list li {
    padding: 0.22rem 0.52rem;
    font-size: 0.74rem;
  }

  .guide-hero {
    grid-template-columns: 1fr;
  }

  .guide-hero .guide-media-frame {
    display: none;
  }

  .guide-hero .guide-copy h1 {
    font-size: 1.25rem;
    line-height: 1.18;
  }

  .guide-hero .guide-copy p {
    margin-top: 0.45rem;
  }

  .related-guide-grid {
    grid-template-columns: 1fr;
  }

  .related-guide-card-layout {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .related-guide-card .guide-media-frame {
    width: 82px;
    height: 82px;
    border-radius: 14px;
  }

  .related-guide-card .guide-copy h2 {
    font-size: 0.95rem;
  }

  .stream-card,
  .stream-video-grid {
    grid-template-columns: 1fr;
  }

  .stream-featured-card {
    grid-template-areas:
      "copy"
      "video";
  }

  .stream-featured-copy {
    display: contents;
  }

  .stream-featured-header {
    grid-area: copy;
  }

  .stream-featured-card .embed-frame {
    grid-area: video;
  }

  .stream-featured-footer {
    grid-area: footer;
  }

  .stream-featured-card {
    grid-template-areas:
      "copy"
      "video"
      "footer";
  }

  .stream-card,
  .stream-section .guide-card,
  .stream-section.guide-article {
    padding: 1rem;
  }

  .stream-copy {
    gap: 0.75rem;
  }

  .stream-featured-header-top {
    align-items: flex-start;
  }

  .stream-actions {
    gap: 0.6rem;
  }

  .stream-link-button {
    width: 100%;
  }

  .stream-video-thumbnail,
  .embed-frame iframe {
    border-radius: 14px;
  }
}

@media (max-width: 480px) {
  .stream-card,
  .stream-section .guide-card,
  .stream-section.guide-article,
  .guide-card,
  .page-heading {
    padding: 0.9rem;
  }

  .guide-card-layout,
  .related-guide-card-layout {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 0.65rem;
  }

  .guide-card .guide-media-frame,
  .related-guide-card .guide-media-frame {
    width: 68px;
    height: 68px;
    border-radius: 12px;
  }

  .guide-card .guide-copy h2 {
    font-size: 0.94rem;
    line-height: 1.2;
  }

  .guide-hero .guide-copy h1 {
    font-size: 1.05rem;
  }

  .guide-card .tag-list li {
    font-size: 0.7rem;
    padding: 0.2rem 0.46rem;
  }

  .stream-video-card {
    gap: 0.85rem;
  }

  .stream-copy h3 {
    font-size: 1rem;
    line-height: 1.25;
  }
}

@media (max-width: 1480px) {
  .tier-list-page {
    --tier-hero-col: 214px;
    --tier-rank-col: 62px;
    --tier-score-col: 70px;
    --tier-investment-col: 84px;
    --tier-mode-col: 82px;
    --tier-release-col: 96px;
    --tier-notes-col: 160px;
  }

  .tier-list-dense-table {
    font-size: 0.87rem;
  }

  .tier-list-dense-table th,
  .tier-list-sticky-header-table th,
  .tier-list-dense-table td {
    padding: 0.6rem 0.3rem;
    height: 100px;
    max-height: 100px;
  }

  .hero-list-icon-primary {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
  }

  .hero-list-icon-faction {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
  }
}

@media (max-width: 1100px) {
  .tier-list-page {
    --tier-hero-col: 174px;
    --tier-rank-col: 58px;
    --tier-score-col: 66px;
    --tier-investment-col: 78px;
    --tier-mode-col: 76px;
    --tier-release-col: 88px;
    --tier-notes-col: 148px;
  }

  .tier-list-table-wrapper {
    padding: 0.85rem;
    overflow-x: auto;
  }

  .tier-list-dense-table {
    font-size: 0.82rem;
  }

  .tier-list-dense-table th,
  .tier-list-sticky-header-table th,
  .tier-list-dense-table td {
    padding: 0.45rem 0.2rem;
    height: 84px;
    max-height: 84px;
  }

  .tier-list-dense-table tbody tr {
    height: 84px;
    max-height: 84px;
  }

  .hero-cell {
    padding-right: 0.45rem !important;
  }

  .hero-cell-content {
    gap: 0.4rem;
  }

  .hero-list-icon-primary {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
  }

  .hero-list-icon-faction {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
  }

  .hero-cell-text {
    gap: 0.08rem;
  }

  .hero-cell-text strong {
    font-size: 0.8rem;
    line-height: 1.12;
  }

  .hero-faction-label {
    font-size: 0.68rem;
  }

  .rank-pill {
    min-width: 1.85rem;
    padding: 0.14rem 0.18rem;
    font-size: 0.74rem;
  }

  .score-value,
  .investment-main,
  .investment-sub,
  .release-cell,
  .notes-preview {
    font-size: 0.72rem;
    line-height: 1.15;
  }

  .mode-rank-box {
    min-width: 2rem;
    padding: 0.16rem 0.22rem;
    font-size: 0.74rem;
  }

  .notes-preview {
    -webkit-line-clamp: 2;
  }
}
