:root {
  --ink: #172026;
  --muted: #60707c;
  --line: #dfe8e8;
  --paper: #fbfaf6;
  --white: #ffffff;
  --teal: #0f766e;
  --teal-dark: #12343b;
  --teal-soft: #d9f1ec;
  --sun: #f4b94d;
  --coral: #df6b57;
  --blue: #4c78a8;
  --shadow: 0 22px 60px rgba(30, 50, 55, 0.13);
}

* {
  box-sizing: border-box;
}

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

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 20px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 19px;
  font-weight: 800;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--white);
  background: linear-gradient(135deg, var(--teal), #164e63);
  box-shadow: 0 8px 22px rgba(15, 118, 110, 0.25);
}

.main-nav {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.main-nav a {
  text-decoration: none;
}

.hero,
.calculator-hero {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 32px;
  align-items: center;
  padding: 42px 0 34px;
}

main {
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.09), rgba(251, 250, 246, 0) 320px),
    radial-gradient(circle at top right, rgba(244, 185, 77, 0.22), transparent 280px);
}

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

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  margin: 0 0 16px;
  max-width: 760px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 0.96;
}

.hero-copy > p:not(.eyebrow),
.calculator-hero p {
  max-width: 640px;
  color: #4c5b64;
  font-size: 18px;
  line-height: 1.6;
}

.search-box {
  margin-top: 28px;
  padding: 10px;
  max-width: 610px;
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 34px rgba(31, 56, 61, 0.09);
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 13px 12px;
  color: var(--ink);
  font: inherit;
}

button,
.search-box button {
  border: 0;
  border-radius: 7px;
  padding: 13px 18px;
  background: var(--teal);
  color: var(--white);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.hero-panel {
  padding: 20px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.featured-preview {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: #f7fbfa;
  font-size: 13px;
}

.preview-badge {
  padding: 5px 8px;
  border-radius: 6px;
  color: var(--teal);
  background: var(--teal-soft);
  font-size: 12px;
  font-weight: 800;
}

.preview-top em {
  font-style: normal;
  font-weight: 750;
  text-align: right;
}

.preview-body {
  padding: 18px;
}

.preview-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfdfd;
}

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

.preview-row strong {
  font-size: 16px;
  text-align: right;
}

.preview-result,
.result-panel {
  border-radius: 8px;
  background: var(--teal-dark);
  color: var(--white);
}

.preview-result {
  margin-top: 16px;
  padding: 18px;
}

.preview-result span,
.result-panel > p {
  margin: 0 0 6px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 750;
  text-transform: uppercase;
}

.preview-result strong {
  display: block;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
}

.preview-link {
  display: block;
  margin-top: 14px;
  color: var(--teal);
  font-weight: 800;
  text-decoration: none;
}

.ad-slot {
  display: grid;
  place-items: center;
  width: min(1180px, calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto 30px;
  border: 1px dashed #acc4c4;
  border-radius: 8px;
  color: #718188;
  background: rgba(255, 255, 255, 0.58);
  font-size: 13px;
}

.calculator-layout .ad-slot,
.article-section .ad-slot,
.page-sidebar .ad-slot {
  width: 100%;
  margin: 0 0 20px;
}

.section-wrap,
.category-band,
.content-band,
.calculator-layout {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.section-wrap,
.category-band,
.content-band {
  padding: 24px 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.section-heading h2,
.content-band h2 {
  margin: 0;
  font-size: 28px;
}

.section-heading > p,
.content-band > p {
  max-width: 440px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.section-action {
  margin: 16px 0 0;
}

.section-action a,
.preview-link {
  color: var(--teal);
  font-weight: 800;
  text-decoration: none;
}

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

.card-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.guide-grid {
  margin-top: 22px;
}

.calculator-card {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 10px 28px rgba(34, 52, 58, 0.06);
  text-decoration: none;
}

.calculator-card:hover {
  border-color: rgba(15, 118, 110, 0.42);
  transform: translateY(-1px);
}

.card-category {
  width: fit-content;
  padding: 5px 8px;
  border-radius: 6px;
  color: var(--teal);
  background: var(--teal-soft);
  font-size: 12px;
  font-weight: 800;
}

.calculator-card strong {
  font-size: 16px;
}

.calculator-card span:last-child {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.guide-card {
  min-height: 190px;
}

.content-band {
  display: grid;
  grid-template-columns: 0.75fr 1fr;
  gap: 28px;
  align-items: center;
  padding-bottom: 60px;
}

.calculator-hero {
  padding: 42px 0 24px;
}

.static-page {
  width: min(860px, calc(100% - 40px));
  margin: 0 auto;
  padding: 42px 0 70px;
}

.wide-page {
  width: min(1180px, calc(100% - 40px));
}

.static-page h1 {
  margin-bottom: 24px;
}

.lead {
  max-width: 760px;
  color: #4c5b64;
  font-size: 18px;
  line-height: 1.65;
}

.content-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 12px 30px rgba(34, 52, 58, 0.06);
}

.content-card p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.content-card p:first-child {
  margin-top: 0;
}

.content-card p:last-child {
  margin-bottom: 0;
}

.guide-article {
  display: grid;
  gap: 0;
}

.guide-article h1 {
  margin-bottom: 12px;
}

.guide-section {
  margin-top: 16px;
}

.calculator-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(280px, 0.28fr);
  gap: 22px;
  align-items: start;
  padding-bottom: 60px;
}

.tool-card {
  display: grid;
  grid-template-columns: minmax(0, 0.98fr) minmax(280px, 0.72fr);
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.calculator-form {
  display: grid;
  gap: 13px;
}

.field {
  display: grid;
  gap: 7px;
  color: #46545d;
  font-size: 13px;
  font-weight: 750;
}

.input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfdfd;
}

.input-wrap em {
  padding: 0 10px;
  color: var(--muted);
  font-style: normal;
  font-weight: 650;
}

.field input,
.field select {
  width: 100%;
  min-width: 0;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfdfd;
  color: var(--ink);
  font: inherit;
}

.input-wrap input {
  border: 0;
  border-radius: 0;
}

.field input,
.field select,
.input-wrap input {
  padding: 0 11px;
}

.result-panel {
  min-height: 100%;
  padding: 20px;
}

.result-panel h2 {
  margin: 0 0 10px;
  font-size: 34px;
  color: var(--white);
}

.result-panel p {
  line-height: 1.5;
}

.result-panel dl {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.result-panel dl > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.result-panel dt {
  color: rgba(255, 255, 255, 0.72);
}

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

.form-error {
  min-height: 20px;
  margin: 0;
  color: #b42318;
  font-size: 13px;
}

.article-section,
.faq-section,
.related-section,
.sidebar-card {
  margin-top: 20px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 12px 30px rgba(34, 52, 58, 0.06);
}

.article-section h2,
.faq-section h2,
.related-section h2,
.sidebar-card h2 {
  margin: 0 0 10px;
}

.article-section p,
.sidebar-card p {
  color: var(--muted);
  line-height: 1.65;
}

details {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

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

details p {
  color: var(--muted);
  line-height: 1.6;
}

.sticky-stack {
  position: sticky;
  top: 20px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0 34px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1040px) {
  .hero,
  .calculator-layout,
  .tool-card,
  .content-band {
    grid-template-columns: 1fr;
  }

  .card-grid,
  .card-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-sidebar {
    display: none;
  }
}

@media (max-width: 640px) {
  .site-header,
  .hero,
  .calculator-hero,
  .section-wrap,
  .category-band,
  .content-band,
  .calculator-layout,
  .site-footer,
  .ad-slot {
    width: min(100% - 28px, 1180px);
  }

  .main-nav {
    display: none;
  }

  h1 {
    font-size: 42px;
  }

  .search-box {
    display: grid;
  }

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

  .section-heading,
  .site-footer {
    display: grid;
  }
}
