:root {
  --bg: #d9e0e3;
  --ink: #172026;
  --muted: #60717c;
  --line: #9eadb7;
  --panel: rgba(244, 248, 249, 0.96);
  --panel-dark: #25323a;
  --accent: #007a7a;
  --accent-dark: #00484d;
  --accent-soft: #d7eeee;
  --warm: #c45d2a;
  --warm-dark: #753318;
  --steel: #52616b;
  --blue: #1d5878;
  --warn: #946006;
  --danger: #a12d2d;
  --soft: #e4ebee;
  --shadow: 0 22px 58px rgba(20, 33, 41, 0.22);
  --inset: inset 0 3px 9px rgba(17, 30, 38, 0.18), inset 0 -1px 0 rgba(255, 255, 255, 0.82);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px) 0 0/42px 42px,
    linear-gradient(0deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px) 0 0/42px 42px,
    linear-gradient(135deg, rgba(0, 72, 77, 0.12) 0 25%, transparent 25% 50%, rgba(196, 93, 42, 0.10) 50% 75%, transparent 75%) 0 0/28px 28px,
    linear-gradient(180deg, #edf2f3, #dbe3e6 480px, var(--bg)),
    var(--bg);
}

.shell {
  width: min(1460px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.brandbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(248, 251, 252, 0.92), rgba(226, 235, 238, 0.88));
  box-shadow: 0 12px 30px rgba(23, 32, 38, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(33, 28, 24, 0.10);
}

.brand strong,
.brand span,
.brand-meta span,
.brand-meta strong {
  display: block;
}

.brand strong {
  font-size: 1.18rem;
}

.brand span,
.brand-meta span {
  color: var(--muted);
  font-size: 0.9rem;
}

.brand-meta {
  text-align: right;
}

.brand-meta strong {
  margin-top: 4px;
}

.top-phone {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(11, 122, 112, 0.22);
}

.top-phone span {
  color: #fff;
  margin: 0;
}

.hero {
  min-height: 280px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: end;
  padding: 36px;
  border-radius: 8px;
  background:
    linear-gradient(115deg, rgba(12, 19, 24, 0.96), rgba(29, 88, 120, 0.86), rgba(0, 72, 77, 0.76)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.09) 0 1px, transparent 1px 56px),
    linear-gradient(135deg, #1d2930, #32434c);
  color: #fff;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 5px;
  background: linear-gradient(90deg, var(--warm), #f0b45d, var(--accent), var(--blue));
}

.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.78);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 920px;
  margin-bottom: 14px;
  font-size: clamp(2.1rem, 5vw, 4.8rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.lead {
  max-width: 820px;
  margin-bottom: 0;
  font-size: 1.08rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.86);
}

.status-card,
.result-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  backdrop-filter: blur(10px);
}

.status-card {
  color: var(--ink);
  padding: 22px;
  background: linear-gradient(180deg, rgba(250, 253, 254, 0.94), rgba(223, 233, 237, 0.90));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), inset 0 -12px 28px rgba(77, 98, 109, 0.09);
}

.status-card span,
.result-card span {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  margin-bottom: 8px;
}

.status-card strong,
.result-card strong {
  display: block;
  font-size: 2rem;
  line-height: 1.05;
}

.status-card small,
.result-card small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.45;
}

.notice {
  display: grid;
  gap: 8px;
  margin-top: 20px;
  padding: 16px 18px;
  border: 1px solid rgba(154, 91, 0, 0.28);
  border-radius: 8px;
  color: #4e3a16;
  background: linear-gradient(90deg, #fff8e7, #f5ead5);
  box-shadow: inset 4px 0 0 var(--warm);
  line-height: 1.5;
}

.notice strong {
  color: var(--warn);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  margin-top: 20px;
}

.panel {
  padding: 24px;
  box-shadow:
    0 18px 38px rgba(20, 33, 41, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -18px 32px rgba(77, 98, 109, 0.06);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

h2 {
  margin-bottom: 18px;
  font-size: 1.35rem;
  color: #182a32;
}

h3 {
  margin-bottom: 14px;
  font-size: 1rem;
  color: var(--accent-dark);
}

.inline-heading {
  margin: 4px 0 10px;
  color: var(--accent-dark);
  font-size: 0.92rem;
  font-weight: 900;
  text-transform: uppercase;
}

.grid {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

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

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

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

label {
  display: grid;
  gap: 7px;
  color: #40525d;
  font-size: 0.88rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #9baab3;
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--ink);
  background:
    linear-gradient(180deg, #cdd7dc, #f7fbfc 34%, #ffffff);
  box-shadow: var(--inset);
  font: inherit;
}

select {
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--accent-dark) 50%) calc(100% - 17px) 18px/7px 7px no-repeat,
    linear-gradient(135deg, var(--accent-dark) 50%, transparent 50%) calc(100% - 12px) 18px/7px 7px no-repeat,
    linear-gradient(180deg, #cdd7dc, #f7fbfc 34%, #ffffff);
  padding-right: 34px;
}

input[type="text"] {
  min-width: 0;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(15, 107, 99, 0.18);
  border-color: var(--accent);
  background-color: #fffefb;
  box-shadow: inset 0 2px 8px rgba(11, 122, 112, 0.12), 0 0 0 1px rgba(11, 122, 112, 0.28);
}

input.field-valid,
select.field-valid,
textarea.field-valid {
  border-color: #16895f;
  background:
    linear-gradient(180deg, #d2ecdf, #f4fff9 36%, #ffffff);
  box-shadow:
    inset 0 2px 8px rgba(22, 137, 95, 0.14),
    0 0 0 2px rgba(22, 137, 95, 0.18);
}

input.field-invalid,
select.field-invalid,
textarea.field-invalid {
  border-color: #b72222;
  background:
    linear-gradient(180deg, #f3cfcf, #fff6f6 36%, #ffffff);
  box-shadow:
    inset 0 2px 8px rgba(183, 34, 34, 0.14),
    0 0 0 2px rgba(183, 34, 34, 0.18);
}

label:has(.field-valid) {
  color: #176b50;
}

label:has(.field-invalid) {
  color: #9d1e1e;
}

.report-text {
  min-height: 260px;
  margin-top: 10px;
  resize: vertical;
  white-space: pre-wrap;
  line-height: 1.45;
}

.subgrid {
  margin: 20px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(0, 72, 77, 0.08), transparent 42%),
    linear-gradient(180deg, #edf3f5, #dde7ea);
  box-shadow: inset 0 2px 15px rgba(20, 33, 41, 0.12), inset 0 1px 0 rgba(255,255,255,0.82);
}

.decision-start {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(225, 237, 240, 0.78)),
    linear-gradient(135deg, rgba(0, 122, 122, 0.10), rgba(196, 93, 42, 0.10));
}

.decision-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.decision-cards div {
  min-height: 104px;
  padding: 14px;
  border: 1px solid rgba(82, 97, 107, 0.24);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(252, 254, 254, 0.94), rgba(225, 235, 238, 0.92));
  box-shadow: 7px 7px 16px rgba(38, 55, 64, 0.12), inset 0 1px 0 rgba(255,255,255,0.82);
}

.decision-cards strong,
.decision-cards span {
  display: block;
}

.decision-cards strong {
  color: var(--accent-dark);
  margin-bottom: 7px;
}

.decision-cards span {
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.92rem;
}

.branch-repeater {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.branch-repeater label {
  padding: 10px;
  border: 1px solid rgba(126, 145, 156, 0.72);
  border-radius: 7px;
  background: linear-gradient(180deg, #f9fcfd, #e7eff2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.78);
}

.branch-repeater .branch-empty {
  opacity: 0.72;
}

.hidden {
  display: none;
}

button {
  border: 0;
  border-radius: 6px;
  font: inherit;
  cursor: pointer;
}

.primary {
  width: 100%;
  min-height: 50px;
  margin-top: 6px;
  color: #fff;
  background: linear-gradient(135deg, #078e8f, #00484d);
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(11, 122, 112, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.function-button {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  justify-items: start;
  min-height: 68px;
  padding: 13px 18px 15px;
  border: 1px solid rgba(1, 60, 65, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.26), rgba(255,255,255,0) 38%),
    linear-gradient(145deg, #0da3a4 0%, #036b70 46%, #00373d 100%);
  text-transform: uppercase;
  letter-spacing: 0;
  transform: translateY(0);
  box-shadow:
    0 16px 0 #00363b,
    0 22px 28px rgba(9, 42, 49, 0.34),
    inset 0 2px 0 rgba(255,255,255,0.34),
    inset 0 -12px 22px rgba(0, 0, 0, 0.24);
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.function-button span:not(.button-led) {
  grid-column: 2;
  font-weight: 900;
}

.function-button small {
  grid-column: 2;
  color: rgba(235, 255, 250, 0.78);
  font-size: 11px;
  font-weight: 800;
}

.button-led {
  grid-row: 1 / span 2;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff, #b9ffd9 32%, #18c56d 58%, #04703e 100%);
  box-shadow: 0 0 0 3px rgba(3, 61, 46, 0.35), 0 0 18px rgba(45, 255, 149, 0.75);
}

.function-button:hover {
  filter: brightness(1.06);
  box-shadow:
    0 18px 0 #00363b,
    0 26px 34px rgba(9, 42, 49, 0.38),
    inset 0 2px 0 rgba(255,255,255,0.38),
    inset 0 -12px 22px rgba(0, 0, 0, 0.22);
}

.function-button:active,
.function-button.is-pressed {
  transform: translateY(10px);
  box-shadow:
    0 6px 0 #00363b,
    0 11px 18px rgba(9, 42, 49, 0.26),
    inset 0 2px 0 rgba(255,255,255,0.22),
    inset 0 8px 22px rgba(0, 0, 0, 0.28);
}

.function-button.is-complete .button-led {
  background: radial-gradient(circle at 35% 30%, #ffffff, #d7fff4 30%, #38e6ff 58%, #0b7786 100%);
  box-shadow: 0 0 0 3px rgba(3, 61, 70, 0.35), 0 0 22px rgba(56, 230, 255, 0.92);
}

.mail-button {
  appearance: none;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 48px;
  margin-top: 10px;
  border: 1px solid #7f929d;
  border-radius: 6px;
  color: #10242c;
  background: linear-gradient(180deg, #ffffff, #d9e3e7);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 10px 22px rgba(20, 33, 41, 0.10);
}

#emailActions .mail-button:not(.secondary) {
  display: none !important;
}

.mail-button:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.mail-button.secondary {
  background: linear-gradient(180deg, #f5fbf8, #d7e8df);
  border-color: #86a596;
}

.primary:hover {
  background: linear-gradient(135deg, #119286, var(--accent-dark));
}

.ghost {
  min-height: 38px;
  padding: 0 14px;
  color: var(--accent-dark);
  background: linear-gradient(180deg, #f9fcfd, #d9e3e7);
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 8px 18px rgba(84, 53, 28, 0.08);
}

.results {
  display: grid;
  gap: 14px;
  align-content: start;
  position: sticky;
  top: 18px;
}

.result-card {
  padding: 20px;
  border-left: 4px solid rgba(0, 122, 122, 0.42);
  box-shadow: 0 12px 26px rgba(20, 33, 41, 0.10), inset 0 1px 0 rgba(255,255,255,0.88);
}

.result-card.emphasis {
  background:
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px) 0 0/18px 18px,
    linear-gradient(135deg, #10242c, #006a70 62%, #1d5878);
  color: #fff;
  border-color: var(--accent-dark);
  border-left-color: #f0b45d;
}

.result-card.emphasis span,
.result-card.emphasis small {
  color: rgba(255, 255, 255, 0.78);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.breakdown {
  display: grid;
  gap: 10px;
}

.row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

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

.row strong {
  text-align: right;
}

.notes {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.45;
}

.notes li.warning {
  color: var(--warn);
}

.notes li.danger {
  color: var(--danger);
}

.qr-card {
  overflow: hidden;
}

.qr-grid {
  display: grid;
  gap: 12px;
}

.qr-item {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #f9fcfd, #e8eff2);
}

.qr-item img {
  width: 86px;
  height: 86px;
  border: 1px solid #f0dfcd;
  border-radius: 4px;
  background: #fff;
}

.qr-item strong,
.qr-item a,
.doc-item strong,
.doc-item a {
  display: block;
}

.qr-item a,
.doc-item a {
  margin-top: 5px;
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.qr-item small {
  display: block;
  margin-top: 5px;
}

.docs-list {
  display: grid;
  gap: 12px;
}

.doc-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #f9fcfd, #e8eff2);
}

.doc-item span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.doc-item small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.4;
}

.price-meta {
  color: var(--muted);
  font-size: 0.9rem;
  text-align: right;
}

.selection-warnings {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.selection-warnings div {
  padding: 10px 12px;
  border: 1px solid rgba(154, 91, 0, 0.24);
  border-radius: 8px;
  color: var(--warn);
  background: #fff8ec;
}

.bom-table {
  overflow-x: auto;
}

.bom-table table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 920px;
}

#resultTable table,
#electricalTable table {
  min-width: 0;
  table-layout: fixed;
}

#resultTable th:first-child,
#resultTable td:first-child,
#electricalTable th:first-child,
#electricalTable td:first-child {
  width: 34%;
}

#resultTable td,
#electricalTable td {
  overflow-wrap: anywhere;
}

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

.bom-table th {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  background: #dce7eb;
  position: sticky;
  top: 0;
  z-index: 1;
}

.bom-table tbody tr {
  background: rgba(250, 253, 254, 0.70);
}

.bom-table tbody tr:nth-child(even) {
  background: rgba(234, 242, 245, 0.82);
}

.bom-table tbody tr:hover {
  background: rgba(223, 244, 238, 0.66);
}

.bom-table td:nth-child(4),
.bom-table td:nth-child(5),
.bom-table td:nth-child(6),
.bom-table th:nth-child(4),
.bom-table th:nth-child(5),
.bom-table th:nth-child(6) {
  text-align: right;
}

.bom-table a {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
}

.bom-total {
  font-weight: 800;
  background: linear-gradient(90deg, var(--soft), var(--accent-soft));
}

.product-cell {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.product-cell strong,
.product-cell small {
  overflow-wrap: anywhere;
}

.product-photo {
  width: 74px;
  height: 58px;
  object-fit: contain;
  padding: 6px;
  border: 1px solid #dfc9b1;
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(244, 234, 220, 0.72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 8px 16px rgba(84, 53, 28, 0.10);
}

.product-photo-empty {
  display: grid;
  place-items: center;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
}

.selected-product {
  grid-template-columns: 92px minmax(0, 1fr);
}

.selected-product .product-photo {
  width: 92px;
  height: 72px;
}

.installation-diagram {
  overflow-x: auto;
}

.diagram-wrap {
  min-width: min(860px, 100%);
}

.installation-diagram svg {
  width: 100%;
  height: auto;
  display: block;
}

.diagram-media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: #dfe9ed;
}

.diagram-media-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(126, 145, 156, 0.72);
  border-radius: 7px;
  background: linear-gradient(180deg, #f9fcfd, #e7eff2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.84), 0 8px 18px rgba(20, 33, 41, 0.10);
}

.diagram-media-card strong,
.diagram-media-card span,
.diagram-media-card a {
  display: block;
}

.diagram-media-card strong {
  color: var(--accent-dark);
  margin-bottom: 4px;
}

.diagram-qr {
  width: 96px;
  height: 96px;
  border: 1px solid #f0dfcd;
  border-radius: 4px;
  background: #fff;
}

.diagram-caption-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(180deg, #e7eff2, #d7e2e7);
}

.diagram-caption-grid div {
  padding: 10px;
  border: 1px solid rgba(126, 145, 156, 0.72);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
}

.diagram-caption-grid strong,
.diagram-caption-grid span {
  display: block;
}

.diagram-caption-grid strong {
  margin-bottom: 5px;
  color: var(--accent-dark);
}

.diagram-caption-grid span {
  color: var(--muted);
  line-height: 1.4;
}

.diagram-product-card {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.diagram-product-card .product-photo {
  width: 82px;
  height: 62px;
}

.diagram-product-card span,
.diagram-product-card strong {
  margin: 0;
}

.diagram-bg {
  fill: #dfe8ec;
  stroke: #8ea0ab;
}

.diagram-grid {
  stroke: rgba(71, 91, 103, 0.18);
  stroke-width: 1;
}

.pipe-core {
  stroke: url("#pipeCopper");
  stroke-width: 38;
  stroke-linecap: round;
  filter: url("#pipeShadow");
}

.pipe-core.technical {
  stroke-width: 42;
}

.pipe-line {
  stroke: url("#pipeCopper");
  stroke-width: 32;
  stroke-linecap: round;
  filter: url("#pipeShadow");
}

.pipe-branch {
  stroke: url("#pipeCopper");
  stroke-width: 28;
  stroke-linecap: round;
  filter: url("#pipeShadow");
}

.pipe-highlight {
  stroke: rgba(255, 235, 187, 0.92);
  stroke-width: 6;
  stroke-linecap: round;
  fill: none;
}

.pipe-highlight.vertical {
  stroke-width: 4;
}

.pipe-lowlight {
  stroke: rgba(88, 40, 21, 0.34);
  stroke-width: 4;
  stroke-linecap: round;
  fill: none;
}

.heat-cable {
  fill: none;
  stroke: url("#heatCableRed");
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 3px 3px rgba(93, 30, 24, 0.25));
}

.heat-cable.technical {
  stroke-width: 6;
  stroke-linecap: butt;
}

.heat-cable.secondary {
  stroke: #e15b43;
  stroke-dasharray: 12 8;
}

.heat-cable.tertiary {
  stroke: #7b2f2f;
  stroke-dasharray: 4 7;
}

.signal-line {
  stroke: #005f69;
  stroke-width: 3;
  fill: none;
}

.leader-line {
  stroke: #43535c;
  stroke-width: 1.5;
  fill: none;
}

.section-line {
  stroke: #1d5878;
  stroke-width: 3;
  stroke-dasharray: 8 7;
  fill: none;
}

.box,
.qr-box {
  fill: url("#boxMetal");
  stroke: #71838e;
  stroke-width: 2;
  filter: drop-shadow(0 8px 11px rgba(20, 33, 41, 0.16));
}

.tee-node {
  fill: url("#teeMetal");
  stroke: #7e2b24;
  stroke-width: 4;
}

.sensor {
  fill: #0f6b63;
  stroke: #fff;
  stroke-width: 3;
}

.pipe-cross-section {
  fill: url("#pipeCopperRadial");
  stroke: #7c3d20;
  stroke-width: 4;
  filter: drop-shadow(0 8px 9px rgba(84, 53, 28, 0.22));
}

.heat-dot {
  fill: #b93030;
  stroke: #fff;
  stroke-width: 2;
}

.secondary-dot {
  fill: #e15b43;
}

.diagram-title {
  fill: var(--ink);
  font-size: 23px;
  font-weight: 800;
}

.diagram-label {
  fill: var(--ink);
  font-size: 16px;
  font-weight: 800;
}

.diagram-note {
  fill: var(--muted);
  font-size: 13px;
}

.diagram-small {
  fill: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.legend-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.legend-grid div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fffaf4, #fff2e4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.legend-grid strong,
.legend-grid span {
  display: block;
}

.legend-grid strong {
  margin-bottom: 8px;
  color: var(--accent-dark);
}

.legend-grid span {
  color: var(--muted);
  line-height: 1.45;
}

.references {
  margin-top: 20px;
  padding: 24px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2c2118, #123c3a);
  color: #fff;
}

.reference-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.reference-grid div {
  min-height: 126px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.reference-grid strong,
.reference-grid span {
  display: block;
}

.reference-grid strong {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.reference-grid span {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.45;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-top: 20px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 244, 0.92);
  box-shadow: 0 10px 30px rgba(84, 53, 28, 0.07);
}

.site-footer strong,
.site-footer span {
  display: block;
}

.site-footer span {
  margin-top: 4px;
  color: var(--muted);
}

.phone-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 6px;
  color: #fff;
  background: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.phone-link span {
  color: #fff;
}

.phone-link:hover {
  background: var(--accent-dark);
}

@media (max-width: 1080px) {
  .hero,
  .workspace,
  .detail-grid {
    grid-template-columns: 1fr;
  }

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

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

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

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

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

@media (max-width: 760px) {
  .shell {
    width: min(100% - 20px, 1460px);
    padding-top: 10px;
  }

  .hero,
  .panel,
  .references {
    padding: 18px;
  }

  .two,
  .three,
  .four,
  .branch-repeater,
  .results,
  .reference-grid,
  .legend-grid,
  .diagram-media-grid,
  .diagram-caption-grid,
  .brandbar {
    grid-template-columns: 1fr;
  }

  .brandbar {
    display: grid;
  }

  .brand-meta {
    text-align: left;
  }

  .top-phone {
    justify-content: center;
    width: fit-content;
  }

  .site-footer {
    display: grid;
    align-items: start;
  }

  h1 {
    font-size: 2.25rem;
  }
}
