:root {
  color-scheme: light;
  --bg: #eef3f9;
  --surface: #fff;
  --ink: #14253b;
  --muted: #4a5d73;
  --line: #d5dfeb;
  --control: #f7f9fd;
  --blue: #1455b3;
  --blue-soft: #e6efff;
  --shadow: 0 16px 48px #152f4f12;
  --rad: 1.125rem;
  --masthead-height: 74px;
  --masthead-surface: #f8faf7;
  --masthead-ink: #132c34;
  --masthead-line: #bed0ca;
  --masthead-accent: #24635c;
  font-family: "Instrument Sans", "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1422;
  --surface: #111e30;
  --ink: #eaf2fd;
  --muted: #adbed2;
  --line: #32435a;
  --control: #16253a;
  --blue: #8bc5ff;
  --blue-soft: #1b385b;
  --shadow: 0 16px 48px #0003;
  --masthead-surface: #1b3435;
  --masthead-ink: #edf6f2;
  --masthead-line: #48605d;
  --masthead-accent: #b3e5d8;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: var(--masthead-height); }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.42; }
h1, h2, p, dl, dd { margin: 0; }
a { color: var(--blue); text-underline-offset: .2em; }
button, select, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .56; }
:focus-visible { outline: 3px solid #3c95ff; outline-offset: 3px; }
.wrap { width: min(88rem, calc(100% - 3.5rem)); margin-inline: auto; }
.skip { position: fixed; z-index: 6; transform: translateY(-150%); background: var(--surface); padding: .75rem; }
.skip:focus { transform: translateY(0); }
.masthead { position: sticky; z-index: 5; top: 0; color: var(--masthead-ink); background: var(--masthead-surface); border-bottom: 1px solid var(--masthead-line); }
.masthead-inner { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: clamp(10px,1.9vw,29px); width: min(1370px,calc(100% - 112px)); min-height: 73px; margin-inline: auto; }
.brand, .masthead-actions, .site-settings, .calculator-nav { display: flex; align-items: center; }
.brand { gap: 9px; color: inherit; font-size: clamp(18px,1.8vw,25px); font-weight: 830; line-height: 1.05; text-decoration: none; }
.brand img { flex: none; border-radius: 7px; }
.brand small { display: block; margin-top: 5px; color: var(--masthead-accent); font-size: 9px; font-weight: 750; letter-spacing: .13em; }
.masthead-actions { gap: clamp(6px,1.5vw,22px); }
.site-settings { gap: 5px; padding-inline-start: 9px; border-inline-start: 1px solid var(--masthead-line); }
.site-settings > *, .masthead-contact, .calculator-nav a { display: inline-grid; place-items: center; min-height: 44px; font-weight: 750; text-decoration: none; }
.site-settings > * { min-width: 34px; padding: 0 5px; border: 0; color: var(--masthead-accent); background: transparent; font-size: 13px; white-space: nowrap; }
.site-settings button { min-width: 38px; font-size: 22px; line-height: 1; }
.site-settings > *:hover { text-decoration: underline; text-underline-offset: 4px; }
.masthead-contact { padding: 0 12px; border: 1px solid #477771; border-radius: 4px; color: #fff; background: #1c4548; font-size: 14px; white-space: nowrap; }
.masthead-contact:hover { background: #265958; }
.calculator-nav { align-self: stretch; justify-content: center; gap: clamp(12px,2vw,30px); }
.calculator-nav a { border-block: 3px solid transparent; color: var(--masthead-ink); font-size: 15px; white-space: nowrap; }
.calculator-nav a:is([aria-current],:hover,:focus-visible) { border-bottom-color: var(--masthead-accent); color: var(--masthead-accent); }
.hero { position: relative; isolation: isolate; background: #0b1930 url('hero.webp?v=2') no-repeat center 53% / cover; color: #f2f7ff; }
.hero::before { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg,#08162cee 2%,#08162ccc 39%,#0a162c1a 100%); }
.hero-copy { padding-block: clamp(1.2rem, 2.6vw, 2.35rem); }
.hero h1 { max-width: 26ch; font-size: clamp(1.65rem, 3.3vw, 3.1rem); letter-spacing: -.033em; line-height: 1.12; font-weight: 780; text-wrap: balance; }
.hero p { color: #dfecfd; margin-top: .4rem; max-width: 52ch; font-size: clamp(.875rem, 1.2vw, 1rem); }
[data-studio-tool="chimney"] .hero { background-image: url('hero-chimney.webp?v=6'); }
.calculator-section, .legacy-result { scroll-margin-top: .75rem; }
.calculator-section { padding-block: 1rem 1.65rem; }
.chimney-section { border-top: 1px solid var(--line); }
.legacy-form { display: grid; grid-template-columns: minmax(19rem,.82fr) minmax(0,1.45fr); align-items: start; gap: .85rem; }
.legacy-form > :is(.legacy-inputs,.studio-preview,.legacy-result) { min-width: 0; border-radius: var(--rad); box-shadow: var(--shadow); }
.legacy-inputs, .legacy-result { border: 1px solid var(--line); background: var(--surface); padding: clamp(.8rem, 1.45vw, 1.25rem); }
.input-heading, .preview-heading { display: flex; justify-content: space-between; align-items: start; gap: .6rem; }
.input-heading { margin-bottom: .65rem; align-items: center; }
.input-heading h2, .preview-heading h2 { font-size: clamp(1.14rem, 2vw, 1.45rem); line-height: 1.2; letter-spacing: -.02em; }
.sample { padding: .2rem 0; border: 0; background: none; color: var(--blue); white-space: nowrap; font-size: .875rem; text-decoration: underline; text-underline-offset: .2em; }
.fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .45rem .65rem; }
.legacy-primary > label:last-child { grid-column: 1 / -1; }
#tank-304 .legacy-primary { grid-template-columns: repeat(2,minmax(0,1fr)); }
#tank-304 .legacy-primary > label:last-child { grid-column: auto; }
fieldset { min-width: 0; border: 0; margin: .6rem 0 0; padding: 0; }
legend { padding: 0; margin-bottom: .45rem; font-weight: 700; font-size: .9rem; }
label { font-size: .875rem; font-weight: 600; min-width: 0; }
label span { color: var(--muted); margin-left: .3em; font-size: .8rem; font-weight: 400; }
select,input { display: block; margin-top: .27rem; width: 100%; min-width: 0; min-height: 2.65rem; border: 1px solid var(--line); border-radius: .58rem; padding: .44rem .62rem; background-color: var(--control); color: var(--ink); font-size: 1rem; }
select { appearance: none; padding-right: 1.7rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%236486a9' stroke-width='2'%3E%3Cpath d='m5 8 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-size: 1rem; background-position: right .45rem center; }
.legacy-disclosure { border-top: 1px solid var(--line); margin-top: .55rem; }
.legacy-disclosure summary { padding-block: .42rem; cursor: pointer; font-weight: 700; }
.legacy-disclosure[open] { padding-bottom: .45rem; }
.legacy-disclosure[open] fieldset:first-of-type { margin-top: .2rem; }
.fine { font-size: .86rem; color: var(--muted); margin-block: .45rem; }
.calc-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-block: .6rem .1rem; }
.button { min-height: 2.7rem; padding: .52rem .85rem; border: 1px solid var(--line); border-radius: .6rem; color: var(--ink); background: var(--control); font-weight: 700; }
.button.mint { flex: 1 1 auto; color: #fff; background: #144fbd; border-color: #144fbd; }
.button:hover:not(:disabled) { border-color: var(--blue); }
.button.mint:hover:not(:disabled) { background: #113e98; }
:is([data-legacy-status], [data-chimney-status]) { color: var(--blue); overflow-wrap: anywhere; scroll-margin: .75rem 0 1rem; }
:is([data-legacy-status], [data-chimney-status]):empty { margin: 0; }
.legacy-result { grid-column: 1/-1; }
.metrics, .model-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .7rem; }
.metrics div { background: var(--control); border-radius: .55rem; padding: .48rem .62rem; }
.metrics .legacy-total { background: var(--blue-soft); }
.metrics dt, .model-metrics dt { font-size: .875rem; }
.metrics dd, .model-metrics dd { font-size: clamp(1.1rem, 2.1vw, 1.48rem); font-weight: 750; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.metrics .legacy-total dd { color: var(--blue); }
.table-scroll { max-width: 100%; overflow: auto; }
table { width: 100%; min-width: 36rem; border-collapse: collapse; font-size: .93rem; }
th,td { text-align: left; padding: .32rem .5rem; border-bottom: 1px solid var(--line); }
thead { background: var(--control); } 
tbody td:nth-last-child(-n+3) { font-variant-numeric: tabular-nums; }
.quote-company { display: flex; gap: .2rem 1rem; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 1rem; padding-top: .8rem; color: var(--muted); font-size: .9rem; font-style: normal; }
.studio-preview { overflow: hidden; border: 1px solid #29405d; background: #08182e; color: #eff6ff; }
.preview-heading { padding: .75rem 1rem .55rem; align-items: center; }
.preview-heading p { color: #b7cadf; font-size: .875rem; margin-top: .26rem; }
.shape-label { border: 1px solid #517397; border-radius: .45rem; color: #c9e5ff; padding: .26rem .55rem; font-size: .875rem; white-space: nowrap; }
.model-stage { position: relative; background: radial-gradient(ellipse at 50% 44%,#193653 0%,#0d213a 63%,#08182e 100%); }
.model-stage canvas { width: 100%; height: clamp(15rem, 23vw, 21rem); display: block; touch-action: none; cursor: grab; }
.model-stage canvas:active { cursor: grabbing; }
.model-stage canvas:focus-visible { outline-offset: -4px; }
.chimney-assembly { background-color: #142c3c; background-image: linear-gradient(#84a6bf16 1px,transparent 1px),linear-gradient(90deg,#84a6bf16 1px,transparent 1px); background-size: 24px 24px; }
.chimney-assembly { height:clamp(15rem,23vw,21rem); }
.chimney-assembly canvas, .chimney-assembly [data-chimney-vector], .chimney-poster { position:absolute; inset:0; width:100%; height:100%; }
.chimney-assembly [data-chimney-vector] { touch-action:none; cursor:grab; }
.chimney-poster { margin:0; display:grid; place-items:center; pointer-events:none; }
.chimney-poster svg { width:100%; height:90%; }
.chimney-poster figcaption { position:absolute; left:.9rem; bottom:.5rem; color:#cfdeeb; font-size:.8rem; }
.chimney-assembly canvas[hidden] { display:none }
.chimney-assembly p { color:#e1edf5; padding:1.5rem; margin:0 }

[data-model-error] { position: absolute; inset: 0; display: grid; place-items: center; background: #08182ed9; pointer-events: none; text-align: center; padding: .7rem; }
.model-controls { display: flex; gap: .4rem; flex-wrap: wrap; padding: .55rem 1rem; }
.model-controls button { min-height: 2.5rem; padding: .36rem .58rem; border: 1px solid #4b6788; background: #10243d; color: #eaf4ff; border-radius: .48rem; font-size: .875rem; }
.model-controls button:is(:hover,[aria-pressed="true"]) { background: #214c78; border-color: #8bc5ff; }
.model-zoom { margin-inline-start: auto; display: flex; gap: .32rem; }
.model-zoom button { width: 2.5rem; font-size: 1.16rem; }
.model-metrics { grid-template-columns: minmax(0,1.35fr) minmax(0,1fr); background: #0e213a; border-top: 1px solid #324d6a; padding: .55rem 1rem .65rem; }
.model-metrics dt { color: #b4cbe1; }
.model-metrics dd { padding-top: .2rem; color: #fff; }
.model-note { background: #0e213a; color: #b4cbe1; font-size: .8rem; padding: 0 1rem .65rem; }
.print-summary { display: none; }
.studio-footer { border-top: 1px solid var(--line); color: var(--muted); padding-block: 1.2rem; }
.studio-footer .wrap { display: flex; justify-content: space-between; gap: .75rem 1rem; flex-wrap: wrap; font-size: .9rem; }
.studio-footer .wrap div:last-child { display: flex; gap: .3rem 1rem; flex-wrap: wrap; align-items: center; }
.studio-footer strong { color: var(--ink); }
@media (max-width: 1050px) {
  .masthead-inner { width: calc(100% - 56px); }
}
@media (max-width: 820px) {
  :root { --masthead-height: 105px; }
  .masthead-inner { grid-template-columns: minmax(0,1fr) auto; grid-template-areas: "brand actions" "tools tools"; grid-template-rows: 60px 44px; width: calc(100% - 28px); gap: 0 8px; }
  .brand { grid-area: brand; font-size: clamp(15px,4vw,20px); }
  .brand img { width: 30px; height: 30px; }
  .masthead-actions { grid-area: actions; }
  .calculator-nav { grid-area: tools; justify-content: flex-start; gap: 0; border-top: 1px solid var(--masthead-line); }
  .calculator-nav a { min-height: 43px; padding-inline: 12px; font-size: 14px; }
  .masthead-contact { padding-inline: 7px; }
  .site-settings { gap: 0; padding-inline-start: 3px; }
}
@media (max-width: 790px) {
  .chimney-preview { grid-row:1; }
  .chimney-assembly { height:clamp(15rem,58vw,25rem); }
  .model-stage.chimney-assembly canvas { height:100%; }
  .legacy-form { grid-template-columns: minmax(0,1fr); gap: .95rem; }
  .wrap { width: calc(100% - 1.75rem); }
  .hero::before { background: linear-gradient(90deg,#08162cf2,#08162c9c); }
  .model-stage canvas { height: clamp(15rem, 58vw, 25rem); }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 370px) {
  .wrap { width: calc(100% - 1.25rem); }
  .masthead-inner { width: calc(100% - 20px); }
  .brand { gap: 6px; }
  .preview-heading, .model-controls, .model-metrics { padding-inline: .8rem; }
}
@page { size: A4 portrait; margin: 8mm 9mm; }
@media print {
  :root, :root[data-theme="dark"] { color-scheme: light; --ink:#000; --surface:#fff; --control:#fff; --line:#aaa; --blue:#000; --blue-soft:#fff; }
  body { color:#000; background:#fff; }
  .masthead,.studio-preview,.hero,.calculator-nav,.studio-footer,.calc-actions,.sample,.skip,[data-legacy-status],[data-legacy-replay-help],[data-chimney-status] { display:none !important; }
  .print-chimney #tank-304, .print-tank-304 #chimney { display:none !important; }
  .wrap { width:100%; }
  .legacy-form { display:block; }
  .legacy-inputs,.legacy-result { box-shadow:none !important; padding:.5rem; margin-bottom:.6rem; }
  .fields { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .legacy-primary > label:last-child { grid-column:auto; }
  .table-scroll { overflow:visible; }
  table { min-width:0; font-size:10pt; }
  th,td { padding:.25rem; }
  tr { break-inside:avoid; }
  select,input { min-height:0; padding:.14rem; }
  .studio-print-quote { font-size: 9pt; line-height: 1.23; }
  .studio-print-quote .calculator-section { padding: 0; border: 0; }
  .studio-print-quote .legacy-inputs,
  .studio-print-quote .legacy-result > .input-heading { display: none; }
  .studio-print-quote .legacy-result {
    margin: 0; border: 0; padding: 0;
  }
  .studio-print-quote .legacy-result > * + * { margin-top: 1.1mm; }
  .studio-print-quote [data-repeated-panel] { display: none; }
  .studio-print-quote .print-summary { display: block; }
  .print-summary h2 { font-size: 15pt; margin-bottom: 2mm; }
  .print-summary dl {
    display: grid; grid-template-columns: repeat(6,minmax(0,1fr));
    border-top: 1px solid #aab2bd; border-left: 1px solid #aab2bd;
  }
  .print-summary dl > div { padding: .55mm 1.4mm; border: solid #aab2bd; border-width: 0 1px 1px 0; }
  .print-summary dt { font-size: 7.5pt; }
  .print-summary dd { font-weight: 700; overflow-wrap: anywhere; }
  .studio-print-quote .metrics { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1mm; }
  .studio-print-quote .metrics > div { border: 1px solid #aab2bd; padding: .9mm 1.5mm; border-radius: 0; }
  .studio-print-quote .metrics dt { font-size: 8pt; }
  .studio-print-quote .metrics dd { font-size: 11pt; }
  .studio-print-quote .legacy-disclosure { border: 0; margin: 0; padding: 0; min-width: 0; }
  .studio-print-quote .legacy-disclosure summary { list-style: none; padding: .55mm 0; }
  .studio-print-quote .legacy-disclosure summary::-webkit-details-marker { display: none; }
  .studio-print-quote table { table-layout: fixed; font-size: 8pt; line-height: 1.1; }
  .studio-print-quote thead th:nth-child(1) { width: 28%; }
  .studio-print-quote thead th:nth-child(2) { width: 21%; }
  .studio-print-quote thead th:nth-child(3) { width: 8%; }
  .studio-print-quote thead th:nth-child(4) { width: 12%; }
  .studio-print-quote thead th:nth-child(5) { width: 13%; }
  .studio-print-quote thead th:nth-child(6) { width: 18%; }
  .studio-print-quote :is(th,td) { border: 1px solid #aab2bd; padding: .25mm .8mm; overflow-wrap: anywhere; }
  .studio-print-quote tbody td:nth-last-child(-n+3) { text-align: right; }
  .studio-print-quote .fine { font-size: 8pt; margin: .25mm 0; }
  .studio-print-quote .quote-company { font-size: 8pt; margin-top: 0; padding-top: .8mm; }
}
