/* ==========================================================================
   Revenue Trust — единая дизайн-система
   Светлая тёплая "техно" тема: бежевый фон, гротеск для текста, моно-шрифт
   для цифр/данных, эмодзи вместо части иконок для быстрого считывания смысла.
   Файл самодостаточен, билд-шага нет — просто <link> в <head> каждой страницы.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body, div, span, h1, h2, h3, h4, h5, h6, p, ul, ol, li, form, fieldset,
table, th, td, img, a, button, input, textarea, select, label { margin: 0; padding: 0; border: 0; font: inherit; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; background: none; color: inherit; }
ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }

/* ---------- Design tokens ---------- */
:root{
  /* поверхности — тёплый бежевый, не белый и не серый */
  --bg:            #f3ede0;
  --bg-soft:       #ece2cc;
  --surface:       #fbf8f1;
  --surface-2:     #f0e8d6;
  --surface-hover: #e8dec4;
  --border:        #ddd0ae;
  --border-soft:   #e6dcc3;

  /* текст — тёплый графит вместо чистого чёрного */
  --text:          #29241c;
  --text-dim:      #6e6555;
  --text-faint:    #9c9280;

  /* акценты — глубокий индиго на бежевом читается «технологично», без китча */
  --accent:        #3a54d6;
  --accent-2:      #6a3fd8;
  --accent-soft:   rgba(58,84,214,.10);
  --success:       #0f8f63;
  --success-soft:  rgba(15,143,99,.10);
  --danger:        #c93459;
  --danger-soft:   rgba(201,52,89,.10);
  --warn:          #ab6a0a;
  --warn-soft:     rgba(171,106,10,.12);

  --grad-brand: linear-gradient(135deg,#3a54d6 0%,#6a3fd8 100%);
  --grad-money: linear-gradient(135deg,#0f8f63 0%,#3a54d6 100%);

  /* шрифты */
  --font-head: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;

  /* геометрия */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --shadow-card: 0 1px 0 rgba(255,255,255,.6) inset, 0 12px 28px -18px rgba(41,36,28,.28);
  --shadow-pop: 0 22px 50px -20px rgba(41,36,28,.32);
  --container: 1240px;
}

html { color-scheme: light; scroll-behavior: smooth; }

body{
  background: var(--bg);
  background-image:
    radial-gradient(720px 420px at 12% -10%, rgba(58,84,214,.07), transparent 60%),
    radial-gradient(640px 380px at 100% 0%, rgba(106,63,216,.06), transparent 55%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection{ background: var(--accent); color: #fff; }

/* scrollbar — маленький техно-штрих */
::-webkit-scrollbar{ width: 10px; height: 10px; }
::-webkit-scrollbar-track{ background: var(--bg); }
::-webkit-scrollbar-thumb{ background: var(--border); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover{ background: var(--text-faint); }

h1,h2,h3,h4{ font-family: var(--font-head); font-weight: 600; letter-spacing: -.01em; color: var(--text); }
code, .mono, .num{ font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.container{ width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ---------- Header / Nav ---------- */
.site-header{
  position: sticky; top: 0; z-index: 50;
  background: rgba(243,237,224,.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.site-header .container{ display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }

.brand{ display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: 18px; color: var(--text); }
.brand-mark{
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--grad-brand);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 700; font-size: 14px; color: #fff;
  box-shadow: 0 6px 18px -6px rgba(58,84,214,.45);
}
.brand small{ display:block; font-family: var(--font-body); font-weight: 500; font-size: 11px; color: var(--text-faint); letter-spacing: .02em; }

.main-nav{ display: flex; align-items: center; gap: 6px; }
.main-nav a{
  padding: 9px 14px; border-radius: var(--radius-pill);
  font-size: 14px; font-weight: 500; color: var(--text-dim);
  transition: color .15s ease, background .15s ease;
  white-space: nowrap;
}
.main-nav a:hover{ color: var(--text); background: var(--surface); }
.main-nav a.is-active{ color: var(--text); background: var(--surface-2); }

.header-actions{ display: flex; align-items: center; gap: 10px; }
.user-chip{
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 6px; border-radius: var(--radius-pill);
  background: var(--surface); border: 1px solid var(--border-soft);
  font-size: 13px; color: var(--text-dim);
}
.user-chip .avatar{
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--grad-brand); display:flex; align-items:center; justify-content:center;
  font-size: 12px; font-weight: 700; color:#fff; font-family: var(--font-mono);
}
.nav-toggle{ display: none; }

/* ---------- Buttons ---------- */
.btn{
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--radius-pill);
  font-family: var(--font-body); font-weight: 600; font-size: 14px;
  border: 1px solid transparent; transition: all .15s ease; white-space: nowrap;
}
.btn-primary{ background: var(--grad-brand); color: #fff; box-shadow: 0 8px 20px -10px rgba(58,84,214,.45); }
.btn-primary:hover{ filter: brightness(1.06); transform: translateY(-1px); }
.btn-secondary{ background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-secondary:hover{ background: var(--surface-hover); border-color: #c9b78e; }
.btn-ghost{ background: transparent; color: var(--text-dim); }
.btn-ghost:hover{ color: var(--text); background: var(--surface); }
.btn-danger{ background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover{ background: rgba(201,52,89,.18); }
.btn-block{ width: 100%; }
.btn-lg{ padding: 14px 26px; font-size: 15px; }
.btn-sm{ padding: 7px 14px; font-size: 13px; }
.btn[disabled]{ opacity:.5; pointer-events:none; }

.btn-social{
  display:flex; align-items:center; justify-content:center; gap:10px;
  width:100%; padding: 12px 18px; border-radius: var(--radius);
  background: var(--surface); border:1px solid var(--border);
  font-weight: 600; font-size: 14px; color: var(--text);
}
.btn-social:hover{ background: var(--surface-2); border-color:#c9b78e; }
.social-badge{
  width:22px; height:22px; border-radius:6px; display:flex; align-items:center; justify-content:center;
  font-family: var(--font-mono); font-weight:700; font-size:11px; color: var(--text);
}
.social-badge.ya{ background:#ff3333; color:#fff; }
.social-badge.vk{ background:#2787f5; color:#fff; }

/* ---------- Forms ---------- */
.field{ display:flex; flex-direction:column; gap:8px; margin-bottom: 18px; }
.field-row{ display:grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label{ font-size: 13px; font-weight: 600; color: var(--text-dim); display:flex; align-items:center; gap:6px; }
.hint{ font-size: 12px; color: var(--text-faint); }

input[type=text], input[type=email], input[type=password], input[type=url], input[type=number],
textarea, select{
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px; color: var(--text);
  font-family: var(--font-body); font-size: 14px; transition: border-color .15s ease, background .15s ease;
}
textarea{ resize: vertical; min-height: 100px; line-height:1.55; }
input::placeholder, textarea::placeholder{ color: var(--text-faint); }
input:focus, textarea:focus, select:focus{
  outline: none; border-color: var(--accent); background: var(--surface-2);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
select{ appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236e6555'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position: right 14px center; padding-right: 34px; }

.input-icon{ position: relative; }
.input-icon span{ position:absolute; left:14px; top:50%; transform:translateY(-50%); font-size:15px; pointer-events:none; }
.input-icon input{ padding-left: 40px; }

/* чекбокс-переключатель для is_public */
.switch-field{
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px;
}
.switch-field .switch-copy{ display:flex; flex-direction:column; gap:2px; }
.switch-field .switch-copy strong{ font-size:14px; color:var(--text); }
.switch-field .switch-copy span{ font-size:12px; color:var(--text-faint); }
.switch{ position: relative; width: 46px; height: 26px; flex: none; }
.switch input{ position:absolute; opacity:0; width:100%; height:100%; margin:0; cursor:pointer; z-index:2; }
.switch .track{
  position:absolute; inset:0; background: var(--surface-2); border:1px solid var(--border);
  border-radius: var(--radius-pill); transition: background .15s ease, border-color .15s ease;
}
.switch .thumb{
  position:absolute; top:3px; left:3px; width:18px; height:18px; border-radius:50%;
  background: var(--text-faint); transition: transform .15s ease, background .15s ease;
}
.switch input:checked ~ .track{ background: var(--success-soft); border-color: var(--success); }
.switch input:checked ~ .thumb{ transform: translateX(20px); background: var(--success); }

/* файловый инпут (картинка стартапа) */
.file-field{
  display:flex; align-items:center; gap:16px;
  border: 1px dashed var(--border); border-radius: var(--radius);
  padding: 14px; background: var(--surface);
}
.file-field .file-preview{
  width:64px; height:64px; border-radius: var(--radius-sm); background: var(--surface-2);
  display:flex; align-items:center; justify-content:center; font-size:24px; overflow:hidden; flex:none;
  border: 1px solid var(--border-soft);
}
.file-field .file-preview img{ width:100%; height:100%; object-fit:cover; }
.file-field .file-info{ flex:1; min-width:0; }
.file-field .file-info strong{ font-size:13px; display:block; }
.file-field .file-info span{ font-size:12px; color: var(--text-faint); }
.file-field input[type=file]{ position:absolute; inset:0; opacity:0; cursor:pointer; }
.file-field .file-btn{ position:relative; }

.form-card{
  background: var(--surface); border:1px solid var(--border-soft); border-radius: var(--radius-lg);
  padding: 32px; box-shadow: var(--shadow-card);
}
.form-actions{ display:flex; align-items:center; gap:12px; margin-top: 24px; padding-top:20px; border-top:1px solid var(--border-soft); }
.form-error{
  background: var(--danger-soft); color:#8f2340; border:1px solid rgba(201,52,89,.3);
  border-radius: var(--radius-sm); padding: 12px 14px; font-size: 13px; margin-bottom: 18px;
  display:flex; align-items:flex-start; gap:8px;
}

/* ---------- Badges / pills ---------- */
.badge{
  display:inline-flex; align-items:center; gap:5px;
  padding: 4px 10px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1.5;
}
.badge-category{ background: var(--surface-2); color: var(--text-dim); border: 1px solid var(--border); }
.badge-up{ background: var(--success-soft); color: var(--success); }
.badge-down{ background: var(--danger-soft); color: var(--danger); }
.badge-source{ background: var(--accent-soft); color: var(--accent); }
.badge-private{ background: var(--warn-soft); color: var(--warn); }
.badge-live{ background: var(--success-soft); color: var(--success); }
.badge-live::before{ content:''; width:6px; height:6px; border-radius:50%; background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }

/* ---------- Hero (showcase) ---------- */
.hero{ padding: 76px 0 48px; text-align: center; }
.hero .eyebrow{
  display:inline-flex; align-items:center; gap:8px; margin-bottom: 20px;
  padding: 7px 14px; border-radius: var(--radius-pill);
  background: var(--surface); border:1px solid var(--border); color: var(--text-dim);
  font-size: 13px; font-weight: 600;
}
.hero h1{ font-size: clamp(32px, 5vw, 52px); line-height: 1.1; max-width: 820px; margin: 0 auto 18px; }
.hero h1 .grad{ background: var(--grad-money); -webkit-background-clip:text; background-clip:text; color:transparent; }
.hero p{ color: var(--text-dim); font-size: 17px; max-width: 600px; margin: 0 auto 32px; }
.hero-actions{ display:flex; align-items:center; justify-content:center; gap:12px; flex-wrap:wrap; }

.stats-row{
  display:grid; grid-template-columns: repeat(4,1fr); gap:1px;
  background: var(--border-soft); border:1px solid var(--border-soft); border-radius: var(--radius-lg);
  overflow:hidden; margin: 48px 0 8px;
}
.stat-cell{ background: var(--surface); padding: 20px 16px; text-align:center; }
.stat-cell .n{ font-family: var(--font-mono); font-size: 26px; font-weight:700; color: var(--text); }
.stat-cell .l{ font-size:12px; color: var(--text-faint); margin-top:4px; }

/* ---------- Toolbar / поиск по витрине ---------- */
.toolbar{
  display:flex; align-items:center; gap:12px; flex-wrap:wrap;
  margin: 40px 0 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border-soft);
}
.toolbar .search{ flex:1; min-width:220px; position:relative; }
.toolbar .search span{ position:absolute; left:14px; top:50%; transform:translateY(-50%); }
.toolbar .search input{ padding-left:38px; background: var(--surface); }
.chip-group{ display:flex; gap:8px; flex-wrap:wrap; }
.chip{
  padding: 8px 14px; border-radius: var(--radius-pill); background: var(--surface);
  border:1px solid var(--border); color: var(--text-dim); font-size:13px; font-weight:600;
}
.chip.is-active{ background: var(--accent-soft); border-color: rgba(58,84,214,.35); color: var(--accent); }
.results-count{ font-size: 13px; color: var(--text-faint); }

/* ---------- Startup grid / cards ---------- */
.grid-startups{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding-bottom: 64px; }

.startup-card{
  background: var(--surface); border:1px solid var(--border-soft); border-radius: var(--radius-lg);
  padding: 20px; display:flex; flex-direction:column; gap:14px;
  box-shadow: var(--shadow-card);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.startup-card:hover{ transform: translateY(-3px); border-color:#c9b78e; box-shadow: var(--shadow-pop); }

.startup-card .card-top{ display:flex; align-items:flex-start; gap:12px; }
.startup-thumb{
  width:52px; height:52px; border-radius: var(--radius-sm); flex:none; overflow:hidden;
  background: var(--surface-2); border:1px solid var(--border-soft);
  display:flex; align-items:center; justify-content:center; font-size:24px;
}
.startup-thumb img{ width:100%; height:100%; object-fit:cover; }
.card-top .title-block{ min-width:0; flex:1; }
.card-top .title-block h3{ font-size:16px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.card-top .badges{ display:flex; gap:6px; margin-top:6px; flex-wrap:wrap; }

.startup-card .desc{ font-size: 13.5px; color: var(--text-dim); line-height:1.55; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; min-height: 40px; }

.metric-row{ display:grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top:auto; }
.metric-box{ background: var(--surface-2); border:1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 10px 12px; }
.metric-box .l{ font-size: 11px; color: var(--text-faint); font-weight:600; text-transform:uppercase; letter-spacing:.04em; display:flex; align-items:center; gap:4px; }
.metric-box .v{ font-family: var(--font-mono); font-size: 17px; font-weight:700; color: var(--text); margin-top:2px; }
.metric-box .v.empty{ color: var(--text-faint); font-size:13px; font-weight:500; font-family: var(--font-body); }

.card-foot{ display:flex; align-items:center; justify-content:space-between; padding-top:4px; }
.card-foot .btn{ flex:1; }

/* ---------- Empty states ---------- */
.empty-state{
  text-align:center; padding: 64px 24px; border: 1px dashed var(--border); border-radius: var(--radius-lg);
  background: var(--surface); color: var(--text-dim);
}
.empty-state .emoji{ font-size: 40px; margin-bottom: 14px; }
.empty-state h3{ color: var(--text); font-size:18px; margin-bottom:8px; }
.empty-state p{ font-size:14px; max-width:420px; margin:0 auto 22px; }

/* ---------- Auth pages ---------- */
.auth-shell{ flex:1; display:flex; align-items:stretch; min-height: calc(100vh - 68px); }
.auth-visual{
  flex: 1; position: relative; display:flex; flex-direction:column; justify-content:space-between;
  padding: 48px; background:
    radial-gradient(600px 400px at 20% 10%, rgba(58,84,214,.14), transparent 60%),
    radial-gradient(500px 380px at 90% 90%, rgba(106,63,216,.12), transparent 55%),
    var(--bg-soft);
  border-right: 1px solid var(--border-soft);
  overflow:hidden;
}
.auth-visual::before{
  content:''; position:absolute; inset:0; opacity:.5;
  background-image: linear-gradient(var(--border-soft) 1px, transparent 1px), linear-gradient(90deg, var(--border-soft) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 30% 20%, black, transparent 70%);
}
.auth-visual .vquote{ position:relative; max-width: 420px; }
.auth-visual .vquote .stat{ font-family: var(--font-mono); font-size: 42px; font-weight:700; background: var(--grad-money); -webkit-background-clip:text; background-clip:text; color:transparent; }
.auth-visual .vquote p{ color: var(--text-dim); margin-top:10px; font-size:15px; line-height:1.6; }
.auth-visual .vfoot{ position:relative; display:flex; gap:24px; }
.auth-visual .vfoot .item{ font-size:12px; color: var(--text-faint); display:flex; align-items:center; gap:6px; }

.auth-form-side{ width: 460px; flex:none; display:flex; align-items:center; justify-content:center; padding: 48px 40px; }
.auth-box{ width:100%; max-width: 360px; }
.auth-box h1{ font-size:26px; margin-bottom:8px; }
.auth-box .sub{ color: var(--text-dim); font-size:14px; margin-bottom:28px; }
.auth-divider{ display:flex; align-items:center; gap:12px; margin: 22px 0; color: var(--text-faint); font-size:12px; }
.auth-divider::before, .auth-divider::after{ content:''; flex:1; height:1px; background: var(--border); }
.auth-switch{ margin-top: 24px; text-align:center; font-size:13px; color: var(--text-dim); }
.auth-switch a{ color: var(--accent); font-weight:600; }
.social-stack{ display:flex; flex-direction:column; gap:10px; margin-bottom: 22px; }

/* ---------- Cabinet ---------- */
.page-head{ display:flex; align-items:center; justify-content:space-between; gap:16px; padding: 40px 0 28px; flex-wrap:wrap; }
.page-head h1{ font-size: 28px; display:flex; align-items:center; gap:10px; }
.page-head .sub{ color: var(--text-dim); font-size:14px; margin-top:6px; }

.cabinet-summary{
  display:flex; align-items:center; gap:16px; margin-bottom: 32px;
  padding: 18px 22px; border-radius: var(--radius-lg); background: var(--surface); border:1px solid var(--border-soft);
}
.cabinet-summary .avatar-lg{
  width:48px; height:48px; border-radius:14px; background: var(--grad-brand);
  display:flex; align-items:center; justify-content:center; font-family: var(--font-mono); font-weight:700; color:#fff; font-size:18px; flex:none;
}
.cabinet-summary .who strong{ font-size:15px; display:block; }
.cabinet-summary .who span{ font-size:13px; color: var(--text-faint); }
.cabinet-summary .spacer{ flex:1; }

.cabinet-row{
  display:flex; align-items:center; gap:16px;
  background: var(--surface); border:1px solid var(--border-soft); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 12px; transition: border-color .15s ease, background .15s ease;
}
.cabinet-row:hover{ border-color:#c9b78e; background: var(--surface-hover); }
.cabinet-row .startup-thumb{ width:44px; height:44px; }
.cabinet-row .info{ flex:1; min-width:0; }
.cabinet-row .info strong{ font-size:14.5px; display:flex; align-items:center; gap:8px; }
.cabinet-row .info .meta{ font-size:12.5px; color: var(--text-faint); margin-top:3px; display:flex; gap:10px; flex-wrap:wrap; }
.cabinet-row .figures{ text-align:right; font-family: var(--font-mono); }
.cabinet-row .figures .v{ font-size:16px; font-weight:700; }
.cabinet-row .figures .l{ font-size:11px; color: var(--text-faint); font-family: var(--font-body); }
.cabinet-row .actions{ display:flex; gap:8px; }

/* ---------- Startup detail ---------- */
.detail-head{
  display:flex; align-items:flex-start; gap:20px; padding: 40px 0 28px; flex-wrap:wrap;
  border-bottom: 1px solid var(--border-soft); margin-bottom: 32px;
}
.detail-head .startup-thumb{ width:72px; height:72px; font-size:32px; border-radius: var(--radius); }
.detail-head .head-info{ flex:1; min-width:260px; }
.detail-head h1{ font-size: 26px; display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.detail-head .badges{ display:flex; gap:8px; margin-top:10px; flex-wrap:wrap; }
.detail-head .desc{ color: var(--text-dim); margin-top: 14px; max-width: 640px; line-height:1.6; }
.detail-head .desc a{ color: var(--accent, #0070F0); text-decoration: underline; text-underline-offset: 2px; }
.detail-head .desc a:hover{ opacity: 0.8; }
.detail-head .head-actions{ display:flex; gap:10px; flex-wrap:wrap; }

.detail-grid{ display:grid; grid-template-columns: 2fr 1fr; gap: 24px; padding-bottom: 64px; }

.panel{
  background: var(--surface); border:1px solid var(--border-soft); border-radius: var(--radius-lg);
  padding: 24px; box-shadow: var(--shadow-card); margin-bottom: 24px;
}
.panel h2{ font-size:16px; display:flex; align-items:center; gap:8px; margin-bottom: 18px; }
.panel h2 .count{ font-family: var(--font-mono); font-size:12px; color: var(--text-faint); font-weight:500; }

.kpi-row{ display:grid; grid-template-columns: repeat(3,1fr); gap:12px; margin-bottom: 22px; }
.kpi-box{ background: var(--surface-2); border:1px solid var(--border-soft); border-radius: var(--radius); padding: 14px 16px; }
.kpi-box .l{ font-size:11.5px; color: var(--text-faint); font-weight:600; text-transform:uppercase; letter-spacing:.03em; display:flex; align-items:center; gap:5px; }
.kpi-box .v{ font-family: var(--font-mono); font-size:22px; font-weight:700; margin-top:4px; }

.chart-wrap{ position:relative; height: 280px; }

table.metrics-table{ margin-top: 20px; }
table.metrics-table th{
  text-align:left; font-size:11.5px; text-transform:uppercase; letter-spacing:.03em;
  color: var(--text-faint); font-weight:600; padding: 8px 10px; border-bottom:1px solid var(--border-soft);
}
table.metrics-table td{ padding: 11px 10px; font-size:13.5px; border-bottom:1px solid var(--border-soft); }
table.metrics-table td.num{ font-family: var(--font-mono); text-align:right; }
table.metrics-table tr:last-child td{ border-bottom:none; }

.connection-item{
  display:flex; align-items:center; gap:12px; padding: 12px; border-radius: var(--radius);
  background: var(--surface-2); border:1px solid var(--border-soft); margin-bottom:10px;
}
.connection-item .dot{ width:9px; height:9px; border-radius:50%; background: var(--success); box-shadow:0 0 0 3px var(--success-soft); flex:none; }
.connection-item .info{ flex:1; min-width:0; }
.connection-item .info strong{ font-size:13.5px; display:block; }
.connection-item .info span{ font-size:12px; color: var(--text-faint); }

.side-note{ font-size: 12.5px; color: var(--text-faint); line-height:1.6; margin-top: 10px; }

/* ---------- Footer ---------- */
.site-footer{ border-top: 1px solid var(--border-soft); margin-top: auto; padding: 28px 0; }
.site-footer .container{ display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; }
.site-footer p{ font-size:12.5px; color: var(--text-faint); }
.site-footer .foot-links{ display:flex; gap:18px; }
.site-footer .foot-links a{ font-size:12.5px; color: var(--text-faint); }
.site-footer .foot-links a:hover{ color: var(--text-dim); }

/* ---------- Misc ---------- */
.flash{
  display:flex; align-items:center; gap:10px; padding: 12px 16px; border-radius: var(--radius);
  background: var(--accent-soft); color: var(--accent); border:1px solid rgba(58,84,214,.25);
  font-size:13.5px; margin: 16px 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px){
  .grid-startups{ grid-template-columns: repeat(2,1fr); }
  .detail-grid{ grid-template-columns: 1fr; }
  .auth-visual{ display:none; }
  .auth-form-side{ width:100%; }
  .stats-row{ grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 680px){
  .main-nav{ display:none; }
  .nav-toggle{ display:flex; }
  .grid-startups{ grid-template-columns: 1fr; }
  .field-row{ grid-template-columns: 1fr; }
  .kpi-row{ grid-template-columns: 1fr 1fr; }
  .hero{ padding-top: 48px; }
  .page-head{ padding-top: 24px; }
}

/* --- Правовые страницы (/terms, /privacy) --- */
.legal-page{ max-width: 760px; padding-top: 48px; padding-bottom: 64px; line-height: 1.65; }
.legal-page h1{ margin-bottom: 16px; }
.legal-page h2{ margin-top: 32px; margin-bottom: 8px; font-size: 18px; }
.legal-page p{ color: var(--text-dim); }
.legal-draft-notice{
  background: var(--warn-soft); color: var(--warn); border-radius: 8px;
  padding: 12px 16px; font-size: 14px; margin-bottom: 24px;
}
.legal-footer-version{ margin-top: 40px; font-size: 12px; color: var(--text-dim); border-top: 1px solid var(--border-soft); padding-top: 16px; }

/* --- Чекбокс согласия при регистрации --- */
.consent-field{ margin-top: 4px; }
.consent-label{ display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--text-dim); cursor: pointer; }
.consent-label input[type="checkbox"]{ margin-top: 3px; flex-shrink: 0; width: auto; }
.consent-label a{ color: var(--accent); text-decoration: underline; }

/* --- CTA-баннер для анонимных посетителей на карточке стартапа --- */
.anon-cta-banner{
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--surface); border: 1px solid var(--border-soft); border-radius: 10px;
  padding: 14px 20px; margin: 20px 0; font-size: 14px; color: var(--text-dim);
}
@media (max-width: 640px){
  .anon-cta-banner{ flex-direction: column; align-items: flex-start; }
}

/* --- Кнопка «Поделиться» на карточке стартапа --- */
.share-widget{ position: relative; display: inline-block; }
.share-backdrop{ display: none; }
.share-panel{
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 20;
  background: var(--bg, #fff); border: 1px solid var(--border-soft); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08); min-width: 220px; padding: 6px;
  display: flex; flex-direction: column; gap: 2px;
}
.share-panel-handle{ display: none; }
.share-panel-item{
  display: block; text-align: left; width: 100%; padding: 9px 12px; border-radius: 6px;
  border: none; background: transparent; color: var(--text); font-size: 14px; cursor: pointer;
  text-decoration: none; font-family: inherit;
}
.share-panel-item:hover{ background: var(--surface); }

@media (max-width: 640px){
  /* На мобильном превращаем выпадающую панель в нижний лист — так надёжнее
     (не зависит от того, где на экране оказалась кнопка) и привычнее по UX. */
  .share-backdrop:not([hidden]){
    display: block; position: fixed; inset: 0; background: rgba(20,15,5,.4); z-index: 19;
  }
  .share-panel{
    position: fixed; top: auto; left: 0; right: 0; bottom: 0; z-index: 21;
    min-width: 0; width: 100%; border-radius: 18px 18px 0 0;
    padding: 8px 10px calc(10px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -10px 32px rgba(0,0,0,.18);
  }
  .share-panel-handle{
    display: block; width: 36px; height: 4px; border-radius: 2px;
    background: var(--border-soft); margin: 6px auto 10px;
  }
  .share-panel-item{ font-size: 15.5px; padding: 13px 14px; }
}

/* --- Панель модерации --- */
.section-title{ font-size: 18px; margin-bottom: 12px; }
.desc-preview{ font-size: 12.5px; color: var(--text-faint); display: block; margin-top: 2px; max-width: 480px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
