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

body{
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  
}

/* Контейнер со всеми строками */
.rows {
  display: grid;
  width: 100%;
  row-gap: 40px;
}

/* Одна строка: 2 половины на всю ширину */
.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  gap: 0px;          /* отступ между колонками */
}

.page {
  width: 100%;
  max-width: 1100px;   /* ограничение */
  margin: 0 auto;      /* центрирование */
  padding: 0px; /* опционально, чтобы не липло к краям */
}

/* Каждая половина */
.cell {
  /* чтобы контент красиво "дышал" */
  padding: 0px 20px;
}

/* Карточка внутри половины */
.card {
  display: grid;
  grid-template-columns: 150px 1fr; /* слева квадрат+подпись, справа текст */
  column-gap: 24px;
  align-items: start;
}

/* Левый блок (картинка + подпись под ней) */
.media {
  width: 150px;
}

.media .caption{
  width: calc(100% + 20px);   /* +40px ширины */
  max-width: 220px;
}

/* Квадратное фото */
.img {
  width: 100%;
  max-width: 150px;  /* ограничение на десктопе */
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

@media (max-width: 768px) {
	  
  .card {
	grid-template-columns: 1fr;
	row-gap: 8px;
  }

  .media {
	width: 100%;
  }

  .img {
	width: 100%;
	max-width: none;
	height: auto;          /* ← ВАЖНО */
  }
}

/* Текст под картинкой */
.caption {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.2;
  opacity: 0.85;
}

/* Текст справа от картинки */
.content {
  font-size: 15px;
  line-height: 1.5;
}

/* Верхний серый текст */
.pretext {
  margin-bottom: 0px;
}

/* Основной текст */
.maintext {
  color: #222;
  overflow-wrap: anywhere;   /* современный способ */
  word-break: break-word;    /* fallback */  
}

.pretext,
.note {
  font-size: 14px;
  color: #6b7280;
}

.note {
 padding-top:15px
}

.pretext {
  padding-bottom:15px
}

.bracket-note {
  color: #999;   /* мягкий серый */
}

.maintext.is-quote-striked{
  text-decoration: line-through;
  opacity: 0.55;
}

/* скрыть одну ячейку, но сохранить сетку */
.is-cell-hidden {
  opacity: 10%;
  pointer-events: none;
}

/* скрыть строку полностью */
.is-row-hidden {
  display: none;
}

a {
	color:#999;
    text-decoration: none;
}

.links {
  display: flex;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin-top: 20px;
  font-size: 13px;
}

.links li:not(:last-child)::after {
  content: "•";
  margin-left: 3px;
  color: #bbb;
  
}

/* для ссылок — обязательно */
.links { 
  flex-wrap: wrap;         /* чтобы переносились */
  min-width: 0;
}
.links a {
  overflow-wrap: anywhere;
  color:#79b8c6
}

/* ===== DESKTOP ===== */

.people .person {
  display: block;      /* столбцом */
  margin-bottom: 6px;
}

.people .name {
  display: block;      /* имя отдельной строкой */
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
  color: #009;
}

.people .role {
  display: block;      /* профессия на новой строке */
  color: #6b7280;
  font-size: 14px;
  line-height: 24px;
}

.people .nickname {
  display: block;     /* новой строкой */
  color: #6b7280;     /* серый как у note */
  font-size: 14px;
  line-height: 25px;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {

.links {
  margin-top: 20px;
}

  .people .name {
	display: inline;
  }
  
  .people .person {
	  display: inline;
  }
  
  /* запятая ПЕРЕД каждым человеком, кроме первого */
  .people .name + .name::before {
    content: ", ";
    color: #999;
  }
  
  .links li:not(:last-child)::after {
    content: " ";
    color: #bbb;
  }
  
  .pretext, .note{
    background: #f3f4f6;        /* мягкий серый */
    border-radius: 10px;        /* закругление */
    padding: 10px 12px;         /* внутренние отступы */
    margin-bottom: 10px;        /* отступ снизу */
  }
  
  .pretext {
    margin-top:5px
  }
  
  .note {
    margin-top:20px
  }
  
  .maintext{
    padding-top:5px;
  }
  
}

/* ====== HEADER 2 COLUMNS (same grid as .row) ====== */

.container_top{
  width: 100%;
  margin: 0 auto;      /* центрирование */
  padding: 0px;     /* внутренние отступы */
  background-color: #f2f2f2
}

.container{
  width: 100%;
  margin: 0 auto;      /* центрирование */
  padding: 0px;     /* внутренние отступы */
  
  border-bottom: 1px solid rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 50;
  
  background: #fff;
}

.cols-header{
  width: min(1100px, 100%);

  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0px;

  padding-bottom: 15px;
  margin: 0 auto;   /* ← центрирование */

}

.col-head{
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* гарантируем левое выравнивание */
  
  padding-left: 20px
}

.col-title{
  font-size: 48px;
  font-weight: 100;
  color: #444;
  margin-top: 14px;
  line-height: 1.2;
}

.col-subtitle{
  font-size: 13px;
  color: #888;
  margin-top: 4px;
  line-height: 1.3;
}

/* если хочешь на мобиле чуть компактнее */
@media (max-width: 768px){
  .col-title{
    font-size: 26px;
    font-weight: 300
  }
    
  .cols-header {
    gap: 0px;
  }
  
  .container_top {
    background-color: #fff
  }
  
  .container{  
    border: 0px;
  }
}









.tags-row{
  width: 100%;
  margin: 10px 0 14px;

  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding:10px 20px;
  padding-bottom:30px;
}

.tag{
  appearance: none;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(0,0,0,0.06);
  color: #555;

  font-size: 12px;
  line-height: 1;
  padding: 7px 12px;
  border-radius: 999px;

  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;

  transition: transform 0.05s ease, background 0.15s ease, border-color 0.15s ease;
}

.tag{
  text-decoration: none;
  display: inline-block;
}

.tag:hover{
  background: rgba(0,0,0,0.085);
  border-color: rgba(0,0,0,0.16);
}

.tag:active{
  transform: translateY(1px);
}

.tag:focus-visible{
  outline: 2px solid rgba(0,0,0,0.35);
  outline-offset: 2px;
}

/* выбранный тег */
.tag.is-active,
.tag[aria-pressed="true"]{
  background: rgba(0,0,0,0.25);
  border-color: rgba(0,0,0,0.25);
  color: #222;
}










/* Панель тегов человека (внутри .person) */
.caption.people .person .ptags{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0px;
}

.caption.people .person .ptag{
  font-size: 12px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 999px;

  white-space: nowrap;
}

span.switch{
  background: #666;
  color: #fff;
}

span.terror{
  background:#15803d;
  color:#fff;
}

span.agent{
  background:#2563eb;
  color:#fff;
}

span.killed{
  background:#f00;
  color: #fff;
}

span.new{
  background:#ea580c;
  color: #fff;
}

/* Чёрно-белые фото во второй колонке */
.row > .cell:nth-child(2) .img {
  filter: grayscale(100%);
}

/* Фото становится ч/б если в ячейке есть strike */
.cell.has-strike .img {
  filter: grayscale(100%);
}




.topbar{
  width: min(1100px, 100%);

  display: flex;
  justify-content: space-between; /* главное */
  align-items: center;

  padding: 0px;
  margin: 0 auto;   /* ← центрирование */
  
  padding:5px 20px;

}

.topbar-left{
  text-align: left;
  color:#777
}

.topbar-right{
  text-align: right;
}

.searchInput{
  width: 260px;
  max-width: 100%;

  padding: 10px 14px;
  font-size: 13px;
  font-family: inherit;

  border-radius: 5px;
  border: 1px solid rgba(0,0,0,0.12);

  color: #555;
  outline: none;

  transition: 
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

/* при фокусе */
.searchInput:focus{
  background: #fff;
  border-color: rgba(0,0,0,0.25);
}

/* placeholder */
.searchInput::placeholder{
  color: #999;
}

@media (max-width: 768px){

  .topbar{
    flex-direction: column;   /* ставим элементы столбцом */
    align-items: stretch;     /* чтобы заняли всю ширину */
    gap: 10px;
    
    font-size:14px;
    padding-top: 9px;
  }

  .topbar-right{
    width: 100%;
    text-align: left;         /* по желанию */
  }
  
  .searchInput {
    width:100%;
    font-size: 16px;        /* ключевое: отключает iOS auto-zoom */
  }
  
}


/* Нижняя плашка активного фильтра */
.active-filter{
  position: fixed;
  left: 20px;
  bottom: 20px;
  display: flex;
  justify-content: left;
  z-index: 999;
  pointer-events: none; /* кликабелен только pill */
}

.active-filter__pill{
  pointer-events: auto;

  display: inline-flex;
  align-items: center;
  gap: 10px;

  padding: 10px 14px;
  border-radius: 999px;

  background: rgba(0,0,0,0.78);
  color: #fff;

  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);

  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.active-filter__pill:active{
  transform: translateY(1px);
}

.active-filter__x{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 22px;
  height: 22px;

  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  font-size: 16px;
  line-height: 1;
}

/* Чуть больше воздуха снизу, чтобы плашка не перекрывала контент */
@media (max-width: 768px){
  body{
    padding-bottom: 80px;
  }
}

/* fail-safe: если hidden стоит — никогда не показываем */
.active-filter[hidden]{
  display: none !important;
}


/* Кнопка "Наверх" */
.scroll-top{
  position: fixed;
  right: 20px;
  bottom: 20px;

  width: 44px;
  height: 44px;

  border-radius: 50%;
  border: none;

  background: rgba(0,0,0,0.75);
  color: #fff;

  font-size: 18px;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 998;
}

.scroll-top:hover{
  transform: translateY(-2px);
}

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



.searchWrap{
  position: relative;
  display: inline-block;
  width: 260px;
  max-width: 100%;
}

@media (max-width: 768px){
  .searchWrap{ width: 100%; }
}

/* input внутри обёртки */
.searchWrap .searchInput{
  width: 100%;
  padding-right: 38px; /* место под крестик */
}

/* кнопка очистки */
.searchClear{
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);

  width: 22px;
  height: 22px;
  border-radius: 999px;

  border: none;
  background: rgba(0,0,0,0.10);
  color: #444;

  font-size: 16px;
  line-height: 1;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.searchClear:hover{
  background: rgba(0,0,0,0.14);
}

.searchClear[hidden]{
  display: none !important;
}


/* по умолчанию: мобильный поиск скрыт */
.header-search{ display:none; }

/* на мобиле: скрываем верхний поиск, показываем под заголовком */
@media (max-width: 768px){
  .container_top .topbar-right{ display:none; }

  .header-search{
    display:block;
    width: min(1100px, 100%);
    margin: 0 auto;
    padding: 0 20px 12px; /* под заголовком */
  }

  .header-search .searchWrap{ width:100%; }
}

.title-count{
  color: #777;
  font-weight: 400;
  margin-left: 3px;
  white-space: nowrap;
}

.silence{
  padding-left:20px;
}

.a-silence{
  color:#2563eb;
  text-decoration: underline
}

@media (max-width: 768px){

  .silence {
    padding-left:0px;
  }
  
}

.terror-star{
  color:#060;
  opacity:.8;
  font-weight:600;
}

.legend{
  margin-top:16px;
  font-size:12px;
  color:#6b7280;
}

.legend .terror-star{
  color:#060;
  font-weight:600;
}



.img { transition: opacity 200ms ease; }
.img.is-swapping { opacity: 0; }





.cell { position: relative; } /* важно */

.admin-cell{
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 5;
  font: 11px/1.25 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  background: rgba(0,0,0,0.55);
  color: #fff;
  padding: 6px 7px;
  border-radius: 8px;
  max-width: calc(100% - 12px);
  pointer-events: none; /* чтобы не мешало кликам */
}

.admin-cell b{
  font-weight: 700;
  margin-right: 6px;
}

.admin-cell__ids{
  margin-top: 4px;
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-id{
  margin-left: 6px;
  font-size: 11px;
  opacity: 0.6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}