/* Shared geometry for public, resident and committee UI. Status colours remain semantic. */
body.ui-consistent{
  --ui-action-height:46px;--ui-compact-height:44px;--ui-action-radius:10px;
  --ui-card-radius:16px;--ui-card-padding:20px;--ui-grid-gap:14px;
  --ui-action-ink:#713e2b;--ui-action-line:#d9c5a9;--ui-action-surface:#fffaf2;
  --ui-action-primary:#873d28;
}
body.ui-consistent button{font-family:'DM Sans',system-ui,sans-serif}
body.ui-consistent :is(.btn-primary,.btn-secondary,.btn-main,.btn-wa,.btn-wa2,.btn-login,.btn-outline,.btn-ghost,.btn-light,.btn-danger,.btn-p,.btn,.btn-download-receipt,.contribution-action,.check-btn,.gcal-btn,.wa-channel-btn,.sh-btn,.ann-btn,.ft-btn,.modal-action-btn,.retry-btn,.vr-link-btn,.cc-btn,.cc-btn-wa,.cc-btn-tel,.cc-btn-mail,.action.call,.action.wa,.wa-btn,.btn-save-all,.sn-ok,.sn-more){
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  box-sizing:border-box;min-height:var(--ui-action-height);max-width:100%;
  padding:10px 16px;border-radius:var(--ui-action-radius);border-width:1px;border-style:solid;
  font-family:'DM Sans',system-ui,sans-serif;font-size:.875rem;font-weight:600;line-height:1.35;
  font-style:normal;letter-spacing:0;text-align:center;text-decoration:none;vertical-align:middle;white-space:normal;
}
body.ui-consistent :is(.btn-primary,.btn-main,.btn-login,.btn-p,.pq-btn-primary,.btn.primary){
  background:var(--ui-action-primary);color:#fff9ef;border-color:var(--ui-action-primary);
  box-shadow:0 3px 9px #65301c14;
}
body.ui-consistent :is(.btn-secondary,.btn-outline,.btn-ghost,.btn-light,.btn.light,.btn.btn-light,.btn.btn-outline,.pq-btn-ghost,.contribution-action){
  background:var(--ui-action-surface);color:var(--ui-action-ink);border-color:var(--ui-action-line);box-shadow:none;
}
body.ui-consistent :is(.btn-primary,.btn-secondary,.btn-main,.btn,.home-tile):hover{transform:none}
body.ui-consistent :is(.btn-primary,.btn-secondary,.btn-main,.btn,.home-tile):active{transform:none}
body.ui-consistent :is(.btn-s,.btn-sm,.btn-admin-link,.btn-logout,.ph-signout-btn,.tk-filter-btn,.fchip,.yr-tab,.ptab){
  box-sizing:border-box;min-height:var(--ui-compact-height);border-radius:var(--ui-action-radius);
  font-family:'DM Sans',system-ui,sans-serif;font-size:.8125rem;line-height:1.35;
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
}
body.ui-consistent :is(.btn-s,.btn-sm,.btn-admin-link){padding:8px 12px}
body.ui-consistent :is(.community-home button,.community-jumps a,.resident-quick-actions a,.resident-contact-actions button){
  min-height:var(--ui-action-height);border-radius:var(--ui-action-radius);
  box-sizing:border-box;font-size:.875rem;line-height:1.35;
}
body.ui-consistent .community-home button{padding:10px 14px;min-width:46px}
body.ui-consistent :is(.sheet-close,.td-close-x,.pq-refresh){
  box-sizing:border-box;width:44px;height:44px;min-width:44px;min-height:44px;
  display:inline-flex;align-items:center;justify-content:center;padding:8px;border-radius:10px;line-height:1;
}
body.ui-consistent :is(.pn-btn-contribute,.pn-btn-portal){min-height:44px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center}
body.ui-consistent :is(input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=color]):not([type=submit]):not([type=button]),select){
  box-sizing:border-box;min-width:0;max-width:100%;min-height:var(--ui-action-height);
  border-radius:var(--ui-action-radius);font-family:'DM Sans',system-ui,sans-serif;
}
body.ui-consistent textarea{box-sizing:border-box;max-width:100%;border-radius:10px;font-family:'DM Sans',system-ui,sans-serif;font-size:16px;line-height:1.5}
body.ui-consistent input[type=file]{max-width:100%;font-family:'DM Sans',system-ui,sans-serif;font-size:.85rem}
body.ui-consistent input[type=file]::file-selector-button{
  min-height:44px;margin-right:10px;padding:8px 12px;border:1px solid var(--ui-action-line);border-radius:10px;
  background:var(--ui-action-surface);color:var(--ui-action-ink);font:600 .85rem 'DM Sans',system-ui,sans-serif;
}
body.ui-consistent :is(button,a,input,select,textarea,summary):focus-visible{outline:3px solid #b7833e;outline-offset:3px}
body.ui-consistent :is(.card,.pcard,.admin-card,.community-funding,.community-list-card,.contact-card,.resident-status-card,.home-tile,.ops-hub-link){
  box-sizing:border-box;min-width:0;border-radius:var(--ui-card-radius);
}
body.ui-consistent :is(.pcard,.admin-card,.community-funding,.community-list-card,.resident-status-card){padding:var(--ui-card-padding)}
body.ui-consistent :is(.card-title,.pcard-title,.ac-title,.community-card-head h2){
  font-family:'DM Sans',system-ui,sans-serif;font-size:1rem;font-weight:700;line-height:1.4;letter-spacing:0;
}
body.ui-consistent :is(.stat-grid,.kpi-grid,.home-tiles,.resident-status-grid,.ops-hub-links){align-items:stretch;gap:var(--ui-grid-gap)}
body.ui-consistent :is(.hero-actions,.form-actions,.sheet-actions,.community-funding-actions,.resident-contact-actions){gap:10px;flex-wrap:wrap;align-items:stretch}
body.ui-consistent .community-lists{align-items:stretch;gap:var(--ui-grid-gap)}
body.ui-consistent .community-list-card{display:flex;flex-direction:column}
body.ui-consistent .community-lists>.community-list-card .community-card-head{min-height:100px}
body.ui-consistent .community-rows{flex:1 1 auto;min-height:160px}
body.ui-consistent .community-pagination{margin-top:auto;padding-top:14px;gap:10px}
body.ui-consistent .community-list-status{min-height:24px}
body.ui-consistent .community-search{align-items:stretch;gap:8px}
body.ui-consistent .community-search input{height:var(--ui-action-height)}
body.ui-consistent .community-search button{min-height:var(--ui-action-height)}
body.ui-consistent .resident-status-card{display:flex;flex-direction:column;align-items:flex-start}
body.ui-consistent .resident-card-actions{display:flex;flex-wrap:wrap;align-items:stretch;gap:8px;padding-top:8px;margin-top:auto;max-width:100%}
body.ui-consistent .resident-card-actions :is(a,button){margin:0}
body.ui-consistent .resident-quick-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
body.ui-consistent .resident-quick-actions a{display:flex;align-items:center;justify-content:center;text-align:center;padding:10px 12px}
body.ui-consistent .ops-hub-link{display:flex;flex-direction:column}
body.ui-consistent .ops-hub-link small{margin-top:auto;padding-top:12px}
body.ui-consistent .home-tile .home-tile-desc{line-height:1.5}
@media(max-width:680px){
  body.ui-consistent{--ui-card-padding:16px;--ui-grid-gap:12px}
  body.ui-consistent .community-list-card .community-card-head{min-height:0}
  body.ui-consistent .community-rows{flex:none;min-height:0}
  body.ui-consistent .community-pagination{margin-top:12px}
  body.ui-consistent .resident-quick-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.ui-consistent :is(.btn-primary,.btn-secondary,.btn-main,.btn-wa,.btn-outline,.btn,.contribution-action){padding:10px 14px}
}

@supports(grid-template-rows:subgrid){
  @media(min-width:681px){
    body.ui-consistent .community-lists>.community-list-card{display:grid;grid-template-rows:subgrid;grid-row:span 5;row-gap:0}
    body.ui-consistent .community-lists>.community-list-card .community-card-head{min-height:0}
    body.ui-consistent .community-lists>.community-list-card .community-pagination{margin-top:12px}
  }
}

body.ui-consistent.ops-detail .stats>.stat{display:flex;flex-direction:column;align-items:flex-start}
body.ui-consistent.ops-detail .stats>.stat :is(strong,b){margin-top:auto;padding-top:6px}
body.ui-consistent :is(.lightbox-close,button[aria-label^="close" i],button[aria-label^="dismiss" i]){min-width:44px;min-height:44px;box-sizing:border-box}

body.ui-consistent .community-funding-actions a{min-height:46px;box-sizing:border-box;border-radius:10px;padding:10px 14px;font-size:.875rem;line-height:1.35;justify-content:center;text-align:center}
body.ui-consistent .community-funding-actions a:not(.community-primary){border:1px solid var(--ui-action-line);background:var(--ui-action-surface);color:var(--ui-action-ink)}

body.ui-consistent .feat-tile{display:flex;flex-direction:column;border-radius:var(--ui-card-radius);padding:var(--ui-card-padding);min-width:0}
body.ui-consistent .feat-tile:hover,body.ui-consistent .feat-tile:active{transform:none}
body.ui-consistent .ft-actions{margin-top:auto;gap:10px;align-items:stretch}

/* Focused resident dashboard: devotional colour, purposeful motion, compact chrome. */
body.ui-consistent .portal-hero{padding:8px 16px}
body.ui-consistent .portal-hero .ph-inner{max-width:900px;margin:auto;padding:0;gap:10px;flex-wrap:nowrap}
body.ui-consistent .ph-avatar{width:42px;height:42px;min-width:42px;font-size:1.1rem}
body.ui-consistent .ph-info{min-width:0;flex:1}
body.ui-consistent .ph-greeting{display:none}
body.ui-consistent .ph-name{font-size:1.1rem}
body.ui-consistent .ph-right{display:flex;flex-direction:row;align-items:center;gap:8px;margin-left:auto;flex-shrink:0}
body.ui-consistent .ph-admin-link{padding:8px 10px;min-height:44px;border-radius:10px;font-size:.75rem}
body.ui-consistent #tab-home>.resident-title:first-child{margin:4px 0 14px;font-size:1.65rem}
body.ui-consistent .community-funding{position:relative;isolation:isolate;overflow:hidden;background:linear-gradient(125deg,#3d100d,#65271a 70%,#793b1e);border:1px solid #b6884f;color:#fff4df;box-shadow:0 14px 34px #43170b15;padding:24px}
body.ui-consistent .community-funding::before{content:'';position:absolute;z-index:-1;pointer-events:none;right:-70px;top:-120px;width:260px;height:260px;border:1px solid #e7bc6955;border-radius:50%;box-shadow:0 0 0 24px #e4b96408,0 0 0 50px #e4b96405;background:radial-gradient(circle,#e8b95b25,transparent 65%);animation:community-sun-glow 6s ease-in-out infinite alternate}
body.ui-consistent .community-funding .community-kicker{color:#edc783;letter-spacing:.06em;font-size:.72rem}
body.ui-consistent .community-funding .community-card-head h2{font-family:'Playfair Display',Georgia,serif;font-size:1.5rem;color:#fff1d0;line-height:1.25;margin-top:6px}
body.ui-consistent .community-funding .community-card-head button{background:#ffffff09;border-color:#dfb87766;color:#ffe4b3}
body.ui-consistent .community-funding .community-money-grid{gap:18px;margin:18px 0 24px}
body.ui-consistent .community-funding .community-money-grid span{color:#e3c6a6;font-size:.78rem}
body.ui-consistent .community-funding .community-money-grid strong{color:#fff3dc;font-variant-numeric:tabular-nums;font-size:clamp(1.25rem,2.2vw,1.7rem)}
body.ui-consistent .community-funding .community-raised strong{color:#ffda87;font-size:clamp(1.65rem,3vw,2.25rem)}
body.ui-consistent .community-funding .community-gap strong{color:#ffe8bd}
body.ui-consistent .community-funding .community-progress-label{color:#f5d5a3;font-size:.85rem}
body.ui-consistent .community-funding .community-progress-label>span{color:#dec2a0;font-size:.76rem;white-space:normal;text-align:right}
body.ui-consistent .community-funding .community-progress{height:12px;background:#ffffff20}
body.ui-consistent .community-funding .community-verified-fill{background:linear-gradient(90deg,#d29b42,#ffdb8b);box-shadow:0 0 12px #eac67533;animation:community-progress-reveal .85s cubic-bezier(.22,1,.36,1) both;transform-origin:left}
body.ui-consistent .community-funding .community-finance-note{color:#e4c8a6;margin:14px 0;font-size:.8rem}
body.ui-consistent .community-funding .community-funding-actions .community-primary{background:#f3c66e;color:#47200e;border:1px solid #f3c66e;font-weight:700;box-shadow:0 4px 14px #1d06061c}
body.ui-consistent .community-funding .community-funding-actions a:not(.community-primary){background:transparent;color:#ffdfab;border-color:#c29a6b70}
body.ui-consistent .community-payment-status{display:inline-flex;align-items:center;min-height:44px;font-size:.78rem;color:#edcea2;text-decoration:none;margin-top:5px}
body.ui-consistent .community-list-card{box-shadow:0 6px 22px #54261108;animation:community-card-reveal .4s ease both}
body.ui-consistent .community-list-card .community-kicker{display:inline-block;padding:4px 8px;background:#f4e8d2;border-radius:8px;color:#85562e;font-size:.75rem}
body.ui-consistent #communityContributors .community-kicker{background:#eaf1e7;color:#4e714b}
body.ui-consistent .community-card-head>div{min-width:0}
body.ui-consistent .community-rows li{padding:12px 10px;border-radius:8px;transition:background .16s}
body.ui-consistent .community-rows li:nth-child(odd){background:#fcf7ef}
body.ui-consistent .community-rows li:hover{background:#f5ead8}
body.ui-consistent .community-refresh-icon{display:inline-block}
body.ui-consistent :is(.community-funding,.community-list-card):has([aria-busy=true]) .community-refresh-icon{animation:community-refresh-spin .8s linear infinite}
@keyframes community-progress-reveal{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@keyframes community-card-reveal{from{opacity:.25}to{opacity:1}}
@keyframes community-sun-glow{from{opacity:.55;transform:translateY(0)}to{opacity:.9;transform:translateY(6px)}}
@keyframes community-refresh-spin{to{transform:rotate(360deg)}}
@media(max-width:680px){
 body.ui-consistent .ph-right .ph-badge{display:none}
 body.ui-consistent .ph-signout-btn{padding:8px 10px;font-size:.72rem}
 body.ui-consistent .ph-name{font-size:1rem}
 body.ui-consistent .community-funding{padding:18px}
 body.ui-consistent .community-funding .community-card-head h2{font-size:1.25rem}
 body.ui-consistent .community-funding .community-money-grid{gap:14px;margin:14px 0 18px}
 body.ui-consistent .community-funding .community-gap{border-color:#d6ad6d45}
 body.ui-consistent .community-funding .community-gap strong{font-size:1.35rem}
 body.ui-consistent .community-funding .community-progress-label>span{max-width:18ch}
}
@media(prefers-reduced-motion:reduce){
 body.ui-consistent .community-funding::before,body.ui-consistent .community-verified-fill,body.ui-consistent .community-list-card,body.ui-consistent .community-refresh-icon{animation:none!important;transition:none!important}
}

/* Match the compact landing actions to the colourful festival tiles below. */
body.ui-consistent .home-task-grid a{border:1px solid #ffffff38;color:#fff8eb;background:linear-gradient(135deg,#8b263f,#541829);box-shadow:0 4px 12px #200b0626}
body.ui-consistent .home-task-grid a:nth-child(2){background:linear-gradient(135deg,#b94419,#79270d)}
body.ui-consistent .home-task-grid a:nth-child(3){background:linear-gradient(135deg,#ffd46f,#f6ae35);color:#492007;border-color:#ffdb82}
body.ui-consistent .home-task-grid a:nth-child(4){background:linear-gradient(135deg,#245795,#142f56)}
body.ui-consistent .home-task-grid .home-task-icon{background:#ffffff1f;color:inherit;border:1px solid #ffffff26}
body.ui-consistent .home-task-grid a:hover{filter:brightness(1.12);box-shadow:0 5px 15px #200b0640}
body.ui-consistent .home-funding{background:linear-gradient(115deg,#641c23,#8b3421);border-color:#d9a557;color:#fff3d9;box-shadow:0 6px 18px #280c0526}
body.ui-consistent .home-funding-head h2,body.ui-consistent .home-funding a,body.ui-consistent #homeFundingBody>strong{color:#ffe1a0}
body.ui-consistent .home-funding-metrics>div{padding:6px 8px;border-radius:8px;background:#fff0d2}
body.ui-consistent .home-funding-metrics>div:nth-child(2){background:#e3edff}
body.ui-consistent .home-funding-metrics>div:nth-child(3){background:#ffe2d5}
body.ui-consistent .home-funding-metrics span{color:#68402d}
body.ui-consistent .home-funding-metrics strong{color:#55291b}
body.ui-consistent .home-funding .community-progress{background:#ffffff26}
body.ui-consistent .home-funding .community-verified-fill{background:linear-gradient(90deg,#edaf3b,#ffdd8a)}
body.ui-consistent .home-funding-caption{color:#f5d4ad}
body.ui-consistent .home-funding-link:focus-visible{outline-color:#ffdd8a}

/* Desktop home tiles use the same 2x2 layout and sizing as mobile (no orphaned 4th tile). */
@media(min-width:720px){
  body.ui-consistent .home-task-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  body.ui-consistent .home-task-grid a{min-height:58px;padding:10px 14px;gap:12px;border-radius:12px}
  body.ui-consistent .home-task-grid .home-task-icon{width:32px;height:34px;min-width:32px;border-radius:9px}
  body.ui-consistent .home-task-grid .home-task-icon svg{width:20px;height:20px}
  body.ui-consistent .home-task-grid strong{font-size:.95rem}
  body.ui-consistent .home-funding-metrics{gap:12px}
  body.ui-consistent .home-funding-metrics>div{padding:8px 12px;border-radius:10px}
  body.ui-consistent .home-funding-metrics span{font-size:.8rem}
  body.ui-consistent .home-funding-metrics strong{font-size:1.45rem}
  body.ui-consistent .home-funding .community-progress{height:8px}
}
