/* ============================================================
   TechMinimal — стили сайта (редизайн 11.2026).
   Тёмный фон + янтарь ТОЛЬКО для акцентов (кнопки, ссылки, метки).
   Текст — светлый, обычным шрифтом Inter. Моноширинный JetBrains Mono —
   для логотипа, заголовков разделов и меток.
   Тема terminal больше не даёт стили: всё оформление здесь.
   ============================================================ */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/fonts/inter-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url("/fonts/jetbrains-mono-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url("/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #0c0d0b;
  --card: #15160f;
  --card-2: #1c1d15;
  --line: #2a2b22;
  --line-2: #4a4638;
  --text: #efe9dc;
  --text-2: #c9c2b2;
  --muted: #a8a192;
  --accent: #ffb000;
  --accent-2: #ffd166;
  --digital: #7fd4c1;
  --red: #ff6b6b;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --r: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 17px; line-height: 1.6; }
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-2); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, h4 { line-height: 1.2; }
.tm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.tm-wrap { max-width: 1208px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .tm-wrap { padding: 0 16px; } body { font-size: 16px; } }

/* ---------- шапка ---------- */
.tm-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0 32px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tm-logo { display: inline-flex; align-items: baseline; gap: 10px; padding: 10px 0; text-decoration: none; font-family: var(--mono); white-space: nowrap; }
.tm-mark { font-weight: 700; font-size: 20px; color: var(--accent); }
.tm-emo { display: inline-block; min-width: 3ch; text-align: center; }
.tm-emo.glitch-on { color: var(--accent-2); }
.tm-word { font-weight: 500; font-size: 15px; letter-spacing: 1px; color: var(--muted); }
.tm-nav { display: flex; flex-wrap: wrap; gap: 0 26px; font-size: 16px; font-weight: 500; }
.tm-nav a { padding: 12px 0; color: var(--text); text-decoration: none; }
.tm-nav a:hover, .tm-nav a[aria-current] { color: var(--accent); }
@media (max-width: 600px) {
  .tm-nav { flex-wrap: nowrap; overflow-x: auto; width: 100%; gap: 0 20px; scrollbar-width: none; }
  .tm-nav::-webkit-scrollbar { display: none; }
  .tm-nav a { white-space: nowrap; }
}

/* ---------- общие блоки ---------- */
.tm-main { padding-bottom: 72px; }
.tm-sec { padding-top: 72px; }
.tm-sec-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 24px; margin-bottom: 24px; }
.tm-h2 { margin: 0; font-family: var(--mono); font-size: 24px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.tm-h2::before { content: "// "; color: #8a7a4a; }
.tm-more { font-size: 16px; font-weight: 600; padding: 10px 0; text-decoration: none; }
.tm-label { margin: 0; font-family: var(--mono); font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); }
.tm-muted { color: var(--muted); }

.tm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 24px; border: 1px solid var(--line-2); border-radius: 4px; background: transparent; color: var(--text); font: 600 16px var(--sans); text-decoration: none; cursor: pointer; }
.tm-btn:hover { border-color: var(--accent); color: var(--accent); }
.tm-btn--primary { background: var(--accent); border-color: var(--accent); color: #0c0d0b; font-weight: 700; }
.tm-btn--primary:hover { background: var(--accent-2); border-color: var(--accent-2); color: #0c0d0b; }
.tm-btns { display: flex; flex-wrap: wrap; gap: 12px; }

.tm-chips { display: flex; flex-wrap: wrap; gap: 6px; font-family: var(--mono); font-size: 12px; }
.tm-chip { padding: 4px 8px; border: 1px solid var(--line-2); border-radius: 3px; color: var(--text-2); text-decoration: none; }
.tm-chip--on { border-color: var(--accent); color: var(--accent); }
.tm-chip--digital { border-color: var(--digital); color: var(--digital); }

.tm-bar { display: block; height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.tm-bar > span { display: block; height: 100%; background: var(--accent); }

/* ---------- карточки ---------- */
.tm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.tm-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; text-decoration: none; color: var(--text); transition: border-color .15s; }
a.tm-card:hover { border-color: var(--accent); color: var(--text); }
.tm-card__img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.tm-card__ph { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; background: var(--card-2); font-family: var(--mono); font-weight: 700; font-size: 22px; color: #5a5440; }
.tm-card__body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; flex: 1; }
.tm-card__title { font-size: 19px; font-weight: 600; line-height: 1.3; }
.tm-card__desc { font-size: 15px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tm-card .tm-chips { margin-top: auto; padding-top: 6px; }
.tm-card .tm-bar { height: 4px; }
.tm-card__state { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.tm-card--more { justify-content: center; gap: 10px; padding: 32px; border-style: dashed; border-color: var(--line-2); background: transparent; min-height: 220px; }
.tm-card--more b { font-size: 19px; line-height: 1.3; }
.tm-card--more span:last-child { font-weight: 600; color: var(--accent); }

/* ---------- главная ---------- */
.tm-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 48px; align-items: center; padding: 64px 0 56px; }
.tm-hero__text { display: flex; flex-direction: column; gap: 20px; }
.tm-hero h1 { margin: 0; font-size: clamp(32px, 4.4vw, 46px); line-height: 1.1; font-weight: 700; letter-spacing: -0.5px; }
.tm-hero__lead { font-size: 19px; color: var(--text-2); max-width: 520px; }
.tm-hero__lead p { margin: 0; }
.tm-now { display: block; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--card); color: var(--text); text-decoration: none; }
.tm-now:hover { border-color: var(--accent); color: var(--text); }
.tm-now img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.tm-now__body { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 20px; }
.tm-now__top { display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.tm-now__top b { color: var(--accent); font-weight: 500; }
.tm-now__title { font-size: 20px; font-weight: 600; line-height: 1.3; }

.tm-entry { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.tm-entry a { display: flex; flex-direction: column; gap: 8px; padding: 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--text); }
.tm-entry a:hover { border-color: var(--accent); }
.tm-entry__n { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.tm-entry__t { font-size: 21px; font-weight: 600; }
.tm-entry__d { font-size: 15px; color: var(--muted); }
.tm-entry__go { font-size: 15px; font-weight: 600; color: var(--accent); margin-top: 4px; }

.tm-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 48px; }
.tm-two .tm-h2 { margin-bottom: 16px; }
.tm-rows { display: flex; flex-direction: column; }
.tm-row { display: grid; grid-template-columns: 64px 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--text); }
.tm-row:hover .tm-row__t { color: var(--accent); }
.tm-row__d { font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 3px; }
.tm-row__t { display: block; font-weight: 600; }
.tm-row__k { display: block; font-size: 14px; color: var(--muted); margin-top: 2px; }
.tm-row--wip { display: flex; flex-direction: column; gap: 8px; }
.tm-row--wip > span:first-child { display: flex; justify-content: space-between; gap: 16px; }
.tm-row--wip .tm-bar { height: 4px; }
.tm-rows > .tm-more { border-top: 1px solid var(--line); padding: 16px 0; }

.tm-teasers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 20px; }
.tm-teaser { display: flex; flex-direction: column; gap: 10px; padding: 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--text); }
.tm-teaser:hover { border-color: var(--accent); color: var(--text); }
.tm-teaser b { font-size: 21px; line-height: 1.25; }
.tm-teaser span:nth-of-type(2) { font-size: 15px; color: var(--muted); }
.tm-files { display: flex; flex-direction: column; gap: 4px; font-family: var(--mono); font-size: 14px; color: var(--text-2); }

.tm-band { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px 48px; padding: 36px; margin-top: 72px; border: 1px solid var(--accent); border-radius: var(--r); }
.tm-band h2 { margin: 0 0 8px; font-size: 26px; }
.tm-band p { margin: 0; color: var(--text-2); max-width: 640px; }
@media (max-width: 600px) { .tm-band { padding: 24px; } }

/* ---------- каталог проектов ---------- */
.tm-page-head { display: flex; flex-direction: column; gap: 14px; padding: 48px 0 28px; }
.tm-page-head h1 { margin: 0; font-size: clamp(30px, 4vw, 42px); line-height: 1.12; letter-spacing: -0.5px; }
.tm-page-head p { margin: 0; font-size: 19px; color: var(--text-2); max-width: 720px; }
.tm-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.tm-filters button { min-height: 44px; padding: 0 16px; background: transparent; color: var(--text); border: 1px solid var(--line-2); border-radius: 4px; font: 600 15px var(--sans); cursor: pointer; }
.tm-filters button span { color: var(--muted); font-weight: 400; margin-left: 4px; }
.tm-filters button:hover { border-color: var(--accent); }
.tm-filters button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #0c0d0b; }
.tm-filters button[aria-pressed="true"] span { color: #0c0d0b; }
.tm-group { padding-top: 48px; }
.tm-group[hidden], .tm-card[hidden] { display: none; }

/* ---------- страница проекта ---------- */
.tm-crumbs { margin: 0; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.tm-crumbs a { color: var(--muted); }
.tm-ptop { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; padding-bottom: 56px; }
.tm-cover { flex: 2 1 480px; min-width: 0; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--line); border-radius: var(--r); }
.tm-panel { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 12px; padding: 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.tm-panel h2 { margin: 0 0 4px; font-family: var(--mono); font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.tm-panel p { margin: 0; font-size: 14px; color: var(--muted); }
.tm-act { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 8px 18px; border: 1px solid var(--line-2); border-radius: 4px; color: var(--text); font-weight: 600; text-decoration: none; }
.tm-act:hover { border-color: var(--accent); color: var(--accent); }
.tm-act--primary { background: var(--accent); border-color: var(--accent); color: #0c0d0b; font-weight: 700; }
.tm-act--primary:hover { background: var(--accent-2); border-color: var(--accent-2); color: #0c0d0b; }
.tm-act i { font-style: normal; color: var(--accent); white-space: nowrap; }
.tm-act--primary i { color: inherit; }
.tm-check { margin: 4px 0; padding: 0; list-style: none; font-size: 15px; color: var(--text-2); display: flex; flex-direction: column; gap: 4px; }
.tm-check li { display: grid; grid-template-columns: 18px 1fr; gap: 6px; }
.tm-check li.is-done { color: var(--muted); }
.tm-check li.is-done::before { content: "✓"; color: var(--accent); }
.tm-check li:not(.is-done)::before { content: "·"; }
.tm-stuck { color: var(--red) !important; }

.tm-pbody { display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; }
.tm-pbody > .tm-prose { flex: 2 1 480px; min-width: 0; }
.tm-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.tm-side .tm-panel { flex: none; }
.tm-parts > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 16px; font-weight: 600; }
.tm-parts a { font-size: 15px; white-space: nowrap; padding: 10px 0; text-decoration: none; }
.tm-kit { display: flex; flex-direction: column; gap: 10px; padding: 24px; border: 1px solid var(--accent); border-radius: var(--r); }
.tm-kit b { font-size: 19px; line-height: 1.3; }
.tm-kit span { font-size: 15px; color: var(--muted); }
.tm-support { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 48px; margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--line); }
.tm-support p { margin: 0; color: var(--text-2); max-width: 640px; }

/* ---------- текст статьи ---------- */
.tm-article { max-width: 760px; margin: 0 auto; }
.tm-prose { max-width: 760px; color: #ddd7c9; overflow-wrap: break-word; }
.tm-prose > :first-child { margin-top: 0; }
.tm-prose h1 { font-size: clamp(28px, 4vw, 38px); margin: 0 0 20px; color: var(--text); letter-spacing: -0.5px; }
.tm-prose h2 { font-size: 27px; margin: 44px 0 14px; color: var(--text); }
.tm-prose h3 { font-size: 21px; margin: 32px 0 10px; color: var(--text); }
.tm-prose h4 { font-size: 18px; margin: 24px 0 8px; color: var(--text); }
.tm-prose p, .tm-prose ul, .tm-prose ol { margin: 0 0 16px; }
.tm-prose ul, .tm-prose ol { padding-left: 24px; }
.tm-prose li { margin: 4px 0; }
.tm-prose strong { color: var(--text); }
.tm-prose img { display: block; border-radius: var(--r); border: 1px solid var(--line); margin: 20px 0; }
.tm-prose hr { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }
.tm-prose blockquote { margin: 20px 0; padding: 4px 20px; border-left: 3px solid var(--accent); color: var(--text-2); }
.tm-prose code { font-family: var(--mono); font-size: 0.88em; padding: 2px 6px; background: var(--card-2); border-radius: 3px; color: var(--accent-2); }
.tm-prose pre { margin: 20px 0; padding: 16px 18px; background: #101109 !important; border: 1px solid var(--line); border-radius: var(--r); overflow-x: auto; font-size: 14px; line-height: 1.5; }
.tm-prose pre code { padding: 0; background: none; color: inherit; font-size: inherit; }
.tm-prose table { display: block; overflow-x: auto; width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 15px; }
.tm-prose th, .tm-prose td { padding: 10px 14px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.tm-prose th { background: var(--card); color: var(--text); font-weight: 600; white-space: nowrap; }
.tm-prose .hanchor { display: none; }
.tm-prose-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 24px; font-family: var(--mono); font-size: 13px; color: var(--muted); }

/* ---------- магазин ---------- */
.tm-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.tm-types > div { display: flex; flex-direction: column; gap: 8px; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--r); }
.tm-types b { font-size: 19px; }
.tm-types span:last-child { font-size: 15px; color: var(--muted); }
.tm-kind { font-family: var(--mono); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); }
.tm-kind--digital { color: var(--digital); }
.tm-prod ul { margin: 0; padding-left: 18px; font-size: 15px; color: var(--muted); }
.tm-prod__buy { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 10px; }
.tm-prod__buy b { font-size: 20px; }
.tm-prod__buy .tm-btn { min-height: 44px; padding: 0 20px; }
.tm-prod .tm-files { justify-content: center; padding: 24px; aspect-ratio: 4 / 3; background: var(--card-2); }

/* ---------- подвал ---------- */
.tm-footer { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; padding: 40px 0 48px; border-top: 1px solid var(--line); font-size: 15px; }
.tm-footer nav { display: flex; flex-direction: column; }
.tm-footer nav a { padding: 6px 0; color: var(--text); text-decoration: none; }
.tm-footer nav a:hover { color: var(--accent); }
.tm-footer__h { font-family: var(--mono); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); padding-bottom: 6px; }
.tm-footer__about { display: flex; flex-direction: column; gap: 10px; color: var(--muted); }
.tm-footer__about .tm-mark { font-size: 18px; font-family: var(--mono); }
.tm-footer__about a { color: var(--muted); }

/* ---------- «Лаборатория» и старые блоки в статьях ---------- */
.mx-card { display: block; padding: 20px 24px; margin: 16px 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); color: var(--text); text-decoration: none; }
.mx-card-title { margin: 0 0 8px; font-size: 19px; }
.mx-bar { position: relative; height: 22px; margin: 12px 0; background: var(--line); border-radius: 3px; overflow: hidden; }
.mx-bar-fill { height: 100%; background: var(--accent); }
.mx-bar-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 12px; color: var(--text); mix-blend-mode: difference; }
.mx-needs, .mx-hint, .mx-lab-unlock { font-size: 15px; color: var(--muted); }
.mx-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border: 1px solid var(--accent); border-radius: 4px; color: var(--accent); font-weight: 600; text-decoration: none; }
