:root {
  color-scheme: light;
  --ink: #172026;
  --muted: #5b6871;
  --line: #d9e1e6;
  --paper: #f7f8f5;
  --panel: #ffffff;
  --green: #2d6a4f;
  --teal: #0f766e;
  --coral: #c8553d;
  --gold: #c08b2d;
  --shadow: 0 22px 60px rgba(23, 32, 38, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  align-items: center;
  background: rgba(247, 248, 245, 0.92);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 10px clamp(18px, 5vw, 64px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  align-items: center;
  display: inline-flex;
  font-size: clamp(22px, 2.5vw, 34px);
  font-weight: 900;
  gap: 12px;
  letter-spacing: 0.08em;
  line-height: 1;
}

.brand-mark {
  align-items: center;
  background: var(--ink);
  border-radius: 6px;
  color: white;
  display: inline-flex;
  font-size: 15px;
  height: 38px;
  justify-content: center;
  letter-spacing: 0;
  width: 38px;
}

.brand > span:last-child span {
  color: var(--teal);
}

nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px clamp(12px, 2vw, 22px);
  font-size: 14px;
  color: var(--muted);
}

.version-pill {
  background: var(--coral);
  border-radius: 999px;
  color: white;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  padding: 8px 10px;
}

.hero {
  align-items: start;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  min-height: 180px;
  padding: 12px clamp(18px, 5vw, 64px) 12px;
  position: relative;
}

.hero::before {
  background:
    linear-gradient(120deg, rgba(45, 106, 79, 0.92), rgba(15, 118, 110, 0.7)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='620' viewBox='0 0 900 620'%3E%3Crect fill='%23edf2ef' width='900' height='620'/%3E%3Cg fill='none' stroke='%23172026' stroke-opacity='.16' stroke-width='3'%3E%3Crect x='70' y='70' width='260' height='340'/%3E%3Crect x='380' y='130' width='430' height='290'/%3E%3Cpath d='M70 470h740M140 70v400M260 70v400M460 130v290M620 130v290M780 130v290'/%3E%3C/g%3E%3Cg fill='%23c8553d' fill-opacity='.5'%3E%3Ccircle cx='210' cy='220' r='38'/%3E%3Ccircle cx='700' cy='260' r='52'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  content: "";
  inset: 0;
  position: absolute;
  z-index: -1;
}

.hero-copy {
  align-self: start;
  color: white;
  max-width: 760px;
}

.eyebrow {
  color: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(32px, 4.4vw, 48px);
  line-height: 0.95;
  margin-bottom: 10px;
  max-width: 820px;
}

h2 {
  font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1.05;
  margin-bottom: 0;
}

h3 {
  font-size: 19px;
  margin-bottom: 8px;
}

.hero-copy p:last-child {
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 1.35;
  margin-bottom: 0;
  max-width: 650px;
}

.hero-panel {
  align-self: start;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 8px;
  margin-top: 0;
  padding: 14px 18px;
}

.hero-panel span,
.hero-panel small,
.result-main span,
.result-main small,
.metric-grid span {
  color: var(--muted);
}

.hero-panel strong {
  color: var(--green);
  font-size: 28px;
}

.tool-section,
.content-band,
.use-section,
.faq-section,
.blog-section {
  padding: clamp(42px, 7vw, 82px) clamp(18px, 5vw, 64px);
}

.tool-section {
  padding-top: 20px;
  padding-bottom: 26px;
}

.tool-header,
.section-heading {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin: 0 auto 14px;
  max-width: 1180px;
}

.tool-header .eyebrow,
.section-heading .eyebrow {
  color: var(--coral);
}

.tool-title .eyebrow {
  margin-bottom: 2px;
}

.icon-button {
  background: var(--ink);
  border: 0;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  font-size: 24px;
  height: 44px;
  width: 44px;
}

.tool-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(280px, 0.85fr) minmax(280px, 1.15fr);
  margin: 0 auto;
  max-width: 1180px;
}

.controls,
.results,
.use-grid article,
.size-grid article,
details {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.controls {
  display: grid;
  gap: 10px;
  padding: 16px;
}

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

.input-row {
  align-items: center;
  background: #f0f4f2;
  border: 1px solid transparent;
  border-radius: 8px;
  display: grid;
  grid-template-columns: 1fr auto;
  min-height: 40px;
  overflow: hidden;
}

input,
select {
  background: #f0f4f2;
  border: 1px solid transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  min-height: 40px;
  outline: none;
  padding: 0 12px;
  width: 100%;
}

select {
  border-radius: 8px;
}

.input-row span {
  color: var(--muted);
  padding-right: 12px;
}

input:focus,
select:focus {
  border-color: var(--teal);
}

.results {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.result-main {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 6px;
  padding-bottom: 12px;
}

.result-main strong {
  color: var(--green);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
}

.metric-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-grid div {
  background: #f4f6f3;
  border-radius: 8px;
  display: grid;
  gap: 6px;
  min-height: 72px;
  padding: 12px;
}

.metric-grid strong {
  font-size: 18px;
}

.preview-wrap {
  align-items: center;
  background: repeating-linear-gradient(45deg, #eef2ef, #eef2ef 12px, #f7f8f5 12px, #f7f8f5 24px);
  border: 1px dashed #b7c4bb;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  min-height: 150px;
  padding: 12px;
}

.preview-box {
  align-items: center;
  background: white;
  border: 8px solid var(--gold);
  box-shadow: 0 16px 32px rgba(23, 32, 38, 0.16);
  display: flex;
  justify-content: center;
  max-height: 124px;
  max-width: 100%;
  min-height: 74px;
  min-width: 74px;
  padding: 10px;
  text-align: center;
}

.preview-box span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.content-band {
  background: #eaf0ec;
}

.use-section {
  background: #fffaf2;
}

.use-grid,
.size-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  margin: 0 auto;
  max-width: 1180px;
}

.use-grid article,
.size-grid article {
  padding: 20px;
}

.use-grid p,
.size-grid p,
details p {
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 0;
}

.use-grid .text-link {
  display: inline-block;
  margin-top: 14px;
}

.faq-section {
  margin: 0 auto;
  max-width: 960px;
}

.blog-section {
  background: #eef3f1;
}

.blog-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin: 0 auto;
  max-width: 1180px;
}

.blog-grid article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  min-height: 245px;
  padding: 22px;
}

.blog-grid h3 {
  font-size: 21px;
  line-height: 1.25;
}

.blog-grid p:not(.article-tag) {
  color: var(--muted);
  line-height: 1.55;
}

.article-tag {
  color: var(--coral);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-bottom: 9px;
  text-transform: uppercase;
}

.text-link {
  color: var(--green);
  font-weight: 800;
}

.blog-grid .text-link {
  margin-top: auto;
}

.blog-page,
.article-page {
  margin: 0 auto;
  max-width: 1180px;
  padding: clamp(36px, 6vw, 72px) clamp(18px, 5vw, 64px);
}

.blog-page-header,
.article-header {
  max-width: 820px;
  padding-bottom: 30px;
}

.blog-page-header p,
.article-header p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.article-header h1 {
  color: var(--green);
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.02;
}

.article-meta {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.article-layout {
  display: grid;
  gap: 34px;
  grid-template-columns: minmax(0, 1fr) 260px;
}

.article-content {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(22px, 4vw, 42px);
}

.article-content h2 {
  font-size: 30px;
  margin: 38px 0 12px;
}

.article-content h2:first-child {
  margin-top: 0;
}

.article-content h3 {
  font-size: 21px;
  margin: 26px 0 8px;
}

.article-content p,
.article-content li {
  color: #46545d;
  line-height: 1.72;
}

.article-content li {
  margin-bottom: 8px;
}

.article-content a {
  color: var(--green);
  font-weight: 800;
  text-decoration: underline;
}

.article-aside {
  align-self: start;
  background: #eaf0ec;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  position: sticky;
  top: 82px;
}

.article-aside h2 {
  font-size: 21px;
  margin-bottom: 12px;
}

.article-aside a {
  color: var(--green);
  display: block;
  font-weight: 800;
  margin-top: 12px;
}

.article-cta {
  background: var(--ink);
  border-radius: 8px;
  color: white;
  margin-top: 36px;
  padding: 24px;
}

.article-cta h2,
.article-cta p {
  color: white;
  margin-top: 0;
}

.article-cta .text-link {
  color: #b7ead1;
}

details {
  margin-bottom: 12px;
  padding: 18px 20px;
}

summary {
  cursor: pointer;
  font-size: 18px;
  font-weight: 800;
}

details p {
  padding-top: 12px;
}

footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 28px clamp(18px, 5vw, 64px);
}

footer span:first-child {
  color: var(--ink);
  font-weight: 800;
}

footer a {
  color: var(--green);
  font-weight: 800;
}

.policy-page {
  margin: 0 auto;
  max-width: 960px;
  padding: clamp(36px, 6vw, 72px) clamp(18px, 5vw, 64px);
}

.policy-hero h1 {
  color: var(--green);
}

.policy-hero p:last-child {
  color: var(--muted);
}

.policy-content {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(22px, 4vw, 40px);
}

.policy-content h2 {
  font-size: 24px;
  margin: 28px 0 8px;
}

.policy-content h2:first-child {
  margin-top: 0;
}

.policy-content p {
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 860px) {
  .site-header,
  footer,
  .tool-header,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .tool-grid,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
  }

  .hero-panel {
    align-self: start;
    margin-top: 0;
  }

  .metric-grid,
  .use-grid,
  .size-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-aside {
    position: static;
  }
}

@media (max-width: 520px) {
  nav {
    width: 100%;
    justify-content: space-between;
  }

  h1 {
    font-size: 36px;
  }

  .metric-grid,
  .use-grid,
  .size-grid {
    grid-template-columns: 1fr;
  }
}
