/* Цвета из логотипа: синий круг с белыми лучами-искрами */
:root {
  --bg: #f3f4f2;
  --paper: #ffffff;
  --ink: #1c2126;
  --muted: #5b6570;
  --line: #c9ced3;
  --frame: #5b6570;
  --accent: #2f80af;
  --accent-strong: #26709b;
  --on-accent: #ffffff;
  --brand: #113557;
  --brand-ink: #ffffff;
  --grid: rgba(47, 128, 175, 0.06);
  --grid-major: rgba(47, 128, 175, 0.12);
  --soft: rgba(47, 128, 175, 0.08);
  --ph-bg: #ffe36e;
  --ph-ink: #2b2300;
  --ok: #1f8a4c;
  --error: #c0392b;

  --font-head: "Tektur", "Segoe UI", system-ui, sans-serif;
  --font-text: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --container: 1200px;
  --header-h: 64px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #10161c;
  --paper: #16202a;
  --ink: #e3e9ee;
  --muted: #98a4b0;
  --line: #2c3b49;
  --frame: #6d7c8a;
  --accent: #4fa3d6;
  --accent-strong: #4fa3d6;
  --on-accent: #0b1a26;
  --brand: #0c2238;
  --grid: rgba(79, 163, 214, 0.05);
  --grid-major: rgba(79, 163, 214, 0.1);
  --soft: rgba(79, 163, 214, 0.1);
  --ph-bg: #f2d04b;
  --ph-ink: #241d00;
  --ok: #4cc27f;
  --error: #ff7b6b;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #10161c;
    --paper: #16202a;
    --ink: #e3e9ee;
    --muted: #98a4b0;
    --line: #2c3b49;
    --frame: #6d7c8a;
    --accent: #4fa3d6;
    --accent-strong: #4fa3d6;
    --on-accent: #0b1a26;
    --brand: #0c2238;
    --grid: rgba(79, 163, 214, 0.05);
    --grid-major: rgba(79, 163, 214, 0.1);
    --soft: rgba(79, 163, 214, 0.1);
    --ph-bg: #f2d04b;
    --ph-ink: #241d00;
    --ok: #4cc27f;
    --error: #ff7b6b;
    color-scheme: dark;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

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

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-strong);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

h1,
h2,
h3 {
  margin: 0 0 0.6em;
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  overflow-wrap: break-word;
}

h1 {
  font-size: clamp(1.7rem, 3.2vw + 0.6rem, 3rem);
}

h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
}

h3 {
  font-size: 1.15rem;
  font-weight: 500;
}

p {
  margin: 0 0 1em;
}

mark {
  background: none;
  color: var(--accent);
}

sup {
  line-height: 0;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.875rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--accent);
  color: var(--on-accent);
}

.skip-link:focus {
  top: 12px;
}

/* Плейсхолдеры: подсвечены жёлтым до заполнения */
.ph {
  display: inline-block;
  min-width: 2.2em;
  padding: 0 0.35em;
  background: var(--ph-bg);
  color: var(--ph-ink);
  text-align: center;
  cursor: help;
}

/* Кнопки */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 20px;
  border: 2px solid transparent;
  font: 600 1rem/1.2 var(--font-text);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.btn-sm {
  min-height: 38px;
  padding: 6px 14px;
  font-size: 0.9rem;
}

.btn-accent {
  background: var(--accent-strong);
  color: var(--on-accent);
}

.btn-accent:hover {
  background: var(--brand);
  color: #fff;
}

.btn-outline {
  border-color: var(--accent-strong);
  background: transparent;
  color: var(--accent-strong);
}

.btn-outline:hover {
  background: var(--soft);
  color: var(--accent-strong);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 1em;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

/* Шапка */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--brand);
  color: var(--brand-ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.brand:hover {
  color: inherit;
}

.site-nav {
  display: flex;
  flex: 1 1 auto;
  justify-content: center;
  gap: 18px;
}

.site-nav a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover {
  color: #fff;
  text-decoration: underline;
}

.header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.header-actions .btn-accent:hover {
  background: #fff;
  color: var(--brand);
}

.nav-toggle {
  display: none;
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s;
}

.nav-toggle-bar {
  position: relative;
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bar::before {
  top: -7px;
}

.nav-toggle-bar::after {
  top: 7px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after {
  transform: translateY(-7px) rotate(-45deg);
}

/* Листы чертежа */

.sheet {
  padding: 24px 0 0;
}

.sheet:last-of-type {
  padding-bottom: 24px;
}

.sheet-frame {
  position: relative;
  padding: 48px 48px 88px;
  border: 2px solid var(--frame);
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  box-shadow: inset 0 0 0 6px var(--paper), inset 0 0 0 7px var(--line);
}

.kicker {
  margin-bottom: 0.6em;
  color: var(--muted);
  font: 500 0.8rem/1.4 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lead {
  max-width: 46em;
  font-size: 1.1rem;
}

.stamp {
  position: absolute;
  right: 0;
  bottom: 0;
  border-collapse: collapse;
  background: var(--paper);
  font: 0.72rem/1.3 var(--font-mono);
  text-align: center;
}

.stamp th,
.stamp td {
  min-width: 52px;
  padding: 3px 8px;
  border: 1px solid var(--frame);
}

.stamp th {
  color: var(--muted);
  font-weight: 400;
}

.stamp td {
  font-weight: 500;
}

/* Лист 1 */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 24px 48px;
  align-items: center;
}

.hero-drawing {
  margin: 0;
  color: var(--ink);
}

.chain {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font: 500 0.85rem/1.4 var(--font-mono);
}

.chain li {
  padding: 4px 10px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.chain li + li {
  margin-left: 22px;
  position: relative;
}

.chain li + li::before {
  content: "›";
  position: absolute;
  left: -16px;
  top: 3px;
  color: var(--accent);
  font-weight: 700;
}

.stats {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 8px 0 0;
}

.stats div {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.stats dt {
  color: var(--muted);
  font-size: 0.875rem;
}

.stats dd {
  margin: 0 0 4px;
  font: 700 2rem/1.15 var(--font-head);
  font-variant-numeric: tabular-nums;
}

.stats .dd-text {
  font-size: 1.35rem;
}

/* Чертежи SVG */

.d-main {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
}

.d-thin {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 1.4;
}

.d-thin line {
  fill: none;
}

.d-axis {
  stroke: var(--accent);
  stroke-width: 1;
  stroke-dasharray: 18 4 3 4;
}

.d-weld,
.d-fill {
  fill: var(--accent);
  stroke: none;
}

.d-dim {
  stroke: var(--muted);
  stroke-width: 1;
}

.d-label {
  fill: var(--ink);
  font: 12px var(--font-mono);
}

.d-caption {
  fill: var(--ink);
  font: 500 15px var(--font-head);
}

.d-muted {
  fill: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 48px;
  align-items: start;
}

/* Лист 3 */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 16px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.card h3 {
  margin-bottom: 0.4em;
}

.card p {
  margin-bottom: 12px;
}

.card .norms {
  margin: auto 0 0;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font: 0.8rem/1.5 var(--font-mono);
}

.card-num {
  margin-bottom: 8px;
  color: var(--accent);
  font: 500 0.85rem var(--font-mono);
}

.card-main {
  border: 2px solid var(--accent);
}

.badge {
  align-self: flex-start;
  margin-bottom: 10px;
  padding: 2px 10px;
  background: var(--accent-strong);
  color: var(--on-accent);
  font-size: 0.8rem;
  font-weight: 600;
}

.also {
  max-width: 52em;
}

.tags-title {
  margin-top: 8px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 4px 12px;
  border: 1px solid var(--accent);
  background: var(--paper);
  color: var(--accent-strong);
  font-size: 0.9rem;
}

/* Лист 4 */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  background: var(--paper);
  counter-increment: step;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font: 500 0.8rem var(--font-mono);
}

.step-time {
  display: inline-block;
  margin-bottom: 6px;
  padding: 1px 8px;
  background: var(--soft);
  color: var(--accent-strong);
  font: 500 0.8rem var(--font-mono);
}

.steps h3 {
  margin-bottom: 0.3em;
}

.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Таблицы */

.table-wrap {
  overflow-x: auto;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.925rem;
}

.data th,
.data td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.data thead th {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.data tbody tr:last-child th,
.data tbody tr:last-child td {
  border-bottom: 0;
}

.requisites th {
  width: 38%;
  color: var(--muted);
  font-weight: 400;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.links a {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  text-decoration: none;
}

.links a:hover {
  border-color: var(--accent);
}

/* Лист 6: калькулятор и форма */

.calc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 16px 32px;
  align-items: start;
}

.calc > * {
  grid-column: 1;
}

/* 7 строк: 6 блоков формы и кнопка отправки */
.calc > .estimate {
  grid-column: 2;
  grid-row: 1 / span 7;
  position: sticky;
  top: calc(var(--header-h) + 16px);
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 16px 20px 8px;
  border: 1px solid var(--line);
  background: var(--paper);
}

legend {
  padding: 0 8px;
  font: 500 1rem var(--font-head);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.field > span {
  color: var(--muted);
}

.hint {
  margin: -4px 0 12px;
  color: var(--muted);
  font-size: 0.8rem;
}

.field b,
.consent b {
  color: var(--error);
  font-weight: 600;
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="number"],
input[type="search"],
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem var(--font-text);
}

input[type="number"] {
  font-family: var(--font-mono);
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 0.8;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
}

textarea {
  resize: vertical;
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 0 16px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice,
.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  color: var(--ink);
}

.checks {
  margin-bottom: 12px;
}

.choice label,
.checks label,
.consent {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  cursor: pointer;
}

.checks label {
  min-width: 170px;
}

input[type="checkbox"],
input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

.consent {
  align-items: flex-start;
  min-height: 0;
  margin: 4px 0 12px;
  font-size: 0.9rem;
}

.consent input {
  margin-top: 3px;
}

.hp {
  position: absolute;
  left: -9999px;
}

.dropzone {
  position: relative;
  display: block;
  margin-bottom: 8px;
  padding: 24px 16px;
  border: 2px dashed var(--line);
  background: var(--paper);
  text-align: center;
  cursor: pointer;
}

.dropzone:hover,
.dropzone.is-over,
.dropzone:focus-within {
  border-color: var(--accent);
  background: var(--soft);
}

.dropzone input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.dropzone-text {
  color: var(--muted);
  font-size: 0.9rem;
}

.dropzone-text strong {
  color: var(--ink);
}

.file-list {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
}

.file-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  border-bottom: 1px dashed var(--line);
}

.file-list .file-error {
  color: var(--error);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin: 0;
}

.form-status {
  font-weight: 600;
}

.form-status.is-ok {
  color: var(--ok);
}

.form-status.is-error {
  color: var(--error);
}

.estimate-inner {
  padding: 20px;
  border: 2px solid var(--ink);
  background: var(--paper);
}

.estimate h3 {
  margin-bottom: 12px;
}

.est-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.est-table th,
.est-table td {
  padding: 5px 0;
  border-bottom: 1px dashed var(--line);
  text-align: left;
  vertical-align: top;
}

.est-table td {
  padding-left: 8px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.est-table th {
  font-weight: 400;
}

.est-table th small {
  display: block;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.est-table .est-sub th,
.est-table .est-sub td {
  color: var(--muted);
}

.est-table .est-sum th,
.est-table .est-sum td {
  padding-top: 8px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}

.est-table .est-total th,
.est-table .est-total td {
  padding-top: 10px;
  border-bottom: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.est-table .est-total td {
  color: var(--accent);
}

.est-empty {
  color: var(--muted);
  font-size: 0.9rem;
}

.estimate-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

/* Объекты: одинаковые карточки по три в ряд, обложка 4:3; все фото и видео — в просмотрщике */

.projects {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
}

.project {
  display: flex;
  flex-direction: column;
  padding: 0 20px 20px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.project h3 {
  margin-bottom: 0.4em;
}

.project > p {
  margin-bottom: 12px;
  font-size: 0.95rem;
}

/* Карточка без фото — во всю ширину ряда */
.project-wide {
  grid-column: 1 / -1;
  padding-top: 20px;
}

.project-wide .project-stats {
  max-width: 640px;
}

.project-cover {
  position: relative;
  display: block;
  margin: 0 -20px 16px;
  overflow: hidden;
  background: #000;
}

.project-cover img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.3s, opacity 0.3s;
}

.project-cover:hover img,
.project-cover:focus-visible img {
  transform: scale(1.03);
  opacity: 0.9;
}

/* Значок воспроизведения на обложке с видео */
.project-cover-video::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-radius: 50%;
  background: rgba(17, 53, 87, 0.75) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6.5v11l9-5.5z' fill='%23fff'/%3E%3C/svg%3E") center / 28px no-repeat;
}

.project-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 3px 10px;
  background: rgba(17, 53, 87, 0.85);
  color: #fff;
  font: 500 0.8rem/1.4 var(--font-mono);
}

/* Просмотрщик фото и видео */
.lightbox {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 56px 72px 24px;
  border: 0;
  background: rgba(8, 14, 20, 0.94);
  color: #fff;
}

.lightbox[open] {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox::backdrop {
  background: transparent;
}

.lightbox-title {
  margin: 0 0 12px;
  font: 500 1rem var(--font-head);
  text-align: center;
}

.lightbox-stage {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
}

.lightbox-stage img,
.lightbox-stage video {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #000;
}

.lightbox-caption {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  text-align: center;
}

.lightbox-count {
  margin-left: 8px;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-mono);
}

.lightbox-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font: 400 2rem/1 var(--font-text);
  cursor: pointer;
}

.lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.24);
}

.lightbox-close {
  top: 8px;
  right: 12px;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  margin-top: -24px;
}

.lightbox-prev {
  left: 12px;
}

.lightbox-next {
  right: 12px;
}

.lightbox-btn[hidden] {
  display: none;
}

.project-place {
  margin-bottom: 4px;
  color: var(--muted);
  font: 500 0.8rem var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.project-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}

.project-stats div {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  padding-top: 10px;
  border-top: 2px solid var(--accent);
}

.project-stats dt {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.project-stats dd {
  margin: 0;
  font: 700 1.3rem/1.2 var(--font-head);
}

.quality {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.quality li {
  padding: 14px 16px;
  border-left: 3px solid var(--accent);
  background: var(--paper);
}

/* Лист 8 */

.norms-search {
  max-width: 440px;
}

.norm-group h3 {
  margin-top: 8px;
}

.norms-table {
  table-layout: fixed;
}

.norms-table th:first-child {
  width: 27%;
}

.norms-table th:last-child {
  width: 22%;
}

.norms-table td:last-child {
  color: var(--muted);
}

.nowrap {
  white-space: nowrap;
}

/* Подвал */

.site-footer {
  padding: 40px 0 24px;
  background: var(--brand);
  color: rgba(255, 255, 255, 0.8);
}

.site-footer a {
  color: #fff;
}

.site-footer a:hover {
  color: #9fd2f2;
}

.site-footer .brand {
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 40px;
}

.footer-slogan {
  margin: 12px 0 4px;
}

.footer-title {
  margin-bottom: 12px;
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
}

.footer-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.925rem;
}

.footer-list li {
  margin-bottom: 6px;
}

.footer-note {
  margin: 24px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
}

/* Политика и 404 */

.doc {
  max-width: 820px;
}

.doc h2 {
  margin-top: 1.4em;
  font-size: 1.3rem;
}

.doc ul {
  padding-left: 1.2em;
}

/* Статьи */

.breadcrumbs {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.875rem;
}

.blog-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.blog-card a {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
}

.blog-card a:hover {
  border-color: var(--accent);
}

.blog-card h2 {
  margin-bottom: 0.4em;
  font-size: 1.15rem;
  font-weight: 500;
}

.blog-card p {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.925rem;
}

.blog-date {
  margin-bottom: 8px;
  color: var(--muted);
  font: 500 0.8rem var(--font-mono);
}

.blog-more {
  margin-top: auto;
  color: var(--accent);
  font-weight: 600;
}

/* Рамка статьи — на всю ширину листа, текст — удобной для чтения ширины */
.sheet-frame.article {
  max-width: none;
}

.article > * {
  max-width: 820px;
}

.article h1 {
  font-size: clamp(1.6rem, 2.4vw + 0.8rem, 2.4rem);
}

.article-figure {
  margin: 0 0 24px;
}

.article-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
}

.article-body {
  font-size: 1.05rem;
}

.article-body li {
  margin-bottom: 6px;
}

.article-body ol {
  padding-left: 1.4em;
}

.article-cta {
  margin: 32px 0 0;
  padding: 20px;
  border-left: 3px solid var(--accent);
  background: var(--soft);
}

.article-cta .actions {
  margin: 0;
}

.article-more {
  margin-top: 32px;
}

.article-more ul {
  padding-left: 1.2em;
}

.not-found {
  text-align: center;
}

/* Уведомление о cookie */
.cookie-notice {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px 20px;
  max-width: 760px;
  margin: 0 auto;
  padding: 14px 18px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  font-size: 0.9rem;
}

.cookie-notice p {
  margin: 0;
}

.cookie-notice .btn {
  flex: 0 0 auto;
}

@media (max-width: 640px) {
  .cookie-notice {
    left: 8px;
    right: 8px;
    bottom: 8px;
    flex-direction: column;
    align-items: stretch;
  }
}

.not-found-code {
  margin: 0;
  color: var(--accent);
  font: 700 5rem/1 var(--font-head);
}

/* Адаптив */

@media (max-width: 1180px) {
  .header-inner {
    flex-wrap: wrap;
  }

  .site-nav {
    order: 3;
    flex-basis: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 4px 16px;
    padding-bottom: 12px;
  }

  .js .nav-toggle {
    display: inline-grid;
  }

  .js .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px 16px 16px;
    background: var(--brand);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .js .site-nav.is-open {
    display: flex;
  }

  .js .site-nav a {
    padding: 11px 0;
    font-size: 1rem;
  }
}

@media (max-width: 960px) {
  .sheet-frame {
    padding: 36px 28px 88px;
  }

  .hero,
  .split {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-drawing {
    max-width: 520px;
  }

  .stats,
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calc {
    grid-template-columns: minmax(0, 1fr);
  }

  .calc > .estimate {
    grid-column: 1;
    grid-row: auto;
    position: static;
  }

  .projects {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quality,
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .sheet {
    padding-top: 12px;
  }

  .container {
    padding: 0 8px;
  }

  .site-header .container,
  .site-footer .container {
    padding: 0 16px;
  }

  .sheet-frame {
    padding: 28px 16px 80px;
    box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 5px var(--line);
  }

  .header-actions .btn-sm {
    display: none;
  }

  .lead {
    font-size: 1rem;
  }

  .stats dd {
    font-size: 1.6rem;
  }

  .stats .dd-text {
    font-size: 1.1rem;
  }

  .project-stats {
    grid-template-columns: minmax(0, 1fr);
  }

  .grid-2,
  .grid-3,
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .projects,
  .blog-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .lightbox {
    padding: 56px 8px 72px;
  }

  .lightbox-prev,
  .lightbox-next {
    top: auto;
    bottom: 12px;
    margin-top: 0;
  }

  fieldset {
    padding: 12px 14px 4px;
  }

  .checks label {
    min-width: 0;
    width: calc(50% - 8px);
  }

  .actions .btn {
    width: 100%;
  }

  /* Реквизиты и нормативы на телефоне — строка под строкой */
  .requisites tr,
  .requisites th,
  .requisites td {
    display: block;
    width: auto;
  }

  .requisites th {
    padding-bottom: 0;
    border-bottom: 0;
    font-size: 0.8rem;
  }

  .norms-table thead {
    display: none;
  }

  .norms-table,
  .norms-table tbody,
  .norms-table tr,
  .norms-table td {
    display: block;
    width: auto;
  }

  .norms-table tr {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
  }

  .norms-table tbody tr:last-child {
    border-bottom: 0;
  }

  .norms-table td,
  .data.norms-table td {
    padding: 0;
    border: 0;
  }

  .norms-table td:first-child {
    font-weight: 500;
  }

  .norms-table td:last-child {
    margin-top: 2px;
    font-size: 0.85rem;
  }

  .stamp th,
  .stamp td {
    min-width: 0;
    padding: 2px 6px;
  }
}
