/* Ipakodo v7.4 premium consistency layer.
   Shared visual, accessibility and responsive refinements for every surface. */
:root{
  --premium-navy:#0a2764;
  --premium-blue:#1957c8;
  --premium-teal:#0b8078;
  --premium-gold:#e9b629;
  --premium-ink:#10213f;
  --premium-muted:#66758c;
  --premium-line:#dbe5f0;
  --premium-soft:#f4f8fc;
  --premium-surface:#fff;
  --premium-radius-sm:.8rem;
  --premium-radius:1.15rem;
  --premium-radius-lg:1.65rem;
  --premium-shadow:0 18px 50px -34px rgba(15,35,72,.52);
  --premium-shadow-strong:0 28px 72px -38px rgba(8,30,75,.62);
}

html{scroll-padding-top:6rem}
body{font-feature-settings:"kern" 1,"liga" 1;text-rendering:optimizeLegibility}
body::selection{background:#c7dcff;color:#092153}
:where(main,[role="main"]){isolation:isolate}
:where(main,[role="main"]) :where(h1,h2,h3){letter-spacing:-.025em}
:where(main,[role="main"]) h1{max-width:25ch}
:where(main,[role="main"]) h2{max-width:32ch}
:where(main,[role="main"]) :where(p,li,dd){text-wrap:pretty}
:where(a,button,input,select,textarea,[role="button"]):focus-visible{outline:3px solid rgba(25,87,200,.28)!important;outline-offset:3px!important}
:where(button,[role="button"],a){-webkit-tap-highlight-color:transparent}
:where(input,select,textarea){accent-color:var(--premium-blue)}

.premium-reading-progress{position:fixed;z-index:250;inset:0 0 auto;height:3px;pointer-events:none;background:transparent}
.premium-reading-progress span{display:block;width:100%;height:100%;transform:scaleX(0);transform-origin:left;background:linear-gradient(90deg,var(--premium-gold),#2dd4bf,var(--premium-blue));box-shadow:0 0 12px rgba(45,212,191,.55);will-change:transform}
.premium-back-to-top{position:fixed;z-index:92;right:max(1rem,env(safe-area-inset-right));bottom:max(5.6rem,calc(env(safe-area-inset-bottom) + 5rem));display:grid;width:2.85rem;height:2.85rem;place-items:center;border:1px solid rgba(255,255,255,.24);border-radius:.9rem;background:rgba(10,39,100,.94);color:#fff;box-shadow:0 14px 36px -18px rgba(2,6,23,.78);opacity:0;visibility:hidden;transform:translateY(.6rem);transition:.2s ease;backdrop-filter:blur(14px)}
.premium-back-to-top.visible{opacity:1;visibility:visible;transform:none}
.premium-back-to-top:hover{background:var(--premium-blue)}

/* Public surfaces */
body.premium-public-page{background:linear-gradient(180deg,#f8fbff 0,#fff 34rem)}
body.premium-public-page :where(.card,.announcement-card,.resource-card,.project-card,.event-card){border-color:var(--premium-line);box-shadow:var(--premium-shadow)}
body.premium-public-page :where(.card,.announcement-card,.resource-card,.project-card,.event-card):hover{transform:translateY(-3px);box-shadow:var(--premium-shadow-strong)}
body.premium-public-page :where(.page-hero,.hero-section,[class*="page-hero"],.gov-hero){position:relative}
body.premium-public-page :where(.page-hero,.hero-section,[class*="page-hero"],.gov-hero)::after{content:"";position:absolute;inset:auto 0 0;height:1px;background:linear-gradient(90deg,transparent,rgba(255,255,255,.45),transparent);pointer-events:none}
body.premium-public-page :where(.hero,.page-header,.story-header,[class*="hero"],.gov-hero,.pp17-hero) :where(h1,h2,p){max-width:100%;overflow-wrap:anywhere;word-break:normal;white-space:normal;text-overflow:clip}
body.premium-public-page :where(.hero,.page-header,.story-header,[class*="hero"],.gov-hero,.pp17-hero) :where(h1,h2){text-wrap:balance}
.site-skip-link{z-index:300!important}
.component-error{display:flex;align-items:center;justify-content:center;gap:.75rem;min-height:3.5rem;padding:.7rem 1rem;background:#fff7ed;color:#9a3412;font-size:.75rem;font-weight:800}
.component-error a{color:#1d4ed8}
.public-page-control-row{display:flex!important;align-items:center;justify-content:space-between;gap:1rem}.public-page-control-copy{min-width:0}.public-page-control-copy strong,.public-page-control-copy p,.public-page-control-copy small{display:block;overflow-wrap:anywhere}.public-page-control-copy p{margin:.18rem 0 0;color:#2563eb;font-size:.65rem;font-weight:800}.public-page-control-copy small{margin-top:.18rem;color:#64748b;font-size:.58rem;line-height:1.45}

.public-page-unavailable{display:grid;min-height:calc(100svh - 10rem);place-items:center;padding:clamp(5rem,12vw,9rem) 1rem 7rem;background:radial-gradient(circle at 10% 0,rgba(37,99,235,.13),transparent 30rem),linear-gradient(180deg,#f8fbff,#eef4fb)}
.public-page-unavailable-card{width:min(100%,44rem);padding:clamp(1.4rem,5vw,3rem);border:1px solid #dbe5f0;border-radius:1.75rem;text-align:center;background:#fff;box-shadow:0 30px 80px -48px rgba(8,30,75,.65)}
.public-page-unavailable-card>span{display:grid;width:4rem;height:4rem;margin:auto;place-items:center;border-radius:1.25rem;color:#1d4ed8;background:#dbeafe;font-size:1.35rem}
.public-page-unavailable-card>p{margin:1.2rem 0 .35rem;color:#1d4ed8;font-size:.65rem;font-weight:900;letter-spacing:.14em;text-transform:uppercase}
.public-page-unavailable-card h1{margin:0 auto;color:#0f2c68;font-size:clamp(1.65rem,5vw,2.7rem);line-height:1.08;text-wrap:balance}
.public-page-unavailable-card>div{margin:1rem auto 0;max-width:36rem;color:#64748b;font-size:.82rem;line-height:1.75}
.public-page-unavailable-card>a{display:inline-flex;min-height:2.9rem;align-items:center;justify-content:center;gap:.55rem;margin-top:1.5rem;border-radius:.9rem;padding:.7rem 1rem;color:#fff;background:#1e40af;font-size:.75rem;font-weight:900;text-decoration:none}

.member-push-invitation{position:fixed;z-index:190;right:max(1rem,env(safe-area-inset-right));bottom:max(1rem,env(safe-area-inset-bottom));display:grid;width:min(calc(100% - 2rem),29rem);grid-template-columns:auto 1fr auto auto;gap:.8rem;align-items:center;padding:.85rem;border:1px solid rgba(191,219,254,.95);border-radius:1.15rem;color:#17315e;background:rgba(255,255,255,.97);box-shadow:0 30px 80px -32px rgba(2,18,63,.8);backdrop-filter:blur(18px)}
.member-push-invitation.success{border-color:#a7f3d0;background:#ecfdf5}
.member-push-invitation-icon{display:grid;width:2.65rem;height:2.65rem;place-items:center;border-radius:.85rem;color:#fff;background:linear-gradient(145deg,#1e40af,#0f766e)}
.member-push-invitation strong{display:block;font-size:.76rem;font-weight:900}.member-push-invitation p{margin:.18rem 0 0;color:#64748b;font-size:.62rem;line-height:1.45}
.member-push-invitation button{min-height:2.35rem;border:0;border-radius:.72rem;padding:.55rem .72rem;color:#fff;background:#1e40af;font-size:.65rem;font-weight:900}.member-push-invitation button[data-dismiss-push]{width:2.35rem;padding:0;color:#64748b;background:#f1f5f9}

/* Governance and archive pages */
.gov-loading{min-height:min(33rem,58vh)!important}
.gov-loading h2{margin:.8rem 0 .45rem;font-size:clamp(1.2rem,3vw,1.8rem)}
.gov-hero{min-height:0!important}
.gov-title{font-size:clamp(2rem,5vw,4.4rem)!important;line-height:1.02!important}
.gov-panel,.gov-stat,.gov-card,.gov-unit-card{border:1px solid var(--premium-line)!important;box-shadow:var(--premium-shadow)!important}
.gov-card-photo,.gov-card-photo-artwork,.gov-member-photo{background:#eaf0f7;object-fit:cover!important}
.gov-card-photo-artwork{object-position:center!important}
.gov-breadcrumb{overflow-x:auto;white-space:nowrap;scrollbar-width:none}
.gov-breadcrumb::-webkit-scrollbar{display:none}

/* Member and administrative workspaces */
.mp-body{background:linear-gradient(145deg,#f4f8fc,#edf4fb 52%,#f8fafc)!important}
.mp-topbar{border-bottom:1px solid rgba(203,213,225,.82)!important;background:rgba(255,255,255,.9)!important;backdrop-filter:blur(18px) saturate(140%)}
.mp-card{border-color:rgba(210,222,235,.95)!important;box-shadow:var(--premium-shadow)!important}
.mp-card:is(a,button):hover,.mp-list-item:is(a,button):hover{transform:translateY(-2px)}
.mp-hero{overflow:hidden;border:1px solid rgba(255,255,255,.18)!important;box-shadow:0 26px 68px -32px rgba(10,39,100,.78)!important}
.mp-page-title{letter-spacing:-.02em}
.mp-button{box-shadow:0 10px 28px -20px rgba(10,39,100,.75)}
.mp-form :where(input,select,textarea),.mp-field :where(input,select,textarea){min-height:2.9rem;border-color:#ccd9e7!important;background:rgba(255,255,255,.96)!important}
.mp-form textarea,.mp-field textarea{min-height:7rem}
.mp-table-wrap{border:1px solid var(--premium-line);border-radius:var(--premium-radius);background:#fff;box-shadow:var(--premium-shadow)}
.mp-table :where(th,td){vertical-align:middle}
.mp-table thead th{position:sticky;top:0;z-index:2;background:#f6f9fc;color:#41516b}
.mp-empty{border:1px dashed #cbd8e6!important;background:linear-gradient(145deg,#fbfdff,#f4f8fc)!important}
.mp-avatar img,.mp-profile-photo-lg,[data-member-photo],#admin-photo,#member-shell-photo{object-fit:cover!important;object-position:center 18%!important}
[data-member-photo][data-profile-source="fallback"],
[data-current-member-photo][data-profile-source="fallback"],
[data-profile-photo][data-profile-source="fallback"]{object-fit:contain!important;object-position:center!important;background:#eff6ff}
.mp-profile-complete-card{grid-column:1/-1}
.mp-profile-complete-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.8rem}
.mp-profile-summary-group{overflow:hidden;border:1px solid #dbe5f0;border-radius:1rem;background:linear-gradient(180deg,#fff,#f8fbff)}
.mp-profile-summary-group-head{display:flex;align-items:center;gap:.55rem;padding:.75rem .85rem;border-bottom:1px solid #e7eef6;color:#173b7a;background:#f4f8fc}.mp-profile-summary-group-head i{display:grid;width:1.9rem;height:1.9rem;place-items:center;border-radius:.65rem;background:#dbeafe}.mp-profile-summary-group-head h3{margin:0;font-size:.75rem;font-weight:900}
.mp-profile-summary-group dl{margin:0;padding:.35rem .85rem .7rem}.mp-profile-summary-group dl>div{display:grid;grid-template-columns:minmax(6.5rem,.72fr) minmax(0,1.28fr);gap:.65rem;padding:.48rem 0;border-bottom:1px solid #eef2f7}.mp-profile-summary-group dl>div:last-child{border-bottom:0}.mp-profile-summary-group dt{color:#64748b;font-size:.58rem;font-weight:800;text-transform:uppercase}.mp-profile-summary-group dd{margin:0;overflow-wrap:anywhere;color:#1e293b;font-size:.68rem;font-weight:700;text-align:right}
.mp-skeleton{overflow:hidden;background:linear-gradient(90deg,#eef3f8 25%,#f9fbfd 42%,#eef3f8 65%);background-size:300% 100%;animation:premium-shimmer 1.35s ease-in-out infinite}
@keyframes premium-shimmer{to{background-position:-150% 0}}
html.dark .mp-body{background:#07101f!important}
html.dark .mp-topbar{background:rgba(8,17,32,.9)!important;border-color:#263449!important}
html.dark .mp-card,html.dark .mp-table-wrap{border-color:#263449!important;box-shadow:none!important}
html.dark .mp-profile-summary-group{border-color:#263449;background:#0f172a}html.dark .mp-profile-summary-group-head{border-color:#263449;color:#bfdbfe;background:#111827}html.dark .mp-profile-summary-group dl>div{border-color:#263449}html.dark .mp-profile-summary-group dd{color:#e2e8f0}
html.dark .mp-form :where(input,select,textarea),html.dark .mp-field :where(input,select,textarea){border-color:#334155!important;background:#0f172a!important}

/* Specialist payment and verification surfaces */
.payment-page :where(.payment-card,.bank-card,.metric-card,.member-card){border-color:var(--premium-line)!important;box-shadow:var(--premium-shadow)!important}
.payment-page .payment-hero{box-shadow:0 30px 80px -40px rgba(6,21,63,.8)}
.payment-page :where(input,select,textarea,.control){min-height:3rem}
.verification-shell,.receipt-shell{filter:drop-shadow(0 24px 48px rgba(15,35,72,.12))}

/* Compact premium mobile layout */
@media(max-width:899px){
  html{scroll-padding-top:4.4rem}
  .premium-reading-progress{height:2px}
  .premium-back-to-top{right:max(.65rem,env(safe-area-inset-right));bottom:max(5.3rem,calc(env(safe-area-inset-bottom) + 4.8rem));width:2.65rem;height:2.65rem}
  :where(main,[role="main"]) h1{font-size:clamp(1.72rem,8vw,2.35rem)!important;line-height:1.04!important}
  :where(main,[role="main"]) h2{font-size:clamp(1.22rem,6vw,1.72rem)!important}
  body.premium-public-page :where(section){scroll-margin-top:4.4rem}
  .gov-loading{min-height:22rem!important;padding:2.5rem 1rem!important}
  .gov-title{font-size:clamp(1.9rem,9vw,2.6rem)!important}
  .gov-hero-grid{gap:1rem!important}
  .gov-logo-wrap{width:4.5rem!important;height:4.5rem!important;border-radius:1.1rem!important}
  .gov-hero-actions{gap:.5rem!important}
  .gov-btn{width:100%;justify-content:center;min-height:2.8rem!important}
  .mp-main{padding-inline:max(.72rem,env(safe-area-inset-left))!important}
  .mp-shell{width:100%!important;max-width:none!important}
  .mp-card{border-radius:1rem!important}
  .mp-profile-layout{gap:.9rem!important}
  .mp-profile-tabs{display:flex!important;overflow-x:auto;scroll-snap-type:x proximity;scrollbar-width:none}
  .mp-profile-tabs::-webkit-scrollbar{display:none}
  .mp-profile-tab{flex:0 0 auto;scroll-snap-align:start;min-height:2.75rem!important}
  .mp-table{min-width:42rem}
  .payment-page .payment-hero{border-radius:1.1rem!important}
  .mp-profile-complete-summary{grid-template-columns:1fr}
  .member-push-invitation{right:max(.65rem,env(safe-area-inset-right));bottom:max(6.15rem,calc(env(safe-area-inset-bottom) + 5.5rem));left:max(.65rem,env(safe-area-inset-left));width:auto;grid-template-columns:auto 1fr auto;padding:.75rem}
  .member-push-invitation button[data-enable-push]{grid-column:2/3;justify-self:start}.member-push-invitation button[data-dismiss-push]{position:absolute;top:.45rem;right:.45rem;width:2rem;min-height:2rem}
}

@media(max-width:420px){
  :root{--premium-radius-lg:1.15rem}
  .gov-btn{font-size:.72rem!important}
  .mp-card-pad{padding:.82rem!important}
  .mp-form-grid{grid-template-columns:1fr!important}
  .payment-context-label{display:none!important}
}

@media(prefers-reduced-motion:reduce){
  .premium-reading-progress span,.premium-back-to-top,.mp-card,.mp-list-item{transition:none!important}
  .mp-skeleton{animation:none!important}
}

@media print{
  .premium-reading-progress,.premium-back-to-top,.navbar-mobile-dock,.unified-dashboard-mobile-dock{display:none!important}
  :where(.mp-card,.gov-panel,.gov-card,.payment-card){box-shadow:none!important}
}
