body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(248, 251, 255, 0.96);
  border-bottom: 1px solid rgba(217, 225, 234, 0.9);
}

.site-header-row {
  width: min(100%, 1320px);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #182230;
  font-weight: 800;
  flex-shrink: 0;
}

.site-brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2363eb, #174cc0);
  color: white;
  font-size: 0.95rem;
}

.site-brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.site-brand-copy small {
  color: #5c6b7a;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Search in header ÃƒÆ’Ã†â€™Ãƒâ€šÃ‚Â¢ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã…Â¡Ãƒâ€šÃ‚Â¬ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬Ãƒâ€šÃ‚Â icon-only, expands on click */
.site-search-box {
  position: relative;
  margin-left: auto;
}

.site-search-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: #f3f4f6;
  cursor: pointer;
  font-size: 1.2rem;
  color: #5c6b7a;
  transition: background 0.15s;
}

.site-search-toggle:hover {
  background: #e5e7eb;
}

.site-search-input-wrap {
  display: none;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 320px;
  z-index: 10;
}

.site-search-box.is-open .site-search-input-wrap {
  display: block;
}

.site-search-box.is-open .site-search-toggle {
  display: none;
}

.site-search-input {
  width: 100%;
  border: 1px solid #2363eb;
  border-radius: 999px;
  padding: 9px 38px 9px 16px;
  background: #fff;
  box-shadow: 0 4px 20px rgba(18, 38, 63, 0.12);
  color: #182230;
  font-size: 0.9rem;
}

.site-search-input:focus {
  outline: none;
}

.site-search-close {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.site-search-close:hover {
  background: #f3f4f6;
  color: #374151;
}

.site-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 50;
  display: grid;
  gap: 4px;
  max-height: min(64vh, 420px);
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(217, 225, 234, 0.96);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(18, 38, 63, 0.16);
}

.site-search-result {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 12px;
  text-decoration: none;
  color: #182230;
}

.site-search-result:hover,
.site-search-result.is-active {
  background: #eaf1ff;
}

.site-search-result-type {
  width: fit-content;
  border-radius: 999px;
  padding: 2px 8px;
  background: #eef3f8;
  color: #174cc0;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.site-search-result strong {
  font-size: 0.9rem;
}

.site-search-result small,
.site-search-empty {
  margin: 0;
  color: #5c6b7a;
  font-size: 0.8rem;
  line-height: 1.35;
}

.site-search-empty {
  padding: 8px 10px;
}

/* Breadcrumb navigation */
.site-nav {
  width: min(100%, 1320px);
  margin: 0 auto;
  padding: 0 20px 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  font-size: 0.82rem;
}

.site-nav a {
  text-decoration: none;
  color: #5c6b7a;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.site-nav a:hover {
  color: #182230;
  background: #f3f4f6;
}

.site-nav a.active {
  color: #182230;
  background: #eaf1ff;
}

.nav-sep {
  color: #d1d5db;
  user-select: none;
}

/* Mobile */
@media (max-width: 720px) {
  .site-header-row {
    padding: 8px 14px;
    gap: 8px;
  }

  .site-brand-copy small {
    display: none;
  }

  .site-brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-size: 0.8rem;
  }

  .site-brand-copy span {
    font-size: 0.88rem;
  }

  .site-search-box {
    margin-left: auto;
    flex-shrink: 0;
  }

  .site-search-input-wrap {
    width: 260px;
  }

  .site-nav {
    padding: 4px 14px 8px;
    font-size: 0.72rem;
    overflow-x: auto !important;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    gap: 2px;
    display: flex;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .site-nav a {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 4px 7px;
    font-size: 0.72rem;
  }

  .nav-sep {
    flex-shrink: 0;
    font-size: 0.65rem;
    padding: 0 1px;
  }
}

@media (max-width: 380px) {
  .site-header-row {
    padding: 8px 12px;
    gap: 8px;
  }

  .site-brand {
    flex-shrink: 0;
  }

  .site-brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-size: 0.8rem;
  }

  .site-brand-copy span {
    font-size: 0.85rem;
  }

  .site-search-box {
    flex: 1;
    min-width: 0;
  }

  .site-search-input {
    padding: 8px 32px 8px 12px;
    font-size: 0.82rem;
  }

  .site-nav {
    padding: 0 12px 8px;
    font-size: 0.72rem;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .site-nav a {
    padding: 2px 6px;
    flex-shrink: 0;
  }

  .nav-sep {
    flex-shrink: 0;
  }
}

/* Page layout */
.page {
  width: min(100%, 1320px);
  margin: 0 auto;
  padding: 24px 20px 40px;
}

/* Hero section */
.hero {
  text-align: center;
  margin-bottom: 20px;
}

.hero-copy {
  max-width: 720px;
  margin: 0 auto;
}

.hero .eyebrow {
  color: #2363eb;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.hero h1 {
  font-size: 2rem;
  font-weight: 800;
  color: #182230;
  margin: 0 0 8px;
  line-height: 1.2;
}

.hero .subcopy {
  color: #5c6b7a;
  font-size: 1.05rem;
  margin: 0;
}

/* Blog layout */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}

.blog-layout.hero {
  margin-top: 0;
}

.blog-article {
  padding: 28px 32px;
  font-size: 0.95rem;
  line-height: 1.7;
  overflow-x: hidden;
  max-width: 100%;
}

.blog-article table {
  max-width: 100%;
}

.blog-article img {
  max-width: 100%;
  height: auto;
}

.blog-article pre,
.blog-article code {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.blog-sidebar {
  padding: 24px;
  position: sticky;
  top: 120px;
}

@media (max-width: 860px) {
  .blog-layout {
    grid-template-columns: 1fr;
  }

  .blog-sidebar {
    position: static;
  }

  .blog-article {
    padding: 20px;
  }
}

/* Calculator card */
.calculator-card {
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 4px 20px rgba(18, 38, 63, 0.06);
  border: 1px solid rgba(217, 225, 234, 0.5);
}

/* Breadcrumbs in blog posts */
.breadcrumbs {
  padding: 0 0 12px;
}

.breadcrumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 0.82rem;
}

.breadcrumbs a {
  text-decoration: none;
  color: #5c6b7a;
  font-weight: 600;
}

.breadcrumbs a:hover {
  color: #2363eb;
}

.breadcrumbs li::after {
  content: '/';
  color: #d1d5db;
  margin: 0 6px;
}

.breadcrumbs li:last-child::after {
  content: '';
}

.breadcrumbs li[aria-current="page"] {
  color: #182230;
  font-weight: 700;
}

/* Post meta */
.post-meta {
  color: #9ca3af;
  font-size: 0.84rem;
  margin-bottom: 16px;
}

/* Quick answer */
.quick-answer {
  background: #f0fdf4;
  border-left: 4px solid #0d9488;
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 24px;
}

.quick-answer h2 {
  margin-top: 0;
  font-size: 1.1rem;
  color: #0d9488;
}

/* FAQ blocks */
.faq-block {
  margin-top: 24px;
}

.faq-block details {
  margin-bottom: 8px;
}

.faq-block summary {
  font-weight: 600;
  cursor: pointer;
  padding: 8px 0;
}

/* CTA */
.blog-cta {
  background: #eff6ff;
  padding: 20px;
  border-radius: 16px;
  margin: 20px 0;
}

/* Headings */
.blog-article h2 {
  font-size: 1.3rem;
  color: #182230;
  margin-top: 28px;
  margin-bottom: 10px;
}

.blog-article h3 {
  font-size: 1.1rem;
  color: #182230;
  margin-top: 20px;
}

.blog-article p {
  margin-bottom: 14px;
}

.blog-article ul {
  padding-left: 24px;
  margin-bottom: 14px;
}

.blog-article li {
  margin-bottom: 6px;
}

.blog-article code {
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

/* Hero image */
.hero-image {
  margin: 0 auto;
  max-width: 1000px;
  padding: 0 20px 8px;
}

.hero-image img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  display: block;
}

/* Buttons */
.primary-btn {
  display: inline-block;
  background: #2363eb;
  color: #fff;
  padding: 10px 20px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  transition: background 0.2s;
}

.primary-btn:hover {
  background: #174cc0;
}

.secondary-btn {
  display: inline-block;
  background: #fff;
  color: #2363eb;
  border: 2px solid #2363eb;
  padding: 10px 20px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  transition: background 0.2s, color 0.2s;
}

.secondary-btn:hover {
  background: #2363eb;
  color: #fff;
}

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

/* Author profile */
.author-profile {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

.author-headshot {
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}

.author-bio {
  font-size: 0.9rem;
  color: #5c6b7a;
  line-height: 1.65;
}

.author-bio p {
  margin-bottom: 10px;
}

.author-bio p:last-child {
  margin-bottom: 0;
}

@media (max-width: 600px) {
  .author-profile {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* Terms page */
.terms-list {
  font-size: 0.92rem;
  color: #5c6b7a;
  line-height: 1.65;
}

.terms-list h2 {
  font-size: 1.05rem;
  color: #182230;
  margin-top: 20px;
  margin-bottom: 8px;
}

.terms-list p {
  margin-bottom: 10px;
  max-width: 100%;
}

/* Card header */
.card-header {
  margin-bottom: 12px;
}

.card-header h2 {
  font-size: 1.1rem;
  margin: 0 0 4px;
}

.card-header p {
  color: #5c6b7a;
  font-size: 0.85rem;
  margin: 0;
}

/* Resource links */
.resource-links {
  display: grid;
  gap: 8px;
}

.resource-links a {
  display: block;
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  color: #182230;
  font-weight: 600;
  font-size: 0.88rem;
  background: #f8fbff;
  border: 1px solid #e5e7eb;
  transition: border-color 0.15s;
}

.resource-links a:hover {
  border-color: #2363eb;
}

/* Mobile blog fixes */
@media (max-width: 720px) {
  .blog-article {
    padding: 16px;
    border-radius: 20px;
  }
  .blog-article table {
    font-size: 0.78rem;
  }
  .blog-article h2 {
    font-size: 1.15rem;
  }
  .hero-image {
    padding: 0 0 8px;
  }
}
/* Mobile image fix */
@media (max-width: 720px) {
  .hero-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .blog-article table {
    width: 100% !important;
    max-width: 100% !important;
  }
}
/* Global mobile width protection */
@media (max-width: 720px) {
  body {
    overflow-x: hidden;
  }
  .page {
    overflow-x: hidden;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .calculator-card {
    max-width: 100% !important;
  }
  .hero-copy {
    max-width: 100% !important;
    padding-left: 16px;
    padding-right: 16px;
  }
  .blog-layout {
    max-width: 100% !important;
    overflow-x: hidden;
  }
  .blog-article {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .blog-sidebar {
    max-width: 100% !important;
  }
}
/* Blog content left-aligned (consistent with homepage) */
.blog-layout .hero {
  text-align: left;
}
.blog-layout .hero-copy {
  max-width: none;
  margin: 0;
  text-align: left;
}
.blog-article {
  text-align: left;
}
/* Homepage hero card */
.hero-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 4px 20px rgba(18, 38, 63, 0.06);
  border: 1px solid rgba(217, 225, 234, 0.5);
  overflow: hidden;
  margin-bottom: 24px;
  max-width: min(100%, 1320px);
  margin-left: auto;
  margin-right: auto;
}
.hero-card-text {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-card-text h1 {
  font-size: 2rem;
  font-weight: 800;
  color: #182230;
  margin: 0 0 12px;
  line-height: 1.15;
}
.hero-card-sub {
  font-size: 1.05rem;
  color: #5c6b7a;
  margin: 0 0 20px;
  line-height: 1.55;
}
.hero-card-text .primary-btn {
  align-self: flex-start;
  margin-bottom: 24px;
  font-size: 0.95rem;
  padding: 12px 24px;
}
.hero-features {
  display: grid;
  gap: 12px;
}
.hero-feature h3 {
  font-size: 0.92rem;
  font-weight: 700;
  color: #182230;
  margin: 0 0 4px;
}
.hero-feature p {
  font-size: 0.84rem;
  color: #5c6b7a;
  margin: 0;
  line-height: 1.5;
}
.hero-card-image {
  background: #f5f0e8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.hero-card-image img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

@media (max-width: 860px) {
  .hero-card {
    grid-template-columns: 1fr;
  }
  .hero-card-image {
    order: -1;
    padding: 20px;
    max-height: 280px;
    overflow: hidden;
  }
  .hero-card-image img {
    max-height: 240px;
    object-fit: cover;
    border-radius: 12px;
  }
  .hero-card-text {
    padding: 24px 20px;
  }
  .hero-card-text h1 {
    font-size: 1.5rem;
  }
}