:root {
  color-scheme: light;
  --ink: #1e2a25;
  --muted: #66706b;
  --paper: #fbfaf6;
  --canvas: #f1eee6;
  --line: #d9d7ce;
  --green: #155d49;
  --green-soft: #dfece5;
  --orange: #d76b33;
  --orange-soft: #f8e5d6;
  --red: #a84031;
  --shadow: 0 18px 50px rgba(43, 52, 47, 0.09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% -5%, rgba(215, 107, 51, 0.13), transparent 26rem),
    var(--canvas);
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--green);
}

.hero {
  padding: 48px max(24px, calc((100vw - 1440px) / 2));
  color: #f8f6ef;
  background:
    linear-gradient(110deg, rgba(14, 69, 53, 0.98), rgba(21, 93, 73, 0.91)),
    repeating-linear-gradient(135deg, transparent 0 22px, rgba(255,255,255,.04) 22px 23px);
}

.hero__eyebrow {
  margin-bottom: 16px;
  color: #bcd4c9;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.hero__row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
}

.hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(40px, 6vw, 76px);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: .95;
}

.hero p {
  max-width: 720px;
  margin: 18px 0 0;
  color: #dbe8e2;
  font-size: clamp(15px, 2vw, 19px);
}

.hero__stamp {
  flex: 0 0 auto;
  padding: 9px 13px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 999px;
  color: #dbe8e2;
  font-size: 12px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 38px;
}

.stat {
  min-height: 94px;
  padding: 17px 18px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 16px;
  background: rgba(255,255,255,.07);
  backdrop-filter: blur(6px);
}

.stat strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 31px;
  font-weight: 500;
}

.stat span {
  display: block;
  margin-top: 5px;
  color: #c6d8d0;
  font-size: 12px;
  line-height: 1.25;
}

.page-shell {
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 52px;
}

.filters {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) repeat(3, minmax(150px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid rgba(30,42,37,.08);
  border-radius: 18px;
  background: rgba(251,250,246,.72);
  box-shadow: 0 8px 28px rgba(43,52,47,.04);
  backdrop-filter: blur(10px);
}

.field span {
  display: block;
  margin: 0 0 6px 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.field input,
.field select {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  color: var(--ink);
  background: #fff;
}

.field input:focus,
.field select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(21,93,73,.12);
}

.reset-button {
  height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.reset-button:hover {
  border-color: var(--ink);
}

.report-card {
  overflow: hidden;
  border: 1px solid rgba(30,42,37,.09);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.report-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 21px 24px 18px;
  border-bottom: 1px solid var(--line);
}

.report-card h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  font-weight: 500;
}

.report-card__head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.legend {
  color: var(--muted);
  font-size: 12px;
}

.legend__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--orange);
}

.table-wrap {
  overflow: auto;
  max-height: calc(100vh - 200px);
}

table {
  width: 100%;
  min-width: 1120px;
  border-collapse: separate;
  border-spacing: 0;
}

thead {
  position: sticky;
  z-index: 3;
  top: 0;
}

th {
  padding: 0;
  border-bottom: 1px solid var(--line);
  background: #f5f3ed;
  text-align: right;
}

th:first-child {
  text-align: left;
}

th button {
  width: 100%;
  padding: 12px 13px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .035em;
  text-align: inherit;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
}

th button:hover,
th button.is-sorted {
  color: var(--green);
}

tbody tr {
  cursor: pointer;
  outline: none;
}

tbody tr:hover,
tbody tr:focus-visible {
  background: #f2f7f3;
}

td {
  padding: 13px;
  border-bottom: 1px solid #e7e4dc;
  font-size: 13px;
  text-align: right;
  vertical-align: middle;
}

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

td:first-child {
  width: 34%;
  min-width: 300px;
  text-align: left;
}

.restaurant-name {
  font-size: 14px;
  font-weight: 750;
}

.restaurant-meta {
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cuisine-line {
  margin-top: 5px;
  color: var(--green);
  font-size: 11px;
}

.rating-cell {
  color: #8b5216;
  font-weight: 800;
}

.lower-bound {
  color: var(--orange);
  font-weight: 750;
}

.count-pair {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.count-pair small {
  color: var(--muted);
}

.menu-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  padding: 4px 7px;
  border-radius: 8px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 11px;
  font-weight: 750;
}

.menu-status--empty {
  color: #777;
  background: #ebe9e2;
}

.empty-state {
  padding: 70px 20px;
  text-align: center;
}

.empty-state strong,
.empty-state span {
  display: block;
}

.empty-state span {
  margin-top: 6px;
  color: var(--muted);
}

.method-note {
  margin-top: 18px;
  padding: 17px 20px;
  border-left: 3px solid var(--orange);
  border-radius: 4px 14px 14px 4px;
  color: #555e5a;
  background: rgba(251,250,246,.66);
  font-size: 12px;
  line-height: 1.55;
}

footer {
  padding: 22px 24px 35px;
  color: #777d79;
  font-size: 11px;
  text-align: center;
}

.restaurant-dialog {
  width: min(1120px, calc(100vw - 28px));
  max-width: none;
  height: min(880px, calc(100vh - 28px));
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: 22px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 30px 100px rgba(0,0,0,.32);
}

.restaurant-dialog::backdrop {
  background: rgba(18, 30, 25, .68);
  backdrop-filter: blur(5px);
}

.dialog-shell {
  position: relative;
  height: 100%;
}

.dialog-close {
  position: absolute;
  z-index: 8;
  top: 16px;
  right: 17px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(30,42,37,.13);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255,255,255,.82);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.dialog-content {
  height: 100%;
  overflow: auto;
}

.dialog-loading {
  display: grid;
  height: 100%;
  place-items: center;
  color: var(--muted);
}

.detail-hero {
  padding: 38px 72px 27px 38px;
  color: #f8f6ef;
  background: linear-gradient(120deg, #164d3e, #21745b);
}

.detail-hero__kicker {
  color: #bed7cc;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.detail-hero h2 {
  margin: 8px 0 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 500;
  letter-spacing: -.035em;
  line-height: 1;
}

.detail-hero p {
  margin: 7px 0 0;
  color: #d6e4de;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}

.chip {
  padding: 6px 9px;
  border-radius: 999px;
  color: #174b3d;
  background: #e2f0e9;
  font-size: 11px;
  font-weight: 700;
}

.detail-hero .chip {
  color: #f4f7f5;
  background: rgba(255,255,255,.13);
}

.detail-tabs {
  position: sticky;
  z-index: 5;
  top: 0;
  display: flex;
  gap: 4px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(251,250,246,.94);
  backdrop-filter: blur(10px);
}

.tab-button,
.subtab-button {
  padding: 9px 14px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
  cursor: pointer;
}

.tab-button.is-active,
.subtab-button.is-active {
  color: var(--green);
  background: var(--green-soft);
}

.detail-body {
  padding: 26px 30px 42px;
}

.panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, .75fr);
  gap: 18px;
}

.panel,
.metric-card,
.period-card,
.source-card {
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
}

.panel {
  padding: 20px;
}

.panel h3,
.menu-head h3 {
  margin: 0 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  font-weight: 500;
}

.panel p {
  color: #4f5954;
  line-height: 1.65;
}

.periods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0;
}

.period-card {
  padding: 15px;
}

.period-card strong {
  display: block;
  color: var(--green);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  font-weight: 500;
}

.period-card span {
  color: var(--muted);
  font-size: 11px;
}

.aspect-list,
.contact-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.aspect-list li,
.contact-list li {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
}

.aspect-list li:last-child,
.contact-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.aspect-list strong {
  color: var(--green);
}

.aspect-list--negative strong {
  color: var(--red);
}

.review-toolbar,
.menu-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.review-toolbar p,
.menu-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.review-list {
  display: grid;
  gap: 12px;
}

.review-card {
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.review-card__head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.review-card__head strong {
  display: block;
  font-size: 13px;
}

.review-card__head span,
.review-card__date {
  color: var(--muted);
  font-size: 11px;
}

.stars {
  color: #d98a25;
  letter-spacing: 1px;
  white-space: nowrap;
}

.review-card p {
  margin: 0;
  line-height: 1.55;
  white-space: pre-wrap;
}

.review-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.review-badge {
  padding: 4px 7px;
  border-radius: 6px;
  color: #73501d;
  background: #f7ead3;
  font-size: 10px;
}

.company-response {
  margin-top: 13px;
  padding: 12px 14px;
  border-left: 3px solid var(--green);
  border-radius: 3px 10px 10px 3px;
  background: #f2f7f3;
  font-size: 12px;
  line-height: 1.5;
}

.subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 18px;
}

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

.menu-item {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.menu-item img {
  width: 100%;
  height: 132px;
  object-fit: cover;
  background: #eee;
}

.menu-item__body {
  padding: 13px;
}

.menu-item__head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.menu-item h4 {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
}

.menu-item__price {
  flex: 0 0 auto;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.menu-item p {
  display: -webkit-box;
  overflow: hidden;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.menu-item__category {
  display: block;
  margin-top: 9px;
  color: #8a8e8c;
  font-size: 10px;
}

.menu-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.menu-filters input,
.menu-filters select {
  height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.menu-filters input {
  flex: 1;
}

.source-card {
  padding: 17px;
  margin-bottom: 16px;
}

.source-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

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

.asset-card {
  overflow: hidden;
  min-height: 110px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.asset-card img {
  width: 100%;
  height: 210px;
  object-fit: contain;
  background: #e9e7e0;
}

.asset-card a {
  display: block;
  padding: 13px;
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.comparison-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 17px;
}

.metric-card {
  padding: 15px;
}

.metric-card strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  font-weight: 500;
}

.metric-card span {
  color: var(--muted);
  font-size: 11px;
}

.comparison-table {
  max-height: 430px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.comparison-table table {
  min-width: 780px;
}

.comparison-table td:first-child {
  width: auto;
  min-width: 0;
}

.details-list {
  margin-top: 14px;
}

.details-list summary {
  padding: 12px 0;
  color: var(--green);
  font-weight: 700;
  cursor: pointer;
}

.details-list ul {
  columns: 2;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.empty-panel {
  padding: 60px 20px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 980px) {
  .stats {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .field--search {
    grid-column: 1 / -1;
  }

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

@media (max-width: 700px) {
  .hero {
    padding: 34px 18px;
  }

  .hero__row {
    display: block;
  }

  .hero__stamp {
    display: inline-block;
    margin-top: 20px;
  }

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

  .page-shell {
    width: calc(100% - 24px);
  }

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

  .field--search {
    grid-column: auto;
  }

  .report-card__head,
  .review-toolbar,
  .menu-toolbar {
    align-items: start;
    flex-direction: column;
  }

  .restaurant-dialog {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
  }

  .detail-hero {
    padding: 32px 58px 23px 20px;
  }

  .detail-tabs {
    overflow-x: auto;
    padding: 9px 12px;
  }

  .tab-button {
    white-space: nowrap;
  }

  .detail-body {
    padding: 18px 14px 30px;
  }

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

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

  .menu-grid,
  .asset-grid {
    grid-template-columns: 1fr;
  }

  .details-list ul {
    columns: 1;
  }
}
