:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: #0c0f10;
  --panel-2: #121617;
  --panel-3: #1a2022;
  --border: #2a3032;
  --border-soft: rgba(255, 255, 255, 0.08);
  --muted: #a4aaad;
  --text: #f7f7f7;
  --green: #75e632;
  --green-strong: #00ba74;
  --green-soft: rgba(117, 230, 50, 0.15);
  --blue: #5c8dff;
  --amber: #ffbc00;
  --red: #ff4c5f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: linear-gradient(180deg, rgba(0, 186, 116, 0.11), transparent 330px), var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

.app-shell {
  min-height: 100vh;
  padding: 0 18px 18px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(180px, 270px) minmax(260px, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 74px;
  margin: 0 -18px;
  padding: 10px 18px;
  border-bottom: 1px solid #202426;
  background: #000;
}

.brand,
.chart-controls,
.view-switch,
.view-actions,
.result-bar,
.site-footer nav,
.signal-bar,
.source-row,
.metric-grid,
.summary-strip,
.timeline-meta,
.method-panel {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(117, 230, 50, 0.7);
  background: var(--green-soft);
  color: var(--green);
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
}

.brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand-copy strong,
.footer-brand strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 950;
  line-height: 1.05;
  text-transform: uppercase;
}

.brand-copy small,
.footer-brand span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.chart-controls {
  gap: 10px;
  min-width: 0;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(100%, 560px);
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border);
  background: #0b0d0e;
  color: var(--muted);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
}

.view-switch,
.view-actions {
  gap: 7px;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.home-link,
.icon-button,
.share-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--border);
  background: #0b0d0e;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 950;
  text-decoration: none;
  text-transform: uppercase;
}

.home-link {
  color: var(--text);
}

.home-link:hover,
.site-footer a:hover,
.share-link:hover {
  border-color: var(--green);
  color: var(--green);
}

.icon-button:hover,
.icon-button.active {
  border-color: var(--green);
  background: #111718;
  color: var(--text);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
  gap: 10px;
  padding-top: 16px;
}

.library-panel,
.detail-panel,
.method-panel {
  border: 1px solid var(--border);
  background: rgba(12, 15, 16, 0.96);
}

.library-panel {
  min-width: 0;
  min-height: calc(100vh - 150px);
  padding: 18px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.section-heading h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(32px, 4vw, 58px);
  font-weight: 950;
  line-height: 0.9;
  text-transform: uppercase;
}

.section-heading p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 780;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.summary-strip article {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border-soft);
  background: #090b0c;
}

.summary-strip span,
.detail-kicker,
.source-row span,
.timeline-month,
.signal-chip,
.hype-table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.summary-strip strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}

.result-bar {
  justify-content: space-between;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-soft);
}

.hype-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.hype-table th {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  background: #101415;
  text-align: left;
}

.hype-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #1f2527;
  color: var(--text);
  font-size: 13px;
  vertical-align: middle;
}

.hype-table tr {
  cursor: pointer;
}

.hype-table tr:hover,
.hype-table tr.selected {
  background: #111819;
}

.hype-table tr.selected {
  outline: 1px solid var(--green);
  outline-offset: -1px;
}

.rank-cell {
  width: 64px;
  color: var(--text);
  font-size: 24px;
  font-weight: 950;
  text-align: center;
}

.game-title {
  display: grid;
  gap: 4px;
}

.game-title strong {
  font-size: 15px;
  font-weight: 920;
  line-height: 1.12;
}

.game-title span,
.release-cell small,
.timeline-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.release-cell strong,
.release-cell small {
  display: block;
  line-height: 1.22;
}

.platforms,
.signals,
.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.platform,
.signal-chip {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 7px;
  border: 1px solid rgba(92, 141, 255, 0.5);
  color: #b8ccff;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.signal-chip {
  border-color: rgba(117, 230, 50, 0.55);
  color: var(--green);
}

.hype-score {
  min-width: 108px;
}

.hype-score strong {
  display: block;
  color: var(--green);
  font-size: 22px;
  font-weight: 950;
  line-height: 1;
}

.score-bar {
  display: block;
  height: 6px;
  margin-top: 7px;
  overflow: hidden;
  background: #26302b;
}

.score-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--green-strong));
}

.source-link {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
}

.source-count {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
  white-space: nowrap;
}

.source-link:hover {
  border-color: var(--green);
  color: var(--green);
}

.detail-panel {
  position: sticky;
  top: 90px;
  align-self: start;
  min-height: 520px;
  padding: 16px;
}

.detail-header {
  display: grid;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.detail-score-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.detail-score-row strong {
  color: var(--green);
  font-size: 46px;
  font-weight: 950;
  line-height: 0.95;
}

.detail-title h2 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 26px;
  font-weight: 950;
  line-height: 0.98;
  text-transform: uppercase;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.metric-grid article {
  padding: 10px;
  border: 1px solid var(--border-soft);
  background: #090b0c;
}

.metric-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.metric-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 16px;
  font-weight: 950;
}

.evidence-list,
.detail-sources,
.source-list {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding: 0;
  list-style: none;
}

.evidence-list li {
  position: relative;
  padding-left: 14px;
  color: #d9ddde;
  font-size: 13px;
  line-height: 1.38;
}

.evidence-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.58em;
  width: 5px;
  height: 5px;
  background: var(--green);
}

.detail-sources {
  margin-bottom: 0;
}

.source-row {
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--border-soft);
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}

.source-row.coverage-only {
  opacity: 0.72;
}

.source-row strong {
  color: var(--text);
  font-size: 12px;
}

.coverage-panel {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--border-soft);
  background: #090b0c;
}

.coverage-panel p {
  margin: 0;
  color: #d9ddde;
  font-size: 13px;
  line-height: 1.35;
}

.coverage-lanes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.coverage-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 7px;
  border: 1px solid rgba(117, 230, 50, 0.55);
  color: var(--green);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.timeline-view {
  display: grid;
  gap: 12px;
}

.timeline-group {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 14px;
}

.timeline-month {
  padding-top: 12px;
  color: var(--green);
}

.timeline-list {
  position: relative;
  display: grid;
  gap: 8px;
  padding-left: 18px;
}

.timeline-list::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: rgba(117, 230, 50, 0.45);
}

.timeline-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border-soft);
  background: #090b0c;
  cursor: pointer;
}

.timeline-card::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 18px;
  width: 9px;
  height: 9px;
  border: 1px solid var(--green);
  background: #050505;
}

.timeline-card:hover,
.timeline-card.selected {
  border-color: var(--green);
  background: #111819;
}

.timeline-card h2 {
  margin: 0 0 4px;
  font-size: 16px;
  line-height: 1.1;
}

.timeline-meta {
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.timeline-score {
  color: var(--green);
  font-size: 22px;
  font-weight: 950;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 16px 0 0;
  color: var(--muted);
}

.footer-brand {
  display: grid;
  gap: 3px;
}

.site-footer nav {
  gap: 8px;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
}

.empty-state {
  padding: 36px 18px;
  border: 1px solid var(--border-soft);
  text-align: center;
}

.empty-state h2 {
  margin: 0;
}

.empty-state p {
  color: var(--muted);
}

[hidden] {
  display: none !important;
}

@media (max-width: 1080px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .chart-controls {
    grid-column: 1 / -1;
    order: 3;
  }

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

  .detail-panel {
    position: static;
    min-height: 0;
  }
}

@media (max-width: 1320px) {
  .section-heading {
    display: grid;
    grid-template-columns: 1fr;
  }

  .view-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 0 10px 14px;
  }

  .topbar {
    min-height: 62px;
    margin: 0 -10px;
    padding: 8px 10px;
    gap: 8px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .chart-controls,
  .section-heading,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .view-switch,
  .view-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .view-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .icon-button,
  .home-link,
  .share-link {
    min-height: 38px;
    padding: 0 9px;
    font-size: 11px;
  }

  .library-panel,
  .detail-panel {
    padding: 12px;
  }

  .section-heading h1 {
    font-size: 38px;
  }

  .summary-strip,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    overflow: visible;
    border: 0;
  }

  .hype-table,
  .hype-table thead,
  .hype-table tbody,
  .hype-table tr,
  .hype-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .hype-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .hype-table tr {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 0 10px;
    margin-bottom: 8px;
    padding: 10px;
    border: 1px solid var(--border-soft);
    background: #090b0c;
  }

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

  .hype-table td:not(.rank-cell)::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 950;
    text-transform: uppercase;
  }

  .rank-cell {
    grid-row: span 6;
    align-self: start;
    width: 48px;
    min-height: 48px;
    padding-top: 9px !important;
    border: 1px solid var(--border);
    font-size: 22px;
  }

  .timeline-group {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .timeline-month {
    padding-top: 0;
  }

  .timeline-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .brand-copy small {
    display: none;
  }

  .view-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-box {
    width: 100%;
  }

  .section-heading h1 {
    font-size: 34px;
  }
}
