:root {
  --green-950: #173521;
  --green-900: #234d32;
  --green-800: #2f5e3c;
  --green-700: #3f704d;
  --green-600: #54845f;
  --green-100: #e3efe5;
  --green-50: #eef5ef;
  --sand-100: #f0eee6;
  --sand-50: #f8f7f2;
  --surface: #ffffff;
  --background: #f7f8f5;
  --text: #202520;
  --muted: #626962;
  --muted-strong: #4c554d;
  --line: #dce2dc;
  --line-strong: #cbd4cc;
  --warning-bg: #fff8e6;
  --warning-border: #e8c973;
  --warning-text: #5e4a13;
  --danger: #a13e32;
  --danger-bg: #fff2f0;
  --success: #28633a;
  --shadow-sm: 0 1px 2px rgba(24, 52, 32, .05), 0 5px 18px rgba(24, 52, 32, .04);
  --shadow-md: 0 2px 4px rgba(24, 52, 32, .05), 0 14px 38px rgba(24, 52, 32, .08);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --container: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--background);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

a {
  color: var(--green-800);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--green-950);
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--green-950);
  font-weight: 740;
  line-height: 1.16;
  letter-spacing: -.025em;
}

h1 {
  font-size: clamp(2.25rem, 8vw, 4rem);
}

h2 {
  font-size: clamp(1.65rem, 5vw, 2.35rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0;
}

.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--green-950);
  color: #fff;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid #9cc7a5;
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  height: 68px;
  border-bottom: 1px solid rgba(35, 77, 50, .12);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
}

.header-inner {
  position: relative;
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--green-950);
  font-weight: 780;
  line-height: 1;
  text-decoration: none;
  letter-spacing: -.025em;
}

.brand:hover {
  color: var(--green-950);
}

.brand-mark {
  width: 36px;
  height: 36px;
  margin-right: 8px;
  padding: 4px;
  border-radius: 10px;
  background: var(--green-50);
  stroke: var(--green-800);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-text {
  font-size: 1.08rem;
}

.brand-text span {
  color: var(--green-700);
  font-weight: 650;
}

.menu-toggle {
  display: grid;
  width: 44px;
  height: 44px;
  place-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.menu-toggle span {
  width: 21px;
  height: 2px;
  border-radius: 3px;
  background: var(--green-950);
  transition: transform .18s ease, opacity .18s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.main-nav {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  display: none;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-md);
}

.main-nav.is-open {
  display: grid;
}

.main-nav a {
  padding: 12px 14px;
  border-radius: 9px;
  color: var(--text);
  font-weight: 650;
  text-decoration: none;
}

.main-nav a:hover {
  background: var(--green-50);
  color: var(--green-900);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 68px 0 64px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(145deg, #fbfcfa 0%, #f2f6f0 58%, #eef2e9 100%);
}

.hero::before {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(35, 77, 50, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(35, 77, 50, .035) 1px, transparent 1px);
  background-size: 42px 42px;
  content: "";
  mask-image: linear-gradient(to bottom, #000, transparent 92%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  gap: 42px;
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--green-700);
  font-size: .77rem;
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 780px;
}

.hero-lead {
  max-width: 720px;
  margin-top: 22px;
  color: var(--muted-strong);
  font-size: 1.08rem;
  line-height: 1.7;
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  margin-top: 28px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 750;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  transition: background-color .16s ease, border-color .16s ease, transform .16s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--green-900);
  color: #fff;
  box-shadow: 0 6px 18px rgba(35, 77, 50, .16);
}

.button-primary:hover {
  background: var(--green-950);
  color: #fff;
}

.button-secondary {
  border-color: var(--line-strong);
  background: #fff;
  color: var(--green-900);
}

.button-secondary:hover {
  border-color: var(--green-600);
  background: var(--green-50);
}

.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin: 24px 0 0;
  padding: 0;
  color: var(--muted-strong);
  font-size: .9rem;
  font-weight: 650;
  list-style: none;
}

.trust-list li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.trust-list svg {
  width: 17px;
  height: 17px;
  stroke: var(--green-700);
  stroke-width: 2.4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-panel {
  padding: 24px;
  border: 1px solid rgba(35, 77, 50, .16);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .84);
  box-shadow: var(--shadow-md);
}

.hero-panel-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  color: var(--green-900);
  font-size: .88rem;
  font-weight: 760;
}

.status-dot {
  width: 9px;
  height: 9px;
  border: 2px solid #b7d5bd;
  border-radius: 999px;
  background: var(--green-700);
  box-shadow: 0 0 0 3px var(--green-100);
}

.hero-steps {
  display: grid;
  gap: 0;
  margin-top: 8px;
}

.hero-steps div {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.hero-steps span {
  color: var(--green-700);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
}

.hero-steps p {
  color: var(--text);
  font-weight: 670;
  line-height: 1.45;
}

.hero-panel-note {
  margin-top: 17px;
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.55;
}

.section {
  padding: 72px 0;
}

.section-soft {
  border-block: 1px solid var(--line);
  background: var(--sand-50);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 32px;
}

.section-heading > p:last-child {
  margin-top: 12px;
  color: var(--muted);
  font-size: 1.02rem;
}

.calculator-grid {
  display: grid;
  gap: 16px;
}

.tool-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color .17s ease, box-shadow .17s ease, transform .17s ease;
}

.tool-card:hover {
  border-color: #b9c9bb;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.tool-icon {
  display: grid;
  width: 50px;
  height: 50px;
  margin-bottom: 20px;
  place-items: center;
  border: 1px solid #d7e5d9;
  border-radius: 12px;
  background: var(--green-50);
}

.tool-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--green-800);
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tool-card h3 {
  margin-bottom: 10px;
}

.tool-card p {
  margin-bottom: 22px;
  color: var(--muted);
  line-height: 1.62;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  color: var(--green-800);
  font-weight: 760;
  text-decoration: none;
}

.card-link span {
  transition: transform .16s ease;
}

.card-link:hover span {
  transform: translateX(3px);
}

.article-layout {
  display: grid;
  gap: 36px;
}

.article-content {
  min-width: 0;
}

.article-content h2 {
  margin: 42px 0 14px;
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.article-content > .eyebrow + h2,
.article-content > h2:first-child {
  margin-top: 0;
}

.article-content h3 {
  margin: 28px 0 10px;
}

.article-content p,
.article-content li {
  color: var(--muted-strong);
}

.article-content p + p {
  margin-top: 16px;
}

.article-content ul,
.article-content ol {
  margin: 16px 0 0;
  padding-left: 22px;
}

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

.article-content strong {
  color: var(--text);
}

.article-content a {
  font-weight: 650;
}

.info-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.info-card-label {
  margin-bottom: 7px;
  color: var(--green-700);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.info-card h3 {
  margin-bottom: 16px;
}

.check-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding: 9px 0 9px 26px;
  border-top: 1px solid var(--line);
  color: var(--muted-strong);
}

.check-list li::before {
  position: absolute;
  top: 12px;
  left: 2px;
  width: 13px;
  height: 7px;
  border-bottom: 2px solid var(--green-700);
  border-left: 2px solid var(--green-700);
  content: "";
  transform: rotate(-45deg);
}

.compact-section {
  padding-block: 54px;
}

.compact-grid {
  display: grid;
  gap: 36px;
}

.compact-grid h2 {
  margin-bottom: 10px;
  font-size: 1.35rem;
}

.compact-grid p:last-child {
  color: var(--muted);
}

.site-footer {
  padding: 50px 0 24px;
  background: var(--green-950);
  color: #dce7de;
}

.footer-grid {
  display: grid;
  gap: 34px;
}

.brand-footer,
.brand-footer:hover {
  color: #fff;
}

.brand-footer .brand-mark {
  background: rgba(255, 255, 255, .09);
  stroke: #cbe1cf;
}

.brand-footer .brand-text span {
  color: #acd0b4;
}

.footer-grid > div > p {
  margin-top: 12px;
  color: #b9c8bc;
}

.footer-nav {
  display: grid;
  gap: 10px;
}

.footer-nav a {
  width: fit-content;
  color: #e4ece6;
  text-decoration-color: rgba(228, 236, 230, .35);
}

.footer-bottom {
  display: grid;
  gap: 16px;
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  color: #aebfb2;
  font-size: .82rem;
  line-height: 1.55;
}

/* Podstrony i kalkulatory */
.breadcrumb-wrap {
  padding-top: 18px;
}

.breadcrumbs {
  display: flex;
  overflow: hidden;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: .82rem;
  white-space: nowrap;
}

.breadcrumbs a {
  flex: 0 0 auto;
  color: var(--muted-strong);
  text-decoration: none;
}

.breadcrumbs span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.breadcrumb-separator {
  color: #9da69e;
}

.page-intro {
  padding: 28px 0 36px;
}

.page-intro h1 {
  max-width: 900px;
  font-size: clamp(2rem, 7vw, 3.45rem);
}

.page-intro > .container > p {
  max-width: 800px;
  margin-top: 16px;
  color: var(--muted-strong);
  font-size: 1.05rem;
}

.tool-section {
  padding-bottom: 64px;
}

.tool-layout {
  display: grid;
  gap: 22px;
}

.calculator-card {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-md);
}

.calculator-header {
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--line);
  background: #fcfdfb;
}

.calculator-kicker {
  margin-bottom: 4px;
  color: var(--green-700);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.calculator-header h2 {
  font-size: 1.45rem;
}

.calculator-header p:last-child {
  margin-top: 7px;
  color: var(--muted);
  font-size: .92rem;
}

.calculator-form {
  padding: 22px;
}

.form-grid {
  display: grid;
  gap: 18px;
}

.form-grid + .form-grid,
.form-section + .form-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.form-section-title {
  margin-bottom: 14px;
  color: var(--green-950);
  font-size: 1rem;
  font-weight: 760;
}

.field {
  min-width: 0;
}

.field label,
.field-label {
  display: block;
  margin-bottom: 7px;
  color: var(--text);
  font-size: .91rem;
  font-weight: 720;
  line-height: 1.4;
}

.field-help {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.45;
}

.field input,
.field select {
  width: 100%;
  height: 52px;
  padding: 0 13px;
  border: 1px solid #bfc9c0;
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  font-size: 1rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.field input:hover,
.field select:hover {
  border-color: #8fa091;
}

.field input:focus,
.field select:focus {
  border-color: var(--green-700);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(63, 112, 77, .14);
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"] {
  border-color: var(--danger);
  background: var(--danger-bg);
}

.unit-input {
  position: relative;
}

.unit-input input {
  padding-right: 62px;
}

.unit-input .unit {
  position: absolute;
  top: 50%;
  right: 13px;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 700;
  transform: translateY(-50%);
  pointer-events: none;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--background);
}

.segmented-control label {
  position: relative;
  display: grid;
  min-height: 42px;
  place-items: center;
  margin: 0;
  padding: 7px 9px;
  border-radius: 8px;
  color: var(--muted-strong);
  font-size: .86rem;
  font-weight: 720;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
}

.segmented-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.segmented-control label:has(input:checked) {
  background: #fff;
  color: var(--green-900);
  box-shadow: 0 1px 5px rgba(35, 77, 50, .12);
}

.segmented-control label:has(input:focus-visible) {
  outline: 3px solid #9cc7a5;
  outline-offset: 2px;
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.preset-button {
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--sand-50);
  color: var(--green-950);
  font-size: .85rem;
  font-weight: 700;
}

.preset-button:hover {
  border-color: var(--green-600);
  background: var(--green-50);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.form-actions .button {
  min-width: 140px;
  margin-top: 0;
}

.advanced-settings {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.advanced-settings summary,
.formula-box summary {
  width: fit-content;
  color: var(--green-800);
  font-weight: 750;
  cursor: pointer;
}

.advanced-settings[open] summary,
.formula-box[open] summary {
  margin-bottom: 16px;
}

.conditional-fields[hidden],
[hidden] {
  display: none !important;
}

.error-message {
  min-height: 1.3em;
  margin-top: 8px;
  color: var(--danger);
  font-size: .82rem;
  font-weight: 650;
}

.result-panel {
  padding: 24px 22px;
  border-top: 1px solid #cddccd;
  background: var(--green-50);
}

.result-label {
  color: var(--green-800);
  font-size: .76rem;
  font-weight: 820;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.result-main {
  margin-top: 4px;
  color: var(--green-950);
  font-size: clamp(2.15rem, 11vw, 3.65rem);
  font-weight: 810;
  line-height: 1.08;
  letter-spacing: -.04em;
}

.result-subtitle {
  margin-top: 5px;
  color: var(--muted-strong);
  font-size: 1rem;
}

.result-sentence {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #ccdbce;
  color: var(--green-950);
  font-weight: 680;
  line-height: 1.6;
}

.result-grid {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.result-stat {
  padding: 13px 14px;
  border: 1px solid #cfdeD1;
  border-radius: 9px;
  background: rgba(255, 255, 255, .66);
}

.result-stat span {
  display: block;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.35;
}

.result-stat strong {
  display: block;
  margin-top: 3px;
  color: var(--green-950);
  font-size: 1rem;
  line-height: 1.35;
}

.result-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 8px 11px;
  border: 1px solid #bcd1c0;
  border-radius: 8px;
  background: rgba(255, 255, 255, .72);
  color: var(--success);
  font-size: .86rem;
  font-weight: 750;
}

.result-status.warning {
  border-color: var(--warning-border);
  background: var(--warning-bg);
  color: var(--warning-text);
}

.result-status.danger {
  border-color: #dfbbb5;
  background: var(--danger-bg);
  color: var(--danger);
}

.result-panel.is-updated {
  animation: result-pulse .28s ease-out;
}

@keyframes result-pulse {
  from { opacity: .72; }
  to { opacity: 1; }
}

.tool-note,
.notice {
  padding: 16px 17px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted-strong);
  font-size: .88rem;
  line-height: 1.55;
}

.notice-warning {
  border-color: var(--warning-border);
  background: var(--warning-bg);
  color: var(--warning-text);
}

.notice strong {
  color: inherit;
}

.tool-side {
  display: grid;
  align-content: start;
  gap: 14px;
}

.formula-box {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.formula {
  overflow-x: auto;
  margin: 12px 0;
  padding: 13px 14px;
  border-left: 3px solid var(--green-600);
  background: var(--green-50);
  color: var(--green-950);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88rem;
  line-height: 1.6;
}

.formula-box p {
  color: var(--muted);
  font-size: .86rem;
}

.popular-calculations {
  margin-top: 22px;
}

.popular-calculations h2,
.related-tools h2 {
  margin-bottom: 14px;
  font-size: 1.25rem;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--green-800);
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
}

button.quick-link {
  text-align: left;
}

.quick-link:hover {
  border-color: var(--green-600);
  background: var(--green-50);
}

.table-scroll {
  overflow-x: auto;
  margin: 18px 0 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: .9rem;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  background: var(--green-50);
  color: var(--green-950);
  font-size: .82rem;
}

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

.faq-list {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.faq-item {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.faq-item summary {
  position: relative;
  padding: 16px 48px 16px 17px;
  color: var(--green-950);
  font-weight: 740;
  line-height: 1.45;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  position: absolute;
  top: 50%;
  right: 17px;
  color: var(--green-700);
  content: "+";
  font-size: 1.35rem;
  font-weight: 500;
  transform: translateY(-50%);
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  padding: 0 17px 17px;
  color: var(--muted-strong);
}

.related-tools {
  padding-top: 42px;
}

.related-grid {
  display: grid;
  gap: 12px;
}

.related-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  text-decoration: none;
}

.related-card strong {
  display: block;
  color: var(--green-950);
}

.related-card span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: .86rem;
}

.related-card:hover {
  border-color: var(--green-600);
  box-shadow: var(--shadow-sm);
}

.source-note {
  margin-top: 18px;
  color: var(--muted);
  font-size: .8rem;
}

.ad-space {
  min-height: 1px;
}

@media (min-width: 640px) {
  .container {
    width: min(100% - 48px, var(--container));
  }

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

  .form-grid.two-columns,
  .result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .footer-bottom {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }
}

@media (min-width: 800px) {
  .site-header {
    height: 72px;
  }

  .menu-toggle {
    display: none;
  }

  .main-nav {
    position: static;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .main-nav a {
    padding: 10px 13px;
  }

  .hero {
    padding: 90px 0 82px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, .72fr);
    align-items: center;
    gap: 62px;
  }

  .section {
    padding-block: 92px;
  }

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

  .tool-card {
    padding: 26px;
  }

  .article-layout-home {
    grid-template-columns: minmax(0, 1fr) 315px;
    gap: 72px;
  }

  .sticky-card {
    position: sticky;
    top: 96px;
  }

  .page-intro {
    padding: 38px 0 48px;
  }

  .calculator-header,
  .calculator-form,
  .result-panel {
    padding-right: 32px;
    padding-left: 32px;
  }

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

  .content-section .article-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 64px;
  }
}

@media (min-width: 1100px) {
  .tool-layout {
    grid-template-columns: minmax(0, 780px) minmax(280px, 1fr);
    gap: 30px;
  }

  .calculator-form {
    padding-block: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
