/* =========================================================
   CalculatorPace — site styles
   Header, footer, CMS pages (blog, posts, text pages) and base rules.
   Calculator pages draw their own layout; this file only adds the shell.
   ========================================================= */
:root {
  --navy: #0F1F38;
  --navy-deep: #0B1730;
  --navy-2: #13234A;
  --navy-line: #1F3157;
  --blue: #1F66E8;
  --blue-soft: #EEF4FE;
  --blue-line: #D6E3FB;
  --blue-light: #7FA8F5;
  --bg: #F7F8FA;
  --white: #FFFFFF;
  --line: #E4E8EF;
  --text: #3B475A;
  --muted: #5A6475;
  --faint: #8A93A3;
  --font: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Lexend', 'Geist', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, Consolas, monospace;
}

/* ---------- Base (from the CalculatorPace design) ---------- */
html, body { margin: 0; background: var(--bg); color: var(--navy); font-family: var(--font); -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
* { box-sizing: border-box; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--navy); }
img { max-width: 100%; }
input::placeholder { color: var(--faint); }
input[type=range] { accent-color: var(--blue); width: 100%; margin: 0; height: 20px; cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }

/* ---------- Design runtime ---------- */
x-dc { display: none !important; }                     /* raw template, rendered by the runtime */
html, body { height: auto !important; }                /* runtime sets full-height; the site scrolls normally */
#dc-root, #dc-root > .sc-host { height: auto !important; }
.is-design #main { min-height: 60vh; }

.cp-skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 8px; }
.cp-skip:focus { left: 8px; color: #fff; }

/* ---------- Header ---------- */
.cp-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .85); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.cp-nav { max-width: 1240px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.cp-logo { display: flex; align-items: center; flex: none; }
.cp-logo img { height: 30px; width: auto; display: block; }
.cp-links { display: none; align-items: center; gap: 2px; flex-wrap: nowrap; }
.cp-link { font-size: 14px; font-weight: 500; color: var(--text); padding: 8px 12px; border-radius: 8px; white-space: nowrap; transition: background .15s, color .15s; }
.cp-link:hover { background: #EEF2F8; color: var(--navy); }
.cp-link.is-active { color: var(--blue); background: var(--blue-soft); }
.cp-cta {
  display: none; flex: none; white-space: nowrap; font-size: 14px; font-weight: 600; color: #fff; background: var(--navy);
  padding: 10px 16px; border-radius: 10px; box-shadow: 0 1px 2px rgba(15, 31, 56, .2); transition: background .15s;
}
.cp-cta:hover { background: var(--blue); color: #fff; }
.cp-burger {
  display: flex; flex: none; width: 44px; height: 44px; align-items: center; justify-content: center; border: 1px solid var(--line);
  border-radius: 12px; background: #fff; cursor: pointer; color: var(--navy); font-size: 20px; font-family: var(--display);
}
.cp-menu { border-top: 1px solid var(--line); background: #fff; padding: 12px 16px 20px; display: flex; flex-direction: column; gap: 4px; }
.cp-menu[hidden] { display: none; }
.cp-menu-link { display: flex; justify-content: space-between; align-items: center; padding: 13px 12px; border-radius: 10px; font-size: 16px; font-weight: 500; color: var(--navy); }
.cp-menu-link:hover, .cp-menu-link.is-active { background: #F1F5FE; color: var(--blue); }
.cp-arrow { color: #A3ACBA; }
.cp-menu-cta { margin-top: 8px; display: flex; justify-content: center; align-items: center; height: 50px; border-radius: 12px; background: var(--navy); color: #fff; font-size: 15px; font-weight: 600; }
.cp-menu-cta:hover { background: var(--blue); color: #fff; }
@media (min-width: 1120px) {
  .cp-links { display: flex; }
  .cp-cta { display: inline-flex; }
  .cp-burger, .cp-menu { display: none !important; }
}

/* ---------- Footer ---------- */
.cp-footer { background: var(--navy-deep); color: #B4C3DD; position: relative; overflow: hidden; }
.cp-footer-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 40px 40px; -webkit-mask-image: linear-gradient(180deg, #000, transparent 70%); mask-image: linear-gradient(180deg, #000, transparent 70%);
}
.cp-footer-glow { position: absolute; left: -160px; top: -200px; width: 560px; height: 560px; border-radius: 50%; background: radial-gradient(circle, rgba(31, 102, 232, .28), transparent 65%); pointer-events: none; }
.cp-footer-inner { position: relative; max-width: 1240px; margin: 0 auto; padding: 72px 24px 32px; display: flex; flex-direction: column; gap: 48px; }
.cp-footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 28px; }
.cp-footer-brand { display: flex; flex-direction: column; gap: 16px; max-width: 420px; }
.cp-footer-logo { background: #fff; border-radius: 12px; padding: 10px 14px; align-self: flex-start; }
.cp-footer-logo img { height: 26px; width: auto; display: block; }
.cp-footer-brand p { margin: 0; font-family: var(--display); font-weight: 500; font-size: 22px; line-height: 1.3; letter-spacing: -.015em; color: #fff; }
.cp-foot-search {
  display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 18px; min-width: min(100%, 320px);
  border: 1px solid #2A3E64; border-radius: 14px; background: var(--navy-2); color: #B4C3DD; font-size: 15px; transition: border-color .15s, color .15s;
}
.cp-foot-search:hover { border-color: var(--blue); color: #fff; }
.cp-foot-search span { flex: 1; text-align: left; }
.cp-foot-search kbd { font-family: var(--mono); font-size: 12px; color: #8FA6CC; border: 1px solid #2A3E64; padding: 2px 8px; border-radius: 6px; }
.cp-fcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 14px; }
.cp-fcard {
  background: var(--navy-2); border: 1px solid var(--navy-line); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 14px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.cp-fcard:hover { border-color: var(--blue); transform: translateY(-3px); box-shadow: 0 18px 40px -18px rgba(31, 102, 232, .55); }
.cp-fcard-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cp-fcard-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cp-glyph { width: 34px; height: 34px; flex: none; border-radius: 10px; background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 600; font-size: 15px; }
.cp-fcard-title { font-family: var(--display); font-weight: 600; font-size: 15px; color: #fff; }
a.cp-fcard-title:hover { color: var(--blue-light); }
.cp-fcard-count { font-family: var(--mono); font-size: 11px; color: #8FA6CC; }
.cp-fcard-rule { height: 1px; background: var(--navy-line); }
.cp-fcard-links { display: flex; flex-direction: column; gap: 2px; }
.cp-fcard-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; margin: 0 -8px; border-radius: 8px; font-size: 14px; color: #C6D3EA; }
.cp-fcard-link:hover { background: #1A2E5A; color: #fff; }
.cp-fcard-arrow { font-size: 12px; color: #4E6590; }
.cp-footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding-top: 24px; border-top: 1px solid #1E2F50; font-size: 13px; }
.cp-footer-bottom > span { max-width: 640px; line-height: 1.6; }
.cp-footer-bottom nav { display: flex; gap: 20px; flex-wrap: wrap; }
.cp-footer-bottom nav a { color: #B4C3DD; }
.cp-footer-bottom nav a:hover { color: #fff; }
@media (max-width: 767px) { .has-sticky .cp-footer { padding-bottom: 84px; } }

/* =========================================================
   CMS pages (text pages, blog, posts) in the CalculatorPace style
   ========================================================= */
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 820px; }
.page-hero {
  position: relative; overflow: hidden; background: #fff; border-bottom: 1px solid var(--line); padding: 56px 0 40px;
}
.page-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(15, 31, 56, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(15, 31, 56, .045) 1px, transparent 1px);
  background-size: 40px 40px; -webkit-mask-image: radial-gradient(ellipse at 80% 0%, #000, transparent 70%); mask-image: radial-gradient(ellipse at 80% 0%, #000, transparent 70%);
}
.page-hero .container { position: relative; }
.page-hero h1 { font-family: var(--display); font-weight: 600; font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.08; letter-spacing: -.025em; color: var(--navy); margin: 14px 0 14px; max-width: 22ch; }
.lead { font-size: 17px; line-height: 1.65; color: var(--text); max-width: 68ch; margin: 0 0 8px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--blue); background: var(--blue-soft); border: 1px solid var(--blue-line); padding: 6px 12px; border-radius: 999px;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--blue); }
.crumbs span[aria-hidden] { color: #A3ACBA; }
.page-body { padding-top: 40px; padding-bottom: 64px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 18px; border-radius: 12px; font: 600 15px var(--font); border: 1px solid transparent; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--blue); color: #fff; }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--navy); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

/* Article text */
.prose { max-width: 760px; font-size: 16.5px; line-height: 1.75; color: var(--text); }
.prose h2 { font-family: var(--display); font-weight: 600; font-size: 26px; line-height: 1.25; letter-spacing: -.02em; color: var(--navy); margin: 1.8em 0 .6em; }
.prose h3 { font-family: var(--display); font-weight: 600; font-size: 20px; color: var(--navy); margin: 1.6em 0 .5em; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose p { margin: 0 0 1.1em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--blue); }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose strong { color: var(--navy); }
.cms-content img { max-width: 100%; height: auto; border-radius: 14px; }
.cms-content figure { margin: 1.6em 0; }
.cms-content figcaption { font-size: 13px; color: var(--muted); text-align: center; margin-top: 8px; }
.cms-content blockquote { margin: 1.6em 0; padding: 14px 20px; border-left: 3px solid var(--blue); background: var(--blue-soft); border-radius: 0 12px 12px 0; color: var(--navy); }
.cms-content table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 15px; display: block; overflow-x: auto; }
.cms-content th, .cms-content td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.cms-content th { background: #F1F5FE; color: var(--navy); }
.cms-content pre { background: var(--navy); color: #E6EDF8; padding: 18px; border-radius: 14px; overflow-x: auto; font: 14px/1.6 var(--mono); }
.cms-content code { font-family: var(--mono); font-size: .9em; background: #EEF2F8; padding: 2px 6px; border-radius: 6px; }
.cms-content pre code { background: none; padding: 0; }
.cms-content hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.cms-content .alignleft { float: left; margin: 6px 22px 14px 0; }
.cms-content .alignright { float: right; margin: 6px 0 14px 22px; }
.cms-content .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.cms-content::after { content: ""; display: table; clear: both; }
.cms-content iframe { max-width: 100%; border: 0; border-radius: 14px; }

/* Blog */
.section { padding: 64px 0; }
.section-alt { background: #fff; border-top: 1px solid var(--line); }
.section-head { margin-bottom: 28px; }
.section-head h2 { font-family: var(--display); font-weight: 600; font-size: 28px; letter-spacing: -.02em; margin: 12px 0 0; color: var(--navy); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 32px 0 24px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--text); font-size: 14px; font-weight: 500; }
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip small { opacity: .6; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 18px; padding-bottom: 24px; }
.post-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; color: inherit; transition: transform .2s, box-shadow .2s, border-color .2s; }
.post-card:hover { transform: translateY(-3px); border-color: var(--blue-line); box-shadow: 0 18px 40px -22px rgba(15, 31, 56, .35); color: inherit; }
.post-card-media { aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--blue-soft), #DCE7FB); display: grid; place-items: center; overflow: hidden; }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; }
.post-card-glyph { font-family: var(--display); font-weight: 600; font-size: 44px; color: var(--blue); opacity: .55; }
.post-card-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; align-items: flex-start; }
.post-card-body h3 { font-family: var(--display); font-weight: 600; font-size: 19px; line-height: 1.3; margin: 0; color: var(--navy); }
.post-card-body p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.post-card-meta { margin-top: auto; font-family: var(--mono); font-size: 11.5px; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; }
.post-card.featured { grid-column: 1 / -1; flex-direction: row; }
.post-card.featured .post-card-media { flex: 1.15; aspect-ratio: auto; min-height: 300px; }
.post-card.featured .post-card-body { flex: 1; padding: 32px; justify-content: center; }
.post-card.featured h3 { font-size: clamp(22px, 3vw, 30px); }
@media (max-width: 760px) { .post-card.featured { flex-direction: column; } .post-card.featured .post-card-media { min-height: 190px; } }
.cat-pill { display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); background: var(--blue-soft); border: 1px solid var(--blue-line); padding: 4px 10px; border-radius: 999px; }
.post-hero h1 { max-width: none; }
.post-meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 14px; }
.post-cover { width: 100%; border-radius: 18px; margin: 32px 0 8px; border: 1px solid var(--line); }
.post-body { padding: 32px 0 8px; max-width: none; }
.share-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 32px 0 56px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 14px; }
.share-row span { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-right: 4px; }
.share-row a { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--navy); font-weight: 500; }
.share-row a:hover { border-color: var(--blue); color: var(--blue); }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 16px 0 64px; }
.pager-info { color: var(--muted); font-size: 14px; }
.preview-bar { background: #FFF4D6; color: #6B4E00; text-align: center; padding: 10px 16px; font-weight: 600; font-size: 14px; border-bottom: 1px solid #F2DE9C; }
.preview-bar a { text-decoration: underline; margin-left: 8px; }

@media (max-width: 640px) {
  .cp-nav, .container, .cp-footer-inner { padding-left: 16px; padding-right: 16px; }
  .page-hero { padding: 36px 0 28px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* [latest_posts] shortcode cards (hover for non-designed pages) */
.cp-lp-card:hover { box-shadow: 0 18px 40px -20px rgba(15,31,56,0.25); transform: translateY(-2px); color: #0F1F38; }
