:root {
  --ink: #10231c;
  --muted: #66736e;
  --paper: #f4f6f1;
  --card: #ffffff;
  --line: #dce4de;
  --green: #0d7a4d;
  --green-dark: #075437;
  --green-soft: #e6f4ec;
  --lime: #c7f25c;
  --shadow: 0 18px 50px rgba(31, 57, 46, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 7% 4%, rgba(199, 242, 92, 0.2), transparent 24rem),
    var(--paper);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

.page-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 92px;
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 13px;
  color: white;
  background: var(--green);
  font-weight: 850;
  letter-spacing: -0.05em;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1rem;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.76rem;
}

.source-pill,
.ticker-chip {
  border: 1px solid #c9d5cc;
  border-radius: 999px;
  color: var(--green-dark);
  background: rgba(255, 255, 255, 0.65);
  font-size: 0.78rem;
  font-weight: 750;
}

.source-pill {
  padding: 9px 14px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px;
  border: 1px solid rgba(201, 213, 204, 0.8);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
}

.main-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  text-decoration: none;
}

.main-nav a[aria-current="page"] {
  color: white;
  background: var(--green-dark);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 0.78fr);
  gap: 60px;
  align-items: center;
  padding: 72px 0 86px;
}

.hero-copy {
  max-width: 660px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1 {
  max-width: 700px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.8rem, 6vw, 5.6rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.hero-copy > p:last-child {
  max-width: 580px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.query-card {
  padding: 28px;
  border: 1px solid rgba(208, 220, 211, 0.9);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 750;
}

.field input,
.field select,
.money-input {
  width: 100%;
  border: 1px solid #ced9d1;
  border-radius: 12px;
  color: var(--ink);
  background: #fbfcfa;
  outline: none;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.field > input,
.field select {
  height: 50px;
  padding: 0 14px;
}

#ticker-search {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid #ced9d1;
  border-radius: 12px;
  text-transform: uppercase;
  background: white;
}

.ticker-combobox {
  position: relative;
}

.ticker-options {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid #c3d0c7;
  border-radius: 12px;
  background: white;
  box-shadow: 0 16px 35px rgba(31, 57, 46, 0.16);
}

.ticker-option {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: white;
  cursor: pointer;
  font-weight: 800;
  text-align: left;
}

.ticker-option:last-child {
  border-bottom: 0;
}

.ticker-option:hover,
.ticker-option:focus {
  color: var(--green-dark);
  background: var(--green-soft);
}

.ticker-option-empty {
  padding: 14px;
  color: var(--muted);
  font-size: 0.82rem;
}

.field input:focus,
.field select:focus,
.money-input:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(13, 122, 77, 0.1);
}

.money-input {
  display: flex;
  height: 50px;
  align-items: center;
  overflow: hidden;
}

.money-input span {
  padding-left: 14px;
  color: var(--muted);
  font-weight: 700;
}

.money-input input {
  height: 100%;
  border: 0;
  background: transparent;
  padding: 0 14px 0 8px;
  box-shadow: none;
}

.primary-button {
  display: flex;
  width: 100%;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border: 0;
  border-radius: 13px;
  color: white;
  background: var(--green);
  cursor: pointer;
  font-weight: 800;
  transition:
    transform 150ms ease,
    background 150ms ease;
}

.primary-button:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.75;
  transform: none;
}

.form-note {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  text-align: center;
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: -38px 0 42px;
  padding: 16px 18px;
  border: 1px solid #efc9c2;
  border-radius: 13px;
  color: #7a281c;
  background: #fff2ef;
}

.alert > span:last-child > span,
.alert small {
  display: block;
}

.alert small {
  margin-top: 4px;
  opacity: 0.75;
}

.alert-icon {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: #a33b2a;
  font-weight: 850;
}

.pending-alert {
  border-color: #c6d8cd;
  color: var(--green-dark);
  background: #edf7f1;
}

.pending-alert .alert-icon {
  background: var(--green);
  animation: spin 1.4s linear infinite;
}

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

.results {
  padding: 10px 0 70px;
}

.results-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.results-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.04em;
}

.results-heading h2 span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0;
}

.total-received {
  text-align: right;
}

.total-received small,
.total-received strong {
  display: block;
}

.total-received small {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.78rem;
}

.total-received strong {
  color: var(--green);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.summary-card {
  min-height: 138px;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}

.summary-card.featured {
  color: white;
  border-color: var(--green-dark);
  background: var(--green-dark);
}

.summary-card small,
.summary-card strong,
.summary-card span {
  display: block;
}

.summary-card small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.summary-card.featured small,
.summary-card.featured span {
  color: rgba(255, 255, 255, 0.72);
}

.summary-card strong {
  margin-top: 16px;
  font-size: 1.65rem;
  letter-spacing: -0.04em;
}

.summary-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.75rem;
}

.table-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 12px 35px rgba(31, 57, 46, 0.05);
}

.table-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 26px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  list-style: none;
}

.table-title::-webkit-details-marker {
  display: none;
}

.table-card:not([open]) .table-title {
  border-bottom: 0;
}

.table-title h3 {
  margin: 0;
  font-size: 1.05rem;
}

.table-title p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.ticker-chip {
  padding: 7px 11px;
  background: var(--green-soft);
}

.table-title-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.details-indicator {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.table-card[open] .details-indicator {
  transform: rotate(225deg);
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th,
td {
  padding: 17px 26px;
  border-bottom: 1px solid #e8ede9;
}

th {
  color: var(--muted);
  background: #fafbf9;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

td {
  font-size: 0.9rem;
}

td strong,
td small,
td a {
  display: block;
}

td small,
td a {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.69rem;
}

td a {
  color: var(--green);
  font-weight: 750;
  text-decoration: none;
}

.net-value {
  color: var(--green);
}

tbody tr:hover {
  background: #fbfdfa;
}

tfoot td {
  border-bottom: 0;
  color: white;
  background: var(--green);
  font-weight: 850;
}

.empty-state {
  padding: 50px 26px;
  color: var(--muted);
  text-align: center;
}

.methodology {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.55);
}

.methodology summary {
  padding: 16px 18px;
  cursor: pointer;
  font-size: 0.83rem;
  font-weight: 800;
}

.methodology div {
  padding: 0 18px 15px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.6;
}

.methodology p {
  margin: 0 0 8px;
}

.ranking-teaser {
  padding: 36px 0 80px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 500;
  letter-spacing: -0.045em;
}

.section-heading p {
  max-width: 650px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.secondary-button {
  display: inline-flex;
  min-height: 46px;
  flex: 0 0 auto;
  align-items: center;
  gap: 18px;
  padding: 0 17px;
  border: 1px solid #bfd1c5;
  border-radius: 12px;
  color: var(--green-dark);
  background: white;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.ranking-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.ranking-preview-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: white;
}

.rank-number,
.ranking-position {
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--green-dark);
  background: var(--green-soft);
  font-weight: 850;
}

.rank-number {
  width: 36px;
  height: 36px;
}

.ranking-preview-card strong,
.ranking-preview-card small {
  display: block;
}

.ranking-preview-card small {
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yield-badge {
  color: var(--green);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 700;
}

.compact-empty {
  padding: 25px;
  border: 1px dashed #bdccc1;
  border-radius: 16px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.45);
  text-align: center;
}

.ranking-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.62fr);
  gap: 70px;
  align-items: end;
  padding: 68px 0 74px;
}

.ranking-hero h1 {
  max-width: 760px;
  font-size: clamp(2.8rem, 5vw, 4.9rem);
}

.ranking-hero > div > p:last-child {
  max-width: 690px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

.ranking-filter {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: white;
  box-shadow: var(--shadow);
}

.ranking-filter label,
.ranking-filter small {
  display: block;
}

.ranking-filter label {
  margin-bottom: 9px;
  font-size: 0.8rem;
  font-weight: 800;
}

.ranking-filter > div {
  display: flex;
  gap: 8px;
}

.ranking-filter select,
.ranking-filter button {
  min-height: 48px;
  border-radius: 11px;
}

.ranking-filter select {
  min-width: 150px;
  flex: 1;
  padding: 0 12px;
  border: 1px solid #ced9d1;
  background: #fbfcfa;
}

.ranking-filter button {
  padding: 0 16px;
  border: 0;
  color: white;
  background: var(--green);
  cursor: pointer;
  font-weight: 800;
}

.ranking-filter small {
  margin-top: 11px;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.45;
}

.ranking-results {
  padding-bottom: 80px;
}

.update-note {
  color: var(--muted);
  font-size: 0.72rem;
}

.ranking-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: white;
}

.ranking-row {
  display: grid;
  grid-template-columns: 54px minmax(190px, 1.3fr) repeat(3, minmax(125px, 0.8fr)) 82px;
  gap: 18px;
  align-items: center;
  padding: 19px 22px;
  border-bottom: 1px solid #e8ede9;
}

.ranking-row:last-child {
  border-bottom: 0;
}

.ranking-position {
  width: 38px;
  height: 38px;
}

.ranking-company strong,
.ranking-company small,
.ranking-metric strong,
.ranking-metric small {
  display: block;
}

.ranking-company strong {
  font-size: 1.05rem;
}

.ranking-company small,
.ranking-metric small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.68rem;
}

.ranking-company small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-metric strong {
  margin-top: 4px;
  font-size: 0.9rem;
}

.ranking-metric.primary-metric strong {
  color: var(--green);
  font-size: 1.1rem;
}

.row-action {
  padding: 9px 12px;
  border-radius: 9px;
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: 0.76rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.empty-ranking {
  padding: 58px 25px;
  border: 1px dashed #bdccc1;
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
}

.empty-ranking strong {
  color: var(--ink);
}

.empty-ranking p {
  max-width: 600px;
  margin: 8px auto 0;
  line-height: 1.6;
}

.ranking-methodology {
  margin-top: 20px;
}

.trophies-page {
  padding: 68px 0 80px;
}

.trophies-heading {
  margin-bottom: 28px;
}

.trophies-heading h1 {
  margin: 0;
  font-size: clamp(2.8rem, 5vw, 4.9rem);
  letter-spacing: -0.055em;
}

.trophies-heading p:last-child {
  max-width: 680px;
  color: var(--muted);
  line-height: 1.7;
}

.wiki-table-card {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: white;
  box-shadow: 0 12px 35px rgba(31, 57, 46, 0.05);
}

.wiki-table-card h2 {
  margin: 0 0 6px;
  font-family: inherit;
  font-size: 1.2rem;
}

.wiki-table-card > p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.84rem;
}

.wiki-table-scroll {
  overflow-x: auto;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}

.wiki-table-scroll-sticky {
  max-height: min(70vh, 620px);
  overflow: auto;
}

.wiki-table {
  width: 100%;
  min-width: 620px;
  font-family: inherit;
  font-size: 0.88rem;
}

.wiki-table th,
.wiki-table td {
  padding: 17px 20px;
  border-right: 0;
  border-bottom: 1px solid #e8ede9;
}

.wiki-table tbody tr:last-child td {
  border-bottom: 0;
}

.wiki-table th {
  color: var(--muted);
  background: #fafbf9;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.wiki-table-sticky thead th {
  position: sticky;
  z-index: 2;
  top: 0;
}

.wiki-table-sticky th:first-child,
.wiki-table-sticky td:first-child {
  position: sticky;
  z-index: 1;
  left: 0;
  background: white;
  box-shadow: 1px 0 0 #e8ede9;
}

.wiki-table-sticky thead th:first-child {
  z-index: 3;
  background: #fafbf9;
}

.wiki-table tbody tr:hover {
  background: #fbfdfa;
}

.wiki-table-sticky tbody tr:hover td:first-child {
  background: #fbfdfa;
}

.wiki-table td:first-child {
  color: var(--ink);
  font-size: 0.95rem;
}

.wiki-table td:not(:first-child) {
  font-weight: 750;
}

.company-with-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.company-logo {
  display: inline-grid;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  place-items: center;
  border: 1px solid rgba(7, 84, 55, 0.16);
  border-radius: 6px;
  color: white;
  background: var(--green);
  font-size: 0.59rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.company-logo[data-company^="I"],
.company-logo[data-company^="B"] {
  background: #315f92;
}

.company-logo[data-company^="P"],
.company-logo[data-company^="V"] {
  background: #9b5b24;
}

.company-logo[data-company^="U"],
.company-logo[data-company^="C"] {
  background: #6f4b91;
}

.gold-trophy-count,
.trophy-count {
  display: inline-block;
  min-width: 1.4em;
  font-weight: 700;
}

.gold-trophies,
.placement-trophies {
  margin-left: 6px;
  letter-spacing: 2px;
  white-space: nowrap;
}

.gold-trophies {
  color: #a55d2a;
  filter: sepia(1) saturate(2);
}

.silver-trophies {
  color: #7d8790;
  filter: grayscale(1);
}

.bronze-trophies {
  color: #b8860b;
  filter: none;
}

.logs-page {
  padding: 68px 0 80px;
}

.logs-page h1 {
  font-size: clamp(2.8rem, 5vw, 4.9rem);
}

.logs-filter {
  display: grid;
  grid-template-columns: 190px minmax(260px, 1fr) auto auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}

.logs-filter .field {
  margin: 0;
}

.logs-filter button,
.logs-filter > a {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 0 17px;
  border-radius: 12px;
  font-weight: 800;
}

.logs-filter button {
  border: 0;
  color: white;
  background: var(--green);
  cursor: pointer;
}

.logs-filter > a {
  color: var(--green-dark);
  text-decoration: none;
}

.log-status {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  color: #765b13;
  background: #fff4ca;
  font-size: 0.72rem;
  font-weight: 850;
}

.log-status-success {
  color: var(--green-dark);
  background: var(--green-soft);
}

.log-status-error {
  color: #7a281c;
  background: #fff2ef;
}

.log-status-info {
  color: #315d79;
  background: #e9f4fb;
}

.log-message {
  max-width: 460px;
  color: var(--muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.service-state {
  display: grid;
  min-height: calc(100vh - 220px);
  place-items: center;
  padding: 70px 0;
}

.service-state-card {
  width: min(650px, 100%);
  padding: clamp(30px, 6vw, 58px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  text-align: center;
}

.service-state-icon {
  display: grid;
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  place-items: center;
  border-radius: 18px;
  color: white;
  background: var(--green);
  font-weight: 900;
}

.service-state-card h1 {
  margin: 0 auto;
  font-size: clamp(2.4rem, 6vw, 4.3rem);
}

.service-state-card > p:not(.eyebrow) {
  max-width: 530px;
  margin: 22px auto 0;
  color: var(--muted);
  line-height: 1.7;
}

.service-state-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 30px 0 20px;
}

.service-state-actions button,
.service-state-actions a {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 12px;
  font-weight: 800;
}

.service-state-actions button {
  border: 0;
  color: white;
  background: var(--green);
  cursor: pointer;
}

.service-state-actions a {
  display: inline-flex;
  align-items: center;
  border: 1px solid #bfd1c5;
  color: var(--green-dark);
  text-decoration: none;
}

.service-state-card small {
  color: var(--muted);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 0 38px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.76rem;
}

footer span {
  color: var(--ink);
  font-weight: 850;
}

footer p {
  margin: 0;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 34px;
    padding-top: 46px;
  }

  .query-card {
    max-width: 620px;
  }

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

  .ranking-preview-grid {
    grid-template-columns: 1fr;
  }

  .ranking-hero {
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .ranking-filter {
    max-width: 620px;
  }

  .ranking-row {
    grid-template-columns: 50px minmax(180px, 1fr) repeat(2, minmax(120px, 0.7fr)) 78px;
  }

  .ranking-row .ranking-metric:nth-of-type(4) {
    display: none;
  }
}

@media (max-width: 620px) {
  .page-shell {
    width: min(100% - 24px, 1180px);
  }

  .source-pill {
    display: none;
  }

  .site-header {
    gap: 10px;
  }

  .brand small {
    display: none;
  }

  .main-nav a {
    padding: 7px 10px;
    font-size: 0.72rem;
  }

  .hero {
    padding: 38px 0 58px;
  }

  h1 {
    font-size: 3.2rem;
  }

  .query-card {
    padding: 20px;
    border-radius: 18px;
  }

  .alert,
  .results-heading,
  .section-heading,
  footer {
    flex-direction: column;
  }

  .alert {
    margin-top: -22px;
  }

  .results-heading {
    align-items: flex-start;
  }

  .total-received {
    text-align: left;
  }

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

  .section-heading {
    align-items: flex-start;
  }

  .secondary-button {
    width: 100%;
    justify-content: space-between;
  }

  .ranking-teaser {
    padding-bottom: 58px;
  }

  .ranking-hero {
    padding: 38px 0 58px;
  }

  .ranking-hero h1 {
    font-size: 3rem;
  }

  .ranking-filter {
    padding: 19px;
  }

  .ranking-filter > div {
    flex-direction: column;
  }

  .ranking-filter select,
  .ranking-filter button {
    width: 100%;
  }

  .ranking-row {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 17px 15px;
  }

  .logs-filter {
    grid-template-columns: 1fr;
  }

  .service-state-actions {
    flex-direction: column;
  }

  .service-state-actions a {
    justify-content: center;
  }

  .ranking-position {
    width: 34px;
    height: 34px;
  }

  .ranking-company {
    min-width: 0;
  }

  .ranking-row .ranking-metric {
    display: none;
  }

  .ranking-row .ranking-metric.primary-metric {
    display: block;
    grid-column: 2;
  }

  .row-action {
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: center;
  }

  .table-title {
    padding: 20px;
  }

  .wiki-table-card {
    padding: 18px;
    border-radius: 18px;
  }

  .wiki-table-scroll {
    border-radius: 13px;
  }

  .wiki-table {
    display: table;
  }

  .wiki-table thead {
    display: table-header-group;
  }

  .wiki-table tbody {
    display: table-row-group;
  }

  .wiki-table tr {
    display: table-row;
  }

  .wiki-table th,
  .wiki-table td {
    display: table-cell;
    padding: 14px 16px;
  }

  thead {
    display: none;
  }

  tbody,
  tr,
  td {
    display: block;
  }

  tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 8px;
    border-bottom: 1px solid var(--line);
  }

  tbody td {
    padding: 14px;
    border: 0;
  }

  tbody td::before {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    content: attr(data-label);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  tfoot td {
    display: none;
  }

  tfoot td:nth-child(1),
  tfoot td:nth-child(3) {
    display: block;
    padding: 14px 20px;
  }

  footer {
    align-items: flex-start;
  }
}
