/* Hubpile Premium SaaS Foundation 16.1 - progressively enhanced, no external dependencies */
:root{--hp16-blue:#126df1;--hp16-blue-700:#0a55c9;--hp16-ink:#10203e;--hp16-muted:#64748b;--hp16-bg:#f6f9ff;--hp16-surface:#fff;--hp16-border:#e3ebf5;--hp16-soft:#eaf3ff;--hp16-ok:#087d55;--hp16-bad:#b42318;--hp16-radius:18px;--hp16-shadow:0 12px 42px rgba(17,57,118,.075);--hp16-font:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}
html{scroll-behavior:smooth} body{font-family:var(--hp16-font)}
:where(button,a,input,textarea,select,summary):focus-visible{outline:3px solid #6eb4ff!important;outline-offset:3px!important}
:where(button,input,textarea,select){font:inherit}
/* Public brand retained; previous dense sections become visually coherent. */
body:not(.hpc-body):not([data-hp-admin-shell]) .hp-site-header.hp49-header{border-bottom:1px solid #e2eafa!important;box-shadow:0 6px 20px rgba(16,48,92,.04)!important}
body:not(.hpc-body):not([data-hp-admin-shell]) .hp-footer{background:#081a30!important;color:#dfe9f8}
body:not(.hpc-body):not([data-hp-admin-shell]) .hp-container{max-width:1240px}
body.hp16-public :where(.hd-panel,.hp-card,.hppr-card,.hp-card-pad,.hp-faq,.hp-bucket,.hp-value){border:1px solid var(--hp16-border);box-shadow:var(--hp16-shadow);border-radius:var(--hp16-radius)}
body.hp16-public :where(input:not([type=checkbox]):not([type=radio]),textarea,select){border:1px solid #d7e3f2;border-radius:12px;accent-color:var(--hp16-blue)}
body.hp16-public :where(button,.hp-btn,.hd-btn,.hppr-btn){transition:transform .16s ease,background .16s ease,box-shadow .16s ease}
body.hp16-public :where(button,.hp-btn,.hd-btn,.hppr-btn):not(:disabled):hover{transform:translateY(-1px)}
/* Creator Studio retains its navy navigation while standardising its workspace. */
body.hpc-body{--hp16-bg:#f6f9ff;background:var(--hp16-bg)}
body.hpc-body :where(.hpc-card,.hpc-panel,.hpc-stat,.hpc-table-wrap){border:1px solid var(--hp16-border);border-radius:18px;box-shadow:var(--hp16-shadow);background:#fff}
body.hpc-body :where(.hpc-content,.hpc-main){min-width:0}
body.hpc-body .hpc-workbar{background:rgba(255,255,255,.96);border-bottom:1px solid #e6edf8;backdrop-filter:blur(12px)}
body.hpc-body .hpc-workbar h1{font-weight:850;letter-spacing:-.04em;color:var(--hp16-ink)}
body.hpc-body .hpc-btn:not(.secondary){background:var(--hp16-blue);border-color:var(--hp16-blue)}
body.hpc-body :where(input,select,textarea):not([type=checkbox]):not([type=radio]){border-radius:11px}
body.hpc-body .hpc-progress{border-radius:999px;overflow:hidden}
body.hpc-body .hpc-progress i{border-radius:999px;background:linear-gradient(90deg,#167bf3,#18bba6)}
/* Admin shell stays compatible with v15.1 role-sensitive sidebar. */
body[data-hp-admin-shell]{background:#f5f8fe!important;--hp-brand:var(--hp16-blue);--hp-muted:var(--hp16-muted)}
body[data-hp-admin-shell] .hp-admin-shell{max-width:1590px}
body[data-hp-admin-shell] :where(.hp-admin-sidebar,.hp-admin-topbar,.hp-card,.hp-page-hero){border:1px solid var(--hp16-border);border-radius:17px;box-shadow:var(--hp16-shadow)}
body[data-hp-admin-shell] .hp-admin-sidebar{background:#fff;overflow:clip}
body[data-hp-admin-shell] .hp-admin-topbar{background:rgba(255,255,255,.97);backdrop-filter:blur(10px)}
body[data-hp-admin-shell] .hp-admin-main{min-width:0}
body[data-hp-admin-shell] .hp-admin-nav a{border-radius:10px}
body[data-hp-admin-shell] .hp-page-hero h1{letter-spacing:-.044em;font-weight:850}
body[data-hp-admin-shell] .hp-stat strong{font-variant-numeric:tabular-nums}
/* v16 components (work in public, creator and admin shells) */
.hp16-box{background:#fff;border:1px solid var(--hp16-border);border-radius:20px;padding:clamp(18px,2vw,28px);box-shadow:var(--hp16-shadow);min-width:0}
.hp16-heading{font-size:clamp(25px,3vw,42px);font-weight:850;letter-spacing:-.052em;line-height:1.12;color:var(--hp16-ink);margin:0 0 9px}
.hp16-kicker{color:#1367cf;font-size:11px;font-weight:850;letter-spacing:.13em;text-transform:uppercase}
.hp16-sub{color:var(--hp16-muted);font-size:14px;line-height:1.7;margin:0}
.hp16-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.hp16-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.hp16-metric{display:grid;gap:7px;background:#fff;border:1px solid var(--hp16-border);border-radius:16px;padding:21px;box-shadow:var(--hp16-shadow)}
.hp16-metric span{font-size:12px;color:var(--hp16-muted);font-weight:700}.hp16-metric strong{font-size:28px;letter-spacing:-.04em;color:var(--hp16-ink);font-variant-numeric:tabular-nums}
.hp16-tag{display:inline-flex;align-items:center;gap:6px;padding:6px 11px;border-radius:999px;font-size:11px;font-weight:750;background:#edf5ff;color:#145fc2}
.hp16-tag.warn{background:#fff1e9;color:#9a3412}.hp16-tag.good{background:#def8eb;color:#076a48}
.hp16-action{display:inline-flex;justify-content:center;align-items:center;gap:8px;border:1px solid #bcd4fb;background:var(--hp16-blue);color:#fff!important;text-decoration:none;border-radius:11px;padding:11px 17px;font-size:13px;font-weight:800;cursor:pointer;min-height:43px}
.hp16-action.secondary{background:#fff;color:#135cb9!important}.hp16-action:disabled{opacity:.5;cursor:not-allowed}
.hp16-table-wrap{max-width:100%;overflow:auto;border:1px solid var(--hp16-border);border-radius:14px}
.hp16-table{border-collapse:collapse;width:100%;min-width:600px;background:white;font-size:13px}
.hp16-table :where(th,td){text-align:left;padding:13px 15px;border-bottom:1px solid #ecf1f9;vertical-align:middle}.hp16-table th{background:#f6faff;color:#516787;font-size:11px;text-transform:uppercase;letter-spacing:.05em}
.hp16-field{display:grid;gap:7px;font-size:13px;font-weight:650;color:var(--hp16-ink)}
.hp16-field input,.hp16-field select,.hp16-field textarea{width:100%;background:#fff;border:1px solid #d7e3f3;border-radius:10px;padding:11px 13px;color:var(--hp16-ink)}
.hp16-steps{display:flex;align-items:center;gap:13px;flex-wrap:wrap;margin:12px 0 22px;list-style:none;padding:0}.hp16-steps li{display:flex;align-items:center;gap:7px;color:#64748b;font-size:12px;font-weight:750}.hp16-steps li:before{content:attr(data-step);display:grid;place-items:center;flex:0 0 28px;width:28px;height:28px;border-radius:50%;background:#e8f0fc;color:#2864ae}.hp16-steps li.current:before{background:#176df0;color:white}.hp16-steps li.done:before{background:#dff8ed;color:#078154}
.hp16-status{padding:12px 14px;margin-top:12px;border:1px solid #b9d6ff;background:#eef6ff;color:#164d90;border-radius:12px;font-size:13px}.hp16-status.error{background:#fff0ef;border-color:#ffc9c2;color:#9a2116}.hp16-status.ok{background:#ecfbf5;border-color:#b6efdc;color:#076647}
.hp16-skeleton{background:linear-gradient(100deg,#edf4fd 8%,#f9fcff 18%,#edf4fd 33%);background-size:210% 100%;animation:hp16-pulse 1.4s linear infinite;border-radius:9px;min-height:24px}@keyframes hp16-pulse{to{background-position-x:-210%}}
#hp16-toasts{position:fixed;bottom:22px;right:22px;z-index:99999;display:grid;gap:8px;width:min(360px,calc(100vw - 30px));pointer-events:none}
.hp16-toast{background:#0a1e3a;color:#fff;padding:13px 16px;border-radius:12px;box-shadow:0 16px 40px rgba(0,0,0,.22);font-size:13px;line-height:1.5}.hp16-toast.error{background:#9a2116}.hp16-toast.ok{background:#0b7658}
/* Checkout-specific, retains hosted gateway form: no sensitive card fields handled by Hubpile */
body.hp16-checkout,body.hp16-subscribe{background:#f7faff!important}
body.hp16-checkout .hd-section,body.hp16-subscribe main{background:#f7faff!important}
body.hp16-checkout .hd-panel,body.hp16-subscribe .hppr-coupon-box{background:#fff;border:1px solid var(--hp16-border);border-radius:21px;box-shadow:var(--hp16-shadow);padding:clamp(20px,2.6vw,34px)}
body.hp16-checkout .hd-section-head h2,body.hp16-subscribe h1{font-weight:850;letter-spacing:-.05em;color:#0b2144}
body.hp16-checkout .hd-btn.primary,body.hp16-subscribe .hppr-btn.primary{background:var(--hp16-blue);color:white;border-radius:11px;box-shadow:0 9px 23px rgba(18,109,241,.18)}
body.hp16-checkout .hd-form-grid input,body.hp16-checkout .hd-form-grid textarea{min-height:44px;background:#fff}
body.hp16-checkout .hd-layout{align-items:start}
body.hp16-checkout .hd-summary-row.total{font-size:18px;color:#0b2144}
body.hp16-subscribe main{width:min(780px,calc(100% - 36px));margin:0 auto}
@media(max-width:1120px){.hp16-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:680px){.hp16-grid,.hp16-grid.two{grid-template-columns:1fr}.hp16-box{padding:18px}.hp16-steps{gap:9px}.hp16-metric strong{font-size:24px}body.hp16-checkout .hd-layout{display:block}body.hp16-checkout .hd-panel{margin-bottom:14px}.hp16-table{min-width:540px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
