:root {
  --bg: #0a0c0e;
  --panel: #12161a;
  --panel-2: #181d21;
  --panel-3: #0d1114;
  --text: #ece8df;
  --muted: #a2aaad;
  --dim: #6f787d;
  --accent: #ffb02e;
  --accent-dim: #cf8620;
  --amber: #d9a25a;
  --steel: #9aa6ad;
  --line: #2a3136;
  --line-soft: #1d2327;
  --green: #7fbd91;
  --red: #e06050;
  --radius: 18px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --sans: 'Inter', 'Segoe UI', 'Helvetica Neue', Arial, system-ui, sans-serif;
  --mono:
    'JetBrains Mono', 'Cascadia Code', 'SFMono-Regular', Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(
      1100px 540px at 82% -8%,
      rgba(255, 176, 46, 0.08),
      transparent 62%
    ),
    radial-gradient(
      800px 460px at 4% 12%,
      rgba(154, 166, 173, 0.06),
      transparent 60%
    ),
    var(--bg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.26;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

::selection {
  background: rgba(255, 176, 46, 0.28);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.shell {
  width: min(1280px, calc(100% - 48px));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: #151006;
  font-weight: 700;
}

.skip-link:focus {
  top: 16px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(10, 12, 14, 0.82);
  backdrop-filter: blur(16px) saturate(120%);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text);
  text-transform: uppercase;
  white-space: nowrap;
}

.brand:hover {
  color: var(--text);
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex: none;
  color: var(--accent);
}

.brand-name {
  font-size: 17px;
  line-height: 1;
  letter-spacing: 0.01em;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
}

.header-nav a {
  padding: 8px 0;
  border-bottom: 1px solid transparent;
}

.header-nav a:hover,
.header-nav a[aria-current='page'] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 176, 46, 0.45);
  border-radius: 999px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.02em;
  transition: 160ms ease;
}

.header-cta:hover {
  background: var(--accent);
  color: #151006;
}

/* Shared */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: currentColor;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.1;
  text-wrap: balance;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(34px, 5vw, 68px);
  font-weight: 760;
  letter-spacing: -0.045em;
}

h2 {
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.03em;
}

h3 {
  font-size: 18px;
  letter-spacing: -0.01em;
}

.lede {
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.65;
}

.muted {
  color: var(--muted);
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.accent {
  color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 11px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  transition: 160ms ease;
}

.btn:hover {
  color: var(--text);
  border-color: #3a444a;
  transform: translateY(-1px);
}

.btn-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #151006;
}

.btn-primary:hover {
  background: #ffc35c;
  color: #151006;
}

.btn-ghost {
  background: transparent;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.chip strong {
  color: var(--text);
  font-weight: 750;
}

/* Home hero */
.hero {
  position: relative;
  padding: 78px 0 46px;
  overflow: hidden;
}

.hero::after {
  content: 'ГОСТ';
  position: absolute;
  right: -18px;
  top: 8px;
  z-index: -1;
  color: rgba(255, 255, 255, 0.022);
  font-family: var(--mono);
  font-size: clamp(130px, 21vw, 310px);
  font-weight: 800;
  letter-spacing: -0.08em;
  line-height: 1;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 54px;
  align-items: end;
}

.hero h1 span {
  color: var(--accent);
}

.hero-aside {
  padding: 24px 0 4px;
  border-top: 1px solid var(--line);
}

.hero-aside dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 26px;
  margin: 0;
}

.hero-aside dt {
  color: var(--dim);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-aside dd {
  margin: 4px 0 0;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.04em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

/* Search */
.search-panel {
  position: relative;
  margin: 30px 0 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 46%),
    var(--panel);
  box-shadow: var(--shadow);
}

.search-label {
  display: block;
  margin-bottom: 8px;
  color: var(--dim);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.search-row {
  display: flex;
  gap: 10px;
}

.search-input {
  width: 100%;
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid #30383d;
  border-radius: 12px;
  background: var(--panel-3);
  color: var(--text);
  font-size: 17px;
  outline: none;
  transition: 160ms ease;
}

.search-input::placeholder {
  color: #687176;
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 176, 46, 0.12);
}

.search-hint {
  margin: 10px 2px 0;
  color: var(--dim);
  font-size: 12px;
}

.search-results {
  display: none;
  margin-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.search-results.is-open {
  display: block;
}

.search-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
}

.search-result:last-child {
  border-bottom: 0;
}

.search-result:hover {
  background: rgba(255, 255, 255, 0.025);
}

.search-result b {
  font-weight: 650;
}

.search-result span {
  color: var(--muted);
  font-size: 12px;
}

.search-result em {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
}

/* Sections */
.section {
  padding: 58px 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 26px;
}

.section-head p {
  max-width: 560px;
  margin-bottom: 0;
  color: var(--muted);
}

/* Category cards */
.family-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.family-card {
  position: relative;
  display: flex;
  min-height: 212px;
  flex-direction: column;
  padding: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.04), transparent 55%),
    var(--panel);
  transition: 180ms ease;
}

.family-card:hover {
  border-color: rgba(255, 176, 46, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.family-card::after {
  content: attr(data-num);
  position: absolute;
  right: 18px;
  top: 14px;
  color: rgba(255, 255, 255, 0.045);
  font-family: var(--mono);
  font-size: 54px;
  font-weight: 700;
  letter-spacing: -0.08em;
}

.family-icon {
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  color: var(--steel);
}

.family-card:hover .family-icon {
  color: var(--accent);
}

.family-card h3 {
  margin-bottom: 7px;
}

.family-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.family-meta {
  display: flex;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
}

.family-meta span {
  color: var(--dim);
}

/* Catalog tree */
.catalog-tree {
  display: grid;
  gap: 14px;
}

.tree-group {
  position: relative;
  display: block;
  padding: 22px 24px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 55%),
    var(--panel);
  color: var(--text);
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.tree-group:hover {
  border-color: rgba(255, 176, 46, 0.3);
  background:
    linear-gradient(145deg, rgba(255, 176, 46, 0.045), transparent 55%),
    var(--panel);
}

.tree-group--link:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.26);
}

.tree-head {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
}

.tree-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 176, 46, 0.28);
  border-radius: 13px;
  background: rgba(255, 176, 46, 0.07);
  color: var(--accent);
}

.tree-icon .family-icon {
  width: 30px;
  height: 30px;
  margin: 0;
  color: inherit;
}

.tree-kicker {
  display: block;
  margin-bottom: 7px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tree-title h3 {
  margin: 0 0 6px;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.02em;
}

.tree-title p {
  max-width: 62ch;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.tree-sum {
  padding: 6px 10px;
  border: 1px solid rgba(255, 176, 46, 0.28);
  border-radius: 999px;
  background: rgba(255, 176, 46, 0.06);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  white-space: nowrap;
}

.tree-go {
  align-self: center;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.tree-children {
  display: grid;
  gap: 2px;
  margin: 16px 0 0 80px;
  padding-left: 18px;
  border-left: 1px solid rgba(255, 255, 255, 0.09);
}

.tree-child {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto 18px;
  gap: 12px;
  align-items: center;
  min-height: 52px;
  padding: 10px 8px 10px 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text);
  transition:
    color 160ms ease,
    background 160ms ease,
    padding 160ms ease;
}

.tree-child:last-child {
  border-bottom: 0;
}

.tree-child:hover {
  padding-left: 8px;
  border-radius: 8px;
  background: rgba(255, 176, 46, 0.045);
  color: var(--accent);
}

.tree-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--steel);
  box-shadow: 0 0 0 4px rgba(154, 166, 173, 0.07);
}

.tree-child:hover .tree-dot {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 176, 46, 0.12);
}

.tree-child__main b {
  display: block;
  font-size: 14px;
  font-weight: 650;
}

.tree-child__main small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.02em;
}

.tree-child__count {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
  white-space: nowrap;
}

.tree-child:hover .tree-child__count {
  color: var(--muted);
}

.tree-arrow {
  color: var(--accent);
  font-family: var(--mono);
}

/* Info panels */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.info-panel {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.info-panel h2,
.info-panel h3 {
  margin-bottom: 14px;
}

.info-panel p:last-child {
  margin-bottom: 0;
}

.term-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.term-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.term-card b {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 16px;
  letter-spacing: 0.01em;
}

.term-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.faq {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.faq-item {
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--panel-3);
}

.faq-item h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.faq-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.info-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.info-list li {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
}

.info-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.info-list b {
  color: var(--dim);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dn-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.dn-table th,
.dn-table td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  white-space: nowrap;
}

.dn-table th {
  color: var(--dim);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dn-table td {
  font-family: var(--mono);
}

.dn-table tr:last-child td {
  border-bottom: 0;
}

/* Breadcrumbs */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 22px 0 0;
  color: var(--dim);
  font-size: 12px;
}

.crumbs a {
  color: var(--muted);
}

.crumbs span {
  color: var(--dim);
}

/* Profile */
.profile-hero {
  padding: 30px 0 42px;
}

.profile-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 24px;
}

.profile-title-row h1 {
  margin-bottom: 8px;
  font-size: clamp(28px, 3.4vw, 48px);
}

.profile-sub {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: 18px;
  align-items: stretch;
}

.drawing-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-3);
  box-shadow: var(--shadow);
}

.drawing-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.drawing-bar .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(255, 176, 46, 0.7);
}

.drawing-bar strong {
  color: var(--text);
  font-weight: 650;
}

.drawing-bar span:last-child {
  margin-left: auto;
}

.drawing-body {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    var(--panel-3);
  background-size: 24px 24px;
}

.drawing-body svg {
  width: 100%;
  height: auto;
}

.drawing-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 16px;
  border-top: 1px solid var(--line-soft);
}

.download-btn {
  display: inline-flex;
  background: transparent;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: 150ms ease;
}

.download-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.spec-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.spec-card h2 {
  margin-bottom: 18px;
  font-size: 18px;
  letter-spacing: 0;
}

.big-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.big-metric {
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--panel-3);
}

.big-metric span {
  display: block;
  color: var(--dim);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.big-metric b {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.04em;
}

.big-metric small {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
}

.spec-subtitle {
  margin: 22px 0 4px;
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.spec-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0 20px;
}

.spec-columns .spec-subtitle {
  margin-top: 0;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.spec-table th,
.spec-table td {
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}

.spec-table th {
  color: var(--muted);
  font-weight: 500;
}

.spec-table td {
  color: var(--text);
  font-family: var(--mono);
  text-align: right;
  white-space: nowrap;
}

.spec-table tr:last-child th,
.spec-table tr:last-child td {
  border-bottom: 0;
}

.spec-table .unit {
  color: var(--dim);
  font-size: 11px;
}

.profile-copy {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}

.prose {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.prose h2 {
  margin-bottom: 14px;
  font-size: 22px;
}

.prose h2:not(:first-child) {
  margin-top: 30px;
}

.prose p {
  color: #c6c8c6;
  font-size: 15px;
  line-height: 1.72;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose ul {
  margin: 0;
  padding-left: 18px;
  color: #c6c8c6;
}

.prose li {
  margin-bottom: 8px;
}

.aside-stack {
  display: grid;
  gap: 16px;
}

.note {
  padding: 20px;
  border: 1px solid rgba(255, 176, 46, 0.28);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 176, 46, 0.08), transparent 60%),
    var(--panel);
}

.note h3 {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 14px;
  letter-spacing: 0.02em;
}

.note p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.note a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.related {
  margin-top: 16px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.related-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  transition: 150ms ease;
}

.related-card:hover {
  border-color: rgba(255, 176, 46, 0.4);
  background: var(--panel-2);
}

.related-card b {
  font-family: var(--mono);
  font-size: 14px;
}

.related-card span {
  color: var(--dim);
  font-size: 11px;
}

.related-card em {
  margin-top: 4px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  font-style: normal;
}

/* Category page */
.category-hero {
  padding: 48px 0 30px;
}

.category-hero h1 {
  font-size: clamp(30px, 4vw, 54px);
}

.category-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}

.filter-bar .chip {
  cursor: pointer;
  background: transparent;
}

.filter-bar .chip.is-active {
  border-color: var(--accent);
  background: rgba(255, 176, 46, 0.1);
  color: var(--accent);
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.catalog-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 13px;
}

.catalog-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #151a1e;
  color: var(--dim);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.catalog-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft);
  white-space: nowrap;
}

.catalog-table tr:last-child td {
  border-bottom: 0;
}

.catalog-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.022);
}

.catalog-table .num {
  font-family: var(--mono);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.catalog-table a {
  font-weight: 600;
}

.catalog-table a:hover {
  color: var(--accent);
}

.catalog-table .gost {
  color: var(--dim);
  font-size: 11px;
}

.catalog-table .row-hidden {
  display: none;
}

/* Footer */
.site-footer {
  margin-top: 64px;
  padding: 34px 0 44px;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  color: var(--dim);
  font-size: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a {
  color: var(--muted);
}

.footer-note {
  max-width: 620px;
  margin-top: 18px;
  color: #5d666b;
  font-size: 11px;
  line-height: 1.6;
}

/* Utility */
.empty {
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 980px) {
  .hero-grid,
  .profile-layout,
  .profile-copy {
    grid-template-columns: 1fr;
  }

  .family-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .term-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 28px, 1280px);
  }

  .spec-columns {
    grid-template-columns: 1fr;
  }

  .spec-columns .spec-col + .spec-col .spec-subtitle {
    margin-top: 20px;
  }

  .header-inner {
    min-height: 58px;
    gap: 12px;
  }

  .header-nav {
    display: none;
  }

  .brand small {
    display: block;
    font-size: 8px;
    letter-spacing: 0.12em;
  }

  .hero {
    padding: 48px 0 28px;
  }

  .hero-aside dl {
    grid-template-columns: 1fr 1fr;
  }

  .family-grid,
  .split,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 38px 0;
  }

  .section-head,
  .profile-title-row {
    display: block;
  }

  .profile-title-row .hero-actions {
    margin-top: 18px;
  }

  .drawing-body {
    padding: 0;
  }

  .search-row .btn {
    display: none;
  }

  .search-result {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 14px;
    align-items: start;
    padding: 10px 4px;
  }

  .search-result b {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .search-result span {
    grid-column: 1;
    grid-row: 2;
    font-size: 11.5px;
    line-height: 1.3;
  }

  .search-result em {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    font-size: 11.5px;
  }

  .info-list li {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .catalog-table {
    min-width: 640px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
/* A4 print: паспорт сечения */
.passport-stamp {
  display: none;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 11mm 11mm 13mm;
  }

  html,
  body {
    background: #fff !important;
    color: #111 !important;
  }

  body {
    font-size: 10pt;
  }

  body::before,
  .site-header,
  .site-footer,
  .crumbs,
  .related,
  .hero-actions,
  .drawing-foot,
  .search-panel,
  .skip-link {
    display: none !important;
  }

  .shell {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
  }

  main {
    display: block !important;
  }

  .profile-hero {
    padding: 0 !important;
  }

  .profile-title-row {
    display: block !important;
    margin-bottom: 5mm !important;
  }

  .profile-title-row h1 {
    color: #111 !important;
    font-size: 22pt !important;
    line-height: 1.05 !important;
  }

  .eyebrow,
  .profile-sub {
    color: #7a5a18 !important;
  }

  .profile-sub {
    font-size: 10pt !important;
  }

  .profile-layout {
    display: grid !important;
    grid-template-columns: 1.12fr 0.88fr !important;
    gap: 5mm !important;
    align-items: start !important;
    break-inside: avoid;
  }

  .drawing-card,
  .spec-card,
  .prose,
  .note,
  .info-panel,
  .table-wrap {
    border: 1px solid #b8b8b8 !important;
    background: #fff !important;
    color: #111 !important;
    box-shadow: none !important;
  }

  .drawing-card,
  .spec-card {
    break-inside: avoid;
  }

  .drawing-bar {
    min-height: 0 !important;
    padding: 2.5mm 3mm !important;
    border-color: #ccc !important;
    background: #f5f5f5 !important;
    color: #444 !important;
  }

  .drawing-bar strong {
    color: #111 !important;
  }

  .drawing-body {
    padding: 1mm !important;
    background: #fff !important;
  }

  .drawing-body svg {
    width: 100% !important;
    height: auto !important;
    max-height: 118mm;
  }

  .drawing-body svg .sec-outline {
    stroke: #111 !important;
    fill: none !important;
  }

  .drawing-body svg .sec-inner-line {
    stroke: #333 !important;
    fill: none !important;
  }

  .drawing-body svg .sec-hatch {
    opacity: 1 !important;
  }

  .drawing-body svg .hatch-bg {
    fill: #fff !important;
    opacity: 0 !important;
  }

  .drawing-body svg .hatch-line {
    stroke: #555 !important;
    opacity: 1 !important;
  }

  .drawing-body svg .dim,
  .drawing-body svg .dim line,
  .drawing-body svg .dim-leader {
    stroke: #111 !important;
  }

  .drawing-body svg .dim-ext {
    stroke: #666 !important;
  }

  .drawing-body svg .dim-dot,
  .drawing-body svg .dim-arrow {
    fill: #111 !important;
  }

  .drawing-body svg .dim-bg {
    fill: #fff !important;
    opacity: 1 !important;
  }

  .drawing-body svg .dim-text,
  .drawing-body svg .title-text {
    fill: #111 !important;
  }

  .drawing-body svg .center {
    stroke: #777 !important;
  }

  .drawing-body svg .axis {
    stroke: #555 !important;
  }

  .drawing-body svg .axis-arrow,
  .drawing-body svg .axis-dot {
    fill: #555 !important;
  }

  .drawing-body svg .axis-bg {
    fill: #fff !important;
    opacity: 1 !important;
  }

  .drawing-body svg .axis-text,
  .drawing-body svg .note-text {
    fill: #333 !important;
  }

  .spec-card {
    padding: 4mm !important;
  }

  .spec-columns {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }

  .term-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 3mm !important;
  }

  .term-card,
  .faq-item {
    border-color: #ccc !important;
    background: #fff !important;
  }

  .term-card p,
  .faq-item p {
    color: #222 !important;
  }

  .spec-columns .spec-col + .spec-col .spec-subtitle {
    margin-top: 3mm;
  }

  .spec-subtitle {
    color: #7a5a18 !important;
  }

  .spec-card h2 {
    font-size: 12pt !important;
    margin-bottom: 3mm !important;
  }

  .big-metrics {
    gap: 2mm !important;
    margin-bottom: 3mm !important;
  }

  .big-metric {
    border-color: #ccc !important;
    background: #f7f7f7 !important;
    padding: 2.5mm !important;
  }

  .big-metric span,
  .big-metric small {
    color: #555 !important;
  }

  .big-metric b {
    color: #111 !important;
    font-size: 13pt !important;
  }

  .spec-table {
    font-size: 8.6pt !important;
  }

  .spec-table th,
  .spec-table td {
    border-color: #ddd !important;
    padding: 1.4mm 0 !important;
  }

  .spec-table td {
    color: #111 !important;
  }

  .spec-table .unit {
    color: #666 !important;
  }

  .profile-copy {
    display: block !important;
    margin-top: 5mm !important;
    break-before: page;
  }

  .prose {
    padding: 4mm !important;
  }

  .prose h2 {
    font-size: 13pt !important;
    margin-bottom: 2mm !important;
  }

  .prose p,
  .prose li {
    color: #222 !important;
    font-size: 9.5pt !important;
    line-height: 1.45 !important;
  }

  .aside-stack {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 3mm !important;
    margin-top: 4mm !important;
  }

  .note {
    padding: 3mm !important;
    break-inside: avoid;
  }

  .note h3 {
    color: #7a5a18 !important;
    font-size: 9.5pt !important;
  }

  .note p {
    color: #333 !important;
    font-size: 8.8pt !important;
  }

  .note a {
    color: #111 !important;
  }

  .passport-stamp {
    display: flex !important;
    justify-content: space-between;
    gap: 4mm;
    margin-top: 3mm;
    padding-top: 2mm;
    border-top: 1px solid #bbb;
    color: #555;
    font-family: var(--mono);
    font-size: 7.5pt;
  }
}

.calc-box {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(255, 176, 46, 0.25);
  border-radius: 12px;
  background: linear-gradient(
    145deg,
    rgba(255, 176, 46, 0.07),
    transparent 65%
  );
}
.calc-box h3 {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.02em;
}
.calc-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.calc-row label {
  display: grid;
  gap: 4px;
  color: var(--dim);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.calc-row input {
  width: 100%;
  min-height: 36px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-3);
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
}
.calc-result {
  display: block;
  margin-top: 9px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
}
.compare {
  margin-top: 16px;
}
@media print {
  .calc-box {
    display: none !important;
  }
}

@media (max-width: 760px) {
  .tree-group {
    padding: 18px;
  }

  .tree-head {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
  }

  .tree-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
  }

  .tree-icon .family-icon {
    width: 26px;
    height: 26px;
  }

  .tree-sum,
  .tree-go {
    grid-column: 2;
    justify-self: start;
    margin-top: 6px;
  }

  .tree-children {
    margin-left: 50px;
    padding-left: 14px;
  }

  .tree-child {
    grid-template-columns: 8px minmax(0, 1fr) 16px;
    gap: 10px;
  }

  .tree-child__count {
    display: none;
  }

  .tree-arrow {
    grid-column: 3;
    grid-row: 1;
  }
}

@media (max-width: 560px) {
  .header-nav {
    display: flex;
    gap: 14px;
    font-size: 12px;
  }

  .header-inner {
    gap: 12px;
  }

  .term-grid {
    grid-template-columns: 1fr;
  }
}
