/* The one Billpad header (scripts/site_header.py). Self-contained: page stylesheets use different variables. */
.bp-header{background:#fff;border-bottom:1px solid #dce3ee;font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;line-height:1.4}
.bp-header-in{width:min(1240px,calc(100% - 64px));margin-inline:auto;min-height:64px;display:flex;align-items:center;gap:24px}
.bp-brand{display:inline-flex;align-items:center;gap:9px;min-height:44px;color:#141c33;text-decoration:none;font-size:21px;font-weight:800;letter-spacing:-.035em}
.bp-brand svg{flex:none;display:block;width:28px;height:28px}
.bp-tools{display:flex;align-items:center;gap:4px}
.bp-tools a{display:inline-flex;align-items:center;min-height:40px;padding:0 12px;border-radius:999px;color:#36405a;text-decoration:none;font-size:15px;font-weight:550;white-space:nowrap}
.bp-tools a:hover{background:#e7ebf1;color:#141c33}
.bp-tools a[aria-current]{background:#141c33;color:#fff}
.bp-sep{flex:none;width:1px;height:22px;margin:0 8px;background:#c9cfd9}
.bp-site{margin-left:auto;display:flex;align-items:center;gap:22px}
.bp-site a{display:inline-flex;align-items:center;min-height:44px;color:#36405a;text-decoration:none;font-size:15px;font-weight:600;white-space:nowrap}
.bp-site a:hover{color:#2347c5}
.bp-site a[aria-current]{color:#2347c5;box-shadow:inset 0 -2px 0 currentColor}
.bp-header a:focus-visible{outline:2.5px solid #2347c5;outline-offset:2px}
/* Narrower screens: brand and Plans/Account on top, the tools in a row that scrolls sideways. */
@media (max-width:999px){
  .bp-header-in{width:calc(100% - 48px);flex-wrap:wrap;gap:0 16px;min-height:0;padding-top:6px}
  .bp-tools{order:3;width:100%;overflow-x:auto;scrollbar-width:none;padding:2px 0 8px}
  .bp-tools::-webkit-scrollbar{display:none}
}
@media (max-width:639px){
  .bp-header-in{width:calc(100% - 32px)}
  .bp-brand{font-size:20px}
  .bp-site{gap:16px}
  .bp-site a{font-size:14.5px}
  .bp-tools a{padding:0 10px;font-size:14.5px}
  /* Fade the right edge so the row reads as scrollable; the padding lets the last link clear the fade. */
  .bp-tools{padding-right:28px;-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 28px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 28px),transparent)}
}
@media print{.bp-header{display:none!important}}
/* Account presence is verified by the API, never inferred from a local plan flag. */
.bp-account{position:relative;min-width:154px;display:flex;justify-content:flex-end}
.bp-account>[hidden]{display:none!important}.bp-account-menu{position:relative;padding:0;margin:0;border:0}
.bp-account-menu summary{display:flex;align-items:center;gap:8px;min-height:44px;cursor:pointer;list-style:none;border-radius:8px;padding:0 6px;color:#26344e;font-size:14px;font-weight:600}
.bp-account-menu summary::-webkit-details-marker{display:none}.bp-account-menu summary:hover,.bp-account-menu[open] summary{background:#f0f3f8}
.bp-account-menu summary:focus-visible,.bp-account-popover button:focus-visible{outline:2.5px solid #2347c5;outline-offset:2px}
.bp-avatar{width:29px;height:29px;border-radius:50%;background:#e8edfa;color:#2347c5;display:grid;place-items:center;font-size:13px;font-weight:750;flex:none}
.bp-tier{font-size:11px;padding:3px 7px;border:1px solid #dce3ee;border-radius:5px;background:#f6f8fc;white-space:nowrap}.bp-tier[data-tier=pro]{color:#2347c5;background:#edf2ff;border-color:#cdd8f5}
.bp-account-popover{box-sizing:border-box;position:absolute;z-index:100;right:0;top:calc(100% + 8px);width:min(296px,calc(100vw - 32px));padding:8px;background:#fff;border:1px solid #dce3ee;border-radius:12px;box-shadow:0 14px 36px #202e461c}
.bp-account-email{font-size:13px;font-weight:600;overflow-wrap:anywhere;margin:0 4px 6px;padding:10px 8px 14px;border-bottom:1px solid #e7ecf3;color:#53627a}
.bp-site .bp-account-popover a,.bp-account-popover button{display:flex;width:100%;padding:10px 12px;min-height:42px;color:#26344e;font-family:inherit;font-size:14px;font-weight:500;line-height:1.4;border:0;border-radius:6px;background:transparent;text-align:left;text-decoration:none;white-space:normal;cursor:pointer;box-sizing:border-box}
.bp-site .bp-account-popover a:hover,.bp-account-popover button:hover{background:#f0f3f8}.bp-account-popover button{border-top:1px solid #e7ecf3;border-radius:0 0 6px 6px;margin-top:6px;color:#944132}.bp-account-popover button:disabled{opacity:.6;cursor:wait}
.bp-account-error{font-size:13px;color:#944132;padding:4px 12px;margin:0}.bp-account-error:empty{display:none}
@media(max-width:639px){.bp-account{min-width:0}.bp-account-label{display:none}.bp-site{gap:12px}.bp-account-menu summary{gap:6px;padding:0 2px}.bp-tier{font-size:10px;padding:3px 5px}}
