/* Shared resource card used by home recommendations and the library. */
.resource-card{display:flex;flex-direction:column;min-width:0;overflow:hidden;background:#fff;border:1px solid #e5e9f2;border-radius:12px;color:#1b1d21;text-decoration:none;transition:border-color 140ms ease,box-shadow 140ms ease;}
.resource-card:hover{border-color:#a6bff5;box-shadow:0 4px 16px #3867ed12;text-decoration:none;}
.resource-card:focus-visible{outline:3px solid #91b0f5;outline-offset:3px;}
.resource-card-image{aspect-ratio:16 / 10;overflow:hidden;background:#f5f7fc;border-bottom:1px solid #e5e9f2;}
.resource-card-image img{display:block;width:100%;height:100%;object-fit:cover;object-position:center;}
.resource-card-body{display:flex;flex-direction:column;flex:1;padding:14px;}
.resource-card h2{font-size:16px;line-height:1.5;margin:0 0 9px;font-weight:600;letter-spacing:0;color:#1b1d21;}
.resource-card-category{align-self:flex-start;background:#eef3ff;color:#3867ed;font-size:12px;font-weight:600;border-radius:5px;padding:3px 9px;margin-bottom:10px;}
.resource-card-category.mechanics{background:#f2ecfd;color:#7c4dd6;}
.resource-card-category.optics{background:#e8f7fb;color:#11738a;}
.resource-card p{font-size:13px;line-height:1.7;color:#7b879a;margin:0 0 16px;min-height:44px;}
.resource-card-footer{display:flex;justify-content:flex-end;margin-top:auto;}
.resource-card-button{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:5px 14px;background:#3867ed;border:1px solid #3867ed;color:#fff;border-radius:8px;font-size:13px;font-weight:500;white-space:nowrap;}
.resource-card:hover .resource-card-button{background:#2858df;border-color:#2858df;}
.resource-card:active .resource-card-button{transform:translateY(2px);filter:brightness(.94);}
#home-rec{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px;}
@media(max-width:1100px){#home-rec{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media(max-width:650px){#home-rec{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}}

.who button.header-action{font:inherit;cursor:pointer;white-space:nowrap;}

.resource-card:focus-visible{border-color:#3867ed;box-shadow:0 4px 16px #3867ed20;}
.resource-card:focus-visible .resource-card-button{background:#2858df;border-color:#2858df;}
.resource-card-button{transition:background-color 120ms ease,border-color 120ms ease,transform 80ms ease;}
.home-resource-error{grid-column:1 / -1;padding:24px;background:#fff;border:1px solid #e5e9f2;border-radius:12px;}
@media(prefers-reduced-motion:reduce){.resource-card,.resource-card-button{transition:none;}}

@media(max-width:760px){
 .topbar .who{flex-basis:100%;min-width:0;flex-shrink:1;flex-wrap:wrap;justify-content:flex-end;gap:8px;}
 .topbar .who .header-action{max-width:100%;padding:0 12px;font-size:13px;}
 .topbar .who .header-account{overflow:hidden;text-overflow:ellipsis;}
 .topbar{height:auto;}
}

.public-account-menu{position:relative;}
.public-account-menu summary{list-style:none;cursor:pointer;}
.public-account-menu summary::-webkit-details-marker{display:none;}
.public-account-options{position:absolute;right:0;top:calc(100% + 8px);z-index:100;min-width:160px;background:#fff;border:1px solid #e5e9f2;border-radius:10px;padding:6px;box-shadow:0 8px 24px #22365c1a;}
.public-account-options a,.public-account-options button{display:block;box-sizing:border-box;width:100%;padding:10px 14px;border:0;border-radius:6px;background:transparent;color:#334155;text-decoration:none;text-align:left;font:inherit;white-space:nowrap;cursor:pointer;transition:background-color 120ms ease,transform 80ms ease;}
.public-account-options a:hover,.public-account-options a:focus-visible,.public-account-options button:hover,.public-account-options button:focus-visible{background:#eef3ff;color:#3867ed;}
.public-account-options a:active,.public-account-options button:active{transform:translateY(1px);}
.public-account-options #public-logout{margin-top:6px;border-top:1px solid #e5e9f2;border-radius:0 0 6px 6px;color:#c03636;}
.public-account-options #public-logout:hover{background:#fff1f1;}
.who .header-action.account-icon-button,body.labs-page .who .header-action.account-icon-button,#experiment-account .public-account-menu>summary.account-icon-button{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-width:44px;min-height:44px;padding:0;border-radius:12px;flex-shrink:0;}
.account-icon-button svg{display:block;width:22px;height:22px;flex-shrink:0;pointer-events:none;}
.public-account-identity{padding:10px 14px 12px;margin-bottom:6px;border-bottom:1px solid #e5e9f2;max-width:260px;text-align:left;}
.public-account-identity>span{display:block;font-size:12px;color:#7b879a;margin-bottom:4px;}
.public-account-identity>strong{display:block;font-size:14px;font-weight:600;color:#334155;line-height:1.5;overflow-wrap:anywhere;}

.resource-card-image{position:relative}.resource-pending-optimization{position:absolute;top:10px;right:10px;z-index:1;padding:4px 9px;border:1px solid #f2d49a;border-radius:6px;background:#fff4dc;color:#96601d;font-size:12px;line-height:1.5;font-weight:500}
