[hidden] {
  display: none !important;
}

:root {
  color-scheme: light dark;
  --font-display: "Cinzel", Georgia, serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;

  --bg-light: #eef1ec;
  --surface-light: #fbfcfa;
  --ink-light: #16211e;
  --muted-light: #475650;
  --accent-light: #166d5b;
  --gold-light: #8f5c00;

  --bg-dark: #0f171a;
  --surface-dark: #162226;
  --ink-dark: #e6edea;
  --muted-dark: #9db0a8;
  --accent-dark: #2eb898;
  --gold-dark: #e5b94c;

  --bg: var(--bg-light);
  --surface: var(--surface-light);
  --surface-alt: color-mix(in srgb, var(--bg) 60%, var(--surface));
  --ink: var(--ink-light);
  --muted: var(--muted-light);
  --border: color-mix(in srgb, var(--muted) 32%, transparent);
  --accent: var(--accent-light);
  --accent-hover: color-mix(in srgb, var(--accent) 82%, var(--ink));
  --accent-ink: #fbfcfa;
  --gold: var(--gold-light);
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.06);
  --shadow-md: 0 8px 24px rgb(0 0 0 / 0.08);
  --radius: 6px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--bg-dark);
    --surface: var(--surface-dark);
    --ink: var(--ink-dark);
    --muted: var(--muted-dark);
    --accent: var(--accent-dark);
    --accent-ink: var(--bg-dark);
    --gold: var(--gold-dark);
  }
}

@supports (color: light-dark(white, black)) {
  :root {
    --bg: light-dark(var(--bg-light), var(--bg-dark));
    --surface: light-dark(var(--surface-light), var(--surface-dark));
    --ink: light-dark(var(--ink-light), var(--ink-dark));
    --muted: light-dark(var(--muted-light), var(--muted-dark));
    --accent: light-dark(var(--accent-light), var(--accent-dark));
    --accent-ink: light-dark(#fbfcfa, var(--bg-dark));
    --gold: light-dark(var(--gold-light), var(--gold-dark));
  }
}

html {
  accent-color: var(--accent);
  scrollbar-color: var(--muted) var(--surface-alt);
  scroll-behavior: smooth;
}

@supports not (scrollbar-color: auto) {
  ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
  }
  ::-webkit-scrollbar-thumb {
    background: var(--muted);
  }
  ::-webkit-scrollbar-track {
    background: var(--surface-alt);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 8px 14px;
  border-radius: 4px;
  font-weight: 600;
  z-index: 50;
}

.skip-link:focus {
  left: 12px;
}

/* Top Bar */
.atlas-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.atlas-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(13px, 3.6vw, 17px);
  white-space: nowrap;
}

.brand-text {
  overflow: hidden;
  text-overflow: ellipsis;
}

.atlas-brand img {
  border-radius: 5px;
  flex: none;
}

.topbar-tabs {
  display: none;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  min-width: 0;
}

.topbar-tab {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 6px 10px;
  border-radius: 4px;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.topbar-tab:hover,
.topbar-tab[aria-current="page"] {
  background: var(--surface-alt);
  color: var(--accent);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.topbar-steam {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 6px 14px;
  border-radius: 5px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.topbar-steam:hover {
  background: var(--accent-hover);
  color: var(--accent-ink);
}

.rail-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface-alt);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 640px) {
  .atlas-topbar {
    padding: 8px 10px;
    gap: 8px;
  }
  .topbar-steam,
  .rail-toggle {
    padding: 6px 10px;
    font-size: 13px;
  }
}

/* Main Shell Grid */
.atlas-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 1380px;
  margin-inline: auto;
  gap: 0;
}

.atlas-rail {
  display: none;
  min-width: 0;
  padding: 20px 16px;
  background: var(--surface);
  border-right: 1px solid var(--border);
}

.atlas-paper {
  min-width: 0;
  padding: 20px 16px 40px;
  background: var(--surface);
}

@media (min-width: 1024px) {
  .rail-toggle {
    display: none;
  }
  .topbar-tabs {
    display: flex;
  }
  .atlas-shell {
    grid-template-columns: 244px minmax(0, 1fr);
    align-items: start;
  }
  .atlas-rail {
    display: block;
    position: sticky;
    top: 57px;
    max-height: calc(100dvh - 57px);
    overflow-y: auto;
  }
  .atlas-paper {
    padding: 28px 32px 48px;
  }
}

/* Left Legacy Skill Rail & Search */
.rail-search {
  margin-bottom: 18px;
}

.rail-search input[type="search"],
.search-row input[type="search"],
.calc-grid input,
.comment-form input,
.comment-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
}

.search-results {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--bg);
  padding: 6px;
}

.search-results a {
  display: block;
  padding: 6px 8px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.search-results a:hover {
  background: var(--surface-alt);
}

.rail-group {
  margin-bottom: 18px;
}

.rail-heading {
  margin: 0 0 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.rail-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 36px;
  padding: 5px 8px;
  border-radius: 4px;
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.rail-link:hover,
.rail-link[aria-current="page"] {
  background: var(--surface-alt);
  color: var(--accent);
}

.rail-badge {
  flex: none;
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 700;
}

/* Mobile Dialog Drawer */
.rail-drawer {
  margin: 0;
  padding: 16px 16px calc(24px + env(safe-area-inset-bottom));
  border: 0;
  border-right: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  inline-size: min(320px, 90vw);
  max-inline-size: 100vw;
  block-size: 100dvh;
  max-block-size: calc(100dvh - 16px);
  overflow-y: auto;
  box-shadow: var(--shadow-md);
}

.rail-drawer::backdrop {
  background: rgb(0 0 0 / 0.55);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: -16px;
  background: var(--surface);
  z-index: 2;
}

.drawer-close {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface-alt);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  cursor: pointer;
}

/* Entry Header + Infobox Pairing */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--muted);
}

.entry-header-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

@media (min-width: 900px) {
  .entry-header-grid {
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 24px;
    align-items: start;
  }
}

.entry-lead,
.infobox-col {
  min-width: 0;
}

.entry-kicker {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--gold);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.wiki-entry h1 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
  letter-spacing: -0.01em;
}

.direct-answer {
  margin: 0 0 16px;
  font-size: 17px;
  line-height: 1.55;
  max-width: 68ch;
}

.launch-stage {
  margin: 0 0 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-alt);
  overflow: hidden;
}

.launch-cover {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.launch-bar,
.page-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px;
}

.page-cta-row {
  padding: 0;
  margin-bottom: 16px;
}

.engage-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.btn-play,
.btn-secondary,
.btn-engage,
.btn-reset,
.btn-chip,
.btn-reply,
.btn-cancel-reply {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 5px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.btn-play {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-play:hover {
  background: var(--accent-hover);
  color: var(--accent-ink);
}

.btn-secondary,
.btn-engage,
.btn-reset,
.btn-chip,
.btn-reply,
.btn-cancel-reply {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
}

.btn-secondary:hover,
.btn-engage:hover,
.btn-reset:hover,
.btn-chip:hover {
  background: var(--surface-alt);
  border-color: var(--accent);
}

.btn-engage[aria-pressed="true"],
.btn-engage[data-gf-liked],
.btn-chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.share-msg,
.comment-msg {
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
}

/* Numbered Wiki Contents Box */
.entry-toc {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 12px 16px;
}

.entry-toc h2 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.entry-toc ol,
.entry-toc ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 4px;
  list-style: decimal;
}

.entry-toc a {
  display: inline-block;
  padding: 2px 0;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

/* Right Infobox */
table.infobox {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 14px;
}

table.infobox caption {
  padding: 10px 12px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  text-align: center;
}

table.infobox th,
table.infobox td {
  padding: 7px 10px;
  border-top: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

table.infobox th {
  width: 40%;
  color: var(--muted);
  font-weight: 600;
}

/* Workbench Interactive Sections */
.workbench-panel {
  margin: 24px 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

.panel-head h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.25;
}

.panel-head p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 15px;
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 12px;
}

.field {
  display: grid;
  gap: 5px;
  font-size: 14px;
  font-weight: 600;
}

.preset-row,
.chip-row {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.calc-outputs {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  padding-top: 8px;
}

.calc-stat {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  display: grid;
  gap: 3px;
}

.calc-stat span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 700;
}

.calc-stat output {
  font-variant-numeric: tabular-nums;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}

.calc-note {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* Filter Toolbar & Empty State */
.filter-toolbar {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.search-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.search-row input[type="search"] {
  flex: 1 1 240px;
}

.filter-count {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.empty-state {
  margin-top: 12px;
  padding: 16px;
  border: 1px dashed var(--border);
  border-radius: 5px;
  background: var(--surface);
  text-align: center;
}

.empty-state p {
  margin: 0 0 10px;
  color: var(--muted);
}

/* Responsive Wikitables (modern-web-guidance: responsive-table) */
.table-wrap {
  overflow-x: auto;
  max-inline-size: 100%;
  container-type: inline-size;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin: 16px 0;
}

.table-wrap--tall {
  max-block-size: min(520px, 75dvh);
}

table.wikitable {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin: 0;
}

table.wikitable caption {
  padding: 10px 12px;
  text-align: left;
  font-weight: 700;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
}

table.wikitable thead {
  position: sticky;
  inset-block-start: 0;
  z-index: 1;
}

table.wikitable th,
table.wikitable td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

table.wikitable thead th {
  background: var(--surface-alt);
  font-weight: 700;
  white-space: nowrap;
}

table.wikitable tbody tr:hover {
  background: var(--surface-alt);
}

@container (width < 560px) {
  table.wikitable,
  table.wikitable caption,
  table.wikitable thead,
  table.wikitable tbody,
  table.wikitable tr,
  table.wikitable th,
  table.wikitable td {
    display: block;
    width: 100%;
  }

  table.wikitable thead {
    display: none;
  }

  table.wikitable tr {
    padding: 8px 10px;
    border-bottom: 2px solid var(--border);
  }

  table.wikitable td {
    padding: 4px 0;
    border-bottom: 0;
  }

  table.wikitable td::before {
    content: attr(data-label) ": ";
    font-weight: 700;
    color: var(--muted);
  }
}

/* Accessible Tabs (modern-web-guidance: tabs) */
.tablist {
  display: flex;
  overflow-x: auto;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

[role="tab"] {
  position: relative;
  flex: none;
  min-height: 44px;
  padding: 8px 14px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

[role="tab"][aria-selected="true"] {
  color: var(--accent);
}

[role="tab"][aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  border-block-end: 3px solid var(--accent);
}

.tabpanel-body {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
}

.tabpanel-body h3 {
  margin: 0 0 8px;
}

/* Tracker Grid */
.tracker-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.tracker-summary output {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--accent);
}

.tracker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.check-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: none;
}

/* Prose Content */
.wiki-prose {
  max-width: 78ch;
  margin: 24px 0;
}

.wiki-prose h2 {
  margin: 28px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.25;
}

.wiki-prose h3 {
  margin: 20px 0 8px;
  font-size: 19px;
  line-height: 1.3;
}

.wiki-prose p,
.wiki-prose ul,
.wiki-prose ol {
  margin: 0 0 14px;
}

.wiki-prose figure {
  margin: 20px 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

.wiki-prose figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  object-fit: cover;
}

.wiki-prose figcaption {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
}

#sources {
  margin-top: 28px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

#sources h2 {
  margin-top: 0;
  font-size: 18px;
}

/* FAQ */
.faq-section {
  margin: 28px 0;
}

.faq-section h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 24px;
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 12px 14px;
}

.faq-item summary {
  font-weight: 700;
  cursor: pointer;
}

.faq-item p {
  margin: 10px 0 0;
}

/* Navbox */
.wiki-navbox {
  margin: 28px 0;
}

table.navbox {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  font-size: 14px;
}

table.navbox thead th {
  padding: 8px 12px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-display);
  text-align: center;
}

table.navbox tbody th {
  width: 180px;
  padding: 8px 12px;
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
  text-align: left;
}

table.navbox tbody td {
  padding: 8px 12px;
  border-top: 1px solid var(--border);
}

@media (max-width: 640px) {
  table.navbox tbody th,
  table.navbox tbody td {
    display: block;
    width: 100%;
  }
}

/* Comments */
.comments-section {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.comments-list[data-gf-empty]::before {
  content: "No notes yet. Share your Early Access tips or skill milestones below.";
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
}

.comment-card,
.reply-card {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  margin-bottom: 10px;
}

.comment-card[data-gf-owner],
.reply-card[data-gf-owner] {
  border-color: var(--gold);
  background: var(--surface-alt);
}

.owner-badge {
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--gold);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 700;
}

.comment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.comment-body {
  margin: 0 0 8px;
}

.comment-replies {
  margin-top: 10px;
  padding-left: 14px;
  border-left: 2px solid var(--border);
}

.comment-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.reply-banner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

/* Ads (Always inside .atlas-paper >= 300px net width) */
.gf-ad {
  margin: 22px auto;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
}

.gf-ad--rect {
  min-width: 300px;
}

/* Footer */
.atlas-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 20px 16px;
}

.footer-inner {
  max-width: 1380px;
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.footer-brand {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}

.footer-brand span {
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.legal-entry {
  max-width: 74ch;
}

/* Guides Directory Cards */
.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.guide-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.guide-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.guide-cat-tag {
  padding: 2px 8px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  color: var(--accent);
  font-weight: 700;
}

.guide-date {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.guide-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
}

.guide-card p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

/* Tier List Badges (color-mix on existing palette tokens) */
.tier-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.tier-badge--s {
  background: color-mix(in srgb, var(--gold) 22%, var(--surface));
  color: var(--gold);
  border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
}

.tier-badge--a {
  background: color-mix(in srgb, var(--accent) 18%, var(--surface));
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
}

.tier-badge--b {
  background: var(--surface-alt);
  color: var(--ink);
  border: 1px solid var(--border);
}

/* Click-to-Load YouTube Video Cards */
.video-card {
  margin: 20px 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

.video-card [data-youtube] {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 4px;
  overflow: hidden;
}

.video-card [data-youtube] img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.video-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
}

/* Page Feedback Tally Widget */
.feedback-panel {
  margin: 24px 0;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

.feedback-head h2 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 19px;
}

.feedback-head p {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--muted);
}

.feedback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.feedback-status {
  margin: 10px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}
