/* TorentMac — main.css
   Светлая ведомость: белый лист, линии реестра, один зелёный акцент.
   Порядок: переменные и сброс, текст, каркас, шапка, реестр, плитки,
   программа, комментарии, окна, формы, кабинет, страницы, медиазапросы. */

/* ---------- переменные и сброс ---------- */
:root {
  --paper: #ffffff;
  --ledger: #f1f4f1;
  --ink: #1a2320;
  --pencil: #56625c;
  --board: #1d6a44;
  --board-dk: #155234;
  --rule: #d5dcd7;
  --alarm: #a8261b;
  --wrap: 1200px;
  --top-h: 176px; /* высота липкой шапки: якоря и оглавление не прячутся под ней */
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
  --mono: ui-monospace, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--top-h); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  font-variant-numeric: tabular-nums;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

a { color: var(--board); text-underline-offset: 3px; }
a:hover { color: var(--board-dk); }

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }

:focus-visible { outline: 3px solid var(--board); outline-offset: 2px; border-radius: 4px; }

[hidden] { display: none !important; }

.tm-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.tm-sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.tm-skip {
  position: absolute; left: 16px; top: -60px; z-index: 1000;
  padding: 10px 16px; background: var(--ink); color: #fff; border-radius: 0 0 8px 8px;
}
.tm-skip:focus { top: 0; color: #fff; }

.tm-i {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- текст ---------- */
h1, h2, h3 { margin: 0; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: 26px; letter-spacing: -0.02em; }
h2 { font-size: 20px; }
h3 { font-size: 17px; }
p { margin: 0 0 1em; }

.tm-lead { max-width: 70ch; color: var(--ink); font-size: 17px; }
.tm-lead p:last-child { margin-bottom: 0; }
.tm-hint { color: var(--pencil); font-size: 15px; }

/* текст статьи */
.tm-prose { max-width: 68ch; font-size: 17px; line-height: 1.65; }
.tm-prose > :first-child { margin-top: 0; }
.tm-prose h2 { font-size: 23px; margin: 2em 0 .6em; scroll-margin-top: var(--top-h); }
.tm-prose h3 { font-size: 19px; margin: 1.6em 0 .5em; }
.tm-prose ul, .tm-prose ol { padding-left: 1.4em; margin: 0 0 1.1em; }
.tm-prose li { margin-bottom: .4em; }
.tm-prose li::marker { color: var(--pencil); }
.tm-prose blockquote {
  margin: 1.4em 0; padding: 4px 0 4px 20px;
  border-left: 3px solid var(--board); font-size: 18px;
}
.tm-prose blockquote p:last-child { margin: 0; }
.tm-prose code {
  font-family: var(--mono); font-size: .92em;
  background: var(--ledger); padding: 1px 5px; border-radius: 4px;
}
.tm-prose pre {
  margin: 0 0 1.2em; padding: 14px 16px; overflow-x: auto;
  background: var(--ledger); border: 1px solid var(--rule); border-radius: 8px;
  font-size: 15px; line-height: 1.55;
}
.tm-prose pre code { background: none; padding: 0; font-size: inherit; }
.tm-prose table { width: 100%; margin: 0 0 1.4em; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.tm-prose th, .tm-prose td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.tm-prose th { font-weight: 600; border-bottom: 2px solid var(--ink); }

/* ---------- каркас ---------- */
.tm-wrap { width: 100%; max-width: calc(var(--wrap) + 48px); margin-inline: auto; padding-inline: 16px; }
.tm-main { padding-top: 24px; padding-bottom: 64px; }
.tm-block { margin-top: 48px; }
.tm-block__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-bottom: 10px; margin-bottom: 4px;
}
.tm-block__head h2 { font-size: 22px; }
.tm-block__count { color: var(--pencil); font-weight: 400; font-size: 16px; margin-left: 8px; }
.tm-block__more {
  display: inline-flex; align-items: center; gap: 4px; min-height: 44px;
  font-weight: 600; text-decoration: none;
}
.tm-block__more:hover { text-decoration: underline; }

/* ---------- шапка ---------- */
.tm-top { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--rule); background: var(--paper); }
.tm-top__bar {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center;
  gap: 8px 12px; padding-block: 12px;
}
.tm-logo { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); text-decoration: none; }
.tm-logo:hover { color: var(--ink); }
.tm-logo__mark { width: 32px; height: 32px; }
.tm-logo__name { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.tm-logo__line { display: none; color: var(--pencil); font-size: 15px; }

.tm-find { grid-column: 1 / -1; grid-row: 2; position: relative; }
.tm-find .tm-find__input {
  width: 100%; height: 44px; min-height: 44px; padding: 0 52px 0 14px;
  border: 1.5px solid var(--rule); border-radius: 6px; background: var(--paper);
  font-size: 16px;
}
.tm-find__input::placeholder { color: #6b7570; }
.tm-find__input:focus { border-color: var(--board); outline: none; box-shadow: 0 0 0 3px rgba(29, 106, 68, .18); }
.tm-find__btn {
  position: absolute; right: 1px; top: 1px; width: 46px; height: 42px;
  display: grid; place-items: center; border: 0; background: none; color: var(--pencil);
  border-radius: 0 6px 6px 0;
}
.tm-find__btn:hover { color: var(--board); }

.tm-user { grid-column: 3; grid-row: 1; display: flex; align-items: center; gap: 4px; }
/* вход, колокольчик, аватар и поле поиска — одна высота, 44 px */
.tm-user__signin {
  display: inline-flex; align-items: center; height: 44px; padding: 0 16px;
  background: var(--board); color: #fff; font-weight: 600; text-decoration: none; border-radius: 8px; white-space: nowrap;
}
.tm-user__signin:hover { background: var(--board-dk); color: #fff; }

.tm-burger__box { position: absolute; opacity: 0; pointer-events: none; }
.tm-burger__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  grid-column: 4; grid-row: 1;
  min-width: 44px; height: 44px; padding: 0 10px;
  border: 1px solid var(--rule); border-radius: 8px; cursor: pointer; font-weight: 600;
}
.tm-burger__box:focus-visible + .tm-top__bar .tm-burger__btn { outline: 3px solid var(--board); outline-offset: 2px; }

/* рубрики: на телефоне — лента, по бургеру — список */
.tm-cats {
  display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none;
  margin-inline: -16px; padding: 0 16px;
  border-top: 1px solid var(--rule);
}
.tm-cats::-webkit-scrollbar { display: none; }
.tm-cats__link {
  flex: none; display: inline-flex; align-items: center; min-height: 46px; padding: 0 12px;
  color: var(--pencil); font-size: 16px; text-decoration: none; white-space: nowrap;
  border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.tm-cats__link:hover { color: var(--ink); }
.tm-cats__link.is-current { color: var(--ink); font-weight: 600; border-bottom-color: var(--board); }
.tm-burger__box:checked ~ .tm-cats { flex-wrap: wrap; overflow: visible; }

/* вошедший: колокольчик, аватар, выход */
.tm-bell { position: relative; }
.tm-bell__btn {
  position: relative; display: grid; place-items: center; width: 44px; height: 44px;
  border: 0; border-radius: 8px; background: none;
}
.tm-bell__btn:hover { background: var(--ledger); }
.tm-bell__count {
  position: absolute; top: 4px; right: 3px; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 10px; background: var(--board); color: #fff;
  font-size: 13px; font-weight: 700; line-height: 19px; text-align: center;
}
.tm-drop {
  display: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 100;
  width: 340px; background: var(--paper); border: 1px solid var(--rule); border-radius: 10px;
  box-shadow: 0 14px 40px rgba(20, 35, 28, .16);
}
.tm-bell:focus-within .tm-drop, .tm-bell.is-open .tm-drop { display: block; }
.tm-drop__list { list-style: none; margin: 0; padding: 6px 0; }
.tm-drop__item a {
  display: block; padding: 9px 16px 9px 28px; position: relative;
  color: var(--ink); text-decoration: none; font-size: 15px; line-height: 1.4;
}
.tm-drop__item a:hover { background: var(--ledger); }
.tm-drop__item time { display: block; color: var(--pencil); font-size: 14px; }
.tm-drop__item.is-unread a { font-weight: 600; }
.tm-drop__item.is-unread a::before {
  content: ""; position: absolute; left: 12px; top: 16px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--board);
}
.tm-drop__all {
  display: flex; align-items: center; min-height: 44px; padding: 0 16px;
  border-top: 1px solid var(--rule); font-weight: 600; text-decoration: none;
}
.tm-me { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 8px; color: var(--ink); text-decoration: none; border-radius: 8px; }
.tm-me:hover { background: var(--ledger); color: var(--ink); }
.tm-me__name { display: none; font-weight: 600; white-space: nowrap; }
.tm-out { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; color: var(--pencil); text-decoration: none; white-space: nowrap; }
.tm-out:hover { color: var(--ink); text-decoration: underline; }

.tm-ava {
  display: inline-grid; place-items: center; flex: none;
  width: 36px; height: 36px; border-radius: 50%;
  background: #dfeae3; color: var(--board-dk); font-size: 14px; font-weight: 700;
}
.tm-ava--lg { width: 64px; height: 64px; font-size: 22px; }

/* ---------- крошки ---------- */
.tm-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; margin-bottom: 14px; color: var(--pencil); font-size: 15px; }
.tm-crumbs a { display: inline-flex; align-items: center; min-height: 32px; color: var(--pencil); }
.tm-crumbs a:hover { color: var(--ink); }
.tm-crumbs [aria-current] { color: var(--ink); }

/* ---------- значки программы: иконка, версия, размер, шкала ---------- */
.tm-ico { width: 56px; height: 56px; flex: none; border-radius: 12px; }
.tm-ico--lg { width: 64px; height: 64px; border-radius: 14px; }
/* нет иконки: квадрат того же размера с инициалами, сетка не сдвигается */
.tm-ico--none {
  display: grid; place-items: center;
  background: var(--ledger); border: 1px solid var(--rule); color: var(--board-dk);
  font-size: 19px; font-weight: 700; letter-spacing: -0.02em; text-transform: uppercase; line-height: 1;
}
.tm-ico--lg.tm-ico--none { font-size: 22px; }
.tm-pop .tm-ico--none, .tm-bench .tm-ico--none { width: 28px; height: 28px; border-radius: 7px; font-size: 12px; }
/* сборка только для Intel */
.tm-arch {
  display: inline-block; padding: 0 6px; margin-left: 6px; vertical-align: 1px;
  border: 1px solid #b9c4bd; border-radius: 4px;
  color: var(--pencil); font-size: 13px; font-weight: 600; line-height: 1.5; white-space: nowrap;
}
.tm-ver { overflow-wrap: anywhere; }
.tm-size { white-space: nowrap; }
.tm-new { color: var(--board); font-weight: 600; font-size: 14px; }

.tm-meter { display: inline-flex; gap: 2px; vertical-align: -1px; margin-right: 6px; }
.tm-meter i { width: 5px; height: 12px; border-radius: 1px; background: var(--rule); }
.tm-meter--1 i:nth-child(-n+1),
.tm-meter--2 i:nth-child(-n+2),
.tm-meter--3 i:nth-child(-n+3),
.tm-meter--4 i:nth-child(-n+4),
.tm-meter--5 i { background: var(--board); }

/* ---------- реестр (строки программ) ---------- */
.tm-ledger { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.tm-ledger__head { display: none; }
.tm-ledger > li { border-bottom: 1px solid var(--rule); }
.tm-line {
  display: grid; align-items: center;
  grid-template-columns: 56px auto auto 1fr;
  grid-template-areas: "ico name name name" "ico ver size when";
  gap: 2px 14px; padding: 12px 8px;
  color: var(--ink); text-decoration: none;
}
.tm-line:hover { background: var(--ledger); color: var(--ink); }
.tm-line:hover .tm-line__name { text-decoration: underline; text-decoration-color: var(--board); }
.tm-line .tm-ico { grid-area: ico; }
.tm-line__name { grid-area: name; min-width: 0; font-weight: 600; font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
.tm-line__ver { grid-area: ver; min-width: 0; color: var(--pencil); font-size: 15px; overflow-wrap: anywhere; }
.tm-line__size { grid-area: size; color: var(--pencil); font-size: 15px; white-space: nowrap; }
.tm-line__cat { display: none; }
.tm-line__when { grid-area: when; color: var(--pencil); font-size: 15px; text-align: right; }
.tm-line__when .tm-new { display: block; }

/* ---------- плитки «Recently updated» ---------- */
.tm-tiles { display: grid; grid-template-columns: 1fr; gap: 10px; list-style: none; margin: 0; padding: 0; }
.tm-tile {
  display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 0 14px; align-items: start;
  height: 100%; align-content: start; padding: 14px; border: 1px solid var(--rule); border-radius: 10px;
  color: var(--ink); text-decoration: none;
}
.tm-tile:hover { background: var(--ledger); border-color: #c3ccc6; color: var(--ink); }
.tm-tile .tm-ico { grid-row: 1 / 4; }
.tm-tile__name { font-weight: 600; font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
.tm-tile:hover .tm-tile__name { text-decoration: underline; text-decoration-color: var(--board); }
.tm-tile__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; margin-top: 3px; color: var(--pencil); font-size: 15px; }
.tm-tile__meta .tm-ver { min-width: 0; color: var(--ink); }
.tm-tile__foot { display: flex; flex-wrap: wrap; gap: 0 10px; margin-top: 2px; color: var(--pencil); font-size: 14px; }

/* ---------- главная ---------- */
/* телефон: автор после «Recently updated», чтобы программы были выше */
.tm-home { display: flex; flex-direction: column; }
.tm-intro { padding-top: 8px; }
.tm-home .tm-bench { order: 1; margin-top: 32px; }
.tm-home > .tm-block:not(.tm-recent), .tm-home > .tm-about { order: 2; }
.tm-intro h1 { font-size: 30px; margin-bottom: 10px; }
.tm-bench {
  padding: 16px 18px; background: var(--ledger); border-radius: 10px; font-size: 15px;
}
.tm-bench__who { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.tm-bench__who p { margin: 0; line-height: 1.4; }
.tm-bench__who strong { font-size: 16px; }
.tm-bench h2 { font-size: 15px; font-weight: 600; color: var(--pencil); margin-bottom: 2px; letter-spacing: 0; }
.tm-bench ul { list-style: none; margin: 0; padding: 0; }
.tm-bench li a {
  display: flex; align-items: center; gap: 10px; min-height: 40px;
  color: var(--ink); text-decoration: none; line-height: 1.35;
}
.tm-bench li a:hover span { text-decoration: underline; }
.tm-bench li img { width: 28px; height: 28px; border-radius: 7px; }

.tm-about { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--rule); display: grid; gap: 8px 48px; }
.tm-about h2 { font-size: 18px; }
.tm-about ul { margin: 0; padding-left: 1.2em; color: var(--ink); }
.tm-about li { margin-bottom: 4px; }
.tm-about__scale { display: grid; gap: 6px; list-style: none; padding: 0 !important; }
.tm-about__scale li { display: flex; align-items: center; gap: 6px; }

/* Popular: 15 строк в три столбца, номер — счётчиком */
.tm-pop__list {
  counter-reset: pop; display: grid; grid-template-columns: 1fr; gap: 0 32px;
  list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink);
}
.tm-pop__list li { counter-increment: pop; border-bottom: 1px solid var(--rule); }
.tm-pop__item {
  display: grid; grid-template-columns: 22px 28px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  min-height: 48px; padding: 6px 4px; color: var(--ink); text-decoration: none; line-height: 1.3;
}
.tm-pop__item::before { content: counter(pop); color: var(--pencil); font-size: 14px; font-weight: 600; text-align: right; }
.tm-pop__item img { width: 28px; height: 28px; border-radius: 7px; }
.tm-pop__item:hover { background: var(--ledger); color: var(--ink); }
.tm-pop__item:hover .tm-pop__name { text-decoration: underline; text-decoration-color: var(--board); }
.tm-pop__name { min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.tm-pop__ver { color: var(--pencil); font-size: 15px; max-width: 9em; text-align: right; overflow-wrap: anywhere; }

/* ---------- рубрика ---------- */
.tm-subs { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 20px 0 28px; padding: 0; }
.tm-subs a {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px;
  border: 1px solid var(--rule); border-radius: 18px; color: var(--ink); text-decoration: none; font-size: 15px;
}
.tm-subs a:hover { border-color: var(--board); color: var(--board); }
.tm-sorted { color: var(--pencil); font-size: 15px; margin: 0 0 8px; }

.tm-pager { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 28px; }
.tm-pager a, .tm-pager span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 44px; padding: 0 12px;
  border: 1px solid var(--rule); border-radius: 8px; text-decoration: none; color: var(--ink);
}
.tm-pager a:hover { border-color: var(--board); color: var(--board); }
.tm-pager [aria-current] { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.tm-pager span { border-color: transparent; color: var(--pencil); }

/* ---------- кнопки ---------- */
.tm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px;
  border: 1px solid #b9c4bd; border-radius: 8px; background: var(--paper);
  color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: none; line-height: 1.2;
}
.tm-btn:hover { border-color: var(--ink); color: var(--ink); }
.tm-btn--go { background: var(--board); border-color: var(--board); color: #fff; }
.tm-btn--go:hover { background: var(--board-dk); border-color: var(--board-dk); color: #fff; }
.tm-btn--big { min-height: 54px; font-size: 17px; width: 100%; }
/* избранное: aria-pressed ставит скрипт сайта, is-saved — тот же вид для серверной отрисовки */
.tm-btn.is-saved, .tm-fav[aria-pressed="true"] { border-color: var(--board); background: #e8f2ec; color: var(--board-dk); }
.tm-btn.is-saved .tm-i, .tm-fav[aria-pressed="true"] .tm-i { fill: currentColor; }

/* ---------- страница программы ---------- */
.tm-app { display: grid; gap: 20px; }
.tm-app__head { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 0 16px; align-items: start; }
.tm-app__head h1 { font-size: 26px; overflow-wrap: anywhere; }
.tm-app__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; margin-top: 4px; color: var(--pencil); font-size: 15px; }
.tm-app__cat { display: inline-flex; align-items: center; min-height: 32px; font-weight: 600; }

.tm-get { display: grid; gap: 10px; padding: 16px; background: var(--ledger); border-radius: 12px; }
.tm-get__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tm-get__note { margin: 0; color: var(--pencil); font-size: 14px; line-height: 1.45; }

.tm-facts {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0;
  border-top: 1px solid var(--rule);
}
.tm-facts > div { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); min-width: 0; }
.tm-facts dt { color: var(--pencil); font-size: 14px; }
.tm-facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

.tm-body { display: grid; gap: 40px; margin-top: 32px; }
.tm-body__main { min-width: 0; }

/* скриншоты: один кадр и миниатюры */
.tm-shots { margin-bottom: 36px; }
.tm-shots__stage { position: relative; }
.tm-shot { margin: 0 0 16px; }
.tm-shot img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border: 1px solid var(--rule); border-radius: 10px; background: var(--ledger);
}
.tm-shot figcaption { margin-top: 8px; color: var(--pencil); font-size: 15px; }
.tm-shots__nav { display: none; align-items: center; gap: 8px; margin-top: 12px; }
.tm-shots__arrow {
  flex: none; display: grid; width: 44px; height: 44px; place-items: center;
  border: 1px solid var(--rule); border-radius: 50%; background: var(--paper); color: var(--ink);
}
.tm-shots__arrow:hover { border-color: var(--ink); }
.tm-shots__thumbs { display: flex; flex: 1; min-width: 0; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.tm-shots__thumbs::-webkit-scrollbar { display: none; }
.tm-thumb { flex: none; width: 112px; padding: 0; border: 2px solid transparent; border-radius: 8px; background: none; }
.tm-thumb img { width: 100%; aspect-ratio: 16 / 9; border-radius: 6px; border: 1px solid var(--rule); }
.tm-thumb.is-current { border-color: var(--board); }
/* со скриптом виден один кадр */
.tm-shots.is-live .tm-shot { display: none; margin: 0; }
.tm-shots.is-live .tm-shot.is-current { display: block; }
.tm-shots.is-live .tm-shots__nav { display: flex; }
/* один кадр: без стрелок и миниатюр */
.tm-shots--one .tm-shots__nav, .tm-shots.is-live.tm-shots--one .tm-shots__nav { display: none; }
.tm-shots--one .tm-shot { margin-bottom: 0; }

.tm-none {
  margin-bottom: 32px; padding: 16px 18px; border: 1px dashed #b9c4bd; border-radius: 10px;
  color: var(--pencil);
}
.tm-none p { margin: 0; }
.tm-none strong { color: var(--ink); }

/* вкладки */
.tm-tabs {
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  padding: 4px; margin-bottom: 24px; background: var(--ledger); border-radius: 10px;
}
.tm-tabs::-webkit-scrollbar { display: none; }
.tm-tabs__btn {
  flex: 1 0 auto; min-height: 44px; padding: 0 16px;
  border: 1px solid transparent; border-radius: 7px; background: none;
  color: var(--pencil); font-weight: 600; font-size: 16px; white-space: nowrap;
}
.tm-tabs__btn:hover { color: var(--ink); }
.tm-tabs__btn.is-current { background: var(--paper); border-color: var(--rule); color: var(--ink); }
.tm-panel__label { display: none; }
.tm-news { margin-bottom: 24px; }

/* FAQ */
.tm-faq { margin-top: 48px; max-width: 68ch; }
.tm-faq h2 { margin-bottom: 8px; }
.tm-faq details { border-bottom: 1px solid var(--rule); }
.tm-faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 52px; padding: 8px 0; cursor: pointer; list-style: none;
  font-weight: 600; font-size: 17px;
}
.tm-faq summary::-webkit-details-marker { display: none; }
.tm-faq summary::after { content: "+"; flex: none; color: var(--board); font-size: 24px; font-weight: 400; line-height: 1; }
.tm-faq details[open] summary::after { content: "\2212"; }
.tm-faq details p { margin: 0 0 16px; font-size: 17px; line-height: 1.6; }
.tm-faq code { font-family: var(--mono); font-size: .9em; background: var(--ledger); padding: 1px 5px; border-radius: 4px; }

/* боковая колонка программы */
.tm-side { display: grid; gap: 28px; align-content: start; }
.tm-side h2 { font-size: 18px; margin-bottom: 8px; }
.tm-spec { margin: 0; border-top: 1px solid var(--rule); }
.tm-spec > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--rule); font-size: 15px; }
.tm-spec dt { color: var(--pencil); }
.tm-spec dd { margin: 0; overflow-wrap: anywhere; }
.tm-glance { width: 100%; border-collapse: collapse; font-size: 15px; }
.tm-glance th, .tm-glance td { padding: 9px 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.tm-glance th { width: 120px; padding-right: 12px; color: var(--pencil); font-weight: 400; }
.tm-glance tr:first-child > * { border-top: 1px solid var(--rule); }
.tm-author { display: grid; grid-template-columns: 48px 1fr; gap: 12px; padding: 16px; background: var(--ledger); border-radius: 10px; font-size: 15px; line-height: 1.45; }
.tm-author .tm-ava { width: 48px; height: 48px; font-size: 16px; }
.tm-author p { margin: 0 0 4px; }

.tm-toc { position: sticky; top: calc(var(--top-h) + 8px); }
.tm-toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--rule); }
.tm-toc a { display: flex; align-items: center; min-height: 36px; padding: 2px 0 2px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--pencil); text-decoration: none; font-size: 15px; line-height: 1.35; }
.tm-toc a:hover { color: var(--ink); border-left-color: var(--board); }

/* ---------- комментарии ---------- */
.tm-talk { margin-top: 56px; max-width: 760px; }
.tm-talk__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.tm-talk__head h2 { font-size: 22px; }
.tm-talk__n { color: var(--pencil); font-weight: 400; }
.tm-sort { display: inline-flex; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; }
.tm-sort button { min-height: 38px; padding: 0 14px; border: 0; background: var(--paper); color: var(--pencil); font-size: 15px; font-weight: 600; }
.tm-sort button + button { border-left: 1px solid var(--rule); }
.tm-sort button.is-current { background: var(--ledger); color: var(--ink); }

.tm-cform { margin-bottom: 28px; }
.tm-cform form { display: grid; gap: 8px; }
.tm-cform label { font-weight: 600; }
.tm-cform textarea { min-height: 120px; }
.tm-cform .tm-btn { justify-self: start; }
.tm-guest { padding: 16px 18px; background: var(--ledger); border-radius: 10px; }
.tm-guest p { margin: 0; }

.tm-thread, .tm-replies { list-style: none; margin: 0; padding: 0; }
.tm-thread > li { border-top: 1px solid var(--rule); }
.tm-msg { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 0 12px; padding: 18px 0; }
.tm-msg .tm-ava { width: 40px; height: 40px; }
.tm-msg__who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 4px; font-weight: 600; }
.tm-msg__who time { color: var(--pencil); font-weight: 400; font-size: 14px; }
.tm-msg p { margin-bottom: 8px; }
.tm-msg__ops { display: flex; gap: 6px; margin: 0; }
.tm-like, .tm-replybtn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px;
  border: 1px solid transparent; border-radius: 8px; background: none; color: var(--pencil); font-size: 15px;
}
.tm-like:hover, .tm-replybtn:hover { border-color: var(--rule); color: var(--ink); }
.tm-like .tm-i, .tm-replybtn .tm-i { width: 18px; height: 18px; }
.tm-like.is-on { color: var(--board); }
.tm-like.is-on .tm-i { fill: currentColor; }
.tm-replies { margin-left: 0; padding-left: 16px; border-left: 2px solid var(--rule); }
.tm-replies .tm-msg { padding: 12px 0; }
.tm-reply { display: grid; gap: 8px; margin: 8px 0 4px; }
.tm-reply label { font-weight: 600; font-size: 15px; }
.tm-reply textarea { min-height: 80px; }
.tm-reply .tm-btn { justify-self: start; }
.tm-held { opacity: .62; }
.tm-badge {
  display: inline-block; padding: 1px 8px; border: 1px solid #b9c4bd; border-radius: 4px;
  color: var(--pencil); font-size: 14px; font-weight: 600; line-height: 1.5;
}
.tm-badge--no { border-color: var(--alarm); color: var(--alarm); }
.tm-empty { padding: 16px 0; color: var(--pencil); }

/* ---------- окна ---------- */
.tm-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; }
.tm-modal__bg { position: absolute; inset: 0; background: rgba(15, 26, 20, .55); }
.tm-modal__box {
  position: relative; width: 100%; max-width: 580px; max-height: calc(100vh - 32px); overflow-y: auto;
  background: var(--paper); border-radius: 14px; box-shadow: 0 24px 70px rgba(10, 20, 15, .3);
}
.tm-modal__head {
  position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 12px 12px 22px; background: var(--paper); border-bottom: 1px solid var(--rule);
}
.tm-modal__x {
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 0; border-radius: 8px; background: none; color: var(--pencil);
}
.tm-modal__x:hover { background: var(--ledger); color: var(--ink); }
.tm-modal__body { padding: 18px 22px 24px; }
.tm-modal__body > p:last-child { margin-bottom: 0; }
.tm-modal__body img { border-radius: 8px; }
.tm-steps { counter-reset: st; list-style: none; margin: 0 0 20px; padding: 0; }
.tm-steps li { counter-increment: st; position: relative; padding: 0 0 12px 40px; }
.tm-steps li::before {
  content: counter(st); position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%; background: var(--ledger);
  display: grid; place-items: center; font-weight: 700; font-size: 14px; color: var(--board-dk);
}
.tm-mirror { padding: 14px 0; border-top: 1px solid var(--rule); }
.tm-mirror h3 { font-size: 16px; margin-bottom: 10px; }
.tm-mirror__links { display: flex; flex-wrap: wrap; gap: 8px; }
.tm-scale { list-style: none; margin: 0 0 1em; padding: 0; display: grid; gap: 6px; }
.tm-scale li { display: flex; align-items: center; }

/* ---------- формы ---------- */
.tm-field { display: grid; gap: 6px; margin-bottom: 16px; }
.tm-field label, .tm-label { font-weight: 600; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="url"], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px;
  border: 1.5px solid var(--rule); border-radius: 6px; background: var(--paper); font-size: 16px;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--board); outline: none; box-shadow: 0 0 0 3px rgba(29, 106, 68, .18); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--alarm); }
.tm-ok p:last-child, .tm-fail p:last-child { margin-bottom: 0; }
.tm-err { margin: 0; color: var(--alarm); font-size: 15px; }
.tm-err::before { content: "! "; font-weight: 700; }
.tm-check { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-bottom: 12px; cursor: pointer; }
.tm-check input { width: 20px; height: 20px; accent-color: var(--board); }
.tm-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tm-ok { padding: 12px 16px; margin-bottom: 20px; border-left: 4px solid var(--board); background: #e8f2ec; border-radius: 0 8px 8px 0; }

.tm-gate { max-width: 460px; margin: 24px auto 0; }
.tm-gate h1 { margin-bottom: 8px; }
.tm-gate .tm-lead { font-size: 16px; color: var(--pencil); margin-bottom: 24px; }
.tm-gate form .tm-btn { width: 100%; min-height: 48px; margin-top: 4px; }
.tm-gate__alt { margin-top: 20px; color: var(--pencil); }
.tm-gate__alt a { display: inline-flex; align-items: center; min-height: 32px; }

/* ---------- кабинет ---------- */
.tm-acct { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.tm-acct p { margin: 0; color: var(--pencil); }
.tm-acct__tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-bottom: 28px; border-bottom: 1px solid var(--rule); }
.tm-acct__tabs::-webkit-scrollbar { display: none; }
.tm-acct__tabs a {
  flex: none; display: inline-flex; align-items: center; min-height: 46px; padding: 0 14px;
  color: var(--pencil); text-decoration: none; font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.tm-acct__tabs a:hover { color: var(--ink); }
.tm-acct__tabs a[aria-current] { color: var(--ink); border-bottom-color: var(--board); }
.tm-acct__tabs .tm-acct__n { margin-left: 6px; color: var(--board); }
.tm-acct h2 { font-size: 22px; }

.tm-feed { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); max-width: 760px; }
.tm-feed li { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; padding: 6px 0 6px 20px; border-bottom: 1px solid var(--rule); position: relative; }
.tm-feed a { display: flex; align-items: center; min-height: 40px; color: var(--ink); text-decoration: none; }
.tm-feed a:hover { text-decoration: underline; }
.tm-feed time { color: var(--pencil); font-size: 14px; white-space: nowrap; }
.tm-feed .is-unread a { font-weight: 600; }
.tm-feed .is-unread::before { content: ""; position: absolute; left: 2px; top: 22px; width: 8px; height: 8px; border-radius: 50%; background: var(--board); }

.tm-mine { list-style: none; margin: 0; padding: 0; max-width: 760px; }
.tm-mine li { padding: 16px 0; border-top: 1px solid var(--rule); }
.tm-mine__top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 4px; }
.tm-mine__top a { display: inline-flex; align-items: center; min-height: 32px; font-weight: 600; }
.tm-mine p { margin: 0 0 4px; }
.tm-mine time { color: var(--pencil); font-size: 14px; }
.tm-settings { max-width: 460px; }

/* ---------- подвал ---------- */
.tm-foot { margin-top: 24px; background: var(--ledger); border-top: 1px solid var(--rule); color: var(--pencil); font-size: 15px; }
.tm-foot__in { display: grid; gap: 12px; padding-block: 28px 32px; }
.tm-foot__name { margin: 0; color: var(--ink); font-weight: 700; font-size: 17px; }
.tm-foot__name span { display: block; color: var(--pencil); font-weight: 400; font-size: 15px; }
.tm-foot__nav { display: flex; flex-wrap: wrap; gap: 0 4px; }
.tm-foot__nav a, .tm-foot__up { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; color: var(--ink); text-decoration: none; }
.tm-foot__nav a:first-child { padding-left: 0; }
.tm-foot__nav a:hover, .tm-foot__up:hover { text-decoration: underline; color: var(--ink); }
.tm-foot__up { padding-left: 0; gap: 6px; }
.tm-foot__copy { margin: 0; }

/* ---------- ошибки ---------- */
.tm-oops { max-width: 760px; padding-top: 16px; }
.tm-oops__code { margin: 0 0 6px; color: var(--pencil); font-weight: 600; }
.tm-oops h1 { font-size: 30px; margin-bottom: 12px; }
.tm-oops form { display: flex; gap: 8px; margin: 24px 0 8px; max-width: 520px; }
.tm-oops form input { flex: 1; }
.tm-oops h2 { margin: 36px 0 10px; font-size: 18px; }

/* ---------- поиск ---------- */
.tm-found { color: var(--pencil); font-size: 16px; margin: 6px 0 20px; }
.tm-found strong { color: var(--ink); }
.tm-nothing { max-width: 68ch; margin-top: 8px; padding: 18px 20px; border: 1px dashed #b9c4bd; border-radius: 10px; }
.tm-nothing h2 { font-size: 18px; margin-bottom: 6px; }
.tm-nothing ul { margin: 0 0 12px; padding-left: 1.2em; }
.tm-nothing li { margin-bottom: 4px; }
.tm-nothing .tm-subs { margin: 8px 0 0; padding: 0; }

/* ---------- DMCA ---------- */
.tm-claim { max-width: 640px; margin-top: 28px; }
.tm-claim__intro h1 { margin-bottom: 14px; }
.tm-claim__intro { margin-bottom: 24px; }
.tm-claim__msg { max-width: 640px; }
.tm-claim fieldset { margin: 0 0 8px; padding: 0; border: 0; }
.tm-claim legend { padding: 0; margin-bottom: 12px; font-size: 18px; font-weight: 700; }
.tm-claim .tm-field small { color: var(--pencil); font-size: 14px; }
.tm-claim textarea { min-height: 130px; }
.tm-claim .tm-check { align-items: flex-start; min-height: 0; line-height: 1.45; }
.tm-claim .tm-check input { flex: none; width: 24px; height: 24px; margin: 0; }
.tm-claim > .tm-btn { min-width: 220px; min-height: 48px; }
.tm-fail { padding: 12px 16px; margin-bottom: 20px; border-left: 4px solid var(--alarm); background: #f8e9e7; border-radius: 0 8px 8px 0; }
.tm-req { color: var(--alarm); font-weight: 400; }

/* ---------- медиазапросы ---------- */
@media (min-width: 600px) {
  .tm-wrap { padding-inline: 24px; }
  .tm-cats { margin-inline: -24px; padding: 0 24px; }
  .tm-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tm-facts { grid-template-columns: repeat(3, 1fr); }
  .tm-me__name { display: inline; }
  .tm-get__row { grid-template-columns: auto auto; justify-content: start; }
  .tm-replies { margin-left: 52px; }
  .tm-pop__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  :root { --top-h: 128px; }
  h1 { font-size: 34px; }
  .tm-pop__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tm-main { padding-top: 28px; }
  .tm-top__bar { grid-template-columns: auto minmax(280px, 560px) 1fr auto; padding-block: 14px; gap: 24px; }
  .tm-find { grid-column: 2; grid-row: 1; }
  .tm-user { grid-column: 3 / 5; justify-self: end; }
  .tm-burger__btn { display: none; }
  .tm-cats { margin-inline: 0; padding: 0; border-top: 0; flex-wrap: wrap; overflow: visible; margin-left: -12px; }

  .tm-home { display: grid; grid-template-columns: minmax(0, 1fr) 340px; column-gap: 48px; align-items: start; }
  .tm-home > * { grid-column: 1 / -1; }
  .tm-home > .tm-intro { grid-column: 1; grid-row: 1; }
  .tm-home > .tm-bench { grid-column: 2; grid-row: 1; margin-top: 0; }
  .tm-intro h1 { font-size: 36px; }
  .tm-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tm-about { grid-template-columns: 1fr 1fr; }

  /* реестр становится таблицей */
  .tm-ledger__head {
    display: grid; grid-template-columns: 56px minmax(0, 1fr) 170px 190px 150px 150px; gap: 0 16px;
    padding: 8px 8px; color: var(--pencil); font-size: 14px; font-weight: 600;
  }
  .tm-ledger__head span:first-child { grid-column: 1 / 3; }
  .tm-line {
    grid-template-columns: 56px minmax(0, 1fr) 170px 190px 150px 150px;
    grid-template-areas: "ico name ver size cat when";
    gap: 0 16px; padding: 10px 8px;
  }
  .tm-line__name { font-size: 17px; }
  .tm-line__ver, .tm-line__size, .tm-line__cat, .tm-line__when { font-size: 16px; }
  .tm-line__ver { color: var(--ink); }
  .tm-line__cat { display: block; grid-area: cat; color: var(--pencil); }
  .tm-line__when { text-align: left; }

  .tm-app { grid-template-columns: minmax(0, 1fr) 360px; gap: 20px 48px; align-items: start; }
  .tm-app__head h1 { font-size: 34px; }
  .tm-get { grid-row: 1 / 3; grid-column: 2; }
  .tm-get__row { grid-template-columns: 1fr; }
  .tm-get__row .tm-btn { white-space: nowrap; }
  .tm-facts { grid-template-columns: repeat(5, minmax(0, auto)); }
  .tm-facts > div { padding-right: 20px; }
  .tm-body { grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; margin-top: 36px; }
  .tm-paper { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 64px; align-items: start; }

  .tm-foot__in { grid-template-columns: 1fr auto; align-items: center; }
  .tm-foot__copy { grid-column: 1 / -1; }
  .tm-modal__box { max-height: calc(100vh - 64px); }
}

@media (min-width: 1100px) {
  .tm-get__row { grid-template-columns: 1fr 1fr; }
  .tm-logo__line { display: block; max-width: 200px; line-height: 1.3; font-size: 14px; }
  .tm-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tm-body { grid-template-columns: minmax(0, 1fr) 340px; gap: 72px; }
  .tm-app { grid-template-columns: minmax(0, 1fr) 400px; }
}

@media (max-width: 899px) {
  /* телефон и планшет: аккаунт короче, лишнее в шапке прячем */
  .tm-out { display: none; }
  .tm-drop { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; }
  .tm-side { margin-top: 8px; }
  .tm-toc { position: static; margin-top: 32px; }
  /* метка Intel в строке реестра — под версией, иначе дата ломается на две строки */
  .tm-line .tm-arch { display: block; width: fit-content; margin: 2px 0 0; }
}

@media (max-width: 599px) {
  .tm-prose table { display: block; overflow-x: auto; }
  .tm-intro h1 { font-size: 27px; }
  .tm-get__row { grid-template-columns: 1fr; }
  .tm-tabs__btn { padding: 0 8px; font-size: 15px; }
  /* мета комментариев на телефоне тем же кеглем, что текст */
  .tm-msg__who time, .tm-like, .tm-replybtn, .tm-msg .tm-badge { font-size: 16px; }
}

@media (prefers-reduced-motion: no-preference) {
  .tm-line, .tm-tile, .tm-btn, .tm-cats__link { transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}

/* ---------- доработки страниц ---------- */
/* главная: у первого блока свой отступ, иначе плитки уезжают за сгиб на 900 px */
.tm-home > .tm-recent { margin-top: 36px; }
/* safari: у summary в flex иначе съезжает маркер */
.tm-faq summary { display: -webkit-box; display: flex; }
/* account.html: пустое избранное в макете показано вторым состоянием */
.tm-state-note { margin: 28px 0 8px; color: var(--pencil); font-size: 14px; }
.tm-toc h2 { margin-bottom: 8px; color: var(--pencil); font-size: 15px; font-weight: 600; letter-spacing: 0; }

/* phone: once the page scrolls, the sticky header keeps only logo, search and sign-in;
   the category strip comes back at the top or from the burger */
@media (max-width: 899px) {
  :root { --top-h: 124px; }
  .tm-top.is-scrolled .tm-burger__box:not(:checked) ~ .tm-cats { display: none; }
}

/* программа без иконки: вместо букв — обложка (скриншот), обрезанная в квадрат иконки */
img.is-cover { object-fit: cover; object-position: center top; }
