:root {
  --bg: #ffffff;
  --ink: #111111;
  --muted: #6d6d6d;
  --line: #dcdcdc;
  --panel: #fafafa;
  --green: #177245;
  --teal: #1d7b73;
  --yellow: #b88712;
  --orange: #c96b1a;
  --red: #b5462e;
  --gray: #7a7a7a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Nunito", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  max-width: 1380px;
  margin: 0 auto;
  padding: 22px 20px 60px;
}

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

.topbar--company {
  align-items: flex-start;
}

.titleblock h1,
.companyinfo h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.lede {
  max-width: 760px;
  font-size: 20px;
  line-height: 1.35;
}

.backlink {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--muted);
  font-weight: 800;
}

.companyhead {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.datenav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.datebtn,
.datecurrent {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 800;
}

.datecurrent {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.panel {
  margin-top: 22px;
}

.sectiontitle {
  margin: 0 0 14px;
  font-size: 26px;
  letter-spacing: -0.04em;
}

.tablewrap {
  overflow: auto;
  border: 1px solid var(--line);
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

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

th {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--panel);
  position: sticky;
  top: 0;
  z-index: 1;
}

tbody tr:hover {
  background: #fcfcfc;
}

tbody tr.is-empty {
  opacity: 0.55;
}

.companycell {
  min-width: 260px;
}

.companyrow {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.companytext {
  min-width: 0;
  flex: 1 1 auto;
}

.companylink {
  display: block;
  font-weight: 900;
  line-height: 1.05;
}

.subtle {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.servicelist {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.servicelist--header {
  margin-top: 10px;
}

.servicepill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
}

.tablehint {
  display: inline-flex;
  align-items: center;
  border-bottom: 1px dotted #c5c5c5;
}

.menucell {
  min-width: 300px;
}

.standouts {
  font-size: 14px;
  line-height: 1.45;
}

.gradecell {
  width: 88px;
}

.grade,
.emptygrade {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 16px;
  line-height: 1;
}

.emptygrade {
  color: var(--gray);
}

.grade--s {
  background: #e8f6ef;
  color: var(--green);
}

.grade--a {
  background: #e8f5f4;
  color: var(--teal);
}

.grade--b {
  background: #fbf2de;
  color: var(--yellow);
}

.grade--c {
  background: #f9ebdc;
  color: var(--orange);
}

.grade--d {
  background: #f7e5df;
  color: var(--red);
}

.grade--f {
  background: #efefef;
  color: #555;
}

.logo {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  object-fit: contain;
  border-radius: 6px;
}

.logo--small {
  width: 20px;
  height: 20px;
}

.logo--tiny {
  width: 18px;
  height: 18px;
  border-radius: 5px;
}

.logo--large {
  width: 52px;
  height: 52px;
}

.tiergrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.tiercard {
  padding: 0;
}

.tiercard h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.tierrows {
  display: grid;
  gap: 3px;
  padding: 3px;
  background: #111;
}

.tierrow {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 3px;
  align-items: stretch;
  min-height: 57px;
  background: #111;
}

.tierlabel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 57px;
  color: #000;
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.06em;
}

.tierrow--s .tierlabel {
  background: #ff7b7f;
}

.tierrow--a .tierlabel {
  background: #f8bb6a;
}

.tierrow--b .tierlabel {
  background: #eaf370;
}

.tierrow--c .tierlabel {
  background: #78ef73;
}

.tierrow--d .tierlabel {
  background: #74dfe8;
}

.tierrow--f .tierlabel {
  background: #e56ce3;
}

.tierlogos {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  align-content: flex-start;
  min-height: 57px;
  background: #111;
}

.tierlogo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 57px;
  height: 57px;
  background: #fff;
  border-radius: 0;
  border: 0;
  box-shadow: none;
}

.tierempty {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  color: #6b6b6b;
  font-size: 13px;
  font-weight: 800;
}

.tierlogo .logo--small {
  width: 38px;
  height: 38px;
  border-radius: 0;
}

.cuisinegrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.cuisinecard {
  border: 1px solid var(--line);
  padding: 16px;
  overflow: hidden;
}

.cuisinecard h3 {
  margin: 0 0 12px;
  font-size: 20px;
}

.axisnote {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cuisineaxis {
  position: relative;
  height: var(--axis-height, 76px);
  border-top: 1px solid transparent;
  overflow: hidden;
}

.axisline {
  position: absolute;
  left: 2%;
  right: 2%;
  top: 50%;
  height: 1px;
  background: var(--line);
}

.axisbuckets {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(var(--axis-columns, 21), minmax(0, 1fr));
  gap: 0;
  height: 100%;
  padding: 0 12px;
}

.axisbucket {
  position: relative;
  min-width: 0;
  height: 100%;
}

.axisstack {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.axispoint {
  position: relative;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(17, 17, 17, 0.05);
}

.axispoint + .axispoint {
  margin-top: -12px;
}

.tooltip-anchor {
  position: relative;
}

.tooltip-anchor:focus-visible {
  outline: none;
}

.floating-tooltip {
  position: fixed;
  left: 0;
  top: 0;
  max-width: min(280px, calc(100vw - 24px));
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(17, 17, 17, 0.96);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  z-index: 9999;
  box-shadow: 0 10px 24px rgba(17, 17, 17, 0.12);
}

.floating-tooltip::after {
  content: "";
  position: absolute;
  left: var(--tooltip-arrow-left, 50%);
  transform: translateX(-50%);
  border-style: solid;
}

.floating-tooltip[data-side="top"]::after {
  top: 100%;
  border-width: 6px 5px 0;
  border-color: rgba(17, 17, 17, 0.96) transparent transparent;
}

.floating-tooltip[data-side="bottom"]::after {
  bottom: 100%;
  border-width: 0 5px 6px;
  border-color: transparent transparent rgba(17, 17, 17, 0.96);
}

.floating-tooltip.is-visible {
  opacity: 1;
}

tbody tr {
  scroll-margin-top: 110px;
}

tbody tr:target td {
  background: #fff8dd;
}

@media (max-width: 960px) {
  .page {
    padding: 16px 12px 44px;
  }

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

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

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

@media (max-width: 720px) {
  .page {
    padding: 14px 10px 32px;
  }

  .titleblock h1,
  .companyinfo h1 {
    font-size: clamp(32px, 15vw, 52px);
  }

  .meta {
    font-size: 13px;
    line-height: 1.4;
  }

  .lede {
    font-size: 16px;
    line-height: 1.35;
  }

  .backlink {
    margin-bottom: 12px;
  }

  .companyhead {
    gap: 12px;
  }

  .logo--large {
    width: 40px;
    height: 40px;
  }

  .datenav {
    width: 100%;
    gap: 8px;
  }

  .datebtn,
  .datecurrent {
    padding: 8px 10px;
    font-size: 13px;
  }

  .sectiontitle {
    margin-bottom: 10px;
    font-size: 22px;
  }

  .tablewrap {
    overflow: visible;
    border: 0;
  }

  table {
    min-width: 0;
  }

  .grades {
    display: block;
  }

  .grades thead {
    display: none;
  }

  .grades tbody {
    display: grid;
    gap: 10px;
  }

  .grades tbody tr {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px 8px;
    padding: 12px;
    border: 1px solid var(--line);
    background: #fff;
  }

  .grades tbody tr td {
    width: auto;
    min-width: 0;
    border: 0;
    padding: 0;
  }

  .grades tbody tr td:first-child,
  .grades tbody tr td.companycell,
  .grades tbody tr td.menucell,
  .grades tbody tr td.cuisinecell {
    grid-column: 1 / -1;
  }

  .companyrow {
    align-items: flex-start;
    gap: 10px;
  }

  .companylink {
    font-size: 16px;
    line-height: 1.15;
  }

  .subtle {
    font-size: 12px;
    line-height: 1.35;
  }

  .servicelist {
    gap: 5px;
  }

  .servicepill {
    min-height: 20px;
    padding: 0 7px;
    font-size: 10px;
  }

  .gradecell,
  .menucell,
  .cuisinecell {
    display: block;
  }

  .gradecell::before,
  .menucell::before,
  .cuisinecell::before {
    content: attr(data-mobile-label);
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .gradecell {
    width: auto;
  }

  .grade,
  .emptygrade {
    width: 34px;
    height: 34px;
    font-size: 15px;
  }

  .menucell {
    min-width: 0;
  }

  .standouts {
    font-size: 13px;
    line-height: 1.4;
  }

  .tiergrid {
    gap: 10px;
    grid-template-columns: 1fr;
  }

  .tiercard {
    padding: 0;
  }

  .tiercard h3 {
    margin-bottom: 8px;
    font-size: 16px;
  }

  .tierrow {
    grid-template-columns: 68px minmax(0, 1fr);
    min-height: 41px;
  }

  .tierlogos {
    min-height: 41px;
  }

  .tierlogo {
    width: 41px;
    height: 41px;
  }

  .tierlabel {
    min-height: 41px;
    font-size: 30px;
  }

  .tierlogo .logo--small {
    width: 27px;
    height: 27px;
  }

  .cuisinegrid {
    gap: 10px;
  }

  .cuisinecard {
    padding: 12px;
  }

  .cuisinecard h3 {
    margin-bottom: 10px;
    font-size: 17px;
  }

  .axisnote {
    margin-bottom: 8px;
    font-size: 10px;
  }

  .cuisineaxis {
    height: var(--axis-height, 64px);
  }

  .axispoint {
    width: 22px;
    height: 22px;
    border-radius: 7px;
  }

  .axispoint + .axispoint {
    margin-top: -10px;
  }

  .floating-tooltip {
    display: none;
  }

  .logo--tiny {
    width: 16px;
    height: 16px;
  }
}
