/* CALULER-WEBSITE-MASTER-DESIGN-V1-START
   Shared site-wide visual layer based on the approved EMI & Loan Amortization page.
   Layout, fields, formulas, diagrams, result content, SEO and page copy remain page-specific.
*/

:root {
  --caluler-master-blue: #116F9F;
  --caluler-master-blue-deep: #0B537E;
  --caluler-master-cyan: #58D9FF;
  --caluler-master-result-light: #EFF5F9;
  --caluler-master-result-dark: #10283A;
  --caluler-master-card-radius: 24px;
  --caluler-master-control-radius: 16px;
  --caluler-master-font: Arial, Helvetica, sans-serif;
}

/* Shared typography and page surfaces. */
html body {
  font-family: var(--caluler-master-font) !important;
  text-rendering: optimizeLegibility;
}

html body[data-caluler-category] {
  background: var(--bg, #F8FAFC) !important;
  color: var(--text, #0F172A) !important;
}

/* Header: brand gradient in Light Mode, deep navy surface in Dark Mode. */
html body > nav.nav {
  background: linear-gradient(100deg, #0B537E 0%, #116F9F 100%) !important;
  color: #FFFFFF !important;
  border-bottom: 1px solid rgba(255,255,255,.18) !important;
}

html body > nav.nav .nav-inner,
html body > nav.nav .nav-inner a,
html body > nav.nav .nav-inner button,
html body > nav.nav .nav-inner .caluler-primary-nav,
html body > nav.nav .nav-inner .caluler-primary-nav a {
  color: #FFFFFF;
}

html[data-theme="dark"] body > nav.nav,
html.dark-mode body > nav.nav,
body.dark-mode > nav.nav {
  background: #111C2E !important;
  border-bottom-color: #29384E !important;
}

/* Page hero: same clean H1 + description pattern on every tool page. */
html body[data-caluler-category] .page-hero {
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 20px 0 12px !important;
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--text, #0F172A) !important;
}

html body[data-caluler-category] .page-hero h1 {
  display: flex !important;
  align-items: flex-start !important;
  gap: 12px !important;
  margin: 0 0 8px !important;
  color: var(--text, #0F172A) !important;
  font-family: var(--caluler-master-font) !important;
  font-size: clamp(30px, 2.35vw, 40px) !important;
  font-weight: 700 !important;
  line-height: 1.16 !important;
  letter-spacing: -0.02em !important;
  overflow-wrap: anywhere !important;
}

html body[data-caluler-category] .page-hero h1 .caluler-page-title-icon {
  display: inline-flex !important;
  flex: 0 0 36px !important;
  align-items: center !important;
  justify-content: center !important;
  width: 36px !important;
  height: 36px !important;
  margin: 3px 0 0 !important;
  color: var(--caluler-master-blue) !important;
}

html body[data-caluler-category] .page-hero h1 .caluler-page-title-icon svg {
  display: block !important;
  width: 36px !important;
  height: 36px !important;
  stroke: currentColor !important;
}

html body[data-caluler-category] .page-hero p {
  max-width: 940px !important;
  margin: 0 !important;
  color: var(--muted, #64748B) !important;
  font-family: var(--caluler-master-font) !important;
  font-size: 17px !important;
  font-weight: 400 !important;
  line-height: 1.65 !important;
}

html[data-theme="dark"] body[data-caluler-category] .page-hero h1,
html.dark-mode body[data-caluler-category] .page-hero h1,
body.dark-mode[data-caluler-category] .page-hero h1 {
  color: #F1F5F9 !important;
}

html[data-theme="dark"] body[data-caluler-category] .page-hero h1 .caluler-page-title-icon,
html.dark-mode body[data-caluler-category] .page-hero h1 .caluler-page-title-icon,
body.dark-mode[data-caluler-category] .page-hero h1 .caluler-page-title-icon {
  color: #58D9FF !important;
}

html[data-theme="dark"] body[data-caluler-category] .page-hero p,
html.dark-mode body[data-caluler-category] .page-hero p,
body.dark-mode[data-caluler-category] .page-hero p {
  color: #A9B8CC !important;
}

/* Keep the established content-to-sidebar proportion and prevent overflow. */
html body[data-caluler-category] .tool-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 3fr) minmax(250px, 1fr) !important;
  align-items: start !important;
  gap: 24px !important;
  min-width: 0 !important;
}

html body[data-caluler-category] .tool-layout > main,
html body[data-caluler-category] .tool-layout > aside {
  min-width: 0 !important;
  max-width: 100% !important;
}

/* Main calculator surface. Page-specific grid geometry is deliberately preserved. */
html body[data-caluler-category] .calculator {
  box-sizing: border-box !important;
  min-width: 0 !important;
  max-width: 100% !important;
  padding: clamp(20px, 2.1vw, 30px) !important;
  border: 1px solid var(--border, #E2E8F0) !important;
  border-radius: var(--caluler-master-card-radius) !important;
  background: var(--card, #FFFFFF) !important;
  color: var(--text, #0F172A) !important;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .055) !important;
}

html body[data-caluler-category] .calculator h2 {
  color: var(--text, #0F172A);
  font-family: var(--caluler-master-font);
  font-weight: 700;
  letter-spacing: -.015em;
}

html body[data-caluler-category] .calculator .form-grid {
  column-gap: 18px;
  row-gap: 15px;
  align-items: start;
  min-width: 0;
}

html body[data-caluler-category] .calculator .field {
  min-width: 0;
  margin-bottom: 14px;
  gap: 8px;
}

html body[data-caluler-category] .calculator .field label {
  color: #1670A7 !important;
  font-family: var(--caluler-master-font) !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  letter-spacing: 0 !important;
}

html[data-theme="dark"] body[data-caluler-category] .calculator .field label,
html.dark-mode body[data-caluler-category] .calculator .field label,
body.dark-mode[data-caluler-category] .calculator .field label {
  color: #58D9FF !important;
}

html body[data-caluler-category] .calculator .field small,
html body[data-caluler-category] .calculator small {
  color: var(--muted, #64748B) !important;
  font-family: var(--caluler-master-font) !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1.45 !important;
}

/* Inputs: unified surfaces while excluding non-text controls and custom diagrams. */
html body[data-caluler-category] .calculator input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]),
html body[data-caluler-category] .calculator select,
html body[data-caluler-category] .calculator textarea {
  box-sizing: border-box !important;
  min-width: 0 !important;
  min-height: 52px !important;
  padding: 13px 15px !important;
  border: 1px solid #CBD5E1 !important;
  border-radius: var(--caluler-master-control-radius) !important;
  background: #FFFFFF !important;
  color: #0F172A !important;
  box-shadow: none !important;
  font-family: var(--caluler-master-font) !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
}

html body[data-caluler-category] .calculator textarea {
  min-height: 120px !important;
}

html body[data-caluler-category] .calculator input::placeholder,
html body[data-caluler-category] .calculator textarea::placeholder {
  color: #718198 !important;
  opacity: 1 !important;
}

html body[data-caluler-category] .calculator input:focus,
html body[data-caluler-category] .calculator select:focus,
html body[data-caluler-category] .calculator textarea:focus {
  border-color: #1686B5 !important;
  box-shadow: 0 0 0 3px rgba(22, 134, 181, .14) !important;
  outline: none !important;
}

html[data-theme="dark"] body[data-caluler-category] .calculator input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]),
html[data-theme="dark"] body[data-caluler-category] .calculator select,
html[data-theme="dark"] body[data-caluler-category] .calculator textarea,
html.dark-mode body[data-caluler-category] .calculator input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]),
html.dark-mode body[data-caluler-category] .calculator select,
html.dark-mode body[data-caluler-category] .calculator textarea,
body.dark-mode[data-caluler-category] .calculator input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]),
body.dark-mode[data-caluler-category] .calculator select,
body.dark-mode[data-caluler-category] .calculator textarea {
  border-color: #293F59 !important;
  background: #0B1424 !important;
  color: #E5EDF8 !important;
  color-scheme: dark;
}

html[data-theme="dark"] body[data-caluler-category] .calculator input::placeholder,
html[data-theme="dark"] body[data-caluler-category] .calculator textarea::placeholder,
html.dark-mode body[data-caluler-category] .calculator input::placeholder,
html.dark-mode body[data-caluler-category] .calculator textarea::placeholder,
body.dark-mode[data-caluler-category] .calculator input::placeholder,
body.dark-mode[data-caluler-category] .calculator textarea::placeholder {
  color: #8295AD !important;
}

/* Calculation controls keep their page-specific widths and behaviors. */
html body[data-caluler-category] .calculator button.btn,
html body[data-caluler-category] .calculator input.btn,
html body[data-caluler-category] .calculator button[type="submit"] {
  border-radius: 14px !important;
  font-family: var(--caluler-master-font) !important;
  font-weight: 650 !important;
}

/* Result surface: EMI reference colors; individual result content remains untouched. */
html body[data-caluler-category] .calculator > .result:not(.error) {
  box-sizing: border-box !important;
  min-width: 0 !important;
  max-width: 100%;
  padding: 18px 20px !important;
  border: 1px solid #E2EBF1 !important;
  border-radius: 14px !important;
  background: #EFF5F9 !important;
  color: #111111 !important;
  box-shadow: none !important;
  font-family: var(--caluler-master-font) !important;
  font-weight: 500;
  line-height: 1.55 !important;
}

html body[data-caluler-category] .calculator > .result:not(.error) .caluler-result-title {
  color: #1670A7 !important;
  font-weight: 700 !important;
}

html[data-theme="dark"] body[data-caluler-category] .calculator > .result:not(.error),
html.dark-mode body[data-caluler-category] .calculator > .result:not(.error),
body.dark-mode[data-caluler-category] .calculator > .result:not(.error) {
  border-color: #294057 !important;
  background: #10283A !important;
  color: #EAF7FF !important;
}

html[data-theme="dark"] body[data-caluler-category] .calculator > .result:not(.error) .caluler-result-title,
html.dark-mode body[data-caluler-category] .calculator > .result:not(.error) .caluler-result-title,
body.dark-mode[data-caluler-category] .calculator > .result:not(.error) .caluler-result-title {
  color: #64D9F4 !important;
}

/* Diagram wrappers retain their unique SVG, chart geometry and page-specific colors. */
html body[data-caluler-category] .finance-live-diagram,
html body[data-caluler-category] .health-tool-diagram {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  border-radius: 20px;
}

/* Content and sidebar cards use one consistent surface system. */
html body[data-caluler-category] .content-box,
html body[data-caluler-category] .sidebar-box {
  box-sizing: border-box !important;
  min-width: 0 !important;
  padding: clamp(20px, 2vw, 28px) !important;
  border: 1px solid var(--border, #E2E8F0) !important;
  border-radius: 22px !important;
  background: var(--card, #FFFFFF) !important;
  color: var(--text, #0F172A) !important;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .045) !important;
}

html body[data-caluler-category] .content-box h2,
html body[data-caluler-category] .content-box h3,
html body[data-caluler-category] .sidebar-box h2,
html body[data-caluler-category] .sidebar-box h3 {
  color: var(--text, #0F172A) !important;
  font-family: var(--caluler-master-font) !important;
  font-weight: 700 !important;
  letter-spacing: -.015em !important;
  line-height: 1.25 !important;
}

html body[data-caluler-category] .content-box p,
html body[data-caluler-category] .content-box li {
  color: var(--muted, #64748B) !important;
  font-family: var(--caluler-master-font) !important;
  font-weight: 400 !important;
  line-height: 1.75 !important;
}

html[data-theme="dark"] body[data-caluler-category] .content-box p,
html[data-theme="dark"] body[data-caluler-category] .content-box li,
html.dark-mode body[data-caluler-category] .content-box p,
html.dark-mode body[data-caluler-category] .content-box li,
body.dark-mode[data-caluler-category] .content-box p,
body.dark-mode[data-caluler-category] .content-box li {
  color: #C6D3E3 !important;
}

/* Related calculator cards. */
html body[data-caluler-category] .related {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

html body[data-caluler-category] .related a {
  display: flex !important;
  align-items: center !important;
  gap: 13px !important;
  min-width: 0 !important;
  min-height: 58px !important;
  padding: 13px 15px !important;
  border: 1px solid var(--border, #E2E8F0) !important;
  border-radius: 16px !important;
  background: #F8FAFC !important;
  color: #126A9D !important;
  font-family: var(--caluler-master-font) !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  text-decoration: none !important;
}

html body[data-caluler-category] .related a:hover {
  border-color: #9BCBE1 !important;
  background: #F0F7FB !important;
  color: #0B537E !important;
}

html body[data-caluler-category] .related-icon {
  display: inline-flex !important;
  flex: 0 0 26px !important;
  align-items: center !important;
  justify-content: center !important;
  width: 26px !important;
  height: 26px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #1686B5 !important;
}

html[data-theme="dark"] body[data-caluler-category] .related a,
html.dark-mode body[data-caluler-category] .related a,
body.dark-mode[data-caluler-category] .related a {
  border-color: #344C68 !important;
  background: #1D344E !important;
  color: #E5EDF8 !important;
}

html[data-theme="dark"] body[data-caluler-category] .related-icon,
html.dark-mode body[data-caluler-category] .related-icon,
body.dark-mode[data-caluler-category] .related-icon {
  color: #58D9FF !important;
}

/* FAQs and reference lists. */
html body[data-caluler-category] .tool-faq details,
html body[data-caluler-category] .content-box details {
  border-bottom: 1px solid var(--border, #E2E8F0);
  padding: 15px 0;
}

html body[data-caluler-category] .tool-faq summary,
html body[data-caluler-category] .content-box details summary {
  color: var(--text, #0F172A) !important;
  font-family: var(--caluler-master-font) !important;
  font-size: 17px !important;
  font-weight: 600 !important;
  line-height: 1.5 !important;
  cursor: pointer;
}

html body[data-caluler-category] .tool-faq details p,
html body[data-caluler-category] .content-box details p {
  color: var(--muted, #64748B) !important;
  line-height: 1.7 !important;
}

/* Advertisement containers: retain their current positions and dimensions. */
html body[data-caluler-category] .ad-slot,
html body[data-caluler-category] .caluler-ad-slot {
  box-sizing: border-box;
  border-color: var(--border, #E2E8F0);
  border-radius: 16px;
  color: var(--muted, #64748B);
}

/* Full-width brand footer: three reference columns, two link columns on mobile. */
html body footer.footer {
  background: linear-gradient(100deg, #0B537E 0%, #116F9F 100%) !important;
  color: #FFFFFF !important;
  border-top: 1px solid rgba(255,255,255,.18) !important;
}

html body footer.footer .footer-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, .9fr) minmax(0, .9fr) !important;
  align-items: start !important;
  gap: 36px !important;
}

html body footer.footer .footer-brand,
html body footer.footer .footer-links,
html body footer.footer .footer-bottom {
  min-width: 0 !important;
  background: transparent !important;
  border-color: rgba(255,255,255,.22) !important;
}

html body footer.footer h2,
html body footer.footer h3,
html body footer.footer p,
html body footer.footer span,
html body footer.footer strong,
html body footer.footer a,
html body footer.footer .footer-note {
  color: #FFFFFF !important;
}

html body footer.footer a:hover {
  color: #D9F2FF !important;
}

html body footer.footer .footer-social-icon {
  color: #FFFFFF !important;
}

html[data-theme="dark"] body footer.footer,
html.dark-mode body footer.footer,
body.dark-mode footer.footer {
  background: #111C2E !important;
  border-top-color: #29384E !important;
}

/* Informational pages use the same clean content card and type hierarchy. */
html body.caluler-info-page .legal-single-card,
html body.caluler-info-page .content-box,
html body.caluler-info-page .contact-form-card {
  box-sizing: border-box;
  border: 1px solid var(--border, #E2E8F0);
  border-radius: 22px;
  background: var(--card, #FFFFFF);
  color: var(--text, #0F172A);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .045);
}

/* Responsive: preserve page-specific field count but stack overall layout. */
@media (max-width: 900px) {
  html body[data-caluler-category] .tool-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 18px !important;
  }

  html body footer.footer .footer-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 24px 18px !important;
  }

  html body footer.footer .footer-brand {
    grid-column: 1 / -1 !important;
    max-width: none !important;
  }
}

@media (max-width: 640px) {
  html body[data-caluler-category] .page-hero {
    padding: 16px 0 10px !important;
  }

  html body[data-caluler-category] .page-hero h1 {
    gap: 9px !important;
    font-size: clamp(27px, 7vw, 34px) !important;
    line-height: 1.16 !important;
    letter-spacing: -.015em !important;
  }

  html body[data-caluler-category] .page-hero h1 .caluler-page-title-icon,
  html body[data-caluler-category] .page-hero h1 .caluler-page-title-icon svg {
    width: 32px !important;
    height: 32px !important;
  }

  html body[data-caluler-category] .page-hero h1 .caluler-page-title-icon {
    flex-basis: 32px !important;
    margin-top: 2px !important;
  }

  html body[data-caluler-category] .page-hero p {
    font-size: 15.5px !important;
    line-height: 1.6 !important;
  }

  html body[data-caluler-category] .calculator {
    padding: 20px !important;
    border-radius: 22px !important;
  }

  html body[data-caluler-category] .calculator > .result:not(.error) {
    padding: 16px !important;
    border-radius: 13px !important;
  }

  html body[data-caluler-category] .content-box,
  html body[data-caluler-category] .sidebar-box {
    padding: 20px !important;
    border-radius: 22px !important;
  }

  html body[data-caluler-category] .related a {
    min-height: 58px !important;
    padding: 13px 14px !important;
    font-size: 15px !important;
  }

  html body footer.footer .footer-brand {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    column-gap: 14px !important;
  }

  html body footer.footer .footer-brand-logo {
    grid-column: 1 !important;
    max-width: 180px !important;
  }

  html body footer.footer .footer-brand p {
    grid-column: 1 / -1 !important;
    margin-top: 10px !important;
  }

  html body footer.footer .footer-socials--brand {
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-content: flex-end !important;
  }

  html body footer.footer .footer-bottom {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }
}

/* CALULER-WEBSITE-MASTER-DESIGN-V1-END */

/* CALULER-WHOLE-WEBSITE-LAYOUT-CORRECTION-V2-START */
/* Reference layout: full-width calculator, related tools below it, then ad/content. */
html body[data-caluler-category] .tool-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: start !important;
    gap: 24px !important;
    width: 100% !important;
    min-width: 0 !important;
}

html body[data-caluler-category] .tool-layout > main {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

/* Runtime moves the right-side related-tools aside inside main after the calculator. */
html body[data-caluler-category] .tool-layout > main > aside {
    display: block !important;
    position: static !important;
    inset: auto !important;
    float: none !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 22px 0 0 !important;
}

html body[data-caluler-category] .tool-layout > main > aside .sidebar-box {
    position: static !important;
    inset: auto !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

/* Desktop reference: three related calculator cards on one row. */
html body[data-caluler-category] .tool-layout > main > aside .related {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    gap: 12px !important;
    width: 100% !important;
}

html body[data-caluler-category] .tool-layout > main > aside .related > a {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;
    box-sizing: border-box !important;
}

html body[data-caluler-category] .tool-layout > main > aside .related > .sidebar-browse {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    margin: 2px 0 0 !important;
}

@media (max-width: 900px) {
    html body[data-caluler-category] .tool-layout > main > aside .related {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 640px) {
    html body[data-caluler-category] .tool-layout > main > aside .related {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}
/* CALULER-WHOLE-WEBSITE-LAYOUT-CORRECTION-V2-END */
/* CALULER-RESULT-ACTIONBAR-EXACT-WIDTH-V4-START */
html body[data-caluler-category="Finance Calculators"] .caluler-result-actionbar {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
}

html body[data-caluler-category="Finance Calculators"] .caluler-result-actionbar .caluler-result-help {
    display: flex !important;
    flex: 1 1 auto !important;
    align-items: center !important;
    justify-content: flex-start !important;
    min-width: 0 !important;
}

html body[data-caluler-category="Finance Calculators"] .caluler-result-actionbar .caluler-result-tools {
    display: flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    justify-content: flex-end !important;
    width: auto !important;
    margin-left: auto !important;
}

@media (max-width: 640px) {
    html body[data-caluler-category="Finance Calculators"] .caluler-result-actionbar {
        flex-wrap: wrap !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    html body[data-caluler-category="Finance Calculators"] .caluler-result-actionbar .caluler-result-tools {
        margin-left: auto !important;
    }
}
/* CALULER-RESULT-ACTIONBAR-EXACT-WIDTH-V4-END */
/* CALULER-EMI-ACTIONBAR-DYNAMIC-V6-START */
/* JavaScript measures the actual schedule-to-action-bar distance. */
@media (min-width: 900px) {
    html body[data-caluler-category="Finance Calculators"]
    .calculator.emi-action-layout > .caluler-result-actionbar {
        position: relative !important;
        top: 0 !important;
        margin-top: 8px !important;
        margin-bottom: 0 !important;
    }
}
/* CALULER-EMI-ACTIONBAR-DYNAMIC-V6-END */
/* CALULER-GLOBAL-CALCULATOR-COMPACT-V1-START */
/* Form controls only: retain diagram/result geometry and existing column breakpoints. */
html:root body[data-caluler-category] .calculator {
  --caluler-form-label-size: 15.5px;
  --caluler-form-control-height: 46px;
  --caluler-form-pad-block: 10px;
  --caluler-form-pad-inline: 14px;
  --caluler-form-row-gap: 13px;
  --caluler-form-label-gap: 6px;
  --caluler-form-focus: var(--caluler-brand-primary);
  padding: clamp(18px, 1.8vw, 26px) !important;
}

html:root[data-theme="dark"] body[data-caluler-category] .calculator,
html:root.dark-mode body[data-caluler-category] .calculator,
html:root body.dark-mode[data-caluler-category] .calculator {
  --caluler-form-focus: var(--caluler-brand-accent);
}

html:root body[data-caluler-category] .calculator .form-grid:not(:where(.result *, [class*="diagram"] *, [role="tooltip"] *)) {
  column-gap: 16px !important;
  row-gap: var(--caluler-form-row-gap) !important;
  min-width: 0;
}

html:root body[data-caluler-category] .calculator .field:not(:where(.result *, [class*="diagram"] *, [role="tooltip"] *)) {
  gap: var(--caluler-form-label-gap) !important;
  margin-bottom: 12px !important;
  min-width: 0;
}

/* Grid gap supplies row spacing; do not add a second bottom gutter per field. */
html:root body[data-caluler-category] .calculator .form-grid .field:not(:where(.result *, [class*="diagram"] *, [role="tooltip"] *)) {
  margin-bottom: 0 !important;
}

html:root body[data-caluler-category] .calculator :where(form, .form-grid, .field) label:not(:where(.result *, [class*="diagram"] *, [role="tooltip"] *)) {
  font-size: var(--caluler-form-label-size) !important;
  line-height: 1.35 !important;
  margin: 0 !important;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Exclude native selects hidden by the existing accessible dropdown enhancer. */
html:root body[data-caluler-category] .calculator :where(form, .form-grid, .field) :is(input:not([readonly]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="hidden"]):not([type="file"]):not([type="button"]):not([type="submit"]):not([type="reset"]), select:not(.caluler-custom-select-source), .caluler-custom-select-trigger):not(:where(.result *, [class*="diagram"] *, [role="tooltip"] *)) {
  box-sizing: border-box !important;
  min-width: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  min-height: var(--caluler-form-control-height) !important;
  height: auto !important;
  padding: var(--caluler-form-pad-block) var(--caluler-compact-pad-end, var(--caluler-form-pad-inline)) var(--caluler-form-pad-block) var(--caluler-form-pad-inline) !important;
  font-size: 16px !important;
  line-height: 1.4 !important;
  -webkit-tap-highlight-color: transparent;
}

html:root body[data-caluler-category] .calculator select:not(.caluler-custom-select-source):not(:where(.result *, [class*="diagram"] *, [role="tooltip"] *)) {
  --caluler-compact-pad-end: 42px;
}

html:root body[data-caluler-category] .calculator .field[data-caluler-affix] input:not(:where(.result *, [class*="diagram"] *, [role="tooltip"] *)) {
  --caluler-compact-pad-end: 46px;
}

html:root body[data-caluler-category] .calculator .caluler-custom-select-trigger:not(:where(.result *, [class*="diagram"] *, [role="tooltip"] *)) {
  gap: 10px !important;
}

/* Keep multiline editing capacity; only compact the surrounding typography/padding. */
html:root body[data-caluler-category] .calculator :where(form, .form-grid, .field) textarea:not([readonly]):not(:where(.result *, [class*="diagram"] *, [role="tooltip"] *)) {
  box-sizing: border-box !important;
  min-width: 0 !important;
  max-width: 100% !important;
  padding: var(--caluler-form-pad-block) var(--caluler-form-pad-inline) !important;
  font-size: 16px !important;
  line-height: 1.4 !important;
  -webkit-tap-highlight-color: transparent;
}

html:root body[data-caluler-category] .calculator > button.btn:first-of-type,
html:root body[data-caluler-category] .calculator > form > button.btn:first-of-type,
html:root body[data-caluler-category="Health Calculators"] .calculator.caluler-health-layout > .caluler-health-form > button.btn:first-of-type,
html:root body[data-caluler-category] .calculator > form > input[type="submit"]:first-of-type,
html:root body[data-caluler-category] .calculator > .form-grid > button.btn,
html:root body[data-caluler-category] .calculator.emi-action-layout > .emi-action-row > #amCalculateBtn {
  min-height: var(--caluler-form-control-height) !important;
  height: auto !important;
  padding: 10px 16px !important;
  font-size: 15.5px !important;
  line-height: 1.35 !important;
  -webkit-tap-highlight-color: transparent;
}

/* An inset keyboard ring follows the existing rounded border without clipping tooltips. */
html:root body[data-caluler-category] .calculator :where(form, .form-grid, .field) :is(input:not([readonly]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="hidden"]):not([type="file"]):not([type="button"]):not([type="submit"]):not([type="reset"]), select:not(.caluler-custom-select-source), .caluler-custom-select-trigger):not(:where(.result *, [class*="diagram"] *, [role="tooltip"] *)):focus-visible,
html:root body[data-caluler-category] .calculator :where(form, .form-grid, .field) textarea:not([readonly]):not(:where(.result *, [class*="diagram"] *, [role="tooltip"] *)):focus-visible,
html:root body[data-caluler-category] .calculator > button.btn:first-of-type:focus-visible,
html:root body[data-caluler-category] .calculator > form > button.btn:first-of-type:focus-visible,
html:root body[data-caluler-category="Health Calculators"] .calculator.caluler-health-layout > .caluler-health-form > button.btn:first-of-type:focus-visible,
html:root body[data-caluler-category] .calculator > form > input[type="submit"]:first-of-type:focus-visible,
html:root body[data-caluler-category] .calculator > .form-grid > button.btn:focus-visible,
html:root body[data-caluler-category] .calculator.emi-action-layout > .emi-action-row > #amCalculateBtn:focus-visible {
  outline: 2px solid var(--caluler-form-focus) !important;
  outline-offset: -2px !important;
}

@media (max-width: 768px) {
  html:root body[data-caluler-category] .calculator {
    --caluler-form-label-size: 14.5px;
    --caluler-form-pad-block: 9px;
    --caluler-form-pad-inline: 13px;
    --caluler-form-row-gap: 12px;
    --caluler-form-label-gap: 5px;
    padding: 16px !important;
  }

  html:root body[data-caluler-category] .calculator .form-grid:not(:where(.result *, [class*="diagram"] *, [role="tooltip"] *)) {
    column-gap: 12px !important;
  }

  html:root body[data-caluler-category] .calculator > button.btn:first-of-type,
  html:root body[data-caluler-category] .calculator > form > button.btn:first-of-type,
html:root body[data-caluler-category="Health Calculators"] .calculator.caluler-health-layout > .caluler-health-form > button.btn:first-of-type,
  html:root body[data-caluler-category] .calculator > form > input[type="submit"]:first-of-type,
  html:root body[data-caluler-category] .calculator > .form-grid > button.btn,
  html:root body[data-caluler-category] .calculator.emi-action-layout > .emi-action-row > #amCalculateBtn {
    padding: 9px 14px !important;
    font-size: 16px !important;
  }
}

/* Existing Finance two-column layout starts at 1200px; never force it on stacked tools. */
@media (min-width: 1200px) {
  html:root body[data-caluler-category="Finance Calculators"] .tool-layout > main > .calculator:has(> .finance-live-diagram) > form {
    align-self: center !important;
  }

  /* EMI fields/actions share the diagram's two grid rows: center them as one group. */
  html:root[data-caluler-finance-font="true"] body[data-caluler-category="Finance Calculators"] .tool-layout > main > .calculator.emi-action-layout > .form-grid {
    align-self: end !important;
  }

  html:root[data-caluler-finance-font="true"] body[data-caluler-category="Finance Calculators"] .tool-layout > main > .calculator.emi-action-layout > .emi-action-row {
    align-self: start !important;
  }
}
/* CALULER-GLOBAL-CALCULATOR-COMPACT-V1-END */


/* CALULER-HEALTH-FINANCE-INPUT-LAYOUT-V1 */
/* Reuse the common compact control/button tokens above; only Health layout changes here. */
html:root body[data-caluler-category="Health Calculators"] .calculator.caluler-health-layout {
  display: grid !important;
  grid-template-columns: minmax(0,1fr) !important;
  grid-template-areas: "form" "diagram" "result" !important;
  align-items: start !important;
  gap: 20px !important;
}
html:root body[data-caluler-category="Health Calculators"] .calculator.caluler-health-layout > .caluler-health-form {
  grid-area: form !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  align-self: start !important;
  gap: var(--caluler-form-row-gap) !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
}
html:root body[data-caluler-category="Health Calculators"] .caluler-health-form .form-grid {
  grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  min-width: 0;
}
html:root body[data-caluler-category="Health Calculators"] .caluler-health-form > .field {
  margin-bottom: 0 !important;
}
html:root body[data-caluler-category="Health Calculators"] .calculator.caluler-health-layout > .caluler-health-form[hidden],
html:root body[data-caluler-category="Health Calculators"] .calculator.caluler-health-layout > .caluler-health-form [hidden] {
  display: none !important;
}
html:root body[data-caluler-category="Health Calculators"] .calculator.caluler-health-layout > .caluler-health-form > button.btn:first-of-type {
  display: flex !important;
  box-sizing: border-box !important;
  align-self: center !important;
  width: min(220px,100%) !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 auto !important;
}
html:root body[data-caluler-category="Health Calculators"] .calculator.caluler-health-layout > .health-tool-diagram {
  grid-area: diagram !important;
  min-width: 0 !important;
  margin: 0 !important;
}
html:root body[data-caluler-category="Health Calculators"] .calculator.caluler-health-layout > .result {
  grid-area: result !important;
  min-width: 0 !important;
  margin: 0 !important;
}
@media (min-width:1200px) {
  html:root body[data-caluler-category="Health Calculators"] .calculator.caluler-health-layout {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    grid-template-areas: "form diagram" "result result" !important;
    column-gap: 24px !important;
  }
  html:root body[data-caluler-category="Health Calculators"] .calculator.caluler-health-layout > .caluler-health-form {
    align-self: center !important;
  }
}
@media (max-width:640px) {
  html:root body[data-caluler-category="Health Calculators"] .caluler-health-form .form-grid {
    grid-template-columns: minmax(0,1fr) !important;
  }
}
/* END CALULER-HEALTH-FINANCE-INPUT-LAYOUT-V1 */


/* CALULER-HEALTH-RESULT-ACTIONS-V1 */
html:root body[data-caluler-category="Health Calculators"] .calculator {
  --caluler-health-result-bg:#EFF5F9;
  --caluler-health-result-border:#E2EBF1;
  --caluler-health-result-text:#111111;
  --caluler-health-action-ink:var(--caluler-brand-primary);
  --caluler-health-action-hover:var(--caluler-brand-secondary);
}
html:root[data-theme="dark"] body[data-caluler-category="Health Calculators"] .calculator,
html:root body.dark-mode[data-caluler-category="Health Calculators"] .calculator {
  --caluler-health-result-bg:#10283A;
  --caluler-health-result-border:#294057;
  --caluler-health-result-text:#EAF7FF;
  --caluler-health-action-ink:var(--caluler-brand-accent);
  --caluler-health-action-hover:var(--caluler-brand-accent);
}
html:root body[data-caluler-category="Health Calculators"] .calculator.caluler-health-layout:has(> .caluler-result-actionbar) {
  grid-template-areas:"form" "diagram" "result" "actions" !important;
}
html:root body[data-caluler-category="Health Calculators"] .calculator.caluler-health-layout > .result.caluler-health-result {
  box-sizing:border-box!important;
  width:100%!important;
  max-width:100%!important;
  background:var(--caluler-health-result-bg)!important;
  background-image:none!important;
  color:var(--caluler-health-result-text)!important;
  border:1px solid var(--caluler-health-result-border)!important;
  border-radius:12px!important;
  padding:18px 20px!important;
  box-shadow:none!important;
  font-size:16px!important;
  line-height:1.6!important;
  overflow-wrap:anywhere;
}
html:root body[data-caluler-category="Health Calculators"] .caluler-health-result .caluler-result-toolbar {
  display:flex!important; align-items:center!important; justify-content:space-between!important;
  flex-wrap:wrap!important; gap:8px 12px!important; width:100%!important;
  box-sizing:border-box!important; margin:0 0 12px!important; padding:0!important;
}
html:root body[data-caluler-category="Health Calculators"] .caluler-health-result .caluler-result-title {
  color:var(--caluler-health-action-ink)!important; font-size:18px!important; font-weight:650!important; line-height:1.4;
}
html:root body[data-caluler-category="Health Calculators"] .caluler-health-result .caluler-result-actions {
  display:flex!important; align-items:center!important; gap:6px!important; margin-inline-start:auto;
}
html:root body[data-caluler-category="Health Calculators"] .caluler-health-result .caluler-result-action {
  display:inline-flex!important; align-items:center!important; justify-content:center!important;
  box-sizing:border-box!important; width:36px!important; height:36px!important;
  min-width:36px!important; min-height:36px!important; margin:0!important; padding:0!important;
  border:1px solid transparent!important; border-radius:8px!important; background:transparent!important;
  color:var(--caluler-health-result-text)!important; box-shadow:none!important; cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
html:root body[data-caluler-category="Health Calculators"] .caluler-health-result .caluler-result-action > svg {
  display:block!important; width:19px!important; height:19px!important; max-width:19px!important;
}
html:root body[data-caluler-category="Health Calculators"] .caluler-health-result .caluler-result-action:disabled {
  opacity:.4; cursor:not-allowed;
}
html:root body[data-caluler-category="Health Calculators"] .caluler-health-result .caluler-result-action-status {
  flex-basis:100%; font-size:12px; line-height:1.5; color:var(--muted);
}
html:root body[data-caluler-category="Health Calculators"] .calculator.caluler-health-layout > .caluler-result-actionbar {
  grid-area:actions!important; position:relative!important; display:flex!important;
  flex-wrap:wrap!important; align-items:center!important; justify-content:space-between!important;
  width:100%!important; max-width:100%!important; min-width:0!important;
  gap:12px!important; margin:0!important; padding:0!important;
  border:0!important; background:transparent!important; box-shadow:none!important;
}
html:root body[data-caluler-category="Health Calculators"] .caluler-result-actionbar > .caluler-result-help {
  flex:1 1 220px!important; flex-wrap:wrap!important; min-width:0!important;
}
html:root body[data-caluler-category="Health Calculators"] .caluler-result-actionbar > .caluler-result-tools {
  flex:0 0 auto!important; width:auto!important; margin-inline-start:auto!important; justify-content:flex-end!important;
}
html:root body[data-caluler-category="Health Calculators"] .caluler-result-actionbar :is(.caluler-result-vote,.caluler-result-tool,.caluler-result-copy-action) {
  min-height:36px!important; box-sizing:border-box!important; border-radius:8px!important;
  color:var(--caluler-health-action-ink)!important; -webkit-tap-highlight-color:transparent;
}
html:root body[data-caluler-category="Health Calculators"] .caluler-result-actionbar .caluler-result-tool {
  width:36px!important; height:36px!important; min-width:36px!important; padding:7px!important;
}
html:root body[data-caluler-category="Health Calculators"] :is(.caluler-result-action,.caluler-result-vote,.caluler-result-tool,.caluler-result-copy-action):hover:not(:disabled) {
  color:var(--caluler-health-action-hover)!important; border-color:var(--caluler-health-action-hover)!important;
  background:color-mix(in srgb,var(--caluler-health-action-hover) 8%,transparent)!important;
}
html:root body[data-caluler-category="Health Calculators"] :is(.caluler-result-action,.caluler-result-vote,.caluler-result-tool,.caluler-result-copy-action):focus-visible {
  outline:2px solid var(--caluler-health-action-ink)!important; outline-offset:-2px!important;
}
html:root body[data-caluler-category="Health Calculators"] .caluler-result-vote[aria-pressed="true"] {
  color:var(--caluler-health-action-ink)!important; border-color:var(--caluler-health-action-ink)!important;
  background:color-mix(in srgb,var(--caluler-health-action-ink) 14%,var(--card))!important;
}
html:root body[data-caluler-category="Health Calculators"] .caluler-result-actionbar .caluler-result-popover {
  position:relative!important; inset:auto!important; flex-basis:100%; box-sizing:border-box!important;
  width:100%!important; max-width:100%!important; margin:0!important;
}
html:root body[data-caluler-category="Health Calculators"] .caluler-result-popover[hidden] { display:none!important; }
html:root body[data-caluler-category="Health Calculators"] .caluler-result-popover textarea {
  width:100%!important; max-width:100%!important; box-sizing:border-box!important;
}
html:root body[data-caluler-category="Health Calculators"] .caluler-result-popover-title,
html:root body[data-caluler-category="Health Calculators"] .caluler-result-popover a {
  color:var(--caluler-health-action-ink)!important;
}
@media(min-width:1200px) {
  html:root body[data-caluler-category="Health Calculators"] .calculator.caluler-health-layout:has(> .caluler-result-actionbar) {
    grid-template-areas:"form diagram" "result result" "actions actions"!important;
  }
  /* Match Finance Result/action width; leave the right quarter empty. */
  html:root body[data-caluler-category="Health Calculators"] .calculator.caluler-health-layout > .result.caluler-health-result,
  html:root body[data-caluler-category="Health Calculators"] .calculator.caluler-health-layout > .caluler-result-actionbar {
    width:75%!important;
    max-width:100%!important;
    box-sizing:border-box!important;
    justify-self:start!important;
  }
}
@media(max-width:640px) {
  html:root body[data-caluler-category="Health Calculators"] .calculator.caluler-health-layout > .result.caluler-health-result { padding:14px!important; }
  html:root body[data-caluler-category="Health Calculators"] .caluler-result-actionbar > .caluler-result-help { flex-basis:100%!important; }
  html:root body[data-caluler-category="Health Calculators"] :is(.caluler-result-action,.caluler-result-vote,.caluler-result-tool,.caluler-result-copy-action) {
    min-width:44px!important; min-height:44px!important;
  }
  html:root body[data-caluler-category="Health Calculators"] .caluler-result-actionbar .caluler-result-tool { width:44px!important; height:44px!important; }
}
@media print {
  body.caluler-health-printing[data-caluler-category="Health Calculators"] > :not(.caluler-result-print-root) { display:none!important; }
  body.caluler-health-printing[data-caluler-category="Health Calculators"] > .caluler-result-print-root {
    display:block!important; visibility:visible!important; width:100%!important; position:static!important;
    margin:0!important; padding:0!important; color:#111111!important; background:#FFFFFF!important;
  }
  body.caluler-health-printing[data-caluler-category="Health Calculators"] .caluler-result-print-root * {
    visibility:visible!important; color:#111111!important; background:#FFFFFF!important; box-shadow:none!important;
  }
  body.caluler-health-printing[data-caluler-category="Health Calculators"] .caluler-result-print-root .result {
    display:block!important; width:100%!important; margin:0!important; padding:0!important; border:0!important;
  }
}
/* END CALULER-HEALTH-RESULT-ACTIONS-V1 */

/* CALULER-GLOBAL-RESULT-ACTIONS-V1: existing Finance/Health controls keep their styles. */
html:root body[data-caluler-category] .caluler-standard-result-actions {
  --caluler-result-action-ink:var(--caluler-brand-primary);
  --caluler-result-action-hover:var(--caluler-brand-secondary);
}
html:root[data-theme="dark"] body .caluler-standard-result-actions,
html:root body.dark-mode .caluler-standard-result-actions {
  --caluler-result-action-ink:var(--caluler-brand-accent);
  --caluler-result-action-hover:var(--caluler-brand-accent);
}
html:root body .caluler-standard-result-actions .caluler-result-toolbar {
  display:flex!important; align-items:center!important; justify-content:space-between!important;
  flex-wrap:wrap!important; gap:8px 12px!important; width:100%!important;
  box-sizing:border-box!important; margin:0 0 12px!important; padding:0!important;
}
html:root body .caluler-standard-result-actions .caluler-result-title {
  color:var(--caluler-result-action-ink)!important; font-size:18px!important; font-weight:650!important; line-height:1.4;
}
html:root body .caluler-standard-result-actions .caluler-result-actions {
  display:flex!important; align-items:center!important; gap:6px!important; margin-inline-start:auto;
}
html:root body .caluler-standard-result-actions .caluler-result-action {
  display:inline-flex!important; align-items:center!important; justify-content:center!important;
  box-sizing:border-box!important; width:36px!important; height:36px!important;
  min-width:36px!important; min-height:36px!important; margin:0!important; padding:0!important;
  border:1px solid transparent!important; border-radius:8px!important; background:transparent!important;
  color:var(--caluler-result-action-ink)!important; box-shadow:none!important; cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
html:root body .caluler-standard-result-actions .caluler-result-action > svg { display:block!important; width:19px!important; height:19px!important; }
html:root body .caluler-standard-result-actions .caluler-result-action:disabled { opacity:.4; cursor:not-allowed; }
html:root body .caluler-standard-result-actions .caluler-result-action:hover:not(:disabled) {
  color:var(--caluler-result-action-hover)!important; border-color:var(--caluler-result-action-hover)!important;
  background:color-mix(in srgb,var(--caluler-result-action-hover) 8%,transparent)!important;
}
html:root body .caluler-standard-result-actions .caluler-result-action:focus-visible {
  outline:2px solid var(--caluler-result-action-ink)!important; outline-offset:-2px!important;
}
html:root body .caluler-standard-result-actions .caluler-result-action-status { flex-basis:100%; font-size:12px; line-height:1.5; color:var(--muted); }
@media(max-width:640px) {
  html:root body .caluler-standard-result-actions .caluler-result-action { width:44px!important; height:44px!important; min-width:44px!important; min-height:44px!important; }
}
@media print {
  body.caluler-result-printing > :not(.caluler-result-print-root) { display:none!important; }
  body.caluler-result-printing > .caluler-result-print-root {
    display:block!important; width:100%!important; position:static!important; margin:0!important; padding:0!important;
  }
  body.caluler-result-printing .caluler-result-print-root * {
    visibility:visible!important; color:#111111!important; background:#FFFFFF!important; box-shadow:none!important; text-shadow:none!important;
  }
  body.caluler-result-printing .caluler-result-print-root .result {
    display:block!important; width:100%!important; min-width:0!important; max-width:100%!important; margin:0!important; padding:0!important; border:0!important;
  }
}
/* END CALULER-GLOBAL-RESULT-ACTIONS-V1 */

/* CALULER-TOOL-HERO-AD-LAYOUT-V1: scoped to the top hero, not calculator/result/ad sidebars. */
html:root body[data-caluler-category] .page-hero.caluler-hero-has-ad > .container.caluler-hero-ad-layout {
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  align-items:center!important;
  gap:16px 24px!important;
}
html:root body[data-caluler-category] .caluler-hero-ad-layout > .caluler-hero-copy {
  grid-column:1; grid-row:1; min-width:0; max-width:100%; overflow-wrap:anywhere;
}
html:root body[data-caluler-category] .caluler-hero-ad-layout > .caluler-hero-ad-space {
  grid-column:2; grid-row:1; justify-self:stretch; align-self:center;
  box-sizing:border-box!important; width:100%!important; min-width:0!important; max-width:100%!important;
  height:auto!important; min-height:90px!important; max-height:none!important;
  margin:0!important; padding:12px!important;
}
html:root body[data-caluler-category] .page-hero.caluler-hero-has-ad + section.section {
  padding-top:0!important; margin-top:0!important;
}
/* Reuse the site's 900px content-layout breakpoint for tablet/mobile stacking. */
@media(max-width:900px) {
  html:root body[data-caluler-category] .page-hero.caluler-hero-has-ad > .container.caluler-hero-ad-layout {
    grid-template-columns:minmax(0,1fr)!important;
  }
  html:root body[data-caluler-category] .caluler-hero-ad-layout > .caluler-hero-ad-space {
    grid-column:1; grid-row:2;
  }
}
@media(max-width:640px) {
  html:root body[data-caluler-category] .caluler-hero-ad-layout > .caluler-hero-ad-space {
    min-height:64px!important; padding:8px!important;
  }
}
/* END CALULER-TOOL-HERO-AD-LAYOUT-V1 */

/* CALULER-GLOBAL-RESULT-FEEDBACK-V1: missing categories reuse the Finance component. */
html:root body[data-caluler-category] .calculator.caluler-standard-feedback-layout {
  --caluler-feedback-ink:var(--caluler-brand-primary);
  --caluler-feedback-hover:var(--caluler-brand-secondary);
}
html:root[data-theme="dark"] body .calculator.caluler-standard-feedback-layout,
html:root body.dark-mode .calculator.caluler-standard-feedback-layout {
  --caluler-feedback-ink:var(--caluler-brand-accent);
  --caluler-feedback-hover:var(--caluler-brand-accent);
}
html:root body[data-caluler-category] .calculator.caluler-standard-feedback-layout > .result,
html:root body[data-caluler-category] .calculator.caluler-standard-feedback-layout > .caluler-result-actionbar {
  box-sizing:border-box!important; width:100%!important; min-width:0!important; max-width:100%!important;
  margin-inline:0!important; justify-self:start!important; grid-column:1 / -1;
}
html:root body .calculator.caluler-standard-feedback-layout > .caluler-result-actionbar {
  display:flex!important; align-items:center!important; justify-content:space-between!important;
  flex-wrap:wrap!important; gap:12px!important; margin-block:8px 6px!important; padding:0!important;
}
html:root body .caluler-standard-feedback-layout .caluler-result-actionbar > .caluler-result-help {
  flex:1 1 220px!important; flex-wrap:wrap!important; min-width:0!important; width:auto!important;
}
html:root body .caluler-standard-feedback-layout .caluler-result-actionbar > .caluler-result-tools {
  flex:0 0 auto!important; width:auto!important; margin-inline-start:auto!important; justify-content:flex-end!important;
}
html:root body .caluler-standard-feedback-layout .caluler-result-actionbar :is(.caluler-result-vote,.caluler-result-tool,.caluler-result-copy-action) {
  box-sizing:border-box!important; border-radius:8px!important; color:var(--caluler-feedback-ink)!important;
  -webkit-tap-highlight-color:transparent;
}
html:root body .caluler-standard-feedback-layout .caluler-result-actionbar :is(.caluler-result-vote,.caluler-result-tool,.caluler-result-copy-action):hover {
  color:var(--caluler-feedback-hover)!important; border-color:var(--caluler-feedback-hover)!important;
  background:color-mix(in srgb,var(--caluler-feedback-hover) 8%,var(--card))!important;
}
html:root body .caluler-standard-feedback-layout .caluler-result-actionbar :is(.caluler-result-vote,.caluler-result-tool,.caluler-result-copy-action):focus-visible {
  outline:2px solid var(--caluler-feedback-ink)!important; outline-offset:-2px!important;
}
html:root body .caluler-standard-feedback-layout .caluler-result-vote[aria-pressed="true"] {
  color:var(--caluler-feedback-ink)!important; border-color:var(--caluler-feedback-ink)!important;
  background:color-mix(in srgb,var(--caluler-feedback-ink) 14%,var(--card))!important;
}
html:root body .caluler-standard-feedback-layout .caluler-result-thanks { white-space:normal!important; }
html:root body .caluler-standard-feedback-layout .caluler-result-actionbar .caluler-result-popover {
  position:relative!important; inset:auto!important; flex-basis:100%; box-sizing:border-box!important;
  width:100%!important; max-width:100%!important; margin:0!important; overflow-wrap:anywhere;
}
html:root body .caluler-standard-feedback-layout .caluler-result-popover textarea { width:100%!important; max-width:100%!important; box-sizing:border-box!important; }
html:root body .caluler-standard-feedback-layout .caluler-result-popover-title,
html:root body .caluler-standard-feedback-layout .caluler-result-popover a { color:var(--caluler-feedback-ink)!important; }
@media(min-width:1200px) {
  html:root body[data-caluler-category] .calculator.caluler-standard-feedback-layout > .result,
  html:root body[data-caluler-category] .calculator.caluler-standard-feedback-layout > .caluler-result-actionbar { width:75%!important; }
}
@media(max-width:640px) {
  html:root body .caluler-standard-feedback-layout .caluler-result-actionbar > .caluler-result-help { flex-basis:100%!important; }
  html:root body .caluler-standard-feedback-layout .caluler-result-actionbar :is(.caluler-result-vote,.caluler-result-tool,.caluler-result-copy-action) { min-width:44px!important; min-height:44px!important; }
  html:root body .caluler-standard-feedback-layout .caluler-result-actionbar .caluler-result-tools .caluler-result-tool {
    flex-basis:44px!important; width:44px!important; height:44px!important; max-width:44px!important; max-height:44px!important;
  }
}
/* END CALULER-GLOBAL-RESULT-FEEDBACK-V1 */

/* CALULER-RELATED-TOOLS-UI-V1: only marked Related Tools sections. */
html:root body[data-caluler-category] .sidebar-box.caluler-related-tools {
  --caluler-related-accent:var(--caluler-brand-primary);
  --caluler-related-lift:-2px;
  --caluler-related-nudge:2px;
  --caluler-related-press:1px;
  --caluler-related-duration:200ms;
  padding:18px!important; border-radius:16px!important;
}
html:root:is([data-theme="dark"],.dark-mode) body[data-caluler-category] .caluler-related-tools,
html:root body.dark-mode[data-caluler-category] .caluler-related-tools {
  --caluler-related-accent:var(--caluler-brand-accent);
}
html:root body[data-caluler-category] .caluler-master-related-panel:has(> .caluler-related-tools) { margin-top:16px!important; }
html:root body[data-caluler-category] .caluler-related-tools > .caluler-related-header {
  display:flex!important; align-items:center!important; justify-content:space-between!important;
  flex-wrap:wrap; gap:12px; margin:0 0 12px;
}
html:root body[data-caluler-category] .caluler-related-tools .caluler-related-heading {
  min-width:0; margin:0!important; font-size:20px!important; line-height:1.3!important;
}
html:root body[data-caluler-category] .caluler-related-tools .caluler-related-browse {
  display:inline-flex!important; align-items:center; justify-content:center; gap:8px;
  box-sizing:border-box; min-height:44px; min-width:0; max-width:100%; padding:9px 14px;
  border:1px solid transparent; border-radius:10px; background:var(--caluler-brand-primary)!important;
  color:#FFFFFF!important; font:600 14px/1.3 var(--caluler-master-font); text-decoration:none!important;
  text-align:center; overflow-wrap:anywhere; -webkit-tap-highlight-color:transparent;
  transition:background-color var(--caluler-related-duration) ease,box-shadow var(--caluler-related-duration) ease,transform var(--caluler-related-duration) ease;
}
/* Keep filled Browse foreground independent of legacy blue link-state colors. */
html:root body[data-caluler-category] .sidebar-box.caluler-related-tools > .caluler-related-header > a.caluler-related-browse:is(:link,:visited,:hover,:focus,:focus-visible,:active) {
  color:#FFFFFF!important;
}
html:root body[data-caluler-category] .caluler-related-tools .caluler-related-browse > :is(span,svg.caluler-related-browse-icon) {
  color:#FFFFFF;
}
html:root body[data-caluler-category] .caluler-related-tools .caluler-related-browse:hover {
  background:color-mix(in srgb,var(--caluler-brand-secondary) 80%,#000000)!important;
  box-shadow:0 4px 12px rgba(0,0,0,.14);
}
html:root body[data-caluler-category] .caluler-related-tools .caluler-related-browse:focus-visible {
  outline:2px solid var(--caluler-related-accent); outline-offset:3px;
}
html:root body[data-caluler-category] .caluler-related-tools .caluler-related-browse:active {
  transform:translateY(var(--caluler-related-press)); box-shadow:inset 0 2px 4px rgba(0,0,0,.16);
}
html:root body[data-caluler-category] .caluler-related-tools .caluler-related-browse-icon {
  display:block; flex:0 0 16px; width:16px; height:16px;
}
html:root body[data-caluler-category] .caluler-related-tools > .related {
  display:grid!important; grid-template-columns:repeat(3,minmax(0,1fr))!important;
  grid-auto-rows:1fr; align-items:stretch!important; gap:10px!important;
  width:100%!important; min-width:0!important;
}
html:root body[data-caluler-category] .caluler-related-tools .related > a.caluler-related-card {
  display:grid!important; grid-template-columns:32px minmax(0,1fr) 16px;
  align-items:center!important; gap:10px!important; box-sizing:border-box;
  width:100%!important; min-width:0!important; max-width:100%; min-height:56px!important;
  margin:0!important; padding:10px 12px!important; border:1px solid var(--border)!important;
  border-radius:12px!important; background:var(--card)!important; color:var(--text)!important;
  font-size:14px!important; line-height:1.4!important; text-decoration:none!important;
  -webkit-tap-highlight-color:transparent;
  transition:transform var(--caluler-related-duration) ease,border-color var(--caluler-related-duration) ease,background-color var(--caluler-related-duration) ease,box-shadow var(--caluler-related-duration) ease;
}
html:root body[data-caluler-category] .caluler-related-tools .related > a.caluler-related-card:is(:hover,:focus-visible) {
  border-color:var(--caluler-related-accent)!important;
  background:color-mix(in srgb,var(--caluler-related-accent) 7%,var(--card))!important;
  color:var(--text)!important; transform:translateY(var(--caluler-related-lift)); box-shadow:0 5px 14px rgba(0,0,0,.10);
}
html:root body[data-caluler-category] .caluler-related-tools .related > a.caluler-related-card:focus-visible {
  outline:2px solid var(--caluler-related-accent); outline-offset:-2px;
}
html:root body[data-caluler-category] .caluler-related-tools .related > a.caluler-related-card:active {
  transform:translateY(0); background:color-mix(in srgb,var(--caluler-related-accent) 12%,var(--card))!important;
}
html:root body[data-caluler-category] .caluler-related-tools .caluler-related-name {
  min-width:0; white-space:normal; overflow-wrap:anywhere;
}
html:root body[data-caluler-category] .caluler-related-tools .related > a.caluler-related-card > .related-icon {
  display:inline-flex!important; align-items:center!important; justify-content:center!important;
  box-sizing:border-box; flex:0 0 32px!important; width:32px!important; min-width:32px!important;
  height:32px!important; min-height:32px!important; margin:0!important; padding:6px!important;
  font-size:20px!important; line-height:1!important;
  border-radius:8px!important; background:color-mix(in srgb,var(--caluler-related-accent) 10%,var(--card))!important;
  color:var(--caluler-related-accent)!important;
  transition:background-color var(--caluler-related-duration) ease;
}
html:root body[data-caluler-category] .caluler-related-tools .related > a.caluler-related-card > .related-icon svg {
  display:block!important; width:20px!important; min-width:20px!important; max-width:20px!important; height:20px!important; min-height:20px!important;
}
html:root body[data-caluler-category] .caluler-related-tools .related > a.caluler-related-card:is(:hover,:focus-visible) > .related-icon {
  background:color-mix(in srgb,var(--caluler-related-accent) 18%,var(--card))!important;
}
html:root body[data-caluler-category] .caluler-related-tools .caluler-related-chevron {
  display:block; width:16px; height:16px; opacity:.55; color:var(--caluler-related-accent);
  transition:opacity var(--caluler-related-duration) ease,transform var(--caluler-related-duration) ease;
}
html:root body[data-caluler-category] .caluler-related-tools .caluler-related-card:is(:hover,:focus-visible) > .caluler-related-chevron {
  opacity:1; transform:translateX(var(--caluler-related-nudge));
}
@media(max-width:900px) {
  html:root body[data-caluler-category] .caluler-related-tools > .related { grid-template-columns:repeat(2,minmax(0,1fr))!important; }
}
@media(max-width:640px) {
  html:root body[data-caluler-category] .sidebar-box.caluler-related-tools { padding:16px!important; }
  html:root body[data-caluler-category] .caluler-related-tools > .caluler-related-header { flex-direction:column; align-items:stretch!important; gap:10px; }
  html:root body[data-caluler-category] .caluler-related-tools .caluler-related-browse { width:100%; }
  html:root body[data-caluler-category] .caluler-related-tools > .related { grid-template-columns:minmax(0,1fr)!important; }
}
@media(prefers-reduced-motion:reduce) {
  html:root body[data-caluler-category] .sidebar-box.caluler-related-tools {
    --caluler-related-lift:0px; --caluler-related-nudge:0px; --caluler-related-press:0px; --caluler-related-duration:0ms;
  }
}
/* END CALULER-RELATED-TOOLS-UI-V1 */

/* CALULER-PRIMARY-CALCULATE-SPACING-V1: one 24px gutter, accounting for existing layout gaps. */
html:root body[data-caluler-category] .calculator { --caluler-calculate-gap:24px; }
html:root body[data-caluler-category] .calculator > button.btn:first-of-type,
html:root body[data-caluler-category] .calculator > form > button.btn:first-of-type,
html:root body[data-caluler-category] .calculator > form > input[type="submit"]:first-of-type {
  margin-top:var(--caluler-calculate-gap)!important;
}
/* Health's flex row gap already supplies part of the gutter. */
html:root body[data-caluler-category="Health Calculators"] .calculator.caluler-health-layout > .caluler-health-form > button.btn:first-of-type {
  margin-top:calc(var(--caluler-calculate-gap) - var(--caluler-form-row-gap))!important;
}
/* Grouped calculation actions share one outer gutter, not a margin on every button. */
html:root body[data-caluler-category] .calculator > .form-grid:has(> button.btn),
html:root body[data-caluler-category] .calculator.emi-action-layout > .emi-action-row {
  margin-top:var(--caluler-calculate-gap)!important;
}
html:root body[data-caluler-category] .calculator > .form-grid > button.btn,
html:root body[data-caluler-category] .calculator.emi-action-layout > .emi-action-row > #amCalculateBtn {
  margin-top:0!important;
}
/* Replace the legacy GPA line break with the same measured gutter. */
html:root body[data-caluler-category] .calculator > .form-grid + br:has(+ button.btn:first-of-type) { display:none; }
@media(min-width:1200px) {
  /* EMI's existing outer grid supplies 16px between fields and the action row. */
  html:root body[data-caluler-category] .calculator.emi-action-layout > .emi-action-row {
    margin-top:calc(var(--caluler-calculate-gap) - 16px)!important;
  }
}
/* END CALULER-PRIMARY-CALCULATE-SPACING-V1 */
