:root {
  --bg: #07060c;
  --panel: #0f0e18;
  --panel-border: #211f33;
  --text: #f3f1fa;
  --muted: #9893ad;
  --violet: #6a60d7;
  --violet-bright: #9b6bff;
  --pink: #ff6bd6;
  --cyan: #3ddcff;
  --amber: #ffb648;
  --green: #3ee08a;
  --grad: linear-gradient(135deg, var(--violet-bright), var(--pink));
  --header-bg: #07060c;
  --header-border: #211f33;
  --header-text: #f3f1fa;
  --header-control-bg: #12101c;
  --header-control-border: #2a2840;
  --torscan-bg: #ffffff;
  --torscan-border: rgba(255, 255, 255, 0.15);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.4;
  min-height: 100vh;
  scrollbar-width: thin;
  scrollbar-color: rgba(155, 107, 255, 0.42) rgba(255, 255, 255, 0.04);
}

*::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

*::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(155, 107, 255, 0.52), rgba(106, 96, 215, 0.42));
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(155, 107, 255, 0.72), rgba(106, 96, 215, 0.62));
  background-clip: padding-box;
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239893ad' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
  cursor: pointer;
}

select:focus {
  outline: none;
}

select option {
  background: #12101c;
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

/* ticker */
.ticker {
  background: linear-gradient(90deg, #3a1664, #7a1d5e);
  padding: 10px 16px;
  font-size: 13px;
  text-align: center;
  color: #f4e9ff;
  border-bottom: 1px solid #2c1240;
}

/* header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 40px;
  border-bottom: 1px solid var(--header-border);
  background: rgba(7, 6, 12, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--header-text);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.header-left {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: var(--header-text);
}

.logo-word {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
  line-height: 1;
}

.logo-word b {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-img {
  display: block;
  height: 36px;
  width: auto;
  object-fit: contain;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(62, 224, 138, 0.08);
  border: 1px solid rgba(62, 224, 138, 0.28);
  color: var(--green);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--header-control-border);
  background: var(--header-control-bg);
  color: var(--header-text);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.icon-btn:hover {
  border-color: var(--violet-bright);
}

.torscan-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(155, 107, 255, 0.45);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  color: var(--header-text);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.torscan-btn:hover {
  border-color: rgba(155, 107, 255, 0.75);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 16px rgba(123, 47, 201, 0.22);
  transform: translateY(-1px);
}

.torscan-btn:active {
  transform: translateY(0);
}

.torscan-btn__logo {
  display: block;
  height: 22px;
  width: auto;
  object-fit: contain;
}

.torscan-btn__arrow {
  font-size: 14px;
  font-weight: 600;
  color: var(--violet-bright);
  line-height: 1;
  opacity: 0.9;
}

/* subcategory tabs */
.sub-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.sub-tab {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.sub-tab:hover {
  border-color: var(--violet-bright);
  color: var(--text);
}

.sub-tab.active {
  border-color: var(--violet-bright);
  background: rgba(155, 107, 255, 0.12);
  color: var(--violet-bright);
}

/* main content */
#main {
  min-height: 60vh;
}

.page-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 20px 48px;
}

/* hero */
.hero {
  padding: 18px 20px 20px;
  max-width: 1280px;
  margin: 0 auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(155, 107, 255, 0.4);
  background: rgba(155, 107, 255, 0.08);
  color: var(--violet-bright);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.badge--telegram:hover {
  background: rgba(155, 107, 255, 0.16);
  border-color: var(--violet-bright);
  color: #fff;
}

h1 {
  font-size: 44px;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.02em;
}

h1 .accent {
  display: block;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  color: var(--muted);
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.5;
  max-width: 36em;
}

.subtitle b {
  color: var(--text);
  font-weight: 600;
}

/* search */
.search-bar {
  margin-top: 20px;
  width: 100%;
}

.search-bar__field {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 6px 6px 6px 18px;
  transition: border-color 0.2s;
}

.search-bar__field:focus-within {
  border-color: var(--violet-bright);
}

.search-bar input {
  flex: 1;
  min-width: 0;
  width: auto;
  max-width: none;
  border: none;
  background: transparent;
  padding: 11px 8px 11px 0;
  color: var(--text);
  font-size: 15px;
}

.search-bar input::placeholder {
  color: #6b6680;
}

.search-bar input:focus {
  outline: none;
}

.search-bar button {
  flex-shrink: 0;
  background: transparent;
  border: 1px solid var(--violet-bright);
  color: var(--violet-bright);
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: 0.2s;
  white-space: nowrap;
}

.search-bar button:hover {
  background: var(--violet-bright);
  color: #fff;
}

.btn-primary {
  background: transparent;
  border: 1px solid var(--violet-bright);
  color: var(--violet-bright);
  padding: 0 24px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: 0.2s;
  white-space: nowrap;
}

.search-bar button:hover,
.btn-primary:hover {
  background: var(--violet-bright);
  color: #fff;
}

/* banner carousel (OLinks-style 3D slider) */
.banner-section {
  max-width: 1280px;
  margin: 0 auto 30px;
  padding: 0 20px;
  overflow: hidden;
}

.banner-slider {
  position: relative;
  height: clamp(150px, 28vw, 220px);
}

.banner-slider__track {
  position: relative;
  width: 100%;
  height: 100%;
}

.banner-slide {
  position: absolute;
  top: 0;
  left: 50%;
  width: min(90vw, 450px);
  height: clamp(150px, 28vw, 220px);
  margin-left: calc(min(90vw, 450px) / -2);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  background: #120a22;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, opacity;
}

.banner-slide.is-active {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.banner-slide__content,
.banner-slide__frame {
  width: 100%;
  height: 100%;
}

.banner-slide__frame {
  overflow: hidden;
}

.banner-slide__media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
}

.banner-slide__fallback {
  width: 100%;
  height: 100%;
}

/* stat cards (admin + legacy) */
.stat {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 18px;
  text-align: center;
}

.stat .num {
  font-size: 28px;
  font-weight: 800;
}

.stat .label {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}

.stat.violet .num { color: var(--violet-bright); }
.stat.green .num { color: var(--green); }
.stat.amber .num { color: var(--amber); }

/* category grid */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(8px, 1.6vw, 16px);
  align-items: stretch;
  width: 100%;
}

.grid > .card--split,
.grid > .card--full,
.row3 > .card--split,
.row3 > .card--full {
  min-width: 0;
}

.row3 {
  grid-column: span 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(6px, 1.2vw, 16px);
  align-items: stretch;
  width: 100%;
  min-width: 0;
}

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

.row3--1 {
  grid-template-columns: minmax(0, 1fr);
  max-width: calc(50% - clamp(4px, 0.8vw, 8px));
}

.grid-layout-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.grid-layout-bar__right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.grid-layout-bar__label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.facet-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 4px;
  min-width: 0;
}

.facet-tabs__sep {
  color: rgba(152, 147, 173, 0.55);
  font-size: 13px;
  font-weight: 600;
  user-select: none;
  padding: 0 2px;
}

.facet-tabs__btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  padding: 6px 4px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.facet-tabs__btn:hover {
  color: var(--text);
}

.facet-tabs__btn.active {
  color: #fff;
}

.grid-layout-toggle {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.03);
  gap: 2px;
}

.grid-layout-toggle__btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.grid-layout-toggle__btn:hover {
  color: #fff;
}

.grid-layout-toggle__btn.active {
  color: #fff;
  background: rgba(155, 107, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(155, 107, 255, 0.45);
}

.card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--panel-border);
  padding: 22px;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s ease, border-color 0.25s ease;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-4px);
}

.card--full {
  padding: 0;
  min-height: 0;
  border: none;
  background: transparent;
  display: block;
  overflow: visible;
  width: 100%;
  transition: transform 0.25s ease;
}

.card--full:hover {
  transform: translateY(-4px);
}

.card__media {
  display: block;
  position: relative;
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  background: #060515;
  box-shadow: 0 0 0 1px rgba(130, 100, 210, 0.14);
  transition: box-shadow 0.25s ease;
}

.grid > .card--full,
.row3 > .card--full {
  align-self: stretch;
  width: 100%;
}

.grid > .card--full .card__media,
.row3 .card__media {
  aspect-ratio: 1472 / 868;
  width: 100%;
}

.card--full:hover .card__media {
  box-shadow:
    0 0 0 1px rgba(155, 107, 255, 0.35),
    0 12px 28px rgba(0, 0, 0, 0.32);
}

.card__full {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  border: none;
}

/* split category cards (icon + HTML text + art PNG) */
.card--split {
  aspect-ratio: 1472 / 868;
  min-height: 0;
  padding: clamp(14px, 2.4vw, 22px) clamp(14px, 2.4vw, 24px) clamp(14px, 2.4vw, 22px) clamp(10px, 1.8vw, 16px);
  overflow: hidden;
  border: none;
  border-radius: clamp(14px, 2.2vw, 18px);
  display: block;
  box-shadow: inset 0 0 0 1px var(--card-ring, rgba(130, 100, 210, 0.35));
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card--split:hover {
  transform: translateY(-4px);
}

.card--split .card__content {
  position: relative;
  z-index: 2;
  max-width: 52%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: 100%;
  min-height: 0;
}

.card--split .card__icon {
  width: clamp(84px, 14.4vw, 150px);
  height: clamp(84px, 14.4vw, 150px);
  margin: clamp(-4px, -0.4vw, -6px) 0 clamp(4px, 0.8vw, 8px) clamp(-4px, -0.4vw, -6px);
  flex-shrink: 0;
}

.card--split .card__icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card--split .card__titles {
  margin-top: auto;
  padding-left: 2px;
}

.card--split h3 {
  font-size: clamp(18px, 3.2vw, 28px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.card--split .card__subtitle {
  margin-top: clamp(4px, 0.8vw, 8px);
  color: #fff;
  font-size: clamp(14px, 2.2vw, 20px);
  font-weight: 400;
  line-height: 1.15;
  opacity: 0.96;
}

.card--split .card__art {
  position: absolute;
  right: -2%;
  bottom: -6%;
  width: 58%;
  max-height: 118%;
  object-fit: contain;
  object-position: right bottom;
  pointer-events: none;
  z-index: 1;
}

.grid > .card--split,
.row3 > .card--split {
  aspect-ratio: 1472 / 868;
}

.card-cat--marketpleysy {
  --card-ring: rgba(32, 16, 94, 0.85);
  background:
    radial-gradient(ellipse 90% 120% at 72% 55%, rgba(123, 47, 201, 0.22), transparent 68%),
    radial-gradient(circle at 12% 18%, rgba(155, 107, 255, 0.1), transparent 42%),
    linear-gradient(145deg, #130a22 0%, #07040f 52%, #090612 100%);
}

.card-cat--obmenniki {
  --card-ring: rgba(51, 24, 12, 0.9);
  background:
    radial-gradient(ellipse 85% 110% at 78% 50%, rgba(252, 200, 84, 0.14), transparent 65%),
    linear-gradient(145deg, #1a0d06 0%, #0a0604 55%, #120905 100%);
}

.card-cat--tg {
  --card-ring: rgba(0, 41, 37, 0.9);
  background:
    radial-gradient(ellipse 90% 115% at 75% 48%, rgba(96, 239, 189, 0.12), transparent 68%),
    linear-gradient(145deg, #021612 0%, #010c0a 55%, #021411 100%);
}

.card-cat--forumy {
  --card-ring: rgba(1, 21, 56, 0.9);
  background:
    radial-gradient(ellipse 88% 112% at 74% 50%, rgba(78, 168, 209, 0.14), transparent 66%),
    linear-gradient(145deg, #06101f 0%, #040812 55%, #06101c 100%);
}

.card-cat--bukmekery {
  --card-ring: rgba(56, 12, 28, 0.9);
  background:
    radial-gradient(ellipse 88% 112% at 76% 50%, rgba(255, 120, 100, 0.16), transparent 66%),
    linear-gradient(145deg, #1a0608 0%, #0d0406 55%, #160508 100%);
}

.card-cat--devochki {
  --card-ring: rgba(48, 11, 27, 0.9);
  background:
    radial-gradient(ellipse 88% 112% at 76% 50%, rgba(219, 97, 131, 0.16), transparent 66%),
    linear-gradient(145deg, #180610 0%, #0d0408 55%, #16040c 100%);
}

.card-cat--vpn {
  --card-ring: rgba(24, 26, 50, 0.9);
  background:
    radial-gradient(ellipse 88% 112% at 74% 48%, rgba(51, 111, 207, 0.16), transparent 66%),
    linear-gradient(145deg, #010310 0%, #010208 55%, #010310 100%);
}

.card-cat--uslugi {
  --card-ring: transparent;
  background: #020623;
}

.card-cat--uslugi.card--split {
  box-sizing: border-box;
  container-type: size;
  padding: 0;
  border: clamp(2px, 0.27vw, 4px) solid #170f48;
  border-radius: clamp(16px, 4.89vw, 72px);
  box-shadow: none;
  background: #020623;
}

.card-cat--uslugi.card--split .card__content {
  position: static;
  width: 100%;
  height: 100%;
  max-width: none;
  display: block;
}

.card-cat--uslugi.card--split .card__icon {
  position: absolute;
  left: 5.163%;
  top: 8.756%;
  width: 14.402%;
  height: 24.424%;
  margin: 0;
  box-sizing: border-box;
  background: #48189f;
  border: clamp(2px, 0.2vw, 3px) solid #e38eff;
  border-radius: 22.64%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.card-cat--uslugi.card--split .card__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.card-cat--uslugi.card--split .card__titles {
  position: absolute;
  left: 5.163%;
  top: 40.323%;
  margin: 0;
  padding: 0;
  width: 42%;
  z-index: 2;
}

.card-cat--uslugi.card--split h3 {
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: clamp(18px, 8.3cqh, 72px);
  font-weight: 600;
  line-height: normal;
  letter-spacing: 0;
  color: #fff;
}

.card-cat--uslugi.card--split .card__art {
  left: 35.733%;
  top: -1.268%;
  right: auto;
  bottom: auto;
  width: 64.266%;
  height: 101.267%;
  max-height: none;
  object-fit: cover;
  object-position: 5.69% top;
  transform: scale(1.057);
  transform-origin: left top;
  z-index: 1;
}

.card-cat--uslugi.card--split:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
}

.card-cat--drugoe {
  --card-ring: transparent;
  background: #01041b;
}

.card-cat--drugoe.card--split {
  box-sizing: border-box;
  container-type: size;
  padding: 0;
  border: clamp(2px, 0.27vw, 4px) solid #04061d;
  border-radius: clamp(16px, 4.89vw, 72px);
  box-shadow: none;
  background: #01041b;
}

.card-cat--drugoe.card--split .card__content {
  position: static;
  width: 100%;
  height: 100%;
  max-width: none;
  display: block;
}

.card-cat--drugoe.card--split .card__icon {
  position: absolute;
  left: 5.163%;
  top: 8.756%;
  width: 14.402%;
  height: 24.424%;
  margin: 0;
  box-sizing: border-box;
  background: #48189f;
  border: clamp(2px, 0.2vw, 3px) solid #e38eff;
  border-radius: 22.64%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.card-cat--drugoe.card--split .card__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.card-cat--drugoe.card--split .card__titles {
  position: absolute;
  left: 5.163%;
  top: 40.323%;
  margin: 0;
  padding: 0;
  width: 42%;
  z-index: 2;
}

.card-cat--drugoe.card--split h3 {
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: clamp(18px, 8.3cqh, 72px);
  font-weight: 600;
  line-height: normal;
  letter-spacing: 0;
  color: #fff;
}

.card-cat--drugoe.card--split .card__art {
  left: 32.402%;
  top: -5.53%;
  right: auto;
  bottom: auto;
  width: 68.815%;
  height: 108.756%;
  max-height: none;
  object-fit: cover;
  object-position: 8.03% top;
  transform: scale(1.081);
  transform-origin: left top;
  z-index: 1;
}

.card-cat--drugoe.card--split:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
}

.card-cat--marketpleysy:hover { box-shadow: inset 0 0 0 1px rgba(155, 107, 255, 0.65), 0 12px 28px rgba(0, 0, 0, 0.32); }
.card-cat--obmenniki:hover { box-shadow: inset 0 0 0 1px rgba(252, 200, 84, 0.55), 0 12px 28px rgba(0, 0, 0, 0.32); }
.card-cat--tg:hover { box-shadow: inset 0 0 0 1px rgba(96, 239, 189, 0.55), 0 12px 28px rgba(0, 0, 0, 0.32); }
.card-cat--forumy:hover { box-shadow: inset 0 0 0 1px rgba(78, 168, 209, 0.55), 0 12px 28px rgba(0, 0, 0, 0.32); }
.card-cat--bukmekery:hover { box-shadow: inset 0 0 0 1px rgba(255, 140, 120, 0.55), 0 12px 28px rgba(0, 0, 0, 0.32); }
.card-cat--devochki:hover { box-shadow: inset 0 0 0 1px rgba(219, 97, 131, 0.55), 0 12px 28px rgba(0, 0, 0, 0.32); }
.card-cat--vpn:hover { box-shadow: inset 0 0 0 1px rgba(51, 111, 207, 0.55), 0 12px 28px rgba(0, 0, 0, 0.32); }
.card-cat--drugoe:hover { box-shadow: inset 0 0 0 1px rgba(130, 100, 210, 0.55), 0 12px 28px rgba(0, 0, 0, 0.32); }

/* vpn: inner icon PNG + one CSS gradient ring (until clean Figma export) */
.card-cat--vpn .card__icon {
  overflow: hidden;
  border-radius: 23%;
  padding: 3px;
  background: linear-gradient(150deg, rgba(51, 111, 207, 1) 7%, rgba(4, 12, 58, 1) 97%);
  box-sizing: border-box;
}

.card-cat--vpn .card__icon img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 18%;
  object-fit: cover;
}

.card-cat--vpn .card__art {
  top: 30%;
  bottom: -6%;
  height: auto;
  max-height: none;
  width: 56%;
}

@media (max-width: 640px) {
  .card--split:not(.card-cat--uslugi):not(.card-cat--drugoe) {
    aspect-ratio: 1.48 / 1;
    padding: clamp(8px, 2.2vw, 14px) clamp(8px, 2vw, 12px) clamp(8px, 2.2vw, 14px) clamp(6px, 1.6vw, 10px);
    border-radius: clamp(12px, 2vw, 16px);
  }

  .card--split:not(.card-cat--uslugi):not(.card-cat--drugoe) .card__content {
    max-width: 56%;
  }

  .card--split:not(.card-cat--uslugi):not(.card-cat--drugoe) .card__icon {
    width: clamp(52px, 18vw, 88px);
    height: clamp(52px, 18vw, 88px);
    margin: -2px 0 2px -2px;
  }

  .card--split:not(.card-cat--uslugi):not(.card-cat--drugoe) h3 {
    font-size: clamp(13px, 3.6vw, 20px);
    line-height: 1.05;
  }

  .card--split:not(.card-cat--uslugi):not(.card-cat--drugoe) .card__subtitle {
    font-size: clamp(10px, 2.6vw, 14px);
    margin-top: clamp(2px, 0.6vw, 4px);
  }

  .card--split:not(.card-cat--uslugi):not(.card-cat--drugoe) .card__art {
    width: 50%;
    right: -4%;
    bottom: -4%;
    max-height: 110%;
  }

  .card-cat--uslugi.card--split,
  .card-cat--drugoe.card--split {
    border-radius: clamp(14px, 4.2vw, 36px);
  }

  .card-cat--uslugi.card--split h3,
  .card-cat--drugoe.card--split h3 {
    font-size: clamp(16px, 7.5cqh, 36px);
  }
}

.card--art {
  min-height: 150px;
}

.card--art .card__content {
  position: relative;
  z-index: 2;
  max-width: 58%;
}

.card__art {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 50%;
  max-height: 92%;
  object-fit: contain;
  object-position: right bottom;
  pointer-events: none;
}

.card .icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 24px;
}

.card h3 {
  font-size: 18px;
  font-weight: 700;
}

.card p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.c1 {
  background: radial-gradient(circle at 80% 20%, rgba(155, 107, 255, 0.18), transparent 60%), var(--panel);
  border-color: rgba(155, 107, 255, 0.3);
}
.c1 .icon { background: rgba(155, 107, 255, 0.15); }
.c1:hover { border-color: var(--violet-bright); }

.c2 {
  background: radial-gradient(circle at 80% 20%, rgba(255, 182, 72, 0.18), transparent 60%), var(--panel);
  border-color: rgba(255, 182, 72, 0.3);
}
.c2 .icon { background: rgba(255, 182, 72, 0.15); }
.c2:hover { border-color: var(--amber); }

.c3 {
  background: radial-gradient(circle at 80% 20%, rgba(255, 107, 107, 0.18), transparent 60%), var(--panel);
  border-color: rgba(255, 107, 107, 0.3);
}
.c3 .icon { background: rgba(255, 107, 107, 0.15); }
.c3:hover { border-color: #ff6b6b; }

.c4 {
  background: radial-gradient(circle at 80% 20%, rgba(61, 220, 255, 0.18), transparent 60%), var(--panel);
  border-color: rgba(61, 220, 255, 0.3);
}
.c4 .icon { background: rgba(61, 220, 255, 0.15); }
.c4:hover { border-color: var(--cyan); }

.c5 {
  background: radial-gradient(circle at 80% 20%, rgba(62, 224, 138, 0.18), transparent 60%), var(--panel);
  border-color: rgba(62, 224, 138, 0.3);
}
.c5 .icon { background: rgba(62, 224, 138, 0.15); }
.c5:hover { border-color: var(--green); }

.c6 {
  background: radial-gradient(circle at 80% 20%, rgba(255, 107, 214, 0.18), transparent 60%), var(--panel);
  border-color: rgba(255, 107, 214, 0.3);
}
.c6 .icon { background: rgba(255, 107, 214, 0.15); }
.c6:hover { border-color: var(--pink); }

/* page headers */
.page-head {
  padding: 20px 0 12px;
}

.page-head h2 {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.15;
}

.page-head p {
  color: var(--muted);
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.45;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
  margin-bottom: 18px;
  cursor: pointer;
}

.back-link:hover {
  color: var(--violet-bright);
}

/* project list */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
  padding-top: 4px;
}

html[data-grid-cols="1"] .project-grid {
  grid-template-columns: 1fr;
  gap: 12px;
}

html[data-grid-cols="2"] .project-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Home category grid: same 1/2 toggle on desktop (not only ≤760px) */
html[data-grid-cols="1"] .grid {
  grid-template-columns: 1fr;
}

html[data-grid-cols="1"] .grid .row3,
html[data-grid-cols="1"] .grid .row3--2,
html[data-grid-cols="1"] .grid .row3--1 {
  grid-column: span 1;
  grid-template-columns: 1fr;
  max-width: none;
}

.project-card {
  --card-glow: rgba(155, 107, 255, 0.22);
  --card-ring: rgba(155, 107, 255, 0.2);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding: 7px;
  border-radius: 20px;
  border: 1px solid var(--card-ring);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.04) 0%, transparent 42%),
    linear-gradient(180deg, #1a1730 0%, #12101c 52%, #100e19 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 10px 28px rgba(0, 0, 0, 0.24);
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.project-card:nth-child(4n + 2) {
  --card-glow: rgba(61, 220, 255, 0.2);
  --card-ring: rgba(61, 220, 255, 0.16);
}

.project-card:nth-child(4n + 3) {
  --card-glow: rgba(62, 224, 138, 0.18);
  --card-ring: rgba(62, 224, 138, 0.14);
}

.project-card:nth-child(4n + 4) {
  --card-glow: rgba(255, 107, 214, 0.2);
  --card-ring: rgba(255, 107, 214, 0.16);
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(110% 80% at 50% -18%, var(--card-glow), transparent 58%);
  pointer-events: none;
  opacity: 0.85;
  transition: opacity 0.25s ease;
}

.project-card:hover {
  border-color: color-mix(in srgb, var(--card-glow) 70%, white 12%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 0 0 1px color-mix(in srgb, var(--card-glow) 35%, transparent),
    0 18px 40px rgba(0, 0, 0, 0.34),
    0 0 36px color-mix(in srgb, var(--card-glow) 28%, transparent);
  transform: translateY(-4px);
}

.project-card:hover::before {
  opacity: 1;
}

.project-card__media {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 16 / 9;
  background: #100e18;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.project-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 62%, rgba(7, 6, 12, 0.28) 100%);
  pointer-events: none;
  z-index: 1;
}

.project-card__media img,
.project-card__placeholder {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.project-card__media img {
  transition: transform 0.4s ease, filter 0.35s ease;
}

.project-card:hover .project-card__media img {
  transform: scale(1.03);
  filter: saturate(1.06) brightness(1.03);
}

.project-card__placeholder {
  background: linear-gradient(135deg, rgba(155, 107, 255, 0.16), rgba(255, 107, 214, 0.08));
}

.project-card__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 3px;
  padding: 10px 6px 4px;
  min-height: 0;
}

.project-card--no-links .project-card__body {
  padding-bottom: 8px;
}

.project-card__actions {
  display: flex;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
}

.project-card__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  margin: 0;
  font-size: 23px;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.project-card__title a {
  color: #fff;
  text-decoration: none;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.project-card__title a:hover {
  color: #f3eeff;
  text-shadow: 0 0 18px rgba(155, 107, 255, 0.35);
}

.project-card__cat {
  margin: 0;
  color: rgba(152, 147, 173, 0.92);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.project-card__btn {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 44px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.94);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card__btn__icon {
  display: block;
  flex-shrink: 0;
}

.project-card__btn--reg:hover {
  border-color: rgba(61, 220, 255, 0.65);
  background: rgba(61, 220, 255, 0.14);
  box-shadow: 0 6px 16px rgba(61, 220, 255, 0.16);
  transform: translateY(-1px);
}

.project-card__btn--tg:hover {
  border-color: rgba(62, 224, 138, 0.65);
  background: rgba(62, 224, 138, 0.14);
  box-shadow: 0 6px 16px rgba(62, 224, 138, 0.16);
  transform: translateY(-1px);
}

.project-card__btn--onion:hover {
  border-color: rgba(155, 107, 255, 0.7);
  background: rgba(155, 107, 255, 0.16);
  box-shadow: 0 6px 16px rgba(155, 107, 255, 0.2);
  transform: translateY(-1px);
}

.project-card__actions--files {
  gap: 8px;
}

.project-card__btn--file {
  flex: 1;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.project-card__btn--file:hover {
  border-color: rgba(255, 196, 92, 0.7);
  background: rgba(255, 196, 92, 0.14);
  box-shadow: 0 6px 16px rgba(255, 196, 92, 0.16);
  transform: translateY(-1px);
}

.project-card__btn--disabled {
  opacity: 0.32;
  cursor: default;
}

.project-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}

.project-row:hover {
  border-color: var(--violet-bright);
  transform: translateX(4px);
}

.project-avatar {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--panel-border);
  flex-shrink: 0;
}

.project-info h4 {
  font-size: 16px;
  font-weight: 700;
}

.project-info p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

/* project detail — OLinks MainContentSection layout */
.page-wrap--project {
  padding-bottom: 40px;
}

.project-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.project-layout__info,
.project-layout__links {
  min-width: 0;
}

.project-panel {
  padding: 20px;
  border-radius: 24px;
  background: #12101a;
}

.project-hero {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.project-hero__media {
  position: relative;
  flex-shrink: 0;
  width: auto;
  max-width: min(320px, 48%);
}

.project-hero img,
.project-hero__img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 210px;
  border-radius: 16px;
  object-fit: contain;
  object-position: center;
  background: transparent;
  box-sizing: border-box;
}

.project-hero__img--empty {
  width: 168px;
  height: 168px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

/* Dedicated icon: still sized by image, capped to a square budget */
.project-hero__img--icon {
  max-width: 168px;
  max-height: 168px;
  border-radius: 18px;
}

.project-hero__media:has(.project-hero__img--icon) {
  max-width: 168px;
}

.project-hero__status {
  position: absolute;
  left: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 999px;
  background: #6a60d7;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  z-index: 1;
}

.project-hero__status span {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1;
}

.project-hero__meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.project-hero__title {
  margin: 0 0 8px;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #fff;
}

.project-hero__cat,
.project-hero__subcat {
  display: inline-block;
  margin: 0 0 8px;
  color: #6d6d6d;
  text-decoration: none;
  line-height: 1.3;
}

.project-hero__cat {
  font-size: 18px;
  font-weight: 400;
}

.project-hero__subcat {
  font-size: 16px;
  font-weight: 400;
  margin-bottom: 0;
}

a.project-hero__cat:hover,
a.project-hero__subcat:hover {
  color: rgba(255, 255, 255, 0.7);
}

.project-lead {
  margin: 0 0 10px;
  color: #e8e4f5;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
}

.project-desc {
  margin: 0 0 4px;
  color: #fff;
  font-size: 16px;
  line-height: 1.5;
  white-space: pre-line;
}

.project-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #6d6d6d;
  font: inherit;
  font-size: 16px;
  cursor: pointer;
}

.project-more:hover {
  color: #fff;
}

.project-more__icon {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.project-more.is-expanded .project-more__icon {
  transform: rotate(180deg);
}

.link-section {
  margin-bottom: 24px;
}

.link-section h3 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 12px;
}

.link-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  font-size: 14px;
  word-break: break-word;
}

.link-item a {
  color: var(--violet-bright);
  flex: 1;
  font-weight: 600;
  text-decoration: none;
}

.link-item a:hover {
  text-decoration: underline;
}

.link-alive {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}

.link-alive.ok {
  background: rgba(62, 224, 138, 0.15);
  color: var(--green);
}

.link-alive.bad {
  background: rgba(255, 107, 107, 0.15);
  color: #ff6b6b;
}

/* OLinks-style accordion link blocks */
.link-blocks {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0;
}

.link-block {
  overflow: hidden;
  border-radius: 16px;
  background: #12101a;
  border: 0;
}

.link-block__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 20px;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 21px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.link-block__toggle-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.link-block__icon {
  flex-shrink: 0;
  color: #d7ccff;
}

.link-block__arrow {
  flex-shrink: 0;
  color: #88878c;
  transition: transform 0.2s ease;
}

.link-block.is-open .link-block__arrow {
  transform: rotate(180deg);
}

.link-block.is-open .link-block__toggle {
  padding-bottom: 10px;
}

.link-block__body {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 10px 20px 20px;
}

.link-block__body[hidden] {
  display: none !important;
}

.link-block__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.link-block__main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.link-block__dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #3ee08a;
}

.link-block__dot--alive {
  background: #3ee08a;
}

.link-block__dot--dead {
  background: #ff6b6b;
}

.link-block__url {
  min-width: 0;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.35;
}

.link-block__url span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-block__url:hover {
  color: #d7ccff;
}

.link-block__actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.link-block__copy,
.link-block__go {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #88878c;
  cursor: pointer;
  text-decoration: none;
}

.link-block__copy:hover,
.link-block__go:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.link-block__copy.is-copied {
  color: #3ee08a;
}

/* OLinks tablet: smaller hero, still side-by-side until 760 */
@media (max-width: 1025px) and (min-width: 761px) {
  .project-panel {
    padding: 12px;
    border-radius: 12px;
  }

  .project-hero {
    gap: 12px;
    margin-bottom: 12px;
  }

  .project-hero img,
  .project-hero__img {
    border-radius: 12px;
    max-height: 120px;
  }

  .project-hero__media {
    width: auto;
    max-width: min(200px, 46%);
  }

  .project-hero__img--icon {
    max-width: 100px;
    max-height: 100px;
    border-radius: 12px;
  }

  .project-hero__media:has(.project-hero__img--icon) {
    max-width: 100px;
  }

  .project-hero__title {
    font-size: 14px;
    margin-bottom: 4px;
  }

  .project-hero__cat {
    font-size: 12px;
    margin-bottom: 4px;
  }

  .project-hero__subcat {
    font-size: 10px;
  }

  .project-desc,
  .project-more {
    font-size: 12px;
  }

  .project-lead {
    font-size: 13px;
    margin-bottom: 8px;
  }

  .link-blocks {
    gap: 8px;
  }

  .link-block__toggle {
    padding: 14px 16px;
    font-size: 16px;
  }

  .link-block__body {
    gap: 18px;
    padding: 10px 16px 16px;
  }
}

/* search results */
.search-meta {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 0;
}

.page-wrap .search-bar {
  margin-top: 14px;
  margin-bottom: 20px;
}

/* contacts */
.contacts-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-card {
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
}

.contact-card h4 {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.contact-card a {
  color: var(--violet-bright);
  font-size: 16px;
  font-weight: 600;
}

.contact-card a:hover {
  text-decoration: underline;
}

/* loading & error */
.loading,
.error-msg {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.error-msg {
  color: #ff6b6b;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--panel-border);
  border-top-color: var(--violet-bright);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.site-footer {
  text-align: center;
  padding: 28px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--panel-border);
}

@media (max-width: 760px) {
  .site-header {
    padding: 14px 16px;
    gap: 10px;
  }

  .logo-img {
    height: 28px;
  }

  .status span:last-child {
    display: none;
  }

  .status {
    padding: 7px 9px;
  }

  .icon-btn {
    width: 36px;
    height: 36px;
  }

  .torscan-btn {
    height: 36px;
    padding: 0 10px 0 12px;
    gap: 6px;
  }

  .torscan-btn__logo {
    height: 18px;
  }

  .torscan-btn__arrow {
    font-size: 12px;
  }

  .hero {
    padding: 12px 16px 14px;
  }

  h1 {
    font-size: 30px;
  }

  .subtitle {
    margin-top: 8px;
    font-size: 14px;
  }

  .search-bar {
    margin-top: 16px;
  }

  .banner-section {
    padding: 0 16px;
    margin-bottom: 20px;
  }

  .banner-slider {
    height: clamp(140px, 42vw, 190px);
  }

  .banner-slide {
    width: min(86vw, 360px);
    height: clamp(140px, 42vw, 190px);
    margin-left: calc(min(86vw, 360px) / -2);
  }

  .stat {
    padding: 12px 8px;
  }

  .project-card__title {
    font-size: 22px;
  }

  .stat .num {
    font-size: 22px;
  }

  .stat .label {
    font-size: 9px;
  }

  .page-wrap {
    padding: 8px 16px 36px;
  }

  .page-head {
    padding: 12px 0 10px;
  }

  .page-head h2 {
    font-size: 24px;
  }

  .page-wrap .search-bar {
    margin-top: 12px;
    margin-bottom: 16px;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(8px, 2vw, 10px);
  }

  .row3 {
    grid-column: span 2;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(5px, 1.5vw, 8px);
  }

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

  .row3--1 {
    grid-template-columns: minmax(0, 1fr);
    max-width: calc(50% - clamp(4px, 1vw, 5px));
  }

  .grid-layout-bar {
    display: flex;
  }

  html[data-grid-cols="1"] .grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  html[data-grid-cols="1"] .grid .row3 {
    grid-column: span 1;
    grid-template-columns: 1fr;
    gap: 10px;
    max-width: none;
  }

  html[data-grid-cols="1"] .project-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  html[data-grid-cols="2"] .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(8px, 2vw, 18px);
  }

  .card__media {
    border-radius: 14px;
  }

  .search-bar__field {
    padding-left: 14px;
  }

  .search-bar input {
    font-size: 14px;
    padding: 9px 0;
  }

  .search-bar button {
    padding: 7px 12px;
    font-size: 13px;
  }

  .project-layout {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .project-panel {
    padding: 12px;
    border-radius: 12px;
  }

  .project-hero {
    gap: 12px;
    margin-bottom: 12px;
  }

  .project-hero img,
  .project-hero__img {
    border-radius: 12px;
    max-height: 100px;
  }

  .project-hero__media {
    width: auto;
    max-width: min(160px, 48%);
  }

  .project-hero__img--icon {
    max-width: 88px;
    max-height: 88px;
    border-radius: 12px;
  }

  .project-hero__media:has(.project-hero__img--icon) {
    max-width: 88px;
  }

  .project-hero__title {
    font-size: 14px;
    margin-bottom: 4px;
  }

  .project-hero__cat {
    font-size: 12px;
    margin-bottom: 4px;
  }

  .project-hero__subcat {
    font-size: 10px;
  }

  .project-desc {
    font-size: 12px;
  }

  .project-lead {
    font-size: 13px;
    margin-bottom: 8px;
  }

  .project-more {
    font-size: 12px;
  }

  .link-blocks {
    gap: 6px;
  }

  .link-block {
    border-radius: 16px;
  }

  .link-block__toggle {
    padding: 12px 16px;
    font-size: 14px;
  }

  .link-block.is-open .link-block__toggle {
    padding-bottom: 10px;
  }

  .link-block__body {
    gap: 18px;
    padding: 10px 16px 20px;
  }
}

/* очень узкий экран */
@media (max-width: 400px) {
  .page-wrap {
    padding: 6px 12px 28px;
  }

  .grid-layout-toggle__btn {
    padding: 7px 10px;
    font-size: 11px;
  }

  .card--split:not(.card-cat--uslugi):not(.card-cat--drugoe) {
    aspect-ratio: 1.55 / 1;
    padding: 12px 12px 12px 10px;
  }

  .card--split:not(.card-cat--uslugi):not(.card-cat--drugoe) .card__content {
    max-width: 54%;
  }

  .card--split:not(.card-cat--uslugi):not(.card-cat--drugoe) .card__icon {
    width: clamp(64px, 18vw, 96px);
    height: clamp(64px, 18vw, 96px);
  }

  .card--split:not(.card-cat--uslugi):not(.card-cat--drugoe) h3 {
    font-size: clamp(16px, 4.8vw, 22px);
  }

  .card--split:not(.card-cat--uslugi):not(.card-cat--drugoe) .card__subtitle {
    font-size: clamp(12px, 3.4vw, 16px);
  }

  .card--split:not(.card-cat--uslugi):not(.card-cat--drugoe) .card__art {
    width: 52%;
    right: -3%;
    bottom: -5%;
    max-height: 112%;
  }

  .project-card__title {
    font-size: 20px;
  }
}

/* scroll to top */
.scroll-top {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 40;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(22, 18, 34, 0.88);
  color: #efe8ff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.18s ease, border-color 0.18s ease;
}

.scroll-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.scroll-top:hover {
  background: rgba(42, 30, 68, 0.95);
  border-color: rgba(155, 107, 255, 0.45);
}

.scroll-top:active {
  transform: translateY(1px) scale(0.97);
}

.scroll-top[hidden] {
  display: none !important;
}

@media (max-width: 760px) {
  .scroll-top {
    width: 44px;
    height: 44px;
    right: max(12px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
  }
}
