:root {
  --bg: #f3f6fa;
  --bg-elevated: #f8fafc;

  --surface: #ffffff;
  --surface-soft: #f5f8fc;
  --surface-strong: #edf3ff;

  --text: #101828;
  --text-soft: #344054;
  --muted: #667085;
  --muted-strong: #475467;

  --line: #e4e7ec;
  --line-strong: #d0d5dd;

  --brand: #175cd3;
  --brand-dark: #0f4bb8;
  --brand-deep: #123b86;
  --brand-soft: #eff4ff;
  --brand-soft-strong: #dbe7ff;

  --success: #087443;
  --success-soft: #ecfdf3;

  --danger: #b42318;
  --danger-soft: #fef3f2;

  --warning: #b54708;
  --warning-soft: #fffaeb;

  --white: #ffffff;
  --black: #000000;

  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-sm: 0 2px 8px rgba(16, 24, 40, 0.05);
  --shadow-md: 0 10px 30px rgba(16, 24, 40, 0.07);
  --shadow-lg: 0 18px 48px rgba(16, 24, 40, 0.09);
  --shadow-xl: 0 28px 70px rgba(16, 24, 40, 0.11);

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  --max: 1180px;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-7: 1.75rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  --transition-fast: 140ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 280ms ease;

  --brand-logo-width: 145px;
  --brand-logo-height: 40px;
  --brand-logo-overlap: -24px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(
      circle at top left,
      rgba(23, 92, 211, 0.035),
      transparent 28rem
    ),
    linear-gradient(
      180deg,
      #f7f9fc 0%,
      var(--bg) 38%,
      #eef2f7 100%
    );
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
}

::selection {
  background: var(--brand);
  color: var(--white);
}

img,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: var(--brand);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--brand-dark);
}

button,
input,
select,
textarea {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 3px solid #f79009;
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: min(calc(100% - 2rem), var(--max));
  margin-inline: auto;
}

main,
section,
header,
footer {
  min-width: 0;
}

section[id] {
  scroll-margin-top: 96px;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2000;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  background: #101828;
  color: var(--white);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  font-weight: 800;
  transform: translateY(-180%);
  transition: transform var(--transition-fast);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(228, 231, 236, 0.9);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 1px 0 rgba(16, 24, 40, 0.02);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.brand-logo {
  display: block;
  flex: 0 0 auto;
  width: var(--brand-logo-width);
  height: var(--brand-logo-height);
  margin: 0 var(--brand-logo-overlap) 0 0;
  object-fit: contain;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  line-height: 1.15;
}

.brand-name {
  overflow: hidden;
  color: var(--text);
  font-size: 1rem;
  font-weight: 850;
  letter-spacing: -0.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-tagline {
  margin-top: 0.22rem;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.55rem 0.8rem;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: 750;
  text-decoration: none;
  transition:
    color var(--transition-fast),
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-fast);
}

.site-nav a:hover {
  color: var(--brand-dark);
  background: var(--brand-soft);
  border-color: var(--brand-soft-strong);
}

.site-nav a:active {
  transform: translateY(1px);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 40px;
  padding: 1rem 0 0.5rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.breadcrumbs a {
  color: var(--muted-strong);
  text-underline-offset: 0.18em;
}

.breadcrumbs a:hover {
  color: var(--brand-dark);
}

.hero {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    minmax(260px, 320px);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: end;
  padding:
    clamp(2.4rem, 5vw, 4.4rem)
    0
    clamp(2.2rem, 4vw, 3.2rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.85rem;
  color: var(--brand);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 24px;
  height: 2px;
  border-radius: var(--radius-pill);
  background: currentColor;
  content: "";
}

h1,
h2,
h3,
h4 {
  color: var(--text);
  text-wrap: balance;
}

h1,
h2,
h3 {
  line-height: 1.18;
  letter-spacing: -0.025em;
}

h1 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(2.65rem, 7vw, 5.2rem);
  font-weight: 900;
}

h2 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  font-weight: 850;
}

h3 {
  margin: 0 0 0.5rem;
  font-size: 1.08rem;
  font-weight: 800;
}

.hero-lead {
  max-width: 64ch;
  margin: 1.15rem 0 1.4rem;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  line-height: 1.75;
}

.answer-box {
  max-width: 68ch;
  padding: 1.15rem 1.2rem 1.15rem 1.25rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius:
    0
    var(--radius-md)
    var(--radius-md)
    0;
  background:
    linear-gradient(
      180deg,
      #ffffff 0%,
      #fbfcfe 100%
    );
  box-shadow: var(--shadow-md);
}

.answer-box h2 {
  margin-bottom: 0.35rem;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.answer-box p {
  margin: 0;
  color: var(--muted-strong);
}

.hero-facts {
  display: grid;
  gap: 0.7rem;
}

.fact-card {
  position: relative;
  overflow: hidden;
  padding: 1rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base),
    border-color var(--transition-base);
}

.fact-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background:
    linear-gradient(
      90deg,
      var(--brand),
      transparent
    );
  content: "";
  opacity: 0.8;
}

.fact-card:hover {
  transform: translateY(-2px);
  border-color: #c8d7f2;
  box-shadow: var(--shadow-md);
}

.fact-card strong,
.fact-card span {
  display: block;
}

.fact-card strong {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 850;
}

.fact-card span {
  margin-top: 0.22rem;
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.45;
}

.calculator-section {
  padding: 0.5rem 0 3.75rem;
}

.section-heading {
  max-width: 74ch;
  margin-bottom: 1.35rem;
}

.section-heading > p:last-child {
  margin: 0;
  color: var(--muted-strong);
  font-size: 1rem;
}

.calculator-grid {
  display: grid;
  grid-template-columns:
    minmax(0, 1.34fr)
    minmax(300px, 0.86fr);
  gap: 1.25rem;
  align-items: start;
}

.calculator-card,
.results-card,
.content-card,
.formula-card,
.example-card,
.step-card,
.next-tools {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.calculator-card {
  padding: clamp(1.15rem, 2.2vw, 1.55rem);
  box-shadow: var(--shadow-xl);
}

.results-card {
  position: sticky;
  top: 94px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(
    2,
    minmax(0, 1fr)
  );
  gap: 1rem;
}

.field-wide {
  grid-column: 1 / -1;
}

.field {
  min-width: 0;
}

.field label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--text);
  font-weight: 780;
  line-height: 1.35;
}

.field label span {
  color: var(--muted);
  font-weight: 600;
}

.field small {
  display: block;
  margin-top: 0.38rem;
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.45;
}

.field input {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 0.72rem 0.82rem;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  outline: none;
  background: var(--white);
  color: var(--text);
  box-shadow:
    inset 0 1px 2px rgba(16, 24, 40, 0.03),
    0 1px 1px rgba(16, 24, 40, 0.01);
  font-variant-numeric: tabular-nums;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background-color var(--transition-fast);
}

.field input::placeholder {
  color: #98a2b3;
}

.field input:hover {
  border-color: #98a2b3;
}

.field input:focus {
  border-color: var(--brand);
  background: var(--white);
  box-shadow:
    0 0 0 4px rgba(23, 92, 211, 0.1),
    0 1px 2px rgba(16, 24, 40, 0.04);
}

.field input:invalid[aria-invalid="true"] {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.field input:invalid[aria-invalid="true"]:focus {
  box-shadow:
    0 0 0 4px rgba(180, 35, 24, 0.1),
    0 1px 2px rgba(16, 24, 40, 0.04);
}

.calculator-card fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.calculator-card fieldset + fieldset {
  margin-top: 1.5rem;
  padding-top: 1.45rem;
  border-top: 1px solid var(--line);
}

.calculator-card legend {
  margin-bottom: 0.9rem;
  padding: 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 850;
  letter-spacing: -0.01em;
}

.preset-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
  padding-top: 1.05rem;
  border-top: 1px solid var(--line);
}

.preset-label {
  margin-right: 0.15rem;
  color: var(--muted-strong);
  font-size: 0.83rem;
  font-weight: 800;
}

.preset {
  min-height: 38px;
  padding: 0.48rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 0.84rem;
  font-weight: 750;
  transition:
    transform var(--transition-fast),
    border-color var(--transition-fast),
    background-color var(--transition-fast),
    color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.preset:hover {
  transform: translateY(-1px);
  border-color: #b7c8e9;
  background: var(--brand-soft);
  color: var(--brand-dark);
  box-shadow: var(--shadow-xs);
}

.preset:active {
  transform: translateY(0);
}

.calculate-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  margin-top: 1.15rem;
  padding: 0.8rem 1rem;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 12px;
  background:
    linear-gradient(
      180deg,
      #1f6feb 0%,
      #175cd3 48%,
      #155eef 100%
    );
  color: var(--white);
  box-shadow:
    0 8px 18px rgba(23, 92, 211, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  font-weight: 850;
  letter-spacing: -0.01em;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-base),
    filter var(--transition-fast);
}

.calculate-button::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      105deg,
      transparent 0%,
      rgba(255, 255, 255, 0.1) 45%,
      transparent 70%
    );
  content: "";
  transform: translateX(-130%);
  transition: transform 500ms ease;
}

.calculate-button:hover {
  transform: translateY(-1px);
  box-shadow:
    0 12px 26px rgba(23, 92, 211, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  filter: saturate(1.05);
}

.calculate-button:hover::before {
  transform: translateX(130%);
}

.calculate-button:active {
  transform: translateY(1px);
  box-shadow:
    0 5px 12px rgba(23, 92, 211, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.calculate-button:disabled {
  opacity: 0.65;
  box-shadow: none;
  filter: grayscale(0.2);
}

.privacy-note {
  margin: 0.72rem 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.45;
}

.form-error {
  margin-top: 1rem;
  padding: 0.82rem 0.92rem;
  border: 1px solid #fecdca;
  border-radius: 11px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 0.88rem;
  font-weight: 650;
}

.results-header {
  padding: 1.3rem 1.3rem 0.85rem;
}

.results-header h2 {
  margin-bottom: 0;
}

.result-primary {
  padding: 1.15rem 1.3rem 1.25rem;
  border-block: 1px solid #d9e5ff;
  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(23, 92, 211, 0.08),
      transparent 12rem
    ),
    linear-gradient(
      180deg,
      #f3f7ff 0%,
      var(--brand-soft) 100%
    );
}

.result-label,
.result-primary strong,
.result-primary small {
  display: block;
}

.result-label {
  color: var(--muted-strong);
  font-size: 0.8rem;
  font-weight: 800;
}

.result-primary strong,
.result-primary output {
  display: block;
  margin-top: 0.3rem;
  color: var(--brand-deep);
  font-size: clamp(2.2rem, 5vw, 3.35rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.result-primary small {
  margin-top: 0.42rem;
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.4;
}

.result-list {
  padding: 0.45rem 1.3rem;
}

.result-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.78rem 0;
  border-bottom: 1px solid var(--line);
}

.result-row:last-child {
  border-bottom: 0;
}

.result-row span {
  color: var(--muted-strong);
  font-size: 0.91rem;
}

.result-row strong,
.result-row output {
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.results-note {
  margin: 0.8rem 1.3rem 1.3rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.content-section {
  padding: 2.4rem 0;
}

.content-card {
  padding: clamp(1.2rem, 2.5vw, 1.55rem);
  box-shadow: var(--shadow-sm);
}

.content-card:hover,
.formula-card:hover,
.example-card:hover,
.step-card:hover {
  border-color: #d7dee8;
}

.prose {
  color: var(--text-soft);
}

.prose p {
  margin: 0 0 1rem;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose strong {
  color: var(--text);
  font-weight: 800;
}

.prose ul,
.prose ol {
  margin-block: 0.9rem 1rem;
  padding-inline-start: 1.25rem;
}

.prose li + li {
  margin-top: 0.42rem;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step-card {
  padding: 1.2rem;
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base),
    border-color var(--transition-base);
}

.step-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.step-number {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 0.8rem;
  border: 1px solid rgba(23, 92, 211, 0.16);
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 0.88rem;
  font-weight: 900;
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.tip-card {
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.tip-card h3 {
  margin-bottom: 0.3rem;
}

.step-card p,
.tip-card p {
  margin: 0;
  color: var(--muted);
}

.formula-card {
  margin-top: 1rem;
  padding: 1.25rem;
  box-shadow: var(--shadow-xs);
}

.formula-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.formula-list div {
  display: grid;
  grid-template-columns:
    minmax(170px, 0.72fr)
    minmax(0, 1.28fr);
  gap: 1rem;
  padding: 0.72rem 0;
  border-bottom: 1px solid var(--line);
}

.formula-list div:last-child {
  border-bottom: 0;
}

.formula-list dt {
  color: var(--text);
  font-weight: 800;
}

.formula-list dd {
  margin: 0;
  color: var(--muted);
}

.formula-list code {
  padding: 0.1rem 0.35rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 0.9em;
}

.example-card {
  margin-top: 1rem;
  padding: 1.25rem;
  box-shadow: var(--shadow-xs);
}

.example-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem 1.15rem;
}

.example-grid p {
  margin: 0;
  padding: 0.68rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted-strong);
}

.example-grid strong {
  color: var(--text);
}

.faq-list {
  display: grid;
  gap: 0.72rem;
}

details {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-base);
}

details:hover {
  border-color: #ccd5e1;
}

details[open] {
  border-color: #c8d7f2;
  box-shadow: var(--shadow-sm);
}

summary {
  position: relative;
  padding: 1rem 3rem 1rem 1.05rem;
  cursor: pointer;
  color: var(--text);
  font-weight: 800;
  line-height: 1.45;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  position: absolute;
  top: 50%;
  right: 1rem;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  transform: translateY(-50%);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--muted-strong);
  content: "+";
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

details[open] summary::after {
  border-color: #c8d7f2;
  background: var(--brand-soft);
  color: var(--brand-dark);
  content: "−";
}

details p {
  margin: 0;
  padding: 0 1.05rem 1.08rem;
  color: var(--muted);
  line-height: 1.7;
}

.next-tools {
  margin: 0 0 3.5rem;
  padding: 1.25rem;
  box-shadow: var(--shadow-xs);
}

.next-tools > p:not(.eyebrow) {
  margin: 0 0 1rem;
  color: var(--muted);
}

.tool-pills {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.tool-pills span {
  padding: 0.55rem 0.78rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 0.86rem;
  font-weight: 750;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(
      circle at top right,
      rgba(23, 92, 211, 0.11),
      transparent 22rem
    ),
    #0b1220;
  color: #d0d5dd;
}

.footer-grid {
  display: grid;
  grid-template-columns:
    minmax(0, 1.2fr)
    minmax(220px, 0.8fr);
  gap: 2.5rem;
  padding: 3rem 0 2rem;
}

.site-footer h2 {
  margin: 0 0 0.5rem;
  color: var(--white);
  font-size: 1.05rem;
  font-weight: 850;
}

.site-footer p {
  max-width: 62ch;
  margin: 0;
  color: #98a2b3;
}

.site-footer a {
  color: #d0d5dd;
}

.site-footer a:hover {
  color: var(--white);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 0 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #98a2b3;
  font-size: 0.79rem;
}

.footer-bottom a {
  text-decoration-color: rgba(255, 255, 255, 0.3);
}

@media (hover: hover) {
  a,
  button,
  summary {
    -webkit-tap-highlight-color: transparent;
  }
}

@media (forced-colors: active) {
  .brand-logo,
  .calculate-button,
  .step-number {
    forced-color-adjust: auto;
  }

  .field input:focus,
  .calculate-button:focus-visible,
  .preset:focus-visible,
  .site-nav a:focus-visible {
    outline: 2px solid Highlight;
    outline-offset: 3px;
  }
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .hero-facts {
    grid-template-columns: repeat(
      3,
      minmax(0, 1fr)
    );
  }

  .calculator-grid {
    grid-template-columns: 1fr;
  }

  .results-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(
      calc(100% - 1.5rem),
      var(--max)
    );
  }

  .header-inner {
    min-height: 68px;
    gap: 0.75rem;
  }

  .site-nav {
    gap: 0.15rem;
  }

  .site-nav a {
    min-height: 38px;
    padding-inline: 0.62rem;
    font-size: 0.82rem;
  }

  .hero {
    padding-top: 2rem;
  }

  .hero-facts {
    grid-template-columns: 1fr;
  }

  .steps-grid,
  .tips-grid,
  .example-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 560px) {
  :root {
    --brand-logo-width: 125px;
    --brand-logo-height: 36px;
    --brand-logo-overlap: -18px;
  }

  html {
    scroll-padding-top: 78px;
  }

  section[id] {
    scroll-margin-top: 78px;
  }

  .container {
    width: min(
      calc(100% - 1rem),
      var(--max)
    );
  }

  .header-inner {
    min-height: 64px;
  }

  .brand-name {
    font-size: 0.93rem;
  }

  .brand-tagline {
    display: none;
  }

  .site-nav {
    justify-content: flex-end;
  }

  .site-nav a {
    padding-inline: 0.48rem;
    font-size: 0.77rem;
  }

  .breadcrumbs {
    padding-top: 0.8rem;
    font-size: 0.8rem;
  }

  .hero {
    gap: 1.4rem;
    padding: 1.5rem 0 2rem;
  }

  .eyebrow {
    margin-bottom: 0.72rem;
    font-size: 0.68rem;
  }

  h1 {
    max-width: 13ch;
    font-size: clamp(
      2.35rem,
      13vw,
      3.6rem
    );
  }

  h2 {
    font-size: 1.6rem;
  }

  .hero-lead {
    margin-top: 0.95rem;
    font-size: 1rem;
  }

  .answer-box {
    padding: 1rem;
  }

  .calculator-section {
    padding-bottom: 2.75rem;
  }

  .calculator-card,
  .results-card,
  .content-card,
  .formula-card,
  .example-card,
  .step-card,
  .next-tools {
    border-radius: 15px;
  }

  .calculator-card {
    padding: 1rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 0.92rem;
  }

  .field-wide {
    grid-column: auto;
  }

  .field input {
    min-height: 52px;
  }

  .calculator-card legend {
    font-size: 0.95rem;
  }

  .preset-row {
    align-items: flex-start;
  }

  .preset-label {
    flex-basis: 100%;
  }

  .calculate-button {
    min-height: 54px;
  }

  .results-header,
  .result-primary,
  .result-list {
    padding-inline: 1rem;
  }

  .result-primary {
    padding-top: 1rem;
    padding-bottom: 1.1rem;
  }

  .result-primary strong,
  .result-primary output {
    font-size: 2.65rem;
  }

  .results-note {
    margin-inline: 1rem;
    margin-bottom: 1rem;
  }

  .content-section {
    padding: 2rem 0;
  }

  .formula-card,
  .example-card,
  .step-card,
  .content-card {
    padding: 1rem;
  }

  .formula-list div {
    grid-template-columns: 1fr;
    gap: 0.18rem;
  }

  .footer-grid {
    padding-top: 2.25rem;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 390px) {
  :root {
    --brand-logo-width: 112px;
    --brand-logo-height: 34px;
    --brand-logo-overlap: -14px;
  }

  .site-nav a {
    padding-inline: 0.35rem;
    font-size: 0.73rem;
  }

  h1 {
    font-size: 2.2rem;
  }

  .brand-name {
    font-size: 0.88rem;
  }

  .result-row {
    gap: 0.6rem;
  }

  .result-row span,
  .result-row strong,
  .result-row output {
    font-size: 0.87rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  :root {
    --bg: #ffffff;
    --surface: #ffffff;
    --text: #000000;
    --muted: #333333;
    --line: #cccccc;
  }

  html,
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .site-header,
  .site-nav,
  .skip-link,
  .next-tools,
  .calculate-button,
  .privacy-note {
    display: none !important;
  }

  .container {
    width: 100%;
    max-width: none;
  }

  .hero,
  .calculator-grid,
  .steps-grid,
  .tips-grid,
  .footer-grid {
    display: block;
  }

  .hero,
  .calculator-section,
  .content-section {
    padding: 1rem 0;
  }

  .calculator-card,
  .results-card,
  .content-card,
  .formula-card,
  .example-card,
  .step-card {
    margin-bottom: 1rem;
    border: 1px solid #cccccc;
    box-shadow: none !important;
  }

  .results-card {
    position: static;
  }

  details {
    break-inside: avoid;
    box-shadow: none !important;
  }

  details[open] {
    display: block;
  }

  a {
    color: #000000;
    text-decoration: underline;
  }
}