:root {
  --ink: #0c2135;
  --ink-soft: #4f6478;
  --midnight: #061825;
  --navy: #0a2940;
  --navy-soft: #113d59;
  --blue: #1667e8;
  --blue-dark: #0c4db5;
  --cyan: #38dcc5;
  --cyan-dark: #087d75;
  --lime: #c9ff76;
  --canvas: #f3f6fa;
  --canvas-blue: #ecf4ff;
  --paper: #ffffff;
  --line: #d9e3ed;
  --line-strong: #b9c9d8;
  --danger: #b42318;
  --success: #0b7555;
  --shadow: 0 28px 80px rgba(4, 24, 39, .18);
  --shadow-soft: 0 16px 42px rgba(7, 35, 55, .09);
  --radius-xl: 30px;
  --radius: 20px;
  --radius-sm: 12px;
  --shell: min(1180px, calc(100% - 2rem));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 132px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--blue-dark); text-underline-offset: .2em; }
a:hover { color: var(--cyan-dark); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
:focus-visible { outline: 3px solid rgba(56, 220, 197, .46); outline-offset: 3px; }
[id] { scroll-margin-top: 132px; }
.shell { width: var(--shell); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link {
  position: fixed;
  left: 1rem;
  top: -6rem;
  z-index: 999;
  padding: .78rem 1rem;
  border-radius: 0 0 12px 12px;
  color: #fff;
  background: var(--midnight);
}
.skip-link:focus { top: 0; }

h1, h2, h3 {
  color: var(--midnight);
  line-height: 1.1;
  letter-spacing: -.035em;
}
h1 { margin: 0 0 1.15rem; max-width: 13ch; font-size: clamp(2.65rem, 5.6vw, 5.15rem); font-weight: 850; }
h2 { margin: 0 0 1rem; font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 820; }
h3 { margin: 0 0 .62rem; font-size: clamp(1.12rem, 2vw, 1.4rem); font-weight: 780; }
p:first-child { margin-top: 0; }
p:last-child { margin-bottom: 0; }
.eyebrow { margin: 0 0 .8rem; color: var(--blue-dark); font-size: .75rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow-light { color: var(--cyan); }
.lede { max-width: 61ch; margin: 0; color: var(--ink-soft); font-size: clamp(1.05rem, 1.7vw, 1.23rem); }
.muted { color: var(--ink-soft); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid rgba(8, 32, 50, .09);
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 6px 28px rgba(7, 31, 49, .04);
  backdrop-filter: blur(18px) saturate(140%);
}
.nav-wrap { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 1.4rem; }
.brand { display: inline-flex; align-items: center; gap: .72rem; color: var(--midnight); font-weight: 850; letter-spacing: -.025em; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; filter: drop-shadow(0 7px 14px rgba(12, 77, 181, .18)); }
.site-nav { display: flex; align-items: center; gap: .15rem; }
.site-nav a { padding: .58rem .7rem; color: #233b50; font-size: .92rem; font-weight: 700; text-decoration: none; border-radius: 10px; transition: background .18s ease, color .18s ease; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--blue-dark); background: #eaf2ff; }
.nav-toggle { display: none; padding: .48rem .62rem; border: 1px solid var(--line); border-radius: 10px; color: var(--navy); background: #fff; }

.hero { position: relative; overflow: hidden; }
.hero-premium {
  min-height: calc(100svh - 72px);
  padding: clamp(2.5rem, 5.4vw, 5.4rem) 0;
  color: #dceaf3;
  background:
    linear-gradient(100deg, rgba(4, 16, 27, .86) 0%, rgba(4, 16, 27, .52) 42%, rgba(4, 16, 27, .16) 70%, rgba(4, 16, 27, .32) 100%),
    url("/assets/hero-calc-bg.webp") center / cover no-repeat,
    linear-gradient(145deg, #061825 0%, #09293f 58%, #071e30 100%);
}
.hero-premium::after {
  content: "";
  position: absolute;
  inset: auto -15% -45% 40%;
  height: 70%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(22, 103, 232, .22), transparent 66%);
  pointer-events: none;
}
.hero-orbit {
  position: absolute;
  width: 320px;
  height: 320px;
  left: -170px;
  bottom: -120px;
  border: 1px solid rgba(56, 220, 197, .22);
  border-radius: 50%;
  box-shadow: 0 0 0 42px rgba(56, 220, 197, .035), 0 0 0 84px rgba(56, 220, 197, .025);
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, .9fr) minmax(520px, 1.1fr); align-items: center; gap: clamp(2rem, 5vw, 5rem); }
.hero-grid-calculator { align-items: start; }
.hero-copy { padding-top: clamp(.8rem, 4vw, 3.2rem); }
.hero-premium h1 { color: #fff; font-size: clamp(2.65rem, 4.8vw, 4.75rem); overflow-wrap: anywhere; text-wrap: balance; }
.hero-premium .lede { color: #bfd0db; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .72rem; margin-top: 1.7rem; }
.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: .42rem;
  padding: .73rem 1.08rem;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 780;
  line-height: 1.15;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: linear-gradient(135deg, var(--blue), #0a56cc); box-shadow: 0 10px 22px rgba(22, 103, 232, .22); }
.button-primary:hover { color: #fff; background: linear-gradient(135deg, #2474ec, var(--blue-dark)); box-shadow: 0 14px 28px rgba(22, 103, 232, .3); }
.button-secondary { color: var(--navy); border-color: var(--line-strong); background: #fff; }
.button-secondary:hover { color: var(--blue-dark); border-color: #91afe0; background: #f5f9ff; }
.button-accent { color: #062338; background: var(--lime); box-shadow: 0 12px 30px rgba(201, 255, 118, .13); }
.button-accent:hover { color: #061825; background: #d7ff9b; box-shadow: 0 16px 34px rgba(201, 255, 118, .22); }
.button-dark-ghost { color: #e7f1f7; border-color: rgba(255,255,255,.24); background: rgba(255,255,255,.06); }
.button-dark-ghost:hover { color: #fff; border-color: rgba(255,255,255,.45); background: rgba(255,255,255,.1); }
.button-ghost { min-height: 36px; color: var(--blue-dark); border-color: #c7d8f3; background: #f4f8ff; }
.button-small { min-height: 38px; padding: .5rem .78rem; font-size: .86rem; }

.proof-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .6rem; margin-top: 2.1rem; max-width: 520px; }
.proof-grid > div { padding: .78rem .82rem; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; background: rgba(255,255,255,.045); backdrop-filter: blur(8px); }
.proof-grid strong { display: block; color: #fff; font-size: 1.05rem; line-height: 1.1; }
.proof-grid span { display: block; margin-top: .28rem; color: #a9becb; font-size: .76rem; }

.calculator-wrap { position: relative; z-index: 2; margin-top: -2.3rem; padding-bottom: 1rem; }
.calculator-card { padding: clamp(1.2rem, 3vw, 2rem); border: 1px solid rgba(19, 61, 89, .13); border-radius: var(--radius-xl); background: #fff; box-shadow: var(--shadow); }
.hero-calculator { position: relative; overflow: hidden; border-color: rgba(255,255,255,.28); box-shadow: 0 34px 90px rgba(0, 9, 17, .34); }
.hero-calculator::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--cyan), var(--blue), var(--lime)); }
.calculator-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.calculator-head h2 { margin-bottom: .38rem; max-width: 18ch; font-size: clamp(1.55rem, 3vw, 2.2rem); }
.calculator-head p:not(.eyebrow) { margin: 0; color: var(--ink-soft); }
.tool-badge { display: inline-flex; flex: 0 0 auto; align-items: center; gap: .42rem; padding: .42rem .66rem; border: 1px solid #bce8dd; border-radius: 999px; color: var(--success); background: #effbf7; font-size: .76rem; font-weight: 790; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #1abc8b; box-shadow: 0 0 0 4px rgba(26,188,139,.12); }
.calc-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.field { display: grid; gap: .42rem; }
.field.wide, .field.full, .example-row, .form-actions, .form-error, .result-panel { grid-column: 1 / -1; }
.field label { color: #233c51; font-size: .86rem; font-weight: 780; }
.field input, .field select, .calc-form input, .calc-form select {
  width: 100%;
  min-height: 49px;
  padding: .72rem .82rem;
  border: 1px solid #c9d6e2;
  border-radius: 11px;
  color: var(--ink);
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(8, 33, 52, .035);
}
.field input:hover, .field select:hover { border-color: #9eb5c8; }
.field input:focus, .field select:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(22,103,232,.1); outline: none; }
.field [aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(180,35,24,.08); }
.example-row { display: flex; flex-wrap: wrap; align-items: center; gap: .42rem; color: var(--ink-soft); font-size: .76rem; }
.example-row > span { margin-right: .1rem; font-weight: 720; }
.example-chip { padding: .34rem .56rem; border: 1px solid #d2deea; border-radius: 999px; color: #315069; background: #f7f9fc; font-size: .74rem; font-weight: 680; }
.example-chip:hover { color: var(--blue-dark); border-color: #9db9ea; background: #edf4ff; }
.form-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.form-error { min-height: 1.15em; margin: -.25rem 0 0; color: var(--danger); font-size: .88rem; font-weight: 670; }
.result-panel { display: none; grid-template-columns: minmax(150px,.7fr) minmax(0,1.3fr); gap: 1rem; padding: 1.05rem; border: 1px solid #b5dfd8; border-radius: 16px; background: linear-gradient(135deg, #f0fcf8, #f2f7ff); }
.result-panel.is-visible { display: grid; }
.result-kicker { margin: 0; color: var(--cyan-dark); font-size: .72rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.result-value { margin: .08rem 0 0; color: var(--midnight); font-size: clamp(1.75rem, 5vw, 2.5rem); font-weight: 850; line-height: 1.1; }
.result-work { min-width: 0; }
.result-work > strong { font-size: .82rem; }
.result-formula { margin: .35rem 0 .6rem; overflow-wrap: anywhere; }
.privacy-note { display: flex; align-items: center; gap: .45rem; margin: .85rem 0 0; color: #577083; font-size: .76rem; }
.privacy-note span { display: inline-grid; width: 20px; height: 20px; place-items: center; border-radius: 50%; color: var(--success); background: #e7f8f2; font-weight: 800; }

.keyword-jump { position: sticky; top: 72px; z-index: 60; border-bottom: 1px solid #dce6ee; background: rgba(255,255,255,.94); box-shadow: 0 8px 24px rgba(9,37,57,.05); backdrop-filter: blur(16px); }
.keyword-jump-track { display: flex; align-items: center; gap: .5rem; padding-block: .67rem; overflow-x: auto; scrollbar-width: thin; }
.jump-label { flex: 0 0 auto; margin-right: .2rem; color: #405b70; font-size: .73rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.keyword-jump a { flex: 0 0 auto; padding: .4rem .62rem; border: 1px solid #d6e1eb; border-radius: 999px; color: #2a485f; background: #fff; font-size: .78rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.keyword-jump a span { color: var(--blue); }
.keyword-jump a:hover, .keyword-jump a.is-active { color: #fff; border-color: var(--navy); background: var(--navy); }
.keyword-jump a:hover span, .keyword-jump a.is-active span { color: var(--cyan); }

.trust-strip { border-bottom: 1px solid var(--line); background: #fff; }
.trust-strip-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)) auto; align-items: center; gap: 1.2rem; padding-block: 1.25rem; }
.trust-strip-grid > div { display: flex; align-items: center; gap: .72rem; min-width: 0; }
.trust-strip-grid p { margin: 0; font-size: .79rem; line-height: 1.45; }
.trust-strip-grid p span { color: var(--ink-soft); }
.trust-icon { display: inline-grid; flex: 0 0 auto; width: 38px; height: 38px; place-items: center; border-radius: 12px; color: var(--blue-dark); background: #edf4ff; font-weight: 850; }
.text-link { font-size: .82rem; font-weight: 780; white-space: nowrap; }

.section { padding: clamp(4rem, 8vw, 7rem) 0; }
.section-white { background: var(--paper); }
.section-mint { background: linear-gradient(140deg, #eafaf6, #f1f7ff); }
.section-head { max-width: 780px; margin-bottom: 2rem; }
.section-head > p:last-child { color: var(--ink-soft); }
.split-head { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(280px,.8fr); align-items: end; gap: 2rem; max-width: none; }
.split-head h2 { margin-bottom: 0; }
.split-head > p { margin: 0 0 .3rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: clamp(1.5rem,4vw,3.5rem); }
.grid-3 { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.1rem; }

.formula-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; }
.formula-card { position: relative; overflow: hidden; padding: 1.45rem; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(155deg, #fff, #f8fbff); box-shadow: 0 12px 30px rgba(12,39,60,.055); }
.formula-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--blue), var(--cyan)); }
.formula-index { position: absolute; top: 1rem; right: 1rem; color: #dce7f0; font-size: 2rem; font-weight: 900; letter-spacing: -.08em; }
.formula-intent { position: relative; z-index: 1; max-width: 24ch; margin: 0 0 1.15rem; color: var(--ink-soft); font-size: .82rem; }
.formula-display, .formula-line { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; }
.formula-display { margin: 1.05rem 0; padding: .8rem .85rem; border: 1px solid #c7daf4; border-radius: 12px; color: #0a4a9e; background: #eef5ff; font-size: clamp(1.02rem,2vw,1.25rem); font-weight: 800; }
.formula-line { color: #0d4e82; font-weight: 710; }
.text-button { padding: 0; border: 0; color: var(--blue-dark); background: transparent; font-weight: 770; }
.text-button:hover { color: var(--cyan-dark); }
.section-cta { margin: 1.5rem 0 0; text-align: right; font-weight: 760; }

.tools-section { background: linear-gradient(180deg, var(--canvas) 0%, #edf3f8 100%); }
.tool-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; }
.tool-card { position: relative; display: flex; min-height: 292px; flex-direction: column; padding: 1.35rem; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); background: #fff; box-shadow: 0 12px 30px rgba(10,38,58,.055); text-decoration: none; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.tool-card:hover { color: var(--ink); border-color: #9dbbe0; box-shadow: 0 22px 50px rgba(8,38,62,.12); transform: translateY(-4px); }
.tool-card.featured-tool { background: linear-gradient(155deg, #fff 60%, #ecf5ff); }
.tool-tag { align-self: flex-start; padding: .34rem .55rem; border-radius: 999px; color: #466178; background: #f0f4f8; font-size: .68rem; font-weight: 780; letter-spacing: .04em; text-transform: uppercase; }
.tool-icon { display: inline-grid; width: 48px; height: 48px; place-items: center; margin: 1rem 0; border-radius: 14px; color: var(--blue-dark); background: #edf4ff; }
.tool-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.tool-card p { margin: 0 0 1rem; color: var(--ink-soft); font-size: .94rem; }
.card-link { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: auto; padding-top: 1rem; border-top: 1px solid #edf1f5; color: var(--blue-dark); font-weight: 780; }
.card-link > span { display: inline-grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: #edf4ff; transition: transform .18s ease; }
.tool-card:hover .card-link > span { transform: translateX(3px); }

.editorial-section { background: var(--midnight); }
.editorial-grid { display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,.95fr); align-items: center; gap: clamp(2rem,5vw,5rem); }
.editorial-visual { position: relative; margin: 0; }
.editorial-visual::before { content: ""; position: absolute; inset: -12px 16px 12px -12px; z-index: 0; border: 1px solid rgba(56,220,197,.28); border-radius: 26px; }
.editorial-visual img { position: relative; z-index: 1; width: 100%; height: auto; object-fit: contain; border-radius: 22px; box-shadow: 0 28px 70px rgba(0,0,0,.3); }
.editorial-visual figcaption { position: relative; z-index: 1; margin-top: .75rem; color: #8da8ba; font-size: .76rem; }
.editorial-copy h2, .editorial-copy h3 { color: #fff; }
.editorial-copy > p:not(.eyebrow) { color: #b7cad7; }
.check-steps { display: grid; gap: .8rem; margin: 1.5rem 0; padding: 0; list-style: none; }
.check-steps li { display: grid; grid-template-columns: 38px 1fr; gap: .75rem; padding: .85rem; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; background: rgba(255,255,255,.04); }
.check-steps li > span { display: inline-grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; color: #092235; background: var(--cyan); font-weight: 850; }
.check-steps strong { color: #fff; }
.check-steps p { margin: .18rem 0 0; color: #a9bfcc; font-size: .87rem; }
.inline-links { display: flex; flex-wrap: wrap; gap: .8rem; }
.inline-links a { color: var(--cyan); font-weight: 740; }

.usecase-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1rem; }
.usecase-grid article { padding: 1.3rem; border-left: 3px solid var(--cyan); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: #f7f9fc; }
.usecase-grid article > span { display: inline-grid; width: 39px; height: 39px; place-items: center; margin-bottom: 1rem; border-radius: 12px; color: var(--blue-dark); background: #e7f0ff; font-weight: 850; }
.usecase-grid p { color: var(--ink-soft); font-size: .9rem; }
.usecase-grid a { font-size: .88rem; font-weight: 760; }

.code-block { display: block; padding: .9rem; overflow-x: auto; border: 1px solid rgba(255,255,255,.12); border-radius: 11px; color: #d7e8f2; background: rgba(0,0,0,.22); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .78rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.code-block { color: #dff9f4; background: var(--midnight); }

.faq-layout { display: grid; grid-template-columns: minmax(280px,.7fr) minmax(0,1.3fr); align-items: start; gap: clamp(2rem,5vw,5rem); }
.faq-intro { position: sticky; top: 150px; }
.faq-intro p:not(.eyebrow) { color: var(--ink-soft); }
.faq-list { display: grid; gap: .7rem; }
.faq-list details { border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 8px 20px rgba(9,35,54,.035); }
.faq-list summary { position: relative; padding: 1rem 3rem 1rem 1rem; color: var(--midnight); font-weight: 760; cursor: pointer; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 1rem; top: .78rem; display: inline-grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; color: var(--blue-dark); background: #edf4ff; font-size: 1.2rem; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list details[open] { border-color: #b9cce1; }
.faq-list details p { margin: 0; padding: 0 1rem 1rem; color: var(--ink-soft); }

.content-card { padding: 1.35rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-soft); }
.content-card + .content-card { margin-top: 1rem; }
.content-card p { color: var(--ink-soft); }
.number-card { position: relative; padding-top: 3.2rem; }
.number-card::before { content: attr(data-step); position: absolute; top: 1rem; left: 1.3rem; display: inline-grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; color: #fff; background: var(--blue); font-weight: 850; }
.callout { margin-top: 1rem; padding: 1rem 1.1rem; border: 1px solid #addfd3; border-left: 4px solid var(--cyan-dark); border-radius: 12px; color: #174e46; background: #eefaf7; }
.callout.warning { border-color: #ecd49f; border-left-color: #bd7b10; color: #66420c; background: #fff8e8; }
.prose { max-width: 760px; }
.prose h2 { margin-top: 2rem; }
.prose h2:first-child, .prose .eyebrow + h2 { margin-top: 0; }
.prose h3 { margin-top: 1.65rem; }
.prose p, .prose li { color: #344f65; }
.prose li + li { margin-top: .4rem; }

.page-hero { position: relative; overflow: hidden; padding: clamp(3rem,7vw,6rem) 0; color: #d8e7f0; background: radial-gradient(circle at 82% 18%, rgba(56,220,197,.18), transparent 26%), linear-gradient(145deg, var(--midnight), var(--navy)); }
.page-hero::after { content: "%"; position: absolute; right: 5vw; bottom: -4.2rem; color: rgba(255,255,255,.035); font-size: clamp(12rem,28vw,24rem); font-weight: 900; line-height: 1; pointer-events: none; }
.page-hero h1, .page-hero h2, .page-hero h3 { position: relative; z-index: 1; color: #fff; }
.page-hero .lede { position: relative; z-index: 1; color: #bad0dc; }
.page-hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0,1.15fr) minmax(320px,.85fr); align-items: center; gap: clamp(2rem,5vw,4.5rem); }
.page-hero .content-card { color: var(--ink); }
.page-hero .content-card h2, .page-hero .content-card h3 { color: var(--midnight); }
.page-hero .content-card p { color: var(--ink-soft); }
.breadcrumbs { position: relative; z-index: 1; margin-bottom: 1.25rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; color: #9fb7c6; font-size: .78rem; list-style: none; }
.breadcrumbs li + li::before { content: "/"; margin-right: .4rem; color: #607f93; }
.breadcrumbs a { color: #c8dbe6; }
.quick-nav { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1.5rem; }
.quick-nav a { padding: .38rem .62rem; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; color: #d8e9f2; background: rgba(255,255,255,.06); font-size: .78rem; font-weight: 700; text-decoration: none; }
.quick-nav a:hover { color: #071c2d; background: var(--cyan); }

.data-table { width: 100%; border-collapse: collapse; border: 1px solid var(--line); background: #fff; }
.data-table th, .data-table td { padding: .85rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.data-table th { color: var(--navy); background: #edf4fa; font-size: .82rem; }
.data-table tr:last-child td { border-bottom: 0; }
.compact { max-width: 780px; }
.full { width: 100%; }

.exercise-box { padding: 1.3rem; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.exercise-question { min-height: 3.5em; font-size: 1.15rem; font-weight: 760; }
.exercise-feedback { min-height: 2em; margin-top: .8rem; font-weight: 700; }
.exercise-feedback.good { color: var(--success); }
.exercise-feedback.bad { color: var(--danger); }

.site-footer { padding: 3.5rem 0 1.7rem; color: #a9bfcc; background: #04131f; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3,1fr); gap: 2rem; }
.site-footer h2, .site-footer h3 { color: #fff; font-size: .92rem; letter-spacing: -.01em; }
.site-footer p { max-width: 38ch; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li + li { margin-top: .42rem; }
.site-footer a { color: #c5d7e1; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.brand-footer { margin-bottom: 1rem; color: #fff !important; font-size: 1.05rem; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.3rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.12); font-size: .8rem; }

.error-page { min-height: 75vh; display: grid; place-items: center; }
.text-center { text-align: center; }
.text-center h1, .text-center .lede { margin-inline: auto; }
.justify-center { justify-content: center; }
.overflow-table { overflow-x: auto; }
.mt-sm { margin-top: .8rem; }
.mt-md { margin-top: 1rem; }
.mt-lg { margin-top: 1.5rem; }
.mb-md { margin-bottom: 1rem; }
.heading-card { font-size: 1.5rem; }
.text-small { font-size: .86rem; }

@media (max-width: 1040px) {
  .hero-grid { grid-template-columns: minmax(0,.82fr) minmax(480px,1.18fr); gap: 2rem; }
  .site-nav a { padding-inline: .52rem; font-size: .87rem; }
  .trust-strip-grid { grid-template-columns: repeat(3,1fr); }
  .trust-strip-grid > a { grid-column: 1 / -1; }
  .usecase-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 900px) {
  html { scroll-padding-top: 122px; }
  [id] { scroll-margin-top: 122px; }
  .hero-premium { min-height: auto; }
  .hero-grid, .page-hero-grid, .editorial-grid { grid-template-columns: 1fr; }
  .hero-copy { padding-top: 0; }
  .hero-copy h1 { max-width: 15ch; }
  .hero-calculator { max-width: 720px; }
  .formula-grid, .tool-grid, .grid-3 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .formula-card:last-child { grid-column: 1 / -1; }
  .faq-layout { grid-template-columns: 1fr; }
  .faq-intro { position: static; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-grid > :last-child { grid-column: 2 / -1; }
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-grid; place-items: center; }
  .site-nav { position: absolute; inset: 72px 1rem auto; display: none; flex-direction: column; align-items: stretch; max-height: calc(100vh - 90px); overflow-y: auto; padding: .75rem; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
  .site-nav.is-open { display: flex; }
  .keyword-jump { top: 72px; }
  .jump-label { display: none; }
  .split-head { grid-template-columns: 1fr; gap: .8rem; }
  .trust-strip-grid { grid-template-columns: 1fr; gap: .75rem; }
  .trust-strip-grid > a { grid-column: auto; }
  .formula-grid, .tool-grid, .grid-2, .grid-3, .footer-grid { grid-template-columns: 1fr; }
  .formula-card:last-child, .footer-grid > :last-child { grid-column: auto; }
  .footer-bottom { flex-direction: column; }
  .editorial-visual { max-width: 680px; }
}

@media (max-width: 560px) {
  :root { --shell: min(100% - 1.15rem, 1180px); }
  h1 { font-size: clamp(2.35rem,12vw,3.45rem); }
  .hero-premium h1 { font-size: clamp(2.35rem, 11vw, 3.35rem); }
  h2 { font-size: clamp(1.8rem,9vw,2.4rem); }
  .hero-premium { padding: 1.9rem 0 2.4rem; }
  .hero-grid { gap: 1.35rem; }
  .hero-actions { display: grid; }
  .hero-actions .button { width: 100%; }
  .hero-copy .button-dark-ghost, .hero-copy .proof-grid { display: none; }
  .proof-grid { grid-template-columns: 1fr; }
  .proof-grid > div { display: flex; justify-content: space-between; align-items: center; }
  .calculator-card { padding: 1rem; border-radius: 18px; }
  .calculator-head { flex-direction: column; }
  .calc-form { grid-template-columns: 1fr; }
  .field, .field.wide, .form-actions, .form-error, .result-panel, .example-row { grid-column: 1; }
  .result-panel { grid-template-columns: 1fr; }
  .form-actions { display: grid; }
  .form-actions .button { width: 100%; }
  .example-row { align-items: flex-start; }
  .keyword-jump-track { padding-block: .52rem; }
  .keyword-jump a { font-size: .73rem; }
  .usecase-grid { grid-template-columns: 1fr; }
  .section-cta { text-align: left; }
}

@media print {
  .site-header, .site-footer, .hero-actions, .quick-nav, .keyword-jump, .nav-toggle, .no-print { display: none !important; }
  body { color: #000; background: #fff; }
  .hero-premium, .page-hero, .editorial-section { color: #000; background: #fff; }
  .hero-premium h1, .page-hero h1, .editorial-section h2 { color: #000; }
  .hero-premium .lede, .page-hero .lede, .editorial-copy > p:not(.eyebrow) { color: #333; }
  .section, .page-hero, .hero-premium { padding: 1rem 0; }
  .calculator-card, .content-card, .formula-card, .tool-card, .exercise-box { box-shadow: none; break-inside: avoid; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* v5: overflow helper for wide tables on mobile */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap .data-table { min-width: 560px; }
/* v5: premium selection + smoother press feedback */
::selection { background: rgba(56, 220, 197, .32); }
.button:active { transform: translateY(1px) scale(.99); }
.tool-card:active { transform: translateY(-1px); }
/* v5: balanced headings for premium typography */
h2 { text-wrap: balance; }
/* v5: larger tap targets for example chips on touch */
@media (pointer: coarse) {
  .example-chip { padding: .5rem .75rem; }
  .keyword-jump a { padding: .55rem .8rem; }
}

/* ===== Stacked hero: tool card below hero copy ===== */
.hero-grid.hero-grid-calculator { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: clamp(1.8rem, 4vw, 3rem); }
.hero-grid-calculator .hero-copy { max-width: 840px; padding-top: 0; text-align: center; }
.hero-grid-calculator .hero-copy { width: 100%; min-width: 0; }
.hero-grid-calculator .hero-copy h1 { max-width: 100%; margin-inline: auto; font-size: clamp(2rem, 5.2vw, 4.5rem); line-height: 1.12; letter-spacing: -.035em; overflow-wrap: normal; text-wrap: balance; }
.hero-grid-calculator .hero-copy .lede { margin-inline: auto; }
.hero-grid-calculator .hero-actions { justify-content: center; }
.hero-grid-calculator .proof-grid { margin-inline: auto; }
.hero-grid-calculator .hero-calculator { width: min(100%, 740px); }

/* Homepage learning cards */
.learning-section { padding: clamp(2rem, 5vw, 4.5rem) 0; background: radial-gradient(ellipse at 0 0, #e1f7f2, transparent 45%), linear-gradient(180deg, #edf3fa, #f6f8fc); }
.learning-stack { display: grid; gap: 1.5rem; }
.learning-card { min-width: 0; padding: clamp(1.3rem, 3.8vw, 3rem); border: 1px solid #d4e1ed; border-radius: 26px; background: #fff; box-shadow: 0 12px 36px rgba(10, 38, 62, .055); }
.learning-card h2 { font-size: clamp(1.6rem, 3.3vw, 2.5rem); max-width: 30ch; }
.learning-card p { color: #4f6478; }
.learning-intro { border-top: 4px solid #24bba9; background: linear-gradient(135deg, #fff 55%, #eefaf7); }
.learning-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1.7rem; }
.learning-grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.learning-topic { min-width: 0; padding: 1.4rem; border: 1px solid #e0e9f2; border-radius: 18px; background: linear-gradient(150deg, #f8fbff, #fff); }
.learning-topic h3 { font-size: 1.22rem; line-height: 1.3; }
.learning-number { display: inline-grid; place-items: center; width: 40px; height: 40px; margin-bottom: 1rem; border-radius: 12px; color: #0c4db5; background: #e7f0ff; font-weight: 850; }
.learning-card .learning-equation { padding: .85rem 1rem; border-left: 3px solid #24bba9; border-radius: 0 10px 10px 0; color: #124e70; background: #edf7f8; font-family: ui-monospace, Consolas, monospace; font-size: .92rem; font-weight: 700; overflow-wrap: anywhere; }
.learning-table { overflow-x: auto; margin: 1.5rem 0; border: 1px solid #dce6ef; border-radius: 16px; }
.learning-table table { width: 100%; border-collapse: collapse; text-align: left; font-size: .94rem; }
.learning-table caption { padding: .75rem 1rem; text-align: left; color: #4f6478; font-size: .82rem; background: #f8fbfe; }
.learning-table th, .learning-table td { padding: 1rem; border-top: 1px solid #e1e9f1; vertical-align: top; }
.learning-table thead th { color: #fff; background: #0a2940; }
.learning-table tbody th { font-weight: 700; }
.learning-table tbody tr:nth-child(even) { background: #f5f9fd; }
.learning-note { padding: 1.4rem; border: 1px solid #c9e9df; border-radius: 16px; background: #f0faf6; }
.learning-steps { padding: 1rem 1rem 1rem 2.6rem; border-radius: 14px; background: #edf7f8; }
.learning-steps li { padding: .35rem 0; }
.learning-faq { border-top: 4px solid #1667e8; }
.learning-faq-list { display: grid; gap: .75rem; margin-top: 1.7rem; }
.learning-faq details { padding: 0 1.25rem; border: 1px solid #dce6ef; border-radius: 14px; background: #f8fbff; }
.learning-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.15rem 0; cursor: pointer; list-style: none; }
.learning-faq summary::-webkit-details-marker { display: none; }
.learning-faq summary h3 { margin: 0; font-size: 1.05rem; line-height: 1.45; letter-spacing: -.015em; }
.learning-faq summary::after { content: "+"; flex-shrink: 0; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #0c4db5; background: #e8f0ff; font-size: 1.25rem; }
.learning-faq details[open] { border-color: #a7c6e9; background: #fff; }
.learning-faq details[open] summary::after { content: "−"; }
.learning-faq details p { margin: 0; padding: 0 0 1.25rem; max-width: 85ch; }
.editorial-section { padding-block: clamp(2.5rem, 6vw, 5rem); }
.editorial-grid { align-items: center; gap: clamp(1.5rem, 4vw, 3.5rem); }
.editorial-visual, .editorial-copy { min-width: 0; }
.editorial-copy h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); line-height: 1.16; }
.editorial-copy .eyebrow { color: var(--cyan); }
.editorial-copy .check-steps p { color: #bfd0db; line-height: 1.6; }
.editorial-copy .check-steps li { padding: 1rem; background: #102a3a; border-color: #294454; }
.editorial-copy .inline-links a { display: inline-block; padding-block: .4rem; }
.editorial-section { background: #edf3f8; }
.editorial-section .editorial-grid {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: end;
  padding: clamp(1.5rem, 4.5vw, 4rem);
  border: 1px solid #355467;
  border-radius: 30px;
  background: #071c2b;
  box-shadow: 0 24px 60px rgba(7, 28, 43, .2);
}
.editorial-section .editorial-grid::before {
  content: "";
  position: absolute;
  inset: 0 54% 0 0;
  z-index: -2;
  background: url('/assets/prozentrechner-hero.webp') 78% center / cover no-repeat;
}
.editorial-section .editorial-grid::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, transparent 26%, rgba(7,28,43,.2) 35%, #071c2b 47%);
}
.editorial-section .editorial-copy { width: 53%; max-width: 100%; overflow-wrap: anywhere; }
.editorial-section .editorial-copy .check-steps li { background: rgba(17, 47, 64, .82); border-color: rgba(150, 206, 224, .2); box-shadow: 0 6px 18px rgba(0,0,0,.12); backdrop-filter: blur(8px); }
@media (max-width: 1000px) {
  .editorial-section .editorial-grid { padding-top: 280px; }
  .editorial-section .editorial-copy { width: 100%; }
  .editorial-section .editorial-grid::before { inset: 0 0 auto; height: 270px; background-size: cover; background-position: 75% 48%; }
  .editorial-section .editorial-grid::after { background: linear-gradient(180deg, transparent 100px, rgba(7,28,43,.2) 160px, #071c2b 270px); }
}
@media (max-width: 560px) {
  .editorial-section .editorial-grid { padding: 235px 1.25rem 1.5rem; border-radius: 22px; }
  .editorial-section .editorial-copy { width: 100%; }
  .editorial-section .editorial-grid::before { height: 230px; background-position: 80% center; }
  .editorial-section .editorial-grid::after { background: linear-gradient(180deg, transparent 90px, rgba(7,28,43,.2) 140px, #071c2b 230px); }
}
@media (max-width: 900px) { .learning-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .learning-card { border-radius: 18px; } .learning-table table { min-width: 580px; } .learning-topic { padding: 1rem; } }
