:root {
  color-scheme: light;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #15171a;
  --muted: #646b77;
  --line: #dfe3e8;
  --accent: #0f7b68;
  --accent-strong: #075e50;
  --shadow: 0 18px 45px rgba(20, 29, 39, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

img {
  display: block;
  max-width: 100%;
}

.search-page {
  position: relative;
  width: min(100%, 1120px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 14px 12px 28px;
}

.filter-toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: #26313d;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(20, 29, 39, 0.08);
}

.filter-toggle svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.filter-toggle.has-filters {
  border-color: var(--accent);
  background: #dff4ea;
  color: #0b8a56;
  box-shadow: 0 8px 24px rgba(11, 138, 86, 0.18);
}

.filter-toggle.has-filters svg {
  fill: currentColor;
}

.filter-panel {
  position: absolute;
  z-index: 5;
  top: 54px;
  right: 12px;
  width: min(calc(100% - 32px), 360px);
  max-height: 62vh;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.filter-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.filter-panel h2 {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.2;
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-clear,
.reload-data {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7f8fa;
  color: var(--muted);
  cursor: pointer;
}

.filter-clear {
  padding: 0 10px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
}

.reload-data {
  display: grid;
  width: 30px;
  padding: 0;
  place-items: center;
}

.reload-data svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.reload-data:disabled {
  cursor: progress;
  opacity: 0.55;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.filter-option {
  cursor: pointer;
}

.filter-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.filter-option span {
  display: inline-flex;
  max-width: 100%;
  min-height: 32px;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid #dfe5e9;
  border-radius: 999px;
  background: #fbfcfd;
  color: #26313d;
  font-size: 0.78rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.filter-option svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  fill: currentColor;
}

.filter-option input:checked + span {
  border-color: var(--accent);
  background: #e8f5f2;
  color: var(--accent-strong);
  font-weight: 700;
}

.filter-status {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.filter-panel-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.filter-close {
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7f8fa;
  color: #26313d;
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
}

.filter-close:hover {
  border-color: #c8d8d5;
  background: #eef3f5;
}

.search-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0 12px;
  text-align: center;
}

.brand-logo {
  display: block;
  width: 80px;
  height: auto;
  margin-bottom: 10px;
  object-fit: contain;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 10vw, 3.6rem);
  font-weight: 700;
  line-height: 0.95;
}

#page-title.sr-only {
  margin: 0;
}

.search-form {
  width: 100%;
}

.search-box {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.search-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

input[type="search"] {
  width: 100%;
  min-height: 46px;
  padding: 0 84px 0 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  box-shadow: 0 6px 18px rgba(20, 29, 39, 0.06);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
}

input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  display: none;
}

input[type="search"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(15, 123, 104, 0.14), 0 10px 32px rgba(20, 29, 39, 0.08);
}

.search-clear {
  display: grid;
  position: absolute;
  top: 50%;
  right: 44px;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transform: translateY(-50%);
}

.search-clear svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

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

.location-search {
  position: absolute;
  top: 50%;
  right: 7px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #e8f5f2;
  color: var(--accent-strong);
  cursor: pointer;
  transform: translateY(-50%);
}

.location-search svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.location-search:disabled {
  cursor: progress;
  opacity: 0.58;
}

.result-count {
  min-height: 20px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.future-search-cta {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 6px;
}

.future-search-cta[hidden] {
  display: none !important;
}

.future-search-button {
  min-height: 24px;
  padding: 3px 10px;
  border: 1px solid #cfe0dc;
  border-radius: 999px;
  background: #f4fbf8;
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.future-search-button:hover {
  border-color: var(--accent);
  background: #e8f5f2;
}

.search-help-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 8px;
}

.search-help-wrap[hidden] {
  display: none !important;
}

.search-help {
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafb;
  color: #5d6773;
  cursor: pointer;
}

.search-help svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.search-help-popover {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  z-index: 4;
  width: min(calc(100vw - 24px), 360px);
  min-width: 280px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: left;
  transform: translateX(-50%);
}

.search-help-popover p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.search-help-popover p + p {
  margin-top: 8px;
}

.category-filters {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  margin-top: 7px;
}

.category-filters[hidden] {
  display: none;
}

.category-filter {
  cursor: pointer;
}

.category-filter input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.category-filter span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid #dfe5e9;
  border-radius: 999px;
  background: #fbfcfd;
  color: #26313d;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
}

.category-filter svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  fill: currentColor;
}

.category-filter strong {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  background: #eef3f5;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1;
}

.category-filter input:checked + span {
  border-color: var(--accent);
  background: #e8f5f2;
  color: var(--accent-strong);
}

.category-filter input:checked + span strong {
  background: var(--accent);
  color: white;
}

.results {
  display: grid;
  gap: 18px;
}

.result-card {
  display: grid;
  grid-template-columns: minmax(136px, 190px) minmax(0, 1fr);
  overflow: hidden;
  min-height: 190px;
  border: 1px solid #d8e1e4;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 26px rgba(20, 29, 39, 0.07);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.result-card:hover {
  border-color: #c8d8d5;
  box-shadow: 0 14px 32px rgba(20, 29, 39, 0.1);
  transform: translateY(-1px);
}

.result-image {
  width: 100%;
  height: 100%;
  min-height: 190px;
  object-fit: cover;
  background: linear-gradient(135deg, #eef3f5 0%, #dbe4e7 100%);
}

.result-image-placeholder {
  display: grid;
  background: linear-gradient(
    var(--placeholder-angle, 135deg),
    #2A7B9B 0%,
    #57C785 50%,
    #EDDD53 100%
  );
}

.result-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 14px 16px;
}

.result-meta,
.date {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.result-meta {
  margin-bottom: 4px;
  overflow: visible;
  white-space: normal;
  text-overflow: clip;
  overflow-wrap: anywhere;
}

h2 {
  margin: 0;
  margin-bottom: 5px;
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  line-height: 1.12;
}

.date {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.25;
}

.date svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  fill: currentColor;
}

.date span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.result-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.result-header-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 10px;
  align-self: start;
  margin-top: 10px;
}

.result-heading {
  min-width: 0;
  margin-bottom: 5px;
}

.local-logo {
  width: 50%;
  height: 64px;
  flex: 0 0 auto;
  border: 1px solid #e1e8ea;
  border-radius: 8px;
  background: white;
  object-fit: contain;
  padding: 5px;
  box-shadow: 0 7px 16px rgba(20, 29, 39, 0.09);
}

.distance-badge {
  display: inline-flex;
  max-width: 50%;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  padding: 4px 7px;
  border-radius: 999px;
  background: #eef3f5;
  color: #26313d;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.distance-badge svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  fill: currentColor;
}

.benefits {
  display: grid;
  gap: 7px;
  margin: 11px 0 10px;
}

.benefits-count-1 {
  grid-template-columns: 1fr;
}

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

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

.benefit-item {
  position: relative;
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 6px;
  padding: 10px;
  border: 1px solid #d9e8e4;
  border-radius: 8px;
  background: linear-gradient(180deg, #fbfffe 0%, #f6fbfa 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.benefit-item::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, #d8a229 100%);
  content: "";
}

.benefit-discount {
  color: var(--accent-strong);
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  font-weight: 850;
  line-height: 1.05;
}

.benefit-discount-basa {
  font-size: 0.82rem;
  line-height: 1.28;
}

.benefits-continental {
  grid-template-columns: 1fr;
}

.benefit-item-continental {
  gap: 8px;
}

.benefit-item-continental .benefit-discount {
  color: #24313f;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.38;
  text-transform: none;
  overflow-wrap: anywhere;
}

.benefit-cards {
  display: grid;
  grid-template-columns: 15px minmax(0, 1fr);
  gap: 6px;
  align-items: start;
  color: #24313f;
  font-size: 0.78rem;
  font-weight: 760;
  line-height: 1.32;
}

.benefit-cards span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.benefit-cards svg,
.benefit-limits svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  fill: currentColor;
}

.benefit-limits {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.benefit-limits span {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #f4efe3;
  color: #695113;
  font-size: 0.72rem;
  font-weight: 780;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.level-benefit-table {
  display: grid;
  overflow: hidden;
  margin: 11px 0 10px;
  border: 1px solid #d9e8e4;
  border-radius: 8px;
  background: #fbfffe;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.level-benefit-row {
  display: grid;
  grid-template-columns: 0.7fr 0.9fr 1.2fr 1.2fr;
  min-width: 0;
  align-items: center;
  border-top: 1px solid #e4eeee;
}

.level-benefit-row:first-child {
  border-top: 0;
}

.level-benefit-row span {
  min-width: 0;
  padding: 8px 9px;
  color: #24313f;
  font-size: 0.75rem;
  font-weight: 760;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.level-benefit-row span + span {
  border-left: 1px solid #e4eeee;
}

.level-benefit-head {
  background: #eef7f5;
}

.level-benefit-head span {
  color: var(--accent-strong);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.result-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: auto;
}

.result-action-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  margin-top: auto;
}

.result-action-stack-header {
  display: none;
}

.bank-chip-logo {
  width: 150px;
  height: 40px;
  object-fit: contain;
  object-position: left center;
}

.result-link {
  display: inline-flex;
  min-height: 32px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--accent-strong);
  color: white;
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(7, 94, 80, 0.18);
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.result-link-header {
  display: none;
  align-self: end;
  margin-top: auto;
}

.result-link:hover {
  background: var(--accent);
  box-shadow: 0 10px 24px rgba(7, 94, 80, 0.24);
  transform: translateY(-1px);
}

@media (max-width: 900px) {
  .benefits-count-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .result-card {
    grid-template-columns: 82px minmax(0, 1fr);
    min-height: 142px;
  }

  .result-image {
    min-height: 142px;
  }

  .result-body {
    padding: 10px;
  }

  .result-header {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .result-header-main {
    margin-top: 10px;
    gap: 10px;
  }

  .local-logo {
    order: -1;
    width: 100%;
    height: 90%;
  }

  .distance-badge {
    max-width: 100%;
  }

  .benefits,
  .benefits-count-2,
  .benefits-count-3 {
    grid-template-columns: 1fr;
  }

  .benefit-item {
    padding: 8px;
  }

  .level-benefit-table {
    overflow-x: auto;
  }

  .level-benefit-row {
    min-width: 430px;
  }

  .result-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .result-footer .bank-chip-logo {
    align-self: flex-end;
  }

  .result-link {
    align-self: flex-end;
  }
}

.empty-state {
  margin: 30px 0;
  color: var(--muted);
  text-align: center;
}

.week-separator {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 2px;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0;
}

.week-separator::before,
.week-separator::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.available-days {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 10px;
}

.available-day {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #fff3c4;
  color: #92400e;
  font-size: 0.72rem;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(146, 64, 14, 0.18);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (min-width: 680px) {
  .search-page {
    padding-top: 24px;
  }

  .filter-toggle {
    top: 18px;
  }

  .filter-panel {
    top: 62px;
  }

  .search-hero {
    padding-top: 28px;
  }

  .search-form {
    width: 30vw;
    min-width: 320px;
    max-width: 460px;
  }

  .results {
    width: 50vw;
    max-width: 760px;
    margin: 0 auto;
    gap: 20px;
  }

  .result-card {
    grid-template-columns: 118px minmax(0, 1fr);
  }

  .result-image {
    width: 118px;
  }

  .result-body {
    padding: 12px 14px;
  }

  h2 {
    font-size: 1.18rem;
  }

  .local-logo {
    width: 80%;
    height: 100%;
  }

  .distance-badge {
    max-width: 50%;
  }

  .result-link-header {
    display: inline-flex;
    align-self: flex-start;
  }

  .result-action-stack-header {
    display: flex;
  }

  .result-action-stack-header .result-link-header {
    margin-top: 0;
  }

  .result-footer .result-link {
    display: none;
  }

  .result-footer .bank-chip-logo {
    display: none;
  }

}

@media (max-width: 679px) {
  input[type="search"] {
    padding-right: 96px;
  }

  input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    display: none;
  }

  .search-clear {
    display: grid;
    right: 42px;
    width: 38px;
    height: 38px;
    border: 1px solid transparent;
    background: #f2f5f7;
  }

  .search-clear svg {
    width: 16px;
    height: 16px;
  }
}

.stats-page {
  min-height: 100vh;
  background: #f7f8fa;
  color: var(--text);
  padding: 28px 18px 48px;
}

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

.stats-hero,
.stats-panel,
.stats-card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.stats-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  border-radius: 14px;
  padding: 28px;
}

.stats-eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.stats-hero h1 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
}

.stats-subtitle {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.stats-file {
  display: grid;
  gap: 5px;
  min-width: 250px;
  padding: 14px 16px;
  border-radius: 10px;
  background: #f1f5f4;
}

.stats-file span,
.stats-file small,
.stats-card span,
.stats-card small,
.stats-panel-heading span {
  color: var(--muted);
}

.stats-grid {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.stats-grid-primary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.stats-card,
.stats-panel {
  border-radius: 12px;
}

.stats-card {
  display: grid;
  gap: 6px;
  padding: 20px;
}

.stats-card strong {
  font-size: 2rem;
}

.stats-panel {
  padding: 20px;
  overflow: hidden;
}

.stats-panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
}

.stats-panel-heading h2 {
  margin: 0;
  font-size: 1.05rem;
}

.stats-table {
  display: grid;
  gap: 0;
}

.stats-table-head,
.stats-table-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 74px 74px 86px;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #eef1f4;
}

.stats-table-head {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.stats-table-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.stats-quality div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f6f8f9;
}

.stats-history {
  display: grid;
  gap: 10px;
}

.stats-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid #eef1f4;
  border-radius: 10px;
}

.stats-history-row.is-current {
  border-color: rgba(15, 123, 104, 0.35);
  background: rgba(15, 123, 104, 0.06);
}

.stats-history-row div {
  display: grid;
  gap: 4px;
}

.stats-history-row div:last-child {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.stats-history-row span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #f1f5f4;
  font-size: 0.82rem;
}

@media (max-width: 860px) {
  .stats-hero,
  .stats-grid-primary,
  .stats-grid-secondary {
    grid-template-columns: 1fr;
  }

  .stats-file {
    min-width: 0;
  }
}

@media (max-width: 560px) {
  .stats-page {
    padding: 18px 12px 34px;
  }

  .stats-hero,
  .stats-panel,
  .stats-card {
    padding: 16px;
  }

  .stats-table-head,
  .stats-table-row {
    grid-template-columns: minmax(0, 1fr) 54px 54px 62px;
    font-size: 0.86rem;
  }

  .stats-quality,
  .stats-history-row {
    grid-template-columns: 1fr;
  }

  .stats-history-row div:last-child {
    justify-content: flex-start;
  }
}
