/* Страница /raschety/tverdost/: калькулятор перевода твёрдости и текст.
   Отдельный файл по тем же основаниям, что raschety-podogrev.css: общий
   styles.css грузят все страницы сайта, а эта вёрстка нужна одной.
   Токены — только переменные :root из styles.css. Префикс классов — rt-. */

.rt-hero {
  padding: 20px clamp(18px, 4vw, 54px) 6px;
}

/* Кегль H1 — как у остальных калькуляторов раздела (решение владельца
   2026-09-22 для наплавки и подогрева). */
.rt-hero h1 {
  margin: 4px 0 8px;
  font-size: clamp(28px, 2.6vw + 10px, 40px);
  line-height: 1.15;
  color: var(--blue-dark);
}

.rt-lead {
  margin: 0;
  max-width: 820px;
  color: var(--muted);
}

.rt-calc-host {
  padding: 10px clamp(18px, 4vw, 54px) 0;
}

.rt-nojs {
  margin: 0;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
  color: var(--muted);
}

.rt-calc {
  max-width: 980px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
}

.rt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px 16px;
}

.rt-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.rt-field[hidden],
.rt-hint[hidden],
.rt-awg[hidden],
.rt-actions [hidden] {
  display: none !important;
}

.rt-field label {
  font-size: 13px;
  color: var(--muted);
}

.rt-field input,
.rt-field select {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}

.rt-field input:focus,
.rt-field select:focus {
  outline: 2px solid var(--blue);
  outline-offset: -1px;
}

.rt-field.is-invalid input {
  border-color: var(--amber-dark);
  background: var(--amber-soft);
}

.rt-hint {
  margin: 10px 0 0;
  max-width: 760px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.rt-result,
.rt-how,
.rt-awg {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.rt-result h3,
.rt-awg h3 {
  margin: 0 0 10px;
  font-size: 16px;
  color: var(--ink);
}

.rt-list {
  display: grid;
  grid-template-columns: minmax(180px, max-content) 1fr;
  align-items: baseline;
  gap: 6px 18px;
  margin: 0;
}

.rt-list dt {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.rt-list dd {
  margin: 0;
  color: var(--ink);
  line-height: 1.5;
}

.rt-list dd strong {
  font-size: 18px;
  color: var(--blue-dark);
  white-space: nowrap;
}

.rt-list dd.rt-note-value {
  color: var(--muted);
  font-size: 14px;
}

.rt-sub {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

.rt-grades {
  margin: 0;
  padding-left: 20px;
  line-height: 1.6;
}

.rt-note,
.rt-empty {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.rt-empty {
  margin: 14px 0 0;
}

.rt-error {
  margin: 14px 0 0;
  padding: 12px 16px;
  border: 1px solid var(--amber);
  border-radius: 8px;
  background: var(--amber-soft);
  color: var(--amber-dark);
  font-size: 15px;
  line-height: 1.5;
}

.rt-warn {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.rt-warn a,
.rt-awg a {
  color: var(--blue-dark);
}

.rt-how summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
}

.rt-how-list {
  margin: 10px 0 0;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.55;
}

.rt-how-list li + li {
  margin-top: 6px;
}

.rt-tech-note {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
}

.rt-awg-list {
  margin: 0;
  padding-left: 20px;
  line-height: 1.7;
}

.rt-awg-list a {
  font-weight: 700;
}

.rt-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.rt-action {
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--blue-dark);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.rt-action-link {
  display: inline-block;
  text-decoration: none;
}

.rt-action-status {
  font-size: 13px;
  color: var(--muted);
}

.rt-print-only {
  display: none;
}

/* --- текст --- */

.rt-text {
  max-width: 860px;
  padding: 24px clamp(18px, 4vw, 54px) 56px;
}

.rt-text h2 {
  margin: 32px 0 12px;
  color: var(--blue-dark);
}

.rt-text h3 {
  margin: 22px 0 8px;
  font-size: 17px;
  color: var(--ink);
}

.rt-text p,
.rt-text li {
  line-height: 1.65;
}

.rt-table-wrap {
  overflow-x: auto;
}

.rt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.rt-table caption {
  caption-side: bottom;
  padding-top: 8px;
  font-size: 13px;
  color: var(--muted);
  text-align: left;
}

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

.rt-table thead th {
  background: var(--soft);
  color: var(--blue-dark);
}

.rt-table td.rt-cell-note {
  font-size: 13px;
  color: var(--muted);
}

.rt-faq-item h3 {
  margin: 20px 0 6px;
}

@media (max-width: 720px) {
  .rt-calc {
    padding: 14px;
  }

  .rt-list {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .rt-list dd {
    margin-bottom: 8px;
  }

  .rt-table {
    font-size: 14px;
  }

  .rt-table th,
  .rt-table td {
    padding: 7px 8px;
  }
}

@media print {
  /* Печатается результат: без шапки, подвала, формы, кнопок и текста
     страницы, но с исходными данными, «Как считали» и адресом расчёта. */
  .site-header,
  .site-footer,
  .breadcrumbs,
  .rt-hero,
  .rt-form,
  .rt-actions,
  .rt-text {
    display: none !important;
  }

  .rt-print-only {
    display: block;
    margin: 0 0 10px;
    font-size: 12px;
  }

  .rt-calc,
  .rt-result,
  .rt-how,
  .rt-awg {
    border: 0;
    padding: 0;
    background: transparent;
  }

  .rt-calc-host {
    padding: 0;
  }
}
