:root {
  --deep: #0b3437;
  --ink: #153538;
  --gold: #d4a64c;
  --paper: #f4f6f2;
  --line: #d7e0dc;
  --muted: #64777a;
  --soft: #edf2ef;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    15px/1.6 Arial,
    sans-serif;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select {
  font: inherit;
}
header {
  height: 74px;
  max-width: 1120px;
  margin: auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand img {
  width: 88px;
  height: 46px;
  object-fit: contain;
  border-radius: 8px;
}
.brand span,
.brand b,
.brand small {
  display: block;
}
.brand b {
  font-size: 13px;
  letter-spacing: 0.12em;
}
.brand small {
  font-size: 7px;
  color: #8c6d32;
  letter-spacing: 0.14em;
}
header nav {
  display: flex;
  gap: 25px;
  font-weight: 700;
}
main {
  max-width: 1120px;
  margin: auto;
  padding: 0 24px;
}
.hero {
  background: linear-gradient(135deg, #09282b, #105055);
  border-radius: 22px;
  color: #fff;
  padding: 64px;
}
.hero p,
.intro p,
.cta p {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
}
.hero h1 {
  font:
    500 clamp(42px, 6vw, 70px)/1.05 Georgia,
    serif;
  margin: 0 0 24px;
}
.hero h1 em {
  color: #e3bb68;
  font-style: normal;
}
.hero > span {
  display: block;
  max-width: 720px;
  color: #cbd9d8;
  font-size: 17px;
}
.tool-nav {
  width: calc(100% - 80px);
  margin: -24px auto 70px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 45px #0a32351c;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.tool-nav a {
  padding: 23px;
  display: flex;
  gap: 18px;
  align-items: center;
}
.tool-nav a + a {
  border-left: 1px solid var(--line);
}
.tool-nav b {
  color: var(--gold);
}
.tool-nav span,
.tool-nav small {
  display: block;
}
.tool-nav span {
  font-weight: 800;
}
.tool-nav small {
  color: var(--muted);
  font-weight: 400;
}
.workspace {
  display: grid;
  grid-template-columns: 0.64fr 1.36fr;
  gap: 46px;
  align-items: start;
  margin: 70px 0;
  scroll-margin-top: 25px;
}
.workspace.alt {
  padding-top: 70px;
  border-top: 1px solid var(--line);
}
.intro h2,
.cta h2 {
  font:
    500 clamp(30px, 4vw, 44px)/1.12 Georgia,
    serif;
  margin: 0 0 15px;
}
.intro > span {
  color: var(--muted);
}
.coverage {
  padding: 0;
  margin: 24px 0 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.coverage li {
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  color: #496467;
  font-size: 13px;
}
.coverage li:before {
  content: "✓";
  color: #a47620;
  font-weight: 900;
  margin-right: 9px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 12px 35px #1034380b;
}
.calculator-card {
  padding: 0;
  overflow: hidden;
}
.calculator-heading {
  padding: 22px 26px;
  background: var(--deep);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.calculator-heading small,
.calculator-heading strong {
  display: block;
}
.calculator-heading small {
  font-size: 9px;
  letter-spacing: 0.16em;
  color: #d9b45f;
}
.calculator-heading strong {
  margin-top: 3px;
}
.quiet {
  border: 1px solid #ffffff38;
  background: transparent !important;
  color: #fff !important;
  width: auto !important;
  padding: 7px 12px !important;
}
.selector-grid {
  padding: 24px 26px 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}
.selector-grid .wide {
  grid-column: 1/-1;
}
.card label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 14px;
}
.card label > span {
  display: block;
  margin-bottom: 6px;
}
.card input,
.card select {
  width: 100%;
  border: 1px solid #bdceca;
  border-radius: 9px;
  padding: 12px;
  background: #fbfcfa;
  color: var(--ink);
}
.fields-grid {
  padding: 7px 26px 5px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}
.preset-row {
  margin: 5px 26px 10px;
  padding: 17px;
  background: #f4f7f4;
  border: 1px solid #dfe7e3;
  border-radius: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}
.input-unit {
  display: flex;
  border: 1px solid #bdceca;
  border-radius: 9px;
  background: #fbfcfa;
  overflow: hidden;
}
.input-unit input {
  border: 0;
  border-radius: 0;
  background: transparent;
  min-width: 0;
}
.input-unit b {
  display: flex;
  align-items: center;
  padding: 0 11px;
  border-left: 1px solid #d4dfdc;
  background: #f0f4f1;
  color: #617477;
  font-size: 11px;
  white-space: nowrap;
}
.custom-density {
  padding-top: 2px;
}
.product-preview {
  margin: 7px 26px 16px;
  border: 1px solid #d8e2de;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(145deg, #f8faf8, #edf3f0);
}
.preview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid #d8e2de;
}
.preview-heading span,
.preview-heading small,
.preview-heading b { display: block; }
.preview-heading small { color: #947020; font-size: 8px; letter-spacing: .14em; }
.preview-heading b { font-size: 13px; margin-top: 2px; }
.preview-heading em { color: var(--muted); font-size: 10px; font-style: normal; }
#product-drawing { padding: 8px 12px 4px; }
#product-drawing svg { display: block; width: 100%; height: auto; max-height: 230px; }
.preset-row.single { grid-template-columns: 1fr; }
.preset-row.single p { margin: -4px 0 0; color: var(--muted); font-size: 10px; }
.field-note {
  margin: 0 26px 14px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.card button.calculate,
.card > button:not(.quiet) {
  width: calc(100% - 52px);
  margin: 10px 26px 0;
  border: 0;
  border-radius: 9px;
  padding: 14px;
  background: var(--deep);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}
.workspace.alt .card > button {
  width: 100%;
  margin: 0;
}
.result {
  margin: 16px 26px 0;
  padding: 17px;
  border-radius: 11px;
  background: var(--soft);
}
.workspace.alt .result {
  margin-left: 0;
  margin-right: 0;
}
.result small,
.result strong,
.result > span,
.result em {
  display: block;
}
.result small {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.result strong {
  font-size: 18px;
  margin: 4px 0;
}
.result > span,
.result em {
  font-size: 12px;
  color: var(--muted);
  font-style: normal;
}
.result.good {
  background: #e4f1e9;
  border-left: 4px solid #2b8060;
}
.result.warn {
  background: #fff5de;
  border-left: 4px solid #d4a64c;
}
.result.bad {
  background: #fceae7;
  border-left: 4px solid #b75545;
}
.result-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 13px 0;
}
.result-metrics span {
  padding: 9px;
  background: #ffffff94;
  border-radius: 7px;
  color: #4f696b;
  font-size: 10px;
}
.result-metrics b {
  display: block;
  font-size: 14px;
  color: var(--ink);
}
.basis { margin: 10px 0; padding-top: 10px; border-top: 1px solid #bfd8ca; }
.basis b,.basis span { display: block; }
.basis b { font-size: 11px; color: var(--ink); }
.basis span { font-size: 10px; color: var(--muted); }
.method-note {
  margin: 16px 26px 24px;
  border-top: 1px solid var(--line);
  padding-top: 13px;
  color: var(--muted);
  font-size: 11px;
}
.method-note summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 800;
}
.method-note p {
  margin: 9px 0 0;
}
.cta {
  background: var(--deep);
  color: #fff;
  border-radius: 18px;
  margin: 80px 0 30px;
  padding: 42px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
}
.cta h2 {
  margin: 0;
}
.cta a {
  flex: none;
  background: var(--gold);
  color: #163639;
  padding: 14px 19px;
  border-radius: 9px;
  font-weight: 800;
}
footer {
  max-width: 1120px;
  margin: auto;
  padding: 30px 24px 50px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}
footer a {
  font-weight: 700;
  color: var(--ink);
}
[hidden] {
  display: none !important;
}
@media (max-width: 760px) {
  header nav a:not(:last-child) {
    display: none;
  }
  main {
    padding: 0 12px;
  }
  .hero {
    padding: 42px 24px;
    border-radius: 16px;
  }
  .hero > span {
    font-size: 14px;
  }
  .tool-nav {
    width: calc(100% - 20px);
    grid-template-columns: 1fr;
    margin-bottom: 55px;
  }
  .tool-nav a + a {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .workspace {
    grid-template-columns: 1fr;
    gap: 24px;
    margin: 55px 0;
  }
  .workspace.alt {
    padding-top: 55px;
  }
  .card {
    padding: 20px;
  }
  .calculator-card {
    padding: 0;
  }
  .selector-grid,
  .fields-grid {
    grid-template-columns: 1fr;
    padding-left: 18px;
    padding-right: 18px;
  }
  .preset-row {
    grid-template-columns: 1fr;
    margin-left: 18px;
    margin-right: 18px;
  }
  .field-note {
    margin-left: 18px;
    margin-right: 18px;
  }
  .product-preview { margin-left: 18px; margin-right: 18px; }
  .preview-heading { align-items: flex-start; }
  .preview-heading em { max-width: 120px; text-align: right; }
  .card button.calculate {
    width: calc(100% - 36px);
    margin-left: 18px;
    margin-right: 18px;
  }
  .result,
  .method-note {
    margin-left: 18px;
    margin-right: 18px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .result-metrics {
    grid-template-columns: 1fr 1fr;
  }
  .cta {
    align-items: flex-start;
    flex-direction: column;
    padding: 30px 22px;
  }
  .cta a {
    width: 100%;
    text-align: center;
  }
  footer {
    flex-direction: column;
    gap: 8px;
  }
  .brand span {
    display: none;
  }
}
