:root {
  --tmc-blue: #1f5f8f;
  --tmc-blue-dark: #183f61;
  --tmc-accent: #f0a521;
  --tmc-ink: #172231;
  --tmc-muted: #647386;
  --tmc-line: #cbd7e2;
  --tmc-soft: #eef5f8;
  --tmc-card: #ffffff;
  --tmc-warn: #fff7e0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--tmc-ink);
  background:
    linear-gradient(135deg, rgba(234, 244, 249, 0.92), rgba(250, 252, 253, 0.96)),
    repeating-linear-gradient(45deg, rgba(30, 70, 100, 0.05) 0, rgba(30, 70, 100, 0.05) 1px, transparent 1px, transparent 18px);
  font-family: "Trebuchet MS", Verdana, sans-serif;
  line-height: 1.5;
}

a {
  color: var(--tmc-blue);
}

.tmc-header {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--tmc-line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.tmc-nav,
.tmc-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.tmc-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
}

.tmc-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--tmc-ink);
  font-weight: 700;
  text-decoration: none;
}

.tmc-brand-image {
  display: block;
  width: min(210px, 58vw);
  height: auto;
}

.tmc-brand-logo {
  display: block;
  width: min(132px, 42vw);
  height: auto;
}

.tmc-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, var(--tmc-blue), var(--tmc-blue-dark));
  font-weight: 800;
  letter-spacing: 0.04em;
}

.tmc-logo-small {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--tmc-accent), #d56f1d 48%, var(--tmc-blue-dark));
  box-shadow: 0 5px 12px rgba(24, 63, 97, 0.16);
  font-size: 13px;
}

.tmc-nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tmc-nav-links a {
  padding: 8px 11px;
  border-radius: 999px;
  color: var(--tmc-ink);
  text-decoration: none;
  font-size: 14px;
}

.tmc-nav-links a:hover,
.tmc-nav-links .is-active {
  background: var(--tmc-soft);
  color: var(--tmc-blue-dark);
}

.tmc-shell {
  padding: 15px 0 40px;
}

.tmc-hero,
.tmc-card,
.tmc-cards article {
  border: 1px solid var(--tmc-line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 34px rgba(28, 55, 78, 0.08);
}

.tmc-hero {
  padding: clamp(24px, 2.8vw, 32px) clamp(18px, 3vw, 34px) clamp(22px, 2.5vw, 28px);
  text-align: center;
}

.tmc-hero-content {
  display: grid;
  width: min(820px, 100%);
  gap: 16px;
  justify-items: center;
  margin: 0 auto;
}

.tmc-hero-title {
  position: relative;
  display: grid;
  grid-template-columns: minmax(126px, 1fr) auto minmax(126px, 1fr);
  align-items: end;
  column-gap: 18px;
  width: min(720px, 100%);
  min-height: 46px;
  padding: 0;
}

.tmc-hero-title .tmc-kicker {
  grid-column: 1;
  position: static;
  justify-self: end;
  align-self: end;
  max-width: 154px;
  margin: 0 0 6px;
  font-size: 10.8px;
  letter-spacing: 0.12em;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
}

.tmc-hero-title h1 {
  grid-column: 2;
  justify-self: center;
  font-size: clamp(32px, 3.2vw, 40px);
  line-height: 0.94;
  letter-spacing: -0.02em;
}

.tmc-kicker {
  margin: 0 0 6px;
  color: var(--tmc-blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
}

h1 {
  font-size: clamp(25px, 3.4vw, 36px);
}

h2 {
  font-size: clamp(20px, 2.2vw, 27px);
}

h3 {
  font-size: 18px;
}

.tmc-lead {
  max-width: 720px;
  margin: 7px 0 0;
  color: var(--tmc-muted);
  font-size: 16px;
}

.tmc-warning {
  margin: 9px 0 0;
  padding: 8px 10px;
  border: 1px solid #eadcae;
  border-radius: 13px;
  background: var(--tmc-warn);
  color: #5e4b17;
  font-size: 13px;
  line-height: 1.4;
}

.tmc-result-note {
  margin: 6px 0 0;
  color: #5e4b17;
  font-size: 12px;
  line-height: 1.32;
}

.tmc-hero-actions,
.tmc-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.tmc-hero-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(190px, 1fr));
  justify-content: center;
  width: min(520px, 100%);
  margin-top: 0;
  gap: 14px;
}

.tmc-hero-actions .tmc-button {
  min-width: 0;
}

.tmc-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 13px;
  border: 1px solid var(--tmc-blue);
  border-radius: 12px;
  color: #fff;
  background: var(--tmc-blue);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.tmc-button:hover {
  background: var(--tmc-blue-dark);
}

.tmc-button-light {
  color: var(--tmc-blue-dark);
  background: #fff;
}

.tmc-button-light:hover {
  color: #fff;
}

.tmc-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  align-items: stretch;
  margin: 12px 0 14px;
}

.tmc-card {
  padding: clamp(16px, 1.8vw, 20px);
  scroll-margin-top: 86px;
}

#weight-calculator,
#flange-calculator,
#pipe-calculator {
  padding-bottom: clamp(12px, 1.35vw, 15px);
}

.tmc-cards article {
  display: flex;
  padding: 0;
  overflow: hidden;
}

.tmc-card-link {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  justify-content: stretch;
  gap: 12px;
  min-height: 72px;
  height: 100%;
  width: 100%;
  padding: 12px 14px;
  color: inherit;
  text-decoration: none;
}

.tmc-card-link:hover {
  background: linear-gradient(180deg, #ffffff, #f3f8fb);
}

.tmc-cards span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(31, 95, 143, 0.22);
  border-radius: 10px;
  font-size: 13px;
  background: #eef6fa;
  color: var(--tmc-blue);
  font-weight: 800;
}

.tmc-card-link > div {
  display: grid;
  min-width: 0;
  max-width: none;
  align-content: center;
}

.tmc-cards h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.18;
}

.tmc-cards p,
.tmc-card-head p,
.tmc-muted p {
  color: var(--tmc-muted);
}

.tmc-cards p {
  margin: 4px 0 0;
  font-size: 12.5px;
  line-height: 1.35;
}

.tmc-card {
  margin-top: 20px;
}

.tmc-card + .tmc-card {
  margin-top: 28px;
}

.tmc-form {
  margin-top: 9px;
}

.tmc-card-head {
  display: grid;
  gap: 4px;
  max-width: 860px;
  margin-bottom: 10px;
}

.tmc-card-head .tmc-kicker {
  margin: 0;
}

.tmc-card-head > p:not(.tmc-kicker):not(.tmc-inline-note) {
  max-width: 760px;
  margin: 0;
  color: var(--tmc-muted);
  line-height: 1.38;
}

.tmc-card-head .tmc-flange-safe-note {
  margin-top: 2px;
  color: #5e7080;
  font-size: 12.5px;
  line-height: 1.35;
}

.tmc-grid {
  display: grid;
  gap: 8px;
}

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

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

.tmc-weight-table {
  display: grid;
  gap: 5px;
  align-items: start;
}

.tmc-weight-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  align-items: stretch;
}

.tmc-weight-table label,
.tmc-weight-empty-cell {
  display: grid;
  grid-template-rows: minmax(17px, auto) 38px minmax(14px, auto);
  gap: 3px;
  min-height: 88px;
  padding: 4px 9px;
  border: 1px solid #d9e5ee;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f8fbfd);
}

.tmc-weight-empty-cell {
  color: #7a8b9a;
  font-size: 12px;
  font-weight: 600;
}

.tmc-weight-empty-cell span {
  align-self: end;
  color: #536a7d;
  font-size: 13px;
  font-weight: 800;
}

.tmc-weight-empty-cell small {
  align-self: start;
  line-height: 1.3;
}

.tmc-weight-table label span {
  display: flex;
  align-items: center;
  min-height: 0;
  font-size: 12.5px;
  line-height: 1.15;
}

.tmc-weight-table .tmc-field-hint {
  min-height: 0;
  margin-top: 0;
  font-size: 11px;
  line-height: 1.15;
}

.tmc-flange-main-grid {
  align-items: start;
  grid-template-columns: minmax(132px, .82fr) minmax(152px, .98fr) minmax(172px, 1.12fr) minmax(126px, .78fr) minmax(118px, .72fr) minmax(150px, .88fr);
  gap: 6px;
}

.tmc-flange-main-grid .tmc-engineering-row,
.tmc-flange-extra-grid .tmc-engineering-row {
  display: contents;
}

.tmc-flange-main-grid .tmc-engineering-cell,
.tmc-flange-extra-grid .tmc-engineering-cell {
  align-content: stretch;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 13px;
}

.tmc-flange-extra-grid {
  align-items: start;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tmc-flange-extra-grid .tmc-engineering-cell {
  gap: 5px;
  grid-template-rows: minmax(22px, auto) 36px;
  min-height: 76px;
  padding: 6px 8px;
}

.tmc-flange-main-grid .tmc-engineering-cell {
  gap: 5px;
  grid-template-rows: minmax(28px, auto) 38px;
  min-height: 78px;
  padding: 7px 9px;
}

.tmc-flange-main-grid .tmc-engineering-cell > span,
.tmc-flange-extra-grid .tmc-engineering-cell > span {
  align-items: center;
  height: 100%;
  min-height: 0;
  overflow: visible;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.tmc-flange-main-grid .tmc-engineering-cell > .tmc-label-row,
.tmc-flange-extra-grid .tmc-engineering-cell > .tmc-label-row {
  align-items: center;
}

.tmc-flange-main-grid .tmc-label-row {
  min-height: 28px;
}

.tmc-flange-main-grid .tmc-engineering-cell > span {
  font-size: 12.4px;
  line-height: 1.15;
}

.tmc-flange-extra-grid .tmc-engineering-cell > span {
  font-size: 11.6px;
  line-height: 1.14;
}

.tmc-flange-main-grid .tmc-engineering-cell input,
.tmc-flange-main-grid .tmc-engineering-cell select,
.tmc-flange-extra-grid .tmc-engineering-cell input,
.tmc-flange-extra-grid .tmc-engineering-cell select {
  align-self: stretch;
  min-height: 38px;
}

.tmc-flange-standard-field select:disabled {
  opacity: 1;
  cursor: default;
  color: #17384d;
  border-color: rgba(28, 73, 101, .2);
  background: linear-gradient(180deg, #f8fbfd, #eef5f8);
  -webkit-text-fill-color: #17384d;
}

.tmc-flange-main-grid .tmc-field-hint,
.tmc-flange-extra-grid .tmc-field-hint {
  display: flex;
  align-items: flex-start;
  height: 100%;
  min-height: 0;
  overflow: visible;
  color: #607586;
  line-height: 1.18;
}

.tmc-flange-main-grid .tmc-field-hint {
  display: none;
}

.tmc-flange-extra-grid .tmc-field-hint {
  display: none;
}

.tmc-flange-main-grid .tmc-engineering-cell,
.tmc-flange-extra-grid .tmc-engineering-cell {
  position: relative;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

@media (hover: hover) {
  .tmc-flange-main-grid .tmc-engineering-cell:hover,
  .tmc-flange-extra-grid .tmc-engineering-cell:hover {
    border-color: rgba(31, 95, 143, 0.34);
    background: rgba(249, 253, 255, 0.96);
    box-shadow: 0 8px 18px rgba(28, 55, 78, 0.07);
  }

  .tmc-flange-main-grid .tmc-engineering-cell:has(:disabled):hover,
  .tmc-flange-extra-grid .tmc-engineering-cell:has(:disabled):hover {
    border-color: #d8e4ec;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: none;
  }
}

.tmc-flange-main-grid .tmc-engineering-cell:focus-within,
.tmc-flange-extra-grid .tmc-engineering-cell:focus-within {
  border-color: rgba(31, 95, 143, 0.55);
  background: #ffffff;
  box-shadow:
    0 0 0 3px rgba(31, 95, 143, 0.12),
    0 10px 20px rgba(28, 55, 78, 0.08);
}

.tmc-flange-main-grid .tmc-engineering-cell[data-flange-autofilled-card="1"],
.tmc-flange-extra-grid .tmc-engineering-cell[data-flange-autofilled-card="1"] {
  border-color: rgba(42, 132, 111, 0.44);
  background:
    linear-gradient(180deg, rgba(250, 255, 253, 0.98), rgba(238, 249, 248, 0.94)),
    linear-gradient(135deg, rgba(42, 132, 111, 0.10), rgba(31, 95, 143, 0.06));
  box-shadow: inset 0 0 0 1px rgba(42, 132, 111, 0.10);
}

.tmc-flange-main-grid .tmc-engineering-cell[data-flange-autofilled-card="1"] > span,
.tmc-flange-extra-grid .tmc-engineering-cell[data-flange-autofilled-card="1"] > span {
  padding-right: 84px;
}

.tmc-flange-main-grid .tmc-engineering-cell[data-flange-autofilled-card="1"]::after,
.tmc-flange-extra-grid .tmc-engineering-cell[data-flange-autofilled-card="1"]::after {
  content: "Автоподбор";
  position: absolute;
  top: 7px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  padding: 2px 7px;
  border: 1px solid rgba(42, 132, 111, 0.28);
  border-radius: 999px;
  background: rgba(229, 247, 242, 0.96);
  color: #286d60;
  font-size: 9.5px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: .02em;
  pointer-events: none;
}

.tmc-flange-main-grid .tmc-engineering-cell[data-flange-autofilled-card="1"]:hover::before,
.tmc-flange-main-grid .tmc-engineering-cell[data-flange-autofilled-card="1"]:focus-within::before,
.tmc-flange-extra-grid .tmc-engineering-cell[data-flange-autofilled-card="1"]:hover::before,
.tmc-flange-extra-grid .tmc-engineering-cell[data-flange-autofilled-card="1"]:focus-within::before {
  content: "Значение подобрано автоматически по выбранной строке таблицы ГОСТ.";
  position: absolute;
  top: 30px;
  right: 8px;
  z-index: 4;
  width: min(250px, 76vw);
  padding: 8px 10px;
  border: 1px solid rgba(42, 132, 111, 0.24);
  border-radius: 11px;
  background: #ffffff;
  color: #286d60;
  box-shadow: 0 12px 28px rgba(28, 55, 78, 0.14);
  font-size: 11.5px;
  font-weight: 750;
  line-height: 1.34;
}

.tmc-flange-main-grid .tmc-engineering-cell[data-flange-autofilled-card="1"]:has(.tmc-help-tip:hover)::before,
.tmc-flange-main-grid .tmc-engineering-cell[data-flange-autofilled-card="1"]:has(.tmc-help-tip:focus-visible)::before,
.tmc-flange-extra-grid .tmc-engineering-cell[data-flange-autofilled-card="1"]:has(.tmc-help-tip:hover)::before,
.tmc-flange-extra-grid .tmc-engineering-cell[data-flange-autofilled-card="1"]:has(.tmc-help-tip:focus-visible)::before {
  display: none;
}

.tmc-flange-main-grid select[data-flange-autofilled="1"],
.tmc-flange-extra-grid select[data-flange-autofilled="1"] {
  border-color: rgba(42, 132, 111, 0.34);
  background-color: rgba(250, 255, 253, 0.98);
}

.tmc-autofill-note {
  margin: 10px 2px 0;
  color: #456274;
  font-size: 12.5px;
  line-height: 1.35;
}

.tmc-flange-main-grid .tmc-flange-primary-field {
  border-color: rgba(31, 95, 143, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 248, 252, 0.96)),
    linear-gradient(135deg, rgba(31, 95, 143, 0.08), rgba(240, 165, 33, 0.06));
}

.tmc-flange-main-grid .tmc-flange-primary-field span {
  color: var(--tmc-blue-dark);
}

#tmc-flange-result {
  scroll-margin-top: 118px;
}

.tmc-beta-panel {
  margin: -4px 0 14px;
  padding: 14px 16px;
  border: 1px solid #f0c66c;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 248, 224, 0.98), rgba(255, 255, 255, 0.96)),
    repeating-linear-gradient(135deg, rgba(217, 145, 39, 0.08) 0 8px, transparent 8px 16px);
  color: #49350d;
}

.tmc-beta-panel h3 {
  margin: 2px 0 6px;
  color: #1b3347;
  font-size: 18px;
  line-height: 1.2;
}

.tmc-beta-panel p {
  margin: 0;
  color: #634814;
  font-size: 13px;
  line-height: 1.45;
}

.tmc-beta-panel ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.tmc-beta-panel li {
  padding: 7px 9px;
  border: 1px solid rgba(196, 139, 47, 0.28);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  line-height: 1.3;
}

.tmc-beta-panel code {
  font-family: inherit;
  font-weight: 800;
}

.tmc-beta-panel-compact {
  padding: 10px 12px;
}

.tmc-beta-panel-compact summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  color: #1b3347;
  list-style: none;
}

.tmc-beta-panel-compact summary::-webkit-details-marker {
  display: none;
}

.tmc-beta-panel-compact summary::after {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(196, 139, 47, 0.3);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  color: #634814;
  font-weight: 900;
  line-height: 1;
}

.tmc-beta-panel-compact[open] summary::after {
  content: "-";
}

.tmc-beta-panel-compact summary span {
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tmc-beta-panel-compact summary small {
  margin-left: auto;
  color: #634814;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  text-align: right;
}

.tmc-beta-panel-compact p {
  margin-top: 8px;
}

.tmc-engineering-table {
  display: grid;
  gap: 5px;
}

.tmc-engineering-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  align-items: stretch;
}

.tmc-engineering-cell {
  display: grid;
  grid-template-rows: minmax(18px, auto) 38px minmax(14px, auto);
  gap: 3px;
  min-height: 88px;
  padding: 4px 9px;
  border: 1px solid #d9e5ee;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f8fbfd);
}

.tmc-engineering-cell span {
  display: flex;
  align-items: center;
  min-height: 0;
  font-size: 12.5px;
  line-height: 1.15;
}

.tmc-engineering-cell .tmc-field-hint {
  min-height: 0;
  margin-top: 0;
  font-size: 11px;
  line-height: 1.15;
}

.tmc-engineering-cell-wide {
  grid-column: 1 / -1;
}

.tmc-engineering-table-compact .tmc-engineering-cell {
  min-height: 88px;
}

.tmc-form .tmc-grid label {
  grid-template-rows: minmax(18px, auto) 38px minmax(14px, auto);
  gap: 3px;
  min-height: 88px;
  padding: 4px 9px;
  border: 1px solid #d9e5ee;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f8fbfd);
}

.tmc-form .tmc-grid label span {
  min-height: 0;
  font-size: 12.5px;
  line-height: 1.15;
}

.tmc-form .tmc-grid .tmc-field-hint {
  min-height: 0;
  margin-top: 0;
  font-size: 11px;
  line-height: 1.15;
}

.tmc-dynamic-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

label {
  display: grid;
  align-content: start;
  gap: 4px;
  font-weight: 700;
}

label span {
  display: flex;
  align-items: flex-end;
  min-height: 24px;
  font-size: 13px;
  color: #31465b;
  line-height: 1.25;
}

.tmc-field-hint {
  min-height: 24px;
  margin-top: -2px;
  color: var(--tmc-muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
}

.tmc-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  min-width: 0;
}

.tmc-label-row .tmc-label-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.tmc-help-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(31, 95, 143, 0.28);
  border-radius: 50%;
  background: #f6fbfe;
  color: var(--tmc-blue-dark);
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  cursor: help;
  z-index: 5;
}

.tmc-help-tip::after {
  content: attr(data-tooltip);
  position: absolute;
  right: -6px;
  bottom: calc(100% + 8px);
  display: none;
  width: min(270px, 76vw);
  padding: 8px 10px;
  border: 1px solid rgba(31, 95, 143, 0.22);
  border-radius: 11px;
  background: #ffffff;
  color: #29465d;
  box-shadow: 0 12px 28px rgba(28, 55, 78, 0.16);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.34;
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
  white-space: normal;
  pointer-events: none;
}

.tmc-help-tip::before {
  content: "";
  position: absolute;
  right: 2px;
  bottom: calc(100% + 3px);
  display: none;
  width: 9px;
  height: 9px;
  border-right: 1px solid rgba(31, 95, 143, 0.22);
  border-bottom: 1px solid rgba(31, 95, 143, 0.22);
  background: #ffffff;
  transform: rotate(45deg);
  pointer-events: none;
}

.tmc-help-tip:hover,
.tmc-help-tip:focus-visible {
  border-color: rgba(31, 95, 143, 0.62);
  background: #ffffff;
  color: var(--tmc-blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(31, 95, 143, 0.10);
}

.tmc-help-tip:hover::after,
.tmc-help-tip:hover::before,
.tmc-help-tip:focus-visible::after,
.tmc-help-tip:focus-visible::before {
  display: block;
}

.tmc-inline-note {
  margin: 5px 0 0;
  padding: 7px 10px;
  border: 1px solid #d7e3ec;
  border-radius: 12px;
  background: #f7fbfd;
  color: var(--tmc-muted);
  font-size: 13px;
}

.tmc-calc-notice {
  max-width: 760px;
  margin: 7px 0 0;
  color: #5e4b17;
  font-size: 12.5px;
  line-height: 1.35;
}

.tmc-calc-notice-bottom {
  max-width: none;
  margin: 9px 0 0;
  padding-top: 7px;
  border-top: 1px solid #e3edf4;
  color: #6a7580;
  font-size: 11.5px;
  line-height: 1.3;
}

input,
select {
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid #b8c8d7;
  border-radius: 11px;
  background: #f9fcfd;
  color: var(--tmc-ink);
  font: inherit;
}

input::placeholder,
textarea::placeholder {
  color: #8fa0ad;
  opacity: 0.42;
}

input:focus,
select:focus {
  outline: 3px solid rgba(31, 95, 143, 0.16);
  border-color: var(--tmc-blue);
  background: #fff;
}

.tmc-advanced {
  margin-top: 14px;
  padding: 0;
  border: 1px solid #d3e0e9;
  border-radius: 16px;
  background: #f8fbfd;
}

.tmc-advanced summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  color: var(--tmc-blue-dark);
  font-weight: 800;
  cursor: pointer;
  list-style-position: inside;
}

.tmc-advanced summary small {
  color: var(--tmc-muted);
  font-size: 12px;
  font-weight: 400;
  text-align: right;
}

.tmc-advanced[open] {
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(31, 95, 143, 0.04);
}

.tmc-flange-disclosure {
  border-color: rgba(31, 95, 143, 0.24);
  background:
    linear-gradient(135deg, rgba(31, 95, 143, 0.07), rgba(66, 123, 91, 0.04)),
    #f8fbfd;
  box-shadow: 0 12px 28px rgba(31, 95, 143, 0.07);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.tmc-flange-disclosure:hover {
  border-color: rgba(31, 95, 143, 0.42);
  box-shadow: 0 14px 32px rgba(31, 95, 143, 0.1);
}

.tmc-flange-disclosure summary {
  min-height: 58px;
  padding: 14px 16px;
  list-style: none;
  position: relative;
}

.tmc-flange-disclosure summary::-webkit-details-marker {
  display: none;
}

.tmc-flange-disclosure summary span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  letter-spacing: 0.01em;
}

.tmc-flange-disclosure summary span::before {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--tmc-blue);
  border-bottom: 2px solid var(--tmc-blue);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.18s ease;
}

.tmc-flange-disclosure[open] summary span::before {
  transform: rotate(225deg) translate(-1px, -1px);
}

.tmc-flange-disclosure summary small {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  max-width: 62%;
  line-height: 1.35;
}

.tmc-flange-disclosure summary small::after {
  content: "Показать параметры";
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid rgba(31, 95, 143, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--tmc-blue-dark);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.tmc-flange-disclosure[open] summary small::after {
  content: "Скрыть параметры";
  background: rgba(31, 95, 143, 0.08);
}

.tmc-flange-disclosure[open] {
  border-color: rgba(31, 95, 143, 0.34);
  background: #fff;
}

.tmc-advanced .tmc-grid {
  padding: 0 14px 14px;
}

.tmc-error {
  color: #9d1f1f;
  font-weight: 700;
}

#tmc-flange-form.tmc-flange-form-en-mode .tmc-flange-gost-dimension-row,
#tmc-flange-form.tmc-flange-form-en-mode .tmc-flange-gost-control-row,
#flange-calculator.tmc-flange-en-mode .tmc-flange-work-panel {
  display: none !important;
}

.tmc-en-request-mode {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #c8d9e5;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(31, 95, 143, 0.07), rgba(60, 118, 101, 0.05)),
    #ffffff;
  box-shadow: 0 12px 30px rgba(32, 64, 88, 0.08);
}

.tmc-en-request-mode[hidden] {
  display: none;
}

.tmc-en-request-head {
  display: grid;
  gap: 4px;
}

.tmc-en-request-head h3 {
  margin: 0;
  color: var(--tmc-blue-dark);
  font-size: clamp(21px, 2.2vw, 30px);
  line-height: 1.12;
}

.tmc-en-request-head p:last-child {
  max-width: 820px;
  margin: 0;
  color: #445b6e;
  font-size: 14px;
  line-height: 1.45;
}

.tmc-en-request-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.tmc-en-request-summary div {
  min-height: 70px;
  padding: 10px 12px;
  border: 1px solid #d9e5ee;
  border-radius: 12px;
  background: #f8fbfd;
}

.tmc-en-request-summary dt {
  margin: 0 0 5px;
  color: #617184;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.tmc-en-request-summary dd {
  margin: 0;
  color: #20364a;
  font-weight: 700;
  line-height: 1.25;
}

.tmc-en-request-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.tmc-en-request-grid label {
  min-height: 88px;
  padding: 8px 10px;
  border: 1px solid #d9e5ee;
  border-radius: 12px;
  background: #f8fbfd;
}

.tmc-en-request-grid label span {
  min-height: 18px;
  font-size: 12.5px;
  line-height: 1.2;
}

.tmc-en-request-grid select,
.tmc-en-request-grid input,
.tmc-en-request-grid textarea {
  min-height: 38px;
}

.tmc-en-request-wide {
  grid-column: 1 / -1;
}

.tmc-en-request-file {
  margin-top: 0;
}

@media (max-width: 760px) {
  .tmc-en-request-summary,
  .tmc-en-request-grid {
    grid-template-columns: 1fr;
  }

  .tmc-en-request-mode {
    padding: 12px;
  }
}

.tmc-storage,
.tmc-copy-status {
  color: var(--tmc-muted);
}

.tmc-result {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #b9d0df;
  border-radius: 20px;
  background: #f7fbfd;
}

.tmc-flange-work-panel {
  display: grid;
  grid-template-columns: minmax(0, .96fr) minmax(390px, 1.04fr);
  grid-template-areas:
    "variant visual"
    "summary visual";
  gap: 10px;
  align-items: start;
}

.tmc-flange-work-variant {
  grid-area: variant;
  min-width: 0;
}

.tmc-flange-work-summary {
  grid-area: summary;
  display: grid;
  gap: 8px;
  min-width: 0;
}

.tmc-flange-surface-dimensions {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(31, 95, 143, 0.32);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #edf8fc);
  box-shadow: 0 12px 28px rgba(28, 84, 122, 0.1);
}

.tmc-flange-surface-dimensions[hidden] {
  display: none;
}

.tmc-flange-surface-dimensions__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.tmc-flange-surface-dimensions__head h3 {
  margin: 2px 0 0;
  color: var(--tmc-blue-dark);
  font-size: 17px;
  line-height: 1.2;
}

.tmc-flange-surface-dimensions__badge {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(31, 95, 143, 0.1);
  color: var(--tmc-blue-dark);
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.tmc-flange-surface-dimensions__selected,
.tmc-flange-surface-dimensions__note {
  margin: 0;
  color: #33495c;
  font-size: 13px;
  line-height: 1.35;
}

.tmc-flange-surface-dimensions__selected strong {
  color: var(--tmc-blue-dark);
}

.tmc-flange-surface-dimensions__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px;
  margin: 0;
}

.tmc-flange-surface-dimensions__item {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px;
  border: 1px solid #d6e7ee;
  border-radius: 12px;
  background: rgba(255, 255, 255, .9);
}

.tmc-flange-surface-dimensions__item dt {
  margin: 0;
  color: var(--tmc-blue-dark);
  font-size: 15px;
  font-weight: 900;
}

.tmc-flange-surface-dimensions__item dd {
  margin: 0;
  color: #172d42;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
}

.tmc-flange-surface-dimensions__item small {
  display: block;
  margin-top: 2px;
  color: var(--tmc-muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}

.tmc-flange-surface-dimensions--fallback {
  border-color: rgba(217, 142, 45, .34);
  background: linear-gradient(180deg, #fff, #fff8ec);
}

.tmc-flange-surface-scheme {
  display: grid;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  gap: 7px;
  padding: 9px;
  border: 1px solid rgba(31, 95, 143, .24);
  border-radius: 14px;
  background: rgba(255, 255, 255, .86);
  overflow: hidden;
}

.tmc-flange-surface-scheme * {
  box-sizing: border-box;
}

.tmc-flange-surface-scheme h4 {
  margin: 0;
  color: var(--tmc-blue-dark);
  font-size: 14px;
  line-height: 1.2;
}

.tmc-flange-surface-scheme__lead {
  margin: 0;
  color: #33495c;
  font-size: 11.8px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.tmc-flange-surface-scheme__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  min-width: 0;
}

.tmc-flange-surface-scheme__visual {
  min-width: 0;
  width: min(100%, 280px);
  max-width: 100%;
  justify-self: center;
  padding: 5px;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fcff, #eef8fc);
  overflow: hidden;
}

.tmc-flange-surface-scheme__svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 140px;
}

.tmc-flange-surface-scheme__svg text {
  fill: var(--tmc-blue-dark);
  font-size: 12px;
  font-weight: 900;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, .9);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.tmc-flange-surface-scheme__profile {
  fill: rgba(31, 95, 143, .12);
  stroke: #24485f;
  stroke-width: 2.2;
  stroke-linejoin: round;
}

.tmc-flange-surface-scheme__cut {
  fill: none;
  stroke: #d98e2d;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tmc-flange-surface-scheme__dim,
.tmc-flange-surface-scheme__guide {
  fill: none;
  stroke-linecap: round;
}

.tmc-flange-surface-scheme__dim {
  stroke: #1f5f8f;
  stroke-width: 1.7;
}

.tmc-flange-surface-scheme[data-surface-scheme="L"] .tmc-flange-surface-scheme__dim {
  marker-start: url(#tmc-surface-arrow-l);
  marker-end: url(#tmc-surface-arrow-l);
}

.tmc-flange-surface-scheme[data-surface-scheme="M"] .tmc-flange-surface-scheme__dim {
  marker-start: url(#tmc-surface-arrow-m);
  marker-end: url(#tmc-surface-arrow-m);
}

.tmc-flange-surface-scheme__guide {
  stroke: rgba(31, 95, 143, .34);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.tmc-flange-surface-scheme marker path {
  fill: #1f5f8f;
  stroke: none;
}

.tmc-flange-surface-scheme__legend {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #33495c;
  font-size: 11.4px;
  font-weight: 700;
  line-height: 1.28;
  min-width: 0;
}

.tmc-flange-surface-scheme__legend li {
  position: relative;
  padding-left: 14px;
  overflow-wrap: anywhere;
}

.tmc-flange-surface-scheme__legend li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .52em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #d98e2d;
}

.tmc-flange-work-visual {
  grid-area: visual;
  min-width: 0;
}

.tmc-flange-work-visual .tmc-flange-drawing {
  height: 100%;
  margin-top: 0;
}

.tmc-flange-collapse {
  margin-top: 8px;
  padding: 0;
  border: 1px solid #d6e4dd;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  overflow: hidden;
}

.tmc-flange-collapse[hidden] {
  display: none;
}

.tmc-flange-collapse > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 36px;
  padding: 7px 10px;
  color: #24483e;
  cursor: pointer;
  font-size: 12.4px;
  font-weight: 900;
  list-style: none;
}

.tmc-flange-collapse > summary::-webkit-details-marker {
  display: none;
}

.tmc-flange-collapse > summary::after {
  content: "Показать";
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid rgba(31, 95, 143, 0.16);
  border-radius: 999px;
  background: rgba(246, 251, 255, 0.92);
  color: #49665e;
  font-size: 10.5px;
  font-weight: 900;
}

.tmc-flange-collapse[open] > summary::after {
  content: "Скрыть";
}

.tmc-flange-collapse > summary:focus-visible {
  outline: 3px solid rgba(31, 95, 143, 0.16);
  outline-offset: 2px;
}

.tmc-flange-collapse > p,
.tmc-flange-collapse > ul,
.tmc-flange-collapse > .tmc-designation-text,
.tmc-flange-collapse > .tmc-designation-note,
.tmc-flange-collapse > .tmc-flange-drawing-legend {
  margin: 0 10px 10px;
}

.tmc-card-brand,
.tmc-result-brand {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: #2f5168;
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.tmc-card-brand {
  margin-top: 10px;
  min-height: 46px;
  padding: 6px 0;
  border-top: 1px solid #e0e9f0;
  line-height: 0;
}

.tmc-card-brand .tmc-brand-logo {
  display: block;
  flex: 0 0 auto;
  margin: 0;
}

.tmc-card-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
  min-height: 48px;
  padding: 8px 0 6px;
  border-top: 1px solid #e3edf4;
}

.tmc-card-footer .tmc-calc-notice-bottom {
  align-self: center;
  margin: 0;
  padding-top: 0;
  border-top: 0;
  line-height: 1.35;
}

.tmc-card-footer .tmc-card-brand {
  display: flex;
  align-items: center;
  justify-self: end;
  align-self: center;
  margin: 0;
  min-height: 32px;
  padding: 0;
  border-top: 0;
  line-height: 0;
}

.tmc-widget-request {
  display: none;
  justify-content: flex-end;
  margin-top: 10px;
}

.tmc-widget-request .tmc-button {
  min-height: 36px;
  padding: 8px 14px;
  font-size: 13px;
}

.tmc-result-brand {
  margin-top: 12px;
}

.tmc-result-brand .tmc-brand-logo {
  width: min(118px, 38vw);
}

.tmc-result-brand .tmc-kicker {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.tmc-result-brand h3 {
  margin-top: 1px;
  font-size: 13px;
  line-height: 1.1;
}

.tmc-result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.tmc-result-grid div {
  display: flex;
  min-height: 68px;
  flex-direction: column;
  justify-content: center;
  padding: 10px;
  border: 1px solid #d9e4ec;
  border-radius: 14px;
  background: #fff;
}

.tmc-result-grid .tmc-result-primary {
  border-color: rgba(31, 95, 143, 0.42);
  background: linear-gradient(180deg, #ffffff, #eef7fb);
  box-shadow: inset 0 0 0 1px rgba(31, 95, 143, 0.08);
}

.tmc-result-grid .tmc-result-primary dt {
  color: var(--tmc-blue-dark);
  font-weight: 800;
}

.tmc-result-grid .tmc-result-primary dd {
  color: var(--tmc-blue-dark);
  font-size: 18px;
}

.tmc-result-grid .tmc-result-editable dd {
  margin-top: 3px;
}

.tmc-result-inline-control {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.tmc-result-inline-input {
  width: 86px;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid rgba(31, 95, 143, 0.34);
  border-radius: 10px;
  background: #fff;
  color: var(--tmc-blue-dark);
  font: inherit;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.1;
}

.tmc-result-inline-input:focus {
  outline: none;
  border-color: rgba(31, 95, 143, 0.82);
  box-shadow: 0 0 0 3px rgba(31, 95, 143, 0.12);
}

.tmc-result-inline-unit {
  color: var(--tmc-blue-dark);
  font-size: 15px;
  font-weight: 900;
}

.tmc-result-grid dt {
  color: var(--tmc-muted);
  font-size: 12px;
}

.tmc-result-grid dd {
  margin: 4px 0 0;
  font-weight: 800;
}

.tmc-designation {
  margin-top: 10px;
  padding: 0;
  border: 1px solid #c8dce8;
  border-radius: 16px;
  background: #fff;
}

#tmc-flange-result .tmc-designation {
  margin-top: 0;
}

.tmc-designation-text {
  display: grid;
  gap: 6px;
  margin: 6px 0 0;
  color: var(--tmc-ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.tmc-designation-text p {
  margin: 0;
}

.tmc-designation-variants {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: stretch;
}

.tmc-designation-variant {
  display: grid;
  gap: 5px;
  padding: 9px 10px;
  border: 1px solid rgba(31, 95, 143, 0.16);
  border-radius: 12px;
  background: #f8fcff;
}

.tmc-designation-variant-title {
  color: #7b560d;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tmc-designation-gost {
  color: var(--tmc-blue-dark);
  font-weight: 850;
}

.tmc-designation-draft {
  color: #51687a;
}

.tmc-designation-popular {
  color: #1f4259;
}

.tmc-designation-note {
  margin: 8px 0 0;
  color: var(--tmc-muted);
  font-size: 13px;
}

.tmc-known,
.tmc-match {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid #cfe0ec;
  border-radius: 16px;
  background: #f6fbff;
}

.tmc-known ul,
.tmc-match-text {
  margin: 6px 0 0;
  color: var(--tmc-ink);
  font-size: 13px;
  line-height: 1.45;
}

.tmc-known ul,
.tmc-match ul {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  color: #35566e;
  font-size: 13px;
  line-height: 1.4;
}

.tmc-known li + li,
.tmc-match li + li {
  margin-top: 4px;
}

.tmc-known-compact {
  margin-top: 10px;
  padding: 0;
  border-color: rgba(31, 95, 143, 0.14);
  background: rgba(246, 251, 255, 0.68);
}

.tmc-known-compact .tmc-kicker {
  margin-bottom: 2px;
  color: #5d7180;
  font-size: 11px;
}

.tmc-known-compact ul {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px 10px;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.25;
}

.tmc-known-compact li {
  min-width: 0;
  padding: 3px 0;
  color: #466173;
  overflow-wrap: anywhere;
}

.tmc-known-compact li + li {
  margin-top: 0;
}

.tmc-match li {
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.62);
}

.tmc-match .tmc-variant-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
}

.tmc-match .tmc-variant-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(31, 95, 143, 0.18);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.tmc-match .tmc-variant-card:hover,
.tmc-match .tmc-variant-card:focus-visible,
.tmc-match .tmc-variant-card.is-active {
  border-color: rgba(15, 95, 84, 0.55);
  background: #f7fcfa;
  box-shadow: 0 0 0 3px rgba(15, 95, 84, 0.08);
  outline: none;
}

.tmc-match .tmc-variant-card.is-active {
  transform: translateY(-1px);
}

.tmc-match .tmc-variant-card.is-active h4::after {
  content: "Показан на чертеже";
  display: inline-block;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(15, 95, 84, 0.1);
  color: #0f5f54;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
  vertical-align: middle;
}

.tmc-variant-card h4 {
  margin: 0 0 2px;
  color: var(--tmc-blue-dark);
  font-size: 15px;
  line-height: 1.25;
}

.tmc-variant-label {
  color: #6a7f8f;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tmc-variant-value {
  margin: -2px 0 2px;
  color: #1d3444;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.32;
  overflow-wrap: anywhere;
}

.tmc-variant-gost {
  color: var(--tmc-blue-dark);
}

.tmc-variant-dimensions {
  color: #334f62;
  font-weight: 650;
}

.tmc-variant-missing,
.tmc-match-service-note {
  margin: 3px 0 0;
  color: #6b7f8e;
  font-size: 12px;
  line-height: 1.35;
}

.tmc-variant-tech {
  margin-top: 2px;
  color: #7b8790;
  font-size: 11.5px;
}

.tmc-variant-tech summary {
  cursor: pointer;
  font-weight: 750;
}

.tmc-variant-tech p {
  margin: 4px 0 0;
}

.tmc-flange-drawing {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(245px, .8fr);
  grid-template-areas:
    "head side"
    "figure side"
    "note note";
  align-items: start;
  gap: 8px 12px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid #cbded7;
  border-radius: 16px;
  scroll-margin-top: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 249, 247, 0.96));
}

.tmc-flange-drawing[hidden] {
  display: none;
}

.tmc-flange-drawing-head {
  grid-area: head;
}

.tmc-flange-drawing-head h3 {
  margin: 2px 0 0;
  color: #18392f;
  font-size: 18px;
  line-height: 1.2;
}

.tmc-flange-drawing-body {
  grid-area: figure;
  display: grid;
  gap: 8px;
  min-width: 0;
}

.tmc-flange-figure4 {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0;
  overflow: hidden;
  border: 1px solid #d7e5e0;
  border-radius: 14px;
  background: #fff;
}

.tmc-flange-figure7 {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0;
  overflow: hidden;
  border: 1px solid #d7e5e0;
  border-radius: 14px;
  background: #fff;
}

.tmc-flange-figure5 {
  display: grid;
  gap: 0;
  width: 100%;
  max-width: 640px;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid #d7e5e0;
  border-radius: 14px;
  background: #fff;
}

.tmc-flange-figure5-frame {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: #fff;
}

.tmc-flange-figure5-image {
  display: block;
  width: 100%;
  height: auto;
  min-width: 0;
  background: #fff;
}

.tmc-flange-figure5-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.tmc-flange-figure5-line,
.tmc-flange-figure5-zone {
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  pointer-events: all;
  transition: opacity 160ms ease, stroke 160ms ease, stroke-width 160ms ease, fill 160ms ease, filter 160ms ease;
}

.tmc-flange-figure5-line {
  fill: none;
  stroke: rgba(11, 93, 83, 0.5);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.3;
}

.tmc-flange-figure5-zone {
  fill: rgba(11, 93, 83, 0.035);
  stroke: rgba(11, 93, 83, 0.34);
  stroke-width: 1.4;
  opacity: 0.22;
}

.tmc-flange-figure5-variant-line {
  stroke: rgba(15, 95, 84, 0.52);
  stroke-width: 2.8;
  opacity: 0.4;
}

.tmc-flange-figure5-line:hover,
.tmc-flange-figure5-line:focus,
.tmc-flange-figure5-line.is-active {
  stroke: #d95c2b;
  stroke-width: 4;
  opacity: 0.82;
  outline: none;
  filter: drop-shadow(0 0 3px rgba(217, 92, 43, 0.16));
}

.tmc-flange-figure5-zone:hover,
.tmc-flange-figure5-zone:focus,
.tmc-flange-figure5-zone.is-active {
  fill: rgba(217, 92, 43, 0.08);
  stroke: #d95c2b;
  stroke-width: 2.2;
  opacity: 0.78;
  outline: none;
  filter: drop-shadow(0 0 3px rgba(217, 92, 43, 0.14));
}

.tmc-flange-figure5-caption {
  margin: 0;
  padding: 8px 10px 9px;
  border-top: 1px solid #edf4f1;
  background: #fbfdfc;
  color: #6b7f79;
  font-size: 11.8px;
  line-height: 1.32;
}

.tmc-flange-figure7-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.tmc-flange-figure7-line,
.tmc-flange-figure7-zone,
.tmc-flange-figure7-marker {
  vector-effect: non-scaling-stroke;
  transition: opacity 160ms ease, stroke 160ms ease, stroke-width 160ms ease, fill 160ms ease;
}

.tmc-flange-figure7-line {
  fill: none;
  stroke: rgba(11, 93, 83, 0.46);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.28;
}

.tmc-flange-figure7-zone {
  fill: rgba(11, 93, 83, 0.035);
  stroke: rgba(11, 93, 83, 0.34);
  stroke-width: 1.4;
  opacity: 0.22;
}

.tmc-flange-figure7-marker {
  fill: rgba(11, 93, 83, 0.035);
  stroke: rgba(11, 93, 83, 0.4);
  stroke-width: 1.5;
  opacity: 0.24;
}

.tmc-flange-figure7-line.is-active {
  stroke: #d95c2b;
  stroke-width: 3.6;
  opacity: 0.9;
}

.tmc-flange-figure7-zone.is-active {
  fill: rgba(217, 92, 43, 0.08);
  stroke: #d95c2b;
  stroke-width: 2.2;
  opacity: 0.78;
}

.tmc-flange-figure7-marker.is-active {
  fill: rgba(217, 92, 43, 0.08);
  stroke: #d95c2b;
  stroke-width: 2.2;
  opacity: 0.84;
}

.tmc-flange-figure7-facing-zone {
  fill: rgba(15, 95, 84, 0.055);
  stroke: rgba(15, 95, 84, 0.48);
  stroke-width: 1.8;
  opacity: 0.48;
}

.tmc-flange-figure7-facing-line {
  stroke: rgba(15, 95, 84, 0.5);
  stroke-width: 2.6;
  opacity: 0.42;
}

.tmc-flange-figure7-facing-zone.is-active,
.tmc-flange-figure7-facing-line.is-active {
  fill: rgba(217, 92, 43, 0.1);
  stroke: #d95c2b;
  opacity: 0.88;
}

.tmc-flange-figure4-image {
  display: block;
  width: 100%;
  height: auto;
}

.tmc-flange-zone {
  position: absolute;
  z-index: 2;
  display: block;
  min-width: 18px;
  min-height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0f5f54;
  cursor: pointer;
  transition: opacity 160ms ease;
}

.tmc-flange-zone::before {
  content: "";
  position: absolute;
  pointer-events: none;
  background: rgba(11, 93, 83, 0.58);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.92);
  opacity: 0.2;
  transition: background-color 160ms ease, box-shadow 160ms ease, opacity 160ms ease, transform 160ms ease;
}

.tmc-flange-zone span {
  display: none;
}

.tmc-flange-zone:hover,
.tmc-flange-zone:focus-visible,
.tmc-flange-zone.is-active {
  outline: none;
}

.tmc-flange-zone:hover::before,
.tmc-flange-zone:focus-visible::before,
.tmc-flange-zone.is-active::before {
  background: #d95c2b;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.98), 0 0 0 2px rgba(217, 92, 43, 0.12);
  opacity: 0.96;
}

.tmc-flange-zone:hover span,
.tmc-flange-zone:focus-visible span,
.tmc-flange-zone.is-active span {
  display: none;
}

.tmc-flange-zone-d {
  left: 22%;
  top: 9%;
  width: 4.4%;
  height: 67%;
}

.tmc-flange-zone-d1 {
  left: 27.2%;
  top: 18.8%;
  width: 4.2%;
  height: 51%;
}

.tmc-flange-zone-dv {
  left: 70.4%;
  top: 34.8%;
  width: 5%;
  height: 17.8%;
}

.tmc-flange-zone-b {
  left: 49.8%;
  top: 78.9%;
  width: 11.8%;
  height: 5.4%;
}

.tmc-flange-zone-c1 {
  left: 70.1%;
  top: 30.6%;
  width: 5.2%;
  height: 6.6%;
}

.tmc-flange-zone-facing {
  left: 56.6%;
  top: 31.4%;
  width: 8.4%;
  height: 30.2%;
}

.tmc-flange-zone-hole-d {
  left: 70.6%;
  top: 14.3%;
  width: 7%;
  height: 7.8%;
}

.tmc-flange-zone-hole-n {
  left: 72.6%;
  top: 6.7%;
  width: 6.5%;
  height: 9.8%;
}

.tmc-flange-zone-fastener {
  left: 52.2%;
  top: 14%;
  width: 7%;
  height: 7.2%;
}

.tmc-flange-zone-d::before,
.tmc-flange-zone-d1::before,
.tmc-flange-zone-dv::before,
.tmc-flange-zone-c1::before {
  left: 50%;
  top: 0;
  width: 2px;
  height: 100%;
  border-radius: 999px;
  transform: translateX(-50%);
}

.tmc-flange-zone-facing::before {
  left: 50%;
  top: 50%;
  width: 52%;
  height: 86%;
  border: 2px solid rgba(15, 95, 84, 0.5);
  border-radius: 999px;
  background: rgba(15, 95, 84, 0.08);
  transform: translate(-50%, -50%);
}

.tmc-flange-zone-b::before {
  left: 0;
  top: 50%;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  transform: translateY(-50%);
}

.tmc-flange-zone-hole-d::before,
.tmc-flange-zone-hole-n::before,
.tmc-flange-zone-fastener::before {
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  border: 1.5px solid rgba(11, 93, 83, 0.62);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  transform: translate(-50%, -50%);
}

.tmc-flange-zone-hole-n::before {
  width: 8px;
  height: 18px;
}

.tmc-flange-zone:hover.tmc-flange-zone-hole-d::before,
.tmc-flange-zone:focus-visible.tmc-flange-zone-hole-d::before,
.tmc-flange-zone.is-active.tmc-flange-zone-hole-d::before,
.tmc-flange-zone:hover.tmc-flange-zone-hole-n::before,
.tmc-flange-zone:focus-visible.tmc-flange-zone-hole-n::before,
.tmc-flange-zone.is-active.tmc-flange-zone-hole-n::before,
.tmc-flange-zone:hover.tmc-flange-zone-fastener::before,
.tmc-flange-zone:focus-visible.tmc-flange-zone-fastener::before,
.tmc-flange-zone.is-active.tmc-flange-zone-fastener::before {
  border-color: #d95c2b;
  background: rgba(217, 92, 43, 0.08);
}

.tmc-flange-zone:hover.tmc-flange-zone-facing::before,
.tmc-flange-zone:focus-visible.tmc-flange-zone-facing::before,
.tmc-flange-zone.is-active.tmc-flange-zone-facing::before {
  border-color: #d95c2b;
  background: rgba(217, 92, 43, 0.12);
}

.tmc-flange-zone-d span,
.tmc-flange-zone-d1 span {
  left: -7px;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-90deg);
}

.tmc-flange-zone-dv span,
.tmc-flange-zone-c1 span {
  left: 100%;
  top: 50%;
  transform: translate(8px, -50%);
}

.tmc-flange-zone-b span {
  left: 50%;
  top: 100%;
  transform: translate(-50%, 4px);
}

.tmc-flange-zone-hole-d span,
.tmc-flange-zone-hole-n span,
.tmc-flange-zone-fastener span {
  left: 50%;
  top: 100%;
  transform: translate(-50%, 4px);
}

.tmc-flange-drawing-context,
.tmc-flange-drawing-message,
.tmc-flange-drawing-note {
  margin: 0;
  color: #526a63;
  font-size: 12.5px;
  line-height: 1.4;
}

.tmc-flange-drawing-popular {
  color: #18392f;
  font-weight: 850;
}

.tmc-flange-drawing-dimensions {
  color: #24483e;
  font-weight: 800;
}

.tmc-flange-drawing-draft,
.tmc-flange-drawing-final-note {
  color: #6b7f79;
}

.tmc-flange-facing-hint {
  display: grid;
  gap: 3px;
  width: min(100%, 560px);
  margin: -1px 0 0;
  padding: 8px 10px;
  border: 1px solid rgba(15, 95, 84, 0.18);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(246, 251, 248, 0.98), rgba(255, 255, 255, 0.98));
  color: #24483e;
}

.tmc-flange-facing-hint strong {
  color: #0f5f54;
  font-size: 12.4px;
  font-weight: 950;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.tmc-flange-facing-hint span {
  color: #18392f;
  font-size: 13.2px;
  font-weight: 900;
  line-height: 1.28;
}

.tmc-flange-facing-help {
  margin: 0;
  color: #5f746d;
  font-size: 12.2px;
  line-height: 1.35;
}

.tmc-flange-drawing-message {
  padding: 12px;
  border: 1px solid #eadcae;
  border-radius: 12px;
  background: #fffaf0;
  color: #604a13;
}

.tmc-flange-drawing-side {
  grid-area: side;
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  padding-top: 0;
}

.tmc-flange-drawing-selected {
  margin: 0;
  padding: 6px 8px;
  border: 1px solid rgba(15, 95, 84, 0.18);
  border-radius: 12px;
  background: rgba(244, 251, 248, 0.92);
  color: #0f5f54;
  font-size: 12.8px;
  font-weight: 900;
  line-height: 1.28;
}

.tmc-flange-drawing-legend {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  min-width: 0;
  margin: 0;
}

.tmc-flange-drawing-details {
  margin-top: 0;
  background: rgba(255, 255, 255, 0.92);
}

.tmc-flange-drawing-legend div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 30px;
  padding: 5px 7px;
  border: 1px solid #d9e7e2;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.tmc-flange-drawing-legend div:hover,
.tmc-flange-drawing-legend div:focus-visible,
.tmc-flange-drawing-legend div.is-active {
  border-color: rgba(15, 95, 84, 0.55);
  background: #f4fbf8;
  box-shadow: 0 0 0 3px rgba(15, 95, 84, 0.08);
  outline: none;
}

.tmc-flange-drawing-legend dt {
  min-width: 0;
  color: #425f56;
  font-size: 11.2px;
  font-weight: 900;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.tmc-flange-drawing-legend dd {
  justify-self: end;
  margin: 0;
  color: #102f27;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.14;
  text-align: right;
  white-space: nowrap;
}

.tmc-flange-drawing-note {
  grid-area: note;
}

.tmc-flange-joint-kit {
  display: grid;
  gap: 7px;
  margin-top: 8px;
  padding: 9px;
  border: 1px solid #d8e5dc;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 248, 0.98));
}

.tmc-flange-joint-kit[hidden] {
  display: none;
}

.tmc-flange-joint-kit-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tmc-flange-joint-kit-head h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 2px 0 0;
  color: #18392f;
  font-size: 15px;
  line-height: 1.2;
}

.tmc-flange-joint-kit-head > span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 7px;
  border: 1px solid rgba(122, 96, 32, 0.22);
  border-radius: 999px;
  background: #fff8e6;
  color: #6b551f;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tmc-flange-joint-kit-intro,
.tmc-flange-joint-kit-warning,
.tmc-flange-joint-kit-capability {
  margin: 0;
  color: #526a63;
  font-size: 12.2px;
  line-height: 1.34;
}

.tmc-flange-joint-kit-capability {
  padding-top: 2px;
  color: #49665e;
}

.tmc-flange-joint-kit-controls {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(190px, 1fr) minmax(150px, .8fr) minmax(220px, 1.1fr);
  gap: 6px;
  align-items: stretch;
}

.tmc-flange-joint-kit-controls label {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 6px 7px;
  border: 1px solid #dce8e1;
  border-radius: 12px;
  background: #fff;
}

.tmc-flange-joint-kit-controls label > span {
  color: #49665e;
  font-size: 11.4px;
  font-weight: 900;
}

.tmc-flange-joint-kit-controls select,
.tmc-flange-joint-kit-controls input[type="number"] {
  min-height: 34px;
  border: 1px solid #cfdde5;
  border-radius: 10px;
  background: #fff;
  color: var(--tmc-blue-dark);
  font: inherit;
  font-weight: 850;
}

.tmc-flange-joint-kit-controls input[type="number"] {
  width: 100%;
  padding: 0 10px;
}

.tmc-flange-joint-kit-check {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.tmc-flange-joint-kit-check input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.tmc-flange-joint-kit-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin: 0;
}

.tmc-flange-joint-kit-list div {
  display: grid;
  align-content: start;
  gap: 3px;
  min-width: 0;
  min-height: 58px;
  padding: 6px 7px;
  border: 1px solid #dae7e1;
  border-radius: 12px;
  background: #fff;
}

.tmc-flange-joint-kit-list dt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  color: #49665e;
  font-size: 11.4px;
  font-weight: 900;
  line-height: 1.15;
}

.tmc-flange-joint-kit-list dd {
  margin: 0;
  color: #18392f;
  font-size: 13.4px;
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.tmc-flange-joint-kit-list p {
  display: none;
  margin: 0;
  color: #6a7d78;
  font-size: 11.5px;
  line-height: 1.28;
}

.tmc-flange-joint-kit-warning {
  padding: 6px 8px;
  border: 1px solid rgba(122, 96, 32, 0.18);
  border-radius: 12px;
  background: #fffaf0;
  color: #66521d;
  font-weight: 800;
}

.tmc-flange-joint-kit-actions {
  margin-top: 0;
}

.tmc-flange-bulk {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid #d4e3dd;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 250, 248, 0.98));
}

.tmc-flange-bulk-head,
.tmc-flange-draft-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tmc-flange-bulk-head h3,
.tmc-flange-draft-head h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 2px 0 0;
  color: #18392f;
  font-size: 19px;
  line-height: 1.18;
}

.tmc-flange-bulk-head > span,
.tmc-flange-draft-head > span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid rgba(42, 109, 93, 0.2);
  border-radius: 999px;
  background: #eef8f4;
  color: #2f6a5c;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tmc-flange-bulk-note,
.tmc-flange-draft-note {
  margin: 0;
  color: #526a63;
  font-size: 12px;
  line-height: 1.32;
}

.tmc-flange-contact {
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid #dbe8e1;
  border-radius: 14px;
  background: #ffffff;
}

.tmc-flange-contact-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.tmc-flange-contact-head h4 {
  margin: 1px 0 0;
  color: #18392f;
  font-size: 15px;
  line-height: 1.2;
}

.tmc-flange-contact-head > span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid rgba(42, 109, 93, 0.18);
  border-radius: 999px;
  background: #f0f8f5;
  color: #2f6a5c;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tmc-flange-rfq-intro {
  margin: 0;
  color: #314f47;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.38;
}

.tmc-flange-contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.tmc-flange-contact label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: #314f47;
  font-size: 11.5px;
  font-weight: 900;
}

.tmc-flange-contact label b {
  color: #9b3d2d;
}

.tmc-flange-contact label small {
  color: #6f837c;
  font-size: 10px;
  font-weight: 750;
}

.tmc-flange-contact input,
.tmc-flange-contact textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #cfdde5;
  border-radius: 11px;
  background: #f9fcfb;
  color: var(--tmc-blue-dark);
  font: inherit;
  font-size: 12px;
  font-weight: 750;
}

.tmc-flange-contact input {
  min-height: 34px;
  padding: 7px 9px;
}

.tmc-flange-contact textarea {
  min-height: 34px;
  padding: 7px 9px;
  resize: vertical;
  line-height: 1.32;
}

.tmc-flange-contact input:focus,
.tmc-flange-contact textarea:focus {
  border-color: rgba(15, 95, 84, 0.58);
  box-shadow: 0 0 0 3px rgba(15, 95, 84, 0.08);
  outline: none;
}

.tmc-flange-contact-comment {
  grid-column: span 2;
}

.tmc-flange-contact-note,
.tmc-flange-contact-trust,
.tmc-flange-file-note {
  margin: 0;
  color: #526a63;
  font-size: 11.5px;
  line-height: 1.34;
}

.tmc-flange-file-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px dashed rgba(15, 95, 84, 0.38);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(240, 248, 245, 0.98), rgba(250, 253, 251, 0.96));
  color: #2e594f;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.tmc-flange-file-note > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.tmc-flange-file-note strong {
  color: #173d36;
  font-size: 12.5px;
  font-weight: 950;
}

.tmc-flange-file-note span {
  color: #486960;
  font-size: 11.5px;
  font-weight: 750;
  line-height: 1.38;
}

.tmc-file-placeholder-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(83, 103, 96, 0.2);
  border-radius: 999px;
  background: #eef3f1;
  color: #7b8d87;
  font: inherit;
  font-size: 11.5px;
  font-weight: 900;
  cursor: not-allowed;
}

a.tmc-file-placeholder-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
}

.tmc-calculator-file-field {
  flex: 0 1 260px;
  display: grid;
  gap: 5px;
  min-width: 210px;
  padding: 8px 10px;
  border: 1px solid rgba(42, 109, 93, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.76);
  color: #264c45;
  font-size: 11.5px;
  font-weight: 900;
}

.tmc-calculator-file-field input {
  width: 100%;
  max-width: 100%;
  color: #486960;
  font-size: 11px;
  font-weight: 750;
}

.tmc-calculator-submit-button {
  background: linear-gradient(135deg, #0f5f54, #184c63);
}

.tmc-flange-contact-trust {
  color: #6d5a20;
  font-weight: 850;
}

.tmc-flange-rfq-preview {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(15, 95, 84, .24);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 252, 250, 0.96));
  box-shadow: 0 16px 36px rgba(21, 64, 72, .08);
}

.tmc-flange-rfq-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  color: #28473f;
  font-size: 12px;
}

.tmc-flange-rfq-preview-head > div {
  display: grid;
  gap: 3px;
  min-width: 148px;
}

.tmc-flange-rfq-preview-head strong {
  color: #143f37;
  font-size: 15px;
  font-weight: 950;
}

.tmc-flange-rfq-preview-head > div span {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e9f4ef;
  color: #2f6a5c;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.tmc-flange-rfq-preview-head span {
  color: #667b74;
  font-size: 11.5px;
  font-weight: 750;
  line-height: 1.38;
}

.tmc-flange-rfq-preview textarea {
  min-height: 260px;
  max-height: 460px;
  padding: 14px 16px;
  border-color: rgba(15, 95, 84, .22);
  border-radius: 14px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 253, 252, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.72),
    inset 0 10px 22px rgba(24, 73, 83, 0.035);
  overflow: auto;
}

.tmc-flange-rfq-preview.is-ready {
  border-color: rgba(15, 95, 84, .42);
  box-shadow: 0 18px 42px rgba(21, 64, 72, .12);
}

.tmc-button:disabled {
  cursor: not-allowed;
  border-color: rgba(83, 103, 96, 0.2);
  background: #eef3f1;
  color: #7b8d87;
  box-shadow: none;
  opacity: 0.72;
}

.tmc-flange-bulk textarea {
  width: 100%;
  min-height: 124px;
  resize: vertical;
  padding: 12px;
  border: 1px solid #cfdde5;
  border-radius: 14px;
  background: #fff;
  color: var(--tmc-blue-dark);
  font: inherit;
  font-weight: 750;
  line-height: 1.45;
}

.tmc-flange-bulk textarea:focus {
  border-color: rgba(15, 95, 84, 0.58);
  box-shadow: 0 0 0 3px rgba(15, 95, 84, 0.08);
  outline: none;
}

.tmc-flange-bulk-actions,
.tmc-flange-draft-actions {
  margin-top: 0;
}

.tmc-flange-bulk-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tmc-flange-bulk-results[hidden] {
  display: none;
}

.tmc-flange-bulk-column {
  min-width: 0;
  padding: 11px;
  border: 1px solid #dce8e1;
  border-radius: 14px;
  background: #fff;
}

.tmc-flange-bulk-column h4 {
  margin: 0 0 8px;
  color: #18392f;
  font-size: 14px;
  line-height: 1.2;
}

.tmc-flange-bulk-column ul,
.tmc-flange-draft ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tmc-flange-bulk-column li,
.tmc-flange-draft li {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid #e0ebe5;
  border-radius: 12px;
  background: #f9fcfb;
}

.tmc-flange-draft li.tmc-flange-draft-manual {
  border-color: #ead9a8;
  background: #fffaf0;
}

.tmc-flange-draft li.tmc-flange-draft-empty {
  color: #60746e;
  font-size: 13px;
  font-weight: 750;
  background: #fff;
  border-style: dashed;
}

.tmc-flange-bulk-column strong,
.tmc-flange-draft strong {
  color: #18392f;
  font-size: 12.3px;
  font-weight: 900;
  line-height: 1.24;
}

.tmc-flange-bulk-column small,
.tmc-flange-draft small {
  color: #60746e;
  font-size: 11.2px;
  font-weight: 750;
  line-height: 1.3;
}

.tmc-flange-draft .tmc-flange-draft-kit-summary {
  color: #49665e;
  font-weight: 850;
}

.tmc-flange-draft .tmc-flange-draft-status-label {
  color: #7a6425;
  font-weight: 850;
}

.tmc-flange-draft-details {
  margin-top: 1px;
  color: #60746e;
}

.tmc-flange-draft-details summary {
  color: #49665e;
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 850;
}

.tmc-flange-draft-details small {
  display: block;
  margin-top: 4px;
}

.tmc-flange-draft-item-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 2px;
}

.tmc-flange-draft-remove {
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid rgba(152, 62, 51, 0.22);
  border-radius: 999px;
  background: #fff;
  color: #7d3128;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
}

.tmc-flange-draft-remove:hover,
.tmc-flange-draft-remove:focus-visible {
  border-color: rgba(152, 62, 51, 0.42);
  background: #fff7f5;
  outline: none;
}

.tmc-flange-bulk-column select {
  min-height: 34px;
  border: 1px solid #cfdde5;
  border-radius: 10px;
  background: #fff;
  color: var(--tmc-blue-dark);
  font: inherit;
  font-weight: 800;
}

.tmc-flange-draft {
  display: grid;
  gap: 7px;
  margin-top: 8px;
  padding: 9px;
  border: 1px solid #cfe2d8;
  border-radius: 16px;
  background: #f7fbf8;
}

.tmc-flange-draft:focus {
  outline: none;
}

.tmc-flange-draft-flash {
  animation: tmc-flange-draft-flash 1.65s ease-out 1;
}

@keyframes tmc-flange-draft-flash {
  0% {
    border-color: rgba(15, 95, 84, .6);
    box-shadow: 0 0 0 4px rgba(15, 95, 84, .14), 0 16px 34px rgba(15, 95, 84, .12);
    background: #eefaf5;
  }
  55% {
    border-color: rgba(15, 95, 84, .36);
    box-shadow: 0 0 0 3px rgba(15, 95, 84, .08);
    background: #f3fbf7;
  }
  100% {
    border-color: #cfe2d8;
    box-shadow: none;
    background: #f7fbf8;
  }
}

.tmc-flange-draft[hidden] {
  display: none;
}

.tmc-clarify {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid #eadcae;
  border-radius: 16px;
  background: #fffaf0;
}

.tmc-clarify ul {
  margin: 6px 0 0 18px;
  padding: 0;
  color: #5e4b17;
  font-size: 13px;
}

.tmc-clarify li + li {
  margin-top: 4px;
}

#tmc-flange-result .tmc-result-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin-top: 5px;
}

.tmc-flange-work-summary #tmc-flange-result-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0;
}

#tmc-flange-result .tmc-result-grid div {
  min-height: 40px;
  justify-content: flex-start;
  padding: 5px 7px;
  border-radius: 12px;
}

#tmc-flange-result .tmc-result-grid dt {
  font-size: 10.4px;
  line-height: 1.2;
}

#tmc-flange-result .tmc-result-grid dd {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.2;
}

#tmc-flange-result .tmc-result-grid .tmc-result-primary dd {
  font-size: 13.4px;
}

#tmc-flange-result .tmc-result-grid .tmc-result-context {
  grid-column: 1 / -1;
  min-height: 0;
  padding: 7px 9px;
  border-color: rgba(31, 95, 143, 0.24);
  background: linear-gradient(180deg, #ffffff, #f5fbfd);
}

#tmc-flange-result .tmc-result-grid .tmc-result-context dt {
  color: var(--tmc-blue-dark);
  font-size: 9.8px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#tmc-flange-result .tmc-result-grid .tmc-result-context dd {
  margin-top: 3px;
  color: var(--tmc-blue-dark);
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.tmc-muted {
  background: rgba(255, 255, 255, 0.82);
  text-align: left;
}

.tmc-muted h2 {
  font-size: 20px;
}

.tmc-muted p {
  max-width: 840px;
  margin: 8px 0 0;
}

.tmc-muted ul {
  max-width: 900px;
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--tmc-muted);
}

.tmc-muted li + li {
  margin-top: 4px;
}

.tmc-support-project {
  padding: 8px 12px 5px;
  border-color: rgba(31, 95, 143, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(246, 251, 253, 0.92));
}

.tmc-support-project > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: var(--tmc-blue-dark);
  font-weight: 900;
  list-style: none;
}

.tmc-support-project > summary::-webkit-details-marker {
  display: none;
}

.tmc-support-project-title {
  min-width: 0;
}

.tmc-support-project-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  min-height: 30px;
  padding: 6px 13px;
  border: 1px solid rgba(31, 95, 143, 0.22);
  border-radius: 999px;
  background: #fff;
  color: var(--tmc-blue-dark);
  box-shadow: 0 8px 18px rgba(31, 95, 143, 0.08);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.tmc-support-project-toggle::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .18s ease;
}

.tmc-support-project[open] .tmc-support-project-toggle::after {
  transform: translateY(2px) rotate(225deg);
}

.tmc-support-project-toggle-open,
.tmc-support-project[open] .tmc-support-project-toggle-closed {
  display: none;
}

.tmc-support-project[open] .tmc-support-project-toggle-open {
  display: inline;
}

.tmc-support-project-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 10px;
  align-items: start;
  margin-top: -1px;
  padding-right: 88px;
  color: #405564;
}

.tmc-support-project-body h3 {
  margin: 0 0 8px;
  color: var(--tmc-ink);
  font-size: 18px;
  line-height: 1.2;
}

.tmc-support-project-body p {
  max-width: none;
  margin: 0;
  font-size: 14px;
  line-height: 1.38;
}

.tmc-support-project-effect {
  margin-top: 3px !important;
}

.tmc-support-project-thanks {
  margin-top: 4px !important;
  color: #244b63;
  font-weight: 800;
}

.tmc-support-project-qr {
  display: grid;
  justify-items: center;
  justify-self: end;
  align-self: start;
  gap: 2px;
  margin: -34px 48px -10px 0;
}

.tmc-support-project-qr img {
  display: block;
  width: 106px;
  height: auto;
  border: 1px solid #d8e5ed;
  border-radius: 11px;
  background: #fff;
  padding: 5px;
}

.tmc-support-project-qr figcaption {
  color: var(--tmc-muted);
  font-size: 10px;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
}

.tmc-embed-panel {
  display: grid;
  grid-template-columns: minmax(230px, 0.75fr) minmax(300px, 1.25fr);
  align-items: start;
  gap: 10px 18px;
  border-color: rgba(31, 95, 143, 0.22);
  background: linear-gradient(180deg, #ffffff, #f5fafc);
}

.tmc-embed-panel .tmc-card-head {
  grid-row: auto;
  margin-bottom: 0;
}

.tmc-embed-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tmc-embed-option {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(31, 95, 143, .16);
  border-radius: 18px;
  background: rgba(255, 255, 255, .82);
}

.tmc-embed-option h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
}

.tmc-embed-code-label {
  margin-top: 0;
}

.tmc-embed-panel .tmc-actions {
  margin-top: 0;
}

.tmc-embed-code {
  min-height: 82px;
  resize: vertical;
  font-family: "Courier New", monospace;
  font-size: 13px;
  line-height: 1.45;
}

body.tmc-embed-mode {
  background: #f6fafc;
}

body.tmc-embed-mode .tmc-header {
  position: static;
}

body.tmc-embed-mode .tmc-nav {
  padding: 10px 0;
}

body.tmc-embed-mode .tmc-nav-links,
body.tmc-embed-mode .tmc-cards,
body.tmc-embed-mode .tmc-embed-panel,
body.tmc-embed-mode .tmc-muted {
  display: none !important;
}

body.tmc-embed-mode .tmc-widget-request {
  display: flex;
}

body.tmc-embed-mode.tmc-embed-type-weight .tmc-hero,
body.tmc-embed-mode.tmc-embed-type-flange .tmc-hero,
body.tmc-embed-mode.tmc-embed-type-pipe .tmc-hero {
  display: none !important;
}

body.tmc-embed-mode.tmc-embed-type-weight #flange-calculator,
body.tmc-embed-mode.tmc-embed-type-weight #pipe-calculator,
body.tmc-embed-mode.tmc-embed-type-flange #weight-calculator,
body.tmc-embed-mode.tmc-embed-type-flange #pipe-calculator,
body.tmc-embed-mode.tmc-embed-type-pipe #weight-calculator,
body.tmc-embed-mode.tmc-embed-type-pipe #flange-calculator {
  display: none !important;
}

body.tmc-embed-mode .tmc-shell {
  width: min(980px, calc(100% - 20px));
  padding: 12px 0 22px;
}

body.tmc-embed-mode .tmc-hero {
  padding: 9px 14px 11px;
}

@media (max-width: 1100px) {
  .tmc-flange-main-grid,
  .tmc-flange-extra-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .tmc-flange-drawing {
    grid-template-columns: minmax(0, 1.42fr) minmax(232px, .9fr);
  }
}

@media (max-width: 980px) {
  .tmc-flange-work-panel {
    grid-template-columns: 1fr;
    grid-template-areas:
      "variant"
      "visual"
      "summary";
  }

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

@media (max-width: 720px) {
  .tmc-flange-main-grid,
  .tmc-flange-extra-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .tmc-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .tmc-cards,
  .tmc-weight-row,
  .tmc-grid-three,
  .tmc-grid-four,
  .tmc-engineering-row,
  .tmc-dynamic-fields,
  .tmc-result-grid {
    grid-template-columns: 1fr;
  }

  #tmc-flange-result .tmc-result-grid {
    grid-template-columns: 1fr;
  }

  .tmc-flange-work-summary #tmc-flange-result-grid {
    grid-template-columns: 1fr;
  }

  .tmc-engineering-cell {
    min-height: auto;
    grid-template-rows: auto 36px auto;
  }

  .tmc-flange-main-grid .tmc-engineering-cell,
  .tmc-flange-extra-grid .tmc-engineering-cell {
    min-height: auto;
    grid-template-rows: auto 36px auto;
    padding: 6px 8px;
  }

  .tmc-flange-main-grid .tmc-engineering-cell {
    grid-template-rows: auto 38px;
    padding: 6px 8px;
  }

  .tmc-flange-extra-grid .tmc-engineering-cell {
    grid-template-rows: auto 38px;
    padding: 6px 8px;
  }

  .tmc-flange-main-grid .tmc-engineering-cell > span,
  .tmc-flange-extra-grid .tmc-engineering-cell > span,
  .tmc-flange-main-grid .tmc-field-hint,
  .tmc-flange-extra-grid .tmc-field-hint {
    height: auto;
  }

  .tmc-flange-drawing-body {
    grid-template-columns: 1fr;
  }

  .tmc-flange-drawing {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "figure"
      "side"
      "note";
  }

  .tmc-flange-drawing-side {
    padding-top: 0;
  }

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

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

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

  .tmc-weight-table label,
  .tmc-weight-empty-cell {
    min-height: auto;
    grid-template-rows: auto 38px auto;
  }

  .tmc-engineering-cell-wide {
    grid-column: auto;
  }

  .tmc-shell {
    padding-top: 16px;
  }

  .tmc-card-link {
    min-height: auto;
    justify-content: flex-start;
  }

  .tmc-card-link > div {
    flex: 1 1 auto;
    max-width: none;
  }

  .tmc-hero {
    padding: 18px 12px 18px;
  }

  .tmc-hero-content {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 12px;
  }

  .tmc-hero-title {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    min-height: auto;
    row-gap: 4px;
    padding: 0;
  }

  .tmc-hero-actions {
    grid-template-columns: 1fr;
    width: min(360px, 100%);
    gap: 9px;
  }

  .tmc-hero-actions .tmc-button {
    min-width: 0;
  }

  .tmc-hero-title .tmc-kicker {
    justify-self: center;
    max-width: none;
    margin: 0;
    text-align: center;
    white-space: normal;
  }

  .tmc-hero-title h1 {
    grid-column: 1;
    font-size: clamp(31px, 8.8vw, 38px);
    line-height: 1;
  }

  label span,
  .tmc-field-hint {
    display: block;
    min-height: 0;
  }

  .tmc-result-grid div {
    min-height: auto;
  }

  .tmc-advanced summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .tmc-advanced summary small {
    text-align: left;
  }

  .tmc-flange-disclosure summary small {
    max-width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .tmc-embed-panel {
    grid-template-columns: 1fr;
  }

  .tmc-embed-panel .tmc-card-head {
    grid-row: auto;
  }
}

/* TM 2026-05-09: role-based final hero composition.
   P1 is the centered head, P2 is the action row, P3 is a corner label. */
.tmc-shell {
  padding: 18px 0 44px;
}

.tmc-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(4px, .5vw, 6px) clamp(22px, 3.6vw, 44px) clamp(24px, 2.5vw, 30px);
  text-align: center;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(246, 251, 253, .96)),
    linear-gradient(120deg, rgba(31, 95, 143, .08), rgba(240, 165, 33, .06));
}

.tmc-hero::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 15px;
  width: min(560px, calc(100% - 64px));
  height: 1px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(31, 95, 143, .22), rgba(240, 165, 33, .2), transparent);
}

.tmc-hero-content {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  justify-items: center;
  gap: clamp(14px, 1.55vw, 18px);
  width: 100%;
  max-width: 760px;
  margin: 0;
  margin-left: auto;
  margin-right: auto;
}

.tmc-hero-title {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-content: center;
  width: min(560px, 100%);
  min-height: 40px;
  padding: 0;
}

.tmc-hero-label {
  position: absolute;
  z-index: 1;
  top: clamp(8px, .85vw, 10px);
  left: clamp(16px, 2.1vw, 26px);
  max-width: 170px;
  margin: 0;
  color: rgba(31, 95, 143, .84);
  font-size: 10.5px;
  line-height: 1.08;
  letter-spacing: .14em;
  text-align: left;
  white-space: normal;
}

.tmc-hero-title h1 {
  grid-column: 1;
  justify-self: center;
  font-size: clamp(31px, 3.25vw, 40px);
  line-height: .96;
  letter-spacing: -.03em;
}

.tmc-hero-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(210px, 1fr));
  justify-self: center;
  width: min(560px, 100%);
  gap: clamp(14px, 1.6vw, 18px);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.tmc-hero-actions .tmc-button {
  width: 100%;
  min-height: 42px;
  justify-content: center;
  text-align: center;
  border-radius: 14px;
}

.tmc-hero-request-note {
  max-width: 520px;
  margin: -4px 0 0;
  color: #4f665f;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.tmc-cards {
  gap: 14px;
  margin: 16px 0 24px;
}

.tmc-cards article {
  min-height: 84px;
}

.tmc-card-link {
  grid-template-columns: 36px minmax(0, 238px);
  justify-content: center;
  gap: 13px;
  min-height: 84px;
  padding: 13px clamp(16px, 2vw, 22px);
}

.tmc-card-link > div {
  width: 100%;
  max-width: 238px;
}

.tmc-cards span {
  width: 34px;
  height: 34px;
}

#weight-calculator,
#flange-calculator,
#pipe-calculator {
  margin-top: 32px;
  scroll-margin-top: 126px;
}

.tmc-card {
  padding: clamp(18px, 2.1vw, 24px);
  border-radius: 24px;
}

.tmc-card-head {
  gap: 5px;
  margin-bottom: 12px;
}

.tmc-form {
  margin-top: 10px;
}

.tmc-actions {
  gap: 12px;
  margin-top: 12px;
}

.tmc-result {
  margin-top: 16px;
  padding: 16px;
  border-radius: 22px;
}

.tmc-result-grid div {
  min-height: 62px;
}

.tmc-calc-notice-bottom {
  margin-top: 10px;
  padding-top: 8px;
}

.tmc-card-brand {
  margin-top: 8px;
  min-height: 46px;
  padding: 6px 0;
}

.tmc-card-footer {
  min-height: 48px;
  padding: 8px 0 6px;
}

.tmc-card-footer .tmc-card-brand {
  margin: 0;
  min-height: 32px;
  padding: 0;
}

.tmc-embed-panel {
  grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr);
  gap: 10px 18px;
  padding-top: clamp(16px, 1.7vw, 20px);
  padding-bottom: clamp(16px, 1.7vw, 20px);
}

.tmc-embed-options {
  grid-column: 1 / -1;
}

  .tmc-embed-code {
    min-height: 68px;
  }

body.tmc-embed-mode .tmc-shell {
  width: min(980px, calc(100% - 20px));
  padding: 12px 0 22px;
}

body.tmc-embed-mode .tmc-hero {
  padding: 12px 16px 18px;
}

body.tmc-embed-mode .tmc-hero-content {
  grid-template-columns: 1fr;
  gap: 10px;
  justify-items: center;
  text-align: center;
}

body.tmc-embed-mode .tmc-hero-title {
  grid-template-columns: minmax(92px, 1fr) auto minmax(92px, 1fr);
  justify-items: stretch;
  width: min(460px, 100%);
  min-height: auto;
  padding: 0;
}

body.tmc-embed-mode .tmc-hero-title .tmc-kicker {
  justify-self: end;
  max-width: 108px;
  margin: 0 0 5px;
  text-align: right;
}

body.tmc-embed-mode .tmc-hero-title h1 {
  justify-self: center;
  font-size: clamp(22px, 3vw, 26px);
}

body.tmc-embed-mode .tmc-hero-actions {
  justify-self: center;
  width: min(420px, 100%);
  padding: 0;
}

@media (max-width: 860px) {
  #weight-calculator,
  #flange-calculator,
  #pipe-calculator {
    scroll-margin-top: 104px;
  }

  .tmc-hero {
    padding: 10px 16px 24px;
    text-align: center;
  }

  .tmc-hero::before {
    bottom: 13px;
    width: min(340px, calc(100% - 40px));
    height: 1px;
    transform: translateX(-50%);
  }

  .tmc-hero-content {
    grid-template-columns: 1fr;
    gap: 13px;
    justify-items: center;
    padding-top: 8px;
  }

  .tmc-hero-title {
    grid-template-columns: 1fr;
    justify-items: stretch;
    min-height: auto;
    width: min(430px, 100%);
    padding: 0;
  }

  .tmc-hero-label {
    top: 10px;
    left: 14px;
    max-width: 138px;
    font-size: 9.5px;
    letter-spacing: .1em;
  }

  .tmc-hero-title h1 {
    justify-self: center;
    font-size: clamp(25px, 6.4vw, 31px);
  }

  .tmc-hero-actions {
    justify-self: center;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(410px, 100%);
    gap: 10px;
    padding: 0;
  }

  .tmc-hero-actions .tmc-button {
    min-height: 38px;
    padding-left: 10px;
    padding-right: 10px;
    font-size: 13px;
  }

  .tmc-card-link {
    grid-template-columns: 38px minmax(0, 1fr);
    justify-content: start;
    min-height: 76px;
  }

  .tmc-card-link > div {
    max-width: none;
  }

  .tmc-beta-panel ul {
    grid-template-columns: 1fr;
  }

  .tmc-embed-panel {
    grid-template-columns: 1fr;
  }

  .tmc-embed-options {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .tmc-card-footer {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .tmc-card-footer .tmc-calc-notice-bottom {
    justify-self: stretch;
  }

  .tmc-card-footer .tmc-card-brand {
    justify-self: end;
  }

  .tmc-flange-main-grid,
  .tmc-flange-extra-grid {
    grid-template-columns: 1fr;
  }

  .tmc-flange-drawing {
    padding: 10px;
  }

  .tmc-flange-drawing-legend {
    grid-template-columns: 1fr;
  }

  .tmc-flange-drawing-legend div {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 4px;
  }

  .tmc-flange-drawing-legend dd {
    justify-self: start;
    text-align: left;
  }

  .tmc-hero {
    padding-top: 8px;
    padding-bottom: 22px;
  }

  .tmc-hero-content {
    padding-top: 10px;
  }

  .tmc-hero-title {
    grid-template-columns: 1fr;
    justify-items: center;
    width: min(310px, 100%);
  }

  .tmc-hero-label {
    top: 9px;
    left: 12px;
    max-width: 128px;
    font-size: 8.8px;
    letter-spacing: .085em;
  }

  .tmc-hero-title h1 {
    grid-column: 1;
    font-size: clamp(28px, 8vw, 31px);
  }
}

@media (max-width: 420px) {
  .tmc-hero-actions {
    grid-template-columns: 1fr;
    width: min(270px, 100%);
  }
}

@media (max-width: 980px) {
  .tmc-flange-bulk-results {
    grid-template-columns: 1fr;
  }

  .tmc-flange-joint-kit-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tmc-flange-joint-kit-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .tmc-flange-bulk-head,
  .tmc-flange-draft-head,
  .tmc-flange-contact-head {
    display: grid;
  }

  .tmc-flange-bulk-head > span,
  .tmc-flange-draft-head > span,
  .tmc-flange-contact-head > span {
    justify-self: start;
    white-space: normal;
  }

  .tmc-flange-contact-grid {
    grid-template-columns: 1fr;
  }

  .tmc-flange-contact-comment {
    grid-column: auto;
  }

  .tmc-flange-joint-kit-head,
  .tmc-flange-joint-kit-controls {
    grid-template-columns: 1fr;
  }

  .tmc-flange-joint-kit-head {
    display: grid;
  }

  .tmc-flange-joint-kit-head > span {
    justify-self: start;
    white-space: normal;
  }

  .tmc-flange-joint-kit-list {
    grid-template-columns: 1fr;
  }

  .tmc-known-compact ul {
    grid-template-columns: 1fr;
  }

  .tmc-help-tip::after {
    right: auto;
    left: 50%;
    width: min(240px, calc(100vw - 42px));
    transform: translateX(-50%);
  }

  .tmc-help-tip::before {
    right: auto;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
  }
}

/* TM 2026-05-16: global visual alignment for calculator cards and compact result blocks. */
.tmc-cards {
  gap: clamp(14px, 1.6vw, 20px);
  align-items: stretch;
  margin: 18px 0 26px;
}

.tmc-cards article {
  min-height: 112px;
  border-radius: 24px;
  overflow: hidden;
}

.tmc-card-link {
  grid-template-columns: minmax(58px, 70px) minmax(0, 1fr);
  align-items: center;
  justify-content: stretch;
  gap: clamp(14px, 1.8vw, 20px);
  min-height: 112px;
  padding: clamp(16px, 2vw, 22px);
}

.tmc-card-link > div {
  display: grid;
  align-content: center;
  gap: 5px;
  max-width: none;
  min-height: 64px;
}

.tmc-cards span {
  width: clamp(54px, 5vw, 66px);
  height: clamp(54px, 5vw, 66px);
  border-width: 2px;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(232, 244, 250, 0.98)),
    linear-gradient(135deg, rgba(31, 95, 143, 0.18), rgba(240, 165, 33, 0.10));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.82),
    0 10px 20px rgba(24, 63, 97, 0.10);
  color: var(--tmc-blue-dark);
  font-size: clamp(20px, 2.2vw, 27px);
  font-weight: 950;
  letter-spacing: -0.02em;
  line-height: 1;
}

.tmc-card-link h2 {
  font-size: clamp(18px, 1.65vw, 23px);
  line-height: 1.12;
}

.tmc-card-link p {
  margin: 0;
  color: #607386;
  font-size: 13.5px;
  line-height: 1.32;
}

.tmc-card-link:hover span,
.tmc-card-link:focus-visible span {
  border-color: rgba(31, 95, 143, 0.42);
  transform: translateY(-1px);
}

.tmc-card,
.tmc-result,
.tmc-flange-joint-kit,
.tmc-flange-draft,
.tmc-flange-drawing,
.tmc-advanced,
.tmc-designation,
.tmc-known,
.tmc-flange-source-details {
  border-radius: 22px;
}

.tmc-weight-table label,
.tmc-weight-empty-cell,
.tmc-engineering-cell,
#tmc-flange-result .tmc-result-grid div,
.tmc-flange-joint-kit-list div,
.tmc-flange-draft li,
.tmc-flange-drawing-legend div {
  border-radius: 14px;
  padding-left: 10px;
  padding-right: 10px;
}

.tmc-weight-table label,
.tmc-weight-empty-cell,
.tmc-engineering-cell {
  align-content: center;
}

.tmc-result,
.tmc-flange-joint-kit,
.tmc-flange-draft {
  padding: clamp(12px, 1.4vw, 16px);
}

.tmc-flange-work-panel,
.tmc-weight-row,
.tmc-engineering-row,
.tmc-flange-joint-kit-controls,
.tmc-flange-joint-kit-list,
.tmc-flange-contact-grid {
  gap: clamp(7px, 1vw, 11px);
}

.tmc-result-grid div,
#tmc-flange-result .tmc-result-grid div {
  align-content: center;
}

@media (max-width: 860px) {
  .tmc-cards {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .tmc-card-link {
    grid-template-columns: minmax(50px, 58px) minmax(0, 1fr);
    justify-content: stretch;
    min-height: 88px;
    padding: 14px 16px;
  }

  .tmc-card-link > div {
    min-height: auto;
  }

  .tmc-cards span {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    font-size: 21px;
  }
}

@media (max-width: 420px) {
  .tmc-card-link {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px;
  }

  .tmc-cards span {
    width: 46px;
    height: 46px;
    font-size: 19px;
  }
}

/* TM 2026-05-16: vertical compression for calculator landing area. */
.tmc-shell {
  padding: 10px 0 34px;
}

.tmc-hero {
  min-height: 0;
  padding: clamp(10px, 1.15vw, 14px) clamp(18px, 3vw, 34px) clamp(14px, 1.5vw, 18px);
}

.tmc-hero::before {
  bottom: 8px;
  width: min(640px, calc(100% - 54px));
}

.tmc-hero-content {
  grid-template-columns: minmax(180px, 0.62fr) minmax(360px, 0.92fr);
  align-items: center;
  justify-items: stretch;
  gap: clamp(18px, 4.2vw, 52px);
  max-width: 960px;
}

.tmc-hero-title {
  justify-content: start;
  justify-items: start;
  min-height: 0;
  width: auto;
}

.tmc-hero-title h1 {
  justify-self: start;
  font-size: clamp(28px, 2.8vw, 36px);
}

.tmc-hero-label {
  top: 8px;
  left: clamp(14px, 2vw, 24px);
  font-size: 9.8px;
}

.tmc-hero-actions {
  justify-self: stretch;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 3.4vw, 48px);
  width: 100%;
  max-width: 620px;
}

.tmc-hero-actions .tmc-button {
  min-height: 38px;
  padding-top: 7px;
  padding-bottom: 7px;
}

.tmc-cards {
  gap: clamp(10px, 1.2vw, 14px);
  margin: 10px 0 16px;
}

.tmc-cards article {
  min-height: 86px;
  border-radius: 20px;
}

.tmc-card-link {
  grid-template-columns: minmax(48px, 56px) minmax(0, 1fr);
  gap: clamp(12px, 1.4vw, 16px);
  min-height: 86px;
  padding: clamp(12px, 1.35vw, 16px);
}

.tmc-card-link > div {
  gap: 3px;
  min-height: 0;
}

.tmc-cards span {
  width: clamp(46px, 4vw, 54px);
  height: clamp(46px, 4vw, 54px);
  border-radius: 16px;
  font-size: clamp(18px, 1.85vw, 23px);
}

.tmc-card-link h2 {
  font-size: clamp(17px, 1.45vw, 21px);
}

.tmc-card-link p {
  font-size: 12.8px;
  line-height: 1.26;
}

#weight-calculator,
#flange-calculator,
#pipe-calculator {
  margin-top: 22px;
  scroll-margin-top: 104px;
}

.tmc-card {
  padding: clamp(16px, 1.8vw, 21px);
}

@media (max-width: 860px) {
  .tmc-shell {
    padding-top: 8px;
  }

  .tmc-hero {
    padding: 12px 14px 16px;
  }

  .tmc-hero::before {
    bottom: 8px;
    width: min(320px, calc(100% - 36px));
  }

  .tmc-hero-content {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 10px;
    max-width: 430px;
  }

  .tmc-hero-title {
    justify-items: center;
    text-align: center;
  }

  .tmc-hero-title h1 {
    justify-self: center;
    font-size: clamp(24px, 6vw, 30px);
  }

  .tmc-hero-label {
    top: 8px;
    left: 12px;
    font-size: 9px;
  }

  .tmc-hero-actions {
    gap: 8px;
    width: min(430px, 100%);
  }

  .tmc-hero-actions .tmc-button {
    min-height: 36px;
    font-size: 12.5px;
  }

  .tmc-cards {
    gap: 8px;
    margin: 8px 0 14px;
  }

  .tmc-cards article {
    min-height: 76px;
  }

  .tmc-card-link {
    grid-template-columns: 44px minmax(0, 1fr);
    min-height: 76px;
    padding: 11px 12px;
  }

  .tmc-cards span {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 18px;
  }
}

@media (max-width: 420px) {
  .tmc-hero-actions {
    grid-template-columns: 1fr;
  }

  .tmc-card-link {
    grid-template-columns: 42px minmax(0, 1fr);
    min-height: 72px;
  }

  .tmc-cards span {
    width: 42px;
    height: 42px;
    font-size: 17px;
  }
}

/* TM 2026-05-16: result panel recomposition after visual QA. */
.tmc-flange-work-panel {
  grid-template-columns: minmax(250px, 0.72fr) minmax(0, 1.18fr);
  grid-template-areas:
    "variant visual"
    "summary summary";
  gap: clamp(10px, 1.35vw, 16px);
}

.tmc-flange-work-variant {
  align-self: start;
}

.tmc-flange-work-summary {
  grid-template-columns: 1fr;
  align-self: start;
  gap: 9px;
}

.tmc-flange-work-visual .tmc-flange-drawing {
  grid-template-columns: 1fr;
  grid-template-areas:
    "head"
    "figure"
    "side"
    "note";
  gap: 10px;
  min-height: 100%;
  padding: clamp(10px, 1.2vw, 14px);
}

.tmc-flange-work-visual .tmc-flange-drawing-body {
  justify-items: center;
}

.tmc-flange-work-visual .tmc-flange-figure4,
.tmc-flange-work-visual .tmc-flange-figure7 {
  justify-self: center;
  max-width: 780px;
}

.tmc-flange-work-visual .tmc-flange-drawing-side {
  gap: 8px;
}

.tmc-flange-work-visual .tmc-flange-drawing-details {
  margin-top: 0;
}

.tmc-flange-work-visual .tmc-flange-drawing-details[open] > summary::after {
  content: "Скрыть";
}

.tmc-flange-work-visual .tmc-flange-drawing-legend {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tmc-variant-cards {
  gap: 7px;
}

.tmc-variant-card {
  gap: 5px;
  padding: 9px;
}

.tmc-variant-card h4 {
  margin-bottom: 1px;
}

.tmc-variant-label {
  font-size: 10.6px;
}

.tmc-variant-gost {
  font-size: 12.4px;
  line-height: 1.24;
}

.tmc-variant-action {
  margin: 2px 0 0;
  color: #1f5f8f;
  font-size: 11.4px;
  font-weight: 900;
}

.tmc-variant-missing {
  margin-top: 3px;
  padding-top: 3px;
  font-size: 11.5px;
  line-height: 1.24;
}

.tmc-flange-work-summary #tmc-flange-result-grid {
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 7px;
}

.tmc-flange-work-summary #tmc-flange-result-grid div {
  min-width: 0;
  min-height: 44px;
}

.tmc-flange-work-summary #tmc-flange-result-grid dd {
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .tmc-flange-work-panel {
    grid-template-columns: 1fr;
    grid-template-areas:
      "variant"
      "visual"
      "summary";
  }

  .tmc-flange-work-visual .tmc-flange-drawing-legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .tmc-flange-work-visual .tmc-flange-drawing-legend {
    grid-template-columns: 1fr;
  }

  .tmc-flange-work-summary #tmc-flange-result-grid {
    grid-template-columns: 1fr;
  }
}

/* TM 2026-05-16: active calculator tabs and compact hero restore. */
.tmc-shell {
  padding: 12px 0 36px;
}

.tmc-hero {
  padding: clamp(10px, 1.25vw, 14px) clamp(22px, 4vw, 46px);
  min-height: 0;
}

.tmc-hero::before {
  display: none;
}

.tmc-hero-content {
  grid-template-columns: minmax(210px, 0.8fr) minmax(430px, 1.2fr);
  align-items: center;
  justify-items: stretch;
  gap: clamp(26px, 6vw, 92px);
  max-width: 1080px;
}

.tmc-hero-title {
  justify-items: start;
  justify-content: start;
  width: auto;
  min-height: 0;
}

.tmc-hero-title h1 {
  justify-self: start;
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1;
}

.tmc-hero-label {
  top: 9px;
  left: clamp(16px, 2.4vw, 30px);
  font-size: 9.5px;
}

.tmc-hero-actions {
  justify-self: stretch;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  max-width: 700px;
  gap: clamp(24px, 5vw, 72px);
}

.tmc-hero-actions .tmc-button {
  min-height: 38px;
  padding-top: 7px;
  padding-bottom: 7px;
}

.tmc-cards {
  gap: clamp(10px, 1.2vw, 14px);
  margin: 10px 0 16px;
}

.tmc-card-link[role="tab"] {
  position: relative;
  border-color: rgba(31, 95, 143, 0.16);
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.tmc-card-link[role="tab"]:hover,
.tmc-card-link[role="tab"]:focus-visible {
  border-color: rgba(31, 95, 143, 0.34);
}

.tmc-card-link[role="tab"].is-active,
.tmc-card-link[role="tab"][aria-selected="true"] {
  padding-right: clamp(76px, 7vw, 92px);
  border-color: rgba(31, 95, 143, 0.52);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(232, 244, 250, 0.98)),
    linear-gradient(135deg, rgba(31, 95, 143, 0.16), rgba(240, 165, 33, 0.10));
  box-shadow: 0 14px 30px rgba(24, 63, 97, 0.12);
}

.tmc-card-link[role="tab"].is-active::after,
.tmc-card-link[role="tab"][aria-selected="true"]::after {
  content: "Открыт";
  position: absolute;
  top: 10px;
  right: 12px;
  padding: 4px 8px;
  border: 1px solid rgba(31, 95, 143, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  color: #265b83;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: .06em;
  line-height: 1;
  text-transform: uppercase;
}

.tmc-card-link[role="tab"].is-active span,
.tmc-card-link[role="tab"][aria-selected="true"] span {
  border-color: rgba(31, 95, 143, 0.5);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(217, 236, 246, 0.98)),
    linear-gradient(135deg, rgba(31, 95, 143, 0.22), rgba(240, 165, 33, 0.16));
}

body.tmc-calculator-tabs-ready .tmc-calculator-panel {
  display: none;
}

body.tmc-calculator-tabs-ready[data-active-calculator="weight"] #weight-calculator,
body.tmc-calculator-tabs-ready[data-active-calculator="flange"] #flange-calculator,
body.tmc-calculator-tabs-ready[data-active-calculator="pipe"] #pipe-calculator {
  display: block;
}

.tmc-calculator-panel > .tmc-widget-request {
  display: none;
}

.tmc-flange-draft-empty-state {
  background: #fff;
}

.tmc-flange-draft-empty-state .tmc-flange-contact,
.tmc-flange-draft-empty-state .tmc-flange-draft-actions {
  display: none;
}

.tmc-flange-draft-empty-state .tmc-flange-draft-note {
  color: #6b7f78;
}

.tmc-embed-details {
  display: block;
  padding: 0;
  overflow: hidden;
}

.tmc-embed-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 13px clamp(16px, 2vw, 22px);
  color: #24483e;
  cursor: pointer;
  list-style: none;
}

.tmc-embed-details > summary::-webkit-details-marker {
  display: none;
}

.tmc-embed-details > summary::after {
  content: "Показать";
  flex: 0 0 auto;
  padding: 4px 9px;
  border: 1px solid rgba(31, 95, 143, 0.16);
  border-radius: 999px;
  background: rgba(246, 251, 255, 0.94);
  color: #49665e;
  font-size: 11px;
  font-weight: 900;
}

.tmc-embed-details[open] > summary::after {
  content: "Скрыть";
}

.tmc-embed-details > summary span {
  color: #173a54;
  font-size: 18px;
  font-weight: 900;
}

.tmc-embed-details > summary small {
  color: #607386;
  font-size: 12px;
  font-weight: 750;
}

.tmc-embed-details > .tmc-card-head,
.tmc-embed-details > .tmc-embed-options {
  margin: 0 clamp(14px, 2vw, 22px) clamp(14px, 2vw, 22px);
}

@media (max-width: 860px) {
  .tmc-hero {
    padding: 12px 14px;
  }

  .tmc-hero-content {
    grid-template-columns: 1fr;
    gap: 9px;
    max-width: 440px;
    justify-items: center;
  }

  .tmc-hero-title {
    justify-items: center;
    text-align: center;
  }

  .tmc-hero-title h1 {
    justify-self: center;
    font-size: clamp(25px, 6.4vw, 32px);
  }

  .tmc-hero-actions {
    width: min(430px, 100%);
    gap: 8px;
  }

  .tmc-card-link[role="tab"].is-active,
  .tmc-card-link[role="tab"][aria-selected="true"] {
    padding-right: 70px;
  }

  .tmc-card-link[role="tab"].is-active::after,
  .tmc-card-link[role="tab"][aria-selected="true"]::after {
    top: 8px;
    right: 8px;
    padding: 3px 6px;
    font-size: 9.5px;
  }

  .tmc-embed-details > summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .tmc-support-project > summary,
  .tmc-support-project-body {
    align-items: stretch;
    grid-template-columns: 1fr;
    padding-right: 0;
  }

  .tmc-support-project-body {
    gap: 10px;
  }

  .tmc-support-project > summary {
    grid-template-columns: 1fr auto;
  }

  .tmc-support-project-toggle {
    align-self: start;
  }

  .tmc-support-project-qr {
    justify-items: center;
    justify-self: center;
    margin: 2px auto 0;
  }

  .tmc-support-project-qr figcaption {
    white-space: normal;
  }

  .tmc-support-project-qr img {
    width: min(158px, 70vw);
  }
}

@media (max-width: 420px) {
  .tmc-hero-actions {
    grid-template-columns: 1fr;
  }
}

@media print {
  .tmc-header,
  .tmc-hero-actions,
  .tmc-cards,
  .tmc-form,
  .tmc-actions,
  .tmc-support-project,
  .tmc-muted {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .tmc-card,
  .tmc-result {
    box-shadow: none;
    border-color: #999;
  }
}

/* TM 2026-05-16: final human UX geometry polish. */
.tmc-shell {
  padding-top: 8px;
}

.tmc-hero {
  margin-bottom: 12px;
  padding: clamp(9px, 1vw, 13px) clamp(18px, 4vw, 48px);
}

.tmc-hero-content {
  grid-template-columns: minmax(220px, 0.74fr) minmax(520px, 1.26fr);
  gap: clamp(36px, 8vw, 116px);
  max-width: 1120px;
}

.tmc-hero-title h1 {
  font-size: clamp(30px, 2.8vw, 40px);
  letter-spacing: -0.035em;
}

.tmc-hero-actions {
  max-width: 780px;
  gap: clamp(34px, 7vw, 96px);
}

.tmc-hero-actions .tmc-button {
  justify-content: center;
  min-height: 40px;
  white-space: normal;
}

.tmc-cards {
  align-items: stretch;
  margin: 8px 0 14px;
}

.tmc-card-link[role="tab"] {
  min-height: 96px;
  padding: 13px 14px;
  align-items: center;
}

.tmc-card-link[role="tab"] span {
  width: 54px;
  height: 54px;
  font-size: 21px;
  font-weight: 950;
}

.tmc-card-link[role="tab"] h2 {
  margin-bottom: 2px;
}

.tmc-card-link[role="tab"].is-active,
.tmc-card-link[role="tab"][aria-selected="true"] {
  padding-right: clamp(72px, 6vw, 88px);
  transform: translateY(-1px);
}

.tmc-card-link[role="tab"].is-active::after,
.tmc-card-link[role="tab"][aria-selected="true"]::after {
  content: "Активен";
}

body.tmc-calculator-tabs-ready .tmc-calculator-panel[hidden] {
  display: none !important;
}

.tmc-flange-work-panel {
  grid-template-columns: minmax(280px, 0.78fr) minmax(520px, 1.22fr);
  gap: clamp(12px, 1.8vw, 20px);
  align-items: start;
}

.tmc-flange-work-variant,
.tmc-flange-work-summary,
.tmc-flange-work-visual {
  min-width: 0;
}

.tmc-flange-work-visual .tmc-flange-drawing {
  padding: clamp(12px, 1.6vw, 18px);
}

.tmc-flange-work-visual .tmc-flange-figure4,
.tmc-flange-work-visual .tmc-flange-figure7 {
  width: 100%;
  max-width: min(880px, 100%);
}

.tmc-flange-work-visual .tmc-flange-drawing-legend {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.tmc-flange-work-visual .tmc-flange-drawing-legend div,
.tmc-flange-work-summary #tmc-flange-result-grid div {
  min-width: 0;
}

.tmc-flange-work-summary #tmc-flange-result-grid {
  grid-template-columns: repeat(3, minmax(132px, 1fr));
}

.tmc-flange-joint-kit,
.tmc-flange-draft,
.tmc-flange-contact {
  min-width: 0;
}

.tmc-flange-draft-list {
  gap: 8px;
}

.tmc-flange-draft-actions {
  align-items: stretch;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.tmc-embed-details {
  margin-top: 14px;
}

.tmc-embed-details:not([open]) {
  box-shadow: 0 10px 24px rgba(24, 63, 97, 0.07);
}

@media (max-width: 1080px) {
  .tmc-flange-work-panel {
    grid-template-columns: minmax(240px, 0.82fr) minmax(430px, 1.18fr);
  }

  .tmc-flange-work-summary #tmc-flange-result-grid {
    grid-template-columns: repeat(2, minmax(132px, 1fr));
  }
}

@media (max-width: 920px) {
  .tmc-hero-content {
    grid-template-columns: 1fr;
    gap: 12px;
    max-width: 560px;
  }

  .tmc-hero-title {
    justify-items: center;
    text-align: center;
  }

  .tmc-hero-title h1 {
    justify-self: center;
  }

  .tmc-hero-actions {
    max-width: 560px;
    gap: 10px;
  }

  .tmc-cards {
    grid-template-columns: 1fr;
  }

  .tmc-card-link[role="tab"] {
    min-height: 78px;
  }

  .tmc-flange-work-panel {
    grid-template-columns: 1fr;
    grid-template-areas:
      "variant"
      "visual"
      "summary";
  }

  .tmc-flange-work-visual .tmc-flange-figure4,
  .tmc-flange-work-visual .tmc-flange-figure7 {
    max-width: min(720px, 100%);
  }
}

@media (max-width: 620px) {
  .tmc-hero {
    padding: 10px 12px;
  }

  .tmc-hero-actions,
  .tmc-flange-draft-actions {
    grid-template-columns: 1fr;
  }

  .tmc-flange-file-note,
  .tmc-flange-rfq-preview-head {
    align-items: stretch;
    flex-direction: column;
  }

  .tmc-file-placeholder-button {
    width: 100%;
    white-space: normal;
  }

  .tmc-flange-rfq-preview textarea {
    min-height: 230px;
    padding: 12px;
    font-size: 11.5px;
  }

  .tmc-card-link[role="tab"] {
    grid-template-columns: 48px minmax(0, 1fr);
    min-height: 74px;
    padding: 11px 12px;
  }

  .tmc-card-link[role="tab"] span {
    width: 46px;
    height: 46px;
    font-size: 18px;
  }

  .tmc-card-link[role="tab"].is-active,
  .tmc-card-link[role="tab"][aria-selected="true"] {
    padding-right: 64px;
  }

  .tmc-flange-work-visual .tmc-flange-drawing-legend,
  .tmc-flange-work-summary #tmc-flange-result-grid {
    grid-template-columns: 1fr;
  }
}

/* SITE01 2026-05-17: narrow viewport guard for the flange result panel. */
#flange-calculator,
#tmc-flange-result,
.tmc-flange-work-panel,
.tmc-flange-work-variant,
.tmc-flange-work-visual,
.tmc-flange-work-summary,
.tmc-match,
.tmc-match .tmc-variant-cards,
.tmc-match .tmc-variant-card,
.tmc-flange-drawing,
.tmc-flange-drawing-body,
.tmc-flange-drawing-side,
.tmc-flange-drawing-legend,
.tmc-flange-joint-kit,
.tmc-flange-joint-kit-controls,
.tmc-flange-joint-kit-list,
.tmc-flange-draft,
.tmc-flange-contact,
.tmc-flange-contact-grid,
.tmc-flange-file-note,
.tmc-flange-rfq-preview,
.tmc-flange-rfq-preview textarea {
  max-width: 100%;
  min-width: 0;
}

.tmc-match .tmc-variant-cards {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.tmc-flange-work-visual .tmc-flange-figure4,
.tmc-flange-work-visual .tmc-flange-figure7,
.tmc-flange-figure4,
.tmc-flange-figure7,
.tmc-flange-figure4-image {
  max-width: 100%;
  min-width: 0;
}

@media (max-width: 620px) {
  .tmc-shell {
    width: min(1180px, calc(100% - 20px));
  }

  .tmc-match {
    padding: 9px;
  }

  .tmc-match .tmc-variant-cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .tmc-match .tmc-variant-card,
  .tmc-variant-value,
  .tmc-variant-gost,
  .tmc-variant-dimensions,
  .tmc-flange-drawing-selected,
  .tmc-flange-joint-kit-list dd,
  .tmc-flange-draft strong,
  .tmc-flange-draft small {
    overflow-wrap: anywhere;
  }

  .tmc-flange-work-visual .tmc-flange-drawing,
  .tmc-flange-joint-kit,
  .tmc-flange-draft {
    padding: 10px;
  }

  .tmc-actions .tmc-button,
  .tmc-actions a.tmc-button,
  .tmc-flange-draft-actions .tmc-button,
  .tmc-flange-draft-actions a.tmc-button {
    width: 100%;
    min-width: 0;
    white-space: normal;
  }
}

@media (max-width: 420px) {
  .tmc-shell {
    width: min(1180px, calc(100% - 16px));
  }

  .tmc-card,
  .tmc-result,
  .tmc-flange-joint-kit,
  .tmc-flange-draft {
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* SITE01 2026-05-17: compact engineering zone for flange result. */
@media (min-width: 921px) {
  #tmc-flange-result {
    padding: clamp(10px, 1.15vw, 14px);
  }

  #tmc-flange-result .tmc-flange-work-panel {
    grid-template-columns: minmax(255px, 0.56fr) minmax(0, 1.44fr);
    grid-template-areas:
      "variant visual"
      "summary visual";
    gap: clamp(8px, 1.1vw, 14px);
  }

  #tmc-flange-result .tmc-flange-work-variant,
  #tmc-flange-result .tmc-flange-work-summary,
  #tmc-flange-result .tmc-flange-work-visual {
    align-self: start;
  }

  #tmc-flange-result .tmc-match {
    padding: 9px;
    border-radius: 14px;
  }

  #tmc-flange-result .tmc-match-text {
    margin: 4px 0 6px;
    font-size: 12.1px;
    line-height: 1.28;
  }

  #tmc-flange-result .tmc-match-service-note {
    margin-top: 6px;
    font-size: 11.6px;
    line-height: 1.25;
  }

  #tmc-flange-result .tmc-match .tmc-variant-cards {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  #tmc-flange-result .tmc-match .tmc-variant-card {
    gap: 4px;
    padding: 8px;
    border-radius: 12px;
  }

  #tmc-flange-result .tmc-variant-card h4 {
    margin: 0;
    font-size: 13px;
    line-height: 1.18;
  }

  #tmc-flange-result .tmc-variant-label {
    font-size: 10px;
    line-height: 1.12;
  }

  #tmc-flange-result .tmc-variant-gost,
  #tmc-flange-result .tmc-variant-value {
    font-size: 11.9px;
    line-height: 1.22;
  }

  #tmc-flange-result .tmc-variant-action,
  #tmc-flange-result .tmc-variant-missing {
    margin-top: 1px;
    font-size: 11px;
    line-height: 1.2;
  }

  #tmc-flange-result .tmc-variant-missing {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  #tmc-flange-result .tmc-flange-work-summary {
    gap: 7px;
  }

  #tmc-flange-result .tmc-flange-work-summary #tmc-flange-result-grid {
    order: 1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  #tmc-flange-result .tmc-flange-work-summary #tmc-flange-result-grid div {
    min-height: 38px;
    padding: 5px 6px;
    border-radius: 11px;
  }

  #tmc-flange-result .tmc-flange-work-summary #tmc-flange-result-grid dt {
    font-size: 10px;
  }

  #tmc-flange-result .tmc-flange-work-summary #tmc-flange-result-grid dd {
    font-size: 11.7px;
  }

  #tmc-flange-result .tmc-result-note {
    order: 2;
    margin: 0;
    font-size: 11.8px;
    line-height: 1.28;
  }

  #tmc-flange-result .tmc-flange-joint-kit {
    order: 5;
    gap: 6px;
    margin-top: 0;
    padding: 8px;
    border-radius: 14px;
  }

  #tmc-flange-result .tmc-flange-joint-kit-head {
    gap: 8px;
  }

  #tmc-flange-result .tmc-flange-joint-kit-head h3 {
    font-size: 14px;
  }

  #tmc-flange-result .tmc-flange-joint-kit-head > span {
    min-height: 20px;
    padding: 2px 6px;
    font-size: 9.8px;
  }

  #tmc-flange-result .tmc-flange-joint-kit-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  #tmc-flange-result .tmc-flange-joint-kit-controls label {
    gap: 3px;
    padding: 5px 6px;
    border-radius: 11px;
  }

  #tmc-flange-result .tmc-flange-joint-kit-controls label > span {
    font-size: 10.5px;
    line-height: 1.16;
  }

  #tmc-flange-result .tmc-flange-joint-kit-controls select,
  #tmc-flange-result .tmc-flange-joint-kit-controls input[type="number"] {
    min-height: 31px;
    font-size: 12px;
  }

  #tmc-flange-result .tmc-flange-joint-kit-list {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  #tmc-flange-result .tmc-flange-joint-kit-list div {
    min-height: 0;
    padding: 5px 6px;
    border-radius: 11px;
  }

  #tmc-flange-result .tmc-flange-joint-kit-list dt {
    font-size: 10.8px;
  }

  #tmc-flange-result .tmc-flange-joint-kit-list dd {
    font-size: 12.4px;
  }

  #tmc-flange-result .tmc-flange-joint-kit-warning,
  #tmc-flange-result .tmc-flange-draft-note {
    padding: 5px 6px;
    font-size: 11.3px;
    line-height: 1.24;
  }

  #tmc-flange-result .tmc-flange-joint-kit-actions {
    margin-top: 0;
  }

  #tmc-flange-result #tmc-flange-storage {
    order: 6;
  }

  #tmc-flange-result .tmc-flange-work-summary > .tmc-flange-draft-note {
    order: 3;
    margin: 0;
  }

  #tmc-flange-result .tmc-flange-work-summary > .tmc-actions:not(.tmc-flange-joint-kit-actions) {
    order: 4;
    margin-top: 0;
  }

  #tmc-flange-result #tmc-flange-copy-status {
    order: 7;
  }

  #tmc-flange-result .tmc-flange-work-visual .tmc-flange-drawing {
    gap: 8px 12px;
    padding: clamp(10px, 1.1vw, 14px);
    border-radius: 15px;
  }

  #tmc-flange-result .tmc-flange-drawing-head h3 {
    font-size: clamp(16px, 1.35vw, 19px);
  }

  #tmc-flange-result .tmc-flange-work-visual .tmc-flange-figure4,
  #tmc-flange-result .tmc-flange-work-visual .tmc-flange-figure7 {
    width: 100%;
    max-width: min(820px, 100%);
  }

  #tmc-flange-result .tmc-flange-drawing-selected {
    padding: 6px 7px;
    font-size: 12.1px;
  }

  #tmc-flange-result .tmc-flange-work-visual .tmc-flange-drawing-legend {
    gap: 5px;
  }

  #tmc-flange-result .tmc-flange-drawing-legend div {
    min-height: 28px;
    padding: 5px 7px;
    border-radius: 9px;
  }

  #tmc-flange-result .tmc-flange-drawing-legend dt {
    font-size: 10.8px;
  }

  #tmc-flange-result .tmc-flange-drawing-legend dd {
    font-size: 12.4px;
  }

  #tmc-flange-result .tmc-flange-drawing-note {
    margin-top: 0;
    font-size: 11.7px;
    line-height: 1.25;
  }
}

@media (min-width: 1160px) {
  #tmc-flange-result .tmc-flange-work-visual .tmc-flange-drawing {
    grid-template-columns: minmax(0, 1.22fr) minmax(250px, 0.78fr);
    grid-template-areas:
      "head head"
      "figure side"
      "note note";
  }

  #tmc-flange-result .tmc-flange-work-visual .tmc-flange-drawing-legend {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 921px) and (max-width: 1159px) {
  #tmc-flange-result .tmc-flange-work-visual .tmc-flange-drawing-legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  #tmc-flange-result .tmc-flange-work-panel {
    gap: 10px;
  }

  #tmc-flange-result .tmc-match,
  #tmc-flange-result .tmc-flange-work-visual .tmc-flange-drawing,
  #tmc-flange-result .tmc-flange-joint-kit {
    border-radius: 14px;
  }

  #tmc-flange-result .tmc-flange-joint-kit-controls {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  }
}

@media (max-width: 620px) {
  #tmc-flange-result .tmc-flange-work-summary #tmc-flange-result-grid,
  #tmc-flange-result .tmc-flange-joint-kit-list,
  #tmc-flange-result .tmc-flange-work-visual .tmc-flange-drawing-legend {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* SITE01 2026-05-17 FIX1: centered flange top form and symmetric field cards. */
#flange-calculator > .tmc-card-head {
  display: grid;
  justify-items: center;
  gap: 5px;
  max-width: 760px;
  margin: 0 auto 12px;
  text-align: center;
}

#flange-calculator > .tmc-card-head .tmc-kicker,
#flange-calculator > .tmc-card-head h2,
#flange-calculator > .tmc-card-head p {
  margin-left: auto;
  margin-right: auto;
}

#flange-calculator > .tmc-card-head h2 {
  margin-top: 0;
  margin-bottom: 0;
  line-height: 1.16;
}

#flange-calculator > .tmc-card-head p {
  max-width: 680px;
  margin-top: 0;
  line-height: 1.35;
}

#flange-calculator .tmc-flange-main-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}

#flange-calculator .tmc-flange-main-grid .tmc-engineering-cell {
  grid-template-rows: 32px 38px;
  gap: 5px;
  min-height: 90px;
  padding: 7px 9px;
  align-content: stretch;
}

#flange-calculator .tmc-flange-main-grid .tmc-engineering-cell > .tmc-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
  height: 32px;
  gap: 6px;
}

#flange-calculator .tmc-flange-main-grid .tmc-label-text {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 32px;
  line-height: 1.14;
}

#flange-calculator .tmc-flange-main-grid .tmc-help-tip {
  flex: 0 0 auto;
  align-self: center;
}

#flange-calculator .tmc-flange-main-grid .tmc-engineering-cell input,
#flange-calculator .tmc-flange-main-grid .tmc-engineering-cell select {
  align-self: end;
  width: 100%;
  height: 38px;
  min-height: 38px;
  box-sizing: border-box;
}

#flange-calculator .tmc-card-footer {
  grid-template-columns: 1fr;
  justify-items: end;
  min-height: 38px;
  margin-top: 8px;
  padding: 6px 0 4px;
}

#flange-calculator .tmc-card-footer .tmc-card-brand {
  justify-self: end;
}

@media (max-width: 1180px) {
  #flange-calculator .tmc-flange-main-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  #flange-calculator .tmc-flange-main-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 430px) {
  #flange-calculator > .tmc-card-head {
    gap: 4px;
    margin-bottom: 10px;
  }

  #flange-calculator .tmc-flange-main-grid {
    grid-template-columns: 1fr;
  }
}

/* SITE01 2026-05-17 FIX2: top-left label, centered title, table-grade field alignment. */
#flange-calculator > .tmc-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(auto, 720px) minmax(0, 1fr);
  grid-template-areas:
    "kicker title spacer"
    ". subtitle .";
  align-items: start;
  justify-items: stretch;
  width: 100%;
  max-width: none;
  gap: 3px 12px;
  margin: 0 0 10px;
  text-align: initial;
}

#flange-calculator > .tmc-card-head .tmc-kicker {
  grid-area: kicker;
  justify-self: start;
  align-self: start;
  max-width: 230px;
  margin: 2px 0 0;
  text-align: left;
  white-space: nowrap;
}

#flange-calculator > .tmc-card-head h2 {
  grid-area: title;
  justify-self: center;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  line-height: 1.12;
}

#flange-calculator > .tmc-card-head > p:not(.tmc-kicker):not(.tmc-inline-note) {
  grid-area: subtitle;
  justify-self: center;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  line-height: 1.32;
}

#flange-calculator .tmc-flange-main-grid .tmc-engineering-cell {
  grid-template-rows: 32px 38px;
  gap: 5px;
  min-height: 90px;
  padding: 8px 9px 7px;
  box-sizing: border-box;
}

#flange-calculator .tmc-flange-main-grid .tmc-engineering-cell > .tmc-label-row {
  height: 32px;
  min-height: 32px;
  align-items: center;
}

#flange-calculator .tmc-flange-main-grid .tmc-label-text {
  height: 32px;
  min-height: 32px;
  align-items: center;
  line-height: 1.08;
}

#flange-calculator .tmc-flange-main-grid .tmc-help-tip {
  align-self: center;
  margin-top: 0;
}

#flange-calculator .tmc-flange-main-grid .tmc-engineering-cell input,
#flange-calculator .tmc-flange-main-grid .tmc-engineering-cell select {
  align-self: end;
  height: 38px;
  min-height: 38px;
}

@media (max-width: 900px) {
  #flange-calculator > .tmc-card-head {
    grid-template-columns: 1fr;
    grid-template-areas:
      "kicker"
      "title"
      "subtitle";
    gap: 4px;
  }

  #flange-calculator > .tmc-card-head .tmc-kicker {
    justify-self: start;
  }
}

/* SITE01 2026-05-17 FIX3: optical vertical centering of top field labels. */
#flange-calculator .tmc-flange-main-grid .tmc-engineering-cell {
  grid-template-rows: 34px 38px;
  gap: 4px;
  min-height: 92px;
  padding-top: 8px;
  padding-bottom: 8px;
}

#flange-calculator .tmc-flange-main-grid .tmc-engineering-cell > .tmc-label-row {
  height: 34px;
  min-height: 34px;
  align-items: center;
}

#flange-calculator .tmc-flange-main-grid .tmc-label-text {
  display: inline-flex;
  height: 34px;
  min-height: 34px;
  align-items: center;
  line-height: 1.08;
  transform: translateY(1.5px);
}

#flange-calculator .tmc-flange-main-grid .tmc-help-tip {
  transform: translateY(1.5px);
}

/* SITE01 2026-05-17 ADD1: visual rhythm between header and form, true optical label center. */
#flange-calculator > .tmc-card-head {
  margin-bottom: 24px;
}

#flange-calculator .tmc-flange-main-grid .tmc-engineering-cell {
  grid-template-rows: 36px 38px;
  gap: 4px;
  min-height: 94px;
  padding-top: 8px;
  padding-bottom: 8px;
}

#flange-calculator .tmc-flange-main-grid .tmc-engineering-cell > .tmc-label-row {
  height: 36px;
  min-height: 36px;
  align-items: center;
}

#flange-calculator .tmc-flange-main-grid .tmc-label-text {
  height: 36px;
  min-height: 36px;
  padding-top: 2px;
  box-sizing: border-box;
  transform: none;
}

#flange-calculator .tmc-flange-main-grid .tmc-help-tip {
  transform: translateY(1px);
}

@media (max-width: 900px) {
  #flange-calculator > .tmc-card-head {
    margin-bottom: 20px;
  }
}

@media (max-width: 430px) {
  #flange-calculator > .tmc-card-head {
    margin-bottom: 18px;
  }
}

/* SITE01 2026-05-17 ADD2: reduce top-field label noise while preserving semantics. */
#flange-calculator .tmc-flange-main-grid {
  gap: 8px;
}

#flange-calculator .tmc-flange-main-grid .tmc-engineering-cell {
  position: relative;
  grid-template-rows: 40px;
  min-height: 58px;
  padding: 9px 10px;
  align-items: center;
}

#flange-calculator .tmc-flange-main-grid .tmc-engineering-cell input,
#flange-calculator .tmc-flange-main-grid .tmc-engineering-cell select {
  align-self: center;
  height: 40px;
  min-height: 40px;
}

#flange-calculator .tmc-flange-main-grid .tmc-flange-noise-hidden-label {
  grid-template-rows: 40px;
}

#flange-calculator .tmc-flange-main-grid .tmc-flange-noise-hidden-label > .tmc-label-row {
  position: absolute;
  top: 7px;
  right: 8px;
  z-index: 2;
  width: 18px;
  height: 18px;
  min-height: 18px;
  justify-content: flex-end;
  pointer-events: none;
}

#flange-calculator .tmc-flange-main-grid .tmc-flange-noise-hidden-label .tmc-label-text {
  position: absolute;
  width: 1px;
  height: 1px;
  min-width: 1px;
  min-height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
  transform: none;
}

#flange-calculator .tmc-flange-main-grid .tmc-flange-noise-hidden-label .tmc-help-tip {
  pointer-events: auto;
  transform: none;
}

#flange-calculator .tmc-flange-main-grid .tmc-flange-noise-hidden-label select {
  padding-right: 34px;
}

#flange-calculator .tmc-flange-main-grid .tmc-flange-quantity-inline {
  grid-template-columns: minmax(82px, auto) minmax(58px, 1fr) 18px;
  grid-template-rows: 40px;
  column-gap: 8px;
}

#flange-calculator .tmc-flange-main-grid .tmc-flange-quantity-inline > .tmc-label-row {
  display: contents;
  height: auto;
  min-height: 0;
}

#flange-calculator .tmc-flange-main-grid .tmc-flange-quantity-inline .tmc-label-text {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  height: auto;
  min-height: 0;
  padding: 0;
  overflow: visible;
  font-size: 12.2px;
  line-height: 1.12;
  white-space: nowrap;
  transform: none;
}

#flange-calculator .tmc-flange-main-grid .tmc-flange-quantity-inline input {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  min-width: 58px;
}

#flange-calculator .tmc-flange-main-grid .tmc-flange-quantity-inline .tmc-help-tip {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  align-self: center;
  transform: none;
}

@media (max-width: 430px) {
  #flange-calculator .tmc-flange-main-grid {
    gap: 7px;
  }
}

/* SITE01 2026-05-17 FIX: hide rejected page-level hero in the normal calculator flow. */
body:not(.tmc-embed-mode) .tmc-hero {
  display: none;
}

/* SITE01 2026-05-17 FIX: reserve a separate gutter for top-field help icons. */
#flange-calculator .tmc-flange-main-grid .tmc-flange-noise-hidden-label {
  grid-template-columns: minmax(0, 1fr) 20px;
  grid-template-rows: 40px;
  column-gap: 8px;
}

#flange-calculator .tmc-flange-main-grid .tmc-flange-noise-hidden-label > .tmc-label-row {
  position: static;
  grid-column: 2;
  grid-row: 1;
  width: 20px;
  height: 40px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

#flange-calculator .tmc-flange-main-grid .tmc-flange-noise-hidden-label select {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  padding-right: 18px;
}

#flange-calculator .tmc-flange-main-grid .tmc-engineering-cell input,
#flange-calculator .tmc-flange-main-grid .tmc-engineering-cell select {
  font-size: 13px;
  line-height: 1.2;
}

#flange-calculator .tmc-flange-main-grid .tmc-flange-noise-hidden-label .tmc-help-tip {
  align-self: center;
  justify-self: center;
  pointer-events: auto;
}

@media (min-width: 1181px) {
  #flange-calculator .tmc-flange-main-grid {
    grid-template-columns:
      minmax(180px, 1.08fr)
      minmax(190px, 1.16fr)
      minmax(170px, 1fr)
      minmax(155px, .92fr)
      minmax(150px, .9fr)
      minmax(176px, 1.02fr);
  }
}

/* SITE01 2026-05-17: compact left-aligned semantic header for the flange tool. */
#flange-calculator > .tmc-card-head {
  display: grid;
  grid-template-columns: minmax(0, 760px);
  grid-template-areas:
    "kicker"
    "title"
    "subtitle";
  justify-items: start;
  max-width: 760px;
  margin: 0 0 16px;
  gap: 4px;
  text-align: left;
}

#flange-calculator > .tmc-card-head .tmc-kicker {
  grid-area: kicker;
  justify-self: start;
  max-width: none;
  margin: 0;
  text-align: left;
  white-space: nowrap;
}

#flange-calculator > .tmc-card-head h2 {
  grid-area: title;
  justify-self: start;
  width: auto;
  max-width: 760px;
  margin: 0;
  text-align: left;
  line-height: 1.14;
}

#flange-calculator > .tmc-card-head > p:not(.tmc-kicker):not(.tmc-inline-note) {
  grid-area: subtitle;
  justify-self: start;
  max-width: 760px;
  margin: 0;
  text-align: left;
  line-height: 1.34;
}

#flange-calculator > .tmc-card-head .tmc-conversion-quick-request {
  grid-column: 1;
  max-width: none;
  margin: 3px 0 0;
  font-size: 12.5px;
  line-height: 1.22;
}

#flange-calculator > .tmc-card-head + .tmc-form {
  margin-top: 4px;
}

@media (min-width: 900px) {
  #flange-calculator > .tmc-card-head .tmc-conversion-quick-request {
    white-space: nowrap;
  }
}

#flange-calculator > .tmc-card-head .tmc-conversion-quick-request a {
  color: var(--tmc-blue);
  font-weight: 800;
  text-decoration: none;
}

#flange-calculator > .tmc-card-head .tmc-conversion-quick-request a:hover,
#flange-calculator > .tmc-card-head .tmc-conversion-quick-request a:focus-visible {
  text-decoration: underline;
}

@media (max-width: 430px) {
  #flange-calculator > .tmc-card-head {
    margin-bottom: 14px;
  }
}

/* SITE01 2026-05-17: rework top controls to 3+3 so full prompts stay readable. */
#flange-calculator .tmc-flange-main-grid {
  grid-template-columns: repeat(3, minmax(250px, 1fr));
  gap: 9px;
}

#flange-calculator .tmc-flange-main-grid .tmc-engineering-cell {
  min-width: 0;
}

#flange-calculator .tmc-flange-main-grid .tmc-flange-noise-hidden-label {
  grid-template-columns: minmax(0, 1fr) 20px;
  column-gap: 10px;
}

#flange-calculator .tmc-flange-main-grid .tmc-flange-noise-hidden-label select {
  min-width: 0;
  padding-right: 22px;
}

#flange-calculator .tmc-flange-main-grid .tmc-flange-quantity-inline {
  grid-template-columns: minmax(112px, max-content) minmax(84px, 1fr) 20px;
  column-gap: 10px;
}

#flange-calculator .tmc-flange-main-grid .tmc-flange-quantity-inline input {
  min-width: 84px;
}

@media (max-width: 860px) {
  #flange-calculator .tmc-flange-main-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 520px) {
  #flange-calculator .tmc-flange-main-grid {
    grid-template-columns: 1fr;
  }
}

/* SITE01 2026-05-17: make select prompts softer while keeping DN/PN/row readable. */
#flange-calculator .tmc-flange-main-grid .tmc-engineering-cell select,
#flange-calculator .tmc-flange-main-grid .tmc-engineering-cell input {
  font-weight: 760;
  letter-spacing: -0.012em;
}

#flange-calculator .tmc-flange-main-grid #tmc-flange-gost-type {
  font-weight: 850;
}

#flange-calculator .tmc-flange-main-grid [data-placeholder-soft]:has(select option[value=""]:checked) {
  position: relative;
}

#flange-calculator .tmc-flange-main-grid [data-placeholder-soft]:has(select option[value=""]:checked) select {
  color: transparent;
}

#flange-calculator .tmc-flange-main-grid [data-placeholder-soft] select option {
  color: var(--tmc-ink);
}

#flange-calculator .tmc-flange-main-grid [data-placeholder-soft]:has(select option[value=""]:checked)::before,
#flange-calculator .tmc-flange-main-grid [data-placeholder-soft]:has(select option[value=""]:checked)::after {
  position: absolute;
  top: 50%;
  z-index: 3;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 13px;
  line-height: 1;
  letter-spacing: -0.012em;
  white-space: nowrap;
}

#flange-calculator .tmc-flange-main-grid [data-placeholder-soft]:has(select option[value=""]:checked)::before {
  left: 26px;
  content: attr(data-placeholder-soft) " ";
  color: #6d7f8f;
  font-weight: 560;
}

#flange-calculator .tmc-flange-main-grid [data-placeholder-soft]:has(select option[value=""]:checked)::after {
  left: 92px;
  content: attr(data-placeholder-strong);
  color: var(--tmc-ink);
  font-weight: 850;
}

/* SITE01 2026-05-17: make every top select read as a dropdown without colliding with help icons. */
#flange-calculator .tmc-flange-main-grid .tmc-flange-noise-hidden-label select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 46px;
  background-color: #f9fcfd;
  background-image:
    linear-gradient(45deg, transparent 50%, #31576d 50%),
    linear-gradient(135deg, #31576d 50%, transparent 50%),
    linear-gradient(180deg, rgba(49, 87, 109, 0.16), rgba(49, 87, 109, 0.16));
  background-position:
    calc(100% - 20px) calc(50% + 2px),
    calc(100% - 15px) calc(50% + 2px),
    calc(100% - 36px) 50%;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px, 1px 20px;
}

#flange-calculator .tmc-flange-main-grid .tmc-flange-noise-hidden-label select:focus {
  background-color: #fff;
}

#flange-calculator .tmc-flange-main-grid .tmc-flange-noise-hidden-label select:disabled {
  background-color: #f5f9fb;
}

/* SITE01 2026-05-17: align the bottom brand logo consistently in all calculator tabs. */
#weight-calculator .tmc-card-footer,
#flange-calculator .tmc-card-footer,
#pipe-calculator .tmc-card-footer {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  justify-items: stretch;
  min-height: 48px;
  margin-top: 10px;
  padding: 8px 12px;
  box-sizing: border-box;
}

#weight-calculator .tmc-card-footer .tmc-calc-notice-bottom,
#pipe-calculator .tmc-card-footer .tmc-calc-notice-bottom {
  align-self: center;
  margin: 0;
}

/* SITE01 2026-05-22 local: readable top flange form after execution field moved out of details. */
#flange-calculator .tmc-flange-main-grid {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 10px;
  align-items: stretch;
}

#flange-calculator .tmc-flange-main-grid .tmc-engineering-cell,
#flange-calculator .tmc-flange-main-grid .tmc-flange-noise-hidden-label,
#flange-calculator .tmc-flange-main-grid .tmc-flange-quantity-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(24px, auto) 42px;
  gap: 7px;
  min-width: 0;
  min-height: 98px;
  padding: 10px 12px;
  align-content: stretch;
  box-sizing: border-box;
  overflow: visible;
}

#flange-calculator .tmc-flange-main-grid .tmc-engineering-cell > .tmc-label-row,
#flange-calculator .tmc-flange-main-grid .tmc-flange-noise-hidden-label > .tmc-label-row,
#flange-calculator .tmc-flange-main-grid .tmc-flange-quantity-inline > .tmc-label-row {
  position: static;
  display: flex;
  grid-column: 1;
  grid-row: 1;
  width: auto;
  height: auto;
  min-height: 24px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  pointer-events: auto;
}

#flange-calculator .tmc-flange-main-grid .tmc-label-text,
#flange-calculator .tmc-flange-main-grid .tmc-flange-noise-hidden-label .tmc-label-text,
#flange-calculator .tmc-flange-main-grid .tmc-flange-quantity-inline .tmc-label-text {
  position: static;
  display: block;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  border: 0;
  color: #17384d;
  font-size: 12.6px;
  font-weight: 800;
  line-height: 1.18;
  transform: none;
}

#flange-calculator .tmc-flange-main-grid .tmc-help-tip,
#flange-calculator .tmc-flange-main-grid .tmc-flange-noise-hidden-label .tmc-help-tip,
#flange-calculator .tmc-flange-main-grid .tmc-flange-quantity-inline .tmc-help-tip {
  flex: 0 0 auto;
  align-self: flex-start;
  justify-self: end;
  margin-top: -1px;
  pointer-events: auto;
  transform: none;
}

#flange-calculator .tmc-flange-main-grid .tmc-engineering-cell input,
#flange-calculator .tmc-flange-main-grid .tmc-engineering-cell select,
#flange-calculator .tmc-flange-main-grid .tmc-flange-noise-hidden-label select,
#flange-calculator .tmc-flange-main-grid .tmc-flange-quantity-inline input {
  grid-column: 1;
  grid-row: 2;
  width: 100%;
  min-width: 0;
  height: 42px;
  min-height: 42px;
  align-self: end;
  box-sizing: border-box;
  font-size: 13px;
  line-height: 1.2;
}

#flange-calculator .tmc-flange-main-grid .tmc-flange-noise-hidden-label select {
  padding-right: 46px;
}

#flange-calculator .tmc-flange-main-grid .tmc-flange-facing-primary {
  grid-column: span 2;
}

#flange-calculator .tmc-flange-main-grid #tmc-flange-facing {
  font-weight: 780;
  text-overflow: ellipsis;
}

#flange-calculator .tmc-flange-main-grid [data-placeholder-soft]:has(select option[value=""]:checked) select {
  color: var(--tmc-ink);
}

#flange-calculator .tmc-flange-main-grid [data-placeholder-soft]:has(select option[value=""]:checked)::before,
#flange-calculator .tmc-flange-main-grid [data-placeholder-soft]:has(select option[value=""]:checked)::after {
  display: none;
  content: none;
}

@media (max-width: 960px) {
  #flange-calculator .tmc-flange-main-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 560px) {
  #flange-calculator .tmc-flange-main-grid {
    grid-template-columns: 1fr;
  }

  #flange-calculator .tmc-flange-main-grid .tmc-flange-facing-primary {
    grid-column: auto;
  }

  #flange-calculator .tmc-flange-main-grid .tmc-engineering-cell,
  #flange-calculator .tmc-flange-main-grid .tmc-flange-noise-hidden-label,
  #flange-calculator .tmc-flange-main-grid .tmc-flange-quantity-inline {
    min-height: 94px;
    padding: 9px 10px;
  }
}

#weight-calculator .tmc-card-footer .tmc-card-brand,
#flange-calculator .tmc-card-footer .tmc-card-brand,
#pipe-calculator .tmc-card-footer .tmc-card-brand {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  align-self: center;
  min-height: 30px;
  margin: 0;
  padding: 0;
  border-top: 0;
  line-height: 0;
}

#flange-calculator .tmc-card-footer .tmc-card-brand {
  grid-column: 2;
}

#weight-calculator .tmc-card-footer .tmc-brand-logo,
#flange-calculator .tmc-card-footer .tmc-brand-logo,
#pipe-calculator .tmc-card-footer .tmc-brand-logo {
  display: block;
  width: min(132px, 38vw);
  max-height: 30px;
  height: auto;
}

@media (max-width: 520px) {
  #weight-calculator .tmc-card-footer,
  #flange-calculator .tmc-card-footer,
  #pipe-calculator .tmc-card-footer {
    grid-template-columns: 1fr;
    padding-inline: 10px;
  }

  #flange-calculator .tmc-card-footer .tmc-card-brand {
    grid-column: 1;
  }
}

/* SITE01 2026-05-19: keep footer logos in the right rail with the accepted optical vertical correction. */
#weight-calculator .tmc-card-footer,
#flange-calculator .tmc-card-footer,
#pipe-calculator .tmc-card-footer {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  justify-items: stretch;
}

#weight-calculator .tmc-card-footer .tmc-card-brand,
#flange-calculator .tmc-card-footer .tmc-card-brand,
#pipe-calculator .tmc-card-footer .tmc-card-brand {
  grid-column: 2;
  align-items: center;
  align-self: center;
  justify-content: flex-end;
  justify-self: end;
  transform: translateY(6px);
}

@media (max-width: 520px) {
  #weight-calculator .tmc-card-footer,
  #flange-calculator .tmc-card-footer,
  #pipe-calculator .tmc-card-footer {
    grid-template-columns: 1fr;
  }

  #weight-calculator .tmc-card-footer .tmc-card-brand,
  #flange-calculator .tmc-card-footer .tmc-card-brand,
  #pipe-calculator .tmc-card-footer .tmc-card-brand {
    grid-column: 1;
    justify-self: end;
  }
}

/* SITE01 2026-05-17: make the flange kit a compact engineering zone under the drawing. */
#tmc-flange-result .tmc-flange-work-visual {
  display: grid;
  align-content: start;
  gap: 10px;
}

#tmc-flange-result .tmc-flange-work-visual .tmc-flange-drawing {
  height: auto;
}

#tmc-flange-result .tmc-flange-work-visual > .tmc-flange-joint-kit {
  gap: 8px;
  margin-top: 0;
  padding: 10px;
  border-radius: 15px;
}

#tmc-flange-result .tmc-flange-work-visual > .tmc-flange-joint-kit .tmc-flange-joint-kit-controls {
  gap: 8px;
  align-items: stretch;
}

#tmc-flange-result .tmc-flange-work-visual > .tmc-flange-joint-kit .tmc-flange-joint-kit-controls label {
  min-height: 58px;
  padding: 7px 8px;
  border-radius: 12px;
}

#tmc-flange-result .tmc-flange-work-visual > .tmc-flange-joint-kit .tmc-flange-joint-kit-controls label > span {
  line-height: 1.18;
}

#tmc-flange-result .tmc-flange-work-visual > .tmc-flange-joint-kit .tmc-flange-joint-kit-controls select,
#tmc-flange-result .tmc-flange-work-visual > .tmc-flange-joint-kit .tmc-flange-joint-kit-controls input[type="number"] {
  width: 100%;
  min-height: 34px;
}

#tmc-flange-result .tmc-flange-work-visual > .tmc-flange-joint-kit .tmc-flange-joint-kit-check {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  min-height: 58px;
  padding-inline: 12px;
}

#tmc-flange-result .tmc-flange-work-visual > .tmc-flange-joint-kit .tmc-flange-joint-kit-check input {
  flex: 0 0 18px;
}

#tmc-flange-result .tmc-flange-work-visual > .tmc-flange-joint-kit .tmc-flange-joint-kit-check span {
  color: #18392f;
  font-size: 12px;
  font-weight: 900;
}

#tmc-flange-result .tmc-flange-work-visual > .tmc-flange-joint-kit .tmc-flange-joint-kit-list {
  gap: 6px;
}

#tmc-flange-result .tmc-flange-work-visual > .tmc-flange-joint-kit .tmc-flange-joint-kit-list div {
  min-height: 54px;
  padding: 7px 8px;
}

#tmc-flange-result .tmc-flange-work-visual > .tmc-flange-joint-kit .tmc-flange-joint-kit-warning {
  margin: 0;
}

#tmc-flange-result .tmc-flange-work-visual > .tmc-flange-joint-kit .tmc-flange-joint-kit-actions {
  justify-content: flex-end;
  margin-top: 0;
}

@media (min-width: 1160px) {
  #tmc-flange-result .tmc-flange-work-visual > .tmc-flange-joint-kit .tmc-flange-joint-kit-controls {
    grid-template-columns:
      minmax(150px, 0.9fr)
      minmax(230px, 1.35fr)
      minmax(178px, 0.82fr)
      minmax(100px, 0.46fr);
  }

  #tmc-flange-result .tmc-flange-work-visual > .tmc-flange-joint-kit .tmc-flange-joint-kit-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 921px) and (max-width: 1159px) {
  #tmc-flange-result .tmc-flange-work-visual > .tmc-flange-joint-kit .tmc-flange-joint-kit-controls,
  #tmc-flange-result .tmc-flange-work-visual > .tmc-flange-joint-kit .tmc-flange-joint-kit-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  #tmc-flange-result .tmc-flange-work-visual > .tmc-flange-joint-kit {
    padding: 10px;
  }

  #tmc-flange-result .tmc-flange-work-visual > .tmc-flange-joint-kit .tmc-flange-joint-kit-controls,
  #tmc-flange-result .tmc-flange-work-visual > .tmc-flange-joint-kit .tmc-flange-joint-kit-list {
    grid-template-columns: minmax(0, 1fr);
  }

  #tmc-flange-result .tmc-flange-work-visual > .tmc-flange-joint-kit .tmc-flange-joint-kit-actions {
    justify-content: stretch;
  }
}

/* SITE01-20260521-10: keep long surface/gasket text readable in compact result layouts. */
#tmc-flange-result .tmc-flange-drawing-legend div[data-dim="facing"] {
  grid-column: 1 / -1;
  grid-template-columns: minmax(120px, 0.42fr) minmax(0, 1fr);
  align-items: start;
  min-height: 0;
}

#tmc-flange-result .tmc-flange-drawing-legend div[data-dim="facing"] dt,
#tmc-flange-result .tmc-flange-drawing-legend div[data-dim="facing"] dd {
  min-width: 0;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
  writing-mode: horizontal-tb;
}

#tmc-flange-result .tmc-flange-drawing-legend div[data-dim="facing"] dd {
  justify-self: stretch;
  text-align: left;
  line-height: 1.32;
}

#tmc-flange-result .tmc-flange-joint-kit-list div[data-kit-row="gasket"] {
  grid-column: 1 / -1;
  min-height: 0;
  align-content: start;
}

#tmc-flange-result .tmc-flange-joint-kit-list div[data-kit-row="gasket"] dt {
  justify-content: flex-start;
}

#tmc-flange-result .tmc-flange-joint-kit-list div[data-kit-row="gasket"] dd {
  max-width: 100%;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
  line-height: 1.34;
}

#tmc-flange-result .tmc-result-grid [data-result-key="surface-dimensions"] {
  grid-column: 1 / -1;
  min-height: 0;
  align-content: start;
}

#tmc-flange-result .tmc-result-grid [data-result-key="surface-dimensions"] dd {
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
  line-height: 1.34;
}

#tmc-flange-result .tmc-flange-work-summary > .tmc-flange-surface-dimensions {
  width: 100%;
  min-width: 0;
  align-self: stretch;
}

/* SITE01-20260524-04: prevent the surface-dimensions grid from widening mobile pages. */
#tmc-flange-result .tmc-flange-work-summary > .tmc-flange-surface-dimensions {
  box-sizing: border-box;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
}

#tmc-flange-result .tmc-flange-surface-dimensions__head,
#tmc-flange-result .tmc-flange-surface-dimensions__list,
#tmc-flange-result .tmc-flange-surface-dimensions__item,
#tmc-flange-result .tmc-flange-surface-dimensions__selected,
#tmc-flange-result .tmc-flange-surface-dimensions__note {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 520px) {
  #tmc-flange-result .tmc-flange-drawing-legend div[data-dim="facing"] {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  #tmc-flange-result .tmc-flange-drawing-legend div[data-dim="facing"] dd {
    justify-self: start;
  }

  #tmc-flange-result .tmc-flange-surface-dimensions__head {
    display: grid;
  }

  #tmc-flange-result .tmc-flange-surface-dimensions__badge {
    justify-self: start;
  }

  #tmc-flange-result .tmc-flange-surface-dimensions__list {
    grid-template-columns: minmax(0, 1fr);
  }

  #tmc-flange-result .tmc-flange-surface-scheme__body {
    grid-template-columns: minmax(0, 1fr);
  }

  #tmc-flange-result .tmc-flange-surface-scheme__visual {
    padding: 5px;
  }
}

/* SITE01-20260522: sitewide micro-interactions for calculator shell, cards and CTA only. */
.tmc-card-link,
.tmc-button,
.tmc-card,
.tmc-widget-request,
.tmc-card-footer,
.tmc-result,
.tmc-result-grid > div,
.tmc-flange-surface-dimensions,
.tmc-support-project {
  transition: transform 210ms ease, box-shadow 210ms ease, border-color 210ms ease, background-color 210ms ease, color 210ms ease;
}

.tmc-card-link:focus-visible,
.tmc-button:focus-visible,
.tmc-widget-request a:focus-visible,
.tmc-result a:focus-visible,
.tmc-support-project > summary:focus-visible {
  outline: 3px solid rgba(217, 154, 34, .55);
  outline-offset: 3px;
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .tmc-card-link:hover,
  .tmc-card-link:focus-visible {
    transform: translateY(-4px);
    border-color: rgba(31, 79, 136, .34);
    background-color: #fff;
    box-shadow: 0 18px 38px rgba(20, 58, 88, .15);
  }

  .tmc-button:hover,
  .tmc-button:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(31, 79, 136, .20);
  }

  .tmc-card:hover,
  .tmc-card:focus-within,
  .tmc-widget-request:hover,
  .tmc-widget-request:focus-within,
  .tmc-card-footer:hover,
  .tmc-card-footer:focus-within,
  .tmc-result:hover,
  .tmc-result:focus-within,
  .tmc-flange-surface-dimensions:hover,
  .tmc-flange-surface-dimensions:focus-within,
  .tmc-support-project:hover,
  .tmc-support-project:focus-within {
    border-color: rgba(31, 79, 136, .26);
    background-color: #fff;
    box-shadow: 0 16px 34px rgba(20, 58, 88, .10);
  }

  .tmc-result-grid > div:hover,
  .tmc-result-grid > div:focus-within {
    transform: translateY(-2px);
    border-color: rgba(31, 79, 136, .24);
    box-shadow: 0 12px 24px rgba(20, 58, 88, .10);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tmc-card-link,
  .tmc-button,
  .tmc-card,
  .tmc-widget-request,
  .tmc-card-footer,
  .tmc-result,
  .tmc-result-grid > div,
  .tmc-flange-surface-dimensions,
  .tmc-support-project {
    transition-duration: 1ms;
  }

  .tmc-card-link:hover,
  .tmc-button:hover,
  .tmc-result-grid > div:hover {
    transform: none !important;
  }
}
