.mbb-calculator-nav { position: relative; }
#masthead .mbb-calculator-toggle {
  display: flex; align-items: center; gap: .4rem; padding: .5rem;
  color: #f7dfb1; font: inherit; font-weight: 600; text-transform: uppercase; cursor: pointer; list-style: none;
}
.mbb-calculator-toggle::-webkit-details-marker { display: none; }
.mbb-calculator-toggle::marker { content: ''; }
#masthead .mbb-calculator-toggle:hover, #masthead .mbb-calculator-menu[open] > summary { color: #fff; }
.mbb-calculator-toggle:focus-visible, .mbb-calculator-dropdown a:focus-visible,
#mbb-calculator-dialog button:focus-visible, #mbb-calculator-dialog a:focus-visible { outline: 3px solid #c58c3c; outline-offset: 3px; }
.mbb-calculator-dropdown {
  position: absolute; right: 0; top: 100%; z-index: 1050;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem;
  width: min(780px, calc(100vw - 2rem)); max-height: 75vh; overflow-y: auto;
  padding: 1.1rem; background: #fffdf9; border: 1px solid #e4d9ca; border-radius: 10px;
  box-shadow: 0 12px 35px rgb(38 26 14 / 18%); text-align: left;
}
.mbb-calculator-menu:not([open]) > .mbb-calculator-dropdown { display: none; }
.mbb-calculator-group h2 { margin: 0 0 .5rem; padding: .25rem .6rem; color: #855321; font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.mbb-calculator-group ul { list-style: none; padding: 0; margin: 0; }
.mbb-calculator-group li { margin: 0; padding: 0; }
#masthead .mbb-calculator-group a {
  display: block; padding: .65rem .6rem; border-radius: 5px; color: #39342c;
  font-size: .9rem; font-weight: 500; line-height: 1.4; text-decoration: none; text-transform: none; white-space: normal;
}
#masthead .mbb-calculator-group a:hover, #masthead .mbb-calculator-group a:focus { background: #f3e8d8; color: #6b401b; }
html.mbb-calculator-open { overflow: hidden; }
#mbb-calculator-dialog {
  box-sizing: border-box; width: min(850px, calc(100vw - 2rem)); height: min(850px, calc(100dvh - 3rem));
  max-width: none; max-height: calc(100dvh - 3rem); margin: auto; padding: 0;
  border: 1px solid #ded2c2; border-radius: 14px; background: #fffdf9; color: #39342c;
  box-shadow: 0 24px 80px rgb(0 0 0 / 35%); overflow: hidden;
}
#mbb-calculator-dialog:not([open]) { display: none; }
#mbb-calculator-dialog[open] { display: flex; flex-direction: column; }
#mbb-calculator-dialog::backdrop { background: rgb(12 18 22 / 62%); }
.mbb-calculator-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid #e6dccf; }
#mbb-calculator-dialog .mbb-calculator-eyebrow { margin: 0 0 .25rem; color: #76624d; font-size: .75rem; }
#mbb-calculator-title { margin: 0; color: #55391f; font-size: 1.3rem; font-weight: 700; line-height: 1.3; }
.mbb-calculator-body { flex: 1; min-height: 0; overflow: auto; }
.mbb-calculator-frames { height: 100%; }
.mbb-calculator-frame { display: block; width: 100%; height: 100%; border: 0; background: #fffdf9; }
#mbb-calculator-dialog [hidden] { display: none !important; }
.mbb-calculator-status { padding: 1.5rem; margin: 0; }
#mbb-calculator-dialog button { min-height: 44px; padding: .5rem 1rem; border: 1px solid #bda587; border-radius: 6px; background: #fffaf2; color: #5d3d20; font: inherit; cursor: pointer; }
#mbb-calculator-dialog button:hover { background: #f3e8d8; }
#mbb-calculator-dialog .mbb-calculator-header button { flex: 0 0 44px; padding: 0; font-size: 1.7rem; line-height: 1; }
.mbb-calculator-retry { margin: 0 1.5rem 1.5rem; }
.mbb-calculator-footer { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .65rem 1.25rem; border-top: 1px solid #e6dccf; }
.mbb-calculator-reference { color: #765020; font-size: .85rem; }
@media (max-width: 1199.98px) {
  .mbb-calculator-dropdown { position: static; width: 100%; grid-template-columns: 1fr; gap: .8rem; max-height: 65vh; box-shadow: none; }
  #masthead .mbb-calculator-toggle { padding: .75rem 0; }
}
@media (max-width: 575.98px) {
  #mbb-calculator-dialog { width: calc(100vw - 1rem); height: calc(100dvh - 1rem); max-height: calc(100dvh - 1rem); border-radius: 10px; }
  .mbb-calculator-header { padding: .75rem; gap: .5rem; }
  #mbb-calculator-title { font-size: 1.1rem; }
  .mbb-calculator-footer { padding: .5rem .75rem; }
}
