:root {
  --bg: #f6f3eb;
  --surface: #ffffff;
  --surface-2: #ece9df;
  --ink: #19231d;
  --muted: #5d675f;
  --line: #d8d6ca;
  --brand: #365f46;
  --brand-dark: #274735;
  --accent: #c8913f;
  --accent-soft: #f2e3c7;
  --danger: #a63d35;
  --shadow: 0 18px 50px rgba(34, 47, 38, 0.10);
  --radius: 18px;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
a { color: var(--brand-dark); text-underline-offset: 3px; }
a:hover { color: var(--brand); }
img, svg { max-width: 100%; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: white;
  padding: 10px 14px;
  z-index: 999;
}
.skip-link:focus { left: 12px; top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(246, 243, 235, 0.90);
  border-bottom: 1px solid rgba(216, 214, 202, 0.85);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: white;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.10);
}
.brand-mark svg { width: 21px; height: 21px; }
.nav { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--muted); font-size: 0.93rem; text-decoration: none; font-weight: 650; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 64px 22px 30px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 46px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.6);
  border-radius: 999px;
  padding: 7px 11px;
  font-weight: 750;
  font-size: .80rem;
  color: var(--brand-dark);
  letter-spacing: .03em;
  text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 5.4rem);
  line-height: .98;
  letter-spacing: -.055em;
  margin: 17px 0 18px;
  max-width: 760px;
}
.hero-copy { color: var(--muted); font-size: 1.13rem; max-width: 650px; margin: 0; }
.hero-points { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.hero-point {
  padding: 8px 11px;
  background: var(--surface-2);
  border-radius: 999px;
  font-size: .86rem;
  color: #435047;
  font-weight: 650;
}
.hero-visual {
  min-height: 280px;
  border-radius: 28px;
  background: linear-gradient(145deg, #dde5db 0%, #c4d1c7 45%, #d8c4a2 100%);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(54, 95, 70, .12);
}
.hero-visual::before,
.hero-visual::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.37);
  filter: blur(1px);
}
.hero-visual::before { width: 260px; height: 260px; right: -45px; top: -60px; }
.hero-visual::after { width: 180px; height: 180px; left: -40px; bottom: -60px; }
.stone-stack { position: absolute; inset: 30px; display: grid; place-items: center; }
.stone {
  position: absolute;
  width: var(--w); height: var(--h);
  left: var(--x); top: var(--y);
  border-radius: 48% 52% 46% 54% / 58% 43% 57% 42%;
  background: linear-gradient(150deg, rgba(255,255,255,.85), rgba(82,105,91,.24));
  border: 1px solid rgba(52,72,60,.13);
  box-shadow: 0 15px 24px rgba(54,71,60,.12);
  transform: rotate(var(--r));
}
.visual-label {
  position: absolute;
  right: 24px;
  bottom: 22px;
  background: rgba(25,35,29,.9);
  color: white;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: .86rem;
  max-width: 240px;
}

.calculator-wrap { max-width: var(--max); margin: 0 auto; padding: 18px 22px 70px; }
.calculator-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.calculator-head {
  padding: 24px 26px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}
.calculator-head h2 { margin: 0 0 4px; font-size: 1.45rem; letter-spacing: -.025em; }
.calculator-head p { margin: 0; color: var(--muted); font-size: .92rem; }
.unit-toggle { display: inline-flex; padding: 4px; background: var(--surface-2); border-radius: 12px; }
.unit-toggle button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 13px;
  border-radius: 9px;
  font-weight: 750;
  font-size: .85rem;
}
.unit-toggle button.active { background: white; color: var(--ink); box-shadow: 0 2px 9px rgba(0,0,0,.08); }
.calculator-body { display: grid; grid-template-columns: 1.04fr .96fr; }
.inputs { padding: 26px; border-right: 1px solid var(--line); }
.results { padding: 26px; background: #f4f6f1; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.field.full { grid-column: 1 / -1; }
label { display: block; font-weight: 740; font-size: .86rem; margin-bottom: 7px; color: #344038; }
.input-wrap { position: relative; }
input, select {
  width: 100%;
  border: 1px solid #cfcfc5;
  border-radius: 12px;
  padding: 12px 12px;
  background: #fff;
  color: var(--ink);
  min-height: 46px;
  outline: none;
}
input:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(54,95,70,.12); }
.input-with-unit input { padding-right: 58px; }
.unit-suffix { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .82rem; pointer-events: none; }
.field-help { margin: 6px 0 0; color: var(--muted); font-size: .78rem; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
.shape-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.shape-btn {
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px 8px;
  border-radius: 11px;
  color: var(--muted);
  font-weight: 720;
}
.shape-btn.active { border-color: var(--brand); color: var(--brand-dark); background: #edf3ee; }
.hidden { display: none !important; }
.calculate-btn {
  width: 100%;
  margin-top: 22px;
  border: 0;
  background: var(--brand);
  color: #fff;
  padding: 14px 18px;
  border-radius: 13px;
  font-weight: 800;
  min-height: 50px;
  box-shadow: 0 9px 18px rgba(54,95,70,.22);
}
.calculate-btn:hover { background: var(--brand-dark); }
.error-box { display:none; margin-top: 14px; padding: 10px 12px; color: var(--danger); background: #fff1ef; border: 1px solid #f1cbc6; border-radius: 10px; font-size: .86rem; }
.error-box.show { display:block; }
.results-kicker { color: var(--brand-dark); font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.primary-result { margin: 6px 0 20px; }
.primary-result strong { display: block; font-size: clamp(2rem, 5vw, 3.35rem); letter-spacing: -.05em; line-height: 1.05; }
.primary-result span { color: var(--muted); font-size: .9rem; }
.result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.result-box { background: white; border: 1px solid #dde2db; border-radius: 13px; padding: 13px; }
.result-box span { display:block; color: var(--muted); font-size: .77rem; margin-bottom: 4px; }
.result-box strong { font-size: 1.12rem; letter-spacing: -.015em; }
.result-note { margin: 16px 0 0; color: var(--muted); font-size: .80rem; }

.content { max-width: 880px; margin: 0 auto; padding: 10px 22px 74px; }
.content.wide { max-width: var(--max); }
.section { padding: 34px 0; border-top: 1px solid var(--line); }
.section:first-child { border-top: 0; }
.section h2 { font-size: clamp(1.65rem, 4vw, 2.35rem); letter-spacing: -.035em; line-height: 1.12; margin: 0 0 15px; }
.section h3 { margin-top: 25px; letter-spacing: -.02em; }
.section p, .section li { color: #445148; }
.callout {
  margin: 22px 0;
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  padding: 16px 18px;
  border-radius: 0 12px 12px 0;
}
.steps { counter-reset: step; display: grid; gap: 12px; margin: 20px 0; }
.step { display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: start; }
.step::before {
  counter-increment: step;
  content: counter(step);
  width: 34px; height: 34px; border-radius: 50%; display:grid; place-items:center;
  background: var(--brand); color:#fff; font-weight:800; font-size:.86rem;
}
.step strong { display:block; margin-bottom:2px; }
.table-wrap { overflow-x:auto; border:1px solid var(--line); border-radius:14px; background:#fff; }
table { border-collapse: collapse; width:100%; min-width: 560px; }
th, td { padding: 12px 14px; border-bottom:1px solid var(--line); text-align:left; font-size:.9rem; }
th { background:#f0f2ec; color:#344038; }
tr:last-child td { border-bottom:0; }
.faq { display:grid; gap:10px; }
details { background:#fff; border:1px solid var(--line); border-radius:13px; padding: 0 15px; }
summary { cursor:pointer; font-weight:760; padding:14px 0; }
details p { margin-top:0; padding-bottom:12px; }

.page-hero { max-width: 820px; margin: 0 auto; padding: 70px 22px 30px; }
.page-hero h1 { font-size: clamp(2.5rem, 7vw, 4.5rem); letter-spacing: -.05em; line-height:1; margin: 10px 0 15px; }
.page-hero p { color: var(--muted); font-size:1.08rem; }
.contact-card { background:#fff; border:1px solid var(--line); border-radius:18px; padding:22px; }

.site-footer { border-top:1px solid var(--line); background:#eeeae0; }
.footer-inner { max-width:var(--max); margin:0 auto; padding:28px 22px; display:grid; grid-template-columns: 1fr auto; gap:22px; align-items:center; }
.footer-copy { color:var(--muted); font-size:.84rem; margin-top:5px; }
.footer-links { display:flex; flex-wrap:wrap; gap:13px 17px; justify-content:flex-end; }
.footer-links a { color:#526057; text-decoration:none; font-size:.84rem; }
.footer-links a:hover { color:var(--ink); }

@media (max-width: 820px) {
  .hero { grid-template-columns:1fr; padding-top:42px; }
  .hero-visual { min-height:210px; }
  .calculator-body { grid-template-columns:1fr; }
  .inputs { border-right:0; border-bottom:1px solid var(--line); }
  .calculator-head { align-items:flex-start; flex-direction:column; }
}
@media (max-width: 620px) {
  .header-inner { align-items:flex-start; }
  .nav { gap:10px; justify-content:flex-end; }
  .nav a:nth-child(2), .nav a:nth-child(3) { display:none; }
  .hero { padding-top:32px; }
  .hero h1 { font-size: 3.15rem; }
  .hero-visual { display:none; }
  .calculator-wrap { padding-left:12px; padding-right:12px; }
  .calculator-head, .inputs, .results { padding:20px; }
  .field-grid, .result-grid { grid-template-columns:1fr; }
  .shape-row { grid-template-columns:1fr; }
  .footer-inner { grid-template-columns:1fr; }
  .footer-links { justify-content:flex-start; }
}
/* =========================================
   MOBILE POLISH
   ========================================= */

@media (max-width: 620px) {
  body {
    font-size: 16px;
  }

  .header-inner {
    padding: 11px 16px;
    align-items: center;
    gap: 12px;
  }

  .brand {
    font-size: 0.95rem;
    gap: 8px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .nav {
    gap: 6px;
  }

  .nav a {
    font-size: 0.88rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 6px 3px;
  }

  .hero {
    padding: 28px 16px 18px;
  }

  .hero-copy {
    font-size: 1rem;
    line-height: 1.65;
  }

  .hero-points {
    gap: 8px;
    margin-top: 18px;
  }

  .hero-point {
    font-size: 0.84rem;
  }

  .calculator-wrap {
    padding: 12px 10px 50px;
  }

  .calculator-card {
    border-radius: 18px;
  }

  .calculator-head,
  .inputs,
  .results {
    padding: 18px;
  }

  .calculator-head {
    gap: 14px;
  }

  .calculator-head h2 {
    font-size: 1.4rem;
  }

  .calculator-head p {
    font-size: 0.95rem;
  }

  .unit-toggle {
    width: 100%;
  }

  .unit-toggle button {
    flex: 1;
    min-height: 44px;
    font-size: 0.9rem;
  }

  .shape-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .shape-btn {
    min-height: 46px;
    padding: 8px 5px;
    font-size: 0.84rem;
  }

  .field-grid {
    gap: 18px;
  }

  label {
    font-size: 0.92rem;
    margin-bottom: 7px;
  }

  input,
  select {
    min-height: 50px;
    font-size: 1rem;
  }

  .unit-suffix {
    font-size: 0.88rem;
  }

  .field-help {
    font-size: 0.88rem;
    line-height: 1.5;
    margin-top: 7px;
  }

  .divider {
    margin: 20px 0;
  }

  .calculate-btn {
    min-height: 54px;
    font-size: 1rem;
  }

  .results-kicker {
    font-size: 0.82rem;
  }

  .primary-result {
    margin: 8px 0 20px;
  }

  .primary-result strong {
    font-size: 2.55rem;
  }

  .primary-result span {
    font-size: 0.95rem;
    line-height: 1.45;
  }

  .result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .result-box {
    padding: 12px;
  }

  .result-box:last-child {
    grid-column: 1 / -1;
  }

  .result-box span {
    font-size: 0.84rem;
  }

  .result-box strong {
    font-size: 1.08rem;
  }

  .result-note {
    font-size: 0.88rem;
    line-height: 1.55;
  }

  .content {
    padding: 0 16px 56px;
  }

  .section {
    padding: 29px 0;
  }

  .section h2 {
    font-size: 1.75rem;
    line-height: 1.15;
  }

  .section h3 {
    font-size: 1.15rem;
  }

  .section p,
  .section li {
    font-size: 1rem;
    line-height: 1.7;
  }

  .steps {
    gap: 16px;
  }

  .step {
    grid-template-columns: 34px 1fr;
    gap: 11px;
  }

  .callout {
    padding: 15px;
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 620px;
  }

  th,
  td {
    font-size: 0.9rem;
    padding: 11px 12px;
  }

  details {
    padding: 0 14px;
  }

  summary {
    min-height: 48px;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
  }

  .footer-inner {
    padding: 25px 16px;
    gap: 17px;
  }

  .footer-copy {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .footer-links {
    gap: 5px 15px;
  }

  .footer-links a {
    font-size: 0.9rem;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
  }
}