/* Tools hub, admin-panel layout (modelled on the Assistly admin): side menu + one group at a time + tool workspace.
   Active only with html.bfph (set inline before the cards render). Server HTML is unchanged. */
html.bfph .bfpd{--ink:#0B1426;--muted:#5b6577;--line:#e7dfcc;--surface:#fff;--sunken:#f5f0e4;--gold:#C9A24B;--gold-deep:#8a6a1f}
/* layout */
html.bfph .bfpd .bfpd-body{display:grid!important;grid-template-columns:240px minmax(0,1fr)!important;gap:24px!important;align-items:start!important}
/* side menu */
html.bfph .bfpd .bfpd-side{position:sticky!important;top:96px!important;display:flex!important;flex-direction:column!important;gap:12px!important;padding:12px!important;border-radius:14px!important;background:var(--surface)!important;border:1px solid var(--line)!important;color:var(--ink)!important;box-shadow:0 1px 2px rgba(11,20,38,.04)!important;max-height:calc(100vh - 116px);overflow:auto}
html.bfph .bfpd .bfpd-find{display:block!important;margin:0!important}
html.bfph .bfpd .bfpd-find input{width:100%!important;height:40px!important;border:1px solid var(--line)!important;border-radius:10px!important;padding:0 12px 0 36px!important;font:14px Lato,Arial,sans-serif!important;color:var(--ink)!important;background:#fbf9f4 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a6a1f' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 12px 50%!important;box-shadow:none!important}
html.bfph .bfpd .bfpd-find input:focus{outline:none!important;border-color:var(--gold)!important;box-shadow:0 0 0 3px rgba(201,162,75,.18)!important}
html.bfph .bfpd .bfpd-navlist{display:flex!important;flex-direction:column!important;gap:2px!important;margin:0!important;padding:0!important;list-style:none!important;overflow:visible!important}
html.bfph .bfpd .bfpd-navlist li{margin:0!important;list-style:none!important}
html.bfph .bfpd .bfpd-navlist a{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;height:auto!important;padding:10px 12px!important;border:0!important;border-radius:9px!important;background:transparent!important;color:var(--muted)!important;font:600 14px/1.3 Lato,Arial,sans-serif!important;text-decoration:none!important;white-space:normal!important;transition:background .12s,color .12s}
html.bfph .bfpd .bfpd-navlist a span{flex:none;min-width:24px;text-align:center;padding:1px 7px!important;border-radius:999px!important;background:var(--sunken)!important;color:var(--gold-deep)!important;font:800 11.5px/1.6 Lato,Arial,sans-serif!important}
html.bfph .bfpd .bfpd-navlist a:hover{background:var(--sunken)!important;color:var(--ink)!important}
html.bfph .bfpd .bfpd-navlist a.is-on{background:rgba(201,162,75,.16)!important;color:var(--ink)!important;font-weight:800!important;box-shadow:inset 3px 0 0 var(--gold)}
html.bfph .bfpd .bfpd-navlist a.is-on span{background:var(--gold)!important;color:var(--ink)!important}
html.bfph .bfpd .bfpd-side-cta{background:linear-gradient(135deg,#0B1426,#1c2c4f)!important;border:0!important;border-radius:12px!important;color:#e4ecf7!important}
/* main */
html.bfph .bfpd .bfpd-main{min-width:0}
html.bfph .bfpd .bfpd-group.bfph-off{display:none!important}
html.bfph .bfpd .is-searching .bfpd-group.bfph-off:not([hidden]){display:block!important}
html.bfph .bfpd .bfpd-note{display:none!important}
html.bfph .bfpd .bfpd-group{margin:0 0 24px!important;padding:0!important;border:0!important;background:none!important;box-shadow:none!important}
html.bfph .bfpd .bfpd-group-head{margin:0 0 14px!important;padding:0!important;border:0!important;background:none!important}
html.bfph .bfpd .bfpd-group-head h2{font:700 24px/1.25 "Playfair Display",Georgia,serif!important;color:var(--ink)!important;margin:0 0 2px!important}
html.bfph .bfpd .bfpd-group-head p{margin:0!important;color:var(--muted)!important;font-size:14px!important}
/* separate cards */
html.bfph .bfpd .bfpd-cards{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(260px,1fr))!important;gap:14px!important;margin:0!important;padding:0!important;list-style:none!important}
html.bfph .bfpd .bfpd-card{position:relative;margin:0!important;min-height:0!important;height:auto!important;border:1px solid var(--line)!important;border-radius:12px!important;background:var(--surface)!important;box-shadow:0 1px 2px rgba(11,20,38,.04)!important;transition:border-color .15s,box-shadow .15s,transform .15s}
html.bfph .bfpd .bfpd-card[hidden]{display:none!important}
html.bfph .bfpd .bfpd-card:hover{border-color:var(--gold)!important;box-shadow:0 8px 22px rgba(11,20,38,.08)!important;transform:translateY(-1px)}
html.bfph .bfpd .bfpd-card .bfpd-card-link{display:flex!important;align-items:flex-start!important;gap:12px!important;padding:16px 42px 16px 16px!important;height:100%;text-decoration:none!important;color:inherit!important;background:none!important}
html.bfph .bfpd .bfpd-card .bfpd-ico{flex:none;width:40px!important;height:40px!important;margin:0!important;border-radius:10px!important;display:flex!important;align-items:center!important;justify-content:center!important;background:rgba(201,162,75,.14)!important;color:var(--gold-deep)!important}
html.bfph .bfpd .bfpd-card .bfpd-ico svg{width:20px;height:20px}
html.bfph .bfpd .bfpd-card .bfpd-card-body{display:flex!important;flex-direction:column!important;gap:4px!important;min-width:0;flex:1 1 0!important}
html.bfph .bfpd .bfpd-card .bfpd-card-title{font:800 15px/1.3 Lato,Arial,sans-serif!important;color:var(--ink)!important;margin:0!important}
html.bfph .bfpd .bfpd-card .bfpd-card-desc{font-size:13px!important;line-height:1.45!important;color:var(--muted)!important;margin:0!important;display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important;max-height:2.9em}
html.bfph .bfpd .bfpd-card .bfpd-card-foot{display:none!important}
html.bfph .bfpd .bfpd-card .bfpd-pin{position:absolute!important;top:10px!important;right:10px!important;width:28px!important;height:28px!important;margin:0!important}
html.bfph .bfpd .bfpd-card .bfpd-card-link:focus-visible{outline:2px solid var(--gold);outline-offset:2px;border-radius:12px}
/* show all */
html.bfph .bfpd .bfph-clip:not(.is-open) .bfpd-card:nth-child(n+13){display:none!important}
html.bfph .bfpd .is-searching .bfph-clip .bfpd-card:nth-child(n+13):not([hidden]){display:block!important}
.bfph-more{display:flex;justify-content:center;margin:16px 0 0}
.bfph-more button{height:42px;padding:0 20px;border-radius:10px;border:1px solid var(--line,#e7dfcc);background:#fff;color:#0B1426;font:800 14px Lato,Arial,sans-serif;cursor:pointer}
.bfph-more button:hover{border-color:#C9A24B;background:#fbf6e8}
html.bfph .bfpd .is-searching .bfph-more{display:none}
/* tool workspace (opens inside the panel) */
.bfph-work{display:none}
html.bfph .bfpd .bfpd-main.is-tool>*:not(.bfph-work){display:none!important}
html.bfph .bfpd .bfpd-main.is-tool .bfph-work{display:block}
.bfph-work-bar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 14px}
.bfph-back{display:inline-flex;align-items:center;gap:6px;height:38px;padding:0 14px;border:1px solid #e7dfcc;border-radius:10px;background:#fff;color:#0B1426;font:700 14px Lato,Arial,sans-serif;cursor:pointer}
.bfph-back:hover{border-color:#C9A24B}
.bfph-work-title{flex:1 1 auto;min-width:0;margin:0!important;font:700 22px/1.25 "Playfair Display",Georgia,serif!important;color:#0B1426!important}
.bfph-full{font:700 13.5px Lato,Arial,sans-serif;color:#8a6a1f!important;text-decoration:none!important;white-space:nowrap}
.bfph-full:hover{text-decoration:underline!important}
.bfph-frame-wrap{position:relative;border:1px solid #e7dfcc;border-radius:12px;background:#fff;overflow:hidden;min-height:420px}
.bfph-frame-wrap iframe{display:block;width:100%;height:900px;border:0}
.bfph-loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:10px;color:#5b6577;font:600 14px Lato,Arial,sans-serif;background:#fff}
.bfph-loading i{width:18px;height:18px;border:2px solid #e7dfcc;border-top-color:#C9A24B;border-radius:50%;animation:bfphSpin .8s linear infinite}
@keyframes bfphSpin{to{transform:rotate(360deg)}}
/* phones and tablets: tab bar instead of side menu */
@media (max-width:900px){
  html.bfph .bfpd .bfpd-body{grid-template-columns:minmax(0,1fr)!important;gap:14px!important}
  html.bfph .bfpd .bfpd-side{position:static!important;max-height:none;overflow:visible;min-width:0;max-width:100%}
  html.bfph .bfpd .bfpd-navlist{flex-direction:row!important;overflow-x:auto!important;gap:8px!important;padding-bottom:4px!important;min-width:0;max-width:100%}
  html.bfph .bfpd .bfpd-navlist li{flex:0 0 auto}
  html.bfph .bfpd .bfpd-navlist a{white-space:nowrap!important;border:1px solid #e7dfcc!important;border-radius:999px!important;background:#fff!important;padding:8px 14px!important}
  html.bfph .bfpd .bfpd-navlist a.is-on{background:#C9A24B!important;border-color:#C9A24B!important;box-shadow:none}
  html.bfph .bfpd .bfpd-navlist a.is-on span{background:#fff!important}
  html.bfph .bfpd .bfpd-side-cta{display:none!important}
}
@media (max-width:640px){
  html.bfph .bfpd .bfpd-cards{grid-template-columns:1fr!important;gap:10px!important}
  html.bfph .bfpd .bfpd-card .bfpd-card-link{padding:12px 40px 12px 12px!important;align-items:center!important}
  html.bfph .bfpd .bfpd-card .bfpd-card-desc{-webkit-line-clamp:1!important;max-height:1.5em}
  html.bfph .bfpd .bfph-clip:not(.is-open) .bfpd-card:nth-child(n+9){display:none!important}
  .bfph-work-title{font-size:19px!important}
}
@media (prefers-reduced-motion:reduce){html.bfph .bfpd .bfpd-card{transition:none}html.bfph .bfpd .bfpd-card:hover{transform:none}}
