:root {
  color-scheme: light;
  --bg: #f6f7f3;
  --surface: #ffffff;
  --surface-2: #eef3ec;
  --ink: #19201c;
  --muted: #5d675f;
  --line: #d7ded6;
  --accent: #166c5b;
  --accent-2: #235789;
  --warn: #9b5d12;
  --shadow: 0 10px 30px rgba(25, 32, 28, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: var(--accent-2);
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
}

.brand {
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-size: 0.92rem;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--accent);
}

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
  margin-bottom: 28px;
}

.eyebrow {
  color: var(--accent);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.78rem;
}

h1,
h2,
h3 {
  line-height: 1.1;
  letter-spacing: 0;
}

h1 {
  margin: 8px 0 12px;
  font-size: clamp(2rem, 6vw, 4.2rem);
}

h2 {
  margin-top: 36px;
  font-size: 1.65rem;
}

h3 {
  font-size: 1.15rem;
}

.lede {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.12rem;
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}

.calculator,
.result-panel,
.content-panel,
.card,
.ad-slot {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.calculator,
.result-panel,
.content-panel {
  box-shadow: var(--shadow);
}

.calculator {
  padding: 20px;
}

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

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.9rem;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.unit {
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-label input {
  width: 20px;
  min-height: 20px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 18px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  padding: 10px 16px;
  cursor: pointer;
}

.result-panel {
  padding: 20px;
  position: sticky;
  top: 16px;
}

.result-label {
  color: var(--muted);
  margin: 0 0 4px;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.76rem;
}

.result-primary {
  display: block;
  font-size: 2rem;
  line-height: 1.05;
  margin-bottom: 16px;
}

.metrics {
  display: grid;
  gap: 8px;
  margin: 0;
}

.metric {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.metric dt {
  color: var(--muted);
}

.metric dd {
  margin: 0;
  text-align: right;
  font-weight: 800;
}

.result-note {
  color: var(--muted);
  border-left: 4px solid var(--warn);
  padding-left: 12px;
}

.content-panel {
  padding: 24px;
  margin-top: 24px;
}

.intro-panel {
  margin-bottom: 18px;
}

.intro-panel h2 {
  margin-top: 0;
}

.ad-slot {
  min-height: 250px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: repeating-linear-gradient(135deg, #fff, #fff 10px, var(--surface-2) 10px, var(--surface-2) 20px);
  font-size: 0.84rem;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.ad-slot.horizontal {
  min-height: 110px;
  margin: 24px 0;
}

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

.card {
  padding: 18px;
  text-decoration: none;
  color: var(--ink);
}

.card:hover {
  border-color: var(--accent);
}

.card p {
  color: var(--muted);
  margin-bottom: 0;
}

.related-list,
.check-list {
  display: grid;
  gap: 10px;
  padding-left: 18px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 20px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-inner nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

@media (max-width: 860px) {
  .hero,
  .tool-layout {
    grid-template-columns: 1fr;
  }

  .result-panel {
    position: static;
  }

  .field-grid,
  .card-grid {
    grid-template-columns: 1fr;
  }
}
