/* In the manner of telegram.org: white, blue links, Lucida Grande. */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: #fff;
  color: #000;
  font: 14px/1.45 "Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, Verdana, sans-serif;
  -webkit-text-size-adjust: 100%;
}
a { color: #2481cc; text-decoration: none; cursor: pointer; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-weight: bold; margin: 0 0 12px; }
h1 { font-size: 26px; }
h2 { font-size: 20px; margin-top: 26px; }
h3 { font-size: 16px; margin-top: 20px; }
p { margin: 0 0 12px; }

.tl_header {
  border-bottom: 1px solid #e7e7e7;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 5;
}
.tl_header_inner, .tl_footer_inner, .tl_page {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}
.tl_header_inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  min-height: 60px;
  gap: 8px 28px;
}
.tl_logo { display: flex; align-items: center; gap: 10px; color: #000; }
.tl_logo:hover { text-decoration: none; }
.tl_logo_icon { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.tl_logo_text { font-size: 20px; font-weight: bold; letter-spacing: -0.2px; }
.tl_nav { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.tl_nav a { color: #2481cc; padding: 6px 0; font-size: 15px; }
.tl_nav a.active { color: #000; font-weight: bold; }
.tl_badge {
  display: inline-block;
  min-width: 18px;
  padding: 0 6px;
  border-radius: 9px;
  background: #e53935;
  color: #fff;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
  font-weight: normal;
}
.tl_badge:empty { display: none; }

.tl_main { padding: 28px 0 40px; min-height: 60vh; }
.tl_footer { border-top: 1px solid #e7e7e7; color: #999; font-size: 13px; padding: 18px 0 30px; }

.tl_lead { color: #555; font-size: 15px; margin-bottom: 22px; }
.tl_muted { color: #999; }
.tl_small { font-size: 12px; }

.tl_cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
  margin: 10px 0 24px;
}
.tl_card {
  border: 1px solid #e7e7e7;
  border-radius: 10px;
  padding: 16px 18px;
  background: #fbfbfb;
}
.tl_card_value { font-size: 26px; font-weight: bold; }
.tl_card_label { color: #777; font-size: 13px; margin-top: 2px; }
a.tl_card { color: #000; display: block; }
a.tl_card:hover { text-decoration: none; border-color: #2481cc; }

.tl_search { display: flex; gap: 8px; margin: 0 0 16px; }
input[type=text], input[type=number], textarea, select {
  font: inherit;
  border: 1px solid #d6d6d6;
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
  color: #000;
  width: 100%;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: #2481cc; }
textarea { min-height: 60px; resize: vertical; }

.tl_btn {
  display: inline-block;
  font: inherit;
  border: 0;
  border-radius: 6px;
  padding: 8px 16px;
  background: #2481cc;
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
}
.tl_btn:hover { background: #1d6fae; text-decoration: none; }
.tl_btn:disabled { background: #a7c8e4; cursor: default; }
.tl_btn_light { background: #eef4fa; color: #2481cc; }
.tl_btn_light:hover { background: #e1edf8; }
.tl_btn_danger { background: #e53935; }
.tl_btn_danger:hover { background: #c62828; }
.tl_actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }

.tl_table_wrap { overflow-x: auto; margin: 0 0 16px; }
table.tl_table { border-collapse: collapse; width: 100%; }
.tl_table th, .tl_table td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}
.tl_table th { color: #777; font-weight: normal; font-size: 13px; white-space: nowrap; }
.tl_table tr.tl_row { cursor: pointer; }
.tl_table tr.tl_row:hover td { background: #f5f9fc; }

.tl_avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex: none;
}
.tl_who { display: flex; align-items: center; gap: 10px; }
.tl_profile { display: flex; gap: 18px; align-items: center; margin-bottom: 16px; }
.tl_profile .tl_avatar { width: 72px; height: 72px; font-size: 28px; }
.tl_tag {
  display: inline-block;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 8px;
  background: #eef4fa;
  color: #2481cc;
  margin-left: 4px;
  vertical-align: 1px;
}
.tl_tag_red { background: #fdecea; color: #c62828; }
.tl_tag_green { background: #e8f5e9; color: #2e7d32; }
.tl_tag_gray { background: #f0f0f0; color: #777; }

dl.tl_facts { display: grid; grid-template-columns: 170px 1fr; gap: 6px 14px; margin: 0 0 16px; }
dl.tl_facts dt { color: #777; }
dl.tl_facts dd { margin: 0; word-break: break-word; }

.tl_box {
  border: 1px solid #e7e7e7;
  border-radius: 10px;
  padding: 16px 18px;
  margin: 0 0 16px;
}
.tl_report_head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tl_quote {
  border-left: 3px solid #2481cc;
  padding: 4px 10px;
  margin: 8px 0;
  background: #f7fafc;
  white-space: pre-wrap;
  word-break: break-word;
}
.tl_msg { padding: 8px 0; border-bottom: 1px solid #f1f1f1; display: flex; gap: 10px; }
.tl_msg_body { flex: 1; min-width: 0; }
.tl_msg_text { white-space: pre-wrap; word-break: break-word; }
.tl_chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.tl_chip { background: #eef4fa; color: #2481cc; border-radius: 14px; padding: 3px 10px; }
.tl_chip a { margin-left: 6px; color: #999; }
.tl_form_row { margin: 0 0 12px; }
.tl_verified { display: flex; gap: 10px; align-items: center; margin: 4px 0 8px; }
.tl_icon { flex: none; object-fit: contain; }
input[type=file] { font: inherit; max-width: 100%; }
.tl_form_row label { display: block; color: #777; margin-bottom: 4px; }
.tl_radio { display: flex; gap: 18px; margin: 0 0 12px; }
.tl_radio label { color: #000; display: inline-flex; gap: 6px; align-items: center; }
.tl_pager { display: flex; gap: 10px; align-items: center; margin: 12px 0; }
.tl_empty { color: #999; padding: 18px 0; }

.tl_toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  display: none;
  z-index: 10;
  max-width: 90vw;
}

@media (max-width: 600px) {
  .tl_header_inner { padding: 10px 14px; gap: 6px 16px; }
  .tl_page { padding: 0 14px; }
  .tl_nav { gap: 2px 14px; }
  .tl_nav a { font-size: 14px; }
  dl.tl_facts { grid-template-columns: 1fr; }
  dl.tl_facts dt { margin-top: 6px; }
  .tl_hide_mobile { display: none; }
}

/* Text with formatting: buttons, field, preview. */
.tl_editor { margin: 0 0 12px; }
.tl_editor_bar { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.tl_tool {
  min-width: 34px; height: 30px; padding: 0 8px; border: 1px solid #dfe5ea; border-radius: 6px;
  background: #fff; color: #333; font: inherit; cursor: pointer;
}
.tl_tool:hover { background: #eef4fa; border-color: #c9dced; }
.tl_editor textarea { width: 100%; }
.tl_preview_label { color: #777; font-size: 12px; margin: 8px 0 4px; }
.tl_preview {
  border: 1px solid #e7e7e7; border-radius: 10px; padding: 10px 12px; background: #f7f9fb;
  white-space: normal; word-wrap: break-word; min-height: 40px;
}
.tl_preview code { background: #eef1f4; border-radius: 4px; padding: 0 3px; font-size: 13px; }
.tl_preview pre { background: #eef1f4; border-radius: 6px; padding: 8px; margin: 4px 0; white-space: pre-wrap; }
.tl_spoiler { background: #c9ced3; color: transparent; border-radius: 3px; transition: color .2s; }
.tl_spoiler:hover { color: inherit; background: #e3e7ea; }
