:root {
  color-scheme: light;
  --ink: #172d38;
  --muted: #60727a;
  --line: #d8e3e0;
  --paper: #ffffff;
  --canvas: #f2f6f5;
  --navy: #102c3a;
  --teal: #0d706c;
  --teal-soft: #e2f3f0;
  --amber: #a65d11;
  --amber-soft: #fff4df;
  --red: #a43c40;
  --red-soft: #fbe9e8;
  --radius: 18px;
  font-family: "Vazirmatn", Tahoma, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("assets/fonts/vazirmatn-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(ellipse at 88% 5%, rgba(31, 137, 127, .10), transparent 27rem),
    var(--canvas);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.8;
}

button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 3px solid #42a6a0;
  outline-offset: 3px;
}

.site-header {
  min-height: 76px;
  padding: 0 max(24px, calc((100vw - 1160px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--navy);
  color: #f2fbf9;
  box-shadow: 0 7px 22px rgba(12, 37, 48, .13);
}

.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark {
  position: relative; width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center;
  background: #c8eeea; transform: rotate(-4deg);
}
.brand-mark::before, .brand-mark::after, .brand-mark span { content: ""; display: block; position: absolute; background: #0d706c; border-radius: 2px; }
.brand-mark::before { width: 20px; height: 6px; }
.brand-mark::after { width: 6px; height: 20px; }
.brand-copy { display: grid; line-height: 1.35; }
.brand-copy strong { font-size: 16px; font-weight: 700; }
.brand-copy small { font-size: 12px; color: #b5d0d1; margin-top: 3px; }
.header-note { display: inline-flex; gap: 9px; align-items: center; color: #c7dcde; font-size: 14px; }
.live-dot { width: 8px; height: 8px; background: #5bd3b5; border-radius: 50%; box-shadow: 0 0 0 4px rgba(91, 211, 181, .13); }

.page-shell { width: min(100% - 40px, 1020px); margin: 0 auto; }
.page-heading { padding: 43px 0 22px; }
.heading-kicker { color: var(--teal); font-size: 14px; font-weight: 700; letter-spacing: .01em; }
h1, h2, h3, p { margin-top: 0; }
.page-heading h1 { margin: 3px 0 5px; font-size: clamp(27px, 4vw, 36px); line-height: 1.45; letter-spacing: -.03em; color: #132e39; }
.page-heading p { margin-bottom: 0; color: var(--muted); font-size: 16px; }

.search-panel { padding: 20px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); box-shadow: 0 11px 30px rgba(17, 48, 60, .055); }
.search-panel form > label { display: block; margin-bottom: 8px; color: #334a53; font-size: 14px; font-weight: 700; }
.search-row { position: relative; display: flex; align-items: center; min-height: 58px; border: 1.5px solid #b9cbc8; border-radius: 12px; background: #fff; transition: border-color .16s ease, box-shadow .16s ease; }
.search-row:focus-within { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(13, 112, 108, .1); }
.search-icon { position: absolute; right: 16px; width: 22px; height: 22px; color: #6f8688; pointer-events: none; }
.search-icon svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.search-row input { width: 100%; min-width: 0; height: 55px; padding: 0 50px 0 18px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 17px; }
.search-row input::placeholder { color: #60727a; opacity: 1; }
.search-row input:focus-visible { outline: 0; }
.clear-search { flex: 0 0 auto; margin-left: 8px; padding: 5px 9px; border: 0; border-radius: 8px; background: #edf3f2; color: #466067; font-size: 13px; }
.clear-search:hover { background: #dfeae7; }
.search-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; margin-top: 10px; color: #52666c; font-size: 13px; }
.filter-control { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; color: #52666d; }
.filter-control select { max-width: 205px; height: 37px; padding: 0 11px; border: 1px solid #d4e0dd; border-radius: 9px; background: #f8fbfa; color: #233c45; font-size: 14px; }

.results-section { padding: 30px 0 42px; }
.results-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.results-heading h2 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.results-heading p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.result-key { display: inline-flex; align-items: center; gap: 8px; color: #52666c; font-size: 12px; }
.result-key i { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.results-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.result-card { min-width: 0; padding: 17px; border: 1px solid #dbe5e3; border-radius: 15px; background: var(--paper); box-shadow: 0 4px 13px rgba(14, 44, 57, .035); }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.card-title-wrap { min-width: 0; }
.record-type { display: inline-flex; align-items: center; min-height: 25px; padding: 1px 8px; margin-bottom: 5px; border-radius: 7px; background: #eef4f2; color: #476269; font-size: 12px; font-weight: 700; }
.record-type.parent { background: #e4f2f0; color: #176e68; }
.result-card h3 { margin: 0; font-size: 17px; line-height: 1.65; overflow-wrap: anywhere; }
.group-line { margin: 2px 0 0; color: #587078; font-size: 13px; line-height: 1.7; }
.coverage-origin { margin: 9px 0 0; color: #52666c; font-size: 12px; }
.coverage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 13px; }
.coverage-item { display: flex; align-items: flex-start; gap: 7px; min-height: 36px; padding: 6px 8px; border-radius: 8px; background: #f5f8f7; color: #344c54; font-size: 12px; line-height: 1.5; }
.status-mark { flex: 0 0 17px; width: 17px; height: 17px; display: grid; place-items: center; margin-top: 1px; border-radius: 50%; font-size: 11px; font-weight: 800; line-height: 1; }
.coverage-item.accepted .status-mark { background: var(--teal-soft); color: #087267; }
.coverage-item.rejected .status-mark { background: var(--red-soft); color: var(--red); }
.coverage-item.unknown .status-mark { background: #e8edef; color: #64777c; }
.coverage-item.accepted { background: #f0f8f6; }
.coverage-item.rejected { background: #fcf4f3; }
.coverage-note { padding: 9px 10px; margin: 11px 0 0; border-right: 3px solid #d6a75b; border-radius: 5px 8px 8px 5px; background: #fff8eb; color: #6c542e; font-size: 13px; line-height: 1.7; }
.identifier-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.identifier { display: inline-flex; gap: 5px; align-items: center; padding: 3px 8px; border: 1px solid #e0e8e6; border-radius: 7px; background: #fafcfb; color: #52676e; font-size: 12px; direction: rtl; }
.identifier b { color: #314950; font-weight: 700; }
.source-line { padding-top: 9px; margin: 10px 0 0; border-top: 1px solid #edf1f0; color: #52666c; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.empty-state { padding: 38px 20px; border: 1px dashed #c8d5d2; border-radius: 15px; background: rgba(255,255,255,.65); text-align: center; }
.empty-search-icon { display: block; color: #82a09e; font-size: 36px; line-height: 1.2; }
.empty-state h3 { margin: 4px 0 3px; font-size: 18px; }
.empty-state p { max-width: 490px; margin: 0 auto; color: var(--muted); font-size: 14px; }
.more-wrap { display: flex; justify-content: center; padding-top: 18px; }
.show-more { min-height: 42px; padding: 7px 18px; border: 1px solid #b8ceca; border-radius: 10px; background: #fff; color: #175f5b; font-weight: 700; }
.show-more:hover { background: #edf7f4; border-color: #78aaa3; }

.site-footer { display: grid; grid-template-columns: 1fr auto; gap: 20px 40px; padding: 22px 0 26px; border-top: 1px solid #d8e2df; color: #52666c; }
.site-footer strong { display: block; margin-bottom: 2px; color: #354f57; font-size: 14px; }
.site-footer p { max-width: 640px; margin: 0; font-size: 13px; line-height: 1.8; }
.source-details { align-self: start; min-width: 240px; }
.source-details summary { color: #2e6663; cursor: pointer; font-size: 13px; font-weight: 700; }
.source-details ul { padding: 0 19px 0 0; margin: 8px 0 0; font-size: 12px; line-height: 1.8; }
.footer-meta { grid-column: 1 / -1; display: flex; gap: 22px; padding-top: 11px; border-top: 1px solid #e0e8e6; color: #52666c; font-size: 12px; }
.footer-meta b { color: #526a70; font-weight: 500; }

[hidden] { display: none !important; }

@media (max-width: 740px) {
  .site-header { min-height: 68px; padding: 0 20px; }
  .header-note { font-size: 12px; }
  .brand-mark { width: 36px; height: 36px; }
  .page-shell { width: min(100% - 28px, 600px); }
  .page-heading { padding: 30px 0 17px; }
  .search-panel { padding: 15px; border-radius: 14px; }
  .search-footer { align-items: flex-start; flex-direction: column; }
  .filter-control { width: 100%; justify-content: space-between; }
  .filter-control select { flex: 1; max-width: none; }
  .results-grid { grid-template-columns: 1fr; }
  .results-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
  .result-key { font-size: 12px; }
  .site-footer { grid-template-columns: 1fr; gap: 17px; }
  .source-details { min-width: 0; }
  .footer-meta { grid-column: auto; flex-wrap: wrap; }
}

@media (max-width: 390px) {
  .site-header { padding: 0 14px; }
  .header-note { font-size: 11px; }
  .brand-copy strong { font-size: 14px; }
  .brand-copy small { font-size: 11px; }
  .page-shell { width: calc(100% - 24px); }
  .search-row input { padding-right: 44px; padding-left: 9px; font-size: 15px; }
  .coverage-grid { grid-template-columns: 1fr; }
}
