:root {
  color-scheme: light;
  --bg: #f5f7f7;
  --surface: #ffffff;
  --text: #202623;
  --muted: #66716b;
  --line: #dfe5e2;
  --line-strong: #c8d1cd;
  --accent: #0c6f68;
  --accent-strong: #075b55;
  --accent-soft: #e7f3f1;
  --shadow: 0 10px 30px rgba(32, 38, 35, 0.07);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Vazirmatn, IRANSans, "Noto Sans Arabic", "Noto Sans", Tahoma, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header,
.site-footer,
.page {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0;
  color: var(--text);
}

.site-nav {
  display: flex;
  gap: 4px;
  white-space: nowrap;
}

.site-nav a {
  border-radius: 8px;
  color: var(--muted);
  padding: 7px 10px;
}

.site-nav a:hover {
  background: var(--accent-soft);
  color: var(--accent);
  text-decoration: none;
}

.site-search {
  display: flex;
  flex: 1 1 420px;
  max-width: 560px;
  height: 34px;
  min-height: 34px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(32, 38, 35, 0.03);
}

.site-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(12, 111, 104, 0.13);
}

.site-search input,
.search-panel input,
.search-panel select {
  width: 100%;
  height: 36px;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  line-height: 1.25;
  padding: 5px 10px;
}

.site-search input {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding-inline: 12px 10px;
}

.site-search input:focus,
.search-panel input:focus,
.search-panel select:focus {
  outline: none;
}

.search-panel input:focus,
.search-panel select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(12, 111, 104, 0.13);
}

button,
.actions a,
.pagination a,
.city-chip {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font: inherit;
  font-weight: 650;
  line-height: 1.2;
  padding: 6px 11px;
  cursor: pointer;
}

.site-search button {
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: var(--accent);
  font-size: 13px;
  line-height: 1;
  padding-inline: 14px;
}

.actions a:hover,
.pagination a:hover,
.city-chip:hover,
button:hover {
  text-decoration: none;
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.page {
  padding: 32px 0 44px;
}

.site-footer {
  padding: 24px 0 36px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.intro {
  margin-bottom: 28px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.25;
  margin-bottom: 10px;
}

h2 {
  font-size: 19px;
  line-height: 1.45;
  margin-bottom: 12px;
}

.muted,
.meta,
small {
  color: var(--muted);
}

.breadcrumb {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.link-grid,
.city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 28px;
}

.pill,
.city-link,
.category-row,
.provider-row {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.pill {
  display: block;
  padding: 11px 13px;
  color: var(--text);
}

.pill:hover,
.city-link:hover,
.category-row:hover,
.provider-row:hover {
  border-color: var(--line-strong);
  box-shadow: 0 4px 16px rgba(32, 38, 35, 0.05);
  text-decoration: none;
}

.city-link {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  color: var(--text);
}

.category-list,
.provider-list {
  display: grid;
  gap: 12px;
}

.category-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  color: var(--text);
}

.category-row span {
  display: grid;
  gap: 2px;
}

.category-row em {
  font-style: normal;
  white-space: nowrap;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 4px 10px;
}

.provider-row {
  padding: 18px;
}

.provider-row h2 {
  margin-bottom: 2px;
}

.provider-row h2 a {
  color: var(--text);
}

.specialty,
.field,
.meta {
  margin-bottom: 8px;
}

.quality-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.quality-line span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  padding: 4px 8px;
}

.source-trust-line {
  color: var(--muted);
  font-size: 13px;
  margin: 8px 0 0;
}

.field strong {
  font-weight: 700;
}

.contact-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.contact-list a {
  direction: ltr;
  unicode-bidi: plaintext;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 8px;
  font-weight: 650;
  line-height: 1.4;
  padding: 5px 9px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 8px;
}

.actions a + a,
.pagination a {
  background: var(--surface);
  color: var(--accent);
}

.actions a + a:hover,
.pagination a:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) minmax(150px, 1fr) minmax(170px, 1fr) auto;
  gap: 12px;
  align-items: end;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.search-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.provider-detail {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 22px;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 18px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.detail-grid h2 {
  font-size: 16px;
  margin-bottom: 4px;
}

.related-section,
.comments-section {
  margin-top: 24px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.related-card {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 12px;
}

.related-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 4px 16px rgba(32, 38, 35, 0.05);
  text-decoration: none;
}

.related-card span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 650;
}

.comment-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(120px, 160px);
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
}

.comment-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.comment-form input,
.comment-form select,
.comment-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  padding: 9px 12px;
}

.comment-form textarea {
  min-height: 120px;
  resize: vertical;
}

.full-field,
.comment-form button {
  grid-column: 1 / -1;
}

.bot-field {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  padding: 10px 12px;
}

.notice.error {
  background: #fff3f0;
  color: #9a3412;
}

.comment-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.comment-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.comment-row span {
  color: var(--accent);
  font-weight: 650;
  margin-inline-start: 8px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.filter-chips span,
.filter-chips a {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  padding: 5px 9px;
}

.quality-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.quality-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.quality-table th,
.quality-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: right;
}

.quality-table th {
  background: var(--bg);
  color: var(--muted);
  font-size: 13px;
}

.actions form {
  margin: 0;
}

.inline-review-form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.inline-review-form label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.inline-review-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  padding: 8px 10px;
}

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

.review-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
}

.duplicate-review-card {
  display: grid;
  gap: 14px;
}

.duplicate-review-head {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

.duplicate-review-head span {
  color: var(--muted);
  font-size: 13px;
}

.recommendation-badge {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  display: grid;
  font-size: 13px;
  gap: 2px;
  padding: 8px 10px;
}

.recommendation-badge small {
  color: var(--muted);
}

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

.duplicate-provider {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.duplicate-provider h2 {
  font-size: 16px;
  margin: 0 0 10px;
}

.duplicate-provider dl {
  display: grid;
  gap: 6px 10px;
  grid-template-columns: 86px minmax(0, 1fr);
  margin: 0;
}

.duplicate-provider dt {
  color: var(--muted);
  font-size: 13px;
}

.duplicate-provider dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.duplicate-actions {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-edit-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 14px;
}

.admin-edit-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.admin-edit-form input,
.admin-edit-form select,
.admin-edit-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  padding: 9px 10px;
}

.admin-edit-form textarea {
  min-height: 76px;
  resize: vertical;
}

.admin-edit-actions {
  align-items: center;
  display: flex;
  gap: 10px;
}

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

@media (max-width: 620px) {
  .site-header {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
  }

  .category-row,
  .city-link {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-search {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
  }

  .brand {
    grid-column: 2;
    justify-self: end;
    min-height: 28px;
  }

  .site-nav {
    grid-column: 1;
    grid-row: 1;
    width: auto;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .site-search {
    flex: 0 0 auto;
    height: 32px;
    min-height: 32px;
  }

  .site-search input,
  .search-panel input,
  .search-panel select {
    height: 32px;
    min-height: 0;
    padding: 4px 8px;
  }

  .site-search button {
    min-width: 56px;
    padding-inline: 8px;
  }

  .search-panel {
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 10px;
  }

  .duplicate-pair {
    grid-template-columns: 1fr;
  }

  .duplicate-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-edit-form {
    grid-template-columns: 1fr;
  }

  .comment-form {
    grid-template-columns: 1fr;
  }

  .detail-header {
    flex-direction: column;
  }

  .pagination a,
  .city-chip {
    width: 100%;
  }

  .actions {
    gap: 6px;
    margin-top: 10px;
  }

  .actions a {
    min-height: 32px;
    flex: 1 1 auto;
    font-size: 13px;
    padding: 5px 9px;
  }

  .search-panel button {
    width: auto;
    justify-self: stretch;
    min-height: 32px;
    padding-block: 5px;
  }
}
