:root {
  --ink: #1b1d1f;
  --muted: #626a73;
  --line: #d9dee4;
  --panel: #ffffff;
  --soft: #f6f7f8;
  --accent: #0f766e;
  --accent-dark: #0b5f59;
  --warn: #b7791f;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fbfbfa;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
}

a {
  color: var(--accent-dark);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 700;
}

.site-header nav,
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.site-header nav a,
.site-footer nav a {
  color: var(--ink);
  font-size: 0.94rem;
  text-decoration: none;
}

main {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.article {
  padding: 42px 0 64px;
}

.article.narrow {
  max-width: 760px;
}

.article-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.92fr);
  gap: clamp(22px, 4vw, 48px);
  align-items: center;
  padding: 20px 0 32px;
}

.article-hero figure {
  margin: 0;
}

.article-hero img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: 0;
}

h1 {
  max-width: 780px;
  font-size: clamp(2.15rem, 5vw, 4.4rem);
}

h2 {
  font-size: clamp(1.35rem, 2.4vw, 2rem);
}

.quick-answer,
.plain-header p {
  max-width: 760px;
  color: #373d43;
  font-size: 1.16rem;
}

.updated {
  margin: 12px 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.estimator {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1fr);
  gap: 24px;
  align-items: start;
  margin: 22px 0 36px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.estimate-form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: #30363d;
  font-weight: 700;
}

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

.checkline {
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: center;
  font-weight: 500;
}

.checkline input {
  width: 18px;
  height: 18px;
}

.estimate-output {
  display: block;
  padding: 14px 16px;
  border-radius: 8px;
  background: #ecfdf5;
  color: #064e3b;
  font-size: 1.6rem;
  font-weight: 800;
}

.content-section,
.related {
  margin: 26px 0;
  padding: 26px 0 0;
  border-top: 1px solid var(--line);
}

.content-section p,
.related p,
.note {
  max-width: 780px;
}

.context-links {
  background: #f3f7f6;
  border: 1px solid #d7e5e2;
  border-radius: 8px;
  padding: 24px;
}

.context-link {
  margin: 12px 0 0;
}

.note {
  color: var(--muted);
  font-size: 0.96rem;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

th {
  background: var(--soft);
  font-size: 0.92rem;
}

tr:last-child td {
  border-bottom: 0;
}

details {
  margin: 12px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

summary {
  cursor: pointer;
  font-weight: 700;
}

.related ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  list-style: none;
}

.related li a {
  display: block;
  min-height: 56px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px clamp(16px, 4vw, 48px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #fff;
}

@media (max-width: 820px) {
  .site-header,
  .site-footer,
  .article-hero,
  .estimator {
    grid-template-columns: 1fr;
  }

  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    font-size: 2.3rem;
  }

  .related ul {
    grid-template-columns: 1fr;
  }
}
