@import url("https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter+Tight:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap");

:root {
  /* "Dispatch" palette: ink, not navy; one signal green, one cobalt. */
  --bg: #0e0f12;
  --bg-elev: #15171b;
  --card: #16181d;
  --card-hover: #1c1f25;
  --border: #272a31;
  --text: #eceae3;
  --text-dim: #a5a8b0;
  --text-faint: #6c7078;
  --accent: #8c9bff;
  --accent-2: #2bd48a;
  --new-badge: #ff6a4f;
  --star: #ffc94d;
  --phos: #b8f34a;
  --border-strong: #3a3e47;
  --neg-text: #ff8f7a;
  --scheme: dark;
  /* Layout: wide pages (lists, grids) and reading pages (one subject). */
  --page-max: 1440px;
  --read-max: 1120px;
  --gutter: clamp(16px, 3.2vw, 40px);
  --shadow: 0 8px 30px rgba(0,0,0,0.4);
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

html.modal-open, html.modal-open body {
  overflow: hidden;
  overscroll-behavior: contain;
}

body {
  margin: 0;
  font-family: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a { color: inherit; }

header, .site-header {
  padding: 26px var(--gutter) 20px;
  max-width: var(--page-max);
  margin: 0 auto;
}

/* Brand on the left, navigation on the right. The links used to sit inside the
   tagline paragraph, which made them read as prose and wrap unpredictably. */
.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.logo {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: block;
  box-shadow: 0 4px 16px rgba(140,155,255,0.35);
  flex-shrink: 0;
}

.brand {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}

.nav-link {
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-dim);
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s, background .15s;
}

.nav-link:hover { color: var(--text); background: var(--bg-elev); }

.nav-link.active { color: var(--text); background: var(--card); box-shadow: 0 0 0 1px var(--border) inset; }

.nav-link.preview { color: var(--accent-2); }

/* Each page names itself here, so the h1 is unique per page rather than the
   site name repeated across every one of them. */
.page-title {
  font-size: 25px;
  margin: 20px 0 0;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h1 {
  font-size: 25px;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.subtitle {
  color: var(--text-dim);
  margin: 7px 0 0;
  font-size: 14.5px;
  max-width: 680px;
}

.controls {
  max-width: var(--page-max);
  margin: 28px auto 0;
  padding: 0 var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

select, button {
  font-family: inherit;
  font-size: 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  padding: 10px 14px;
  outline: none;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

select:hover, button:hover { border-color: var(--border-strong); }

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 12px;
  min-width: 280px;
  flex: 1 1 280px;
  max-width: 420px;
  transition: border-color .15s;
}

.search-box:focus-within { border-color: var(--accent); }

.search-icon { font-size: 13px; opacity: .6; flex-shrink: 0; }

.search-box input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  padding: 11px 0;
}

.search-box input::placeholder { color: var(--text-faint); }
.search-box input::-webkit-search-cancel-button { display: none; }

.search-clear {
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 13px;
  padding: 4px;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1;
}

.search-clear:hover { color: var(--text); }

.tabs {
  display: flex;
  gap: 6px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
}

.tab {
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
  transition: all .15s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.tab.active {
  background: linear-gradient(135deg, var(--accent), #6f80ff);
  color: white;
}

.filter-pills {
  display: flex;
  gap: 6px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
}

.pill {
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
  transition: all .15s;
  white-space: nowrap;
}

.pill.active {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 0 0 1px var(--border) inset;
}

/* Shown only while a search is active, so it reserves no height otherwise. */
.status-bar {
  max-width: var(--page-max);
  margin: 18px auto 0;
  padding: 0 var(--gutter);
  color: var(--text-faint);
  font-size: 13px;
}

main {
  max-width: var(--page-max);
  margin: 20px auto 60px;
  padding: 0 var(--gutter);
}

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

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  transition: transform .15s, border-color .15s, background .15s;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  background: var(--card-hover);
}

.card-top { display: flex; gap: 12px; align-items: flex-start; }

.icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--bg-elev);
  flex-shrink: 0;
}

.card-title { font-size: 15px; font-weight: 600; line-height: 1.3; }
.card-dev { font-size: 12.5px; color: var(--text-dim); margin-top: 3px; }

.badge-row { display: flex; gap: 6px; flex-wrap: wrap; }

.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--bg-elev);
  color: var(--text-dim);
  border: 1px solid var(--border);
}

.badge.new {
  background: rgba(255,106,79,0.15);
  color: var(--new-badge);
  border-color: rgba(255,106,79,0.3);
}

.badge.rating { color: var(--star); border-color: rgba(255,201,77,0.25); background: rgba(255,201,77,0.08); }
.badge.installs { color: var(--accent-2); border-color: rgba(43,212,138,0.25); background: rgba(43,212,138,0.08); }

.meta-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  font-size: 12px;
  color: var(--text-faint);
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.empty, .loading, .error {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-dim);
}

.loading .spinner {
  width: 34px;
  height: 34px;
  margin: 0 auto 16px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.error { color: var(--new-badge); }

/* Modal (home page quick view) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4,5,10,0.72);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}

/* Any `display` rule of ours outranks the UA's [hidden] { display: none }, so
   toggling el.hidden silently does nothing on a flex/grid element. State it
   once, globally, instead of patching each element that hits it. */
[hidden] { display: none !important; }

.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  max-width: 880px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: var(--shadow);
}

.modal-header, .detail-header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 24px 24px 16px;
}

/* A flex item defaults to min-width:auto, so a long title refuses to shrink and
   shoves the close button off-screen on narrow viewports. Let it wrap instead. */
.modal-header > div, .detail-header > div { min-width: 0; }
.modal-title, .detail-title, .modal-dev, .detail-dev { overflow-wrap: anywhere; }

/* Keep the close button reachable even when modal content scrolls */
.modal .modal-header {
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 2;
  border-radius: 20px 20px 0 0;
}

.modal-icon, .detail-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  background: var(--bg-elev);
  flex-shrink: 0;
}

.modal-title, .detail-title { font-size: 19px; font-weight: 700; line-height: 1.3; }
.modal-dev, .detail-dev { font-size: 13.5px; color: var(--text-dim); margin-top: 4px; }

.modal-close {
  margin-left: auto;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: 32px;
  height: 32px;
  padding: 0;
  font-size: 16px;
  line-height: 1;
  color: var(--text-dim);
  flex-shrink: 0;
}

.modal-stats, .detail-stats {
  display: flex;
  gap: 10px;
  padding: 0 24px 16px;
  flex-wrap: wrap;
}

.stat-chip {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12.5px;
  color: var(--text-dim);
}

.stat-chip b { color: var(--text); font-size: 13.5px; }

.modal-screens, .detail-screens {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 24px 20px;
  scrollbar-width: thin;
}

.modal-screens img, .detail-screens img {
  height: 260px;
  border-radius: 12px;
  flex-shrink: 0;
  background: var(--bg-elev);
}

.modal-desc, .detail-desc {
  padding: 0 24px 20px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-dim);
  white-space: pre-line;
}

.modal-footer, .detail-footer {
  padding: 16px 24px 24px;
  border-top: 1px solid var(--border);
}

.play-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: linear-gradient(135deg, var(--accent-2), #1fb377);
  color: #04231f;
  font-weight: 700;
  font-size: 14.5px;
  padding: 13px;
  border-radius: 12px;
  text-decoration: none;
}

.play-btn:hover { filter: brightness(1.06); }

.play-btn.secondary {
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--border);
}

/* The same two actions, small, in the header. The header is sticky, so these
   stay reachable while the description and screenshots scroll past — the
   full-size pair at the bottom is a long way down on a phone. */
.modal-heading { min-width: 0; }

.modal-quick {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  background: var(--bg-elev);
  color: var(--text-dim);
  border: 1px solid var(--border);
  transition: color .15s, background .15s, filter .15s;
}

.quick-btn:hover { color: var(--text); background: var(--card-hover); }

.quick-btn.primary {
  background: linear-gradient(135deg, var(--accent-2), #1fb377);
  color: #04231f;
  border-color: transparent;
}

.quick-btn.primary:hover { filter: brightness(1.06); color: #04231f; }

/* Standalone game detail page */
.detail-page {
  max-width: var(--read-max);
  margin: 0 auto;
  padding: 32px var(--gutter) 60px;
}

.breadcrumb {
  font-size: 13px;
  color: var(--text-faint);
  margin-bottom: 20px;
}

.breadcrumb a { color: var(--accent-2); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.detail-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.related-section {
  max-width: var(--read-max);
  margin: 32px auto 0;
  padding: 0 20px;
}

.related-title { font-size: 14px; font-weight: 700; margin-bottom: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .04em; }

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

.related-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, background .15s;
}

.related-item:hover { border-color: var(--border-strong); background: var(--card-hover); }

.related-item img { width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0; background: var(--bg-elev); }
.related-item span { font-size: 13.5px; font-weight: 600; }

/* Theme is intentionally fixed to dark on every device — no light-mode
   variant, so the site looks identical regardless of system settings. */

/* ——— Charts & analytics ——— */


.detail-chart { padding: 0 24px 20px; }

.chart-figure { margin: 0; }

.chart-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.growth-chart { width: 100%; height: auto; display: block; overflow: visible; }

.growth-chart .grid { stroke: var(--border); stroke-width: 1; }
.growth-chart .axis-label { fill: var(--text-faint); font-size: 10px; font-family: inherit; }
.growth-chart .area { fill: var(--accent-2); opacity: .12; }
.growth-chart .line { fill: none; stroke: var(--accent-2); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.growth-chart .dot { fill: var(--accent-2); stroke: var(--card); stroke-width: 2; }
.growth-chart .dot-last { fill: var(--accent-2); stroke: var(--card); stroke-width: 2; }
.growth-chart .point-label { fill: var(--text); font-size: 12px; font-weight: 700; font-family: inherit; }

/* Hover readout. The bands are the hit targets — invisible, full height, one
   per reading — so the pointer never has to find a 4px dot. */
.chart-holder { position: relative; }

.growth-chart .hit { fill: transparent; cursor: crosshair; }
.growth-chart .crosshair { stroke: var(--text-faint); stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }
.growth-chart .focus-dot { fill: var(--accent-2); stroke: var(--card); stroke-width: 2; pointer-events: none; }

.chart-tip {
  position: absolute;
  z-index: 4;
  pointer-events: none;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.45;
  white-space: nowrap;
  box-shadow: var(--shadow);
}

.chart-tip .tip-day { color: var(--text-faint); font-size: 11px; margin-bottom: 2px; }
.chart-tip .tip-row { color: var(--text); font-variant-numeric: tabular-nums; }
.chart-tip .tip-row b { color: var(--accent-2); }
.chart-tip .tip-dim { color: var(--text-dim); }

.modal-loading { color: var(--text-faint); font-style: italic; }

.chart-note { font-size: 12.5px; color: var(--text-dim); margin-top: 10px; }
.chart-note b { color: var(--text); }
.chart-note b.up, .up { color: var(--accent-2); }

.chart-empty, .notice {
  font-size: 12.5px;
  color: var(--text-dim);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  line-height: 1.5;
}

.insights-page { max-width: var(--read-max); }

.insight-section { margin-bottom: 40px; }

.insight-section h2 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.insight-section h2 .muted { color: var(--text-faint); font-weight: 500; font-size: 14px; }

.section-note { font-size: 13px; color: var(--text-dim); margin: 0 0 14px; }
.insight-section .notice { margin-bottom: 14px; }

/* Headline numbers — the page answers "what changed" before any scrolling. */
.stat-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.stat-tile {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  /* Grid items default to min-width:auto, which lets the nowrap studio/game
     name inside blow the column out and scroll the whole page sideways. */
  min-width: 0;
}

.tile-value {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  min-width: 0;
}

/* A studio or game name has to fit where a short number normally sits. */
.tile-value.small {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  font-variant-numeric: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.5;
}

.tile-value.up { color: var(--accent-2); }

.tile-value a { color: inherit; text-decoration: none; }
.tile-value a:hover { color: var(--accent-2); }

.tile-label {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 4px;
}

.window-picker {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.window-picker .picker-label {
  font-size: 12.5px;
  color: var(--text-faint);
  margin-right: 2px;
}

.window-picker .pill { text-decoration: none; }

/* Magnitude bar behind a table value, so a column of numbers stays scannable. */
.bar-cell { position: relative; }

.bar-cell .cell-bar {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 60%;
  background: var(--accent-2);
  opacity: 0.16;
  border-radius: 3px;
  pointer-events: none;
}

.bar-cell .cell-value {
  position: relative;
  font-variant-numeric: tabular-nums;
}

.bar-cell.up .cell-value { color: var(--accent-2); }

.studio-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.studio-name {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
}

.follow-btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-dim);
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
}

.follow-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--text); }

/* Quieter than Follow: a diagnostic, not the thing you came to do. */
.test-btn {
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px dashed var(--border);
  background: none;
  color: var(--text-faint);
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}

.test-btn:hover:not(:disabled) { color: var(--text-dim); border-color: var(--text-faint); }
.test-btn:disabled { opacity: .6; cursor: default; }

.follow-btn.following {
  background: linear-gradient(135deg, var(--accent), #6f80ff);
  border-color: transparent;
  color: #fff;
}

.follow-btn:disabled { opacity: .5; cursor: not-allowed; }

.follow-btn.small { font-size: 11.5px; padding: 5px 11px; margin-left: 10px; vertical-align: middle; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 13px;
  color: var(--text);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 200;
  max-width: min(460px, calc(100vw - 32px));
  text-align: center;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { border-color: rgba(255,106,79,0.5); color: var(--new-badge); }

.dev-link { color: var(--accent-2); text-decoration: none; }
.dev-link:hover { text-decoration: underline; }

.studio-game {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.studio-game img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
  background: var(--bg-elev);
}

.studio-game span { font-weight: 600; }
.studio-game:hover span { color: var(--accent-2); }

.data-table .sub a { color: var(--text-faint); font-weight: 500; text-decoration: none; }
.data-table .sub a:hover { color: var(--accent-2); }

.more-wrap { display: flex; justify-content: center; margin-top: 24px; }

.more-btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.more-btn:hover:not(:disabled) { border-color: var(--accent); background: var(--card-hover); }
.more-btn:disabled { opacity: .6; cursor: default; }

.style-row { margin-top: 10px; align-items: flex-start; }
.style-row .filter-pills { flex-wrap: wrap; flex: 1; }

.pill-count {
  font-size: 10px;
  opacity: .55;
  margin-left: 3px;
  font-variant-numeric: tabular-nums;
}

/* Expander for the folded tail of a facet list. Deliberately quieter than a
   real filter chip — it changes what you can see, not what is selected. */
.pill-more {
  background: none;
  border: 1px dashed var(--border);
  font-family: inherit;
  color: var(--text-faint);
}

.pill-more:hover { color: var(--text-dim); border-color: var(--text-faint); }

/* Charts & filters */
.filter-stack { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }

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

.filter-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-faint);
  width: 68px;
  flex-shrink: 0;
}

.filter-row .filter-pills { flex-wrap: wrap; }
.filter-row .pill { text-decoration: none; }

.chart-table .rank { font-weight: 700; color: var(--text-dim); width: 44px; }

.move { font-size: 12px; font-weight: 700; white-space: nowrap; }
.move.up { color: var(--accent-2); }
.move.down { color: var(--new-badge); }
.move.flat { color: var(--text-faint); }
.move.new {
  color: var(--accent);
  background: rgba(140,155,255,0.14);
  border: 1px solid rgba(140,155,255,0.3);
  border-radius: 5px;
  padding: 2px 6px;
  font-size: 10px;
}

.ver {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 6px;
  color: var(--text-dim);
}

.changes { font-size: 12px; color: var(--text-faint); max-width: 320px; }

.version-list { display: flex; flex-direction: column; gap: 8px; }

.version-item {
  border-left: 2px solid var(--border);
  padding: 2px 0 10px 14px;
  position: relative;
}

.version-item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
}

.version-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.version-date { font-size: 12px; color: var(--text-faint); }
.version-notes { font-size: 12.5px; color: var(--text-dim); margin-top: 6px; line-height: 1.5; white-space: pre-line; }

/* Ad-creatives preview */
.ad-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }

.ad-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}

.ad-game { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; min-width: 0; flex: 1 1 260px; }
.ad-game img { width: 44px; height: 44px; border-radius: 11px; flex-shrink: 0; background: var(--bg-elev); }
.ad-game-title { font-size: 14px; font-weight: 600; }
.ad-game-sub { font-size: 12px; color: var(--text-faint); margin-top: 2px; }
.ad-game:hover .ad-game-title { color: var(--accent-2); }

.ad-links { display: flex; gap: 6px; flex-wrap: wrap; }

.ad-link {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--text-dim);
  text-decoration: none;
  white-space: nowrap;
}

.ad-link:hover { border-color: var(--accent-2); color: var(--accent-2); }

.table-wrap { overflow-x: auto; margin-top: 12px; }

.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }

.data-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-faint);
  font-weight: 700;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.data-table td a { color: var(--text); text-decoration: none; font-weight: 600; }
.data-table td a:hover { color: var(--accent-2); }
.data-table .sub { font-size: 11.5px; color: var(--text-faint); margin-top: 2px; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Mobile */
@media (max-width: 640px) {
  /* Secondary table columns are dropped rather than left to scroll sideways —
     a six-column table is unreadable on a phone. The full set is on desktop. */
  .hide-sm { display: none; }

  .stat-tiles { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat-tile { padding: 12px 13px; }
  .tile-value { font-size: 20px; }
  .tile-value.small { font-size: 14px; }
  .tile-label { font-size: 11.5px; }

  header, .site-header {
    padding: 18px 16px 14px;
  }

  /* Brand row first, nav on its own line beneath it — side by side there is not
     enough width for four links without either wrapping raggedly or clipping. */
  .header-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding-bottom: 12px;
  }

  /* Wraps to a second line on narrow phones rather than scrolling sideways, so
     every destination stays visible without a gesture to discover. */
  .site-nav { gap: 2px; }

  .nav-link { padding: 7px 10px; font-size: 13px; }

  .logo {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .brand { font-size: 17px; }

  h1, .page-title { font-size: 20px; }
  .page-title { margin-top: 14px; }

  .subtitle {
    margin-top: 7px;
    font-size: 13.5px;
  }

  .controls {
    padding: 0 16px;
    gap: 8px;
  }

  .search-box {
    min-width: 0;
    max-width: none;
    flex: 1 1 100%;
    order: -1;
  }

  .search-box input { font-size: 16px; } /* 16px keeps iOS from zooming on focus */

  .tabs, .filter-pills {
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
  }

  /* All three view tabs are primary navigation; the strip overflowed by ~24px,
     which left "Popular" off-screen behind a scroll most people never try.
     Dropping the decorative icons buys back more than enough room. */
  .tab-ico { display: none; }
  .tab { padding: 7px 10px; font-size: 12.5px; white-space: nowrap; }
  .pill { padding: 7px 11px; font-size: 12.5px; }

  .status-bar { padding: 0 16px; }

  main { padding: 0 12px; margin: 16px auto 40px; }

  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .card {
    padding: 12px 10px;
    gap: 8px;
    align-items: center;
    text-align: center;
    border-radius: 16px;
  }

  .card-top { flex-direction: column; align-items: center; gap: 8px; }

  .card .icon { width: 68px; height: 68px; border-radius: 16px; }

  .card-title {
    font-size: 13px;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .card-dev, .card .meta-row, .card .badge-row .badge:not(.rating):not(.new):not(.installs) {
    display: none;
  }

  .card .badge-row {
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
  }

  .card .badge {
    font-size: 10px;
    padding: 3px 6px;
  }

  .modal-backdrop { padding: 0; align-items: flex-end; }

  .modal {
    max-width: 100%;
    max-height: 88dvh; /* dvh keeps the sheet clear of mobile browser chrome */
    border-radius: 20px 20px 0 0;
  }

  /* Bottom-sheet header: the close button is pinned to the corner instead of
     riding at the end of a flex row, so no sibling can ever push it off-screen.
     The title block is padded to keep clear of it. */
  .modal .modal-header {
    position: sticky;
    top: 0;
    padding: 14px 16px 12px;
    gap: 10px;
    padding-right: 60px;
    border-bottom: 1px solid var(--border);
  }

  .detail-header { padding: 18px 16px 12px; gap: 10px; }

  .modal .modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    font-size: 17px;
    margin-left: 0;
    background: var(--bg-elev);
    z-index: 3;
  }

  .modal-icon, .detail-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }

  .modal-title, .detail-title { font-size: 16.5px; }

  .modal-stats, .detail-stats { padding: 0 16px 12px; gap: 6px; }
  .stat-chip { padding: 6px 10px; font-size: 11.5px; }

  .modal-screens, .detail-screens { padding: 0 16px 16px; }
  .modal-screens img, .detail-screens img { height: 180px; }

  .modal-desc, .detail-desc { padding: 0 16px 16px; font-size: 13px; }

  /* Clear the iPhone home indicator */
  .modal-footer { padding: 12px 16px calc(20px + env(safe-area-inset-bottom)); flex-wrap: wrap; }
  .detail-footer { padding: 12px 16px 20px; }
  .modal-footer .play-btn { flex: 1 1 140px; }

  .detail-page { padding: 20px 14px 48px; }
  .related-section { padding: 0 14px; }

  .detail-chart { padding: 0 16px 16px; }
  .bar-row { grid-template-columns: 104px 1fr 56px; gap: 8px; }
  .bar-label, .bar-value { font-size: 11.5px; }
  .insight-section h2 { font-size: 15.5px; }
  .data-table { font-size: 12px; }
  .data-table td, .data-table th { padding: 8px 7px; }

  .filter-label { width: auto; }
  .filter-row { gap: 8px; }
  .changes { display: none; }
  .chart-table .rank { width: 30px; }
}

/* ——— Footer ——— */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 56px;
  padding: 28px var(--gutter) 40px;
  background: var(--bg-elev);
}

.footer-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand { font-size: 14px; font-weight: 700; color: var(--text); }
.footer-line { font-size: 13px; color: var(--text-dim); margin-top: 4px; }
.footer-line a { color: var(--accent-2); text-decoration: none; }
.footer-line a:hover { text-decoration: underline; }

.footer-links { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
.footer-links a { font-size: 13px; color: var(--text-dim); text-decoration: none; }
.footer-links a:hover { color: var(--accent-2); }

.footer-note {
  max-width: var(--page-max);
  margin: 22px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--text-faint);
}

/* ——— Legal pages ——— */
.legal-page { max-width: 760px; }
.legal-title { font-size: 26px; font-weight: 700; margin: 0 0 6px; letter-spacing: -0.02em; }
.legal-meta { font-size: 12.5px; color: var(--text-faint); margin: 0 0 24px; }
.legal-page h3 { font-size: 16px; font-weight: 700; margin: 30px 0 8px; }
.legal-page p { font-size: 14px; line-height: 1.7; color: var(--text-dim); margin: 0 0 12px; }
.legal-page p b { color: var(--text); }
.legal-page a { color: var(--accent-2); }

@media (max-width: 640px) {
  .site-footer { padding: 24px 16px 32px; }
  .footer-inner { flex-direction: column; gap: 18px; }
  .legal-title { font-size: 21px; }
  .legal-page p { font-size: 13.5px; }
}

/* Very narrow phones (SE-class, 320px). The view tabs still overflowed by a
   hair after the icons came off; tightening the strip alone closes it, so all
   three stay reachable without a sideways scroll nobody discovers. */
@media (max-width: 340px) {
  .tabs { gap: 3px; padding: 3px; }
  .tab { padding: 7px 7px; font-size: 12px; }
}


/* ——— Signals list (game + studio analytics) ——— */
.analytics-list { list-style: none; margin: 0; padding: 0; font-size: 13.5px; color: var(--text-dim); }
.analytics-list li { padding: 8px 0; border-bottom: 1px solid var(--border); line-height: 1.5; }
.analytics-list li:last-child { border-bottom: 0; }
.analytics-list .al-k { display: inline-block; min-width: 130px; color: var(--text-faint); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.analytics-list b { color: var(--text); }
.analytics-list b.up, .analytics-list .up { color: var(--accent-2); }
.analytics-list b.down, .analytics-list .down, .down { color: var(--new-badge); }
.analytics-list a { color: var(--text); }
.analytics-list .muted { color: var(--text-faint); }
.sub-h { font-size: 15px; margin: 22px 0 6px; color: var(--text); }
.sub-h .muted { color: var(--text-faint); font-weight: 500; font-size: 13px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pill-row .pill { text-decoration: none; }

.detail-actions { display: flex; align-items: center; gap: 10px; padding: 0 24px 16px; flex-wrap: wrap; }
.detail-actions .follow-btn.small { margin-left: 0; }
.detail-followers { font-size: 12px; color: var(--text-faint); }
.compare-btn {
  background: transparent; color: var(--text-dim); border: 1px solid var(--border);
  border-radius: 999px; padding: 5px 11px; font-size: 11.5px; cursor: pointer; font-weight: 600;
}
.compare-btn:hover { border-color: var(--accent); color: var(--text); }
.compare-btn.active { border-color: var(--accent-2); color: var(--accent-2); }

.compare-bar {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
  background: var(--card); border: 1px solid var(--border); border-radius: 999px;
  box-shadow: var(--shadow); padding: 8px 8px 8px 16px; display: flex; align-items: center; gap: 12px;
  z-index: 50; max-width: calc(100vw - 32px); font-size: 12.5px;
}
.compare-bar-names { display: flex; gap: 6px; overflow: hidden; white-space: nowrap; color: var(--text-dim); }
.compare-bar-names span { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.compare-bar-names span + span::before { content: '·'; margin-right: 6px; color: var(--text-faint); }
.compare-bar-go { background: var(--accent); color: #fff; text-decoration: none; border-radius: 999px; padding: 6px 14px; font-weight: 700; white-space: nowrap; }
.compare-bar-go[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.compare-bar-clear { background: none; border: 0; color: var(--text-faint); font-size: 18px; cursor: pointer; padding: 0 4px; }
.compare-table th[scope="row"] { text-align: left; color: var(--text-faint); font-weight: 600; white-space: nowrap; }
.compare-table thead th .studio-game span { display: inline-block; padding-bottom: 2px; }
.cmp-line { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.cmp-dot { stroke: var(--card); stroke-width: 1.5; }
.cmp-end { font-size: 12px; font-weight: 700; font-family: inherit; }
.growth-chart .grid.base { stroke: var(--text-faint); }
.cmp-key .muted { color: var(--text-faint); font-weight: 500; }
.cmp-legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 8px 0 0; font-size: 12.5px; color: var(--text-dim); }
.cmp-key i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ——— Transfers ——— */
.flow-holder { overflow-x: auto; }
.flow-chart { width: 100%; min-width: 560px; height: auto; display: block; }
.flow-chart .ribbon { fill: var(--accent); fill-opacity: .28; stroke: none; transition: fill-opacity .15s; }
.flow-chart .ribbon:hover { fill-opacity: .7; }
.flow-chart .node.l { fill: var(--text-dim); }
.flow-chart .node.r { fill: var(--accent-2); }
.flow-chart .node-label { fill: var(--text); font-size: 13px; font-weight: 600; }
.flow-chart .node-count { fill: var(--text-faint); font-weight: 500; }
.flow-chart a:hover .node-label { fill: var(--accent-2); }
.flow-chart .axis-label { fill: var(--text-faint); font-size: 10.5px; letter-spacing: .08em; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.data-table td.arrow { color: var(--text-faint); text-align: center; width: 30px; }
@media (max-width: 800px) {
  .two-col { grid-template-columns: 1fr; }
  .analytics-list .al-k { display: block; min-width: 0; margin-bottom: 2px; }
}

/* --- Weekly watchlist page + email subscribe box ------------------------ */
.wl-page { max-width: var(--read-max); }
.wl-kicker { color: var(--accent-2); text-transform: uppercase; letter-spacing: .1em; font-size: 12px; font-weight: 600; margin: 4px 0 18px; }
.wl-method { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; font-size: 14px; color: var(--text-dim); line-height: 1.5; margin-bottom: 32px; }
.wl-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; margin-bottom: 28px; box-shadow: var(--shadow); }
.wl-shots { display: flex; gap: 4px; overflow-x: auto; background: #000; scroll-snap-type: x mandatory; scrollbar-width: none; }
.wl-shots::-webkit-scrollbar { display: none; }
.wl-shots img { height: 280px; flex: 0 0 auto; scroll-snap-align: start; object-fit: cover; }
.wl-body { padding: 18px 20px 20px; }
.wl-head { display: flex; gap: 14px; align-items: flex-start; }
.wl-icon { width: 56px; height: 56px; border-radius: 14px; flex: 0 0 auto; }
.wl-num { color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: .1em; }
.wl-title { margin: 2px 0 4px; font-size: 22px; line-height: 1.15; }
.wl-title a { text-decoration: none; }
.wl-title a:hover { color: var(--accent-2); }
.wl-dev { color: var(--text-dim); font-size: 14px; }
.wl-tag { color: var(--accent-2); }
.wl-summary { color: var(--text-dim); font-size: 15px; line-height: 1.5; margin: 14px 0 12px; }
.wl-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.wl-stats div { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 10px; padding: 10px 8px; text-align: center; }
.wl-stats b { display: block; font-size: 18px; }
.wl-stats span { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .06em; }
.wl-why { margin: 6px 0 10px; font-size: 14px; border-left: 3px solid var(--accent); padding-left: 10px; line-height: 1.45; }
.wl-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.wl-chip { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: rgba(43,212,138,.12); color: var(--accent-2); }
.wl-chip.dim { background: rgba(144,153,176,.12); color: var(--text-dim); }
.wl-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.wl-btn { display: inline-block; padding: 10px 16px; border-radius: 10px; background: var(--accent); color: #fff; text-decoration: none; font-weight: 600; font-size: 14px; }
.wl-btn.ghost { background: transparent; border: 1px solid var(--border); color: var(--text-dim); }
.wl-btn:hover { filter: brightness(1.1); }
.wl-foot { color: var(--text-faint); font-size: 13px; line-height: 1.5; margin-top: 30px; }

.wl-subscribe { background: linear-gradient(135deg, rgba(140,155,255,.18), rgba(43,212,138,.12)), var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 22px 24px; margin: 36px 0 10px; }
.wl-subscribe h3 { margin: 0 0 6px; font-size: 20px; }
.wl-subscribe p { margin: 0 0 14px; color: var(--text-dim); font-size: 14px; line-height: 1.5; }
.subscribe-form { display: flex; gap: 8px; max-width: 460px; }
.subscribe-form input { flex: 1; min-width: 0; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 15px; }
.subscribe-form input:focus { outline: none; border-color: var(--accent); }
.subscribe-form button { padding: 11px 18px; border-radius: 10px; border: 0; background: var(--accent); color: #fff; font-weight: 600; font-size: 14px; cursor: pointer; }
.subscribe-form button:disabled { opacity: .6; cursor: default; }
.subscribe-msg { margin-top: 10px; font-size: 14px; color: var(--accent-2); min-height: 1em; }
.home-subscribe { max-width: var(--page-max); margin: 30px auto 0; box-sizing: border-box; width: calc(100% - 2 * var(--gutter)); display: grid; grid-template-columns: 1fr auto; gap: 18px 28px; align-items: center; }
.home-subscribe .subscribe-msg { grid-column: 1 / -1; margin-top: 0; }
@media (max-width: 720px) {
  .wl-stats { grid-template-columns: repeat(2, 1fr); }
  .wl-shots img { height: 200px; }
  .home-subscribe { grid-template-columns: 1fr; width: calc(100% - 32px); }
  .subscribe-form { max-width: none; }
}

/* Click-to-load trailer in the screenshot strip */
.detail-video { position: relative; flex-shrink: 0; height: 260px; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; cursor: pointer; }
.detail-video img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; display: block; opacity: .85; }
.detail-video .video-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 64px; height: 64px; border-radius: 50%; border: 0; background: rgba(140,155,255,.92); color: #fff; font-size: 24px; cursor: pointer; box-shadow: 0 6px 24px rgba(0,0,0,.5); }
.detail-video:hover .video-play { background: var(--accent); }
.detail-video .video-label { position: absolute; left: 12px; top: 10px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; }
.detail-video iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 720px) { .detail-video { height: 200px; } }

/* Reviews block on the game page */
.rv-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.rv-avg b { font-size: 26px; display: block; line-height: 1; color: var(--star); }
.rv-avg span { font-size: 12.5px; color: var(--text-dim); }
.rv-dist { display: flex; gap: 6px; align-items: flex-end; }
.rv-bar { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 22px; }
.rv-bar i { display: block; width: 14px; background: var(--accent); border-radius: 3px 3px 0 0; }
.rv-bar b { font-size: 10px; color: var(--text-faint); font-weight: 600; }
.rv-topics { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.rv-topic { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(144,153,176,.12); color: var(--text-dim); }
.rv-topic b { color: var(--text); }
.rv-topic.neg { background: rgba(255,106,79,.12); color: var(--neg-text); }
.rv-topic.neg b { color: var(--neg-text); }
.rv-topic.pos { background: rgba(43,212,138,.12); color: var(--accent-2); }
.rv-topic.pos b { color: var(--accent-2); }
.rv-versions { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12.5px; color: var(--text-dim); margin: 4px 0 10px; }
.rv-quote { margin: 8px 0 0; padding: 8px 12px; border-left: 3px solid var(--border); font-size: 13px; color: var(--text-dim); line-height: 1.5; }
.rv-score { color: var(--star); font-size: 11px; letter-spacing: .05em; margin-right: 4px; }
.review-empty { font-size: 13px; }

/* Studio ads footprint */
.ad-creatives { margin-top: 8px; }
.ad-cr-fmt { display: inline-block; min-width: 46px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-2); font-weight: 600; }
.section-note { color: var(--text-dim); font-size: 13px; margin: -6px 0 12px; }

/* --- Signals: game-page card ------------------------------------------ */
.signals-card { margin: 4px 24px 22px; padding: 16px 18px 8px; border-radius: 14px; border: 1px solid rgba(140,155,255,.35);
  background: linear-gradient(135deg, rgba(140,155,255,.14), rgba(43,212,138,.08)), var(--card); box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.signals-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.signals-head h2 { margin: 0; font-size: 18px; letter-spacing: -.01em; }
.signals-count { font-size: 13px; color: var(--text-dim); }
.signals-count b.up { color: var(--accent-2); } .signals-count b.down { color: var(--new-badge); }
.signals-all { margin-left: auto; font-size: 13px; color: var(--accent-2); text-decoration: none; }
.signals-all:hover { text-decoration: underline; }
.signals-list li.sig { position: relative; padding: 10px 0 10px 34px; font-size: 14px; }
.signals-list .sig-ico { position: absolute; left: 0; top: 9px; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-size: 13px; background: rgba(144,153,176,.14); }
.signals-list .sig-good .sig-ico { background: rgba(43,212,138,.18); }
.signals-list .sig-bad .sig-ico { background: rgba(255,106,79,.2); }
.signals-list .sig-bad { color: var(--text); }
@media (max-width: 720px) { .signals-card { margin: 4px 16px 18px; } .signals-all { margin-left: 0; } }

/* --- Signals: weekly page ---------------------------------------------- */
.sg-kicker { color: var(--accent-2); text-transform: uppercase; letter-spacing: .1em; font-size: 12px; font-weight: 600; margin: 4px 0 14px; }
.sg-jumps { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.sg-jump { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--text-dim); text-decoration: none; font-size: 13px; }
.sg-jump b { color: var(--text); margin-left: 4px; }
.sg-jump:hover { border-color: var(--accent); color: var(--text); }
.sg-jump.empty { opacity: .5; }
.sg-section h2 { display: flex; align-items: center; gap: 8px; }
.sg-emoji { font-size: 20px; }
.sg-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 10px; }
.sg-card { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.sg-card:hover { border-color: rgba(140,155,255,.5); }
.sg-icon { width: 44px; height: 44px; border-radius: 11px; flex: 0 0 auto; background: var(--bg-elev); }
.sg-icon-text { display: grid; place-items: center; font-size: 20px; }
.sg-body { flex: 1; min-width: 0; }
.sg-title { font-weight: 700; font-size: 14.5px; color: var(--text); text-decoration: none; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-title:hover { color: var(--accent-2); }
.sg-meta { font-size: 12px; color: var(--text-faint); margin: 1px 0 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-meta a, .sg-studio { color: var(--text-dim); text-decoration: none; }
.sg-line { font-size: 13px; color: var(--text-dim); line-height: 1.45; }
.sg-line b { color: var(--text); }
.sg-line a { color: var(--text); }
.sg-quote { display: block; margin-top: 5px; font-style: italic; color: var(--text-faint); font-size: 12.5px; }
.sg-badge { flex: 0 0 auto; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 8px; background: rgba(144,153,176,.14); color: var(--text-dim); text-decoration: none; white-space: nowrap; }
.sg-badge.up { background: rgba(43,212,138,.16); color: var(--accent-2); }
.sg-badge.down { background: rgba(255,106,79,.16); color: var(--neg-text); }
.sg-badge.gold { background: rgba(255,201,77,.16); color: var(--star); }
.sg-empty { font-size: 14px; }
@media (max-width: 720px) { .sg-grid { grid-template-columns: 1fr; } }

.wl-focus { display: flex; gap: 8px; margin: 0 0 14px; }
.wl-focus .pill { text-decoration: none; }

/* --- Public ad gallery -------------------------------------------------- */
.adg-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.adg-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.adg-media { position: relative; background: #000; }
.adg-media img { width: 100%; display: block; object-fit: cover; }
.adg-video { cursor: pointer; aspect-ratio: 16 / 9; }
.adg-video.port { aspect-ratio: 9 / 16; max-height: 420px; }
.adg-video.sq { aspect-ratio: 1 / 1; }
.adg-video img { height: 100%; opacity: .9; }
.adg-video button { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 54px; height: 54px; border-radius: 50%; border: 0; background: rgba(140,155,255,.92); color: #fff; font-size: 20px; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.5); }
.adg-video iframe { width: 100%; height: 100%; border: 0; display: block; }
.adg-image img { max-height: 360px; object-fit: contain; background: #fff; }
.adg-text { padding: 10px 12px 0; font-size: 13px; color: var(--text-dim); line-height: 1.45; }
.adg-text b { display: block; color: var(--text); font-size: 14px; margin-bottom: 3px; }
.adg-meta { padding: 8px 12px 10px; font-size: 11.5px; color: var(--text-faint); margin-top: auto; }
.adg-kind { color: var(--accent-2); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.adg-app { display: block; padding: 0 12px 10px; font-size: 12.5px; color: var(--accent-2); text-decoration: none; }
.detail-chart .adg-section { margin-bottom: 0; }
.detail-chart .adg-section h2 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-dim); }

/* Uniform video tiles: portrait thumbnails used to stretch the whole row. */
.adg-grid { align-items: start; }
.adg-video, .adg-video.port, .adg-video.sq { aspect-ratio: 4 / 3; max-height: none; }
.adg-video img { width: 100%; height: 100%; object-fit: cover; }
.adg-video.playing.port { aspect-ratio: 9 / 16; }
.adg-image img { max-height: 260px; }

/* --- Ads feed page ------------------------------------------------------ */
.adf-filters { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 18px; }
.adf-row { display: flex; gap: 10px; align-items: flex-start; }
.adf-row .filter-pills { flex-wrap: wrap; flex: 1; }
.adf-row .pill { text-decoration: none; }
.adg-studio { display: block; padding: 10px 12px 0; font-size: 13px; font-weight: 700; color: var(--text); text-decoration: none; }
.adg-studio:hover { color: var(--accent-2); }
.adf-page .adg-section { margin-bottom: 20px; }
.adf-pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 10px 0 30px; }
.adf-pager .pill { text-decoration: none; }

.brand-tag { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-2); background: rgba(43,212,138,.14); padding: 2px 7px; border-radius: 6px; margin-left: 6px; vertical-align: middle; }

.wl-cats { flex-wrap: wrap; }

/* --- Navbar search ------------------------------------------------------ */
.nav-search { position: relative; margin-left: 10px; }
.nav-search input { width: 230px; padding: 8px 12px 8px 32px; border-radius: 9px; border: 1px solid var(--border); background: var(--bg-elev) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239099b0' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 10px center; color: var(--text); font-size: 13.5px; transition: width .15s, border-color .15s; }
.nav-search input:focus { outline: none; border-color: var(--accent); width: 300px; }
.nav-search input::-webkit-search-cancel-button { display: none; }
.nav-search-results { position: absolute; right: 0; top: calc(100% + 6px); width: 360px; max-height: 70vh; overflow-y: auto; background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); z-index: 50; padding: 6px; }
.nav-search-results .ns-head { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); padding: 8px 8px 4px; font-weight: 700; }
.nav-search-results a { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; text-decoration: none; color: var(--text); font-size: 13.5px; }
.nav-search-results a:hover, .nav-search-results a.on { background: var(--bg-elev); }
.nav-search-results .ns-ico { width: 28px; height: 28px; border-radius: 7px; flex: 0 0 auto; display: grid; place-items: center; background: var(--bg-elev); font-size: 14px; }
.nav-search-results .ns-t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-search-results .ns-t small { display: block; color: var(--text-faint); font-size: 11.5px; }
.nav-search-results .ns-m { color: var(--text-faint); font-size: 12px; white-space: nowrap; }
.nav-search-results .ns-all { justify-content: center; color: var(--accent-2); font-size: 13px; border-top: 1px solid var(--border); margin-top: 4px; border-radius: 0 0 8px 8px; }
@media (max-width: 900px) { .nav-search { margin-left: 0; width: 100%; } .nav-search input, .nav-search input:focus { width: 100%; } .nav-search-results { width: 100%; } }

/* --- Top charts: left filter panel, two lists side by side -------------- */
.tc-layout { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--gutter) 40px; display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; }
.tc-side { position: sticky; top: 16px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 18px; }
.tc-group { display: flex; flex-direction: column; gap: 8px; }
.tc-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); }
.tc-side select { width: 100%; padding: 9px 10px; border-radius: 9px; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); font-size: 13.5px; }
.tc-side select:focus { outline: none; border-color: var(--accent); }
.tc-radios { display: flex; flex-wrap: wrap; gap: 6px; }
.tc-radio { cursor: pointer; padding: 6px 11px; border-radius: 8px; border: 1px solid var(--border); font-size: 13px; color: var(--text-dim); background: var(--bg-elev); }
.tc-radio input { display: none; }
.tc-radio.on { border-color: var(--accent); color: var(--text); background: rgba(140,155,255,.18); }
.tc-year { margin-top: 2px; }
.tc-main { min-width: 0; }
.tc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.tc-col { min-width: 0; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 14px 14px 6px; }
.tc-col-head h2 { margin: 0; font-size: 18px; }
.tc-col-head p { margin: 4px 0 10px; font-size: 12.5px; color: var(--text-faint); }
.tc-table td { vertical-align: middle; }
.tc-rank { width: 34px; color: var(--text-faint); font-weight: 700; font-variant-numeric: tabular-nums; }
.tc-game { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); min-width: 0; }
.tc-game img, .tc-noicon { width: 36px; height: 36px; border-radius: 9px; flex: 0 0 auto; background: var(--bg-elev); }
.tc-game span { min-width: 0; }
.tc-game b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.tc-game small { display: block; color: var(--text-faint); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.tc-game:hover b { color: var(--accent-2); }
.tc-tag { color: var(--text-dim); font-size: 12.5px; white-space: nowrap; }
.tc-table td.num b { display: block; }
.tc-table td.num b.up { color: var(--accent-2); }
.tc-table td.num small { display: block; color: var(--text-faint); font-size: 11.5px; }
.tc-empty { padding: 20px 4px; }
@media (max-width: 1100px) { .tc-cols { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .tc-layout { grid-template-columns: 1fr; padding: 0 16px 30px; } .tc-side { position: static; } .tc-tag { display: none; } }

.inline-select { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); font-size: 13px; }
.transfer-filters { flex-wrap: wrap; }

.adf-search { display: flex; gap: 8px; margin: 4px 0 16px; max-width: 620px; }
.adf-search input { flex: 1; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); font-size: 14px; }
.adf-search input:focus { outline: none; border-color: var(--accent); }
.adf-search button { padding: 10px 16px; border-radius: 10px; border: 0; background: var(--accent); color: #fff; font-weight: 600; cursor: pointer; }
.adf-clear { align-self: center; color: var(--text-dim); font-size: 13px; }

/* --- Weekly lists --------------------------------------------------------- */
.wk-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 18px; }
.wk-tabs { display: flex; gap: 8px; }
.wk-tabs .pill { text-decoration: none; }
.wk-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.wk-item { display: grid; grid-template-columns: 34px 52px 1fr repeat(3, 92px) 34px; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; }
.wk-rank { font-size: 18px; font-weight: 800; color: var(--accent); text-align: center; }
.wk-icon { width: 52px; height: 52px; border-radius: 13px; }
.wk-main { min-width: 0; }
.wk-title { display: block; font-weight: 700; font-size: 15px; color: var(--text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-title:hover { color: var(--accent-2); }
.wk-dev { font-size: 12.5px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-stat { text-align: right; }
.wk-stat b { display: block; font-size: 15px; }
.wk-stat span { font-size: 10.5px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .05em; }
.wk-stat:first-of-type b { color: var(--accent-2); }
.wk-play { color: var(--text-dim); text-decoration: none; font-size: 18px; text-align: center; }
.wk-page .wl-subscribe h3 { margin-bottom: 12px; }
@media (max-width: 720px) { .wk-item { grid-template-columns: 26px 44px 1fr 80px; } .wk-item .wk-stat:nth-of-type(2), .wk-item .wk-stat:nth-of-type(3), .wk-play { display: none; } .wk-icon { width: 44px; height: 44px; } }

/* --- Insights: genre trends ------------------------------------------------ */
.gt-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 16px; }
.gt-pills .pill { cursor: pointer; font: inherit; font-size: 13px; }
.gt-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.gt-fig { margin: 0; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px 10px; }
.gt-fig figcaption { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-dim); margin-bottom: 6px; }
.gt-svg { width: 100%; height: auto; display: block; }
.gt-grid { stroke: var(--border); stroke-width: 1; }
.gt-ax { fill: var(--text-faint); font-size: 10.5px; }
.gt-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12.5px; color: var(--text-dim); margin-top: 4px; }
.gt-legend i, .gt-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.gt-table tr.gt-on td { background: rgba(140,155,255,.07); font-weight: 600; }
.gt-empty { padding: 30px 10px; text-align: center; font-size: 13px; }
@media (max-width: 900px) { .gt-charts { grid-template-columns: 1fr; } }
.gt-note { margin: 6px 0 0; font-size: 11.5px; color: var(--text-faint); }

/* --- Navbar Tools dropdown -------------------------------------------------- */
.nav-tools { position: relative; }
.nav-tools-btn { border: 0; background: none; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.nav-tools.active > .nav-tools-btn { color: var(--text); background: var(--card); box-shadow: 0 0 0 1px var(--border) inset; }
.nav-new { font-size: 9px; font-weight: 800; letter-spacing: .06em; padding: 2px 5px; border-radius: 5px; background: var(--new-badge); color: #fff; line-height: 1.2; }
.nav-caret { font-size: 10px; color: var(--text-faint); }
.nav-tools-menu { position: absolute; left: 0; top: 100%; padding-top: 8px; min-width: 240px; z-index: 60; display: none; }
.nav-tools-menu::before { content: ''; position: absolute; inset: 8px 0 0; background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); z-index: -1; }
.nav-tools:hover .nav-tools-menu, .nav-tools:focus-within .nav-tools-menu, .nav-tools.open .nav-tools-menu { display: block; }
.nav-tools-menu a { display: block; margin: 6px; padding: 9px 11px; border-radius: 9px; text-decoration: none; color: var(--text); }
.nav-tools-menu a:hover { background: var(--bg-elev); }
.nav-tools-menu a b { display: block; font-size: 14px; }
.nav-tools-menu a span { display: block; font-size: 12px; color: var(--text-faint); margin-top: 2px; }

/* --- Compare tool ------------------------------------------------------------ */
.tl-tabs { display: flex; gap: 8px; margin: 0 0 16px; }
.tl-tabs .pill { text-decoration: none; font-size: 14px; padding: 8px 16px; }
.tl-picker { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 10px; margin-bottom: 24px; }
.tl-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 8px 5px 5px; border-radius: 10px; background: var(--bg-elev); border: 1px solid var(--border); font-size: 13.5px; font-weight: 600; }
.tl-chip img { width: 26px; height: 26px; border-radius: 7px; }
.tl-chip a { color: var(--text-faint); text-decoration: none; font-size: 16px; padding: 0 4px; }
.tl-chip a:hover { color: var(--new-badge); }
.tl-add { position: relative; flex: 1; min-width: 220px; }
.tl-add input { width: 100%; padding: 9px 12px; border-radius: 9px; border: 1px solid transparent; background: transparent; color: var(--text); font-size: 14px; }
.tl-add input:focus { outline: none; border-color: var(--accent); background: var(--bg-elev); }
.tl-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); z-index: 40; padding: 6px; max-height: 360px; overflow-y: auto; }
.tl-suggest button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 7px 8px; border: 0; background: none; color: var(--text); border-radius: 8px; cursor: pointer; font: inherit; font-size: 13.5px; }
.tl-suggest button:hover { background: var(--bg-elev); }
.tl-suggest img { width: 28px; height: 28px; border-radius: 7px; }
.tl-suggest small { display: block; color: var(--text-faint); font-size: 11.5px; }
.tl-none { padding: 10px; color: var(--text-faint); font-size: 13px; }
.tl-hint { padding: 20px 0; }
.tl-tagpick { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.tl-group { display: flex; flex-direction: column; gap: 6px; }
.tl-tagpick .pill { text-decoration: none; }
.tl-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 7px; vertical-align: -1px; }
.tl-table th { white-space: nowrap; }
.tl-table td.tl-best { color: var(--accent-2); font-weight: 700; }
.tl-tops { display: grid; gap: 12px; }
.tl-top { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; min-width: 0; }
.tl-top h3 { margin: 0 0 8px; font-size: 14px; }
.tl-top ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tl-top li { display: flex; align-items: center; gap: 8px; justify-content: space-between; font-size: 13px; }
.tl-top li a { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--text); text-decoration: none; }
.tl-top li a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-top li img { width: 26px; height: 26px; border-radius: 7px; flex: 0 0 auto; }
.tl-top li b { color: var(--accent-2); font-size: 12.5px; white-space: nowrap; }
@media (max-width: 800px) { .tl-tops { grid-template-columns: 1fr !important; } }

/* Tag pickers wrap instead of running out of their box. */
.tl-tagpick .filter-pills { flex-wrap: wrap; overflow: visible; }
/* Header fits logo + nav (with Tools) + search on one row at 1200px. */
.nav-link { padding: 7px 10px; }
.nav-search input { width: 180px; }
.nav-search input:focus { width: 250px; }
@media (max-width: 1240px) { .nav-search { width: 100%; margin: 8px 0 0; } .nav-search input, .nav-search input:focus { width: 100%; } }

/* --- Game mechanics ------------------------------------------------------- */
.mech-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 14px 0 4px; }
.mech-chips-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); text-decoration: none; margin-right: 4px; }
.mech-chips-label:hover { color: var(--accent-2); }
.mech-chip { display: inline-block; padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; text-decoration: none; border: 1px solid rgba(43,212,138,.35); background: rgba(43,212,138,.10); color: var(--accent-2); }
.mech-chip.meta { border-color: var(--border); background: var(--bg-elev); color: var(--text-dim); font-weight: 500; }
.mech-chip:hover { border-color: var(--accent-2); color: var(--text); }
.mech-sep { width: 1px; height: 18px; background: var(--border); margin: 0 4px; }
.mech-page { max-width: 980px; }
.mech-table td { vertical-align: middle; }
.mech-table td:first-child { max-width: 360px; }
.mech-cats { font-size: 12px; color: var(--text-faint); }
.data-table .mech-cats a { font-weight: 500; color: var(--text-dim); }
.mech-bar { height: 3px; border-radius: 2px; background: var(--border); margin-top: 5px; min-width: 70px; }
.mech-bar span { display: block; height: 100%; border-radius: 2px; background: var(--accent-2); }
.mech-leaders { display: flex; gap: 4px; }
.mech-leaders img, .mech-leaders .tc-noicon { width: 28px; height: 28px; border-radius: 7px; display: block; }
.mech-ev { font-size: 12px; color: var(--text-faint); max-width: 260px; }
.mech-conf { display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 1px 6px; border-radius: 5px; margin-right: 4px; background: var(--bg-elev); color: var(--text-faint); }
.mech-conf.high { color: var(--accent-2); background: rgba(43,212,138,.12); }
.mech-conf.medium { color: var(--star); background: rgba(255,201,77,.10); }
.mech-layer { font-size: 12px; font-weight: 600; color: var(--text-faint); border: 1px solid var(--border); border-radius: 6px; padding: 2px 7px; vertical-align: middle; }
.mech-page .filter-row { margin: 10px 0; }
.mech-page .adf-pager { margin-top: 14px; align-items: center; gap: 10px; }
.mech-browse { margin-top: 18px; }
.mech-browse a, .mech-page .section-note a { color: var(--accent-2); text-decoration: none; }
.filter-label-link { color: inherit; text-decoration: none; } .filter-label-link:hover { color: var(--accent-2); }
.detail-card .mech-chips { padding: 0 24px; margin: 0 0 14px; }
@media (max-width: 640px) { .detail-card .mech-chips { padding: 0 16px; } }
/* ——— Estimates (game page) ——— */
.info-tip { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin-left: 4px; border-radius: 50%; font-size: 12px; line-height: 1; color: var(--text-faint); cursor: help; text-transform: none; letter-spacing: 0; font-weight: 400; vertical-align: middle; outline: none; }
.info-tip:hover, .info-tip:focus { color: var(--accent-2); }
.info-tip-body { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); width: max-content; max-width: min(280px, 80vw); padding: 8px 10px; border-radius: 8px; background: var(--bg-elev); border: 1px solid var(--border); box-shadow: var(--shadow); color: var(--text); font-size: 12px; line-height: 1.45; text-align: left; white-space: normal; opacity: 0; visibility: hidden; transition: opacity .12s; z-index: 20; pointer-events: none; }
.info-tip:hover .info-tip-body, .info-tip:focus .info-tip-body { opacity: 1; visibility: visible; }
.est-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.est-col { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.est-head { font-size: 13px; font-weight: 600; color: var(--text-dim); display: flex; align-items: center; }
.est-total { font-size: 24px; font-weight: 700; margin: 4px 0 10px; font-variant-numeric: tabular-nums; }
.est-total span { display: block; font-size: 11px; font-weight: 400; color: var(--text-faint); }
.est-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.est-list li { display: grid; grid-template-columns: minmax(0, 9.5em) 1fr 3em 4.2em; align-items: center; gap: 8px; font-size: 12.5px; }
.est-c { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.est-bar { height: 6px; background: var(--card); border-radius: 3px; overflow: hidden; }
.est-bar i { display: block; height: 100%; background: var(--accent-2); border-radius: 3px; }
.est-list b { text-align: right; font-variant-numeric: tabular-nums; }
.est-v { text-align: right; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.est-other .est-c, .est-other b { color: var(--text-faint); font-weight: 400; }
.est-other .est-bar i { background: var(--text-faint); }
/* ——— SDKs (game page block, /sdks, /sdk/:id) ——— */
.sdk-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; vertical-align: middle; }
.sdk-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); font-size: 12.5px; font-weight: 600; text-decoration: none; }
.analytics-list a.sdk-chip { color: var(--text); }
a.sdk-chip:hover { border-color: var(--accent); color: var(--accent-2); }
.sdk-chip.inferred { border-style: dashed; }
.sdk-chip.plain { font-weight: 500; color: var(--text-dim); }
.sdk-ver { font-weight: 500; font-size: 11px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.sdk-block .analytics-list li { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.sdk-adapters { margin-top: 10px; font-size: 13px; color: var(--text-dim); }
.sdk-adapters summary { cursor: pointer; }
.sdk-adapters p { margin: 6px 0 8px; font-size: 12px; }
.sdk-note { font-size: 12px; margin: 10px 0 0; }
.sdk-sorts .pill { text-decoration: none; }
.sdk-cat { font-weight: 500 !important; color: var(--text-dim) !important; }
.home-sdk-select { padding: 7px 10px; border-radius: 9px; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); font-size: 13px; width: 300px; max-width: 100%; }


/* ——— Dispatch layer ———
   Editorial headings (serif), data in mono, ink-inverted selection instead of
   purple gradients. Kept at the end so it wins over the base rules above. */
.header-bar { border-bottom: 2px solid var(--text); }
.logo { box-shadow: none; border-radius: 0; }
.brand { font-weight: 700; letter-spacing: -0.03em; }
.nav-link { border-radius: 0; font-weight: 500; }
.nav-link:hover { background: transparent; }
.nav-link.active { background: transparent; box-shadow: inset 0 -2px 0 var(--text); }
.page-title, .detail-page > h1, h1 {
  font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em;
}
.detail-title, .studio-name { font-size: clamp(28px, 4vw, 38px); line-height: 1.05; }
.page-title { font-size: 44px; line-height: 1; margin-top: 26px; }
.insight-section h2, h2.section-title {
  font-family: var(--serif); font-weight: 400; font-size: 30px; letter-spacing: 0; line-height: 1.1;
}
.insight-section h2 .muted { font-family: var(--mono); font-size: 12px; font-weight: 400; letter-spacing: 0; }
.tile-value, .num, td.num, .pill-count, .badge.installs, .badge.rating {
  font-family: var(--mono); font-feature-settings: "zero";
}
.tile-value { font-weight: 500; letter-spacing: -0.03em; }
.tile-value.small { font-family: inherit; }
.stat-tile { border-radius: 0; background: transparent; border: 0; border-top: 1px solid var(--border); padding: 14px 4px 4px; }
.tile-label { font-size: 12px; }
.tab.active, .pill.active {
  background: var(--text); color: var(--bg); box-shadow: none;
}
.tab.active svg, .tab.active img { filter: none; }
.picker-label, .filter-label, .section-label {
  font-family: var(--mono); letter-spacing: .12em; text-transform: uppercase; font-size: 11px;
}
td.arrow { color: var(--accent); font-family: var(--mono); }
@media (max-width: 640px) {
  .page-title { font-size: 34px; }
  .insight-section h2 { font-size: 25px; }
}

/* Light "paper" theme: follows the system unless the visitor picked one with
   the header toggle (data-theme on <html>, remembered in localStorage). */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f3f0e8; --bg-elev: #eae6db; --card: #fbfaf6; --card-hover: #ffffff;
    --border: #d9d4c7; --border-strong: #b9b3a3;
    --text: #121418; --text-dim: #4a4e56; --text-faint: #7c7f86;
    --accent: #2b44ff; --accent-2: #0c8f57; --new-badge: #e5482f; --star: #b7791f;
    --neg-text: #c2361f; --shadow: 0 8px 24px rgba(18,20,24,0.10); --scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f3f0e8; --bg-elev: #eae6db; --card: #fbfaf6; --card-hover: #ffffff;
  --border: #d9d4c7; --border-strong: #b9b3a3;
  --text: #121418; --text-dim: #4a4e56; --text-faint: #7c7f86;
  --accent: #2b44ff; --accent-2: #0c8f57; --new-badge: #e5482f; --star: #b7791f;
  --neg-text: #c2361f; --shadow: 0 8px 24px rgba(18,20,24,0.10); --scheme: light;
}
:root { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { color-scheme: light; } }
.theme-toggle {
  flex: none; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--card); color: var(--text); cursor: pointer; font-size: 15px; line-height: 1;
  display: grid; place-items: center; padding: 0;
}
.theme-toggle:hover { border-color: var(--border-strong); }
@media (max-width: 900px) {
  /* Phone/tablet header: brand and theme toggle share the first row. */
  .header-bar { flex-direction: row; flex-wrap: wrap; align-items: center; row-gap: 10px; }
  .logo-link { order: 1; flex: 1 1 0; min-width: 0; width: auto; }
  .theme-toggle { order: 2; margin-left: auto; }
  .site-nav { order: 3; width: 100%; }
  .nav-search { order: 4; }
}

/* Games ⇄ apps catalogue switch (header, next to the brand). */
.catalog-switch {
  flex: none; display: inline-flex; padding: 2px; gap: 2px; border-radius: 999px; margin-left: 12px;
  border: 1px solid var(--border); background: var(--card);
}
.cs-opt {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1.2; color: var(--text-dim); text-decoration: none; white-space: nowrap;
}
a.cs-opt:hover { color: var(--text); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.cs-opt.on { background: var(--accent); color: #fff; }
.cs-ico { font-size: 11px; }
/* Narrower screens: only the way to the other catalogue, as one pill. */
@media (max-width: 1500px) {
  .catalog-switch { padding: 0; border: 0; background: none; }
  .cs-opt.on, .cs-ico { display: none; }
  a.cs-opt { border: 1px solid var(--border); background: var(--card); color: var(--text); }
  a.cs-opt::after { content: "→"; color: var(--accent); }
  .catalog-switch { margin-left: 0; }
  .nav-search input { width: 150px; }
  .nav-search input:focus { width: 220px; }
}
@media (max-width: 900px) {
  .header-bar { column-gap: 10px; }
  .catalog-switch { order: 2; margin-left: auto; }
  .catalog-switch + .site-nav ~ .theme-toggle, .theme-toggle { margin-left: 0; }
  .logo-link .brand-tag { display: none; }
}
@media (max-width: 480px) {
  .logo-link { gap: 8px; }
  .logo-link .logo { width: 34px; height: 34px; }
  .brand { font-size: 16px; }
  .theme-toggle { width: 30px; height: 30px; }
}

/* Meta Ad Library cards (private views) */
.meta-ad-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.meta-ad { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: var(--card); font-size: 14px; }
.meta-ad p { margin: 6px 0; color: var(--text-dim); white-space: pre-line; }
.meta-ad-head { font-size: 12px; margin-bottom: 4px; }
.meta-ad .badge-live { background: var(--accent-2); color: #fff; border-radius: 4px; padding: 1px 6px; margin-right: 6px; font-size: 11px; font-weight: 700; }

.meta-ad-media { display: block; width: 100%; max-height: 420px; object-fit: contain; background: #000; border-radius: 8px; margin: 6px 0 8px; }

/* Publisher detail (private) */
.pub-game { display: inline-flex; align-items: center; gap: 8px; }
.pub-game img { width: 28px; height: 28px; border-radius: 6px; }
.pub-st { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--border); white-space: nowrap; }
.pub-st-testing, .pub-st-region-test, .pub-st-pre-registration { color: #b77d00; border-color: #e0b04d; }
.pub-st-scaled { color: var(--accent-2); border-color: var(--accent-2); }
.pub-st-pulled { color: var(--neg-text); border-color: var(--neg-text); }
.pub-st-own { color: var(--accent); border-color: var(--accent); }

/* Idea Lab (private) */
.idea-card { border: 1px solid var(--border); border-radius: 14px; background: var(--card); padding: 18px 20px; margin: 0 0 22px; }
.idea-card header h2 { margin: 0; }
.idea-card header p { margin: 4px 0 12px; }
.idea-body { display: grid; grid-template-columns: minmax(260px, 380px) 1fr; gap: 22px; }
@media (max-width: 860px) { .idea-body { grid-template-columns: 1fr; } }
.idea-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); font-weight: 700; margin: 10px 0 4px; }
.idea-game { border: 1px solid var(--border); border-radius: 10px; padding: 10px; }
.idea-game-head { display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--text); }
.idea-game-head img { width: 44px; height: 44px; border-radius: 10px; }
.idea-game-head small { display: block; color: var(--text-dim); font-size: 12px; }
.idea-mech { font-size: 12px; color: var(--accent); margin: 6px 0; }
.idea-shots { display: flex; gap: 6px; overflow-x: auto; }
.idea-shots img { height: 190px; border-radius: 8px; }
.idea-plus { text-align: center; font-size: 26px; font-weight: 800; margin: 4px 0; }
.idea-concept p, .idea-concept ol { margin: 0 0 4px; }
.idea-stats { display: flex; flex-direction: column; gap: 3px; margin-top: 12px; font-size: 12px; color: var(--text-dim); border-top: 1px solid var(--border); padding-top: 8px; }
.idea-mock { width: 100%; max-width: 300px; border-radius: 22px; border: 6px solid #000; display: block; margin: 0 auto; }

.idea-move { font-size: 15px; }
.idea-move b { color: var(--accent-2); }
.idea-adv { list-style: none; padding: 0; margin: 4px 0 8px; display: grid; gap: 4px; }
.idea-adv li { font-size: 13px; }
.idea-adv span { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; margin-right: 6px; background: rgba(140,155,255,.14); color: #8c9bff; }

/* private pages */
.private-crumbs { margin: 0 0 14px; font-size: 14px; }
.private-hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 10px; }
.private-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); color: var(--text); text-decoration: none; }
.private-card:hover { background: var(--card-hover); border-color: var(--border-strong); }
.private-card b { font-size: 18px; }
.private-card span { color: var(--text-dim); font-size: 14px; line-height: 1.45; }
.private-filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0; }
.private-filter input[type=search] { min-width: 260px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); }
.private-filter button { padding: 8px 14px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--card); color: var(--text); cursor: pointer; }
.small { font-size: 12.5px; }
.link-ev { display: inline-block; margin: 2px 6px 2px 0; padding: 2px 8px; border-radius: 999px; font-size: 12px; background: var(--bg-elev); border: 1px solid var(--border); }
.link-ev.account { border-color: rgba(43,212,138,.5); } .link-ev.email, .link-ev.legal { border-color: rgba(140,155,255,.5); }
.link-ev code { font-size: 11.5px; }
.strength { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.strength.strong { color: var(--accent-2); background: rgba(43,212,138,.12); } .strength.weak { color: var(--text-dim); background: var(--bg-elev); }
.stat-row { display: flex; flex-wrap: wrap; gap: 26px; margin: 6px 0 18px; }
.stat-row .stat b { display: block; font-family: var(--mono); font-size: 26px; }
.stat-row .stat span { color: var(--text-dim); font-size: 13px; }

/* /mechanics release-date range */
.mech-range { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 16px; }
.mech-range .pill-label { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint); margin-right: 6px; }
.mech-table td.num small { display: block; color: var(--text-faint); font-size: 11px; }

/* Idea Lab grid */
.idea-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.idea-thumbs a { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; color: var(--text); text-decoration: none; }
.idea-thumbs a:hover { border-color: var(--accent-2); }
.idea-new { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #06150e; background: #2bd48a; border-radius: 6px; padding: 2px 6px; vertical-align: middle; }
.idea-thumbs img { width: 100%; aspect-ratio: 390 / 844; object-fit: cover; object-position: top; background: #000; }
.idea-thumbs b { padding: 6px 8px 0; font-size: 13.5px; }
.idea-thumbs small { padding: 2px 8px 8px; color: var(--text-dim); font-size: 11.5px; line-height: 1.3; }
.idea-mock.big { max-width: 320px; width: 100%; border-radius: 22px; display: block; margin: 0 0 12px; box-shadow: 0 16px 40px rgba(0,0,0,.35); }
.idea-card { scroll-margin-top: 16px; }

/* Search results */
.table-game { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; font-weight: 600; }
.table-game img { width: 40px; height: 40px; border-radius: 10px; flex: none; object-fit: cover; background: var(--card); }
.table-game:hover span { color: var(--accent-2); }
.search-games td { vertical-align: middle; }
.search-more { margin-top: 10px; }
.search-more summary { cursor: pointer; color: var(--accent-2); font-size: 13px; padding: 6px 0; }
.related-item small { margin-left: auto; color: var(--text-faint); font-size: 11px; white-space: nowrap; }
.related-title a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.detail-about { color: var(--text); margin: 0 0 8px; }

/* ---- Rank Tracker + accounts -------------------------------------------- */
.nav-account { font-size: 13px; font-weight: 600; text-decoration: none; padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 999px; color: var(--text); white-space: nowrap; }
.nav-account:hover { border-color: var(--accent); }
.nav-account.signed-in { border-color: var(--accent-2); color: var(--accent-2); }
.rt-page .muted, .auth-page .muted, .rt-teaser .muted { color: var(--text-faint); }
.rt-badge { display: inline-block; font: 700 10.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--bg); background: var(--phos); padding: 5px 8px; border-radius: 4px; }
.rt-hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: end; padding: 8px 0 28px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.rt-hero-title { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 4.2vw, 50px); line-height: 1.05; margin: 14px 0 12px; letter-spacing: -0.01em; }
.rt-hero-sub { color: var(--text-dim); font-size: 15.5px; line-height: 1.55; max-width: 60ch; margin: 0 0 18px; }
.rt-hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.rt-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 600 14px/1 inherit; font-family: inherit; padding: 11px 18px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--card); color: var(--text); text-decoration: none; cursor: pointer; }
.rt-btn:hover { border-color: var(--accent); }
.rt-btn.primary { background: var(--accent-2); border-color: var(--accent-2); color: #08130d; }
.rt-btn.primary:hover { filter: brightness(1.08); }
.rt-btn.danger { border-color: var(--neg-text); color: var(--neg-text); background: transparent; }
.rt-btn.small { font-size: 12.5px; padding: 8px 12px; }
.rt-btn.wide { width: 100%; }
.rt-how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 36px; }
.rt-how > div { border-top: 1px solid var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.rt-how b { font-family: var(--mono); font-size: 12.5px; font-weight: 600; color: var(--accent-2); }
.rt-how span { color: var(--text-dim); font-size: 14px; line-height: 1.45; }
.rt-filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; margin: 6px 0 14px; }
.rt-filters label { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .05em; }
.rt-filters select { min-width: 150px; }
.rt-movers { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; margin-bottom: 8px; }
.rt-movers a { color: var(--text); text-decoration: none; font-weight: 600; }
.rt-movers a:hover { color: var(--accent-2); }
.rt-table td { vertical-align: middle; padding-top: 7px; padding-bottom: 7px; }
.rt-rank { font-family: var(--mono); font-weight: 600; width: 44px; }
.rt-game { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rt-game img { border-radius: 8px; flex: none; background: var(--card); }
.rt-game span { overflow: hidden; text-overflow: ellipsis; }
.rt-act { text-align: right; width: 1%; white-space: nowrap; }
.rt-inline { display: inline; margin: 0; }
.rt-track-btn { font-size: 12px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border-strong); background: transparent; color: var(--text-dim); cursor: pointer; }
.rt-track-btn:hover { border-color: var(--accent-2); color: var(--accent-2); }
.rt-move { font: 600 11.5px/1 var(--mono); white-space: nowrap; margin-left: 4px; }
.rt-move.up { color: var(--accent-2); }
.rt-move.down { color: var(--new-badge); }
.rt-move.flat { color: var(--text-faint); }
.rt-move.new { color: var(--bg); background: var(--accent); padding: 2px 4px; border-radius: 3px; font-size: 9.5px; }
.rt-note { font-size: 12.5px; margin-top: 12px; }
@media (max-width: 760px) {
  .rt-hero { grid-template-columns: 1fr; }
  .rt-how { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
}

/* auth */
.auth-page { max-width: 460px; }
.auth-card { border: 1px solid var(--border); background: var(--card); border-radius: 16px; padding: 28px; margin: 10px 0 40px; }
.auth-card h2 { font-family: var(--serif); font-weight: 400; font-size: 32px; margin: 0 0 6px; }
.auth-card h3 { font-size: 15px; margin: 22px 0 8px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-dim); }
.auth-field input { font: inherit; font-size: 15px; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--bg); color: var(--text); }
.auth-field input:focus { outline: none; border-color: var(--accent); }
.auth-field.has-error input { border-color: var(--neg-text); }
.auth-field em { font-style: normal; color: var(--neg-text); font-size: 12.5px; }
.auth-msg { padding: 10px 12px; border-radius: 10px; font-size: 14px; margin: 12px 0 0; border: 1px solid var(--border); }
.auth-msg.ok { border-color: var(--accent-2); color: var(--accent-2); }
.auth-msg.error { border-color: var(--neg-text); color: var(--neg-text); }
.auth-alt { font-size: 13.5px; color: var(--text-dim); margin: 18px 0 0; }
.auth-alt a, .auth-card a { color: var(--accent); }
.auth-danger { margin-top: 24px; border-top: 1px solid var(--border); padding-top: 14px; font-size: 13.5px; color: var(--text-dim); }
.auth-danger summary { cursor: pointer; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* dashboard */
.rt-dash-head { margin-bottom: 14px; font-size: 13.5px; }
.rt-dash-head a { color: var(--accent); }
.rt-add { position: relative; display: flex; gap: 10px; margin: 14px 0 22px; }
.rt-add input { flex: 1; min-width: 0; font: inherit; font-size: 15px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--card); color: var(--text); }
.rt-add input:focus { outline: none; border-color: var(--accent); }
.rt-add-results { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 20; background: var(--bg-elev); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.rt-add-results button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 12px; background: none; border: 0; border-radius: 0; color: var(--text); text-align: left; cursor: pointer; }
.rt-add-results button:hover { background: var(--card-hover); }
.rt-add-results img { border-radius: 6px; }
.rt-add-results span { display: flex; flex-direction: column; }
.rt-cards { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.rt-card { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) minmax(0, 1.6fr) 32px; gap: 16px; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--border); }
.rt-card-main { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); min-width: 0; }
.rt-card-main img { border-radius: 12px; flex: none; }
.rt-card-text { min-width: 0; }
.rt-card-title { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-card-main:hover .rt-card-title { color: var(--accent-2); }
.rt-best-rank { font: 500 24px/1.1 var(--mono); letter-spacing: -0.03em; }
.rt-card-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--text-dim); }
.rt-card-stats b { color: var(--text); font-family: var(--mono); font-weight: 500; }
.rt-remove button { background: none; border: 1px solid transparent; color: var(--text-faint); border-radius: 8px; padding: 4px 8px; cursor: pointer; }
.rt-remove button:hover { color: var(--neg-text); border-color: var(--border-strong); }
.rt-empty { border: 1px dashed var(--border-strong); border-radius: 14px; padding: 28px; text-align: center; }
.rt-empty h3 { margin: 0 0 6px; }
.rt-empty a { color: var(--accent); }
@media (max-width: 760px) {
  .rt-card { grid-template-columns: minmax(0, 1fr) auto 28px; }
  .rt-card-stats { grid-column: 1 / -1; }
  .rt-add { flex-direction: column; }
}

/* one game */
.rt-game-head { display: flex; align-items: center; gap: 16px; margin: 6px 0 18px; flex-wrap: wrap; }
.rt-game-head img { border-radius: 14px; }
.rt-game-head h2 { margin: 0 0 4px; font-size: 26px; }
.rt-game-head > div { flex: 1; min-width: 200px; }
.rt-game-head a { color: var(--accent); }
.tile-sub { font-size: 12px; margin-top: 4px; }
.rt-range { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 999px; overflow: hidden; margin-bottom: 10px; }
.rt-range button { border: 0; border-radius: 0; background: transparent; padding: 6px 12px; font-size: 12.5px; color: var(--text-dim); }
.rt-range button.on { background: var(--card-hover); color: var(--text); }
.rt-history { min-height: 120px; }
.rt-history.loading { opacity: .5; }
.rt-svg { width: 100%; height: auto; display: block; }
.rt-grid { stroke: var(--border); stroke-width: 1; }
.rt-axis { fill: var(--text-faint); font: 11px var(--mono); }
.rt-line { fill: none; stroke: var(--accent-2); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.rt-dot { fill: var(--accent-2); }
.rt-matrix th { white-space: nowrap; font-weight: 600; }
.rt-matrix th span { font-size: 12px; }
.rt-country { white-space: nowrap; }
.rt-cell { text-align: right; font-family: var(--mono); white-space: nowrap; cursor: pointer; }
.rt-cell b { font-weight: 500; }
.rt-cell.empty { cursor: default; color: var(--text-faint); }
.rt-cell.out { font-size: 12px; }
.rt-cell .rt-sub { display: block; font-size: 10.5px; color: var(--text-faint); }
.rt-cell.top10 b { color: var(--phos); }
.rt-cell:not(.empty):hover { background: var(--card-hover); }
.rt-cell.sel { outline: 2px solid var(--accent-2); outline-offset: -2px; }

/* game-page teaser */
.rt-teaser { border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; margin: 16px 0; background: linear-gradient(135deg, rgba(43,212,138,.08), transparent 60%), var(--card); }
.rt-teaser-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.rt-teaser-list { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; }
.rt-teaser-list b { font-family: var(--mono); font-weight: 500; }
/* Account link sits with the theme toggle on the right of whichever row it lands on. */
.nav-account { margin-left: auto; padding: 6px 12px; }
@media (max-width: 900px) {
  .nav-account { order: 2; margin-left: 0; font-size: 12px; padding: 5px 10px; }
  .theme-toggle { order: 2; }
  .rt-card { grid-template-columns: minmax(0, 1fr) auto 28px; grid-template-areas: "main best rm" "stats stats stats"; row-gap: 8px; }
  .rt-card-main { grid-area: main; }
  .rt-card-best { grid-area: best; text-align: right; }
  .rt-remove { grid-area: rm; }
  .rt-card-stats { grid-area: stats; grid-column: auto; }
}
@media (min-width: 1000px) { .rt-page .stat-tiles:not(.rt-tiles) { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Home-page announcement */
.rt-banner { display: flex; align-items: center; gap: 14px; max-width: var(--page-max); margin: 0 auto 18px; padding: 12px var(--gutter); text-decoration: none; color: var(--text); }
.rt-banner { box-sizing: border-box; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: linear-gradient(90deg, rgba(184,243,74,.10), transparent 70%); }
.rt-banner-text { flex: 1; font-size: 14px; color: var(--text-dim); line-height: 1.45; }
.rt-banner-text b { color: var(--text); }
.rt-banner-cta { font-weight: 600; font-size: 14px; color: var(--accent-2); white-space: nowrap; }
.rt-banner:hover .rt-banner-cta { text-decoration: underline; }
@media (max-width: 640px) { .rt-banner { flex-wrap: wrap; gap: 8px 10px; } .rt-banner-cta { width: 100%; } }

/* Keyword rankings */
.rt-kw-add { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 14px; }
.rt-kw-add input { flex: 1 1 320px; min-width: 0; font: inherit; font-size: 14.5px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--card); color: var(--text); }
.rt-kw-add input:focus { outline: none; border-color: var(--accent); }
.rt-kw-add select { min-width: 170px; }
.rt-kw-table td { vertical-align: middle; }
.rt-kw-cell { cursor: pointer; }
.rt-kw-table tr:hover td { background: var(--card-hover); }
.rt-kw-table tr.sel td { box-shadow: inset 0 1px 0 var(--accent-2), inset 0 -1px 0 var(--accent-2); }
.rt-kw-table .rt-act { white-space: nowrap; text-align: right; }
.rt-kw-table .rt-act > * { vertical-align: middle; margin-left: 4px; }
.rt-kw-table a.rt-track-btn { text-decoration: none; }
.rt-kw-title { font-family: var(--serif); font-weight: 400; font-size: 34px; margin: 6px 0 16px; }
.rt-kw-title .muted { font-family: var(--mono); font-size: 13px; }
.rt-hl td { background: color-mix(in srgb, var(--accent-2) 12%, transparent); }

/* ═══ Refresh 2026-11 — side menu, slim top bar, softer surfaces ═══════════
   Last in the file so it wins over the header rules above (flex orders,
   search widths, the 2-px rule under the old nav). */
:root { --side-w: 244px; --radius: 14px; }

/* side menu */
.side-nav {
  position: fixed; inset: 0 auto 0 0; width: var(--side-w); z-index: 80;
  display: flex; flex-direction: column; gap: 8px; padding: 18px 14px 14px;
  background: var(--bg-elev); border-right: 1px solid var(--border);
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
}
.side-nav .sn-brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 8px; text-decoration: none; width: auto; order: 0; flex: none; }
.side-nav .sn-brand .brand { font-size: 17px; }
.side-nav .logo, .top-brand .logo { width: 30px; height: 30px; }
.side-nav .catalog-switch { margin: 0 8px 6px; align-self: flex-start; order: 0; }
.sn-nav { display: flex; flex-direction: column; gap: 16px; flex: 1; margin-top: 6px; }
.sn-group { display: flex; flex-direction: column; gap: 1px; }
.sn-label { font: 500 10.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-faint); padding: 0 10px 8px; }
.sn-link {
  position: relative; display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 9px;
  color: var(--text-dim); text-decoration: none; font-size: 14px; font-weight: 500; line-height: 1.2;
  transition: background .12s, color .12s;
}
.sn-link .ico { flex: none; opacity: .8; }
.sn-link:hover { background: var(--card-hover); color: var(--text); }
.sn-link:hover .ico, .sn-link.active .ico { opacity: 1; }
.sn-link.active { background: var(--card); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
.sn-link.active::before { content: ''; position: absolute; left: -14px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent-2); }
.sn-link .nav-new { margin-left: auto; }
.sn-link.preview { color: var(--accent-2); }
.sn-foot { border-top: 1px solid var(--border); padding-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.sn-legal { font-size: 12px; color: var(--text-faint); padding: 6px 10px 0; }
.sn-legal a { color: inherit; text-decoration: none; }
.sn-legal a:hover { color: var(--text); }
.sn-backdrop { position: fixed; inset: 0; z-index: 79; background: rgba(0,0,0,.55); backdrop-filter: blur(2px); }

body { padding-left: var(--side-w); }

/* top bar */
.site-header { padding-top: 14px; }
.site-header .header-bar {
  display: flex; flex-wrap: nowrap; align-items: center; justify-content: flex-start; gap: 12px;
  padding-bottom: 14px; border-bottom: 1px solid var(--border);
}
.header-bar > * { order: 0; }
.header-bar .nav-search { flex: 1 1 auto; max-width: 560px; width: auto; margin: 0; }
.header-bar .nav-search input, .header-bar .nav-search input:focus { width: 100%; height: 40px; border-radius: 11px; font-size: 14px; background-color: var(--card); }
.header-bar .nav-search-results { width: 100%; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.top-link { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--text-dim); text-decoration: none; border: 1px solid transparent; }
.top-link:hover { color: var(--text); border-color: var(--border-strong); }
.header-bar .nav-account { margin-left: 0; height: 36px; display: inline-flex; align-items: center; padding: 0 14px; order: 0; font-size: 13px; }
.header-bar .theme-toggle { width: 36px; height: 36px; border-radius: 999px; margin-left: 0; order: 0; }
.nav-toggle, .top-brand { display: none; }
.nav-toggle { flex: none; width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--border); background: var(--card); color: var(--text); place-items: center; padding: 0; cursor: pointer; }
.top-brand { align-items: center; gap: 9px; text-decoration: none; flex: none; }

/* page headings */
.page-title { font-size: clamp(34px, 3.4vw, 48px); margin-top: 30px; }
.subtitle { color: var(--text-dim); max-width: 70ch; }

/* narrow screens: the menu becomes a slide-in panel */
@media (max-width: 1100px) {
  body { padding-left: 0; }
  .side-nav { transform: translateX(-102%); transition: transform .22s ease; box-shadow: none; width: min(300px, 86vw); }
  html.nav-open .side-nav { transform: none; box-shadow: 0 0 60px rgba(0,0,0,.5); }
  html.nav-open, html.nav-open body { overflow: hidden; }
  .sn-link.active::before { left: -14px; }
  .nav-toggle { display: grid; }
  .top-brand { display: inline-flex; }
}
@media (max-width: 760px) {
  .site-header .header-bar { flex-wrap: wrap; row-gap: 10px; }
  .header-bar .nav-search { order: 5; flex-basis: 100%; max-width: none; }
  .top-link span { display: none; }
  .top-link { padding: 0 10px; border-color: var(--border); }
  .top-brand .brand { font-size: 15px; }
  .page-title { margin-top: 20px; }
}
@media (max-width: 420px) { .top-brand .brand { display: none; } }

/* surfaces: stat tiles as soft cards, calmer tables, consistent controls */
.stat-tile { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px 12px; }
.tile-label { color: var(--text-faint); font-size: 11.5px; letter-spacing: .02em; }
.data-table th { font: 500 10.5px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); border-bottom: 1px solid var(--border-strong); }
.data-table tbody tr { transition: background .1s; }
.data-table tbody tr:hover td { background: color-mix(in srgb, var(--card-hover) 70%, transparent); }
select, button, .rt-btn, .follow-btn, .compare-btn, .pill, .tab { border-radius: 10px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--accent-2) 35%, transparent); }
.insight-section { margin-bottom: 48px; }
.insight-section h2 { margin-bottom: 14px; }
.site-footer { border-top: 1px solid var(--border); }
.notice { border-radius: 12px; }

/* Support desk */
.tk-page .muted { color: var(--text-faint); }
.tk-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; align-items: start; margin-bottom: 40px; }
.tk-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; }
.tk-side { display: flex; flex-direction: column; gap: 16px; }
.tk-card h2 { font-family: var(--serif); font-weight: 400; font-size: 30px; margin: 0 0 6px; }
.tk-card h3 { font-size: 15px; margin: 0 0 10px; }
.tk-card textarea, .tk-reply textarea { font: inherit; font-size: 14.5px; line-height: 1.5; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--bg); color: var(--text); resize: vertical; }
.tk-card textarea:focus, .tk-reply textarea:focus { outline: none; border-color: var(--accent); }
.tk-card select { width: 100%; }
.tk-card details { border-top: 1px solid var(--border); padding: 10px 0; }
.tk-card details summary { cursor: pointer; font-size: 14px; }
.tk-card details p { margin: 8px 0 0; }
.tk-card a { color: var(--accent); }
.tk-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.tk-list li { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 14px; }
.tk-list li a { color: var(--text); text-decoration: none; flex: 1 1 100%; }
.tk-list li a:hover { color: var(--accent-2); }
.tk-status { font: 600 10.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 4px 7px; border-radius: 5px; border: 1px solid var(--border-strong); color: var(--text-dim); }
.tk-open { color: var(--star); border-color: color-mix(in srgb, var(--star) 45%, transparent); }
.tk-answered { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent-2) 45%, transparent); }
.tk-narrow { max-width: 820px; }
.tk-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.tk-head h2 { font-family: var(--serif); font-weight: 400; font-size: 32px; margin: 0; }
.tk-thread { display: flex; flex-direction: column; gap: 12px; margin: 18px 0; }
.tk-msg { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: var(--card); }
.tk-msg.staff { border-color: color-mix(in srgb, var(--accent-2) 40%, var(--border)); background: color-mix(in srgb, var(--accent-2) 6%, var(--card)); }
.tk-msg-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-size: 13.5px; }
.tk-msg-body { font-size: 14.5px; line-height: 1.6; white-space: normal; overflow-wrap: anywhere; }
.tk-actions { display: flex; justify-content: flex-end; }
.tk-close { margin: 10px 0 40px; display: flex; gap: 8px; flex-wrap: wrap; }
.tk-tabs { margin-bottom: 14px; }
.tk-tabs .pill { text-decoration: none; }
.tk-unread td { font-weight: 600; }
@media (max-width: 900px) { .tk-grid { grid-template-columns: 1fr; } }
