/* =========================================================
   Prozoro — Clear Signal design system
   Mobile-first · Fast · Review-grid
   ========================================================= */

:root {
  /* Brand: clarity / trust / signal */
  --ink: #0b1822;
  --ink-soft: #445866;
  --ink-mute: #6b7f8c;
  --mist: #ebf2f4;
  --paper: #f5f9fa;
  --surface: #ffffff;
  --line: #d3e0e6;
  --line-strong: #b7c9d2;

  --clarity: #0c9b8a;
  --clarity-deep: #087a6d;
  --clarity-soft: #d6f3ef;
  --signal: #e4a010;
  --signal-soft: #fff3d6;
  --danger: #d24747;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(11, 24, 34, 0.04);
  --shadow: 0 2px 4px rgba(11, 24, 34, 0.04), 0 12px 28px rgba(11, 24, 34, 0.07);
  --shadow-lift: 0 8px 16px rgba(11, 24, 34, 0.08), 0 24px 48px rgba(11, 24, 34, 0.1);

  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: "Onest", system-ui, sans-serif;

  --container: 1180px;
  --header-h: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --focus: 0 0 0 3px rgba(12, 155, 138, 0.35);
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  max-width: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(12, 155, 138, 0.09), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(228, 160, 16, 0.07), transparent 50%),
    linear-gradient(180deg, var(--paper) 0%, var(--mist) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
  background-size: 180px;
  mix-blend-mode: multiply;
}

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

a {
  color: var(--clarity-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: var(--clarity);
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 0.5em;
}

p {
  margin: 0 0 1em;
}

ul, ol {
  margin: 0;
  padding: 0;
}

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: none;
}

/* ---------- Layout ---------- */
.site {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

.container {
  width: min(100% - 1.5rem, var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 1000;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  max-width: 100%;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(245, 249, 250, 0.82);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: min(100% - 1.5rem, var(--container));
  margin-inline: auto;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  flex: 1;
}

.site-branding a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.custom-logo-link img,
.site-logo {
  height: 36px;
  width: auto;
}

.site-title-fallback {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-title-fallback small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}

.header-nav {
  display: none;
}

.header-nav ul {
  list-style: none;
  display: flex;
  gap: 0.25rem;
}

.header-nav a {
  display: block;
  padding: 0.45rem 0.7rem;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 999px;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.header-nav a:hover,
.header-nav .current-menu-item > a {
  background: var(--clarity-soft);
  color: var(--clarity-deep);
}

.icon-btn {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.icon-btn:hover {
  border-color: var(--clarity);
  color: var(--clarity-deep);
  transform: translateY(-1px);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 42px;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.btn--primary {
  background: var(--clarity);
  color: #fff;
  box-shadow: 0 6px 16px rgba(12, 155, 138, 0.28);
}

.btn--primary:hover {
  background: var(--clarity-deep);
  color: #fff;
}

.btn--ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--clarity);
  color: var(--clarity-deep);
}

.btn--add {
  display: none;
}

/* ---------- Mobile drawer ---------- */
.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  visibility: hidden;
  overflow: hidden;
}

.nav-drawer.is-open {
  pointer-events: auto;
  visibility: visible;
}

.nav-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 24, 34, 0.45);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.nav-drawer.is-open .nav-drawer__backdrop {
  opacity: 1;
}

.nav-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(88vw, 340px);
  height: 100%;
  background: var(--surface);
  padding: 1.25rem;
  transform: translateX(100%);
  transition: transform 0.35s var(--ease);
  box-shadow: var(--shadow-lift);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.nav-drawer.is-open .nav-drawer__panel {
  transform: translateX(0);
}

.nav-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-drawer__title {
  font-family: var(--font-display);
  font-size: 0.95rem;
}

.nav-drawer nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-drawer nav a {
  display: block;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 1.05rem;
}

.nav-drawer nav a:hover {
  background: var(--clarity-soft);
  color: var(--clarity-deep);
}

/* ---------- Search overlay ---------- */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 210;
  background: rgba(11, 24, 34, 0.55);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: start center;
  padding: 15vh 1rem 1rem;
  padding-left: max(1rem, env(safe-area-inset-left, 0px));
  padding-right: max(1rem, env(safe-area-inset-right, 0px));
  opacity: 0;
  visibility: hidden;
  overflow-x: hidden;
  transition: opacity 0.25s var(--ease), visibility 0.25s;
}

.search-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.search-overlay__panel {
  width: 100%;
  max-width: 560px;
  box-sizing: border-box;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-lift);
  transform: translateY(-12px) scale(0.98);
  transition: transform 0.3s var(--ease);
}

.search-overlay.is-open .search-overlay__panel {
  transform: translateY(0) scale(1);
}

.search-form {
  display: flex;
  gap: 0.5rem;
}

.search-form label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.search-form input[type="search"] {
  flex: 1;
  min-width: 0;
  height: 52px;
  padding: 0 1rem;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font: inherit;
  background: var(--paper);
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-form input[type="search"]:focus {
  outline: none;
  border-color: var(--clarity);
  box-shadow: var(--focus);
  background: #fff;
}

.search-form button[type="submit"] {
  height: 52px;
  padding: 0 1.25rem;
  border-radius: 999px;
  background: var(--clarity);
  color: #fff;
  font-weight: 600;
}

/* ---------- Hero (home) ---------- */
.hero {
  padding: 1.5rem 0 1rem;
}

.hero__panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(12, 155, 138, 0.12) 0%, rgba(255, 255, 255, 0.7) 45%, rgba(228, 160, 16, 0.1) 100%),
    var(--surface);
  border: 1px solid rgba(211, 224, 230, 0.8);
  padding: 1.5rem 1.25rem 1.35rem;
  box-shadow: var(--shadow);
}

.hero__panel::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(12, 155, 138, 0.2), transparent 70%);
  pointer-events: none;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clarity-deep);
  margin-bottom: 0.65rem;
}

.hero__eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--clarity);
  box-shadow: 0 0 0 4px var(--clarity-soft);
}

.hero h1 {
  font-size: clamp(1.45rem, 5vw, 2.15rem);
  margin-bottom: 0.45rem;
  max-width: 18ch;
}

.hero__lead {
  color: var(--ink-soft);
  font-size: 0.98rem;
  max-width: 36ch;
  margin-bottom: 1.15rem;
}

.hero .search-form {
  position: relative;
  z-index: 1;
}

@media (max-width: 480px) {
  .hero .search-form {
    flex-direction: column;
  }

  .hero .search-form button[type="submit"] {
    width: 100%;
  }
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--ink-mute);
}

.hero__meta strong {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- Category chips (touch carousel + 3D depth) ---------- */
.cat-chips {
  --cat-fade: 2.25rem;
  position: relative;
  margin: 0.35rem 0 1.35rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.35rem;
}

.cat-chips__viewport {
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 calc(var(--cat-fade) * 0.55),
    #000 calc(100% - var(--cat-fade) * 0.55),
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 calc(var(--cat-fade) * 0.55),
    #000 calc(100% - var(--cat-fade) * 0.55),
    transparent 100%
  );
  perspective: 720px;
}

.cat-chips__track {
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.65rem var(--cat-fade) 0.85rem;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  cursor: grab;
  scrollbar-width: none;
  transform-style: preserve-3d;
}

.cat-chips__track.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  scroll-snap-type: none;
}

.cat-chips__track::-webkit-scrollbar {
  display: none;
}

.cat-chips__nav {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 1.25rem;
  line-height: 1;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
  transition: background 0.2s, color 0.2s, border-color 0.2s, opacity 0.2s, transform 0.2s var(--ease);
}

.cat-chips__nav:hover:not(:disabled) {
  border-color: var(--clarity);
  color: var(--clarity-deep);
  background: var(--clarity-soft);
  transform: scale(1.05);
}

.cat-chips__nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.cat-chip {
  --depth: 0;
  flex: 0 0 auto;
  scroll-snap-align: center;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid transparent;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  user-drag: none;
  box-shadow: var(--shadow-sm);
  transform:
    translateZ(calc(var(--depth) * 18px))
    scale(calc(0.92 + var(--depth) * 0.1))
    rotateY(calc((0.5 - var(--depth)) * -12deg));
  opacity: calc(0.55 + var(--depth) * 0.45);
  filter: saturate(calc(0.75 + var(--depth) * 0.35));
  transition:
    color 0.2s,
    background 0.2s,
    box-shadow 0.25s var(--ease),
    transform 0.2s var(--ease),
    opacity 0.2s var(--ease),
    filter 0.2s var(--ease);
  will-change: transform, opacity;
  pointer-events: auto;
}

body.is-cat-dragging {
  cursor: grabbing !important;
  user-select: none !important;
}

body.is-cat-dragging a {
  cursor: grabbing !important;
}

.cat-chip em {
  font-style: normal;
  font-size: 0.72rem;
  color: var(--ink-mute);
  background: var(--mist);
  padding: 0.12rem 0.42rem;
  border-radius: 999px;
}

.cat-chip:hover,
.cat-chip.is-center {
  color: var(--clarity-deep);
  background: var(--clarity-soft);
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(12, 155, 138, 0.12);
  border-color: transparent;
}

.cat-chip:hover em,
.cat-chip.is-center em {
  background: rgba(255, 255, 255, 0.75);
  color: var(--clarity-deep);
}

@media (max-width: 639px) {
  .cat-chips {
    --cat-fade: 1.35rem;
    grid-template-columns: 1fr;
  }

  .cat-chips__nav {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cat-chip {
    transform: none;
    opacity: 1;
    filter: none;
  }

  .cat-chips__track {
    scroll-behavior: auto;
  }
}

/* ---------- Section heads ---------- */
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.5rem 0 1rem;
}

.section-head h2 {
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  margin: 0;
}

.section-head p {
  margin: 0.2rem 0 0;
  color: var(--ink-mute);
  font-size: 0.88rem;
}

/* ---------- TOP rated (6 cols) ---------- */
.top-rated {
  margin: 0.25rem 0 1.75rem;
}

.top-rated--worst {
  margin-top: 1.75rem;
}

.top-rated__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.top-card {
  margin: 0;
}

.top-card__link {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  text-decoration: none;
  color: inherit;
}

.top-card__link:hover {
  text-decoration: none;
}

.top-card__media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--mist);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.top-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}

.top-card__link:hover .top-card__media img {
  transform: scale(1.05);
}

.top-card__placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--clarity-soft), var(--mist));
  color: var(--clarity-deep);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
}

.top-card__comments,
.top-card__rating {
  position: absolute;
  bottom: 0.45rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 1.55rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.top-card__comments {
  left: 0.45rem;
  background: rgba(11, 24, 34, 0.72);
  color: #fff;
}

.top-card__comments svg {
  width: 12px;
  height: 12px;
}

.top-card__rating {
  right: 0.45rem;
  color: #fff;
}

.top-card__rating--bad {
  background: rgba(214, 69, 69, 0.92);
}

.top-card__rating--mid {
  background: rgba(228, 160, 16, 0.95);
}

.top-card__rating--good {
  background: rgba(26, 163, 90, 0.95);
}

.top-card__title {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.top-card__link:hover .top-card__title {
  color: var(--clarity-deep);
}

@media (min-width: 640px) {
  .top-rated__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.9rem;
  }

  .top-card__title {
    font-size: 0.88rem;
  }
}

@media (min-width: 960px) {
  .top-rated__grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
  }
}

/* ---------- Company card grid ---------- */
.company-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
}

.company-card {
  --delay: 0ms;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
  animation: cardIn 0.55s var(--ease) both;
  animation-delay: var(--delay);
}

@media (prefers-reduced-motion: reduce) {
  .company-card {
    animation: none;
  }
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.company-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  border-color: var(--line-strong);
}

.company-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--mist);
}

.company-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.company-card:hover .company-card__media img {
  transform: scale(1.05);
}

.company-card__media-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, var(--clarity-soft), var(--mist));
  color: var(--clarity-deep);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
}

.company-card__cats {
  position: absolute;
  left: 0.65rem;
  bottom: 0.65rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  max-width: calc(100% - 1.3rem);
}

.badge {
  display: inline-block;
  max-width: 100%;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: rgba(11, 24, 34, 0.78);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  backdrop-filter: blur(6px);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge:hover {
  color: #fff;
  background: var(--clarity-deep);
  text-decoration: none;
}

.company-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1rem 1rem 0.9rem;
  gap: 0.45rem;
}

.company-card__title {
  font-size: 1.02rem;
  margin: 0;
  line-height: 1.3;
}

.company-card__title a {
  color: var(--ink);
  text-decoration: none;
}

.company-card__title a:hover {
  color: var(--clarity-deep);
}

.company-card__excerpt {
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.company-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--mist);
}

.review-count {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--ink-mute);
  font-size: 0.82rem;
  font-weight: 500;
}

.review-count svg {
  width: 16px;
  height: 16px;
  color: var(--clarity);
}

.company-card__cta {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--clarity-deep);
  text-decoration: none;
  white-space: nowrap;
}

.company-card__cta:hover {
  color: var(--clarity);
}

.company-card__cta span {
  display: inline-block;
  transition: transform 0.2s var(--ease);
}

.company-card:hover .company-card__cta span {
  transform: translateX(3px);
}

/* ---------- Pagination ---------- */
.pagination {
  margin: 0 0 2.5rem;
}

.pagination__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
}

.pagination__item a,
.pagination__item span {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  padding: 0 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.pagination__item.is-active span,
.pagination__item .current {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.pagination__item a:hover {
  border-color: var(--clarity);
  color: var(--clarity-deep);
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  padding: 1rem 0 0.5rem;
  font-size: 0.82rem;
}

.breadcrumbs__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  color: var(--ink-mute);
}

.breadcrumbs__item:not(:last-child)::after {
  content: "/";
  margin-left: 0.35rem;
  color: var(--line-strong);
}

.breadcrumbs a {
  color: var(--ink-soft);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--clarity-deep);
}

/* ---------- Single company ---------- */
.prozoro-single-view .site-main > .container,
.page .site-main > .container {
  padding-top: 1.25rem;
}

.single-layout {
  display: grid;
  gap: 1.5rem;
  padding-bottom: 2.5rem;
  min-width: 0;
  max-width: 100%;
}

.company-article {
  min-width: 0;
  max-width: 100%;
}

.company-hero {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  max-width: 100%;
}

.company-hero__media {
  position: relative;
  background:
    linear-gradient(135deg, var(--clarity-soft), var(--mist));
  line-height: 0;
}

/* Full photo, scaled to column width — no crop, no forced ratio. */
.company-hero__media img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: unset;
}

/* ---------- Rating corner triangle (wpDiscuz avg) ---------- */
.rating-corner {
  --rating-size: 4.6rem;
  position: absolute;
  top: 0;
  right: 0;
  width: var(--rating-size);
  height: var(--rating-size);
  z-index: 4;
  pointer-events: none;
  overflow: hidden;
}

.rating-corner::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 var(--rating-size) var(--rating-size) 0;
  border-color: transparent currentColor transparent transparent;
}

.rating-corner--bad {
  color: #d64545;
}

.rating-corner--mid {
  color: #e4a010;
}

.rating-corner--good {
  color: #1aa35a;
}

.rating-corner__value {
  position: absolute;
  top: 0.52rem;
  right: 0.28rem;
  width: 2rem;
  text-align: center;
  transform: rotate(45deg);
  transform-origin: center;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
  letter-spacing: -0.02em;
}

.company-hero__media .rating-corner {
  --rating-size: 5.4rem;
}

.company-hero__media .rating-corner__value {
  top: 0.62rem;
  right: 0.34rem;
  font-size: 0.95rem;
  width: 2.25rem;
}

.company-hero__body {
  padding: 1.25rem 1.15rem 1.4rem;
}

.company-hero__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.chip {
  display: inline-flex;
  max-width: 100%;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--clarity-soft);
  color: var(--clarity-deep);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
}

.chip:hover {
  background: var(--clarity);
  color: #fff;
  text-decoration: none;
}

.company-hero h1 {
  font-size: clamp(1.4rem, 4.5vw, 2rem);
  margin-bottom: 0.55rem;
}

.company-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  color: var(--ink-mute);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.entry-content {
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--ink);
}

.entry-content > *:first-child {
  margin-top: 0;
}

.entry-content > *:last-child {
  margin-bottom: 0;
}

.entry-content a {
  font-weight: 500;
}

.entry-content img {
  border-radius: var(--radius-sm);
  max-width: 100%;
  height: auto;
}

.entry-content .alignleft,
.entry-content .alignright,
.entry-content img.alignleft,
.entry-content img.alignright {
  max-width: 100%;
}

@media (max-width: 639px) {
  .entry-content .alignleft,
  .entry-content .alignright,
  .entry-content img.alignleft,
  .entry-content img.alignright,
  .entry-content .wp-caption.alignleft,
  .entry-content .wp-caption.alignright {
    float: none;
    display: block;
    margin: 0 0 1rem;
    width: 100% !important;
    max-width: 100%;
  }
}

.entry-content h2,
.entry-content h3 {
  margin-top: 1.5em;
  margin-bottom: 0.55em;
  line-height: 1.25;
}

.entry-content p {
  margin: 0 0 1.05em;
}

.entry-content ul,
.entry-content ol {
  list-style: none;
  margin: 0.35em 0 1.4em;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.entry-content li {
  position: relative;
  margin: 0;
  padding: 0 0 0 1.7rem;
  color: var(--ink-soft);
  line-height: 1.6;
  background: none;
  border: 0;
  border-radius: 0;
}

.entry-content li + li {
  padding-top: 0.15rem;
}

.entry-content li > ul,
.entry-content li > ol {
  margin: 0.65rem 0 0.15rem;
  gap: 0.45rem;
}

.entry-content li > ul li,
.entry-content li > ol li {
  padding-left: 1.45rem;
}

.entry-content ul > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.78rem;
  height: 0.78rem;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, var(--clarity) 0 38%, transparent 40%),
    var(--clarity-soft);
  box-shadow: inset 0 0 0 1px rgba(12, 155, 138, 0.22);
}

.entry-content ol {
  counter-reset: prozoro-ol;
}

.entry-content ol > li {
  counter-increment: prozoro-ol;
  padding-left: 2.1rem;
}

.entry-content ol > li::before {
  content: counter(prozoro-ol);
  position: absolute;
  left: 0;
  top: 0.05em;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--clarity-soft);
  color: var(--clarity-deep);
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(12, 155, 138, 0.18);
}

.entry-content li::marker {
  content: "";
}

.entry-content strong {
  color: var(--ink);
  font-weight: 700;
}

.entry-content blockquote {
  margin: 0 0 1.25em;
  padding: 1rem 1.15rem;
  border-left: 3px solid var(--clarity);
  background: var(--clarity-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink-soft);
}

/* ---------- ACF company contacts ---------- */
.company-meta {
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--mist);
}

.company-meta__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.company-meta__item {
  display: grid;
  gap: 0.15rem;
}

.company-meta__label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.company-meta__value {
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.45;
  word-break: break-word;
}

.company-meta__value a {
  color: var(--clarity-deep);
  text-decoration: none;
  font-weight: 500;
}

.company-meta__value a:hover {
  color: var(--clarity);
  text-decoration: underline;
}

@media (min-width: 640px) {
  .company-meta__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem 1.25rem;
  }
}

.related-block {
  margin-top: 2rem;
}

.related-block h2 {
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

.sidebar .widget {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
}

.widget ul {
  list-style: none;
}

.widget li {
  margin: 0;
}

.widget li a {
  display: block;
  padding: 0.45rem 0;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--mist);
  font-size: 0.92rem;
}

.widget li a:hover {
  color: var(--clarity-deep);
}

.widget li ul {
  padding-left: 0.85rem;
}

.widget li li a {
  font-size: 0.86rem;
  color: var(--ink-mute);
}

/* Comments / wpDiscuz mount */
.comments-area {
  margin-top: 1.75rem;
  background: var(--surface);
  border: 0;
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  box-shadow: var(--shadow-sm);
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}

.comments-area > h2,
.comments-title {
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

/* ---------- Page / search / 404 ---------- */
.page-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.2rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.page-panel h1 {
  font-size: clamp(1.35rem, 4vw, 1.85rem);
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
}

.empty-state h1 {
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--ink-soft);
  margin-bottom: 1.25rem;
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
}

.site-footer__inner {
  padding: 2rem 0 1.5rem;
  display: grid;
  gap: 1.5rem;
}

.site-footer__brand {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.site-footer__desc {
  color: var(--ink-mute);
  font-size: 0.9rem;
  max-width: 42ch;
  margin: 0;
}

.site-footer__menu ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.site-footer__menu a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
}

.site-footer__menu a:hover {
  color: var(--clarity-deep);
}

.site-footer__bottom {
  border-top: 1px solid var(--mist);
  padding: 1rem 0 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: space-between;
  color: var(--ink-mute);
  font-size: 0.82rem;
}

/* ---------- Tablet+ ---------- */
@media (min-width: 640px) {
  :root {
    --header-h: 70px;
  }

  .prozoro-single-view .site-main > .container,
  .page .site-main > .container {
    padding-top: 1.5rem;
  }

  .custom-logo-link img,
  .site-logo {
    height: 42px;
  }

  .btn--add {
    display: inline-flex;
  }

  .company-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.15rem;
  }

  .hero__panel {
    padding: 2rem 2rem 1.75rem;
  }

  .company-hero__body {
    padding: 1.5rem 1.5rem 1.65rem;
  }

  .comments-area,
  .page-panel {
    padding: 1.5rem;
  }
}

/* ---------- Desktop ---------- */
@media (min-width: 960px) {
  .header-nav {
    display: block;
  }

  .menu-toggle {
    display: none;
  }

  .company-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }

  .single-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
    gap: 1.75rem;
  }

  .sidebar {
    position: static;
  }

  .site-footer__inner {
    grid-template-columns: 1.4fr 1fr;
    align-items: start;
  }

  .hero {
    padding: 2rem 0 1.25rem;
  }
}

@media (min-width: 1100px) {
  .company-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .prozoro-single-view .company-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* wpDiscuz soft integration — separate comment cards */
#wpdcom {
  font-family: var(--font-body) !important;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
}

#wpdcom .wpd-form-head,
#wpdcom .wpd-thread-head {
  border-radius: var(--radius-sm);
}

/* Kill sticky sidebar from theme / Fixed Widget plugin */
.sidebar,
.sidebar .widget,
.sidebar .q2w3-fixed-widget,
.widget.q2w3_fixed_widget {
  position: static !important;
  top: auto !important;
  transform: none !important;
}

#wpdcom .wpd-thread-list > .wpd-comment,
#wpdcom .wpd-comment.wpd-reply,
#wpdcom .wpd-list-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.05rem 0.85rem;
  margin: 0 0 0.9rem;
  box-shadow: var(--shadow-sm);
}

#wpdcom .wpd-comment .wpd-comment {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.85rem 0.9rem 0.7rem;
  margin: 0.75rem 0 0.5rem;
  box-shadow: none;
}

#wpdcom .wpd-comment .wpd-comment-wrap {
  padding-bottom: 0.35rem;
}

#wpdcom .wpd-comment .wpd-comment-right {
  padding-bottom: 0.5rem;
}

#wpdcom .wpd-comment-header .wpd-comment-author,
#wpdcom .wpd-comment-header .wpd-comment-author a {
  color: var(--ink);
  font-weight: 700;
}

#wpdcom .wpd-comment-date {
  color: var(--ink-mute);
}

#wpdcom .wpd-comment-text {
  color: var(--ink-soft);
  line-height: 1.6;
}

#wpdcom .wpd-reply-to,
#wpdcom .wpd-reply-form {
  background: var(--paper);
  border-radius: var(--radius-sm);
}
