:root {
  --text: #16181A;
  --muted: #5F6670;
  --bg: #FFFFFF;
  --soft: #F3F4F2;
  --line: #E4E6E3;
  --accent: #FFC629;
  --accent-press: #F2B600;
  --seek: #1F7A4D;
  --offer: #9A5B00;
  --link: #1C6E8C;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.5 "Golos Text", system-ui, sans-serif; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.022em; }

header { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.94); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; text-decoration: none; letter-spacing: -0.02em; white-space: nowrap; }
.mark { width: 28px; height: 28px; border-radius: 8px; background: var(--text); display: grid; place-items: center; }
.mark i { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(255,198,41,.25); }
nav { display: flex; gap: 6px; }
nav a { text-decoration: none; padding: 8px 14px; border-radius: 10px; font-size: 15.5px; color: var(--muted); }
nav a.on { background: var(--soft); color: var(--text); font-weight: 500; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; text-decoration: none;
       background: var(--accent); color: #111; font-weight: 600; padding: 12px 20px; border-radius: 12px; font-size: 16px; }
.btn:hover { background: var(--accent-press); }
.btn.ghost { background: var(--soft); color: var(--text); }
.btn.ghost:hover { background: var(--line); }
.btn:focus-visible, nav a:focus-visible, .chip:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }

/* ранг, статус, кабинет партнёра */
.tier { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; font-weight: 700; font-size: 13px; }
.tier.tA { background: #DDF3E6; color: #17633E; }
.tier.tB { background: #FFF1C9; color: #7A5600; }
.tier.tC { background: var(--soft); color: var(--muted); }
.pill.ok { background: #E8F6EE; color: var(--seek); }
#quality { margin-top: 10px; }
#quality .chip.on { background: var(--accent); border-color: var(--accent); color: #111; }
.partner { flex-direction: row; font-size: 15px; padding: 10px 14px; }
.partner .dl { display: flex; gap: 14px; }
.partner .dl a { font-weight: 600; text-decoration: none; color: var(--link); white-space: nowrap; }
.tabs { display: flex; gap: 6px; margin-top: 14px; }
.tabs button { border: 0; background: var(--soft); border-radius: 10px; padding: 9px 16px; font-weight: 500; cursor: pointer; }
.tabs button.on { background: var(--text); color: #fff; }

.tg-sub { display: flex; flex-direction: column; gap: 4px; margin-top: 18px; padding: 16px 18px; border-radius: 16px; text-decoration: none;
          background: #E9F4FB; border: 1.5px solid #CFE6F5; color: var(--text); }
.tg-sub b { font-size: 17px; }
.tg-sub span { color: var(--muted); font-size: 15px; }
.tg-sub:hover { border-color: #2481CC; }
nav a.for-ag { color: var(--text); font-weight: 500; }

/* хаб */
.hub-hero { padding: 56px 0 28px; }
.hub-hero h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.05; letter-spacing: -0.03em; max-width: 16em; }
.hub-hero p { color: var(--muted); font-size: 19px; max-width: 34em; margin: 16px 0 0; }
.doors { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 24px 0 56px; }
.door { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 320px; border-radius: 24px;
        overflow: hidden; text-decoration: none; color: #fff; padding: 28px; isolation: isolate; }
.door img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .4s; }
.door::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,.05) 30%, rgba(0,0,0,.72)); }
.door:hover img { transform: scale(1.03); }
.door .num { font-size: 15px; opacity: .9; }
.door h2 { font-size: 30px; margin: 4px 0 6px; }
.door p { margin: 0; opacity: .88; max-width: 26em; }
.door .go { margin-top: 16px; align-self: flex-start; }
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; padding: 40px 0 64px; border-top: 1px solid var(--line); }
.how h3 { font-size: 19px; margin-bottom: 6px; }
.how p { margin: 0; color: var(--muted); }

/* списки */
.page-head { padding: 32px 0 8px; }
.page-head h1 { font-size: clamp(28px, 4vw, 40px); }
.page-head p { color: var(--muted); margin: 8px 0 0; max-width: 40em; }
.partner { background: #FFF6D6; border: 1px solid #F3DE8A; border-radius: 14px; padding: 12px 16px; margin: 16px 0 0;
           display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.tools { position: sticky; top: 64px; z-index: 5; background: var(--bg); padding: 14px 0 10px; border-bottom: 1px solid var(--line); }
.search { display: flex; gap: 10px; }
.search input { flex: 1; min-width: 0; border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 14px; background: var(--bg); }
.search input:focus { outline: none; border-color: var(--text); }
.search select { border: 1.5px solid var(--line); border-radius: 12px; padding: 0 12px; background: var(--bg); }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-top: 10px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1.5px solid var(--line); background: var(--bg); border-radius: 99px; padding: 6px 13px; font-size: 14.5px; cursor: pointer; white-space: nowrap; }
.chip.on { background: var(--text); color: #fff; border-color: var(--text); }
.count { color: var(--muted); font-size: 15px; padding: 14px 0 6px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; padding-bottom: 40px; }
.card { border: 1.5px solid var(--line); border-radius: 18px; padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.meta { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 13.5px; color: var(--muted); align-items: center; }
.pill { background: var(--soft); border-radius: 8px; padding: 2px 8px; color: var(--text); font-size: 13px; }
.pill.money { background: #E8F6EE; color: var(--seek); font-weight: 600; }
.card h3 { font-size: 18px; line-height: 1.3; }
.full { font-size: 14.5px; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; display: none; border-top: 1px solid var(--line); padding-top: 8px; }
.card.open .full { display: block; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 6px; }
.actions .btn { padding: 9px 14px; font-size: 15px; border-radius: 10px; }
.linkish { background: none; border: 0; color: var(--link); cursor: pointer; padding: 9px 4px; font-size: 15px; }
.lock { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 10px; background: var(--soft); border-radius: 12px; padding: 10px 12px; font-size: 14.5px; color: var(--muted); }
.who { font-size: 15px; }
.who b { font-weight: 600; }
.more { display: block; margin: 0 auto 48px; }
.empty { padding: 60px 0; text-align: center; color: var(--muted); }
footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14.5px; }

@media (max-width: 760px) {
  /* во встроенном браузере Telegram сверху висит его панель — шапку и фильтры не закрепляем */
  header, .tools { position: static; }
  header { padding-top: env(safe-area-inset-top); }
  .bar { height: 56px; }
  .page-head { padding-top: 18px; }
  .page-head h1 { font-size: 28px; }
  .partner { flex-direction: column; align-items: flex-start; }
  .doors, .how { grid-template-columns: 1fr; }
  .door { min-height: 240px; }
  nav a { padding: 8px 8px; font-size: 14.5px; }
  nav a.for-ag { display: none; }
  .logo span.full-name { display: none; }
  .grid { grid-template-columns: 1fr; }
  .search { flex-direction: column; }
  .search select { padding: 11px 12px; }
  .tools { top: 64px; }
}
@media (prefers-reduced-motion: reduce) { .door img { transition: none; } }

.mark-svg { display: block; flex: none; width: 28px; height: 28px; }

.tm { font-size: .55em; font-weight: 600; vertical-align: super; line-height: 0; margin-inline-start: 1px; opacity: .75; }
