/* ============================================================
   gepard-text-tools.css — 2026-10-09. Бесплатные текстовые
   инструменты (views/seo/text-tools.ejs, text-tools-hub.ejs).

   Подключается после gepard-landing.css и gepard-seo.css и опирается
   на их переменные (--gl-brand, --gl-ink, --gl-line) и обёртки.
   Префикс .tt- — чтобы правка здесь не задевала остальные посадочные.
   ============================================================ */

/* Атрибут hidden проигрывает любому display из класса (.tt-link, .tt-btn,
   .tt-strip — inline-flex/flex), и скрытая кнопка «Отменить» оставалась на
   виду. Скрипт прячет элементы именно атрибутом, поэтому он должен побеждать. */
.tt-box [hidden], .tt-toast[hidden] { display: none !important; }

.tt-hero { padding-bottom: 48px; }
.tt-hero__in { margin-bottom: 26px; }
.tt-hero .seo-lead { margin-bottom: 0; }
.tt-wrap { max-width: 1040px; padding: 0 24px; box-sizing: border-box; }

/* ---------- вкладки ----------
   На узком экране прокручиваются вбок внутри своей полосы — страница
   целиком вбок не уезжает. */
.tt-tabs {
  display: flex; gap: 6px; padding: 5px;
  background: #FFFFFF; border: 1px solid var(--gl-line); border-radius: 15px;
  overflow-x: auto; scrollbar-width: none;
}
.tt-tabs::-webkit-scrollbar { display: none; }
.tt-tab {
  flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 14px; border-radius: 11px; white-space: nowrap;
  font-size: 14.5px; font-weight: 600; color: var(--gl-ink-2);
  transition: background .15s var(--gl-ease), color .15s var(--gl-ease);
}
.tt-tab i { font-size: 18px; }
.tt-tab:hover { background: #F6F6F7; color: var(--gl-ink); }
.tt-tab.is-on {
  background: linear-gradient(135deg, var(--gl-brand-2), var(--gl-brand-3));
  color: #FFFFFF; box-shadow: 0 6px 16px rgba(224, 83, 14, 0.25);
}

/* ---------- рабочая область ---------- */
.tt-box {
  margin-top: 12px; padding: 22px;
  background: #FFFFFF; border: 1px solid var(--gl-line); border-radius: 20px;
  box-shadow: 0 10px 30px rgba(19, 19, 22, 0.05);
}
.tt-label { display: block; margin-bottom: 8px; font-size: 13.5px; font-weight: 700; color: var(--gl-ink-2); }
.tt-text {
  display: block; width: 100%; box-sizing: border-box;
  min-height: 220px; max-height: 60vh; resize: vertical;
  padding: 16px 18px; border-radius: 14px;
  border: 1px solid rgba(19, 19, 22, 0.14); background: #FBFBFC;
  font: 15.5px/1.6 'Manrope', system-ui, sans-serif; color: var(--gl-ink);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.tt-text:focus { outline: none; border-color: var(--gl-brand-2); background: #FFFFFF; box-shadow: 0 0 0 4px rgba(242, 101, 34, 0.12); }

.tt-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  margin-top: 10px; font-size: 13.5px; color: var(--gl-ink-3);
}
.tt-bar__acts { display: inline-flex; flex-wrap: wrap; gap: 4px 14px; }
.tt-link {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 0;
  border: 0; background: none; cursor: pointer;
  font: inherit; font-weight: 600; color: var(--gl-ink-2);
}
.tt-link:hover { color: var(--gl-brand-3); }
.tt-link i { font-size: 16px; }

.tt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 12px 22px; border: 0; border-radius: 12px; cursor: pointer;
  background: linear-gradient(135deg, var(--gl-brand-2), var(--gl-brand-3));
  color: #FFFFFF; font: 700 15px 'Manrope', system-ui, sans-serif;
  box-shadow: 0 6px 16px rgba(224, 83, 14, 0.25);
  transition: transform .15s var(--gl-ease), box-shadow .15s var(--gl-ease);
}
.tt-btn:hover { transform: translateY(-1px); box-shadow: 0 9px 20px rgba(224, 83, 14, 0.3); }
.tt-btn:disabled { opacity: .5; cursor: default; transform: none; }
.tt-btn--sm { padding: 8px 14px; font-size: 14px; }
.tt-btn--ghost {
  background: #FFFFFF; color: var(--gl-brand-3);
  box-shadow: inset 0 0 0 1.5px rgba(224, 83, 14, 0.45);
}
.tt-btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--gl-brand-3); }

.tt-privacy {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 12px; font-size: 13px; color: var(--gl-ink-3);
}

/* ---------- счётчик ---------- */
.tt-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 18px; }
.tt-stat {
  padding: 14px 12px; border-radius: 14px; background: #F6F6F7; border: 1px solid var(--gl-line);
}
.tt-stat b {
  display: block; font-size: clamp(20px, 2.4vw, 26px); font-weight: 800;
  letter-spacing: -0.03em; color: var(--gl-ink); font-variant-numeric: tabular-nums;
}
.tt-stat span { display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.3; color: var(--gl-ink-3); }
.tt-stat--hi { background: #FFF4EC; border-color: rgba(224, 83, 14, 0.25); }
.tt-stat--hi b { color: var(--gl-brand-3); }

.tt-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.tt-card { padding: 18px; border-radius: 16px; border: 1px solid var(--gl-line); background: #FFFFFF; }
.tt-card--hi { border-color: rgba(224, 83, 14, 0.35); box-shadow: 0 0 0 3px rgba(242, 101, 34, 0.08); }
.tt-card__t { display: flex; align-items: center; gap: 7px; font-size: 14.5px; font-weight: 700; }
.tt-card__t i { font-size: 18px; color: var(--gl-brand-3); }
.tt-card__big {
  margin-top: 10px; font-size: 26px; font-weight: 800; letter-spacing: -0.03em;
  color: var(--gl-ink); font-variant-numeric: tabular-nums;
}
.tt-card__note { margin-top: 6px; font-size: 12.5px; line-height: 1.45; color: var(--gl-ink-3); }
.tt-card__note a { color: var(--gl-brand-3); text-decoration: underline; }
.tt-card__line { margin-top: 8px; font-size: 14px; color: var(--gl-ink-2); }

.tt-fields { display: flex; gap: 10px; margin-top: 12px; }
.tt-fields label { flex: 1; font-size: 12.5px; color: var(--gl-ink-3); }
.tt-fields select, .tt-goal input {
  display: block; width: 100%; box-sizing: border-box; margin-top: 4px;
  padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(19, 19, 22, 0.14);
  background: #FBFBFC; font: 600 14px 'Manrope', system-ui, sans-serif; color: var(--gl-ink);
}
.tt-goal { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; color: var(--gl-ink-2); }
.tt-goal label { font-weight: 600; }
.tt-goal input { width: 76px; margin-top: 0; }
.tt-progress { height: 8px; margin-top: 10px; border-radius: 99px; background: #EFEFF1; overflow: hidden; }
.tt-progress i {
  display: block; height: 100%; width: 0; border-radius: 99px;
  background: linear-gradient(90deg, var(--gl-brand-2), var(--gl-brand-3));
  transition: width .3s var(--gl-ease);
}
.tt-progress.is-done i { background: linear-gradient(90deg, #2DD4BF, #0F766E); }

.tt-hid__status { margin-top: 10px; font-size: 14px; line-height: 1.45; color: var(--gl-ink-2); }
.tt-hid__status.is-ok { color: #0F766E; }
.tt-hid__status.is-bad { color: #B42318; font-weight: 600; }
.tt-hid__list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.tt-hid__word {
  padding: 3px 8px; border-radius: 7px; background: #FEF3F2;
  font-size: 13px; color: var(--gl-ink);
}
.tt-hid__word mark { background: #FDA29B; color: inherit; border-radius: 3px; padding: 0 1px; }
#tt-hid-fix { margin-top: 10px; }

/* ---------- предложение (цена) ---------- */
.tt-offer {
  margin-top: 16px; padding: 22px; border-radius: 18px;
  background: linear-gradient(180deg, #FFF7F1 0%, #FFFFFF 100%);
  border: 1px solid rgba(224, 83, 14, 0.22);
}
.tt-offer__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 24px; }
.tt-offer__k { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--gl-ink-3); }
.tt-offer__price {
  margin-top: 4px; font-size: clamp(24px, 3vw, 32px); font-weight: 800;
  letter-spacing: -0.03em; color: var(--gl-brand-3); font-variant-numeric: tabular-nums;
}
.tt-offer__sub { margin-top: 3px; font-size: 13.5px; color: var(--gl-ink-3); }
.tt-offer__free { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; font-size: 13.5px; color: var(--gl-ink-3); }
.tt-offer__free b { font-size: 15px; color: var(--gl-ink); }
.tt-offer__free .tt-btn { margin-top: 8px; }
.tt-offer__q { margin-top: 20px; font-size: 15px; font-weight: 700; }
.tt-choice { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tt-choice__b {
  padding: 10px 16px; border-radius: 11px; cursor: pointer;
  border: 1.5px solid rgba(19, 19, 22, 0.14); background: #FFFFFF;
  font: 600 14px 'Manrope', system-ui, sans-serif; color: var(--gl-ink-2);
  transition: border-color .15s, color .15s, background .15s;
}
.tt-choice__b:hover { border-color: var(--gl-brand-2); color: var(--gl-ink); }
.tt-choice__b[aria-checked="true"] { border-color: var(--gl-brand-3); background: #FFF4EC; color: var(--gl-brand-3); }
.tt-ans { margin-top: 14px; padding-top: 14px; border-top: 1px dashed rgba(224, 83, 14, 0.25); }
.tt-ans p { margin: 0 0 14px; max-width: 72ch; font-size: 15px; line-height: 1.6; color: var(--gl-ink-2); }
.tt-ans .seo-cta-pair { justify-content: flex-start; }
.tt-ans .seo-btn { padding: 12px 22px; font-size: 15px; }
.tt-more { display: inline-block; margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--gl-brand-3); }

/* ---------- очистка, кавычки, регистр ---------- */
.tt-opts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 18px; margin-top: 18px; }
.tt-opt { display: flex; align-items: center; gap: 9px; font-size: 14.5px; color: var(--gl-ink-2); cursor: pointer; }
.tt-opt input { width: 17px; height: 17px; accent-color: var(--gl-brand-3); flex: none; }
.tt-opt span { flex: 1; }
.tt-opt__n {
  flex: none; min-width: 26px; padding: 1px 7px; border-radius: 99px; text-align: center;
  background: #F2F2F4; font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--gl-ink-3);
}
.tt-opt__n.is-on { background: #FFF4EC; color: var(--gl-brand-3); }
.tt-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 18px; }
.tt-actions__note { font-size: 14px; color: var(--gl-ink-3); }

.tt-strip {
  display: flex; gap: 12px; margin-top: 18px; padding: 16px 18px; border-radius: 14px;
  background: #FFF7F1; border: 1px solid rgba(224, 83, 14, 0.2);
  font-size: 14.5px; line-height: 1.55; color: var(--gl-ink-2);
}
.tt-strip > i { flex: none; font-size: 22px; color: var(--gl-brand-3); }
.tt-strip b { color: var(--gl-ink); }
.tt-strip a { color: var(--gl-brand-3); font-weight: 700; text-decoration: underline; }

.tt-qcopy { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 18px; }
.tt-qcopy__label { width: 100%; font-size: 13.5px; font-weight: 700; color: var(--gl-ink-2); }
.tt-qbtn {
  min-width: 64px; height: 64px; padding: 0 14px; border-radius: 14px; cursor: pointer;
  border: 1.5px solid rgba(19, 19, 22, 0.12); background: #F6F6F7;
  font: 500 30px/1 'Times New Roman', Georgia, serif; color: var(--gl-ink);
  transition: border-color .15s, background .15s, transform .15s var(--gl-ease);
}
.tt-qbtn:hover { border-color: var(--gl-brand-2); background: #FFFFFF; transform: translateY(-1px); }
.tt-qbtn.is-copied { border-color: #2DD4BF; background: #F0FDFA; }

.tt-casebar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

/* ---------- повторы ---------- */
.tt-rep { display: grid; grid-template-columns: 280px 1fr; gap: 16px; margin-top: 18px; }
.tt-rep__sum { font-size: 14px; line-height: 1.5; color: var(--gl-ink-2); }
.tt-rep__sum b { color: var(--gl-ink); }
.tt-rep__list { margin-top: 10px; max-height: 420px; overflow-y: auto; }
.tt-rep__row {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 7px 10px; border: 0; border-radius: 9px; background: none; cursor: pointer;
  font: 500 14px 'Manrope', system-ui, sans-serif; color: var(--gl-ink-2); text-align: left;
}
.tt-rep__row:hover { background: #F6F6F7; }
.tt-rep__row.is-on { background: #FFF4EC; color: var(--gl-brand-3); }
.tt-rep__row span:first-child { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-rep__row em { font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; }
.tt-rep__row small { width: 42px; text-align: right; font-size: 12px; color: var(--gl-ink-3); }
.tt-rep__legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12.5px; color: var(--gl-ink-3); }
.tt-rep__view {
  margin-top: 8px; min-height: 160px; max-height: 460px; overflow-y: auto;
  padding: 14px 16px; border-radius: 14px; background: #FBFBFC; border: 1px solid var(--gl-line);
  font-size: 15px; line-height: 1.75; color: var(--gl-ink); white-space: pre-wrap; overflow-wrap: anywhere;
}
.tt-rep__view:empty::before { content: 'Здесь появится текст с подсветкой.'; color: var(--gl-ink-4); }
.tt-mark { padding: 0 3px; border-radius: 4px; }
.tt-mark--near, .tt-w.is-near { background: #FDE6D7; box-shadow: inset 0 -2px 0 #F5A26B; }
.tt-mark--sel, .tt-w.is-sel { background: #FFE58F; box-shadow: inset 0 -2px 0 #E0A800; }
.tt-w { border-radius: 3px; }

/* ---------- сравнение текстов ---------- */
.tt-diff__in { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tt-diff__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.tt-diff__head .tt-label { margin: 0; }
.tt-diff__file { cursor: pointer; font-size: 13.5px; color: var(--gl-brand-3); }
.tt-text--half { min-height: 200px; }
.tt-diff__meta { min-height: 18px; margin-top: 6px; font-size: 12.5px; color: var(--gl-ink-3); }
.tt-diff__meta.is-err { color: #B42318; }
.tt-opt--inline { font-size: 13.5px; }
.tt-diff__hint { margin-top: 14px; }
.tt-diff__res { margin-top: 18px; }
.tt-diff__stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tt-diff__tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 14px; }
.tt-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: #F2F2F4; }
.tt-seg__b {
  padding: 8px 12px; border: 0; border-radius: 9px; background: none; cursor: pointer;
  font: 600 13.5px 'Manrope', system-ui, sans-serif; color: var(--gl-ink-2);
}
.tt-seg__b.is-on { background: #FFFFFF; color: var(--gl-brand-3); box-shadow: 0 1px 4px rgba(19, 19, 22, 0.1); }
.tt-diff__out {
  margin-top: 10px; max-height: 560px; overflow-y: auto;
  padding: 6px 16px; border-radius: 14px; background: #FBFBFC; border: 1px solid var(--gl-line);
  font-size: 15px; line-height: 1.7; color: var(--gl-ink); overflow-wrap: anywhere;
}
.tt-dp { margin: 0; padding: 10px 0 10px 12px; border-left: 3px solid transparent; border-bottom: 1px solid var(--gl-line); }
.tt-dp:last-child { border-bottom: 0; }
.tt-dp.is-same { border-left-color: #D0D5DD; color: var(--gl-ink-2); }
.tt-dp.is-changed { border-left-color: var(--gl-brand-2); }
.tt-dp.is-del { border-left-color: #F04438; }
.tt-dp.is-ins { border-left-color: #12B76A; }
.tt-dp__tag {
  display: inline-block; margin-right: 6px; padding: 0 7px; border-radius: 99px; vertical-align: 1px;
  background: #F2F2F4; font-size: 11.5px; font-weight: 700; color: var(--gl-ink-3);
}
.tt-dp del, .tt-mark--del { background: #FEE4E2; color: #912018; text-decoration: line-through; text-decoration-color: rgba(145, 32, 24, 0.5); }
.tt-dp ins, .tt-mark--ins { background: #D1FADF; color: #05603A; text-decoration: none; }
.tt-dp del, .tt-dp ins { border-radius: 3px; padding: 0 1px; }
.tt-diff__out.only-changed .tt-dp.is-same { display: none; }
.tt-diff__out.only-same .tt-dp:not(.is-same) { display: none; }
.tt-diff__empty { padding: 14px 0; font-size: 14px; color: var(--gl-ink-3); }

/* ---------- таблица «знаков на странице» ---------- */
.tt-table { border-radius: 16px; overflow: hidden; border: 1px solid var(--gl-line); background: #FFFFFF; }
.tt-table__row {
  display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 12px;
  padding: 14px 22px; border-top: 1px solid var(--gl-line);
  font-size: 15px; font-variant-numeric: tabular-nums;
}
.tt-table__row--head {
  border-top: 0; background: #F6F6F7; font-size: 12.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; color: var(--gl-ink-3);
}
.tt-table__label { font-weight: 700; }
.tt-table__note { margin: 12px 0 0; max-width: 78ch; font-size: 13.5px; line-height: 1.55; color: var(--gl-ink-3); }

/* ---------- другие инструменты и каталог ---------- */
.tt-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.tt-others { display: flex; flex-wrap: wrap; gap: 8px; }
.tt-other {
  display: inline-flex; align-items: center; gap: 7px; padding: 10px 15px; border-radius: 11px;
  background: #FFFFFF; border: 1px solid var(--gl-line);
  font-size: 14.5px; font-weight: 600; color: var(--gl-ink-2);
}
.tt-other:hover { border-color: rgba(224, 83, 14, 0.35); color: var(--gl-brand-3); }
.tt-other i { font-size: 18px; color: var(--gl-brand-3); }

.tt-hub { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tt-hub__card {
  display: block; padding: 22px; border-radius: 16px; background: #F6F6F7; border: 1px solid var(--gl-line);
  transition: transform .18s var(--gl-ease), border-color .18s var(--gl-ease);
}
.tt-hub__card:hover { transform: translateY(-2px); border-color: rgba(224, 83, 14, 0.3); }
.tt-hub__card i { font-size: 26px; color: var(--gl-brand-3); }
.tt-hub__card b { display: block; margin: 10px 0 6px; font-size: 17px; letter-spacing: -0.02em; color: var(--gl-ink); }
.tt-hub__card span { font-size: 14px; line-height: 1.5; color: var(--gl-ink-3); }

/* ---------- всплывающее «скопировано» ---------- */
.tt-toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 50; transform: translateX(-50%);
  max-width: calc(100vw - 32px); box-sizing: border-box;
  padding: 12px 18px; border-radius: 12px; background: #1B1B20; color: #FFFFFF;
  font-size: 14px; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

/* ---------- узкие экраны ---------- */
@media (max-width: 900px) {
  .tt-stats { grid-template-columns: repeat(3, 1fr); }
  .tt-cards { grid-template-columns: 1fr; }
  .tt-rep { grid-template-columns: 1fr; }
  .tt-rep__list { max-height: 260px; }
  .tt-diff__in { grid-template-columns: 1fr; }
  .tt-diff__stats { grid-template-columns: repeat(2, 1fr); }
  .tt-hub { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .tt-wrap { padding: 0 16px; }
  .tt-box { padding: 16px; border-radius: 16px; }
  .tt-stats { grid-template-columns: repeat(2, 1fr); }
  .tt-opts { grid-template-columns: 1fr; }
  .tt-hub { grid-template-columns: 1fr; }
  .tt-offer { padding: 16px; }
  .tt-table__row { padding: 12px 14px; gap: 8px; font-size: 14px; }
  .tt-qbtn { min-width: 54px; height: 54px; font-size: 26px; }
  .tt-casebar .tt-btn { flex: 1 1 auto; }
}
