/* Shared sidebar presentation: authoritative end-of-cascade parity for all seven tools.
   Main tool layout CSS stays unchanged. */

/* Requested sidebar-only: lighter labels and more space between menu entries. */
body.dashboard-page .dashboard-sidebar .dashboard-nav {
  gap: 8px !important;
}
/* Slightly shorten ONLY the seven-tool list; preserve Home and section label spacing. */
body.dashboard-page .dashboard-sidebar .dashboard-nav > a.dashboard-side-link:nth-of-type(n + 3) {
  margin-top: -4px;
}
body.dashboard-page .dashboard-sidebar .dashboard-nav-label {
  padding: 10px 12px 7px !important;
  font-weight: 400 !important;
}
/* Keep the section label readable without changing the other sidebar colors. */
html body.dashboard-page .dashboard-sidebar .dashboard-nav-label {
  color: #000000 !important;
}
body.dashboard-page .dashboard-sidebar .dashboard-side-link {
  font-weight: 300 !important;
}
body.dashboard-page .dashboard-sidebar .dashboard-side-link[aria-current="page"] {
  font-weight: 400 !important;
}
body.dashboard-page .dashboard-sidebar .dashboard-bottom .dashboard-legal-links a {
  font-weight: 300 !important;
}


/* Layout-only parity: isolate the sidebar from different tool page root/body typography.
   The same self-contained rule is inserted, byte-for-byte, on all seven tool pages.
   No changes to any tool form, content, calculator engine or homepage. */
body.dashboard-page > .dashboard-sidebar {
  font-family: Inter, Arial, sans-serif !important;
  font-size: 14px;
  line-height: 1.55 !important;
}
body.dashboard-page > .dashboard-sidebar .dashboard-nav-label,
body.dashboard-page > .dashboard-sidebar .dashboard-legal-links {
  line-height: 1.55 !important;
}
body.dashboard-page > .dashboard-sidebar .dashboard-collapse-button {
  font-size: 13.333333px !important;
  line-height: normal !important;
}


/* Persistent calculator navigation: only the content viewport changes.
   The shared sidebar stays mounted (no page reload) until Home is clicked. */
body.dashboard-page.en-persistent-sidebar-active {
  height: calc(100dvh * 1.052631579) !important;
  min-height: 0 !important;
  overflow: hidden !important;
}
body.dashboard-page.en-persistent-sidebar-active > .en-persistent-tool-frame {
  display: block !important;
  width: 100%;
  height: calc(100dvh * 1.052631579);
  border: 0;
  margin: 0;
  padding: 0;
  background: #F5F5F4;
}
@media (min-width: 981px) {
  body.dashboard-page.en-persistent-sidebar-active.dashboard-sidebar-collapsed > .en-persistent-tool-frame {
    height: calc(100dvh * 1.052631579 - 58px);
  }
}
@media (max-width: 980px) {
  body.dashboard-page.en-persistent-sidebar-active > .en-persistent-tool-frame {
    height: calc(100dvh * 1.052631579 - 60px);
  }
}


/* October 31: FOUR deliberately scoped presentation requests.
   Keep source calculators, their results, and the homepage layout untouched. */

/* 1. Slim visible scrollbars, including scroll inside embedded tool documents.
   Intentionally do NOT reveal the previously hidden sidebar scrollbar. */
html {
  scrollbar-width: thin;
  scrollbar-color: #A3A3A3 #F5F5F4;
}
html::-webkit-scrollbar,
body.dashboard-page::-webkit-scrollbar,
.en-persistent-tool-frame::-webkit-scrollbar { width: 7px; height: 7px; }
html::-webkit-scrollbar-thumb,
body.dashboard-page::-webkit-scrollbar-thumb,
.en-persistent-tool-frame::-webkit-scrollbar-thumb {
  background-color: #A3A3A3;
  border-radius: 999px;
}
html::-webkit-scrollbar-track,
body.dashboard-page::-webkit-scrollbar-track,
.en-persistent-tool-frame::-webkit-scrollbar-track { background: #F5F5F4; }

/* 2. Give Home a slightly larger click/touch target than the other rows. */
html body.dashboard-page .dashboard-sidebar .dashboard-nav > a.dashboard-side-link:first-child {
  min-height: 56px !important;
  padding: 13px 12px !important;
  font-size: 14.5px !important;
  line-height: 1.55 !important;
  font-weight: 400 !important;
}
html body.dashboard-page .dashboard-sidebar .dashboard-nav > a.dashboard-side-link:first-child svg {
  width: 19px !important;
  height: 19px !important;
}

/* 3. A small rounded-square hamburger on BOTH close and reopen controls. */
html body.dashboard-page .dashboard-collapse-button,
html body.dashboard-page .dashboard-menu-button {
  width: 44px !important;
  height: 44px !important;
  border-radius: 15px !important;
  border: 1px solid #E5E5E5 !important;
  background-color: #F7F7F7 !important;
  color: #101312 !important;
  flex: 0 0 44px;
}
html body.dashboard-page .dashboard-collapse-button svg,
html body.dashboard-page .dashboard-menu-button svg {
  width: 22px !important;
  height: 22px !important;
}

/* 4. Stable desktop geometry: the original V33/V34 media rules changed the
   sidebar width to 232/248/264px and its logo/font sizes by laptop width.
   Use the same CSS pixel dimensions for all desktop widths. Mobile remains
   responsive and browser zoom remains user-controlled (not spoofed). */
@media (min-width: 981px) {
  html body.dashboard-page { 
    --dash-width: 264px !important;
    --en-h1: 36px !important;
    --en-h2: 23px !important;
    --en-h3: 18px !important;
    --en-copy: 14px !important;
    --en-card-pad: 20px !important;
  }
  html body.dashboard-page > .dashboard-sidebar {
    width: 264px !important;
    padding: 12px !important;
  }
  html body.dashboard-page .dashboard-sidebar .dashboard-brand-row .dashboard-brand img {
    max-width: 175px !important;
  }
  html body.dashboard-page .dashboard-sidebar .dashboard-nav > a.dashboard-side-link:not(:first-child),
  html body.dashboard-page .dashboard-sidebar .dashboard-bottom .dashboard-side-link {
    font-size: 13.5px !important;
    min-height: 44px !important;
  }
  html body.dashboard-page .dashboard-sidebar .dashboard-nav-label {
    font-size: 11px !important;
  }
}

/* Specific enough to outrank tool-local universal button-radius rules. */
html body.dashboard-page > aside.dashboard-sidebar button.dashboard-collapse-button,
html body.dashboard-page > div.dashboard-topbar button.dashboard-menu-button {
  border-radius: 15px !important;
  background-color: #F7F7F7 !important;
}


/* Native smooth anchor / programmatic scrolling for all seven tool documents,
   including the iframe content in persistent navigation. Do not intercept
   touch, wheel or trackpad events: the browser handles those natively. */
html {
  scroll-behavior: smooth;
}
body.dashboard-page > .dashboard-sidebar {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
@media (prefers-reduced-motion: reduce) {
  html,
  body.dashboard-page > .dashboard-sidebar {
    scroll-behavior: auto !important;
  }
}
